/* Small Rows — one small stylesheet, no frameworks, no web fonts, no trackers. */
:root {
  --ink: #17221c;
  --muted: #5b6a61;
  --line: #e2e8e3;
  --bg: #fbfcfa;
  --card: #ffffff;
  --brand: #1f6b46;
  --brand-ink: #134a30;
  --brand-soft: #e8f3ec;
  --accent: #f2b544;
  --radius: 12px;
  --max: 1040px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; } /* in-page links land below the sticky header */
body {
  margin: 0; color: var(--ink); background: var(--bg);
  font: 16px/1.65 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
a { color: var(--brand); text-underline-offset: 2px; }
a:hover { color: var(--brand-ink); }
img, svg { max-width: 100%; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 760px; }

/* Header */
.site-header { border-bottom: 1px solid var(--line); background: rgba(251,252,250,.92); position: sticky; top: 0; backdrop-filter: blur(6px); z-index: 5; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 700; letter-spacing: -.01em; }
.brand svg { width: 28px; height: 28px; }
.nav { display: flex; gap: 18px; flex-wrap: wrap; font-size: 15px; }
.nav a { color: var(--muted); text-decoration: none; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }

/* Notice bar */
.notice { display: block; text-decoration: none; background: var(--brand-soft); color: var(--brand-ink); font-size: 14px; text-align: center; padding: 8px 16px; }

/* Typography */
h1, h2, h3 { line-height: 1.2; letter-spacing: -.02em; }
h1 { font-size: clamp(30px, 4.6vw, 48px); margin: 0 0 14px; }
h2 { font-size: 26px; margin: 48px 0 12px; }
h3 { font-size: 18px; margin: 24px 0 6px; }
.lead { font-size: 19px; color: var(--muted); max-width: 680px; }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: 12px; font-weight: 700; color: var(--brand); }
.muted { color: var(--muted); }
small, .small { font-size: 14px; }

/* Sections */
.hero { padding: 72px 0 40px; }
section { padding: 8px 0 24px; }
.page { padding-top: 48px; padding-bottom: 64px; } /* keeps .wrap's side padding on phones */
.page h1 { margin-bottom: 8px; }

/* Buttons */
.btn { display: inline-block; padding: 11px 18px; border-radius: 10px; font-weight: 600; text-decoration: none; border: 1px solid transparent; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-ink); color: #fff; }
.btn-ghost { border-color: var(--line); color: var(--ink); background: var(--card); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand-ink); }
.btn[aria-disabled="true"] { background: #cfd8d2; color: #44514a; cursor: not-allowed; }
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 22px; align-items: center; }

/* Cards & grids */
.grid { display: grid; gap: 18px; }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.card h3 { margin-top: 0; }
.card p:last-child { margin-bottom: 0; }

/* Product preview (illustrative, drawn in HTML) */
.sheet { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; overflow: hidden; font-size: 14px; box-shadow: 0 10px 30px rgba(23,34,28,.06); }
.sheet .tabs { display: flex; flex-wrap: wrap; gap: 2px; background: #f3f6f4; border-top: 1px solid var(--line); padding: 6px 8px 0; }
.sheet .tab { padding: 6px 12px; border-radius: 6px 6px 0 0; color: var(--muted); }
.sheet .tab.on { background: #fff; color: var(--ink); font-weight: 600; }
.sheet table { width: 100%; border-collapse: collapse; }
.sheet th, .sheet td { padding: 7px 10px; border-bottom: 1px solid #eef1ef; text-align: left; white-space: nowrap; }
.sheet th { background: var(--brand-soft); font-weight: 600; }
.sheet td.n, .sheet th.n { text-align: right; font-variant-numeric: tabular-nums; }
.sheet tr.total td { font-weight: 700; }
.caption { font-size: 13px; color: var(--muted); margin-top: 8px; }

/* Pricing */
.pricing { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin-top: 18px; }
.plan { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; display: flex; flex-direction: column; }
.plan.featured { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.plan .price { font-size: 38px; font-weight: 800; letter-spacing: -.03em; margin: 6px 0 2px; }
.plan .price span { font-size: 15px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.plan .btn + .btn { margin-top: 8px; } /* stacked buy buttons (Earnings monthly + yearly, live only) */
.plan ul { padding-left: 18px; margin: 14px 0 20px; flex: 1; }
.plan li { margin: 4px 0; }
.badge { display: inline-block; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: #fff4dc; color: #7a5200; }

/* Lists, tables, prose */
.checks { list-style: none; padding: 0; }
.checks li { padding-left: 26px; position: relative; margin: 6px 0; }
.checks li::before { content: ""; position: absolute; left: 0; top: .5em; width: 14px; height: 8px; border-left: 2.5px solid var(--brand); border-bottom: 2.5px solid var(--brand); transform: rotate(-45deg); }
.prose h2 { font-size: 22px; margin-top: 36px; }
.prose ol, .prose ul { padding-left: 22px; }
.prose li { margin: 4px 0; }
.prose code, code { background: #f0f3f1; padding: 1px 6px; border-radius: 5px; font-size: .92em; }
.callout { border-left: 4px solid var(--accent); background: #fffaf0; padding: 12px 16px; border-radius: 0 8px 8px 0; margin: 18px 0; }
.callout.green { border-color: var(--brand); background: var(--brand-soft); }
table.simple { border-collapse: collapse; width: 100%; margin: 14px 0; font-size: 15px; }
table.simple th, table.simple td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; }
table.simple th { background: #f3f6f4; }
/* Three-column data tables with long host names (/privacy/): on phones, let <code> host names wrap so the table fits 390 px. */
@media (max-width: 600px) { table.simple.wrap-any code { overflow-wrap: anywhere; } }
/* The CRA's ITC chart on the GST/HST invoice guide: Yes/No columns centred; on phones smaller type and padding so all 4 columns fit 360 px without scrolling. */
table.simple.itc-chart th.c, table.simple.itc-chart td.c { text-align: center; width: 17%; }
@media (max-width: 600px) { table.simple.itc-chart { font-size: 13.5px; } table.simple.itc-chart th, table.simple.itc-chart td { padding: 6px 5px; } }
details { border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px; background: var(--card); margin: 10px 0; }
details summary { cursor: pointer; font-weight: 600; }
.toc { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 20px; }
.toc ol { margin: 6px 0; }
.toc ul { margin: 6px 0; padding-left: 0; list-style: none; }

/* Log */
.log-entry { border-top: 1px solid var(--line); padding-top: 18px; margin-top: 28px; }
.log-meta { font-size: 14px; color: var(--muted); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin: 16px 0; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.stat b { display: block; font-size: 22px; }

/* Guides */
.byline { font-size: 14px; color: var(--muted); margin: 0 0 18px; }
.prose pre { background: #f3f6f4; border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; overflow-x: auto; font-size: 13.5px; line-height: 1.5; }
.prose pre code { background: none; padding: 0; border-radius: 0; font-size: inherit; }
.table-scroll { overflow-x: auto; }
.table-scroll table.simple { min-width: 640px; }
.sources { font-size: 14px; }
.sources li { margin: 6px 0; overflow-wrap: anywhere; }
.guide-card h2, .prose .guide-card h2 { font-size: 18px; margin: 6px 0; }
.guide-card h2 a { color: var(--ink); text-decoration: none; }
.guide-card h2 a:hover { color: var(--brand-ink); text-decoration: underline; }
.download { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); margin-top: 40px; padding: 28px 0 40px; font-size: 14px; color: var(--muted); }
.site-footer .cols { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.site-footer a { color: var(--muted); }
.site-footer nav { display: flex; gap: 14px; flex-wrap: wrap; }

@media (max-width: 720px) {
  /* On phones the header wraps to ~130 px, so it scrolls away instead of staying stuck over the content. */
  html { scroll-padding-top: 0; }
  .site-header { position: static; }
  .site-header .wrap { height: auto; padding-top: 10px; padding-bottom: 10px; flex-direction: column; align-items: flex-start; }
  .nav { gap: 2px 18px; }
  .nav a { padding: 4px 0; }
  /* Long inline code (API URLs) wraps instead of pushing the page sideways. */
  .prose :not(pre) > code { overflow-wrap: anywhere; }
  .hero { padding-top: 40px; }
  .sheet { overflow-x: auto; }
}
.sheet .scroll { overflow-x: auto; }
/* "Swipe or scroll sideways" cue above boxes that scroll on phones (scrollHint() in helpers.mjs). Shown only at ≤ 560 px, where each of those boxes was measured to overflow. */
.scroll-hint { display: none; margin: 0 0 4px; text-align: right; font-size: 13px; color: var(--muted); }
@media (max-width: 560px) { .scroll-hint { display: block; } }
.sheet td .est { font-size: 11px; color: #7a5200; margin-left: 4px; }

/* Tax set-aside calculator (/guides/freelance-tax-set-aside-calculator-canada/) */
.calc h3 { margin-top: 26px; }
.calc-grid { display: grid; gap: 14px 20px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.field { margin: 0; min-width: 0; }
fieldset.field { border: 0; padding: 0; }
.field label, .field legend { display: block; font-weight: 600; font-size: 15px; margin-bottom: 4px; padding: 0; }
.field label.choice { display: inline-flex; align-items: center; gap: 6px; font-weight: 400; margin-right: 18px; }
.field input[type="text"], .field select { width: 100%; font: inherit; padding: 9px 11px; border: 1px solid #7f8c84; /* 3.5:1 on white: the border is what shows where to type (WCAG 1.4.11) */ border-radius: 8px; background: #fff; color: var(--ink); }
.field input[type="text"]:focus, .field select:focus { outline: 2px solid var(--brand); outline-offset: 1px; border-color: var(--brand); }
.field input[aria-invalid="true"], .field select[aria-invalid="true"] { border-color: #b3261e; }
.field .hint { font-size: 13px; color: var(--muted); margin: 4px 0 0; }
.field-error { font-size: 13px; color: #b3261e; font-weight: 600; margin: 4px 0 0; }
.calc .sheet { margin-top: 10px; }
.sheet table.calc-table td.lbl, .sheet table.calc-table td:last-child:not(.n), .sheet table.calc-table th { white-space: normal; }
.sheet table.calc-table th { vertical-align: bottom; }
.calc-table tr.lbl-row { display: none; }
.sheet table.calc-table tr.over td { background: #fff7e6; }
.calc-result { margin: 12px 0 0; }
.calc-msg { margin: 10px 0 0; color: var(--muted); font-size: 14px; }
.calc-buttons { margin-top: 14px; }
.calc-buttons .btn { font: inherit; font-weight: 600; cursor: pointer; }
[hidden] { display: none !important; }
/* Text for screen readers only (e.g. an otherwise empty table header). */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
/* Scroll boxes (wide tables, code) are keyboard-focusable so they can be scrolled without a mouse. */
[tabindex="0"]:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
@media (max-width: 600px) {
  .card.calc { padding: 16px 14px; }
  .calc-table .lbl { display: none; }
  .calc-table tr.lbl-row { display: table-row; }
  .sheet table.calc-table tr.lbl-row td { border-bottom: 0; padding-bottom: 0; white-space: normal; font-size: 13px; color: var(--muted); }
  .sheet table.calc-table tr.total.lbl-row td { color: var(--ink); }
  .sheet table.calc-table th, .sheet table.calc-table td { padding-left: 6px; padding-right: 6px; font-size: 13.5px; }
}

/* Hourly rate calculator (/guides/freelance-hourly-rate-calculator/) */
.field .legend-like { display: block; font-weight: 600; font-size: 15px; margin-bottom: 4px; }
.rate-headline { font-size: 17px; }
.calc-steps { padding-left: 22px; margin: 8px 0 0; }
.calc-steps li { margin: 6px 0; overflow-wrap: anywhere; }

/* Late-payment calculator and reminder emails (/guides/freelance-late-payment-canada/, Done #26) */
.field input[type="date"] { width: 100%; font: inherit; padding: 8px 11px; border: 1px solid #7f8c84; border-radius: 8px; background: #fff; color: var(--ink); }
.field input[type="date"]:focus { outline: 2px solid var(--brand); outline-offset: 1px; border-color: var(--brand); }
.btn-small { padding: 7px 12px; margin-top: 6px; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
table.simple.late-result td { text-align: right; font-variant-numeric: tabular-nums; }
table.simple.late-result th { width: 55%; }
.prose pre.email { white-space: pre-wrap; overflow-wrap: anywhere; }

/* Free invoice generator (/guides/free-invoice-generator/, Done #27): the form, the live invoice, the checklist, and a print stylesheet that prints only the invoice. */
.field textarea { width: 100%; font: inherit; padding: 9px 11px; border: 1px solid #7f8c84; border-radius: 8px; background: #fff; color: var(--ink); resize: vertical; }
.field textarea:focus { outline: 2px solid var(--brand); outline-offset: 1px; border-color: var(--brand); }
.field textarea[aria-invalid="true"] { border-color: #b3261e; }
.im-tool .field + .field, .im-tool .calc-grid + .field { margin-top: 14px; }
.im-group { border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); padding: 14px 18px 18px; margin: 18px 0; min-width: 0; }
.im-group > legend { font-weight: 700; padding: 0 6px; }
.im-line { border: 0; border-top: 1px solid var(--line); padding: 10px 0 4px; margin: 0; min-width: 0; }
.im-line > legend { font-size: 13px; font-weight: 700; color: var(--muted); padding: 0; float: left; width: 100%; margin-bottom: 4px; }
.im-line-grid { clear: both; display: grid; gap: 8px 12px; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) auto; align-items: start; }
.im-line-grid .im-desc { grid-column: 1 / -1; }
.im-line-grid .field label, .im-line-grid .legend-like { font-size: 14px; }
.im-amount { display: block; padding: 9px 0; font-variant-numeric: tabular-nums; text-align: right; }
.im-remove-wrap { padding-top: 22px; }
.im-remove-wrap .btn-small { margin-top: 3px; }
.im-tax-row { display: grid; gap: 8px 16px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); margin-top: 12px; }
.im-actions { margin: 10px 0 12px; }
.im-actions .btn { font: inherit; font-weight: 600; cursor: pointer; }
.im-tool button[disabled] { opacity: .55; cursor: not-allowed; }
.im-status { color: #8a1c15; font-weight: 600; }
@media (max-width: 600px) {
  .im-group { padding: 12px 12px 14px; }
  .im-line-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .im-amount { text-align: left; }
  .im-remove-wrap { padding-top: 0; align-self: end; }
  .im-st { display: block; min-width: 0; }
}
.im-preview { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; padding: 28px 30px; box-shadow: 0 10px 30px rgba(23,34,28,.06); }
.invoice { font-size: 15px; line-height: 1.45; color: var(--ink); }
.invoice p { margin: 0 0 3px; }
.inv-head { display: flex; justify-content: space-between; gap: 18px 28px; flex-wrap: wrap; }
.inv-from, .inv-title { min-width: 0; overflow-wrap: anywhere; }
.inv-name { font-weight: 700; }
.inv-word { font-size: 28px; font-weight: 800; letter-spacing: -.02em; color: var(--brand-ink); margin-bottom: 6px !important; }
.inv-meta { border-collapse: collapse; font-size: 14px; }
.inv-meta th { text-align: left; font-weight: 600; color: var(--muted); padding: 1px 14px 1px 0; }
.inv-meta td { padding: 1px 0; }
.inv-to { margin-top: 22px; overflow-wrap: anywhere; }
.inv-label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.inv-lines { width: 100%; border-collapse: collapse; margin-top: 22px; font-size: 14px; }
.inv-lines th, .inv-lines td { padding: 7px 8px; border-bottom: 1px solid #e6ebe7; text-align: left; vertical-align: top; }
.inv-lines thead th { background: var(--brand-soft); font-weight: 600; }
.inv-lines td:first-child { overflow-wrap: anywhere; }
.inv-lines .n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.inv-lines tbody th { text-align: right; font-weight: 600; }
.inv-lines tr.inv-sub th, .inv-lines tr.inv-sub td { border-top: 2px solid #cfd8d2; }
.inv-lines tr.inv-total th, .inv-lines tr.inv-total td { font-weight: 800; font-size: 15px; border-bottom: 2px solid var(--ink); }
.inv-notes { margin-top: 22px; overflow-wrap: anywhere; }
.inv-empty { color: var(--muted); font-style: italic; font-weight: 400; }
@media (max-width: 600px) {
  .im-preview { padding: 16px 12px; }
  .invoice { font-size: 14px; }
  .inv-word { font-size: 22px; }
  .inv-lines { font-size: 13px; }
  .inv-lines th, .inv-lines td { padding: 6px 4px; }
}
.im-check { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px; }
.im-check-summary { margin: 0 0 8px; }
.prose ul.im-checklist { list-style: none; padding-left: 0; margin: 0; }
.im-checklist li { margin: 6px 0; }
.im-st { display: inline-block; min-width: 9.5em; font-weight: 700; }
.im-ok .im-st { color: var(--brand); }
.im-missing .im-st { color: #b3261e; }
.im-na .im-st { color: var(--muted); }
.im-note { color: var(--muted); font-size: 14px; }
.im-next { margin: 10px 0 0; font-size: 14px; color: var(--muted); }
/* Free quote / estimate generator (/guides/free-quote-estimate-generator/, Done #28): the same form and document styles, plus the deposit rows, the basis line and the acceptance block. */
.im-inserts .btn-small { margin-right: 6px; }
.im-checkbox { display: flex !important; align-items: center; gap: 8px; font-weight: 600; }
.im-checkbox input { width: 20px; height: 20px; accent-color: var(--brand); margin: 0; }
.inv-lines tr.inv-deposit th, .inv-lines tr.inv-deposit td, .inv-lines tr.inv-balance th, .inv-lines tr.inv-balance td { font-weight: 600; }
.inv-basis { margin-top: 14px !important; font-size: 14px; color: var(--muted); }
.inv-accept { margin-top: 22px; break-inside: avoid; }
.inv-sign { display: grid; gap: 14px 24px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); margin-top: 12px; }
.inv-sign-row { display: flex; align-items: flex-end; gap: 8px; min-width: 0; }
.inv-sign-label { font-size: 13px; color: var(--muted); }
.inv-sign-line { flex: 1; border-bottom: 1px solid var(--ink); height: 1.6em; min-width: 60px; }
/* Print: only the invoice (or the quote, Done #28). The :has() rule covers printing with JavaScript off; the script also sets html.im-doc for browsers without :has(). */
@media print {
  @page { margin: 14mm; }
  html.im-doc body > :not(main) { display: none !important; }
  body:has(.im-page) > :not(main) { display: none !important; }
  html.im-doc body, body:has(.im-page) { background: #fff; }
  .im-page { max-width: none; margin: 0; padding: 0 !important; }
  .im-page > :not(.im-tool), .im-tool > :not(.im-preview) { display: none !important; }
  .im-preview { border: 0; border-radius: 0; box-shadow: none; padding: 0; }
  .invoice { font-size: 10.5pt; color: #000; }
  .inv-meta, .inv-lines { font-size: 10pt; }
  .inv-lines tr.inv-total th, .inv-lines tr.inv-total td { font-size: 11pt; }
  .inv-word { color: #000; }
  .inv-lines thead th { background: #eef2ef; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .inv-empty, .inv-none { display: none !important; }
  .invoice, .inv-lines th, .inv-lines td { line-height: 1.3; }
  .inv-lines th, .inv-lines td { padding: 4px 6px; }
  .inv-to, .inv-lines, .inv-notes { margin-top: 14px; }
  .inv-lines tr, .inv-notes { break-inside: avoid; }
  .inv-basis { color: #333; font-size: 9.5pt; margin-top: 8px !important; }
  .inv-accept { margin-top: 16px; }
  .inv-sign-label { color: #333; }
  .inv-sign-line { border-bottom-color: #000; }
}

/* Free expense / receipt log (/guides/free-expense-receipt-log/, Done #30) */
.el-row-grid {
  clear: both; /* legend on .im-line is floated; same as .im-line-grid */
  display: grid;
  gap: 10px 12px;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  align-items: start;
  min-width: 0;
}
.el-row-grid .el-vendor, .el-row-grid .el-notes { grid-column: 1 / -1; }
.el-live-totals { margin: 12px 0 8px; padding: 10px 14px; background: var(--brand-soft); border-radius: var(--radius); }
.el-live-totals p { margin: 0; }
.el-page .im-preview { overflow-x: auto; max-width: 100%; -webkit-overflow-scrolling: touch; }
.el-lines { font-size: 13px; width: 100%; }
.el-lines th, .el-lines td { padding: 5px 6px; }
.el-remove-wrap { display: flex; align-items: end; padding-bottom: 4px; }
/* "By category" subtotals with the T2125 line hint (Done #31) */
.el-bycat { margin-top: 14px; }
.el-bycat-title { font-weight: 700; margin: 0 0 4px; }
.el-cats { font-size: 13px; width: 100%; }
.el-cats th, .el-cats td { padding: 5px 6px; }
.el-cats tbody th { font-weight: 400; text-align: left; }
.el-t2125-note { font-size: 12px; color: #555; margin: 6px 0 0; }
table.simple.el-t2125 { font-size: 14.5px; }
table.simple.el-t2125 td:nth-child(2) { min-width: 9em; }
@media (max-width: 600px) { table.simple.el-t2125 { font-size: 13.5px; } table.simple.el-t2125 th, table.simple.el-t2125 td { padding: 6px 5px; } table.simple.el-t2125 td:nth-child(2) { min-width: 0; } }
@media (max-width: 600px) {
  .el-row-grid { grid-template-columns: minmax(0, 1fr); }
  .el-row-grid .el-vendor, .el-row-grid .el-notes, .el-row-grid .el-cat, .el-row-grid .el-mode,
  .el-row-grid .el-date, .el-row-grid .el-amt, .el-row-grid .el-tax, .el-row-grid .el-receipt,
  .el-row-grid .el-remove-wrap { grid-column: 1 / -1; }
  .el-row-grid .field, .el-row-grid input, .el-row-grid select { max-width: 100%; min-width: 0; }
  .el-page .im-preview { display: block; }
  .el-lines { font-size: 12px; }
  .el-lines th:nth-child(n+7), .el-lines td:nth-child(n+7) { display: none; }
}
@media print {
  .el-lines th:nth-child(n+7), .el-lines td:nth-child(n+7) { display: table-cell !important; }
  .el-lines { width: 100% !important; font-size: 8.5pt; }
  .el-lines th, .el-lines td { padding: 2px 4px; line-height: 1.2; }
  .el-lines td:first-child { white-space: nowrap; }
  .el-page .im-preview { overflow: visible; }
  .el-bycat { margin-top: 8px; break-inside: avoid; page-break-inside: avoid; }
  .el-bycat-title { font-size: 9pt; margin-bottom: 2px; }
  .el-cats { width: 100% !important; font-size: 8pt; margin-top: 0 !important; }
  .el-cats th, .el-cats td { padding: 1px 4px; line-height: 1.2; }
  .el-t2125-note { font-size: 7.5pt; color: #333; margin-top: 3px; }
}

/* Free vehicle / mileage logbook (/guides/free-mileage-log/, Done #32): the expense log's form and document styles, plus the trip grid, the sample-period calculator and the print rules. */
.ml-top-grid { display: grid; gap: 4px 14px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); align-items: start; }
.ml-row-grid {
  clear: both; /* legend on .im-line is floated */
  display: grid;
  gap: 10px 12px;
  grid-template-columns: 160px minmax(0, 1fr) minmax(0, 1fr);
  align-items: start;
  min-width: 0;
}
.ml-row-grid .ml-purpose { grid-column: 1 / 3; }
.ml-remove-wrap { display: flex; align-items: end; padding-bottom: 4px; }
.ml-page .im-preview { overflow-x: auto; max-width: 100%; -webkit-overflow-scrolling: touch; }
.ml-lines { font-size: 13px; width: 100%; }
.ml-lines th, .ml-lines td { padding: 5px 6px; }
.ml-lines td { overflow-wrap: anywhere; }
.ml-note { font-size: 12px; color: #555; margin: 8px 0 0 !important; }
.ml-formula { font-weight: 700; padding: 8px 12px; background: var(--brand-soft); border-radius: var(--radius); overflow-wrap: anywhere; }
.ml-sample { margin: 16px 0; }
.ml-sample h3 { margin-top: 0; }
.ml-s-result { font-weight: 600; padding: 8px 12px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); }
.ml-s-ok { border-color: var(--brand); }
.ml-s-out { border-color: #b3261e; }
table.simple.ml-rates .n { text-align: right; font-variant-numeric: tabular-nums; }
@media (max-width: 600px) {
  .ml-row-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .ml-row-grid .ml-to, .ml-row-grid .ml-from, .ml-row-grid .ml-purpose { grid-column: 1 / -1; }
  .ml-row-grid .field, .ml-row-grid input { max-width: 100%; min-width: 0; }
  .ml-page .im-preview { display: block; }
  .ml-lines { font-size: 12px; }
  .ml-lines th:nth-child(2), .ml-lines td:nth-child(2) { display: none; }
}
@media print {
  .ml-lines th:nth-child(2), .ml-lines td:nth-child(2) { display: table-cell !important; }
  .ml-lines { width: 100% !important; font-size: 9pt; }
  .ml-lines th, .ml-lines td { padding: 2px 5px; line-height: 1.25; }
  .ml-lines td:first-child { white-space: nowrap; }
  .ml-lines thead { display: table-header-group; }
  .ml-page .im-preview { overflow: visible; }
  .ml-note { font-size: 8pt; color: #333; }
}

/* "More free tools" strip at the bottom of each tool page, and the /tools/ hub (Done #34). */
.tool-strip { border-top: 1px solid var(--line); margin-top: 28px; padding-top: 14px; }
.tool-strip ul { list-style: none; padding: 0; margin: 6px 0 0; display: flex; flex-wrap: wrap; gap: 4px 18px; }
.tool-strip li { margin: 0; }
.tool-strip a, .tool-strip span { display: inline-block; padding: 4px 0; }
.tool-strip span[aria-current] { font-weight: 700; }
.tool-group { margin-top: 28px; }
.tool-card .tool-meta { margin: 0; }
.tool-card h3 { font-size: 18px; margin: 6px 0; }
.tool-card h3 a { color: var(--ink); text-decoration: none; }
.tool-card h3 a:hover { color: var(--brand-ink); text-decoration: underline; }
