:root {
  --bg: #f0ecf7; --ink: #12161c; --muted: #5c6774; --line: #d4cde3;
  --hero: #0d1318; --card: #fff; --lavender: #B0A4E0; --lavender-deep: #7B6FB0;
  --ember: #e24a12; --radius: 18px; --max: 1120px;
  --fwi-low: #2ecc71; --fwi-mod: #f1c40f; --fwi-high: #e67e22;
  --fwi-vhigh: #e74c3c; --fwi-ext: #6c1b3a;
  --status-fill: #ff7f50; --status-stroke: #c45c2a;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { font-family: Lexend, ui-sans-serif, system-ui, sans-serif; color: var(--ink); background: var(--bg); line-height: 1.55; }
a { color: inherit; }
.wrap { width: min(var(--max), calc(100% - 40px)); margin: 0 auto; }
h1 { font-size: clamp(2rem, 4vw, 3.1rem); line-height: 0.98; margin: 0 0 12px; letter-spacing: -0.03em; }
h2 { font-size: 1.2rem; margin: 0 0 10px; }
p { margin: 0 0 1rem; color: var(--muted); }
.muted { color: var(--muted); }
header { position: sticky; top: 0; z-index: 20; backdrop-filter: blur(16px); background: rgba(13,19,24,.86); color: #f4f1ea; border-bottom: 1px solid rgba(255,255,255,.08); }
header .bar { display: flex; align-items: center; justify-content: space-between; min-height: 64px; gap: 16px; }
.brand { text-decoration: none; font-weight: 700; }
nav { display: flex; gap: 4px; flex-wrap: wrap; }
nav a { text-decoration: none; font-size: 14px; color: #c9d0d6; padding: 8px 10px; border-radius: 999px; }
nav a.active, nav a:hover { color: #fff; background: rgba(176,164,224,.28); }
.menu-btn { display: none; background: transparent; color: #f4f1ea; border: 0; font: inherit; cursor: pointer; }
.page-hero { padding: 40px 0 8px; }
.crumb { font-size: 13px; color: var(--muted); margin: 0 0 12px; }
.crumb a { color: var(--lavender-deep); text-decoration: none; }
.place-under { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; font-weight: 600; color: #3c3558; }
.place-under .place-text { color: #3c3558; font-weight: 600; }
.place-under .flags,
.state-h1 .flags,
.chip-flag .flags {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.place-under .flags img,
.state-h1 .flags img {
  display: block;
  height: 22px;
  width: auto;
  border-radius: 3px;
  box-shadow: 0 0 0 1px rgba(0,0,0,.12);
}
.state-h1 {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
}
.chip-flag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.chip-flag .flags img {
  display: block;
  height: 16px;
  width: auto;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(0,0,0,.12);
}
.chip.on .flags img { box-shadow: 0 0 0 1px rgba(255,255,255,.35); }
.dash-meta { display: flex; flex-wrap: wrap; gap: 10px 16px; margin: 0 0 12px; font-size: 13px; color: var(--muted); }
.dash-meta .updated { font-weight: 600; color: #4a5568; }
.dash-meta .updated::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #2ecc71; margin-right: 6px; }
.fire-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 0 0 8px; }
.fire-stats > div { background: linear-gradient(165deg,#fff,#faf8ff); border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; min-height: 110px; }
.fire-stats dt { font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); margin: 0 0 8px; }
.fire-stats dd { margin: 0; font-size: 1.35rem; font-weight: 700; }
.stat-status { border: 2px solid var(--status-stroke) !important; }
.stat-status dd { display: flex; align-items: center; gap: 10px; }
.status-dot { width: 14px; height: 14px; border-radius: 50%; background: var(--status-fill); border: 2px solid var(--status-stroke); }
.sub, .days { display: block; margin-top: 6px; font-size: 12px; font-weight: 600; color: var(--muted); }
.map-card { background: #101820; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.map-embed { position: relative; width: 100%; height: 520px; max-height: 75vh; background: #0d1318; }
.map-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.map-deep { margin: 14px 0 0; font-size: 13px; }
.map-deep a { color: var(--muted); }
.section-block { margin: 28px 0; }
.src-note { font-size: 12px; color: var(--muted); margin-top: 8px; }
.fwi-legend { display: flex; flex-wrap: wrap; gap: 8px 14px; margin: 0 0 14px; font-size: 12px; color: var(--muted); }
.fwi-legend i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; margin-right: 5px; }
.fwi-layout { display: grid; grid-template-columns: 1.4fr .9fr; gap: 16px; align-items: start; }
.fwi-chart-wrap { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px 8px 4px; }
.fwi-chart { width: 100%; height: auto; display: block; }
.fwi-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0 0 14px; }
.fwi-strip[data-cols="1"] { grid-template-columns: minmax(0, 1fr); }
.fwi-strip[data-cols="2"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.fwi-day { text-align: center; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px 8px; }
.fwi-daylbl { font-size: 11px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.fwi-chip { font-size: 13px; font-weight: 700; border-radius: 8px; padding: 6px 4px; }
.fwi-dayval { margin-top: 6px; font-size: 12px; font-weight: 700; color: #3c3558; }
.fwi-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
table.fwi-compact, .fire-table { width: 100%; border-collapse: collapse; font-size: 13px; }
table.fwi-compact th, table.fwi-compact td, .fire-table th, .fire-table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); }
.fwi-pill { display: inline-flex; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; color: #fff; }
.fwi-pill[data-band="moderate"], .fwi-pill[data-band="high"] { color: #1a1a1a; }
.fire-table-wrap { border: 1px solid var(--line); border-radius: 16px; background: #fff; overflow: hidden; }
.fire-table a { font-weight: 600; text-decoration: none; }
.fire-table a:hover { color: #7c6bb8; text-decoration: underline; }
.finder-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin: 0 0 12px; }
.finder-search { width: min(100%, 360px); font: inherit; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line); margin: 0; }
.finder-count { margin: 0; font-size: 13px; font-weight: 600; color: #4a5568; }
.filters { display: flex; flex-direction: column; gap: 10px; margin: 0 0 8px; }
.filter-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.filter-label { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); min-width: 72px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font: inherit; font-size: 13px; font-weight: 600; padding: 6px 11px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: #3c3558; cursor: pointer; }
.chip:hover { border-color: var(--lavender-deep); }
.chip.on { background: #3c3558; color: #fff; border-color: #3c3558; }
.chip .muted { color: inherit; opacity: .72; font-weight: 500; }
.region-list { list-style: none; padding: 0; margin: 16px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px 16px; }
.region-list a { font-weight: 600; text-decoration: none; }
.region-list a:hover { color: #7c6bb8; text-decoration: underline; }
.wx-line { font-size: 13px; color: var(--muted); }
.note { font-size: 13px; color: var(--muted); padding: 12px 14px; border-radius: 12px; background: rgba(176,164,224,.12); }
.stale-banner { background: #fff4e5; border: 1px solid #f0c36d; padding: 10px 14px; border-radius: 12px; margin: 0 0 16px; }
footer { padding: 36px 0 48px; color: #9aa4ae; background: var(--hero); margin-top: 24px; }
footer .bar { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
footer a { color: #d7dde3; text-decoration: none; }
.fineprint { font-size: 12px; color: #8b98a8; margin-top: 10px; }
@media (max-width: 900px) {
  .fire-stats { grid-template-columns: 1fr 1fr; }
  .fwi-layout { grid-template-columns: 1fr; }
  .menu-btn { display: inline-flex; }
  nav { display: none; width: 100%; flex-direction: column; }
  header.open nav { display: flex; }
}
@media (max-width: 520px) {
  .fire-stats { grid-template-columns: 1fr; }
}


/* Option A: FireMap brand + FireDB dropdown */
.brand { display: inline-flex; align-items: center; gap: 8px; color: #f4f1ea; font-size: 16px; letter-spacing: -0.01em; }
.brand-icon { border-radius: 5px; }
.nav-dd { position: relative; }
.nav-dd-btn {
  font: inherit; cursor: pointer; border: 0; background: transparent;
  color: #c9d0d6; padding: 8px 12px; border-radius: 999px;
}
.nav-dd-btn:hover, .nav-dd-btn.active, .nav-dd-btn[aria-expanded="true"] {
  color: #fff; background: rgba(176,164,224,.28);
}
.nav-dd-btn::after { content: " ▾"; font-size: 11px; opacity: .85; }
.nav-dd-panel {
  position: absolute; top: calc(100% + 6px); right: 0; min-width: 200px;
  padding: 8px; border-radius: 14px;
  background: #1a2228; border: 1px solid rgba(255,255,255,.1);
  box-shadow: 0 12px 32px rgba(0,0,0,.35);
  display: flex; flex-direction: column; gap: 2px; z-index: 30;
}
.nav-dd-panel a {
  display: block; padding: 10px 12px; border-radius: 10px;
  color: #e8edf0; text-decoration: none; font-size: 14px;
}
.nav-dd-panel a:hover, .nav-dd-panel a.active {
  background: rgba(176,164,224,.28); color: #fff;
}
@media (max-width: 800px) {
  .nav-dd { width: 100%; }
  .nav-dd-btn { width: 100%; text-align: left; }
  .nav-dd-panel {
    position: static; margin-top: 6px; box-shadow: none;
    border: 1px solid rgba(255,255,255,.08);
  }
}
