/* Forecast Ops — shared console styling.
   Tokens mirror lib/theme.ts in the Heads-Up app so the two look like one product:
   dark ops-console by default, high-contrast light mode for outdoor use, and the
   five fixed operational status colors that never change with the theme. */

:root {
  --bg: #0A0D12;
  --panel: #12161D;
  --raised: #171C24;
  --line: #232A35;
  --text: #E7ECF3;
  --muted: #8A94A6;
  --faint: #75808F;
  --accent: #38BDF8;
  --accent-dim: #1E5F7A;
  --band: rgba(56, 189, 248, .16);

  /* fixed status palette (same in both themes) */
  --normal: #22C55E;
  --monitor: #EAB308;
  --prepare: #F97316;
  --action: #EF4444;
  --nodata: #6B7280;

  --warm: #FCA5A5;
  --cold: #7DD3FC;
  --snow: #93C5FD;
  --snow-stick: #3B82F6;

  --font-display: "Archivo Black", "Arial Black", -apple-system, system-ui, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #F3F5F8;
  --panel: #FFFFFF;
  --raised: #EDF0F4;
  --line: #D3D9E0;
  --text: #12161D;
  --muted: #4B5563;
  --faint: #5B6472;
  --accent: #0369A1;
  --accent-dim: #BAE6FD;
  --band: rgba(3, 105, 161, .14);
  --warm: #B91C1C;
  --cold: #0369A1;
  --snow: #93C5FD;
  --snow-stick: #1D4ED8;
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.45;
  min-height: 100vh;
}
button, input, select { font-family: inherit; }
a { color: var(--accent); }
button:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.mono { font-family: var(--font-mono); }
.display { font-family: var(--font-display); letter-spacing: .3px; }
[hidden] { display: none !important; }

/* ---------- status header (mirrors components/layout/StatusBar.tsx) ---------- */
.statusbar {
  min-height: 68px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  padding: 8px 16px;
  display: flex;
  align-items: stretch;
  gap: 16px;
  flex-wrap: wrap;
}
.site-id { display: flex; align-items: center; gap: 8px; min-width: 0; }
.site-id svg { color: var(--muted); flex: none; }
.kicker { font-size: 9px; font-weight: 700; color: var(--faint); letter-spacing: .6px; text-transform: uppercase; }
.site-name {
  font-family: var(--font-display); font-size: 15px; letter-spacing: .3px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 280px; line-height: 1.15;
}
.site-sub { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 280px; }
.vsep { width: 1px; background: var(--line); align-self: center; height: 40px; flex: none; }
.headline {
  display: flex; align-items: center; gap: 16px; flex: 1 1 auto; min-width: 0;
  padding: 6px 12px; border-radius: 8px; flex-wrap: wrap;
}
.headline.tier { border-left: 4px solid var(--tier, var(--nodata)); background: color-mix(in srgb, var(--tier, var(--nodata)) 9%, transparent); }
.hl-label { display: flex; align-items: center; gap: 8px; }
.dot { width: 11px; height: 11px; border-radius: 999px; background: var(--tier, var(--nodata)); flex: none; }
.tier .dot { box-shadow: 0 0 12px var(--tier); }
.hl-word { font-family: var(--font-display); font-size: clamp(17px, 1.6vw, 23px); line-height: 1; letter-spacing: .4px; white-space: nowrap; }
.hl-stat { display: flex; align-items: baseline; gap: 6px; }
.hl-num { font-family: var(--font-mono); font-size: clamp(19px, 2vw, 30px); font-weight: 800; line-height: 1; white-space: nowrap; }
.hl-note { font-size: 10.5px; font-weight: 700; color: var(--muted); letter-spacing: .4px; text-transform: uppercase; margin-top: 3px; }
.headline.dashed { border-left-style: dashed; }
.hl-unit { font-size: 12px; color: var(--muted); white-space: nowrap; }
.utility { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 10px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase;
  padding: 5px 9px; border-radius: 7px; background: var(--raised); color: var(--muted);
  border: 1px solid var(--line); white-space: nowrap;
}
.chip.live { color: var(--normal); border-color: color-mix(in srgb, var(--normal) 50%, transparent); }
.chip.warn { color: var(--monitor); border-color: color-mix(in srgb, var(--monitor) 50%, transparent); }
.chip.err { color: var(--action); border-color: color-mix(in srgb, var(--action) 50%, transparent); }

/* ---------- nav (mirrors components/layout/NavBar.tsx) ---------- */
.navbar {
  background: var(--panel); border-bottom: 1px solid var(--line);
  padding: 4px 10px; display: flex; gap: 4px; overflow-x: auto;
}
.navbar a {
  display: flex; align-items: center; gap: 8px; text-decoration: none;
  color: var(--muted); border: 1px solid transparent; border-radius: 7px;
  padding: 7px 11px; font-size: 11.5px; font-weight: 800; letter-spacing: .6px;
  white-space: nowrap; flex: none;
}
.navbar a:hover { color: var(--text); }
.navbar a[aria-current="page"] { background: var(--accent-dim); color: var(--text); border-color: var(--accent); }
:root[data-theme="light"] .navbar a[aria-current="page"] { color: var(--text); }

/* ---------- workspace ---------- */
.workspace {
  max-width: 1320px; margin: 0 auto;
  padding: 16px max(16px, env(safe-area-inset-left, 0px)) 48px;
  display: grid; grid-template-columns: 300px minmax(0, 1fr); grid-template-rows: auto 1fr;
  grid-template-areas: "side main" "extra main"; gap: 16px; align-items: start;
}
.side { grid-area: side; display: grid; gap: 12px; }
.side-extra { grid-area: extra; display: grid; gap: 12px; align-self: start; }
.main { grid-area: main; display: grid; gap: 16px; min-width: 0; }
/* Phones: location + run first, then the forecast, then models and methods. */
@media (max-width: 900px) { .workspace { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; grid-template-areas: "side" "main" "extra"; } }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 16px; min-width: 0; }
.card.tight { padding: 12px; }
.section-title { font-family: var(--font-display); font-size: 14px; letter-spacing: 1px; color: var(--muted); margin: 0 0 10px; text-transform: uppercase; font-weight: 400; }
.section-sub { color: var(--muted); font-size: 13px; margin: -4px 0 12px; max-width: 80ch; }
.field-label { display: block; font-size: 11px; color: var(--muted); font-weight: 700; margin-bottom: 5px; text-transform: uppercase; letter-spacing: .4px; }
.input, select.input {
  width: 100%; background: var(--raised); border: 1px solid var(--line); color: var(--text);
  border-radius: 6px; padding: 9px 10px; font-size: 13px;
}
.row { display: flex; gap: 8px; align-items: end; flex-wrap: wrap; }
.row > * { flex: 1 1 0; min-width: 0; }
.stack { display: grid; gap: 10px; }

.btn {
  background: var(--accent); color: var(--bg); border: none; border-radius: 8px;
  padding: 10px 16px; font-weight: 800; font-size: 12.5px; letter-spacing: .3px; cursor: pointer; white-space: nowrap;
}
.btn:disabled { background: var(--line); color: var(--faint); cursor: not-allowed; }
.btn.ghost { background: transparent; color: var(--muted); border: 1px solid var(--line); font-weight: 700; }
.btn.ghost:hover { color: var(--text); }
.btn.sm { padding: 6px 10px; font-size: 11px; }
.btn.icon { display: inline-flex; align-items: center; gap: 6px; }

.msg { font-size: 12px; color: var(--muted); margin: 0; }
.msg.err { color: var(--action); }
.note {
  border: 1px dashed color-mix(in srgb, var(--monitor) 55%, transparent); color: var(--muted);
  border-radius: 9px; padding: 9px 12px; font-size: 12px;
}
.note b { color: var(--monitor); }

/* search results */
.results { display: grid; gap: 4px; margin-top: 6px; }
.results button {
  text-align: left; background: var(--raised); border: 1px solid var(--line); color: var(--text);
  border-radius: 6px; padding: 7px 9px; font-size: 12.5px; cursor: pointer;
}
.results button small { color: var(--muted); }

/* model list */
.models { display: grid; gap: 6px; }
.model {
  display: grid; grid-template-columns: auto 1fr auto; gap: 4px 8px; align-items: center;
  background: var(--raised); border: 1px solid var(--line); border-radius: 8px; padding: 7px 9px;
}
.model.off { opacity: .45; }
.model.nodata { opacity: .35; }
.model input[type=checkbox] { accent-color: var(--accent); width: 15px; height: 15px; margin: 0; }
.model label { font-size: 12px; font-weight: 700; display: flex; align-items: center; gap: 7px; min-width: 0; }
.model .w { font-family: var(--font-mono); font-size: 11px; color: var(--muted); }
.model input[type=range] { grid-column: 1 / -1; width: 100%; accent-color: var(--accent); margin: 0; }
.sw { width: 14px; height: 3px; border-radius: 2px; flex: none; display: inline-block; }

/* stat tiles */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.tile { background: var(--raised); border: 1px solid var(--line); border-radius: 9px; padding: 10px 12px; display: grid; gap: 3px; }
.tile .k { font-size: 10.5px; font-weight: 800; letter-spacing: .6px; color: var(--muted); text-transform: uppercase; }
.tile .v { font-family: var(--font-mono); font-size: 24px; font-weight: 800; line-height: 1.1; }
.tile .s { font-size: 11.5px; color: var(--muted); }

/* tabs */
.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.tab {
  font-size: 11px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase;
  padding: 6px 10px; border-radius: 7px; border: 1px solid var(--line);
  background: transparent; color: var(--muted); cursor: pointer;
}
.tab[aria-selected="true"] { background: var(--accent-dim); color: var(--text); border-color: var(--accent); }

.chartbox { position: relative; height: 380px; }
.chartbox.short { height: 260px; }
@media (max-width: 600px) { .chartbox { height: 300px; } .chartbox.short { height: 220px; } .hl-word { font-size: 22px; } .hl-num { font-size: 26px; } }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 10px; font-size: 11.5px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }

/* tables */
.tablewrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; }
th, td { padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; text-align: right; }
th:first-child, td:first-child { text-align: left; }
th { font-size: 11px; letter-spacing: .5px; text-transform: uppercase; color: var(--muted); font-weight: 800; }
td.num { font-family: var(--font-mono); font-size: 13px; }
.hi { color: var(--warm); font-weight: 700; }
.lo { color: var(--cold); font-weight: 700; }
.badge {
  display: inline-flex; align-items: center; gap: 6px; font-size: 10px; font-weight: 800; letter-spacing: .5px;
  padding: 3px 8px; border-radius: 999px; text-transform: uppercase;
  color: var(--b, var(--nodata)); border: 1px solid color-mix(in srgb, var(--b, var(--nodata)) 60%, transparent);
  background: color-mix(in srgb, var(--b, var(--nodata)) 10%, transparent);
}
.badge.dashed { border-style: dashed; }
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 99px; background: var(--b, var(--nodata)); }

/* tier strip (hour-by-hour signal) */
.strip-scroll:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.strip { display: grid; gap: 2px; min-width: 760px; }
.strip-row { display: grid; gap: 1px; align-items: center; }
.strip-name { font-size: 11px; font-weight: 700; color: var(--muted); display: flex; gap: 6px; align-items: center; white-space: nowrap; overflow: hidden; text-transform: uppercase; letter-spacing: .3px; }
.strip-name.bold { color: var(--text); font-weight: 800; }
.strip-cell { height: 22px; border-radius: 1px; cursor: pointer; }
.strip-cell.d0 { box-shadow: inset 2px 0 0 var(--bg); }
.strip-cell.now { box-shadow: inset 0 0 0 1.5px var(--accent); }
.strip-cell.rs { background-image: repeating-linear-gradient(135deg, transparent 0 3px, rgba(0,0,0,.35) 3px 5px) !important; }
.strip-cell.sel { outline: 2px solid var(--text); outline-offset: -1px; position: relative; z-index: 1; }
.strip-lab { font-family: var(--font-mono); font-size: 10.5px; color: var(--muted); white-space: nowrap; height: 14px; overflow: visible; }
.strip-lab.day { color: var(--text); font-weight: 700; }
.strip-lab.now { color: var(--accent); font-weight: 800; }

/* hour detail panel under a strip */
.detail { margin-top: 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--raised); padding: 12px; display: grid; gap: 10px; }
.detail-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.detail-head .when { font-family: var(--font-display); font-size: 15px; letter-spacing: .3px; }
.detail .tiles { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }
.detail .tile { background: var(--panel); }
.detail .tile .v { font-size: 18px; }

/* hub cards */
.hub { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 640px) { .hub { grid-template-columns: minmax(0, 1fr); } }
.hubcard {
  display: grid; gap: 10px; text-decoration: none; color: var(--text);
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 18px;
  border-top: 3px solid var(--accent);
}
.hubcard:hover { border-color: var(--accent); }
.hubcard h2 { font-family: var(--font-display); font-weight: 400; font-size: 20px; margin: 0; letter-spacing: .3px; }
.hubcard p { margin: 0; color: var(--muted); font-size: 13px; }
.hubcard .go { font-size: 11px; font-weight: 800; letter-spacing: .6px; color: var(--accent); }

.foot { color: var(--faint); font-size: 11.5px; text-align: center; padding: 8px 16px 28px; }
.foot a { color: var(--muted); }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* hodograph (severe page) — conventional layer colors */
:root { --h01: #E879F9; --h13: #4ADE80; --h36: #FBBF24; --h69: #22D3EE; }
:root[data-theme="light"] { --h01: #A21CAF; --h13: #15803D; --h36: #B45309; --h69: #0E7490; }
.hodo-wrap { display: grid; grid-template-columns: minmax(0, 420px) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 760px) { .hodo-wrap { grid-template-columns: minmax(0, 1fr); } }
.hodo { width: 100%; max-width: 420px; aspect-ratio: 1; background: var(--raised); border: 1px solid var(--line); border-radius: 9px; }
.hodo svg { width: 100%; height: 100%; display: block; }
.hodo-tiles { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }
.hodo-tiles .tile .v { font-size: 20px; }
.flag { display: inline-block; font-size: 9.5px; font-weight: 800; letter-spacing: .5px; padding: 2px 6px; border-radius: 5px; margin-left: 4px; color: var(--accent); border: 1px solid color-mix(in srgb, var(--accent) 55%, transparent); }

/* folded sections (models, methods) */
details.fold > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary::after { content: "▸"; color: var(--muted); font-size: 12px; }
details.fold[open] > summary::after { content: "▾"; }
details.fold-inline > summary { cursor: pointer; font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; }

/* NWS alerts bar */
.alerts { background: var(--panel); border-bottom: 1px solid var(--line); padding: 6px 16px; }
.alerts-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; color: var(--monitor); }
.alert-pill {
  display: inline-flex; gap: 6px; align-items: baseline; cursor: pointer;
  font-size: 12px; font-weight: 800; color: var(--text); background: color-mix(in srgb, var(--a) 16%, transparent);
  border: 1px solid var(--a); border-left-width: 4px; border-radius: 6px; padding: 4px 9px;
}
.alert-detail { margin-top: 8px; font-size: 12.5px; color: var(--text); max-width: 110ch; }
.alert-detail p { margin: 6px 0; white-space: pre-line; }

/* since-last-check */
.changes { display: flex; flex-wrap: wrap; gap: 6px; }
.change { font-size: 12px; font-family: var(--font-mono); padding: 4px 8px; border-radius: 6px; background: var(--raised); border: 1px solid var(--line); }
.change.up::first-letter { color: var(--warm); }
.change.down::first-letter { color: var(--cold); }

/* agreement meter (data quality, deliberately not a hazard color) */
.meter { display: inline-flex; gap: 3px; vertical-align: middle; margin-right: 6px; }
.meter i { width: 7px; height: 7px; border-radius: 2px; background: var(--line); }
.meter i.on { background: var(--accent); }

/* summary days on the overview */
.daycards { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; }
.daycard { background: var(--raised); border: 1px solid var(--line); border-radius: 9px; padding: 12px; display: grid; gap: 6px; }
.daycard .d { font-family: var(--font-display); font-size: 14px; letter-spacing: .3px; }
.daycard .t { font-family: var(--font-mono); font-size: 22px; font-weight: 800; }
.daycard .r { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--muted); }
.daycard .r b { color: var(--text); font-family: var(--font-mono); font-weight: 700; }

/* print / save as PDF: a clean briefing sheet */
@media print {
  :root, :root[data-theme] { --bg: #fff; --panel: #fff; --raised: #f4f6f8; --line: #ccd3db; --text: #111; --muted: #444; --faint: #666; --accent: #0369A1; --band: rgba(3,105,161,.12); }
  body { background: #fff; color: #111; }
  .navbar, .side, .side-extra, .noprint, .tabs, .alert-detail, details.fold { display: none !important; }
  .workspace { display: block; padding: 0; }
  .card, .detail { break-inside: avoid; border-color: #ccd3db; }
  .statusbar { border-bottom: 2px solid #111; }
  .chartbox { height: 300px; }
}

table.clickable tbody tr { cursor: pointer; }
table.clickable tbody tr:hover td { background: var(--raised); }
table.clickable tbody tr.sel td { background: var(--accent-dim); }
:root[data-theme="light"] table.clickable tbody tr.sel td { background: var(--accent-dim); }
.flag.dim { opacity: .6; border-style: dashed; }

.ltd { display: inline-block; font-size: 9.5px; font-weight: 800; letter-spacing: .5px; padding: 2px 5px; border-radius: 4px; color: var(--muted);
  border: 1px dashed var(--muted); background: repeating-linear-gradient(45deg, color-mix(in srgb, var(--muted) 25%, transparent) 0 2px, transparent 2px 5px); vertical-align: middle; }
.change-notes { margin: 10px 0 0; padding-left: 18px; font-size: 12px; color: var(--muted); }

/* events */
:root { --ev: #FDE68A; }
:root[data-theme="light"] { --ev: #A16207; }
.strip-ev { height: 14px; font-family: var(--font-mono); font-size: 9.5px; font-weight: 800; color: var(--bg); white-space: nowrap; overflow: visible; }
.strip-ev.on { background: color-mix(in srgb, var(--ev) 70%, transparent); }
.cov { display: inline-block; font-size: 9.5px; font-weight: 800; letter-spacing: .5px; padding: 2px 6px; border-radius: 4px; border: 1px solid; white-space: nowrap; }
.cov.full { color: var(--normal); border-color: color-mix(in srgb, var(--normal) 55%, transparent); }
.cov.part { color: var(--monitor); border-color: color-mix(in srgb, var(--monitor) 55%, transparent); }
.cov.none, .cov.past { color: var(--muted); border-color: var(--line); }
table.evtable tr.evall td { border-top: 2px solid var(--line); font-weight: 700; }
#eventCard { border-top: 3px solid var(--ev); }
.affected .change { opacity: .7; border-style: dashed; }

/* NWS: always visibly a separate source */
.src-nws { display: inline-block; font-size: 9.5px; font-weight: 800; letter-spacing: .5px; padding: 1px 5px; border-radius: 4px; color: var(--bg); background: var(--ev); vertical-align: middle; }
th.nwscol, td.nwscol { background: color-mix(in srgb, var(--ev) 7%, transparent); }
td.diff { color: var(--monitor); font-weight: 800; }
.change.diffchip { border-color: color-mix(in srgb, var(--ev) 55%, transparent); }

.pt { display: inline-block; font-size: 9.5px; font-weight: 800; letter-spacing: .5px; padding: 2px 6px; border-radius: 4px; color: #0A0D12; background: var(--c); }

.chk { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; padding: 4px 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--raised); cursor: pointer; }
.repsens { display: inline-block; font-size: 9.5px; font-weight: 800; letter-spacing: .4px; padding: 2px 5px; border-radius: 4px; color: var(--monitor); border: 1px dashed var(--monitor); }

/* ---------- Daily blend table: fits its column; secondary columns move into row details when narrow ---------- */
.dailywrap { container-type: inline-size; position: relative; }
.card:has(> .dailywrap) { position: relative; }
table.daily th, table.daily td { padding: 6px 6px; }
table.daily th { white-space: normal; vertical-align: bottom; line-height: 1.25; }
table.daily td.day { white-space: nowrap; font-size: 12px; }
table.daily .thd { all: unset; cursor: help; display: inline-block; border-bottom: 1px dotted var(--faint); font: inherit; color: inherit; letter-spacing: inherit; text-transform: inherit; }
table.daily .thd:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 3px; }
.thpop { position: absolute; z-index: 20; max-width: 280px; background: var(--raised); color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font-size: 12px; line-height: 1.4; box-shadow: 0 6px 18px rgba(0,0,0,.25); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
table.daily .detbtn { all: unset; cursor: pointer; display: none; width: 1.3em; color: var(--muted); }
table.daily .detbtn:focus-visible { outline: 2px solid var(--accent); }
table.daily tr.detrow td { white-space: normal; text-align: left; background: var(--raised); }
.detlist { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0; font-size: 12.5px; }
.detlist div { display: none; } .detlist dt { color: var(--muted); font-size: 11px; font-weight: 700; } .detlist dd { margin: 0; font-family: var(--font-mono); }
@container (max-width: 879px) {
  table.daily .t2 { display: none; } table.daily .detbtn { display: inline-block; } .detlist .t2d { display: block; }
}
@container (max-width: 599px) {
  table.daily .t3 { display: none; } .detlist .t3d { display: block; }
  table.daily th, table.daily td { padding: 6px 4px; }
}
body.wide-main .workspace { grid-template-columns: minmax(0, 1fr); grid-template-areas: "main" "side" "extra"; }
details.fold.explain summary { cursor: pointer; }
@media print { .detbtn, #wideBtn, .thpop { display: none !important; } table.daily .t2, table.daily .t3 { display: table-cell !important; } table.daily tr.detrow { display: none !important; } }

/* ---------- Daily Almanac ---------- */
.almgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); gap: 16px; }
.locline { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 8px; font-size: 12px; color: var(--muted); }
.locline b { color: var(--text); font-weight: 700; }
.kv { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; align-items: baseline; font-size: 13px; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; text-align: right; font-family: var(--font-mono); }
.kv dd small, .kv dt small { display: block; color: var(--faint); font-family: var(--font-body, inherit); font-size: 11px; }
.big2 { display: flex; gap: 18px; flex-wrap: wrap; margin-bottom: 8px; }
.big2 div { display: grid; } .big2 .k { font-size: 10.5px; font-weight: 800; letter-spacing: .6px; color: var(--muted); text-transform: uppercase; }
.big2 .v { font-family: var(--font-mono); font-size: 22px; font-weight: 800; }
.src { font-size: 11px; color: var(--faint); margin-top: 8px; }
.unavail { color: var(--faint); font-style: italic; }
textarea.notes { width: 100%; resize: vertical; font: 13px/1.45 var(--font-body, inherit); }
.printnotes { display: none; white-space: pre-wrap; font-size: 13px; }
.fcrow { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 4px 10px; font-size: 13px; padding: 4px 0; border-bottom: 1px solid var(--line); }
.fcrow b { font-size: 12px; }
@media print {
  .almanac .main { display: block; }
  .almgrid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .almanac .card { break-inside: avoid; border: 1px solid #999; padding: 8px; margin-bottom: 8px; }
  .almanac details.fold { display: block !important; } .almanac details.fold > *:not(summary) { display: block; }
  .printnotes { display: block; } .noprint { display: none !important; }
}
.thr { width: 3.4em; padding: 1px 4px; display: inline-block; font-size: 12px; }
@media (max-width: 600px) {
  .kv { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .kv dt { margin-top: 7px; } .kv dd { text-align: left; }
  .big2 .v { font-size: 19px; }
}

/* ---------- Almanac: weather numbers cards ---------- */
.wngrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin-top: 10px; }
.wncard { background: var(--raised); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; display: grid; gap: 5px; align-content: start; }
.wncard.strong { border-color: var(--accent); }
.wnhead { display: flex; justify-content: space-between; gap: 8px; font-size: 11px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; color: var(--muted); }
.wnkind { color: var(--text); }
.wnbadge { justify-self: start; font-size: 13px; font-weight: 800; padding: 3px 8px; border-radius: 6px; border: 1px solid currentColor; }
.wnbadge.warm, .wndep.warm { color: var(--warm, #F97316); } .wnbadge.cold, .wndep.cold { color: var(--cold, #60A5FA); }
.wnbadge.wet, .wndep.wet { color: #2DD4BF; } .wnbadge.dry, .wndep.dry { color: #EAB308; }
.wnbig { font-family: var(--font-mono); font-size: 28px; font-weight: 800; line-height: 1.1; }
.wnbig small { display: inline; font-family: inherit; font-size: 12px; font-weight: 600; color: var(--muted); margin-left: 6px; }
.wndep { font-size: 14px; font-weight: 700; }
.wnsup, .wnrank { font-size: 12.5px; color: var(--muted); }
.wninfo { all: unset; cursor: pointer; justify-self: start; font-size: 12px; color: var(--muted); border-bottom: 1px dotted var(--faint); }
.wninfo:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.wndet { border-top: 1px solid var(--line); padding-top: 6px; }
.infopanel { margin-top: 8px; font-size: 12.5px; color: var(--muted); background: var(--raised); border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; display: grid; gap: 6px; }
.oprow { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; margin-top: 12px; }
.optile { border: 1px solid var(--line); border-radius: 9px; padding: 8px 12px; display: grid; gap: 2px; }
.optile .k { font-size: 11px; font-weight: 800; letter-spacing: .5px; color: var(--muted); text-transform: uppercase; }
.optile .v { font-family: var(--font-mono); font-size: 18px; font-weight: 800; }
.optile .s { font-size: 11.5px; color: var(--muted); }
@media print { .wninfo, #wnHow { display: none !important; } .wncard { break-inside: avoid; border: 1px solid #999; } .wngrid { grid-template-columns: 1fr 1fr; } }
:root[data-theme="light"] .wnbadge.dry, :root[data-theme="light"] .wndep.dry { color: #A16207; }
:root[data-theme="light"] .wnbadge.wet, :root[data-theme="light"] .wndep.wet { color: #0F766E; }

#factCard { grid-column: 1 / -1; }
.wngrid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
@media (min-width: 1100px) { .wngrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.wnrank.notable { color: var(--text); font-weight: 700; }
#wnHow { flex: 0 0 auto; width: auto; }
@media print {
  .wnbadge.warm, .wndep.warm { color: #B91C1C !important; } .wnbadge.cold, .wndep.cold { color: #1D4ED8 !important; }
  .wnbadge.wet, .wndep.wet { color: #0F766E !important; } .wnbadge.dry, .wndep.dry { color: #A16207 !important; }
}

/* =====================================================================
   Design system v2 — reference: the Almanac "Weather numbers" cards.
   Calm structure, large readable values, small uppercase kickers only for
   labels, sentence-case headings, strong color reserved for real conditions.
   ===================================================================== */
:root { --r-card: 12px; --r-inner: 10px; --pad-card: 18px; }
:root[data-theme="light"] { --line: #C9D0D8; --muted: #3F4856; --faint: #515B69; }
.card { border-radius: var(--r-card); padding: var(--pad-card); }
.card.tight { padding: 14px 16px; }
.section-title { font-family: var(--font-body); font-size: 15.5px; font-weight: 700; letter-spacing: .1px; text-transform: none; color: var(--text); margin: 0 0 10px; }
.section-sub { font-size: 13px; line-height: 1.5; }
.kick { font-size: 11px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; color: var(--muted); }
.group-title { font-size: 12px; font-weight: 800; letter-spacing: .8px; text-transform: uppercase; color: var(--muted); margin: 8px 2px -4px; display: flex; align-items: center; gap: 10px; }
.group-title::after { content: ""; flex: 1; height: 1px; background: var(--line); }
/* metric tiles share the summary-card look */
.tile { border-radius: var(--r-inner); padding: 12px 14px; gap: 4px; }
.tile .v { font-size: 26px; }
.tile .s { font-size: 12px; }
/* tables: headings wrap instead of clipping; compact, aligned cells */
th, td { padding: 7px 8px; }
th { white-space: normal; vertical-align: bottom; line-height: 1.25; }
td.num { font-size: 13px; }
/* form fields never overflow their row */
.input { max-width: 100%; }
.row .input { width: 100%; }
/* one look for loading / unavailable / partial / error */
.state { display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border-radius: var(--r-inner); border: 1px dashed var(--line); color: var(--muted); font-size: 13px; line-height: 1.45; }
.state::before { content: "•"; font-weight: 800; }
.state.loading::before { content: "…"; } .state.unavail::before { content: "—"; }
.state.partial { border-color: color-mix(in srgb, var(--monitor) 55%, var(--line)); } .state.partial::before { content: "!"; color: var(--monitor); }
.state.err { border-style: solid; border-color: color-mix(in srgb, var(--action) 55%, var(--line)); color: var(--text); } .state.err::before { content: "×"; color: var(--action); }
/* disclosure buttons (tap and keyboard; never hover-only) */
.infobtn { all: unset; cursor: pointer; font-size: 12px; font-weight: 700; color: var(--muted); border: 1px solid var(--line); border-radius: 7px; padding: 4px 9px; white-space: nowrap; }
.infobtn:hover { color: var(--text); } .infobtn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.infobtn[aria-expanded="true"] { color: var(--text); border-color: var(--accent); }
details.fold > summary .section-title { margin: 0; }
/* page subtitle in the header */
.page-sub { font-size: 12px; color: var(--muted); max-width: 46ch; }
/* selected-hour headers */
.selhead { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.selhead .kick { color: var(--accent); }
.selhead .when { font-family: var(--font-mono); font-size: 18px; font-weight: 800; }
@media (max-width: 600px) { .card { padding: 14px; } .tile .v { font-size: 22px; } }
@media print { .infobtn { display: none !important; } .state { border: 1px solid #999; } }

/* ---------- Almanac layout v2 ---------- */
.workspace.single { grid-template-columns: minmax(0, 1fr); grid-template-areas: "main"; max-width: 1180px; }
.almanac-page .site-id, .almanac-page .statusbar > .vsep { display: none; }
.almhead { display: grid; gap: 10px; }
.almhead-top { display: flex; justify-content: space-between; align-items: end; gap: 12px; flex-wrap: wrap; }
.almtitle { font-size: 24px; font-weight: 800; margin: 2px 0 0; letter-spacing: .1px; }
.datenav { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.datenav .input { width: auto; }
.almlocs { display: flex; flex-wrap: wrap; gap: 8px 22px; align-items: center; font-size: 13.5px; }
.almlocs .kick { margin-right: 4px; }
select.input.inline { width: auto; display: inline-block; padding: 3px 8px; font-size: 12.5px; margin-left: 6px; }
.almtop { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.45fr); gap: 16px; align-items: start; }
.almcol { display: grid; gap: 16px; align-content: start; }
@media (max-width: 900px) { .almtop { grid-template-columns: minmax(0, 1fr); } }
/* sun and moon */
.sunrow { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mtile { background: var(--raised); border: 1px solid var(--line); border-radius: var(--r-inner); padding: 10px 12px; display: grid; gap: 2px; align-content: start; }
.mtile .k { font-size: 11px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; color: var(--muted); }
.mtile .v { font-family: var(--font-mono); font-size: 22px; font-weight: 800; line-height: 1.15; }
.mtile .s { font-size: 12px; color: var(--muted); }
.mtile .v.big { font-size: 28px; }
.dayrow { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; margin: 12px 2px 4px; }
.dayrow .v { font-family: var(--font-mono); font-size: 26px; font-weight: 800; }
.chg { font-family: var(--font-mono); font-size: 14px; font-weight: 800; padding: 2px 8px; border-radius: 6px; border: 1px solid var(--line); }
.moonrow { display: flex; gap: 12px; align-items: center; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.moonrow svg { flex: none; }
.moonrow .ph { font-weight: 700; } .moonrow .s { font-size: 12.5px; color: var(--muted); }
.cardfoot { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
/* daily climate groups */
.cgroup + .cgroup { margin-top: 14px; }
.cgroup > .kick { display: block; margin-bottom: 6px; }
.cgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; }
.mtile .yr { font-family: var(--font-body); font-size: 12px; font-weight: 600; color: var(--muted); }
@media print { .almtop { grid-template-columns: 1fr 1.4fr; } .mtile { border: 1px solid #aaa; } .almanac-page .statusbar { display: none; } }

.printonly { display: none; }
@media print { .printonly { display: inline; } }
.hubcard { border-top: 1px solid var(--line) !important; border-radius: var(--r-card); }
.hubcard:hover { border-color: var(--accent) !important; }
.hubcard h2 { font-family: var(--font-body); font-weight: 700; font-size: 18px; letter-spacing: .1px; }
.hub { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.detail { border-radius: var(--r-inner); border-left: 3px solid var(--accent); }
.detail-head .when { font-family: var(--font-mono); font-size: 16px; font-weight: 800; letter-spacing: 0; }
.selk { color: var(--accent); }
/* the selected cell in timelines stands out more */
.strip-cell.sel { outline: 2px solid var(--text); outline-offset: -1px; box-shadow: 0 0 0 2px var(--accent); }
.selwhen { font-family: var(--font-mono); font-size: 14px; font-weight: 800; color: var(--text); text-transform: none; letter-spacing: 0; margin-left: 4px; }

/* Rows: checkboxes and buttons keep their natural width and wrap instead of being squeezed */
.row > .chk, .row > .btn, .row > button { flex: 0 0 auto; }

/* Source contributions by day */
.covtab td, .covtab th { white-space: nowrap; }
.covtab td.cmiss { background: color-mix(in srgb, var(--muted) 7%, transparent); }
.covtab td.cleft { box-shadow: inset 3px 0 0 var(--prepare); }
.covtab td.cjoin { box-shadow: inset 3px 0 0 var(--accent); }
.covtab .cl { font-size: 10.5px; font-weight: 700; color: var(--prepare); text-transform: uppercase; letter-spacing: .04em; }
.covtab tr.covsum td, .covtab tr.covsum th { border-top: 2px solid var(--line); }
.covtab td.covchg { white-space: normal; min-width: 96px; font-size: 12px; text-align: left; }
.cyc { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: 1px 5px; border-radius: 4px; border: 1px solid var(--line); }
.cyc.conf { color: var(--text); border-color: var(--accent); }
.cyc.rep { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media print { .covtab td.cleft { box-shadow: none; border-left: 2px solid #000; } }
.provtab td, .provtab th { white-space: nowrap; }
.provtab .msg { white-space: normal; }
.covtab td, .covtab th { vertical-align: top; }
.covtab th[scope="row"] { position: sticky; left: 0; z-index: 1; background: var(--panel); }
.covtab thead th:first-child { position: sticky; left: 0; z-index: 2; background: var(--panel); }
@media (max-width: 600px) { .covtab th[scope="row"] { max-width: 120px; white-space: normal; } }

/* Model maps */
.mapctl { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; margin-top: 10px; }
.mapctl .input.inline { width: auto; }
.validtxt { font-size: 12.5px; min-width: 220px; }
.mapwrap { position: relative; width: 100%; }
.mapwrap canvas { display: block; border-radius: var(--r-inner); outline-offset: 3px; cursor: crosshair; }
.mapnote { position: absolute; left: 10px; right: 10px; top: 10px; padding: 8px 10px; border-radius: 8px; background: color-mix(in srgb, var(--panel) 88%, transparent); border: 1px solid var(--line); font-size: 13px; }
.maplegend { margin-top: 10px; }
.maplegend .lgt { font-weight: 700; font-size: 13px; margin-bottom: 4px; }
.maplegend .lgs { display: flex; flex-wrap: wrap; gap: 2px 8px; }
.maplegend .lg { display: inline-flex; align-items: center; gap: 4px; font: 12px var(--font-mono); }
.maplegend .lg i { display: inline-block; width: 16px; height: 12px; border-radius: 2px; border: 1px solid color-mix(in srgb, var(--text) 25%, transparent); }
.inspect { margin-top: 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-inner); }
.inspect-v { font-size: 15px; }
@media print { .mapnote { position: static; } }
.maplegend .lgbar { height: 12px; border-radius: 3px; max-width: 520px; border: 1px solid color-mix(in srgb, var(--text) 25%, transparent); }
.maplegend .lgticks { position: relative; height: 16px; max-width: 520px; font: 11px var(--font-mono); }
.maplegend .lgticks span { position: absolute; transform: translateX(-50%); top: 2px; }
.maplegend .lgs > .lgbar, .maplegend .lgs > .lgticks { flex: 1 1 100%; width: 100%; }
.maplegend .lgs:has(.lgbar) { display: block; }
.maplegend .lgticks span:first-child { transform: none; }
.maplegend .lgticks span:last-child { transform: translateX(-100%); }

/* Model maps v2: interactive map stage */
.workspace.maps2 { max-width: 1500px; }
.mapstage { position: relative; height: min(78vh, 900px); min-height: 460px; border-radius: var(--r-card); overflow: hidden; border: 1px solid var(--line); background: var(--bg); }
.mapstage:fullscreen { height: 100vh; border-radius: 0; }
.mapgl { position: absolute; inset: 0; }
.maplabels { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.mapstage .maplibregl-ctrl-bottom-right { bottom: 50px; }
.mapstage .maplibregl-ctrl-attrib { background: color-mix(in srgb, var(--panel) 85%, transparent); color: var(--muted); font-size: 10.5px; }
.mapstage .maplibregl-ctrl-attrib a { color: var(--muted); }
.mapstage .maplibregl-ctrl-attrib.maplibregl-compact { background: color-mix(in srgb, var(--panel) 85%, transparent); }
.mapstage .maplibregl-ctrl-group { background: var(--panel); border: 1px solid var(--line); box-shadow: none; }
.mapstage .maplibregl-ctrl-group button + button { border-top: 1px solid var(--line); }
.mapstage .maplibregl-ctrl-group button .maplibregl-ctrl-icon { filter: var(--ctl-icon-filter, none); }
[data-theme="dark"] .mapstage, :root:not([data-theme="light"]) .mapstage { --ctl-icon-filter: invert(1); }
.mapinfo { position: absolute; left: 10px; top: 10px; max-width: min(460px, calc(100% - 20px)); padding: 8px 11px; border-radius: 10px; background: color-mix(in srgb, var(--panel) 90%, transparent); border: 1px solid var(--line); font-size: 12.5px; line-height: 1.4; backdrop-filter: blur(4px); }
.mapinfo b.fld { font-size: 14px; }
.mapinfo .st { margin-top: 3px; }
.mapctl2 { position: absolute; right: 10px; top: 10px; display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }
.mapctl2 .ctlrow { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; align-items: center; padding: 5px; border-radius: 10px; background: color-mix(in srgb, var(--panel) 90%, transparent); border: 1px solid var(--line); }
.mapctl2 select.input.inline { width: auto; max-width: 220px; padding: 4px 8px; font-size: 12.5px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.segb { font: 600 12px var(--font-body); padding: 5px 9px; background: transparent; color: var(--text); border: 0; cursor: pointer; }
.segb + .segb { border-left: 1px solid var(--line); }
.segb[aria-pressed="true"] { background: var(--accent-dim); }
.segb:disabled { opacity: .45; cursor: not-allowed; }
.smoothchk { font-size: 12.5px; }
.maplegend2 { position: absolute; left: 10px; bottom: 64px; padding: 7px 10px; border-radius: 10px; background: color-mix(in srgb, var(--panel) 90%, transparent); border: 1px solid var(--line); max-width: min(560px, calc(100% - 20px)); }
.maplegend2 .lgt { font-weight: 700; font-size: 12px; margin-bottom: 3px; }
.maplegend2 .lgs { display: flex; flex-wrap: wrap; gap: 2px 7px; }
.maplegend2 .lg { display: inline-flex; align-items: center; gap: 3px; font: 11px var(--font-mono); }
.maplegend2 .lg i { display: inline-block; width: 14px; height: 10px; border-radius: 2px; }
.maplegend2 .lgbar { height: 10px; border-radius: 3px; width: min(420px, 70vw); }
.maplegend2 .lgticks { position: relative; height: 14px; width: min(420px, 70vw); font: 10.5px var(--font-mono); }
.maplegend2 .lgticks span { position: absolute; transform: translateX(-50%); }
.maplegend2 .lgticks span:first-child { transform: none; } .maplegend2 .lgticks span:last-child { transform: translateX(-100%); }
.timeline { position: absolute; left: 0; right: 0; bottom: 0; display: flex; gap: 10px; align-items: center; padding: 8px 12px; background: color-mix(in srgb, var(--panel) 94%, transparent); border-top: 1px solid var(--line); }
.tlwrap { position: relative; flex: 1 1 auto; }
.tlwrap input[type=range] { width: 100%; }
.tlticks { position: absolute; left: 8px; right: 8px; top: -3px; height: 6px; pointer-events: none; }
.tlticks i { position: absolute; width: 1px; height: 6px; background: var(--muted); opacity: .5; }
.tlticks i.day { height: 9px; opacity: .9; }
.tlticks i.miss { background: var(--prepare); width: 3px; height: 9px; opacity: 1; }
.tlvalid { font-size: 12px; white-space: nowrap; min-width: 170px; text-align: right; }
.mapnote2 { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); max-width: 80%; padding: 10px 14px; border-radius: 10px; background: color-mix(in srgb, var(--panel) 94%, transparent); border: 1px solid var(--line); font-size: 13px; text-align: center; }
@media (max-width: 700px) {
  .mapstage { height: 76vh; min-height: 480px; }
  .wide-only { display: none; }
  .mapctl2 { left: 6px; right: 6px; top: 6px; gap: 4px; align-items: stretch; }
  .mapctl2 .ctlrow { flex-wrap: nowrap; justify-content: flex-start; padding: 4px; gap: 4px; }
  .mapctl2 .ctlrow:last-child { flex-wrap: wrap; }
  .mapctl2 .ctlrow:last-child .seg { flex: 1 0 100%; min-width: 0; }
  .mapctl2 .ctlrow:last-child .segb { min-width: 0; white-space: normal; overflow-wrap: anywhere; }
  .mapctl2 select.input.inline { flex: 1 1 0; min-width: 0; max-width: none; font-size: 12px; padding: 4px 6px; }
  .mapctl2 select#winSel { flex: 0 0 auto; }
  .seg { flex: 1 1 auto; } .segb { flex: 1 1 auto; padding: 5px 4px; font-size: 11.5px; }
  .smoothchk { font-size: 11.5px; white-space: nowrap; }
  #fsBtn { display: none; }
  .segb { white-space: nowrap; }
  .mapinfo .phone-hide { display: none; }
  .mapinfo { top: 84px; left: 6px; right: 6px; max-width: none; padding: 5px 8px; font-size: 11px; line-height: 1.35; }
  .mapinfo b.fld { font-size: 12.5px; }
  .maplegend2 { left: 6px; right: 6px; bottom: 66px; padding: 4px 8px; max-width: none; }
  .maplegend2 .lgbar, .maplegend2 .lgticks { width: 100%; }
  .maplegend2 .lgt { font-size: 11px; margin-bottom: 2px; }
  .maplegend2 .lg { font-size: 10px; } .maplegend2 .lg i { width: 10px; height: 8px; }
  .timeline { flex-wrap: wrap; row-gap: 2px; padding: 6px 8px; }
  .tlwrap { flex: 1 1 0; min-width: 0; }
  .tlvalid { order: 3; flex: 1 1 100%; min-width: 0; text-align: center; font-size: 11px; }
  .mapstage .maplibregl-ctrl-bottom-right { bottom: 118px; }
  .mapstage .maplibregl-ctrl-group { display: none; }
}
@media print { .mapstage { height: 640px; } }


/* Presentation polish: quiet surfaces, legible hierarchy and compact mobile chrome. */
:root:not([data-theme="light"]) { --muted:#A0ABBC; --faint:#8895A8; --line:#293341; }
.btn.ghost { text-decoration:none; }
.btn,.tab,.navbar a,.hubcard { transition:border-color .15s ease; }
.btn.ghost:hover,.tab:not([aria-selected="true"]):hover { background:var(--raised); border-color:var(--faint); }
.btn:not(.ghost):not(:disabled):hover { background:color-mix(in srgb,var(--accent) 85%,var(--text)); }
.input:hover { border-color:var(--faint); }
.input:focus { border-color:var(--accent); }
.tab { min-height:32px; }
.navbar { gap:6px; padding:7px 16px; }
.navbar a { letter-spacing:.035em; }
.navbar a[aria-current="page"] { box-shadow:inset 0 -2px 0 var(--accent); }
.statusbar { padding:12px 20px; }
body:not(.almanac-page) .statusbar:has(.site-id) { display:grid; grid-template-columns:minmax(160px,200px) minmax(0,1fr) auto; gap:18px; align-items:center; }
.statusbar:has(.site-id)>.vsep { display:none; }
.statusbar:has(.site-id) .headline { display:grid; grid-template-columns:minmax(130px,1.3fr) repeat(3,minmax(90px,1fr)); gap:16px; padding:0 0 0 18px; border-left:1px solid var(--line); border-radius:0; }
.statusbar:has(.site-id) .headline>.vsep { display:none; }
.statusbar:has(.site-id) .headline.tier { border-left:3px solid var(--tier); padding:8px 12px; border-radius:6px; }
.statusbar:has(.site-id) .hl-stat { display:grid; gap:4px; min-width:0; }
.statusbar:has(.site-id) .hl-num { font-size:25px; }
.statusbar:has(.site-id) .hl-word { font-size:19px; white-space:normal; }
.statusbar:has(.site-id) .hl-unit { font-size:10.5px; white-space:normal; line-height:1.35; }
.hl-note { font-size:9px; line-height:1.4; }
.utility { gap:7px; }
.utility .chip { font-size:9px; padding:6px 8px; }
:root[data-theme="light"] .chip.live { color:#15803D; }
:root[data-theme="light"] .chip.warn { color:#854D0E; }
:root[data-theme="light"] .badge { color:color-mix(in srgb,var(--b,var(--nodata)) 65%,#111); }
.alerts { padding:8px 20px; }
.card { box-shadow:0 1px 2px rgb(0 0 0 / .04); }
.section-title { font-size:16px; letter-spacing:-.015em; }
.hubcard { padding:20px; gap:9px; align-content:start; }
.hubcard .go { margin-top:6px; }
.hubcard p { line-height:1.6; }
.hubcard h2 { font-size:20px; letter-spacing:-.025em; }
.hubcard .kicker { font-size:10px; letter-spacing:.1em; }
.overview-brief { display:flex; justify-content:flex-end; }
.overview-brief .btn { width:auto; }
.foot { max-width:1440px; margin:0 auto; padding:22px 20px 30px; text-align:left; line-height:1.6; }
.foot-top { display:flex; align-items:baseline; justify-content:space-between; flex-wrap:wrap; gap:10px; padding-top:18px; border-top:1px solid var(--line); }
.foot-brand { color:var(--text); font-weight:700; letter-spacing:.05em; }
.foot-links { display:flex; flex-wrap:wrap; gap:8px 20px; }
.foot-links a { text-decoration:none; color:var(--muted); }
.foot-links a:hover { color:var(--accent); text-decoration:underline; }
.foot p { margin:6px 0 0; max-width:110ch; }
.foot-attribution { color:var(--muted); }
.foot-disclaimer { font-size:11px; }
@media (max-width:1100px) {
 body:not(.almanac-page) .statusbar:has(.site-id) { grid-template-columns:minmax(0,1fr) auto; gap:12px; }
 .statusbar:has(.site-id) .headline { grid-column:1/-1; grid-row:2; grid-template-columns:minmax(130px,1.3fr) repeat(3,minmax(0,1fr)); border-left:0; border-top:1px solid var(--line); padding:12px 0 0; }
 .statusbar:has(.site-id) .utility { grid-column:2; grid-row:1; }
}
@media (max-width:600px) {
 .statusbar { padding:12px 16px; }
 body:not(.almanac-page) .statusbar:has(.site-id) { gap:10px; }
 .site-name { max-width:160px; font-size:14px; }
 .site-sub { max-width:160px; font-size:10.5px; }
 .statusbar:has(.site-id) .utility { gap:4px; flex-wrap:wrap; justify-content:flex-end; max-width:148px; }
 .utility #dataChip { flex-basis:100%; justify-content:center; font-size:8px; padding:4px 6px; }
 .utility .chip { padding:5px 7px; }
 .statusbar:has(.site-id) .headline { grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px 10px; padding-top:10px; }
 .statusbar:has(.site-id) .hl-label { grid-column:1/-1; }
 .statusbar:has(.site-id) .hl-label>div { display:flex; align-items:baseline; flex-wrap:wrap; gap:4px 12px; }
 .statusbar:has(.site-id) .hl-word { font-size:18px; }
 .statusbar:has(.site-id) .hl-num { font-size:20px; }
 .statusbar:has(.site-id) .hl-unit { font-size:10px; }
 .navbar { padding:6px 12px; gap:4px; scrollbar-width:thin; }
 .navbar a { padding:8px 10px; font-size:11px; }
 .alerts { padding:7px 16px; }
 .alert-pill { white-space:normal; text-align:left; }
 .overview-brief { justify-content:flex-start; }
 .foot { padding:14px 16px 24px; }
 .foot-top { gap:8px; }
}
@media print {
 .statusbar { display:flex!important; padding:0 0 8px!important; }
 .statusbar .headline { display:flex!important; border:0!important; }
 .card { box-shadow:none; }
 .foot-top { border-color:#bbb; }
 .foot-links { display:none; }
}

/* embed=1: a page shown inside another page (the map inside the beta briefings) */
body.embed .workspace { padding: 0; margin: 0; max-width: none; display: block; }
body.embed .main { padding: 0; gap: 0; }
body.embed .main > .card { display: none; }
body.embed .mapstage { height: 100vh; min-height: 0; border-radius: 0; border: 0; }
/* embedded map: the host page provides the toolbar, valid time and playback */
body.embed #mapCtl, body.embed #timeline, body.embed #mapInfo { display: none !important; }
body.embed .maplegend2 { bottom: 10px; left: 10px; padding: 5px 8px; }
body.embed .mapstage .maplibregl-ctrl-bottom-right { bottom: 4px; }

/* Meteorologist beta tool menu (Overview style) */
.betaplace-row { display: flex; gap: 16px 28px; flex-wrap: wrap; align-items: flex-start; }
.betaplace-pick { flex: 1 1 340px; min-width: 0; }
.betaplace-pick #picker { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 4px; }
.betaplace-pick .bx-pp { flex: 1 1 260px; }
.betaplace-pick .bx-ppin { font-size: 16px; padding: 8px 10px; }
.betaplace-clim { flex: 1 1 280px; display: grid; gap: 2px; }
.betaplace-clim b { font-size: 15px; }
.hub-lead { grid-template-columns: 1fr !important; }
.hubcard.lead { padding: 22px 24px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px 28px; align-items: end; border-color: var(--accent) !important; }
.hubcard.lead .lead-main { color: inherit; text-decoration: none; display: grid; gap: 6px; }
.hubcard.lead h2 { font-size: 26px !important; }
.hubcard.lead p { font-size: 15px; color: var(--text); }
.hubcard.lead .lead-links { display: grid; gap: 6px; justify-items: start; }
.hubcard.lead .lead-links a { font-weight: 700; font-size: 13px; letter-spacing: .3px; color: var(--accent); text-decoration: none; padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; }
.hubcard.lead .lead-links a:hover { border-color: var(--accent); }
.hubcard.dev { border-style: dashed !important; }
.devtag { font: 700 10px var(--font-body); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); border: 1px dashed var(--faint); border-radius: 5px; padding: 1px 6px; vertical-align: middle; margin-left: 6px; }
.betamenu-foot { margin-top: 4px; }
@media (max-width: 640px) { .hubcard.lead { grid-template-columns: 1fr; } .hubcard.lead .lead-links { grid-auto-flow: column; justify-content: start; } }
/* the Almanac's climate station line */
.climstn { display: inline-flex; flex-wrap: wrap; gap: 4px 8px; align-items: baseline; }
