/* ═══════════════════════════════════════════════════════════════
   Anvilcast — Design System & Styles
   No framework, no build step. Pure CSS with custom properties.
   ═══════════════════════════════════════════════════════════════ */

/* ═══════════════════════════════════════════════════════════════
   Self-hosted fonts (variable woff2, single file per family)
   font-display: swap — fallback shows immediately, swaps when ready
   size-adjust / ascent-override / descent-override / line-gap-override
   match the fallback system-ui metrics to eliminate layout shift on swap.
   ═══════════════════════════════════════════════════════════════ */
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url(/fonts/space_grotesk.woff2) format('woff2-variations'),
       url(/fonts/space_grotesk.woff2) format('woff2');
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url(/fonts/jetbrains_mono.woff2) format('woff2-variations'),
       url(/fonts/jetbrains_mono.woff2) format('woff2');
}
/* Metric-matched fallback — tricks the system-ui font into occupying
   the same box as Space Grotesk, so the font-swap is invisible. */
@font-face {
  font-family: 'Space Grotesk Fallback';
  src: local('Arial');
  size-adjust: 102%;
  ascent-override: 93%;
  descent-override: 23%;
  line-gap-override: 0%;
}

/* ═══════════════════════════════════════════════════════════════
   Anvilcast 2026 Redesign — Design Tokens
   Extracted from design/pages/*.html prototypes.
   ═══════════════════════════════════════════════════════════════ */

:root,
:root[data-theme="dark"] {
  /* Surfaces — off-black with a subtle warm undertone so it sits in the
     same palette family as the warm-cream light mode. Lifted so it's
     not aggressively dark. */
  --bg:            #1b1a17;
  --surface:       #24231f;
  --elevated:      #2f2d28;
  --border:        #3b3934;
  --border-2:      #4d4b44;

  /* Text — clean off-white + neutral greys, no warm tint */
  --text:          #ededed;
  --muted:         #a0a0a0;
  --faint:         #6d6d6d;

  /* Utility accents */
  --accent:        #6fd59a;
  --accent-2:      #e5b84a;
  --accent-3:      #e57451;
  --accent-4:      #d85f95;

  /* Categorical risk — SPC-derived, shared across light+dark */
  --cat-tstm:      #3f6b4a;
  --cat-mrgl:      #6fb37a;
  --cat-slgt:      #e5c65c;
  --cat-enh:       #e89953;
  --cat-mdt:       #dc5250;
  --cat-high:      #d85f95;
  --cat-vhi:       #9d6bd8;

  /* Probability ramp */
  --p-0:           #2d7a3e;
  --p-5:           #6fb37a;
  --p-15:          #e5c65c;
  --p-30:          #e89953;
  --p-45:          #dc5250;
  --p-60:          #d85f95;

  /* Per-hazard brand colors */
  --haz-tor:       #dc5250;
  --haz-hail:      #e5c65c;
  --haz-wind:      #e89953;
  --haz-ltg:       #6fd59a;

  /* Status */
  --success:       #4adb8e;
  --warn:          #ffb347;
  --danger:        #ff4d5e;

  /* Typography (metric-matched fallback so swap is invisible) */
  --font-display:  'Space Grotesk', 'Space Grotesk Fallback', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-body:     'Space Grotesk', 'Space Grotesk Fallback', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono:     'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;

  /* Layout */
  --max:           1320px;
  --max-wide:      1520px;
  --radius:        10px;
  --radius-sm:     6px;
  --radius-lg:     14px;

  /* Shadows */
  --shadow-sm:     0 1px 2px rgba(0,0,0,0.4);
  --shadow-md:     0 4px 12px rgba(0,0,0,0.4);
  --shadow-lg:     0 8px 24px rgba(0,0,0,0.5);

  /* Chrome */
  --nav-bg:        color-mix(in oklab, var(--bg) 88%, transparent);
  --logo-filter:   invert(1);

  /* ── Compat shim: old token names forward to new values ──
     Remove each line as the page that consumes it is ported
     in Phases 1–3. Keep this block last so it overrides where
     needed. Warning is still used by the new-run banner. */
  --text-muted:    var(--muted);
  --text-faint:    var(--faint);
  --border-strong: var(--border-2);
  --accent-hover:  color-mix(in srgb, var(--accent) 75%, white);
  --accent-bg:     color-mix(in srgb, var(--accent) 14%, transparent);
  --warning:       var(--warn);
  --hero-grad:     linear-gradient(135deg, #1d1b18 0%, #24231f 50%, #2f2d28 100%);
  --prob-0:        transparent;
  --prob-1:        var(--p-5);
  --prob-2:        var(--p-15);
  --prob-3:        var(--p-30);
  --prob-4:        var(--p-45);
  --prob-5:        var(--p-60);
}

:root[data-theme="light"] {
  --bg:            #f6f5f0;
  --surface:       #ffffff;
  --elevated:      #efede5;
  --border:        #dcd9ce;
  --border-2:      #bab6a6;

  --text:          #15171d;
  --muted:         #5a5f6c;
  --faint:         #8a8f9e;

  --shadow-sm:     0 1px 2px rgba(0,0,0,0.06);
  --shadow-md:     0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg:     0 8px 24px rgba(0,0,0,0.12);

  --logo-filter:   none;

  /* Compat shim (light) */
  --hero-grad:     linear-gradient(135deg, #efede5 0%, #f6f5f0 50%, #e8e5d8 100%);
}

/* ── Palette variants (unused until toggle wired; harmless) ── */
[data-palette="storm"]    { --accent:#6fd59a; --accent-2:#e5b84a; --accent-3:#e57451; --accent-4:#d85f95; }
[data-palette="signal"]   { --accent:#3ddc84; --accent-2:#4aa3ff; --accent-3:#6fd59a; --accent-4:#a57bff; }
[data-palette="electric"] { --accent:#4aa3ff; --accent-2:#a57bff; --accent-3:#6fd59a; --accent-4:#4aa3ff; }
[data-palette="ember"]    { --accent:#ff7a3c; --accent-2:#ffb347; --accent-3:#e5b84a; --accent-4:#d85f95; }
[data-palette="mono"]     { --accent:#e8ecf4; --accent-2:#9aa3b5; --accent-3:#9aa3b5; --accent-4:#e8ecf4; }
[data-theme="light"][data-palette="mono"] { --accent:#15171d; --accent-2:#5a5f6c; }

/* ── Typography utilities ──────────────────────────────────── */
.mono { font-family: var(--font-mono); font-feature-settings: "zero"; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ── Reset ───────────────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
  font-feature-settings: "ss01","cv11";
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* Defensive: the HTML `hidden` attribute loses to any explicit
   CSS `display:` rule. Force it to always win. Without this,
   elements like the .fc-thumb-grid or .timeline stay visible
   even when JS sets .hidden = true. */
[hidden] { display: none !important; }

/* Respect prefers-reduced-motion — no pulse, no fade transitions */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Focus outlines — visible but not jarring */
*:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }

img { max-width: 100%; height: auto; display: block; }

button, select, input {
  font: inherit;
  color: inherit;
  border: none;
  outline: none;
  background: none;
}

button { cursor: pointer; }

ul { list-style: none; }

.text-muted { color: var(--text-muted); }

/* ── Container ───────────────────────────────────────────────── */

.container {
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ── Buttons ─────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 22px;
  border-radius: 8px;
  font-size: 0.9375rem;
  font-weight: 500;
  transition: background 150ms ease, box-shadow 150ms ease, transform 100ms ease;
}

.btn:active { transform: scale(0.97); }

.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover {
  background: var(--accent-hover);
  color: #fff;
  box-shadow: var(--shadow-md);
}

.btn-sm {
  padding: 6px 14px;
  font-size: 0.8125rem;
  border-radius: 6px;
}

.btn-icon {
  padding: 8px;
  border-radius: 8px;
  background: var(--elevated);
  border: 1px solid var(--border);
}
.btn-icon:hover { border-color: var(--border-strong); }

/* ── Badge ───────────────────────────────────────────────────── */

.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 99px;
  font-size: 0.8125rem;
  background: var(--elevated);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

/* ── Categorical risk colors ────────────────────────────────── */

:root {
  --cat-tstm:  #c1e9c1;
  --cat-mrgl:  #66a366;
  --cat-slgt:  #ffe066;
  --cat-enh:   #ffa500;
  --cat-mdt:   #ff0000;
  --cat-high:  #ff69b4;
  --cat-vhi:   #912cee;
}

/* ═══════════════════════════════════════════════════════════════
   New-run notification banner
   ═══════════════════════════════════════════════════════════════ */

.new-run-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 8px 20px;
  background: var(--accent-bg);
  border-bottom: 1px solid var(--accent);
  font-size: 0.8125rem;
  color: var(--accent);
  font-weight: 500;
}

.new-run-banner[hidden] { display: none; }

.new-run-dismiss {
  background: none;
  border: none;
  color: var(--accent);
  font-size: 1.25rem;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
  opacity: 0.7;
}
.new-run-dismiss:hover { opacity: 1; }

/* ═══════════════════════════════════════════════════════════════
   Topbar (2026 redesign — replaces old .nav)
   ═══════════════════════════════════════════════════════════════ */

.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--nav-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.topbar-row {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 20px;
  height: 60px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
}
.brand-logo {
  height: 30px;
  width: auto;
  max-width: none;
  flex-shrink: 0;
  filter: var(--logo-filter);
  transition: filter 180ms ease;
}
.brand-bar {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--faint);
  margin-left: 2px;
  text-transform: lowercase;
}

/* Keep legacy .nav-logo / .nav-logo-img rules aliased for any stragglers */
.nav-logo { display: none; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.nav-link {
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  transition: color 150ms, background 150ms;
}
.nav-link:hover { color: var(--text); background: var(--elevated); }
.nav-link.active { color: var(--text); background: var(--elevated); }

.topbar-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 99px;
  white-space: nowrap;
}
.topbar-status.is-stale { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 40%, var(--border)); }
.topbar-status.is-stale .pulse { background: var(--warn); }

.pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 0 var(--success);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--success) 60%, transparent); }
  70% { box-shadow: 0 0 0 6px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

.nav-theme {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  font-size: 1rem;
  color: var(--muted);
  background: none;
  border: 1px solid var(--border);
  transition: color 150ms, background 150ms, border-color 150ms;
}
.nav-theme:hover { color: var(--text); background: var(--elevated); border-color: var(--border-2); }

.nav-socials {
  display: flex;
  align-items: center;
  gap: 2px;
}
.nav-social {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 6px;
  color: var(--faint);
  transition: color 150ms, background 150ms;
}
.nav-social:hover { color: var(--text); background: var(--elevated); }

/* Hamburger */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  cursor: pointer;
  margin-left: auto;
}
.nav-hamburger span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text);
  border-radius: 1px;
  transition: transform 200ms, opacity 200ms;
}

/* Mobile topbar */
@media (max-width: 860px) {
  .topbar-row { gap: 12px; height: 56px; padding: 0 16px; }
  .brand-bar { display: none; }
  .topbar-status { display: none; }
  .nav-socials { display: none; }
}

@media (max-width: 768px) {
  .nav-hamburger { display: flex; }

  .nav-links {
    display: none;
    position: absolute;
    top: 56px;
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 8px 16px 16px;
    gap: 2px;
    box-shadow: var(--shadow-lg);
    margin-left: 0;
  }

  #nav-toggle:checked ~ .nav-links { display: flex; }

  .nav-link {
    width: 100%;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
  }
}


/* ═══════════════════════════════════════════════════════════════
   Page System
   ═══════════════════════════════════════════════════════════════ */

.page { display: none; }
.page.active { display: block; }

#app { flex: 1; }

.section { padding: 48px 0; }
.section-alt { background: var(--surface); }
.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 24px;
  letter-spacing: -0.01em;
}


/* ═══════════════════════════════════════════════════════════════
   HOME PAGE
   ═══════════════════════════════════════════════════════════════ */

/* Home header */
.home-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 24px 0;
}

.home-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.home-title {
  font-family: var(--font-display);
  font-size: clamp(0.9rem, 3.8vw, 1.25rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  white-space: nowrap;
}

.home-sub {
  color: var(--text-muted);
  font-size: clamp(0.6875rem, 2.2vw, 0.8125rem);
  margin-top: 4px;
  white-space: nowrap;
}

.home-spot-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  position: relative;
}

.home-spot-input {
  padding: 8px 14px;
  width: 280px;
  background: var(--elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 0.875rem;
}
.home-spot-input::placeholder { color: var(--text-faint); }
.home-spot-input:focus { border-color: var(--accent); }

/* Autocomplete dropdown */
.search-suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 4px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  box-shadow: var(--shadow-md);
  max-height: 260px;
  overflow-y: auto;
  z-index: 150;
  list-style: none;
}
.search-suggestion {
  padding: 8px 12px;
  cursor: pointer;
  font-size: 0.875rem;
  border-bottom: 1px solid var(--border);
}
.search-suggestion:last-child { border-bottom: none; }
.search-suggestion:hover,
.search-suggestion.active {
  background: var(--accent-bg);
}
.search-suggestion-name { color: var(--text); }
.search-suggestion-detail {
  font-size: 0.75rem;
  color: var(--text-faint);
  margin-top: 1px;
}

/* USA spotlight grid */
.home-spotlight { padding-top: 24px; }

.spotlight-week { margin-bottom: 24px; }
.spotlight-week:last-child { margin-bottom: 0; }

.sg-week-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  padding-bottom: 6px;
  margin-bottom: 6px;
  border-bottom: 1px solid var(--border);
}

.sg-row {
  display: grid;
  grid-template-columns: 36px repeat(7, 1fr);
  gap: 4px;
  align-items: center;
}
.sg-hdr-row { margin-bottom: 2px; }
.sg-img-row { margin-bottom: 2px; }

.sg-lbl {
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-muted);
  text-align: right;
  padding-right: 4px;
  white-space: nowrap;
}

.sg-colhdr {
  display: flex;
  align-items: baseline;
  justify-content: center;
  white-space: nowrap;
  line-height: 1.2;
}
.sg-dn { font-size: 0.6875rem; font-weight: 700; color: var(--text); }
.sg-dd { font-size: 0.5625rem; color: var(--text-faint); }

.sg-cell {
  display: block;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--border);
  transition: border-color 200ms ease, transform 200ms ease;
}
.sg-cell:hover {
  border-color: var(--accent);
  transform: scale(1.08);
  z-index: 1;
}
.sg-thumb {
  display: block;
  width: 100%;
  aspect-ratio: 5 / 3;
  object-fit: cover;
  background: var(--elevated);
}

.section-heading {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-muted);
  margin: 0 0 14px;
}

.home-grid-section { padding-top: 32px; }

/* Forecast page heading (visually hidden, for SEO) */
.forecast-heading {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Region grid */
.region-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.region-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 200ms ease, box-shadow 200ms ease, border-color 200ms ease;
  text-decoration: none;
  color: var(--text);
}
.region-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent);
  color: var(--text);
}
.region-card.hero-card {
  grid-column: 1 / -1;
}

.region-card-img {
  width: 100%;
  aspect-ratio: 5 / 3;
  object-fit: cover;
  background: var(--elevated);
}
.hero-card .region-card-img { aspect-ratio: 21 / 9; }

.region-card-label {
  display: block;
  padding: 10px 14px;
  font-weight: 600;
  font-size: 0.9375rem;
}

/* (about-brief removed — info moved to About page) */


/* ═══════════════════════════════════════════════════════════════
   FORECAST PAGE
   ═══════════════════════════════════════════════════════════════ */

.forecast-layout { padding-bottom: 48px; }

/* Controls bar */
.forecast-controls {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 12px 0;
}

.fc-row {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.fc-left, .fc-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.fc-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.fc-select {
  padding: 7px 32px 7px 12px;
  background: var(--elevated);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  cursor: pointer;
  font-size: 0.875rem;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%239ca3af' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
}
.fc-select:hover { border-color: var(--border-strong); }
.fc-select:focus { border-color: var(--accent); }

.run-mono { font-variant-numeric: tabular-nums; font-family: "SF Mono", "Cascadia Code", "Consolas", monospace; font-size: 0.8125rem; }

.source-badge {
  display: inline-block;
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  vertical-align: middle;
  margin-left: 4px;
}
.source-aifs { background: #1d4ed8; color: #dbeafe; }
.source-wn2  { background: #059669; color: #d1fae5; }
.source-fcn3 { background: #9333ea; color: #f3e8ff; }
.source-fuxi { background: #d97706; color: #fef3c7; }

.version-tag {
  font-size: 0.5625rem;
  color: var(--text-muted, #888);
  font-style: italic;
  margin-left: 4px;
  opacity: 0.7;
}

/* Day tabs */
.tab-bar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0;
}

.tabs {
  display: flex;
  gap: 2px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }

.tab {
  flex: 0 0 auto;
  padding: 8px 14px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: color 150ms, border-color 150ms;
  white-space: nowrap;
}
.day-prefix { /* hidden on mobile via media query */ }
.tab:hover { color: var(--text); }
.tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.tab-date {
  display: block;
  font-size: 0.6875rem;
  font-weight: 400;
  color: var(--text-faint);
  margin-top: 1px;
}
.tab.active .tab-date { color: var(--accent); opacity: 0.8; }

.tab-sep {
  width: 1px;
  align-self: stretch;
  background: var(--border);
  margin: 6px 4px;
}

/* Single-day view layout */
.forecast-single { margin-top: 16px; }

/* Hazards 2x2 view: all four hazards side-by-side for the selected day */
.forecast-quad {
  margin-top: 16px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.quad-cell {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
}
.quad-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.quad-label {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 3px 8px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  z-index: 2;
}
@media (max-width: 900px) {
  .forecast-quad { grid-template-columns: 1fr; }
}

/* Legend (above map) */
.map-legend {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-bottom: 10px;
  font-size: 0.6875rem;
  color: var(--text-faint);
  flex-wrap: wrap;
}

.legend-swatch {
  width: 28px;
  height: 10px;
  border-radius: 2px;
}

.legend-label {
  margin: 0 4px 0 1px;
  white-space: nowrap;
}

.legend-cat-item {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-right: 8px;
}

.legend-cat-swatch {
  width: 14px;
  height: 10px;
  border-radius: 2px;
}

/* Separator between probability and CIG legends */
.legend-sep {
  width: 1px;
  height: 12px;
  background: var(--border);
  margin: 0 6px;
}

/* CIG hatching legend items */
.legend-cig-item {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-right: 6px;
}

.cig-swatch {
  width: 20px;
  height: 12px;
  border-radius: 2px;
  border: 1px solid var(--text-faint);
  position: relative;
  overflow: hidden;
}

.cig-dots {
  background-image: radial-gradient(circle, var(--text-faint) 0.7px, transparent 0.7px);
  background-size: 4px 4px;
}

.cig-diag {
  background-image: repeating-linear-gradient(
    -45deg,
    transparent, transparent 1.5px,
    var(--text-faint) 1.5px, var(--text-faint) 2.5px
  );
}

.cig-cross {
  background-image:
    repeating-linear-gradient(
      45deg,
      transparent, transparent 1.5px,
      var(--text-faint) 1.5px, var(--text-faint) 2.5px
    ),
    repeating-linear-gradient(
      -45deg,
      transparent, transparent 1.5px,
      var(--text-faint) 1.5px, var(--text-faint) 2.5px
    );
}

/* Sidebar + Map flex layout */
.forecast-main {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

/* Hazard sidebar (vertical thumbnails) */
.hazard-sidebar {
  flex: 0 0 110px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.hazard-card {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  transition: border-color 150ms, box-shadow 150ms;
  text-align: center;
}
.hazard-card:hover { border-color: var(--border-strong); }
.hazard-card.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

.hazard-card-img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  background: var(--elevated);
}

.hazard-card-label {
  display: block;
  padding: 4px 4px;
  font-size: 0.625rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.hazard-card.active .hazard-card-label { color: var(--accent); }

/* Map area (fills remaining space) */
.forecast-map-area {
  flex: 1;
  min-width: 0;
}

.map-frame {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 3 / 2;
}

.map-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: opacity 200ms;
}
.map-img.loading { opacity: 0.5; }

/* Loading: accent bar only (no spinner) */
.map-frame.reloading::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--accent);
  animation: loadbar 1.2s ease infinite;
}

@keyframes loadbar {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* Download button */
.map-download {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 5;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: rgba(0,0,0,0.5);
  color: #fff;
  cursor: pointer;
  opacity: 0;
  transition: opacity 200ms, background 200ms;
  border: none;
}
.map-frame:hover .map-download { opacity: 1; }
.map-download:hover { background: rgba(0,0,0,0.75); }

/* Valid time bar + History button */
.valid-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
  padding: 6px 0;
  font-size: 0.8125rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.history-btn {
  padding: 4px 14px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--elevated);
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  transition: color 150ms, border-color 150ms, background 150ms;
}
.history-btn:hover {
  color: var(--text);
  border-color: var(--border-strong);
}

/* History view */
.forecast-history { margin-top: 24px; }

.history-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.history-back {
  padding: 6px 14px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--accent);
  background: none;
  border: 1px solid var(--accent);
  border-radius: 6px;
  cursor: pointer;
  transition: background 150ms;
}
.history-back:hover { background: var(--elevated); }

#history-label {
  font-size: 0.875rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Thumbnail grids (all-days, history) */
.thumb-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}

.thumb-card {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  transition: border-color 150ms, transform 150ms;
}
.thumb-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.thumb-card.current { border-color: var(--accent); }

.thumb-card-img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  background: var(--elevated);
}

.thumb-card-label {
  display: block;
  padding: 8px 10px;
  font-size: 0.8125rem;
  font-weight: 500;
}

/* All-days grid margin */
#forecast-alldays { margin-top: 24px; }


/* ═══════════════════════════════════════════════════════════════
   SPOT FORECAST PAGE
   ═══════════════════════════════════════════════════════════════ */

.spot-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 32px 0 16px;
  flex-wrap: wrap;
}

.spot-city {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.spot-coords {
  font-size: 0.875rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.spot-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.spot-search-wrap { position: relative; }

.spot-search {
  padding: 8px 14px;
  width: 280px;
  background: var(--elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 0.875rem;
}
.spot-search::placeholder { color: var(--text-faint); }
.spot-search:focus { border-color: var(--accent); }

.spot-meta {
  display: flex;
  gap: 16px;
  padding: 10px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.8125rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

/* Risk color classes */
.risk-none   { color: var(--text-faint); }
.risk-low    { color: var(--prob-1); }
.risk-med    { color: var(--prob-2); }
.risk-high   { color: var(--prob-3); }
.risk-vhigh  { color: var(--prob-4); }
.risk-ext    { color: var(--prob-5); }

/* No-data message */
.spot-nodata {
  margin-top: 32px;
  padding: 40px 24px;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text-muted);
  font-size: 0.9375rem;
}

/* Loading state */
.spot-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 0;
  color: var(--text-muted);
}

.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Charts section */
.spot-charts { margin-top: 16px; }

/* SVG bar tooltip */
.spot-tooltip {
  position: fixed;
  z-index: 200;
  padding: 6px 10px;
  background: var(--elevated);
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  font-size: 0.75rem;
  color: var(--text);
  pointer-events: none;
  white-space: nowrap;
  box-shadow: var(--shadow-md);
  display: none;
  font-variant-numeric: tabular-nums;
}
.spot-tooltip.show { display: block; }

/* ═══════════════════════════════════════════════════════════════
   HEATMAP
   ═══════════════════════════════════════════════════════════════ */

.heatmap-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--border);
  border-radius: 10px;
}
.heatmap {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
}
.heatmap th {
  padding: 5px 2px;
  text-align: center;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}
.heatmap th:first-child {
  text-align: right;
  padding-right: 10px;
  padding-left: 10px;
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.hm-day th { border-bottom: none; padding-bottom: 0; }
.hm-hour th {
  font-size: 0.5625rem;
  font-weight: 400;
  color: var(--text-faint);
  border-bottom: 2px solid var(--border);
  padding-top: 0;
}
.heatmap td {
  padding: 8px 2px;
  text-align: center;
  font-size: 0.6875rem;
  font-weight: 600;
  min-width: 34px;
}
.heatmap tbody tr + tr { border-top: 1px solid var(--border); }
.hm-0 { color: var(--text-faint); }
.hm-1 { background: var(--prob-1); color: #fff; }
.hm-2 { background: var(--prob-2); color: #fff; }
.hm-3 { background: var(--prob-3); color: #fff; }
.hm-4 { background: var(--prob-4); color: #fff; }
.hm-5 { background: var(--prob-5); color: #fff; }

/* ═══════════════════════════════════════════════════════════════
   BAR CHART
   ═══════════════════════════════════════════════════════════════ */

.barchart-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 16px;
}
.barchart-svg {
  width: 100%;
  height: auto;
  display: block;
  padding: 8px 4px 4px;
}


/* ═══════════════════════════════════════════════════════════════
   ABOUT PAGE
   ═══════════════════════════════════════════════════════════════ */

.about-page {
  max-width: 720px;
  padding: 48px 0 64px;
}

.about-page h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 32px;
  letter-spacing: -0.02em;
}

.about-section {
  margin-bottom: 32px;
}

.about-section h2 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text);
}

.about-section p {
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 8px;
}

.about-section ul {
  color: var(--text-muted);
  line-height: 1.8;
  padding-left: 0;
}

.about-section li {
  padding-left: 16px;
  position: relative;
  margin-bottom: 10px;
}
.about-section li::before {
  content: '\2022';
  position: absolute;
  left: 0;
  color: var(--accent);
}

.about-regions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}


/* ── FAQ ──────────────────────────────────────────────────────── */

.faq-item {
  border-bottom: 1px solid var(--border);
}
.faq-item:last-child { border-bottom: none; }

.faq-q {
  padding: 14px 0;
  font-weight: 600;
  font-size: 0.9375rem;
  cursor: pointer;
  list-style: none;
}
.faq-q::-webkit-details-marker { display: none; }
.faq-q::before {
  content: '+';
  display: inline-block;
  width: 1.2em;
  font-weight: 700;
  color: var(--text-muted);
}
details[open] .faq-q::before {
  content: '\2212';
}

.faq-a {
  padding: 0 0 14px 1.2em;
}
.faq-a p {
  font-size: 0.875rem;
  line-height: 1.65;
  color: var(--text-muted);
}

/* ═══════════════════════════════════════════════════════════════
   Footer
   ═══════════════════════════════════════════════════════════════ */

.footer {
  border-top: 1px solid var(--border);
  padding: 20px 0;
  font-size: 0.8125rem;
  color: var(--text-faint);
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.footer-left {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.footer-sep { opacity: 0.4; }
.footer-link {
  color: var(--text-faint);
  transition: color 0.15s;
}
.footer-link:hover { color: var(--text); }
.footer-note { color: var(--text-faint); }
.footer-socials {
  display: flex;
  align-items: center;
  gap: 8px;
}
.footer-social {
  color: var(--text-faint);
  transition: color 0.15s;
}
.footer-social:hover {
  color: var(--text);
}


/* ═══════════════════════════════════════════════════════════════
   Responsive
   ═══════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
  .home-header-row { flex-direction: column; align-items: stretch; gap: 12px; }
  .home-spot-input { width: 100%; }
  .home-spot-bar { width: 100%; }
  .home-spot-bar .home-spot-input { flex: 1; }

  .fc-row { gap: 12px; }
  .fc-right { margin-left: auto; }

  .tab { padding: 7px 10px; font-size: 0.8125rem; }
  .tab-date { font-size: 0.625rem; }

  .hazard-sidebar { flex: 0 0 90px; }
  .hazard-card-label { font-size: 0.5625rem; }

  .spot-header { flex-direction: column; }
  .spot-search { width: 100%; }
  .spot-actions { width: 100%; }
  .spot-search-wrap { flex: 1; }

  .nav-logo-img { height: 24px; }

  .about-page h1 { font-size: 1.5rem; }
}

@media (max-width: 480px) {
  .nav-socials { display: none; }
  .region-grid { grid-template-columns: 1fr; }
  .hero-card { grid-column: auto; }

  .sg-row { grid-template-columns: 22px repeat(7, 1fr); gap: 2px; }
  .sg-lbl { font-size: 0.5rem; padding-right: 2px; }
  .sg-dn { font-size: 0.5rem; }
  .sg-dd { font-size: 0.4375rem; }
  .sg-week-label { font-size: 0.625rem; }
  .sg-cell { border-radius: 2px; }

  .fc-row { flex-direction: column; align-items: stretch; gap: 8px; }
  .fc-left, .fc-right { width: 100%; }
  .fc-select { width: 100%; }

  .tab { padding: 5px 6px; font-size: 0.75rem; }
  .tab-date { display: none; }
  .day-prefix { display: none; }

  /* Mobile: sidebar becomes horizontal strip above map */
  .forecast-main { flex-direction: column; }
  .hazard-sidebar {
    flex: none;
    flex-direction: row;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .hazard-sidebar::-webkit-scrollbar { display: none; }
  .hazard-card { width: 80px; flex: 0 0 auto; }
}

/* Attribution fine print */
.about-attribution { margin-top: 40px; border-top: 1px solid var(--border); padding-top: 20px; }
.about-attribution h2 { font-size: 0.85rem; opacity: 0.5; text-transform: uppercase; letter-spacing: 0.05em; }
.about-attribution .attr-text { font-size: 0.75rem; opacity: 0.55; line-height: 1.5; }
.about-attribution .attr-text a { opacity: 1; color: var(--accent); }


/* ── Verification Page ─────────────────────────────────────── */

.verify-page { max-width: 1000px; margin: 0 auto; padding: 32px 0 64px; }
.verify-page h1 { font-family: var(--font-display); font-weight: 800; font-size: 1.8rem; margin-bottom: 12px; }
.verify-mode-tabs { display: flex; gap: 0; margin-bottom: 20px; border-bottom: 2px solid var(--border); }
.verify-mode-tab {
  padding: 10px 20px; background: transparent; border: none; color: var(--text-muted);
  font-size: 0.9rem; font-weight: 600; cursor: pointer; border-bottom: 2px solid transparent;
  margin-bottom: -2px; transition: all 0.15s;
}
.verify-mode-tab:hover { color: var(--text); }
.verify-mode-tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.verify-lead { color: var(--text-muted); margin-bottom: 24px; line-height: 1.6; }

.verify-loading { color: var(--text-muted); padding: 48px 0; text-align: center; }

.verify-progress { margin-bottom: 20px; }
.verify-progress-bar { height: 6px; background: var(--border); border-radius: 3px; overflow: hidden; margin-top: 6px; }
.verify-progress-bar > div { height: 100%; background: var(--accent); border-radius: 3px; transition: width 0.3s; }
#verify-progress-text { font-size: 0.85rem; color: var(--text-muted); }

.verify-controls { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.verify-pills { display: flex; gap: 6px; }
.verify-pills .pill {
  padding: 6px 16px; border-radius: 20px; border: 1px solid var(--border);
  background: transparent; color: var(--text); cursor: pointer; font-size: 0.85rem;
  transition: all 0.15s;
}
.verify-pills .pill:hover { border-color: var(--accent); }
.verify-pills .pill.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.verify-metric-select { min-width: 160px; }

.verify-charts { margin-bottom: 32px; }
.verify-chart-main { margin-bottom: 24px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 20px; }
.verify-chart-main canvas { max-height: 340px; }
.verify-chart-row-2col { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-bottom: 16px; }
.verify-chart-panel-tall { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 16px; }
.verify-chart-full { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 16px; margin-bottom: 16px; }
.verify-chart-full canvas { max-height: 260px; }
.verify-chart-title { font-size: 0.85rem; font-weight: 600; margin: 0 0 12px; color: var(--text-muted); }

.verify-summary { margin-bottom: 32px; }
.verify-summary table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.verify-summary th, .verify-summary td { padding: 8px 12px; text-align: center; border-bottom: 1px solid var(--border); }
.verify-summary th { font-weight: 600; color: var(--text-muted); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.03em; }
.verify-summary td:first-child { text-align: left; font-weight: 600; }
.verify-summary .vs-good { color: #4ade80; }
.verify-summary .vs-ok { color: #facc15; }
.verify-summary .vs-poor { color: #f87171; }

.verify-methodology { margin-top: 32px; border-top: 1px solid var(--border); padding-top: 24px; }
.verify-methodology h2 { font-size: 1.1rem; margin-bottom: 12px; }
.verify-methodology p { color: var(--text-muted); line-height: 1.7; margin-bottom: 12px; }

/* Calendar infographic */
.verify-calendar { margin-top: 32px; border-top: 1px solid var(--border); padding-top: 24px; }
.verify-calendar h3 { font-size: 0.9rem; font-weight: 600; margin-bottom: 16px; color: var(--text-muted); }
.cal-month { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.cal-label { font-size: 0.75rem; font-weight: 600; width: 28px; color: var(--text-muted); text-align: right; }
.cal-days { display: flex; gap: 2px; }
.cal-day { width: 10px; height: 10px; border-radius: 2px; border: 1px solid var(--border); }
.cal-day.cal-done { background: var(--accent); border-color: var(--accent); }
.cal-summary { font-size: 0.8rem; color: var(--text-muted); margin-top: 8px; }

@media (max-width: 768px) {
  .verify-chart-row-2col { grid-template-columns: 1fr; }
  .verify-controls { flex-direction: column; align-items: flex-start; }
}


/* ═══════════════════════════════════════════════════════════════
   2026 Home page (redesigned — overview)
   Editorial layout: hero, problem, pipeline, product, CIG, verify,
   stack, disclaimer, footer.
   ═══════════════════════════════════════════════════════════════ */

.home2 .section {
  padding: 96px 0;
  border-top: 1px solid var(--border);
}
.home2 h1, .home2 h2, .home2 h3, .home2 h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--text);
  text-wrap: balance;
}
.home2 h1 { font-size: clamp(40px, 5.2vw, 76px); font-weight: 700; letter-spacing: -0.035em; }
.home2 h2 { font-size: clamp(30px, 3.2vw, 44px); }
.home2 h3 { font-size: clamp(20px, 1.6vw, 24px); }
.home2 p { text-wrap: pretty; }
.home2 .lead { font-size: clamp(17px, 1.3vw, 20px); color: var(--muted); max-width: 62ch; line-height: 1.55; }

/* ── Hero ──────────────────────────────────────────────────── */
.hero {
  padding: 80px 0 72px;
  position: relative;
  overflow: hidden;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 72px;
  align-items: center;
}
.hero h1 { margin: 18px 0 22px; }
.hero h1 .accent {
  background: linear-gradient(110deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-lead {
  font-size: clamp(17px, 1.4vw, 21px);
  color: var(--muted);
  max-width: 52ch;
}
.hero-action-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 24px 0 0;
  flex-wrap: wrap;
  position: relative;
}
.hero-action-row .btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 18px;
  border-radius: 10px;
  background: var(--accent);
  color: #0a0d14;
  font-weight: 600;
  font-size: 13.5px;
  text-decoration: none;
  transition: filter 150ms;
  white-space: nowrap;
}
.hero-action-row .btn-primary:hover { filter: brightness(1.08); color: #0a0d14; }
.hero-action-row .btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 10px;
  border: 1px solid var(--border-2);
  color: var(--text);
  font-weight: 500;
  font-size: 13.5px;
  text-decoration: none;
  transition: border-color 150ms, background 150ms;
  white-space: nowrap;
}
.hero-action-row .btn-secondary:hover { border-color: var(--text); background: var(--elevated); }

.hero-action-row .hero-spot-wrap {
  position: relative;
  flex: 1 1 240px;
  min-width: 240px;
  max-width: 360px;
}
.hero-action-row .hero-spot-bar {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 3px 3px 3px 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: border-color 150ms;
}
.hero-action-row .hero-spot-bar:focus-within { border-color: var(--accent); }
.hero-action-row .hero-spot-bar .btn-icon {
  width: 30px;
  height: 30px;
  padding: 0;
  background: transparent;
  border: 0;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
}
.hero-action-row .hero-spot-bar .btn-icon:hover { color: var(--text); background: var(--elevated); }
.hero-spot-input {
  flex: 1;
  border: 0;
  background: transparent;
  color: var(--text);
  padding: 8px 4px;
  font-size: 13.5px;
  min-width: 0;
}
.hero-spot-input::placeholder { color: var(--faint); }

.chip {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  padding: 5px 10px;
  border-radius: 99px;
  background: var(--elevated);
  border: 1px solid var(--border);
  color: var(--muted);
}
.src-row .chip { background: transparent; }

.hero-meta {
  margin-top: 36px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  border-top: 1px solid var(--border);
  padding-top: 28px;
}
.hero-stat .num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 30px;
  letter-spacing: -0.02em;
  color: var(--text);
}
.hero-stat .num-unit { color: var(--muted); font-weight: 500; }
.hero-stat .lbl {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}

.hero-visual-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-self: stretch;
}
.hero-map {
  position: relative;
  aspect-ratio: 3/2;
  border-radius: 12px;
  background: var(--elevated);
  border: 1px solid var(--border);
  overflow: hidden;
  display: block;
  text-decoration: none;
  color: var(--text);
  transition: border-color 150ms, transform 150ms;
}
.hero-map:hover { border-color: var(--border-2); transform: translateY(-2px); }
.hero-map img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.hero-visual-tag {
  position: absolute;
  left: 12px;
  bottom: 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text);
  background: color-mix(in oklab, var(--bg) 72%, transparent);
  backdrop-filter: blur(6px);
  border: 1px solid var(--border);
  padding: 6px 10px;
  border-radius: 6px;
  display: flex;
  gap: 10px;
  align-items: center;
}
.hero-visual-tag span:nth-child(1) { color: var(--accent); }

/* ── Eyebrow (section number + label) ─────────────────────── */
.home2 .eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}
.home2 .eyebrow::before {
  content: '';
  width: 20px;
  height: 1px;
  background: currentColor;
  display: inline-block;
}

/* ── Problem section — text beside map, map moderately sized ─ */
.problem-headline { margin: 18px 0 36px; max-width: 22ch; }
.problem-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 56px;
  align-items: center;
}
.problem-text .lead { margin-bottom: 8px; }
.problem-map-wrap { max-width: 560px; justify-self: end; width: 100%; }
.problem-map {
  position: relative;
  aspect-ratio: 5/2;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  overflow: hidden;
}
.problem-map-img { width: 100%; height: 100%; object-fit: contain; display: block; }

/* Fade dynamic home images in on load (no broken-icon flicker).
   Base state: transparent. When JS sets src, transition fills it in.
   Images without src render as an empty container (no icon). */
.hero-map img,
.product-hero img,
.product-card img,
.hazard-thumb img,
.cig-demo img {
  opacity: 0;
  transition: opacity 260ms ease-out;
}
.hero-map img[src],
.product-hero img[src],
.product-card img[src],
.hazard-thumb img[src],
.cig-demo img[src] { opacity: 1; }
.theme-light-only { display: none; }
:root[data-theme="light"] .theme-light-only { display: block; }
:root[data-theme="light"] .theme-dark-only { display: none; }
.problem-legend {
  display: flex;
  gap: 24px;
  margin-top: 14px;
  font-size: 12px;
  color: var(--muted);
  font-family: var(--font-mono);
  flex-wrap: wrap;
  letter-spacing: 0.04em;
}
.legend-swatch {
  width: 14px;
  height: 10px;
  border-radius: 2px;
  display: inline-block;
  margin-right: 8px;
  vertical-align: -1px;
}
.swatch-spc  { background: var(--accent); }
.swatch-land { background: var(--border-2); }
.big-stat {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(60px, 9vw, 140px);
  line-height: 0.95;
  letter-spacing: -0.04em;
  color: var(--text);
  margin: 32px 0 8px;
}
.big-stat .pct { color: var(--accent); }
.big-stat-sub { color: var(--muted); font-size: 14px; max-width: 40ch; }

/* ── Pipeline section ──────────────────────────────────────── */
.pipeline {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 12px;
  margin-top: 56px;
  counter-reset: step;
}
.pipeline.pipeline-4 {
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.pipeline.pipeline-4 .pipe-step {
  min-height: 200px;
  padding: 22px 20px 24px;
}
.pipeline.pipeline-4 .pipe-step h4 {
  font-size: 15px;
}
.pipeline.pipeline-4 .pipe-step p {
  font-size: 13px;
}
.pipe-step {
  position: relative;
  padding: 20px 16px 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow: hidden;
}
.pipe-step::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent);
}
.pipe-step h4 {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  margin-top: 2px;
  letter-spacing: -0.01em;
}
.pipe-step p {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}
.pipe-step .icon {
  position: absolute;
  right: 10px;
  bottom: 10px;
  opacity: 0.35;
  width: 28px;
  height: 28px;
  color: var(--text);
}
.pipe-step:hover { border-color: var(--border-2); }

.cost-strip {
  margin-top: 40px;
  padding: 28px 32px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  align-items: center;
}
.cost-item .num {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.cost-item .lbl {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 4px;
}

/* ── Product section ───────────────────────────────────────── */
.product-grid {
  margin-top: 48px;
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 16px;
}
.product-hero {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  position: relative;
}
.product-hero img { width: 100%; aspect-ratio: 3/2; object-fit: cover; display: block; }
.product-side {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.product-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  position: relative;
}
.product-card img { width: 100%; aspect-ratio: 3/2; object-fit: cover; display: block; }
.product-cap {
  padding: 10px 14px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.product-cap .title { font-weight: 600; font-size: 14px; color: var(--text); }
.product-cap .sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.product-cap .meta {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
}

.hazard-row {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.hazard-thumb {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  text-decoration: none;
  color: var(--text);
  transition: border-color 150ms, transform 150ms;
}
.hazard-thumb:hover { border-color: var(--accent); transform: translateY(-2px); }
.hazard-thumb img { width: 100%; aspect-ratio: 3/2; object-fit: cover; display: block; }
.hazard-thumb .t {
  padding: 8px 12px;
  font-size: 11px;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.hazard-thumb .t .swatch {
  width: 10px;
  height: 10px;
  border-radius: 2px;
}

/* ── CIG section ───────────────────────────────────────────── */
.cig-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 56px;
  margin-top: 40px;
  align-items: center;
}
.cig-demo {
  aspect-ratio: 5/4;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  position: relative;
  overflow: hidden;
}
.cig-demo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cig-levels {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 8px;
}
.cig-row {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 20px;
  align-items: center;
  padding: 14px 0;
  border-top: 1px solid var(--border);
}
.cig-row:first-child { border-top: 0; }
.cig-sw {
  width: 56px;
  height: 40px;
  border-radius: 6px;
  border: 1px solid var(--border-2);
  position: relative;
  overflow: hidden;
  background: color-mix(in srgb, var(--cat-enh) 35%, transparent);
}
.cig-sw.d1 { background-image: radial-gradient(circle, var(--text) 1px, transparent 1px); background-size: 5px 5px; }
.cig-sw.d2 { background-image: repeating-linear-gradient(-45deg, transparent 0 2px, var(--text) 2px 3.2px); }
.cig-sw.d3 {
  background-image:
    repeating-linear-gradient(45deg, transparent 0 2px, var(--text) 2px 3.2px),
    repeating-linear-gradient(-45deg, transparent 0 2px, var(--text) 2px 3.2px);
}
.cig-row .name { font-weight: 600; font-size: 15px; color: var(--text); }
.cig-row .desc { color: var(--muted); font-size: 13px; margin-top: 2px; }

/* ── Verification section ──────────────────────────────────── */
.verify-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px;
  margin-top: 40px;
}
.vcard {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px;
  position: relative;
  overflow: hidden;
}
.vcard h4 {
  font-size: 13px;
  font-family: var(--font-mono);
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 500;
}
.vcard .big {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(40px, 4.5vw, 64px);
  letter-spacing: -0.03em;
  line-height: 1;
  margin-top: 10px;
}
.vcard .delta {
  display: block;
  font-size: 13px;
  color: var(--success);
  margin-top: 6px;
  font-family: var(--font-mono);
}
.vcard.img img {
  width: 100%;
  height: 220px;
  object-fit: contain;
  background: #fff;
  border-radius: 6px;
  margin-top: 8px;
}
[data-theme="light"] .vcard.img img { background: var(--elevated); }
.span-3 { grid-column: span 3; }
.span-4 { grid-column: span 4; }
.span-6 { grid-column: span 6; }
.span-8 { grid-column: span 8; }
.span-12 { grid-column: span 12; }

/* ── Stack section ─────────────────────────────────────────── */
.stack-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 44px;
}
.stack-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px 18px;
}
.stack-card h4 { font-size: 15px; margin-bottom: 6px; }
.stack-card p { font-size: 12.5px; color: var(--muted); line-height: 1.55; }
.stack-card .tag {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--accent);
  display: block;
  margin-bottom: 10px;
  letter-spacing: 0.06em;
}

/* ── Disclaimer ────────────────────────────────────────────── */
.disclaimer {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 14px;
  padding: 36px 40px;
  margin-top: 36px;
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 48px;
  align-items: start;
}
.disclaimer h3 {
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: -0.01em;
  margin-bottom: 6px;
}
.disclaimer .kicker {
  color: var(--warn);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.disclaimer p {
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.6;
}
.disclaimer p + p { margin-top: 10px; }
.disclaimer strong { color: var(--text); }

/* ── Editorial footer ──────────────────────────────────────── */
.footer-wide {
  border-top: 1px solid var(--border);
  padding: 48px 0 56px;
  color: var(--muted);
  font-size: 13px;
  margin-top: 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
  align-items: start;
}
.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.footer-brand .brand-logo { height: 28px; align-self: flex-start; }
.footer-brand p { color: var(--muted); font-size: 13px; max-width: 32ch; line-height: 1.55; }
.footer-col h5 {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 14px;
  font-weight: 500;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.footer-col a { color: var(--muted); text-decoration: none; font-size: 13px; }
.footer-col a:hover { color: var(--text); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}
.foot-mono {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--faint);
}

/* ── Home2 responsive ──────────────────────────────────────── */
@media (max-width: 960px) {
  .home2 .section { padding: 64px 0; }
  .hero { padding: 48px 0 56px; }
  .hero-inner,
  .problem-grid,
  .product-grid,
  .cig-grid,
  .disclaimer {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .problem-map-wrap { max-width: none; justify-self: stretch; }
  .hero-visual-stack { flex-direction: row; }
  .hero-visual-stack .hero-map { flex: 1 1 0; }
  .pipeline { grid-template-columns: repeat(2, 1fr); }
  .pipeline.pipeline-4 { grid-template-columns: repeat(2, 1fr); }
  .hazard-row { grid-template-columns: repeat(2, 1fr); }
  .stack-grid { grid-template-columns: repeat(2, 1fr); }
  .cost-strip { grid-template-columns: repeat(2, 1fr); gap: 20px; padding: 20px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}
@media (max-width: 620px) {
  .hero-visual-stack { flex-direction: column; }
  .hero-meta { grid-template-columns: 1fr; gap: 16px; }
  .hero-action-row { flex-direction: column; align-items: stretch; }
  .hero-action-row .btn-primary,
  .hero-action-row .btn-secondary { justify-content: center; }
  .hero-action-row .hero-spot-wrap { max-width: none; min-width: 0; width: 100%; }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; }
  .disclaimer { padding: 24px 22px; }
}

/* Hide site-wide .footer on home since the editorial footer-wide takes over */
body[data-page="home"] > .footer { display: none; }


/* ═══════════════════════════════════════════════════════════════
   Forecast Explorer (2026 redesign) — scoped under .fc2
   Subbar + 3-column app shell: hazard rail | map + timeline | extras
   ═══════════════════════════════════════════════════════════════ */

.fc2 { display: flex; flex-direction: column; min-height: calc(100vh - 60px); }

/* ── Subbar: region + run + view switch ─────────────────── */
.fc-subbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.fc-subbar-row {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  max-width: var(--max-wide);
  margin: 0 auto;
  padding: 9px 24px;
}
.fc-field { display: flex; align-items: center; gap: 8px; }
.fc-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.fc-sel {
  padding: 7px 30px 7px 12px;
  background: var(--elevated);
  border: 1px solid var(--border);
  border-radius: 7px;
  color: var(--text);
  font-size: 13px;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23a0a0a0' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  font-family: var(--font-mono);
  letter-spacing: 0.01em;
  min-width: 180px;
}
.fc-sel:hover { border-color: var(--border-2); }
.fc-sel:focus { border-color: var(--accent); outline: none; }
.fc-sel.run-mono { min-width: 210px; }

.fc-view-switch {
  margin-left: auto;
  display: inline-flex;
  background: var(--elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 2px;
  gap: 2px;
}
.fc-view-btn {
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 0;
  cursor: pointer;
  font-family: inherit;
}
.fc-view-btn:hover { color: var(--text); }
.fc-view-btn.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

/* ── 3-col app shell ────────────────────────────────────── */
.fc-shell {
  display: grid;
  grid-template-columns: 240px 1fr 280px;
  grid-template-areas: "left center right";
  flex: 1;
  min-height: 0;
  max-width: var(--max-wide);
  margin: 0 auto;
  width: 100%;
}
.fc-left   { grid-area: left; }
.fc-center { grid-area: center; }
.fc-right  { grid-area: right; }

/* ── Left rail: hazard list ─────────────────────────────── */
.fc-left {
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 14px 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow-y: auto;
}
.fc-side-section { display: flex; flex-direction: column; gap: 6px; }
.fc-side-head {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0 4px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.fc-side-head .sub {
  color: var(--faint);
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0.02em;
}

.haz-list { display: flex; flex-direction: column; gap: 3px; }
.haz-item {
  display: grid;
  grid-template-columns: 26px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
  border: 1px solid transparent;
  background: transparent;
  transition: background 150ms, border-color 150ms;
  width: 100%;
  text-align: left;
  font: inherit;
  color: var(--text);
}
.haz-item:hover { background: var(--elevated); }
.haz-item.active {
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  border-color: var(--accent);
}
.haz-icon {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.haz-icon svg { width: 16px; height: 16px; }
.haz-name { font-size: 13px; font-weight: 500; }
.haz-peak {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.02em;
}
.haz-item.active .haz-peak { color: var(--accent); font-weight: 600; }
.haz-peak.haz-peak-loading { color: var(--faint); }

/* ── Left-rail day list ─────────────────────────────────── */
.day-list { display: flex; flex-direction: column; gap: 1px; }
.day-item {
  display: grid;
  grid-template-columns: 36px 1fr 52px;
  gap: 8px;
  align-items: center;
  padding: 5px 10px 5px 8px;
  border-radius: 7px;
  cursor: pointer;
  border: 0;
  background: transparent;
  color: var(--text);
  border-left: 2px solid transparent;
  transition: background 150ms, border-color 150ms;
  width: 100%;
  text-align: left;
  font: inherit;
}
.day-item:hover { background: var(--elevated); }
.day-item.active {
  background: var(--elevated);
  border-left-color: var(--accent);
}
.day-num {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.04em;
  font-weight: 600;
}
.day-item.active .day-num { color: var(--accent); }
.day-date { font-size: 12px; font-weight: 500; font-family: var(--font-mono); letter-spacing: 0.01em; }
.day-item.active .day-date { color: var(--text); }
.day-risk {
  width: 56px;
  height: 6px;
  border-radius: 3px;
  background: var(--border);
  position: relative;
  overflow: hidden;
}
.day-risk::before {
  content: '';
  position: absolute;
  inset: 0;
  width: var(--fill, 0%);
  background: linear-gradient(90deg, var(--cat-mrgl), var(--cat-slgt), var(--cat-enh), var(--cat-mdt));
  border-radius: 3px;
  transition: width 220ms ease;
}
.day-risk[data-cat="none"] { opacity: 0.4; }
.day-risk[data-cat="mrgl"] { --fill: 22%; }
.day-risk[data-cat="slgt"] { --fill: 44%; }
.day-risk[data-cat="enh"]  { --fill: 64%; }
.day-risk[data-cat="mdt"]  { --fill: 84%; }
.day-risk[data-cat="high"] { --fill: 100%; }

/* ── Center: valid bar + legend + map + timeline ────────── */
.fc-center {
  padding: 14px 24px 24px;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.fc-center .valid-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin: 0 0 10px;
  padding: 0;
  background: transparent;
  border: 0;
}
.fc-center .valid-title {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}
.fc-center .valid-title h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 22px;
  letter-spacing: -0.01em;
  line-height: 1.2;
  margin: 0;
}
.fc-center .valid-win {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
}

/* View-switch sits inside the valid-bar, right-aligned */
.fc-center .fc-view-switch {
  margin-left: auto;
  display: inline-flex;
  background: var(--elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 2px;
  gap: 2px;
}

/* Legend strip — PROB ramp + CIG + VALID on one line */
.fc2 .legend-strip {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 11px;
  color: var(--muted);
  padding: 8px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 8px;
  min-height: 0;
}
.fc2 .legend-strip .legend-kicker {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.fc2 .legend-block {
  display: flex;
  align-items: center;
  gap: 8px;
}
.fc2 .legend-ramp {
  display: flex;
  height: 14px;
  border-radius: 3px;
  overflow: hidden;
  border: 1px solid var(--border);
}
.fc2 .legend-ramp span { width: 28px; display: block; }
.fc2 .legend-ticks {
  display: flex;
  gap: 0;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--muted);
}
.fc2 .legend-ticks span { width: 28px; text-align: left; padding-left: 1px; }
.fc2 .legend-swatch,
.fc2 .legend-cat-swatch {
  width: 28px;
  height: 14px;
  border-radius: 3px;
  display: inline-block;
  vertical-align: middle;
  border: 1px solid var(--border);
}
.fc2 .legend-label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--muted);
}
.fc2 .legend-cat-item,
.fc2 .legend-cig-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.fc2 .legend-sep {
  display: inline-block;
  width: 1px;
  height: 18px;
  background: var(--border);
}
/* Compact 4-ramp legend used in the Hazards (2x2) view */
.fc2 .legend-quad {
  display: grid;
  grid-template-columns: repeat(2, auto);
  column-gap: 12px;
  row-gap: 4px;
  align-items: center;
}
.fc2 .lq-row {
  display: grid;
  grid-template-columns: 30px auto;
  align-items: center;
  gap: 5px;
}
/* Vertical divider between the two legend columns, mirroring .legend-sep */
.fc2 .legend-quad .lq-row:nth-child(odd) {
  padding-right: 12px;
  border-right: 1px solid var(--border);
}
.fc2 .lq-label {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--muted);
  white-space: nowrap;
}
.fc2 .lq-stack {
  display: flex;
  flex-direction: column;
  gap: 1px;
  width: 130px;
}
.fc2 .lq-ramp {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  height: 8px;
  border-radius: 2px;
  overflow: hidden;
  border: 1px solid var(--border);
}
.fc2 .lq-ticks {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  font-family: var(--font-mono);
  font-size: 8.5px;
  color: var(--text-faint);
  line-height: 1;
}
.fc2 .lq-ticks > span {
  text-align: center;
}
.fc2 .cig-swatch {
  width: 20px;
  height: 13px;
  border-radius: 3px;
  border: 1px solid var(--border-2);
  display: inline-block;
}
.fc2 .cig-swatch.cig-dots {
  background-image: radial-gradient(circle, var(--text) 0.8px, transparent 0.8px);
  background-size: 4px 4px;
}
.fc2 .cig-swatch.cig-diag {
  background-image: repeating-linear-gradient(-45deg, transparent 0 1.5px, var(--text) 1.5px 2.5px);
}
.fc2 .cig-swatch.cig-cross {
  background-image:
    repeating-linear-gradient(45deg, transparent 0 1.5px, var(--text) 1.5px 2.5px),
    repeating-linear-gradient(-45deg, transparent 0 1.5px, var(--text) 1.5px 2.5px);
}
.fc2 .legend-valid {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}
.fc2 .legend-valid .vt {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text);
}

/* Map wrapper */
.fc2 .map-wrap {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  aspect-ratio: 3/2;
  display: flex;
  align-items: center;
  justify-content: center;
}
.fc2 .map-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: opacity 220ms ease;
}
.fc2 .map-img.loading { opacity: 0.35; }
.fc2 .map-wrap .loadbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent);
  transform: translateX(-100%);
  transition: transform 300ms ease;
  pointer-events: none;
}
.fc2 .map-wrap.reloading .loadbar {
  animation: fc-loadbar 1s linear infinite;
}
@keyframes fc-loadbar {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.fc2 .map-tools {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  gap: 6px;
}
.fc2 .map-tool {
  width: 32px;
  height: 32px;
  background: color-mix(in oklab, var(--bg) 60%, transparent);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.fc2 .map-tool:hover { border-color: var(--accent); color: var(--accent); }

/* Timeline (14-day horizontal strip — categorical colors per day) */
.timeline {
  margin: 0 0 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.tl-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 2px;
}
.tl-head .t { font-size: 12px; font-weight: 600; }
.tl-head .s { font-family: var(--font-mono); font-size: 10.5px; color: var(--muted); }
.tl-grid {
  display: grid;
  grid-template-columns: repeat(14, 1fr);
  gap: 3px;
}
.tl-cell {
  position: relative;
  height: 26px;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: var(--elevated);
  cursor: pointer;
  overflow: hidden;
  transition: transform 120ms ease, border-color 120ms;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text);
  padding: 0;
  font-weight: 600;
  white-space: nowrap;
}
.tl-cell:hover {
  transform: translateY(-1px);
  border-color: var(--accent);
  z-index: 2;
}
.tl-cell.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}
/* Categorical background per data-cat */
.tl-cell[data-cat="none"] { background: var(--elevated); color: var(--muted); }
.tl-cell[data-cat="tstm"] { background: color-mix(in srgb, var(--cat-tstm) 55%, var(--surface)); color: var(--text); }
.tl-cell[data-cat="mrgl"] { background: var(--cat-mrgl); color: #0a0d14; }
.tl-cell[data-cat="slgt"] { background: var(--cat-slgt); color: #0a0d14; }
.tl-cell[data-cat="enh"]  { background: var(--cat-enh);  color: #0a0d14; }
.tl-cell[data-cat="mdt"]  { background: var(--cat-mdt);  color: #fff; }
.tl-cell[data-cat="high"] { background: var(--cat-high); color: #fff; }
.tl-axis {
  display: grid;
  grid-template-columns: repeat(14, 1fr);
  gap: 3px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  color: var(--faint);
}
.tl-axis span {
  text-align: center;
  padding: 0 2px;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* History-back button */
.fc-center .history-btn {
  padding: 6px 14px;
  font-size: 12px;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  margin-left: auto;
}
.fc-center .history-btn:hover { color: var(--text); border-color: var(--border-2); }

.fc-center .history-header {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 18px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.fc-hist-kicker {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.fc-hist-date {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
}
.fc-hist-date .fc-hist-hour {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--muted);
  margin-left: 6px;
  font-weight: 500;
}
.fc-hist-sub {
  font-size: 12.5px;
  color: var(--muted);
}

.fc-history-grid .thumb-card {
  border: 0;
  background: var(--surface);
  padding: 0;
  text-align: left;
  color: inherit;
}
.fc-history-grid .thumb-card-label {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 10px 12px;
  border-top: 1px solid var(--border);
}
.fc-hist-run {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text);
  font-weight: 600;
}
.fc-hist-meta {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--muted);
  letter-spacing: 0.02em;
}
.fc-history-grid .thumb-card.current .fc-hist-run { color: var(--accent); }

.fc-thumb-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}
.fc-thumb-grid .thumb-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  transition: border-color 150ms, transform 150ms;
}
.fc-thumb-grid .thumb-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.fc-thumb-grid .thumb-card.current { border-color: var(--accent); }
.fc-thumb-grid .thumb-card-img {
  width: 100%;
  aspect-ratio: 3/2;
  object-fit: cover;
  background: var(--elevated);
  display: block;
}
.fc-thumb-grid .thumb-card-label {
  padding: 10px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--muted);
  font-family: var(--font-mono);
  gap: 8px;
}

/* ── Right rail ─────────────────────────────────────────── */
.fc-right {
  background: var(--surface);
  border-left: 1px solid var(--border);
  padding: 20px 16px 24px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  overflow-y: auto;
}

/* Hazard breakdown (peak bars per hazard) */
.haz-breakdown { display: flex; flex-direction: column; gap: 10px; }
.haz-breakdown .hb {
  display: grid;
  grid-template-columns: 74px 1fr 44px;
  gap: 10px;
  align-items: center;
}
.haz-breakdown .hb .hname {
  font-size: 12.5px;
  font-weight: 500;
}
.haz-breakdown .hb .bar {
  height: 6px;
  border-radius: 3px;
  background: var(--border);
  overflow: hidden;
  position: relative;
}
.haz-breakdown .hb .bar::before {
  content: '';
  position: absolute;
  inset: 0;
  width: var(--v, 0%);
  background: linear-gradient(90deg, var(--p-5), var(--p-15), var(--p-30), var(--p-45), var(--p-60));
  transition: width 260ms ease;
}
.haz-breakdown .hb .val {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text);
  text-align: right;
  font-weight: 600;
}
.haz-breakdown .hb.empty .val { color: var(--faint); font-weight: 500; }

/* Metadata list */
.meta-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
}
.meta-row { display: flex; justify-content: space-between; color: var(--muted); gap: 10px; }
.meta-row strong { color: var(--text); font-weight: 500; }

/* Peak-today card — dynamic, clickable, goes to /spot with lat/lon preset */
.fc-peak-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--elevated);
  color: var(--text);
  text-decoration: none;
  transition: border-color 150ms, background 150ms;
}
.fc-peak-card:hover {
  border-color: var(--accent);
  color: var(--text);
  background: color-mix(in srgb, var(--accent) 8%, var(--elevated));
}
.fc-peak-title { font-size: 13.5px; font-weight: 600; }
.fc-peak-sub {
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 4px;
  font-family: var(--font-mono);
}
.fc-peak-card.empty { opacity: 0.7; cursor: default; }
.fc-peak-card.empty:hover { border-color: var(--border); background: var(--elevated); }

/* ── Responsive ─────────────────────────────────────────── */

/* Medium screens: right rail moves under the shell so its info stays
   accessible rather than disappearing. */
@media (max-width: 1200px) {
  .fc-shell {
    grid-template-columns: 220px 1fr;
    grid-template-areas:
      "left center"
      "right right";
  }
  .fc-right {
    border-left: 0;
    border-top: 1px solid var(--border);
    padding: 18px 20px 22px;
    flex-direction: row;
    gap: 24px;
    flex-wrap: wrap;
  }
  .fc-right .fc-side-section { flex: 1 1 220px; min-width: 220px; }
}

/* Mobile: single-column, hazard row as 5-col tile grid, legend wraps cleanly */
@media (max-width: 860px) {
  .fc2 { min-height: auto; }
  .fc-shell {
    grid-template-columns: 1fr;
    grid-template-areas: "left" "center" "right";
  }

  .fc-left {
    border-right: 0;
    border-bottom: 1px solid var(--border);
    padding: 10px 12px 12px;
    gap: 8px;
  }
  .fc-left .fc-side-head { padding: 0 2px; font-size: 10px; }

  /* Hazard list: fixed 5-column grid (no scrolling needed). Each item is a
     compact icon tile with name + peak stacked underneath. */
  .haz-list {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
  }
  .haz-item {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
    gap: 2px;
    padding: 8px 4px 8px;
    min-height: 64px;
    justify-items: center;
    text-align: center;
  }
  .haz-icon { width: 26px; height: 26px; margin: 0 auto; }
  .haz-icon svg { width: 15px; height: 15px; }
  .haz-name {
    font-size: 11px;
    font-weight: 500;
    line-height: 1.15;
  }
  .haz-peak {
    font-size: 10.5px;
    letter-spacing: 0;
  }

  /* Day list hidden on mobile — timeline covers day navigation */
  .fc-day-section { display: none; }

  .fc-center { padding: 16px 14px 28px; }
  .fc-center .valid-bar { gap: 10px; flex-wrap: wrap; }
  .fc-center .valid-title h1 { font-size: 20px; }
  .fc-center .fc-view-switch { margin-left: auto; }
  .fc-subbar-row { padding: 10px 14px; gap: 10px; }
  .fc-sel { min-width: 0; flex: 1 1 150px; }

  /* Legend: wrap each logical block to its own row; nothing overflows */
  .fc2 .legend-strip {
    padding: 10px 12px;
    gap: 10px 12px;
    flex-wrap: wrap;
    align-items: flex-start;
  }
  .fc2 .legend-block { flex: 0 0 auto; }
  .fc2 .legend-ramp { max-width: 100%; overflow: hidden; }
  .fc2 .legend-valid {
    margin-left: 0;
    flex-basis: 100%;
    padding-top: 8px;
    border-top: 1px solid var(--border);
  }
  .fc2 .legend-sep { display: none; }  /* dividers unnecessary with wrap */

  /* Right rail becomes stacked content below */
  .fc-right {
    border-top: 1px solid var(--border);
    flex-direction: column;
    gap: 18px;
    padding: 18px 16px 24px;
  }
  .fc-right .fc-side-section { flex: initial; min-width: 0; }

  /* Timeline cells: bigger touch targets */
  .tl-cell { height: 40px; }
  .fc-view-btn { padding: 8px 10px; min-height: 36px; }
  .fc-view-btn svg { display: none; }
}

@media (max-width: 560px) {
  .tl-grid { grid-template-columns: repeat(7, 1fr); }
  .tl-axis { grid-template-columns: repeat(7, 1fr); }
  .tl-cell:nth-child(n+8),
  .tl-axis span:nth-child(n+8) { display: none; }
  .fc-center .valid-title h1 { font-size: 18px; }
  .fc2 .legend-ramp span { width: 22px; }
  .fc2 .legend-ticks span { width: 22px; font-size: 9px; }
  .fc-hist-date { font-size: 18px; }
  .fc-hist-date .fc-hist-hour { font-size: 12px; }
  .haz-item { padding: 6px 2px; min-height: 58px; }
  .haz-name { font-size: 10.5px; }
}


/* ═══════════════════════════════════════════════════════════════
   Spot Forecast page (2026 redesign — scoped under .sp2)
   ═══════════════════════════════════════════════════════════════ */

.sp2 { display: flex; flex-direction: column; }

.sp-hero {
  background: linear-gradient(180deg, var(--surface) 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--border);
  padding: 28px 0 0;
}
.sp-hero-row {
  display: flex;
  align-items: flex-end;
  gap: 32px;
  flex-wrap: wrap;
}
.sp-hero-loc { flex: 1 1 400px; min-width: 0; }
.sp2 .eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.sp2 .eyebrow .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}
.sp-city {
  font-family: var(--font-display);
  font-size: clamp(26px, 4vw, 40px);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.05;
}
.sp-city .region {
  color: var(--muted);
  font-weight: 500;
}
.sp-coords {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--muted);
  margin-top: 6px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.sp-coords strong { color: var(--text); font-weight: 500; }

.sp-search-block {
  flex: 0 0 380px;
  position: relative;
}
.sp-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: border-color 150ms;
}
.sp-search:focus-within { border-color: var(--accent); }
.sp-search > svg { width: 16px; height: 16px; color: var(--muted); flex-shrink: 0; }
.sp-search input {
  flex: 1;
  font-size: 14px;
  color: var(--text);
  min-width: 0;
  padding: 6px 0;
  border: 0;
  background: transparent;
}
.sp-search input::placeholder { color: var(--faint); }
.sp-geobtn {
  width: 30px;
  height: 30px;
  border: 0;
  background: transparent;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  cursor: pointer;
  flex-shrink: 0;
}
.sp-geobtn:hover { color: var(--text); background: var(--elevated); }

.sp-meta-strip {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: center;
  padding: 14px 20px;
  margin-top: 20px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  border-top: 1px solid var(--border);
}
.sp-meta-strip .sp-sep { color: var(--faint); }
.sp-meta-strip strong { color: var(--text); font-weight: 500; }

.sp-today { padding: 28px 20px 8px; max-width: var(--max); margin: 0 auto; width: 100%; }
.sp-today-grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 16px;
}
.sp-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.sp-card-h {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.sp-card-h .t { font-size: 13px; font-weight: 600; }
.sp-card-h .s {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
}
.sp-cat-chip { display: inline-flex; align-items: center; gap: 10px; }
.sp-cat-chip .tag {
  font-family: var(--font-mono);
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 4px 10px;
  border-radius: 5px;
  font-size: 11px;
  color: #0a0d14;
  background: var(--elevated);
}
.sp-cat-chip .tag[data-cat="tstm"] { background: var(--cat-tstm); color: #fff; }
.sp-cat-chip .tag[data-cat="mrgl"] { background: var(--cat-mrgl); }
.sp-cat-chip .tag[data-cat="slgt"] { background: var(--cat-slgt); }
.sp-cat-chip .tag[data-cat="enh"]  { background: var(--cat-enh); }
.sp-cat-chip .tag[data-cat="mdt"]  { background: var(--cat-mdt); color: #fff; }
.sp-cat-chip .tag[data-cat="high"] { background: var(--cat-high); color: #fff; }
.sp-cat-chip .name { font-weight: 600; font-size: 15px; }
.sp-cat-sub {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.55;
}
.sp-cat-sub:empty { display: none; }

.sp-haz-ladder { display: flex; flex-direction: column; gap: 10px; }
.sp-haz-row {
  display: grid;
  grid-template-columns: 100px 1fr 44px;
  gap: 10px;
  align-items: center;
}
.sp-haz-row .n {
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 7px;
}
.sp-haz-row .n::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--c, var(--accent));
}
.sp-haz-row .bar {
  height: 6px;
  border-radius: 3px;
  background: var(--border);
  position: relative;
  overflow: hidden;
}
.sp-haz-row .bar::before {
  content: '';
  position: absolute;
  inset: 0;
  width: var(--v, 0%);
  border-radius: 3px;
  background: linear-gradient(90deg, var(--p-5), var(--p-15), var(--p-30), var(--p-45), var(--p-60));
  transition: width 260ms ease;
}
.sp-haz-row .val {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  text-align: right;
}
.sp-haz-row.empty .val { color: var(--faint); font-weight: 500; }

.sp-section {
  padding: 14px 20px;
  max-width: var(--max);
  margin: 0 auto;
  width: 100%;
}
.sp-section-h {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 14px;
  flex-wrap: wrap;
  gap: 10px;
}
.sp-section-h h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 20px;
  letter-spacing: -0.01em;
}
.sp-section-h .s {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
}

.sp-daily-band {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: thin;
}
.sp-day-cell {
  flex: 0 0 auto;
  width: 84px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  cursor: default;
  text-align: left;
  color: var(--text);
  font: inherit;
}
.sp-day-cell.today {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 7%, transparent);
}
.sp-day-cell .d {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--muted);
}
.sp-day-cell .t { font-size: 13px; font-weight: 600; }
.sp-day-cell.today .t { color: var(--accent); }
.sp-day-cell .tag {
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 2px 0;
  border-radius: 3px;
  text-align: center;
  color: #0a0d14;
  background: var(--elevated);
}
.sp-day-cell .tag[data-cat="none"] { background: var(--border); color: var(--muted); }
.sp-day-cell .tag[data-cat="tstm"] { background: var(--cat-tstm); color: #fff; }
.sp-day-cell .tag[data-cat="mrgl"] { background: var(--cat-mrgl); }
.sp-day-cell .tag[data-cat="slgt"] { background: var(--cat-slgt); }
.sp-day-cell .tag[data-cat="enh"]  { background: var(--cat-enh); }
.sp-day-cell .tag[data-cat="mdt"]  { background: var(--cat-mdt); color: #fff; }
.sp-day-cell .tag[data-cat="high"] { background: var(--cat-high); color: #fff; }

.sp-nodata {
  padding: 32px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin: 24px 0;
  text-align: center;
}
.sp-nodata p { margin-bottom: 8px; }

/* Mobile */
@media (max-width: 860px) {
  .sp-hero { padding: 20px 0 0; }
  .sp-hero-row { gap: 16px; padding: 0 16px; }
  .sp-hero-loc { flex: 1 1 100%; }
  .sp-search-block { flex: 1 1 100%; }
  .sp-meta-strip { padding: 12px 16px; margin-top: 16px; }
  .sp-today { padding: 20px 16px 4px; }
  .sp-today-grid { grid-template-columns: 1fr; gap: 12px; }
  .sp-section { padding: 14px 16px; }
  .sp-haz-row { grid-template-columns: 80px 1fr 40px; }
}
