/* Layout: a workbench. Inputs on the left, the answer printed on a till receipt on the right, the explanation underneath. */
/* Self-hosted fonts (SIL Open Font License), latin and latin-ext subsets from Google Fonts. Files and their OFL licence texts live in src/fonts/. */
@font-face { font-family: 'Atkinson Hyperlegible'; font-style: italic; font-weight: 400; font-display: swap; src: url(fonts/atkinson-hyperlegible-400-italic-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Atkinson Hyperlegible'; font-style: italic; font-weight: 400; font-display: swap; src: url(fonts/atkinson-hyperlegible-400-italic-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Atkinson Hyperlegible'; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/atkinson-hyperlegible-400-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Atkinson Hyperlegible'; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/atkinson-hyperlegible-400-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Atkinson Hyperlegible'; font-style: normal; font-weight: 700; font-display: swap; src: url(fonts/atkinson-hyperlegible-700-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Atkinson Hyperlegible'; font-style: normal; font-weight: 700; font-display: swap; src: url(fonts/atkinson-hyperlegible-700-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Bricolage Grotesque'; font-style: normal; font-weight: 500 800; font-display: swap; src: url(fonts/bricolage-grotesque-500-800-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Bricolage Grotesque'; font-style: normal; font-weight: 500 800; font-display: swap; src: url(fonts/bricolage-grotesque-500-800-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/ibm-plex-mono-400-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/ibm-plex-mono-400-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 500; font-display: swap; src: url(fonts/ibm-plex-mono-500-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 500; font-display: swap; src: url(fonts/ibm-plex-mono-500-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 600; font-display: swap; src: url(fonts/ibm-plex-mono-600-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 600; font-display: swap; src: url(fonts/ibm-plex-mono-600-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
:root {
  --paper: #F2F5F1;      /* ledger-paper green-grey */
  --surface: #FFFFFF;
  --ink: #14211D;
  --muted: #55655E;
  --rule: #C9D4CD;
  --tint: #E2EBE5;
  --accent: #0A6650;     /* banker's green */
  --accent-ink: #FFFFFF;
  --loss: #A8281F;       /* red ink, losses and errors only */
  --display: "Bricolage Grotesque", "Trebuchet MS", "Segoe UI", sans-serif;
  --body: "Atkinson Hyperlegible", "Segoe UI", Helvetica, Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --gap: 1.25rem;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0E1513; --surface: #161F1C; --ink: #E3EBE7; --muted: #93A49C; --rule: #2B3934;
    --tint: #1C2925; --accent: #56C7A6; --accent-ink: #08110E; --loss: #F0887F; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0E1513; --surface: #161F1C; --ink: #E3EBE7; --muted: #93A49C; --rule: #2B3934;
  --tint: #1C2925; --accent: #56C7A6; --accent-ink: #08110E; --loss: #F0887F; color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
/* macOS only: without this, Chrome and Safari thicken light-on-dark text and it looks soft. Other platforms ignore it. */
html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--body); font-size: 1.0625rem; line-height: 1.6; -webkit-text-size-adjust: 100%; }
img { max-width: 100%; }
[hidden] { display: none !important; }
a { color: var(--accent); text-underline-offset: 0.15em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 2px; }
h1, h2, h3 { font-family: var(--display); line-height: 1.15; text-wrap: balance; margin: 0; letter-spacing: -0.01em; }
h1 { font-size: clamp(1.9rem, 5vw, 2.9rem); font-weight: 700; }
h2 { font-size: 1.45rem; font-weight: 650; }
h3 { font-size: 1.1rem; font-weight: 650; }
p { margin: 0; }

.wrap { max-width: 68rem; margin-inline: auto; padding-inline: 1.25rem; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 1rem; top: 1rem; background: var(--surface); padding: 0.5rem 0.75rem; z-index: 5; }

/* Header and footer */
.site-head { border-bottom: 1px solid var(--rule); }
.site-head .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1.5rem; padding-block: 0.9rem; }
.brand { font-family: var(--display); font-weight: 750; font-size: 1.3rem; color: var(--ink); text-decoration: none; letter-spacing: -0.02em; }
.brand span { color: var(--accent); }
.site-nav { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; font-size: 0.95rem; }
.site-nav a { color: var(--ink); text-decoration: none; padding-block: 0.25rem; }
.site-nav a:hover, .site-nav a[aria-current] { color: var(--accent); text-decoration: underline; }
.site-foot { border-top: 1px solid var(--rule); margin-top: 4rem; font-size: 0.92rem; color: var(--muted); }
.site-foot .wrap { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 1.5rem 2rem; padding-block: 2rem 2.5rem; }
.site-foot h2 { font-family: var(--body); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); font-weight: 700; margin-bottom: 0.5rem; }
.site-foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.3rem; }
.site-foot a { color: var(--ink); }

/* Page intro */
.intro { padding-block: 2.25rem 1.5rem; display: grid; gap: 0.75rem; }
.intro p { max-width: 40rem; color: var(--muted); font-size: 1.1rem; }
.crumbs { font-size: 0.85rem; color: var(--muted); }
.crumbs a { color: var(--muted); }

/* Workbench */
.bench { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 1.5rem 2rem; align-items: start; }
.tool { display: grid; gap: var(--gap); background: var(--surface); border: 1px solid var(--rule); border-radius: 6px; padding: 1.25rem; min-width: 0; }
.field { display: grid; gap: 0.35rem; min-width: 0; }
.field > label, .field > .label, fieldset > legend { font-weight: 700; font-size: 0.95rem; padding: 0; }
.hint { font-size: 0.85rem; color: var(--muted); line-height: 1.4; }
.pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: var(--gap); }
fieldset { border: 0; margin: 0; padding: 0; display: grid; gap: 0.45rem; min-width: 0; }
input, select, textarea, button { font: inherit; color: inherit; }
input[type="text"], input[type="number"], input[type="date"], select, textarea {
  width: 100%; min-width: 0; background: var(--paper); border: 1px solid var(--rule); border-radius: 4px; padding: 0.6rem 0.7rem;
}
textarea { resize: vertical; min-height: 4.2rem; line-height: 1.4; }
input[type="number"] { font-family: var(--mono); font-variant-numeric: tabular-nums; }
input:hover, select:hover, textarea:hover { border-color: var(--muted); }
.field-input { display: flex; align-items: stretch; }
.field-input .affix { display: flex; align-items: center; padding-inline: 0.7rem; background: var(--tint); border: 1px solid var(--rule); border-right: 0; border-radius: 4px 0 0 4px; font-family: var(--mono); font-size: 0.95rem; color: var(--muted); white-space: nowrap; }
.field-input .affix:empty { display: none; }
.field-input input { border-radius: 0 4px 4px 0; }
.field-input .affix:empty + input { border-radius: 4px; }
.field-input.suffix .affix { order: 2; border-right: 1px solid var(--rule); border-left: 0; border-radius: 0 4px 4px 0; }
.field-input.suffix input { border-radius: 4px 0 0 4px; }

/* Segmented radios */
.seg { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.seg label { position: relative; cursor: pointer; }
.seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg span { display: block; padding: 0.45rem 0.85rem; border: 1px solid var(--rule); border-radius: 999px; background: var(--paper); font-size: 0.95rem; }
.seg input:checked + span { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 700; }
.seg input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
.seg label:hover span { border-color: var(--muted); }

/* Receipt */
.receipt { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 1rem); background: var(--surface); border: 1px solid var(--rule); border-bottom: 0; padding: 1.25rem 1.25rem 1.5rem; font-family: var(--mono); font-size: 0.95rem; min-width: 0; }
.receipt::after { content: ""; position: absolute; left: 0; right: 0; bottom: -9px; height: 10px;
  background: linear-gradient(135deg, var(--surface) 50%, transparent 50%) 0 0 / 14px 10px repeat-x, linear-gradient(225deg, var(--surface) 50%, transparent 50%) 0 0 / 14px 10px repeat-x;
  filter: drop-shadow(0 1px 0 var(--rule)); }
.receipt h2 { font-family: var(--mono); font-size: 0.78rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.14em; color: var(--muted); text-align: center; padding-bottom: 0.9rem; border-bottom: 1px dashed var(--rule); margin-bottom: 0.9rem; }
.receipt dl { margin: 0; display: grid; gap: 0.55rem; }
.row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 0.15rem 0.75rem; }
.row dt { color: var(--muted); min-width: 0; }
.row dd { margin: 0; font-variant-numeric: tabular-nums; text-align: right; font-weight: 500; white-space: nowrap; margin-left: auto; }
.row.sub { border-top: 1px dashed var(--rule); padding-top: 0.55rem; }
.row.total { border-block: 1px dashed var(--rule); padding-block: 0.7rem; margin-block: 0.2rem; }
.row.total dt { color: var(--ink); font-weight: 600; }
.row.total dd { font-size: 1.45rem; font-weight: 600; color: var(--accent); }
.row.loss dd { color: var(--loss); }
.receipt .note { margin-top: 0.9rem; font-family: var(--body); font-size: 0.9rem; color: var(--muted); line-height: 1.45; }
.receipt .err { font-family: var(--body); color: var(--loss); font-size: 0.98rem; line-height: 1.45; }
.receipt .stamp { margin-top: 1rem; font-size: 0.75rem; color: var(--muted); text-align: center; letter-spacing: 0.04em; }

.bench-table { grid-column: 1 / -1; min-width: 0; display: grid; gap: 0.75rem; margin-top: 1rem; }
.bench-table h2 { font-size: 1.15rem; }
.bench-table table.data th.num:first-child, .bench-table table.data td.num:first-child { text-align: left; }
.bench-table table.data td.num { padding-left: 1rem; }
.updated { font-size: 0.85rem; color: var(--muted); }

/* Article text under each tool */
.prose { margin-top: 3.5rem; max-width: 42rem; display: grid; gap: 1rem; }
.prose h2 { margin-top: 1.5rem; }
.prose h3 { margin-top: 0.5rem; }
.prose ul, .prose ol { margin: 0; padding-left: 1.3rem; display: grid; gap: 0.4rem; }
.formula { font-family: var(--mono); font-size: 0.95rem; background: var(--tint); border-left: 3px solid var(--accent); padding: 0.8rem 1rem; overflow-x: auto; white-space: pre; line-height: 1.7; border-radius: 0 4px 4px 0; }
.table-scroll { overflow-x: auto; }
table.data { border-collapse: collapse; width: 100%; font-size: 0.97rem; }
table.data th, table.data td { text-align: left; padding: 0.5rem 0.75rem 0.5rem 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
table.data th { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
table.data td.num, table.data th.num { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
table.data td:last-child, table.data th:last-child { padding-right: 0; }
.checked { font-size: 0.9rem; color: var(--muted); border: 1px solid var(--rule); border-radius: 4px; padding: 0.7rem 0.9rem; background: var(--surface); }
.checked strong { color: var(--ink); }
.paid { border: 1px solid var(--rule); border-radius: 4px; padding: 0.8rem 0.9rem; background: var(--surface); display: grid; gap: 0.4rem; }
.paid p { margin: 0; }
.paid-note { font-size: 0.85rem; color: var(--muted); }
.paid .ad { display: inline-block; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.04em; color: var(--muted); border: 1px solid var(--rule); border-radius: 3px; padding: 0 0.3rem; vertical-align: 0.1em; }

/* Tool index */
.group-title { display: flex; align-items: baseline; gap: 0.75rem; margin: 2.75rem 0 0.25rem; }
.group-title p { color: var(--muted); font-size: 0.95rem; }
.tool-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.tool-list li { border-bottom: 1px solid var(--rule); }
.tool-list a { display: grid; grid-template-columns: minmax(0, 17rem) minmax(0, 1fr) auto; gap: 0.25rem 1.5rem; align-items: baseline; padding: 0.95rem 0.25rem; text-decoration: none; color: var(--ink); }
.tool-list a:hover { background: var(--tint); }
.tool-list .name { font-family: var(--display); font-weight: 650; font-size: 1.12rem; color: var(--accent); }
.tool-list .what { color: var(--muted); font-size: 0.97rem; }
.tool-list .tag { font-family: var(--mono); font-size: 0.78rem; color: var(--muted); white-space: nowrap; }
.home-bench { margin-top: 1rem; }
.home-bench-title { font-family: var(--mono); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); margin-bottom: 0.75rem; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 0.4rem; border: 1px solid var(--accent); background: var(--accent); color: var(--accent-ink); border-radius: 4px; padding: 0.55rem 1rem; font-weight: 700; cursor: pointer; }
.btn.quiet { background: transparent; color: var(--accent); }
.btn:hover { filter: brightness(1.08); }
.btn.quiet:hover { background: var(--tint); filter: none; }
.icon-btn { border: 1px solid var(--rule); background: var(--paper); border-radius: 4px; width: 2.1rem; height: 2.1rem; cursor: pointer; font-size: 1.1rem; line-height: 1; }
.icon-btn:hover { border-color: var(--loss); color: var(--loss); }
.actions { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; }

/* Invoice generator */
.inv { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.5rem 2rem; align-items: start; }
.inv .tool h2 { font-size: 1.05rem; padding-top: 0.5rem; border-top: 1px solid var(--rule); }
.inv .tool h2:first-of-type { border-top: 0; padding-top: 0; }
.items-scroll { overflow-x: auto; }
table.items { border-collapse: collapse; width: 100%; min-width: 26rem; }
table.items th { text-align: left; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); padding: 0 0.4rem 0.3rem 0; }
table.items td { padding: 0 0.4rem 0.4rem 0; width: 5.5rem; }
table.items td.wide { width: auto; }
table.items td:last-child { width: 2.2rem; padding-right: 0; }
.banner { background: var(--tint); border-left: 3px solid var(--accent); padding: 0.6rem 0.9rem; font-size: 0.93rem; border-radius: 0 4px 4px 0; }
.paper-col { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 1rem); display: grid; gap: 0.9rem; min-width: 0; }
.paper { background: var(--surface); border: 1px solid var(--rule); padding: 1.75rem; display: grid; gap: 1.4rem; font-size: 0.95rem; line-height: 1.45; min-width: 0; overflow-wrap: anywhere; }
.paper-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; }
.paper-top .doc { font-family: var(--display); font-size: 1.9rem; font-weight: 700; letter-spacing: 0.02em; text-transform: uppercase; }
.paper .who { font-weight: 700; font-size: 1.05rem; }
.paper .pre { white-space: pre-line; color: var(--muted); }
.paper .cap { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); font-weight: 700; }
.paper-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: 1rem; }
.paper-lines-scroll { overflow-x: auto; }
.paper table { border-collapse: collapse; width: 100%; }
.paper th { text-align: left; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); border-bottom: 2px solid var(--ink); padding: 0.4rem 0.6rem 0.4rem 0; }
.paper td { padding: 0.5rem 0.6rem 0.5rem 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
.paper .num { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; white-space: nowrap; padding-right: 0; padding-left: 0.9rem; }
.paper-top .num { padding-left: 0; }
.paper-totals { justify-self: end; width: min(100%, 17rem); display: grid; gap: 0.35rem; font-family: var(--mono); font-variant-numeric: tabular-nums; }
.paper-totals div { display: flex; justify-content: space-between; gap: 1rem; }
.paper-totals .grand { border-top: 2px solid var(--ink); padding-top: 0.5rem; font-weight: 600; font-size: 1.15rem; }

@media (max-width: 760px) {
  .bench, .inv { grid-template-columns: minmax(0, 1fr); }
  .receipt, .paper-col { position: static; }
  .tool-list a { grid-template-columns: minmax(0, 1fr); }
  .paper { padding: 1.1rem; }
  .row.total dd { font-size: 1.25rem; }
}
@media (prefers-reduced-motion: no-preference) {
  .seg span, .btn, .tool-list a { transition: background-color 0.12s, border-color 0.12s; }
}
@media print {
  body { background: #fff; color: #000; }
  .site-head, .site-foot, .intro, .inv .tool, .prose, .paper-col .actions, .paper-col .hint, .skip { display: none !important; }
  .inv { display: block; }
  .paper-col { position: static; }
  .paper { border: 0; padding: 0; background: #fff; color: #000; }
  .paper .pre, .paper .cap, .paper th { color: #333; }
}
