/* Budget Crash-Test — Insight Consultants: navy ink on a cool paper ground, the logo's lime as the one accent. */
:root {
  --ground: #F4F6F9;
  --ground-2: #EAEEF4;
  --panel: #FFFFFF;
  --ink: #0A1F55;
  --text: #2A3552;
  --steel: #5E6880;
  --rule: #D9DFE9;
  --hazard: #C5DD5A;        /* brand lime: highlights only */
  --hazard-soft: #F3F8DF;
  --hazard-ink: #4B5B12;
  --amber: #F0B810;
  --asphalt: #1B2C5E;
  --loss: #C8372D;
  --loss-soft: #FBE6E4;
  --gain: #1E8A5A;
  --gain-soft: #E1F2EA;
  --shadow: 0 1px 2px rgba(10, 31, 85, .05), 0 10px 30px rgba(10, 31, 85, .07);
  --shadow-lift: 0 2px 4px rgba(10, 31, 85, .06), 0 16px 40px rgba(10, 31, 85, .10);

  --display: 'Sora', 'Segoe UI', system-ui, sans-serif;
  --body: 'Instrument Sans', 'Segoe UI', system-ui, sans-serif;
  --mono: 'Instrument Sans', 'Segoe UI', system-ui, sans-serif;

  --gutter: clamp(16px, 4vw, 48px);
  --max: 1200px;
  --radius: 12px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--text);
  font: 400 16px/1.6 var(--body);
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; }
a { color: inherit; }
b, strong { font-weight: 650; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

/* ---------- type ---------- */
h1, h2, h3 { font-family: var(--display); margin: 0; letter-spacing: -0.02em; color: var(--ink); text-wrap: balance; }
h1 {
  font-size: clamp(2rem, 4.2vw, 3.3rem);
  font-weight: 600;
  line-height: 1.1;
}
h2 {
  font-size: clamp(1.5rem, 2.6vw, 2.1rem);
  font-weight: 600;
  line-height: 1.18;
}
h3 { font-size: 1.05rem; font-weight: 600; line-height: 1.3; letter-spacing: -0.01em; }
.eyebrow {
  font: 600 0.74rem/1 var(--body);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--steel);
  margin: 0 0 14px;
  display: flex; align-items: center; gap: 10px;
}
.eyebrow::before { content: ''; width: 20px; height: 3px; border-radius: 2px; background: linear-gradient(90deg, #F2E631, #B2D955); }
.hint { font-size: 0.82rem; color: var(--steel); margin: 6px 0 0; line-height: 1.45; }
.section-sub { max-width: 62ch; color: var(--steel); margin: 12px 0 0; }

/* ---------- top bar ---------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px var(--gutter);
  max-width: var(--max); margin: 0 auto;
}
.wordmark { display: flex; align-items: center; gap: 14px; text-decoration: none; font: 600 0.92rem/1 var(--display); color: var(--ink); letter-spacing: -0.01em; }
.wordmark-logo { height: 40px; width: auto; }
.wordmark-name { padding-left: 14px; border-left: 1.5px solid var(--rule); }
@media (max-width: 560px) { .wordmark-logo { height: 32px; } .wordmark-name { display: none; } }
.wordmark-year { font: 600 0.72rem/1 var(--body); background: var(--hazard-soft); color: var(--hazard-ink); padding: 5px 8px; border-radius: 999px; }
.topnav { display: flex; gap: 20px; font-size: 0.88rem; }
.topnav a { text-decoration: none; color: var(--steel); }
.topnav a:hover { color: var(--ink); text-decoration: underline; }
@media (max-width: 560px) { .topnav a:first-child { display: none; } }

/* ---------- sections ---------- */
main > section { max-width: var(--max); margin: 0 auto; padding: clamp(40px, 7vw, 88px) var(--gutter); }

/* ---------- hero ---------- */
.hero { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(28px, 5vw, 72px); align-items: start; padding-top: clamp(24px, 4vw, 56px) !important; }
.hero-sub { font-size: clamp(1.05rem, 1.5vw, 1.18rem); max-width: 46ch; margin: 20px 0 0; color: var(--text); }
.hero-facts { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 10px; font: 500 0.9rem/1.3 var(--body); color: var(--steel); }
.hero-facts li { display: flex; gap: 10px; align-items: center; }
.hero-facts li::before { content: ''; width: 7px; height: 7px; background: #B2D955; border-radius: 50%; flex: none; }
@media (max-width: 900px) { .hero { grid-template-columns: 1fr; } }

/* ---------- rig (setup form) ---------- */
.rig {
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: 16px;
  padding: 22px clamp(16px, 2.4vw, 28px) 24px;
  box-shadow: var(--shadow-lift);
  display: grid; gap: 20px;
}
.rig-head { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px dashed var(--rule); padding-bottom: 12px; }
.rig-label { font: 600 0.72rem/1 var(--body); text-transform: uppercase; letter-spacing: 0.1em; color: var(--steel); }
.rig-status { font: 600 0.72rem/1 var(--body); text-transform: uppercase; letter-spacing: 0.08em; display: flex; align-items: center; gap: 8px; }
.rig-status::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--gain); box-shadow: 0 0 0 3px var(--gain-soft); }

.field { display: grid; gap: 8px; min-width: 0; }
.field > label, .field-row > label { font-weight: 600; font-size: 0.95rem; color: var(--ink); }
.field-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.field-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 420px) { .field-pair { grid-template-columns: 1fr; } }
.readout { font: 600 1.1rem/1 var(--body); white-space: nowrap; color: var(--ink); }
.readout small { font-size: 0.78rem; color: var(--steel); font-weight: 500; }
.readout-edit { display: flex; align-items: baseline; gap: 2px; font: 600 1.3rem/1 var(--body); color: var(--ink); border-bottom: 1.5px solid var(--ink); }
.readout-edit input[type=text] { width: 4.2ch; min-height: 0; border: 0; border-radius: 0; background: transparent; font: inherit; text-align: right; padding: 2px 0; color: var(--ink); }
.readout-edit input:focus { outline: none; }
.readout-edit:focus-within { background: var(--hazard-soft); }

select, input[type=text], input[type=email], input[type=number], input[type=tel] {
  width: 100%;
  font: 500 1rem/1.2 var(--body);
  color: var(--ink);
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: 11px 12px;
  min-height: 46px;
}
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 12px) 50%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 36px; }
.money-input { display: flex; align-items: center; border: 1px solid var(--rule); border-radius: 8px; background: var(--panel); padding-left: 12px; font-weight: 600; }
.money-input input[type=text] { border: 0; background: transparent; padding-left: 6px; }
.money-input input:focus { outline: none; }
.money-input:focus-within { outline: 2px solid var(--ink); outline-offset: 2px; }

/* range: a measuring rail */
input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 28px; background: transparent; margin: 0; cursor: pointer; }
input[type=range]::-webkit-slider-runnable-track { height: 4px; background: linear-gradient(to right, var(--ink) var(--fill, 50%), var(--rule) var(--fill, 50%)); border-radius: 2px; }
input[type=range]::-moz-range-track { height: 4px; background: var(--rule); border-radius: 2px; }
input[type=range]::-moz-range-progress { height: 4px; background: var(--ink); border-radius: 2px; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; margin-top: -8px; border-radius: 50%; border: 2px solid var(--ink); background: #fff; box-shadow: 0 1px 4px rgba(10, 31, 85, .2); }
input[type=range]::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--ink); background: #fff; box-shadow: 0 1px 4px rgba(10, 31, 85, .2); }
input[type=range]:focus-visible { outline: none; box-shadow: none; }
input[type=range]:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 4px var(--hazard-soft), 0 0 0 6px var(--ink); }
input[type=range]:disabled { opacity: 0.35; cursor: not-allowed; }
.scale { display: flex; justify-content: space-between; font: 500 0.72rem/1 var(--body); color: var(--steel); position: relative; height: 12px; }
.scale span { position: absolute; transform: translateX(-50%); }
.scale span:first-child { transform: none; }
.scale span:last-child { transform: translateX(-100%); }

.check { display: flex; gap: 10px; align-items: flex-start; font-size: 0.88rem; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--ink); margin: 2px 0 0; flex: none; }

.finetune { border-top: 1px dashed var(--rule); padding-top: 14px; }
.finetune summary { cursor: pointer; font-weight: 650; list-style: none; display: flex; gap: 10px; align-items: baseline; }
.finetune summary::-webkit-details-marker { display: none; }
.finetune summary::before { content: '+'; font: 600 1rem/1 var(--body); width: 20px; height: 20px; border: 1px solid var(--rule); color: var(--ink); border-radius: 6px; display: grid; place-items: center; align-self: center; }
.finetune[open] summary::before { content: '−'; }
.finetune summary span { font-weight: 400; font-size: 0.82rem; color: var(--steel); }
.finetune[open] > .field, .finetune[open] > .field-pair { margin-top: 18px; }
.link-btn { background: none; border: 0; padding: 4px 0; font: 600 0.85rem var(--body); color: var(--ink); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; justify-self: start; }
.finetune .link-btn { margin-top: 14px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font: 600 0.98rem/1 var(--display); letter-spacing: -0.01em;
  padding: 15px 22px; min-height: 50px;
  border-radius: 10px; border: 1px solid var(--ink); cursor: pointer; text-decoration: none;
  transition: background .15s ease, box-shadow .15s ease, transform .15s ease;
}
.btn svg { width: 20px; height: 20px; color: #fff; }
.btn-go { background: var(--ink); color: #fff; box-shadow: 0 6px 18px rgba(10, 31, 85, .18); }
.btn-go:hover { background: #13307A; transform: translateY(-1px); }
.btn-go:active { transform: none; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--rule); }
.btn-ghost:hover { border-color: var(--ink); background: var(--panel); }
.btn-storm { background: var(--panel); color: var(--ink); border-color: var(--ink); }
.btn-storm:hover { background: var(--ground-2); }
.btn-storm.on { background: var(--loss); color: #fff; border-color: var(--loss); }

/* ---------- result ---------- */
.result { text-align: left; }
.result-head { display: grid; gap: 6px; }
.bp-number {
  font-family: var(--display); font-weight: 600;
  font-size: clamp(3rem, 9vw, 6.5rem); line-height: 1; letter-spacing: -0.04em; color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.bp-sentence { font-size: clamp(1.1rem, 2vw, 1.45rem); max-width: 44ch; margin: 14px 0 0; line-height: 1.35; }
.bp-sentence { color: var(--text); }
.bp-sentence b { color: var(--ink); background: linear-gradient(transparent 62%, rgba(197, 221, 90, .55) 62%); }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin: 28px 0 32px; border-top: 1px solid var(--rule); }
.facts > div { padding: 16px 18px 0 0; border-right: 1px solid var(--rule); margin-right: 18px; }
.facts > div:last-child { border-right: 0; margin-right: 0; }
.facts dt { font: 600 0.72rem/1.2 var(--body); text-transform: uppercase; letter-spacing: 0.08em; color: var(--steel); }
.facts dd { margin: 8px 0 0; font: 600 clamp(1.4rem, 2.4vw, 1.85rem)/1.1 var(--display); color: var(--ink); letter-spacing: -0.02em; }
.facts dd small { display: block; font: 400 0.86rem/1.4 var(--body); color: var(--steel); margin-top: 8px; }
@media (max-width: 720px) {
  .facts { grid-template-columns: 1fr; }
  .facts > div { border-right: 0; margin-right: 0; border-bottom: 1px solid var(--rule); padding-bottom: 14px; }
}

/* ---------- the track (signature) ---------- */
.track-wrap { margin-top: 28px; }
.track-wrap svg { width: 100%; height: auto; overflow: visible; }
.track-small { margin: 4px 0 6px; }
.trk-road { fill: #E4E9F2; }
.trk-lane { stroke: #FFFFFF; stroke-width: 2; stroke-dasharray: 18 14; opacity: .9; }
.trk-loss { fill: var(--loss); opacity: .16; }
.trk-safe { fill: var(--gain); opacity: .22; transition: x .6s cubic-bezier(.2,.8,.2,1), width .6s cubic-bezier(.2,.8,.2,1); }
.trk-safe.bad { fill: var(--loss); opacity: .4; }
.trk-tick { font: 500 13px var(--body); fill: var(--steel); }
.trk-axis { stroke: var(--rule); }
.trk-mover { transition: transform .6s cubic-bezier(.2,.8,.2,1); }
.trk-wall-label { font: 600 14px var(--display); fill: var(--ink); }
.trk-wall-sub { font: 600 13px var(--body); fill: var(--ink); }
.trk-you-label { font: 600 13px var(--body); fill: var(--ink); }
.trk-ghost { opacity: .45; }
.trk-gap-label { font: 600 13px var(--body); fill: #0F5E3C; }
.trk-loss-label { font: 600 12px var(--body); fill: #A3281F; text-transform: uppercase; letter-spacing: .08em; }
.trk-crash .trk-wall { animation: shake .45s ease 1; }
@keyframes shake { 20%, 60% { transform: translateX(-4px); } 40%, 80% { transform: translateX(4px); } }

/* ---------- lab ---------- */
.lab { padding-bottom: 32px !important; }
.lab-intro { max-width: 70ch; }
.lab-intro > p:not(.eyebrow):not(.hint) { font-size: 1.08rem; margin: 14px 0 0; }
.lab-tools { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; margin: 22px 0 8px; }
.lab-grid { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: clamp(20px, 3vw, 40px); margin-top: 32px; align-items: start; }
@media (max-width: 1020px) { .lab-grid { grid-template-columns: 1fr; } }

.group-title { font: 600 0.74rem/1 var(--body); color: var(--steel); text-transform: uppercase; letter-spacing: 0.1em; margin: 28px 0 12px; display: flex; align-items: center; gap: 10px; }
.group-title:first-child { margin-top: 0; }
.group-title::before { content: ''; width: 8px; height: 8px; border-radius: 50%; }
.group-title.threat::before { background: var(--loss); }
.group-title.move::before { background: var(--gain); }
.group-title.invest::before { background: var(--steel); }
.how { margin: 22px 0 28px; }
.how > summary, .levers > summary, .card-more > summary { cursor: pointer; list-style: none; display: inline-flex; align-items: center; gap: 8px; font: 600 0.9rem/1.3 var(--body); color: var(--ink); }
.how > summary::-webkit-details-marker, .levers > summary::-webkit-details-marker, .card-more > summary::-webkit-details-marker { display: none; }
.how > summary::before, .levers > summary::before, .card-more > summary::before { content: '+'; width: 18px; height: 18px; border: 1px solid var(--rule); border-radius: 5px; display: inline-grid; place-items: center; font: 600 0.85rem/1 var(--body); }
.how[open] > summary::before, .levers[open] > summary::before, .card-more[open] > summary::before { content: '−'; }
.how .facts { margin: 16px 0 14px; }
.levers > summary { font: 600 1.05rem/1.3 var(--display); }
.card-more > .card-param, .card-more > .card-note { margin-top: 10px; }
.card-more > summary { font-size: 0.8rem; color: var(--steel); }
.card-more[open] { padding-bottom: 2px; }
.baseline-line { margin: 14px 0 0; font-size: 0.98rem; color: var(--text); }
.baseline-line b { color: var(--ink); }
.call { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px 40px; align-items: center; background: var(--ink); color: #EEF2FA; border-radius: 16px; padding: clamp(24px, 4vw, 44px); box-shadow: var(--shadow-lift); }
.call .eyebrow { color: #B9C4E0; }
.call h2 { color: #fff; max-width: 22ch; }
.call p { color: #C9D3EA; margin: 12px 0 0; max-width: 62ch; }
.call .call-hook { color: #fff; font-weight: 600; font-size: 1.05rem; }
.call .call-hook:empty { display: none; }
.call-list { margin: 10px 0 0; padding-left: 20px; display: grid; gap: 6px; color: #EEF2FA; }
.call .call-fine { font-size: 0.85rem; color: #9AA6C4; }
.call-btn { background: #C5DD5A !important; color: var(--ink) !important; border-color: #C5DD5A !important; white-space: nowrap; }
.call-btn:hover { background: #D6E97A !important; }
@media (max-width: 760px) { .call { grid-template-columns: 1fr; } .call-btn { justify-self: start; white-space: normal; } }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.lead-done { padding: 28px clamp(18px, 4vw, 32px) 24px; display: grid; gap: 14px; position: relative; }
.lead-done h2 { font-size: 1.7rem; }
.lead-done > p { margin: 0; color: var(--text); }
.done-call { background: var(--hazard-soft); border-radius: 12px; padding: 16px; display: grid; gap: 12px; }
.done-call p { margin: 0; color: var(--text); }
.done-call .btn { justify-self: start; }
.demo-note { margin: 0; font-size: 0.85rem; color: var(--hazard-ink) !important; }
.btn[disabled] { opacity: .6; cursor: progress; }
.next-line { margin: 18px 0 0; font-size: 0.92rem; color: var(--text); }
.next-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; max-width: 860px; }
@media (max-width: 760px) { .next-grid { grid-template-columns: 1fr !important; } }
.split-note { margin: 0 0 4px; font-size: 0.86rem; color: var(--steel); max-width: 80ch; }
.split-note b { color: var(--ink); font-weight: 600; }
.baseline { margin: 18px 0 6px; padding: 16px 18px; background: var(--panel); border: 1px solid var(--rule); border-radius: var(--radius); max-width: 640px; }
.baseline-q { margin: 0 0 10px; font-weight: 600; color: var(--ink); }
.seg { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.seg button { font: 600 0.88rem/1 var(--body); padding: 10px 14px; border-radius: 999px; border: 1px solid var(--rule); background: var(--ground); color: var(--ink); cursor: pointer; }
.seg button[aria-checked="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.own-growth { margin-top: 12px; display: grid; gap: 4px; max-width: 420px; }
.baseline .hint { margin-top: 10px; }
.bridge-title { margin: 16px 0 6px; font: 600 0.68rem/1.2 var(--body); text-transform: uppercase; letter-spacing: 0.08em; color: #9AA6C4; }
.bridge { list-style: none; padding: 0; margin: 0; display: grid; gap: 5px; font: 500 0.8rem/1.3 var(--body); }
.br-row { display: grid; grid-template-columns: minmax(0, 1fr) 84px 64px; gap: 8px; align-items: center; }
.br-row.total { font-weight: 700; color: #fff; border-top: 1px solid #1F3268; padding-top: 5px; }
.br-row.total:first-child { border-top: 0; padding-top: 0; }
.br-track { position: relative; height: 10px; background: #13275C; border-radius: 3px; }
.br-bar { position: absolute; top: 0; bottom: 0; border-radius: 2px; min-width: 2px; }
.br-bar.pos { background: #4CD39A; }
.br-bar.neg { background: #FF7A72; }
.br-bar.tot { background: #C9D3EA; }
.br-bar.tot.neg { background: #FF7A72; }
.br-val { text-align: right; white-space: nowrap; }
.br-val.neg { color: #FF7A72; }
.br-val.pos { color: #4CD39A; }
.cash-items { margin-top: 12px; font: 500 0.78rem/1.35 var(--body); color: #9AA6C4; }
.cash-items b { color: #EEF2FA; }
.budget-grid.one { grid-template-columns: minmax(0, 1fr); max-width: 860px; }
.map-more { margin-top: 18px; }
.map-more summary { cursor: pointer; font: 600 0.92rem/1.4 var(--display); color: var(--ink); }
.map-more .map { margin-top: 12px; max-width: 520px; }
.rec-k { text-transform: none !important; letter-spacing: 0 !important; font-size: 0.82rem !important; }
.rec.off { background: var(--ground); box-shadow: none; }
.rec.off .rec-v { color: var(--steel); font-size: 1.15rem; }
.used-list { display: block; margin: 10px 0 0; font-size: 0.88rem; color: var(--steel); }
.more-cards { margin-top: 28px; border-top: 1px solid var(--rule); padding-top: 16px; }
.more-cards summary { cursor: pointer; font: 600 0.92rem/1.4 var(--display); color: var(--ink); list-style: none; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.more-cards summary::-webkit-details-marker { display: none; }
.more-cards summary::before { content: '+'; width: 20px; height: 20px; border: 1px solid var(--rule); border-radius: 6px; display: inline-grid; place-items: center; font: 600 0.95rem/1 var(--body); align-self: center; }
.more-cards[open] summary::before { content: '−'; }
.more-cards summary span { font: 400 0.82rem/1.4 var(--body); color: var(--steel); }
.more-cards .card-list { margin-top: 14px; }
.card-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr)); gap: 12px; }

.card {
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 0;
  display: grid; grid-template-rows: auto 1fr;
  box-shadow: 0 1px 2px rgba(10, 31, 85, .04);
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
  position: relative; overflow: hidden;
}
.card::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: transparent; transition: background .15s; }
.card.threat.on::before { background: var(--loss); }
.card.move.on::before { background: var(--gain); }
.card.invest.on::before { background: var(--steel); }
.card.on { border-color: #B9C3D8; box-shadow: var(--shadow); }
.card-toggle {
  display: grid; grid-template-columns: 34px 1fr auto; gap: 12px; align-items: center;
  width: 100%; text-align: left; background: none; border: 0; padding: 14px 14px 12px 18px; cursor: pointer; font: inherit; color: inherit;
}
.card-toggle svg { width: 26px; height: 26px; color: var(--ink); transition: filter .2s ease; filter: grayscale(1) opacity(.4); }
.card.on .card-toggle svg { filter: none; }
.card-title { font-weight: 600; font-size: 0.98rem; line-height: 1.3; color: var(--ink); }
.card-switch { width: 36px; height: 20px; border-radius: 10px; background: var(--rule); position: relative; flex: none; transition: background .18s ease; }
.card-switch::after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(10, 31, 85, .25); transition: transform .18s ease; }
.card.on .card-switch { background: var(--ink); }
.card.on .card-switch::after { transform: translateX(16px); }
.card-body { padding: 0 14px 14px 18px; display: grid; gap: 10px; align-content: start; }
.card-blurb { font-size: 0.84rem; color: var(--steel); margin: 0; line-height: 1.4; }
.card-param { display: grid; gap: 2px; }
.card-param .field-row label { font-size: 0.82rem; font-weight: 500; color: var(--steel); }
.card-param .readout { font-size: 0.95rem; }
.card-impact { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; border-top: 1px solid var(--ground-2); padding-top: 10px; font: 600 0.88rem/1.2 var(--body); }
.card-impact .neg { color: var(--loss); }
.card-impact .pos { color: var(--gain); }
.card-impact .lbl { font-weight: 500; color: var(--steel); font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.06em; }
.card-note { font-size: 0.76rem; color: var(--steel); margin: 0; line-height: 1.4; }
.card-note a { color: var(--steel); }
.card:not(.on) .card-param, .card:not(.on) .card-impact { opacity: .55; }

/* ---------- live panel ---------- */
.panel { position: sticky; top: 16px; }
.panel-inner { background: var(--ink); color: #EEF2FA; border-radius: 16px; padding: 18px 18px 20px; box-shadow: var(--shadow-lift); }
.panel .rig-label { color: #9AA6C4; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.panel-verdict { font: 600 0.72rem/1 var(--body); letter-spacing: 0.02em; padding: 6px 10px; border-radius: 999px; background: var(--gain); color: #fff; }
.panel-verdict.warn { background: var(--amber); color: var(--ink); }
.panel-verdict.crash { background: var(--loss); color: #fff; }
.panel .trk-tick, .panel .trk-wall-label, .panel .trk-wall-sub, .panel .trk-you-label { fill: #EEF2FA; }
.panel .trk-road { fill: #23356B; }
.panel .trk-gap-label { fill: #fff; }
.panel .trk-loss-label { fill: #FFB4AE; }
.panel .trk-lane { opacity: .35; }
.panel .trk-loss { opacity: .3; }
.panel .trk-safe { opacity: .4; }
.gauges { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: #23356B; border: 1px solid #23356B; border-radius: 10px; overflow: hidden; margin-top: 14px; }
.gauge { background: var(--ink); padding: 12px 12px 14px; min-width: 0; margin: 0; }
.gauge-wide { grid-column: 1 / -1; }
.gauge dt { font: 600 0.68rem/1.2 var(--body); text-transform: uppercase; letter-spacing: 0.08em; color: #9AA6C4; }
.gauge dd { margin: 6px 0 0; font: 600 1.45rem/1.1 var(--display); letter-spacing: -0.02em; white-space: nowrap; }
.gauge .delta { display: block; font: 500 0.8rem/1.3 var(--body); margin-top: 6px; color: #9AA6C4; white-space: normal; }
.gauge .delta.neg { color: #FF7A72; }
.gauge .delta.pos { color: #4CD39A; }
.bars { display: grid; gap: 6px; margin-top: 10px; }
.bar { display: grid; grid-template-columns: 54px 1fr; gap: 8px; align-items: center; font: 500 0.72rem/1 var(--body); color: #9AA6C4; }
.bar-rail { height: 8px; background: #1B2C5E; border-radius: 4px; position: relative; overflow: hidden; }
.bar-fill { position: absolute; left: 0; top: 0; bottom: 0; background: #C9D3EA; border-radius: 4px; transition: width .5s cubic-bezier(.2,.8,.2,1); }
.bar-fill.now { background: var(--hazard); }
.bar-fill.neg { background: var(--loss); }
.ledger { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 6px; font: 500 0.82rem/1.35 var(--body); }
.ledger li { display: flex; justify-content: space-between; gap: 10px; border-bottom: 1px solid #1F3268; padding-bottom: 6px; }
.ledger li span:last-child { white-space: nowrap; }
.ledger .neg { color: #FF7A72; }
.ledger .pos { color: #4CD39A; }
.ledger .empty { color: #9AA6C4; border: 0; }

/* mobile: compact live strip pinned to the bottom while the cards scroll */
.mini-bar { display: none; }
@media (max-width: 1020px) {
  .panel { position: static; }
  .mini-bar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
    background: var(--ink); color: #EEF2FA; border-top: 3px solid #B2D955;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
    font: 600 0.72rem/1.2 var(--body);
    transform: translateY(110%); transition: transform .25s ease;
  }
  .mini-bar.show { transform: none; }
  .mini-bar b { display: block; font: 600 1.02rem/1.1 var(--display); margin-top: 3px; }
  .mini-bar .neg { color: #FF7A72; }
  .mini-bar .pos { color: #4CD39A; }
}

/* ---------- recovery ---------- */
.recovery { border-top: 1px solid var(--rule); }
.rec-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 28px; }
@media (max-width: 820px) { .rec-grid { grid-template-columns: 1fr; } }
.rec {
  background: var(--panel); border: 1px solid var(--rule); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow);
  display: grid; gap: 8px; align-content: start;
}
.rec-k { font: 600 0.72rem/1 var(--body); text-transform: uppercase; letter-spacing: 0.08em; color: var(--steel); }
.rec-v { font: 600 clamp(1.9rem, 3.4vw, 2.6rem)/1.05 var(--display); letter-spacing: -0.03em; color: var(--ink); }
.rec p { margin: 0; font-size: 0.92rem; }
.rec .btn { justify-self: start; min-height: 40px; padding: 10px 14px; font-size: 0.82rem; margin-top: 6px; }
.callout { margin: 24px 0 0; padding: 16px 20px; background: var(--hazard-soft); border-left: 4px solid #B2D955; border-radius: 10px; font-size: 1rem; max-width: 80ch; color: var(--text); }
.callout:empty { display: none; }
.levers { margin-top: clamp(32px, 5vw, 48px); max-width: 880px; }
.levers .section-sub { margin-top: 8px; }
.tornado { margin-top: 22px; display: grid; gap: 10px; background: var(--panel); border: 1px solid var(--rule); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.lever-takeaway { margin: 14px 0 0; padding: 12px 16px; background: var(--hazard-soft); border-left: 3px solid #B2D955; border-radius: 0 10px 10px 0; font-size: 0.95rem; color: var(--text); max-width: 70ch; }
.lever-takeaway b { color: var(--ink); }
.t-head, .t-row, .t-axis { display: grid; grid-template-columns: 8.5rem minmax(0, 1fr) minmax(0, 1fr); align-items: center; }
.t-head { font: 600 0.74rem/1 var(--body); text-transform: uppercase; letter-spacing: 0.06em; color: var(--steel); padding-bottom: 4px; }
.t-head .t-left { text-align: right; padding-right: 10px; color: var(--loss); }
.t-head .t-right { padding-left: 10px; color: var(--gain); }
.t-label { font-weight: 600; color: var(--ink); font-size: 0.92rem; }
.t-side { display: flex; align-items: center; gap: 8px; height: 30px; }
.t-left { justify-content: flex-end; border-right: 2px solid var(--ink); padding-right: 0; }
.t-right { justify-content: flex-start; }
.t-bar { height: 22px; transition: width .5s cubic-bezier(.2,.8,.2,1); flex: none; max-width: calc(100% - 4.8rem); }
.t-bar.neg { background: var(--loss); opacity: .78; border-radius: 6px 0 0 6px; }
.t-bar.pos { background: var(--gain); opacity: .85; border-radius: 0 6px 6px 0; }
.t-val { font-size: 0.84rem; font-weight: 600; white-space: nowrap; }
.t-val.neg { color: var(--loss); }
.t-val.pos { color: var(--gain); }
.t-axis { font-size: 0.74rem; color: var(--steel); padding-top: 2px; }
.t-axis .t-left { grid-column: 2 / 4; justify-content: center; text-align: center; border: 0; }
.lever-note { margin: 12px 0 0; font-size: 0.8rem; color: var(--steel); }
.src { color: var(--steel); white-space: nowrap; }
.math { border-top: 1px solid var(--rule); padding-top: 18px; }
.math summary { cursor: pointer; font: 600 1rem/1.3 var(--display); color: var(--ink); list-style: none; display: flex; align-items: center; gap: 10px; }
.math summary::-webkit-details-marker { display: none; }
.math summary::before { content: '+'; width: 22px; height: 22px; border: 1px solid var(--rule); border-radius: 6px; display: grid; place-items: center; font: 600 1rem/1 var(--body); }
.math[open] summary::before { content: '−'; }
@media (max-width: 640px) {
  .t-head, .t-row, .t-axis { grid-template-columns: 1fr 1fr; }
  .t-label { grid-column: 1 / -1; margin-top: 6px; }
  .t-head > span:first-child, .t-axis > span:first-child { display: none; }
  .t-axis .t-left { grid-column: 1 / -1; }
}
.callout cite { display: block; font: 500 0.78rem/1.4 var(--body); font-style: normal; margin-top: 8px; color: var(--hazard-ink); }

/* ---------- budget ---------- */
.budget { border-top: 1px solid var(--rule); }
.budget-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(20px, 3vw, 40px); margin-top: 28px; align-items: start; }
@media (max-width: 960px) { .budget-grid { grid-template-columns: 1fr; } }
.table-wrap { overflow-x: auto; background: var(--panel); border: 1px solid var(--rule); border-radius: var(--radius); box-shadow: var(--shadow); }
.table-note { margin: 0; padding: 10px 14px 12px; font-size: 0.78rem; color: var(--steel); border-top: 1px solid var(--ground-2); }
.gauge .note { display: block; font: 400 0.72rem/1.4 var(--body); color: #8592B3; margin-top: 6px; }
.budget-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; min-width: 520px; }
.budget-table th, .budget-table td { padding: 10px 14px; text-align: right; border-bottom: 1px solid var(--ground-2); white-space: nowrap; }
.budget-table th:first-child, .budget-table td:first-child { text-align: left; white-space: normal; }
.budget-table thead th { font: 600 0.7rem/1.25 var(--body); text-transform: uppercase; letter-spacing: 0.06em; background: var(--ground-2); color: var(--steel); vertical-align: bottom; border-bottom: 1px solid var(--rule); }
.budget-table thead th.plan { background: var(--ink); color: #fff; }
.budget-table td { font-variant-numeric: tabular-nums; }
.budget-table td.plan { background: #F6F9EA; font-weight: 600; color: var(--ink); }
.budget-table tr.strong td { font-weight: 600; color: var(--ink); border-top: 1px solid var(--rule); }
.budget-table tr.sub td:first-child { padding-left: 26px; color: var(--steel); }
.budget-table .neg { color: var(--loss); }
.budget-table .sec td { background: var(--ground); font: 600 0.68rem/1 var(--body); text-transform: uppercase; letter-spacing: 0.08em; color: var(--steel); padding-top: 12px; }

.map { margin: 0; background: var(--panel); border: 1px solid var(--rule); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.map figcaption { display: grid; gap: 4px; margin-bottom: 10px; font-size: 0.86rem; color: var(--steel); }
.map figcaption strong { color: var(--ink); font: 600 1rem var(--display); }
.map svg { width: 100%; height: auto; }
.map-axis { font: 500 11px var(--body); fill: var(--steel); }
.map-title { font: 600 11px var(--body); fill: var(--ink); letter-spacing: .02em; }

.export {
  margin-top: 32px; display: flex; gap: 24px; justify-content: space-between; align-items: center; flex-wrap: wrap;
  background: var(--ink); color: #EEF2FA; border-radius: 16px; padding: clamp(22px, 3vw, 36px);
}
.export > div { max-width: 62ch; }
.export h3 { font-size: 1.35rem; font-weight: 600; color: #fff; }
.export p { margin: 10px 0 0; color: #B8C2DA; }
.export .btn-go { background: #fff; color: var(--ink); border-color: #fff; box-shadow: none; }
.export .btn-go:hover { background: var(--hazard-soft); }

/* ---------- next ---------- */
.next { padding-top: 0 !important; }
.next-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 860px) { .next-grid { grid-template-columns: 1fr; } }
.next-card { border: 1px solid var(--rule); border-radius: var(--radius); padding: 22px; display: grid; gap: 10px; align-content: start; background: var(--panel); }
.next-card p { margin: 0; color: var(--text); font-size: 0.94rem; }
.next-card .btn { justify-self: start; min-height: 44px; padding: 12px 16px; font-size: 0.85rem; margin-top: 6px; }
.share { margin-top: 22px; display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; }

/* ---------- method ---------- */
.method { border-top: 1px solid var(--rule); }
.built-on { margin: 28px 0 0; padding: 14px 16px; max-width: 54ch; font-size: 0.88rem; line-height: 1.5; color: var(--text); background: var(--panel); border: 1px solid var(--rule); border-left: 3px solid #B2D955; border-radius: 10px; }
.built-on b { color: var(--ink); font-weight: 600; }
.built-on a { color: var(--ink); font-weight: 600; white-space: nowrap; }
.framework-tag { margin: 12px 0 0; font-size: 0.82rem; color: var(--steel); }
.framework-tag a { color: var(--ink); font-weight: 600; text-underline-offset: 3px; }
.the-method { margin-bottom: clamp(48px, 6vw, 72px); scroll-margin-top: 16px; }
.steps { list-style: none; padding: 0; margin: 28px 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 900px) { .steps { grid-template-columns: 1fr; } }
.steps li { background: var(--panel); border: 1px solid var(--rule); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); display: grid; gap: 8px; align-content: start; scroll-margin-top: 16px; }
.steps p { margin: 0; font-size: 0.92rem; color: var(--text); }
.step-n { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: #fff; font: 600 0.9rem/1 var(--display); }
.steps .step-fw { font-size: 0.8rem; font-weight: 600; color: var(--hazard-ink); background: var(--hazard-soft); border-radius: 6px; padding: 6px 10px; justify-self: start; }
.method-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(20px, 3vw, 40px); margin-top: 28px; }
@media (max-width: 960px) { .method-grid { grid-template-columns: 1fr; } }
.method-grid h3 { margin-bottom: 10px; }
.method-grid p, .method-grid li { font-size: 0.93rem; color: var(--text); }
.formula { font: 600 0.88rem/1.45 var(--body); background: var(--panel); border-left: 3px solid #B2D955; border-radius: 0 8px 8px 0; padding: 10px 14px; color: var(--ink) !important; }
.plain { padding-left: 18px; margin: 0; display: grid; gap: 6px; }
.sources-title { margin-top: 48px; font-size: 1.2rem; }
.sources { margin: 14px 0 0; padding-left: 22px; display: grid; gap: 10px; font-size: 0.86rem; color: var(--text); max-width: 110ch; }
.sources li::marker { font-weight: 600; color: var(--steel); }
.sources a { word-break: break-word; }
.sources .used { display: block; color: var(--steel); font-size: 0.8rem; }

.footer { max-width: var(--max); margin: 0 auto; padding: 24px var(--gutter) 96px; display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; font: 500 0.78rem/1.4 var(--body); color: var(--steel); border-top: 1px solid var(--rule); }

/* ---------- modal ---------- */
.modal { border: 0; border-radius: 16px; padding: 0; width: min(520px, calc(100vw - 32px)); box-shadow: 0 24px 64px rgba(10, 31, 85, .25); background: var(--panel); color: var(--text); }
.modal::backdrop { background: rgba(10, 31, 85, .45); }
.lead-form { padding: 28px clamp(18px, 4vw, 32px) 24px; display: grid; gap: 16px; position: relative; }
.lead-form h2 { font-size: 1.7rem; }
.lead-form > p { margin: 0; color: var(--text); }
.modal-close { position: absolute; top: 10px; right: 12px; width: 40px; height: 40px; border: 0; background: none; font-size: 1.8rem; line-height: 1; cursor: pointer; color: var(--ink); }
.opt { font-weight: 400; color: var(--steel); font-size: 0.8rem; }
.error { color: var(--loss); font-size: 0.84rem; margin: 0; }
.fine { font-size: 0.78rem !important; color: var(--steel) !important; }
.fine a { color: var(--steel); }

.toast { position: fixed; left: 50%; bottom: 88px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; background: var(--ink); color: #EEF2FA; padding: 12px 18px; border-radius: 10px; font: 600 0.88rem var(--body); transition: opacity .2s, transform .2s; z-index: 50; box-shadow: var(--shadow-lift); max-width: calc(100vw - 32px); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* reveal */
.reveal { animation: rise .6s cubic-bezier(.2,.8,.2,1) both; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
  html { scroll-behavior: auto; }
}
