:root {
  --ink: #1d1d1b;
  --muted: #6b6b66;
  --rule: #d9d6cf;
  --paper: #faf8f3;
  --card: #ffffff;
  --fire: #c8391b;
  --fire-dark: #9f2b12;
  --ok: #3a7d44;
  --warn: #d98c1f;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--fire-dark); }
.wrap { max-width: 960px; margin: 0 auto; padding: 0 20px 48px; }

header.site { border-bottom: 3px double var(--rule); padding: 22px 0 14px; margin-bottom: 20px; }
header.site h1 { margin: 0; font-size: 30px; letter-spacing: -0.01em; }
header.site h1 a { color: inherit; text-decoration: none; }
header.site .tag { color: var(--muted); margin: 4px 0 0; }
.updated { color: var(--muted); font-size: 14px; }

/* Hero: dark ground with an ember glow (the bugfireinfo OG-image treatment,
   "suggests fire without faking a photograph") and a live plot of the fires
   on a Nevada outline. */
.hero { position: relative; overflow: hidden; display: grid; grid-template-columns: 1.15fr 1fr; gap: 24px;
  align-items: center; margin: 20px 0 28px; padding: 36px 40px; border-radius: 12px;
  background: #17120f; color: #fff; box-shadow: 0 4px 18px rgba(0,0,0,.25); }
.hero-glow { position: absolute; left: -260px; bottom: -340px; width: 900px; height: 900px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(214,58,20,.55) 0%, rgba(160,27,27,.28) 38%, rgba(23,18,15,0) 68%); }
.hero-glow2 { position: absolute; right: -220px; top: -320px; width: 700px; height: 700px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(196,90,30,.28) 0%, rgba(23,18,15,0) 65%); }
.hero-text, .hero-map { position: relative; }
.hero-tag { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .17em; text-transform: uppercase;
  color: #ffc9b4; border: 1.5px solid rgba(255,150,110,.5); border-radius: 999px; padding: 6px 14px; }
.hero h1 { margin: 16px 0 0; font-size: 44px; line-height: 1; font-weight: 800; letter-spacing: -.03em; }
.hero h1 a { color: #fff; text-decoration: none; }
.hero-sub { color: #e9ddd6; font-size: 17px; margin: 14px 0 6px; max-width: 34em; }
.hero .updated { color: #a9998f; }
.hero .btn-map { margin: 22px 0 0; display: inline-flex; padding: 16px 26px; font-size: 20px; }
.hero-map { margin: 0; text-align: center; }
.hero-map svg { width: 100%; max-height: 380px; display: block; margin: 0 auto; overflow: visible; }
.hero-map figcaption { color: #a9998f; font-size: 12px; margin-top: 6px; }
.nv-outline { fill: rgba(255,255,255,.06); stroke: rgba(255,200,170,.75); stroke-width: 2; stroke-linejoin: round;
  vector-effect: non-scaling-stroke; }
#nv-fires .glow { fill: url(#ember); animation: breathe 3.2s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
#nv-fires .active { fill: #ff7a45; stroke: #17120f; stroke-width: 1.5; }
#nv-fires .contained { fill: #5fb56a; stroke: #17120f; stroke-width: 1.5; }
#nv-fires a:hover circle.active, #nv-fires a:hover circle.contained { stroke: #fff; }
@keyframes breathe { 0%, 100% { transform: scale(.85); opacity: .7; } 50% { transform: scale(1.15); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { #nv-fires .glow { animation: none; } }

.btn-map { display: flex; align-items: center; justify-content: center; gap: 12px;
  background: var(--fire); color: #fff; text-decoration: none; font-weight: 700; font-size: 22px;
  padding: 20px 28px; border-radius: 8px; margin: 18px 0 28px; box-shadow: 0 2px 6px rgba(0,0,0,.18); }
.btn-map:hover { background: var(--fire-dark); }
.btn-map svg { width: 30px; height: 30px; fill: none; stroke: currentColor; stroke-width: 2; }

h2 { font-size: 20px; margin: 28px 0 10px; border-bottom: 1px solid var(--rule); padding-bottom: 6px; }
h2 .count { color: var(--muted); font-weight: 400; font-size: 16px; }

.fires { list-style: none; margin: 0; padding: 0; }
.fire { display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; background: var(--card);
  border: 1px solid var(--rule); border-left: 5px solid var(--fire); border-radius: 6px; padding: 12px 16px; margin-bottom: 10px; }
.fire.contained { border-left-color: var(--ok); }
.fire .name { font-size: 19px; font-weight: 700; }
.fire .name a { text-decoration: none; }
.fire .name a:hover { text-decoration: underline; }
.fire .county { color: var(--muted); font-weight: 400; font-size: 15px; }
.fire .stats { grid-column: 1; color: var(--ink); font-size: 15px; }
.fire .stats span + span::before { content: " · "; color: var(--muted); }
.fire .meta { grid-column: 1; color: var(--muted); font-size: 13px; }
.fire .bar { grid-column: 2; grid-row: 1 / span 3; width: 120px; align-self: center; text-align: center; font-size: 13px; color: var(--muted); }
.fire .bar .track { height: 10px; background: #eee9df; border-radius: 5px; overflow: hidden; margin-top: 4px; }
.fire .bar .fill { height: 100%; background: var(--ok); }
.fire .bar .pctnum { font-size: 22px; font-weight: 700; color: var(--ink); }
.fire .links { grid-column: 1 / -1; font-size: 14px; margin-top: 2px; }
.fire .links a + a::before { content: " · "; color: var(--muted); }

.notice { background: #fff6e5; border: 1px solid #f1d9a6; padding: 10px 14px; border-radius: 6px; font-size: 14px; }
.error { background: #fde8e4; border: 1px solid #f0b3a7; padding: 10px 14px; border-radius: 6px; }

.resource { background: var(--card); border: 1px solid var(--rule); border-left: 5px solid var(--warn); border-radius: 6px; padding: 14px 18px; }
.resource .resource-title { font-size: 19px; font-weight: 700; text-decoration: none; }
.resource p { margin: 6px 0 8px; font-size: 15px; }

footer { margin-top: 48px; padding-top: 20px; border-top: 2px solid var(--rule); color: var(--muted); font-size: 14px; }
footer p { margin: 8px 0; }

/* incident page */
.crumb { font-size: 14px; margin-bottom: 8px; }
.incident h1 { margin: 0 0 4px; font-size: 32px; }
.incident .sub { color: var(--muted); margin: 0 0 16px; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; background: var(--card);
  border: 1px solid var(--rule); border-radius: 6px; padding: 14px 18px; margin: 0 0 18px; font-size: 15px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.big { font-size: 26px; font-weight: 700; }
#map { height: 460px; border: 1px solid var(--rule); border-radius: 6px; margin-bottom: 18px; }
.official { background: var(--card); border: 1px solid var(--rule); border-radius: 6px; padding: 14px 18px; }
.official h3 { margin: 0 0 6px; font-size: 16px; }
.official ul { margin: 0; padding-left: 18px; }

@media (max-width: 600px) {
  .hero { grid-template-columns: 1fr; padding: 26px 22px; }
  .hero h1 { font-size: 34px; }
  .hero-map svg { max-height: 300px; }
  .fire { grid-template-columns: 1fr; }
  .fire .bar { grid-column: 1; grid-row: auto; width: auto; text-align: left; }
  .kv { grid-template-columns: 1fr; }
}
