/* =========================================================
   WX Viewer — Theme Refresh (desktop)
   Layered on top of style.css to modernize the visual feel.
   Touches colors, radii, typography, panels, buttons, and
   micro-interactions without changing layout structure.
   ========================================================= */

/* Palette tokens live in tokens.css (loaded first). */

/* ── Ambient background ─────────────────────────────────── */
body {
  background: var(--bg-deep);
  font-feature-settings: "cv11", "ss03", "ss08";
}

/* ── Top bar: cleaner, more modern ──────────────────────── */
.topbar {
  background:
    linear-gradient(180deg, rgba(13, 26, 45, 0.94) 0%, rgba(5, 9, 22, 0.9) 100%);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(14px) saturate(1.15);
  -webkit-backdrop-filter: blur(14px) saturate(1.15);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.025), 0 10px 30px -20px rgba(0, 0, 0, 0.8);
}

/* Thin cyan→violet hairline under the topbar */
.topbar::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(82, 215, 255, 0.44) 24%,
    rgba(255, 204, 102, 0.38) 58%,
    transparent 100%);
  opacity: 0.7;
  pointer-events: none;
}

/* Brand wordmark upgrade */
.brand {
  gap: 9px;
  padding: 2px 2px 2px 0;
}
.brand-icon {
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(82, 215, 255, 0.16), rgba(255, 204, 102, 0.1));
  color: #d9f4ff;
  opacity: 1;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 0 0 1px rgba(82, 215, 255, 0.28),
    0 8px 18px -10px rgba(82, 215, 255, 0.55);
}
.brand-text {
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.18em;
  color: #e7eefb;
  text-transform: uppercase;
}
.brand-accent {
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: 700;
}

.topbar-divider {
  background: linear-gradient(180deg, transparent, var(--border-strong), transparent);
  height: 22px;
}

/* ── Source tabs — sleeker pill group ───────────────────── */
.source-tabs {
  gap: 2px;
  padding: 4px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
}
.source-tab {
  padding: 7px 13px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--text-mid);
  transition: color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}
.source-tab:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}
.source-tab.active {
  color: #eef9ff;
  background: linear-gradient(180deg, rgba(82, 215, 255, 0.22), rgba(82, 215, 255, 0.08));
  border: 1px solid rgba(82, 215, 255, 0.42);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.09),
    0 6px 18px -10px rgba(82, 215, 255, 0.7);
}
.source-tab.active svg { opacity: 1; color: var(--accent-bright); }
.source-tab svg { transition: transform 0.2s ease; }
.source-tab:hover svg { transform: translateY(-0.5px); }

/* ── Capture / icon buttons on the topbar ──────────────── */
.capture-btn {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.025);
  color: var(--text-mid);
  transition: color 0.18s ease, background 0.18s ease, border-color 0.18s ease,
              transform 0.15s ease, box-shadow 0.18s ease;
}
.capture-btn:hover {
  background: rgba(82, 215, 255, 0.09);
  border-color: rgba(82, 215, 255, 0.38);
  color: var(--accent-bright);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 6px 16px -10px rgba(82, 215, 255, 0.75);
}
.capture-btn:active { transform: translateY(1px) scale(0.98); }
.capture-btn svg { width: 19px; height: 19px; }

/* Hover value chip (top-right readout) */
.hover-value {
  border-radius: 8px;
  padding: 6px 14px;
  font-size: 11.5px;
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(82, 215, 255, 0.22);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.hover-value.active {
  border-color: rgba(82, 215, 255, 0.55);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 0 0 1px rgba(82, 215, 255, 0.18),
    0 8px 20px -12px rgba(82, 215, 255, 0.6);
}
.hover-value .value { color: var(--accent-bright); }

/* ── Selects ─────────────────────────────────────────────── */
.select {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 6px 12px;
  color: var(--text);
  font-family: var(--font-data);
  font-size: 11px;
  transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}
.select:hover { border-color: var(--border-strong); background: rgba(255, 255, 255, 0.05); }
.select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(82, 215, 255, 0.16); }

/* ── Parameter sidebar ───────────────────────────────────── */
.param-sidebar {
  background:
    linear-gradient(180deg, rgba(12, 16, 28, 0.96) 0%, rgba(7, 10, 19, 0.96) 100%);
  border-right: 1px solid var(--border);
}
.sidebar-section--model-picker {
  background:
    linear-gradient(180deg, rgba(18, 22, 36, 0.98), rgba(12, 15, 26, 0.96));
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.02);
}
.sidebar-label {
  font-size: 9.5px;
  letter-spacing: 0.16em;
  color: var(--text-mid);
}
.section-label {
  font-size: 9.5px;
  letter-spacing: 0.18em;
  color: var(--text-mid);
  padding: 2px 2px 10px;
}

.sidebar-section--ops-picks {
  background:
    linear-gradient(180deg, rgba(20, 36, 58, 0.9), rgba(7, 17, 31, 0.92));
}

.ops-pick-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.ops-pick-grid .param-btn {
  min-height: 34px;
  padding: 8px 9px;
  border: 1px solid rgba(255, 255, 255, 0.075);
  background: rgba(255, 255, 255, 0.035);
}

.ops-pick-grid .param-btn:hover {
  border-color: rgba(82, 215, 255, 0.38);
  background: rgba(82, 215, 255, 0.08);
}

.ops-pick-grid .param-btn.active {
  border-color: rgba(82, 215, 255, 0.5);
}

/* Param group collapsible header */
.param-group-toggle {
  border-radius: 7px;
  font-size: 12.5px;
  color: var(--text);
  padding: 8px 8px;
}
.param-group-toggle:hover {
  background: rgba(82, 215, 255, 0.07);
  color: var(--accent-bright);
}

/* Param buttons — modern list rows */
.param-btn {
  position: relative;
  padding: 7px 12px 7px 14px;
  font-size: 12px;
  color: var(--text-mid);
  border-radius: 7px;
  border-left: 2px solid transparent;
  transition: color 0.18s ease, background 0.18s ease, border-left-color 0.18s ease;
}
.param-btn::before {
  content: '';
  position: absolute;
  left: 0; top: 20%; bottom: 20%;
  width: 2px;
  border-radius: 2px;
  background: transparent;
  transition: background 0.18s ease;
}
.param-btn .param-icon {
  width: 5px; height: 5px;
  background: var(--text-dim);
}
.param-btn:hover {
  background: rgba(255, 255, 255, 0.035);
  color: var(--text);
}
.param-btn:hover .param-icon { background: var(--text-mid); }
.param-btn.active {
  background: linear-gradient(90deg, rgba(82, 215, 255, 0.18), rgba(82, 215, 255, 0.04) 80%);
  color: var(--accent-bright);
  border-left-color: transparent;
  font-weight: 500;
}
.param-btn.active::before { background: var(--accent); box-shadow: 0 0 10px var(--accent-dim); }
.param-btn.active .param-icon {
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent-dim);
}

/* Sidebar action button (e.g., sounding probe) */
.sidebar-action-btn {
  border-radius: 10px;
  border: 1px solid rgba(82, 215, 255, 0.18);
  background:
    linear-gradient(180deg, rgba(30, 38, 56, 0.9), rgba(14, 18, 30, 0.9));
  color: var(--text);
  font-size: 11px;
  letter-spacing: 0.08em;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 4px 14px -8px rgba(0, 0, 0, 0.55);
}
.sidebar-action-btn:hover {
  border-color: rgba(82, 215, 255, 0.5);
  background: linear-gradient(180deg, rgba(42, 55, 82, 0.95), rgba(20, 26, 42, 0.95));
  color: var(--accent-bright);
}
.sidebar-action-btn.active {
  background:
    linear-gradient(180deg, rgba(82, 215, 255, 0.28), rgba(40, 56, 90, 0.85));
  border-color: rgba(82, 215, 255, 0.6);
  color: #f2faff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 8px 22px -10px rgba(82, 215, 255, 0.6);
}

/* ── Floating home panels (layers + side) ───────────────── */
.home-layer-panel,
.home-side-panel {
  background:
    linear-gradient(180deg, rgba(14, 18, 30, 0.82), rgba(8, 10, 18, 0.82));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(18px) saturate(1.15);
  -webkit-backdrop-filter: blur(18px) saturate(1.15);
}
.home-layer-panel {
  padding: 14px 16px 14px;
}
.home-panel-header {
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--text-mid);
  margin-bottom: 8px;
}
.home-layer-check {
  font-size: 12.5px;
  padding: 4px 2px;
  border-radius: 5px;
  transition: background 0.15s ease;
}
.home-layer-check:hover { background: rgba(255, 255, 255, 0.04); }
.home-layer-group-label,
.home-layer-subgroup-label {
  font-size: 9.5px;
  color: var(--text-mid);
  letter-spacing: 0.14em;
}

.home-layer-collapse,
.home-side-collapse {
  width: 26px; height: 26px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.home-layer-collapse:hover,
.home-side-collapse:hover {
  background: rgba(82, 215, 255, 0.14);
  border-color: rgba(82, 215, 255, 0.4);
  color: var(--accent-bright);
}

/* Side panel tabs */
.side-panel-tabs {
  border-bottom: 1px solid var(--border);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.025), transparent);
}
.side-tab {
  font-size: 10.5px;
  letter-spacing: 0.14em;
  color: var(--text-mid);
  border-bottom: 2px solid transparent;
  padding: 12px 0;
}
.side-tab.active {
  color: var(--accent-bright);
  border-bottom-color: var(--accent);
}

/* Quicklook cards */
.side-ql-item {
  padding: 11px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.012));
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}
.side-ql-item:hover {
  border-color: rgba(82, 215, 255, 0.4);
  background:
    linear-gradient(180deg, rgba(82, 215, 255, 0.08), rgba(82, 215, 255, 0.02));
  transform: translateY(-1px);
  box-shadow: 0 10px 24px -14px rgba(82, 215, 255, 0.45);
}
.side-ql-title { color: #f2f7ff; }
.side-ql-kicker {
  color: var(--text-mid);
  letter-spacing: 0.14em;
  font-size: 9px;
}

/* Warning cards (risk signal) */
.warning-card {
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--border);
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}
.warning-card:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: var(--border-strong);
  transform: translateX(2px);
  box-shadow: 0 10px 24px -16px rgba(0, 0, 0, 0.7);
}
.warning-card--tor {
  border-left: 3px solid var(--danger);
  background:
    linear-gradient(90deg, rgba(248, 113, 113, 0.14), rgba(248, 113, 113, 0.035) 70%);
}
.warning-card--tor:hover {
  background:
    linear-gradient(90deg, rgba(248, 113, 113, 0.22), rgba(248, 113, 113, 0.06) 70%);
}
.warning-card--svr {
  border-left: 3px solid var(--warn);
  background:
    linear-gradient(90deg, rgba(250, 204, 21, 0.1), rgba(250, 204, 21, 0.02) 70%);
}
.warning-card--ffw {
  border-left: 3px solid var(--ok);
  background:
    linear-gradient(90deg, rgba(52, 211, 153, 0.1), rgba(52, 211, 153, 0.02) 70%);
}

/* ── Map legend ──────────────────────────────────────────── */
.map-legend {
  background:
    linear-gradient(180deg, rgba(14, 18, 30, 0.82), rgba(8, 10, 18, 0.82));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 10px 14px 12px;
  backdrop-filter: blur(14px) saturate(1.15);
  -webkit-backdrop-filter: blur(14px) saturate(1.15);
  box-shadow: var(--shadow-md);
}
.legend-label {
  color: var(--text);
  letter-spacing: 0.05em;
  font-size: 11px;
}
.legend-canvas { border-radius: 4px; }

/* ── Map info overlay (brand + title) ──────────────────── */
.map-info-overlay { gap: 5px; }
.map-info-model {
  color: rgba(229, 240, 255, 0.92);
  letter-spacing: 0.14em;
  font-weight: 600;
}
.map-info-product { color: rgba(200, 215, 240, 0.78); }
.map-info-time { color: rgba(159, 227, 255, 0.82); }

/* Map watermark logo (bottom-left) */
.map-logo {
  color: rgba(214, 225, 240, 0.72);
  letter-spacing: 0.16em;
}
.map-logo svg { stroke: rgba(159, 227, 255, 0.8); opacity: 0.9; }
.map-logo-accent {
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ── Scrubber bar — refined glass ───────────────────────── */
.scrubber-bar {
  background:
    linear-gradient(180deg, rgba(14, 18, 30, 0.68), rgba(8, 10, 18, 0.72));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 14px 20px 16px;
  box-shadow:
    0 24px 60px -24px rgba(0, 0, 0, 0.7),
    0 0 0 1px rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(22px) saturate(1.3);
  -webkit-backdrop-filter: blur(22px) saturate(1.3);
}

/* Play button becomes a solid accent circle */
.play-btn {
  width: 38px;
  height: 38px;
  background: var(--accent-grad);
  color: #0a0d17;
  border: none;
  box-shadow:
    0 8px 20px -6px rgba(82, 215, 255, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
  font-size: 14px;
}
.play-btn:hover {
  background: var(--accent-grad);
  color: #06080f;
  transform: scale(1.06);
  filter: brightness(1.08);
  box-shadow:
    0 10px 24px -6px rgba(82, 215, 255, 0.75),
    inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

/* Speed segmented buttons — cleaner pills */
.speed-btn {
  padding: 5px 11px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  color: var(--text-mid);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  transition: color 0.18s ease, background 0.18s ease, border-color 0.18s ease, transform 0.12s ease;
}
.speed-btn:hover {
  color: #fff;
  background: rgba(82, 215, 255, 0.12);
  border-color: rgba(82, 215, 255, 0.45);
}
.speed-btn.active {
  color: #06080f;
  background: var(--accent-grad);
  border-color: transparent;
  box-shadow: 0 6px 16px -8px rgba(82, 215, 255, 0.65);
}

/* Scrubber slider polish */
.scrubber {
  height: 5px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 999px;
}
.scrubber::-webkit-slider-thumb {
  width: 16px; height: 16px;
  background: #f3faff;
  border: 2px solid #0a0d17;
  box-shadow:
    0 0 0 2px rgba(82, 215, 255, 0.35),
    0 4px 12px rgba(82, 215, 255, 0.4);
}
.scrubber::-webkit-slider-thumb:hover {
  transform: scale(1.1);
  box-shadow:
    0 0 0 3px rgba(82, 215, 255, 0.5),
    0 6px 18px rgba(82, 215, 255, 0.55);
}
.scrubber::-moz-range-thumb {
  width: 16px; height: 16px;
  background: #f3faff;
  border: 2px solid #0a0d17;
  box-shadow: 0 0 0 2px rgba(82, 215, 255, 0.35);
}

.valid-time {
  color: var(--text);
  letter-spacing: 0.04em;
}
.frame-counter { color: var(--text-mid); }
.scrubber-hint { opacity: 0.45; }

/* ── Map loading card — airier ──────────────────────────── */
.map-loading-card {
  border: 1px solid rgba(82, 215, 255, 0.22);
  border-radius: 14px;
  background: rgba(10, 13, 23, 0.9);
  box-shadow: var(--shadow-lg);
}
.map-loading-spinner {
  border-color: rgba(82, 215, 255, 0.18);
  border-top-color: var(--accent-bright);
}
.map-loading-text {
  color: var(--accent-bright);
  letter-spacing: 0.08em;
}

/* ── Scrollbars (WebKit) ────────────────────────────────── */
.param-sidebar::-webkit-scrollbar,
.side-panel-pane::-webkit-scrollbar,
.home-layer-panel::-webkit-scrollbar {
  width: 8px;
}
.param-sidebar::-webkit-scrollbar-track,
.side-panel-pane::-webkit-scrollbar-track,
.home-layer-panel::-webkit-scrollbar-track {
  background: transparent;
}
.param-sidebar::-webkit-scrollbar-thumb,
.side-panel-pane::-webkit-scrollbar-thumb,
.home-layer-panel::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
.param-sidebar::-webkit-scrollbar-thumb:hover,
.side-panel-pane::-webkit-scrollbar-thumb:hover,
.home-layer-panel::-webkit-scrollbar-thumb:hover {
  background: rgba(82, 215, 255, 0.3);
  background-clip: padding-box;
}

/* ── Toggle labels (warnings / mcds / etc.) ────────────── */
.toggle-label {
  color: var(--text-mid);
}
.toggle-slider { transition: background 0.18s ease, box-shadow 0.18s ease; }

/* ── Subtle entrance ────────────────────────────────────── */
@keyframes wx-fade-up {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.home-layer-panel,
.home-side-panel,
.scrubber-bar,
.map-legend {
  animation: wx-fade-up 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* ── Focus ring consistency ─────────────────────────────── */
button:focus-visible,
.select:focus-visible,
.source-tab:focus-visible,
.param-btn:focus-visible,
.capture-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(82, 215, 255, 0.5), 0 0 0 4px rgba(82, 215, 255, 0.12);
}

/* ── Chase tab preserves its orange identity ───────────── */
.source-tab[data-source="chase"] {
  color: #ff8a3d;
}
.source-tab[data-source="chase"]:hover {
  color: #ffb070;
  background: rgba(255, 138, 60, 0.08);
}
.source-tab[data-source="chase"].active {
  color: #ffd1a8;
  background: linear-gradient(180deg, rgba(255, 138, 60, 0.22), rgba(255, 138, 60, 0.08));
  border: 1px solid rgba(255, 138, 60, 0.45);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.09),
    0 6px 18px -10px rgba(255, 138, 60, 0.7);
}
.source-tab[data-source="chase"].active svg { color: #ffd1a8; }

/* ── Responsive: tighten tabs on narrow screens ─────────── */
@media (max-width: 1180px) {
  .source-tab { padding: 6px 10px; font-size: 11.5px; }
}

/* =========================================================
   Broadcast Polish — sitewide desktop layer
   Final layer for the 2026 whole-site refresh.
   ========================================================= */

/* Broadcast Polish palette is now the canonical token set in
   tokens.css — no :root override needed here. */

html,
body {
  background:
    radial-gradient(1200px 720px at 12% -18%, rgba(82, 215, 255, 0.13), transparent 60%),
    radial-gradient(980px 720px at 92% -10%, rgba(141, 125, 255, 0.12), transparent 58%),
    radial-gradient(900px 520px at 80% 110%, rgba(255, 204, 102, 0.08), transparent 62%),
    var(--bg-deep);
}

button,
select,
input {
  font: inherit;
}

/* Top bar and brand */
.topbar {
  background:
    linear-gradient(180deg, rgba(9, 20, 36, 0.96), rgba(5, 10, 21, 0.92));
  border-bottom-color: rgba(154, 221, 255, 0.16);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.035),
    0 18px 42px -32px rgba(82, 215, 255, 0.56);
}

.topbar::after {
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(82, 215, 255, 0.62) 18%,
    rgba(141, 125, 255, 0.55) 50%,
    rgba(255, 204, 102, 0.52) 76%,
    transparent 100%);
}

.topbar-left {
  flex: 1 1 auto;
  min-width: 0;
}

.topbar-right {
  flex-shrink: 0;
}

.brand {
  min-width: max-content;
}

.brand-icon {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(82, 215, 255, 0.18), rgba(141, 125, 255, 0.09)),
    rgba(255, 255, 255, 0.035);
  color: var(--accent-bright);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 0 0 1px rgba(82, 215, 255, 0.3),
    0 10px 24px -16px rgba(82, 215, 255, 0.85);
  overflow: hidden;
}

.brand-icon img,
.top-logo-mark,
.map-logo-mark {
  display: block;
  width: 100%;
  height: 100%;
}

.brand-icon svg {
  width: 18px;
  height: 18px;
}

.brand-text {
  color: #f5f9ff;
  font-size: 14px;
  letter-spacing: 0.16em;
}

.brand-accent,
.map-logo-accent,
.sounding-panel-brand-accent {
  background: linear-gradient(135deg, #52d7ff 0%, #b9ecff 46%, #ffcc66 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.source-tabs {
  flex: 1 1 auto;
  max-width: min(720px, 58vw);
  overflow-x: auto;
  scrollbar-width: none;
  border-radius: 999px;
  border-color: rgba(226, 242, 255, 0.1);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.018)),
    rgba(7, 17, 31, 0.74);
}

.source-tabs::-webkit-scrollbar {
  display: none;
}

.source-tab {
  min-height: 34px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: rgba(214, 229, 244, 0.76);
  white-space: nowrap;
}

.source-tab:hover {
  color: #f4f9ff;
  background: rgba(82, 215, 255, 0.08);
}

.source-tab.active {
  color: #f7fbff;
  background:
    linear-gradient(180deg, rgba(82, 215, 255, 0.26), rgba(82, 215, 255, 0.09));
  border-color: rgba(82, 215, 255, 0.52);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 12px 26px -20px rgba(82, 215, 255, 0.95);
}

.source-tab.active svg {
  color: var(--accent-bright);
}

.source-tab[data-source="chase"] {
  color: #ffb56f;
}

.source-tab[data-source="chase"]:hover {
  background: rgba(255, 178, 87, 0.1);
  color: #ffd6a0;
}

.source-tab[data-source="chase"].active {
  color: #fff2d2;
  background:
    linear-gradient(180deg, rgba(255, 178, 87, 0.28), rgba(255, 178, 87, 0.1));
  border-color: rgba(255, 178, 87, 0.56);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 12px 26px -20px rgba(255, 178, 87, 0.88);
}

.select,
.chaser-search,
.sheet-search {
  background: rgba(7, 17, 31, 0.76);
  border-color: rgba(226, 242, 255, 0.12);
  color: #e9f3ff;
}

.select:hover,
.chaser-search:hover {
  border-color: rgba(154, 234, 255, 0.34);
  background: rgba(14, 30, 50, 0.86);
}

.select:focus,
.chaser-search:focus {
  border-color: rgba(82, 215, 255, 0.78);
  box-shadow: 0 0 0 3px rgba(82, 215, 255, 0.16);
}

.capture-btn {
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.018)),
    rgba(7, 17, 31, 0.72);
  border-color: rgba(226, 242, 255, 0.12);
  color: rgba(221, 232, 246, 0.78);
}

.capture-btn:hover {
  background:
    linear-gradient(180deg, rgba(82, 215, 255, 0.16), rgba(82, 215, 255, 0.06));
  border-color: rgba(82, 215, 255, 0.5);
  color: #f7fbff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 12px 28px -20px rgba(82, 215, 255, 0.9);
}

.hover-value {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(7, 17, 31, 0.78);
  border-color: rgba(82, 215, 255, 0.26);
}

.hover-value.active {
  border-color: rgba(82, 215, 255, 0.68);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 0 0 1px rgba(82, 215, 255, 0.16),
    0 14px 30px -22px rgba(82, 215, 255, 0.82);
}

/* Sidebars and controls */
.param-sidebar {
  background:
    linear-gradient(180deg, rgba(10, 22, 39, 0.98), rgba(5, 10, 21, 0.98));
  border-right-color: rgba(154, 221, 255, 0.13);
  box-shadow: 16px 0 44px -38px rgba(82, 215, 255, 0.48);
}

.sidebar-section {
  padding-inline: 14px;
}

.sidebar-section + .sidebar-section {
  border-top-color: rgba(226, 242, 255, 0.08);
}

.sidebar-section--model-picker {
  background:
    linear-gradient(180deg, rgba(15, 34, 58, 0.98), rgba(8, 18, 33, 0.98));
  border-bottom-color: rgba(154, 221, 255, 0.16);
}

.sidebar-section--ops-picks {
  background:
    linear-gradient(180deg, rgba(20, 38, 65, 0.94), rgba(8, 18, 34, 0.94));
}

.sidebar-label,
.section-label,
.home-panel-header,
.home-layer-group-label,
.home-layer-subgroup-label,
.side-ql-kicker {
  color: rgba(155, 174, 197, 0.9);
}

.param-group-toggle {
  color: #e7f0fb;
  border: 1px solid transparent;
}

.param-group-toggle:hover {
  color: var(--accent-bright);
  background: rgba(82, 215, 255, 0.08);
  border-color: rgba(82, 215, 255, 0.1);
}

.param-btn {
  min-height: 29px;
  color: rgba(221, 232, 246, 0.72);
}

.param-btn:hover {
  color: #f7fbff;
  background: rgba(255, 255, 255, 0.055);
}

.param-btn.active {
  background: linear-gradient(90deg, rgba(82, 215, 255, 0.2), rgba(141, 125, 255, 0.055) 78%);
  color: #c6f3ff;
}

.param-btn.active::before {
  background: linear-gradient(180deg, #52d7ff, #8d7dff);
  box-shadow: 0 0 12px rgba(82, 215, 255, 0.62);
}

.ops-pick-grid .param-btn {
  border-radius: 9px;
  border-color: rgba(226, 242, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
}

.ops-pick-grid .param-btn:hover,
.ops-pick-grid .param-btn.active {
  border-color: rgba(82, 215, 255, 0.46);
  background: rgba(82, 215, 255, 0.1);
}

.sidebar-action-btn {
  border-color: rgba(82, 215, 255, 0.24);
  background:
    linear-gradient(180deg, rgba(82, 215, 255, 0.12), rgba(141, 125, 255, 0.07)),
    rgba(7, 17, 31, 0.88);
}

.sidebar-action-btn:hover,
.sidebar-action-btn.active {
  border-color: rgba(82, 215, 255, 0.62);
  color: #f7fbff;
}

/* Floating map panels */
.home-layer-panel,
.home-side-panel,
.map-legend,
.spc-legend,
.map-overlay-control,
.map-loading-card,
.no-data-msg,
.map-notice-overlay {
  background:
    linear-gradient(180deg, rgba(12, 27, 48, 0.86), rgba(5, 10, 21, 0.82));
  border-color: rgba(226, 242, 255, 0.13);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(20px) saturate(1.22);
  -webkit-backdrop-filter: blur(20px) saturate(1.22);
}

.home-layer-panel {
  width: 252px;
  bottom: 78px;
}

.home-side-panel {
  width: 324px;
}

.home-layer-collapse,
.home-side-collapse {
  width: 28px;
  height: 28px;
  border-color: rgba(226, 242, 255, 0.14);
  background: rgba(7, 17, 31, 0.76);
}

.home-layer-collapse:hover,
.home-side-collapse:hover {
  background: rgba(82, 215, 255, 0.14);
  border-color: rgba(82, 215, 255, 0.52);
  color: #f7fbff;
}

.home-layer-panel.collapsed {
  transform: translateX(calc(-100% + 42px));
}

.home-side-panel.collapsed {
  transform: translateX(calc(100% - 42px));
}

.home-layer-check {
  min-height: 27px;
  padding: 4px 5px;
  border-radius: 7px;
}

.home-layer-check:hover {
  background: rgba(255, 255, 255, 0.055);
}

.home-layer-check input[type="checkbox"],
.home-layer-check input[type="radio"] {
  accent-color: var(--accent);
}

.layer-swatch {
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.24);
}

.side-panel-tabs {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0));
}

.side-tab {
  color: rgba(155, 174, 197, 0.86);
}

.side-tab.active {
  color: var(--accent-bright);
  border-bottom-color: var(--accent);
}

.side-ql-item,
.warning-card,
.surface-info-box,
.stn-detail-panel {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.02));
  border-color: rgba(226, 242, 255, 0.1);
  border-radius: 8px;
}

.side-ql-item:hover {
  border-color: rgba(82, 215, 255, 0.5);
  background:
    linear-gradient(180deg, rgba(82, 215, 255, 0.1), rgba(82, 215, 255, 0.035));
}

.warning-badge,
.ticker-live-dot {
  background: var(--danger);
}

.warning-card--tor {
  border-left-color: var(--danger);
  background: linear-gradient(90deg, rgba(255, 77, 109, 0.17), rgba(255, 77, 109, 0.035) 74%);
}

.warning-card--svr {
  border-left-color: var(--warn);
  background: linear-gradient(90deg, rgba(255, 209, 102, 0.14), rgba(255, 209, 102, 0.028) 74%);
}

.warning-card--ffw {
  border-left-color: var(--ok);
  background: linear-gradient(90deg, rgba(70, 217, 138, 0.14), rgba(70, 217, 138, 0.028) 74%);
}

.chaser-item:hover {
  background: rgba(82, 215, 255, 0.1);
}

.chaser-dot.active,
.worker-status.active {
  background: var(--ok);
}

/* Legends, logo, and map chrome */
.map-legend {
  min-width: 246px;
}

.map-section.radar-mode .map-legend,
.map-section.models-mode .map-legend,
.map-section.band7-viewer-mode .map-legend {
  left: 18px;
  top: 18px;
  min-width: min(330px, calc(100% - 36px));
}

.spc-legend {
  right: 344px;
  bottom: 34px;
}

.legend-label,
.spc-legend-title {
  color: #f4f9ff;
}

.legend-ticks span,
.spc-legend-item {
  color: rgba(221, 232, 246, 0.82);
}

.map-logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(5, 10, 21, 0.52);
  border: 1px solid rgba(226, 242, 255, 0.08);
  color: rgba(244, 249, 255, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.map-logo svg {
  width: 22px;
  height: 22px;
  stroke: var(--accent-bright);
}

.map-logo-mark {
  width: 22px;
  height: 22px;
  border-radius: 7px;
  flex: 0 0 22px;
}

.map-info-model {
  color: #f7fbff;
}

.map-info-time {
  color: var(--accent-bright);
}

.leaflet-control-zoom a {
  background: rgba(7, 17, 31, 0.88) !important;
  border-color: rgba(226, 242, 255, 0.14) !important;
  color: rgba(221, 232, 246, 0.86) !important;
}

.leaflet-control-zoom a:hover {
  background: rgba(82, 215, 255, 0.12) !important;
  color: #f7fbff !important;
}

.leaflet-control-attribution {
  background: rgba(5, 10, 21, 0.68) !important;
}

/* Scrubber */
@keyframes wx-fade-soft {
  from { opacity: 0; }
  to { opacity: 1; }
}

.scrubber-bar {
  width: min(820px, calc(100% - 48px));
  max-width: 820px;
  left: 50%;
  right: auto;
  bottom: 18px;
  transform: translateX(-50%);
  padding: 14px 20px 16px;
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(14, 31, 54, 0.82), rgba(5, 10, 21, 0.82));
  border-color: rgba(226, 242, 255, 0.14);
  animation: wx-fade-soft 0.32s ease both;
}

.scrubber-bar[data-mode="home"] {
  bottom: 54px;
}

.scrubber-controls {
  gap: 10px;
}

.play-btn {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #52d7ff, #ffcc66);
  color: #06101d;
  border: 0;
}

.play-btn:hover {
  color: #06101d;
  box-shadow:
    0 10px 22px -10px rgba(82, 215, 255, 0.86),
    inset 0 1px 0 rgba(255, 255, 255, 0.42);
}

.speed-btn {
  border-radius: 999px;
  border-color: rgba(226, 242, 255, 0.12);
  background: rgba(255, 255, 255, 0.055);
  color: rgba(221, 232, 246, 0.78);
}

.speed-btn:hover {
  border-color: rgba(82, 215, 255, 0.48);
  background: rgba(82, 215, 255, 0.12);
}

.speed-btn.active {
  background: linear-gradient(135deg, #52d7ff, #ffcc66);
  border-color: transparent;
  color: #06101d;
}

.scrubber {
  height: 6px;
  background: rgba(255, 255, 255, 0.14);
}

.scrubber::-webkit-slider-thumb {
  background: #f7fbff;
  border-color: #06101d;
  box-shadow:
    0 0 0 2px rgba(82, 215, 255, 0.42),
    0 8px 18px rgba(82, 215, 255, 0.42);
}

.scrubber::-moz-range-thumb {
  background: #f7fbff;
  border-color: #06101d;
  box-shadow: 0 0 0 2px rgba(82, 215, 255, 0.42);
}

.valid-time {
  color: #f2f7ff;
}

.scrubber-hint {
  color: rgba(155, 174, 197, 0.72);
  opacity: 1;
}

/* Toggle controls */
.toggle-slider {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(226, 242, 255, 0.12);
}

.toggle-slider::after {
  background: rgba(221, 232, 246, 0.76);
}

.toggle-label input:checked + .toggle-slider {
  background: rgba(82, 215, 255, 0.24);
  border-color: rgba(82, 215, 255, 0.56);
}

.toggle-label input:checked + .toggle-slider::after {
  background: #f7fbff;
}

.toggle-label input:checked ~ .toggle-text {
  color: var(--accent-bright);
}

/* Sounding and modal surfaces */
.sounding-panel,
.storm3d-container,
.storm3d-panel {
  background:
    radial-gradient(circle at top right, rgba(82, 215, 255, 0.14), transparent 34%),
    linear-gradient(180deg, rgba(9, 20, 36, 0.96), rgba(5, 10, 21, 0.97));
  border-color: rgba(226, 242, 255, 0.14);
  box-shadow: var(--shadow-lg);
}

.sounding-panel-section,
.sounding-highlight-card {
  background: rgba(255, 255, 255, 0.035);
  border-color: rgba(226, 242, 255, 0.1);
  border-radius: 8px;
}

.map-loading-text {
  color: var(--accent-bright);
}

.map-loading-spinner {
  border-color: rgba(82, 215, 255, 0.18);
  border-top-color: var(--accent-bright);
}

/* Footer link */
.site-footer {
  position: fixed;
  right: 14px;
  bottom: 10px;
  z-index: 1500;
  padding: 0;
  pointer-events: none;
}

.site-footer a {
  pointer-events: auto;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(5, 10, 21, 0.42);
  border: 1px solid rgba(226, 242, 255, 0.07);
}

.site-footer a:hover {
  background: rgba(82, 215, 255, 0.1);
  border-color: rgba(82, 215, 255, 0.24);
}

html[data-capture-mode="1"] .site-footer {
  display: none !important;
}

/* Focus and scrolling */
button:focus-visible,
.select:focus-visible,
.source-tab:focus-visible,
.param-btn:focus-visible,
.capture-btn:focus-visible,
.chaser-search:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(82, 215, 255, 0.58), 0 0 0 5px rgba(82, 215, 255, 0.14);
}

.param-sidebar::-webkit-scrollbar-thumb,
.side-panel-pane::-webkit-scrollbar-thumb,
.home-layer-panel::-webkit-scrollbar-thumb {
  background: rgba(226, 242, 255, 0.12);
  background-clip: padding-box;
}

.param-sidebar::-webkit-scrollbar-thumb:hover,
.side-panel-pane::-webkit-scrollbar-thumb:hover,
.home-layer-panel::-webkit-scrollbar-thumb:hover {
  background: rgba(82, 215, 255, 0.34);
  background-clip: padding-box;
}

@media (max-width: 1220px) {
  .source-tabs {
    max-width: min(590px, 52vw);
  }

  .brand-text {
    font-size: 13px;
  }
}

@media (max-width: 900px) {
  .source-tabs {
    max-width: none;
  }

  .home-layer-panel {
    width: 190px;
  }

  .spc-legend {
    right: 18px;
  }
}

@media (max-width: 768px) {
  .topbar {
    padding-inline: 10px;
  }

  .topbar-divider,
  .brand-text {
    display: none;
  }

  .brand-icon {
    width: 32px;
    height: 32px;
  }

  .source-tabs {
    max-width: calc(100vw - 138px);
    padding: 3px;
  }

  .source-tab {
    min-height: 32px;
    padding-inline: 10px;
  }

  .hover-value,
  #captureBtn,
  #copyBtn {
    display: none !important;
  }

  .scrubber-bar {
    width: calc(100% - 16px);
    bottom: 8px;
    padding: 12px 12px 13px;
  }

  .scrubber-hint {
    display: none;
  }

  .map-logo,
  .site-footer {
    display: none;
  }
}

/* =========================================================
   Data Display Polish — broadcast-grade legend & readouts
   ========================================================= */

/* Colorbar: crisp hairline ring so palette ends read cleanly
   against the glass card, with a faint top bevel. */
.legend-canvas {
  box-shadow:
    0 0 0 1px rgba(226, 242, 255, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

/* Tick labels: tabular numerals + hairline tick marks that
   visually connect each label to the colorbar above it. */
.legend-ticks span {
  font-variant-numeric: tabular-nums;
  font-size: 9.5px;
  letter-spacing: 0.02em;
  color: rgba(221, 232, 246, 0.92);
  padding-top: 5px;
}
.legend-ticks span::before {
  content: '';
  position: absolute;
  top: -2px;
  left: 50%;
  width: 1px;
  height: 5px;
  background: rgba(226, 242, 255, 0.45);
}
.legend-ticks span:first-child::before { left: 0; }
.legend-ticks span:last-child::before { left: auto; right: 0; }

/* Legend title: quiet uppercase product label, broadcast-style. */
.legend-label {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 10px;
  color: rgba(221, 232, 246, 0.85);
}

/* Time/value readouts everywhere: fixed-width digits so the
   display doesn't jitter during animation. */
.valid-time,
.frame-counter,
.map-info-time,
.hover-value,
.legend-ticks {
  font-variant-numeric: tabular-nums;
}

/* Valid time gets the data font — it is the primary readout. */
.valid-time {
  font-family: var(--font-data);
  font-size: 12px;
  letter-spacing: 0.03em;
}

/* Map info title keeps its broadcast lower-third scale; just make
   the timestamp read as instrument data. */
.map-info-time { font-family: var(--font-data); letter-spacing: 0.04em; }
