/* ═══════════════════════════════════════════════════════════════════════════
   Components — sidebar controls, carousels, map markers, sounding modal,
   and the controls added in this refactor (theme toggle, search, alert list,
   loop scrubber, shortcuts overlay).
   ═══════════════════════════════════════════════════════════════════════════ */

/* Every numeric readout — clocks, counts, station plots, the sounding table —
   uses the brand face rather than a monospace, so lock the digits to tabular
   figures. Without this the clock jitters and table columns drift. */
.aval, .hdr-time, .hdr-date, .tval, .tval2, .tdate, .ttz, .pct,
#zoom-level, .snd-tbl, .sm-row, .feed-status,
.alert-item .ai-time, .wbgt-band, .snd-status, .snd-row input,
.hud-strip span, .measure-label, .carousel-count {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

/* ── Focus visibility ───────────────────────────────────────────────────────
   The original had no focus styling at all. One rule covers everything. */
:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  border-radius: 3px;
}

/* ── Panels ─────────────────────────────────────────────────────────────── */
.panel { border-top: 1px solid var(--border); padding: 14px 0; display: flex; flex-direction: column; gap: 11px; }
.panel-body { display: flex; flex-direction: column; gap: 11px; }

/* Section titles are buttons — every sidebar section folds away. Styled to
   read as a heading, not a control, so the sidebar looks the same as before
   until you hover it. */
.section-title {
  font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.18em;
  color: var(--accent); display: flex; align-items: center; gap: 7px; margin-bottom: 2px;
  width: 100%; background: none; border: 0; padding: 0; cursor: pointer;
  font-family: var(--font-body); text-align: left;
}
.section-title svg { width: 10px; height: 10px; flex-shrink: 0; }
.section-title:hover { color: var(--text); }
/* The fold control. It was an 8px chevron in --muted, which on a dark panel
   beside an accent-coloured title read as punctuation rather than as a
   control — you had to already know the section folded to find it. Now it is
   a real target: a bordered chip, sized and coloured to be seen without
   hunting, that lights up with the title on hover. */
.panel-chev {
  margin-left: auto; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  width: 17px; height: 17px;
  font-size: 10px; line-height: 1;
  color: var(--text);
  background: var(--sunken);
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  transition: transform .18s ease, color .15s, background .15s, border-color .15s;
}
.section-title:hover .panel-chev {
  color: var(--accent); border-color: var(--accent); background: var(--accent-soft);
}
.panel.collapsed .panel-chev { transform: rotate(-90deg); }
.panel.collapsed .panel-body,
.panel.collapsed .panel-head-ctl { display: none; }
/* A folded panel is a single row, so it should not keep a section's padding. */
.panel.collapsed { padding: 9px 0; gap: 0; }

/* ── Telling one open section from the next ──────────────────────────────────

   Folded, the sidebar is a clean list of titles and reads fine. Open, several
   sections at once were a single unbroken column of checkboxes: the only
   thing separating "Mapping" from "Severe Weather Layers" was a hairline the
   same weight as the one between every other pair, and the eye had nothing to
   grab. You could not tell where a section began without reading it.

   So an OPEN section is given a body: inset, on its own slightly raised
   ground, with a coloured spine down the left edge that ties every row in it
   back to the title above. The title sits outside that block, which is what
   makes it read as a heading OF something rather than another row in the
   list. Folded sections keep the old flat look — there is nothing to bound. */
.panel:not(.collapsed) > .panel-body {
  padding: 10px 10px 11px 11px;
  margin-top: 1px;
  border-left: 2px solid var(--accent);
  border-radius: 0 6px 6px 0;
  /* --sunken, not --raised: the sidebar is a dark surface in both themes, so
     "recessed panel" is the reading that works on it. A token rather than a
     literal keeps it honest when the palette moves. */
  background: var(--sunken);
}
.panel:not(.collapsed) { padding-bottom: 12px; }
/* The divider above an open section is stronger, so the boundary is obvious
   from either side of it. */
.panel:not(.collapsed) { border-top-color: var(--border-strong); }

.panel-head-row { display: flex; align-items: center; gap: 6px; }
.panel-head-row .section-title { margin-bottom: 0; }

/* Reset was hidden at 55% opacity in --faint and only came up on hover, which
   made it a control you had to already know about. It is still quieter than
   the title — it undoes work, so it should not be the loudest thing in the
   header — but quiet now means "a legible secondary button", not "almost
   invisible". Matched to the fold chip beside it so the two read as a pair of
   controls rather than as one control and one smudge. */
.panel-reset {
  flex-shrink: 0; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  width: 17px; height: 17px;
  font-size: 11px; line-height: 1;
  color: var(--muted2);
  background: var(--sunken);
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  transition: color .15s, background .15s, border-color .15s;
}
.panel-head-row:hover .panel-reset { color: var(--text); }
.panel-reset:hover {
  color: var(--accent); border-color: var(--accent); background: var(--accent-soft);
}
.panel-reset:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

/* A slider and its label, as one unit. */
.slider-row { display: flex; flex-direction: column; }
.slider-label {
  font-size: 9px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.07em; color: var(--muted2);
}

.ctrl-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.chk-row { display: flex; align-items: center; gap: 8px; }
.chk-row label {
  font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em;
  cursor: pointer; color: var(--muted2); transition: color .15s;
}
.chk-row input[type=checkbox]:checked + label { color: var(--text); }
.chk-row input[type=checkbox] {
  accent-color: var(--accent); width: 13px; height: 13px; cursor: pointer; flex-shrink: 0;
}
.pct {
  font-family: var(--font-mono); font-size: 9px; font-weight: 700;
  color: var(--accent); min-width: 30px; text-align: right;
}

/* ── Outlook blocks ───────────────────────────────────────────────────────
   A categorical outlook with its own day's probabilities indented under it.
   The rule down the left is what makes the grouping read as ownership rather
   than as three more toggles that happen to sit nearby. */
.outlook-block { margin-bottom: 4px; }
.sub-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 8px;
  margin: 1px 0 3px 9px;
  padding-left: 9px;
  border-left: 1px solid var(--border-strong);
}
.sub-grid .chk-row label { font-size: 9px; }

/* Layer-label colors. These mirror the on-map layer colors, so they are
   theme-invariant by design — they are a key, not chrome. */
.lbl-spc    { color: #4d9e4d; }
.lbl-prob   { color: #d14343; }
.lbl-nws    { color: #2f6fd0; }
.lbl-mcd    { color: #e00000; }
.lbl-mpd    { color: #327d00; }
.lbl-watch  { color: #1d4ed8; }
.lbl-warn   { color: #c81e1e; }
.lbl-place  { color: #475569; }
.lbl-mrms   { color: #0f766e; }
.lbl-site   { color: #7c3aed; }
.lbl-county { color: #c1554f; }
.lbl-lsr    { color: #b45309; }
.lbl-metar  { color: #b3261e; }
.lbl-meso   { color: #1d6fa5; }
.lbl-wxstem { color: #0f766e; }
.lbl-wbgt   { color: #b45309; }
.lbl-cams   { color: #15803d; }
.lbl-state  { color: #000000; }
.lbl-water  { color: #4a6fd6; }
.lbl-stream { color: #0369a1; }
:root[data-theme="dark"] .lbl-spc,
:root:not([data-theme="light"]) .lbl-spc    { color: #86efac; }
:root[data-theme="dark"] .lbl-prob,
:root:not([data-theme="light"]) .lbl-prob   { color: #fca5a5; }
:root[data-theme="dark"] .lbl-nws,
:root:not([data-theme="light"]) .lbl-nws    { color: #93c5fd; }
:root[data-theme="dark"] .lbl-mcd,
:root:not([data-theme="light"]) .lbl-mcd    { color: #ff5a5a; }
:root[data-theme="dark"] .lbl-mpd,
:root:not([data-theme="light"]) .lbl-mpd    { color: #7bc043; }
:root[data-theme="dark"] .lbl-watch,
:root:not([data-theme="light"]) .lbl-watch  { color: #7aa2ff; }
:root[data-theme="dark"] .lbl-warn,
:root:not([data-theme="light"]) .lbl-warn   { color: #ff7a7a; }
:root[data-theme="dark"] .lbl-place,
:root:not([data-theme="light"]) .lbl-place  { color: #cbd5e1; }
:root[data-theme="dark"] .lbl-mrms,
:root:not([data-theme="light"]) .lbl-mrms   { color: #5eead4; }
:root[data-theme="dark"] .lbl-site,
:root:not([data-theme="light"]) .lbl-site   { color: #c4b5fd; }
:root[data-theme="dark"] .lbl-county,
:root:not([data-theme="light"]) .lbl-county { color: #f87171; }
:root[data-theme="dark"] .lbl-lsr,
:root:not([data-theme="light"]) .lbl-lsr    { color: #fbbf24; }
:root[data-theme="dark"] .lbl-metar,
:root:not([data-theme="light"]) .lbl-metar  { color: #fca5a5; }
:root[data-theme="dark"] .lbl-meso,
:root:not([data-theme="light"]) .lbl-meso   { color: #7dd3fc; }
:root[data-theme="dark"] .lbl-wxstem,
:root:not([data-theme="light"]) .lbl-wxstem { color: #5eead4; }
:root[data-theme="dark"] .lbl-wbgt,
:root:not([data-theme="light"]) .lbl-wbgt   { color: #fdba74; }
:root[data-theme="dark"] .lbl-cams,
:root:not([data-theme="light"]) .lbl-cams   { color: #39ff14; }
:root[data-theme="dark"] .lbl-state,
:root:not([data-theme="light"]) .lbl-state  { color: #e8edf5; }
:root[data-theme="dark"] .lbl-water,
:root:not([data-theme="light"]) .lbl-water  { color: #93b4ff; }
:root[data-theme="dark"] .lbl-stream,
:root:not([data-theme="light"]) .lbl-stream { color: #67e8f9; }

/* The track needs enough contrast to read as a track on both grounds — the
   accent line alone was almost invisible, leaving the thumb apparently
   floating (most obvious at the larger phone sizes below). */
input[type=range] {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 3px; background: var(--border-strong);
  border-radius: 3px; outline: none; margin-top: 6px;
}
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--accent); cursor: pointer; border: 2px solid var(--surface);
}
input[type=range]::-moz-range-thumb {
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--accent); cursor: pointer; border: 2px solid var(--surface);
}

select, .txt-input {
  background: var(--sunken); border: 1px solid var(--border-strong); color: var(--text);
  font-size: 9px; font-weight: 700; text-transform: uppercase; padding: 4px 8px;
  border-radius: 4px; cursor: pointer; outline: none; width: 100%;
  font-family: var(--font-body);
}
select option { background: var(--raised); color: var(--text); }
select:focus, .txt-input:focus { border-color: var(--accent); }

.layer-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px; }
.layer-grid .chk-row:last-child:nth-child(odd) { grid-column: span 2; }

/* Two columns filled DOWN rather than across. A plain grid lays items out row
   by row, which would interleave the two lists; grid-auto-flow: column with a
   fixed row count puts the first five in the left column and the rest in the
   right, so each column reads as its own sequence. */
.layer-cols {
  display: grid; grid-auto-flow: column;
  grid-template-columns: 1fr 1fr; grid-template-rows: repeat(5, auto);
  gap: 8px 16px; align-items: start;
}

/* The change of timescale between the outlooks and the nowcast layers. */
.panel-rule {
  border: 0; border-top: 1px solid var(--border);
  margin: 9px 0 8px;
}

/* ── AFD ────────────────────────────────────────────────────────────────── */
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.afd-ctl { display: flex; align-items: center; gap: 6px; }
#afd-box {
  height: 180px; overflow-y: auto; background: var(--sunken);
  border: 1px solid var(--border); border-radius: 6px; padding: 8px 9px;
  font-family: var(--font-mono); font-size: 8px;
  line-height: 1.6; color: var(--faint); white-space: pre-wrap;
}
#afd-box::-webkit-scrollbar { width: 3px; }
#afd-box::-webkit-scrollbar-thumb { background: var(--accent-line); }
#afd-office { width: auto; }

.icon-btn, #afd-btn {
  padding: 3px 10px; font-size: 9px; font-weight: 700; text-transform: uppercase;
  border: 1px solid var(--border-strong); background: transparent; color: var(--muted);
  border-radius: 4px; cursor: pointer; transition: all .15s;
}
.icon-btn:hover, #afd-btn:hover { background: var(--raised); color: var(--text); }

/* ── Theme toggle ───────────────────────────────────────────────────────── */
#theme-toggle {
  position: absolute; top: 10px; right: 10px;
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--sunken); border: 1px solid var(--border-strong);
  color: var(--muted2); cursor: pointer;
  display: flex; align-items: center; justify-content: center; transition: all .18s;
}
#theme-toggle:hover { color: var(--accent); border-color: var(--accent); }
#theme-toggle svg { width: 15px; height: 15px; }
/* Show the icon for the theme you would switch TO. */
#theme-toggle .icon-moon { display: none; }
#theme-toggle .icon-sun  { display: block; }
:root[data-theme="dark"] #theme-toggle .icon-moon,
:root:not([data-theme="light"]) #theme-toggle .icon-moon { display: block; }
:root[data-theme="dark"] #theme-toggle .icon-sun,
:root:not([data-theme="light"]) #theme-toggle .icon-sun  { display: none; }

/* ── Location search ────────────────────────────────────────────────────── */
#search-wrap { position: relative; }
#search-input {
  font-family: var(--font-body); text-transform: none; font-weight: 500;
  font-size: 11px; padding: 7px 9px;
}
#search-results {
  position: absolute; top: calc(100% + 3px); left: 0; right: 0; z-index: 50;
  background: var(--raised); border: 1px solid var(--border-strong);
  border-radius: 6px; box-shadow: var(--overlay-shadow);
  max-height: 210px; overflow-y: auto; display: none;
}
#search-results.open { display: block; }
.search-item {
  display: block; width: 100%; text-align: left; background: none; border: none;
  padding: 7px 10px; font-size: 10px; color: var(--text); cursor: pointer;
  border-bottom: 1px solid var(--border); font-family: var(--font-body);
}
.search-item:last-child { border-bottom: none; }
.search-item:hover, .search-item[aria-selected="true"] { background: var(--accent-soft); }
.search-item .sub { display: block; font-size: 9px; color: var(--muted); margin-top: 1px; }

/* ── Quick view buttons ─────────────────────────────────────────────────── */
/* Two columns: four regions do not fit on one row at sidebar width. */
#view-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }
.view-btn {
  padding: 5px 6px; cursor: pointer; white-space: nowrap;
  font-family: var(--font-body); font-size: 9px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.1em;
  background: var(--sunken); color: var(--muted2);
  border: 1px solid var(--border-strong); border-radius: 4px;
  transition: all .15s;
}
.view-btn:hover { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }

/* ── Alert rows ──────────────────────────────────────────────────────────
   Shared by the three header menus (js/ui/alertmenu.js). */
.alert-item {
  display: block; width: 100%; text-align: left; cursor: pointer;
  background: var(--sunken); border: 1px solid var(--border);
  border-left: 3px solid var(--muted);
  border-radius: 4px; padding: 6px 8px; font-family: var(--font-body);
  transition: background .15s;
}
.alert-item:hover { background: var(--accent-soft); }
.alert-item .ai-event {
  font-size: 10px; font-weight: 700; color: var(--text);
  display: block; line-height: 1.25;
}
.alert-item .ai-area {
  font-size: 9px; color: var(--muted); display: block; margin-top: 2px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.alert-item .ai-time {
  font-size: 8px; color: var(--muted); font-family: var(--font-mono);
  display: block; margin-top: 2px;
}
.alert-empty { font-size: 10px; color: var(--muted); font-style: italic; padding: 6px 2px; }

/* ── Radar loop scrubber ────────────────────────────────────────────────── */
#loop-panel { display: flex; flex-direction: column; gap: 7px; }
#loop-controls { display: flex; align-items: center; gap: 7px; }
#loop-play {
  width: 28px; height: 28px; flex-shrink: 0; border-radius: 50%;
  background: var(--accent); border: none; color: var(--on-accent);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
}
#loop-play:hover { background: var(--accent-hover); }
#loop-play svg { width: 12px; height: 12px; }
#loop-play .icon-pause { display: none; }
#loop-play.playing .icon-pause { display: block; }
#loop-play.playing .icon-play  { display: none; }
#loop-stamp {
  font-family: var(--font-mono); font-size: 10px; font-weight: 700;
  color: var(--cyan); margin-left: auto; white-space: nowrap;
}
#loop-speed { width: auto; flex-shrink: 0; }
#loop-scrub { margin-top: 0; }
#loop-panel[data-ready="0"] { opacity: 0.45; pointer-events: none; }

/* ── Feed status badge (new layers) ─────────────────────────────────────── */
.feed-status {
  font-size: 8px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em;
  font-family: var(--font-mono); color: var(--muted);
}
.feed-status[data-state="loading"] { color: var(--cyan); }
.feed-status[data-state="error"]   { color: var(--accent); }
.feed-status[data-state="stale"]   { color: var(--amber); }

/* ── Keyboard shortcuts overlay ─────────────────────────────────────────── */
#shortcuts-overlay {
  position: fixed; inset: 0; z-index: 9500; display: none;
  align-items: center; justify-content: center; background: var(--scrim);
  backdrop-filter: blur(6px); padding: 20px;
}
#shortcuts-overlay.open { display: flex; }
#shortcuts-card {
  background: var(--raised); border: 1px solid var(--border-strong); border-radius: 12px;
  box-shadow: var(--overlay-shadow); padding: 20px 24px;
  max-width: 460px; width: 100%; max-height: 80vh; overflow-y: auto;
}
#shortcuts-card h2 {
  font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.18em;
  color: var(--accent); margin-bottom: 14px;
}
.sc-grid { display: grid; grid-template-columns: auto 1fr; gap: 7px 14px; align-items: center; }
.sc-grid kbd {
  font-family: var(--font-mono); font-size: 10px; font-weight: 700;
  background: var(--sunken); border: 1px solid var(--border-strong); border-radius: 4px;
  padding: 2px 7px; color: var(--text); text-align: center; white-space: nowrap;
}
.sc-grid span { font-size: 11px; color: var(--muted2); }
.sc-sect {
  grid-column: 1 / -1; font-size: 9px; font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.14em; color: var(--muted); margin-top: 10px;
  border-top: 1px solid var(--border); padding-top: 9px;
}
.sc-sect:first-child { margin-top: 0; border-top: none; padding-top: 0; }

/* ── SPC legend items ───────────────────────────────────────────────────── */
.spc-leg-title {
  font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.15em;
  color: var(--accent); margin-bottom: 5px;
}
.spc-leg-section {
  font-size: 8px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--muted2); margin: 5px 0 2px;
}
.spc-leg-item { display: flex; align-items: center; gap: 6px; font-size: 10px; color: var(--text); margin: 2px 0; }
/* Swatch fills are set inline from the SPC palette — theme-invariant. */
.spc-swatch { display: inline-block; width: 16px; height: 10px; border-radius: 2px; border: 1px solid; flex-shrink: 0; opacity: 0.85; }
.spc-swatch-sign {
  background-color: transparent;
  background-image: repeating-linear-gradient(45deg,
    rgba(0,0,0,0.8) 0px, rgba(0,0,0,0.8) 2.5px, transparent 2.5px, transparent 7px);
  border-color: #000 !important;
}

/* ── Map markers (met colors — theme-invariant) ─────────────────────────── */
/* A yellow bolt with a thin black outline — see BOLT in js/map/glm.js. The
   outline is what makes it work on both grounds, so nothing here may add a
   glow that would bleed over it. */
.glm-flash {
  width: 11px; height: 18px;
  line-height: 0;
  transform: translateZ(0);
}
.glm-flash svg { display: block; }
.cam-dot {
  width: 16px; height: 16px; border-radius: 3px; background: rgba(0,0,0,0.85);
  border: 1.5px solid #39ff14; display: flex; align-items: center; justify-content: center;
  color: #39ff14; font-size: 10px; cursor: pointer; box-shadow: 0 0 4px rgba(0,0,0,0.8);
}
.lsr-dot {
  width: 18px; height: 18px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; line-height: 1; cursor: pointer;
  background: rgba(0,0,0,0.78); border: 1.5px solid currentColor;
  box-shadow: 0 0 4px rgba(0,0,0,0.7);
}

/* Station plots sit on the basemap and must not swallow map clicks outside
   their own glyph. */
.metar-icon, .station-icon { background: transparent !important; border: none !important; }
/* SVG presentation attributes cannot resolve var(), so the station-plot
   numerals take their family from a real CSS rule. */
.stn-num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

/* ── WBGT key ───────────────────────────────────────────────────────────── */
#wbgt-key { padding-left: 21px; }
#wbgt-bands { display: flex; flex-direction: column; gap: 2px; margin-top: 5px; }
.wbgt-band {
  display: flex; align-items: center; gap: 6px;
  font-family: var(--font-mono); font-size: 8px; color: var(--muted2);
}
.wbgt-chip {
  width: 14px; height: 10px; border-radius: 2px; flex-shrink: 0;
  border: 1px solid var(--border-strong);
}
.wbgt-band .wbgt-name { min-width: 52px; font-weight: 700; }
.wbgt-scale-note { font-size: 8px; color: var(--muted); margin-top: 3px; font-style: italic; }

/* ── Right-rail carousels ───────────────────────────────────────────────── */
.carousel {
  background: var(--overlay-strong); backdrop-filter: blur(10px);
  border: 1px solid var(--border-strong); border-radius: 8px; overflow: hidden;
  box-shadow: var(--overlay-shadow);
}
.carousel-stage { position: relative; width: 300px; height: 169px; background: #000; }
.carousel-stage img { width: 100%; height: 100%; object-fit: cover; display: block; }
.carousel-label {
  position: absolute; top: 6px; left: 6px; background: rgba(0,0,0,0.75); color: #fff;
  font-size: 9px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 2px 6px; border-radius: 3px; max-width: calc(100% - 68px);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.carousel-count {
  position: absolute; top: 6px; right: 6px; background: var(--accent); color: var(--on-accent);
  font-size: 9px; font-weight: 800; padding: 2px 6px; border-radius: 3px;
  font-family: var(--font-mono);
}
.carousel-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 26px; height: 40px; background: rgba(0,0,0,0.55); color: #fff; border: none;
  display: flex; align-items: center; justify-content: center; font-size: 18px;
  cursor: pointer; transition: background .15s;
}
.carousel-nav:hover { background: var(--accent); }
.carousel-nav.prev { left: 0; border-radius: 0 4px 4px 0; }
.carousel-nav.next { right: 0; border-radius: 4px 0 0 4px; }
.carousel-dots {
  display: flex; gap: 3px; justify-content: center; padding: 4px 8px 6px;
  background: rgba(0,0,0,0.4); flex-wrap: wrap;
}
.carousel-dot { width: 5px; height: 5px; border-radius: 50%; background: rgba(255,255,255,0.3); cursor: pointer; flex-shrink: 0; border: none; padding: 0; }
.carousel-dot.active { background: var(--accent); }
.carousel-empty-msg {
  display: flex; align-items: center; justify-content: center; height: 100%;
  color: var(--muted); font-size: 10px; font-style: italic;
}

/* ── Sounding input rows ────────────────────────────────────────────────── */
.snd-row { display: flex; align-items: center; gap: 6px; margin-top: 7px; }
.snd-row label {
  font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em;
  color: var(--muted2); white-space: nowrap; min-width: 26px;
}
.snd-row input, .snd-row select {
  font-family: var(--font-mono); font-size: 10px;
  background: var(--sunken); color: var(--text);
  border: 1px solid var(--border-strong); border-radius: 4px; padding: 4px 7px;
  outline: none; width: 100%;
}
.snd-row input:focus, .snd-row select:focus { border-color: var(--accent); }
.snd-btn {
  padding: 4px 12px; font-size: 9px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.08em; border: 1px solid var(--accent); background: transparent;
  color: var(--accent); border-radius: 4px; cursor: pointer;
  font-family: var(--font-body); transition: all .15s; white-space: nowrap;
}
.snd-btn:hover { background: var(--accent-soft); }
.snd-btn[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); }
/* Hold Streamline means nothing with the layer off, so it greys out rather
   than vanishing and moving the rows under it. */
.chk-row input:disabled, .chk-row input:disabled + label { opacity: .4; cursor: default; }
.snd-divider { border: none; border-top: 1px solid var(--border); margin: 10px 0 6px; }
.snd-status { font-size: 9px; color: var(--muted); margin-top: 5px; font-family: var(--font-mono); }
.snd-hint { font-size: 9px; color: var(--muted); line-height: 1.5; margin-top: 5px; }
.snd-sub-label {
  font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--muted2); margin-bottom: 4px;
}

/* ── Sounding modal ─────────────────────────────────────────────────────── */
#snd-modal {
  position: fixed; inset: 0; z-index: 9000; background: var(--scrim);
  display: none; flex-direction: column; backdrop-filter: blur(8px); overflow: hidden;
}
#snd-modal.open { display: flex; }
#snd-header {
  position: relative; z-index: 2;
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 16px; background: var(--overlay-strong);
  border-bottom: 1px solid var(--accent-line); flex-shrink: 0; gap: 12px;
}
#snd-title {
  font-family: var(--font-mono); font-size: 12px; font-weight: 700;
  color: var(--text); letter-spacing: 0.05em;
}
#snd-subtitle { font-size: 10px; color: var(--muted); font-family: var(--font-mono); margin-top: 1px; }
#snd-close {
  position: relative; z-index: 3;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--sunken); border: 1px solid var(--border-strong);
  color: var(--text); font-size: 14px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s; flex-shrink: 0;
}
#snd-close:hover { background: var(--accent); color: var(--on-accent); }
#snd-body { flex: 1; display: flex; overflow: hidden; min-height: 0; }
#snd-canvas-wrap { flex: 1 1 60%; min-width: 0; position: relative; background: var(--snd-canvas-bg); }
#snd-canvas { display: block; width: 100%; height: 100%; }
#snd-right {
  width: 38%; flex-shrink: 0; display: flex; flex-direction: column;
  background: var(--snd-panel-bg); border-left: 1px solid var(--accent-line);
}
#hodo-wrap { flex: 1 1 65%; min-height: 0; position: relative; }
#hodo-canvas { display: block; width: 100%; height: 100%; }
#snd-sm-box {
  flex-shrink: 0; padding: 6px 10px; background: var(--overlay-strong);
  border-top: 1px solid var(--border); font-family: var(--font-mono);
  font-size: 9px; overflow-y: auto; max-height: 160px;
}
.sm-row { display: flex; gap: 6px; padding: 1px 0; }
.sm-lbl { color: var(--amber); font-weight: 700; min-width: 36px; }
.sm-val { color: var(--text); }
#snd-bottom {
  flex-shrink: 0; background: var(--overlay-strong);
  border-top: 1px solid var(--accent-line); overflow-x: auto;
  padding-bottom: env(safe-area-inset-bottom);
}
#snd-cycle-picker { display: flex; }

.snd-tbl { width: 100%; border-collapse: collapse; font-family: var(--font-mono); font-size: 9px; }
.snd-tbl th {
  background: var(--accent-soft); color: var(--accent); font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.1em; padding: 3px 6px;
  border: 1px solid var(--border); text-align: center; white-space: nowrap;
}
.snd-tbl td { padding: 2px 6px; border: 1px solid var(--border); text-align: center; white-space: nowrap; color: var(--text); }
.snd-tbl .row-hdr td {
  background: var(--sunken); color: var(--muted2); font-weight: 700;
  font-size: 8px; letter-spacing: 0.08em;
}
/* Parcel-row and threshold colors follow sounding convention — theme-invariant,
   but nudged for legibility on a light panel. */
.snd-tbl tr.row-sb td { color: #dc2626; }
.snd-tbl tr.row-mu td { color: #ea580c; }
.snd-tbl tr.row-ml td { color: #ca8a04; }
.snd-tbl tr.row-dc td { color: #7c3aed; }
.tv-good { color: #15803d !important; }
.tv-mod  { color: #b45309 !important; }
.tv-high { color: #dc2626 !important; }
:root[data-theme="dark"] .snd-tbl tr.row-sb td, :root:not([data-theme="light"]) .snd-tbl tr.row-sb td { color: #f87171; }
:root[data-theme="dark"] .snd-tbl tr.row-mu td, :root:not([data-theme="light"]) .snd-tbl tr.row-mu td { color: #fb923c; }
:root[data-theme="dark"] .snd-tbl tr.row-ml td, :root:not([data-theme="light"]) .snd-tbl tr.row-ml td { color: #facc15; }
:root[data-theme="dark"] .snd-tbl tr.row-dc td, :root:not([data-theme="light"]) .snd-tbl tr.row-dc td { color: #a78bfa; }
:root[data-theme="dark"] .tv-good, :root:not([data-theme="light"]) .tv-good { color: #4ade80 !important; }
:root[data-theme="dark"] .tv-mod,  :root:not([data-theme="light"]) .tv-mod  { color: #fbbf24 !important; }
:root[data-theme="dark"] .tv-high, :root:not([data-theme="light"]) .tv-high { color: #f87171 !important; }

#snd-loading {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: var(--overlay-strong); font-size: 13px; color: var(--muted);
  font-family: var(--font-mono); flex-direction: column; gap: 10px;
}
.snd-spinner {
  width: 28px; height: 28px; border: 3px solid var(--accent-soft);
  border-top-color: var(--accent); border-radius: 50%; animation: snd-spin .7s linear infinite;
}
@keyframes snd-spin { to { transform: rotate(360deg); } }

/* Canvas backdrops — the Skew-T and hodograph are drawn, not styled, so these
   feed js/sounding/palette.js as well. Keep the two in sync. */
:root { --snd-canvas-bg: #f4f6fa; --snd-panel-bg: #eceff4; }
:root[data-theme="dark"] { --snd-canvas-bg: #0d1117; --snd-panel-bg: #080810; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --snd-canvas-bg: #0d1117; --snd-panel-bg: #080810; }
}

/* ── Reduced motion ─────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .dsoc-radar-o svg animate { display: none; }
}

/* Visually hidden, still read by screen readers. */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}


/* ── Animated streamlines ─────────────────────────────────────────────────
   The canvas is pinned to the map container rather than to a Leaflet pane,
   so Leaflet's pan transform does not drag it around while the wind field
   underneath is still the old one. It fades out for the duration of a move
   and comes back when the field has been rebuilt. */
.streamlines-canvas {
  position: absolute;
  left: 0; top: 0;        /* offset comes from L.DomUtil.setPosition */
  pointer-events: none;
  opacity: 0;
  transition: opacity .35s ease;
}
.streamlines-canvas.active { opacity: 1; }
.streamlines-canvas.moving { opacity: 0; transition: opacity .12s ease; }

/* The advection stain. Its opacity is set inline from the transparency
   slider, so the .active rule above must not override it — hence the own
   rule here rather than a shared one. Blurred a little: the wash is an
   estimate of a smooth field, and crisp edges on it would claim a precision
   the interpolation does not have. */
.streamlines-canvas.stain {
  opacity: 0;
  filter: blur(2.5px);
}
.streamlines-canvas.stain.active { /* opacity comes from the slider, inline */ }
.streamlines-canvas.stain.moving { opacity: 0 !important; transition: opacity .12s ease; }

/* ── County forecast panel ────────────────────────────────────────────────
   Slides in over the right-hand stack. It sits above the camera and stream
   panels deliberately: it is transient and dismissed with Escape or the
   close button, and splitting the width with them would leave neither
   readable. */
#forecast-panel {
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: 330px; max-width: 92vw;
  z-index: 620;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--surface);
  border-left: 1px solid var(--accent-line);
  box-shadow: -6px 0 40px var(--accent-glow);
  transform: translateX(100%);
  transition: transform .28s cubic-bezier(.4, 0, .2, 1);
}
#forecast-panel.open { transform: translateX(0); }
/* The UA's `[hidden] { display: none }` is a bare attribute selector and
   loses to the #id rule above, so the closed panel stayed in the layout and
   was only off-screen by virtue of its transform. Say it explicitly. */
#forecast-panel[hidden] { display: none; }

#fc-head {
  flex-shrink: 0;
  display: flex; align-items: flex-start; justify-content: space-between; gap: 8px;
  padding: 10px 12px;
  background: var(--raised);
  border-bottom: 1px solid var(--border);
}
#fc-title {
  font-family: var(--font-display);
  font-size: 15px; font-weight: 700; line-height: 1.2;
  letter-spacing: 0.04em; color: var(--accent);
}
#fc-meta {
  font-size: 8px; letter-spacing: 0.06em; color: var(--muted); margin-top: 3px;
  text-transform: uppercase;
}
#fc-close {
  flex-shrink: 0; width: 24px; height: 24px; border-radius: 4px; cursor: pointer;
  background: transparent; border: 1px solid var(--border-strong); color: var(--muted);
  font-size: 16px; line-height: 1; font-family: var(--font-mono);
  transition: border-color .15s, color .15s;
}
#fc-close:hover { border-color: var(--accent); color: var(--accent); }

#fc-alerts { flex-shrink: 0; }
.fc-alert {
  padding: 5px 12px; font-size: 9px; font-weight: 700; letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border);
}
/* Alert colours are the NWS encoding, so they hold in both themes. */
.fc-alert.fc-warn  { background: rgba(255,23,68,.16);  color: #d32f2f; }
.fc-alert.fc-watch { background: rgba(255,140,0,.14);  color: #b45309; }
.fc-alert.fc-adv   { background: rgba(255,214,0,.13);  color: #8a6d00; }
:root[data-theme="dark"] .fc-alert.fc-warn,
:root:not([data-theme="light"]) .fc-alert.fc-warn  { color: #ffa0b0; }
:root[data-theme="dark"] .fc-alert.fc-watch,
:root:not([data-theme="light"]) .fc-alert.fc-watch { color: #ffb86c; }
:root[data-theme="dark"] .fc-alert.fc-adv,
:root:not([data-theme="light"]) .fc-alert.fc-adv   { color: #ffe870; }

#fc-body { flex: 1; overflow-y: auto; padding: 10px 12px 24px; }
#fc-body::-webkit-scrollbar { width: 3px; }
#fc-body::-webkit-scrollbar-thumb { background: var(--accent-line); border-radius: 2px; }

.fc-sect {
  font-size: 8px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--muted2); font-weight: 800;
  border-bottom: 1px solid var(--border); padding-bottom: 4px; margin: 12px 0 6px;
}

.fc-idss-btn {
  display: block; padding: 9px 11px; margin-top: 2px; border-radius: 5px;
  background: var(--accent-soft); border: 1px solid var(--accent-line);
  text-decoration: none; transition: border-color .15s, background .15s;
}
.fc-idss-btn:hover { border-color: var(--accent); background: var(--sunken); }
.fc-idss-label {
  display: block; font-family: var(--font-mono); font-size: 10px;
  letter-spacing: 0.04em; color: var(--accent);
}
.fc-idss-sub {
  display: block; font-size: 8px; color: var(--muted); margin-top: 2px;
  letter-spacing: 0.05em; text-transform: uppercase;
}

#fc-status { font-size: 9px; color: var(--muted); letter-spacing: 0.05em; }
.fc-err { color: var(--accent); font-weight: 700; }

.fc-card {
  display: grid; grid-template-columns: 36px 1fr; gap: 8px;
  padding: 7px 2px; border-bottom: 1px solid var(--border);
}
.fc-card:last-of-type { border-bottom: none; }
.fc-ico { width: 34px; height: 34px; border-radius: 4px; background: var(--sunken); }
.fc-name {
  font-size: 9px; font-weight: 800; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--text);
}
.fc-temp {
  font-family: var(--font-display); font-size: 18px; font-weight: 700; line-height: 1.1;
  color: var(--text);
}
.fc-temp span { font-size: 9px; color: var(--muted); }
/* Temperature bands are a met encoding — theme-invariant by design. */
.fc-temp.fc-t-hot  { color: #d32f2f; }
.fc-temp.fc-t-warm { color: #c2620a; }
.fc-temp.fc-t-cold { color: #1d4ed8; }
:root[data-theme="dark"] .fc-temp.fc-t-hot,
:root:not([data-theme="light"]) .fc-temp.fc-t-hot  { color: #ff6060; }
:root[data-theme="dark"] .fc-temp.fc-t-warm,
:root:not([data-theme="light"]) .fc-temp.fc-t-warm { color: #ffaa60; }
:root[data-theme="dark"] .fc-temp.fc-t-cold,
:root:not([data-theme="light"]) .fc-temp.fc-t-cold { color: #88aaff; }
.fc-sky  { font-size: 9px; color: var(--muted2); margin-top: 2px; line-height: 1.4; }
.fc-wind { font-size: 8px; color: var(--muted); margin-top: 2px; }
.fc-pop  { font-size: 8px; color: var(--blue); margin-top: 2px; }
.fc-foot {
  font-size: 7.5px; color: var(--faint); text-align: right; margin-top: 10px;
  letter-spacing: 0.06em; text-transform: uppercase;
}


/* ── Streamline speed key ─────────────────────────────────────────────────
   Drawn from the same ramp the particles use (js/map/streamlines.js paints
   it), so the key cannot drift from the map. It restyles with the ground,
   not the theme, for the same reason the flow does. */
#stream-legend { display: none; }
#stream-legend:not(:empty) { display: block; }
.stream-bar {
  height: 7px; border-radius: 3px;
  border: 1px solid var(--border-strong);
}
.stream-ticks {
  display: flex; justify-content: space-between;
  font-family: var(--font-mono); font-size: 8px; color: var(--muted2);
  margin-top: 2px;
}
.stream-unit {
  font-size: 7.5px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--faint); text-align: right; margin-top: -1px;
}

/* Advection key. Three swatches rather than a bar: the rule is a threshold,
   and a gradient would promise a continuous scale the map does not draw. */
.adv-key { display: flex; flex-direction: column; gap: 3px; margin: 1px 0 3px; }
.adv-key-row {
  display: flex; align-items: center; gap: 6px;
  font-size: 8.5px; letter-spacing: 0.04em; color: var(--muted2);
}
.adv-swatch {
  width: 16px; height: 7px; border-radius: 2px; flex-shrink: 0;
  border: 1px solid var(--border-strong);
}


/* ── Range rings ──────────────────────────────────────────────────────────
   Panel controls plus the on-map radius labels. Ring colours are the user's
   own choice, so nothing here re-themes them — only the label halo flips,
   and that follows the ground rather than the theme (js/map/rings.js). */
.ring-unit {
  font-size: 9px; font-weight: 700; color: var(--muted); letter-spacing: 0.08em;
  text-transform: uppercase; flex-shrink: 0;
}
.ring-btn-sm { width: auto; padding: 4px 10px; flex-shrink: 0; }
input[type=color] {
  width: 34px; height: 22px; padding: 0; flex-shrink: 0; cursor: pointer;
  background: var(--sunken); border: 1px solid var(--border-strong); border-radius: 4px;
}
input[type=color]::-webkit-color-swatch-wrapper { padding: 2px; }
input[type=color]::-webkit-color-swatch { border: none; border-radius: 2px; }

.ring-actions { display: flex; gap: 6px; }
.ring-actions .icon-btn { flex: 1; }

#ring-list { display: flex; flex-direction: column; gap: 3px; }
.ring-empty { font-size: 9px; color: var(--faint); line-height: 1.6; }
.ring-item {
  display: flex; align-items: center; gap: 6px;
  padding: 4px 6px; border-radius: 4px;
  background: var(--sunken); border: 1px solid var(--border);
}
.ring-item.sel { border-color: var(--accent-line); background: var(--accent-soft); }
.ring-vis { accent-color: var(--accent); width: 12px; height: 12px; cursor: pointer; flex-shrink: 0; }
.ring-swatch {
  width: 11px; height: 11px; border-radius: 2px; flex-shrink: 0;
  border: 1px solid var(--border-strong);
}
.ring-name {
  flex: 1; min-width: 0; text-align: left; cursor: pointer;
  background: none; border: 0; padding: 0;
  font-family: var(--font-body); font-size: 9px; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ring-item.sel .ring-name { color: var(--accent); }
.ring-count {
  font-family: var(--font-mono); font-size: 8px; color: var(--muted); flex-shrink: 0;
}
.ring-del {
  background: none; border: 0; cursor: pointer; flex-shrink: 0;
  color: var(--muted); font-size: 13px; line-height: 1; padding: 0 2px;
  font-family: var(--font-mono);
}
.ring-del:hover { color: var(--accent); }

/* On-map radius label. Pointer events are off at the pane, so this is purely
   a mark — it never intercepts a click meant for the county underneath. */
.ring-label {
  font-family: var(--font-mono); font-size: 9px; font-weight: 700;
  letter-spacing: 0.04em; text-align: center; white-space: nowrap;
  background: none; border: 0;
  /* Black in every theme and on every basemap, with no halo. It is a caption,
     not a colour-coded mark, and it should read the same wherever it lands. */
  color: #000000;
  text-shadow: none;
}


/* ── Station plots do not block the map ───────────────────────────────────
   A station model is an 84x60 divIcon, and most of that box is empty space
   around the glyph. Leaflet hit-tests the whole box, so a dense network —
   the KY Mesonet on the Kentucky view, or METAR at high density — covered
   52% of the map in invisible click targets, and a county click there opened
   a station popup instead of the forecast.

   The box now passes clicks through and only the drawn marks take them, so a
   plot is still clickable exactly where it is visible. Events from the SVG
   children bubble up to the icon element, so Leaflet's popup binding is
   unaffected. */
/* Selector carries .leaflet-marker-icon deliberately: leaflet.css sets
   `.leaflet-marker-icon.leaflet-interactive { pointer-events: auto }`, which
   outranks a bare .station-icon and silently won. */
.leaflet-marker-icon.station-icon,
.leaflet-marker-icon.metar-icon { pointer-events: none; }
.leaflet-marker-icon.station-icon svg *,
.leaflet-marker-icon.metar-icon svg * { pointer-events: auto; }


/* ── Map-tool pop-outs ────────────────────────────────────────────────────
   Range rings and distance arrows share this shell. Both are drawing tools,
   so both are anchored to the zoom cluster rather than living in the sidebar,
   and both grow a list that has to be capped against the viewport.

   Written as a class rather than per-panel ids: the two were identical, and a
   second copy under a second id is how they drift apart. */
.map-popout {
  position: absolute;
  right: calc(52px + env(safe-area-inset-right));
  bottom: calc(52px + env(safe-area-inset-bottom));
  z-index: 430;
  width: 300px;
  max-width: calc(100vw - 80px);
  max-height: min(70vh, 620px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--overlay-strong);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  box-shadow: var(--overlay-shadow);
}
.map-popout[hidden] { display: none; }

.pop-head {
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: space-between;
  padding: 7px 10px;
  border-bottom: 1px solid var(--border);
  font-size: 9px; font-weight: 800; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--accent);
}
.pop-close {
  background: none; border: 0; cursor: pointer; padding: 0 2px;
  color: var(--muted); font-size: 15px; line-height: 1; font-family: var(--font-mono);
}
.pop-close:hover { color: var(--accent); }

.pop-body {
  flex: 1; overflow-y: auto;
  padding: 9px 10px 12px;
  display: flex; flex-direction: column; gap: 9px;
}
.pop-body::-webkit-scrollbar { width: 3px; }
.pop-body::-webkit-scrollbar-thumb { background: var(--accent-line); border-radius: 2px; }

#zoom-rings[aria-expanded="true"],
#zoom-measure[aria-expanded="true"] {
  background: var(--accent); color: var(--on-accent); border-color: var(--accent);
}

/* ── Editable ring rows ───────────────────────────────────────────────────
   A placed ring stays adjustable: radius and centre are live fields on the
   selected group, committed on change rather than on every keystroke. */
.ring-rows {
  display: flex; flex-direction: column; gap: 2px;
  margin: 2px 0 4px 8px; padding-left: 6px;
  border-left: 1px solid var(--border-strong);
}
.ring-row { display: flex; align-items: center; gap: 3px; }
.ring-row input {
  min-width: 0; padding: 2px 4px; border-radius: 3px;
  background: var(--sunken); border: 1px solid var(--border);
  color: var(--text); font-family: var(--font-mono); font-size: 8.5px;
  text-transform: none; letter-spacing: 0;
}
.ring-row input:focus { border-color: var(--accent); outline: none; }
.ring-r  { width: 34px; text-align: right; }
.ring-la, .ring-lo { flex: 1; }
.ring-unit-sm {
  font-size: 7.5px; color: var(--muted); flex-shrink: 0; letter-spacing: 0.04em;
}
.ring-rm {
  background: none; border: 0; cursor: pointer; flex-shrink: 0;
  color: var(--muted); font-size: 12px; line-height: 1; padding: 0 2px;
  font-family: var(--font-mono);
}
.ring-rm:hover { color: var(--accent); }
.ring-warn { color: var(--accent); font-weight: 700; }


/* ── Pop-out row grid ─────────────────────────────────────────────────────
   The rings pop-out is 300px wide and its labels are longer than the sidebar
   ones, so the shared .snd-row flex layout let RADIUS, CENTER and COLOR ride
   over their own inputs. A two-column grid gives the label a fixed column and
   the controls whatever is left, and min-width:0 lets the text inputs shrink
   instead of pushing their neighbours out of the row. */
.rr-row { display: grid; grid-template-columns: 52px 1fr; gap: 8px; align-items: center; }
/* Author rules beat the UA's `[hidden] { display: none }`, so any row that
   gets hidden has to say so itself — the dash row on a solid line. */
.rr-row[hidden] { display: none; }
.rr-row > label {
  font-size: 9px; font-weight: 700; letter-spacing: 0.07em;
  text-transform: uppercase; color: var(--muted2);
}
.rr-controls { display: flex; align-items: center; gap: 5px; min-width: 0; }
.rr-controls > input[type=text],
.rr-controls > select { min-width: 0; flex: 1; }
.rr-row:has(> label.sr-only) { grid-template-columns: 1fr; }
.rr-span { grid-column: 1 / -1; }
.rr-coord { text-transform: none; letter-spacing: 0; font-family: var(--font-mono); }
.rr-icon { flex-shrink: 0; padding: 3px 7px; font-size: 11px; line-height: 1; }
.pop-body .chk-row { flex-shrink: 0; }
.pop-body .pct { margin-left: auto; }


/* Drag handle at a ring set's centre. Sized for a finger as well as a mouse:
   the visible dot is 8px, the grab target the full 16. */
.ring-handle {
  display: flex; align-items: center; justify-content: center;
  cursor: grab; background: none; border: 0;
}
.ring-handle:active { cursor: grabbing; }
.ring-handle span {
  width: 9px; height: 9px; border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .35);
  display: block;
}
.leaflet-marker-icon.ring-handle { pointer-events: auto; }


/* What the place lookup resolved to, under the Find row. */
.rr-found {
  font-size: 8.5px; line-height: 1.5; color: var(--muted);
  letter-spacing: 0.03em; min-height: 0; margin-top: -4px;
}
.rr-found:empty { display: none; }
.rr-found-bad { color: var(--accent); font-weight: 700; }


/* ── Header alert menus ───────────────────────────────────────────────────
   The Warnings / Watches / Advisories counters are buttons that drop a list
   of what is active, with the times each product is in force. They replaced
   the sidebar Active Alerts panel, which showed the same feed a scroll away
   from the counts it belonged to. */
.abadge-btn {
  background: none; border: 0; cursor: pointer;
  font-family: var(--font-body); border-radius: 5px;
  transition: background .15s;
}
.abadge-btn:hover { background: var(--accent-soft); }
.acaret { font-size: 7px; color: var(--muted); margin-left: -3px; }
.abadge-btn[aria-expanded="true"] { background: var(--accent-soft); }
.abadge-btn[aria-expanded="true"] .acaret { color: var(--accent); }

.alert-menu {
  position: absolute;
  z-index: 560;
  width: 320px; max-width: calc(100vw - 16px);
  max-height: min(60vh, 520px);
  overflow-y: auto;
  padding: 5px;
  display: flex; flex-direction: column; gap: 3px;
  background: var(--overlay-strong);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border-strong);
  border-radius: 0 0 8px 8px;
  box-shadow: var(--overlay-shadow);
  pointer-events: auto;
}
.alert-menu[hidden] { display: none; }
.alert-menu::-webkit-scrollbar { width: 3px; }
.alert-menu::-webkit-scrollbar-thumb { background: var(--accent-line); border-radius: 2px; }

/* The active-time line: the reason these are menus rather than counts. */
.alert-item .ai-when {
  display: flex; align-items: baseline; gap: 6px;
  font-family: var(--font-mono); font-size: 9px; color: var(--text);
  margin-top: 2px;
}
.ai-left { font-size: 8px; color: var(--muted); letter-spacing: 0.04em; }


/* ── Reset menu ───────────────────────────────────────────────────────────
   Reset asks which reset. It used to be a two-press confirm, which made one
   button mean both "tidy the display" and "erase the rings" — and those are
   not the same decision. Each option says what survives it. */
#reset-btn[aria-expanded="true"] {
  background: var(--accent); color: var(--on-accent); border-color: var(--accent);
}
.reset-menu {
  position: absolute;
  z-index: 560;
  width: 280px; max-width: calc(100vw - 16px);
  padding: 5px;
  display: flex; flex-direction: column; gap: 3px;
  background: var(--overlay-strong);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border-strong);
  border-radius: 0 0 8px 8px;
  box-shadow: var(--overlay-shadow);
  pointer-events: auto;
}
.reset-menu[hidden] { display: none; }
.reset-opt {
  display: flex; flex-direction: column; gap: 2px;
  width: 100%; text-align: left; cursor: pointer;
  padding: 7px 9px;
  background: var(--sunken);
  border: 1px solid var(--border);
  border-left: 3px solid var(--muted);
  border-radius: 5px;
  font-family: var(--font-body);
  transition: background .12s, border-color .12s;
}
.reset-opt:hover { background: var(--raised); border-left-color: var(--accent); }
.reset-opt.danger { border-left-color: var(--accent); }
.reset-opt.danger:hover { background: var(--accent-soft); }
.ro-title {
  font-size: 10px; font-weight: 800; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--text);
}
.ro-note { font-size: 9px; line-height: 1.45; color: var(--muted); }

/* ── Per-ring style drawer ────────────────────────────────────────────────
   A ring inherits its group's look until something here is touched; the
   pencil marks rows that have been pulled out, and ↺ puts them back. */
/* Per-ring watch toggles. Pressed reads as lit rather than merely darker:
   these say whether a ring is watching at all, and "off" has to be obvious at
   a glance on a wall display, not a shade of grey you have to compare against
   its neighbour. */
.ring-watch {
  flex-shrink: 0; cursor: pointer; padding: 1px 3px;
  border: 1px solid var(--border); border-radius: 3px;
  background: var(--sunken); color: var(--muted2);
  font-family: var(--font-mono); font-size: 7px; font-weight: 700;
  letter-spacing: 0.06em; line-height: 1.4;
  opacity: 0.55;
}
.ring-watch:hover { color: var(--text); opacity: 0.85; }
.ring-watch.on { opacity: 1; }
.ring-watch.ltg.on {
  color: #ffd500; border-color: #ffd500;
  background: color-mix(in srgb, #ffd500 16%, transparent);
}
.ring-watch.wet.on {
  color: var(--cyan); border-color: var(--cyan);
  background: color-mix(in srgb, var(--cyan) 16%, transparent);
}

.ring-edit {
  background: none; border: 0; cursor: pointer; flex-shrink: 0;
  color: var(--muted); font-size: 10px; line-height: 1; padding: 0 2px;
}
.ring-edit:hover { color: var(--accent); }
.ring-edit.custom { color: var(--accent); }

.ring-style-row {
  display: flex; align-items: center; gap: 4px;
  padding: 3px 0 5px 4px;
}
.ring-style-row.closed { display: none; }
.ring-style-row input[type=color] { width: 24px; height: 18px; flex-shrink: 0; }
.ring-w {
  width: 34px; flex-shrink: 0; padding: 2px 3px; border-radius: 3px;
  background: var(--sunken); border: 1px solid var(--border); color: var(--text);
  font-family: var(--font-mono); font-size: 8.5px;
}
.ring-st {
  width: auto; flex: 0 1 62px; min-width: 0; padding: 2px 4px; font-size: 8px;
}
.ring-f { accent-color: var(--accent); width: 12px; height: 12px; flex-shrink: 0; cursor: pointer; }
.ring-fo { flex: 1; min-width: 28px; margin-top: 0; }
.ring-reset {
  background: none; border: 0; cursor: pointer; flex-shrink: 0;
  color: var(--muted); font-size: 11px; line-height: 1; padding: 0 2px;
  font-family: var(--font-mono);
}
.ring-reset:hover { color: var(--accent); }


/* ── Alert menus: category level ──────────────────────────────────────────
   A counter opens on what is running, not on 260 rows. The count sits on the
   right so the eye can scan magnitudes down the column. */
.alert-cat {
  display: flex; align-items: center; gap: 8px; width: 100%;
  text-align: left; cursor: pointer;
  background: var(--sunken); border: 1px solid var(--border);
  border-left: 3px solid var(--muted);
  border-radius: 4px; padding: 7px 8px;
  font-family: var(--font-body);
  transition: background .12s;
}
.alert-cat:hover { background: var(--accent-soft); }
.ac-event {
  flex: 1; min-width: 0;
  font-size: 10px; font-weight: 700; letter-spacing: 0.04em; color: var(--text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ac-count {
  font-family: var(--font-mono); font-size: 11px; font-weight: 700;
  color: var(--text); flex-shrink: 0;
}
.ac-arrow { color: var(--muted); font-size: 13px; line-height: 1; flex-shrink: 0; }

.alert-back {
  display: flex; align-items: center; gap: 6px; width: 100%;
  text-align: left; cursor: pointer;
  background: none; border: 0; border-bottom: 1px solid var(--border);
  padding: 4px 6px 6px; margin-bottom: 2px;
  font-family: var(--font-body); font-size: 9px; font-weight: 800;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted2);
}
.alert-back:hover { color: var(--accent); }
.ab-here {
  margin-left: auto; text-transform: none; letter-spacing: 0.03em;
  font-weight: 700; color: var(--accent); font-size: 9px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}


/* Apply-to-group sits with the style controls it acts on, not with the
   destructive actions row below. */
.ring-apply { width: 100%; }


/* Dash length / gap. Small numeric fields in the pen row and again in each
   ring's drawer — the same two numbers at both levels. */
.ring-num {
  width: 40px; flex-shrink: 0; padding: 2px 4px; border-radius: 3px;
  background: var(--sunken); border: 1px solid var(--border); color: var(--text);
  font-family: var(--font-mono); font-size: 8.5px; text-align: right;
}
.ring-num:focus { border-color: var(--accent); outline: none; }
.ring-style-row .ring-num { width: 30px; }

/* Inline group rename: the name button becomes a field in place. */
.ring-ren {
  background: none; border: 0; cursor: pointer; flex-shrink: 0;
  color: var(--muted); font-size: 10px; line-height: 1; padding: 0 2px;
}
.ring-ren:hover { color: var(--accent); }
.ring-name-edit {
  flex: 1; min-width: 0; padding: 2px 5px;
  text-transform: none; letter-spacing: 0.02em; font-size: 9px;
}
/* A name another group already uses. Marked rather than replaced by a hint —
   the hint would take the editor with it. */
.ring-name-edit.bad {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent-soft);
}


/* ── Ring lightning alert ─────────────────────────────────────────────────
   A ring with lightning inside it pulses red; the innermost ring of a set
   pulses its fill too. The animation targets stroke and fill directly rather
   than opacity, so the ring keeps its own colour between beats and the alert
   reads as a change of state, not a flicker. */
@keyframes ring-alert-pulse {
  0%, 100% { stroke: var(--ring-alert-from, #be141b); stroke-opacity: .95; }
  50%      { stroke: #ff1b1b; stroke-opacity: 1; }
}
@keyframes ring-fill-alert-pulse {
  0%, 100% { fill: #ff1b1b; fill-opacity: .12; }
  50%      { fill: #ff1b1b; fill-opacity: .42; }
}
path.ring-alert {
  animation: ring-alert-pulse 1.1s ease-in-out infinite;
}
path.ring-fill-alert {
  animation: ring-fill-alert-pulse 1.1s ease-in-out infinite;
}

/* Undo / redo sit with the other ring actions and go flat when there is
   nothing to step to, rather than disappearing and moving the row. */
.ring-hist:disabled { opacity: 0.35; cursor: default; }

/* The radar site itself, at the centre of its range ring. */
.radar-site {
  display: flex; align-items: center; gap: 4px;
  width: max-content; white-space: nowrap; pointer-events: none;
}
.rs-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent); border: 1.5px solid; box-sizing: content-box;
}
.rs-id {
  font-family: var(--font-mono); font-size: 9px; font-weight: 800;
  color: var(--accent);
  text-shadow: -1px 0 #000, 1px 0 #000, 0 -1px #000, 0 1px #000;
}

/* MRMS accumulation key. Swatches come from the service's own legend
   endpoint, so the key cannot disagree with the raster. */
.mrms-legend {
  display: grid; grid-template-columns: 1fr 1fr;
  column-gap: 8px; row-gap: 1px;
  margin-top: 7px;
}
.mrms-legend[hidden] { display: none; }
.mrms-leg-item {
  display: flex; align-items: center; gap: 5px;
  font-size: 8px; color: var(--muted2); white-space: nowrap;
}
.mrms-swatch {
  width: 11px; height: 9px; flex-shrink: 0;
  border: 1px solid var(--border); border-radius: 1px;
}

/* ── City and town labels ─────────────────────────────────────────────────
   A locator dot and a name, the name being the point. The halo is set inline
   from the ground palette so it flips with the basemap rather than the theme —
   these sit directly on the map, over radar as often as over open ground. */
.place-label {
  display: flex; align-items: center; gap: 4px;
  width: max-content; height: max-content;
  white-space: nowrap; pointer-events: none;
  font-family: var(--font-body);
  font-size: 10px; font-weight: 600; letter-spacing: 0.02em;
}
.place-label.big { font-size: 12px; font-weight: 800; letter-spacing: 0.04em; }
.place-label.capital .place-name { text-transform: uppercase; letter-spacing: 0.08em; }
.place-dot {
  width: 5px; height: 5px; border-radius: 50%;
  border: 1px solid; box-sizing: content-box; flex-shrink: 0;
}
.place-label.big .place-dot { width: 7px; height: 7px; }

/* ── Measuring tool ───────────────────────────────────────────────────────
   A drafting mark, not a map layer: black, thin, and the same on every
   basemap. The label carries a white halo because it lands on radar fill as
   often as on open ground. */
.measure-label {
  font-family: var(--font-mono);
  font-size: 10px; font-weight: 700;
  color: #000; text-align: center; white-space: nowrap;
  text-shadow: 0 0 3px #fff, 0 0 3px #fff, 0 0 5px #fff;
  pointer-events: none;
}
.measure-label.leg { font-size: 9px; font-weight: 600; opacity: 0.9; }
.measure-arrow { pointer-events: none; }
.measure-arrow svg { display: block; }
.measure-dot {
  background: #000;
  border: 1.5px solid #fff;
  border-radius: 50%;
  box-sizing: border-box;
  pointer-events: none;
}
#zoom-measure[aria-pressed="true"] {
  background: var(--accent); color: var(--on-accent); border-color: var(--accent);
}

/* The precip threshold row in the ring pop-out. */
.rr-precip { align-items: center; gap: 6px; }
.rr-precip-ge { color: var(--muted); font-size: 10px; }
.rr-unit { color: var(--muted); font-size: 9px; letter-spacing: 0.06em; }
#ring-precip-dbz { width: 48px; }

/* ── Ring precipitation ───────────────────────────────────────────────────
   A ring with a ≥ threshold echo inside it gets a steady cyan halo. Steady,
   not pulsing: precipitation is a state the radar can see coming and going,
   while a strike is an event with a clock on it, and the two alerts land on
   the same rings. Motion is reserved for the one that means "stop play". */
path.ring-precip {
  filter: drop-shadow(0 0 2px rgba(0, 229, 255, 0.95))
          drop-shadow(0 0 5px rgba(0, 229, 255, 0.55));
}

/* ── Lightning countdowns ─────────────────────────────────────────────────
   One strip per counting ring, under the radar refresh. */
.ltg-strip { color: var(--accent); gap: 7px; }
.ltg-strip.core { background: var(--accent-soft); }
/* Precipitation rows are painted in the reflectivity colour the radar is
   actually drawing — see dbzColor in js/ui/ltghud.js, which sets it inline.
   The cyan here is the fallback for a palette that has not loaded yet.

   A palette colour is chosen to read on a map, not on a panel, so the value
   carries a thin contrasting outline. Without it the darker greens vanish on
   the dark HUD and the yellows vanish on the light one — and the whole point
   is that the number stays readable while wearing its own colour. */
.ltg-strip.precip { color: var(--cyan); }
.ltg-strip.precip .ltg-ring,
.ltg-strip.precip .ltg-time {
  color: var(--cyan);
  text-shadow: 0 0 2px var(--overlay-strong), 0 0 4px var(--overlay-strong),
               0 1px 1px rgba(0, 0, 0, 0.55);
}
:root[data-theme="light"] .ltg-strip.precip .ltg-ring,
:root[data-theme="light"] .ltg-strip.precip .ltg-time {
  text-shadow: 0 0 2px #fff, 0 0 4px #fff, 0 1px 1px rgba(255, 255, 255, 0.8);
}

/* Where the last strike was, from the ring's own centre. Set apart from the
   group name so the row reads ring · place · clock. */
.ltg-where {
  font-family: var(--font-mono);
  font-size: 9px; font-weight: 700;
  color: var(--amber);
  white-space: nowrap;
  padding-left: 2px;
}
/* The bolt and the raindrop. Sized to the cap height of the row's text so
   the icon sits on the same optical line as "60 MI" rather than floating
   above it, and given the same 7px footprint the dot had so nothing else in
   the strip shifts. */
.ltg-icon {
  flex-shrink: 0;
  width: 10px; height: 14px;
  display: block;
  overflow: visible;
}

.ltg-ring {
  font-family: var(--font-mono); font-weight: 800; color: var(--accent);
}
.ltg-group {
  color: var(--muted2); font-weight: 700; letter-spacing: 0.08em;
  max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ltg-time {
  font-family: var(--font-mono); font-size: 11px; font-weight: 800;
  color: var(--accent); margin-left: auto; padding-left: 6px;
}
.ltg-idle { color: var(--muted2); }
.ltg-note { color: var(--muted); font-weight: 700; }

/* ═══════════════════════════════════════════════════════════════════════════
   Access gate
   ───────────────────────────────────────────────────────────────────────────
   Mirrors the WeatherPlanner's gate (dsoc-website/site/weatherplanner, the
   .wp-gate block in css/planner.css): a black scrim over the whole viewport
   and one centred card. The class names are the planner's on purpose — the
   markup and js/gate.js came from there, and keeping the names means the two
   can be diffed. Colors are this app's tokens rather than the planner's, so
   the card follows the theme instead of always being white on black.
   ═══════════════════════════════════════════════════════════════════════════ */

.wp-gate {
  position: fixed;
  inset: 0;
  z-index: 5000;                 /* above the sidebar, the HUD and the modal */
  background: var(--brand-black);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.wp-gate[hidden] { display: none; }

/* The map is still live underneath; this just stops a stray scroll from
   moving the page while the gate is up. */
body.wp-locked { overflow: hidden; }

.wp-gate-box {
  width: min(100%, 22rem);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  box-shadow: var(--overlay-shadow);
  padding: 30px 28px;
}

/* Same two-image swap as the sidebar logo, and written at ID specificity for
   the same reason: a plain class rule loses to the sizing rule below. */
#gate-logo-dark, #gate-logo-light {
  height: 34px; width: auto; display: block; margin-bottom: 20px;
}
#gate-logo-light { display: none; }
:root[data-theme="light"] #gate-logo-dark  { display: none; }
:root[data-theme="light"] #gate-logo-light { display: block; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) #gate-logo-dark  { display: none; }
  :root:not([data-theme="dark"]) #gate-logo-light { display: block; }
}

.wp-gate-eyebrow {
  margin: 0 0 20px;
  font-size: 10px; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.10em;
  color: var(--accent);
}

.wp-gate-fields { display: grid; gap: 4px; }
.wp-gate-label {
  font-size: 9px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.07em;
  color: var(--muted2);
}
.wp-gate-label + .wp-gate-field { margin-bottom: 10px; }
.wp-gate-field {
  width: 100%;
  padding: 8px 10px;
  font-family: var(--font-body); font-size: 13px;
  color: var(--text);
  background: var(--sunken);
  border: 1px solid var(--border-strong);
  border-radius: 4px;
}
.wp-gate-field:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.wp-gate-error {
  margin: 12px 0 0;
  font-size: 10px; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--accent);
  min-height: 1.2em;             /* reserved, so the button never jumps */
}

.wp-gate-btn {
  width: 100%;
  margin-top: 12px;
  padding: 10px 12px;
  font-family: var(--font-display); font-size: 12px; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--on-accent);
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 4px;
  cursor: pointer;
}
.wp-gate-btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.wp-gate-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* The second key in wind mode: the trail ramp under the stain scale. Needs a
   gap the single-bar layout never did. */
.stream-bar-2 { margin-top: 5px; }

/* ═══════════════════════════════════════════════════════════════════════════
   Range filters on the colour bars (js/ui/rangebar.js)
   ───────────────────────────────────────────────────────────────────────────
   The handles sit on the scale they filter, in the same yellow as the
   lightning icon so they read as a control rather than as part of the ramp.
   They are deliberately narrow — the grip you SEE is 4.5px, the grip you can
   GRAB is about 18, grown with a transparent inset rather than by drawing
   something bigger.
   ═══════════════════════════════════════════════════════════════════════════ */

/* Not a token: this is the lightning yellow from js/ui/ltghud.js, quoted so
   the two match. Theme-invariant for the same reason that icon is. */
:root { --rb-grip: #ffe23a; }

/* Room above the bar for the two readouts, with enough air that a descender
   or a tall digit never touches the bar's top edge. */
.rb-host { position: relative; margin-top: 16px; }

/* What has been cut away. Dimmed rather than erased: knowing what is outside
   the window is half of choosing the window. */
.rb-mask {
  position: absolute; top: 0; bottom: 0;
  background: var(--scrim);
  pointer-events: none;
  border-radius: inherit;
}

.rb-grip {
  position: absolute; top: 50%;
  width: 4.5px; height: 17px;
  margin-left: -2.25px;
  transform: translateY(-50%);
  background: var(--rb-grip);
  border: 1px solid rgba(0, 0, 0, 0.75);   /* the bolt's own outline */
  border-radius: 2px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
  cursor: ew-resize;
  pointer-events: auto;        /* the panel around it takes no clicks */
  touch-action: none;          /* or the browser pans the map instead */
  z-index: 2;
}
/* The grab area, well past the paint — more of it now that the paint is half
   the width it was. */
.rb-grip::before {
  content: "";
  position: absolute; inset: -7px -9px;
}
.rb-grip:hover,
.rb-grip:focus-visible,
.rb-grip.rb-dragging {
  height: 21px;
  box-shadow: 0 0 0 1px var(--rb-grip), 0 1px 6px rgba(0, 0, 0, 0.55);
}
.rb-grip:focus-visible { outline: 2px solid var(--rb-grip); outline-offset: 2px; }

/* The bound values, above the handles. */
.rb-val {
  position: absolute; bottom: calc(100% + 6px);
  transform: translateX(-50%);
  font-family: var(--font-mono); font-size: 8px; font-weight: 800;
  line-height: 1; letter-spacing: 0.02em;
  color: var(--rb-grip);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.65);
  pointer-events: none;
  white-space: nowrap;
}

/* A filtered bar says so even before you look at the handle positions. */
.rb-host.rb-filtered { box-shadow: 0 0 0 1px var(--rb-grip); }

/* ── GRLevelX placefile features (js/map/placefile.js) ──────────────────────
   Icons are cut from the feed's own sprite sheets, so the only styling here is
   what keeps them crisp and stops the labels being clipped. */
.pf-marker { background: none; border: none; }
/* A window onto the feed's sprite sheet. The sheet is an <img> inside it,
   slid left by whole icon widths, because the icon host 403s a hotlinked
   request and only an element can carry referrerpolicy. */
.pf-icon {
  display: block;
  position: relative;
  overflow: hidden;
}
.pf-icon img {
  position: absolute;
  top: 0;
  max-width: none;            /* or a stylesheet reset shrinks the sheet */
  image-rendering: -webkit-optimize-contrast;
}
.pf-text {
  display: block;
  white-space: nowrap;
  font-family: var(--font-mono);
  text-shadow: 0 0 3px #000, 0 0 3px #000;   /* legible over any radar colour */
  line-height: 1;
}

/* ── "You are here" (js/map/gps.js) ──────────────────────────────────────────
   The universal location mark: a blue disc inside a white ring. Both colours
   are literal rather than tokens, for the same reason the SPC fills and the
   NWS polygons are — it is a convention, and a display that recoloured it per
   theme would be the only map on the desk that did. The ring is what makes it
   survive landing on radar, on imagery or on a white basemap. */
.gps-marker { background: none; border: none; }
.gps-dot {
  display: block;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: #1a73e8;
  border: 2.5px solid #ffffff;
  /* Two shadows: a hard rim so the white ring reads on white, and a soft
     halo so the whole mark is findable on a busy field of station plots. */
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.45),
              0 0 10px 3px rgba(26, 115, 232, 0.45);
  box-sizing: border-box;
}
