:root {
  color-scheme: light;
  --bg: #fcfcfb;
  --surface: #ffffff;
  --surface-2: #f3f2ef;
  --border: #e2e0da;
  --grid: #ebe9e4;
  --text: #0b0b0b;
  --text-2: #52514e;
  --text-3: #7a7974;
  --accent: #2a78d6;
  --s1: #2a78d6;  /* blue */
  --s2: #eb6834;  /* orange */
  --s3: #1baf7a;  /* aqua */
  --neutral: #8a8984;
  --nodata: #e6e4df;
  --seq: #cde2fb,#9ec5f4,#6da7ec,#3987e5,#256abf,#184f95,#0d366b;
  --area-stroke: #ffffff;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #1a1a19; --surface: #222221; --surface-2: #2a2a28; --border: #3a3936; --grid: #31302d;
    --text: #f0efec; --text-2: #c3c2b7; --text-3: #94938b; --accent: #5598e7;
    --s1: #3987e5; --s2: #d95926; --s3: #199e70; --neutral: #8a8984; --nodata: #34332f;
    --seq: #184f95,#1c5cab,#256abf,#2a78d6,#5598e7,#86b6ef,#cde2fb;
    --area-stroke: #1a1a19;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #1a1a19; --surface: #222221; --surface-2: #2a2a28; --border: #3a3936; --grid: #31302d;
  --text: #f0efec; --text-2: #c3c2b7; --text-3: #94938b; --accent: #5598e7;
  --s1: #3987e5; --s2: #d95926; --s3: #199e70; --neutral: #8a8984; --nodata: #34332f;
  --seq: #184f95,#1c5cab,#256abf,#2a78d6,#5598e7,#86b6ef,#cde2fb;
  --area-stroke: #1a1a19;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
}
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
a { color: var(--accent); }
h1 { font-size: clamp(2rem, 5vw, 3rem); line-height: 1.1; margin: .2em 0 .4em; letter-spacing: -.02em; }
h2 { font-size: 1.35rem; margin: 0 0 .3em; letter-spacing: -.01em; }
h3 { font-size: 1rem; margin: .2em 0 .5em; color: var(--text-2); font-weight: 600; }
.eyebrow { color: var(--text-3); text-transform: uppercase; letter-spacing: .08em; font-size: .78rem; margin: 0; }
.hero { padding-top: 48px; padding-bottom: 24px; }
.lede { font-size: 1.12rem; max-width: 760px; color: var(--text-2); }
.links { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 20px; font-size: .95rem; }
section { padding: 32px 0; border-top: 1px solid var(--border); }
main > section:first-child { border-top: 0; padding-top: 16px; }
.sub { color: var(--text-2); max-width: 780px; margin: 0 0 16px; }
.note { color: var(--text-3); font-size: .82rem; margin-top: 6px; }

.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin-top: 24px; }
.tile { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; }
.tile .v { font-size: 1.7rem; font-weight: 650; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.tile .k { color: var(--text-2); font-size: .86rem; line-height: 1.35; }
.tiles.small { margin-top: 0; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.tiles.small .v { font-size: 1.35rem; }
.tile .d { font-size: .8rem; color: var(--text-3); margin-top: 2px; }

.scen-bar { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); border-top: 1px solid var(--border); }
.scen-inner { display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px; }
.scen-inner label { font-weight: 600; font-size: .9rem; }
.scen-desc { margin: 0; color: var(--text-2); font-size: .9rem; flex: 1 1 320px; }
select, button { font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--border);
  border-radius: 8px; padding: 6px 10px; max-width: 100%; }
select:focus-visible, button:focus-visible, input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.controls { display: flex; flex-wrap: wrap; gap: 10px 22px; align-items: center; margin-bottom: 12px; font-size: .92rem; }
.controls label { display: flex; align-items: center; gap: 8px; color: var(--text-2); }
.range input { width: 200px; max-width: 50vw; accent-color: var(--accent); }
.range output { font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; min-width: 3ch; }
.seg button { border-radius: 0; margin-left: -1px; }
.seg button:first-of-type { border-radius: 8px 0 0 8px; margin-left: 0; }
.seg button:last-of-type { border-radius: 0 8px 8px 0; }
.seg button[aria-checked="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }
.seg { display: inline-flex; align-items: center; gap: 0; }
.seg span { margin-right: 10px; color: var(--text-2); }

.map-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.map-fig { margin: 0; width: 100%; max-width: 470px; }
#map { width: 100%; height: auto; display: block; max-height: 74vh; }
#map path.ca { stroke: var(--area-stroke); stroke-width: .7; cursor: pointer; }
#map path.ca:hover, #map path.ca.sel { stroke: var(--text); stroke-width: 1.8; }
.legend { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: .8rem; color: var(--text-2); margin-top: 8px; }
.legend .ramp { display: flex; gap: 2px; }
.legend .ramp i { width: 34px; height: 10px; display: block; border-radius: 2px; }
.legend .labs { display: flex; width: 100%; justify-content: space-between; max-width: 260px; font-variant-numeric: tabular-nums; }
.legend .swatch { display: inline-flex; align-items: center; gap: 6px; }
.legend .swatch i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }

.panel { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 16px; min-height: 200px; font-size: .92rem; }
.panel h3 { color: var(--text); font-size: 1.15rem; margin: 0 0 4px; }
.panel .hint { color: var(--text-3); }
.panel dl { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; margin: 10px 0 14px; }
.panel dt { color: var(--text-2); }
.panel dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; font-weight: 550; }
.panel .bars { display: grid; grid-template-columns: minmax(0, 1fr) 120px auto; gap: 5px 8px; align-items: center; font-size: .85rem; }
.panel .bars .b { height: 8px; background: var(--grid); border-radius: 4px; position: relative; }
.panel .bars .b i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--neutral); border-radius: 4px; }
.panel .bars .cur { font-weight: 650; }
.panel .bars .cur .b i { background: var(--s1); }
.panel .bars .y { font-variant-numeric: tabular-nums; text-align: right; }

.chart { width: 100%; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart text { fill: var(--text-2); font-size: 12px; font-family: inherit; }
.chart .axis path, .chart .axis line { stroke: var(--border); }
.chart .grid line { stroke: var(--grid); }
.chart .grid path { display: none; }
.chart .lbl { fill: var(--text); font-size: 12px; }
.chart .muted { fill: var(--text-3); }
.chart .chart-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: .84rem; color: var(--text-2); margin-bottom: 6px; }
.chart .chart-legend span { display: inline-flex; align-items: center; gap: 6px; }
.chart .chart-legend i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.chart .chart-legend i.line { height: 2px; border-radius: 0; width: 16px; }
.chart .chart-legend i.dash { height: 0; border-top: 2px dashed; width: 16px; border-radius: 0; }

.two { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.notes ul { padding-left: 1.1em; margin: 0; color: var(--text-2); }
.notes li { margin: 0 0 .6em; }
.notes li strong { color: var(--text); font-weight: 600; }
.tag { display: inline-block; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; padding: 2px 8px; border-radius: 99px; margin-right: 6px; vertical-align: 2px; }
.tag.obs { background: color-mix(in srgb, var(--s3) 18%, transparent); color: var(--text); }
.tag.mod { background: color-mix(in srgb, var(--s2) 18%, transparent); color: var(--text); }

.tip { position: fixed; pointer-events: none; z-index: 50; background: var(--surface); color: var(--text); border: 1px solid var(--border);
  border-radius: 8px; padding: 8px 10px; font-size: .84rem; line-height: 1.4; box-shadow: 0 4px 18px rgba(0,0,0,.14); max-width: 260px; }
.tip b { font-weight: 650; }
.tip .r { display: flex; justify-content: space-between; gap: 14px; font-variant-numeric: tabular-nums; }
.tip .r span:first-child { color: var(--text-2); }

.foot { padding: 28px 16px 48px; color: var(--text-3); font-size: .85rem; border-top: 1px solid var(--border); }
code { font-size: .9em; background: var(--surface-2); padding: 1px 5px; border-radius: 4px; }

.mobile-only { display: none; }
@media (max-width: 820px) {
  .map-grid, .two { grid-template-columns: 1fr; }
  .scen-desc { display: none; }
  .mobile-only { display: block; }
  .scen-inner select { flex: 1; }
  .hero { padding-top: 28px; }
  .tile .v { font-size: 1.4rem; }
}
