:root {
  --cobalt: #2137db;
  --cobalt-lift: #4059ff;
  --ink: #0c1230;
  --yellow: #ffd43b;
  --cell: #fff3c2;
  --cell-ink: #1226b8;
  --paper: #f4f5fb;
  --coral: #ff6b57;
  --mint: #3ddca8;
  --line: #d9dcee;
  --muted: #565d80;
  --wrap: 74rem;
  --display: "Bricolage Grotesque", "Arial Narrow", sans-serif;
  --body: "Onest", "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 400 1.0625rem/1.6 var(--body); color: var(--ink); background: #fff; }

h1, h2, h3 {
  font-family: var(--display); font-variation-settings: "wdth" 88; font-weight: 800;
  line-height: 1; letter-spacing: -0.025em; margin: 0;
}
h1 { font-size: clamp(2.9rem, 6.4vw, 5.75rem); line-height: 0.94; }
h2 { font-size: clamp(2.1rem, 4.4vw, 3.6rem); }
h3 { font-size: 1.5rem; line-height: 1.1; letter-spacing: -0.015em; }
p { margin: 0; max-width: 60ch; }
a { color: var(--cobalt); text-underline-offset: 0.15em; }
img { max-width: 100%; height: auto; display: block; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.on-dark :focus-visible { outline-color: var(--yellow); }
.on-light :focus-visible { outline-color: var(--ink); }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 1.5rem; }
.band { padding: clamp(4rem, 9vw, 7.5rem) 0; }
.band-paper { background: var(--paper); }
.band-ink { background: var(--ink); color: #fff; }
.band-cobalt { background: var(--cobalt); color: #fff; }
.sub { font-size: 1.2rem; color: var(--muted); margin-top: 1.1rem; max-width: 36rem; }
.on-dark .sub { color: rgba(255, 255, 255, 0.78); }
.fine { font-size: 0.92rem; color: var(--muted); }

/* ---------- header ---------- */
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: 1.1rem; }
.mark {
  font: 800 1.25rem var(--display); font-variation-settings: "wdth" 88; letter-spacing: -0.02em;
  color: inherit; text-decoration: none; display: flex; align-items: center; gap: 0.6rem;
}
.mark::before { content: ""; width: 1.05rem; height: 1.05rem; background: var(--yellow); border: 2px solid currentColor; }
.top nav { display: flex; align-items: center; gap: 1.75rem; font-size: 1rem; font-weight: 500; }
.top nav a:not(.btn) { color: inherit; text-decoration: none; opacity: 0.85; }
.top nav a:not(.btn):hover { opacity: 1; text-decoration: underline; }
.top.plain { border-bottom: 1px solid var(--line); }
@media (max-width: 46rem) { .top nav a:not(.btn) { display: none; } }

.btn {
  display: inline-block; font: 700 1.05rem var(--body); padding: 0.9rem 1.5rem; border-radius: 8px;
  background: var(--yellow); color: var(--ink); text-decoration: none;
  border: 2px solid var(--ink); box-shadow: 4px 4px 0 var(--ink);
  transition: transform 0.12s, box-shadow 0.12s;
}
.btn:hover { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--ink); }
.btn-ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.6); box-shadow: none; }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.12); transform: none; box-shadow: none; }
.btn-small { padding: 0.5rem 1rem; font-size: 0.95rem; box-shadow: 3px 3px 0 var(--ink); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .btn { transition: none; } }

/* ---------- hero: the 30-year balance is the landscape ---------- */
.hero {
  position: relative; isolation: isolate; overflow: hidden; color: #fff;
  background: radial-gradient(64rem 34rem at 88% 4%, var(--cobalt-lift) 0, transparent 62%), var(--cobalt);
}
.hero::before { /* spreadsheet gridlines, fading out */
  content: ""; position: absolute; inset: 0; z-index: -1;
  background-image: linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 104px 34px;
  -webkit-mask-image: linear-gradient(180deg, #000 0, transparent 78%);
          mask-image: linear-gradient(180deg, #000 0, transparent 78%);
}
.hero-grid {
  display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: clamp(2rem, 5vw, 4.5rem); align-items: end; padding-top: clamp(2rem, 6vh, 4.5rem);
}
.hero .lede { font-size: 1.25rem; color: rgba(255, 255, 255, 0.88); margin-top: 1.6rem; max-width: 34rem; }
.actions { display: flex; flex-wrap: wrap; gap: 1rem; margin: 2.2rem 0 1.1rem; }
.hero .fine { color: rgba(255, 255, 255, 0.72); }
@media (max-width: 60rem) { .hero-grid { grid-template-columns: 1fr; } }

.panel {
  background: #fff; color: var(--ink); border-radius: 18px; padding: 1.5rem;
  box-shadow: 0 34px 70px -24px rgba(4, 8, 40, 0.6);
}
.panel-title { font: 800 1.3rem var(--display); font-variation-settings: "wdth" 88; letter-spacing: -0.015em; }
.panel label { display: block; font-size: 0.9rem; color: var(--muted); margin-top: 0.9rem; }
.cell-row { display: flex; align-items: center; gap: 1.25rem; margin: 0.5rem 0 2.1rem; }
.cell { /* a selected spreadsheet cell: yellow fill, blue input text, fill handle */
  position: relative; background: var(--yellow); color: var(--cell-ink); border: 2px solid var(--ink);
  font: 800 1.65rem/1.25 var(--display); font-variation-settings: "wdth" 88; padding: 0.15rem 0.75rem;
  min-width: 8.2rem; text-align: right;
}
.cell::after { content: ""; position: absolute; right: -7px; bottom: -7px; width: 10px; height: 10px; background: var(--ink); border: 2px solid #fff; }
.slide { position: relative; flex: 1; min-width: 0; }
.slide input { -webkit-appearance: none; appearance: none; width: 100%; height: 1.75rem; margin: 0; background: transparent; cursor: pointer; display: block; }
.slide input::-webkit-slider-runnable-track { height: 6px; border-radius: 3px; background: var(--line); }
.slide input::-moz-range-track { height: 6px; border-radius: 3px; background: var(--line); }
.slide input::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; margin-top: -8px; border-radius: 5px; background: var(--yellow); border: 2px solid var(--ink); box-shadow: 2px 2px 0 var(--ink); }
.slide input::-moz-range-thumb { width: 18px; height: 18px; border-radius: 5px; background: var(--yellow); border: 2px solid var(--ink); box-shadow: 2px 2px 0 var(--ink); }
.notch { position: absolute; top: 100%; left: var(--at, 70%); transform: translateX(-50%); font-size: 0.78rem; color: var(--muted); white-space: nowrap; padding-top: 0.15rem; pointer-events: none; }
.notch::before { content: ""; position: absolute; left: 50%; top: -1.25rem; width: 2px; height: 0.75rem; background: var(--ink); }
.readout { display: grid; grid-template-columns: repeat(3, auto); justify-content: space-between; gap: 0 1rem; margin: 0; }
.readout dt { font-size: 0.82rem; color: var(--muted); grid-row: 1; }
.readout dd { grid-row: 2; margin: 0; font: 800 1.3rem var(--display); font-variation-settings: "wdth" 88; }
.verdict { margin-top: 1.1rem; padding: 0.6rem 0.9rem; border-radius: 8px; font-weight: 700; border: 2px solid var(--ink); max-width: none; }
.verdict.bad { background: var(--coral); }
.verdict.warn { background: var(--yellow); }
.verdict.good { background: var(--mint); }
.hero .panel .fine { margin-top: 0.9rem; color: var(--muted); }

.horizon { height: clamp(220px, 36vh, 380px); margin-top: 1.25rem; }
.horizon svg { display: block; width: 100%; height: 100%; }
.horizon text { font: 600 13px var(--body); fill: rgba(255, 255, 255, 0.78); }
.horizon .tag { font-weight: 700; font-size: 15px; fill: #fff; paint-order: stroke; stroke: var(--cobalt); stroke-width: 6px; stroke-linejoin: round; }
.intro .ln { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1.9s cubic-bezier(0.6, 0, 0.2, 1) 0.25s forwards; }
.intro .ar, .intro .mk { opacity: 0; animation: fade 0.7s 1.8s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fade { to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .intro .ln, .intro .ar, .intro .mk { animation: none; stroke-dashoffset: 0; opacity: 1; } }

/* ---------- steps ---------- */
.steps { list-style: none; padding: 0; margin: clamp(3rem, 6vw, 5rem) 0 0; display: grid; gap: clamp(3rem, 7vw, 6rem); counter-reset: step; }
.steps > li { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(1.5rem, 6vw, 5.5rem); align-items: center; counter-increment: step; }
.steps > li:nth-child(even) { grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); }
.steps > li:nth-child(even) .mock { order: -1; }
.step-n::before { content: counter(step); display: block; font: 800 5.5rem/0.8 var(--display); font-variation-settings: "wdth" 80; color: var(--cobalt); margin-bottom: 1.2rem; }
.step-n + p { color: var(--muted); font-size: 1.12rem; margin-top: 0.8rem; max-width: 30rem; }
@media (max-width: 52rem) { .steps > li, .steps > li:nth-child(even) { grid-template-columns: 1fr; } .steps > li:nth-child(even) .mock { order: 0; } }

.mock { background: var(--paper); border-radius: 20px; padding: clamp(1rem, 3.2vw, 2.4rem); }
.grid { background: #fff; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; font-size: 0.95rem; box-shadow: 0 22px 44px -26px rgba(12, 18, 48, 0.4); }
.gr { display: grid; grid-template-columns: 2.2rem 1.7fr 1fr; border-top: 1px solid var(--line); }
.gr.c4 { grid-template-columns: 2.2rem 2fr 1fr 0.5fr 0.5fr; }
.gr > * { padding: 0.55rem 0.7rem; border-left: 1px solid var(--line); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gr > :first-child, .gr.head > * { background: #eef0f8; color: var(--muted); font-size: 0.78rem; text-align: center; padding-inline: 0.2rem; }
.gr > :first-child { border-left: 0; }
.gr.head { border-top: 0; }
.gr .in { background: var(--cell); color: var(--cell-ink); font-weight: 700; text-align: right; }
.gr .num { text-align: right; }
.gr .sel { outline: 2px solid var(--ink); outline-offset: -2px; }
@media (max-width: 40rem) {
  .mock { padding: 0.75rem; }
  .grid { font-size: 0.8rem; }
  .gr { grid-template-columns: 1.5rem 1.5fr 1fr; }
  .gr.c4 { grid-template-columns: 1.5rem 1.5fr 1.15fr 0.5fr 0.5fr; }
  .gr > * { padding: 0.45rem 0.35rem; }
  .gr:not(.head) > :nth-child(2) { white-space: normal; }
}

.result { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: clamp(1.1rem, 3vw, 1.8rem); box-shadow: 0 22px 44px -26px rgba(12, 18, 48, 0.4); }
.result .fine { max-width: none; }
.r-big { font: 800 clamp(3rem, 7vw, 4.6rem)/1 var(--display); font-variation-settings: "wdth" 84; letter-spacing: -0.03em; color: var(--cobalt); margin: 0.2rem 0; }
.result svg { display: block; width: 100%; height: 84px; margin: 1rem 0 0; }

/* ---------- timeline of expenses ---------- */
.bars, .years { display: grid; grid-template-columns: repeat(30, minmax(0, 1fr)); gap: clamp(2px, 0.6vw, 8px); }
.bars { grid-template-rows: 100%; align-items: end; height: clamp(200px, 30vw, 340px); margin-top: clamp(2.5rem, 5vw, 4rem); border-bottom: 2px solid rgba(255, 255, 255, 0.3); }
.bar { background: #5d76ff; border-radius: 4px 4px 0 0; height: 0; min-height: 3px; transition: height 0.9s cubic-bezier(0.2, 0.8, 0.2, 1); transition-delay: calc(var(--i) * 18ms); }
.bars.in .bar { height: var(--h); }
.bar.hot { background: var(--yellow); }
.years { margin-top: 0.5rem; font-size: 0.8rem; color: rgba(255, 255, 255, 0.65); }
.years span { white-space: nowrap; }
.lumps { list-style: none; padding: 0; margin: clamp(2rem, 4vw, 3rem) 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.lumps li { border-top: 3px solid var(--yellow); padding-top: 1rem; }
.lumps b { display: block; font: 800 2.6rem/1 var(--display); font-variation-settings: "wdth" 84; }
.lumps em { display: block; font-style: normal; font-weight: 700; color: var(--yellow); font-size: 1.25rem; margin-top: 0.3rem; }
.lumps span { display: block; color: rgba(255, 255, 255, 0.75); margin-top: 0.3rem; }
@media (max-width: 46rem) { .lumps { grid-template-columns: 1fr; gap: 1.25rem; } }
@media (prefers-reduced-motion: reduce) { .bar { transition: none; } }

/* ---------- what's inside ---------- */
.window { margin-top: clamp(2.5rem, 5vw, 4rem); background: #fff; border: 2px solid var(--ink); border-radius: 14px; overflow: hidden; box-shadow: 12px 12px 0 var(--cobalt); }
.window-bar { display: flex; align-items: center; gap: 0.45rem; padding: 0.65rem 1rem; background: var(--ink); color: #fff; font-size: 0.9rem; }
.window-bar i { width: 0.7rem; height: 0.7rem; border-radius: 50%; background: rgba(255, 255, 255, 0.35); }
.window-bar span { margin-left: 0.6rem; opacity: 0.85; }
.shot { margin: 0; padding: clamp(0.6rem, 2vw, 1.5rem); }
.shot + .shot { border-top: 1px solid var(--line); }
.shot figcaption { margin-top: 0.9rem; color: var(--muted); max-width: 70ch; }
.tabs { display: flex; flex-wrap: wrap; background: #eef0f8; border-top: 1px solid var(--line); padding: 0 0.5rem; }
.tabs button { font: 600 0.95rem var(--body); color: var(--muted); background: none; border: 0; border-top: 3px solid transparent; margin-top: -1px; padding: 0.65rem 1.1rem; cursor: pointer; }
.tabs button[aria-selected="true"] { background: #fff; color: var(--ink); border-top-color: var(--cobalt); }
.extras { list-style: none; padding: 0; margin: clamp(3rem, 6vw, 4.5rem) 0 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; }
.extras li { border-top: 2px solid var(--ink); padding-top: 0.9rem; }
.extras b { display: block; font: 800 1.2rem/1.15 var(--display); font-variation-settings: "wdth" 88; margin-bottom: 0.35rem; }
.extras span { color: var(--muted); font-size: 1rem; }
@media (max-width: 56rem) { .extras { grid-template-columns: 1fr 1fr; } }
@media (max-width: 30rem) { .extras { grid-template-columns: 1fr; } }

/* ---------- fit ---------- */
.fit { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.25rem, 3vw, 2.5rem); margin-top: clamp(2rem, 4vw, 3rem); }
.fit > div { border-radius: 20px; padding: clamp(1.4rem, 3.2vw, 2.5rem); }
.fit .yes { background: #dcfaf0; }
.fit .no { background: #ffe7e2; }
.fit ul { list-style: none; padding: 0; margin: 1.3rem 0 0; }
.fit li { position: relative; padding-left: 2rem; margin-bottom: 0.85rem; max-width: 44ch; }
.fit li::before { position: absolute; left: 0; font-weight: 800; }
.fit .yes li::before { content: "\2713"; color: #0b7a57; }
.fit .no li::before { content: "\2715"; color: #b3301f; }
@media (max-width: 46rem) { .fit { grid-template-columns: 1fr; } }

/* ---------- buy ---------- */
.buy { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.buy ul { list-style: none; padding: 0; margin: 2rem 0 0; max-width: 34rem; }
.buy li { padding: 0.75rem 0; border-top: 1px solid rgba(255, 255, 255, 0.28); }
.price-box { background: #fff; color: var(--ink); border: 2px solid var(--ink); border-radius: 18px; padding: clamp(1.5rem, 3vw, 2.5rem); box-shadow: 12px 12px 0 var(--ink); }
.price { font: 800 clamp(4.5rem, 9vw, 7rem)/0.9 var(--display); font-variation-settings: "wdth" 84; letter-spacing: -0.04em; }
.price-box .btn { display: block; text-align: center; margin: 1.6rem 0 1rem; font-size: 1.2rem; }
@media (max-width: 52rem) { .buy { grid-template-columns: 1fr; } }

/* ---------- faq ---------- */
.faq { display: grid; grid-template-columns: 0.7fr 1.3fr; gap: clamp(2rem, 6vw, 5rem); }
.faq details { border-top: 2px solid var(--ink); padding: 1.15rem 0; }
.faq details:last-child { border-bottom: 2px solid var(--ink); }
.faq summary { font: 700 1.3rem/1.2 var(--display); font-variation-settings: "wdth" 90; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-weight: 800; color: var(--cobalt); }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { margin-top: 0.75rem; color: var(--muted); }
@media (max-width: 52rem) { .faq { grid-template-columns: 1fr; } }

/* ---------- footer + plain pages ---------- */
footer { background: var(--ink); color: rgba(255, 255, 255, 0.72); padding: 3rem 0; font-size: 0.95rem; }
footer p { max-width: 80ch; margin-top: 0.8rem; }
footer a { color: #fff; }
footer .mark { color: #fff; }
.page { padding: clamp(2.5rem, 6vw, 5rem) 0 clamp(4rem, 8vw, 7rem); }
.page h1 { font-size: clamp(2.3rem, 5vw, 3.8rem); margin-bottom: 1.5rem; }
.page h2 { font-size: 1.6rem; margin: 2.5rem 0 0.7rem; letter-spacing: -0.015em; }
.page p { max-width: 68ch; }
.page p + p { margin-top: 0.8rem; }
.page .btn { margin: 1.75rem 0 0.5rem; }

/* ---------- state requirement pages ---------- */
.crumb { font-size: 0.95rem; margin-bottom: 1rem; }
.page .sub { max-width: 46rem; margin: -0.5rem 0 2.5rem; }
.facts { display: grid; grid-template-columns: 13rem minmax(0, 1fr); margin: 0; max-width: 58rem; border-top: 2px solid var(--ink); }
.facts dt, .facts dd { margin: 0; padding: 1.1rem 0; border-bottom: 1px solid var(--line); }
.facts dt { font: 800 1.1rem/1.3 var(--display); font-variation-settings: "wdth" 88; padding-right: 1.5rem; }
@media (max-width: 40rem) { .facts { grid-template-columns: 1fr; } .facts dt { border-bottom: 0; padding-bottom: 0; } .facts dd { padding-top: 0.3rem; } }
.page .verdict { display: inline-block; margin: 0.4rem 0 1rem; }
.scroll { overflow-x: auto; max-width: 58rem; }
.states { width: 100%; border-collapse: collapse; margin-bottom: 2rem; }
.states th, .states td { text-align: left; vertical-align: top; padding: 0.9rem 1rem 0.9rem 0; border-bottom: 1px solid var(--line); }
.states th { font: 800 1rem var(--display); border-bottom: 2px solid var(--ink); }
.states td:first-child { font-weight: 700; white-space: nowrap; }
.tag { display: inline-block; padding: 0.15rem 0.6rem; border-radius: 6px; border: 2px solid var(--ink); font-weight: 700; font-size: 0.9rem; white-space: nowrap; }
.tag.good { background: var(--mint); }
.tag.warn { background: var(--yellow); }
.tag.bad { background: var(--coral); }
