/* Layout idea: one narrow ledger column; inputs on top, the answer as a single
   large figure, then the two tax years side by side like a statement. */
:root{
  --paper:#f3f5f4; --surface:#ffffff; --ink:#15211d; --muted:#586660;
  --line:#d5dcd8; --accent:#0b6b57; --accent-soft:#e1efeb;
  --rise:#a8470a; --rise-soft:#fbeadb;
  --display:"Bricolage Grotesque","Segoe UI",system-ui,sans-serif;
  --body:"IBM Plex Sans","Segoe UI",system-ui,sans-serif;
  color-scheme:light;
}
@media (prefers-color-scheme:dark){
  :root:not([data-theme="light"]){
    --paper:#111916; --surface:#19231f; --ink:#e8eeeb; --muted:#9aa9a2;
    --line:#2d3a35; --accent:#58c4a8; --accent-soft:#16332c;
    --rise:#f0a060; --rise-soft:#3a2513; color-scheme:dark;
  }
}
:root[data-theme="dark"]{
  --paper:#111916; --surface:#19231f; --ink:#e8eeeb; --muted:#9aa9a2;
  --line:#2d3a35; --accent:#58c4a8; --accent-soft:#16332c;
  --rise:#f0a060; --rise-soft:#3a2513; color-scheme:dark;
}
*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{margin:0;background:var(--paper);color:var(--ink);font-family:var(--body);font-size:16px;line-height:1.55}
.wrap{max-width:720px;margin:0 auto;padding:28px 18px 56px;display:flex;flex-direction:column;gap:28px}
header{display:flex;flex-direction:column;gap:10px}
.brand{font-family:var(--display);font-weight:700;font-size:15px;letter-spacing:.02em;color:var(--accent)}
h1{font-family:var(--display);font-weight:700;font-size:clamp(28px,6.4vw,40px);line-height:1.1;margin:0;text-wrap:balance}
h2{font-family:var(--display);font-weight:700;font-size:22px;line-height:1.2;margin:0;text-wrap:balance}
p{margin:0;max-width:65ch}
.lede{color:var(--muted);font-size:17px}
.card{background:var(--surface);border:1px solid var(--line);border-radius:10px;padding:20px;display:flex;flex-direction:column;gap:18px}
.fields{display:grid;grid-template-columns:1fr 1fr;gap:16px}
.field{display:flex;flex-direction:column;gap:6px}
.field label{font-weight:600;font-size:15px}
.field small{color:var(--muted);font-size:13px;line-height:1.4}
.money{display:flex;align-items:center;border:1px solid var(--line);border-radius:8px;background:var(--paper)}
.money span{padding:0 4px 0 12px;color:var(--muted);font-weight:500}
.money input{flex:1;min-width:0;border:0;background:transparent;color:var(--ink);font:500 18px var(--body);padding:11px 12px 11px 2px;font-variant-numeric:tabular-nums}
.money:focus-within{outline:2px solid var(--accent);outline-offset:1px}
.money input:focus{outline:none}
.answer{background:var(--rise-soft);border-radius:10px;padding:18px 20px;display:flex;flex-direction:column;gap:4px}
.answer.flat{background:var(--accent-soft)}
.answer .label{font-weight:600;font-size:15px}
.answer .big{font-family:var(--display);font-weight:700;font-size:clamp(40px,11vw,60px);line-height:1;color:var(--rise);font-variant-numeric:tabular-nums}
.answer.flat .big{color:var(--accent)}
.answer .sub{color:var(--muted);font-size:14px}
.bars{display:flex;flex-direction:column;gap:10px}
.bar-row{display:grid;grid-template-columns:76px 1fr;gap:10px;align-items:center;font-size:14px}
.bar-row .yr{color:var(--muted);font-variant-numeric:tabular-nums}
.track{display:flex;align-items:center;gap:8px;min-width:0}
.bar{height:22px;border-radius:4px;background:var(--accent);min-width:2px;transition:width .25s}
.bar.next{background:var(--rise)}
.track b{font-variant-numeric:tabular-nums;white-space:nowrap}
.scroll{overflow-x:auto}
table{width:100%;border-collapse:collapse;font-size:15px;font-variant-numeric:tabular-nums}
th,td{padding:9px 6px;border-bottom:1px solid var(--line);text-align:right;white-space:nowrap}
th:first-child,td:first-child{text-align:left;white-space:normal}
thead th{font-size:13px;color:var(--muted);font-weight:600}
tr.total td{font-weight:600;border-bottom:0}
.pill{display:inline-block;align-self:flex-start;padding:5px 12px;border-radius:999px;font-weight:600;font-size:14px;background:var(--accent-soft);color:var(--accent)}
.pill.warn{background:var(--rise-soft);color:var(--rise)}
.notes{display:flex;flex-direction:column;gap:12px;color:var(--muted);font-size:15px}
.notes ul{margin:0;padding-left:20px;display:flex;flex-direction:column;gap:6px;max-width:65ch}
a{color:var(--accent)}
a:focus-visible{outline:2px solid var(--accent);outline-offset:2px;border-radius:2px}
footer{color:var(--muted);font-size:13px;border-top:1px solid var(--line);padding-top:16px}
@media (max-width:480px){.fields{grid-template-columns:1fr}}
@media (prefers-reduced-motion:reduce){.bar{transition:none}}
nav{display:flex;flex-wrap:wrap;gap:6px 18px;font-size:15px;font-weight:500}
nav a{text-decoration:none;padding:4px 0;border-bottom:2px solid transparent}
nav a[aria-current="page"]{color:var(--ink);border-bottom-color:var(--accent)}
.brand a{color:inherit;text-decoration:none}
.prose{display:flex;flex-direction:column;gap:12px}
.prose ul{margin:0;padding-left:20px;display:flex;flex-direction:column;gap:6px;max-width:65ch}
.next{display:flex;flex-direction:column;gap:8px}
.next a{font-weight:600}
.foot-links{display:flex;flex-wrap:wrap;gap:6px 18px;margin-top:10px}
.prose h2{margin-top:6px}
.prose h2:first-child{margin-top:0}
