/* ==========================================================================
   INDY LIVE — regional operations wall
   A bright, daylight operations-wall interface built on CSS custom properties
   so each region can supply its own accent pair from regions/*.json. Dark
   presets remain available from the theme picker (public/js/theme.mjs).
   ========================================================================== */

:root {
  /* Type floor: anything smaller than 11px is unreadable on a phone in sun-
     light and on a wall from across a room, and this file had 125 rules below
     it, so the scale is now 11 / 11.5 / 12.5 and above. test/accessibility
     .test.mjs fails on a new sub-11px declaration; raise the label instead of
     editing the test. Severity words additionally use the ink ramp below,
     because a warning you cannot read is not a warning. */
  --bg: #f1f6f7;
  --bg-2: #e9f1f3;
  --bg-3: #e2ecf0;
  --bg-deep: #d8e5ea;
  --panel: #ffffff;
  --panel-2: #f7fbfc;
  --panel-3: #ecf3f5;
  /* Fill hues: every translucent overlay in the app composites from these
     triplets, which is what lets a theme restyle backgrounds globally. */
  --tint-dark: 241, 246, 247;
  --tint-panel: 247, 251, 252;
  --tint-void: 233, 241, 243;
  --screen: #eef5f7;
  --screen-deep: #e2edf1;
  --wash-rgb: 15, 44, 54;
  --map-halo: rgba(255, 255, 255, 0.92);
  --chrome: 252, 254, 255;
  --line: rgba(15, 44, 54, 0.1);
  --line-strong: rgba(15, 44, 54, 0.2);
  --text: #132730;
  --text-2: #31505c;
  --muted: #44606c;
  --muted-2: #4b6672;
  --accent: #c9f75a;
  --cluster-text: var(--accent-ink);
  --accent-2: #63d7ff;
  /* Ink variants: readable accent-colored text on light surfaces, and the
     text color that sits on top of accent fills. Dark presets override
     both back to the vivid accent itself (see theme.mjs). */
  --accent-ink: #03724a;
  --accent-2-ink: #086a99;
  --on-accent: #0a2418;
  /* Tone inks: readable severity text on light surfaces. Each value clears
     4.5:1 against the lightest panel, the page background, and every tinted
     pill it is used on, because a severity colour that cannot be read is not
     a warning. Dark presets get their pastel glow variants back via
     applyTheme() in theme.mjs. */
  --tone-red-ink: #b9301e;
  --tone-salmon-ink: #b33a14;
  --tone-orange-ink: #b63500;
  --tone-amber-ink: #935400;
  --tone-lime-ink: #486e00;
  --tone-green-ink: #0e7147;
  --tone-teal-ink: #006e7d;
  --tone-blue-ink: #0662be;
  --tone-violet-ink: #7836e9;
  --warn: #ffc857;
  --danger: #ff6b57;
  --critical: #ff4d4d;
  --ok: #6ee7a8;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 14px 40px rgba(19, 42, 51, 0.12);
  --sans: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system,
    "Helvetica Neue", Arial, sans-serif;
  --mono: "Cascadia Mono", "Cascadia Code", "SFMono-Regular", Consolas,
    "Liberation Mono", monospace;
  --topbar-h: 68px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  color-scheme: light;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(1100px 620px at 82% -8%, rgba(99, 215, 255, 0.09), transparent 60%),
    radial-gradient(900px 540px at 8% 4%, rgba(201, 247, 90, 0.06), transparent 58%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 45%, var(--bg-deep) 100%);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(rgba(var(--wash-rgb), 0.016) 1px, transparent 1px),
    linear-gradient(90deg, rgba(var(--wash-rgb), 0.016) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse at 50% 0%, black, transparent 78%);
}

.grain {
  position: fixed;
  inset: -50%;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.02;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain-shift 0.9s steps(3) infinite;
}

@keyframes grain-shift {
  0% { transform: translate(0, 0); }
  33% { transform: translate(-2%, 1%); }
  66% { transform: translate(1%, -2%); }
  100% { transform: translate(0, 0); }
}

::selection {
  background: var(--accent);
  color: #06110a;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: 0;
  background: none;
}

img {
  display: block;
  max-width: 100%;
}

svg.icon {
  display: inline-block;
  flex: none;
  vertical-align: -0.18em;
}

.hidden {
  display: none !important;
}

.mono {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 12px;
}

.kicker {
  display: inline-block;
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.app {
  position: relative;
  z-index: 1;
  max-width: 1880px;
  margin: 0 auto;
  padding: 0 clamp(12px, 2.2vw, 30px) 40px;
}

/* ---------------------------------------------------------------- scrollbar */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar) transparent;
}

*::-webkit-scrollbar {
  width: 9px;
  height: 9px;
}

*::-webkit-scrollbar-thumb {
  background: rgba(190, 214, 220, 0.18);
  border-radius: 99px;
}

*::-webkit-scrollbar-track {
  background: transparent;
}

/* ------------------------------------------------------------------- boot */
.boot {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background:
    radial-gradient(600px 400px at 50% 45%, rgba(201, 247, 90, 0.06), transparent 70%),
    var(--bg);
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.boot.is-gone {
  opacity: 0;
  visibility: hidden;
}

.boot-ring {
  position: relative;
  width: 66px;
  height: 66px;
  margin-bottom: 14px;
}

.boot-ring i,
.boot-ring span {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid rgba(201, 247, 90, 0.35);
  animation: boot-spin 3.6s linear infinite;
}

.boot-ring i {
  inset: 9px;
  border-color: rgba(99, 215, 255, 0.45);
  border-right-color: transparent;
  animation-duration: 2.2s;
  animation-direction: reverse;
}

.boot-ring::after {
  content: "";
  position: absolute;
  inset: 26px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 24px rgba(201, 247, 90, 0.65);
  animation: boot-pulse 1.6s ease-in-out infinite;
}

.boot-ring span {
  border-color: transparent;
  border-top-color: var(--accent-ink);
}

@keyframes boot-spin {
  to { transform: rotate(360deg); }
}

@keyframes boot-pulse {
  0%, 100% { transform: scale(0.86); opacity: 0.75; }
  50% { transform: scale(1.08); opacity: 1; }
}

.boot-name {
  font-family: var(--mono);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-indent: 0.28em;
}

.boot-sub {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.08em;
}

.boot-bar {
  width: 180px;
  height: 2px;
  margin-top: 18px;
  background: rgba(var(--wash-rgb), 0.08);
  border-radius: 99px;
  overflow: hidden;
}

.boot-bar i {
  display: block;
  width: 40%;
  height: 100%;
  background: linear-gradient(90deg, transparent, var(--accent), var(--accent-2));
  animation: boot-load 1.4s ease-in-out infinite;
}

@keyframes boot-load {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(320%); }
}

/* ----------------------------------------------------------------- topbar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: var(--topbar-h);
  padding: 10px 4px;
  background: linear-gradient(180deg, rgba(var(--chrome), 0.94), rgba(var(--chrome), 0.72) 70%, transparent);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
}

/* The brand carries the page's single <h1>, and the heading must not change
   one pixel of the layout it sits in — so it inherits everything from the
   text it replaced. */
.brand-h1 {
  margin: 0;
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
  min-width: 0;
}

/* Keyboard visitors land here first. Hidden until focused, because a wall
   that shows a skip link on screen is a wall with too much chrome. */
.skip-link {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 1000;
  padding: 10px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--panel);
  color: var(--text);
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: none;
  box-shadow: var(--shadow);
  transform: translateY(-200%);
}

.skip-link:focus-visible {
  transform: none;
}

/* The map is a skip-link target, not a tab stop; without this the browser
   leaves the focus on the body and reads nothing. */
#stage-shell:focus {
  outline: none;
}

.brand-wrap {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  position: relative;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, rgba(201, 247, 90, 0.14), transparent 65%);
  border: 1px solid rgba(201, 247, 90, 0.35);
  flex: none;
}

.brand-mark::after {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  border: 1px solid rgba(99, 215, 255, 0.3);
}

.brand-mark i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(201, 247, 90, 0.12), 0 0 16px var(--accent);
  animation: live-pulse 2.4s ease-in-out infinite;
}

@keyframes live-pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(201, 247, 90, 0.10), 0 0 14px var(--accent); }
  50% { box-shadow: 0 0 0 7px rgba(201, 247, 90, 0.03), 0 0 22px var(--accent); }
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  min-width: 0;
}

.brand-text strong {
  font-family: var(--mono);
  font-size: clamp(16px, 1.3vw, 20px);
  font-weight: 700;
  letter-spacing: 0.16em;
  white-space: nowrap;
}

.brand-text small {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.top-status {
  display: flex;
  align-items: center;
  gap: 10px;
}

.status-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(var(--wash-rgb), 0.02);
  font-size: 13px;
  white-space: nowrap;
}

.status-item strong {
  font-family: var(--mono);
  font-size: 14px;
}

.users-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border: 1px solid rgba(255, 107, 87, 0.3);
  border-radius: 10px;
  background: rgba(255, 107, 87, 0.07);
  font: inherit;
  color: inherit;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.users-chip:hover {
  border-color: rgba(255, 107, 87, 0.55);
  background: rgba(255, 107, 87, 0.12);
}

.users-chip strong {
  font-family: var(--mono);
  font-size: 14px;
}

.users-chip span {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.users-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 3px rgba(110, 231, 168, 0.15);
  animation: badge-pulse 1.8s ease-in-out infinite;
}

.users-panel {
  position: fixed;
  top: calc(var(--topbar-h, 68px) + 8px);
  right: 18px;
  width: min(340px, calc(100vw - 36px));
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(var(--tint-panel), 0.96), rgba(var(--tint-void), 0.98));
  box-shadow: 0 14px 40px rgba(19, 42, 51, 0.16);
  z-index: 560;
  animation: panel-in 0.18s ease-out;
}

.usage-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 12px 0;
}

.usage-summary div {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(var(--tint-dark), 0.45);
  text-align: center;
}

.usage-summary strong {
  display: block;
  font-family: var(--mono);
  font-size: 17px;
  color: var(--accent-ink);
}

.usage-summary span {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.usage-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.usage-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: baseline;
  gap: 8px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(var(--tint-dark), 0.45);
  font-size: 12px;
}

.usage-row.is-online {
  border-color: rgba(110, 231, 168, 0.25);
}

.usage-row strong {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.usage-row.is-online strong {
  color: var(--tone-green-ink);
}

.usage-row small {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
}

.customize-panel {
  width: min(420px, calc(100vw - 36px));
}

.customize-panel .panel-head + .panel-head {
  margin-top: 14px;
}

.custom-theme-head {
  margin-top: 16px;
}

.customize-panel .link-btn {
  margin-top: 10px;
}

.layout-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.layout-row {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) 26px 26px;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(var(--tint-dark), 0.45);
  font-size: 12.5px;
}

.layout-index {
  font-size: 11px;
  color: var(--muted);
}

.layout-row .icon-btn {
  width: 26px;
  height: 26px;
  border-radius: 7px;
}

.theme-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 8px;
}

/* "Only similar" chip. Wider than the kiosk chip because it carries the rule as
   well as the exit: what matched, how many survived, and which facets are on. */
.isolate-chip {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 14px;
  z-index: 262;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  max-width: min(880px, calc(100% - 28px));
  padding: 8px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--screen);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.32);
  font-size: 11.5px;
  color: var(--text-2);
}

.isolate-title {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 650;
  color: var(--text);
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.isolate-scope {
  color: var(--text-2);
}

.isolate-count {
  padding: 2px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  font-size: 11px;
}

.isolate-facets {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 5px;
}

.isolate-facet {
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted-2);
  font: inherit;
  font-size: 11px;
  cursor: pointer;
}

.isolate-facet.is-on {
  border-color: var(--accent-ink);
  color: var(--accent-ink);
  background: rgba(var(--wash-rgb), 0.05);
}

/* A facet the object cannot express is shown, not removed - so the visitor can
   see that the emptiness is their filter, not the data. */
.isolate-facet[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
  text-decoration: line-through;
}

.isolate-stop {
  margin-left: auto;
  padding: 5px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 11.5px;
  cursor: pointer;
}

.isolate-stop:hover {
  border-color: var(--accent-ink);
  color: var(--accent-ink);
}

.isolate-empty {
  flex: 1 0 100%;
  color: var(--tone-amber-ink);
  font-size: 11.5px;
}

/* The button inside a leaflet popup, which has its own stacking context. */
.pop-actions {
  margin-top: 8px;
}

.map-pop .pop-actions .btn {
  min-height: 28px;
}

@media (max-width: 700px) {
  .isolate-chip {
    left: 10px;
    right: 10px;
    transform: none;
    max-width: none;
  }

  .isolate-stop {
    margin-left: 0;
  }
}

/* Text size, styled as a sibling of the theme picker so the panel reads as two
   adjacent appearance choices. The "Aa" is rendered at the size it will produce,
   which is the only part of this control a visitor can actually verify. */

/* Kiosk status. A page that scrolls by itself is only acceptable if it says so
   somewhere permanent and offers one control that stops it. */
.kiosk-chip {
  position: fixed;
  right: 14px;
  bottom: 14px;
  z-index: 260;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 9px 7px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--screen);
  color: var(--text-2);
  font-size: 11.5px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
}

.kiosk-chip .kiosk-stop {
  padding: 4px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 11.5px;
  cursor: pointer;
}

.kiosk-chip .kiosk-stop:hover {
  border-color: var(--accent-ink);
  color: var(--accent-ink);
}

.kiosk-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(var(--tint-dark), 0.45);
  color: var(--text-2);
  font: inherit;
  font-size: 11.5px;
  text-align: left;
  cursor: pointer;
}

.kiosk-toggle.is-active {
  border-color: var(--accent-ink);
  color: var(--text);
  background: rgba(var(--wash-rgb), 0.03);
}

/* The transit panel's degradation line: same weight as a source note, amber ink
   like every other "this data is not current" signal on the wall. */
.transit-note-line.is-warn {
  color: var(--tone-amber-ink);
}

@media (prefers-reduced-motion: reduce) {
  .kiosk-chip,
  .kiosk-toggle {
    transition: none;
  }
}
.scale-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 8px;
}

.scale-btn {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(var(--tint-dark), 0.45);
  color: var(--text-2);
  font: inherit;
  font-size: 11.5px;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.scale-btn:hover {
  border-color: var(--line-strong);
}

.scale-btn.is-active {
  border-color: var(--accent-ink);
  color: var(--text);
  background: rgba(var(--wash-rgb), 0.03);
}

.scale-a {
  line-height: 1;
  font-weight: 650;
}

.theme-swatch {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  padding: 8px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(var(--tint-dark), 0.45);
  color: var(--text-2);
  font: inherit;
  font-size: 11.5px;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.theme-swatch:hover {
  border-color: var(--line-strong);
}

.theme-swatch.is-active {
  border-color: var(--accent-ink);
  color: var(--text);
  background: rgba(var(--wash-rgb), 0.03);
}

.swatch-pair {
  display: inline-flex;
  align-items: center;
  gap: 0;
}

.swatch-pair i {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.25);
}

.swatch-pair i + i {
  margin-left: -5px;
}

.status-item span {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.weather-item svg {
  color: var(--accent-2-ink);
}

.aqi-item {
  gap: 7px;
}

.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border: 1px solid rgba(255, 107, 87, 0.35);
  border-radius: 999px;
  background: rgba(255, 107, 87, 0.08);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--tone-red-ink);
}

.live-pill i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ff6b57;
  box-shadow: 0 0 8px #ff6b57;
  animation: live-pulse-red 1.8s ease-in-out infinite;
}

@keyframes live-pulse-red {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.clock {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
}

.clock-time {
  font-size: 16px;
  font-weight: 600;
}

.clock-zone {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.1em;
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(var(--wash-rgb), 0.02);
  color: var(--text-2);
  transition: color 0.15s, border-color 0.15s, background 0.15s, transform 0.15s;
}

.icon-btn:hover {
  color: var(--accent-ink);
  border-color: rgba(201, 247, 90, 0.35);
  background: rgba(201, 247, 90, 0.06);
}

.icon-btn.is-active {
  color: #fff;
  background: #0a7d8c;
  border-color: #0a7d8c;
}

/* A header control that says what it does. On a public wall most visitors are
   here once and never hover, so the words have to be on the button; below
   700px the text folds away and the icon carries it alone. */
.icon-btn.top-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: auto;
  padding: 0 11px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.top-action-label {
  color: inherit;
}

.icon-btn:active {
  transform: scale(0.94);
}

.alerts-badge {
  display: inline-grid;
  place-items: center;
  min-width: 30px;
  height: 30px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(255, 107, 87, 0.16);
  border: 1px solid rgba(255, 107, 87, 0.45);
  color: var(--tone-red-ink);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  animation: badge-pulse 2s ease-in-out infinite;
}

@keyframes badge-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 107, 87, 0.28); }
  50% { box-shadow: 0 0 0 6px rgba(255, 107, 87, 0); }
}

/* ---------------------------------------------------------------- filters */
.filters {
  display: flex;
  gap: 8px;
  padding: 12px 2px;
  overflow-x: auto;
  scrollbar-width: none;
  border-bottom: 1px solid var(--line);
}

.filters::-webkit-scrollbar {
  display: none;
}

/* The sentence that explains the dashes. Kept low-key (muted body, amber mark)
   because it describes the wall's own knowledge, not an event in the world —
   but it is never hover-only, because a phone has no hover. */
.silence-note {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin: -2px 2px 12px;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--tone-amber-ink);
  border-radius: 8px;
  background: rgba(var(--wash-rgb), 0.03);
  font-size: 11.5px;
  line-height: 1.45;
  color: var(--muted-2);
}

.silence-note strong {
  color: var(--tone-amber-ink);
  font-weight: 650;
}

.silence-mark {
  display: inline-flex;
  flex: none;
  margin-top: 1px;
  color: var(--tone-amber-ink);
}

.filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: none;
  padding: 9px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(var(--wash-rgb), 0.02);
  color: var(--text-2);
  font-size: 12.5px;
  transition: all 0.18s ease;
}

.filter-btn:hover {
  border-color: var(--line-strong);
  background: rgba(var(--wash-rgb), 0.045);
}

.filter-btn.active {
  color: var(--on-accent);
  background: var(--accent);
  border-color: var(--accent-ink);
  box-shadow: 0 0 24px rgba(201, 247, 90, 0.18);
}

.filter-icon {
  display: inline-flex;
  color: currentColor;
  opacity: 0.85;
}

.filter-btn.active .filter-icon {
  opacity: 1;
}

.filter-label {
  font-weight: 600;
  letter-spacing: 0.01em;
}

.filter-count {
  font-family: var(--mono);
  font-size: 11.5px;
  padding: 1px 6px;
  border-radius: 99px;
  background: rgba(var(--wash-rgb), 0.09);
  color: var(--text-2);
}

.filter-btn.active .filter-count {
  /* The chip's own fill is the accent, and the old 18% black wash under the
     text took the count to 3.6:1 in Daybreak — a number nobody could read on
     the chip they had just chosen. Inheriting the chip's foreground makes the
     count exactly as readable as the word beside it, in every theme, and the
     ring keeps it looking like a count rather than loose text. */
  background: transparent;
  color: inherit;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, currentColor 30%, transparent);
}

/* ---------------------------------------------------------------- toolbar */
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 2px;
}

/* Jump links to the long page below the map. Only sections that currently
   have content are listed, so this row is often absent on a quiet hour. */
.section-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 2px 10px;
  overflow-x: auto;
  scrollbar-width: none;
  border-bottom: 1px solid var(--line);
}

.section-nav::-webkit-scrollbar {
  display: none;
}

.section-nav-label {
  flex: none;
  margin-right: 4px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--muted);
}

.section-nav-link {
  flex: none;
  padding: 6px 12px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 12px;
  /* `--text` is the palette's body ink. This said `--ink`, a variable that is
     defined nowhere, so the rule silently did nothing and the links inherited
     whatever colour the stage bar happened to have - invisible to a screenshot
     and exactly what the contrast audit exists to catch. */
  color: var(--text);
  text-decoration: none;
}

.section-nav-link:hover,
.section-nav-link:focus-visible {
  border-color: var(--line-strong);
  background: rgba(var(--wash-rgb), 0.05);
}

/* A jump lands with the section's heading in view rather than under the
   sticky header, and the heading takes focus so a keyboard visitor continues
   from there instead of from the top of the tab order. */
#view-map,
#conditions,
#safety-grid,
#outages,
#history,
#news-section {
  scroll-margin-top: 92px;
}

.list-more {
  margin-top: 12px;
}

.toolbar-left,
.toolbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.toolbar-left {
  flex: 1;
}

.searchbox {
  position: relative;
  display: flex;
  align-items: center;
  gap: 9px;
  width: min(340px, 42vw);
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(var(--wash-rgb), 0.02);
  color: var(--muted);
  transition: border-color 0.18s, background 0.18s;
}

.searchbox:focus-within {
  border-color: rgba(99, 215, 255, 0.5);
  background: rgba(99, 215, 255, 0.04);
  color: var(--accent-2-ink);
}

.searchbox input {
  flex: 1;
  min-width: 0;
  /* 24x24 CSS px is the floor for a target anyone may have to hit (WCAG
     2.5.8); the search field's own box was 22px tall. */
  min-height: 26px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 13px;
}

.search-suggest {
  position: absolute;
  top: calc(100% + 7px);
  left: 0;
  z-index: 900;
  min-width: min(330px, 80vw);
  max-height: 264px;
  overflow-y: auto;
  padding: 6px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: linear-gradient(180deg, rgb(var(--tint-panel)), rgba(var(--tint-void), 0.98));
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
}

.suggest-row {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--text-2);
  text-align: left;
  cursor: pointer;
  font: inherit;
  transition: background 0.15s, color 0.15s;
}

.suggest-row:hover,
.suggest-row.is-hot {
  background: rgba(var(--wash-rgb), 0.05);
  color: var(--text);
}

.suggest-row .s-pick {
  display: grid;
  place-items: center;
  color: var(--accent-2-ink);
}

.suggest-row .s-meta {
  font-size: 11.5px;
  color: var(--muted);
  white-space: nowrap;
}

.suggest-empty {
  padding: 9px 10px;
  font-size: 11px;
  color: var(--muted);
}

.address-pin {
  position: relative;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
}

.address-pin::before {
  content: "";
  position: absolute;
  bottom: 0;
  width: 14px;
  height: 14px;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  background: var(--accent);
  border: 2px solid rgba(0, 0, 0, 0.35);
}

.address-pin span {
  position: absolute;
  bottom: 10px;
  z-index: 1;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
}

.address-pin::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 50%;
  width: 22px;
  height: 8px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.3);
  filter: blur(3px);
}

.searchbox input::placeholder {
  color: var(--muted-2);
}

.searchbox kbd {
  padding: 1px 6px;
  border: 1px solid var(--line);
  border-radius: 5px;
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--muted-2);
}

.groups {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 2px 0;
  min-width: 0;
}

.groups::-webkit-scrollbar {
  display: none;
}

.chip {
  flex: none;
  padding: 6px 11px;
  border: 1px solid var(--line);
  border-radius: 99px;
  background: transparent;
  color: var(--muted);
  font-size: 11.5px;
  white-space: nowrap;
  transition: all 0.16s;
}

.chip:hover {
  color: var(--text);
  border-color: var(--line-strong);
}

.chip.active {
  color: var(--accent-2-ink);
  border-color: rgba(99, 215, 255, 0.4);
  background: rgba(99, 215, 255, 0.08);
}

.segmented {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(var(--wash-rgb), 0.02);
}

.seg-btn {
  padding: 6px 14px;
  border-radius: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  transition: all 0.16s;
}

.seg-btn:hover {
  color: var(--text);
}

.seg-btn.active {
  color: var(--on-accent);
  background: var(--accent);
  box-shadow: 0 2px 10px rgba(19, 42, 51, 0.2);
}

/* ------------------------------------------------------------------ button */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 15px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: all 0.16s ease;
  white-space: nowrap;
}

.btn.sm {
  padding: 7px 11px;
  font-size: 11.5px;
}

.btn.primary {
  background: var(--accent);
  color: var(--on-accent);
  border-color: var(--accent-ink);
}

.btn.primary:hover {
  box-shadow: 0 0 26px rgba(201, 247, 90, 0.3);
  transform: translateY(-1px);
}

.btn.ghost {
  border-color: var(--line);
  background: rgba(var(--wash-rgb), 0.02);
  color: var(--text-2);
}

.btn.ghost:hover {
  border-color: var(--line-strong);
  background: rgba(var(--wash-rgb), 0.055);
  color: var(--text);
}

.btn:active {
  transform: scale(0.98);
}

/* ------------------------------------------------------------- layer panel */
.layer-panel {
  margin: 0 0 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(var(--tint-panel), 0.9), rgba(var(--tint-void), 0.9));
  box-shadow: var(--shadow);
  overflow: hidden;
  animation: panel-in 0.2s ease-out;
}

@keyframes panel-in {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.layer-panel-inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 26px;
  padding: 18px 20px;
}

.panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--line);
}

.layers-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.layer-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(var(--wash-rgb), 0.02);
  color: var(--muted);
  font-size: 12px;
  transition: all 0.16s;
}

.layer-btn:hover {
  border-color: var(--line-strong);
  color: var(--text);
}

.layer-btn.active {
  color: var(--text);
  border-color: rgba(201, 247, 90, 0.28);
  background: rgba(201, 247, 90, 0.06);
}

.layer-check {
  display: inline-grid;
  place-items: center;
  width: 14px;
  height: 14px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  color: var(--accent-ink);
}

.layer-btn.active .layer-check {
  border-color: var(--accent-ink);
  background: rgba(201, 247, 90, 0.12);
}

.status-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex: none;
  background: var(--muted-2);
}

.dot-ok {
  background: var(--ok);
  box-shadow: 0 0 7px rgba(110, 231, 168, 0.65);
}

.dot-stale {
  background: var(--warn);
  box-shadow: 0 0 7px rgba(255, 200, 87, 0.55);
}

.dot-error {
  background: var(--danger);
  box-shadow: 0 0 7px rgba(255, 107, 87, 0.55);
}

.dot-disabled {
  background: var(--muted-2);
}

.source-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.source-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 7px 8px;
  border-radius: 7px;
  text-align: left;
  transition: background 0.15s;
}

.source-row:hover {
  background: rgba(var(--wash-rgb), 0.04);
}

.source-name {
  flex: 1;
  min-width: 0;
  font-size: 12px;
  color: var(--text-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.source-age {
  font-size: 11.5px;
  color: var(--muted);
}

/* ----------------------------------------------------------- status banner */
.status-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  padding: 11px 15px;
  border: 1px solid rgba(255, 200, 87, 0.3);
  border-radius: 10px;
  background: rgba(255, 200, 87, 0.07);
  color: var(--tone-amber-ink);
  font-size: 12.5px;
}

.status-banner.error {
  border-color: rgba(255, 107, 87, 0.35);
  background: rgba(255, 107, 87, 0.08);
  color: var(--tone-red-ink);
}

.status-banner button {
  flex: none;
  padding: 5px 10px;
  border: 1px solid currentColor;
  border-radius: 7px;
  font-size: 11px;
  font-weight: 600;
  opacity: 0.9;
}

/* ------------------------------------------------------------------- stage */
.stage-shell {
  position: relative;
}

.stage-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 0 2px 10px;
}

.stage-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.stage-meta .sep {
  width: 1px;
  height: 10px;
  background: var(--line-strong);
}

#focus-chip {
  color: var(--accent-ink);
  background: color-mix(in srgb, var(--accent) 9%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  border-radius: 5px;
  padding: 1px 7px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 11px;
}

.stage-meta span:first-child {
  color: var(--text-2);
}

.stage-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.stage {
  position: relative;
  height: clamp(580px, 70vh, 880px);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--screen);
  overflow: hidden;
  box-shadow: 0 24px 70px rgba(19, 42, 51, 0.18), inset 0 0 0 1px rgba(var(--wash-rgb), 0.05);
}

.view {
  position: absolute;
  inset: 0;
}

.view-map {
  position: absolute;
  inset: 0;
}

.map {
  position: absolute;
  inset: 0;
  background: rgb(var(--tint-void));
}

.map::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 400;
  pointer-events: none;
  background: radial-gradient(ellipse at 62% 42%, transparent 55%, rgba(var(--tint-void), 0.55) 100%);
}

.map-corner {
  position: absolute;
  z-index: 500;
  display: flex;
  flex-direction: column;
  gap: 3px;
  pointer-events: none;
}

.map-corner.top-left {
  top: 16px;
  left: 18px;
}

.map-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--text-2);
  text-transform: uppercase;
  text-shadow: 0 1px 6px var(--map-halo);
}

.map-label.muted {
  color: var(--muted);
  letter-spacing: 0.1em;
}

/* Leaflet skin */
.leaflet-container {
  background: rgb(var(--tint-void));
  font-family: var(--sans);
  font-size: 12px;
}

.leaflet-control-attribution {
  background: rgba(var(--tint-void), 0.72) !important;
  color: var(--muted) !important;
  font-size: 11px !important;
  padding: 2px 7px !important;
  border-radius: 6px 0 0 0;
  backdrop-filter: blur(6px);
}

.leaflet-control-attribution a {
  color: var(--muted);
}

.leaflet-bar {
  border: 1px solid var(--line-strong) !important;
  border-radius: 9px !important;
  overflow: hidden;
  box-shadow: var(--shadow) !important;
}

.leaflet-bar a {
  background: color-mix(in srgb, var(--panel) 94%, transparent) !important;
  color: var(--text-2) !important;
  border-bottom-color: var(--line) !important;
  backdrop-filter: blur(8px);
}

.leaflet-bar a:hover {
  background: rgba(24, 40, 47, 0.95) !important;
  color: var(--accent) !important;
}

.leaflet-control-scale-line {
  background: rgba(var(--tint-void), 0.6) !important;
  border-color: var(--muted-2) !important;
  color: var(--muted) !important;
  font-size: 11px;
  text-shadow: none !important;
}

.leaflet-tooltip.map-tooltip {
  padding: 7px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: color-mix(in srgb, var(--panel) 96%, transparent);
  color: var(--text);
  font-size: 11px;
  line-height: 1.35;
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
}

.leaflet-tooltip.map-tooltip::before {
  border-top-color: var(--line-strong) !important;
}

.map-tooltip .tt-sub {
  color: var(--muted);
  font-size: 11.5px;
}

.leaflet-popup.dark-popup .leaflet-popup-content-wrapper {
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: color-mix(in srgb, var(--panel) 97%, transparent);
  color: var(--text);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.leaflet-popup.dark-popup .leaflet-popup-content {
  width: 260px !important;
  margin: 0;
}

.leaflet-popup.dark-popup .leaflet-popup-tip {
  background: color-mix(in srgb, var(--panel) 97%, transparent);
  border: 1px solid var(--line-strong);
}

.leaflet-popup.dark-popup a.leaflet-popup-close-button {
  top: 7px;
  right: 7px;
  color: var(--muted);
}

.map-pop {
  padding: 13px 14px;
}

.map-pop img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 9px;
}

.pop-kicker {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.13em;
  color: var(--accent-2-ink);
  text-transform: uppercase;
}

.map-pop h3 {
  margin: 4px 0 5px;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.25;
}

.map-pop p {
  margin: 0 0 8px;
  font-size: 11.5px;
  line-height: 1.45;
  color: var(--text-2);
}

.map-pop a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--accent-2-ink);
  font-size: 11px;
}

.pop-meta {
  padding-top: 7px;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
}

/* markers */
.marker-wrap {
  background: transparent;
  border: 0;
}

.cam-marker {
  position: relative;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1.5px solid var(--accent-ink);
  background: color-mix(in srgb, var(--panel) 90%, transparent);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.4), 0 2px 8px rgba(19, 42, 51, 0.25);
  transition: transform 0.15s;
}

.cam-marker span {
  position: absolute;
  inset: 5px;
  border-radius: 50%;
  background: var(--accent);
}

.cam-marker.is-official {
  border-color: var(--accent-ink);
  box-shadow: 0 0 0 3px rgba(201, 247, 90, 0.13), 0 0 12px rgba(201, 247, 90, 0.4);
}

.cam-marker.cam-weather {
  border-color: var(--accent-2-ink);
}

.cam-marker.cam-weather span {
  background: var(--accent-2);
}

.cam-marker.cam-rest {
  border-color: var(--tone-violet-ink);
}

.cam-marker.cam-rest span {
  background: var(--tone-violet-ink);
}

.cam-marker:hover {
  transform: scale(1.28);
}

.cluster-wrap {
  background: transparent;
  border: 0;
}

.cluster {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(201, 247, 90, 0.45);
  background: rgba(var(--tint-dark), 0.88);
  color: var(--cluster-text, var(--accent));
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  box-shadow: 0 0 0 6px rgba(201, 247, 90, 0.12), 0 6px 18px rgba(19, 42, 51, 0.18);
  backdrop-filter: blur(6px);
}

.cluster::before {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: 50%;
  border: 1px dashed rgba(201, 247, 90, 0.22);
}

.cluster-crime {
  border-color: rgba(255, 77, 77, 0.45);
  color: var(--tone-red-ink);
  box-shadow: 0 0 0 6px rgba(255, 77, 77, 0.1), 0 6px 18px rgba(19, 42, 51, 0.18);
}

.cluster-crime::before {
  border-color: rgba(255, 77, 77, 0.2);
}

.cluster-police {
  border-color: rgba(99, 215, 255, 0.45);
  color: var(--accent-2-ink);
  box-shadow: 0 0 0 6px rgba(99, 215, 255, 0.12), 0 6px 18px rgba(19, 42, 51, 0.18);
}

.cluster-police::before {
  border-color: rgba(99, 215, 255, 0.2);
}

.cluster-outage {
  border-color: rgba(240, 145, 58, 0.5);
  color: var(--tone-orange-ink);
  box-shadow: 0 0 0 6px rgba(240, 145, 58, 0.12), 0 6px 18px rgba(19, 42, 51, 0.18);
}

.cluster-outage::before {
  border-color: rgba(240, 145, 58, 0.22);
}

.event-marker {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  border: 1px solid currentColor;
  background: color-mix(in srgb, var(--panel) 90%, transparent);
  box-shadow: 0 4px 14px rgba(19, 42, 51, 0.22);
}

.event-marker.tone-critical { color: var(--tone-red-ink); }
.event-marker.tone-high { color: var(--tone-salmon-ink); }
.event-marker.tone-medium { color: var(--tone-amber-ink); }
.event-marker.tone-low { color: var(--accent-2-ink); }

.rwis-marker,
.water-marker,
.plane-marker {
  display: grid;
  place-items: center;
  border-radius: 8px;
  border: 1px solid currentColor;
  background: color-mix(in srgb, var(--panel) 90%, transparent);
  box-shadow: 0 3px 12px rgba(19, 42, 51, 0.2);
}

.rwis-marker {
  width: 26px;
  height: 26px;
  color: var(--accent-2-ink);
}

.water-marker {
  width: 26px;
  height: 26px;
  color: var(--tone-blue-ink);
  border-radius: 50%;
}

.plane-marker {
  width: 24px;
  height: 24px;
  color: var(--tone-violet-ink);
  border: 0;
  background: transparent;
  box-shadow: none;
}

.place-marker {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background-size: cover;
  background-position: center;
  border: 2px solid rgba(255, 255, 255, 0.65);
  box-shadow: 0 4px 14px rgba(19, 42, 51, 0.22);
}

.place-marker span {
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.18);
}

/* ------------------------------------------------------------- safety map */
.crime-marker,
.police-marker,
.fire-marker {
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid currentColor;
  background: color-mix(in srgb, var(--panel) 90%, transparent);
  box-shadow: 0 3px 12px rgba(19, 42, 51, 0.2);
}

.crime-marker {
  width: 22px;
  height: 22px;
}

.crime-marker.class-violent { color: var(--tone-red-ink); }
.crime-marker.class-property { color: var(--tone-blue-ink); }
.crime-marker.class-drug { color: var(--tone-green-ink); }
.crime-marker.class-traffic { color: var(--tone-violet-ink); }
.crime-marker.class-other { color: var(--muted-2, #8598a1); }

.police-marker {
  width: 22px;
  height: 22px;
  color: var(--accent-2-ink);
}

.police-marker.is-active {
  color: var(--tone-amber-ink);
  animation: live-pulse 2.4s ease-in-out infinite;
}

.fire-marker {
  width: 24px;
  height: 24px;
  color: var(--tone-salmon-ink);
}

.fire-marker.is-call {
  width: 22px;
  height: 22px;
  color: var(--tone-red-ink);
  background: color-mix(in srgb, var(--panel) 90%, transparent);
}

.fire-marker.is-ems {
  color: var(--accent-2-ink);
  background: color-mix(in srgb, var(--panel) 90%, transparent);
}

/* Public transit (IndyGo) markers */
.bus-marker {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  color: #fff;
  background: #0a7d8c;
  border: 2px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 3px 12px rgba(19, 42, 51, 0.3);
}

.bus-marker.is-off {
  background: #7f9298;
}

.bus-marker.is-delayed {
  background: #b95d1f;
}

.transit-stop-marker {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  color: var(--tone-teal-ink);
  background: color-mix(in srgb, var(--panel) 92%, transparent);
  border: 1.5px solid #0a7d8c;
  box-shadow: 0 2px 8px rgba(19, 42, 51, 0.22);
}

/* Walking mode: "you are here" dot + 1-mile ring */
.user-dot {
  position: relative;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #3b82f6;
  border: 3px solid #fff;
  box-shadow: 0 2px 8px rgba(19, 42, 51, 0.4);
}

.user-dot i {
  position: absolute;
  inset: -7px;
  border-radius: 50%;
  border: 2px solid rgba(59, 130, 246, 0.55);
  animation: user-ping 2s ease-out infinite;
}

@keyframes user-ping {
  0% { transform: scale(0.55); opacity: 0.9; }
  70% { transform: scale(1.25); opacity: 0; }
  100% { transform: scale(1.25); opacity: 0; }
}

.user-radius-ring {
  stroke: #3b82f6;
  fill: rgba(59, 130, 246, 0.05);
}

.user-accuracy {
  stroke: none;
  fill: rgba(59, 130, 246, 0.14);
}

.user-wrap,
.bus-wrap {
  background: transparent;
  border: 0;
}

.walk-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--accent-2-ink);
}

/* Transit panel (secondary band) */
.transit-panel .transit-note-line {
  margin: 8px 0 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.transit-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 0;
  border-bottom: 1px solid var(--line);
}

.transit-row:last-of-type {
  border-bottom: 0;
}

.transit-bus,
.transit-stop-icon {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  color: var(--tone-teal-ink);
  background: color-mix(in srgb, #0a7d8c 12%, transparent);
  flex-shrink: 0;
}

.transit-bus.is-off {
  color: var(--muted);
}

.transit-bus.is-delayed {
  color: var(--tone-orange-ink);
}

.transit-bus.bike {
  color: var(--tone-green-ink);
  background: color-mix(in srgb, #4cae86 16%, transparent);
}

.transit-bus.bike.is-off {
  color: var(--muted);
  background: color-mix(in srgb, var(--muted) 12%, transparent);
}

.transit-main {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.transit-name {
  font-weight: 600;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.transit-sub {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.transit-value {
  text-align: right;
  display: flex;
  flex-direction: column;
}

.transit-value strong {
  font-size: 13px;
}

.transit-note {
  font-size: 11px;
  color: var(--muted);
}

/* County travel status */
.travel-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 9px 16px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  color: var(--text-2);
}

.travel-banner.hidden {
  display: none;
}

.travel-banner.is-advisory {
  background: color-mix(in srgb, #e8c547 14%, transparent);
  border-color: color-mix(in srgb, #e8c547 45%, var(--line));
}

/* --------------------------------------------------------- county view */

.county-select {
  display: flex;
  align-items: center;
  gap: 7px;
}

.county-select.hidden {
  display: none;
}

.county-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.county-picker {
  font: inherit;
  font-size: 12.5px;
  color: var(--text-2);
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 5px 8px;
  max-width: 210px;
}

.county-picker:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

/* Deliberately quiet: it is a statement about the data's reach, not an alert.
   If it ever looked like a warning, people would read it as one. */
.county-note-slot {
  display: block;
}

.county-note-slot.hidden {
  display: none;
}

.county-note {
  padding: 6px 16px;
  border-bottom: 1px solid var(--line);
  font-size: 11.5px;
  color: var(--muted);
}

.travel-banner.is-watch {
  background: color-mix(in srgb, #f0913a 16%, transparent);
  border-color: color-mix(in srgb, #f0913a 50%, var(--line));
}

.travel-banner.is-warning {
  background: color-mix(in srgb, #e2574c 18%, transparent);
  border-color: color-mix(in srgb, #e2574c 55%, var(--line));
}

.travel-banner a {
  margin-left: auto;
  color: var(--text-2);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.travel-panel .travel-local {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  margin-bottom: 8px;
}

.travel-panel .travel-local-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.travel-panel .travel-local small {
  color: var(--muted);
  font-size: 12px;
}

.travel-panel .travel-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}

.travel-panel .travel-row:last-of-type {
  border-bottom: 0;
}

.travel-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--muted);
  flex-shrink: 0;
}

[data-level='normal'] .travel-dot { background: #4cae86; }
[data-level='advisory'] .travel-dot { background: #e8c547; }
[data-level='watch'] .travel-dot { background: #f0913a; }
[data-level='warning'] .travel-dot { background: #e2574c; }
[data-level='unknown'] .travel-dot { background: var(--muted); }

.travel-name {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.travel-level {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.travel-row[data-level='advisory'] .travel-level { color: var(--tone-amber-ink); }
.travel-row[data-level='watch'] .travel-level { color: var(--tone-orange-ink); }
.travel-row[data-level='warning'] .travel-level { color: var(--tone-red-ink); }

.travel-time {
  color: var(--muted);
  font-size: 12px;
}

/* ---------------------------------------------------- missing-person alerts */
.missing-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 16px;
  border-bottom: 1px solid rgba(140, 29, 24, 0.7);
  color: #fff;
  font-size: 13.5px;
  font-weight: 600;
  background: #b3261e;
  animation: missing-pulse 2.6s ease-in-out infinite;
}

.missing-banner.hidden {
  display: none;
}

.missing-banner.is-silver {
  background: #3f4a63;
  border-color: rgba(20, 28, 48, 0.7);
}

.missing-banner strong {
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.missing-banner a {
  margin-left: auto;
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 2px;
  white-space: nowrap;
}

@keyframes missing-pulse {
  0%,
  100% {
    filter: brightness(1);
  }
  50% {
    filter: brightness(1.14);
  }
}

.missing-panel {
  border-color: color-mix(in srgb, #e2574c 48%, var(--line));
}

.missing-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.missing-card {
  padding: 10px;
  border: 1px solid color-mix(in srgb, #e2574c 28%, var(--line));
  border-radius: 10px;
  background: color-mix(in srgb, #e2574c 7%, transparent);
}

.missing-card.is-silver {
  border-color: color-mix(in srgb, #63d7ff 30%, var(--line));
  background: color-mix(in srgb, #63d7ff 6%, transparent);
}

.missing-head {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.missing-head strong {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--tone-red-ink);
}

.missing-head span {
  font-size: 14px;
  font-weight: 650;
}

.missing-card p {
  margin: 6px 0 0;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--text-2);
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.missing-photos {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.missing-photo img {
  width: 84px;
  height: 84px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
}

.missing-meta {
  margin-top: 8px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

/* --------------------------------------------------------- school closings */
.school-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid var(--line);
}

.school-row:last-of-type {
  border-bottom: 0;
}

.school-tag {
  flex: none;
  max-width: 112px;
  padding: 3px 6px;
  border-radius: 5px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  background: color-mix(in srgb, var(--muted) 16%, transparent);
  color: var(--text-2);
}

.school-tag.is-closing {
  background: color-mix(in srgb, #e2574c 15%, transparent);
  color: var(--tone-red-ink);
}

.school-tag.is-delay {
  background: color-mix(in srgb, #f0913a 18%, transparent);
  color: var(--tone-orange-ink);
}

.school-tag.is-elearning {
  background: color-mix(in srgb, #63d7ff 15%, transparent);
  color: var(--tone-teal-ink);
}

.school-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.school-name {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.school-sub {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ------------------------------------------------------------ power outages */
.outage-total {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 8px;
}

.outage-total strong {
  font-family: var(--mono);
  font-size: 30px;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--tone-amber-ink);
}

.outage-total span {
  font-size: 11.5px;
  color: var(--text-2);
}

.outage-provider {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 0;
  border-bottom: 1px solid var(--line);
}

.outage-provider:last-of-type {
  border-bottom: 0;
}

.outage-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.outage-main strong {
  font-size: 13px;
}

.outage-main small {
  font-size: 11px;
  color: var(--muted);
}

.outage-value {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
}

.outage-value strong {
  font-family: var(--mono);
  font-size: 15px;
}

.outage-value span {
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}

.outage-row {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 4px 0;
  font-size: 12px;
  color: var(--text-2);
}

.outage-dot {
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #e2574c;
}

.outage-dot.is-planned {
  background: #8598a1;
}

.outage-row-main {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.outage-row-meta {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--muted);
}

.all-clear.is-warn {
  color: var(--tone-amber-ink);
}

/* Outage point marker */
.outage-marker {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px 6px;
  border: 1.5px solid rgba(255, 255, 255, 0.85);
  border-radius: 99px;
  background: #b3261e;
  color: #fff;
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 3px 10px rgba(19, 42, 51, 0.32);
}

.outage-marker.is-md {
  background: #c2410c;
}

.outage-marker.is-lg {
  background: #7f1d1d;
}

.outage-marker.is-planned {
  background: #55606a;
}

/* Signal history — daily archive panel */
.history-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(86px, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.history-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(var(--wash-rgb), 0.03);
}

.history-stat strong {
  font-family: var(--mono);
  font-size: 16px;
  font-weight: 700;
}

.history-stat span {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
}

.history-chart {
  display: grid;
  grid-template-columns: 128px 1fr;
  gap: 10px;
  align-items: center;
  margin-bottom: 7px;
}

.history-chart-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
}

.history-chart .sparkline {
  width: 100%;
  height: 34px;
}

.history-days {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 12px;
}

.history-day {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr) auto auto 16px;
  gap: 8px;
  align-items: center;
  width: 100%;
  padding: 8px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.14s, background 0.14s;
}

.history-day:hover {
  border-color: var(--line);
  background: rgba(var(--wash-rgb), 0.04);
}

.history-day.is-open {
  border-color: rgba(15, 44, 54, 0.2);
  background: rgba(var(--wash-rgb), 0.06);
}

.history-date {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
}

.history-cond {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 11px;
  color: var(--text-2);
}

.history-temp {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
}

.history-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: flex-end;
}

.history-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 6px;
  border: 1px solid var(--line);
  border-radius: 99px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
}

.history-chip.is-warn { color: var(--tone-red-ink); border-color: rgba(255, 77, 77, 0.32); }
.history-chip.is-snow { color: var(--tone-blue-ink); border-color: rgba(59, 121, 201, 0.32); }
.history-chip.is-outage { color: var(--tone-orange-ink); border-color: rgba(240, 145, 58, 0.34); }
.history-chip.is-school { color: var(--accent-2-ink); border-color: rgba(99, 215, 255, 0.28); }
.history-chip.is-missing { color: var(--tone-amber-ink); border-color: rgba(255, 200, 87, 0.34); }

.history-quiet {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted-2);
}

.history-caret {
  display: grid;
  place-items: center;
  color: var(--muted);
}

.history-day.is-open .history-caret svg {
  transform: rotate(90deg);
}

.history-loading {
  padding: 8px 10px;
  font-size: 11px;
  color: var(--muted);
}

.history-detail {
  margin: 2px 8px 12px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(var(--wash-rgb), 0.025);
}

.history-detail-head {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  align-items: baseline;
  margin-bottom: 9px;
}

.history-detail-head strong {
  font-size: 13px;
}

.history-detail-head span {
  font-size: 11px;
  color: var(--text-2);
}

.history-detail-head small {
  width: 100%;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.history-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 4px 14px;
}

.history-metric {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 3px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 11.5px;
}

.history-metric span {
  color: var(--muted);
}

.history-metric strong {
  font-family: var(--mono);
  font-size: 11.5px;
  text-align: right;
}

.history-list {
  margin-top: 11px;
}

.history-list h3 {
  margin: 0 0 4px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.history-list ul {
  margin: 0;
  padding-left: 16px;
  font-size: 11px;
  line-height: 1.5;
  color: var(--text-2);
}

.history-list li {
  margin: 2px 0;
}

.history-water-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 2px 0;
  font-size: 11px;
}

.history-water-row strong {
  font-family: var(--mono);
}

/* Structured day history: alerts that ran and county declarations */
.history-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}

.history-table th {
  text-align: left;
  padding: 2px 8px 4px 0;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
}

.history-table td {
  padding: 4px 8px 4px 0;
  border-bottom: 1px dashed var(--line);
  vertical-align: top;
  color: var(--text-2);
}

.history-table tr:last-child td {
  border-bottom: 0;
}

.history-table .mono {
  font-family: var(--mono);
  font-size: 11.5px;
  white-space: nowrap;
}

.history-sev {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.history-sev.is-high,
.history-sev.is-warning { color: var(--tone-red-ink); }
.history-sev.is-moderate,
.history-sev.is-watch { color: var(--tone-amber-ink); }
.history-sev.is-minor,
.history-sev.is-advisory { color: var(--tone-blue-ink); }
/* NWS sent no usable severity: neutral ink, not advisory blue. */
.history-sev.is-unknown { color: var(--muted); }

/* Time-lapse player */
.tl-cameras {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.tl-camera,
.tl-day {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 11.5px;
  cursor: pointer;
  transition: border-color 0.14s, background 0.14s;
}

.tl-camera span {
  max-width: 190px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.tl-camera small,
.tl-day small {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
}

.tl-camera:hover,
.tl-day:hover {
  border-color: var(--line-strong);
  background: rgba(var(--wash-rgb), 0.05);
}

.tl-camera.is-active,
.tl-day.is-active {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 14%, transparent);
}

.tl-days {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 11px;
}

.tl-view {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 11px;
  overflow: hidden;
  background: var(--screen-deep);
}

.tl-view img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.tl-overlay {
  position: absolute;
  inset: auto 0 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  background: linear-gradient(to top, rgba(7, 11, 13, 0.78), rgba(7, 11, 13, 0));
  color: #f6fafb;
  font-size: 11px;
}

.tl-clock {
  font-size: 12px;
  font-weight: 700;
}

.tl-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin-top: 9px;
}

.tl-range {
  flex: 1;
  min-width: 120px;
  height: 3px;
  accent-color: var(--accent);
}

.tl-speed {
  padding: 5px 6px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel);
  color: var(--text);
  font-family: var(--mono);
  font-size: 11.5px;
}

/* Bike-share station marker */
.bike-marker {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  color: #fff;
  background: #4cae86;
  border: 2px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 3px 10px rgba(19, 42, 51, 0.28);
}

.bike-marker.is-low {
  background: #b9801f;
}

.bike-marker.is-out {
  background: #7f9298;
}

/* Heat & UV panel */
.comfort-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.comfort-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(var(--wash-rgb), 0.02);
}

.comfort-cell span {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.comfort-cell strong {
  font-size: 22px;
  line-height: 1.15;
}

.comfort-cell small {
  font-size: 12px;
  font-weight: 700;
  color: var(--tone, var(--muted));
}

.comfort-cell em {
  font-style: normal;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
}

.pop-active {
  color: var(--tone-amber-ink);
  font-weight: 700;
}

.safety-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
  margin-top: 14px;
  align-items: stretch;
}

.safety-panel .section-head h2 {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.window-chips {
  display: flex;
  gap: 4px;
  margin-bottom: 10px;
}

.window-btn {
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(var(--tint-dark), 0.5);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.window-btn:hover {
  color: var(--text-2);
  border-color: var(--line-strong);
}

.window-btn.active {
  color: var(--on-accent);
  background: var(--accent);
  border-color: var(--accent-ink);
}

.chart {
  margin: 2px 0 10px;
}

.chart svg {
  display: block;
  width: 100%;
  height: 60px;
}

.chart-axis {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  margin-top: 3px;
}

.hazard-now {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 12px;
  margin-bottom: 8px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--hazard-color, var(--warn));
  border-radius: 8px;
  background: rgba(var(--tint-dark), 0.5);
}

.hazard-index {
  font-family: var(--mono);
  font-size: 30px;
  font-weight: 800;
  color: var(--hazard-color, var(--warn));
  line-height: 1;
}

.hazard-copy {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.hazard-cat {
  font-size: 13px;
  font-weight: 700;
  color: var(--hazard-color, var(--warn));
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.hazard-copy small {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--muted);
}

.news-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.news-row {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) 12px;
  align-items: center;
  gap: 8px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(var(--tint-dark), 0.45);
  text-decoration: none;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.news-row > svg {
  color: var(--muted);
}

.news-row:hover > svg {
  color: var(--accent-ink);
}

.news-copy {
  min-width: 0;
}

.news-rank {
  font-size: 11px;
  color: var(--muted);
}

.news-row:hover {
  border-color: var(--accent-ink);
  background: rgba(201, 247, 90, 0.05);
}

.news-title {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.35;
}

.news-meta {
  display: block;
  margin-top: 2px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
}

.news-group {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.news-group + .news-group {
  margin-top: 12px;
}

.news-group-head {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
}

.news-group-head small {
  margin-left: auto;
  font-size: 11px;
  letter-spacing: 0;
  text-transform: none;
}

.news-group-head .breaking-pip {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--danger);
  animation: badge-pulse 1.8s ease-in-out infinite;
}

.news-section {
  margin-top: 14px;
}

.news-panel {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(var(--tint-panel), 0.62), rgba(var(--tint-void), 0.78));
  box-shadow: 0 10px 30px rgba(19, 42, 51, 0.14);
}

.news-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 13px;
  border-bottom: 1px solid var(--line);
}

.news-head h2 {
  margin: 3px 0 0;
  font-size: clamp(18px, 1.6vw, 23px);
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.news-head-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
  text-align: right;
  font-size: 11px;
  white-space: nowrap;
}

.news-count {
  color: var(--accent-ink);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.news-columns {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 20px;
  margin-top: 14px;
}

.news-breaking,
.news-latest {
  min-width: 0;
}

.news-feature-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.news-feature {
  display: block;
  padding: 11px 12px;
  border: 1px solid rgba(255, 107, 87, 0.24);
  border-radius: 9px;
  background: linear-gradient(135deg, rgba(255, 107, 87, 0.08), rgba(var(--wash-rgb), 0.01));
  text-decoration: none;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.news-feature:hover {
  border-color: rgba(255, 107, 87, 0.5);
  background: linear-gradient(135deg, rgba(255, 107, 87, 0.13), rgba(var(--wash-rgb), 0.02));
}

.news-feature-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 5px;
}

.news-source {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--tone-red-ink);
}

.news-time {
  font-size: 11px;
  color: var(--muted);
}

.news-feature strong {
  display: block;
  font-size: 13px;
  line-height: 1.35;
  color: var(--text);
}

.news-feature p {
  margin: 4px 0 0;
  font-size: 11px;
  line-height: 1.45;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-open {
  display: inline-block;
  margin-top: 6px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-ink);
}

.news-empty {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 14px;
  border: 1px dashed var(--line);
  border-radius: 9px;
  color: var(--muted);
}

.news-empty p {
  margin: 0;
  font-size: 11.5px;
  color: var(--text);
}

.news-empty small {
  font-size: 11.5px;
}

.safety-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.safety-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(var(--tint-dark), 0.5);
}

.safety-row.class-violent { border-left: 2px solid var(--critical); }
.safety-row.class-property { border-left: 2px solid #63a4ff; }
.safety-row.class-drug { border-left: 2px solid var(--ok); }
.safety-row.class-traffic { border-left: 2px solid #b98cff; }
.safety-row.call-row { border-left: 2px solid var(--accent-2); }
.safety-row.station-row { border-left: 2px solid #ff8a5c; }
.safety-row.fire-call-row { border-left: 2px solid var(--critical); }
.safety-row.ems-call-row { border-left: 2px solid var(--accent-2); }

.safety-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.safety-title {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.safety-sub {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--muted);
  /* Two lines of address beat one line with the interesting part
     cut off: 16 of 19 rows were losing street names to an ellipsis. */
  white-space: normal;
  overflow-wrap: anywhere;
}

.safety-when {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex: none;
}

.safety-when small {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
}

.class-badge {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 3px 7px;
  border-radius: 4px;
  border: 1px solid currentColor;
}

.class-badge.class-violent { color: var(--tone-red-ink); }
.class-badge.class-property { color: var(--tone-blue-ink); }
.class-badge.class-drug { color: var(--tone-green-ink); }
.class-badge.class-traffic { color: var(--tone-violet-ink); }
.class-badge.class-other { color: var(--muted-2, #8598a1); }

.call-status {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  padding: 3px 7px;
  border-radius: 4px;
}

.call-status.is-active {
  color: var(--tone-amber-ink);
  border: 1px solid rgba(255, 200, 87, 0.4);
}

.call-status.is-closed {
  color: var(--muted);
  border: 1px solid var(--line);
}

/* ----------------------------------------------------------------- radar */
.radar-chip {
  position: absolute;
  left: 18px;
  top: 62px;
  z-index: 560;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 9px 7px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: color-mix(in srgb, var(--panel) 85%, transparent);
  backdrop-filter: blur(10px);
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--muted);
  box-shadow: var(--shadow);
}

/* The density field is drawn in screen coordinates over the tiles: above the
   basemap so it reads as context, below the markers so they stay clickable. It
   is decoration to an assistive technology — the counts it stands for are in
   the chip next to it, as text. */
.heat-canvas {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 350;
  pointer-events: none;
  transition: opacity 0.18s ease;
}

/* Hidden for the length of a zoom animation, when the tiles move under a
   canvas whose numbers still describe the view before it. */
.heat-canvas.is-animating {
  opacity: 0;
}

.heat-chip {
  position: absolute;
  left: 18px;
  top: 100px;
  z-index: 560;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: min(430px, calc(100% - 36px));
  padding: 7px 9px 7px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: color-mix(in srgb, var(--panel) 85%, transparent);
  backdrop-filter: blur(10px);
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--muted);
  box-shadow: var(--shadow);
}

.heat-swatch {
  flex: none;
  width: 54px;
  height: 8px;
  border-radius: 4px;
}

.heat-text {
  overflow-wrap: anywhere;
}

.radar-live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.13em;
  color: var(--muted);
}

.radar-live i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--muted-2);
}

.radar-live.on {
  color: var(--accent-2-ink);
}

.radar-live.on i {
  background: var(--accent-2);
  box-shadow: 0 0 8px var(--accent-2);
  animation: live-pulse-red 1.6s ease-in-out infinite;
}

.radar-toggle {
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--text-2);
  text-transform: uppercase;
}

.radar-toggle:hover {
  color: var(--accent-ink);
  border-color: rgba(201, 247, 90, 0.35);
}

/* --------------------------------------------------------------- spotlight */
.spotlight {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 550;
  display: flex;
  flex-direction: column;
  width: min(400px, calc(100% - 32px));
  max-height: calc(100% - 84px);
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(var(--tint-void), 0.93), rgba(var(--tint-void), 0.97));
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
  overflow: hidden;
  animation: spotlight-in 0.35s ease-out;
}

@keyframes spotlight-in {
  from { opacity: 0; transform: translateX(14px); }
  to { opacity: 1; transform: translateX(0); }
}

.spotlight-media {
  position: relative;
  flex: none;
  aspect-ratio: 16 / 10;
  background: rgb(var(--tint-void));
  overflow: hidden;
}

.spotlight-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-top {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  pointer-events: none;
}

.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 7px;
  border-radius: 5px;
  background: rgba(var(--tint-void), 0.8);
  border: 1px solid rgba(255, 107, 87, 0.4);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.13em;
  color: var(--tone-red-ink);
  backdrop-filter: blur(4px);
}

.live-badge i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #ff6b57;
  box-shadow: 0 0 6px #ff6b57;
  animation: live-pulse-red 1.5s ease-in-out infinite;
}

.media-age {
  padding: 3px 7px;
  border-radius: 5px;
  background: rgba(var(--tint-void), 0.7);
  font-size: 11px;
  color: var(--text-2);
}

.media-scan {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent 3px,
    rgba(0, 0, 0, 0.12) 3px,
    rgba(0, 0, 0, 0.12) 4px
  );
  opacity: 0.5;
}

.refresh-track {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: rgba(var(--wash-rgb), 0.08);
}

.refresh-track i {
  display: block;
  width: 0;
  height: 100%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
  transition: width 0.9s linear;
}

.spotlight-body {
  flex: 1;
  min-height: 0;
  padding: 14px 16px;
  overflow-y: auto;
}

.spotlight-kicker {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--accent-2-ink);
}

.spotlight-body h2 {
  margin: 4px 0 8px;
  font-size: clamp(17px, 1.5vw, 21px);
  font-weight: 650;
  line-height: 1.16;
  letter-spacing: -0.015em;
}

.spotlight-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11.5px;
  color: var(--muted);
}

.spotlight-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.spotlight-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 14px 0 12px;
}

.spotlight-actions .btn {
  padding: 7px 11px;
  font-size: 11px;
}

.spotlight-foot {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  font-size: 11px;
  color: var(--muted-2);
  letter-spacing: 0.06em;
}

.empty-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 160px;
  padding: 28px;
  color: var(--muted);
  text-align: center;
}

.empty-panel.small {
  min-height: 110px;
}

.empty-panel.wide {
  grid-column: 1 / -1;
}

.empty-panel p {
  margin: 0;
  font-size: 12.5px;
}

/* ----------------------------------------------------------------- ticker */
.ticker-wrap {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 540;
  /* leave room for the Leaflet zoom + scale controls in the bottom-left */
  padding: 9px 14px 9px 104px;
  background: linear-gradient(0deg, rgba(var(--tint-void), 0.96), rgba(var(--tint-void), 0.72) 70%, transparent);
  pointer-events: none;
}

.ticker {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  pointer-events: auto;
  mask-image: linear-gradient(90deg, black 96%, transparent);
}

.ticker::-webkit-scrollbar {
  display: none;
}

.ticker-label {
  flex: none;
  padding: 4px 8px;
  border-radius: 4px;
  background: var(--accent);
  color: var(--on-accent);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.15em;
}

.ticker-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: none;
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: rgba(var(--tint-dark), 0.72);
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--text-2);
  white-space: nowrap;
  backdrop-filter: blur(4px);
}

.ticker-chip.all-clear {
  color: var(--tone-green-ink);
  border-color: rgba(110, 231, 168, 0.25);
}

.ticker-chip.tone-critical { color: var(--tone-red-ink); border-color: rgba(255, 77, 77, 0.35); }
.ticker-chip.tone-high { color: var(--tone-salmon-ink); border-color: rgba(255, 107, 87, 0.3); }
.ticker-chip.tone-medium { color: var(--tone-amber-ink); border-color: rgba(255, 200, 87, 0.3); }
.ticker-chip.tone-low { color: var(--accent-2-ink); }

/* ------------------------------------------------------------------- wall */
.view-wall {
  overflow-y: auto;
  padding: 20px clamp(14px, 2vw, 24px) 60px;
  background:
    radial-gradient(900px 400px at 80% -10%, rgba(99, 215, 255, 0.06), transparent 70%),
    var(--bg-2);
}

.wall-bar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.wall-bar h2 {
  margin: 3px 0 0;
  font-size: clamp(20px, 2vw, 27px);
  font-weight: 650;
  letter-spacing: -0.025em;
}

.wall-tools {
  display: flex;
  align-items: center;
  gap: 12px;
}

.wall-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.wall-card {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgb(var(--tint-void));
  overflow: hidden;
  text-align: left;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.wall-card:hover {
  transform: translateY(-3px);
  border-color: rgba(201, 247, 90, 0.4);
  box-shadow: 0 18px 40px rgba(19, 42, 51, 0.2), 0 0 0 1px var(--line-strong);
}

.wall-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease, opacity 0.3s;
}

.wall-card:hover img {
  transform: scale(1.045);
}

.wall-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(var(--tint-void), 0.35) 0%, transparent 32%, transparent 50%, rgba(var(--tint-void), 0.9) 100%);
  pointer-events: none;
}

.wall-card img.is-broken {
  opacity: 0.2;
}

.wall-top {
  position: absolute;
  top: 9px;
  left: 9px;
  right: 9px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.wall-cat {
  padding: 3px 6px;
  border-radius: 4px;
  background: rgba(var(--tint-void), 0.65);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--text-2);
  text-transform: uppercase;
  backdrop-filter: blur(4px);
}

.wall-info {
  position: absolute;
  left: 11px;
  right: 34px;
  bottom: 10px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 1px;
  text-align: left;
}

.wall-kicker {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.09em;
  color: var(--accent-2-ink);
  text-transform: uppercase;
}

.wall-info strong {
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wall-info small {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
}

.wall-open {
  position: absolute;
  right: 9px;
  bottom: 9px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: rgba(var(--tint-void), 0.6);
  color: var(--text-2);
  opacity: 0;
  transition: opacity 0.18s;
}

.wall-card:hover .wall-open {
  opacity: 1;
  color: var(--accent-ink);
}

.wall-more {
  margin: 18px auto 0;
}

/* ---------------------------------------------------------------- sections */
.secondary {
  display: grid;
  grid-template-columns: 1.55fr 1.05fr 0.85fr 1fr;
  gap: 14px;
  margin-top: 18px;
  align-items: stretch;
}

.panel {
  position: relative;
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(var(--tint-panel), 0.55), rgba(var(--tint-void), 0.72));
  box-shadow: 0 10px 30px rgba(19, 42, 51, 0.14);
  overflow: hidden;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 13px;
}

.section-head h2 {
  margin: 0;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.02em;
}

/* The line under a panel heading that names the specific thing in the panel:
   which gauge, which area. A category heading ("River gauges") tells a
   visitor where they are, not what happened. */
.head-stack {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.section-sub {
  font-size: 11.5px;
  line-height: 1.35;
  color: var(--muted);
}

.section-link {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.11em;
  color: var(--muted);
  text-transform: uppercase;
  cursor: pointer;
}

.section-link:hover {
  color: var(--accent-2-ink);
}

.badge-count {
  display: grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 99px;
  background: rgba(255, 107, 87, 0.14);
  color: var(--tone-red-ink);
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 700;
}

/* conditions */
.conditions-panel {
  display: flex;
  flex-direction: column;
}

.now-card {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 4px 2px 14px;
}

.now-icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: radial-gradient(circle at 45% 40%, rgba(99, 215, 255, 0.12), transparent 70%);
  color: var(--accent-2-ink);
  flex: none;
}

.now-main {
  flex: 1;
  min-width: 0;
}

.now-temp {
  display: flex;
  align-items: baseline;
  gap: 9px;
  font-family: var(--mono);
  font-size: 34px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.04em;
}

.now-temp span {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--text-2);
  white-space: nowrap;
}

.now-feels {
  margin-top: 5px;
  font-size: 11px;
  color: var(--muted);
}

.aqi-mini {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  padding: 8px 11px;
  border: 1px solid color-mix(in srgb, var(--tone) 35%, transparent);
  border-radius: 10px;
  background: color-mix(in srgb, var(--tone) 8%, transparent);
}

.aqi-mini strong {
  font-family: var(--mono);
  font-size: 19px;
  color: var(--tone);
  line-height: 1;
}

.aqi-mini span {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--muted);
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--line);
  overflow: hidden;
}

.stat-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 9px 10px;
  background: rgba(var(--tint-void), 0.85);
}

.stat-cell span {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--muted);
  text-transform: uppercase;
}

.stat-cell strong {
  font-family: var(--mono);
  font-size: 16px;
  font-weight: 600;
}

.stat-cell strong em {
  font-style: normal;
  font-size: 11px;
  color: var(--muted);
}

.stat-cell small {
  font-size: 11px;
  color: var(--muted-2);
}

.hour-strip {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 92px;
  margin-top: 13px;
  padding-top: 6px;
  border-top: 1px solid var(--line);
  overflow: hidden;
}

.hour-col {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
  gap: 2px;
}

.hour-temp {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-2);
}

.hour-bar {
  width: 60%;
  max-width: 13px;
  min-height: 10px;
  border-radius: 3px 3px 0 0;
  background: linear-gradient(180deg, var(--accent-2), rgba(99, 215, 255, 0.14));
  opacity: 0.72;
}

.hour-precip {
  position: absolute;
  bottom: 17px;
  width: 3px;
  border-radius: 2px;
  background: #7bb8ff;
  opacity: 0.75;
}

.hour-time {
  height: 12px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
}

.hour-col:not(.labeled) .hour-time {
  visibility: hidden;
}

.hour-strip.large {
  height: 100px;
  margin-top: 6px;
  border-top: 0;
}

.daily-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1px;
  margin-top: 12px;
  border-top: 1px solid var(--line);
  padding-top: 11px;
}

.daily-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 0 3px;
  border-right: 1px solid var(--line);
  color: var(--muted);
}

.daily-cell:last-child {
  border-right: 0;
}

.daily-cell span {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.daily-cell strong {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text);
}

.daily-cell strong em {
  font-style: normal;
  font-size: 11px;
  color: var(--muted);
}

.daily-cell small {
  font-size: 11px;
  color: var(--muted-2);
}

/* alerts */
.alerts-panel {
  display: flex;
  flex-direction: column;
}

.alert-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  max-height: 330px;
}

.alert-row {
  padding: 10px 11px 10px 13px;
  border-radius: 8px;
  background: rgba(var(--wash-rgb), 0.025);
  border-left: 2px solid var(--muted-2);
}

.alert-row.tone-critical { border-left-color: var(--critical); background: rgba(255, 77, 77, 0.06); }
.alert-row.tone-high { border-left-color: var(--tone-salmon-ink); background: rgba(255, 107, 87, 0.055); }
.alert-row.tone-medium { border-left-color: var(--warn); background: rgba(255, 200, 87, 0.05); }
.alert-row.tone-low { border-left-color: var(--accent-2-ink); background: rgba(99, 215, 255, 0.04); }

.alert-head {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--text);
}

.alert-row.tone-critical .alert-head { color: var(--tone-red-ink); }
.alert-row.tone-high .alert-head { color: var(--tone-salmon-ink); }
.alert-row.tone-medium .alert-head { color: var(--tone-amber-ink); }
.alert-row.tone-low .alert-head { color: var(--accent-2-ink); }

.alert-head strong {
  font-size: 11.5px;
  font-weight: 650;
}

.alert-row p {
  margin: 4px 0 6px;
  font-size: 11.5px;
  line-height: 1.45;
  color: var(--text-2);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.alert-meta {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  color: var(--muted);
  text-transform: uppercase;
}

.all-clear {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 14px 12px;
  border: 1px dashed rgba(110, 231, 168, 0.25);
  border-radius: 9px;
  color: var(--tone-green-ink);
  font-size: 12px;
}

/* water */
.water-list {
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.water-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 10px;
  align-items: center;
}

.water-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.water-name {
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.water-sub {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
}

.water-value {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.water-value strong {
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 600;
}

.water-value strong em {
  font-style: normal;
  font-size: 11px;
  color: var(--muted);
}

.trend {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
}

.trend-rising { color: var(--tone-blue-ink); }
.trend-falling { color: var(--accent-2-ink); }
.trend-steady { color: var(--muted); }

.water-spark {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 8px;
}

.water-spark .sparkline {
  flex: 1;
  width: 100%;
  height: 30px;
}

.water-change {
  flex: none;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
}

.sparkline {
  display: block;
  overflow: visible;
}

.sparkline .spark-line {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.sparkline .spark-area {
  fill: currentColor;
  stroke: none;
  opacity: 0.12;
}

/* videos */
.video-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.video-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  padding: 10px 11px 10px 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(99, 215, 255, 0.05), rgba(var(--wash-rgb), 0.01));
  text-align: left;
  overflow: hidden;
  color: inherit;
  text-decoration: none;
  transition: border-color 0.16s, background 0.16s;
}

.video-card.is-live {
  border-color: rgba(255, 107, 87, 0.32);
  background: linear-gradient(135deg, rgba(255, 107, 87, 0.09), rgba(var(--wash-rgb), 0.01));
}

.video-card.is-live .video-signal {
  animation: badge-pulse 1.8s ease-in-out infinite;
}

.video-card.is-off {
  opacity: 0.72;
  background: linear-gradient(135deg, rgba(var(--wash-rgb), 0.02), transparent);
}

.video-card.is-off:hover {
  opacity: 1;
  border-color: rgba(99, 215, 255, 0.28);
}

.video-card.is-off .video-signal {
  background: rgba(120, 140, 150, 0.14);
  color: var(--muted);
}

.video-card.is-off .video-network {
  color: var(--muted);
}

.video-status {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 1px 5px;
  border: 1px solid rgba(255, 107, 87, 0.35);
  border-radius: 999px;
  background: rgba(255, 107, 87, 0.16);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--tone-red-ink);
}

.video-card:hover {
  border-color: rgba(99, 215, 255, 0.35);
  background: linear-gradient(135deg, rgba(99, 215, 255, 0.1), rgba(var(--wash-rgb), 0.02));
}

.video-signal {
  position: absolute;
  left: 9px;
  top: 12px;
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(255, 107, 87, 0.14);
  color: var(--tone-salmon-ink);
}

.video-network {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--accent-2-ink);
}

.video-card strong {
  font-size: 12px;
  font-weight: 600;
}

.video-card small {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  color: var(--muted);
}

.source-note {
  margin: 10px 0 0;
  font-size: 11px;
  line-height: 1.4;
  color: var(--muted-2);
}

/* A source note that is carrying bad news, not just provenance. */
.source-note.is-warn {
  color: var(--tone-amber-ink);
}

/* ------------------------------------------------------------------ pulse */
.pulse {
  display: grid;
  grid-template-columns: 1.7fr 1fr;
  gap: 14px;
  margin-top: 18px;
  align-items: start;
}

.pulse-feed,
.pulse-side {
  min-width: 0;
}

.pulse-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  padding: 0 2px 13px;
}

.pulse-head h2 {
  margin: 2px 0 0;
  font-size: clamp(19px, 1.8vw, 25px);
  font-weight: 650;
  letter-spacing: -0.025em;
}

.pulse-head .mono {
  font-size: 11.5px;
  color: var(--muted);
}

.timeline {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0;
  padding-left: 4px;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 14px;
  bottom: 14px;
  left: 57px;
  width: 1px;
  background: linear-gradient(180deg, var(--line-strong), var(--line) 70%, transparent);
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 44px 18px 1fr;
  gap: 8px;
  padding: 11px 12px 11px 0;
  border-radius: 8px;
  transition: background 0.15s;
}

.timeline-item:hover {
  background: rgba(var(--wash-rgb), 0.025);
}

.timeline-time {
  padding-top: 2px;
  font-size: 11px;
  color: var(--muted);
  text-align: right;
}

.timeline-node {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  margin-left: -1px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: rgb(var(--tint-void));
  color: var(--accent-2-ink);
}

.timeline-item.tone-critical .timeline-node { color: var(--tone-red-ink); border-color: rgba(255, 77, 77, 0.45); }
.timeline-item.tone-high .timeline-node { color: var(--tone-salmon-ink); border-color: rgba(255, 107, 87, 0.4); }
.timeline-item.tone-medium .timeline-node { color: var(--tone-amber-ink); border-color: rgba(255, 200, 87, 0.4); }
.timeline-item.tone-low .timeline-node { color: var(--accent-2-ink); }

.timeline-body {
  min-width: 0;
  padding-bottom: 2px;
}

.timeline-kicker {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--muted);
}

.timeline-body h3 {
  margin: 2px 0 3px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
}

.timeline-body p {
  margin: 0 0 4px;
  font-size: 11px;
  line-height: 1.45;
  color: var(--text-2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.timeline-body small {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted-2);
  letter-spacing: 0.03em;
}

.pulse-side {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pulse-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(var(--tint-panel), 0.5), rgba(var(--tint-void), 0.7));
}

.pulse-card .section-head {
  margin-bottom: 11px;
}

.aqi-block {
  display: flex;
  align-items: center;
  gap: 14px;
}

.aqi-ring {
  position: relative;
  display: grid;
  place-items: center;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  flex: none;
}

.aqi-ring::after {
  content: "";
  position: absolute;
  inset: 7px;
  border-radius: 50%;
  background: var(--panel);
}

.aqi-ring > div {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1;
}

.aqi-ring strong {
  font-family: var(--mono);
  font-size: 27px;
  font-weight: 600;
}

.aqi-ring span {
  margin-top: 2px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.aqi-copy {
  min-width: 0;
}

.aqi-copy strong {
  font-size: 13px;
}

.aqi-copy p {
  margin: 4px 0 4px;
  font-size: 11.5px;
  line-height: 1.4;
  color: var(--text-2);
}

.aqi-copy small {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted-2);
}

.aqi-history {
  margin-top: 10px;
}

.aqi-history .sparkline {
  width: 100%;
  height: 46px;
}

.aqi-history-meta {
  display: flex;
  justify-content: space-between;
  margin-top: 2px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
}

.forecast-line {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
  font-size: 11.5px;
  color: var(--muted);
}

.rwis-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.rwis-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 7px;
  border-bottom: 1px solid var(--line);
}

.rwis-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.rwis-row strong {
  display: block;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rwis-row small {
  font-size: 11px;
  color: var(--muted);
}

.rwis-temps {
  display: flex;
  gap: 7px;
  flex: none;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
}

.pulse-water {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.pulse-water-row {
  display: grid;
  grid-template-columns: 1fr 64px auto auto;
  gap: 8px;
  align-items: center;
  font-size: 11.5px;
}

.pulse-water-row span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pulse-water-row strong {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
}

.pulse-water-row small {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
}

.pulse-water-spark .sparkline {
  width: 64px;
  height: 16px;
}

.pulse-water-spark:empty {
  display: none;
}

.place-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.place-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  transition: border-color 0.16s, transform 0.16s;
}

.place-card:hover {
  border-color: var(--line-strong);
  transform: translateY(-2px);
}

.place-card img {
  width: 100%;
  height: 48px;
  object-fit: cover;
  border-radius: 4px;
  background: rgba(var(--wash-rgb), 0.04);
}

.place-card span {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 0 2px 1px;
}

.place-card strong {
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.place-card small {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
}

/* ------------------------------------------------------------------- ads */
.ad-region {
  margin-top: 18px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.ad-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.ad-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.ad-privacy {
  color: var(--muted);
  font-size: 11px;
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 3px;
}

.ad-privacy:hover {
  color: var(--accent-ink);
}

.ad-slot {
  width: 100%;
  max-width: 300px;
  min-height: 50px;
  margin-inline: auto;
}

.ad-slot ins {
  display: block;
  width: 100%;
}

/* ---------------------------------------------------------------- beta bar */
.beta-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 5px 16px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--accent) 8%, var(--panel));
  font-size: 11.5px;
  color: var(--text-2);
}

.beta-tag {
  flex: none;
  padding: 1px 7px;
  border-radius: 99px;
  background: var(--accent);
  color: var(--on-accent);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.18em;
}

.beta-text {
  letter-spacing: 0.02em;
}

.beta-close {
  display: inline-flex;
  flex: none;
  margin-left: 4px;
  /* 24x24 CSS px is the floor for any pointer (WCAG 2.5.8); the icon inside
     stays 12px, so this reads as a quiet control and still takes a tap. */
  padding: 6px;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--muted);
  cursor: pointer;
}

.beta-close:hover {
  color: var(--text);
}

.consent-bar {
  position: fixed;
  right: 16px;
  bottom: 16px;
  left: 16px;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  max-width: 760px;
  margin: 0 auto;
  padding: 14px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 18px 50px rgba(19, 42, 51, 0.18);
  font-size: 11px;
  color: var(--text-2);
}

.consent-bar p {
  margin: 0;
  max-width: 520px;
}

.consent-bar a {
  color: var(--accent-ink);
}

.consent-actions {
  display: flex;
  gap: 8px;
}

/* ----------------------------------------------------------------- footer */
.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  margin-top: 34px;
  padding: 18px 2px 0;
  border-top: 1px solid var(--line);
  font-size: 11.5px;
  color: var(--muted);
}

.sponsor-slot {
  flex: 1 0 100%;
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  padding: 0 0 12px;
  border-bottom: 1px solid var(--line);
  font-size: 11.5px;
}

.sponsor-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.sponsor-name {
  color: var(--accent-ink);
  font-size: 11px;
  font-weight: 600;
  text-decoration: none;
}

a.sponsor-name:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.sponsor-message {
  color: var(--text-2);
}

.footer > div:first-child {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}

.footer strong {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--text-2);
}

.footer-meta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 11px;
  color: var(--muted-2);
}

.footer-actions {
  display: flex;
  gap: 14px;
}

.link-btn {
  /* Footer links are discrete targets in a row, not links inside a
     sentence, so the inline exception does not cover them: 24px box. */
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 0;
  color: var(--muted);
  font-size: 11.5px;
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 3px;
  transition: color 0.15s;
}

.link-btn:hover {
  color: var(--accent-ink);
}

/* ------------------------------------------------------------------ modal */
.modal {
  max-width: none;
  max-height: none;
  width: auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
}

.modal::backdrop {
  background: rgba(3, 6, 8, 0.78);
  backdrop-filter: blur(8px);
}

.modal[open] {
  animation: modal-pop 0.22s ease-out;
}

@keyframes modal-pop {
  from { opacity: 0; transform: scale(0.985) translateY(6px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-frame {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(1100px, 94vw);
  max-height: 90vh;
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  background: linear-gradient(180deg, rgb(var(--tint-panel)), rgb(var(--tint-void)));
  box-shadow: 0 40px 120px rgba(19, 42, 51, 0.22);
  overflow: hidden;
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px 12px;
  border-bottom: 1px solid var(--line);
}

.modal-title h2 {
  margin: 3px 0 2px;
  font-size: 19px;
  font-weight: 650;
  letter-spacing: -0.015em;
}

.modal-title p {
  margin: 0;
  font-size: 11px;
  color: var(--muted);
}

.modal-body {
  min-height: 0;
  overflow: auto;
}

.modal-foot {
  padding: 12px 20px;
  border-top: 1px solid var(--line);
}

.theater-media {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--screen-deep);
}

.theater-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.theater-media .media-top {
  top: 12px;
  left: 12px;
  right: 12px;
}

.theater-index {
  position: absolute;
  right: 12px;
  bottom: 11px;
  padding: 3px 8px;
  border-radius: 5px;
  background: rgba(var(--tint-void), 0.75);
  font-size: 11px;
  color: var(--text-2);
}

.theater-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.theater-actions .mono {
  margin-left: auto;
  font-size: 11px;
  color: var(--muted);
}

.about-modal .modal-frame {
  width: min(920px, 94vw);
}

.about-content {
  padding: 30px 32px 26px;
  overflow-y: auto;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
}

.about-hero {
  padding-right: 34px;
}

.about-hero h2 {
  margin: 6px 0 10px;
  max-width: 700px;
  font-size: clamp(22px, 2.4vw, 33px);
  font-weight: 650;
  line-height: 1.12;
  letter-spacing: -0.03em;
}

.about-hero p {
  max-width: 720px;
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-2);
}

.about-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 30px;
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.about-grid h3 {
  margin: 16px 0 8px;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.about-grid h3:first-child {
  margin-top: 0;
}

.about-sources {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.about-source {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  transition: border-color 0.15s, background 0.15s;
}

.about-source:hover {
  border-color: var(--line-strong);
  background: rgba(var(--wash-rgb), 0.025);
}

.about-source strong {
  font-size: 11.5px;
  font-weight: 600;
}

.about-source span {
  font-size: 11.5px;
  color: var(--muted);
}

.about-source small {
  margin-top: 2px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted-2);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.code-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.code-list code {
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(var(--tint-void), 0.5);
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--accent-2-ink);
}

.about-copy {
  margin: 0;
  font-size: 11.5px;
  line-height: 1.6;
  color: var(--text-2);
}

.about-copy code {
  padding: 1px 4px;
  border-radius: 3px;
  background: rgba(var(--wash-rgb), 0.06);
  font-family: var(--mono);
  font-size: 11.5px;
}

.about-disclaimer {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 11px;
  line-height: 1.6;
  color: var(--muted-2);
}

/* --------------------------------------------------------------- responsive */
@media (max-width: 1400px) {
  .secondary {
    grid-template-columns: 1.4fr 1.05fr 1fr;
  }

  .videos-panel {
    grid-column: span 3;
  }

  .video-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
  }

  .wall-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1180px) {
  .top-status .aqi-item {
    display: none;
  }

  .pulse {
    grid-template-columns: 1.4fr 1fr;
  }

  .news-columns {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .place-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .spotlight {
    width: min(350px, calc(100% - 32px));
  }
}

@media (max-width: 980px) {
  :root {
    --topbar-h: auto;
  }

  .topbar {
    flex-wrap: wrap;
    gap: 10px;
    padding-bottom: 12px;
  }

  .brand-wrap {
    flex: 1 1 auto;
  }

  .top-status {
    flex: 1 1 auto;
    justify-content: flex-end;
  }

  .secondary {
    grid-template-columns: 1fr 1fr;
  }

  .videos-panel {
    grid-column: auto;
  }

  .video-grid {
    display: flex;
  }

  .pulse {
    grid-template-columns: 1fr;
  }

  .news-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .news-head-meta {
    align-items: flex-start;
    text-align: left;
    white-space: normal;
  }

  .pulse-side {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }

  .wall-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stage {
    height: auto;
    min-height: 0;
  }

  .view-map {
    position: relative;
    display: flex;
    flex-direction: column;
  }

  .map {
    position: relative;
    inset: auto;
    height: 62vh;
    min-height: 420px;
  }

  .map::after {
    display: none;
  }

  .map-corner.top-left {
    top: 12px;
    left: 14px;
  }

  .spotlight {
    position: relative;
    top: auto;
    right: auto;
    bottom: auto;
    width: auto;
    margin: 12px;
    max-height: none;
  }

  .spotlight-media {
    aspect-ratio: 16 / 8;
  }

  .ticker-wrap {
    position: relative;
    padding: 9px 14px;
    background: rgb(var(--tint-void));
    border-top: 1px solid var(--line);
  }

  .radar-chip {
    bottom: auto;
    top: 12px;
    left: auto;
    right: 12px;
  }

  .view-wall {
    position: relative;
    min-height: 70vh;
  }

  .stage-bar {
    padding-top: 6px;
  }
}

@media (max-width: 700px) {
  /* Below the width where the status row can hold words next to the clock,
     the icon becomes the whole control again. It is a known icon (refresh,
     info, walk), so nothing is lost but the width. */
  .icon-btn.top-action {
    width: 36px;
    padding: 0;
  }

  .top-action-label {
    display: none;
  }
}

@media (max-width: 760px) {
  body {
    font-size: 14px;
  }

  .app {
    padding: 0 10px 30px;
  }

  .brand-text strong {
    font-size: 15px;
  }

  .brand-text small {
    font-size: 11px;
  }

  .status-item {
    display: none;
  }

  .clock {
    border-left: 0;
    padding-left: 0;
    gap: 6px;
  }

  .clock-time {
    font-size: 14px;
  }

  .clock-zone {
    display: none;
  }

  .filters {
    padding: 9px 0;
    gap: 6px;
  }

  .filter-btn {
    padding: 7px 10px;
    font-size: 11.5px;
  }

  .filter-count {
    display: none;
  }

  .toolbar {
    flex-wrap: wrap;
    align-items: stretch;
  }

  .toolbar-left {
    flex-basis: 100%;
  }

  .searchbox {
    width: 100%;
  }

  .groups {
    order: 3;
  }

  .toolbar-right {
    flex-basis: 100%;
    justify-content: space-between;
  }

  .layer-panel-inner {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .stage-actions .mono {
    display: none;
  }

  .map {
    height: 54vh;
    min-height: 360px;
  }

  .spotlight-media {
    aspect-ratio: 16 / 9;
  }

  .secondary {
    grid-template-columns: 1fr;
  }

  .daily-row {
    grid-template-columns: repeat(5, 1fr);
  }

  .pulse-side {
    grid-template-columns: 1fr;
  }

  .wall-grid {
    grid-template-columns: 1fr;
  }

  .wall-bar {
    align-items: flex-start;
  }

  .wall-tools .mono {
    display: none;
  }

  .about-content {
    padding: 24px 18px 20px;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .modal-frame {
    width: 96vw;
    max-height: 94vh;
  }

  .theater-actions .mono {
    margin-left: 0;
  }

  .footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .map-corner.top-left {
    display: none;
  }
}

@media (max-width: 460px) {
  .brand-wrap {
    gap: 8px;
  }

  .status-item.aqi-item {
    display: none;
  }

  .filter-icon {
    display: none;
  }

  .seg-btn {
    padding: 6px 11px;
  }
}

/* Touch targets. This wall is read on a phone as often as on a desk, and a
   31px-tall chip is a coin flip with a thumb. 44px is the platform floor, and
   it is applied only to coarse pointers so the desktop density stays dense. */
@media (pointer: coarse) {
  .filter-btn,
  .chip,
  .btn,
  .btn.sm,
  .icon-btn,
  .seg-btn,
  .layer-btn,
  .county-picker,
  .window-btn,
  .radar-toggle,
  .beta-close,
  .searchbox input,
  .wall-more,
  .suggest-row {
    min-height: 44px;
  }

  .chip,
  .filter-btn,
  .icon-btn,
  .seg-btn,
  .radar-toggle,
  .beta-close,
  .window-btn {
    min-width: 44px;
  }

  /* A row of 44px targets needs breathing room, or the tap lands on the
     neighbour's edge instead. */
  .filters,
  .groups,
  .toolbar-right {
    gap: 12px;
  }

  .section-nav-link,
  .list-more {
    min-height: 44px;
    padding-block: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
