:root {
  --ink: #0a0a0a;
  --ink-2: #333;
  --muted: #646464;
  --line: #e3e3e3;
  --soft: #efefef;
  --soft-2: #f7f7f7;
  --bg: #fff;

  --yellow: #ffdd33;
  --pink: #ffb4f8;
  --cyan: #17d6e8;
  --green: #a2fa5b;

  --up: #0d7f3e;
  --down: #c1245a;

  --font: "Satoshi", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --chip: clamp(1.625rem, 3.3vw, 3.125rem);
  --gutter: clamp(16px, 4.5vw, 64px);
  --spring: cubic-bezier(.34, 1.45, .55, 1);   /* momentum-y: slider hop, bars */
  --settle: cubic-bezier(.2, .9, .25, 1);      /* critically damped feel: no overshoot */
  --press: 110ms;                              /* press feedback lands within a frame or two */

  /* Materials: thicker surfaces get more blur and deeper shadow */
  --glass-thin: rgba(255, 255, 255, .72);
  --glass-thick: rgba(255, 255, 255, .8);
  --glass-edge: rgba(255, 255, 255, .7);
  --hairline: rgba(0, 0, 0, .08);
  --shadow-float: 0 1px 1px rgba(0,0,0,.04), 0 8px 24px rgba(0,0,0,.08), 0 24px 60px rgba(0,0,0,.10);

  /* Shape tokens: controls < small floats < containers < large floats */
  --r-input: 10px;
  --r-float-sm: 12px;
  --r-panel: 16px;
  --r-float-lg: 20px;

  /* One focus ring everywhere */
  --ring: 3px solid var(--ink);
  --ring-offset: 2px;

  --error: #b3261e;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
button, input, select { font: inherit; color: inherit; }
.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip { position: absolute; left: 12px; top: -60px; background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 10px; z-index: 50; }
.skip:focus { top: 12px; }
:focus-visible { outline: var(--ring); outline-offset: var(--ring-offset); }

/* ---------------- Top bar: a translucent floating layer ---------------- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  padding: 16px max(var(--gutter), calc((100% - 1440px) / 2 + var(--gutter)));
  background: var(--glass-thin);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
}
/* Scroll-edge effect instead of a hard divider: only when content is underneath */
.topbar::after {
  content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 18px; pointer-events: none;
  background: linear-gradient(rgba(0,0,0,.06), rgba(0,0,0,0));
  opacity: 0; transition: opacity .3s var(--settle);
}
.topbar.is-stuck::after { opacity: 1; }
.logo { font-size: clamp(1.625rem, 2.4vw, 2.125rem); font-weight: 700; letter-spacing: -0.03em; line-height: 1; color: var(--ink); text-decoration: none; }
.seg {
  display: inline-flex; gap: 2px; margin: 0; padding: 6px; border: 0;
  background: var(--soft); border-radius: 16px;
}
.seg { position: relative; }
.seg-thumb {
  position: absolute; top: 6px; bottom: 6px; left: 6px; right: 100%;
  background: var(--ink); border-radius: 11px;
  transition-property: left, right;
  transition-duration: .48s;
  transition-timing-function: var(--spring);
}
.seg.no-anim .seg-thumb { transition: none; }
.seg label { position: relative; z-index: 1; cursor: pointer; }
.seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg label span {
  display: block; padding: 8px clamp(14px, 2vw, 24px); border-radius: 11px;
  font-size: clamp(1.0625rem, 1.6vw, 1.3125rem); letter-spacing: -0.01em; color: var(--ink-2);
  transition: color .25s ease .05s, transform .3s var(--settle);
}
/* Respond on press, not release */
.seg label:active span { transform: scale(.94); transition-duration: .25s, var(--press); }
.seg label:hover span { color: var(--ink); }
.seg input:checked + span { color: #fff; }
.seg input:focus-visible + span { outline: var(--ring); outline-offset: var(--ring-offset); }

/* ---------------- Layout ---------------- */
main { max-width: 1440px; margin: 0 auto; padding: 0 var(--gutter) 48px; }
.stage { display: grid; gap: 40px; }

.hero { padding: clamp(48px, 12vh, 150px) 0 clamp(32px, 6vh, 64px); text-align: center; }

/* ---------------- Sentence & chips ---------------- */
.sentence {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: 18px 16px;
  font-size: var(--chip); font-weight: 500; letter-spacing: -0.028em; line-height: 1.05;
}
.word { white-space: nowrap; }
.word--comma { margin-left: -12px; }
.break { flex-basis: 100%; height: 0; }
.break--m { display: none; }
.chip {
  position: relative;
  display: inline-flex; align-items: center; gap: .22em;
  min-height: 1.72em; padding: 0 .42em;
  border: 0; border-radius: .3em;
  font: inherit; color: var(--ink); white-space: nowrap;
  font-variant-numeric: tabular-nums;
  transition: box-shadow .2s var(--settle), transform .35s var(--settle);
}
/* Instant press feedback on every editable chip */
label.chip:active, button.chip:active { transform: scale(.97); transition-duration: .2s, var(--press); }
.chip--yellow { background: var(--yellow); }
.chip--pink { background: var(--pink); }
.chip--cyan { background: var(--cyan); }
.chip--green { background: var(--green); }
.chip:focus-within, button.chip:focus-visible { outline: var(--ring); outline-offset: var(--ring-offset); }
.chip:has(input[aria-invalid="true"]) { box-shadow: inset 0 0 0 2px var(--error); }
.chip:hover { box-shadow: inset 0 0 0 2px rgba(0,0,0,.12); }
.chip--out:hover { box-shadow: none; }
.chip input {
  border: 0; padding: 0; margin: 0; background: transparent; outline: none;
  font: inherit; letter-spacing: inherit; min-width: 1ch; width: 4ch;
  font-variant-numeric: tabular-nums;
}
.chip input::placeholder { color: rgba(0,0,0,.55); }
/* Currency: the visible symbol, with the native select laid transparently on top */
.cur-sym { display: inline-block; font-weight: 700; padding-right: .55em; }
.chip select {
  position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer;
  appearance: none; -webkit-appearance: none; border: 0; margin: 0;
  font-size: max(16px, 1rem); /* ≥16px so iOS doesn't zoom when it opens */
}
.chev { width: .34em; height: .24em; flex: none; }
.chip--select .chev { position: absolute; right: .4em; top: .5em; pointer-events: none; }
.chip--select { padding-right: .3em; }
button.chip { cursor: pointer; }
button.chip .chev { align-self: flex-start; margin-top: .62em; }

/* ---------------- Slot-machine reels ---------------- */
.slot { display: inline-flex; align-items: center; white-space: pre; }
.slot > span { display: inline-block; height: 1.15em; line-height: 1.15em; }
.reel { overflow: hidden; }
.slot.spinning .reel {
  -webkit-mask-image: linear-gradient(transparent, #000 22%, #000 78%, transparent);
  mask-image: linear-gradient(transparent, #000 22%, #000 78%, transparent);
}
.strip { display: block; will-change: transform, filter; }
.strip > span { display: block; height: 1.15em; text-align: center; }

.chip--out { overflow: hidden; }
.chip--out.shine::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(105deg, transparent 30%, rgba(255,255,255,.85) 48%, transparent 66%);
  transform: translateX(-120%);
  animation: shine .75s ease-out forwards;
}
@keyframes shine { to { transform: translateX(120%); } }

/* Chart reveal (on spin) */
.chart .reveal { animation: reveal 1.25s cubic-bezier(.2, .8, .2, 1) both; }
.chart .fade-late { animation: fadeIn .4s ease 1s both; }
@keyframes reveal { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.bar.grow { transform-origin: left center; animation: grow .7s var(--spring) both; }
@keyframes grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* ---------------- Popover ---------------- */
.pop-anchor { position: relative; display: inline-flex; }
/* Thick glass: biggest floating surface, so strongest blur + deepest shadow */
.popover {
  position: absolute; top: calc(100% + 12px); left: 0; z-index: 30;
  width: min(340px, calc(100vw - 32px));
  padding: 20px; text-align: left;
  font-size: 0.9375rem; font-weight: 400; letter-spacing: 0; line-height: 1.45;
  background: var(--glass-thick);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  backdrop-filter: blur(28px) saturate(180%);
  border: 1px solid var(--glass-edge); border-radius: var(--r-float-lg);
  box-shadow: 0 0 0 1px var(--hairline), var(--shadow-float);
  transform-origin: 24px top;
}
.pop-title { margin: 0 0 14px; font-weight: 700; font-size: 1.0625rem; letter-spacing: -0.01em; }
.opt { font-weight: 400; color: var(--muted); font-size: 0.8125rem; margin-left: 4px; }
.pf { display: grid; gap: 6px; margin-bottom: 14px; }
.pf > span:first-child { font-size: 0.875rem; color: var(--ink-2); display: flex; gap: 8px; align-items: center; }
.pf input, .field input {
  width: 100%; border: 1px solid var(--line); border-radius: var(--r-input); padding: 10px 12px;
  background: #fff; font-variant-numeric: tabular-nums;
  font-size: max(16px, 1rem); /* ≥16px so iOS Safari doesn't auto-zoom on focus */
}
.pf input:focus, .field input:focus { border-color: var(--ink); outline: var(--ring); outline-offset: var(--ring-offset); }
input[aria-invalid="true"], .affix:has(input[aria-invalid="true"]) { border-color: var(--error) !important; }
.field-error, .input-error { margin: 0; font-size: 0.8125rem; color: var(--error); font-weight: 500; }
.input-error { margin-top: 10px; }
.pf input:disabled { background: var(--soft-2); color: var(--muted); }
.pop-note { margin: 12px 0 14px; font-size: 0.8125rem; color: var(--muted); }
.pop-done {
  width: 100%; padding: 11px; border: 0; border-radius: 12px;
  background: var(--ink); color: #fff; font-weight: 500; cursor: pointer;
  transition: transform .3s var(--settle);
}
.pop-done:active, .panel-tabs button:active, .legend button:active, .linkish:active {
  transform: scale(.96); transition-duration: var(--press);
}

.affix { display: flex; align-items: stretch; border: 1px solid var(--line); border-radius: var(--r-input); background: #fff; overflow: hidden; }
.affix:focus-within { border-color: var(--ink); outline: var(--ring); outline-offset: var(--ring-offset); }
.affix input { border: 0 !important; outline: none !important; border-radius: 0; min-width: 0; flex: 1; }
.affix-sym { display: grid; place-items: center; padding: 0 12px; background: var(--soft-2); color: var(--muted); font-size: 0.875rem; white-space: nowrap; }

/* ---------------- Tags ---------------- */
.tag {
  display: inline-block; padding: 1px 8px; border-radius: 999px;
  font-size: 0.75rem; font-weight: 500; letter-spacing: .01em; line-height: 1.5;
  border: 1px solid #cfcfcf; color: var(--muted); white-space: nowrap; vertical-align: middle;
}
.tag[hidden] { display: none; }
.tag--proj { background: var(--ink); border-color: var(--ink); color: #fff; }
.tag--assume { border-style: dashed; color: var(--ink-2); }

/* ---------------- Notices ---------------- */
.notices { list-style: none; padding: 0; margin: 28px auto 0; display: grid; gap: 8px; max-width: 760px; }
.notices:empty { display: none; }
.notices li {
  display: flex; gap: 10px; align-items: flex-start; text-align: left;
  padding: 10px 14px; border-radius: 12px; background: var(--soft-2); font-size: 0.875rem; color: var(--ink-2);
}
.notices li::before { content: "i"; flex: none; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--ink); color: #fff; font-size: 0.75rem; font-weight: 700; margin-top: 1px; }
.notices li.warn { background: #fff3c4; }
.notices li.warn::before { content: "!"; }

/* ---------------- Stats ---------------- */
.stats {
  margin: clamp(40px, 9vh, 110px) 0 0;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 14px 44px;
  font-size: clamp(1.0625rem, 1.6vw, 1.375rem); letter-spacing: -0.012em;
}
.stats > div { display: inline-flex; flex-wrap: wrap; align-items: center; gap: .3em; }
.stats dt::after { content: ":"; }
.stats dd { margin: 0; font-variant-numeric: tabular-nums; }
.stats .tag { margin-left: 4px; }
.stats .linkish { background: none; border: 0; padding: 0; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; color: var(--ink-2); }
.up { color: var(--up); }
.down { color: var(--down); }

/* ---------------- Chart panel ---------------- */
.chart-panel { border: 1px solid var(--line); border-radius: var(--r-panel); overflow: hidden; background: #fff; min-width: 0; }
.chart-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 22px 24px 4px; }
.chart-title { margin: 0; font-size: 1.0625rem; font-weight: 500; letter-spacing: -0.012em; }
.chart-sub { margin: 4px 0 0; font-size: 0.8125rem; letter-spacing: .005em; font-variant-numeric: tabular-nums; }
.chart-wrap { position: relative; }
.chart { height: clamp(360px, 50vh, 480px); outline: none; }
.chart:focus-visible { box-shadow: inset 0 0 0 3px var(--ink); }
.chart svg { display: block; width: 100%; height: 100%; touch-action: pan-y; }
.chart text { font-family: var(--font); }
/* Thin glass: small surface, lighter blur and shadow than the popover */
.tooltip {
  position: absolute; z-index: 5; pointer-events: none; min-width: 184px;
  padding: 10px 12px; border-radius: var(--r-float-sm);
  background: var(--glass-thin);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  backdrop-filter: blur(16px) saturate(180%);
  border: 1px solid var(--glass-edge);
  box-shadow: 0 0 0 1px var(--hairline), 0 8px 24px rgba(0,0,0,.08);
  font-size: 0.8125rem; font-weight: 500; letter-spacing: .01em; font-variant-numeric: tabular-nums;
  transition: left .18s var(--settle);
}
.tooltip b { display: block; margin-bottom: 4px; font-weight: 700; }
.tooltip .tt-row { display: flex; justify-content: space-between; gap: 16px; }
.tooltip .tt-row span:first-child { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); }
.sw { display: inline-block; width: 14px; height: 3px; border-radius: 2px; }
.sw--dash { background: repeating-linear-gradient(90deg, #8a8a8a 0 4px, transparent 4px 7px) !important; }
.chart-foot {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 24px;
  padding: 16px 24px; border-top: 1px solid var(--line); font-size: 0.875rem; font-weight: 500;
}
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; list-style: none; margin: 0 0 0 auto; padding: 0; }
.legend button, .legend span.lg {
  display: inline-flex; align-items: center; gap: 7px; border: 0; background: none; padding: 4px 6px;
  border-radius: 8px; font-size: 0.8125rem; color: var(--muted); cursor: pointer;
}
.legend span.lg { cursor: default; }
.legend button { transition: background .2s var(--settle), color .2s var(--settle), transform .3s var(--settle); }
.legend button:hover { color: var(--ink); }
.legend button[aria-pressed="true"] { color: var(--ink); background: var(--soft); }
.panel-tabs button:hover { color: var(--ink); }
.chart-heading { min-width: 0; }
.chart-sub--muted { color: var(--muted); }
.chart-sub .tag { margin-left: 6px; }
.panel-tabs { display: inline-flex; flex: none; padding: 4px; gap: 2px; border-radius: 12px; background: var(--soft); }
.panel-tabs button {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 12px; border: 0; border-radius: 9px; background: none;
  font-size: 0.8125rem; font-weight: 500; color: var(--ink-2); cursor: pointer; white-space: nowrap;
  transition: background .2s, color .2s;
}
.panel-tabs button[aria-selected="true"] { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.1); }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: #e5484d; box-shadow: 0 0 0 0 rgba(229,72,77,.5); animation: livePulse 1.6s ease-out infinite; }
@keyframes livePulse { to { box-shadow: 0 0 0 7px rgba(229,72,77,0); } }
.live-box { height: clamp(360px, 50vh, 480px); }
.live-box .tradingview-widget-container, .live-box .tradingview-widget-container__widget { height: 100%; width: 100%; }
.live-box .tradingview-widget-copyright { display: none; }
.chart-foot--live { font-weight: 400; color: var(--muted); font-size: 0.8125rem; }
.chart-foot--live .foot-ticker { color: var(--ink); font-weight: 500; font-size: 0.875rem; }
.chart-foot .linkish { background: none; border: 0; padding: 0; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font-size: inherit; }
.pop-note code { font-size: 0.75rem; background: var(--soft); padding: 1px 5px; border-radius: 5px; }

/* ---------------- Welcome demo ---------------- */
.demo-hint {
  display: inline-flex; align-items: center; gap: 10px; margin: 28px 0 0;
  padding: 8px 16px; border-radius: 999px; background: var(--ink); color: #fff;
  font-size: 0.875rem; font-weight: 500; letter-spacing: .005em;
  animation: materialize .5s var(--settle) both;
}
@keyframes materialize {
  from { opacity: 0; transform: scale(.92); filter: blur(6px); }
  to { opacity: 1; transform: none; filter: blur(0); }
}
.demo-hint[hidden] { display: none; }
.demo-skip {
  margin: -4px -10px -4px 4px; padding: 5px 12px; border: 0; border-radius: 999px;
  background: rgba(255,255,255,.16); color: #fff; font-weight: 500; font-size: inherit; cursor: pointer;
  transition: background .2s var(--settle), transform .3s var(--settle);
}
.demo-skip:hover { background: rgba(255,255,255,.26); }
.demo-skip:active { transform: scale(.94); transition-duration: .2s, var(--press); }
.demo-skip:focus-visible { outline-color: #fff; }
.demo-pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--green); animation: livePulse 1.4s ease-out infinite; box-shadow: 0 0 0 0 rgba(162,250,91,.7); }
.demo .notices { display: none; }
.demo .sentence .chip { overflow: hidden; }
#assetLabel { display: inline-block; }

.chart-empty { display: grid; place-items: center; height: 100%; color: var(--muted); padding: 24px; text-align: center; }
.chart-caption { margin: 14px 0 0; font-size: 0.8125rem; color: var(--muted); max-width: 820px; }

/* ---------------- Blocks ---------------- */
.block { margin-top: clamp(64px, 9vw, 112px); }
.block-head { max-width: 760px; margin-bottom: 24px; }
.block-head h2 { margin: 0 0 8px; font-size: clamp(1.625rem, 2.6vw, 2.125rem); line-height: 1.12; letter-spacing: -0.028em; font-weight: 700; }
.block-head p { margin: 0; color: var(--muted); font-size: 1rem; line-height: 1.55; max-width: 68ch; }

.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: var(--r-panel); }
.table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; font-variant-numeric: tabular-nums; }
.table th, .table td { padding: 12px 16px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.table tbody tr:last-child > * { border-bottom: 0; }
.table thead th { font-size: 0.8125rem; font-weight: 500; color: var(--muted); background: var(--soft-2); white-space: nowrap; }
.table .num { text-align: right; white-space: nowrap; }
.table th[scope="row"] { font-weight: 400; color: var(--ink-2); }
.table tr.total > * { font-weight: 700; color: var(--ink); background: var(--soft-2); }
.table tr.sep > * { border-top: 2px solid var(--ink); }
.table--scen { min-width: 640px; }
.table--scen thead th { font-size: 0.9375rem; color: var(--ink); }
.table--scen thead th.num { min-width: 150px; }
.table--scen .is-sel { background: #fffbe0; }
.table--scen thead th.is-sel { background: var(--yellow); }
.scen-h { display: inline-flex; align-items: center; gap: 8px; }
.row-group th { font-size: 0.8125rem !important; font-weight: 700 !important; letter-spacing: .005em; color: var(--ink) !important; background: #fff; padding-top: 20px; }
.cell-input { display: inline-flex; align-items: center; justify-content: flex-end; gap: 4px; }
.cell-input input {
  width: 7ch; text-align: right; padding: 7px 9px; border: 1px dashed #b9b9b9; border-radius: var(--r-input); background: #fff;
  font-variant-numeric: tabular-nums; font-size: max(16px, 1rem);
}
.cell-input input:focus { border-style: solid; border-color: var(--ink); outline: var(--ring); outline-offset: var(--ring-offset); }

.fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.field { padding: 18px; border: 1px solid var(--line); border-radius: var(--r-panel); display: grid; gap: 8px; align-content: start; }
.field > label, .field .label { font-weight: 700; font-size: 0.9375rem; }
.help { margin: 0; font-size: 0.8125rem; color: var(--muted); }

.switch-row { display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: 0.9375rem; position: relative; }
.switch-row input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch { flex: none; width: 42px; height: 24px; border-radius: 999px; background: #d4d4d4; position: relative; transition: background .15s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .15s; }
.switch-row input:checked + .switch { background: var(--ink); }
.switch-row input:checked + .switch::after { transform: translateX(18px); }
.switch-row input:focus-visible + .switch { outline: var(--ring); outline-offset: var(--ring-offset); }
.switch-row input:disabled ~ * { opacity: .5; }

.bar-col { width: 32%; }
.bar { height: 10px; border-radius: 3px; min-width: 2px; }
.bar.pos { background: var(--green); }
.bar.neg { background: var(--pink); }
.bar.tot { background: var(--yellow); }
.bar.base { background: var(--cyan); }
.bd-note { display: block; font-size: 0.75rem; color: var(--muted); }

.years { margin-top: 20px; }
.years summary { cursor: pointer; font-weight: 500; padding: 10px 0; }
.table--years { min-width: 720px; font-size: 0.875rem; }

/* Reference text, not interactive: a quiet ruled list rather than six identical cards */
.method { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 0 40px; }
.method > div { padding: 18px 0 22px; border-top: 1px solid var(--line); }
.method h3 { margin: 0 0 6px; font-size: 1rem; letter-spacing: -0.01em; }
.method p { margin: 0; color: var(--ink-2); font-size: 0.875rem; line-height: 1.55; max-width: 60ch; }

.saved-note { margin-top: 10px !important; font-size: 0.875rem !important; }
.saved-note .linkish { background: none; border: 0; padding: 0; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font: inherit; }
#resetStatus { color: var(--up); font-weight: 500; margin-left: 6px; }
.noscript { margin: 24px auto 0; max-width: 560px; padding: 12px 16px; border-radius: var(--r-float-sm); background: #fff3c4; font-size: 0.9375rem; }

.disclaimer { margin-top: 48px; padding: 22px 24px; border-radius: var(--r-panel); background: var(--ink); color: #eaeaea; font-size: 0.875rem; }
.disclaimer strong { color: #fff; display: block; margin-bottom: 4px; font-size: 0.9375rem; }
.disclaimer .liability { display: block; margin-top: 10px; padding-top: 10px; border-top: 1px solid rgba(255,255,255,.18); color: #fff; }
.foot { max-width: 1440px; margin: 0 auto; padding: 0 var(--gutter) 40px; color: var(--muted); font-size: 0.8125rem; }

/* ---------------- Responsive ---------------- */
@media (max-width: 680px) {
  /* Big centred wordmark, then the scenario slider at the same compact size as on the web.
     The negative sticky offset lets the wordmark scroll away while the slider stays pinned. */
  .topbar {
    grid-template-columns: 1fr; justify-items: center; row-gap: 22px;
    padding: 28px 16px 12px;
    top: calc(-38px - 3.5rem); /* -(28px padding + 3.5rem wordmark + 22px gap - 12px breathing room) */
  }
  .logo { font-size: 3.5rem; letter-spacing: -0.04em; }
  .seg label span { padding: 8px 18px; font-size: 1.0625rem; }

  /* The sentence stacks one phrase per line, centred */
  .hero { padding-top: 28px; }
  .sentence { font-size: clamp(1.1875rem, 5.9vw, 1.5rem); gap: 20px 10px; letter-spacing: -0.02em; }
  .break--m { display: block; }
  .chip { min-height: 1.62em; padding: 0 .42em; border-radius: .26em; }
  .word--comma { margin-left: -8px; }

  /* Stats: one per line, centred, plain as in the mockup. The input/assumption/projection
     tags stay available to screen readers. */
  .stats { flex-direction: column; align-items: center; gap: 18px; margin-top: 56px; font-size: 1.1875rem; }
  .stats .tag, .table--scen th .tag {
    position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; padding: 0;
  }
  .chart, .live-box { height: 320px; }
  .chart-head, .chart-foot { padding-left: 16px; padding-right: 16px; }
  .legend { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::after { transition: none !important; animation: none !important; }
}
@media (prefers-reduced-transparency: reduce) {
  .topbar, .popover, .tooltip { background: #fff; -webkit-backdrop-filter: none; backdrop-filter: none; }
}
@media (prefers-contrast: more) {
  :root { --line: #8a8a8a; --muted: #3d3d3d; --hairline: rgba(0,0,0,.5); }
  .topbar { background: #fff; border-bottom: 1px solid #000; }
  .popover, .tooltip { background: #fff; border-color: #000; }
}
