:root {
  --paper: #f3f0e8;
  --paper-deep: #e8e3d7;
  --ink: #161a18;
  --muted: #65665f;
  --rule: #cbc5b8;
  --orange: #ef6a35;
  --orange-deep: #c84a1e;
  --teal: #167b78;
  --blue: #3d5a80;
  --lime: #d7ff4f;
  --white: #fffdf8;
  --mono: "DM Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: "Noto Sans SC", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(rgba(22, 26, 24, 0.026) 1px, transparent 1px),
    var(--paper);
  background-size: 100% 32px;
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

button, input, select { font: inherit; }

a { color: inherit; }

.skip-link {
  position: fixed;
  left: 16px;
  top: -80px;
  padding: 10px 14px;
  z-index: 100;
  background: var(--ink);
  color: var(--white);
}

.skip-link:focus { top: 16px; }

.masthead {
  height: 72px;
  padding: 0 4vw;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--ink);
  background: rgba(243, 240, 232, 0.93);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 20;
}

.masthead-right { display: flex; align-items: center; gap: 28px; }
.top-nav { display: flex; gap: 16px; }
.top-nav a { color: var(--muted); text-decoration: none; font: 400 10px/1.4 var(--mono); }
.top-nav a:hover, .top-nav a:focus-visible { color: var(--orange-deep); }

.language-switch {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--rule);
  font: 500 10px/1 var(--mono);
}
.language-switch button {
  padding: 3px 0;
  border: 0;
  border-bottom: 1px solid transparent;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font: inherit;
}
.language-switch button:hover,
.language-switch button:focus-visible,
.language-switch button.active {
  border-color: var(--orange-deep);
  color: var(--orange-deep);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  font: 500 13px/1 var(--mono);
  letter-spacing: .08em;
}

.brand-mark {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  color: var(--paper);
  background: var(--ink);
  font: 700 12px/1 Arial, Helvetica, sans-serif;
  letter-spacing: -.04em;
}

.source-status {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font: 400 11px/1.4 var(--mono);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #b7b0a1;
  box-shadow: 0 0 0 4px rgba(183, 176, 161, .18);
}

.source-status.live .status-dot { background: var(--teal); box-shadow: 0 0 0 4px rgba(22,123,120,.14); }
.source-status.fallback .status-dot { background: var(--orange); box-shadow: 0 0 0 4px rgba(239,106,53,.14); }

main > section { padding: 72px 4vw; border-bottom: 1px solid var(--ink); }

.hero {
  min-height: 540px;
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(340px, .65fr);
  gap: 6vw;
  align-items: end;
  padding-top: 72px;
  background:
    radial-gradient(circle at 75% 18%, rgba(215,255,79,.65) 0 7%, transparent 7.2%),
    var(--paper);
}

.eyebrow, .section-index, .panel-kicker {
  margin: 0 0 18px;
  color: var(--orange-deep);
  font: 500 11px/1.4 var(--mono);
  letter-spacing: .11em;
  text-transform: uppercase;
}

h1 {
  max-width: 880px;
  margin: 0;
  font-size: clamp(56px, 6.2vw, 98px);
  line-height: .98;
  letter-spacing: -.07em;
  font-weight: 900;
}

.dek {
  max-width: 760px;
  margin: 26px 0 0;
  color: #41423e;
  font-size: clamp(16px, 1.35vw, 21px);
  line-height: 1.65;
}

.hero-result {
  padding: 22px;
  background: var(--ink);
  color: var(--paper);
  min-height: 265px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  box-shadow: 12px 12px 0 var(--orange);
}

.metric-label, .metric-caption, .metric-footnote { margin: 0; }
.metric-label { color: #bbbdb6; font: 400 12px/1.5 var(--mono); }
.metric-value { margin: 14px 0 2px; font: 500 clamp(72px, 8vw, 116px)/1 var(--mono); letter-spacing: -.09em; }
.metric-value small { margin-left: 8px; color: var(--lime); font-size: .27em; letter-spacing: 0; white-space: nowrap; }
.lift-pair { display: flex; align-items: baseline; gap: 14px; min-width: 0; }
.lift-pair > span { min-width: 0; display: flex; align-items: baseline; white-space: nowrap; }
.lift-pair > span + span { padding-left: 14px; border-left: 1px solid currentColor; }
.lift-pair strong { font: inherit; letter-spacing: inherit; }
.lift-pair small { margin-left: 4px; font: 500 .32em/1 var(--mono); letter-spacing: 0; }
.hero-lift-pair { gap: 16px; font-size: clamp(44px, 4.1vw, 64px); letter-spacing: -.08em; }
.hero-lift-pair > span + span { border-color: #575b55; }
.hero-lift-pair small { margin-left: 5px; color: var(--lime); font-size: .34em; }
.compact-lift-pair { gap: 10px; }
.compact-lift-pair > span + span { padding-left: 10px; }
.compact-lift-pair strong { font: 500 25px/1 var(--mono); letter-spacing: -.06em; }
.compact-lift-pair small { font-size: 9px; }
.metric-caption { font-size: 16px; line-height: 1.6; }
.metric-rule { height: 1px; margin: 24px 0 18px; background: #424640; }
.metric-footnote { color: #9ea099; font-size: 11px; line-height: 1.5; }

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 32px;
  margin-bottom: 30px;
}

.section-heading.compact { margin-bottom: 28px; }
.section-heading h2 { margin: 0; font-size: clamp(30px, 3.2vw, 52px); line-height: 1.12; letter-spacing: -.045em; }
.section-index { margin-bottom: 10px; }
.section-note { max-width: 320px; margin: 0 0 5px; color: var(--muted); font: 400 11px/1.5 var(--mono); text-align: right; }

.historical-section, .results-section { padding-top: 56px; padding-bottom: 56px; }
.module-workbench {
  display: grid;
  grid-template-columns: minmax(270px, 300px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}
.module-canvas { min-width: 0; }
.module-sidebar {
  padding: 16px;
  border: 1px solid var(--ink);
  color: var(--paper);
  background: var(--ink);
}
.sidebar-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.sidebar-heading .panel-kicker { margin-bottom: 5px; color: var(--lime); font-size: 9px; }
.sidebar-heading h3 { margin: 0; font-size: 14px; line-height: 1.35; }
.sidebar-actions { display: flex; align-items: center; gap: 10px; }
.sidebar-reset {
  padding: 0 0 2px;
  border: 0;
  border-bottom: 1px solid #6d7069;
  color: #b8bbb3;
  background: transparent;
  cursor: pointer;
  font: 400 9px/1.4 var(--mono);
  white-space: nowrap;
}
.sidebar-reroll { color: var(--lime); border-color: var(--lime); }
.sidebar-reset:hover, .sidebar-reset:focus-visible { color: var(--lime); border-color: var(--lime); }
.sidebar-date-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.sidebar-control { display: block; padding: 8px 0; border-bottom: 1px solid #444841; }
.sidebar-control > span { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; color: #c4c6bf; font-size: 10px; line-height: 1.4; }
.sidebar-control output { color: var(--lime); font: 500 10px/1.4 var(--mono); white-space: nowrap; }
.sidebar-control input[type="range"] { height: 18px; margin-top: 7px; }
.sidebar-control input[type="date"], .sidebar-control select {
  width: 100%;
  margin-top: 6px;
  padding: 6px 0;
  border: 0;
  border-bottom: 1px solid #5a5e56;
  border-radius: 0;
  color: var(--paper);
  background: transparent;
  color-scheme: dark;
  font: 500 10px/1.4 var(--mono);
}
.sidebar-control select option {
  color: var(--ink);
  background: var(--white);
}
.sidebar-group-label { margin: 14px 0 2px; color: var(--lime); font: 500 8px/1.4 var(--mono); letter-spacing: .11em; text-transform: uppercase; }
.synthetic-sidebar .sidebar-control { padding: 5px 0; }
.sidebar-readout { display: grid; grid-template-columns: repeat(2, 1fr); margin-top: 14px; border: 1px solid #51554e; }
.historical-api-readout { grid-template-columns: repeat(3, 1fr); }
.sidebar-readout div { padding: 10px; border-right: 1px solid #51554e; }
.sidebar-readout div:last-child { border-right: 0; }
.sidebar-readout strong, .sidebar-readout span { display: block; }
.sidebar-readout strong { color: var(--lime); font: 500 19px/1.1 var(--mono); }
.sidebar-readout span { margin-top: 4px; color: #9ea099; font-size: 8px; }
.module-reference-note { margin: 16px 0 0; padding-top: 14px; border-top: 1px solid #51554e; color: #9ea099; font-size: 9px; line-height: 1.6; }
.module-reference-note > span { display: block; margin-top: 5px; color: #c3c6bd; }
.module-sidebar .module-reference-note code { color: #e2e4dd; background: #2a2e29; }
.foundation-workbench, .historical-section .module-workbench { align-items: stretch; }
.foundation-sidebar, .historical-section .module-sidebar { height: 100%; }
.foundation-canvas { height: 100%; display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(245px, .72fr); gap: 18px; align-items: stretch; }
.foundation-canvas .distribution-panel { min-width: 0; }
.foundation-assumption-card { min-width: 0; padding: 22px; border: 1px solid var(--ink); color: var(--paper); background: var(--ink); display: flex; flex-direction: column; }
.foundation-assumption-card .panel-kicker { margin-bottom: 10px; color: var(--lime); font-size: 9px; }
.foundation-assumption-card h3 { margin: 0; font-size: 21px; line-height: 1.35; letter-spacing: -.025em; }
.foundation-assumption-card p { margin: 0; }
.foundation-assumption-card .assumption-lead { margin-top: 15px; color: #c3c6be; font-size: 11px; line-height: 1.75; }
.assumption-formula { margin: 18px 0 !important; padding: 12px 0; border-top: 1px solid #4b4f48; border-bottom: 1px solid #4b4f48; color: var(--lime); font: 500 18px/1.2 var(--mono); }
.assumption-detail { padding: 12px 0; border-bottom: 1px solid #3e423c; }
.assumption-detail:last-child { border-bottom: 0; }
.assumption-detail strong { display: block; margin-bottom: 5px; font-size: 11px; line-height: 1.5; }
.assumption-detail p { color: #aeb1aa; font-size: 9px; line-height: 1.65; }

.control-deck { background: var(--ink); color: var(--paper); }
.control-deck .section-index { color: var(--lime); }
.text-button { padding: 0 0 3px; border: 0; border-bottom: 1px solid #71736d; color: #c3c5bd; background: transparent; cursor: pointer; font: 400 11px/1.5 var(--mono); }
.text-button:hover, .text-button:focus-visible { color: var(--lime); border-color: var(--lime); }

.control-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid #464943;
  border-left: 1px solid #464943;
}

.control { min-height: 152px; padding: 18px; border-right: 1px solid #464943; border-bottom: 1px solid #464943; }
.control-top { min-height: 38px; display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; font-size: 12px; }
.control output { color: var(--lime); font: 500 13px/1.5 var(--mono); white-space: nowrap; }
.control-note { display: block; margin-top: 12px; color: #92958d; font-size: 10px; line-height: 1.5; }

input[type="range"] {
  width: 100%;
  height: 24px;
  margin-top: 18px;
  appearance: none;
  background: transparent;
  cursor: pointer;
}

input[type="range"]::-webkit-slider-runnable-track { height: 2px; background: #5a5e56; }
input[type="range"]::-moz-range-track { height: 2px; background: #5a5e56; }
input[type="range"]::-webkit-slider-thumb { width: 17px; height: 17px; margin-top: -7px; border: 2px solid var(--ink); border-radius: 0; appearance: none; background: var(--lime); box-shadow: 0 0 0 1px var(--lime); }
input[type="range"]::-moz-range-thumb { width: 15px; height: 15px; border: 2px solid var(--ink); border-radius: 0; background: var(--lime); box-shadow: 0 0 0 1px var(--lime); }

select {
  width: 100%;
  margin-top: 13px;
  padding: 10px 34px 10px 0;
  border: 0;
  border-bottom: 1px solid #5a5e56;
  border-radius: 0;
  color: var(--paper);
  background: transparent;
  font: 500 13px/1.5 var(--mono);
}

.date-control input[type="date"] {
  width: 100%;
  margin-top: 13px;
  padding: 9px 0;
  border: 0;
  border-bottom: 1px solid #5a5e56;
  border-radius: 0;
  color: var(--paper);
  background: transparent;
  color-scheme: dark;
  font: 500 12px/1.5 var(--mono);
}

.inline-recommend {
  padding: 0 0 2px;
  border: 0;
  border-bottom: 1px solid currentColor;
  color: var(--orange-deep);
  background: transparent;
  cursor: pointer;
  font: 500 9px/1.4 var(--mono);
}

.banked-planner {
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: 40px;
  margin-top: 20px;
  padding: 22px;
  border: 1px solid #464943;
}
.banked-copy .panel-kicker { margin-bottom: 7px; color: var(--lime); }
.banked-copy h3 { margin: 0 0 8px; font-size: 17px; }
.banked-copy p { max-width: 560px; margin: 0; color: #92958d; font-size: 10px; line-height: 1.6; }
.banked-actions > label { display: block; margin-bottom: 7px; color: #92958d; font: 400 9px/1.4 var(--mono); }
.banked-input-row { display: grid; grid-template-columns: 1fr auto; }
.banked-input-row input {
  min-width: 0;
  padding: 9px 12px;
  border: 1px solid #5a5e56;
  color: var(--paper);
  background: transparent;
  color-scheme: dark;
  font: 500 11px/1.5 var(--mono);
}
.banked-input-row button {
  padding: 9px 14px;
  border: 1px solid var(--lime);
  color: var(--ink);
  background: var(--lime);
  cursor: pointer;
  font: 500 10px/1.5 var(--mono);
}
.banked-summary { color: #b5b8b0; font: 400 10px/1.5 var(--mono); }
.banked-list { min-height: 29px; margin-top: 10px; display: grid; gap: 7px; }
.banked-card { display: grid; grid-template-columns: minmax(160px, 1fr) minmax(150px, .8fr) auto; gap: 10px; align-items: center; padding: 9px; border: 1px solid #5a5e56; }
.banked-card-meta strong, .banked-card-meta span { display: block; }
.banked-card-meta strong { color: var(--paper); font: 500 10px/1.5 var(--mono); }
.banked-card-meta span { color: #92958d; font: 400 9px/1.5 var(--mono); }
.banked-card input { width: 100%; min-width: 0; padding: 6px; border: 1px solid #5a5e56; color: var(--paper); background: transparent; color-scheme: dark; font: 400 9px/1.3 var(--mono); }
.banked-card button { padding: 6px 8px; border: 1px solid #5a5e56; color: #b5b8b0; background: transparent; cursor: pointer; font: 400 9px/1.3 var(--mono); }
.banked-empty { color: #777a73; font: 400 9px/29px var(--mono); }

.results-section { background: var(--paper); }
.result-layout { display: grid; grid-template-columns: minmax(0, 3fr) minmax(265px, .85fr); gap: 18px; }
.chart-panel, .scorecard { border: 1px solid var(--ink); background: rgba(255,253,248,.56); }
.panel-heading { min-height: 92px; padding: 20px 22px; display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; border-bottom: 1px solid var(--rule); }
.panel-heading h3 { margin: 0; font-size: 17px; }
.panel-heading .panel-kicker { margin-bottom: 7px; color: var(--muted); }
.legend { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 14px; color: var(--muted); font: 400 10px/1.3 var(--mono); }
.legend span { display: flex; align-items: center; gap: 6px; }
.legend-line { width: 18px; height: 2px; display: inline-block; background: var(--blue); }
.legend-line.announced { background: var(--orange); }
.legend-line.natural { background: var(--teal); }
.legend-line.banked { background: #9c4f86; }
.legend-line.cohort { height: 1px; background: #aaa99f; }
.legend-point { width: 8px; height: 8px; display: inline-block; border-radius: 50%; }
.legend-point.notice { border: 1px solid #704d8a; background: #c9a8de; }
.legend-point.reset { border: 1px solid var(--ink); border-radius: 0; background: var(--orange); }
.legend-point.api-reset { border: 1px solid var(--ink); border-radius: 0; background: var(--orange); }
.legend-point.issued { border: 1px solid var(--ink); background: var(--orange); }
.legend-point.banked-reset { border: 1px solid #5d3c59; border-radius: 0; background: #c79abb; }
.legend-point.natural-reset { border: 1px solid #0d5f5c; border-radius: 0; background: var(--teal); transform: rotate(45deg) scale(.78); }
.legend-point.selected-natural-reset { border: 1px solid #69405f; background: #f4e4ee; }

.chart-wrap { position: relative; width: 100%; min-height: 370px; }
.chart-wrap svg { width: 100%; height: 370px; display: block; overflow: hidden; }

.panel-tools { display: flex; flex-direction: column; align-items: flex-end; gap: 12px; }
.chart-mode { display: inline-flex; border: 1px solid var(--rule); }
.chart-mode button { padding: 5px 9px; border: 0; border-right: 1px solid var(--rule); color: var(--muted); background: transparent; cursor: pointer; font: 400 9px/1.3 var(--mono); }
.chart-mode button:last-child { border-right: 0; }
.chart-mode button.active { color: var(--white); background: var(--ink); }

.scorecard { display: flex; flex-direction: column; }
.scorecard > .panel-kicker { margin: 22px 22px 8px; color: var(--muted); }
.scenario-card { padding: 22px; border-top: 1px solid var(--rule); }
.scenario-card:first-child { border-top: 0; }
.scenario-card .scenario-name { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; font-weight: 700; }
.scenario-card .scenario-name i { width: 9px; height: 9px; margin-top: 5px; display: inline-block; background: var(--blue); }
.scenario-card.announced .scenario-name i { background: var(--orange); }
.scenario-card.natural .scenario-name i { background: var(--teal); }
.scenario-card.banked .scenario-name i { background: #9c4f86; }
.scenario-value { margin: 10px 0 4px; font: 500 36px/1 var(--mono); letter-spacing: -.06em; }
.scenario-value small { margin-left: 5px; color: var(--muted); font-size: 10px; letter-spacing: 0; }
.scenario-sub { margin: 0; color: var(--muted); font-size: 11px; }
.scorecard-note { margin-top: auto; padding: 22px; border-top: 1px solid var(--ink); background: var(--paper-deep); }
.scorecard-note strong { display: block; font: 500 25px/1.2 var(--mono); }
.scorecard-note > span { display: block; margin-top: 5px; color: var(--muted); font-size: 10px; line-height: 1.5; }
.synthetic-results-bar { display: grid; grid-template-columns: minmax(0, 1fr) 250px; border: 1px solid var(--ink); border-top: 0; }
.synthetic-results-bar #scenario-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.synthetic-results-bar .scenario-card { min-width: 0; padding: 15px; border-top: 0; border-right: 1px solid var(--rule); }
.synthetic-results-bar .scenario-card:last-child { border-right: 0; }
.synthetic-results-bar .scenario-value { font-size: 26px; }
.synthetic-results-bar .scorecard-note { margin: 0; border-top: 0; border-left: 1px solid var(--ink); display: flex; flex-direction: column; justify-content: flex-end; }
.synthetic-workbench { align-items: stretch; }
.synthetic-workbench > .module-sidebar, .synthetic-workbench > .module-canvas { height: 100%; }
.synthetic-results-bar .synthetic-lift-card { padding: 13px 14px; color: var(--ink); background: var(--orange); justify-content: space-between; }
.synthetic-results-bar .synthetic-lift-card > span { margin-top: 0; color: var(--ink); font-size: 11px; font-weight: 650; line-height: 1.35; }

.historical-section { background: #dcd8ce; }
.historical-controls { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 18px; border-top: 1px solid var(--ink); border-left: 1px solid var(--ink); }
.historical-controls > * { min-height: 82px; padding: 14px 16px; border-right: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
.historical-controls label { font: 500 10px/1.4 var(--mono); }
.historical-controls input { display: block; width: 100%; margin-top: 8px; padding: 5px 0; border: 0; border-bottom: 1px solid #aaa398; background: transparent; font: 500 11px/1.4 var(--mono); }
.historical-controls strong, .historical-controls span { display: block; }
.historical-controls strong { font: 500 25px/1 var(--mono); }
.historical-controls span { margin-top: 8px; color: var(--muted); font-size: 9px; }
.service-panel, .historical-chart-panel { background: #faf7f1; }
.historical-chart-panel { margin-bottom: 0; }
.historical-chart-panel > .panel-heading > div:first-child { flex: 0 0 auto; min-width: 0; }
.historical-chart-panel > .panel-heading > .legend { flex: 1 1 auto; gap: 8px 11px; font-size: 9px; }
.historical-chart-panel > .panel-heading h3 { white-space: nowrap; }
.historical-chart-panel .chart-wrap,
.historical-chart-panel .chart-wrap svg { min-height: 350px; height: 350px; }
.historical-rate-heading { min-height: 58px; padding: 10px 22px; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.historical-rate-heading .panel-kicker { margin-bottom: 3px; color: var(--muted); font-size: 8px; }
.historical-rate-heading h3 { margin: 0; font-size: 13px; }
.historical-rate-heading > p { margin: 0; color: var(--muted); font: 400 8px/1.5 var(--mono); }
.historical-chart-panel .historical-rate-wrap,
.historical-chart-panel .historical-rate-wrap svg { min-height: 155px; height: 155px; }
.historical-summary-block { display: grid; grid-template-columns: minmax(0, 1fr) 280px; grid-template-rows: auto auto; gap: 0; padding: 0; border: 1px solid var(--ink); border-top: 0; background: #faf7f1; }
.historical-summary-block .timeline-summary { grid-column: 1; grid-row: 1; border: 0; }
.historical-summary-block .timeline-method { grid-column: 1; grid-row: 2; margin: 0; padding: 10px 14px; border-top: 1px solid var(--rule); display: flex; align-items: center; }
.historical-summary-block .timeline-summary div { padding: 15px; }
.historical-summary-block .timeline-summary span { font-size: clamp(20px, 2.1vw, 32px); }
.historical-summary-block .timeline-summary div:last-child span { font-size: clamp(18px, 1.8vw, 28px); letter-spacing: -.07em; }
.historical-lift-card { grid-column: 2; grid-row: 1 / span 2; min-height: 128px; margin: 0; padding: 18px 20px; border-top: 0; border-left: 1px solid var(--ink); color: var(--ink); background: var(--orange); display: flex; flex-direction: column; justify-content: space-between; }
.historical-lift-card .compact-lift-pair { gap: 12px; }
.historical-lift-card .compact-lift-pair > span + span { padding-left: 12px; }
.historical-lift-card .compact-lift-pair strong { font-size: clamp(34px, 2.8vw, 38px); }
.historical-lift-card .compact-lift-pair small { font-size: 10px; }
.historical-lift-card > small { color: var(--ink); font-size: 12px; font-weight: 650; line-height: 1.4; }
.history-reset-marker { stroke: rgba(22,26,24,.25); stroke-width: 1; stroke-dasharray: 3 4; }
.history-reset-dot { fill: var(--orange); stroke: var(--ink); stroke-width: 1; }
.history-notice-marker { stroke: #80619a; stroke-width: 1.1; stroke-dasharray: 2 5; opacity: .75; }
.history-notice-dot { fill: #c9a8de; stroke: #5e3f75; stroke-width: 1.2; }
.history-event-label { fill: var(--ink); font: 500 9px var(--mono); }
.history-gap-label { fill: var(--muted); font: 400 8px var(--mono); }
.history-lift-label { font: 500 9px var(--mono); }
.history-lift-unit { font-size: 7px; opacity: .82; }
.timeline-reset-marker { stroke: rgba(22,26,24,.28); stroke-width: 1; stroke-dasharray: 3 4; }
.timeline-reset-dot { fill: var(--orange); stroke: var(--ink); stroke-width: 1; }
.timeline-notice-marker { stroke: #80619a; stroke-width: 1.1; stroke-dasharray: 2 5; opacity: .78; }
.timeline-notice-dot { fill: #c9a8de; stroke: #5e3f75; stroke-width: 1.2; }
.timeline-marker-label { font: 500 8px var(--mono); }

.distribution-section { background: #e8e6dd; }
.distribution-layout { display: grid; grid-template-columns: minmax(0, 3fr) minmax(260px, 1fr); gap: 18px; }
.annotation-column { border-top: 1px solid var(--ink); }
.annotation-column article { position: relative; padding: 26px 8px 26px 46px; border-bottom: 1px solid var(--ink); }
.annotation-number { position: absolute; top: 29px; left: 0; font: 500 13px/1 var(--mono); color: var(--orange-deep); }
.annotation-column h3 { margin: 0 0 9px; font-size: 15px; }
.annotation-column p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.75; }

.personal-section { background: var(--paper-deep); }
.personal-workbench { display: grid; grid-template-columns: minmax(320px, 360px) minmax(0, 1fr); gap: 18px; align-items: stretch; }
.personal-sidebar { height: 100%; display: block; }
.personal-sidebar .sidebar-control small { display: block; margin-top: 5px; color: #94978f; font: 400 8px/1.4 var(--mono); }
.personal-sidebar .inline-recommend { display: inline-block; margin-top: 7px; color: var(--lime); }
.personal-curve-note { margin: 9px 0 16px; color: #9ea099; font-size: 9px; line-height: 1.55; }
.personal-sidebar .banked-summary { margin: 7px 0; color: #b5b8b0; font-size: 9px; }
.personal-sidebar .banked-list { margin-top: 7px; }
.personal-sidebar .banked-card { grid-template-columns: 1fr; gap: 7px; padding: 9px; }
.personal-sidebar .banked-card input, .personal-sidebar .banked-card button { width: 100%; }
.personal-sidebar .banked-empty { line-height: 1.5; }
.personal-result-card { margin-top: 14px; padding: 16px; border: 1px solid var(--lime); color: var(--ink); background: var(--lime); display: flex; flex-direction: column; justify-content: flex-end; }
.personal-result-card .panel-kicker { color: var(--ink); }
.personal-result-card .personal-lift-pair { margin-top: 2px; }
.personal-result-card .personal-lift-pair strong { font: 500 38px/1 var(--mono); letter-spacing: -.07em; }
.personal-result-card .personal-lift-pair small { font-size: 10px; }
.personal-result-card > span { margin-top: 5px; font-size: 10px; line-height: 1.5; }
.personal-result-card p:last-child { margin: 14px 0 0; padding-top: 11px; border-top: 1px solid var(--ink); font: 500 9px/1.6 var(--mono); }
.personal-charts { min-width: 0; height: 100%; display: grid; grid-template-rows: minmax(288px, .75fr) minmax(408px, 1.25fr); gap: 18px; }
.personal-charts .chart-panel { min-height: 0; display: flex; flex-direction: column; }
.personal-charts .chart-wrap { flex: 1; }
.personal-charts .panel-heading { min-height: 78px; padding-top: 15px; padding-bottom: 15px; }
.personal-curve-panel .chart-wrap, .personal-curve-panel .chart-wrap svg { min-height: 210px; height: 210px; }
.personal-chart-panel .chart-wrap, .personal-chart-panel .chart-wrap svg { min-height: 330px; height: 330px; }
.personal-charts .personal-curve-panel .chart-wrap, .personal-charts .personal-chart-panel .chart-wrap { height: auto; }
.personal-charts .personal-curve-panel .chart-wrap svg, .personal-charts .personal-chart-panel .chart-wrap svg { height: 100%; }
.panel-inline-note { margin: 0; color: var(--muted); font: 400 9px/1.5 var(--mono); text-align: right; }
.personal-chart-panel { background: rgba(255,253,248,.55); }
.personal-exhaustion-marker { stroke: var(--orange-deep); stroke-width: 1; stroke-dasharray: 3 4; }
.personal-exhaustion-label { fill: var(--orange-deep); font: 500 9px var(--mono); }
.personal-issued-marker { stroke: var(--orange-deep); stroke-width: 1.1; stroke-dasharray: 2 5; opacity: .75; }
.personal-issued-dot { fill: var(--orange); stroke: var(--ink); stroke-width: 1.1; }
.personal-api-marker { stroke: var(--orange-deep); stroke-width: 1.1; stroke-dasharray: 3 4; opacity: .78; }
.personal-api-dot { fill: var(--orange); stroke: var(--ink); stroke-width: 1.1; }
.personal-redemption-marker { stroke: #7b4f76; stroke-width: 1.3; stroke-dasharray: 3 4; }
.personal-redemption-dot { fill: #c79abb; stroke: #5d3c59; stroke-width: 1; }
.personal-natural-marker { stroke: rgba(22,123,120,.45); stroke-width: 1; stroke-dasharray: 2 5; }
.personal-natural-dot { fill: var(--teal); stroke: #0d5f5c; stroke-width: 1; }
.personal-selected-natural-marker { stroke: rgba(156,79,134,.55); stroke-width: 1; stroke-dasharray: 5 4; }
.personal-selected-natural-dot { fill: #f4e4ee; stroke: #69405f; stroke-width: 1.2; }
.personal-cycle-reset-label { fill: var(--muted); font: 500 8px var(--mono); }
.personal-marker-label { font: 500 8px var(--mono); }
.personal-api-label, .personal-issued-label { fill: var(--orange-deep); }
.personal-natural-label { fill: #0d6966; }
.personal-redemption-label { fill: #7b4f76; }
.personal-timeline-tools { max-width: 560px; }
.personal-timeline-tools small { color: var(--muted); font: 400 8px/1.4 var(--mono); text-align: right; }

.source-link { padding-bottom: 4px; border-bottom: 1px solid var(--ink); text-decoration: none; font: 500 11px/1.4 var(--mono); }
.source-link:hover { color: var(--orange-deep); border-color: var(--orange-deep); }
.timeline-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: stretch; border: 1px solid var(--rule); }
.timeline-summary div { min-width: 0; min-height: 96px; padding: 14px 16px; border-right: 1px solid var(--rule); display: flex; flex-direction: column; justify-content: space-between; }
.timeline-summary div:last-child { border-right: 0; }
.timeline-summary span { min-height: 43px; display: flex; align-items: flex-end; overflow: hidden; font: 500 clamp(24px, 3vw, 43px)/1 var(--mono); letter-spacing: -.05em; white-space: nowrap; }
.timeline-summary small { min-height: 15px; display: flex; align-items: flex-end; margin-top: 7px; color: var(--muted); font-size: 10px; }
.timeline-method { margin: 0; padding-top: 22px; border-top: 1px solid var(--rule); color: var(--muted); font-size: 11px; line-height: 1.8; }
code { padding: 2px 4px; background: var(--paper-deep); font: 400 10px/1.4 var(--mono); }

.method-section { background: var(--lime); }
.method-grid { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--ink); border-left: 1px solid var(--ink); }
.method-grid article { min-height: 190px; padding: 22px; border-right: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
.method-grid h3 { margin: 0 0 18px; font: 500 13px/1.3 var(--mono); }
.method-grid p { margin: 0; font-size: 12px; line-height: 1.75; }
.method-cta { display: inline-block; margin-top: 24px; padding-bottom: 4px; border-bottom: 1px solid var(--ink); text-decoration: none; font: 500 11px/1.4 var(--mono); }

.methodology-page .masthead { position: static; }
.methodology-page main > section { padding: 86px max(5vw, 28px); }
.method-hero { min-height: 560px; display: flex; flex-direction: column; justify-content: flex-end; background: var(--paper); }
.method-hero h1 { max-width: 980px; font-size: clamp(64px, 8vw, 126px); }
.method-hero .dek { max-width: 850px; }
.contract-grid { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--ink); border-left: 1px solid var(--ink); }
.contract-grid article { min-height: 330px; padding: 24px; border-right: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
.contract-grid article > span { color: var(--orange-deep); font: 500 10px/1.4 var(--mono); }
.contract-grid h3 { margin: 44px 0 16px; font-size: 22px; letter-spacing: -.03em; }
.contract-grid p, .contract-grid li { color: var(--muted); font-size: 12px; line-height: 1.75; }
.contract-grid ul { margin: 22px 0 0; padding-left: 18px; }
.formula-layout { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.formula-card { min-height: 280px; padding: 26px; border: 1px solid var(--ink); display: flex; flex-direction: column; justify-content: flex-end; background: var(--white); }
.formula-card.dark { color: var(--paper); background: var(--ink); }
.formula-card > code { display: block; margin: 18px 0 24px; padding: 0; background: transparent; font-size: clamp(14px, 1.7vw, 23px); white-space: normal; }
.formula-card p:last-child { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.75; }
.formula-card.dark p:last-child { color: #aeb0a9; }
.method-prose { max-width: 900px; margin: 34px 0 0; font-size: 14px; line-height: 1.9; }
.personal-steps { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--ink); border-left: 1px solid var(--ink); }
.personal-steps article { min-height: 230px; padding: 22px; border-right: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
.personal-steps article > span { color: var(--orange-deep); font: 500 12px/1 var(--mono); }
.personal-steps h3 { margin: 44px 0 14px; font-size: 17px; }
.personal-steps p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.75; }
.evidence-table { border-top: 1px solid var(--ink); border-left: 1px solid var(--ink); }
.evidence-row { display: grid; grid-template-columns: .7fr .7fr 2fr; }
.evidence-row > * { min-height: 58px; padding: 14px; border-right: 1px solid var(--ink); border-bottom: 1px solid var(--ink); font-size: 11px; line-height: 1.6; }
.evidence-row.header { color: var(--paper); background: var(--ink); font: 500 10px/1.4 var(--mono); }
.method-limitations { background: var(--lime); }

footer { min-height: 84px; padding: 28px 4vw; display: flex; align-items: center; justify-content: space-between; gap: 20px; color: #aeb0a9; background: var(--ink); font: 400 10px/1.5 var(--mono); }
footer a { color: inherit; text-underline-offset: 3px; }

.chart-grid { stroke: var(--rule); stroke-width: 1; }
.chart-axis { stroke: var(--ink); stroke-width: 1; }
.chart-label { fill: var(--muted); font: 9px var(--mono); }
.chart-path { fill: none; stroke-linejoin: round; stroke-linecap: round; }
.reset-marker { stroke: rgba(22,26,24,.18); stroke-width: 1; stroke-dasharray: 3 4; }
.reset-label { fill: var(--muted); font: 8px var(--mono); }

@media (max-width: 1050px) {
  .hero { grid-template-columns: 1fr; gap: 64px; }
  .hero-result { min-height: 270px; max-width: 520px; }
  .control-grid { grid-template-columns: repeat(2, 1fr); }
  .banked-planner { grid-template-columns: 1fr; gap: 20px; }
  .module-workbench, .result-layout, .distribution-layout { grid-template-columns: 1fr; }
  .module-sidebar { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 16px; }
  .foundation-sidebar { display: block; }
  .sidebar-heading, .sidebar-readout { grid-column: 1 / -1; }
  .sidebar-group-label { grid-column: 1 / -1; }
  .scorecard { display: grid; grid-template-columns: repeat(3, 1fr); }
  .scorecard > .panel-kicker { grid-column: 1 / -1; }
  .scenario-card { border-top: 1px solid var(--rule); border-right: 1px solid var(--rule); }
  .scorecard-note { grid-column: 1 / -1; }
  .annotation-column { display: grid; grid-template-columns: repeat(3, 1fr); border-left: 1px solid var(--ink); }
  .annotation-column article { border-right: 1px solid var(--ink); padding-left: 50px; }
  .annotation-number { left: 18px; }
  .method-grid { grid-template-columns: repeat(2, 1fr); }
  .personal-workbench { grid-template-columns: 1fr; }
  .personal-sidebar { display: block; }
  .historical-summary-block { grid-template-columns: minmax(0, 1fr) 260px; }
  .historical-controls { grid-template-columns: repeat(2, 1fr); }
  .contract-grid { grid-template-columns: 1fr; }
  .formula-layout { grid-template-columns: 1fr; }
  .personal-steps { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 680px) {
  .masthead { height: 62px; padding: 0 20px; }
  .masthead-right { gap: 10px; }
  .top-nav { display: none; }
  .source-status { max-width: 170px; justify-content: flex-end; text-align: right; font-size: 9px; }
  main > section { padding: 64px 20px; }
  .hero { min-height: auto; padding-top: 70px; background: var(--paper); }
  h1 { font-size: clamp(48px, 15vw, 72px); }
  .dek { margin-top: 28px; font-size: 15px; }
  .hero-result { padding: 22px; min-height: 250px; box-shadow: 8px 8px 0 var(--orange); }
  .metric-value { font-size: 76px; }
  .hero-lift-pair { gap: 12px; font-size: 44px; }
  .hero-lift-pair > span + span { padding-left: 12px; }
  .section-heading { display: block; margin-bottom: 28px; }
  .section-note, .source-link { display: inline-block; margin-top: 16px; text-align: left; }
  .section-heading h2 { font-size: 33px; }
  .control-grid { grid-template-columns: 1fr; }
  .module-sidebar { display: block; }
  .foundation-canvas { grid-template-columns: 1fr; }
  .control { min-height: 145px; }
  .panel-heading { align-items: flex-start; flex-direction: column; }
  .panel-tools { align-items: flex-start; }
  .legend { justify-content: flex-start; }
  .chart-wrap, .chart-wrap svg { min-height: 340px; height: 340px; }
  .scorecard { grid-template-columns: 1fr; }
  .scenario-card { border-right: 0; }
  .annotation-column { grid-template-columns: 1fr; }
  .timeline-summary { grid-template-columns: 1fr; }
  .timeline-summary div { border-right: 0; border-bottom: 1px solid var(--rule); }
  .timeline-summary div:last-child { border-bottom: 0; }
  .method-grid { grid-template-columns: 1fr; }
  .banked-card { grid-template-columns: 1fr; }
  .historical-controls { grid-template-columns: 1fr; }
  .historical-chart-panel .chart-wrap,
  .historical-chart-panel .chart-wrap svg { min-height: 370px; height: 370px; }
  .historical-chart-panel > .panel-heading > div:first-child { width: 100%; }
  .historical-chart-panel > .panel-heading h3 { white-space: normal; }
  .historical-rate-heading { align-items: flex-start; flex-direction: column; gap: 4px; }
  .historical-chart-panel .historical-rate-wrap,
  .historical-chart-panel .historical-rate-wrap svg { min-height: 145px; height: 145px; }
  .historical-summary-block, .synthetic-results-bar { grid-template-columns: 1fr; }
  .historical-summary-block { grid-template-rows: auto; }
  .historical-summary-block .timeline-summary,
  .historical-summary-block .timeline-method,
  .historical-lift-card { grid-column: auto; grid-row: auto; }
  .historical-summary-block .timeline-method { padding: 12px 14px; }
  .historical-lift-card { min-height: 122px; border-top: 1px solid var(--ink); border-left: 0; }
  .synthetic-results-bar #scenario-cards { grid-template-columns: 1fr; }
  .synthetic-results-bar .scenario-card { border-right: 0; border-bottom: 1px solid var(--rule); }
  .synthetic-results-bar .scorecard-note { border-top: 1px solid var(--ink); border-left: 0; }
  .personal-curve-panel .chart-wrap, .personal-curve-panel .chart-wrap svg { min-height: 200px; height: 200px; }
  .personal-chart-panel .chart-wrap, .personal-chart-panel .chart-wrap svg { min-height: 300px; height: 300px; }
  .methodology-page main > section { padding: 64px 20px; }
  .method-hero { min-height: 480px; }
  .method-hero h1 { font-size: 58px; }
  .personal-steps { grid-template-columns: 1fr; }
  .evidence-row { grid-template-columns: 1fr; }
  .evidence-row.header { display: none; }
  footer { align-items: flex-start; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
