/* =====================================================================
   ROUND 7 · Two-Layer Credit-Desert Risk
   v2 — dark, opinionated, tool-first.
   Color: deep ink-navy + saturated mustard / chartreuse / coral.
   Type:  Bricolage Grotesque (display) · Manrope (body) · Recursive (data)
   ===================================================================== */

/* --------- Tokens --------- */
:root {
  /* Surfaces */
  --bg:        oklch(0.15 0.020 240);
  --bg-deep:   oklch(0.12 0.020 240);
  --s1:        oklch(0.20 0.020 240);
  --s2:        oklch(0.25 0.022 240);
  --rule:      oklch(0.32 0.022 240);
  --rule-soft: oklch(0.28 0.020 240);

  /* Text */
  --tx:        oklch(0.96 0.012 80);     /* warm off-white */
  --tx-2:      oklch(0.88 0.012 80);
  --tx-3:      oklch(0.78 0.010 80);
  --tx-4:      oklch(0.66 0.010 80);

  /* Accents */
  --m1:        oklch(0.80 0.165 85);     /* mustard */
  --m1-deep:   oklch(0.60 0.150 85);
  --m1-glow:   oklch(0.80 0.165 85 / 0.18);
  --m2:        oklch(0.85 0.190 130);    /* chartreuse */
  --m2-deep:   oklch(0.65 0.180 130);
  --m2-glow:   oklch(0.85 0.190 130 / 0.18);
  --coral:     oklch(0.68 0.20 25);      /* live state */
  --coral-soft:oklch(0.68 0.20 25 / 0.45);

  /* Radius */
  --r-1: 2px;
  --r-2: 4px;

  /* Spacing — 4-step modular */
  --s-1: 4px;  --s-2: 8px;  --s-3: 12px; --s-4: 16px;
  --s-5: 24px; --s-6: 32px; --s-7: 48px; --s-8: 64px; --s-9: 96px;
  --guide-tab-h: 56px;

  /* Type scale (rem) */
  --t-xs: 0.75rem;  --t-sm: 0.875rem;
  --t-md: 1rem;     --t-lg: 1.125rem;
  --t-xl: 1.5rem;   --t-2xl: 2rem;
  --t-3xl: 3rem;    --t-4xl: 4rem;

  /* Active model — mutates with toggle */
  --acc:       var(--m1);
  --acc-deep:  var(--m1-deep);
  --acc-glow:  var(--m1-glow);

  /* Fonts */
  --ff-disp:   "Bricolage Grotesque", system-ui, sans-serif;
  --ff-body:   "Manrope", system-ui, sans-serif;
  --ff-mono:   "Recursive", "SF Mono", ui-monospace, monospace;
  --rec-casual: "MONO" 1, "CASL" 0.85, "slnt" 0;
}

body[data-model="m2"] {
  --acc: var(--m2);
  --acc-deep: var(--m2-deep);
  --acc-glow: var(--m2-glow);
}

/* --------- Base --------- */
*,*::before,*::after { box-sizing: border-box; }
html, body { margin:0; padding:0; }
html { background: var(--bg); color-scheme: dark; }
body {
  background: var(--bg);
  color: var(--tx);
  font: 400 var(--t-md)/1.55 var(--ff-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01", "kern";
  overflow-x: hidden;
}

::selection { background: var(--acc); color: var(--bg); }

button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

a { color: var(--acc); text-decoration: none; }
a:focus-visible { outline: 2px solid var(--coral); outline-offset: 2px; }

/* --------- Type primitives --------- */
.kicker {
  font-family: var(--ff-body);
  font-weight: 500;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--tx-3);
}
.mono {
  font-family: var(--ff-mono);
  font-weight: 400;
  font-feature-settings: "tnum" 1;
  font-variation-settings: "MONO" 1, "CASL" 0.85, "slnt" 0;
  letter-spacing: -0.005em;
}
.num {
  font-family: var(--ff-disp);
  font-weight: 600;
  font-feature-settings: "tnum" 1, "ss01" 1;
}

/* --------- Layout --------- */
.stage { display:block; }

/* =====================================================================
   HERO — full-bleed map with floating overlays + right rail
   ===================================================================== */
.hero {
  position: relative;
  width: 100vw;
  height: 100vh;
  min-height: 720px;
  overflow: hidden;
  background: var(--bg);
  border-bottom: 1px solid var(--rule);
}

.map {
  position: absolute;
  inset: 0;
  background: var(--bg-deep);
}

#map-loading {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  background: oklch(0.15 0.020 240 / 0.78);
  color: var(--tx-3);
  font-family: var(--ff-mono);
  font-size: 0.8125rem;
  letter-spacing: 0.06em;
  pointer-events: none;
}

/* MapLibre overrides — kill default chrome */
.maplibregl-ctrl-attrib {
  background: oklch(0.15 0.020 240 / 0.7) !important;
  color: var(--tx-4) !important;
  font-family: var(--ff-mono) !important;
  font-size: 9px !important;
  border: 0 !important;
}
.maplibregl-ctrl-attrib a { color: var(--tx-3) !important; }
.maplibregl-ctrl-bottom-right { right: auto !important; left: 0 !important; }
.maplibregl-canvas:focus { outline: none; }

/* --------- Floating overlays --------- */
.ovl {
  position: absolute;
  z-index: 5;
  pointer-events: none;
}
.ovl > * { pointer-events: auto; }

/* Title overlay */
.ovl--title {
  top: var(--s-6);
  left: var(--s-6);
  max-width: min(54ch, 50vw);
  transform: translate3d(0, 0, 0);
  transition: transform 0.35s cubic-bezier(0.215, 0.61, 0.355, 1);
}
body.is-drawer-open .ovl--title {
  transform: translate3d(480px, 0, 0);
}
.ovl--title .kicker { color: var(--acc); margin-bottom: var(--s-3); display:block; }

.title {
  font-family: var(--ff-disp);
  font-weight: 700;
  font-size: clamp(2.25rem, 4.2vw, 4rem);
  line-height: 0.95;
  letter-spacing: -0.025em;
  margin: 0 0 var(--s-3);
  color: var(--tx);
  text-wrap: balance;
}
.title__line { display: block; }
.title__line:nth-child(2) { color: var(--acc); }
.title__sub {
  font-family: var(--ff-body);
  font-weight: 400;
  font-size: var(--t-md);
  line-height: 1.45;
  color: var(--tx-2);
  max-width: 46ch;
  margin: 0;
}
.title__sub .num { color: var(--tx); font-weight: 600; }

/* Toggles container — model + horizon + geography stacked */
.ovl--toggles {
  top: var(--s-6);
  right: calc(360px + var(--s-6));
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-end;
}
.toggrp {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 10px;
}
.toggrp__lbl {
  text-align: right;
  color: var(--tx-4);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.14em;
}
.toggrp__pills {
  display: flex;
  gap: 0;
  padding: 4px;
  background: var(--bg-deep); /* glass removed: use opaque surface */
  border: 1px solid var(--rule);
  border-radius: var(--r-2);
}

.model {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px 10px 14px;
  border-radius: var(--r-1);
  color: var(--tx-3);
  transition: color .25s ease, background .25s ease;
  position: relative;
}
.model:hover { color: var(--tx-2); }
.model__dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.5;
  transition: opacity .25s ease, transform .25s ease;
}
.model__label { display: flex; flex-direction: column; align-items: flex-start; line-height: 1; }
.model__num {
  font-family: var(--ff-disp); font-weight: 700; font-size: 0.75rem;
  letter-spacing: 0.06em; opacity: 0.65;
}
.model__name {
  font-family: var(--ff-disp); font-weight: 600; font-size: 1rem;
  letter-spacing: -0.01em;
  margin-top: 3px;
}

.model[data-model="m1"].is-active { color: var(--m1); background: oklch(0.80 0.165 85 / 0.10); }
.model[data-model="m2"].is-active { color: var(--m2); background: oklch(0.85 0.190 130 / 0.10); }
.model.is-active .model__dot { opacity: 1; transform: scale(1.15); }
.model.is-active .model__num { opacity: 1; }

/* Horizon + geography pills */
.horizon,
.geo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px 8px 12px;
  border-radius: var(--r-1);
  color: var(--tx-3);
  transition: color .25s ease, background .25s ease;
  position: relative;
}
.horizon:hover,
.geo:hover { color: var(--tx-2); }
.horizon__num,
.geo__num {
  font-family: var(--ff-mono);
  font-variation-settings: "MONO" 1, "CASL" 0.85;
  font-weight: 600;
  font-size: 0.6875rem;
  letter-spacing: 0.04em;
  padding: 2px 6px;
  border: 1px solid currentColor;
  border-radius: var(--r-1);
  opacity: 0.65;
  line-height: 1;
}
.horizon__name,
.geo__name {
  font-family: var(--ff-disp);
  font-weight: 600;
  font-size: 0.875rem;
  letter-spacing: -0.005em;
}
.horizon.is-active {
  color: var(--coral);
  background: oklch(0.68 0.20 25 / 0.10);
}
.horizon.is-active .horizon__num { opacity: 1; }
.geo.is-active {
  color: var(--tx);
  background: oklch(0.72 0.03 210 / 0.12);
}
.geo.is-active .geo__num { opacity: 1; }

/* Horizon affordance under title */
.ovl--horizonlabel {
  display: inline-block;
  margin-top: 12px;
  font-family: var(--ff-mono);
  font-variation-settings: "MONO" 1, "CASL" 0.85;
  font-size: 0.75rem;
  color: var(--coral);
  letter-spacing: 0.02em;
  padding: 4px 10px;
  border: 1px solid var(--coral-soft);
  border-radius: var(--r-1);
  background: oklch(0.15 0.020 240 / 0.5);
  transition: color .25s ease, border-color .25s ease;
}

/* Metadata strip */
.ovl--bl {
  position: absolute;
  bottom: var(--s-5);
  left: var(--s-6);
  z-index: 5;
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  align-items: flex-start;
  transform: translate3d(0, 0, 0);
  transition: transform 0.35s cubic-bezier(0.215, 0.61, 0.355, 1);
}
body.is-drawer-open .ovl--bl {
  transform: translate3d(480px, 0, 0);
}
.ovl--meta {
  position: static;
  display: flex; gap: var(--s-3); align-items: baseline;
  font-family: var(--ff-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  font-variation-settings: "MONO" 1, "CASL" 0.85;
  color: var(--tx-3);
  background: var(--s1); /* glass removed: use opaque surface */
  border: 1px solid var(--rule);
  border-radius: var(--r-1);
  padding: 8px 14px;
  letter-spacing: 0.02em;
  flex-wrap: wrap;
}
.ovl--reload {
  position: static;
  order: -1;
  pointer-events: auto;
  font-family: var(--ff-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  font-variation-settings: "MONO" 1, "CASL" 0.85;
  color: var(--tx-3);
  background: var(--s1); /* glass removed: use opaque surface */
  border: 1px solid var(--rule);
  border-radius: var(--r-1);
  padding: 8px 14px;
  letter-spacing: 0.02em;
  cursor: pointer;
  white-space: nowrap;
  transition: color 140ms ease, background 140ms ease;
}
.ovl--reload:hover { color: var(--tx); background: oklch(0.20 0.020 240 / 0.9); }
body.is-switching .ovl--toggles .geo { opacity: 0.68; cursor: progress; }
.meta__cell .meta__k { color: var(--tx-4); font-weight: 500; margin-right: 2px; text-transform: uppercase; letter-spacing: 0.08em; }
.meta__cell .num { color: var(--tx-2); font-weight: 600; font-family: var(--ff-disp); }
.meta__sep { color: var(--tx-4); }
.meta__d { color: var(--acc); padding: 0 0.2em; }

/* Legend */
.ovl--legend {
  bottom: var(--s-5);
  right: calc(360px + var(--s-6));
  width: clamp(160px, 14vw, 200px);
  background: var(--bg-deep); /* glass removed: use opaque surface */
  border: 1px solid var(--rule);
  border-radius: var(--r-1);
  padding: 14px 16px;
}
.legend__head {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 10px;
}
.legend__model {
  font-family: var(--ff-disp); font-weight: 600;
  font-size: 0.875rem; color: var(--acc);
  letter-spacing: -0.005em;
}
.legend__bar {
  height: 10px;
  background: linear-gradient(90deg,
    oklch(0.20 0.020 240) 0%,
    oklch(0.40 0.090 92) 35%,
    oklch(0.62 0.140 88) 65%,
    var(--m1) 100%);
  border: 1px solid var(--rule);
  border-radius: 1px;
}

body.is-guide-collapsed .ovl--bl,
body.is-guide-collapsed .ovl--legend {
  bottom: calc(var(--s-5) + var(--guide-tab-h));
}
body[data-model="m2"] .legend__bar {
  background: linear-gradient(90deg,
    oklch(0.20 0.020 240) 0%,
    oklch(0.42 0.110 138) 35%,
    oklch(0.66 0.165 132) 65%,
    var(--m2) 100%);
}
.legend__ticks {
  display: flex; justify-content: space-between;
  margin-top: 6px;
  font-size: 0.6875rem;
  font-weight: 500;
  color: var(--tx-4);
}
.legend__foot {
  font-family: var(--ff-body);
  font-size: 0.6875rem;
  font-weight: 500;
  color: var(--tx-3);
  margin-top: 8px;
  letter-spacing: 0.01em;
}

/* =====================================================================
   RIGHT RAIL — sidebar overlay
   ===================================================================== */
.rail {
  position: absolute;
  z-index: 6;
  top: 0; right: 0; bottom: 0;
  width: clamp(280px, 28vw, 360px);
  background: var(--bg-deep); /* glass removed: use opaque surface */
  border-left: 1px solid var(--rule);
  padding: var(--s-6) var(--s-5) var(--s-5);
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  gap: var(--s-5);
  scrollbar-width: thin;
  scrollbar-color: var(--rule) transparent;
}
.rail::-webkit-scrollbar { width: 6px; }
.rail::-webkit-scrollbar-thumb { background: var(--rule); border-radius: 0; }
.rail::-webkit-scrollbar-track { background: transparent; }

@media (min-width: 981px) {
  body.is-guide-collapsed .rail {
    bottom: var(--guide-tab-h);
  }
}

.rail__head { display:flex; flex-direction: column; gap: var(--s-2); }
.rail__kicker {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: var(--s-3);
}
.rail__kicker .kicker { color: var(--acc); }
.rail__horizon {
  font-family: var(--ff-mono);
  font-variation-settings: "MONO" 1, "CASL" 0.85;
  font-size: 0.6875rem;
  color: var(--coral);
  letter-spacing: 0.04em;
  padding: 2px 7px;
  border: 1px solid var(--coral-soft);
  border-radius: var(--r-1);
  line-height: 1.4;
}
.rail__horizon-desc {
  font-family: var(--ff-body);
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.55;
  color: var(--tx-3);
  margin: var(--s-2) 0 0;
  padding: var(--s-2) var(--s-3);
  background: oklch(0.17 0.020 240 / 0.6);
  border-radius: var(--r-2);
}

.rail__model { display: flex; align-items: baseline; gap: 12px; }
.rail__model-tag {
  font-family: var(--ff-disp);
  font-weight: 700;
  font-size: 0.8125rem;
  letter-spacing: 0.08em;
  color: var(--bg);
  background: var(--acc);
  padding: 3px 8px 4px;
  border-radius: var(--r-1);
  line-height: 1;
}
.rail__model-name {
  font-family: var(--ff-disp);
  font-weight: 700;
  font-size: 1.875rem;
  letter-spacing: -0.02em;
  line-height: 1;
  margin: 0;
  color: var(--tx);
}
.rail__model-desc {
  font-family: var(--ff-body);
  font-size: 0.8125rem;
  line-height: 1.55;
  color: var(--tx-2);
  margin: 0;
}

.rail__bignums {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border-top: 1px solid var(--rule);
}
.bignum {
  padding: var(--s-4) 0 var(--s-2);
  border-right: 1px solid var(--rule);
}
.bignum:last-child { border-right: 0; }
.bignum--small { grid-column: 1 / -1; padding-top: var(--s-3); border-top: 1px solid var(--rule); border-right: 0; }
.bignum__v {
  font-family: var(--ff-disp);
  font-weight: 600;
  font-feature-settings: "tnum" 1;
  font-size: clamp(2rem, 5vw, 2.75rem);
  letter-spacing: -0.025em;
  line-height: 1;
  color: var(--acc);
  margin-bottom: 6px;
  transition: color 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}
.bignum--small .bignum__v {
  font-size: 1.375rem;
  color: var(--tx-2);
}
.bignum__l {
  font-family: var(--ff-body);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--tx-3);
  display: flex; flex-direction: column; gap: 2px;
}
.bignum__sub {
  font-size: 0.75rem;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0.02em;
  color: var(--tx-2);
}

.rule { height: 1px; background: var(--rule); width: 100%; }

.data-missing {
  font-family: var(--ff-mono);
  font-size: 0.6875rem;
  color: var(--coral);
  opacity: 0.7;
  margin: var(--s-1) 0;
  letter-spacing: 0.04em;
}

.rail__sect { display: block; margin-bottom: var(--s-3); }
.rail__sect--mid { margin-top: var(--s-5); }

/* Top states list */
.topstates {
  list-style: none;
  margin: 0; padding: 0;
  display: flex; flex-direction: column;
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
}
.topstate {
  display: grid;
  grid-template-columns: 18px 1fr auto;
  align-items: center;
  gap: 10px;
  background: oklch(0.17 0.020 240);
  padding: 9px 10px;
  font-size: 0.8125rem;
  cursor: pointer;
  transition: background .2s ease, color .2s ease;
  position: relative;
}
.topstate:hover { background: var(--s2); color: var(--coral); }
.topstate__rk {
  font-family: var(--ff-mono); font-size: 0.625rem;
  color: var(--tx-4);
  font-variation-settings: "MONO" 1, "CASL" 0.85;
}
.topstate__nm {
  font-family: var(--ff-disp); font-weight: 600;
  font-size: 0.875rem;
  color: var(--tx);
  letter-spacing: -0.005em;
}
.topstate__v {
  font-family: var(--ff-mono);
  font-feature-settings: "tnum" 1;
  font-size: 0.75rem;
  color: var(--acc);
  font-variation-settings: "MONO" 1, "CASL" 0.85;
}

/* Sliders */
.rail__hint {
  font-family: var(--ff-body);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--tx-3);
  margin: 0 0 var(--s-4);
  line-height: 1.5;
}

.slider {
  margin-bottom: var(--s-5);
}
.slider__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 2px 10px;
  margin-bottom: 6px;
}
.slider__lbl {
  font-family: var(--ff-disp);
  font-weight: 600;
  font-size: 0.875rem;
  letter-spacing: -0.005em;
  color: var(--tx);
  flex: 0 0 auto;
}
.slider__val {
  font-family: var(--ff-body);
  font-feature-settings: "tnum" 1;
  font-weight: 400;
  font-size: 0.75rem;
  line-height: 1.4;
  color: var(--tx-3);
  text-align: right;
  flex: 1 1 140px;
  min-width: 0;
}
.slider__val.is-shifted { color: var(--coral); font-weight: 500; }

input[type="range"].slider__rng {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 44px;
  min-height: 44px;
  background: transparent;
  cursor: pointer;
  margin: 0;
}
input[type="range"].slider__rng::-webkit-slider-runnable-track {
  height: 2px;
  background: var(--rule);
  border-radius: 0;
}
input[type="range"].slider__rng::-moz-range-track {
  height: 2px;
  background: var(--rule);
  border-radius: 0;
}
input[type="range"].slider__rng::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px; height: 14px;
  background: var(--tx);
  border-radius: 50%;
  margin-top: -6px;
  border: 0;
  box-shadow: 0 0 0 0 var(--coral-soft);
  transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
input[type="range"].slider__rng::-moz-range-thumb {
  width: 14px; height: 14px;
  background: var(--tx);
  border-radius: 50%;
  border: 0;
  transition: background 0.15s ease;
}
input[type="range"].slider__rng:hover::-webkit-slider-thumb,
input[type="range"].slider__rng:active::-webkit-slider-thumb {
  background: var(--coral);
  box-shadow: 0 0 0 6px var(--coral-soft);
  transform: scale(1.1);
}
input[type="range"].slider__rng:focus { outline: none; }
input[type="range"].slider__rng:focus-visible::-webkit-slider-thumb {
  background: var(--coral);
  box-shadow: 0 0 0 4px var(--coral-soft);
}

.slider__foot {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-top: 5px;
  font-size: 0.6875rem;
  font-weight: 500;
  color: var(--tx-4);
}
.slider__abl {
  font-family: var(--ff-body);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--tx-4);
  letter-spacing: 0.005em;
}
.slider__abl em {
  font-style: normal;
  font-family: var(--ff-mono);
  color: var(--tx-3);
  font-variation-settings: "MONO" 1, "CASL" 0.85;
}
.slider__abl.is-decoy em { color: var(--tx-4); }
.slider__abl.is-real em { color: var(--coral); }
.slider__abl.is-pending em { color: var(--tx-4); font-style: italic; }
.slider__abl.is-pending { color: var(--tx-4); }

.reset {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--ff-body);
  font-weight: 500;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--tx-3);
  padding: 9px 0 0;
  border-top: 1px solid var(--rule-soft);
  width: 100%;
  text-align: left;
  transition: color .2s ease;
}
.reset:hover { color: var(--coral); }
.reset::before {
  content: "↻";
  font-family: var(--ff-mono);
  font-size: 0.875rem;
  letter-spacing: 0;
}

/* Counters (scenario mode) */
.counters {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--rule);
  background: var(--rule);
  gap: 1px;
}
.counter {
  background: oklch(0.17 0.020 240);
  padding: 14px;
}
.counter__v {
  font-family: var(--ff-disp);
  font-weight: 600;
  font-feature-settings: "tnum" 1;
  font-size: 1.875rem;
  line-height: 1;
  letter-spacing: -0.02em;
}
.counter:nth-child(1) .counter__v { color: var(--coral); }
.counter:nth-child(2) .counter__v { color: var(--tx-2); }
.counter__l {
  font-family: var(--ff-body);
  font-size: 0.6875rem;
  color: var(--tx-3);
  margin-top: 6px;
  line-height: 1.4;
}
.counter__l em { font-style: normal; color: var(--tx); }
.net {
  font-family: var(--ff-mono);
  font-variation-settings: "MONO" 1, "CASL" 0.85;
  font-size: 0.75rem;
  color: var(--tx-3);
  margin-top: 8px;
  letter-spacing: 0.04em;
}

/* =====================================================================
   USE GUIDE — between map and methodology
   ===================================================================== */
.guide {
  background: var(--bg);
  border-bottom: 1px solid var(--rule);
  padding: var(--s-7) max(var(--s-7), 6vw) var(--s-7);
}
.guide__head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: var(--s-5); flex-wrap: wrap;
  padding-bottom: var(--s-5);
  margin-bottom: var(--s-5);
  border-bottom: 1px solid var(--rule);
}
.guide__head .kicker { color: var(--coral); }
.guide__title {
  font-family: var(--ff-disp);
  font-weight: 700;
  font-size: clamp(1.5rem, 2.6vw, 2.25rem);
  letter-spacing: -0.025em;
  line-height: 1.05;
  color: var(--tx);
  margin: var(--s-2) 0 0;
  max-width: 32ch;
  text-wrap: balance;
}
.guide__grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0;
}
.guide__card {
  padding: var(--s-3) var(--s-4) var(--s-3) 0;
  margin-right: var(--s-4);
  border-right: 1px solid var(--rule-soft);
  display: flex; flex-direction: row; align-items: center; gap: var(--s-3);
  cursor: pointer;
  border-radius: var(--r-2);
  transition: background 140ms ease;
}
.guide__card:hover,
.guide__card:focus-visible { background: oklch(1 0.005 240 / 0.05); outline: none; }
.guide__card:last-child { border-right: 0; margin-right: 0; padding-right: 0; }
.guide__card .accordion__body { /* max-height system handles initial hidden state */ }
.guide__caret {
  margin-left: auto;
  flex-shrink: 0;
  color: var(--tx-2);
  font-size: 1.125rem;
  line-height: 1;
  transition: transform 140ms ease, color 140ms ease;
}
.guide__card:hover .guide__caret,
.guide__card:focus-visible .guide__caret { transform: translateX(3px); color: var(--tx); }
.guide__num {
  font-family: var(--ff-disp);
  font-weight: 700;
  font-size: 0.6875rem;
  letter-spacing: 0.18em;
  color: var(--m2);
  text-transform: uppercase;
  font-feature-settings: "tnum" 1;
}
.guide__card:nth-child(1) .guide__num { color: var(--coral); }
.guide__card:nth-child(2) .guide__num { color: var(--m2); }
.guide__card:nth-child(3) .guide__num { color: var(--coral); }
.guide__card:nth-child(4) .guide__num { color: var(--m1); }
.guide__card:nth-child(5) .guide__num { color: var(--m2); }
.guide__h {
  font-family: var(--ff-disp);
  font-weight: 700;
  font-size: 0.9375rem;
  letter-spacing: -0.005em;
  line-height: 1.15;
  color: var(--tx);
  margin: 0;
  text-transform: none;
}
.guide__card p {
  font-family: var(--ff-body);
  font-size: 0.8125rem;
  line-height: 1.55;
  color: var(--tx-2);
  margin: 0;
}
.guide__card p b { color: var(--tx); font-weight: 600; }
.guide__card p .mono { font-family: var(--ff-mono); font-variation-settings: "MONO" 1, "CASL" 0.85; color: var(--tx-2); font-size: 0.75rem; }

@media (max-width: 1180px) {
  .guide__grid { grid-template-columns: repeat(2, 1fr); row-gap: var(--s-5); }
  .guide__card:nth-child(2n) { border-right: 0; margin-right: 0; padding-right: 0; }
}
@media (max-width: 880px) {
  .rail {
    width: clamp(260px, 26vw, 320px);
    position: relative;
    top: auto; right: auto; bottom: auto;
  }
}

@media (max-width: 640px) {
  .guide__grid { grid-template-columns: 1fr; row-gap: var(--s-4); }
  .guide__card { border-right: 0; margin-right: 0; padding-right: 0; border-bottom: 1px solid var(--rule-soft); padding-bottom: var(--s-4); }
  .guide__card:last-child { border-bottom: 0; padding-bottom: 0; }
}

/* =====================================================================
   GUIDE STRIP — collapsible overlay anchored to bottom of hero
   ===================================================================== */
.ovl--guide {
  left: 0; right: 0; bottom: 0; top: auto;
  max-width: none;
  z-index: 6;
  pointer-events: auto;
  background: var(--bg);
  border-top: 1px solid var(--rule);
  border-bottom: none;
  overflow: hidden;
  transition: max-height 300ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
.ovl--guide.is-expanded {
  max-height: 400px;
  padding: var(--s-4) max(var(--s-6), 4vw) var(--s-5);
}
.ovl--guide.is-collapsed {
  min-height: var(--guide-tab-h);
  padding: 0 max(var(--s-6), 4vw);
  cursor: pointer;
}
.ovl--guide .guide__head {
  align-items: center;
  padding-bottom: var(--s-3);
}
.ovl--guide.is-collapsed .guide__head,
.ovl--guide.is-collapsed .guide__grid { display: none; }
.ovl--guide.is-expanded  .guide__tab  { display: none; }

.guide__tab {
  display: flex;
  align-items: center;
  min-height: var(--guide-tab-h);
}
.guide__tab-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--rule-soft);
  border-radius: 20px;
  padding: 5px 14px;
  font-family: var(--ff-mono);
  font-variation-settings: "MONO" 1, "CASL" 0.85;
  font-size: 0.6875rem;
  letter-spacing: 0.04em;
  color: var(--tx-2);
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease;
}
.ovl--guide.is-collapsed:hover .guide__tab-pill {
  background: oklch(1 0.005 240 / 0.06);
  border-color: var(--tx-2);
  color: var(--tx);
}
.guide__head-meta { display: flex; flex-direction: column; gap: 2px; }
.guide__hint {
  font-family: var(--ff-mono);
  font-variation-settings: "MONO" 1, "CASL" 0.85;
  font-size: 0.6875rem;
  letter-spacing: 0.04em;
  color: var(--tx-2);
  margin: 0;
}
.guide__collapse {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: none;
  border: 1px solid var(--rule-soft);
  border-radius: 20px;
  color: var(--tx-2);
  font-family: var(--ff-mono);
  font-variation-settings: "MONO" 1, "CASL" 0.85;
  font-size: 0.6875rem;
  letter-spacing: 0.04em;
  padding: 5px 14px;
  cursor: pointer;
  flex-shrink: 0;
  white-space: nowrap;
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease;
}
.guide__collapse:hover,
.guide__collapse:focus-visible {
  background: oklch(1 0.005 240 / 0.06);
  border-color: var(--tx-2);
  color: var(--tx);
  outline: none;
}

/* =====================================================================
   SPOTLIGHT TOUR OVERLAY
   ===================================================================== */
.spotlight {
  position: fixed;
  inset: 0;
  z-index: 200;
  pointer-events: auto;
}
.spotlight__ring {
  position: fixed;
  pointer-events: none;
  border-radius: 6px;
  outline: 2px solid var(--coral);
  outline-offset: 7px;
  box-shadow: 0 0 0 9999px oklch(0.05 0.005 240 / 0.72);
  animation: spotlight-pulse 2.4s ease-in-out infinite;
}
@keyframes spotlight-pulse {
  0%, 100% { outline-offset: 7px; }
  50%       { outline-offset: 11px; outline-color: oklch(0.72 0.15 35 / 0.6); }
}
.spotlight__callout {
  position: fixed;
  width: clamp(300px, 90vw, 340px);
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: var(--s-5);
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
  pointer-events: auto;
  box-shadow: 0 20px 60px oklch(0 0 0 / 0.55);
}
.spotlight__kicker {
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--coral);
}
.spotlight__title {
  font-family: var(--ff-disp);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.01em;
  color: var(--tx);
  margin: 0;
  line-height: 1.2;
}
.spotlight__body {
  font-family: var(--ff-body);
  font-size: 0.8125rem;
  line-height: 1.6;
  color: var(--tx-2);
}
.spotlight__body p { margin: 0; }
.spotlight__body b { color: var(--tx); font-weight: 600; }
.spotlight__nav {
  display: flex;
  gap: var(--s-3);
  align-items: center;
  padding-top: var(--s-3);
  border-top: 1px solid var(--rule-soft);
}
.spotlight__prev,
.spotlight__next {
  background: none;
  border: 1px solid var(--rule-soft);
  border-radius: var(--r-2);
  color: var(--tx-2);
  font-family: var(--ff-mono);
  font-variation-settings: "MONO" 1, "CASL" 0.85;
  font-size: 0.6875rem;
  padding: 5px 10px;
  cursor: pointer;
  transition: background 120ms ease, color 120ms ease;
}
.spotlight__prev:hover,
.spotlight__next:hover { background: oklch(1 0.005 240 / 0.06); color: var(--tx); }
.spotlight__close {
  margin-left: auto;
  background: var(--coral);
  border: none;
  border-radius: var(--r-2);
  color: oklch(0.12 0.02 35);
  font-family: var(--ff-mono);
  font-variation-settings: "MONO" 1, "CASL" 0.85;
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 6px 12px;
  cursor: pointer;
  transition: filter 120ms ease;
}
.spotlight__close:hover { filter: brightness(1.12); }

/* =====================================================================
   FOCUS MODE — state-detail panel in right rail
   ===================================================================== */
.focus__head { display: flex; flex-direction: column; gap: var(--s-2); }
.focus__top {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: var(--s-3);
}
.focus__top .kicker { color: var(--coral); }
.focus__name {
  font-family: var(--ff-disp);
  font-weight: 700;
  font-size: 1.875rem;
  letter-spacing: -0.02em;
  line-height: 1;
  margin: 4px 0 6px;
  color: var(--tx);
}
.focus__meta {
  font-family: var(--ff-mono);
  font-variation-settings: "MONO" 1, "CASL" 0.85;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--tx-3);
  letter-spacing: 0.02em;
}
.focus__close {
  font-family: var(--ff-body);
  font-weight: 500;
  font-size: 0.6875rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--tx-3);
  padding: 6px 10px;
  border: 1px solid var(--rule);
  border-radius: var(--r-1);
  transition: color .2s ease, border-color .2s ease, background .2s ease;
  white-space: nowrap;
}
.focus__close:hover { color: var(--coral); border-color: var(--coral-soft); background: oklch(0.68 0.20 25 / 0.08); }

/* 2x2 grid of model × horizon cells */
.focusgrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
}
.focuscell {
  background: oklch(0.17 0.020 240);
  padding: 10px 12px;
  display: flex; flex-direction: column; gap: 6px;
}
.focuscell__head {
  display: flex; align-items: baseline; justify-content: space-between;
  font-family: var(--ff-body);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--tx-3);
}
.focuscell__tag {
  font-family: var(--ff-disp);
  font-weight: 700;
  font-size: 0.625rem;
  letter-spacing: 0.06em;
  padding: 2px 5px;
  border-radius: 1px;
  color: var(--bg);
}
.focuscell__tag--m1 { background: var(--m1); }
.focuscell__tag--m2 { background: var(--m2); }
.focuscell__v {
  font-family: var(--ff-disp);
  font-weight: 600;
  font-feature-settings: "tnum" 1;
  font-size: 1.25rem;
  line-height: 1;
  letter-spacing: -0.015em;
  color: var(--tx);
}
.focuscell__bar {
  position: relative;
  height: 4px;
  background: oklch(0.20 0.020 240);
  margin-top: 2px;
}
.focuscell__bar-fill {
  position: absolute; left: 0; top: 0; bottom: 0;
  background: var(--m1);
  transition: width .5s cubic-bezier(0.25, 1, 0.5, 1);
}
.focuscell--m2 .focuscell__bar-fill { background: var(--m2); }
.focuscell__sub {
  font-family: var(--ff-mono);
  font-variation-settings: "MONO" 1, "CASL" 0.85;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--tx-4);
  letter-spacing: 0.02em;
}

/* Top tracts list */
.toptracts {
  list-style: none;
  margin: 0; padding: 0;
  display: flex; flex-direction: column;
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
}
.toptract {
  background: oklch(0.17 0.020 240);
  padding: 8px 10px;
  display: grid;
  grid-template-columns: 18px 1fr auto;
  gap: 10px;
  align-items: center;
  font-size: 0.75rem;
}
.toptract__rk {
  font-family: var(--ff-mono); font-size: 0.6875rem;
  font-weight: 500;
  color: var(--tx-4);
  font-variation-settings: "MONO" 1, "CASL" 0.85;
}
.toptract__body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.toptract__nm {
  font-family: var(--ff-body);
  font-weight: 500;
  color: var(--tx-2);
  font-size: 0.75rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.toptract__fips {
  font-family: var(--ff-mono);
  font-variation-settings: "MONO" 1, "CASL" 0.85;
  color: var(--tx-4);
  font-size: 0.625rem;
  letter-spacing: 0.02em;
}
.toptract__v {
  font-family: var(--ff-mono);
  font-feature-settings: "tnum" 1;
  font-variation-settings: "MONO" 1, "CASL" 0.85;
  font-size: 0.8125rem;
  color: var(--acc);
  line-height: 1;
}

/* Histogram */
.histo {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 2px;
  align-items: end;
  height: 64px;
  margin-top: 4px;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 2px;
}
.histo__bar {
  background: var(--acc);
  opacity: 0.85;
  min-height: 2px;
  position: relative;
  transition: height .5s cubic-bezier(0.25, 1, 0.5, 1), background .3s ease;
}
.histo__bar:hover { opacity: 1; }
.histo__bar::after {
  content: attr(data-c);
  position: absolute;
  top: -14px; left: 50%;
  transform: translateX(-50%);
  font-family: var(--ff-mono);
  font-variation-settings: "MONO" 1, "CASL" 0.85;
  font-size: 0.5625rem;
  color: var(--tx-3);
  opacity: 0;
  transition: opacity .15s ease;
  white-space: nowrap;
}
.histo__bar:hover::after { opacity: 1; }
.histo__axis {
  display: flex; justify-content: space-between;
  font-family: var(--ff-mono);
  font-variation-settings: "MONO" 1, "CASL" 0.85;
  font-size: 0.5625rem;
  color: var(--tx-4);
  margin-top: 4px;
  letter-spacing: 0.04em;
}

/* Top features list (methodology) */
.topfeats {
  list-style: none;
  margin: 0; padding: 0;
  display: flex; flex-direction: column;
  gap: 0;
  border-top: 1px solid var(--rule);
}
.topfeat {
  display: grid;
  grid-template-columns: 24px 1fr 80px auto;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--rule-soft);
}
.topfeat__rk {
  font-family: var(--ff-mono);
  font-variation-settings: "MONO" 1, "CASL" 0.85;
  font-size: 0.6875rem;
  font-weight: 500;
  color: var(--tx-4);
}
.topfeat__nm {
  font-family: var(--ff-body);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--tx-2);
}
.topfeat__nm .mono {
  font-family: var(--ff-mono);
  font-variation-settings: "MONO" 1, "CASL" 0.85;
  font-size: 0.6875rem;
  color: var(--m2);
  letter-spacing: 0.02em;
  margin-left: 4px;
}
.topfeat__bar {
  height: 5px;
  background: oklch(0.20 0.020 240);
  position: relative;
}
.topfeat__bar-fill {
  position: absolute; left: 0; top: 0; bottom: 0;
  background: var(--m1);
  transition: width .8s cubic-bezier(0.25, 1, 0.5, 1);
}
.topfeat__v {
  font-family: var(--ff-mono);
  font-variation-settings: "MONO" 1, "CASL" 0.85;
  font-feature-settings: "tnum" 1;
  font-size: 0.75rem;
  color: var(--tx-2);
  text-align: right;
}

.meth__resnote {
  font-family: var(--ff-body);
  font-size: 0.8125rem;
  color: var(--tx-3);
  line-height: 1.55;
  padding: var(--s-2) var(--s-3);
  padding-left: var(--s-4);
  background: oklch(0.17 0.020 240 / 0.5);
  margin: var(--s-3) 0 0;
}
.meth__resnote .mono {
  font-family: var(--ff-mono);
  font-variation-settings: "MONO" 1, "CASL" 0.85;
  color: var(--m2);
  font-size: 0.75rem;
}

/* =====================================================================
   METHODOLOGY
   ===================================================================== */
.meth {
  background: var(--bg-deep);
  padding: var(--s-9) max(var(--s-7), 6vw);
  position: relative;
}

.meth__head {
  max-width: 70ch;
  margin: 0 0 var(--s-9);
  padding-left: 0;
}
.meth__head .kicker { color: var(--m1); }
.meth__title {
  font-family: var(--ff-disp);
  font-weight: 700;
  font-size: clamp(2rem, 4vw, 3.5rem);
  line-height: 1.0;
  letter-spacing: -0.025em;
  margin: var(--s-3) 0 var(--s-4);
  color: var(--tx);
  text-wrap: balance;
}
.meth__lede {
  font-family: var(--ff-body);
  font-size: 1.0625rem;
  line-height: 1.55;
  color: var(--tx-2);
  margin: 0;
  max-width: 60ch;
}

/* Methodology horizon switcher — sticky bar above the section list */
.meth__horizonSwitch {
  display: flex;
  align-items: center;
  gap: var(--s-4);
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg-deep);
  border-bottom: 1px solid var(--rule);
  padding: var(--s-3) 0;
  margin: 0 calc(-1 * max(var(--s-7), 6vw)) var(--s-7);
  padding-left: max(var(--s-7), 6vw);
  padding-right: max(var(--s-7), 6vw);
}
.meth__horizonSwitch-lbl {
  color: var(--tx-3);
  flex-shrink: 0;
}
.meth__horizonSwitch-hint {
  font-family: var(--ff-mono);
  font-size: var(--t-xs);
  color: var(--tx-4);
  font-variation-settings: "MONO" 1, "CASL" 0.85;
  margin-left: auto;
}

.meth__sec {
  display: grid;
  grid-template-columns: 64px 1fr 1.05fr;
  gap: var(--s-7);
  padding: var(--s-7) 0;
  border-top: 1px solid var(--rule);
  align-items: start;
}
.meth__sec:last-of-type { border-bottom: 1px solid var(--rule); }

.meth__num {
  font-family: var(--ff-disp);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--m2);
  letter-spacing: -0.005em;
  font-feature-settings: "tnum" 1;
}
.meth__h {
  font-family: var(--ff-disp);
  font-weight: 700;
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  letter-spacing: -0.025em;
  line-height: 1.05;
  margin: 0 0 var(--s-3);
  color: var(--tx);
  text-wrap: balance;
}
.meth__body p {
  font-family: var(--ff-body);
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--tx-2);
  margin: 0 0 var(--s-3);
  max-width: 56ch;
}
.meth__body p:last-child { margin-bottom: 0; }
.meth__body b { color: var(--tx); font-weight: 600; }
.meth__body em { color: var(--m1); font-style: normal; }

.meth__viz {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

/* Methodology — horizon KV */
.hzkv {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-top: 1px solid var(--rule);
}
.hzkv__row {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 12px 0;
  border-bottom: 1px solid var(--rule-soft);
}
.hzkv__row--note .hzkv__k,
.hzkv__row--note .hzkv__v { color: var(--tx-4); }
.hzkv__k {
  font-size: 0.75rem; color: var(--tx-2); letter-spacing: 0.04em;
  font-weight: 500;
}
.hzkv__v {
  font-size: 0.875rem; color: var(--tx);
}

.meth__sec--lead .meth__num { color: var(--coral); }
.meth__inlinenote {
  font-family: var(--ff-mono);
  font-variation-settings: "MONO" 1, "CASL" 0.85;
  font-size: 0.6875rem;
  color: var(--coral);
  letter-spacing: 0.04em;
  margin: var(--s-3) 0 0;
}
.meth__inlinenote span { color: var(--tx-2); }

/* Methodology — table */
.kvtbl {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--ff-body);
  font-size: 0.8125rem;
}
.kvtbl thead th {
  text-align: left;
  font-weight: 500;
  font-size: 0.6875rem;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--tx-3);
  padding: 0 0 12px;
  border-bottom: 1px solid var(--rule);
}
.kvtbl thead th:nth-child(2) { color: var(--m1); }
.kvtbl thead th:nth-child(3) { color: var(--m2); }
.kvtbl tbody td {
  padding: 12px 0;
  border-bottom: 1px solid var(--rule-soft);
  color: var(--tx-2);
}
.kvtbl tbody td:nth-child(1) { color: var(--tx-3); font-size: 0.75rem; letter-spacing: 0.02em; }
.kvtbl tbody td.mono { font-size: 0.9375rem; color: var(--tx); }

.dictLaunch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--s-3);
  margin-top: var(--s-4);
}
.dictLaunch__btn {
  min-height: 76px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--s-2);
  padding: var(--s-3);
  border: 1px solid var(--rule);
  background: oklch(0.18 0.020 240);
  color: var(--tx);
  cursor: pointer;
  text-align: left;
  transition: background 180ms ease, border-color 180ms ease, transform 180ms ease;
}
.dictLaunch__btn--m1 { border-color: color-mix(in oklch, var(--m1) 55%, var(--rule)); }
.dictLaunch__btn--m2 { border-color: color-mix(in oklch, var(--m2) 55%, var(--rule)); }
.dictLaunch__btn:hover,
.dictLaunch__btn:focus-visible {
  background: oklch(0.22 0.022 240);
  outline: none;
  transform: translateY(-1px);
}
.dictLaunch__btn--m1:hover,
.dictLaunch__btn--m1:focus-visible { border-color: var(--m1); }
.dictLaunch__btn--m2:hover,
.dictLaunch__btn--m2:focus-visible { border-color: var(--m2); }
.dictLaunch__eyebrow {
  font-size: 0.6875rem;
  letter-spacing: 0.10em;
  text-transform: uppercase;
}
.dictLaunch__btn--m1 .dictLaunch__eyebrow { color: var(--m1); }
.dictLaunch__btn--m2 .dictLaunch__eyebrow { color: var(--m2); }
.dictLaunch__label {
  font-family: var(--ff-disp);
  font-weight: 650;
  font-size: 1rem;
  line-height: 1.1;
  letter-spacing: -0.005em;
}

body.is-feature-dict-open {
  overflow: hidden;
}

.featureDict {
  position: fixed;
  inset: 0;
  z-index: 500;
  color: var(--tx);
}
.featureDict[hidden] {
  display: none;
}
.featureDict__backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: color-mix(in oklch, var(--bg-deep) 82%, transparent);
  border: 0;
  cursor: pointer;
}
.featureDict__panel {
  position: absolute;
  inset: var(--s-4);
  display: flex;
  flex-direction: column;
  background: oklch(0.16 0.020 240);
  border: 1px solid var(--rule);
  box-shadow: 0 18px 70px color-mix(in oklch, var(--bg-deep) 80%, transparent);
  overflow: hidden;
}
.featureDict__panel:focus {
  outline: none;
}
.featureDict__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--s-5);
  padding: var(--s-5) var(--s-5) var(--s-4);
  border-bottom: 1px solid var(--rule);
}
.featureDict__kicker {
  margin: 0 0 var(--s-2);
  color: var(--m1);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.featureDict[data-model="influenceable"] .featureDict__kicker {
  color: var(--m2);
}
.featureDict__title {
  margin: 0;
  font-family: var(--ff-disp);
  font-weight: 700;
  font-size: clamp(2rem, 5vw, 4.5rem);
  line-height: 0.95;
  letter-spacing: -0.025em;
}
.featureDict__close {
  flex: 0 0 auto;
  padding: 10px 12px;
  border: 1px solid var(--rule);
  background: transparent;
  color: var(--tx-2);
  cursor: pointer;
  font-family: var(--ff-body);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: color 160ms ease, border-color 160ms ease, background 160ms ease;
}
.featureDict__close:hover,
.featureDict__close:focus-visible {
  color: var(--coral);
  border-color: var(--coral);
  background: color-mix(in oklch, var(--coral) 10%, transparent);
  outline: none;
}
.featureDict__tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--s-3);
  padding: var(--s-4) var(--s-5);
  border-bottom: 1px solid var(--rule);
  background: oklch(0.18 0.020 240);
}
.featureDict__groups {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.featureDict__group {
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid var(--rule);
  background: transparent;
  color: var(--tx-3);
  cursor: pointer;
  font-family: var(--ff-mono);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: color 160ms ease, border-color 160ms ease, background 160ms ease;
}
.featureDict__group:hover,
.featureDict__group:focus-visible {
  color: var(--tx);
  border-color: var(--coral);
  outline: none;
}
.featureDict__group[aria-pressed="true"] {
  color: var(--bg-deep);
  border-color: var(--m1);
  background: var(--m1);
}
.featureDict[data-model="influenceable"] .featureDict__group[aria-pressed="true"] {
  border-color: var(--m2);
  background: var(--m2);
}
.featureDict__note {
  margin: 0;
  max-width: 78ch;
  color: var(--tx-2);
  font-family: var(--ff-body);
  font-size: 1rem;
  line-height: 1.6;
}
.featureDict__body {
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--rule) transparent;
}
.featureDict__body::-webkit-scrollbar { width: 6px; height: 6px; }
.featureDict__body::-webkit-scrollbar-thumb { background: var(--rule); }
.featureDict__body::-webkit-scrollbar-track { background: transparent; }
.featureDict__table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}
.featureDict__table th,
.featureDict__table td {
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--rule-soft);
}
.featureDict__table th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 14px var(--s-4);
  background: oklch(0.16 0.020 240);
  color: var(--tx-3);
  font-family: var(--ff-mono);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.10em;
  text-transform: uppercase;
}
.featureDict__table td {
  padding: var(--s-4);
  color: var(--tx-2);
  font-family: var(--ff-body);
  font-size: 1.0625rem;
  line-height: 1.6;
}
.featureDict__table th:nth-child(1),
.featureDict__table td:nth-child(1) {
  width: 30%;
}
.featureDict__table th:nth-child(2),
.featureDict__table td:nth-child(2) {
  width: 28%;
}
.featureDict__table td:nth-child(1) {
  color: var(--tx);
  font-family: var(--ff-mono);
  font-size: 0.9375rem;
  overflow-wrap: anywhere;
}
.featureDict__table td:nth-child(2) {
  color: var(--tx);
  font-weight: 650;
}
.featureDict[data-model="diagnostic"] .featureDict__table td:nth-child(2) {
  color: var(--m1);
}
.featureDict[data-model="influenceable"] .featureDict__table td:nth-child(2) {
  color: var(--m2);
}
.featureDict__catrow td,
.featureDict[data-model="diagnostic"] .featureDict__catrow td:nth-child(2),
.featureDict[data-model="influenceable"] .featureDict__catrow td:nth-child(2) {
  padding: var(--s-4) var(--s-4) var(--s-3);
  background: oklch(0.20 0.020 240);
  color: var(--tx);
  border-bottom: 1px solid var(--rule);
}
.featureDict__catrow span {
  display: inline-block;
  margin-right: var(--s-2);
  font-family: var(--ff-disp);
  font-weight: 700;
  font-size: 1.3125rem;
  letter-spacing: -0.005em;
}
.featureDict__catrow em {
  display: inline-block;
  color: var(--m1);
  font-family: var(--ff-mono);
  font-size: 0.8125rem;
  font-style: normal;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.featureDict[data-model="influenceable"] .featureDict__catrow em {
  color: var(--m2);
}
.featureDict__catrow small {
  display: block;
  max-width: 78ch;
  margin-top: 6px;
  color: var(--tx-2);
  font-family: var(--ff-body);
  font-size: 1rem;
  line-height: 1.5;
}

/* Ablation chart */
.ablchart {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ablrow {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) 1fr 70px;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--rule-soft);
}
.ablrow:last-child { border-bottom: 0; }
.ablrow__lbl {
  font-family: var(--ff-body);
  font-size: 0.8125rem;
  color: var(--tx-2);
  font-weight: 500;
}
.ablrow__bar {
  position: relative;
  height: 10px;
  background: oklch(0.18 0.015 240);
  border-radius: 0;
}
.ablrow__bar::before {
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  width: 1px;
  background: var(--rule);
  left: 50%;
}
.ablrow__bar-fill {
  position: absolute;
  top: 0; bottom: 0;
  background: var(--coral);
  transition: width .8s cubic-bezier(0.25, 1, 0.5, 1);
}
.ablrow__bar-fill.pos { left: 50%; background: var(--m2-deep); }
.ablrow__bar-fill.neg { right: 50%; background: var(--coral); }
.ablrow__v {
  font-family: var(--ff-mono);
  font-variation-settings: "MONO" 1, "CASL" 0.85;
  font-feature-settings: "tnum" 1;
  font-size: 0.8125rem;
  text-align: right;
}
.ablrow__v.neg { color: var(--coral); }
.ablrow__v.pos { color: var(--m2-deep); }

/* Ablation empty / pending state */
.ablempty {
  padding: var(--s-5) 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.ablempty .kicker { color: var(--coral); margin-bottom: var(--s-2); display: block; }
.ablempty p {
  font-family: var(--ff-body);
  font-size: 0.875rem;
  color: var(--tx-3);
  line-height: 1.55;
  margin: 0;
  max-width: 56ch;
}
.ablempty .mono {
  font-family: var(--ff-mono);
  font-variation-settings: "MONO" 1, "CASL" 0.85;
  color: var(--tx-2);
  font-size: 0.8125rem;
}

/* Regime row */
.regimerow {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
}
.regime {
  background: oklch(0.17 0.020 240);
  padding: var(--s-5) var(--s-4);
  display: flex; flex-direction: column; gap: var(--s-3);
}
.regime__head { display: flex; align-items: baseline; justify-content: space-between; }
.regime__lbl {
  font-family: var(--ff-disp);
  font-weight: 700;
  font-size: 0.875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--tx);
}
.regime[data-r="precovid"] .regime__lbl { color: var(--m1); }
.regime[data-r="postcovid"] .regime__lbl { color: var(--coral); }
.regime__yrs {
  font-family: var(--ff-mono);
  font-variation-settings: "MONO" 1, "CASL" 0.85;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--tx-4);
}
.regime__metrics { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-3); }
.regime__m {}
.regime__mv {
  font-family: var(--ff-disp);
  font-weight: 600; font-feature-settings: "tnum" 1;
  font-size: 1.5rem; color: var(--tx);
  letter-spacing: -0.02em; line-height: 1;
}
.regime__ml {
  font-family: var(--ff-body);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--tx-3);
  margin-top: 4px;
}
.regime__top { margin-top: 2px; }
.regime__top-h {
  font-family: var(--ff-body);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--tx-4);
  margin-bottom: 6px;
}
.regime__top ol { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 4px; }
.regime__top li {
  display: grid;
  grid-template-columns: 18px 1fr auto;
  gap: 8px;
  font-family: var(--ff-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  color: var(--tx-3);
  font-variation-settings: "MONO" 1, "CASL" 0.85;
}
.regime__top li b { color: var(--tx-2); font-weight: 400; }
.regime__top li span:first-child { color: var(--tx-4); }

/* Limitations */
.lim { display: flex; flex-direction: column; gap: 0; border-top: 1px solid var(--rule); }
.lim__row {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 12px 0;
  border-bottom: 1px solid var(--rule-soft);
}
.lim__k { font-size: 0.75rem; color: var(--tx-3); letter-spacing: 0.06em; text-transform: uppercase; font-weight: 500; }
.lim__v { font-size: 0.9375rem; color: var(--tx); }

/* Methodology — colophon */
.meth__foot {
  margin-top: var(--s-7);
  padding-top: var(--s-5);
  border-top: 1px solid var(--rule);
  max-width: 70ch;
}
.meth__foot p {
  font-family: var(--ff-body);
  font-size: 0.8125rem;
  color: var(--tx-3);
  line-height: 1.65;
  margin: var(--s-2) 0 0;
}

/* =====================================================================
   TOOLTIP
   ===================================================================== */
.tip {
  position: fixed;
  z-index: 100;
  pointer-events: none;
  min-width: 220px;
  max-width: 280px;
  background: var(--bg-deep); /* glass removed: use opaque surface */
  border: 1px solid var(--coral);
  padding: 12px 14px 10px;
  font-family: var(--ff-body);
  font-size: 0.8125rem;
  border-radius: 0;
}

/* Feature-description tooltip — shown when hovering a SHAP driver row.
   Pinned to the RIGHT of the drawer row (drawer lives on the left edge).
   Plain prose, not a stat readout — so styled wider and less terminal-y. */
.featTip {
  position: fixed;
  z-index: 200;
  pointer-events: none;
  width: 340px;
  max-width: calc(100vw - 24px);
  background: var(--bg-deep); /* glass removed: use opaque surface */
  border: 1px solid var(--rule);
  padding: 16px 18px;
  font-family: var(--ff-body);
  font-size: 0.8125rem;
  line-height: 1.55;
  color: var(--tx-2);
  border-radius: 0;
  transition: opacity 0.15s ease;
}
.featTip__nm {
  font-family: var(--ff-disp);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: -0.01em;
  color: var(--tx);
  line-height: 1.25;
  margin-bottom: 8px;
}
.featTip__rule {
  height: 1px;
  background: var(--rule);
  margin: 0 0 12px 0;
}
.featTip__what,
.featTip__read,
.featTip__impact {
  margin: 0 0 10px 0;
}
.featTip__lbl {
  display: block;
  font-family: var(--ff-body);
  font-size: 0.625rem;
  font-weight: 500;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--coral);
  margin-bottom: 2px;
}
.featTip__key {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--rule-soft);
  font-family: var(--ff-mono);
  font-variation-settings: "MONO" 1, "CASL" 0.85;
  font-size: 0.6875rem;
  color: var(--tx-4);
  letter-spacing: 0.02em;
}
.drawshap {
  cursor: help;
  transition: background-color 0.15s ease;
}
.drawshap:hover,
.drawshap:focus-visible {
  background-color: oklch(0.22 0.020 240);
  outline: none;
}
.tip__head {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 2px;
}
.tip__head .kicker { color: var(--coral); }
.tip__head .mono { font-size: 0.6875rem; color: var(--tx-4); font-variation-settings: "MONO" 1, "CASL" 0.85; }
.tip__statelabel { display: inline-flex; align-items: center; gap: 6px; }
.tip__chip {
  width: 8px; height: 8px;
  border-radius: 1px;
  background: oklch(0.5 0 0);
  border: 1px solid oklch(1 0 0 / 0.15);
  display: inline-block;
}
.tip__county {
  font-family: var(--ff-disp); font-weight: 600;
  font-size: 0.9375rem; color: var(--tx);
  margin-bottom: 10px;
  letter-spacing: -0.005em;
}
.tip__rows { display: flex; flex-direction: column; gap: 8px; padding-top: 8px; border-top: 1px solid var(--rule); }
.tip__row {
  display: grid;
  grid-template-columns: 12px 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 4px 0;
}
.tip__row--active { background: oklch(0.18 0.020 240 / 0.75); padding: 6px 6px; margin: -2px -6px; }
.tip__row--other { opacity: 0.78; }
.tip__dot { width: 8px; height: 8px; border-radius: 50%; }
.tip__dot--m1 { background: var(--m1); }
.tip__dot--m2 { background: var(--m2); }
.tip__l { font-size: 0.75rem; color: var(--tx-3); font-weight: 500; }
.tip__hzgrp { display: flex; gap: 10px; align-items: baseline; }
.tip__hzcell { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.1; }
.tip__hzk {
  font-family: var(--ff-mono);
  font-variation-settings: "MONO" 1, "CASL" 0.85;
  font-size: 0.5625rem;
  color: var(--tx-4);
  letter-spacing: 0.06em;
  margin-bottom: 2px;
}
.tip__row--active.is-h3 .tip__hzcell:nth-child(1) .tip__hzk,
.tip__row--active.is-h6 .tip__hzcell:nth-child(2) .tip__hzk { color: var(--coral); }
.tip__row--active.is-h3 .tip__hzcell:nth-child(1) .tip__v,
.tip__row--active.is-h6 .tip__hzcell:nth-child(2) .tip__v { color: var(--coral); }
.tip__v { font-family: var(--ff-mono); font-variation-settings: "MONO" 1, "CASL" 0.85; font-feature-settings: "tnum" 1; font-size: 0.875rem; color: var(--tx); }
.tip__pct {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-top: 8px; padding-top: 8px;
  border-top: 1px solid var(--rule-soft);
}
.tip__pl { font-size: 0.6875rem; color: var(--tx-3); letter-spacing: 0.04em; }
.tip__pct .mono { font-size: 0.875rem; color: var(--coral); font-feature-settings: "tnum" 1; }

/* =====================================================================
   RESPONSIVE
   ===================================================================== */
@media (max-width: 980px) {
  .hero { height: auto; min-height: 0; }
  .map { position: relative; height: 70vh; min-height: 480px; inset: auto; }
  .rail {
    position: relative;
    width: 100%; top: auto; right: auto; bottom: auto;
    border-left: 0; border-top: 1px solid var(--rule);
    background: var(--bg);
  }
  .ovl--toggles { right: var(--s-4); }
  .ovl--legend { right: var(--s-4); width: 180px; }
  .ovl--title { max-width: 70%; }
  .meth__sec { grid-template-columns: 1fr; gap: var(--s-5); }
  .meth__num { color: var(--m2); font-size: 1rem; }
  .meth { padding: var(--s-7) var(--s-5); }
  .meth__horizonSwitch { flex-wrap: wrap; gap: var(--s-2); }
  .meth__horizonSwitch-hint { margin-left: 0; }
}

@media (max-width: 640px) {
  .ovl--title { top: var(--s-4); left: var(--s-4); max-width: calc(100% - 32px); }
  .ovl--toggles { top: auto; bottom: var(--s-4); right: var(--s-4); left: var(--s-4); align-items: stretch; }
  .ovl--toggles .toggrp { grid-template-columns: 1fr; gap: 4px; }
  .ovl--toggles .toggrp__lbl { text-align: left; }
  .ovl--bl { display: none; }
  .ovl--legend { transform: scale(0.75); transform-origin: bottom right; }
  .map { height: 60vh; min-height: 360px; }
  .rail__model-name { font-size: 1.5rem; }
  .meth__title { font-size: 2rem; }
  .dictLaunch { grid-template-columns: 1fr; }
  .featureDict__panel { inset: 0; border-left: 0; border-right: 0; }
  .featureDict__head {
    padding: var(--s-4);
    align-items: flex-start;
  }
  .featureDict__tools { padding: var(--s-3) var(--s-4); }
  .featureDict__groups {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 2px;
  }
  .featureDict__group {
    flex: 0 0 auto;
    white-space: nowrap;
  }
  .featureDict__title { font-size: 2rem; }
  .featureDict__table,
  .featureDict__table thead,
  .featureDict__table tbody,
  .featureDict__table tr,
  .featureDict__table th,
  .featureDict__table td {
    display: block;
  }
  .featureDict__table thead { display: none; }
  .featureDict__table tr {
    padding: var(--s-4);
    border-bottom: 1px solid var(--rule-soft);
  }
  .featureDict__table td {
    width: 100% !important;
    padding: 0;
    border-bottom: 0;
  }
  .featureDict__table td + td { margin-top: var(--s-2); }
  .featureDict__table td:nth-child(1) {
    font-size: 0.875rem;
    color: var(--tx-3);
  }
  .featureDict__catrow td,
  .featureDict[data-model="diagnostic"] .featureDict__catrow td:nth-child(2),
  .featureDict[data-model="influenceable"] .featureDict__catrow td:nth-child(2) {
    padding: var(--s-4);
  }
}

/* =====================================================================
   MOTION
   ===================================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

@keyframes painted {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.paint-in {
  animation: painted 0.6s cubic-bezier(0.25, 1, 0.5, 1) both;
}

/* =====================================================================
   TRACT-DETAIL DRAWER
   Slides in from the LEFT above all other UI when a tract is pinned.
   ===================================================================== */
.drawer {
  position: fixed;
  z-index: 200;            /* above .rail (6), .ovl (5), .tip (100) */
  top: 0; left: 0; bottom: 0;
  width: clamp(300px, 92vw, 480px);
  max-width: 100vw;
  background: oklch(0.18 0.020 240);
  border-right: 1px solid var(--rule);
  transform: translateX(calc(-100% - 8px));
  transition: transform 350ms cubic-bezier(0.215, 0.61, 0.355, 1);
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: var(--rule) transparent;
}
.drawer::-webkit-scrollbar { width: 6px; }
.drawer::-webkit-scrollbar-thumb { background: var(--rule); border-radius: 0; }
.drawer::-webkit-scrollbar-track { background: transparent; }

.drawer.is-open {
  transform: translateX(0);
}

.drawer__inner {
  display: flex;
  flex-direction: column;
  padding: var(--s-5);
  gap: var(--s-4);
}

.drawer__head {
  display: flex; flex-direction: column;
  gap: 6px;
}
.drawer__headtop {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: var(--s-3);
}
.drawer__kicker { color: var(--coral); }
.drawer__close {
  font-family: var(--ff-body);
  font-weight: 500;
  font-size: 0.6875rem;
  letter-spacing: 0.06em;
  text-transform: lowercase;
  color: var(--tx-3);
  padding: 4px 0;
  transition: color 0.2s ease;
}
.drawer__close:hover, .drawer__close:focus-visible { color: var(--coral); outline: none; }

.drawer__fips {
  font-family: var(--ff-disp);
  font-weight: 600;
  font-size: 1.75rem;
  letter-spacing: -0.015em;
  line-height: 1.05;
  color: var(--tx);
  margin-top: 4px;
}
.drawer__sub {
  font-family: var(--ff-mono);
  font-variation-settings: "MONO" 1, "CASL" 0.85;
  font-feature-settings: "tnum" 1;
  font-size: 0.75rem;
  color: var(--tx-3);
  letter-spacing: 0.02em;
  margin-top: 4px;
}
.drawer__meta {
  font-family: var(--ff-body);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--tx-3);
  margin-top: 6px;
}
.drawer__intro {
  font-family: var(--ff-body);
  font-size: 0.8125rem;
  line-height: 1.55;
  color: var(--tx-2);
  margin: 14px 0 0 0;
  max-width: 60ch;
}
.drawer__hint {
  font-family: var(--ff-body);
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.55;
  color: var(--tx-3);
  margin: 0;
  max-width: 60ch;
}
.drawer__hint em {
  color: var(--tx);
  font-style: normal;
  font-weight: 600;
}
.drawcell__sub {
  font-family: var(--ff-body);
  font-size: 0.6875rem;
  font-weight: 500;
  color: var(--tx-4);
  font-style: italic;
  line-height: 1.35;
  margin-top: -2px;
}
.drawshap__arrow {
  display: inline-block;
  width: 14px;
  font-family: var(--ff-body);
  font-weight: 700;
  font-size: 0.75rem;
}
.drawshap__arrow.pos { color: var(--m1); }
.drawshap__arrow.neg { color: var(--m2); }
body[data-model="m2"] .drawshap__arrow.pos { color: var(--m2); }
body[data-model="m2"] .drawshap__arrow.neg { color: var(--m1); }

.drawer__rule {
  height: 1px;
  background: var(--rule);
  width: 100%;
}

.drawer__sect {
  display: flex; flex-direction: column;
  gap: var(--s-3);
}
.drawer__sect-h {
  color: var(--tx-3);
  display: block;
}
.drawer__sect-h span { color: var(--coral); letter-spacing: 0.04em; }

/* 2x2 grid of (model × horizon) prediction cells */
.drawer__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
}
.drawcell {
  background: oklch(0.20 0.020 240);
  padding: 12px;
  display: flex; flex-direction: column;
  gap: 5px;
  position: relative;
  border: 1px solid transparent;
  margin: -1px; /* collapse with the parent grid gap rules */
  transition: border-color 0.2s ease;
}
.drawcell.is-active {
  border-color: var(--coral);
  z-index: 1;
}
.drawcell__head {
  font-family: var(--ff-body);
  font-weight: 500;
  font-size: 0.625rem;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--tx-3);
}
.drawcell--m1 .drawcell__head { color: var(--m1); }
.drawcell--m2 .drawcell__head { color: var(--m2); }
.drawcell__v {
  font-family: var(--ff-disp);
  font-weight: 600;
  font-feature-settings: "tnum" 1;
  font-size: 1.5rem;
  line-height: 1;
  letter-spacing: -0.015em;
  color: var(--tx);
}
.drawcell__pct {
  font-family: var(--ff-mono);
  font-variation-settings: "MONO" 1, "CASL" 0.85;
  font-feature-settings: "tnum" 1;
  font-size: 0.6875rem;
  color: var(--tx-3);
  letter-spacing: 0.01em;
  line-height: 1.35;
  margin-top: 2px;
}
.drawcell__bar {
  position: relative;
  height: 4px;
  background: oklch(0.14 0.020 240);
  margin-top: 3px;
}
.drawcell__bar-fill {
  position: absolute; left: 0; top: 0; bottom: 0;
  background: var(--m1);
  transition: width 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}
.drawcell--m2 .drawcell__bar-fill { background: var(--m2); }

/* Divergence explainer block — appears when the two lenses disagree */
.divergence {
  border: 1px solid var(--rule);
  padding: var(--s-4);
  background: transparent;
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
}
.divergence__eyebrow {
  color: var(--coral);
  margin: 0;
}
.divergence__headline {
  font-family: var(--ff-disp);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.3;
  letter-spacing: -0.005em;
  color: var(--tx);
  margin: 0;
  text-wrap: balance;
  max-width: 40ch;
}
.divergence__body {
  font-family: var(--ff-body);
  font-weight: 400;
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--tx-2);
  margin: 0;
  max-width: 60ch;
}

/* SHAP top-drivers list */
.drawer__shap {
  list-style: none;
  margin: 0; padding: 0;
  display: flex; flex-direction: column;
  gap: 0;
  border-top: 1px solid var(--rule-soft);
}
.drawshap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px 148px;
  gap: 10px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--rule-soft);
}
.drawshap__nm {
  font-family: var(--ff-body);
  font-size: 0.8125rem;
  color: var(--tx-2);
  font-weight: 500;
  line-height: 1.3;
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}
.drawshap__bar {
  position: relative;
  height: 5px;
  background: oklch(0.14 0.020 240);
}
.drawshap__bar-fill {
  position: absolute; left: 0; top: 0; bottom: 0;
  transition: width 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}
.drawshap__bar-fill.pos { background: var(--m1); }
.drawshap__bar-fill.neg { background: var(--m2); }
body[data-model="m2"] .drawshap__bar-fill.pos { background: var(--m2); }
body[data-model="m2"] .drawshap__bar-fill.neg { background: var(--m1); }
.drawshap__v {
  font-family: var(--ff-body);
  font-size: 0.75rem;
  font-weight: 500;
  text-align: right;
  line-height: 1.3;
}
.drawshap__v.pos { color: var(--m1); }
.drawshap__v.neg { color: var(--m2); }
body[data-model="m2"] .drawshap__v.pos { color: var(--m2); }
body[data-model="m2"] .drawshap__v.neg { color: var(--m1); }

.drawshap__empty {
  font-family: var(--ff-body);
  font-style: italic;
  font-size: 0.8125rem;
  color: var(--tx-3);
  padding: var(--s-3) 0;
  border-bottom: 1px solid var(--rule-soft);
}

.drawer__foot {
  font-family: var(--ff-body);
  font-style: italic;
  font-size: 0.75rem;
  color: var(--tx-3);
  line-height: 1.5;
  padding-top: var(--s-2);
}

@media (max-width: 640px) {
  .drawer { width: 100vw; }
}

@media (prefers-reduced-motion: reduce) {
  .drawer { transition: none; }
}

/* ── Accordion disclosure ──────────────────────────────────────────────── */

.accordion__hook {
  font-family: var(--ff-body);
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--tx-2);
  margin: var(--s-2) 0 0;
}

.accordion__toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  margin-top: var(--s-2);
  padding: 0;
  min-height: 44px;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--ff-body);
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--tx-3);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: color 0.15s;
}
.accordion__toggle:hover { color: var(--tx); }

.accordion__chevron {
  display: inline-block;
  font-style: normal;
  font-size: 0.6em;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  transform-origin: center;
}
.accordion__toggle[aria-expanded="true"] .accordion__chevron {
  transform: rotate(90deg);
}

/* P3: grid-rows transition pending JS update */
.accordion__body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.accordion__body.is-open {
  max-height: 1000px;
}

/* Guide cards: add top margin to body so it doesn't crowd the toggle */
.guide__card .accordion__body { margin-top: var(--s-2); }

/* Methodology: larger heading and hook, detail text stays at base size */
.meth__body .accordion__hook {
  font-size: 1.0625rem;
  line-height: 1.55;
  color: var(--tx-2);
  margin: var(--s-3) 0 0;
}

@media (prefers-reduced-motion: reduce) {
  .accordion__body { transition: none; }
  .accordion__chevron { transition: none; }
}
