/* =============================================================================
   Laurel.WX
   Palette carried from laurelnetwork.com so this reads as part of the network.
   --accent is UI CHROME ONLY. The radar ramp is separate, because on a weather
   screen green already means light rain and letting it mean two things is a
   usability bug, not a style preference.
   ========================================================================== */
:root{
  --bg:#08080b;
  --panel:#0d0d14;
  --panel-2:#10101a;
  --line:rgba(255,255,255,.09);
  --line-2:rgba(255,255,255,.14);
  --text:#f4f4f7;
  --text-2:#c9c9d4;
  --muted:#9a9aa8;
  --dim:#66666f;
  --faint:#4a4a54;
  --accent:#43e08a;
  --accent-ink:#06200f;
  --warn:#f0a742;
  --alert:#ff6b5d;
  --cool:#39b6c8;
  --rain:#2b6fd4;
  --sans:Archivo,"Helvetica Neue",Helvetica,system-ui,sans-serif;
  --mono:"IBM Plex Mono",ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
  --nav-h:60px;
  /* The bottom nav is --nav-h PLUS the home-indicator inset. Anything that
     reserves space for it must reserve both, or the last 34px of the page
     hides behind it on a notched phone. --nav-total is that full height. */
  --safe-b:env(safe-area-inset-bottom, 0px);
  --nav-total:calc(var(--nav-h) + var(--safe-b));
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;background:var(--bg);color:var(--text);
  font-family:var(--sans);font-size:15px;line-height:1.5;
  -webkit-font-smoothing:antialiased;
  overscroll-behavior-y:none;
}
.num{font-family:var(--mono);font-variant-numeric:tabular-nums}
button{font:inherit;color:inherit}
:focus-visible{outline:2px solid var(--accent);outline-offset:2px;border-radius:3px}

#app{display:flex;flex-direction:column;min-height:100%}

/* ---------- top bar (desktop) ---------- */
.topbar{
  display:flex;align-items:center;gap:22px;height:54px;padding:0 20px;
  border-bottom:1px solid var(--line);background:#0a0a10;flex-shrink:0;
}
.brand{font-size:16px;font-weight:700;letter-spacing:-.01em}
.brand-accent{color:var(--accent)}
.tabs{display:none;gap:2px}
.tab{padding:7px 13px;font-size:13px;color:var(--muted);background:none;border:0;border-radius:3px;cursor:pointer}
.tab:hover{color:var(--text-2)}
.tab.is-on{color:var(--text);background:rgba(255,255,255,.07)}
.place{
  margin-left:auto;display:flex;align-items:center;gap:8px;padding:6px 12px;
  background:rgba(255,255,255,.05);border:1px solid var(--line);border-radius:3px;
  color:var(--muted);font-size:12.5px;cursor:pointer;
}
.place:hover{color:var(--text-2);border-color:var(--line-2)}

/* ---------- views ---------- */
main{flex-grow:1;min-height:0;position:relative}
.view{display:none;padding:14px 16px calc(var(--nav-total) + 20px) 16px;max-width:1180px;margin:0 auto}
.view.is-on{display:block}
#view-radar.is-on{display:block;padding:0;max-width:none}

/* ---------- bottom nav (phone) ---------- */
.bottomnav{
  position:fixed;left:0;right:0;bottom:0;display:flex;
  border-top:1px solid var(--line);background:#0c0c11;
  padding-bottom:env(safe-area-inset-bottom);z-index:40;
}
.bnav{
  flex:1;display:flex;flex-direction:column;align-items:center;gap:4px;
  padding:9px 0 10px 0;background:none;border:0;color:var(--dim);cursor:pointer;
  min-height:44px;
}
.bnav svg{width:19px;height:19px}
.bnav span{font-size:9.5px;letter-spacing:.04em}
.bnav.is-on{color:var(--accent)}

/* ---------- cards ---------- */
.card{border:1px solid var(--line);border-radius:5px;background:var(--panel);padding:16px 18px}
.card + .card{margin-top:14px}
.card-h{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px}
.card-t{font-size:11px;font-weight:600;color:var(--muted);letter-spacing:.09em}

/* ---------- current conditions ---------- */
.now-top{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}
.place-h{font-size:20px;font-weight:600;letter-spacing:-.01em}
.place-sub{font-size:10.5px;color:var(--dim);letter-spacing:.04em;margin-top:2px}
.temp-row{display:flex;align-items:baseline;gap:6px;margin-top:14px}
.temp-big{font-size:clamp(60px,17vw,80px);font-weight:500;line-height:.9;letter-spacing:-.04em}
.temp-unit{font-size:24px;color:var(--muted)}
.cond{font-size:14px;color:var(--text-2);margin-top:6px}
.hilo{display:flex;flex-direction:column;align-items:flex-end;gap:7px;padding-top:4px}
.hilo-row{display:flex;align-items:baseline;gap:6px}
.hilo-k{font-size:10px;color:var(--dim);letter-spacing:.06em}
.src{font-size:10.5px;color:var(--dim);line-height:1.6;margin-top:14px;letter-spacing:.02em}

.grid4{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:1px;background:var(--line);border:1px solid var(--line);border-radius:4px;overflow:hidden;margin-top:14px}
.cell{background:var(--panel-2);padding:11px 6px;display:flex;flex-direction:column;gap:5px;align-items:center}
.cell-k{font-size:9.5px;color:var(--dim);letter-spacing:.06em}
.cell-v{font-size:15px}

/* ---------- river gauges ---------- */
/* DIRECTION, not judgement. Nothing in this app knows a flood stage for these
 * creeks, so neither tone is allowed to mean "safe" or "dangerous": amber marks
 * the gauge worth looking at twice because it is going up, green the one going
 * down. Reusing .q-good/.q-poor here would have been wrong twice over - they
 * set a background for legend swatches, not a text colour, and they mean
 * station data quality. */
.rv-rise{color:var(--warn)}
.rv-fall{color:var(--accent)}

/* ---------- river level chart ---------- */
/* preserveAspectRatio="none" on the SVG, so the viewBox stretches to whatever
 * width the card is: no layout measurement, no resize handler, and it works
 * identically at 390px and on a desktop. Height is fixed in CSS rather than
 * scaled, because a chart that gets taller on a wide screen exaggerates the
 * same data. */
.rv-chart-wrap{margin-top:14px}
.rv-chart{display:block;width:100%;height:132px;overflow:visible}
.rv-line{fill:none;stroke:var(--accent);stroke-width:1.6;
  stroke-linejoin:round;stroke-linecap:round;vector-effect:non-scaling-stroke}
.rv-now{fill:var(--accent)}
/* Thresholds get warmer as they get worse, and all four are dashed so none can
 * be mistaken for the measured trace. */
.rv-th{stroke-width:1;stroke-dasharray:4 3;vector-effect:non-scaling-stroke}
.rv-th-action{stroke:#c9a227}
.rv-th-minor{stroke:var(--warn)}
.rv-th-moderate{stroke:#ff8a5c}
.rv-th-major{stroke:#ff6b5d}
.rv-th-lab{font-size:9px;fill:var(--dim);font-family:var(--mono)}
.rv-axis{display:flex;justify-content:space-between;gap:8px;margin-top:5px;
  font-size:9.5px;color:var(--dim);letter-spacing:.03em}
.rv-nochart{margin-top:12px}

/* The thresholds as numbers. Wraps rather than scrolls: four short cells fit
 * two-up on a phone, and a horizontal scroller hides the worst category
 * exactly when it matters. */
.rv-ths{display:flex;flex-wrap:wrap;gap:1px;margin-top:12px;
  background:var(--line);border:1px solid var(--line);border-radius:4px;
  overflow:hidden}
.rv-th-cell{flex:1 1 90px;background:var(--panel-2);padding:8px 9px;
  display:flex;flex-direction:column;gap:2px}
.rv-th-cell.is-over{background:rgba(255,107,93,.12)}
.rv-th-k{font-size:9px;color:var(--dim);letter-spacing:.06em;text-transform:uppercase}
.rv-th-v{font-size:13px}
.rv-th-d{font-size:9.5px;color:var(--dim)}
.rv-th-cell.is-over .rv-th-d{color:#ffb3aa}

/* A stale gauge, said in colour as well as in words.
 * Amber, not red: a gauge that missed a publication is a telemetry gap, not a
 * flood. Nothing on this page uses red for anything but a crossed threshold. */
.live-dot.is-stale{background:var(--warn)}
.rv-stale{color:var(--warn)}

/* ---------- the cross-category scorecard ---------- */
/* A grid, not a table: it has to collapse to two columns on a phone without a
 * horizontal scroller, because the whole value is seeing a model's places side
 * by side and a scroller hides the column you have not looked at. */
.sb-card2{margin-top:16px;padding-top:14px;border-top:1px solid var(--line)}
.sb-sc{margin-top:10px;display:flex;flex-direction:column;gap:1px;
  background:var(--line);border:1px solid var(--line);border-radius:4px;overflow:hidden}
.sb-sc-row{display:grid;grid-template-columns:minmax(0,1.6fr) repeat(auto-fit,minmax(70px,1fr));
  gap:1px;background:var(--line)}
.sb-sc-head .sb-sc-lab,.sb-sc-head .sb-sc-cell{font-size:9px;color:var(--dim);
  letter-spacing:.06em;text-transform:uppercase}
.sb-sc-lab{background:var(--panel-2);padding:8px 9px;font-size:11.5px;
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.sb-sc-cell{background:var(--panel-2);padding:8px 9px;font-size:12px}
.sb-sc-cell.is-first{color:var(--accent)}
.sb-sc-v{font-size:9.5px;color:var(--dim)}

/* ---------- alert strip ---------- */
.alert{display:flex;align-items:center;gap:10px;padding:11px 13px;border-radius:4px;
  border:1px solid rgba(240,167,66,.30);background:rgba(240,167,66,.10);
  color:#f0c98a;font-size:12.5px;text-align:left;width:100%;cursor:pointer;margin-bottom:14px}
.alert svg{flex-shrink:0}
.alert.sev-severe,.alert.sev-extreme{border-color:rgba(255,107,93,.38);background:rgba(255,107,93,.11);color:#ffb3aa}
.alert-body{flex-grow:1}
/* The applicable gust, on the face of the alert. Monospace so the number is
 * the thing the eye lands on, and it must not be squeezed out by a long
 * headline - hence flex-shrink:0 and the headline taking the slack. */
.alert-thr{flex-shrink:0;font-family:"IBM Plex Mono",ui-monospace,monospace;
  font-size:11.5px;font-weight:600;padding:2px 7px;border-radius:3px;
  background:rgba(0,0,0,.26);white-space:nowrap}

/* ---------- truth provenance on the terrain bands ---------- */
.sb-grp-ungauged,.sb-grp-gauged{font-size:9px;letter-spacing:.07em;
  text-transform:uppercase;padding:1px 6px;border-radius:2px;margin-left:auto}
.sb-grp-ungauged{background:rgba(240,167,66,.16);color:var(--warn)}
.sb-grp-gauged{background:rgba(67,224,138,.12);color:#5fcf96}
.sb-caveat{font-size:11px;line-height:1.5;color:var(--warn);padding:9px 10px;
  margin:8px 0;border-radius:3px;background:rgba(240,167,66,.08);
  border-left:2px solid rgba(240,167,66,.45)}

/* ---------- satellite loop ---------- */
/* The image and its reference overlay share one box. The SVG uses the frame's
 * pixel dimensions as its viewBox and 100% width, so it scales with the image
 * exactly - the reference cannot drift off the geography at any card width. */
.tc-sat-stage{position:relative;margin-top:4px;line-height:0}
.tc-sat-img{display:block;width:100%;height:auto;border-radius:3px;
  background:#06070a}
.tc-sat-ref{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}
/* Thin and translucent on purpose: this is a reference mark under the weather,
 * not a feature competing with it. vector-effect keeps the hairline a hairline
 * when the SVG is scaled up by the responsive width. */
.tc-ref-grid{stroke:rgba(255,255,255,.17);stroke-width:1;vector-effect:non-scaling-stroke}
.tc-ref-coast{fill:none;stroke:rgba(255,255,255,.52);stroke-width:1.1;
  vector-effect:non-scaling-stroke}
.tc-ref-state{fill:none;stroke:rgba(255,255,255,.3);stroke-width:1;
  vector-effect:non-scaling-stroke}
.tc-ref-lab{fill:rgba(255,255,255,.45);font-size:9px;
  font-family:"IBM Plex Mono",ui-monospace,monospace}
.tc-sat-grid{flex-shrink:0;font-size:10px;letter-spacing:.07em;font-weight:600;
  padding:5px 10px;border-radius:3px;cursor:pointer;
  background:rgba(255,255,255,.05);color:#8a9a91;border:1px solid var(--line)}
.tc-sat-grid.is-on{background:rgba(67,224,138,.12);color:var(--accent);
  border-color:rgba(67,224,138,.35)}

/* Product toggle. Three states, so the selected one must be unmistakable
 * without relying on colour alone - aria-pressed carries it for a screen
 * reader, weight and border carry it visually. */
.tc-sat-tabs{display:flex;gap:6px;margin-top:8px;flex-wrap:wrap}
.tc-sat-tab{font-size:10px;letter-spacing:.07em;padding:5px 10px;border-radius:3px;
  cursor:pointer;background:rgba(255,255,255,.05);color:#8a9a91;
  border:1px solid var(--line)}
.tc-sat-tab:hover{background:rgba(255,255,255,.1)}
.tc-sat-tab.is-on{background:rgba(67,224,138,.14);color:var(--accent);
  border-color:rgba(67,224,138,.45);font-weight:600}
.tc-sat-bar{display:flex;align-items:center;gap:10px;margin-top:8px}
.tc-sat-play{flex-shrink:0;font-size:10px;letter-spacing:.08em;font-weight:600;
  padding:5px 11px;border-radius:3px;cursor:pointer;
  background:rgba(67,224,138,.12);color:var(--accent);
  border:1px solid rgba(67,224,138,.35)}
.tc-sat-play:hover{background:rgba(67,224,138,.2)}
/* A real range input: it is a scrubber, and reimplementing drag on a div
 * loses keyboard control for no gain. */
.tc-sat-scrub{flex-grow:1;min-width:60px;accent-color:var(--accent);cursor:pointer}
.tc-sat-t{flex-shrink:0;font-size:10.5px;color:#8a9a91;white-space:nowrap}
.tc-sat-geo{font-size:10px;color:#6f7f76;margin-top:5px}
@media (max-width:420px){
  .tc-sat-bar{flex-wrap:wrap}
  .tc-sat-t{width:100%;white-space:normal}
}

/* ---------- forecast drift ---------- */
.cd-trend{display:flex;flex-direction:column;gap:3px;margin:10px 0 2px;
  padding:9px 10px;border-radius:3px;background:rgba(0,0,0,.2);
  border-left:2px solid rgba(138,154,145,.3)}
.cd-trend-h{font-size:9.5px;letter-spacing:.07em;text-transform:uppercase;color:#8a9a91}
.cd-trend-s{font-size:12.5px;line-height:1.4}
.cd-trend-n{font-size:11.5px;color:#8a9a91}
/* The disclaimer is part of the component, not an optional extra: without it
 * a one-directional drift invites exactly the extrapolation this does not do. */
.cd-trend-w{font-size:10px;color:#6f7f76;font-style:italic}

/* ---------- projected wind ---------- */
/* Present on every card whether the day is windy or not: a row that appears
 * only sometimes is a row nobody learns to look for. Tiers are NWS product
 * magnitudes (advisory ~46 mph, warning ~58), not design taste. */
.calc-w{display:flex;align-items:baseline;justify-content:center;gap:5px;
  font-size:10.5px;line-height:1.25;color:#8a9a91;padding-top:3px;
  height:16px;box-sizing:content-box}
.calc-w .num{font-family:"IBM Plex Mono",ui-monospace,monospace}
.calc-w-g{font-size:9.5px;line-height:1.25;opacity:.78;min-width:20px;text-align:left}
.calc-w-calm{opacity:.4}
.calc-w.is-adv{color:var(--warn)}
.calc-w.is-warn{color:var(--alert);font-weight:600}

.wind-today{margin-top:10px;padding:9px 11px;border-radius:3px;
  background:rgba(0,0,0,.2);border-left:2px solid rgba(138,154,145,.35)}
.wind-today.is-adv{border-left-color:var(--warn)}
.wind-today.is-warn{border-left-color:var(--alert)}
.wt-k{font-size:9.5px;letter-spacing:.07em;text-transform:uppercase;color:#8a9a91}
.wt-v{display:flex;align-items:baseline;gap:9px;flex-wrap:wrap;margin-top:3px;
  font-size:13px}
.wt-v .num{font-family:"IBM Plex Mono",ui-monospace,monospace;font-weight:600}
.wt-g{font-size:12px}
.wind-today.is-adv .wt-g{color:var(--warn)}
.wind-today.is-warn .wt-g{color:var(--alert)}
.wt-at{font-size:10.5px;color:#6f7f76}
/* The forecaster's own figure. Visually separated from the model numbers above
 * it because it is a different kind of claim, not a refinement of theirs. */
.wt-nws{margin-top:6px;padding-top:6px;border-top:1px solid rgba(138,154,145,.18);
  font-size:11px;line-height:1.45;color:var(--alert)}

/* ---------- stated thresholds, by elevation ---------- */
.stated-thr{margin:12px 0 4px;padding:10px;border-radius:3px;background:rgba(0,0,0,.22)}
.stated-thr-h{font-size:10.5px;letter-spacing:.06em;text-transform:uppercase;
  color:#8a9a91;margin-bottom:8px}
.stated-thr-row{display:flex;align-items:baseline;gap:8px;flex-wrap:wrap;
  font-size:12px;line-height:1.7;opacity:.62}
/* The reader's own band is the only one at full strength. Dimming the others
 * rather than hiding them is deliberate: seeing that the valley was told 50
 * and the ridge 60 is what makes the number mean something. */
.stated-thr-row.is-here{opacity:1}
.stated-thr-band{min-width:118px;color:#8a9a91}
.stated-thr-val{font-family:"IBM Plex Mono",ui-monospace,monospace;font-weight:600}
.stated-thr-row.is-here .stated-thr-val{color:var(--alert)}
.stated-thr-you{font-size:9.5px;letter-spacing:.08em;text-transform:uppercase;
  padding:1px 6px;border-radius:2px;background:var(--alert);color:#1a0a08;font-weight:700}
@media (max-width:420px){.stated-thr-band{min-width:100%}}

/* ---------- WNC panel ---------- */
.wnc{border:1px solid rgba(67,224,138,.22);border-radius:5px;background:rgba(67,224,138,.05);padding:14px 16px;margin-top:14px}
.wnc-h{display:flex;align-items:center;gap:9px;margin-bottom:11px}
.wnc-t{font-size:11px;font-weight:600;color:var(--accent);letter-spacing:.08em}
.tag{font-size:8.5px;font-weight:700;color:var(--accent-ink);background:var(--accent);padding:2px 5px;border-radius:2px;letter-spacing:.05em}
.wnc-row{display:flex;align-items:center;gap:9px;padding:5px 0}
.dot{width:7px;height:7px;border-radius:50%;background:#3a3a44;flex-shrink:0}
.dot.on{background:var(--accent)}
.wnc-lab{flex-grow:1;font-size:12.5px;color:#8a8a96}
.wnc-lab.on{color:#dfe8e2}
.wnc-val{font-size:11px;color:#5a5a64}
.wnc-val.on{color:#7a8a80}
.wnc-note{font-size:10.5px;line-height:1.5;color:#6f7f76;border-top:1px solid rgba(67,224,138,.16);padding-top:10px;margin-top:8px}

/* ---------- charts ---------- */
.chart{width:100%;height:auto;display:block}
.legend{display:flex;gap:16px;flex-wrap:wrap;margin-bottom:10px}
.lg{display:flex;align-items:center;gap:6px;font-size:10.5px;color:var(--muted)}
.lg-line{width:14px;height:2px;border-radius:1px}
.lg-box{width:9px;height:9px;border-radius:1px}

/* ---------- 10 day ---------- */
.day{display:flex;align-items:center;gap:10px;padding:11px 0;border-bottom:1px solid rgba(255,255,255,.07)}
.day:last-child{border-bottom:0}
.day-n{width:46px;font-size:12.5px}
.day-bar{flex-grow:1;height:4px;background:rgba(255,255,255,.07);border-radius:2px;position:relative}
.day-fill{position:absolute;height:4px;border-radius:2px;background:linear-gradient(90deg,var(--cool),var(--warn))}
.day-lo{font-size:11.5px;color:var(--muted);width:30px;text-align:right}
.day-hi{font-size:11.5px;width:30px;text-align:right}
.day-pop{font-size:10px;color:#5f8fd6;width:30px;text-align:right}

/* ---------- stations ---------- */
.st{display:flex;align-items:center;gap:10px;padding:10px 0;border-bottom:1px solid rgba(255,255,255,.07)}
.st-dot{width:8px;height:8px;border-radius:50%;flex-shrink:0}
/* Wide enough for the longest identifier we carry, and non-wrapping.
   76px fitted an ASOS call sign and not "COOP-311055", which wrapped onto two
   lines and made every COOP row twice as tall as its neighbours. */
.st-id{font-size:12px;flex:0 0 96px;white-space:nowrap}
.st-name{flex-grow:1;font-size:11.5px;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.st-v{font-size:11.5px;color:var(--text-2);flex:0 0 auto;margin-left:auto}

/* ---- station networks, as expandable full-width sections --------------- */
.netgrp{background:var(--panel);border:1px solid var(--line);border-radius:4px;
  margin-top:10px;overflow:hidden}
.netgrp[open]{border-color:var(--line-2)}
.netgrp-h{display:flex;align-items:center;gap:12px;padding:13px 15px;
  cursor:pointer;list-style:none;user-select:none}
.netgrp-h::-webkit-details-marker{display:none}
/* The disclosure triangle is drawn rather than inherited, so it can sit on the
   left at a size that matches the type. */
.netgrp-h::before{content:"";flex:0 0 7px;height:7px;margin-right:-4px;
  border-right:1.5px solid var(--muted);border-bottom:1.5px solid var(--muted);
  transform:rotate(-45deg);transition:transform .15s ease}
.netgrp[open] .netgrp-h::before{transform:rotate(45deg)}
.netgrp-h:hover{background:rgba(255,255,255,.025)}
.netgrp-n{font-size:11.5px;font-weight:600;letter-spacing:.09em;
  color:var(--text);flex:0 0 auto}
.netgrp-c{font-size:11.5px;color:var(--accent);flex:0 0 auto}
.netgrp-d{font-size:11px;color:var(--dim);line-height:1.45;flex:1 1 auto;
  min-width:0}
.netgrp-s{font-size:10.5px;color:var(--muted);flex:0 0 auto}
.netgrp-b{padding:0 15px 6px}

/* The long lists get columns so 186 rain gauges are a block rather than a
   scroll. Rows keep their own borders, so the columns read as columns. */
.st-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(270px,1fr));
  column-gap:22px}
.st-grid .st{padding:8px 0}

@media (max-width:640px){
  .netgrp-h{flex-wrap:wrap;gap:8px 10px}
  /* The description drops below the name and count rather than squeezing them:
     at this width it would otherwise get two words per line. */
  .netgrp-d{flex:1 0 100%;order:3}
  .netgrp-s{order:2}
}
.q-good{background:var(--accent)}
.q-fair{background:#c9a227}
.q-poor{background:#6a4a52}

/* ---------- radar ---------- */
.radar-wrap{position:relative;width:100%;height:calc(100dvh - 54px - var(--nav-total))}
#map{position:absolute;inset:0}
/* CRT furniture for the scope and video LOOKS: scanlines and a vignette.
   Strengths come from the look as --scan and --vig (0..1, set by syncFx in
   radarview.js), so adding a look needs no CSS.

   TWO PSEUDO-ELEMENTS ON ONE DIV, over the map and under the controls at
   z-index 5, pointer-events:none. A tap has to reach the map through this -
   the readout is how a reader gets a number off a picture, and it is the
   period looks where the picture is hardest to read by eye.

   The scanline period is 3px of CSS, which is the one number here that is not
   free to choose: it has to stay coarse enough to survive a 3x device pixel
   ratio without moire and fine enough not to read as a venetian blind. The
   vignette is an ellipse because a tube's corners fell off, not its edges. */
.rd-fx{position:absolute;inset:0;z-index:5;pointer-events:none;display:none}
.rd-fx.is-on{display:block}
.rd-fx::before,.rd-fx::after{content:"";position:absolute;inset:0}
.rd-fx::before{opacity:var(--scan,0);
  background:repeating-linear-gradient(to bottom,rgba(0,0,0,.6) 0 1px,rgba(0,0,0,0) 1px 3px)}
.rd-fx::after{opacity:var(--vig,0);
  background:radial-gradient(ellipse at center,rgba(0,0,0,0) 42%,rgba(0,0,0,.92) 100%)}
/* A reader who has asked for less motion has not asked for less texture, so
   the overlay stays - it does not animate. Nothing to disable here, and the
   note is to stop a future pass from "fixing" it with a flicker. */
.rd-top{position:absolute;top:10px;left:10px;right:10px;display:flex;gap:8px;z-index:10;pointer-events:none}
.rd-top > *{pointer-events:auto}
.glass{background:rgba(8,10,14,.88);border:1px solid var(--line-2);border-radius:4px;backdrop-filter:blur(8px)}
.rd-btn{padding:8px 11px;font-size:12px;cursor:pointer;color:var(--text-2)}
.rd-btn:hover{color:var(--text)}
.rd-bottom{position:absolute;left:10px;right:10px;bottom:10px;z-index:10;padding:11px 12px;display:flex;flex-direction:column;gap:10px}
.prod-row{display:flex;gap:5px}
.prod{flex:1;padding:8px 0;font-size:11px;font-weight:600;background:rgba(255,255,255,.05);border:1px solid var(--line-2);border-radius:3px;color:var(--text-2);cursor:pointer;min-height:34px}
.prod.is-on{background:var(--accent);border-color:var(--accent);color:var(--accent-ink);font-weight:700}
.tilt-row{display:flex;align-items:center;gap:8px}
.tilt-lab{font-size:9.5px;color:var(--dim);letter-spacing:.07em;flex-shrink:0}
.tilts{flex-grow:1;display:flex;gap:4px;overflow-x:auto}
.tilt{flex:1;min-width:38px;padding:6px 0;font-size:10px;background:rgba(255,255,255,.05);border:1px solid var(--line);border-radius:3px;color:var(--muted);cursor:pointer}
.tilt.is-on{background:rgba(67,224,138,.16);border-color:rgba(67,224,138,.45);color:var(--accent)}
/* The LOOK switcher: eight choices, which is more than a flex row can carry.
   Every other control strip here is a flex row because it holds two to four
   buttons; at eight, on a 300px panel with a 44px touch target, each one would
   be 30px wide and the labels would truncate to "198". So this one row is a
   GRID that wraps - auto-fit with a 52px floor, which comes out one row on a
   desktop panel and two on a phone - and the label stays a readable date.
   align-items:flex-start on the row so the "LOOK" tag sits with the first
   line of buttons rather than centring itself against a two-line block. */
.look-row{align-items:flex-start}
.looks{flex:1;display:grid;grid-template-columns:repeat(auto-fit,minmax(52px,1fr));gap:4px}
/* Twelve looks at a 44px touch target would stack three deep in a 300px panel,
   which is a third of a phone screen spent on a choice nobody makes twice in a
   session. A 43px floor and a point off the label gets it back to two rows, and
   the longest labels - NORMAL and VECTOR, six characters - still fit without
   truncating. Anything shorter than 43 does not: measured, not guessed. */
@media (max-width:859px){
  .looks{grid-template-columns:repeat(auto-fit,minmax(43px,1fr))}
  .looks .tilt{font-size:10px;padding-left:1px;padding-right:1px}
}
/* The legend is a CANVAS painted from the ramp the shader samples, so the two
   cannot disagree. It was a hand-maintained gradient repeating the palette
   file's colours here, which drifts the moment either is edited - and a legend
   that contradicts the map is worse than no legend, because it is believed.
   image-rendering:pixelated keeps the bands hard, matching the NEAREST sampling
   on the ramp texture; smoothing them here would show gradients the map has not
   got. */
canvas.scale{display:block;width:100%;height:7px;border-radius:2px;
  background:none;image-rendering:pixelated}
/* Ticks are positioned by VALUE, absolutely. Spreading them evenly puts each
   label next to the wrong colour whenever the ticks are not evenly spaced
   across the domain, which they are not for either scale: 5/20/35 dBZ sit at
   30%/43%/57% of a -30..85 ramp. */
.scale-ax{position:relative;height:11px;font-size:8.5px;color:#5a5a64;margin-top:4px}
.scale-ax span{position:absolute;top:0;transform:translateX(-50%);white-space:nowrap}
.transport{display:flex;align-items:center;gap:11px}
.play{width:38px;height:38px;flex-shrink:0;display:flex;align-items:center;justify-content:center;background:var(--accent);border:0;border-radius:50%;cursor:pointer}
.scrub{flex-grow:1;-webkit-appearance:none;appearance:none;height:4px;background:rgba(255,255,255,.14);border-radius:2px;cursor:pointer}
.scrub::-webkit-slider-thumb{-webkit-appearance:none;width:13px;height:13px;border-radius:50%;background:var(--text);cursor:pointer}
.scrub::-moz-range-thumb{width:13px;height:13px;border:0;border-radius:50%;background:var(--text);cursor:pointer}
.tstamp{font-size:9.5px;color:var(--dim);display:flex;justify-content:space-between}
.readout{position:absolute;top:60px;left:10px;width:190px;padding:11px 12px;z-index:10;display:none}
.readout.is-on{display:block}
.ro-v{font-size:23px;font-weight:600;color:var(--warn)}
.ro-row{display:flex;justify-content:space-between;font-size:10.5px;margin-top:5px}
.ro-k{color:var(--dim)}
.ro-note{font-size:10px;color:#8a7448;line-height:1.45;margin-top:8px;padding-top:8px;border-top:1px solid var(--line)}
.live{display:flex;align-items:center;gap:7px;font-size:9.5px;color:#7a8a80}
.live-dot{width:6px;height:6px;border-radius:50%;background:var(--accent)}

/* ---------- dialog ---------- */
.dlg{border:1px solid var(--line-2);border-radius:6px;background:var(--panel);color:var(--text);padding:0;max-width:340px;width:calc(100% - 32px)}
.dlg::backdrop{background:rgba(0,0,0,.6)}
.dlg-inner{padding:18px}
.dlg h2{margin:0 0 14px 0;font-size:16px}
.place-opt{display:flex;align-items:center;gap:10px;width:100%;padding:11px 12px;background:rgba(67,224,138,.08);border:1px solid rgba(67,224,138,.28);border-radius:4px;color:var(--accent);font-size:13px;cursor:pointer;min-height:44px}
.place-list{margin-top:12px;display:flex;flex-direction:column}
.place-item{display:flex;align-items:center;justify-content:space-between;gap:10px;width:100%;padding:11px 2px;background:none;border:0;border-top:1px solid var(--line);color:var(--text);font-size:13px;text-align:left;cursor:pointer;min-height:44px}
.place-item small{color:var(--dim);font-size:10px}
.dlg-close{margin-top:14px;width:100%;padding:10px;background:rgba(255,255,255,.05);border:1px solid var(--line);border-radius:4px;cursor:pointer;min-height:44px}

.muted{color:var(--muted)}
.err{padding:14px;border:1px solid rgba(255,107,93,.3);background:rgba(255,107,93,.08);border-radius:4px;color:#ffb3aa;font-size:13px}
.skel{color:var(--dim);font-size:13px;padding:8px 0}

/* ---------- desktop ---------- */
@media (min-width:860px){
  .tabs{display:flex}
  .bottomnav{display:none}
  :root{--nav-h:0px}
  .view{padding:20px 20px 40px 20px}
  .cols{display:grid;grid-template-columns:5fr 7fr;gap:16px;align-items:start}
  .cols-3{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;align-items:start;margin-top:14px}
  .cols-3 .card{margin-top:0}
  .radar-wrap{height:calc(100dvh - 54px)}
  :root{--safe-b:0px}
  .rd-bottom{left:auto;right:10px;width:420px}
  .readout{top:60px}
}
@media (prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}

/* =============================================================================
   Ambient background, ported from laurelnetwork.com.
   z-index is negative so it sits behind everything without needing a stacking
   context on the app itself; body must stay transparent for it to show.
   ========================================================================== */
#ambient{
  position:fixed;inset:-12%;z-index:-3;
  filter:blur(46px) saturate(1.4) brightness(.9);
  transform:scale(1.15);pointer-events:none;
  background:
    radial-gradient(58% 58% at 26% 28%, rgba(29,185,84,.20), transparent 70%),
    radial-gradient(52% 52% at 78% 64%, rgba(42,108,255,.18), transparent 70%),
    radial-gradient(55% 55% at 60% 16%, rgba(166,75,255,.15), transparent 70%);
}
/* .55 here was dead: fx.js sets the inline opacity to .9 on fade-in, which
   wins over the stylesheet. Matching it so the CSS states what actually
   runs - a stylesheet that disagrees with the code costs an hour later. */
#fx{position:fixed;inset:0;z-index:-2;pointer-events:none;opacity:.9;transition:opacity 1.2s ease}
#vignette{
  position:fixed;inset:0;z-index:-1;pointer-events:none;
  background:
    radial-gradient(ellipse at center, transparent 42%, rgba(0,0,0,.22) 100%),
    linear-gradient(180deg, rgba(8,8,11,.04), rgba(8,8,11,.36));
}
/* Panels sit ON the wash, so they are translucent rather than solid - the same
   glassy treatment the rest of the network uses. */
html{background:var(--bg)}
/* body stays transparent so the fixed #ambient / #fx / #vignette layers behind
   it show through. <html> carries the ground instead: if neither paints, the
   browser canvas falls back to white, which shows as a white band whenever the
   page is overscrolled on a phone. */
body{background:transparent}
/* 0.62 let the ambient wash through hard enough that the dim greys - source
   lines, elevation, axis labels - lost their contrast against it. The glass
   reads the same at 0.86 and the small text stays legible. */
.card{background:rgba(15,15,22,.86);backdrop-filter:blur(14px)}
.wnc{background:rgba(20,32,26,.84);backdrop-filter:blur(14px)}
.topbar{background:rgba(10,10,16,.88);backdrop-filter:blur(14px)}
.bottomnav{background:rgba(11,11,16,.92);backdrop-filter:blur(16px)}
.cell{background:rgba(20,20,30,.82)}
/* The radar map is opaque on purpose: the wash must not tint weather data. */
#view-radar{background:#05070a}

.view-sw{display:flex;gap:2px;padding:3px}
.vsw{padding:6px 10px;font-size:11px;background:none;border:0;border-radius:3px;color:var(--muted);cursor:pointer;min-height:32px}
.vsw:hover{color:var(--text-2)}
.vsw.is-on{background:rgba(67,224,138,.16);color:var(--accent)}

/* ---------- 10 day calendar strip ----------
   A horizontal scroller with snap points. Ten day-cards will never fit
   legibly as rows on a phone, and a grid of ten squares makes each one too
   small to carry both the condition and the numbers. Scrolling keeps every
   card full size and makes "how far out am I looking" a physical gesture. */
.cal{
  display:flex;gap:8px;overflow-x:auto;scroll-snap-type:x mandatory;
  padding:2px 2px 12px 2px;margin:0 -2px;
  scrollbar-width:thin;scrollbar-color:rgba(255,255,255,.18) transparent;
  -webkit-overflow-scrolling:touch;
}
.cal::-webkit-scrollbar{height:6px}
.cal::-webkit-scrollbar-thumb{background:rgba(255,255,255,.16);border-radius:3px}
.cal::-webkit-scrollbar-track{background:transparent}

.calc{
  flex:0 0 92px;scroll-snap-align:start;
  display:flex;flex-direction:column;align-items:center;gap:7px;
  padding:11px 8px 9px 8px;
  background:rgba(255,255,255,.035);border:1px solid var(--line);border-radius:5px;
  cursor:pointer;text-align:center;
  transition:background .14s ease,border-color .14s ease;
}
.calc:hover{background:rgba(255,255,255,.07);border-color:var(--line-2)}
.calc.is-on{background:rgba(67,224,138,.10);border-color:rgba(67,224,138,.42)}

.calc-h{display:flex;flex-direction:column;gap:1px;line-height:1.15}
.calc-d{font-size:10.5px;font-weight:600;letter-spacing:.07em;color:var(--text-2)}
.calc.is-on .calc-d{color:var(--accent)}
.calc-dt{font-size:9.5px;color:var(--dim);letter-spacing:.03em}

.calc-c{font-size:10px;color:var(--muted);line-height:1.25;min-height:25px;
  display:flex;align-items:center;text-align:center}

.calc-t{display:flex;align-items:baseline;gap:6px}
.calc-hi{font-size:19px;line-height:1}
.calc-lo{font-size:12.5px;color:var(--muted)}

/* Shared temperature scale across all ten cards, so bar position and length
   are comparable card to card rather than per-card decoration. */
.calc-bar{width:100%;height:3px;background:rgba(255,255,255,.07);border-radius:2px;position:relative}
.calc-fill{position:absolute;height:3px;border-radius:2px;
  background:linear-gradient(90deg,var(--cool),var(--warn))}

.calc-p{display:flex;flex-direction:column;gap:1px;font-size:10.5px;color:var(--dim);line-height:1.25;height:28px;box-sizing:content-box}
.calc-p.is-wet{color:#5f8fd6}
.calc-amt{font-size:9.5px;color:var(--faint)}
.calc-p.is-wet .calc-amt{color:#4a6f9e}

/* Confidence rail: day 9 must not look as authoritative as today. */
.qbar{width:100%;height:2px;background:rgba(255,255,255,.06);border-radius:1px;margin-top:1px}
.qbar-f{height:2px;border-radius:1px}
.qbar-f.q-high{background:var(--accent)}
.qbar-f.q-medium{background:#8a9a5b}
.qbar-f.q-low{background:#5a5a64}

/* ---------- selected-day detail ---------- */
.cal-detail{border-top:1px solid var(--line);padding-top:13px;margin-top:2px}
.cd-top{display:flex;align-items:flex-start;justify-content:space-between;gap:14px}
.cd-day{font-size:15.5px;font-weight:600;letter-spacing:-.005em}
.cd-cond{font-size:12.5px;color:var(--text-2);margin-top:2px}
.cd-icon{flex-shrink:0;margin-top:1px}
.cd-say{font-size:13px;line-height:1.55;color:var(--text-2);margin:11px 0 0 0;max-width:62ch}
.cd-grid{margin-top:13px}
.cd-wind{font-size:10px;color:var(--dim);letter-spacing:.05em;margin-top:10px}
.cd-conf{display:flex;align-items:center;gap:7px;font-size:10.5px;margin-top:9px;color:var(--dim)}
.cd-dot{width:6px;height:6px;border-radius:50%;background:currentColor;flex-shrink:0}
.cd-conf.q-high{color:var(--accent)}
.cd-conf.q-medium{color:#a8b872}
.cd-conf.q-low{color:var(--muted)}

@media (min-width:720px){
  .calc{flex:0 0 100px}
  .cd-say{font-size:13.5px}
}

/* ---------- the written forecast ----------
   Always below the figures it describes, always labelled. The numbers are the
   product; this is a reading of them, and nothing about the styling should
   invite anyone to mistake which is which - so it takes the quieter surface
   and the accent appears only on the badge. */
.nar{margin-top:14px}
.nar-badge{
  font-size:8.5px;font-weight:700;letter-spacing:.07em;
  color:var(--accent);border:1px solid rgba(67,224,138,.35);
  padding:2px 6px;border-radius:2px;
}
.nar.is-stale{border-color:rgba(240,167,66,.32)}
.nar.is-stale .nar-badge{color:var(--warn);border-color:rgba(240,167,66,.4)}

.nar-head{font-size:16px;font-weight:600;line-height:1.35;letter-spacing:-.01em;margin-bottom:12px}
.nar-sec + .nar-sec{margin-top:13px}
.nar-k{font-size:9.5px;font-weight:600;color:var(--dim);letter-spacing:.08em;margin-bottom:4px}
.nar-p{font-size:13.5px;line-height:1.6;color:var(--text-2);margin:0;max-width:64ch}

.nar-watch{
  display:flex;flex-direction:column;gap:4px;padding:10px 12px;margin-bottom:12px;
  border:1px solid rgba(240,167,66,.30);background:rgba(240,167,66,.09);
  border-radius:4px;font-size:12.5px;line-height:1.5;color:#f0c98a;
}
.nar-watch-k{font-size:9px;font-weight:700;letter-spacing:.09em;color:var(--warn)}

.nar-day{display:flex;gap:11px;padding:6px 0;border-bottom:1px solid rgba(255,255,255,.055)}
.nar-day:last-child{border-bottom:0}
.nar-day-n{flex:0 0 34px;font-size:11px;color:var(--muted);padding-top:1px;letter-spacing:.03em}
.nar-day-t{flex:1;font-size:12.5px;line-height:1.5;color:var(--text-2)}

.nar-off{font-size:12.5px;color:var(--dim)}

/* The wait state. Honest liveness: a shimmer, an indeterminate sweep, and an
   elapsed count. No percentage, because there is nothing to measure.
   The global prefers-reduced-motion rule kills both animations; the counter is
   what still says "working" when it does. */
.nar-wait{padding:2px 0 0}
.nar-skel{display:flex;flex-direction:column;gap:9px;margin-bottom:14px}
.nar-skel-l{height:9px;border-radius:2px;
  background:linear-gradient(90deg,
    rgba(255,255,255,.055) 0%, rgba(255,255,255,.055) 40%,
    rgba(255,255,255,.11) 50%,
    rgba(255,255,255,.055) 60%, rgba(255,255,255,.055) 100%);
  background-size:280% 100%;
  animation:nar-shimmer 2.1s ease-in-out infinite}
.nar-skel-l:nth-child(2){animation-delay:.12s}
.nar-skel-l:nth-child(3){animation-delay:.24s}
.nar-skel-l:nth-child(4){animation-delay:.36s}
.nar-skel-l:nth-child(5){animation-delay:.48s}
@keyframes nar-shimmer{0%{background-position:140% 0}100%{background-position:-140% 0}}

.nar-bar{height:2px;border-radius:1px;background:rgba(255,255,255,.07);
  overflow:hidden}
.nar-bar-i{height:100%;width:34%;border-radius:1px;
  background:linear-gradient(90deg,transparent,var(--accent),transparent);
  animation:nar-sweep 1.5s ease-in-out infinite}
@keyframes nar-sweep{0%{transform:translateX(-110%)}100%{transform:translateX(400%)}}

.nar-status{display:flex;align-items:center;gap:6px;margin-top:9px;
  font-size:12px;color:var(--dim)}
.nar-secs{color:var(--muted);font-variant-numeric:tabular-nums}
.nar-slow{margin-top:8px;font-size:12px;color:var(--muted);max-width:56ch;
  line-height:1.5}

/* =============================================================================
   Phones
   The layout above is already mobile-first - this section fixes what only
   shows up on a real handset: thumbs, notches, landscape, and the fact that a
   360px-wide screen is the narrowest thing this has to survive.
   ========================================================================== */

/* No page-level overflow guard here on purpose. `overflow-x:hidden` on html or
   body turns it into a scroll container, and with the existing height:100% that
   clips the page instead of protecting it. Wide content scrolls inside its own
   container (.cal, .tilts); verified at 360/375/393/852 px that nothing else
   crosses the viewport edge. */

/* iOS zooms the page when a control's text is under 16px and it gets focus.
   The only real input here is the radar scrubber, which has no text, but the
   rule costs nothing and prevents a surprise later. */
input,select,textarea{font-size:16px}

@media (max-width:859px){
  /* Touch targets. The WCAG floor is 44px; anything that sits under a thumb
     on a moving map needs it more than most. */
  .vsw{min-height:44px;padding:11px 12px}
  .tilt{min-height:44px;padding:12px 0;font-size:11px}
  .prod{min-height:44px}
  .rd-btn{min-height:44px;padding:11px 13px}
  /* The transport button is the one control people jab at while the map is
     moving under their thumb; 38px was measurably under the floor. */
  .play{width:44px;height:44px}

  /* The scrubber's visible track stays 4px, but a 4px-tall hit area on a
     touch screen is unusable. The input grows to 28px of transparent padding
     with the track drawn by the pseudo-elements instead of the box itself. */
  .scrub{height:28px;background:transparent;border-radius:0}
  .scrub::-webkit-slider-runnable-track{height:4px;border-radius:2px;background:rgba(255,255,255,.14)}
  .scrub::-moz-range-track{height:4px;border-radius:2px;background:rgba(255,255,255,.14)}
  .scrub::-webkit-slider-thumb{margin-top:-5px;width:15px;height:15px}
  .scrub::-moz-range-thumb{width:15px;height:15px}
  .tab,.bnav{min-height:44px}
  /* Measured at 91x33 in the audit - the location button is the most-tapped
     control in the top bar and was the only one under the 44px floor. */
  .place{min-height:44px;padding:10px 12px}

  /* The radar control bar is a stack of five rows. On a phone it was eating
     close to half the map, so the scale legend - the one row that is
     reference rather than control - loses its axis labels and slims down. */
  .rd-bottom{padding:10px 11px;gap:8px}
  /* canvas.scale, not .scale: the base rule is now element-qualified, so a bare
     class here loses the specificity contest and the slimming silently stops
     applying - which is exactly the kind of cascade collision that is invisible
     until someone looks at a phone. */
  canvas.scale{height:6px}
  .scale-ax{font-size:8px;margin-top:3px;height:10px}

  /* The readout panel is a tap result, and at 190px on a 360px screen it
     covered most of the storm the reader had just tapped. */
  .readout{width:calc(100% - 20px);max-width:230px}

  /* Cards lose a little inner padding so the numbers keep their size. */
  .card{padding:14px 15px}
  .view{padding-left:14px;padding-right:14px}
}

/* ---- narrow phones (360px and under) ---- */
@media (max-width:400px){
  /* Four stat columns at 360px leaves ~78px each, and "PRESSURE" over a
     five-character value is the first thing to break. Two rows of two keeps
     both the label and the number at full size. */
  .grid4{grid-template-columns:repeat(2,minmax(0,1fr))}

  /* The site button plus three view names does not fit on one line once
     "Transylvania" is one of them. Let the row wrap and give the switcher its
     own full-width line rather than shrinking the labels to nothing. */
  .rd-top{flex-wrap:wrap}
  .view-sw{width:100%;display:flex}
  .vsw{flex:1;padding:9px 4px;font-size:10.5px}
  /* The readout must clear the now-taller control row. */
  .readout{top:108px}

  .calc{flex:0 0 84px;padding:10px 6px 8px 6px}
  .calc-hi{font-size:18px}
  .temp-big{font-size:clamp(54px,16vw,72px)}
}

/* ---- landscape phones ----
   A 375px-tall viewport minus a 54px bar minus the nav leaves about 260px of
   map, and the radar controls alone were taller than that. In a short
   viewport the controls become a compact bar: the scale and the timestamp
   line go, since both are reference rather than control, and what remains is
   what a thumb actually needs. */
@media (max-height:520px) and (orientation:landscape){
  .radar-wrap{height:calc(100dvh - 54px - var(--nav-total))}
  .rd-bottom{left:auto;right:8px;bottom:8px;width:300px;padding:9px 10px;gap:7px}
  .rd-bottom .scale,.rd-bottom .scale-ax,.tstamp{display:none}
  /* The status line wraps to two lines in the narrow landscape panel and
     pushes it taller than the map can spare. */
  .live{font-size:8.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .tilt-row{gap:6px}
  .readout{top:56px;width:180px;padding:9px 10px}
  .ro-v{font-size:19px}
  /* Views that scroll need the room back too. */
  .view{padding-top:10px}
}

/* ---- coarse pointers ----
   Hover styling on a touch screen sticks after a tap, leaving a button
   looking selected when it is not. Only apply it where a pointer can hover. */
@media (hover:none){
  .calc:hover{background:rgba(255,255,255,.035);border-color:var(--line)}
  .tab:hover,.rd-btn:hover,.vsw:hover,.place:hover{color:inherit}
  .calc.is-on:hover{background:rgba(67,224,138,.10);border-color:rgba(67,224,138,.42)}
}

/* The calendar strip is the one place a phone user is expected to drag
   sideways, so it gets momentum scrolling and a scrollbar that does not
   occupy layout height on mobile. */
@media (max-width:859px){
  .cal{padding-bottom:8px}
  .cal::-webkit-scrollbar{height:0}
  .cal{scrollbar-width:none}
}

/* ---------- MapLibre chrome ----------
   The default controls ship light-on-white, which on this UI reads as a hole
   punched in the map. They are restyled to match the .glass panels rather than
   left as someone else's design sitting on top of ours. */
.maplibregl-ctrl-group{
  background:rgba(8,10,14,.88)!important;
  border:1px solid var(--line-2)!important;
  border-radius:4px!important;
  box-shadow:none!important;
  backdrop-filter:blur(8px);
}
.maplibregl-ctrl-group button{
  width:32px!important;height:32px!important;
  background:transparent!important;
  border-bottom:1px solid var(--line)!important;
}
.maplibregl-ctrl-group button:last-child{border-bottom:0!important}
.maplibregl-ctrl-group button:hover{background:rgba(255,255,255,.07)!important}
/* The glyphs are background images tinted for a light control. */
.maplibregl-ctrl-icon{filter:invert(1) brightness(.85)}
.maplibregl-ctrl-attrib{display:none}

@media (max-width:859px){
  /* Hidden on touch. Pinch-zoom is the natural gesture, the buttons are a
     desktop affordance, and at 393px the view switcher wraps to a second row
     and lands directly on top of them. */
  .maplibregl-ctrl-top-right{display:none}
}

/* The tilt row scrolls horizontally and gave no sign of it - the last
   elevation simply ran off the edge looking clipped. A fade at the right edge
   says "there is more" without adding a control. */
.tilts{
  -webkit-mask-image:linear-gradient(90deg,#000 calc(100% - 22px),transparent);
  mask-image:linear-gradient(90deg,#000 calc(100% - 22px),transparent);
}
.tilts::-webkit-scrollbar{height:0}
.tilts{scrollbar-width:none}

/* ---------- donate ----------
   Mirrors the dispatch board: a small persistent pill up top and a line at the
   foot of each scrolling view. The pill is NOT fixed-position here - wx already
   has a fixed top bar with the location button in that corner, so a floating
   pill would sit on top of it. It lives in the bar instead.
   The heart keeps its own colour; the link takes the wx accent rather than
   dispatch's ember, because on this app orange already means a temperature. */
.donate-corner{
  display:inline-flex;align-items:center;gap:.35rem;margin-left:auto;
  font-size:11.5px;font-weight:700;letter-spacing:.02em;text-decoration:none;
  color:#ffd9b8;background:rgba(255,106,61,.10);
  border:1px solid rgba(255,106,61,.42);border-radius:999px;
  padding:6px 11px;white-space:nowrap;
  transition:border-color .15s,color .15s,transform .15s;
}
.donate-corner:hover{color:#ffb03a;border-color:#ffb03a;transform:translateY(-1px)}
/* The app link moved out of the page footer and up beside Donate. Same pill,
   same metrics - only the hue differs, so the pair reads as one group of two
   related actions rather than two competing badges. The accent green is the
   app's own colour on the download page and in the launcher icon. */
.app-corner{
  display:inline-flex;align-items:center;gap:.35rem;margin-left:auto;
  font-size:11.5px;font-weight:700;letter-spacing:.02em;text-decoration:none;
  color:#bff3d4;background:rgba(67,224,138,.10);
  border:1px solid rgba(67,224,138,.38);border-radius:999px;
  padding:6px 11px;white-space:nowrap;
  transition:color .18s ease,border-color .18s ease,transform .18s ease;
}
.app-corner:hover{color:#43e08a;border-color:#43e08a;transform:translateY(-1px)}
/* Only ONE of the pair takes the auto margin, or the second pushes off the
   first and the group splits across the bar. */
.topbar .donate-corner{margin-left:8px}
/* .place also carries margin-left:auto; once the pill takes it, the pill is
   what gets pushed right and .place must sit directly beside it. */
.topbar .place{margin-left:8px}

.donate-line{
  text-align:center;margin:18px 0 4px;font-size:13px;color:var(--text-2);
}
.donate-line a{
  color:#ff8a5c;text-decoration:none;font-weight:700;
  border-bottom:1px solid rgba(255,106,61,.5);
}
.donate-line a:hover{color:#ffb03a;border-color:#ffb03a}

@media (max-width:480px){
  /* The label goes at phone width so the bar keeps brand + heart + location
     on one line; the heart alone still reads as "support". */
  /* Both pills drop their label here, so the glyph alone has to carry the
     meaning. That is why the app pill uses a colour emoji and not an outline
     glyph: at 13px on a near-black bar, a hollow shape reads as empty space,
     which is exactly how the link managed to be present, on-screen, correctly
     sized - and invisible. */
  .donate-corner .dc-t,.app-corner .dc-t{display:none}
  .donate-corner,.app-corner{padding:7px 11px;font-size:13px}
  .topbar .donate-corner{margin-left:6px}
}

/* Both of these were added after the mobile pass and came in under the 44px
   floor it established - measured at 38x36 and 45x15. The footer link is
   inline text, so it gets the hit area through padding without the underline
   moving. */
@media (max-width:859px){
  .donate-corner,.app-corner{min-height:44px}
  .donate-line{margin:14px 0 0}
  .donate-line a{display:inline-block;padding:13px 4px;min-height:44px}
}

/* Saturation note. Above the chart, not inside it: drawn in the SVG it landed
   on top of the precipitation bars and the hour labels, because the bars rise
   from the axis and the labels sit beneath it - there is no free band there. */
.sat-note{
  display:flex;align-items:flex-start;gap:8px;
  padding:8px 11px;margin-bottom:10px;border-radius:4px;
  border:1px solid rgba(57,182,200,.30);background:rgba(57,182,200,.10);
  color:#8fd4de;font-size:11.5px;line-height:1.45;
}
.sat-dot{
  flex:0 0 auto;width:7px;height:7px;margin-top:5px;
  border-radius:50%;background:var(--cool);
}

/* ---------- global alert strip ----------
   Above the views, so a warning is visible on every screen. It was drawn
   inside the Now view, which made the landing tab load-bearing for safety:
   open the app on any other tab during a flash flood warning and nothing on
   screen said so. Empty by default and takes no space until something is
   active. */
.alert-strip{display:flex;flex-direction:column;gap:8px;max-width:1180px;margin:0 auto}
.alert-strip:empty{display:none}
.alert-strip .alert{margin-bottom:0}
.alert-strip.has-alerts{padding:12px 16px 0 16px}
@media (min-width:860px){
  .alert-strip.has-alerts{padding:16px 20px 0 20px}
}

/* Pointer to the Android app. Deliberately quieter than the donate line:
   it is useful information for some readers and noise for the rest, and the
   page already works without it. */
@media (max-width:859px){
}

/* ================= analytics / scoreboard =================
   Bars are divs, not a chart library. The whole point of this stack is that it
   owns itself; pulling in a charting package to draw horizontal rectangles that
   CSS already draws would make it the largest asset on the site.

   Layout is mobile-first and stacks by default: label and value on one line,
   the bar beneath them full width. At 720px and up the three become one row,
   which is where a comparison of eighteen models actually becomes readable. */

.subtabs{display:flex;gap:2px;padding:3px;margin-bottom:12px;
  background:var(--panel-2);border:1px solid var(--line);border-radius:4px}
.subtab{padding:7px 14px;font-size:12px;background:none;border:0;border-radius:3px;
  color:var(--muted);cursor:pointer;min-height:34px}
.subtab:hover{color:var(--text-2)}
.subtab.is-on{background:rgba(67,224,138,.16);color:var(--accent)}

/* The one-line plain-language point, above its chart. Bordered on the accent
   rather than boxed, so it reads as the lead sentence and not as a callout the
   eye learns to skip. */
.sb-take{font-size:13px;line-height:1.55;color:var(--text-2);margin:0 0 14px 0;
  padding-left:11px;border-left:2px solid rgba(67,224,138,.45)}

.sb-meta{font-size:10px;letter-spacing:.04em;color:var(--faint);
  margin-top:10px;font-family:var(--mono)}

/* Archive age. Warn-toned, because it qualifies everything under it. */
.sb-young{display:flex;flex-direction:column;gap:3px;margin-top:12px;
  padding:11px 13px;border-radius:4px;font-size:12px;line-height:1.5;
  background:rgba(240,167,66,.10);border:1px solid rgba(240,167,66,.28);
  color:#e8c79a}
.sb-young strong{color:var(--warn);font-weight:600}

/* Expandable group, same disclosure vocabulary as the stations list so the two
   pages behave identically. */
.sb-grp{background:var(--panel-2);border:1px solid var(--line);border-radius:4px;
  margin-top:9px;overflow:hidden}
.sb-grp[open]{border-color:var(--line-2)}
.sb-grp-h{display:flex;align-items:center;gap:10px;flex-wrap:wrap;
  padding:12px 14px;cursor:pointer;list-style:none;user-select:none}
.sb-grp-h::-webkit-details-marker{display:none}
.sb-grp-h::before{content:"";flex:0 0 7px;height:7px;margin-right:-3px;
  border-right:1.5px solid var(--muted);border-bottom:1.5px solid var(--muted);
  transform:rotate(-45deg);transition:transform .15s ease}
.sb-grp[open] .sb-grp-h::before{transform:rotate(45deg)}
.sb-grp-n{font-size:12.5px;color:var(--text);font-weight:500}
.sb-grp-d{font-size:10.5px;color:var(--dim);font-family:var(--mono)}
.sb-grp-v{margin-left:auto;font-size:11.5px;color:var(--accent)}
.sb-grp-c{font-size:10.5px;color:var(--faint);flex-basis:100%}
.sb-grp-b{padding:4px 14px 14px 14px}

/* One bar. Stacked by default. */
.sb-row{display:grid;grid-template-columns:1fr auto;
  grid-template-areas:"lab val" "track track" "note note";
  align-items:center;gap:3px 10px;padding:6px 0;
  border-top:1px solid rgba(255,255,255,.05)}
.sb-row:first-child{border-top:0}
.sb-lab{grid-area:lab;font-size:12px;color:var(--text-2);
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.sb-val{grid-area:val;font-size:12px;color:var(--text);white-space:nowrap}
.sb-note{grid-area:note;font-size:10px;color:var(--dim);font-family:var(--mono)}
.sb-track{grid-area:track;height:5px;border-radius:3px;
  background:rgba(255,255,255,.06);overflow:hidden}
/* An empty track is drawn as a dashed rule, so "no value" cannot be mistaken
   for "a value of zero" - a zero-width fill looks like a perfect score. */
.sb-track.is-empty{background:none;border-top:1px dashed rgba(255,255,255,.14);height:1px}
.sb-fill{height:100%;border-radius:3px;background:var(--cool)}
.sb-fill.is-best{background:var(--accent)}

.sb-waiting{font-size:10.5px;color:var(--faint);padding:8px 0 0 0;font-style:italic}

/* Key/value pairs under a pattern. Two columns of mono numbers. */
.sb-kv{display:grid;grid-template-columns:1fr auto;gap:4px 12px;margin-top:9px}
.sb-kv-k{font-size:11px;color:var(--muted)}
.sb-kv-v{font-size:11.5px;color:var(--text);text-align:right}

/* Secondary reading beneath a bar, for the ensemble reliability figures. */
.sb-sub{display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 8px;
  padding:0 0 8px 0;margin-top:-2px}
.sb-sub-k{font-size:10.5px;color:var(--muted)}
.sb-sub-v{font-size:11px;color:var(--cool)}
.sb-sub-n{font-size:10px;color:var(--faint);flex-basis:100%;font-family:var(--mono)}

.sb-def{font-size:11.5px;line-height:1.55;color:var(--muted);margin:2px 0 0 0}

.sb-empty{display:flex;align-items:baseline;gap:10px;padding:14px 0 4px 0;
  font-size:12px;color:var(--muted)}
.sb-empty-n{font-size:24px;color:var(--text-2);letter-spacing:-.02em}

.sb-floors{margin-top:10px}
.sb-floor{border-top:1px solid rgba(255,255,255,.06);padding:2px 0}
.sb-floor-h{display:flex;align-items:center;gap:10px;padding:8px 0;
  cursor:pointer;list-style:none}
.sb-floor-h::-webkit-details-marker{display:none}
.sb-floor-n{font-size:11.5px;color:var(--text-2);text-transform:capitalize}
.sb-floor-v{margin-left:auto;font-size:11px;color:var(--dim)}
.sb-floor .sb-def{padding-bottom:9px}

@media (min-width:720px){
  /* Label, bar, number on one line. minmax(0,...) on both flexible tracks so a
     long model name shrinks instead of forcing the row wider than the card. */
  .sb-row{grid-template-columns:minmax(0,13em) minmax(0,1fr) auto;
    grid-template-areas:"lab track val" "note note note";gap:2px 12px}
  .sb-note{padding-left:calc(13em + 12px)}
}

/* ---------- radar controls: collapsible at every width ----------
   Eight rows stack in .rd-bottom, and mobile raises every button to a 44px
   touch target - correct for the finger, brutal for the map. Measured at about
   225px of panel plus 44px of top bar, roughly 39% of a 390x844 screen was
   controls rather than weather, which on a radar screen is covering the only
   thing the reader opened it for.

   It was a phone affordance only, on the argument that a desktop has room.
   True, and beside the point: the panel is a 420px opaque slab pinned over
   LIVE DATA, and the storm it covers does not care how large the window is.
   Anyone who has chosen their source, product and look is done with the panel
   and wants the map back. So the strip and the collapse now work at every
   width - DEFAULT OPEN on a desktop, default closed on a phone, and whichever
   the reader picks is remembered (see the panel key in radarview.js).

   The transport, the timestamp and the status line are NOT in .rd-panel, so
   they stay pinned in both states: they are what a reader touches while
   watching a loop, as opposed to choosing what to watch. */
.rd-panel{display:none;flex-direction:column;gap:10px}
.rd-bottom.is-open .rd-panel{display:flex}

.rd-handle{
  display:flex;align-items:center;justify-content:space-between;gap:8px;
  width:100%;min-height:30px;padding:6px 8px;
  background:rgba(255,255,255,.05);border:1px solid var(--line-2);
  border-radius:3px;color:var(--text-2);font-family:var(--mono);
  font-size:10.5px;letter-spacing:.04em;cursor:pointer;
}
.rd-handle:hover{color:var(--text)}
.rd-handle-t{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
/* Chevron, drawn rather than a glyph so it can rotate. */
.rd-handle-x{
  flex:0 0 7px;height:7px;margin-right:2px;
  border-right:1.5px solid var(--muted);border-bottom:1.5px solid var(--muted);
  transform:rotate(-45deg);transition:transform .15s ease;
}
.rd-bottom.is-open .rd-handle-x{transform:rotate(45deg)}

@media (max-width:859px){
  /* Tighter frame: the panel is pinned over live data, so every pixel of
     padding is a pixel of radar. */
  .rd-bottom{left:6px;right:6px;bottom:6px;padding:7px 8px;gap:7px}
  .rd-top{top:6px;left:6px;right:6px;gap:6px}

  /* The strip is the one control a reader jabs at with a thumb while the map
     is moving, so it gets the full touch target here. */
  .rd-handle{min-height:38px;padding:8px 10px;font-size:11px}

  /* The readout sits below the top bar; with the top bar tightened it would
     otherwise overlap on a narrow screen. */
  .readout{top:52px;left:6px;width:min(190px, calc(100% - 12px))}

  /* The status line stays pinned even when the panel is shut: it is where the
     "FOLDED - SIGN UNRELIABLE PAST NYQUIST" warning appears, and a velocity
     reader has to see that before trusting a couplet. Allowed to wrap rather
     than truncate, for the same reason - an ellipsis could eat the warning. */
  .live{font-size:9px;line-height:1.35;flex-wrap:wrap}
}

@media (max-width:400px){
  /* At this width the transport row and a 44px product grid cannot both be
     comfortable, so the timestamp loses its side labels rather than wrapping. */
  .tstamp{font-size:9px}
  .rd-bottom{padding:6px 7px;gap:6px}
}

/* ---------- mobile: keep the two floating bars to one line each ----------

   RADAR TOP BAR

   It carries the radar-site button and the three zoom presets, one of which is
   labelled "Transylvania". At the desktop type size those overflow a phone's
   width, and because .rd-top is a flex row the overflow pushed the site button
   out of line instead of compressing anything. Nothing here shortens the labels:
   "TRANS" would save 30 px and cost a reader who does not already know the
   county. Instead the type and padding come down, the row is pinned to one line,
   and the preset group is allowed to scroll if a future label is longer still -
   so the bar can never again grow a second row over the map.

   LOCATION PILL

   .place sizes itself to its contents, so "Lake Toxaway" made it half again the
   width of "Brevard" and crowded the app and donate buttons beside it. Capped at
   a share of the viewport with the name truncating, because the pill is a
   control whose width should not depend on which place is chosen. The full name
   stays available to assistive technology and on hover through the title
   attribute set in the markup. */
@media (max-width:859px){
  .rd-top{flex-wrap:nowrap;align-items:flex-start}
  /* min-width:0 lets a flex child shrink below its content width; without it
     the group refuses to compress and the overflow reappears. */
  .rd-top .view-sw{min-width:0;overflow-x:auto;scrollbar-width:none}
  .rd-top .view-sw::-webkit-scrollbar{display:none}
  .rd-top .rd-btn{flex:0 0 auto;padding:10px;font-size:11px}
  .vsw{padding:9px 8px;font-size:10px;white-space:nowrap;min-height:38px}

  .place{
    min-width:0;max-width:42vw;overflow:hidden;
    padding:10px 10px;gap:6px;
  }
  .place svg{flex:0 0 auto}
  #placeName{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
}

@media (max-width:400px){
  /* At the narrowest the brand and the two corner buttons already claim most of
     the bar, so the pill gives up more of it rather than pushing them off. */
  .place{max-width:36vw}
  .topbar{gap:12px;padding:0 12px}
}

/* Pattern glossary: each term defined once, not once per zone. */
.sb-gloss{padding:9px 0;border-top:1px solid rgba(255,255,255,.05)}
.sb-gloss:first-child{border-top:0}
.sb-gloss-n{font-size:12px;color:var(--text-2);font-weight:500;margin-bottom:3px}

/* Lightning overlay: the count beside the toggle.
   "Off" and "on with nothing striking" draw the same empty map, so the state
   has to be written down somewhere. */
.rd-ov-note{font-size:9.5px;color:var(--dim);white-space:nowrap;flex-shrink:0}

/* ------------------------------------------------------------------ flood state
   Observed flood pressure, on the Rivers tab.

   The band colours deliberately REUSE the existing threshold palette from the
   river chart (--warn, the amber already used for action stage, and the reds
   used for moderate and major) rather than introducing a second colour language
   for the same subject. A reader who has learnt that amber means "approaching"
   on the chart must not have to learn that it means something else twelve
   pixels above it.

   Nothing here is green. --accent is UI chrome in this project and on a weather
   page a green bar reads as "fine"; a quiet creek is shown by a short bar, not
   by a reassuring colour. */

.fs-soil{margin-top:14px;padding:11px 12px;background:var(--panel-2);
  border:1px solid var(--line);border-radius:4px}
.fs-soil-h{display:flex;align-items:baseline;justify-content:space-between;
  gap:10px;flex-wrap:wrap}
.fs-soil-t{font-size:10px;font-weight:600;color:var(--muted);letter-spacing:.08em}
.fs-soil-v{font-size:11.5px;color:var(--text-2)}
.fs-soil-row{font-size:10.5px;color:var(--dim);margin-top:6px;
  font-family:var(--mono)}
.fs-soil .wnc-note{border-top-color:rgba(255,255,255,.06);margin-top:9px}

.fs-list{display:flex;flex-direction:column;gap:1px;margin-top:14px;
  background:var(--line);border:1px solid var(--line);border-radius:4px;
  overflow:hidden}
.fs-row{background:var(--panel-2);padding:12px 13px}

.fs-row-h{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.fs-name{font-size:12.5px;color:var(--text-2);flex-grow:1;min-width:0;
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.fs-score{font-size:14px;color:var(--text);flex:0 0 auto}

.fs-band{font-size:8.5px;font-weight:700;letter-spacing:.05em;padding:2px 6px;
  border-radius:2px;flex:0 0 auto;text-transform:uppercase;white-space:nowrap}
/* Quiet and wet are stated in grey: they are the normal states of a creek, and
   a coloured badge on the normal state trains a reader to ignore colour. */
.fs-b-quiet{color:var(--dim);background:rgba(255,255,255,.05)}
.fs-b-wet{color:var(--muted);background:rgba(255,255,255,.07)}
.fs-b-loaded{color:#e8c46b;background:rgba(201,162,39,.16)}
.fs-b-rising{color:#ffb476;background:rgba(255,138,92,.16)}
.fs-b-top{color:#ffb3aa;background:rgba(255,107,93,.18)}
.fs-b-unknown{color:var(--faint);background:rgba(255,255,255,.04)}

/* The bar. A dashed track for an absent value, so "not measured" never draws
   the same as "measured zero". */
.fs-bar{position:relative;height:5px;margin-top:9px;border-radius:3px;
  background:rgba(255,255,255,.07);overflow:hidden}
.fs-bar.is-unknown{background:repeating-linear-gradient(
  90deg,rgba(255,255,255,.09) 0 3px,transparent 3px 6px)}
.fs-bar-f{height:100%;width:0;border-radius:3px;background:var(--muted);
  transition:width .35s ease}
.fs-bar-f.fs-b-quiet{background:var(--faint)}
.fs-bar-f.fs-b-wet{background:var(--dim)}
.fs-bar-f.fs-b-loaded{background:#c9a227}
.fs-bar-f.fs-b-rising{background:#ff8a5c}
.fs-bar-f.fs-b-top{background:var(--alert)}

.fs-comps{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));
  gap:5px 16px;margin-top:11px}
.fs-comp{display:grid;grid-template-columns:46px minmax(0,1fr) 26px;
  align-items:center;gap:8px}
.fs-comp .fs-bar{margin-top:0;height:4px}
.fs-comp-k{font-size:9px;color:var(--dim);letter-spacing:.05em;
  text-transform:uppercase}
.fs-comp-v{font-size:10.5px;color:var(--text-2);text-align:right}
.fs-bar-f.fs-comp-f{background:var(--cool)}

.fs-facts{font-size:10.5px;line-height:1.55;color:var(--muted);margin-top:11px;
  font-family:var(--mono)}

/* The extrapolation. Bordered rather than coloured: it is the one number here
   that is not a measurement, and the border is what says so at a glance without
   claiming severity. */
.fs-extrap{font-size:10.5px;line-height:1.5;color:var(--text-2);margin-top:9px;
  padding:7px 9px;border-left:2px solid #c9a227;background:rgba(201,162,39,.07)}

.fs-up{font-size:10.5px;line-height:1.5;color:var(--dim);margin-top:8px}
.fs-up.is-on{color:#ffb476}

.fs-missing{margin-top:8px}
.fs-missing-row{font-size:10px;line-height:1.5;color:var(--faint)}

.fs-cc{margin-top:9px}
.fs-cc>summary{font-size:10px;color:var(--dim);cursor:pointer;
  letter-spacing:.04em}
.fs-cc>summary::-webkit-details-marker{display:none}
.fs-cc>summary::before{content:"+ "}
.fs-cc[open]>summary::before{content:"\2212 "}
.fs-cc-v{font-size:11px;color:var(--text-2);margin-top:7px}
.fs-cc .wnc-note{border-top-color:rgba(255,255,255,.06)}

.fs-method{padding:10px 12px}
.fs-method-row{font-size:10.5px;line-height:1.6;color:var(--muted);
  padding:5px 0;border-top:1px solid rgba(255,255,255,.05)}
.fs-method-row:first-child{border-top:0}

@media (max-width:520px){
  /* One component per line below this: the three-column grid inside a
     two-column grid leaves the bar about 40 px wide on a phone, which is not a
     bar. */
  .fs-comps{grid-template-columns:minmax(0,1fr)}
}

/* ------------------------------------------------- foldable Rivers cards
   The gauge cards and the flood-pressure card are <details>, so the browser
   owns the open state - keyboard, screen readers and find-in-page all work
   without this file knowing anything about it.

   AFFORDANCE: THE SUMMARY IS A BAR, NOT A LABEL

   The first pass only set `cursor:pointer` and a small chevron, and it did not
   read as clickable - correctly, because nothing about it differed from the
   card titles everywhere else in this app, which are not controls. Four things
   fix that, and they work together rather than any one carrying it:

     1. the row goes FULL-BLEED to the card edges, so hover tints a band that
        is obviously one object rather than a word with a highlight behind it;
     2. hover and :active are distinct, so a press is acknowledged on touch
        where there is no hover at all;
     3. the chevron sits in its own bordered box, which is the part that reads
        as a control at a glance;
     4. the title brightens with the row, so the whole bar responds together.

   A closed card is nothing BUT the bar, so the card's own bottom padding is
   removed in that state - otherwise the band stops short of the card's lower
   edge and the thing that is clickable looks smaller than the thing it is in. */

/* Closed, the bar IS the card: hand it the card's bottom padding. */
.rv-card:not([open]),
.fs-card:not([open]){padding-bottom:0}

.rv-card > summary,
.fs-card > summary{
  cursor:pointer;
  /* Full-bleed. .card is padded 16px 18px, so these negatives take the row out
     to the card's own edges and the padding below puts the content back where
     it was. */
  margin:-16px -18px 0;
  padding:15px 18px;
  gap:10px;
  min-height:24px;
  transition:background .14s ease;
  /* A grey flash on tap, replaced by the :active rule below, which matches the
     hover tint so touch and pointer behave identically. */
  -webkit-tap-highlight-color:transparent;
  /* The native triangle is replaced below. list-style for Firefox, the
     pseudo-element for WebKit - both are needed. */
  list-style:none;
  user-select:none;
  /* The hover band runs to the card's edge, so it has to be rounded to match
     or it squares off the corners. Done here rather than with overflow:hidden
     on the card, which would CLIP THE LEVEL CHART - .rv-chart is deliberately
     overflow:visible so threshold labels can sit outside the plot box. */
  border-radius:4px 4px 0 0;
}
/* Closed, the bar is the whole card, so all four corners. */
.rv-card:not([open]) > summary,
.fs-card:not([open]) > summary{border-radius:4px}
.rv-card > summary::-webkit-details-marker,
.fs-card > summary::-webkit-details-marker{display:none}

.rv-card > summary:hover,
.fs-card > summary:hover{background:rgba(255,255,255,.05)}
.rv-card > summary:active,
.fs-card > summary:active{background:rgba(255,255,255,.085)}

/* Open: the bar becomes a header, separated from the body by a hairline so it
   still reads as the thing that closes the card. */
.rv-card[open] > summary,
.fs-card[open] > summary{
  margin-bottom:14px;
  border-bottom:1px solid var(--line);
}

/* The marker. A bordered box, because that is the part a reader recognises as
   a control - a bare chevron on a page full of chevrons is decoration.
   AFTER the content, not before: the gauge name is what gets scanned down a
   list of twelve and nothing is allowed to indent it. */
.rv-card > summary::after,
.fs-card > summary::after{
  content:"";
  flex:0 0 auto;
  box-sizing:border-box;
  width:22px;height:22px;
  border:1px solid var(--line-2);
  border-radius:4px;
  background:rgba(255,255,255,.03);
  /* The chevron itself, drawn as a rotated corner and centred in the box. */
  background-image:
    linear-gradient(to bottom right, transparent 47%, var(--muted) 47% 53%, transparent 53%),
    linear-gradient(to bottom left,  transparent 47%, var(--muted) 47% 53%, transparent 53%);
  background-size:6px 6px, 6px 6px;
  background-position:calc(50% - 3px) calc(50% - 1px), calc(50% + 3px) calc(50% - 1px);
  background-repeat:no-repeat;
  transition:transform .18s ease, border-color .14s ease, background-color .14s ease;
}
.rv-card[open] > summary::after,
.fs-card[open] > summary::after{transform:rotate(180deg)}
.rv-card > summary:hover::after,
.fs-card > summary:hover::after{
  border-color:var(--muted);
  background-color:rgba(255,255,255,.07);
}

/* Focus must be visible - these are the only keyboard controls on the tab. */
.rv-card > summary:focus-visible,
.fs-card > summary:focus-visible{
  outline:1px solid var(--accent);
  outline-offset:-2px;
}

/* The title is the card's primary label and part of the control, so it is
   brighter than a plain .card-t and responds with the row. */
.rv-sum-n,
.fs-sum-n{
  flex:1 1 auto;min-width:0;
  font-size:12px;
  color:var(--text-2);
  transition:color .14s ease;
}
.rv-sum-n{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.rv-card > summary:hover .rv-sum-n,
.fs-card > summary:hover .fs-sum-n{color:var(--text)}

/* Depth and three-hour change, on the summary.
   Tabular figures so a column of folded cards lines up down the list rather
   than jittering with the digit widths. */
.rv-peek{flex:0 0 auto;font-size:12px;color:var(--text-2);
  font-variant-numeric:tabular-nums;white-space:nowrap}
.rv-peek.rv-rise{color:var(--warn)}
.rv-peek.rv-fall{color:var(--accent)}

@media (max-width:430px){
  /* At phone width the name, readout and distance do not fit on one line.
     The distance is the least useful of the three once the list is already in
     distance order, so it is the one that goes. */
  .rv-sum > .card-t.num{display:none}
  .rv-peek{font-size:11.5px}
  /* A little more height, because this is now a touch target. */
  .rv-card > summary,
  .fs-card > summary{padding-top:16px;padding-bottom:16px}
}

/* Pointer-less devices get no hover, so the bar has to look pressable at rest:
   the marker box carries a slightly stronger border there. */
@media (hover:none){
  .rv-card > summary::after,
  .fs-card > summary::after{
    border-color:var(--muted);
    background-color:rgba(255,255,255,.06);
  }
}

/* =============================================================================
   TROPICAL
   One palette rule governs this whole section: NOTHING here may borrow the
   radar ramp. Blue through magenta already means rainfall rate on this site,
   and a cone drawn in any of it would read as precipitation. So the storm
   colours come off the chrome palette only - --warn for a tropical storm,
   --alert for a hurricane, --cool for the cone, --dim for anything no longer
   tropical - and intensity is carried by weight and by the labels, not by hue.
   ========================================================================== */

/* ---------- formation outlook ---------- */
.tc-ob{border-top:1px solid var(--line);padding-top:12px;margin-top:12px}
.tc-ob:first-of-type{border-top:0;padding-top:0;margin-top:0}
.tc-ob-h{display:flex;align-items:baseline;justify-content:space-between;gap:10px}
.tc-ob-t{font-size:13px;font-weight:600}
.tc-ob-age{font-size:9.5px;color:var(--dim);letter-spacing:.06em;white-space:nowrap}
.tc-verdict{margin-top:8px;font-size:13.5px;line-height:1.5;
  padding:9px 11px;border-radius:4px;border-left:2px solid var(--line-2)}
.tc-verdict strong{font-weight:600}
.tc-v-quiet{background:rgba(67,224,138,.07);border-left-color:var(--accent)}
.tc-v-watch{background:rgba(240,167,66,.09);border-left-color:var(--warn)}
.tc-v-unknown{background:rgba(255,255,255,.04);border-left-color:var(--muted)}
.tc-ob-active{margin-top:9px;font-size:12.5px;color:var(--text-2);line-height:1.55}
.tc-sig{margin-top:8px;font-size:9.5px;color:var(--faint);letter-spacing:.06em}

.tc-area{margin-top:9px;border:1px solid var(--line);border-radius:4px;
  background:var(--panel-2)}
.tc-area-h{display:flex;align-items:center;gap:9px;flex-wrap:wrap;
  padding:9px 11px;cursor:pointer;min-height:44px}
.tc-area-h::-webkit-details-marker{display:none}
.tc-area-h:hover{background:rgba(255,255,255,.04)}
.tc-area-n{font-size:13px;font-weight:600;flex:1 1 auto;min-width:0}
.tc-invest{font-size:9.5px;color:var(--dim);border:1px solid var(--line);
  border-radius:3px;padding:1px 5px}
.tc-chances{display:flex;gap:6px;flex-shrink:0}
.tc-chance{display:flex;align-items:baseline;gap:5px;font-size:10.5px;
  padding:2px 7px;border-radius:3px;background:rgba(255,255,255,.05)}
.tc-chance-l{font-size:8.5px;color:var(--dim);letter-spacing:.07em}
.tc-c-low{background:rgba(255,255,255,.07);color:var(--text-2)}
.tc-c-med{background:rgba(240,167,66,.18);color:#f6c77e}
.tc-c-high{background:rgba(255,107,93,.2);color:#ff9d93}
.tc-prose{font-size:13px;line-height:1.6;color:var(--text-2);
  white-space:pre-wrap;padding:0 11px 11px 11px}

.tc-none-t{font-size:18px;font-weight:600;letter-spacing:-.01em}
.tc-none-b{margin-top:8px;font-size:13px;line-height:1.6;color:var(--text-2)}
.tc-empty{font-size:12.5px;line-height:1.6;color:var(--muted);
  padding:10px 0 2px 0}

/* ---------- a storm ---------- */
.tc-storm-h{align-items:flex-start;flex-wrap:wrap;gap:10px}
.tc-id{display:flex;align-items:baseline;gap:10px;flex-wrap:wrap;min-width:0}
.tc-name{font-size:21px;font-weight:600;letter-spacing:-.015em}
.tc-class{font-size:9.5px;font-weight:600;letter-spacing:.08em;
  padding:3px 7px;border-radius:3px;background:rgba(255,255,255,.07);
  color:var(--text-2);white-space:nowrap}
.tc-t-hur{background:rgba(255,107,93,.2);color:#ff9d93}
.tc-t-ts{background:rgba(240,167,66,.18);color:#f6c77e}
.tc-t-td{background:rgba(57,182,200,.16);color:#8fdbe6}
.tc-t-ptc{background:rgba(57,182,200,.16);color:#8fdbe6}
.tc-t-post{background:rgba(255,255,255,.06);color:var(--muted)}
.tc-adv{display:flex;flex-direction:column;align-items:flex-end;gap:3px;
  font-size:9.5px;color:var(--dim);letter-spacing:.06em;white-space:nowrap}
.tc-adv-age.is-stale{color:var(--warn)}

/* The local read. Deliberately the loudest thing on the card. */
.tc-local{border:1px solid var(--line-2);border-radius:4px;
  background:var(--panel-2);padding:13px 14px}
.tc-local-h{display:flex;align-items:baseline;justify-content:space-between;
  gap:12px;flex-wrap:wrap}
.tc-local-d{display:flex;align-items:baseline;gap:7px;min-width:0}
.tc-local-n{font-size:clamp(30px,8vw,40px);font-weight:500;line-height:1;
  letter-spacing:-.03em}
.tc-local-u{font-size:12px;color:var(--muted)}
.tc-cone-chip{font-size:10px;font-weight:600;letter-spacing:.07em;
  padding:4px 9px;border-radius:3px;white-space:nowrap}
.tc-cone-chip.tc-in{background:rgba(255,107,93,.2);color:#ff9d93}
.tc-cone-chip.tc-out{background:rgba(67,224,138,.1);color:var(--accent)}
.tc-cone-chip.tc-unk{background:rgba(255,255,255,.06);color:var(--muted)}
.tc-local-when{margin-top:7px;font-size:13px;color:var(--text-2);line-height:1.5}
.tc-caveat{margin-top:10px;font-size:12px;line-height:1.55;color:#e8c89a;
  background:rgba(240,167,66,.08);border-left:2px solid var(--warn);
  padding:8px 10px;border-radius:0 3px 3px 0}
.tc-fine{margin-top:8px;font-size:10.5px;line-height:1.55;color:var(--dim)}

.tc-headline{margin-top:13px;font-size:14.5px;font-weight:600;line-height:1.45;
  letter-spacing:-.005em;color:var(--text)}

/* ---------- the map ---------- */
.tc-map-wrap{margin-top:14px}
.tc-map{display:block;width:100%;height:auto;max-height:62vh;
  background:#070a0e;border:1px solid var(--line);border-radius:4px}
.tc-grid{stroke:rgba(255,255,255,.055);stroke-width:1}
.tc-grid-l{fill:var(--faint);font-family:var(--mono);font-size:13px}
.tc-coast{fill:none;stroke:#2b3744;stroke-width:1.6;stroke-linejoin:round}
.tc-cone{fill:rgba(57,182,200,.13);stroke:var(--cool);stroke-width:1.6}
.tc-track{fill:none;stroke:var(--muted);stroke-width:2.4;stroke-linecap:round}
.tc-fline{fill:none;stroke:var(--warn);stroke-width:3;stroke-linecap:round}
.tc-fpt{fill:var(--warn);stroke:#0b0b11;stroke-width:2}
/* Hollow once it is no longer a tropical cyclone. A solid dot the same as the
   others would say a hurricane is forecast over Kentucky. */
.tc-fpt.is-post{fill:#0b0b11;stroke:var(--muted);stroke-width:2.4}
.tc-fpt-l{fill:var(--text-2);font-family:var(--mono);font-size:15px;
  text-anchor:middle}
.tc-now{fill:none;stroke:var(--alert);stroke-width:3.5}
.tc-here{stroke:var(--accent);stroke-width:3;stroke-linecap:round}
.tc-here-l{fill:var(--accent);font-family:var(--mono);font-size:15px;
  font-weight:600}
.tc-map-leg{display:flex;gap:14px;flex-wrap:wrap;margin-top:8px;
  font-size:10px;color:var(--dim)}
.tc-lg{display:inline-flex;align-items:center;gap:5px}
.tc-lg::before{content:"";width:14px;height:0;border-top-width:2.5px;
  border-top-style:solid}
.tc-lg-track::before{border-top-color:var(--muted)}
.tc-lg-fcst::before{border-top-color:var(--warn)}
.tc-lg-cone::before{border-top-color:var(--cool);height:8px;
  background:rgba(57,182,200,.13)}
.tc-lg-post::before{border-top-color:var(--muted);border-top-style:dashed}
.tc-cone-desc{margin-top:8px;font-size:10.5px;line-height:1.6;color:#6f7f76;
  border-top:1px solid rgba(57,182,200,.18);padding-top:9px}

/* ---------- numbers ---------- */
.tc-vitals{display:grid;grid-template-columns:repeat(3,1fr);gap:1px;
  margin-top:14px;background:var(--line);border:1px solid var(--line);
  border-radius:4px;overflow:hidden}
.tc-v{background:var(--panel);padding:10px 12px}
.tc-v-l{font-size:8.5px;color:var(--dim);letter-spacing:.09em}
.tc-v-n{font-size:15px;margin-top:3px}
.tc-v-s{font-size:10px;color:var(--faint);margin-top:1px}

.tc-sec{margin-top:16px}
.tc-fold{border:1px solid var(--line);border-radius:4px;padding:0}
.tc-fold>summary{padding:13px 14px;cursor:pointer;min-height:44px;
  display:flex;align-items:center}
.tc-fold>summary::-webkit-details-marker{display:none}
.tc-fold>summary::after{content:"+";margin-left:auto;font-family:var(--mono);
  color:var(--dim)}
.tc-fold[open]>summary::after{content:"\2212"}
.tc-fold>summary:hover{background:rgba(255,255,255,.04)}
.tc-fold>.tc-prose,.tc-fold>.wnc-note,.tc-fold>.tc-empty{padding-left:14px;
  padding-right:14px}
.tc-fold>.tc-tbl{width:calc(100% - 28px);margin:0 14px 12px 14px}
.tc-fold>.tc-skill-nhc,.tc-fold>.tc-skill-ours{padding:0 14px 12px 14px}

.tc-tbl{width:100%;border-collapse:collapse;margin-top:9px;font-size:12.5px}
.tc-tbl th{text-align:left;font-size:8.5px;font-weight:600;color:var(--dim);
  letter-spacing:.09em;padding:0 8px 6px 0;border-bottom:1px solid var(--line)}
.tc-tbl td{padding:7px 8px 7px 0;border-bottom:1px solid rgba(255,255,255,.05);
  vertical-align:top}
.tc-tbl tr.is-outlook td{color:var(--muted)}
.tc-tbl tr.is-short td{color:var(--faint)}
.tc-rem{font-size:9.5px;letter-spacing:.05em}
.tc-rem-c{color:var(--muted)}
.tc-rem-o{display:block;color:var(--faint)}

.tc-skill-h{font-size:12px;font-weight:600;margin:10px 0 8px 0}
.tc-skill-row{display:flex;gap:18px;flex-wrap:wrap}
.tc-sk-l{font-size:8.5px;color:var(--dim);letter-spacing:.09em}
.tc-sk-v{font-size:16px;margin-top:2px}
.tc-skill-ours{border-top:1px solid var(--line);margin-top:12px}

.tc-rain-big{display:flex;align-items:baseline;gap:10px;flex-wrap:wrap}
.tc-rain-n{font-size:clamp(28px,7.5vw,38px);font-weight:500;line-height:1;
  letter-spacing:-.03em}
.tc-rain-u{font-size:12px;color:var(--muted)}
.tc-rain-med{font-size:11px;color:var(--dim);margin-left:auto}

.tc-links{display:flex;gap:12px;flex-wrap:wrap;align-items:center;
  margin-top:16px;border-top:1px solid var(--line);padding-top:12px}
.tc-link{font-size:12px;color:var(--cool);text-decoration:none;
  border-bottom:1px solid rgba(57,182,200,.35);padding-bottom:1px}
.tc-link:hover{color:#8fdbe6}

.tc-method>summary{cursor:pointer;min-height:44px}
.tc-method>summary::-webkit-details-marker{display:none}
.tc-dl{margin:0 0 12px 0;font-size:12.5px;line-height:1.6}
.tc-dl dt{font-weight:600;margin-top:10px}
.tc-dl dd{margin:3px 0 0 0;color:var(--text-2)}
.tc-ul{margin:8px 0 14px 0;padding-left:18px;font-size:12.5px;line-height:1.6;
  color:var(--text-2)}
.tc-ul li{margin-top:6px}

/* ---------- forecast trend (advisory-to-advisory drift) ----------
   COLOUR: near-white, dashed, and nothing else on this site uses it.
   The radar ramp owns blue through magenta, the cone owns --cool, the official
   forecast owns --warn, the track owns --muted, "you" owns --accent and the
   current centre owns --alert. There is no hue left that would not collide with
   a data colour - which is the right answer anyway, because this overlay is an
   ANNOTATION on somebody else's forecast rather than a datum of its own. White
   and dashed is how an annotation reads. */
.tc-trend-l{fill:none;stroke:#e8e8f0;stroke-width:2.4;stroke-dasharray:7 5;
  stroke-linecap:round}
.tc-trend-h{fill:none;stroke:#e8e8f0;stroke-width:2.6;stroke-linejoin:round;
  stroke-linecap:round}
.tc-lg-trend::before{border-top-color:#e8e8f0;border-top-style:dashed}

.tc-trend-tog{display:flex;align-items:center;gap:9px;flex-wrap:wrap;
  margin-top:10px;font-size:12px;color:var(--text-2);cursor:pointer;
  min-height:44px}
.tc-trend-tog input{width:16px;height:16px;accent-color:#e8e8f0;flex:0 0 auto}
.tc-trend-tag{font-size:8.5px;font-weight:600;letter-spacing:.09em;
  color:var(--dim);border:1px solid var(--line);border-radius:3px;
  padding:2px 6px;white-space:nowrap}

.tc-trendbox>summary{gap:10px}
.tc-tr-badge{font-size:9.5px;font-weight:600;letter-spacing:.07em;
  padding:3px 8px;border-radius:3px;margin-left:auto;white-space:nowrap}
.tc-tr-shift{background:rgba(232,232,240,.14);color:#e8e8f0}
.tc-tr-steady{background:rgba(67,224,138,.1);color:var(--accent)}
.tc-tr-unsettled{background:rgba(240,167,66,.15);color:#f6c77e}
.tc-tr-none{background:rgba(255,255,255,.05);color:var(--muted)}
/* The fold marker sits after the badge, so the badge's auto margin would push
   it off the end. Order is restored by giving the marker its own margin. */
.tc-trendbox>summary::after{margin-left:10px}

.tc-tr-line{font-size:13px;line-height:1.6;color:var(--text-2);
  padding:0 14px 10px 14px}
/* The sentence that stops this feature being harmful. Given a block of its own
   rather than a footnote, because a reader who skims past it is the failure
   mode the whole overlay has. */
.tc-tr-warn{font-size:11.5px;line-height:1.6;color:#d8c9a8;
  background:rgba(240,167,66,.07);border-left:2px solid var(--warn);
  margin:0 14px 12px 14px;padding:9px 11px;border-radius:0 3px 3px 0}

@media (max-width:430px){
  .tc-vitals{grid-template-columns:repeat(2,1fr)}
  /* Seven labels in the bottom nav at 375px leaves 53px each, and "Tropical"
     is the longest of them. Half a point off the label rather than a truncated
     word, because the word IS the affordance. */
  .bnav span{font-size:9px;letter-spacing:.02em}
  /* The position column is the first thing a phone can do without: the map
     above it shows where the storm is, and the distance column is the one
     being read. */
  .tc-tbl th:nth-child(3),.tc-tbl td:nth-child(3){display:none}
}


/* ------------------------------------------------------------------ channel
   The full-screen deck. Sized for a second monitor and for an OBS browser
   source, which is why everything is in vw-relative type: the same markup has
   to be readable from a desk and from across a room, and a fixed px scale
   can only ever serve one of those. */
#channel{position:fixed;inset:0;z-index:60;display:none;
  background:radial-gradient(130% 100% at 50% 0%,#101826 0%,var(--bg) 70%);
  color:var(--text);font-family:var(--sans)}
#channel.is-on{display:flex;flex-direction:column}

.ch-body{position:relative;flex:1;min-height:0}
.ch-stage{position:absolute;inset:0;display:flex;align-items:center;
  justify-content:center;padding:clamp(18px,4vw,60px);overflow:hidden}

/* The RESTING state is visible. This is not a style preference - the global
   prefers-reduced-motion rule above is `*{animation:none!important}`, so a
   slide whose visibility depended on an animation reaching opacity:1 stayed
   at opacity:0 forever for any reader with reduced motion enabled, and the
   channel rendered a correct, complete, entirely invisible deck. The entrance
   therefore animates FROM hidden rather than TO visible, and killing the
   animation costs the entrance, not the content. */
.ch-slide{width:100%;max-width:1200px}
/* The entrance is slow on purpose. A channel is read passively and a fast
   transition reads as a notification - something that wants a response. */
.ch-slide.in{animation:ch-in .9s cubic-bezier(.16,.84,.44,1)}
@keyframes ch-in{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:none}}

.ch-kicker{font-size:clamp(11px,1.1vw,15px);font-weight:600;letter-spacing:.22em;
  color:var(--accent);margin-bottom:.6em}
.ch-place{font-size:clamp(16px,1.9vw,26px);font-weight:600;letter-spacing:.14em;
  color:var(--muted)}
.ch-big{display:flex;align-items:flex-start;line-height:.85;margin:.1em 0 .15em}
.ch-temp{font-size:clamp(90px,19vw,260px);font-weight:700;letter-spacing:-.03em;
  font-variant-numeric:tabular-nums}
.ch-deg{font-size:clamp(34px,6vw,90px);font-weight:400;color:var(--muted);
  margin-top:.12em}
.ch-cond{font-size:clamp(18px,2.4vw,34px);color:var(--text-2);margin-bottom:.7em}

.ch-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:clamp(10px,1.6vw,26px);
  border-top:1px solid var(--line);padding-top:clamp(12px,1.6vw,22px)}
.ch-cell-k{font-size:clamp(9px,.8vw,12px);letter-spacing:.17em;color:var(--dim)}
.ch-cell-v{font-size:clamp(20px,2.6vw,40px);font-weight:600;
  font-variant-numeric:tabular-nums}

.ch-week{display:grid;grid-template-columns:repeat(7,1fr);gap:clamp(6px,1vw,16px)}
.ch-day{text-align:center;padding:clamp(10px,1.4vw,20px) 4px;
  background:rgba(255,255,255,.03);border:1px solid var(--line);border-radius:6px}
.ch-day-n{font-size:clamp(10px,1vw,15px);letter-spacing:.14em;color:var(--muted)}
.ch-day-hi{font-size:clamp(22px,2.9vw,46px);font-weight:700;
  font-variant-numeric:tabular-nums}
.ch-day-lo{font-size:clamp(14px,1.7vw,26px);color:var(--dim);
  font-variant-numeric:tabular-nums}
.ch-day-p{font-size:clamp(10px,1vw,14px);color:var(--rain);margin-top:.4em}

/* An alert slide is the one place this deck is allowed to shout. */
.ch-alert{border-left:4px solid var(--alert);padding-left:clamp(14px,2vw,34px)}
.ch-alert .ch-kicker{color:var(--alert)}
.ch-alert-ev{font-size:clamp(34px,6vw,86px);font-weight:700;line-height:1.02;
  letter-spacing:-.02em}
.ch-alert-head{font-size:clamp(16px,1.9vw,30px);line-height:1.45;color:var(--text);
  margin-top:.5em;max-width:40ch}
.ch-alert-inst{font-size:clamp(13px,1.3vw,21px);line-height:1.55;
  color:var(--text-2);margin-top:.7em;max-width:58ch}

.ch-band{font-size:clamp(40px,7vw,110px);font-weight:700;letter-spacing:-.02em;
  color:var(--cool);line-height:1}
.ch-crate{font-size:clamp(30px,4.6vw,72px);font-weight:700;letter-spacing:-.02em}
.ch-because{font-size:clamp(16px,1.8vw,30px);color:var(--text-2);margin-top:.4em;
  max-width:46ch;line-height:1.4}
.ch-note{font-size:clamp(13px,1.2vw,20px);color:var(--muted);margin-top:.8em;
  max-width:60ch;line-height:1.55}

/* Provenance, on every slide, in the smallest type that is still honest. */
.ch-src{font-size:clamp(10px,.85vw,13px);color:var(--dim);margin-top:1.4em;
  max-width:74ch;line-height:1.6;font-family:var(--mono)}

.ch-bar{display:flex;align-items:center;gap:12px;padding:10px 14px;
  border-top:1px solid var(--line);background:rgba(0,0,0,.4)}
.ch-bug{display:flex;align-items:center;gap:10px;min-width:0;flex:1}
/* Playback is our own files through Web Audio, so there is no player to show.
   The <audio> elements are parented in .ch-sink and hidden; the lamp is the
   only indication, and it earns its place by distinguishing "armed and
   playing" from "armed and deliberately silent under a warning". */
.ch-sink{display:none}
.ch-lamp{width:8px;height:8px;border-radius:50%;flex:0 0 auto;
  background:var(--faint);transition:background .4s,box-shadow .4s}
.ch-bug.is-armed .ch-lamp{background:var(--dim)}
.ch-bug.is-playing .ch-lamp{background:var(--accent);
  box-shadow:0 0 0 3px rgba(67,224,138,.18)}
.ch-bug-t{font-size:13px;color:var(--text-2);white-space:nowrap;overflow:hidden;
  text-overflow:ellipsis;min-width:0}
.ch-tag{font-size:11px;letter-spacing:.14em;color:var(--muted);
  text-transform:uppercase;white-space:nowrap}

.ch-arm,.ch-btn{font:inherit;font-size:13px;padding:10px 16px;border-radius:5px;
  border:1px solid var(--line);background:rgba(255,255,255,.05);color:var(--text);
  cursor:pointer;min-height:44px;white-space:nowrap}
.ch-arm{background:var(--accent);color:var(--accent-ink);border-color:transparent;
  font-weight:600}
.ch-arm:disabled{opacity:.6;cursor:default}

@media (max-width:700px){
  .ch-grid{grid-template-columns:repeat(2,1fr)}
  /* Seven columns of forecast do not fit a phone; four days is still a week
     ahead and each one stays readable. */
  .ch-week{grid-template-columns:repeat(4,1fr)}
  .ch-day:nth-child(n+5){display:none}
  .ch-tag{display:none}
}

/* The channel launcher is a <button>, not the <a> the other two pills are, so
   it needs the form reset they get for free. And it is now the FIRST of three
   pills, which means it is the one taking margin-left:auto - the other two
   must not, or the group splits across the bar (the same trap noted above the
   donate rule). */
#channelBtn{font-family:var(--sans);cursor:pointer}
.topbar .app-corner+.app-corner{margin-left:8px}

/* ---- channel: the radar panel -------------------------------------------
   The map is built ONCE and revealed, never rebuilt per rotation, so it lives
   in its own layer over the stage rather than inside it. Its own chrome is
   suppressed: a channel nobody is touching should not show buttons, and
   pointer-events are off so a passing cursor cannot drag the view off the
   county between rotations. */
.ch-radarhost{position:absolute;inset:0;display:none}
.ch-radarhost.is-on{display:block}
.ch-radarmount{position:absolute;inset:0;pointer-events:none}
/* The radar view sizes itself for the app shell (topbar + bottom nav). In the
   channel there is neither, so it takes the whole layer. */
.ch-radarmount .radar-wrap{height:100%}
.ch-radarmount .rd-top{display:none}
.ch-radarcap{position:absolute;top:clamp(12px,2vw,26px);left:clamp(14px,2.5vw,34px);
  z-index:11;font-size:clamp(11px,1.1vw,15px);font-weight:600;letter-spacing:.22em;
  color:var(--accent);background:rgba(8,10,14,.82);border:1px solid var(--line);
  border-radius:4px;padding:7px 12px;pointer-events:none}

/* ---- channel: the standing line ----------------------------------------
   Deliberately NOT a marquee. The global prefers-reduced-motion rule would
   freeze a scrolling one mid-sentence, which is worse than a line that simply
   changes with the panel. */
.ch-crawl{flex:0 0 auto;padding:9px clamp(14px,2.5vw,34px);
  border-top:1px solid var(--line);background:rgba(0,0,0,.25);
  font-size:clamp(11px,1.05vw,14px);letter-spacing:.06em;color:var(--muted);
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ch-crawl.is-alert{color:#ffd9d4;background:rgba(255,107,93,.12);
  border-top-color:rgba(255,107,93,.45)}

/* ---- channel: hourly strip ---------------------------------------------- */
.ch-hours{display:grid;grid-template-columns:repeat(12,1fr);gap:clamp(4px,.7vw,10px);
  align-items:end}
.ch-hour{text-align:center;min-width:0}
.ch-hour-t{font-size:clamp(9px,.85vw,13px);color:var(--muted);letter-spacing:.06em}
.ch-hour-bar{height:clamp(70px,13vh,150px);display:flex;align-items:flex-end;
  margin:6px 0 5px}
.ch-hour-fill{width:100%;border-radius:3px 3px 0 0;
  background:linear-gradient(180deg,var(--accent),rgba(67,224,138,.25))}
.ch-hour-v{font-size:clamp(13px,1.5vw,24px);font-weight:600;
  font-variant-numeric:tabular-nums}
.ch-hour-p{font-size:clamp(9px,.85vw,12px);color:var(--rain);
  font-variant-numeric:tabular-nums}

/* ---- channel: today / tomorrow ------------------------------------------ */
.ch-two{display:grid;grid-template-columns:1fr 1fr;gap:clamp(14px,2.5vw,40px);
  border-top:1px solid var(--line);padding-top:clamp(12px,1.8vw,24px);
  margin-top:clamp(8px,1.2vw,16px)}
.ch-two-k{font-size:clamp(10px,.95vw,14px);letter-spacing:.2em;color:var(--accent)}
.ch-two-t{display:flex;align-items:baseline;gap:.4em;margin:.15em 0 .3em}
.ch-two-hi{font-size:clamp(40px,6.5vw,96px);font-weight:700;line-height:1;
  font-variant-numeric:tabular-nums}
.ch-two-lo{font-size:clamp(20px,3vw,46px);color:var(--dim);
  font-variant-numeric:tabular-nums}
.ch-two-d{font-size:clamp(12px,1.2vw,19px);color:var(--text-2);line-height:1.5}

/* ---- channel: the two table panels (regional obs, model scores) --------- */
.ch-reg{display:flex;flex-direction:column;gap:clamp(3px,.5vw,7px)}
.ch-reg-r{display:grid;grid-template-columns:1fr auto 3.6em 4.2em;
  gap:clamp(8px,1.4vw,22px);align-items:baseline;
  padding:clamp(5px,.8vw,10px) 0;border-bottom:1px solid var(--line)}
.ch-reg-n{font-size:clamp(13px,1.45vw,24px);font-weight:600;white-space:nowrap;
  overflow:hidden;text-overflow:ellipsis}
.ch-reg-c{font-size:clamp(10px,1vw,15px);color:var(--muted);white-space:nowrap;
  overflow:hidden;text-overflow:ellipsis;text-align:right}
.ch-reg-t{font-size:clamp(15px,1.7vw,28px);font-weight:600;text-align:right;
  font-variant-numeric:tabular-nums}
.ch-reg-m{font-size:clamp(10px,1vw,14px);color:var(--dim);text-align:right;
  font-variant-numeric:tabular-nums}

/* ---- channel: quoted forecast discussion -------------------------------- */
.ch-afd{font-size:clamp(14px,1.55vw,26px);line-height:1.55;color:var(--text-2);
  max-width:62ch;border-left:2px solid var(--line);
  padding-left:clamp(12px,1.6vw,22px)}

@media (max-width:700px){
  /* Twelve hours will not fit a phone; six is still half a day and each
     column stays wide enough to read. */
  .ch-hours{grid-template-columns:repeat(6,1fr)}
  .ch-hour:nth-child(n+7){display:none}
  .ch-two{grid-template-columns:1fr;gap:14px}
  .ch-reg-r{grid-template-columns:1fr 3.2em 3.6em}
  /* The conditions string is the first thing to go: the temperature and the
     distance are what the panel is for. */
  .ch-reg-c{display:none}
}

/* ---- channel: volume ----------------------------------------------------
   Hidden until the channel is armed: a volume control over silence is a
   control that does nothing, and the arm button is the one thing that should
   be obvious before the sound starts. */
.ch-vol{display:flex;align-items:center;gap:7px;min-height:44px;cursor:pointer}
.ch-vol-i{font-size:13px;color:var(--muted)}
.ch-vol input[type=range]{width:88px;accent-color:var(--accent);cursor:pointer}
@media (max-width:700px){ .ch-vol input[type=range]{width:62px} }

/* A simulated alert must never be mistakable for a real one at a glance from
   across a room, which is the distance this deck is designed for. The real
   alert panel is red down the left edge; the test panel is amber, striped,
   and says so in every line it carries. */
.ch-test{border-left-color:var(--warn)!important}
.ch-test .ch-kicker{color:var(--warn)}
.ch-test .ch-alert-ev{color:#f6c77e}
.ch-test::before{content:"";position:absolute;inset:0;pointer-events:none;
  background:repeating-linear-gradient(135deg,
    rgba(240,167,66,.05) 0 12px, transparent 12px 24px)}
.ch-slide{position:relative}

/* --------------------------------------------------------- radio selector --
   The channel's radio picker, in the deck's control bar beside the volume.
   Styled here rather than in a theme file because the control exists in every
   theme; star4000.css only adjusts it to sit in that bar. */
.ch-radio{display:flex;align-items:center;gap:6px;min-width:0}
.ch-radio-i{font-size:12px;color:var(--dim);flex:0 0 auto}
.ch-radio-s{
  font:inherit;font-size:12px;
  background:#15142E;color:var(--text-2);
  border:1px solid #332E63;border-radius:4px;
  padding:5px 8px;max-width:30ch;cursor:pointer;
}
.ch-radio-s:hover{color:#fff;border-color:#574EA8}
.ch-radio-s:focus-visible{outline:2px solid #8F84FF;outline-offset:2px}

/* ------------------------------------------------- radio picker (listbox) --
   The radio picker is a button plus a popover rather than a <select>, because
   a radio is chosen on its blurb and tags and an <option> holds one line.
   .ch-radio-s above is kept as-is: the PLACE picker is still a <select> and
   shares it, so the two controls match in the bar. */
.ch-radiopick{position:relative}

/* The picker gets out of the way on an idle desktop; any mouse movement over
   the deck brings it back - see radioIdle() in channel.js. Gated on a
   hover-capable fine pointer: on a touch screen there is no mouse to move, so
   a faded control would just be gone. Opacity rather than display, so it can
   never shift the bar's layout as it goes.

   Three states: RESTING is already half transparent (it is furniture, not a
   call to action), DIM is gone, and hover/focus/menu-open is full strength. */

/* Hidden by default and only turned on for a hover-capable pointer below, so
   a touch device never gets an affordance it cannot use. */
.ch-radio-edge{display:none}
/* A slow breath, to catch an eye without nagging one. Six seconds is long
   enough that it reads as ambient rather than as an alert, and the hard retro
   drop shadow is carried through every frame so the glow adds to the tab
   rather than replacing its shadow.

   GOLD, not the tab's own periwinkle: the handle sits on the Star4000 weather
   bar, which is blue, and a blue glow on a blue bar is invisible - which is
   exactly how it behaved. Gold is what that bar already prints its values in,
   so it is both the highest-contrast choice available and an in-palette one.

   STEPPED, not eased. `step-end` holds each stop until the next, so the glow
   jumps through eight discrete levels instead of fading smoothly - a 4-bit
   glow on hardware that could not draw a gradient. A smooth ease was the
   wrong texture for this deck and, at low alpha, also the reason it read as
   nothing happening at all. */
@keyframes ch-radio-breathe{
  0%  {box-shadow:-3px 3px 0 rgba(0,0,0,.45), 0 0 4px 0 rgba(242,200,30,.18)}
  12% {box-shadow:-3px 3px 0 rgba(0,0,0,.45), -2px 0 12px 2px rgba(242,200,30,.45)}
  25% {box-shadow:-3px 3px 0 rgba(0,0,0,.45), -2px 0 18px 4px rgba(242,200,30,.68)}
  37% {box-shadow:-3px 3px 0 rgba(0,0,0,.45), -3px 0 26px 6px rgba(242,200,30,.86)}
  50% {box-shadow:-3px 3px 0 rgba(0,0,0,.45), -3px 0 34px 9px rgba(245,155,60,1)}
  62% {box-shadow:-3px 3px 0 rgba(0,0,0,.45), -3px 0 26px 6px rgba(242,200,30,.86)}
  75% {box-shadow:-3px 3px 0 rgba(0,0,0,.45), -2px 0 18px 4px rgba(242,200,30,.68)}
  87% {box-shadow:-3px 3px 0 rgba(0,0,0,.45), -2px 0 12px 2px rgba(242,200,30,.45)}
  100%{box-shadow:-3px 3px 0 rgba(0,0,0,.45), 0 0 4px 0 rgba(242,200,30,.18)}
}

/* Pixels thrown off the handle: little square embers that drift into the
   picture and burn out well before they reach the far side.
   step-end again, so they MOVE in discrete jumps like a sprite rather than
   gliding - a smooth particle would look like it came from a different
   decade than everything around it. Square and hard-edged on purpose: these
   are pixels, not dots. Positioned and coloured from JS via custom
   properties, since every one of them differs. */
.ch-radio-spark{
  position:fixed;z-index:38;pointer-events:none;
  width:var(--s);height:var(--s);
  background:var(--c);box-shadow:0 0 7px 1px var(--c);
  animation:ch-radio-spark var(--d) step-end forwards;
}
@keyframes ch-radio-spark{
  0%  {transform:translate(0,0);opacity:1}
  14% {transform:translate(calc(var(--dx)*.14),calc(var(--dy)*.14));opacity:.55}
  28% {transform:translate(calc(var(--dx)*.28),calc(var(--dy)*.28));opacity:1}
  42% {transform:translate(calc(var(--dx)*.42),calc(var(--dy)*.42));opacity:.45}
  56% {transform:translate(calc(var(--dx)*.56),calc(var(--dy)*.56));opacity:.85}
  70% {transform:translate(calc(var(--dx)*.70),calc(var(--dy)*.70));opacity:.35}
  84% {transform:translate(calc(var(--dx)*.84),calc(var(--dy)*.84));opacity:.6}
  100%{transform:translate(var(--dx),var(--dy));opacity:0}
}

@media (hover: hover) and (pointer: fine){
  .ch-radiopick{transition:opacity .3s ease;opacity:.4}
  .ch-radiopick:hover,
  .ch-radiopick:focus-within,
  .ch-radiopick.is-live{opacity:1}
  .ch-radiopick.is-dim{opacity:0;pointer-events:none}
}

/* The handle is NOT gated on hover. It was, and that was a real bug: a
   display that reports a coarse pointer never got `is-on`, so the base
   display:none hid the tab - and with no tab there was no glow and no
   sparks either, which is exactly how it failed. Tapping the tab opens
   the sidebar perfectly well; only the PICKER's auto-fade above needs a
   hover to be dismissible, which is why that stays in the query. */
/* The handle: the sidebar's one permanently visible part, pinned to the
   middle of the window's right edge. It has to actually ANNOUNCE itself -
   a sliver nobody notices is a sidebar nobody opens - so it is a chunky
   beveled tab carrying a music glyph, held back to half strength by
   opacity rather than by being small. A real <button>, so keyboard reaches
   it and
   it announces itself to a screen reader too.

   .is-on, not the hidden attribute: [hidden]'s UA display:none would lose
   to the display:flex here, so the attribute would not actually hide it. */
/* Fixed to the window's right edge; `top` and `height` are set from JS by
   placeRadioEdge(), which measures the Star4000 weather bar - the rotating
   humidity/wind strip with the station name beside it - and falls back to
   the control bar when that is not on screen. The values here are only
   what it looks like for the frame before the first measurement.

   The glow is an animation, not a transition, so it keeps breathing while
   nothing is happening - which is the whole point. */
.ch-radio-edge.is-on{
  position:fixed;right:0;top:50%;transform:translateY(-50%);
  z-index:39;width:26px;height:48px;padding:0;
  display:flex;align-items:center;justify-content:center;
  animation:ch-radio-breathe 6s step-end infinite;
  /* Transparency lives in the FILL, not in element opacity.
     Fading the whole element washes the glyph and the bevel out with it,
     which is how it managed to look faded and camouflaged at the same
     time. At opacity 1 with an alpha background the edges and the music
     note stay crisp - so it reads clearly as a control - while the slab
     itself is genuinely see-through. ALPHA IS THE KNOB now: raise the
     stop alphas for a more solid tab, lower them for a glassier one. */
  cursor:pointer;opacity:1;
  transition:background .25s ease, opacity .25s ease;

  /* Hard colour banding, not a smooth gradient. Lerped #7B9BE0 -> #16349A
     in five stops, the same blues star4000.css measured off broadcast
     frames - the banding is a colour-depth artefact of the original
     hardware and the most recognisable texture in the look, so it is
     explicit. Kept here rather than in the theme file because the tab
     exists in every theme and should read the same way in all of them.
     The alpha ramps slightly down the slab so the banding still reads
     once it is translucent. */
  /* Alphas raised once the tab moved onto the Star4000 weather bar: that bar
     is LIGHT blue at the top, and a fill tuned against the dark deck washed
     out to almost nothing on it. Still translucent, just not transparent. */
  background:linear-gradient(to bottom,
    rgba(100,136,214,.80) 0%,rgba(100,136,214,.80) 20%,
    rgba(74,112,190,.84) 20%,rgba(74,112,190,.84) 40%,
    rgba(52,88,168,.88) 40%,rgba(52,88,168,.88) 60%,
    rgba(32,62,132,.92) 60%,rgba(32,62,132,.92) 80%,
    rgba(18,44,140,.95) 80%,rgba(18,44,140,.95) 100%);
  /* NO backdrop-filter here, deliberately. It was added for a glassy feel
     and it is what stopped the glow ever appearing: an element with
     backdrop-filter gets its own outer box-shadow clipped or dropped in
     several engines, so the tab painted correctly while its halo silently
     did not. The alpha fill above already provides the transparency that
     filter was there for. */

  /* A 90s bevel: light on the lit edges, dark on the shadowed ones, and a
     hard un-blurred drop shadow. Cast LEFT and down, because the tab is
     flush to the right edge and a shadow to the right would fall off the
     screen. Square against the window, rounded only where it leaves it. */
  border:0;
  border-top:2px solid #9FB8E8;
  border-left:2px solid #9FB8E8;
  border-bottom:2px solid #101F5E;
  border-radius:5px 0 0 5px;
  box-shadow:-3px 3px 0 rgba(0,0,0,.45);
}
/* The music glyph, with the theme's hard black offset - no blur, which is
   the whole point of that shadow. */
/* U+266A, matching .ch-radio-i on the picker's own button. NOT U+266B -
   that one is already the volume icon in this bar. */
.ch-radio-edge::before{
  content:"\266A";
  font-size:16px;line-height:1;color:#FFF;
  text-shadow:2px 2px 0 rgba(0,0,0,.65);
}
/* Hover fills in rather than brightening: the tab goes solid, which is the
   clearest possible "yes, this is the thing you are pointing at".
   Qualified with .is-on so it outranks .is-cue below - both are two
   classes otherwise, and .is-cue would win on source order and leave a
   hovered cue tab translucent. */
.ch-radio-edge.is-on:hover,
.ch-radio-edge.is-on:focus-visible{
  background:linear-gradient(to bottom,
    #7B9BE0 0%,#7B9BE0 20%, #5E82C8 20%,#5E82C8 40%,
    #3F65B4 40%,#3F65B4 60%, #28478C 60%,#28478C 80%,
    #16349A 80%,#16349A 100%);
  /* Found: stop breathing. The glow exists to say "there is something
     here"; once the pointer is on it that job is done, and a control that
     keeps pulsing under the cursor reads as broken. */
  animation:none;
  box-shadow:-3px 3px 0 rgba(0,0,0,.45);
}
.ch-radio-edge:focus-visible{outline:2px solid var(--s4k-gold,#F2C81E);outline-offset:2px}
/* A little more present while the picker is hidden - that is when it is the
   only way back to the sidebar. Still translucent. */
/* This is the state the tab is in most of the time - the picker has faded and
   the tab is the only route back to the sidebar - so it is the SOLID one, not
   a slightly-stronger translucent one. It was the pale fill here, not the
   .is-on fill, that kept washing the tab out on the light blue bar: .is-cue
   is two classes and wins. Raise both or neither. */
.ch-radio-edge.is-cue{
  background:linear-gradient(to bottom,
    #7B9BE0 0%,#7B9BE0 20%, #5E82C8 20%,#5E82C8 40%,
    #3F65B4 40%,#3F65B4 60%, #28478C 60%,#28478C 80%,
    #16349A 80%,#16349A 100%);
}
/* Out of the way while the panel it opens is already open. Set from JS:
   the handle is in the bar and the panel on host, so they are not siblings
   and no selector can relate them. */
.ch-radio-edge.is-away{opacity:0;pointer-events:none;animation:none}

@media (prefers-reduced-motion: reduce){
  .ch-radiopick,.ch-radio-edge{transition:none}
  /* A slow pulse is exactly what this setting is asking us not to do. The
     tab keeps its full styling and simply sits still. */
  .ch-radio-edge.is-on{animation:none}
}

.ch-radio-b{
  display:flex;align-items:center;gap:6px;
  font:inherit;font-size:12px;
  background:#15142E;color:var(--text-2);
  border:1px solid #332E63;border-radius:4px;
  padding:5px 8px;max-width:30ch;cursor:pointer;
  min-height:32px;
}
.ch-radio-b:hover{color:#fff;border-color:#574EA8}
.ch-radio-b:focus-visible{outline:2px solid #8F84FF;outline-offset:2px}
.ch-radio-cur{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ch-radio-caret{font-size:9px;color:var(--dim);flex:0 0 auto}
.ch-radio-b[aria-expanded="true"]{color:#fff;border-color:#574EA8}
.ch-radio-b[aria-expanded="true"] .ch-radio-caret{transform:rotate(180deg)}

/* A SIDEBAR, pinned to the window's right edge and full height, sliding in
   from off-screen rather than popping. Fixed to the window because that is
   what makes it read as a side panel instead of a dropdown that happens to
   be tall - it is deliberately NOT anchored to the button that opens it.

   Parked with a transform, never display:none, so it can animate. visibility
   is delayed to the end of the slide out so the panel cannot be tabbed into
   mid-animation but is still there to animate. */
.ch-radio-menu{
  position:fixed;top:0;right:0;bottom:0;z-index:40;
  width:clamp(260px,23rem,86vw);
  display:flex;flex-direction:column;

  /* Banded indigo, same trick as the tab: hard stops, no smooth gradient.
     Pitched a step more saturated than the deck's own near-black so the panel
     separates from what is behind it, but kept inside the Star4000 indigo
     family (#35307A / #2A2560 are the theme's own), so "more contrast" does
     not mean "a different palette". */
  background:linear-gradient(to bottom,
    rgba(58,52,134,.95) 0%,rgba(58,52,134,.95) 20%,
    rgba(49,43,118,.95) 20%,rgba(49,43,118,.95) 40%,
    rgba(41,36,100,.95) 40%,rgba(41,36,100,.95) 60%,
    rgba(33,28,82,.95) 60%,rgba(33,28,82,.95) 80%,
    rgba(26,22,66,.96) 80%,rgba(26,22,66,.96) 100%);
  -webkit-backdrop-filter:blur(14px);backdrop-filter:blur(14px);

  /* A lit left edge, matching the tab's bevel - the panel and the tab should
     read as one object that slid out, not two different widgets. */
  border-left:2px solid #9FB8E8;
  box-shadow:-22px 0 54px rgba(0,0,0,.55);

  /* The 90s-computer face the deck already loads. Falls back cleanly when the
     star4000 theme is not the active one. */
  font-family:var(--s4k-font,"Chakra Petch",ui-monospace,monospace);

  transform:translateX(100%);visibility:hidden;
  transition:transform .28s cubic-bezier(.22,.61,.36,1), visibility 0s linear .28s;
}
.ch-radio-menu.is-open{
  transform:translateX(0);visibility:visible;
  transition:transform .28s cubic-bezier(.22,.61,.36,1), visibility 0s;
}

/* A panel needs a head, or the first station reads as a heading. Gold on
   indigo is the Local on the 8s pairing and carries far more contrast than
   the deck's violet-on-near-black, while still being the theme's own colour.
   The hard un-blurred text shadow is the look's signature. */
.ch-radio-head{
  display:flex;flex-direction:column;gap:3px;
  padding:16px 16px 13px;flex:0 0 auto;
  border-bottom:2px solid rgba(242,200,30,.5);
  background:rgba(0,0,0,.18);
}
.ch-radio-head-t{
  font-size:13px;font-weight:700;letter-spacing:.2em;text-transform:uppercase;
  color:var(--s4k-gold,#F2C81E);
  text-shadow:2px 2px 0 rgba(0,0,0,.6);
}
.ch-radio-head-s{
  font-size:11.5px;letter-spacing:.02em;color:#9FB8E8;
  text-shadow:1px 1px 0 rgba(0,0,0,.5);
}

/* The rows scroll, the head does not. */
.ch-radio-list{
  display:flex;flex-direction:column;gap:2px;
  padding:8px;overflow-y:auto;flex:1 1 auto;
}

/* Square corners throughout the panel: rounded rectangles are the one thing
   the 90s hardware could not draw, and it is what made the first pass read as
   a modern dropdown wearing retro colours. */
.ch-radio-opt{
  display:flex;flex-direction:column;gap:3px;
  font:inherit;text-align:left;
  background:transparent;color:var(--text);
  border:1px solid transparent;
  padding:9px 11px;cursor:pointer;
}
.ch-radio-opt:hover{background:rgba(159,184,232,.14);border-color:#5E82C8}
.ch-radio-opt:focus-visible{outline:2px solid var(--s4k-gold,#F2C81E);outline-offset:-1px}
/* The current radio is marked with a rule down its left edge rather than a
   tick: it reads at a glance in a dim room and costs no horizontal space.
   Gold, so "which one is playing" is the highest-contrast thing in the list. */
.ch-radio-opt.is-on{background:rgba(242,200,30,.09);border-color:rgba(242,200,30,.45)}
.ch-radio-opt.is-on .ch-radio-opt-n{color:var(--s4k-gold,#F2C81E)}
.ch-radio-opt.is-on::before{
  content:"";position:absolute;left:0;top:10%;bottom:10%;
  width:3px;background:var(--s4k-gold,#F2C81E);
}
.ch-radio-opt{position:relative}

.ch-radio-opt-h{display:flex;align-items:center;gap:8px;justify-content:space-between}
.ch-radio-opt-n{
  font-size:14px;font-weight:600;letter-spacing:.01em;color:#FFF;
  text-shadow:1px 1px 0 rgba(0,0,0,.55);
}
/* The blurb is the whole reason this is not a <select>. Two lines maximum -
   past that it stops being a label and starts being documentation. */
.ch-radio-opt-d{
  font-size:11.5px;line-height:1.4;color:#B9C8EC;
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;
  overflow:hidden;
}

/* Intensity, as five rising bars. Heights are set inline so the shape is in
   the markup that builds it, not split across two files. */
.ch-radio-meter{display:flex;align-items:flex-end;gap:2px;flex:0 0 auto;height:13px}
.ch-radio-bar{width:3px;background:rgba(159,184,232,.22);display:block}
.ch-radio-bar.is-on{background:#9FB8E8}
.ch-radio-opt.is-on .ch-radio-bar.is-on{background:var(--s4k-gold,#F2C81E)}

.ch-radio-tags{display:flex;flex-wrap:wrap;gap:4px;margin-top:3px}
.ch-radio-tag{
  font-size:10px;line-height:1;letter-spacing:.06em;text-transform:uppercase;
  color:#9FB8E8;background:rgba(159,184,232,.10);
  border:1px solid rgba(159,184,232,.28);padding:3px 5px;
  white-space:nowrap;
}
/* The one tag with a consequence outside the room. */
.ch-radio-tag.is-warn{
  color:#FFD9A8;border-color:rgba(245,155,60,.55);background:rgba(232,130,30,.16);
}

@media (max-width: 680px){
  /* The sidebar needs no narrow-screen variant: it is already fixed to the
     WINDOW, so .ch-bar's overflow:auto cannot clip it, and its width already
     clamps to 86vw. Overriding `transform` here would break the slide. Only
     the touch targets grow. */
  .ch-radio-opt{padding:12px}
  .ch-radio-b{min-height:44px;flex:1 1 auto;max-width:100%}
}

/* ----------------------------------------------- channel bar on phones ----
   The deck's control bar grew a location picker and a radio picker, which is
   two more controls than a 390px row can hold beside the status text, the arm
   button, the volume, skip and exit. Left as one nowrap row it overflows and
   the controls pile into each other.

   So on a narrow screen it becomes two rows: the status line takes one of its
   own, and the controls wrap underneath it. Nothing is hidden - every control
   on this bar does something you cannot do from anywhere else once the deck
   is full screen. */
@media (max-width: 680px){
  .ch-bar{flex-wrap:wrap; gap:8px; padding:8px 10px}
  /* Status text and the crate tag share the first row and may shrink. */
  .ch-bug{flex:1 1 60%; min-width:0}
  .ch-tag{
    flex:0 1 auto; min-width:0;
    overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
    max-width:40%;
  }
  /* The two pickers share the second row and split it evenly. A select with
     no min-width:0 refuses to shrink below its longest option, which is what
     pushes the row wide enough to overflow. */
  .ch-radio{flex:1 1 44%; min-width:0}
  .ch-radio-s{flex:1 1 auto; min-width:0; max-width:100%}
  .ch-arm,.ch-btn{padding:9px 12px; font-size:12px}
  .ch-vol{flex:0 1 auto; min-width:0}
}

/* ------------------------------------------- channel bar, off-screen -----
   #channel is position:fixed with inset:0, which on a phone browser resolves
   to the LARGE viewport - the one that assumes the toolbar is hidden. The
   toolbar is usually not hidden, so the last strip of a full-height flex
   column sits behind it, and the controls that happen to be last (the
   location picker, the radio picker, Exit) are simply not on screen.

   100dvh is the viewport as it actually is right now, toolbar included, and
   the safe-area inset keeps the row clear of a home indicator on top of that.
   flex:0 0 auto stops the bar being the thing that gets compressed when the
   column runs out of room - it is the only part of the deck a person can
   operate, so it must never be what shrinks. */
#channel.is-on{height:100dvh}
.ch-bar{
  flex:0 0 auto;
  padding-bottom:calc(10px + env(safe-area-inset-bottom, 0px));
}
@media (max-width: 680px){
  .ch-bar{padding-bottom:calc(8px + env(safe-area-inset-bottom, 0px))}
  /* If it still cannot fit, the bar scrolls rather than hiding a control.
     Losing a control silently is worse than a short sideways scroll. */
  .ch-bar{max-height:40dvh; overflow-y:auto}
}

/* ── Yesterday card ──────────────────────────────────────────────────────────
   The retrospective: what we said, what happened, why. Deliberately quieter
   than the forecast cards above it - it is context, not the headline - but the
   verdict line is full-strength text because a grade nobody reads is a grade
   nobody is held to. */
.yesterday .yh{display:flex;align-items:baseline;gap:10px;margin-bottom:12px}
.yesterday h3{margin:0;font-size:11px;font-weight:600;color:var(--muted);
  letter-spacing:.09em;text-transform:uppercase}
.yesterday .ysub{font-size:12px;color:var(--muted)}

.ygrade{display:flex;flex-wrap:wrap;gap:14px 24px;align-items:flex-start;
  justify-content:space-between}
.yverdict{display:flex;flex-direction:column;gap:3px;min-width:0}
.yverdict strong{font-size:16px;font-weight:600;line-height:1.3}
.ymeta{font-size:12px;color:var(--muted);font-variant-numeric:tabular-nums}

.ypairs{display:flex;gap:18px;flex-shrink:0}
.ypair{display:flex;align-items:baseline;gap:5px}
.ylab{font-size:11px;color:var(--muted);letter-spacing:.06em;text-transform:uppercase}
.ysaid,.ywas{font-family:var(--mono);font-variant-numeric:tabular-nums;font-size:15px}
.ysaid{color:var(--muted)}
.yarrow{font-size:11px;color:var(--muted)}

.yrain{margin:12px 0 0;font-size:13px}
.ywhy{margin-top:12px;padding-top:11px;border-top:1px solid var(--line)}
.ywline{font-size:13px;margin-bottom:4px}
.ywsub{font-size:12px;color:var(--muted);line-height:1.5;margin-top:3px}
.ywsub.dim{opacity:.75}
.ynone{margin:0;font-size:13px;color:var(--muted);line-height:1.55}

/* Phone: the high/low pairs drop below the verdict rather than squeezing it. */
@media (max-width:560px){
  .ygrade{flex-direction:column;gap:12px}
  .ypairs{gap:22px}
}

/* ── Misses tab ──────────────────────────────────────────────────────────── */
.mintro{margin:0;font-size:14px;line-height:1.6}
.mnote{margin:10px 0 0;font-size:12px;color:var(--muted);line-height:1.55}

.mblock{padding:12px 0;border-top:1px solid var(--line)}
.mblock:first-of-type{border-top:0;padding-top:0}
.mbhead{display:flex;align-items:baseline;gap:9px;flex-wrap:wrap}
.mbhead strong{font-size:15px}
.mbtruth{font-size:11px;color:var(--muted)}
.mbsum{font-size:13px;color:var(--text);margin-top:4px;line-height:1.5}
.mblist{margin-top:9px;display:flex;flex-direction:column;gap:5px}
.mbrow{display:flex;align-items:baseline;gap:10px;font-size:12px}
.mbmodel{font-family:var(--mono);min-width:12ch}
.mbmargin{color:var(--text)}
.mbn{color:var(--muted);font-variant-numeric:tabular-nums;margin-left:auto}

.mtrend{display:flex;flex-direction:column;gap:5px}
.mtrow{display:flex;align-items:center;gap:10px}
.mtday{font-size:12px;color:var(--muted);min-width:7ch}
.mtbar{flex:1;height:9px;background:var(--line);border-radius:2px;overflow:hidden}
.mtfill{display:block;height:100%;background:var(--accent);border-radius:2px}
.mtval{font-size:12px;font-variant-numeric:tabular-nums;min-width:6ch;text-align:right}

/* Eight tabs will not fit a phone's bottom bar at a readable size, so it
   scrolls sideways rather than shrinking the labels into illegibility or
   dropping one silently. */
@media (max-width:560px){
  .bottomnav{overflow-x:auto;justify-content:flex-start}
  .bnav{flex:0 0 auto;min-width:19%}
  .mbn{margin-left:0}
  .mbrow{flex-wrap:wrap;gap:4px 10px}
}
