/* Base look: dark Monitor tokens + a light palette.
   Theme: html[data-theme="light"|"dark"], set by lib/theme.js (Options: Light / Dark / Match system). */
@font-face { font-family: "Inter"; font-weight: 400; src: url("fonts/inter-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 600; src: url("fonts/inter-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 700 800; src: url("fonts/inter-latin-700-normal.woff2") format("woff2"); }
:root {
  color-scheme: dark;
  --bg: #08111A; --panel-solid: #0E1C2A; --panel: rgba(14, 28, 42, 0.92);
  --text: #E8F3F2; --muted: #C5D4DA; --teal: #8EE7DE;
  --button-text: #062028; --button-bg: #7EE0D6;
  --danger-text: #FFF6F6; --danger-bg: #6E1224; --line: #A9C0C8; --amber: #F2A600;
  --band-critical: #E5484D; --band-elevated: #F2A600; --band-low: #3CCB7F;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;
  --amber-text: #F2A600; --on-teal: #062B27; --crit-text: #FFB4A8; --shadow: rgba(0,0,0,.45);
  --c-pulsepoint: var(--teal); --c-chp: #F5C451; --c-irwin: #FF7A45; --c-quake: #B48CFF; --c-nws: #6CB6FF;
  --c-caltrans: #FFB020; --c-calfire: #FF5A5A; --c-tsunami: #3DD6F5;
}
/* Light: every text colour below is >= 4.5:1 (WCAG AA) on --panel-solid and --bg (checked in tests/unit.test.mjs). */
html[data-theme="light"] {
  color-scheme: light;
  --bg: #EEF2F5; --panel-solid: #FFFFFF; --panel: rgba(255, 255, 255, 0.97);
  --text: #0E1C2A; --muted: #44535E; --teal: #0A6A62;
  --button-text: #FFFFFF; --button-bg: #0A6A62;
  --danger-text: #FFFFFF; --danger-bg: #A3162E; --line: #5E6E78; --amber: #F2A600;
  --band-critical: #D92D33; --band-elevated: #F2A600; --band-low: #1F9D5A;
  --amber-text: #8A5000; --on-teal: #FFFFFF; --crit-text: #A3261E; --shadow: rgba(16,32,48,.18);
  --c-chp: #7D5A00; --c-irwin: #B23C00; --c-quake: #6B3FC6; --c-nws: #0B5BAA;
  --c-caltrans: #8C5200; --c-calfire: #B3261E; --c-tsunami: #00687C;
}
* { box-sizing: border-box; }
/* Text size (0.5.0): html[data-text-size="small"|"medium"|"large"], set by lib/textsize.js. Medium is the default.
   --fs scales body text; --fs-title scales incident titles and the window header a bit more. Small = the 0.4.9 size. */
:root { --fs: 1.15; --fs-title: 1.25; }
html[data-text-size="small"] { --fs: 1; --fs-title: 1; }
html[data-text-size="large"] { --fs: 1.36; --fs-title: 1.5; }
.ts-seg { display: inline-flex; gap: 0; border: 1.5px solid var(--line); border-radius: 8px; overflow: hidden; flex: none; }
.ts-seg button { font: inherit; font-size: calc(12.5px * var(--fs)); font-weight: 650; min-height: 28px; padding: 2px 10px; border: 0; border-left: 1px solid var(--line); background: transparent; color: var(--text); cursor: pointer; white-space: nowrap; }
.ts-seg button:first-child { border-left: 0; }
.ts-seg button[aria-checked="true"] { background: var(--teal); color: var(--on-teal); font-weight: 800; text-decoration: underline; text-underline-offset: 3px; }
.ts-seg button[aria-checked="true"]::before { content: "✓ "; }
.ts-seg button:focus-visible { outline: 2px solid var(--amber); outline-offset: -3px; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); -webkit-font-smoothing: antialiased; }
.src-badge {
  display: inline-flex; align-items: center; height: 18px; padding: 0 6px; border-radius: 6px; font-size: calc(0.66rem * var(--fs)); font-weight: 800;
  letter-spacing: 0.04em; color: var(--teal); border: 1px solid color-mix(in srgb, var(--teal) 50%, transparent); white-space: nowrap;
}
.count-pill { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 20px; padding: 0 7px; border-radius: 99px; font-size: calc(0.72rem * var(--fs)); font-weight: 700; background: var(--amber); color: #1A1200; }
.sev-pill { display: inline-flex; align-items: center; height: 18px; padding: 0 8px; border-radius: 99px; font-size: calc(0.64rem * var(--fs)); font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; color: #1A1200; background: var(--band-elevated); flex: none; }
.sev-pill.is-upgraded { background: var(--band-critical); color: #fff; }
.sev-pill.is-test { background: transparent; color: var(--teal); border: 1px solid color-mix(in srgb, var(--teal) 55%, transparent); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 32px; padding: 0 12px; border-radius: 10px;
  border: 1.5px solid transparent; font: inherit; font-weight: 650; font-size: calc(13px * var(--fs)); cursor: pointer; color: var(--button-text); background: var(--button-bg);
}
.btn:hover { filter: brightness(1.06); }
.btn:focus-visible, .x:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }
.btn-ghost { background: transparent; color: var(--text); border-color: color-mix(in srgb, var(--line) 70%, transparent); }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; }
.x { width: 26px; height: 26px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer; font-size: calc(13px * var(--fs)); flex: none; }
.x:hover { background: color-mix(in srgb, var(--line) 18%, transparent); color: var(--text); }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); }

/* source pills shared by the card and the Incoming window */
.src-pill { flex: none; font-size: calc(10px * var(--fs)); font-weight: 800; letter-spacing: 0.06em; padding: 1px 6px; border-radius: 6px; border: 1px solid currentColor; }
.src-pill.src-pulsepoint { color: var(--c-pulsepoint); }
.src-pill.src-chp { color: var(--c-chp); }
.src-pill.src-irwin { color: var(--c-irwin); }
.src-pill.src-quake { color: var(--c-quake); }
.src-pill.src-nws { color: var(--c-nws); }
.src-pill.src-caltrans { color: var(--c-caltrans); }
.src-pill.src-calfire { color: var(--c-calfire); }
.src-pill.src-tsunami { color: var(--c-tsunami); }

/* map-pin icon button (inline SVG; no icon font) */
.map-pin { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 26px; padding: 0; border-radius: 8px; border: 1px solid color-mix(in srgb, var(--line) 55%, transparent); background: transparent; color: var(--teal); cursor: pointer; flex: none; }
.map-pin svg { width: 16px; height: 16px; display: block; }
.map-pin:hover { background: color-mix(in srgb, var(--teal) 14%, transparent); }
.map-pin:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }
