:root {
  --paper: #f2f5f1;
  --wash: #e3eae5;
  --ink: #17302e;
  --muted: #4d6360;
  --rule: #c7d2cc;
  --teal: #0e5a57;
  --teal-dark: #0a4341;
  --gold: #e2a400;
  --gold-text: #7a5600;
  --warn: #8a2f1d;
  --serif: "Literata", Georgia, "Times New Roman", serif;
  --sans: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 1.0625rem/1.65 var(--serif);
  font-variant-numeric: lining-nums;
}
.wrap { width: min(1080px, 100% - 2.5rem); margin-inline: auto; }
a { color: var(--teal); text-underline-offset: 3px; }
a:hover { color: var(--teal-dark); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 1rem; top: 1rem; background: var(--paper); padding: .5rem 1rem; z-index: 10; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.masthead { border-bottom: 1px solid var(--rule); background: var(--paper); }
.bar { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .5rem 2rem; padding-block: 1rem; }
.brand { font: 700 1.35rem/1 var(--serif); color: var(--ink); text-decoration: none; letter-spacing: -.01em; }
nav { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; font: 500 .95rem var(--sans); }
nav a { color: var(--muted); text-decoration: none; padding-block: .25rem; border-bottom: 2px solid transparent; }
nav a:hover { color: var(--ink); border-bottom-color: var(--gold); }

main { padding-block: 2.5rem 4rem; }
h1, h2 { font-family: var(--serif); line-height: 1.15; letter-spacing: -.015em; margin: 0 0 .75rem; }
h1 { font-size: clamp(2.1rem, 5.5vw, 3.4rem); font-weight: 700; max-width: 18ch; }
h2 { font-size: 1.5rem; font-weight: 600; margin-top: 3rem; }
p { margin: 0 0 1rem; max-width: 68ch; }
.lede { font-size: 1.25rem; line-height: 1.5; max-width: 52ch; margin-bottom: 1.75rem; }
.note, .hint { font: .9rem/1.5 var(--sans); color: var(--muted); }
.warn { color: var(--warn); font-weight: 600; }

.chartbox { margin: 0 0 .75rem; }
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart .grid { stroke: var(--rule); stroke-width: 1; }
.chart .tick { font: 12px var(--sans); fill: var(--muted); }
.chart .line { fill: none; stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.chart .line.s1, .chart .dot.s1 { stroke: var(--teal); }
.chart .line.s2, .chart .dot.s2 { stroke: var(--gold); }
.chart .dot { fill: var(--paper); stroke-width: 2.5; }
.chart .endlabel { font: 600 13px var(--sans); }
.chart .endlabel.s1 { fill: var(--teal); }
.chart .endlabel.s2 { fill: var(--gold-text); }

.tablewrap { overflow-x: auto; }
.ledger { width: 100%; border-collapse: collapse; font-family: var(--sans); font-size: 1rem; }
.ledger th, .ledger td { padding: .8rem .75rem .8rem 0; border-bottom: 1px solid var(--rule); text-align: left; vertical-align: baseline; }
.ledger thead th { font-weight: 500; color: var(--muted); font-size: .9rem; border-bottom: 2px solid var(--ink); }
.ledger tbody th { font-weight: 500; }
.ledger .n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; padding-right: 0; padding-left: 1rem; }
.ledger thead th:not(:first-child) { text-align: right; padding-left: 1rem; padding-right: 0; }
.ledger .strong { font-weight: 600; font-size: 1.1rem; }

.facts { display: flex; flex-wrap: wrap; gap: 1rem 3rem; margin: 1rem 0 0; font-family: var(--sans); }
.facts dt { color: var(--muted); font-size: .9rem; }
.facts dd { margin: 0; font: 600 1.6rem/1.3 var(--serif); font-variant-numeric: tabular-nums; }
.facts.tight dd { font-size: 1.2rem; }
.facts.tight { margin-top: 1.25rem; }

.split { display: grid; grid-template-columns: 1fr 1.2fr; gap: 2rem; align-items: start; margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--rule); }
.split h2 { margin-top: 0; }
@media (max-width: 760px) { .split { grid-template-columns: 1fr; } }

label { display: block; font: 500 .95rem/1.3 var(--sans); }
input, select {
  display: block; width: 100%; margin-top: .35rem; padding: .65rem .75rem;
  font: 1rem var(--sans); color: var(--ink); background: #fff;
  border: 1px solid #93a59f; border-radius: 4px; font-variant-numeric: tabular-nums;
}
input:focus-visible, select:focus-visible { outline-offset: 0; border-color: var(--teal); }
button {
  font: 600 1rem var(--sans); color: #fff; background: var(--teal);
  border: 0; border-radius: 4px; padding: .8rem 1.4rem; cursor: pointer; justify-self: start;
}
button:hover { background: var(--teal-dark); }
.inline, .stack { display: grid; gap: 1rem; }
.inline { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); align-items: end; }
.inline button { align-self: end; }

.calc { display: grid; grid-template-columns: minmax(280px, 380px) 1fr; gap: 3rem; margin-top: 1.5rem; align-items: start; }
@media (max-width: 860px) { .calc { grid-template-columns: 1fr; gap: 2rem; } }
.result { background: var(--wash); padding: 1.5rem 1.75rem; border-radius: 6px; }
.result h2 { margin-top: 0; font-size: 1.25rem; }
.result .big { font: 700 2.6rem/1.1 var(--serif); font-variant-numeric: tabular-nums; margin-bottom: 1rem; }
.result .big span { font: 500 1rem var(--sans); color: var(--muted); }
.result .ledger th, .result .ledger td { border-bottom-color: #b7c5be; }

.prose h2 { margin-top: 3rem; }
.foot { border-top: 1px solid var(--rule); background: var(--wash); padding-block: 2rem; font: .875rem/1.6 var(--sans); color: var(--muted); }
.foot p { max-width: 80ch; }
@media print { .masthead nav, .foot { display: none; } }

/* ---- lead questionnaire ---- */
.btn, a.btn { display: inline-block; font: 600 1rem var(--sans); color: #fff; background: var(--teal); border-radius: 4px; padding: .8rem 1.4rem; text-decoration: none; }
.btn:hover { background: var(--teal-dark); color: #fff; }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.25rem; margin: 0 0 1.75rem; max-width: none; }
.cta-row .note { margin: 0; }
nav a.navcta { color: var(--teal); font-weight: 600; border-bottom-color: var(--teal); }
.cta { margin-top: 3.5rem; padding: 1.75rem; background: var(--wash); border-radius: 6px; }
.cta h2 { margin-top: 0; font-size: 1.35rem; }

.leadform { max-width: 40rem; }
.leadform h1 { max-width: none; font-size: clamp(1.9rem, 4.5vw, 2.6rem); }
.leadform fieldset { border: 0; padding: 0; margin: 0 0 1.5rem; min-width: 0; }
.leadform legend { font: 600 clamp(1.4rem, 3.4vw, 1.9rem)/1.25 var(--serif); letter-spacing: -.01em; padding: 0; margin-bottom: .75rem; }
.leadform legend:focus { outline: none; }
.js .leadform fieldset.step:not(.active) { display: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
[hidden] { display: none !important; }
html:not(.js) #next, html:not(.js) #back { display: none; }

.progress { margin: 1.75rem 0 1.5rem; }
html:not(.js) .progress { display: none; }
.steplabel { font: 500 .9rem var(--sans); color: var(--muted); margin: 0 0 .4rem; }
.meter { height: 4px; background: var(--rule); border-radius: 2px; overflow: hidden; }
.meter span { display: block; height: 100%; width: 0; background: var(--teal); transition: width .25s ease; }
@media (prefers-reduced-motion: reduce) { .meter span { transition: none; } }

.choices { display: grid; gap: .6rem; }
.choice { display: flex; align-items: center; gap: .85rem; padding: .95rem 1.1rem; background: #fff; border: 1px solid #93a59f; border-radius: 6px; cursor: pointer; font: 500 1.05rem/1.3 var(--sans); }
.choice:hover { border-color: var(--teal); }
.choice input { width: 1.15rem; height: 1.15rem; margin: 0; flex: none; accent-color: var(--teal); }
.choice:has(input:checked) { border-color: var(--teal); background: var(--wash); box-shadow: inset 0 0 0 1px var(--teal); }
.choice:focus-within { outline: 3px solid var(--gold); outline-offset: 2px; }

.fields { display: grid; gap: 1rem; margin-bottom: 1rem; }
.fields.two { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.field-error { font: 600 .9rem var(--sans); color: var(--warn); margin: 0 0 .4rem; }
.consent { display: flex; gap: .75rem; align-items: flex-start; font: .85rem/1.5 var(--sans); color: var(--muted); margin: 1.25rem 0 .5rem; }
.consent input { width: 1.1rem; height: 1.1rem; margin-top: .15rem; flex: none; accent-color: var(--teal); }
.actions { display: flex; gap: .75rem; align-items: center; }
button.ghost { background: transparent; color: var(--teal); box-shadow: inset 0 0 0 1.5px var(--teal); }
button.ghost:hover { background: var(--wash); }
.draftbanner { background: #fff4d6; border: 1px solid var(--gold); padding: .9rem 1.1rem; border-radius: 4px; margin-bottom: 2rem; font: .95rem/1.5 var(--sans); }

/* ---- weekly update ---- */
.kicker { font: 600 .85rem var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--gold-text); margin: 0 0 .5rem; }
.byline { font: .95rem var(--sans); color: var(--muted); margin: -.75rem 0 1.5rem; }
.analysis { margin-top: 1rem; }
.plain { margin: 0 0 1.5rem; padding-left: 1.2rem; max-width: 68ch; }
.plain li { margin-bottom: .5rem; }
.pager { display: flex; justify-content: space-between; gap: 1rem; margin-top: 3rem; padding-top: 1.25rem; border-top: 1px solid var(--rule); font: 500 .95rem var(--sans); }
.authorbox { margin-top: 2.5rem; padding: 1.25rem 1.5rem; background: var(--wash); border-radius: 6px; font-family: var(--sans); }
.authorbox p { margin: 0 0 .4rem; }
.authorbox .strong { font-weight: 600; }
.weeklist { list-style: none; margin: 0; padding: 0; }
.weeklist li { padding: 1rem 0; border-bottom: 1px solid var(--rule); }
.weeklist a { font: 600 1.15rem var(--serif); }
.weeklist .note { margin-left: .75rem; }
.weeklist p { margin: .35rem 0 0; }

/* ---- cash-out calculator ---- */
.grouphead { font: 600 .8rem var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--gold-text); margin: .75rem 0 -.25rem; }
.grouphead:first-child { margin-top: 0; }
.scen th.col { text-align: right; vertical-align: bottom; line-height: 1.3; }
.ledger td.low { font-weight: 700; color: var(--teal-dark); background: rgba(14, 90, 87, .09); }
.checks { margin: 1rem 0 0; padding-left: 1.2rem; font-family: var(--sans); font-size: .98rem; max-width: 70ch; }
.checks li { margin-bottom: .6rem; line-height: 1.5; }
.steps { padding-left: 1.2rem; max-width: 72ch; }
.steps li { margin-bottom: 1rem; }
.steps code, .formula { font: .92rem/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: var(--wash); padding: .1rem .35rem; border-radius: 3px; }
.formula { display: block; padding: .6rem .8rem; margin: .4rem 0; overflow-x: auto; white-space: pre; }
.scenlist { font-family: var(--sans); font-size: .95rem; max-width: 70ch; padding-left: 1.2rem; }
.scenlist li { margin-bottom: .5rem; }
.calc > * { min-width: 0; }
.formula { max-width: 100%; }
.steps, .checks { overflow-wrap: anywhere; }
