/* pound.one — one stylesheet, no build step. Same bones as duckheap.com:
   Familjen Grotesk (display) + Public Sans (everything else), self-hosted
   variable fonts, latin subset. No third-party requests anywhere. */

@font-face { font-family: 'Familjen Grotesk'; src: url('/static/fonts/familjen-grotesk-var.woff2') format('woff2-variations'); font-weight: 400 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'Public Sans'; src: url('/static/fonts/public-sans-var.woff2') format('woff2-variations'); font-weight: 100 900; font-style: normal; font-display: swap; }

:root {
  /* Warm paper (shared with duckheap), twenty-pound purple, fiver green. */
  --bg: #faf7f0;
  --bg-alt: #f2ede1;
  --surface: #ffffff;
  --text: #191713;
  --muted: #6b6357;
  --line: #e3dccc;
  --line-strong: #d6cdb8;
  --accent: #6b3fa0;          /* backgrounds, rules, marks */
  --accent-ink: #4b2a74;      /* the readable purple */
  --pond: #1c6a48;            /* money you keep, things that got cheaper */
  --pond-ink: #14512f;
  --pond-soft: #e4efe8;
  --rust: #a6402c;            /* tax, things that outran inflation */
  --rust-soft: #f6e6e1;
  --on-accent: #ffffff;
  --radius: 14px;
  --radius-lg: 20px;
  --shadow: 0 1px 2px rgba(40, 32, 16, .06), 0 10px 28px rgba(40, 32, 16, .06);
  --s1: 8px; --s2: 12px; --s3: 20px; --s4: 32px; --s5: 48px;
  --display: 'Familjen Grotesk', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --sans: 'Public Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #13151a; --bg-alt: #1a1d24; --surface: #1d212a; --text: #eceae4; --muted: #a09a8e;
    --line: #333945; --line-strong: #454d5c; --accent: #9b78d1; --accent-ink: #c9b3ef;
    --pond: #4bb083; --pond-ink: #7fd0aa; --pond-soft: #15291f; --rust: #e0785f; --rust-soft: #2e1c18; --on-accent: #16101f;
    --shadow: 0 1px 2px rgba(0,0,0,.35), 0 12px 32px rgba(0,0,0,.4);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--sans); font-size: 17px; line-height: 1.55; }
h1, h2, h3, .answer, .brand, .cmp .big { font-family: var(--display); font-weight: 650; letter-spacing: -.015em; text-wrap: balance; }
a { color: inherit; text-decoration-color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-ink); }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 55%, transparent); outline-offset: 2px; border-radius: 6px; }
code { font-family: var(--mono); font-size: .92em; background: var(--bg-alt); padding: 1px 5px; border-radius: 5px; }
.num { font-variant-numeric: tabular-nums; }
.wrap { max-width: 980px; margin: 0 auto; padding-left: max(20px, env(safe-area-inset-left)); padding-right: max(20px, env(safe-area-inset-right)); }
.skip { position: absolute; left: -999px; } .skip:focus { left: 8px; top: 8px; background: var(--surface); padding: 8px; z-index: 30; }

/* header */
.site-header { border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 88%, transparent); position: sticky; top: 0; z-index: 20; backdrop-filter: saturate(140%) blur(8px); }
.site-header .wrap { display: flex; align-items: center; gap: 16px; height: 62px; }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 20px; text-decoration: none; }
.brand .mark { width: 26px; height: auto; display: block; flex: none; }
.brand .dot { color: var(--accent-ink); }
.nav { margin-left: auto; display: flex; gap: 18px; font-size: 15px; color: var(--muted); }
.nav a { text-decoration: none; } .nav a:hover, .nav a[aria-current] { color: var(--text); }
@media (max-width: 560px) { .site-header .wrap { height: 54px; gap: 10px; } .nav { gap: 12px; font-size: 14px; } .nav a { padding: 10px 2px; } .brand { font-size: 17px; } }

/* hero */
.hero { padding: var(--s5) 0 var(--s3); }
.hero h1 { font-size: clamp(32px, 6.2vw, 50px); line-height: 1.05; margin: 0 0 var(--s2); letter-spacing: -.025em; }
.hero p.lede { font-size: 18.5px; color: var(--muted); margin: 0 0 var(--s4); max-width: 60ch; }

/* forms */
.searchbar { display: grid; grid-template-columns: 1fr 1fr auto; gap: 10px; align-items: end; }
.searchbar.two { grid-template-columns: 1fr auto; }
.searchbar label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
.searchbar input, .searchbar select { min-width: 0; width: 100%; font: inherit; font-size: 18px; padding: 13px 16px; border: 1.5px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); color: var(--text); box-shadow: inset 0 1px 2px rgba(40,32,16,.05); }
.searchbar input:focus, .searchbar select:focus { outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: 1px; border-color: var(--accent); }
.searchbar button { font: inherit; font-family: var(--display); font-weight: 650; font-size: 17px; padding: 14px 24px; border: 1.5px solid transparent; border-radius: var(--radius); background: var(--accent); color: var(--on-accent); cursor: pointer; white-space: nowrap; }
.searchbar button:hover { filter: brightness(1.08); }
/* On a result page the answer is the point — the form goes quiet. */
.quiet .searchbar button { background: var(--surface); color: var(--text); border-color: var(--line-strong); font-weight: 600; }
.quiet .searchbar button:hover { border-color: var(--accent); background: var(--bg-alt); filter: none; }
.searchbar .extras { grid-column: 1 / -1; display: flex; gap: 10px; flex-wrap: wrap; }
.searchbar .extras label { flex: 1; min-width: 160px; }
@media (max-width: 560px) { .searchbar, .searchbar.two { grid-template-columns: 1fr; } }

.examples { margin: var(--s2) 0 0; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; list-style: none; font-size: 14.5px; }
.examples a { display: inline-block; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); text-decoration: none; color: var(--muted); }
.examples a:hover { border-color: var(--accent); color: var(--text); }
@media (max-width: 700px) { .examples a { padding: 10px 14px; font-size: 15px; } }

/* result */
.result-card { position: relative; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 28px 28px 28px 42px; margin: var(--s4) 0 var(--s2); }
/* The coin rail: duckheap's card wears a ruler, this one wears a milled edge. */
.result-card::before { content: ''; position: absolute; inset: 0 auto 0 0; width: 14px; background: repeating-linear-gradient(to bottom, var(--line-strong) 0 2px, transparent 2px 6px); }
.result-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--s4); align-items: center; }
.result-head > div:first-child { max-width: 52ch; }
@media (max-width: 700px) { .result-head { grid-template-columns: 1fr; gap: var(--s3); } .result-card { padding: 20px 20px 20px 32px; } }
.eyebrow { font-size: 12.5px; text-transform: uppercase; letter-spacing: .11em; color: var(--accent-ink); margin: 0 0 6px; font-weight: 700; }
.answer { font-size: clamp(29px, 5.4vw, 44px); line-height: 1.1; margin: 0; letter-spacing: -.025em; font-weight: 700; }
.answer .hi { color: var(--accent-ink); }
.subanswer { margin: 14px 0 0; color: var(--muted); font-size: 16.5px; }
.subanswer strong { color: var(--text); font-weight: 600; }
.subanswer.lead { font-size: 19px; color: var(--text); } .subanswer.lead strong { font-weight: 650; }
.subanswer.stats { font-size: 15px; font-variant-numeric: tabular-nums; display: flex; flex-wrap: wrap; gap: 2px 16px; }
.subanswer.meta { font-size: 13.5px; margin-top: 18px; opacity: .9; }
.stack-figure { margin: 0; text-align: center; color: var(--muted); }
.stack-figure .fig { max-width: 100%; height: auto; display: block; margin: 0 auto; }
.stack-figure figcaption { font-size: 13px; margin-top: 6px; max-width: 26ch; margin-left: auto; margin-right: auto; }
@media (max-width: 700px) { .stack-figure .fig { max-width: 220px; } }
.hero-split { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--s4); align-items: end; }
.hero-split .hero-fig { color: var(--muted); }
@media (max-width: 800px) { .hero-split { grid-template-columns: 1fr; } .hero-fig { display: none; } }
.card-figure { margin: var(--s2) 0 var(--s3); } .card-figure img { display: block; width: 420px; max-width: 100%; height: auto; border: 1px solid var(--line); border-radius: 10px; }
.card-figure figcaption { font-size: 13px; color: var(--muted); margin-top: 6px; }


/* split bar (tax) */
.split { display: flex; height: 12px; border-radius: 999px; overflow: hidden; margin: 16px 0 6px; background: var(--bg-alt); }
.split i { display: block; height: 100%; }
.split .tax { background: var(--rust); } .split .ni { background: var(--accent); } .split .keep { background: var(--pond); }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13.5px; color: var(--muted); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }

/* share */
.share-row { display: flex; flex-wrap: wrap; gap: 8px; margin: var(--s2) 0 var(--s4); font-size: 15px; }
.share-row a, .share-row button { font: inherit; font-size: 15px; display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); text-decoration: none; cursor: pointer; }
.share-row a:hover, .share-row button:hover { border-color: var(--accent); }
.share-row button.done { background: var(--pond-soft); border-color: var(--pond); color: var(--pond-ink); }
.share-row [hidden] { display: none; }  /* beats the inline-flex above */
.share-row button[data-share] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 600; }
.share-row button[data-share]:hover { filter: brightness(1.08); border-color: var(--accent); }

/* rhythm */
.section { margin: var(--s5) 0; }
.section > h2 { font-size: 22px; margin: 0 0 var(--s2); border-left: 3px solid var(--accent); padding-left: 12px; margin-left: -15px; }
.section > p.note { color: var(--muted); font-size: 15px; margin: 0 0 var(--s2); max-width: 70ch; }
.section > p.note + p.note { margin-top: -4px; }

/* table */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table.conv { width: 100%; border-collapse: collapse; font-size: 16px; }
table.conv th, table.conv td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
table.conv tr:last-child td { border-bottom: 0; }
table.conv thead th { font-size: 12.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; box-shadow: inset 0 -1px 0 var(--line); }
table.conv td.val, table.conv th.val { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.conv td.val.now { font-weight: 650; }
table.conv small { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }
table.conv tr.is-total td { font-weight: 650; border-top: 2px solid var(--line-strong); }
table.conv tr.is-source td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
table.conv a { text-decoration: none; } table.conv a:hover { text-decoration: underline; }
.tag { display: inline-block; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; padding: 1px 7px; border-radius: 999px; margin-left: 6px; vertical-align: 1px; }
.tag.up { background: var(--rust-soft); color: var(--rust); } .tag.down { background: var(--pond-soft); color: var(--pond-ink); }

/* comparisons */
.cmp-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: var(--s2); }
.cmp { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 16px 18px; }
.cmp .big { font-size: 27px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.cmp .big.pair { font-size: 21px; }
.cmp .big.up { color: var(--rust); } .cmp .big.down { color: var(--pond-ink); }
.cmp .lbl { color: var(--muted); font-size: 15px; }
.cmp .kicker { font-size: 12.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 700; margin-bottom: 2px; }
.cmp a { text-decoration: none; }

/* prose */
.prose { max-width: 70ch; } .prose p { margin: 0 0 var(--s2); } .prose h2 { font-size: 22px; margin: var(--s4) 0 var(--s1); }

/* footer */
.site-footer { border-top: 1px solid var(--line); margin-top: var(--s5); padding: var(--s3) 0 var(--s4); color: var(--muted); font-size: 14px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: baseline; }
.site-footer .spacer { flex: 1; } .site-footer a { text-decoration: none; } .site-footer a:hover { text-decoration: underline; }
.site-footer p.sources { flex-basis: 100%; margin: var(--s1) 0 0; font-size: 13px; }
