/* Layout: one scroll. A sticky Florida map carries the story while short steps scroll past it; then a
   full-width explorer, the tracker and the evidence. Gulf-water neutrals, energized amber for flow. */
:root {
  --bg: #f5f7f7;
  --surface: #ffffff;
  --ink: #0d1b20;
  --ink-2: #44555b;
  --muted: #647073;           /* 4.8:1 on --bg, 5.1:1 on --surface (WCAG AA body text) */
  --line: #dbe2e3;
  --land: #e7ecea;
  --land-edge: #ffffff;
  --water: #dfeaee;
  --accent: #0b6a87;
  --flow: #e39a00;
  --wire: #33454b;
  --export: #2a78d6;
  --import: #d03b3b;
  --mid: #eceae6;
  /* congestion / hours-at-limit ramp, validated (ordinal, one hue, light end >= 2:1 on land) */
  --stress-0: #cf8a2a;
  --stress-1: #c96812;
  --stress-2: #b5470f;
  --stress-3: #86280a;
  /* voltage classes 69 / 115 / 138 / 230 / 500 kV, validated ordinal neutral ramp */
  /* voltage classes 69 / 115-138 / 230 / 500 kV: neutral + the first three categorical slots (validated all-pairs) */
  --kv-0: #8f9da1; --kv-1: #1baf7a; --kv-2: #1baf7a; --kv-3: #eb6834; --kv-4: #2a78d6;
  --sol-fail: #8b989c;
  --host-0: #eef4fb;
  --host-1: #86b6ef;
  --host-2: #2a78d6;
  --host-3: #104281;
  /* gas step: FGT violet, other pipelines aqua, curtailed plants --import (validated all-pairs on --land; aqua
     below 3:1 in light and at the CVD floor vs red in dark, so pipelines carry a halo, dashes and direct labels) */
  --gas-fgt: #4a3aa7; --gas-other: #1baf7a;
  --font-display: "Bricolage Grotesque", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: system-ui, -apple-system, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  --font-data: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --step-0: clamp(0.95rem, 0.9rem + 0.2vw, 1.05rem);
  --step-1: clamp(1.15rem, 1.05rem + 0.4vw, 1.35rem);
  --step-2: clamp(1.5rem, 1.25rem + 1vw, 2.1rem);
  --step-3: clamp(2.2rem, 1.6rem + 2.6vw, 4.2rem);
  --radius: 14px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0c1416; --surface: #121c1f; --ink: #eef3f3; --ink-2: #b6c3c6; --muted: #83959a; --line: #24343a;
    --land: #243a41; --land-edge: #0a1316; --water: #0a1518; --accent: #47b3d3; --flow: #ffb51f; --wire: #a8bcc1;
    --export: #3987e5; --import: #e66767; --mid: #2b3437;
    --stress-0: #8a5a10; --stress-1: #c27a0c; --stress-2: #ee8a45; --stress-3: #ffc2a3;
    --kv-0: #6f8287; --kv-1: #199e70; --kv-2: #199e70; --kv-3: #d95926; --kv-4: #3987e5; --sol-fail: #5d6e73;
    --host-0: #13253a; --host-1: #1c5cab; --host-2: #3987e5; --host-3: #9ec5f4;
    --gas-fgt: #9085e9; --gas-other: #199e70;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0c1416; --surface: #121c1f; --ink: #eef3f3; --ink-2: #b6c3c6; --muted: #83959a; --line: #24343a;
  --land: #243a41; --land-edge: #0a1316; --water: #0a1518; --accent: #47b3d3; --flow: #ffb51f; --wire: #a8bcc1;
  --export: #3987e5; --import: #e66767; --mid: #2b3437;
  --stress-0: #8a5a10; --stress-1: #c27a0c; --stress-2: #ee8a45; --stress-3: #ffc2a3;
  --kv-0: #6f8287; --kv-1: #199e70; --kv-2: #199e70; --kv-3: #d95926; --kv-4: #3987e5; --sol-fail: #5d6e73;
  --host-0: #13253a; --host-1: #1c5cab; --host-2: #3987e5; --host-3: #9ec5f4;
  --gas-fgt: #9085e9; --gas-other: #199e70;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-snap-type: y proximity; scroll-padding-top: 64px; }
.hero, .findings, .proposals, .explore, .tracker, .trust, .method { scroll-snap-align: start; }
.chapter, .step { scroll-snap-align: center; }
body {
  margin: 0; background: var(--bg); color: var(--ink); font: 400 var(--step-0)/1.6 var(--font-body);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: var(--font-display); text-wrap: balance; letter-spacing: -0.015em; margin: 0; }
h2 { font-size: var(--step-2); line-height: 1.15; font-weight: 700; }
h3 { font-size: var(--step-1); font-weight: 650; }
p { margin: 0; }
b { font-weight: 650; font-variant-numeric: tabular-nums; }
code, .mono { font-family: var(--font-data); font-size: 0.86em; }
a { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 12px; z-index: 50; background: var(--surface); padding: 8px 12px; }
.muted { color: var(--muted); }
.note { color: var(--ink-2); font-size: 0.92em; }
.ghost {
  font: 500 0.85rem var(--font-body); color: var(--ink-2); background: transparent; border: 1px solid var(--line);
  border-radius: 999px; padding: 6px 12px; cursor: pointer;
}
.ghost:hover { color: var(--ink); border-color: var(--ink-2); }

/* top bar */
.top {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 30;
  background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line);
}
.top-inner {
  max-width: 1280px; margin: 0 auto; padding: 10px 24px; display: flex; gap: 20px; align-items: center;
}
.brand { font: 700 1rem var(--font-display); letter-spacing: -0.01em; }
.brand-year { color: var(--flow); }
.top nav { display: flex; gap: 18px; margin-left: auto; flex-wrap: wrap; }
.top nav a { color: var(--ink-2); text-decoration: none; font-size: 0.9rem; }
.top nav a:hover { color: var(--ink); }

main > section { padding-inline: 24px; }

/* hero */
.hero { max-width: 1180px; margin: 0 auto; padding-block: clamp(48px, 9vw, 120px) 32px; display: grid; gap: 28px; }
.eyebrow, .kicker {
  font: 500 0.78rem var(--font-data); text-transform: uppercase; letter-spacing: 0.12em; color: var(--accent);
}
.hero h1 { font-size: var(--step-3); line-height: 1.02; font-weight: 800; max-width: 22ch; }
.hero h1 .soft { color: var(--ink-2); font-weight: 600; }
.lede { font-size: var(--step-1); color: var(--ink-2); max-width: 62ch; line-height: 1.55; }
.lede b { color: var(--ink); }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; margin: 8px 0 0;
  background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.stats > div { background: var(--surface); padding: 20px 22px; display: grid; gap: 6px; grid-template-rows: 1fr auto; }
.stats dt { font-size: 0.82rem; color: var(--muted); align-self: start; }
.stats dd { margin: 0; font: 700 clamp(1.6rem, 1.2rem + 1.4vw, 2.4rem)/1.05 var(--font-display); align-self: end; }
.stats small { font: 500 0.95rem var(--font-body); color: var(--ink-2); }
.hero-note { color: var(--muted); font-size: 0.86rem; max-width: 80ch; }

/* story: sticky map + steps */
.story {
  max-width: 1280px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 40px; align-items: start; padding-block: 24px 40px;
}
.map-stage { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 64px); order: 2; }
.map-frame { margin: 0; position: relative; background: var(--water); border-radius: 22px; overflow: hidden;
  aspect-ratio: 1 / 1.12; max-height: calc(100vh - 88px); width: 100%; display: flex; flex-direction: column; }
.map-bar { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 14px 14px 8px 16px;
  background: color-mix(in srgb, var(--surface) 70%, var(--water)); border-bottom: 1px solid var(--line); }
.map-canvas { position: relative; flex: 1 1 auto; min-height: 0; }
#map { width: 100%; height: 100%; display: block; position: absolute; inset: 0; }
.map-head { min-width: 0; min-height: 3.1em; transition: opacity 0.18s ease, transform 0.18s ease; }
.map-head.swap { opacity: 0; transform: translateY(-6px); }
.map-chapter { font: 500 0.72rem var(--font-data); letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); }
.map-title { font: 650 clamp(0.95rem, 0.85rem + 0.35vw, 1.15rem)/1.25 var(--font-display); color: var(--ink);
  text-wrap: balance; margin-top: 2px; }
.map-tools { display: grid; gap: 6px; justify-items: end; flex: none; }
.seg { display: inline-flex; background: color-mix(in srgb, var(--surface) 92%, transparent); border: 1px solid var(--line);
  border-radius: 999px; padding: 2px; }
.seg button { font: 500 0.78rem var(--font-body); color: var(--ink-2); background: transparent; border: 0; border-radius: 999px;
  padding: 5px 10px; cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--surface); }

.kv-chips { display: inline-flex; gap: 3px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.chip { font: 500 0.72rem var(--font-data); color: var(--ink-2); background: color-mix(in srgb, var(--surface) 92%, transparent);
  border: 1px solid var(--line); border-radius: 6px; padding: 2px 6px; cursor: pointer; }
.chip[aria-pressed="true"] { color: var(--ink); border-color: var(--ink-2); }
.chip[aria-pressed="false"] { opacity: 0.5; text-decoration: line-through; }
.chip-unit { font: 500 0.7rem var(--font-data); color: var(--muted); margin-left: 2px; }
.map-legend { position: absolute; left: 16px; bottom: 14px; display: grid; gap: 6px; font-size: 0.78rem;
  color: var(--ink-2); background: color-mix(in srgb, var(--surface) 85%, transparent); padding: 10px 12px;
  border-radius: 10px; max-width: calc(100% - 32px); }
.legend-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.legend-ramp { display: flex; height: 8px; width: 140px; border-radius: 4px; overflow: hidden; }
.legend-ramp span { flex: 1; }
.legend-key { width: 18px; height: 3px; border-radius: 2px; display: inline-block; }
.legend-key.dashed { background: none !important; border-top: 2px dashed var(--sol-fail); height: 0; }
.legend-kv, .legend-widths { display: inline-flex; gap: 8px; align-items: center; }
.legend-kv .kvk, .legend-widths .lw { display: inline-flex; gap: 4px; align-items: center; font: 500 0.72rem var(--font-data); }
.legend-kv i { width: 14px; height: 4px; border-radius: 2px; display: inline-block; }
.legend-widths svg { display: block; overflow: visible; }
@media (prefers-reduced-motion: no-preference) { .map-legend.pulse { animation: pulse 0.6s ease; } }
@keyframes pulse { from { box-shadow: 0 0 0 2px var(--accent); } to { box-shadow: 0 0 0 0 transparent; } }
.map-hud { position: absolute; left: 14px; top: 46%; display: flex; gap: 10px; align-items: center; z-index: 3;
  background: color-mix(in srgb, var(--surface) 90%, transparent); padding: 8px 12px; border-radius: 999px; }
.hud-time { font: 600 1rem var(--font-data); min-width: 3.2em; }
#hud-scrub { width: 140px; accent-color: var(--flow); }

.steps { order: 1; display: grid; gap: 22vh; padding-block: 8vh 30vh; }
.step { max-width: 46ch; display: grid; gap: 14px; opacity: 0.5; transition: opacity 0.5s ease; }
.step.is-active { opacity: 1; }
.step h2 { font-size: clamp(1.45rem, 1.2rem + 1vw, 2rem); }
.step p { color: var(--ink-2); }
.step p b { color: var(--ink); }
.facts { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.facts li { padding-left: 18px; position: relative; color: var(--ink-2); }
.facts li::before { content: ""; position: absolute; left: 0; top: 0.7em; width: 8px; height: 2px; background: var(--flow); }
.robust-list, .host-list, .crit-list, .sol-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.robust-list li, .host-list li, .crit-list li, .sol-list li {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: baseline; padding: 8px 12px;
  border-radius: 10px; background: var(--surface); border: 1px solid var(--line); cursor: pointer;
}
.robust-list li:hover, .host-list li:hover, .crit-list li:hover, .sol-list li:hover,
.robust-list li:focus-visible, .host-list li:focus-visible, .crit-list li:focus-visible, .sol-list li:focus-visible {
  border-color: var(--accent);
}
.item-name { font-weight: 600; color: var(--ink); min-width: 0; }
.item-sub { display: block; font-size: 0.82rem; color: var(--muted); font-weight: 400; }
.item-val { font: 500 0.9rem var(--font-data); color: var(--ink); white-space: nowrap; }

/* map marks */
.county { fill: var(--land); stroke: var(--land-edge); stroke-width: 0.8; transition: fill 0.7s ease; }
.county:hover, .county.is-picked { stroke: var(--ink); stroke-width: 1.4; }
.wire, .hline, .pipe { fill: none; stroke: var(--wire); stroke-linecap: round; pointer-events: none; }
.hline.is-outside { stroke-dasharray: 3 3; }
.hit { fill: none; stroke: transparent; stroke-width: 12; cursor: pointer; }
.flowline { fill: none; stroke: var(--flow); stroke-linecap: round; stroke-dasharray: 0.1 9; pointer-events: none; }
.newcorr { fill: none; stroke: var(--sol-fail); stroke-width: 2; stroke-dasharray: 5 4; cursor: help; pointer-events: stroke; }
.veil { fill: var(--water); opacity: 0; }
.ov-county { stroke: var(--ink); stroke-width: 1.6; }
.ov-halo { fill: none; stroke: var(--surface); stroke-linecap: round; opacity: 0.9; }
.ov-line { fill: none; stroke-linecap: round; }
.ov-label { font: 600 11px var(--font-body); fill: var(--ink); paint-order: stroke; stroke: var(--surface); stroke-width: 3px; }
.track { fill: none; stroke: var(--ink); stroke-opacity: 0.55; stroke-width: 1.5; }
.track-dot { fill: var(--surface); stroke: var(--ink); stroke-width: 1; }
.map-label { font: 500 10px var(--font-data); fill: var(--ink); paint-order: stroke; stroke: var(--water);
  stroke-width: 3px; pointer-events: none; }
.soco-label { font: 500 10px var(--font-data); fill: var(--muted); }

/* proposals */
.proposals { max-width: 1180px; margin: 0 auto; padding-block: 64px; display: grid; gap: 28px; }
.prop-grid { margin: 0; padding: 0; list-style: none; counter-reset: prop; display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.prop-grid li { counter-increment: prop; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px; display: grid; gap: 10px; align-content: start; }
.prop-grid .num { font: 500 0.75rem var(--font-data); color: var(--accent); letter-spacing: 0.08em; text-transform: uppercase; }
.prop-grid p { color: var(--ink-2); }

/* explorer */
.explore { max-width: 1280px; margin: 0 auto; padding-block: 56px; display: grid; gap: 18px; }
.explore-head { display: grid; gap: 8px; }
.explore-head p { color: var(--ink-2); }
.controls { display: flex; flex-wrap: wrap; gap: 12px; }
.controls label { display: grid; gap: 4px; font-size: 0.78rem; color: var(--muted); }
.controls select { font: 500 0.92rem var(--font-body); color: var(--ink); background: var(--surface);
  border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; min-width: 0; }
.explore-body { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 18px; align-items: start; }
.compare { margin: 0; position: relative; background: var(--water); border-radius: 22px; overflow: hidden;
  aspect-ratio: 1 / 0.95; touch-action: none; }
.compare svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.clip { position: absolute; inset: 0; clip-path: inset(0 0 0 50%); }
.divider { position: absolute; top: 0; bottom: 0; left: 50%; width: 2px; background: var(--ink); cursor: ew-resize; }
.divider span { position: absolute; top: 50%; left: 50%; width: 28px; height: 28px; transform: translate(-50%, -50%);
  border-radius: 50%; background: var(--surface); border: 2px solid var(--ink); }
.tag { position: absolute; top: 12px; font: 500 0.75rem var(--font-data); text-transform: uppercase;
  letter-spacing: 0.06em; background: var(--surface); padding: 4px 8px; border-radius: 6px; color: var(--ink-2); }
.tag-a { left: 12px; } .tag-b { right: 12px; }
.inspector { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px;
  display: grid; gap: 12px; min-width: 0; }
.inspector h3 { font-size: 1.15rem; }
.kv { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; margin: 0; font-size: 0.9rem; }
.kv dt { color: var(--ink-2); }
.kv dd { margin: 0; font-family: var(--font-data); font-variant-numeric: tabular-nums; text-align: right; }
.spark { width: 100%; height: 60px; display: block; }

/* tables */
.table-wrap { overflow-x: auto; }
table.data { border-collapse: collapse; width: 100%; font-size: 0.88rem; }
table.data caption { text-align: left; color: var(--muted); font-size: 0.8rem; padding-bottom: 6px; }
table.data th, table.data td { padding: 7px 10px; border-bottom: 1px solid var(--line); text-align: left; }
table.data th { color: var(--muted); font-weight: 500; font-size: 0.78rem; }
table.data td.num { text-align: right; font-family: var(--font-data); font-variant-numeric: tabular-nums; }
table.data th.num { text-align: right; }

/* tracker */
.tracker { max-width: 1180px; margin: 0 auto; padding-block: 56px; display: grid; gap: 16px; }
.lede-sm { color: var(--ink-2); max-width: 70ch; }
.tracker-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.chart { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px; }
.chart svg { width: 100%; height: auto; display: block; }
.axis text { font: 400 11px var(--font-data); fill: var(--muted); }
.axis path, .axis line { stroke: var(--line); }
.mini { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 0 0 16px; }
.mini dt { font-size: 0.8rem; color: var(--muted); }
.mini dd { margin: 0; font: 700 1.5rem var(--font-display); }

/* trust + method */
.trust, .method { max-width: 1180px; margin: 0 auto; padding-block: 56px; display: grid; gap: 22px; }
.trust-grid, .method-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
.method-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.trust-grid > div, .method-grid > div { display: grid; gap: 10px; align-content: start; min-width: 0; }
.trust-grid > .span-2 { grid-column: 1 / -1; }
.method p { color: var(--ink-2); }
.audit { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.audit li { display: grid; gap: 2px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.stamp { color: var(--muted); font-size: 0.82rem; }

.tooltip { position: fixed; z-index: 60; pointer-events: none; background: var(--surface); color: var(--ink);
  border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; font-size: 0.85rem; box-shadow: 0 6px 24px rgb(0 0 0 / 0.12);
  max-width: 260px; }
.tooltip .tv { font: 600 1rem var(--font-data); }
.tooltip .tt { font-weight: 650; }
.tooltip .tl { color: var(--ink-2); }

@media (max-width: 960px) {
  .story { grid-template-columns: minmax(0, 1fr); }
  .map-stage { order: 1; top: calc(env(safe-area-inset-top, 0px) + 84px); z-index: 5; }

  .steps { order: 2; gap: 40vh; padding-block: 4vh 30vh; }
  .step { background: color-mix(in srgb, var(--surface) 94%, transparent); border: 1px solid var(--line);
    border-radius: var(--radius); padding: 18px; max-width: none; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .prop-grid, .trust-grid, .method-grid, .tracker-grid, .explore-body { grid-template-columns: minmax(0, 1fr); }
  .top-inner { flex-wrap: wrap; row-gap: 6px; padding-block: 8px; }
  .top nav { order: 3; flex-basis: 100%; margin-left: 0; flex-wrap: nowrap; overflow-x: auto; gap: 16px;
    scrollbar-width: none; -webkit-overflow-scrolling: touch; padding-bottom: 2px; }
  .top nav::-webkit-scrollbar { display: none; }
  .top nav a { white-space: nowrap; font-size: 0.85rem; }
  #theme-toggle { margin-left: auto; }
  .map-legend { font-size: 0.7rem; padding: 6px 8px; left: 10px; bottom: 10px; gap: 4px; }
  .legend-ramp { width: 90px; height: 6px; }
  .map-hud { right: 10px; top: 8px; padding: 6px 10px; }
  #hud-scrub { width: 110px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .county, .wire, .step { transition: none; }
}

/* One orchestrated entrance: the hero rises into place from a visible resting state. */
@media (prefers-reduced-motion: no-preference) {
  .hero > * { animation: rise 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
  .hero > :nth-child(2) { animation-delay: 0.06s; }
  .hero > :nth-child(3) { animation-delay: 0.12s; }
  .hero > :nth-child(4) { animation-delay: 0.18s; }
  .hero > :nth-child(5) { animation-delay: 0.24s; }
}
@keyframes rise { from { transform: translateY(14px); } to { transform: none; } }

/* sections, chapters and the progress rail */
.section-head { display: grid; gap: 8px; max-width: 70ch; }
.section-head p:not(.kicker) { color: var(--ink-2); }
.cta { display: flex; flex-wrap: wrap; gap: 10px; }
.button { font: 600 0.92rem var(--font-body); text-decoration: none; padding: 10px 16px; border-radius: 999px;
  background: var(--ink); color: var(--surface); border: 1px solid var(--ink); }
.button.ghost-btn { background: transparent; color: var(--ink); border-color: var(--line); }
.button:hover { opacity: 0.9; }
.findings { max-width: 1180px; margin: 0 auto; padding-block: 40px 72px; display: grid; gap: 24px; }
.finding-grid { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.finding-grid li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px;
  display: grid; gap: 8px; align-content: start; }
.finding-grid .num { font: 500 0.75rem var(--font-data); color: var(--accent); letter-spacing: 0.08em; }
.finding-grid h3 { font-size: 1.08rem; line-height: 1.3; }
.finding-grid p, .prop-grid p { color: var(--ink-2); font-size: 0.93rem; }
.finding-grid p.clamp { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card-actions { display: flex; gap: 16px; align-items: center; }
.linkish { font: 600 0.85rem var(--font-body); color: var(--ink-2); background: none; border: 0; padding: 0; cursor: pointer; }
.linkish:hover { color: var(--ink); }
.more { font: 600 0.85rem var(--font-body); text-decoration: none; }
.chapter { min-height: 62vh; display: grid; align-content: center; gap: 10px; opacity: 0.35; transition: opacity 0.5s ease; }
.chapter.is-active { opacity: 1; }
.chapter-num { font: 800 clamp(3rem, 2rem + 4vw, 5.5rem)/0.9 var(--font-display); color: var(--accent); letter-spacing: -0.04em; }
.chapter-title { font-size: clamp(2.2rem, 1.6rem + 2.4vw, 3.6rem); line-height: 1; font-weight: 800; }
.chapter p:not(.chapter-num) { font-size: var(--step-1); color: var(--ink-2); max-width: 32ch; }
.chapter .icon-xl { width: 64px; height: 64px; color: var(--ink-2); }
.rail { position: fixed; left: 14px; top: 50%; transform: translateY(-50%); z-index: 20; display: grid; gap: 10px; }
.rail a { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--muted); font: 500 0.72rem var(--font-data); }
.rail a::before { content: ""; width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid currentColor; }
.rail a.is-active { color: var(--accent); }
.rail a.is-active::before { background: currentColor; }
.rail .rail-num { opacity: 0; transition: opacity 0.2s; }
.rail a.is-active .rail-num { opacity: 1; }
.rail .rail-name { position: absolute; left: 22px; opacity: 0; transform: translateX(-4px); transition: opacity 0.2s, transform 0.2s;
  white-space: nowrap; pointer-events: none; background: var(--surface); border: 1px solid var(--line); padding: 2px 6px; border-radius: 6px; }
.rail a { position: relative; }
.rail a:hover .rail-name, .rail a:focus-visible .rail-name { opacity: 1; transform: none; }
.robust-list li.is-on, .host-list li.is-on, .crit-list li.is-on, .sol-list li.is-on { border-color: var(--accent); box-shadow: inset 3px 0 0 var(--accent); }
.swatch { display: inline-block; width: 14px; height: 6px; border-radius: 3px; vertical-align: middle; }
.swatch-limit { background: var(--stress-3); }
.control-group { display: grid; gap: 4px; font-size: 0.78rem; color: var(--muted); align-content: start; }
.explore .map-legend { z-index: 2; }

/* solutions chart */
.sol-chart { padding: 12px 12px 8px; }
.sol-chart .row-label { font: 500 11px var(--font-body); fill: var(--ink-2); }
.sol-chart .chart-note { font: 500 10.5px var(--font-data); fill: var(--muted); }
.chart-title { font-size: 0.8rem; color: var(--ink-2); margin-bottom: 4px; }
.sol-row:hover .row-label { fill: var(--ink); }
.chart-legend { font-size: 0.78rem; color: var(--muted); margin-top: 6px; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; vertical-align: -1px; }
.dot-pass { background: var(--accent); }
.dot-fail { border: 2px solid var(--sol-fail); }

@media (max-width: 1240px) { .rail { display: none; } }
@media (max-width: 960px) {
  .finding-grid { grid-template-columns: minmax(0, 1fr); }
  .map-frame { aspect-ratio: auto; height: 58vh; max-height: none; }
  .map-bar { padding: 8px 8px 6px 12px; align-items: center; }
  .map-head { min-height: 0; }
  .map-chapter { font-size: 0.62rem; }
  .map-title { font-size: 0.82rem; line-height: 1.2; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .map-tools .kv-chips { display: none; }
  .seg button { padding: 4px 8px; font-size: 0.72rem; }
  .map-legend .legend-row:nth-child(n+2) { display: none; }
  .map-legend { max-width: 75%; }
  .map-hud { top: 8px; left: 8px; padding: 4px 8px; }
  .chapter { min-height: 40vh; background: transparent; border: 0; }
}

/* icons */
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon-bg { fill: color-mix(in srgb, var(--surface) 88%, transparent); stroke: var(--line); stroke-width: 1; }
.icon-sm { width: 22px; height: 22px; color: var(--ink-2); }
.card-top { display: flex; justify-content: space-between; align-items: center; }
.prop-grid .num.prio::before { content: counter(prop, decimal-leading-zero); }
@media (prefers-reduced-motion: no-preference) {
  .icon-inner.spin { animation: spin 3.5s linear infinite; transform-box: fill-box; transform-origin: center; }
}
@keyframes spin { to { transform: rotate(-360deg); } }

/* ---------------------------------------------------------------- immersive story (desktop)
   The map fills the viewport under the header; step cards float over the Gulf on the left. */
.stat-row { display: flex; flex-wrap: wrap; gap: 14px 22px; }
.stat { display: grid; gap: 2px; min-width: 0; max-width: 16ch; }
.stat b { font: 750 clamp(1.5rem, 1.1rem + 1.2vw, 2.3rem)/1.05 var(--font-display); color: var(--ink); letter-spacing: -0.02em; }
.stat > span { font-size: 0.8rem; color: var(--muted); line-height: 1.3; }
.hint { font-size: 0.86rem; color: var(--ink-2); }
details.more { border-top: 1px solid var(--line); padding-top: 8px; }
details.more summary { cursor: pointer; font: 600 0.85rem var(--font-body); color: var(--accent); list-style: none; }
details.more summary::-webkit-details-marker { display: none; }
details.more summary::before { content: "+ "; }
details.more[open] summary::before { content: "– "; }
details.more[open] { display: grid; gap: 12px; }
details.more > :not(summary) { font-size: 0.92rem; }
.step .robust-list, .step .crit-list { gap: 4px; }
.step .crit-list li, .step .robust-list li { padding: 6px 10px; }

@media (min-width: 961px) {
  .story { max-width: none; display: block; position: relative; padding: 0; gap: 0; }
  .map-stage { position: sticky; top: 51px; height: calc(100vh - 51px); z-index: 1; }
  .map-frame { border-radius: 0; height: 100%; aspect-ratio: auto; max-height: none; display: block; }
  .map-canvas { position: absolute; inset: 0; }
  .map-bar { position: absolute; z-index: 4; top: 16px; right: 16px; max-width: min(560px, 48vw); border: 1px solid var(--line);
    border-radius: 16px; background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(10px);
    box-shadow: 0 8px 30px rgb(0 0 0 / 0.12); }
  .map-hud { position: static; padding: 4px 0 0; background: none; }
  .map-legend { left: calc(min(420px, 34vw) + 64px); bottom: 18px; max-width: min(460px, 34vw); }
  .steps { position: relative; z-index: 2; margin-top: calc(-100vh + 51px); padding-block: 30vh 45vh; gap: 75vh;
    pointer-events: none; }
  .step, .chapter { pointer-events: auto; width: min(420px, 34vw); margin-left: 40px; max-width: none;
    background: color-mix(in srgb, var(--surface) 90%, transparent); backdrop-filter: blur(12px);
    border: 1px solid var(--line); border-radius: 18px; padding: 22px 24px; box-shadow: 0 12px 40px rgb(0 0 0 / 0.14);
    opacity: 0.55; }
  .step.is-active, .chapter.is-active { opacity: 1; }
  .chapter { min-height: 0; padding: 30px 28px; }
  .step details.more[open] { max-height: 52vh; overflow: auto; }
}
@media (min-width: 1240px) { .step, .chapter { margin-left: 64px; } .map-legend { left: calc(min(420px, 34vw) + 88px); } }

/* zoom, county names, search */
.county, .wire, .hline, .pipe, .flowline, .hit, .newcorr, .ov-county, .ov-halo, .ov-line { vector-effect: non-scaling-stroke; }
.zoom-ctl { position: absolute; right: 16px; bottom: 18px; z-index: 4; display: flex; flex-direction: column; gap: 4px; align-items: flex-end; }
.zoom-ctl button { width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--line); cursor: pointer;
  background: color-mix(in srgb, var(--surface) 92%, transparent); color: var(--ink); font: 600 1.05rem var(--font-body); }
.zoom-ctl button:hover { border-color: var(--ink-2); }
.zoom-hint { font-size: 0.7rem; color: var(--muted); background: color-mix(in srgb, var(--surface) 80%, transparent);
  padding: 2px 6px; border-radius: 6px; white-space: nowrap; opacity: 0; transition: opacity 0.2s; pointer-events: none; }
.zoom-ctl:hover .zoom-hint { opacity: 1; }
.cname .cn { font: 600 11px var(--font-body); fill: var(--ink); text-anchor: middle; paint-order: stroke; stroke: var(--land); stroke-width: 3px; }
.cname .cv { font: 500 9.5px var(--font-data); fill: var(--ink-2); text-anchor: middle; paint-order: stroke; stroke: var(--land); stroke-width: 3px; }
.cname .cv { transform: translateY(12px); }
.search input { font: 500 0.8rem var(--font-body); color: var(--ink); background: color-mix(in srgb, var(--surface) 92%, transparent);
  border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; width: 240px; max-width: 100%; }
.search input:focus { outline: none; border-color: var(--accent); }
.search input.no-hit { border-color: var(--import); }
.controls .search { align-self: end; }
#compare .zoom-ctl { right: 12px; bottom: 12px; }
@media (max-width: 960px) { .map-tools .search { display: none; } .zoom-hint { display: none; } .zoom-ctl { right: 8px; bottom: 8px; } }

/* scenario switch, glossary terms, first-visit hint */
.scen-switch { display: flex; flex-wrap: wrap; gap: 4px; }
.scen-switch button { font: 500 0.76rem var(--font-body); color: var(--ink-2); background: transparent; border: 1px solid var(--line);
  border-radius: 999px; padding: 4px 10px; cursor: pointer; }
.scen-switch button[aria-pressed="true"] { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.term { text-decoration: underline dotted color-mix(in srgb, var(--ink-2) 60%, transparent); text-underline-offset: 3px; cursor: help; }
.coach { position: absolute; z-index: 5; right: 64px; bottom: 22px; max-width: 300px; display: grid; gap: 6px; padding: 14px 16px;
  background: var(--surface); color: var(--ink); border: 1px solid var(--accent); border-radius: 14px; box-shadow: 0 12px 30px rgb(0 0 0 / 0.2); font-size: 0.85rem; }
.coach span { color: var(--ink-2); }
.coach button { justify-self: start; }
@media (prefers-reduced-motion: no-preference) { .coach { animation: rise 0.5s ease both; } }
@media (max-width: 960px) { .coach { right: 52px; bottom: 12px; max-width: 220px; } }
.stat.range { max-width: 22ch; }
.stat.range b { font-size: clamp(1.25rem, 1rem + 0.8vw, 1.7rem); }
#compare .map-legend { max-width: calc(100% - 80px); }
.halo { fill: none; stroke: var(--surface); stroke-linecap: round; vector-effect: non-scaling-stroke; pointer-events: none; }
.iline { fill: none; stroke: var(--muted); stroke-width: 0.8; stroke-dasharray: 2 2; opacity: 0.75; vector-effect: non-scaling-stroke; }
.legend-key.dashed-intra { background: none !important; border-top: 1.5px dashed var(--muted); height: 0; }
.chk { display: inline-flex; gap: 4px; align-items: center; font: 500 0.74rem var(--font-body); color: var(--ink-2); cursor: pointer; white-space: nowrap; }
.chk input { accent-color: var(--accent); margin: 0; }

/* utility view */
.terr { fill: none; stroke: var(--ink); stroke-width: 2.2; stroke-linejoin: round; opacity: 0.75; vector-effect: non-scaling-stroke; pointer-events: none; }
.ulink { fill: none; stroke-linecap: round; vector-effect: non-scaling-stroke; pointer-events: none; }
.uarrow { fill: var(--ink); stroke: var(--surface); stroke-width: 1.5; }
.ulabel { font: 600 10.5px var(--font-data); fill: var(--ink); text-anchor: middle; paint-order: stroke; stroke: var(--surface); stroke-width: 3px; }
.uflow { pointer-events: none; }
.unode .uname { font: 700 13px var(--font-display); fill: var(--ink); text-anchor: middle; paint-order: stroke; stroke: var(--land); stroke-width: 4px; letter-spacing: -0.01em; }
.unode { cursor: help; }
.legend-key.terr-key { background: none !important; border: 2px solid var(--ink); height: 10px; width: 16px; border-radius: 2px; }
.step h2 { font-size: clamp(1.25rem, 1.05rem + 0.7vw, 1.6rem); line-height: 1.2; }

/* gas step: pipelines over a surface halo, plants sized by gas MW */
.gas-halo { fill: none; stroke: var(--land-edge); stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; opacity: 0.9; vector-effect: non-scaling-stroke; pointer-events: none; }
.gas-line { fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; pointer-events: none; }
.gas-line.is-fgt { stroke: var(--gas-fgt); stroke-width: 2.4; }
.gas-line.is-other { stroke: var(--gas-other); stroke-dasharray: 6 3; }
.gas-hit { fill: none; stroke: transparent; stroke-width: 12; vector-effect: non-scaling-stroke; pointer-events: stroke; cursor: help; }
.gplant { stroke: var(--land-edge); stroke-width: 1.5; vector-effect: non-scaling-stroke; cursor: help; }
.gplant.is-curtailed { fill: var(--import); }
.gplant.is-oil { fill: var(--land); stroke: var(--import); stroke-width: 2; }
.gplant.is-other { fill: var(--muted); }
.gplant-ring { fill: none; stroke: var(--gas-other); stroke-width: 1.6; stroke-dasharray: 2.5 2; vector-effect: non-scaling-stroke; pointer-events: none; }
.pipe-label { font: 600 10px var(--font-data); fill: var(--ink-2); paint-order: stroke; stroke: var(--land-edge); stroke-width: 3px; stroke-linejoin: round; }
.pipe-label.is-fgt { fill: var(--ink); }
.legend-key.gas-key { height: 0 !important; background: none !important; border-top: 2.4px solid var(--gas-fgt); }
.legend-key.gas-key.is-other { border-top: 2px dashed var(--gas-other); }
.legend-dots { display: inline-flex; flex-wrap: wrap; gap: 4px 10px; }
.legend-dots .ld { display: inline-flex; align-items: center; gap: 4px; }
.legend-dots svg { flex: none; }
.card-ref { margin: 0 auto 0 10px; font: 500 0.72rem var(--font-data); letter-spacing: 0.04em; color: var(--muted); }
.ext-note { color: var(--ink-2); }
.report-quote { margin: 0.4rem 0 0.9rem; color: var(--ink); }
.ext-kicker { margin: 0.2rem 0 0.35rem; font: 600 0.72rem var(--font-data); letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
.repx { fill: none; stroke: var(--stress-3); stroke-width: 2.4; stroke-dasharray: 5 3; stroke-linecap: round; vector-effect: non-scaling-stroke; pointer-events: stroke; cursor: help; }
.legend-key.dashed-report { background: none !important; border-top: 2.4px dashed var(--stress-3); height: 0; }
.refs { margin: 0 0 18px; padding-left: 1.4em; display: grid; gap: 6px; font-size: 0.92rem; color: var(--ink-2); }
.refs a { color: var(--accent); text-decoration: none; }
.refs a:hover { text-decoration: underline; }
.ref-note { color: var(--muted); }
.home-link { margin-left: 6px; font-weight: 600; }
