/* Global Nitrogen Model — LISFLOOD × openWQ
   Identity: a hydrographic chart. Chart-paper surfaces, navy ink, hairline rules, square corners, condensed
   capitals for labels, monospaced figures. Two signal colours only: water (model, accent) and vermilion
   (observations, calibrated-basin outlines). Every colour is a token; light and dark sets below. */

:root {
  --font-ui: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-head: "Barlow Condensed", "Barlow", system-ui, sans-serif;
  --font-data: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --top: 52px;
  --r: 2px;

  /* light (default) */
  --bg: #f2f4f5;
  --surface: #ffffff;
  --surface-2: #e9edf0;
  --panel: rgba(255, 255, 255, 0.95);
  --fg: #0f1c25;
  --ink-rgb: 15, 28, 37;
  --muted: #4c5d69;
  --faint: #7f8e99;
  --line: #d3dae0;
  --line-strong: #a8b4bd;
  --accent: #0a6c93;
  --accent-ink: #ffffff;
  --accent-soft: rgba(10, 108, 147, 0.09);
  --obs: #c43e14;
  --model: #0a6c93;
  --model-2: #6d8797;
  --basin: #d64513;
  --basin-casing: #ffffff;
  --basin-hot: #0f1c25;
  --ok: #17784a;
  --warn: #9a5b00;
  --bad: #b3261e;
  --pin-a: #0072b2;
  --pin-b: #c0548f;
  --pin-c: #00855f;
  --space-0: #f2f4f5;
  --space-1: #dfe6ea;
  --tipbg: rgba(255, 255, 255, 0.97);
  --shadow: 0 1px 2px rgba(15, 28, 37, 0.06), 0 4px 18px rgba(15, 28, 37, 0.07);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0a1116; --surface: #0f181f; --surface-2: #142029; --panel: rgba(12, 19, 25, 0.93);
    --fg: #e3eaef; --ink-rgb: 227, 234, 239; --muted: #93a3ae; --faint: #5f717d; --line: #213039; --line-strong: #3a4c58;
    --accent: #52b4dc; --accent-ink: #061018; --accent-soft: rgba(82, 180, 220, 0.12);
    --obs: #ff8a5c; --model: #52b4dc; --model-2: #8aa0ad; --basin: #ff7a45; --basin-casing: #05080c; --basin-hot: #ffffff;
    --ok: #4cc38a; --warn: #e3a94b; --bad: #ff6b5e;
    --pin-a: #56b4e9; --pin-b: #e3a2c7; --pin-c: #3fc9a0; --space-0: #04070b; --space-1: #0c1520;
    --tipbg: rgba(6, 11, 15, 0.95); --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 6px 22px rgba(0, 0, 0, 0.35);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0a1116; --surface: #0f181f; --surface-2: #142029; --panel: rgba(12, 19, 25, 0.93);
  --fg: #e3eaef; --ink-rgb: 227, 234, 239; --muted: #93a3ae; --faint: #5f717d; --line: #213039; --line-strong: #3a4c58;
  --accent: #52b4dc; --accent-ink: #061018; --accent-soft: rgba(82, 180, 220, 0.12);
  --obs: #ff8a5c; --model: #52b4dc; --model-2: #8aa0ad; --basin: #ff7a45; --basin-casing: #05080c; --basin-hot: #ffffff;
  --ok: #4cc38a; --warn: #e3a94b; --bad: #ff6b5e;
  --pin-a: #56b4e9; --pin-b: #e3a2c7; --pin-c: #3fc9a0; --space-0: #04070b; --space-1: #0c1520;
  --tipbg: rgba(6, 11, 15, 0.95); --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 6px 22px rgba(0, 0, 0, 0.35);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
html { -webkit-text-size-adjust: 100%; }
body { background: var(--bg); color: var(--fg); font-family: var(--font-ui); font-size: 15px; line-height: 1.5; }
body[data-view="globe"] { overflow: hidden; height: 100vh; height: 100dvh; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
button { font: inherit; color: inherit; }
button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible, a:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--surface); padding: 6px 10px; }
.skip:focus { left: 8px; }
.muted { color: var(--muted); }
.mono { font-family: var(--font-data); font-variant-numeric: tabular-nums; }
sub, sup { line-height: 0; }

/* ───────────── top bar ───────────── */
.topbar {
  position: fixed; inset: 0 0 auto 0; height: var(--top); z-index: 20;
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 24px;
  padding: 0 max(16px, env(safe-area-inset-right, 0px)) 0 max(16px, env(safe-area-inset-left, 0px));
  background: var(--surface); border-bottom: 1px solid var(--line);
}
.brand { display: grid; grid-template-columns: 36px auto; grid-template-rows: auto auto; column-gap: 11px; align-items: center; color: var(--fg); text-decoration: none; }
/* the mark: UE-hydro's aqueduct carrying the model's components (nitrate, oxygen, phosphorus) */
.brand .mark { grid-row: 1 / 3; width: 36px; height: 36px; }
.brand .mark .aq-river { fill: none; stroke: #2A9DB0; stroke-width: 8; stroke-linecap: round; }
.brand .mark .aq-n { fill: #E4572E; } .brand .mark .aq-o { fill: #4E8FC4; } .brand .mark .aq-p { fill: #7B5EA7; }
.brand .mark .aq-body { fill: #17252E; }
.brand .mark .aq-wave { fill: none; stroke: #1D5A8C; stroke-width: 7; stroke-linecap: round; }
:root[data-mode="dark"] .brand .mark .aq-body { fill: #EEE9E0; }
:root[data-mode="dark"] .brand .mark .aq-wave { stroke: #4E8FC4; }
.brand .b1 { font: 600 17px/1 var(--font-head); letter-spacing: 0.02em; text-transform: uppercase; }
.brand .b2 { font: 400 11px/1.2 var(--font-data); color: var(--muted); letter-spacing: 0.01em; margin-top: 3px; }
.tabs { display: flex; gap: 2px; justify-self: center; height: 100%; }
.tabs a { display: flex; align-items: center; padding: 0 14px; height: 100%; color: var(--muted); text-decoration: none;
          font: 600 13px/1 var(--font-head); letter-spacing: 0.08em; text-transform: uppercase; border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs a:hover { color: var(--fg); }
.tabs a[aria-current="page"] { color: var(--fg); border-bottom-color: var(--basin); }
.themebtn { display: inline-flex; align-items: center; gap: 6px; background: transparent; border: 1px solid var(--line); border-radius: var(--r);
            padding: 5px 9px; cursor: pointer; font: 500 12px/1 var(--font-data); color: var(--muted); }
.themebtn:hover { color: var(--fg); border-color: var(--line-strong); }
.themebtn svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.4; }
.themebtn svg path { fill: currentColor; stroke: none; }
@media (max-width: 860px) {
  .brand .b2 { display: none; }
  .tabs a { padding: 0 9px; font-size: 12px; letter-spacing: 0.05em; }
  .topbar { gap: 10px; }
}
@media (max-width: 560px) {
  .brand { grid-template-columns: 30px; } .brand .mark { width: 30px; height: 30px; } .brand .b1 { display: none; }
  .themebtn span { display: none; }
  .tabs a { padding: 0 7px; font-size: 11.5px; letter-spacing: 0.03em; }
  .tabs .lg { display: none; }
  .topbar { gap: 6px; }
}


/* top bar: the component shown on every tab */
.compsel { position: relative; display: inline-block; }
.tools { display: flex; align-items: center; gap: 8px; }
/* the component chooser sits inside a title: same type as the title, dashed accent underline and chevron */
.compbtn { display: inline-flex; align-items: baseline; gap: 0.18em; background: transparent; border: 0; border-bottom: 2px dashed var(--accent);
           padding: 0 0.05em; margin: 0; cursor: pointer; color: inherit; font: inherit; letter-spacing: inherit; text-transform: inherit; line-height: inherit; }
.compbtn:hover, .compbtn[aria-expanded="true"] { color: var(--accent); border-bottom-style: solid; }
.compbtn .cv { font: inherit; }
.compbtn svg { width: 0.62em; height: 0.62em; stroke: var(--accent); fill: none; stroke-width: 2; align-self: center; }
.compmenu { position: fixed; z-index: 40; width: 320px; max-width: calc(100vw - 16px); max-height: calc(100vh - 120px); overflow: auto; background: var(--panel);
            text-transform: none; letter-spacing: normal; font: 400 13px/1.3 var(--font-ui); color: var(--fg); text-align: left;
border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); padding: 6px 6px 8px; }
.compmenu .cg { font: 600 10.5px/1 var(--font-head); text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin: 9px 8px 4px; }
.compmenu button { display: flex; width: 100%; align-items: baseline; gap: 8px; padding: 6px 8px; border: 0; background: transparent; color: var(--fg);
                   text-align: left; cursor: pointer; border-radius: var(--r); font: 500 13px/1.25 var(--font-ui); }
.compmenu button:hover:not(:disabled) { background: var(--surface-2); }
.compmenu button[aria-checked="true"] { background: var(--accent-soft); }
.compmenu button .sy { font: 400 11px/1 var(--font-data); color: var(--muted); }
.compmenu button .soon { margin-left: auto; flex: none; font: 500 10px/1 var(--font-data); color: var(--faint); border: 1px solid var(--line); border-radius: 3px; padding: 2px 5px; }
.compmenu button .on { margin-left: auto; flex: none; font: 500 10px/1 var(--font-data); color: var(--ok, #17784a); }
.compmenu button:disabled { color: var(--muted); cursor: default; }
.compmenu .cnote { margin: 9px 8px 0; font-size: 11.5px; color: var(--muted); line-height: 1.4; }
@media (max-width: 1180px) { .brand .b2 { display: none; } }
@media (max-width: 980px) { .brand .b1 { font-size: 15px; } }
@media (max-width: 860px) { .brand .b1 { display: none; } .brand { grid-template-columns: 32px; } .brand .mark { width: 32px; height: 32px; } }


/* ───────────── globe view (ported from the v6 viewer, re-skinned) ───────────── */
#view-globe #stage { position: fixed; inset: var(--top) 0 0 0; background: radial-gradient(120% 90% at 60% 40%, var(--space-1), var(--space-0) 70%); background-color: var(--space-0); }
#globe { width: 100%; height: 100%; display: block; cursor: grab; touch-action: none; }
#globe.dragging { cursor: grabbing; }
#gridlab, #pins, #btags { position: fixed; inset: 0; pointer-events: none; overflow: hidden; }
#btags { z-index: 1; }
#gridlab span { position: absolute; transform: translate(-50%, -50%); font-family: var(--font-data); font-size: 10.5px; color: var(--fg);
                text-shadow: 0 0 3px var(--space-0), 0 0 2px var(--space-0), 0 0 1px var(--space-0); white-space: nowrap; }
.pin { position: absolute; width: 20px; height: 20px; margin: -10px 0 0 -10px; border-radius: 50%; border: 2px solid var(--space-0);
       display: grid; place-items: center; font: 600 11px/1 var(--font-data); color: var(--space-0); box-shadow: 0 0 0 1.5px var(--fg), 0 2px 8px rgba(0,0,0,0.35); }
body:not([data-view="globe"]) #btags { display: none; }
.btag { position: absolute; transform: translate(-50%, -100%); pointer-events: auto; cursor: pointer;
        display: grid; gap: 1px; text-align: left; padding: 4px 8px 5px; border-radius: var(--r);
        background: var(--panel); color: var(--fg); border: 1px solid var(--basin); border-left-width: 3px; box-shadow: var(--shadow); white-space: nowrap; }
.btag b { font: 600 13px/1.1 var(--font-head); letter-spacing: 0.04em; text-transform: uppercase; }
.btag span { font: 400 10.5px/1.2 var(--font-data); color: var(--muted); }
.btag.below { transform: translate(-50%, 0); }
.btag:hover, .btag.hot { background: var(--basin); color: #fff; }
.btag:hover span, .btag.hot span { color: rgba(255,255,255,0.85); }

.panel {
  position: fixed; z-index: 2;
  top: calc(var(--top) + 14px); left: max(14px, env(safe-area-inset-left, 0px));
  width: min(356px, calc(100vw - 28px));
  max-height: calc(100% - var(--top) - var(--dock, 190px) - 26px);
  overflow: auto; overscroll-behavior: contain;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow);
  padding: 14px 16px 16px; display: grid; gap: 16px; scrollbar-width: thin;
}
.panel > header { position: relative; border-bottom: 1px solid var(--line); padding-bottom: 12px; }
.eyebrow { font: 500 10.5px/1.3 var(--font-data); text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.panel h1 { margin: 6px 0 0; font: 600 26px/1.02 var(--font-head); letter-spacing: 0.01em; text-transform: uppercase; }
.period { margin-top: 4px; font-family: var(--font-data); font-size: 12.5px; color: var(--fg); font-variant-numeric: tabular-nums; }
.facts { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12.5px; color: var(--muted); }
.facts b { color: var(--fg); font-weight: 500; font-family: var(--font-data); font-variant-numeric: tabular-nums; }
.label { font: 600 11px/1.2 var(--font-head); text-transform: uppercase; letter-spacing: 0.09em; color: var(--muted); margin-bottom: 7px; }
.seg { display: flex; flex-wrap: wrap; gap: 0; }
.seg button, .btn {
  font: 500 13px/1.2 var(--font-ui); color: var(--fg); background: var(--surface); cursor: pointer;
  border: 1px solid var(--line-strong); border-radius: 0; padding: 5px 10px; margin: 0 -1px -1px 0;
}
.seg button:first-child { border-radius: var(--r) 0 0 var(--r); }
.seg button:last-child { border-radius: 0 var(--r) var(--r) 0; }
.btn { border-radius: var(--r); margin: 0; }
.seg.small button, .btn.small { font-size: 12px; padding: 3px 8px; }
.seg button:hover, .btn:hover { background: var(--surface-2); }
.seg button[aria-pressed="true"] { background: var(--fg); color: var(--surface); border-color: var(--fg); position: relative; z-index: 1; }
.seg button:disabled { opacity: 0.4; cursor: not-allowed; }
/* base-map chooser: a small grid of swatch buttons */
.seg.basegrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
.seg.basegrid button { margin: 0; border-radius: var(--r); display: flex; align-items: center; gap: 6px; padding: 4px 7px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: left; }
.seg.basegrid button span:last-child { overflow: hidden; text-overflow: ellipsis; }
.bsw { flex: none; width: 13px; height: 13px; border-radius: 3px; box-shadow: inset 0 0 0 1px rgba(127, 127, 127, 0.45); }
.bsw-gray-light { background: linear-gradient(135deg, #fafaf8 50%, #cdd5da 50%); }
.bsw-gray-dark { background: linear-gradient(135deg, #4d5157 50%, #1b1f23 50%); }
.bsw-relief { background: linear-gradient(135deg, #7e8894 50%, #14304a 50%); }
.bsw-topo { background: linear-gradient(135deg, #6b9961 0 34%, #ccb176 34% 62%, #b5cfe3 62%); }
.bsw-satellite { background: linear-gradient(135deg, #46703c 0 30%, #a08a5c 30% 50%, #1d3b5e 50%); }
select { font: 13px/1.2 var(--font-ui); color: var(--fg); background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r); padding: 4px 6px; }
select option { background: var(--surface); color: var(--fg); }

.basins-box { border: 1px solid var(--line); border-left: 3px solid var(--basin); padding: 10px 12px; background: var(--surface); }
.basins-box .label { display: flex; justify-content: space-between; }
.basins-box .count { font-family: var(--font-data); font-weight: 400; letter-spacing: 0; text-transform: none; }
.basinlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.basinlist li { display: grid; grid-template-columns: 1fr auto auto auto; gap: 5px; align-items: center; font-size: 13px; padding: 3px 0; border-top: 1px dotted var(--line); }
.basinlist li:first-child { border-top: 0; }
.basinlist .bn { font-weight: 600; }
.basinlist .bm { display: block; font: 400 10.5px/1.3 var(--font-data); color: var(--muted); }
.basinlist button { font: 500 11.5px/1 var(--font-ui); background: transparent; border: 1px solid var(--line-strong); border-radius: var(--r); padding: 4px 7px; cursor: pointer; color: var(--fg); }
.basinlist button.open { background: var(--basin); border-color: var(--basin); color: #fff; }
.basinlist button.fc { border-color: var(--accent); color: var(--accent); }
.basinlist .fcs .stamp { font-size: 9.5px; padding: 1px 6px 1px 4px; gap: 3px; vertical-align: 1px; }
.basinlist .fcs .stamp svg { width: 10px; height: 10px; }
.basinlist button:hover { border-color: var(--fg); }
.basins-foot { display: flex; justify-content: space-between; gap: 8px; margin-top: 8px; font-size: 12px; color: var(--muted); }
.basins-foot label { display: flex; gap: 6px; align-items: center; cursor: pointer; }
.basins-foot input { accent-color: var(--basin); }

.legend-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.legend-title { font-size: 13px; font-weight: 600; }
.tag { font: 400 10.5px/1.4 var(--font-data); color: var(--muted); border: 1px solid var(--line); border-radius: var(--r); padding: 0 5px; white-space: nowrap; }
.legend canvas { display: block; width: 100%; }
.histwrap { position: relative; margin-top: 8px; }
#hist { height: 44px; }
.dual { position: relative; height: 16px; margin-top: -2px; }
.dual input { position: absolute; left: 0; top: 0; width: 100%; height: 16px; margin: 0; background: none; pointer-events: none; -webkit-appearance: none; appearance: none; }
.dual input::-webkit-slider-runnable-track { background: none; height: 16px; }
.dual input::-moz-range-track { background: none; }
.dual input::-webkit-slider-thumb { -webkit-appearance: none; pointer-events: auto; width: 10px; height: 16px; border-radius: 1px; background: var(--fg); border: 2px solid var(--surface); cursor: ew-resize; }
.dual input::-moz-range-thumb { pointer-events: auto; width: 6px; height: 12px; border-radius: 1px; background: var(--fg); border: 2px solid var(--surface); cursor: ew-resize; }
#bar { height: 12px; border-radius: 0; margin-top: 8px; }
.ticks { position: relative; height: 16px; margin-top: 3px; font-family: var(--font-data); font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.ticks span { position: absolute; top: 0; transform: translateX(-50%); white-space: nowrap; }
.ticks span::before { content: ""; position: absolute; left: 50%; top: -4px; width: 1px; height: 3px; background: var(--muted); }
.legend-ctl { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; font-size: 12px; color: var(--muted); }
.legend-ctl .grow { flex: 1; }
.anomrow { display: flex; align-items: center; gap: 10px; margin-top: 8px; font-size: 12px; color: var(--muted); }
.anomrow input { flex: 1; accent-color: var(--accent); }
.anomrow output { font-family: var(--font-data); color: var(--fg); font-size: 11.5px; min-width: 88px; text-align: right; }
.note { margin: 6px 0 0; font-size: 12px; line-height: 1.45; color: var(--muted); }
.keys { margin-top: 8px; display: grid; gap: 5px; font-size: 12px; line-height: 1.4; color: var(--muted); }
.keys div { display: grid; grid-template-columns: 22px 1fr; gap: 8px; align-items: center; }
.sw { width: 22px; height: 10px; border-radius: 0; }
.sw.hatch { background: repeating-linear-gradient(45deg, var(--muted) 0 1.2px, transparent 1.2px 5px), var(--surface-2); }
.sw.dryline { height: 3px; background: var(--faint); }
.sw.plainline { height: 2px; background: var(--muted); opacity: 0.45; }
.sw.width { height: 10px; background:
  linear-gradient(var(--fg), var(--fg)) 0 50% / 5px 1px no-repeat,
  linear-gradient(var(--fg), var(--fg)) 8px 50% / 5px 2.5px no-repeat,
  linear-gradient(var(--fg), var(--fg)) 16px 50% / 6px 4.5px no-repeat; }
.sw.iso { height: 10px; background: linear-gradient(90deg, #7a5dc7, #e8a33a); position: relative; }
.sw.iso::after { content: ""; position: absolute; left: 10px; top: 0; bottom: 0; width: 1.5px; background: rgba(0,0,0,0.75); }
.sw.flow { height: 4px; background: repeating-linear-gradient(90deg, #f2d36b 0 4px, #a65a2c 4px 10px); }
.readout { font-family: var(--font-data); font-size: 12.5px; line-height: 1.5; color: var(--fg); font-variant-numeric: tabular-nums; min-height: 38px; }
.readout .k { color: var(--muted); }
.readout .v { font-size: 15px; font-weight: 500; }
.pinlist { display: grid; gap: 6px; margin-top: 8px; }
.pinrow { display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; gap: 8px; align-items: center; font-family: var(--font-data); font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.pinrow .dot { width: 16px; height: 16px; border-radius: 50%; display: grid; place-items: center; color: var(--space-0); font-weight: 600; font-size: 10px; }
.pinrow .pv { color: var(--fg); font-weight: 500; }
.pinrow button { color: var(--muted); background: transparent; border: 0; cursor: pointer; padding: 2px 4px; font-size: 14px; line-height: 1; }
.pinrow button:hover { color: var(--fg); }
.view-grid { display: grid; gap: 10px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); }
.row > span:first-child { min-width: 96px; }
.checks { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 10px; font-size: 12.5px; color: var(--muted); }
.checks label { display: flex; align-items: center; gap: 6px; cursor: pointer; }
.checks label.off { opacity: 0.45; cursor: default; }
.checks input { accent-color: var(--accent); }
.row input[type=range] { flex: 1; min-width: 110px; accent-color: var(--accent); }
.row output { font-family: var(--font-data); font-size: 11.5px; color: var(--fg); min-width: 38px; text-align: right; }
.credit { font-size: 11px; line-height: 1.4; color: var(--faint); }
.panel details { border-top: 1px solid var(--line); padding-top: 10px; }
.panel summary { cursor: pointer; color: var(--fg); font: 600 12px/1.3 var(--font-head); text-transform: uppercase; letter-spacing: 0.07em; }
.panel details p, .panel details li { color: var(--muted); font-size: 12.5px; line-height: 1.5; }
.panel details p { margin: 8px 0 0; }
.panel details ul { margin: 6px 0 0; padding-left: 18px; }
.panel details li + li { margin-top: 3px; }

.nav { position: fixed; z-index: 2; top: calc(var(--top) + 14px); right: max(14px, env(safe-area-inset-right, 0px)); display: grid; justify-items: end; gap: 8px; }
.nav .btns { display: grid; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow); }
.nav button { font-size: 17px; line-height: 1; width: 38px; height: 38px; color: var(--fg); background: transparent; border: 0; cursor: pointer; display: grid; place-items: center; }
.nav button + button { border-top: 1px solid var(--line); }
.nav button:hover { background: var(--surface-2); }
.nav button svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.6; }
.nav button[aria-pressed="true"] { color: var(--accent); background: var(--accent-soft); }
.viewinfo { font-family: var(--font-data); font-size: 11px; color: var(--muted); background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 3px 7px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.hint { font-size: 11.5px; color: var(--muted); text-align: right; max-width: 210px; line-height: 1.35; text-shadow: 0 0 4px var(--space-0); }
.scalebar { display: grid; justify-items: end; gap: 2px; font-family: var(--font-data); font-size: 10.5px; color: var(--fg); font-variant-numeric: tabular-nums; text-shadow: 0 0 3px var(--space-0); }
.scalebar i { display: block; height: 5px; border: 1.5px solid var(--fg); border-top: 0; opacity: 0.85; }
/* base maps: the layers button in the toolbar opens this (the panel has the same chooser under Display) */
.basepop { position: fixed; z-index: 4; right: max(64px, calc(env(safe-area-inset-right, 0px) + 64px)); top: calc(var(--top) + 14px);
           width: 252px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); padding: 10px 10px 8px; }
.basepop .bp-h { font: 600 11px/1 var(--font-head); text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin: 0 2px 9px; }
.bp-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.bp-grid button { display: grid; justify-items: center; gap: 5px; padding: 5px 2px 6px; border: 1px solid transparent; border-radius: var(--r);
                  background: transparent; color: var(--muted); cursor: pointer; font: 500 11px/1.1 var(--font-ui); }
.bp-grid button .bsw { width: 62px; height: 44px; border-radius: 4px; background-repeat: no-repeat; }
.bp-grid button[aria-pressed="true"] { color: var(--fg); border-color: var(--accent); background: var(--accent-soft); }
.bp-grid button:hover:not(:disabled) { color: var(--fg); background: var(--surface-2); }
.bp-grid button:disabled { opacity: 0.45; cursor: default; }
body.present .basepop, body.touring .basepop { display: none; }
.help { position: fixed; z-index: 4; right: max(64px, calc(env(safe-area-inset-right, 0px) + 64px)); top: calc(var(--top) + 14px);
        width: min(300px, calc(100vw - 96px)); background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; box-shadow: var(--shadow);
        font-size: 12.5px; color: var(--muted); }
.help h2 { margin: 0 0 8px; font: 600 15px/1.2 var(--font-head); text-transform: uppercase; letter-spacing: 0.05em; color: var(--fg); }
.help dl { display: grid; grid-template-columns: auto 1fr; gap: 5px 12px; margin: 0; }
.help dt { font-family: var(--font-data); color: var(--fg); white-space: nowrap; }
.help dd { margin: 0; }

.dock {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 1;
  padding: 10px max(16px, env(safe-area-inset-right, 0px)) calc(10px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
  background: var(--panel); border-top: 1px solid var(--line);
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 16px; align-items: end;
}
#play { font-size: 15px; width: 42px; height: 42px; margin-bottom: 18px; border-radius: 50%; border: 1px solid var(--line-strong); background: var(--surface); color: var(--fg); cursor: pointer; display: grid; place-items: center; }
#play:hover { border-color: var(--fg); }
.track { position: relative; min-width: 0; }
.chart-cap { font-size: 11px; color: var(--muted); letter-spacing: 0.02em; margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#chart { display: block; width: 100%; height: 78px; overflow: visible; }
#day { -webkit-appearance: none; appearance: none; width: 100%; height: 18px; margin: 2px 0 0; background: transparent; cursor: pointer; }
#day::-webkit-slider-runnable-track { height: 2px; background: var(--line-strong); }
#day::-moz-range-track { height: 2px; background: var(--line-strong); }
#day::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; margin-top: -6px; border-radius: 50%; background: var(--accent); border: 2px solid var(--surface); }
#day::-moz-range-thumb { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); border: 2px solid var(--surface); }
.months { position: relative; height: 14px; font-family: var(--font-data); font-size: 10.5px; color: var(--muted); }
.months span { position: absolute; transform: translateX(-50%); white-space: nowrap; }
.months span[data-on="true"] { color: var(--accent); }
.when { margin-bottom: 14px; text-align: right; display: grid; gap: 6px; justify-items: end; }
.date { font-family: var(--font-data); font-size: 16px; font-weight: 500; white-space: nowrap; font-variant-numeric: tabular-nums; }
.interp { font-family: var(--font-data); font-size: 10.5px; color: var(--muted); white-space: nowrap; min-height: 14px; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.speed { display: flex; gap: 0; }
.speed button { font: 11px/1 var(--font-data); color: var(--muted); background: var(--surface); border: 1px solid var(--line); padding: 3px 6px; margin-right: -1px; cursor: pointer; }
.speed button[aria-pressed="true"] { color: var(--surface); background: var(--fg); border-color: var(--fg); }
.status { position: fixed; z-index: 3; left: 50%; transform: translateX(-50%); top: calc(var(--top) + 14px); max-width: min(440px, calc(100vw - 32px));
          font-family: var(--font-data); font-size: 12px; color: var(--muted); background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 4px 8px; }
.caprow { display: flex; align-items: baseline; gap: 8px; min-width: 0; margin-bottom: 2px; }
.caprow .chart-cap { flex: 1; min-width: 0; margin: 0; }
.mini { font: 11px/1.3 var(--font-ui); color: var(--muted); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 1px 6px; cursor: pointer; white-space: nowrap; }
.mini:hover { color: var(--fg); border-color: var(--line-strong); }
.mini[aria-pressed="true"] { color: var(--surface); background: var(--fg); border-color: var(--fg); }
.hovwrap { position: relative; height: 96px; margin: 2px 0 4px; }
#hov { display: block; width: 100%; height: 100%; cursor: ew-resize; touch-action: none; background: var(--surface-2); }
#chart { cursor: ew-resize; touch-action: none; }
.hovlab { position: absolute; inset: 0; pointer-events: none; font-family: var(--font-data); font-size: 10px; color: var(--fg); }
.hovlab span { position: absolute; left: 3px; transform: translateY(-50%); text-shadow: 0 0 3px var(--space-0), 0 0 2px var(--space-0); }
.hovcur { position: absolute; top: 0; bottom: 0; width: 1.5px; margin-left: -0.75px; background: var(--accent); pointer-events: none; }
.hovlat { position: absolute; left: 0; right: 0; height: 0; border-top: 1px dashed var(--accent); pointer-events: none; }
.hovread { position: absolute; top: 3px; right: 4px; font-family: var(--font-data); font-size: 10.5px; color: var(--fg); background: var(--tipbg); padding: 1px 5px; pointer-events: none; white-space: nowrap; font-variant-numeric: tabular-nums; }
.card { position: fixed; z-index: 2; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); }
.prof { right: max(14px, env(safe-area-inset-right, 0px)); bottom: calc(var(--dock, 190px) + 8px); width: min(470px, calc(100vw - 28px)); padding: 10px 12px 8px; display: grid; gap: 4px; }
.cardhead { display: flex; align-items: center; gap: 8px; font-size: 13px; min-width: 0; }
.cardhead .t { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.cardhead .dot { width: 16px; height: 16px; border-radius: 50%; display: grid; place-items: center; color: var(--space-0); font: 600 10px/1 var(--font-data); flex: none; }
.cardhead .x { color: var(--muted); background: transparent; border: 0; cursor: pointer; padding: 2px 4px; font-size: 15px; line-height: 1; }
.cardhead .x:hover { color: var(--fg); }
#profcv { display: block; width: 100%; height: 138px; cursor: crosshair; touch-action: none; }
.cardfoot { font-family: var(--font-data); font-size: 11px; color: var(--muted); min-height: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.pmark { position: fixed; z-index: 1; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; border: 2px solid var(--fg); box-shadow: 0 0 0 2px var(--space-0); pointer-events: none; }
.tourcard { left: max(14px, env(safe-area-inset-left, 0px)); bottom: calc(var(--dock, 190px) + 8px); width: min(420px, calc(100vw - 28px)); padding: 12px 14px; display: grid; gap: 6px; }
.tourcard .tc-top { display: flex; align-items: center; gap: 6px; }
.tourcard .grow { flex: 1; }
.tourcard h2 { margin: 0; font: 600 24px/1.05 var(--font-head); text-transform: uppercase; letter-spacing: 0.02em; text-wrap: balance; }
.tc-facts { display: grid; gap: 3px; font-size: 12.5px; line-height: 1.45; color: var(--muted); }
.tc-facts b { color: var(--fg); font-weight: 500; font-family: var(--font-data); font-variant-numeric: tabular-nums; }
.tc-note { margin: 0; font-size: 11px; color: var(--faint); line-height: 1.4; }
.tip { position: fixed; z-index: 5; pointer-events: none; display: flex; align-items: center; gap: 6px; font-family: var(--font-data); font-size: 12px; color: var(--fg);
       background: var(--tipbg); border: 1px solid var(--line); border-radius: var(--r); padding: 3px 7px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tip i { width: 10px; height: 10px; box-shadow: 0 0 0 1px var(--line-strong); }
.barwrap { position: relative; }
.barmark { position: absolute; top: 3px; width: 0; height: 0; margin-left: -5px; border: 5px solid transparent; border-top-color: var(--fg); border-bottom: 0; pointer-events: none; }
body.present .panel { width: min(330px, calc(100vw - 28px)); gap: 10px; }
body.present .panel > :not(header):not(.legend), body.present .facts, body.present .histwrap, body.present .legend-ctl,
body.present .note, body.present .keys, body.present .anomrow, body.present .collapse, body.present .hint, body.present .viewinfo { display: none !important; }
@media (max-width: 960px) {
  .prof { bottom: auto; top: calc(var(--top) + 14px); right: max(64px, calc(env(safe-area-inset-right, 0px) + 64px)); width: min(420px, calc(100vw - 96px)); }
  body.touring .prof { display: none; }
}
.collapse { display: none; position: absolute; top: -2px; right: 0; font: 11.5px/1.3 var(--font-ui); color: var(--muted); background: var(--surface);
            border: 1px solid var(--line); border-radius: var(--r); padding: 3px 8px; cursor: pointer; }
@media (max-width: 720px) {
  .panel { top: auto; bottom: calc(var(--dock, 190px) + 6px); max-height: 44%; width: calc(100vw - 28px); gap: 12px; padding: 12px; }
  .tourcard { bottom: auto; top: calc(var(--top) + 14px); width: calc(100vw - 108px - env(safe-area-inset-right, 0px)); padding: 10px 12px; gap: 4px; }
  .tourcard h2 { font-size: 19px; }
  .tc-facts { font-size: 11.5px; line-height: 1.35; }
  .tc-note { display: none; }
  .tip { display: none; }
  .hovwrap { height: 70px; }
  .collapse { display: block; }
  .panel.collapsed { gap: 8px; }
  .panel.collapsed > :not(header):not(.legend):not(.basins-box), .panel.collapsed .period, .panel.collapsed .eyebrow,
  .panel.collapsed .keys, .panel.collapsed .tag, .panel.collapsed .histwrap, .panel.collapsed .legend-ctl,
  .panel.collapsed .note, .panel.collapsed .anomrow, .panel.collapsed .basins-foot { display: none; }
  .panel.collapsed h1 { font-size: 17px; margin: 0; padding-right: 110px; }
  .panel.collapsed .legend-title { font-size: 11.5px; }
  .panel h1 { font-size: 21px; }
  .facts, .hint, .viewinfo { display: none; }
  .dock { grid-template-columns: auto minmax(0, 1fr); gap: 6px 10px; }
  .when { grid-column: 1 / -1; grid-row: 1; justify-items: start; text-align: left; margin-bottom: 0; grid-template-columns: auto auto; align-items: baseline; }
  #play { margin-bottom: 14px; }
  #chart { height: 56px; }
  .speed { display: none; }
  .date { font-size: 13px; }
  .help { right: 64px; }
  .btag span { display: none; }
}

/* ───────────── document pages (catalogue, basin dossier, model & data) ───────────── */
body:not([data-view="globe"]) #view-globe { display: none; }
main { outline: none; }
.page { padding: calc(var(--top) + 28px) 0 64px; min-height: 100vh; }
.wrap { width: min(1320px, calc(100vw - 32px)); margin: 0 auto; }
.pagehead { border-bottom: 2px solid var(--fg); padding-bottom: 18px; margin-bottom: 22px; }
.kicker { margin: 0 0 6px; font: 500 11.5px/1.3 var(--font-data); text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.pagehead h1, .dz-title { margin: 0; font: 600 clamp(32px, 4.4vw, 52px)/0.98 var(--font-head); text-transform: uppercase; letter-spacing: 0.01em; }
.dz-title small { display: block; margin-top: 6px; font: 500 clamp(16px, 1.8vw, 21px)/1.2 var(--font-head); letter-spacing: 0.04em; color: var(--muted); }
.lede { max-width: 78ch; margin: 12px 0 0; color: var(--muted); font-size: 16px; }
.crumbs { font: 400 12px/1.3 var(--font-data); color: var(--muted); margin-bottom: 10px; }
.crumbs a { color: var(--muted); }
h2.sec { display: flex; align-items: baseline; gap: 12px; margin: 40px 0 14px; padding-top: 10px; border-top: 1px solid var(--line-strong);
         font: 600 22px/1.1 var(--font-head); text-transform: uppercase; letter-spacing: 0.04em; }
h2.sec .no { font: 500 12px/1 var(--font-data); color: var(--basin); letter-spacing: 0; }
h3 { margin: 0 0 8px; font: 600 15px/1.2 var(--font-head); text-transform: uppercase; letter-spacing: 0.06em; }

/* catalogue cards */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 1fr)); gap: 16px; }
.bcard { display: grid; grid-template-columns: 120px 1fr; gap: 14px; padding: 14px; background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--basin);
         color: var(--fg); text-decoration: none; transition: border-color 0.15s; }
.bcard:hover { border-color: var(--line-strong); border-top-color: var(--basin); box-shadow: var(--shadow); }
.bcard svg { width: 120px; height: 120px; }
.bcard svg .ol { fill: var(--accent-soft); stroke: var(--fg); stroke-width: 1.2; vector-effect: non-scaling-stroke; }
.bcard svg .op { fill: var(--basin); }
.bcard h2 { margin: 0; font: 600 26px/1 var(--font-head); text-transform: uppercase; letter-spacing: 0.02em; }
.bcard .out { margin: 2px 0 8px; color: var(--muted); font-size: 13px; }
.bcard dl { display: grid; grid-template-columns: auto 1fr; gap: 1px 10px; margin: 0 0 10px; font-size: 12.5px; }
.bcard dt { color: var(--muted); }
.bcard dd { margin: 0; font-family: var(--font-data); font-variant-numeric: tabular-nums; }
.runchips { display: grid; gap: 4px; }
.chip { display: inline-flex; align-items: center; gap: 6px; font: 500 11.5px/1.25 var(--font-ui); padding: 3px 7px; border: 1px solid var(--line-strong); background: var(--surface); }
.chip .k { font-family: var(--font-data); color: var(--muted); margin-left: auto; padding-left: 8px; }
.status-dot { width: 8px; height: 8px; flex: none; border-radius: 50%; background: var(--faint); }
.st-complete .status-dot { background: var(--ok); }
.st-cancelled .status-dot { background: var(--bad); }
.st-smoke .status-dot { background: var(--model-2); }
.st-in-progress .status-dot { background: var(--warn); }
.st-unconverged .status-dot { background: var(--accent); }
.legend-status { margin-top: 28px; padding-top: 14px; border-top: 1px solid var(--line); display: grid; gap: 6px; font-size: 13px; color: var(--muted); max-width: 100ch; }
.legend-status div { display: grid; grid-template-columns: 150px 1fr; gap: 10px; }
.legend-status b { color: var(--fg); display: inline-flex; gap: 6px; align-items: center; font-weight: 600; }

/* dossier */
.dz-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: end; border-bottom: 2px solid var(--fg); padding-bottom: 16px; }
.dz-loc { margin: 10px 0 0; color: var(--muted); max-width: 80ch; }
.factgrid { display: grid; grid-template-columns: repeat(3, auto); gap: 6px 26px; margin: 0; }
.factgrid div { display: grid; }
.factgrid dt { font: 600 10.5px/1.2 var(--font-head); text-transform: uppercase; letter-spacing: 0.09em; color: var(--muted); }
.factgrid dd { margin: 0; font: 500 18px/1.2 var(--font-data); font-variant-numeric: tabular-nums; }
.runbar { margin-top: 18px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px 28px; align-items: start; }
.runbar .seg button { font-size: 13.5px; padding: 7px 12px; display: inline-flex; align-items: center; gap: 7px; }
.runbar .seg button .status-dot { background: currentColor; opacity: 0.85; }
.runnote { grid-column: 1 / -1; display: grid; grid-template-columns: 4px 1fr; gap: 0 14px; background: var(--surface); border: 1px solid var(--line); padding: 12px 14px 12px 0; }
.runnote::before { content: ""; background: var(--model-2); }
.runnote.k-cancelled::before { background: var(--bad); }
.runnote.k-complete::before { background: var(--ok); }
.runnote.k-in-progress::before { background: var(--warn); }
.runnote.k-unconverged::before { background: var(--accent); }
.runnote p { margin: 0; font-size: 14px; }
.runnote .src { margin-top: 6px; font: 400 11.5px/1.45 var(--font-data); color: var(--muted); word-break: break-word; }
.badge { display: inline-block; font: 600 10.5px/1.5 var(--font-head); text-transform: uppercase; letter-spacing: 0.09em; padding: 0 6px; border: 1px solid currentColor; margin-right: 8px; vertical-align: 1px; }
.badge.cancelled { color: var(--bad); } .badge.smoke { color: var(--model-2); } .badge.complete { color: var(--ok); } .badge.in-progress { color: var(--warn); } .badge.unconverged { color: var(--accent); }
.kpis { display: grid; grid-template-columns: repeat(4, auto); gap: 4px 20px; }
.kpi dt { font: 600 10.5px/1.2 var(--font-head); text-transform: uppercase; letter-spacing: 0.09em; color: var(--muted); }
.kpi dd { margin: 0; font: 500 22px/1.15 var(--font-data); font-variant-numeric: tabular-nums; }
.kpi dd small { font-size: 12px; color: var(--muted); }
.fitbar { grid-column: 1 / -1; display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; align-items: center; }
.fitbar .label { margin: 0; }
.fitbar .seg button { font-size: 13px; padding: 6px 10px; }
.fitnote { grid-column: 1 / -1; margin: 0; font-size: 13px; color: var(--muted); }
.fitnote.warn { color: var(--fg); border-left: 4px solid var(--warn); background: var(--surface); padding: 8px 12px; }
@media (max-width: 640px) { .fitbar { grid-template-columns: 1fr; } }

.grid2 { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 18px; margin-top: 18px; }
.grid2.even { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.fig { margin: 0; background: var(--surface); border: 1px solid var(--line); display: grid; grid-template-rows: auto 1fr auto; min-width: 0; }
.fig > .fighead { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 9px 12px; border-bottom: 1px solid var(--line); }
.fig > .fighead .ft { font: 600 13px/1.2 var(--font-head); text-transform: uppercase; letter-spacing: 0.07em; margin-right: auto; }
.fig > .fighead .ft .no { color: var(--basin); font-family: var(--font-data); font-weight: 500; letter-spacing: 0; margin-right: 6px; }
.fig figcaption { padding: 8px 12px 10px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--muted); line-height: 1.45; }
.fig .body { position: relative; min-height: 0; }
.mapsvg { display: block; width: 100%; height: 520px; background: var(--surface-2); cursor: grab; touch-action: none; user-select: none; }
.mapsvg.dragging { cursor: grabbing; }
.mapsvg .z { stroke: var(--surface); stroke-width: 0.8; vector-effect: non-scaling-stroke; }
.mapsvg .z.ug { fill: var(--surface); fill-opacity: 0.6; }
.mapsvg .z:hover { stroke: var(--fg); stroke-width: 1.6; }
.mapsvg .ol { fill: none; stroke: var(--fg); stroke-width: 1.4; vector-effect: non-scaling-stroke; }
.mapsvg .rv { fill: none; stroke: var(--model); stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.mapsvg .st { stroke: var(--surface); stroke-width: 1.2; vector-effect: non-scaling-stroke; cursor: pointer; }
.mapsvg .st.nt { fill: var(--surface); stroke: var(--muted); stroke-width: 1; }
.mapsvg .st.ns { fill: var(--surface); stroke: var(--faint); stroke-dasharray: 2 1.5; }
.mapsvg .st.sel { stroke: var(--fg); stroke-width: 2.6; }
.mapsvg .outlet { fill: var(--basin); stroke: var(--surface); stroke-width: 1.2; vector-effect: non-scaling-stroke; }
.mapctl { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 12px; color: var(--muted); }
.maplegend { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; padding: 8px 12px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.maplegend .sc { display: inline-flex; align-items: center; gap: 6px; }
.maplegend .ramp { width: 140px; height: 9px; }
.maplegend .tk { display: flex; justify-content: space-between; width: 140px; font: 10px/1 var(--font-data); }
.zoombtns { position: absolute; right: 10px; top: 10px; display: grid; border: 1px solid var(--line-strong); background: var(--surface); }
.zoombtns button { width: 30px; height: 28px; border: 0; background: transparent; cursor: pointer; font-size: 15px; }
.zoombtns button + button { border-top: 1px solid var(--line); }
.zoombtns button:hover { background: var(--surface-2); }

.tablewrap { overflow: auto; max-height: 520px; }
table.data { border-collapse: collapse; width: 100%; font-size: 12.5px; font-variant-numeric: tabular-nums; }
table.data th { position: sticky; top: 0; z-index: 1; background: var(--surface); text-align: right; font: 600 10.5px/1.2 var(--font-head); text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted);
                padding: 7px 8px; border-bottom: 1px solid var(--line-strong); white-space: nowrap; cursor: pointer; user-select: none; }
table.data th:first-child, table.data td:first-child { text-align: left; }
table.data th[aria-sort] { color: var(--fg); }
table.data th[aria-sort="ascending"]::after { content: " ▲"; font-size: 8px; }
table.data th[aria-sort="descending"]::after { content: " ▼"; font-size: 8px; }
table.data td { padding: 5px 8px; border-bottom: 1px solid var(--line); text-align: right; font-family: var(--font-data); white-space: nowrap; }
table.data td.txt { font-family: var(--font-ui); text-align: left; white-space: normal; }
table.data tbody tr { cursor: pointer; }
table.data tbody tr:hover td { background: var(--surface-2); }
table.data tbody tr.sel td { background: var(--accent-soft); }
table.data tbody tr.sel td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
table.data tr.dim td { color: var(--faint); }
.kgecell { display: inline-flex; align-items: center; gap: 6px; justify-content: flex-end; }
.kgecell i { width: 10px; height: 10px; display: inline-block; }
.chartsvg { display: block; width: 100%; height: 400px; }
.chartsvg text { font-family: var(--font-data); font-size: 10.5px; fill: var(--muted); }
.chartsvg .ax { stroke: var(--line-strong); }
.chartsvg .gd { stroke: var(--line); }
.chartsvg .one { stroke: var(--fg); stroke-dasharray: 4 3; opacity: 0.6; }
.chartsvg .pt { fill: var(--model-2); fill-opacity: 0.55; }
.chartsvg .pt.on { fill: var(--obs); fill-opacity: 1; stroke: var(--surface); stroke-width: 0.8; }
.chartsvg .obs { fill: var(--obs); stroke: var(--surface); stroke-width: 1; }
.chartsvg .sim { fill: none; stroke: var(--model); stroke-width: 1.8; stroke-linejoin: round; }
.chartsvg .uband { fill: var(--model); fill-opacity: 0.14; stroke: var(--model); stroke-opacity: 0.25; stroke-width: 0.6; }
.chartsvg .simpt { fill: var(--surface); stroke: var(--model); stroke-width: 1.5; }
.chartsvg .simdash { fill: none; stroke: var(--model); stroke-width: 1; stroke-dasharray: 3 3; opacity: 0.7; }
.chartsvg .spin { fill: var(--surface-2); }
.chartsvg .lab { fill: var(--fg); font-family: var(--font-ui); font-size: 12px; }
.chartsvg .cap { fill: var(--muted); font-family: var(--font-ui); font-size: 11.5px; }
.chartsvg .hl { stroke: var(--fg); stroke-width: 1; opacity: 0.5; }
.chartsvg .hov { fill: none; stroke: var(--fg); stroke-width: 1.5; }
.serieskey { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 12px; color: var(--muted); }
.serieskey span { display: inline-flex; align-items: center; gap: 6px; }
.serieskey i.o { width: 8px; height: 8px; border-radius: 50%; background: var(--obs); }
.serieskey i.m { width: 18px; height: 2px; background: var(--model); }
.serieskey i.ub { width: 18px; height: 10px; background: var(--model); opacity: 0.22; }
.serieskey i.md { width: 18px; height: 0; border-top: 1.5px dashed var(--model); }
.serieskey i.sp { width: 14px; height: 10px; background: var(--surface-2); border: 1px solid var(--line); }
.statsline { font: 400 12px/1.4 var(--font-data); color: var(--muted); }
.statsline b { color: var(--fg); font-weight: 500; }
.empty { display: grid; place-items: center; min-height: 240px; padding: 24px; color: var(--muted); font-size: 14px; text-align: center; }

/* configuration */
.cfg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.cfg article { background: var(--surface); border: 1px solid var(--line); padding: 14px 16px; min-width: 0; }
.cfg article.wide { grid-column: span 2; }
.cfg article.full { grid-column: 1 / -1; }
.kv { display: grid; grid-template-columns: minmax(110px, auto) 1fr; gap: 4px 14px; margin: 0; font-size: 13px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.kv dd code, code { font: 12px/1.4 var(--font-data); }
.netsvg { display: block; width: 100%; height: auto; }
.netsvg .node rect { fill: var(--surface); stroke: var(--fg); stroke-width: 1.2; }
.netsvg .node.sink rect { fill: var(--surface-2); stroke: var(--muted); stroke-dasharray: 3 2; }
.netsvg .node.src rect { fill: var(--surface-2); stroke: var(--muted); }
.netsvg .node text { font: 600 12px/1 var(--font-data); fill: var(--fg); }
.netsvg .edge { fill: none; stroke: var(--model); stroke-width: 1.4; }
.netsvg .edge.o2 { stroke: var(--model-2); stroke-dasharray: 2 2; }
.netsvg .edge:hover { stroke-width: 2.6; }
.netsvg .elab { font: 10px/1 var(--font-data); fill: var(--muted); paint-order: stroke; stroke: var(--surface); stroke-width: 4px; stroke-linejoin: round; }
.fwtabs { margin-bottom: 10px; }
.trlist { margin: 10px 0 0; padding: 0; list-style: none; display: grid; gap: 4px; font-size: 12.5px; }
.trlist li { display: grid; grid-template-columns: 200px 1fr; gap: 10px; padding: 4px 0; border-top: 1px dotted var(--line); }
.trlist .nm { font: 500 11.5px/1.35 var(--font-data); }
.trlist .ds { color: var(--muted); }
.trlist details { grid-column: 1 / -1; }
.trlist summary { cursor: pointer; font-size: 11.5px; color: var(--accent); }
.trlist pre { margin: 4px 0 0; padding: 8px; background: var(--surface-2); font: 11px/1.45 var(--font-data); white-space: pre-wrap; word-break: break-all; }
.bars { display: grid; gap: 5px; margin-top: 8px; }
.bars .b { display: grid; grid-template-columns: minmax(120px, 1.4fr) 2fr 52px; gap: 8px; align-items: center; font-size: 12px; }
.bars .b .t { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bars .b .v { font-family: var(--font-data); text-align: right; }
.bars .track2 { position: relative; height: 12px; background: var(--surface-2); }
.bars .track2 i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--basin); }
.bars .track2 u { position: absolute; left: 0; top: 4px; height: 4px; background: var(--fg); opacity: 0.55; text-decoration: none; }
.ptable td.dif { color: var(--fg); font-weight: 500; }
.ptable td.same { color: var(--faint); }
.rng { display: block; position: relative; height: 6px; width: 110px; background: var(--surface-2); margin-left: auto; }
.rng i { position: absolute; top: -2px; width: 2px; height: 10px; background: var(--muted); }
.rng b { position: absolute; top: -3px; width: 8px; height: 12px; margin-left: -4px; background: var(--accent); }

/* downloads */
.dl { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 12px; }
.dl a.file { display: grid; grid-template-columns: 36px 1fr auto; gap: 12px; align-items: center; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line);
             color: var(--fg); text-decoration: none; }
.dl a.file:hover { border-color: var(--fg); }
.dl .ic { width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid var(--line-strong); font: 600 10px/1 var(--font-data); color: var(--muted); }
.dl .fn { font: 500 12.5px/1.3 var(--font-data); overflow-wrap: anywhere; }
.dl .fw { font-size: 12.5px; color: var(--muted); }
.dl .sz { font: 400 11.5px/1 var(--font-data); color: var(--muted); }
details.files { margin-top: 14px; }
details.files summary { cursor: pointer; font: 600 12px/1.3 var(--font-head); text-transform: uppercase; letter-spacing: 0.07em; }
details.files ul { margin: 8px 0 0; padding: 0; list-style: none; columns: 2 380px; column-gap: 24px; }
details.files li { break-inside: avoid; padding: 3px 0; font-size: 12.5px; display: grid; grid-template-columns: 1fr auto; gap: 8px; border-bottom: 1px dotted var(--line); }
details.files li span { color: var(--muted); font-family: var(--font-data); font-size: 11px; }

/* prose (model & data) */
.prose { max-width: 920px; }
.prose h2 { margin: 36px 0 10px; font: 600 24px/1.1 var(--font-head); text-transform: uppercase; letter-spacing: 0.04em; border-top: 1px solid var(--line-strong); padding-top: 12px; }
.prose p, .prose li { font-size: 15.5px; line-height: 1.6; }
.prose li + li { margin-top: 4px; }
.prose dl { display: grid; grid-template-columns: 180px 1fr; gap: 6px 18px; }
.prose dt { font-weight: 600; }
.prose dd { margin: 0; color: var(--muted); }
.callout { border: 1px solid var(--line); border-left: 4px solid var(--basin); background: var(--surface); padding: 12px 16px; margin: 16px 0; }

.tip2 { position: fixed; z-index: 30; pointer-events: none; max-width: 320px; background: var(--tipbg); color: var(--fg); border: 1px solid var(--line-strong); box-shadow: var(--shadow);
        padding: 6px 9px; font: 12px/1.45 var(--font-ui); }
.tip2 b { font-family: var(--font-data); font-weight: 500; }
.tip2 .t { font: 600 12px/1.3 var(--font-head); text-transform: uppercase; letter-spacing: 0.06em; display: block; margin-bottom: 2px; }
.err { border: 1px solid var(--bad); color: var(--bad); padding: 12px 14px; background: var(--surface); }

@media (max-width: 1080px) {
  .grid2, .grid2.even { grid-template-columns: minmax(0, 1fr); }
  .cfg { grid-template-columns: minmax(0, 1fr); }
  .cfg article.wide { grid-column: auto; }
  .dz-head { grid-template-columns: minmax(0, 1fr); }
  .runbar { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .factgrid { grid-template-columns: repeat(2, auto); }
  .kpis { grid-template-columns: repeat(2, auto); }
  .mapsvg { height: 380px; }
  .chartsvg { height: 320px; }
  .bcard { grid-template-columns: 80px 1fr; } .bcard svg { width: 80px; height: 80px; }
  .trlist li { grid-template-columns: 1fr; }
  .legend-status div { grid-template-columns: 1fr; }
  .prose dl { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ───────────── forecasts ───────────── */
.stamp { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px 3px 6px; border-radius: 3px; font: 600 11.5px/1.1 var(--font-head);
  text-transform: uppercase; letter-spacing: 0.08em; color: #fff; white-space: nowrap; vertical-align: middle; }
.stamp svg { width: 13px; height: 13px; }
.stamp.ok { background: #17784a; }
.stamp.no { background: #b3261e; }
.stamp.big { font-size: 13px; padding: 5px 12px 5px 8px; }
.stamp.big svg { width: 15px; height: 15px; }
.okc { color: #17784a; } .noc { color: #b3261e; }
:root[data-mode="dark"] .okc { color: var(--ok); } :root[data-mode="dark"] .noc { color: var(--bad); }
.fc-exp { margin-left: 8px; font: 500 11px/1 var(--font-data); text-transform: uppercase; letter-spacing: 0.08em; color: var(--warn);
  border: 1px solid currentColor; padding: 4px 7px; vertical-align: middle; }
.fc-cycle { margin: 12px 0 0; font: 400 13px/1.4 var(--font-data); color: var(--muted); }
.fc-cycle b { color: var(--fg); font-weight: 500; }
.fcard { display: grid; gap: 6px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--accent);
  color: inherit; text-decoration: none; min-width: 0; }
.fcard:hover { border-color: var(--line-strong); border-top-color: var(--accent); box-shadow: var(--shadow); }
.fc-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.fc-top h2 { margin: 0; font: 600 26px/1 var(--font-head); text-transform: uppercase; letter-spacing: 0.02em; }
.fc-sub { margin: 0; color: var(--muted); font-size: 13px; }
.fc-mini svg.mini { display: block; width: 100%; height: 74px; margin: 4px 0 6px; background: var(--surface-2); }
svg.mini .band { fill: var(--accent); fill-opacity: 0.18; }
svg.mini .env { fill: var(--accent); fill-opacity: 0.07; stroke: var(--accent); stroke-opacity: 0.25; stroke-width: 0.6; stroke-dasharray: 2 2; }
svg.mini .an { fill: none; stroke: var(--fg); stroke-width: 1.4; vector-effect: non-scaling-stroke; }
svg.mini .med { fill: none; stroke: var(--accent); stroke-width: 2; vector-effect: non-scaling-stroke; }
svg.mini .now { stroke: var(--line-strong); stroke-dasharray: 3 3; vector-effect: non-scaling-stroke; }
.fc-nums { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0; }
.fc-nums div { display: grid; }
.fc-nums dt { font: 600 10.5px/1.2 var(--font-head); text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.fc-nums dd { margin: 0; font: 500 19px/1.2 var(--font-data); font-variant-numeric: tabular-nums; }
.fc-st { margin: 4px 0 0; font-size: 12px; color: var(--muted); }
.fc-note { margin: 16px 0; }
.fc-ctl { display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: end; margin: 0 0 14px; }
.fc-day { min-width: min(100%, 360px); }
.fc-dayrow { display: flex; align-items: center; gap: 10px; }
.fc-day input { width: 260px; max-width: calc(100vw - 110px); vertical-align: middle; accent-color: var(--accent); }
.fc-day output { display: block; margin-top: 4px; font: 500 13px/1 var(--font-data); }
.fc-day output[data-phase="forecast"], .when[data-phase="forecast"] .interp { color: var(--accent); }
.fc-play { flex: none; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line-strong); background: var(--surface); color: var(--fg); cursor: pointer; font-size: 13px; display: grid; place-items: center; }
.fc-play:hover { border-color: var(--fg); }
.fc-mapbox { background: var(--surface); position: relative; overflow: hidden; }
.fc-mapbox canvas { display: block; width: 100%; touch-action: none; }
.mapzoom { position: absolute; top: 10px; right: 10px; display: flex; flex-direction: column; border: 1px solid var(--line-strong); border-radius: 6px; overflow: hidden; background: var(--surface); }
.mapzoom button { width: 30px; height: 30px; border: 0; border-bottom: 1px solid var(--line); background: var(--surface); color: var(--fg); font: 16px/1 var(--font-data, inherit); cursor: pointer; display: grid; place-items: center; padding: 0; }
.mapzoom button:last-child { border-bottom: 0; font-size: 14px; }
.mapzoom button:hover { background: var(--surface-2); }
.linkbtn { border: 0; padding: 0; background: none; color: var(--accent); font: inherit; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.maplegend .fc-hint { flex-basis: 100%; }
#fc-chart { height: 380px; }
.chartsvg .grid { stroke: var(--line); }
.chartsvg .tick { font-size: 10.5px; }
.chartsvg .axlab { font-size: 11px; fill: var(--muted); }
.chartsvg .fczone { fill: var(--accent-soft); }
.chartsvg .nowline { stroke: var(--fg); stroke-dasharray: 4 3; opacity: 0.7; }
.chartsvg .dayline { stroke: var(--obs); stroke-width: 1.2; opacity: 0.7; }
.chartsvg .hover { stroke: var(--line-strong); }
.chartsvg .band { fill: var(--accent); fill-opacity: 0.2; stroke: none; }
.chartsvg .env { fill: var(--accent); fill-opacity: 0.07; stroke: var(--accent); stroke-opacity: 0.35; stroke-width: 0.8; stroke-dasharray: 3 3; }
.chartsvg .mem { fill: none; stroke: var(--accent); stroke-width: 0.8; stroke-opacity: 0.35; }
.chartsvg .med { fill: none; stroke: var(--accent); stroke-width: 2.2; stroke-linejoin: round; }
.chartsvg .an { fill: none; stroke: var(--fg); stroke-width: 1.7; stroke-linejoin: round; }
.key { display: inline-block; width: 16px; height: 3px; margin: 0 4px 2px 6px; vertical-align: middle; }
.key.an { background: var(--fg); } .key.med { background: var(--accent); }
.key.band { height: 9px; background: var(--accent); opacity: 0.25; }
.key.env { height: 9px; background: color-mix(in srgb, var(--accent) 10%, transparent); border: 1px dashed var(--accent); }
table.data td.up { color: var(--bad); } table.data td.down { color: var(--ok); }
table.data caption { caption-side: bottom; padding: 8px; text-align: left; font-size: 12px; }
.fc-foot { margin-top: 14px; font-size: 12.5px; }
.dz-fc { margin: 10px 0 0; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.dz-fc:empty { display: none; }
.fc-link { font: 600 13px/1 var(--font-head); text-transform: uppercase; letter-spacing: 0.06em; color: var(--accent); text-decoration: none; }
.fc-link:hover { text-decoration: underline; }
@media (max-width: 720px) { .fc-nums dd { font-size: 16px; } #fc-chart { height: 300px; } }
.bf-links { display: inline-flex; flex-wrap: wrap; gap: 4px 12px; }

/* no forecast published yet: globe, basins and rivers only, with the loop's status in the panel */
body.fc-waiting #panel > div, body.fc-waiting #panel > .legend { display: none; }
body.fc-waiting #panel > #comp-box { display: block; }
body.fc-waiting .track > :not(.dockmsg), body.fc-waiting .when .speed { display: none; }
body.fc-waiting #play { opacity: 0.45; cursor: default; }
.dockmsg { min-height: 72px; display: grid; align-content: center; gap: 6px; padding: 6px 2px; font-size: 13px; line-height: 1.4; color: var(--fg); }
.dockmsg .soon { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.dockmsg .soon b { font: 600 19px/1.15 var(--font-head); letter-spacing: 0.03em; text-transform: uppercase; }
.dockmsg .eta { display: flex; flex-wrap: wrap; gap: 4px 18px; font: 500 13.5px/1.4 var(--font-data); }
.dockmsg .eta b { color: var(--accent); font-weight: 600; }
.dockmsg .k { color: var(--muted); font-size: 12px; }
.soon-pill { display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px 5px 9px; border-radius: 999px; background: var(--accent); color: #fff;
             font: 600 12px/1 var(--font-head); text-transform: uppercase; letter-spacing: 0.12em; animation: owq-pulse 1.8s ease-out infinite; }
.soon-pill i { width: 8px; height: 8px; border-radius: 50%; background: #fff; animation: owq-blink 1.1s steps(2, start) infinite; }
body.fc-waiting .dock { background: color-mix(in srgb, var(--accent) 9%, var(--panel)); border-top: 2px solid var(--accent); }
body.fc-waiting #play { animation: owq-pulse 1.8s ease-out infinite; }
@keyframes owq-pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 60%, transparent); } 70%, 100% { box-shadow: 0 0 0 10px transparent; } }
@keyframes owq-blink { to { visibility: hidden; } }
@media (prefers-reduced-motion: reduce) { .soon-pill, .soon-pill i, body.fc-waiting #play { animation: none; } }
.fcwait { flex-basis: 100%; list-style: none; margin: 2px 0 6px; padding: 0; display: grid; gap: 6px; font-size: 12.5px; line-height: 1.35; }
.fcwait b { display: block; color: var(--fg); }
.fcwait span { color: var(--muted); }

/* under each title: every component, the available ones lit, the others coming */
.compstrip { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; margin: 8px 0 2px; }
.compstrip .cchip { font: 500 11px/1 var(--font-data); padding: 4px 7px; border-radius: 999px; border: 1px solid var(--line); color: var(--faint); background: transparent; }
.compstrip button.cchip { cursor: pointer; color: var(--fg); border-color: var(--accent); }
.compstrip button.cchip.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.compstrip .cchip.soon { border-style: dashed; }
.compstrip .cnote { font: 400 11.5px/1.2 var(--font-ui); color: var(--muted); margin-left: 4px; }
.headline .hcomp[hidden] { display: none; }

/* the control panel hides to the left; a tab at the left edge brings it back */
.panel { transition: transform 0.28s ease, opacity 0.28s ease; }
body.panel-hidden .panel { transform: translateX(calc(-100% - 30px)); opacity: 0; pointer-events: none; }
.panel > header .eyebrow { padding-right: 32px; }
.panel-hide { position: absolute; top: -4px; right: 0; width: 26px; height: 26px; border: 1px solid var(--line); border-radius: var(--r);
              background: var(--surface); color: var(--muted); font: 600 17px/1 var(--font-ui); cursor: pointer; display: grid; place-items: center; padding: 0 0 2px; }
.panel-hide:hover { color: var(--fg); border-color: var(--line-strong); }
.panel-tab { position: fixed; z-index: 3; left: 0; top: calc(var(--top) + 22px); display: none; flex-direction: column; align-items: center; gap: 8px;
             padding: 10px 7px; border: 1px solid var(--line); border-left: 0; border-radius: 0 var(--r) var(--r) 0; background: var(--panel);
             color: var(--fg); box-shadow: var(--shadow); cursor: pointer; font: 600 17px/1 var(--font-ui); }
.panel-tab:hover { color: var(--accent); }
.panel-tab span { font: 600 10.5px/1 var(--font-head); text-transform: uppercase; letter-spacing: 0.1em; writing-mode: vertical-rl; transform: rotate(180deg); }
body.panel-hidden .panel-tab { display: flex; }
body.present .panel-tab, body.present .panel-hide { display: none; }
@media (max-width: 720px) { .panel-hide { display: none; } }
.basinlist button { white-space: nowrap; }

/* openWQ and UE-hydro tabs */
.uehead img { height: 54px; width: auto; display: block; }
:root[data-mode="dark"] .uehead .lg-light, :root:not([data-mode="dark"]) .uehead .lg-dark { display: none; }
.linkcards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin: 20px 0 10px; }
.linkcard { display: grid; gap: 4px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); color: var(--fg); text-decoration: none; }
.linkcard:hover { border-color: var(--accent); }
.linkcard b { font: 600 15px/1.2 var(--font-head); text-transform: uppercase; letter-spacing: 0.05em; }
.linkcard span { font: 500 13px/1.3 var(--font-data); color: var(--accent); }
.linkcard small { color: var(--muted); font-size: 12px; line-height: 1.35; }

/* the world's other basins: coming soon (panel list, globe label, pages) */
.worldbox { margin-top: 10px; }
.wl-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.wl-head .label { margin: 0; }
#world-filter { flex: 1 1 auto; min-width: 0; max-width: 170px; font: 400 12px/1.2 var(--font-ui); padding: 4px 8px; border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--surface); color: var(--fg); }
.basinlist.world { max-height: 34vh; overflow-y: auto; overscroll-behavior: contain; padding-right: 4px; }
.basinlist.world li.grp { display: block; position: sticky; top: 0; z-index: 1; background: var(--panel, var(--surface)); font: 600 10px/1.6 var(--font-data); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); padding: 6px 0 2px; border-top: 0; }
.basinlist.world .bn { font-weight: 500; }
.basinlist.world button.open { background: transparent; color: var(--basin); }
.basinlist .soon { display: inline-block; font: 600 9px/1 var(--font-data); letter-spacing: 0.04em; text-transform: uppercase; padding: 2px 5px; border-radius: 999px; border: 1px dashed var(--line-strong); color: var(--muted); vertical-align: 1px; }
.basinlist li.picked { background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--accent); border-radius: var(--r); padding-left: 6px; transition: background 0.3s; }
.btag.wtag { border-color: var(--line-strong); border-left-color: var(--fg); }
.btag.wtag:hover, .btag.wtag.hot { background: var(--panel); color: var(--fg); }
.btag.wtag span { color: var(--muted); }
.soon-tag { display: inline-block; font: 700 11px/1 var(--font-data); letter-spacing: 0.08em; text-transform: uppercase; padding: 6px 12px; border-radius: 999px; background: var(--accent); color: #fff; animation: owq-pulse 2.2s ease-out infinite; }
@media (prefers-reduced-motion: reduce) { .soon-tag { animation: none; } }
.soon-body { display: grid; grid-template-columns: minmax(0, 320px) 1fr; gap: 24px; align-items: start; margin-top: 18px; }
.soon-map { margin: 0; padding: 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.soon-map svg { display: block; width: 100%; height: auto; max-height: 340px; }
.soon-map svg .ol { fill: var(--accent-soft); stroke: var(--fg); stroke-width: 1.2; vector-effect: non-scaling-stroke; }
.soon-map svg .op { fill: var(--accent); }
.soon-links a { font-weight: 600; }
@media (max-width: 720px) { .soon-body { grid-template-columns: 1fr; } }
