:root {
  --paper: #f4f0e6; --card: #fffdf8; --paper-deep: #ece6d8;
  --ink: #1c1f1c; --ink-soft: #5e5c54; --ink-faint: #5e5c54;
  --green: #24503f; --green-deep: #24503f; --green-soft: #e3ebe4;
  --line: #e2daca; --line-soft: #eee7d8; --tag: #fffdf8;
  --stamp: #b93e24;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #111613; --card: #1c231f; --paper-deep: #26302a;
    --ink: #edeae0; --ink-soft: #b5b7ae; --ink-faint: #b5b7ae;
    --green: #9ccbb0; --green-deep: #9ccbb0; --green-soft: #263d30;
    --line: #4d584f; --line-soft: #364139; --tag: #1c231f;
    --tag-line: #566251; --stamp: #f08a6c;
  }
}
[hidden] { display: none !important; }
:root[data-theme="light"] {
  color-scheme: light;
  --paper: #f4f0e6; --card: #fffdf8; --paper-deep: #ece6d8;
  --ink: #1c1f1c; --ink-soft: #5e5c54; --ink-faint: #5e5c54;
  --green: #24503f; --green-deep: #24503f; --green-soft: #e3ebe4;
  --line: #e2daca; --line-soft: #eee7d8; --tag: #fffdf8;
  --tag-line: #d9cba6; --stamp: #b93e24;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #111613; --card: #1c231f; --paper-deep: #26302a;
  --ink: #edeae0; --ink-soft: #b5b7ae; --ink-faint: #b5b7ae;
  --green: #9ccbb0; --green-deep: #9ccbb0; --green-soft: #263d30;
  --line: #4d584f; --line-soft: #364139; --tag: #1c231f;
  --tag-line: #566251; --stamp: #f08a6c;
}
body { background: var(--paper); }
.serif, .hero h1, .brand .wordmark, .tag .tag-item, .tag .tag-price,
.tag .tag-unit, .verdict, h2, .formula .f-main, .versus .v-item,
.versus .v-cpu, .table-card h3, .faq summary, .cta .phone-note,
footer .f-brand, .stat .s-num { font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif; }
button, input, select, summary, a { -webkit-tap-highlight-color: transparent; }
button, select, summary { touch-action: manipulation; }
button, input, select { font: inherit; }
button, select, .getapp, .appstore-btn { min-height: 44px; }
button { transition: background-color .16s ease, border-color .16s ease; }
button:active { transform: translateY(1px); }
:focus-visible { outline: 3px solid var(--green); outline-offset: 4px; }
.numbox:focus-within { outline: 2px solid var(--green); outline-offset: 2px; }
.numbox input:focus-visible { outline: none; }
.skip-link { position: absolute; left: 16px; top: -100px; padding: 12px; background: var(--card); z-index: 2; }
.skip-link:focus { top: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.wrap { max-width: 1080px; padding-inline: max(20px, env(safe-area-inset-left)) max(20px, env(safe-area-inset-right)); }
.topbar { padding-top: 22px; }
.topbar .getapp { display: inline-flex; align-items: center; background: var(--green); color: var(--card); }
:root[data-theme="dark"] .topbar .getapp { color: #111613; }
:root[data-theme="light"] .topbar .getapp { color: #fffdf8; }
.hero { padding: 38px 0 4px; }
.eyebrow { font: 11px ui-monospace, "SFMono-Regular", monospace; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); margin: 0 0 12px; }
.hero h1 { font-size: clamp(38px, 5.5vw, 62px); max-width: 14em; text-wrap: balance; }
.hero .lede { font-size: 17px; line-height: 1.55; max-width: 42em; }
.calc { display: block; margin-top: 28px; border-radius: 22px; }
.calculator-form { display: grid; grid-template-columns: 1fr 1fr; }
.calculator-form > * { min-width: 0; }
.extra-controls { grid-column: 1; padding: 0 28px 28px; }
.calc > * { min-width: 0; }
.controls { padding: 28px 28px 0; }
.mode-toggle { display: flex; width: 100%; margin-bottom: 24px; }
.mode-toggle button { flex: 1; padding: 8px 12px; font-size: 15px; }
.field { margin-bottom: 20px; }
.field-head { align-items: center; }
.field label { font-size: 15px; font-weight: 600; text-transform: none; letter-spacing: 0; color: var(--ink); }
.money-entry { display: flex; align-items: stretch; gap: 8px; }
.field:first-of-type .field-head { flex-wrap: wrap; }
.money-entry select { width: 80px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); color: var(--ink); font-size: 15px; padding: 6px; }
.numbox { min-width: 0; padding: 0 10px; min-height: 48px; }
.numbox input { font-size: 20px; width: 8ch; max-width: 100%; min-width: 0; min-height: 44px; }
.money-entry .numbox { flex: 1; }
.money-entry .numbox input { width: 100%; }
.count-entry { display: flex; gap: 8px; align-items: stretch; }
.count-entry .numbox input { width: 4.5ch; }
#add-use { border: 1px solid var(--line); color: var(--green); background: var(--green-soft); border-radius: 10px; min-width: 44px; padding: 6px; font-weight: 600; }
#add-use:disabled { opacity: .45; }
.field .hint { font-size: 12px; line-height: 1.5; margin: 8px 0 0; color: var(--ink-soft); }
.field-error { margin: 8px 0 0; color: var(--stamp); font-size: 13px; line-height: 1.45; }
[aria-invalid="true"] { color: var(--stamp); }
input[type="range"] { min-height: 44px; margin-top: 6px; }
.options { border-block: 1px solid var(--line); padding: 0; }
.options summary { min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 8px; cursor: pointer; font-size: 14px; font-weight: 600; color: var(--green); }
.options summary::after { content: "+"; font-size: 22px; font-weight: 400; }
.options[open] summary::after { content: "−"; }
.options summary span { margin-left: auto; font-size: 12px; color: var(--ink-soft); font-weight: 400; }
.options .field { margin-top: 14px; }
.presets { margin-top: 20px; }
.p-label { display: flex; flex-wrap: wrap; gap: 6px; justify-content: space-between; }
.presets .p-label { font-size: 13px; letter-spacing: 0; text-transform: none; }
.p-label span { font-size: 11px; font-weight: 400; }
.preset-row { display: grid; grid-template-columns: 1fr 1fr; }
.preset { min-width: 0; padding: 10px; border-radius: 10px; }
.preset b { font-size: 14px; }
.preset span { font-size: 12px; }
.result { grid-column: 2; grid-row: 1 / span 2; order: 0; padding: 30px; gap: 20px; background: var(--paper-deep); justify-content: center; }
.tag-scene { width: 100%; max-width: 310px; }
.tag { width: 100%; transform: rotate(-1.5deg); padding: 20px 20px 18px 32px; }
.tag .tag-brand { font: 10px ui-monospace, "SFMono-Regular", monospace; letter-spacing: .08em; gap: 8px; }
.tag .tag-item { font-size: 24px; }
.tag .tag-was { font-size: 12px; overflow-wrap: anywhere; }
.tag .tag-price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px; font-size: 60px; margin-top: 12px; overflow-wrap: anywhere; }
.tag .currency-code { font: 12px ui-monospace, "SFMono-Regular", monospace; letter-spacing: .04em; }
#price-answer { max-width: 100%; }
.tag.large-number .tag-price { font-size: 34px; }
.tag .tag-unit { font-size: 16px; }
.tag .stamp { position: static; display: inline-block; margin-top: 10px; padding: 3px 7px; opacity: 1; transform: rotate(-2deg); font-size: 10px; }
.tag .barcode { height: 20px; margin-top: 18px; }
.tag .barcode-num { font-size: 8px; letter-spacing: .16em; }
.verdict { font-size: 17px; line-height: 1.5; }
.stats { gap: 12px; }
.stat { border: 0; background: transparent; padding: 0; }
.stat .s-num { font-size: 25px; overflow-wrap: anywhere; }
.stat .s-lbl { margin-top: 4px; font-size: 12px; }
.meter-head { font-size: 12px; gap: 12px; }
.meter > div { transition: none; }
.privacy-note { display: flex; flex-wrap: wrap; gap: 4px 16px; justify-content: space-between; font-size: 12px; color: var(--ink-soft); margin: 12px 0 0; }
.preview-note { font: 11px ui-monospace, "SFMono-Regular", monospace; }
.example-note { margin-top: 16px !important; }
.body-section { line-height: 1.7; }
.body-section p { max-width: 65ch; }
table { font-size: 14px; }
th, td { padding-inline: 6px 12px; }
th:first-child, td:first-child { padding-left: 14px; }
.cta { background: #24503f; }
.cta .phone-note { box-shadow: none; }
.cta .terms { color: #d7e2d8; }
@media (max-width: 820px) {
  .calculator-form { grid-template-columns: 1fr; }
  .result { grid-column: auto; grid-row: auto; order: 0; padding: 28px 22px; }
  .controls { padding: 22px; }
  .extra-controls { padding: 0 22px 22px; }
  .tag-scene { max-width: 330px; }
}
@media (max-width: 480px) {
  .wrap { padding-inline: max(16px, env(safe-area-inset-left)) max(16px, env(safe-area-inset-right)); }
  .topbar { padding-top: 16px; }
  .hero { padding-top: 24px; }
  .hero h1 { font-size: 42px; }
  .hero .lede { font-size: 16px; }
  .calc { margin-top: 22px; border-radius: 18px; }
  .controls { padding: 18px; }
  .extra-controls { padding: 0 18px 18px; }
  .field-head { gap: 8px; }
  .money-entry { width: 100%; }
  .field-head:has(.money-entry) { flex-direction: column; align-items: stretch; }
  .numbox input { font-size: 20px; }
  .count-entry .numbox input { width: 4ch; }
  .result { padding: 24px 20px; gap: 16px; }
  .tag { padding: 16px 18px 14px 30px; }
  .tag .string { display: none; }
  .tag .tag-price { font-size: clamp(42px, 13vw, 60px); }
  .tag .barcode, .tag .barcode-num { display: none; }
  .tag.large-number .tag-price { font-size: 32px; }
  .tag .tag-brand { font-size: 9px; }
  .preset { padding: 9px; }
  .preset span { font-size: 11px; }
  h2 { text-wrap: balance; }
  th, td { font-size: 12px; padding-inline: 3px 7px; }
  th:first-child, td:first-child { padding-left: 10px; }
  .cta { padding: 26px 20px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Keeps 2.0: dotted blue-grey paper, ink, stamp red, category-colour tag, the app's fonts. */
@font-face{font-family:"Keeps Display";src:url("../assets/fonts/KeepsDisplay-Black.woff2") format("woff2");font-weight:900;font-display:swap}
@font-face{font-family:"Keeps Display";src:url("../assets/fonts/KeepsDisplay-ExtraBold.woff2") format("woff2");font-weight:700 800;font-display:swap}
@font-face{font-family:"Keeps Stamp";src:url("../assets/fonts/KeepsItemStamp-Black.woff2") format("woff2");font-weight:900;font-display:swap}
@font-face{font-family:"Keeps Mono";src:url("../assets/fonts/IBMPlexMono-Medium.woff2") format("woff2");font-weight:500;font-display:swap}
:root,:root[data-theme="light"]{color-scheme:light;--paper:#EEF1F6;--card:#FFFFFF;--paper-deep:#FBFAF6;--ink:#1D1B2E;--ink-soft:#4A485C;--ink-faint:#5C5A6E;--green:#D7362B;--green-deep:#C4281E;--green-soft:#FBFAF6;--line:#D3D1DE;--line-soft:#E3E3E8;--tag:#FFE38F;--tag-line:#8E8BA3;--stamp:#D7362B;--dots:#C9CFDB}
@media (prefers-color-scheme:dark){:root{color-scheme:dark;--paper:#15141C;--card:#2A2934;--paper-deep:#22212C;--ink:#EEECF7;--ink-soft:#BFBCD1;--ink-faint:#ABA8C0;--green:#FF6A5C;--green-deep:#FF6A5C;--green-soft:#22212C;--line:#3A3849;--line-soft:#302F3B;--tag:#5C4917;--tag-line:#6F6C86;--stamp:#FF6A5C;--dots:#2A2935}}
:root[data-theme="dark"]{color-scheme:dark;--paper:#15141C;--card:#2A2934;--paper-deep:#22212C;--ink:#EEECF7;--ink-soft:#BFBCD1;--ink-faint:#ABA8C0;--green:#FF6A5C;--green-deep:#FF6A5C;--green-soft:#22212C;--line:#3A3849;--line-soft:#302F3B;--tag:#5C4917;--tag-line:#6F6C86;--stamp:#FF6A5C;--dots:#2A2935}
body{background-color:var(--paper);background-image:radial-gradient(var(--dots) 1.2px,transparent 1.3px);background-size:16px 16px}
.serif,.hero h1,.brand .wordmark,.tag .tag-item,.verdict,h2,h3,.formula .f-main,.versus .v-i,.v-item,.t-sub{font-family:"Keeps Display","Archivo Black",-apple-system,system-ui,sans-serif!important;font-weight:900!important;letter-spacing:-.02em!important}
.tag .tag-price,.s-num,.v-cpu{font-family:"Keeps Stamp","Arial Narrow",-apple-system,sans-serif!important;font-weight:900!important;letter-spacing:-.01em!important}
.tag .tag-unit,.tag-brand,.tag-was,.stamp,.s-lbl,.field-head{font-family:"Keeps Mono","IBM Plex Mono",ui-monospace,Menlo,monospace!important;text-transform:uppercase;letter-spacing:.08em}
