:root {
  --ink: #1f241f;
  --ink-soft: #3e443d;
  --muted: #716f64;
  --paper: #f2eadb;
  --paper-light: #fffaf0;
  --line: rgba(38, 42, 35, 0.2);
  --line-strong: rgba(38, 42, 35, 0.42);
  --pine: #1d4935;
  --pine-dark: #153426;
  --ember: #d94f2b;
  --ember-dark: #9e321d;
  --gold: #e0ae4e;
  --smoke: #8e887c;
  --serif: "Source Serif 4", Georgia, serif;
  --sans: "DM Sans", Arial, sans-serif;
  --story-panel: clamp(500px, 43vw, 620px);
  --shadow: 0 24px 70px rgba(39, 35, 27, 0.17);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

html,
body {
  min-height: 100%;
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
}

body { overflow-x: hidden; }

#story:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: -3px;
}

button,
a { font: inherit; }

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  z-index: 30;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  transform: translateY(-160%);
  background: var(--ink);
  color: white;
  text-decoration: none;
  transition: transform 160ms ease;
}

.skip-link:focus { transform: translateY(0); }

#map {
  position: fixed;
  z-index: 0;
  inset: 0;
  left: var(--story-panel);
  background: #e8e1d5;
}

.action-panel[hidden] { display: none; }
.legend[hidden],
.map-controls[hidden],
.status[hidden] { display: none; }

.action-panel {
  position: fixed;
  z-index: 6;
  inset: 0 0 0 var(--story-panel);
  display: grid;
  place-items: center;
  padding: clamp(44px, 7vw, 110px);
  overflow: auto;
  background:
    radial-gradient(circle at 82% 16%, rgba(224, 174, 78, .18), transparent 30%),
    repeating-linear-gradient(135deg, transparent 0 12px, rgba(255,255,255,.018) 12px 13px),
    #17382a;
  color: var(--paper-light);
}

.action-panel-inner {
  width: min(660px, 100%);
  padding: clamp(28px, 4vw, 48px);
  border: 1px solid rgba(255, 250, 240, .22);
  background: rgba(14, 43, 31, .72);
  box-shadow: 0 26px 80px rgba(7, 22, 16, .32);
}

.action-kicker {
  display: block;
  color: #f0c86f;
  font-size: .67rem;
  font-weight: 700;
  letter-spacing: .15em;
  text-transform: uppercase;
}

.action-panel h2 {
  max-width: 560px;
  margin: .6rem 0 .85rem;
  color: var(--paper-light);
  font-size: clamp(2.5rem, 5vw, 4.6rem);
}

.action-panel p {
  max-width: 590px;
  margin: 0;
  color: rgba(255, 250, 240, .72);
  font-size: .9rem;
  line-height: 1.6;
}

.action-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 1.5rem;
}

.action-links a {
  min-height: 92px;
  padding: 15px 16px;
  border: 1px solid rgba(255, 250, 240, .28);
  background: rgba(255, 250, 240, .055);
  color: var(--paper-light);
  text-decoration: none;
  transition: background 180ms ease, border-color 180ms ease, transform 180ms var(--ease);
}

.action-links a:hover,
.action-links a:focus-visible {
  border-color: #f0c86f;
  background: rgba(255, 250, 240, .1);
  transform: translateY(-2px);
}

.action-links span,
.action-links strong { display: block; }
.action-links span { color: rgba(255, 250, 240, .56); font-size: .61rem; letter-spacing: .08em; text-transform: uppercase; }
.action-links strong { margin-top: 9px; font-family: var(--serif); font-size: 1.05rem; }

.action-network {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin-top: 12px;
  background: rgba(255, 250, 240, .18);
}

.action-network span {
  min-height: 72px;
  padding: 12px;
  background: rgba(15, 49, 35, .96);
  color: rgba(255, 250, 240, .62);
  font-size: .61rem;
  line-height: 1.35;
}

.action-network strong {
  display: block;
  margin-bottom: 4px;
  color: #f0c86f;
  font-family: var(--serif);
  font-size: 1.35rem;
}

.action-panel .action-emergency {
  max-width: none;
  margin-top: 12px;
  padding: 11px 13px;
  border-left: 3px solid var(--ember);
  background: rgba(217, 79, 43, .13);
  color: rgba(255, 250, 240, .78);
  font-size: .72rem;
}

.action-emergency strong { color: var(--paper-light); }

.opening-orientation {
  position: fixed;
  z-index: 7;
  top: 43%;
  right: 8.5%;
  display: none;
  grid-template-columns: auto auto;
  align-items: center;
  column-gap: 7px;
  padding: 7px 10px;
  border: 1px solid rgba(24, 58, 43, .22);
  background: rgba(255, 250, 240, .9);
  box-shadow: 0 7px 20px rgba(30, 39, 32, .12);
  color: var(--pine);
  pointer-events: none;
  text-transform: uppercase;
}

body[data-active-step="overview"] .opening-orientation { display: grid; }
.opening-orientation i { grid-row: 1 / 3; width: 9px; height: 9px; border: 2px solid white; border-radius: 50%; background: var(--pine); box-shadow: 0 0 0 1px var(--pine); }
.opening-orientation strong { font-size: .7rem; letter-spacing: .12em; }
.opening-orientation span { grid-column: 2; color: var(--muted); font-size: .5rem; letter-spacing: .08em; }

.map-vignette {
  position: fixed;
  z-index: 1;
  inset: 0 auto 0 0;
  width: var(--story-panel);
  pointer-events: none;
  background:
    radial-gradient(circle at 8% 18%, rgba(217, 79, 43, 0.1), transparent 29%),
    linear-gradient(180deg, rgba(29, 73, 53, 0.05), transparent 22%);
}

.grain {
  position: fixed;
  z-index: 3;
  inset: 0;
  pointer-events: none;
  opacity: 0.23;
  mix-blend-mode: multiply;
  background-image:
    repeating-linear-gradient(0deg, rgba(43, 37, 29, 0.022) 0, rgba(43, 37, 29, 0.022) 1px, transparent 1px, transparent 4px),
    radial-gradient(circle at 20% 20%, rgba(217, 79, 43, 0.09), transparent 28%);
}

.masthead {
  position: fixed;
  z-index: 7;
  top: 0;
  left: 0;
  display: flex;
  width: var(--story-panel);
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  padding: 12px 28px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(90deg, rgba(242, 234, 219, 0.98), rgba(242, 234, 219, 0.84));
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  background: var(--pine-dark);
  color: var(--paper-light);
  font-family: var(--serif);
  font-size: 0.86rem;
  font-weight: 700;
}

.brand strong,
.brand small { display: block; }

.brand strong {
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.brand small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.masthead > p {
  margin: 0;
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.masthead > p i {
  padding: 0 0.22em;
  color: var(--ember);
  font-style: normal;
}

#story {
  position: relative;
  z-index: 2;
  width: var(--story-panel);
  padding: 0 34px 15vh 28px;
}

.step {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  justify-content: center;
  scroll-margin-top: 84px;
  opacity: 0.36;
  transform: translateY(12px);
  transition: opacity 480ms ease, transform 650ms var(--ease);
}

.step.active {
  opacity: 1;
  transform: none;
}

.hero {
  min-height: 100svh;
  padding: 8vh 0 6vh;
}

.hero .scroll-cue { margin-top: 1rem; }

.hero-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 1.1rem;
  color: var(--ember-dark);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero-meta span + span {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.hero-meta span + span::before {
  width: 26px;
  height: 1px;
  content: "";
  background: currentColor;
}

h1,
h2 {
  margin: 0.45rem 0 1.15rem;
  font-family: var(--serif);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 0.96;
  text-wrap: balance;
}

h1 {
  max-width: 560px;
  font-size: clamp(4.1rem, 7.6vw, 6.8rem);
}

h2 { font-size: clamp(2.25rem, 4.1vw, 3.25rem); }

.dek {
  max-width: 560px;
  margin: 0;
  color: var(--ink-soft);
  font-family: var(--serif);
  font-size: clamp(1.08rem, 1.8vw, 1.32rem);
  font-weight: 600;
  line-height: 1.5;
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin-top: 1.9rem;
  border: 1px solid var(--line);
  background: var(--line);
}

.hero-metrics div {
  min-height: 110px;
  padding: 14px;
  background: rgba(252, 246, 234, 0.82);
}

.hero-metrics strong {
  display: block;
  color: var(--ember-dark);
  font-family: var(--serif);
  font-size: clamp(1.6rem, 2.8vw, 2.3rem);
  line-height: 1;
}

.hero-metrics span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.65rem;
  line-height: 1.35;
}

.hero-source {
  margin: 0.72rem 0 0;
  color: var(--muted);
  font-size: 0.64rem;
  line-height: 1.45;
}

.scroll-cue {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  align-self: flex-start;
  gap: 12px;
  margin-top: 2rem;
  color: var(--ember-dark);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-decoration: none;
  text-transform: uppercase;
}

.scroll-cue b {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  transition: transform 200ms var(--ease), background 200ms ease;
}

.scroll-cue:hover b {
  transform: translateY(4px);
  background: var(--ember);
  color: white;
}

.card {
  position: relative;
  min-height: auto;
  margin: 64vh 0;
  padding: 30px 34px 32px;
  overflow: hidden;
  border: 1px solid rgba(42, 38, 30, 0.22);
  background: rgba(255, 250, 240, 0.95);
  box-shadow: var(--shadow);
  backdrop-filter: blur(15px) saturate(0.9);
}

.card::before {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  content: "";
  background: linear-gradient(90deg, var(--ember) 0 74px, rgba(217, 79, 43, 0.15) 74px 100%);
}

.card::after {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 10px;
  height: 10px;
  border-top: 1px solid var(--line-strong);
  border-right: 1px solid var(--line-strong);
  content: "";
}

.chapter {
  color: var(--ember-dark);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.card p,
.card li {
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.68;
}

.story-copy {
  color: var(--ink-soft) !important;
  font-family: var(--serif);
  font-size: 1.04rem !important;
  font-weight: 600;
  line-height: 1.56 !important;
}

mark {
  padding: 0 0.1em;
  background: linear-gradient(transparent 58%, rgba(217, 79, 43, 0.21) 58%);
  color: var(--ember-dark);
  font-weight: 700;
}

.area-compare {
  margin: 1.2rem 0 0;
  padding: 15px 16px;
  border: 1px solid rgba(158, 50, 29, 0.18);
  background: rgba(217, 79, 43, 0.04);
}

.area-compare figcaption {
  display: flex;
  justify-content: space-between;
  margin-bottom: 13px;
  color: var(--ink-soft);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.area-compare figcaption small {
  color: var(--muted);
  font-size: 0.56rem;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}

.area-row {
  display: grid;
  grid-template-columns: 78px 1fr 68px;
  align-items: center;
  gap: 10px;
  min-height: 27px;
  color: var(--muted);
  font-size: 0.68rem;
}

.area-row i {
  display: block;
  height: 7px;
  background: var(--ember);
}

.area-row.teste i { width: 51%; }
.area-row strong { color: var(--ember-dark); font-size: 0.68rem; text-align: right; }

.map-note {
  margin: 1rem 0 0;
  padding: 10px 12px;
  border-left: 2px solid var(--gold);
  background: rgba(224, 174, 78, 0.09);
  font-size: 0.72rem !important;
  line-height: 1.45 !important;
}

.live-source {
  position: relative;
  margin-top: 1rem;
  padding: 14px 16px 15px 18px;
  border: 1px solid rgba(255, 250, 240, 0.16);
  border-left: 5px solid var(--gold);
  background:
    repeating-linear-gradient(135deg, transparent 0 7px, rgba(255,255,255,.025) 7px 8px),
    var(--pine-dark);
  box-shadow: 0 12px 30px rgba(21, 52, 38, 0.17);
  color: var(--paper-light);
}

.live-source > span {
  display: block;
  color: #f4c96f;
  font-size: 0.61rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.live-source p {
  margin: 0.45rem 0 0;
  color: rgba(255, 250, 240, 0.84);
  font-size: 0.72rem;
  line-height: 1.52;
}

.live-source a {
  color: #fff2c8;
  font-weight: 700;
  text-underline-offset: 2px;
}

.timeline {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  margin: 1.1rem 0 0;
  border: 1px solid rgba(158, 47, 28, 0.2);
  background: rgba(158, 47, 28, 0.2);
}

.timeline div {
  min-height: 82px;
  padding: 12px 14px;
  background: rgba(255, 250, 240, 0.92);
}

.timeline strong,
.timeline span { display: block; }
.timeline strong { color: var(--ember-dark); font-family: var(--serif); font-size: 1.3rem; }
.timeline span { margin-top: 6px; color: var(--muted); font-size: 0.68rem; line-height: 1.35; }

.firestorm-note {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  align-items: center;
  gap: 8px;
  margin: 1.15rem 0 0;
  padding: 13px;
  border: 1px solid rgba(158, 47, 28, 0.22);
  background: linear-gradient(110deg, rgba(217,79,43,.05), rgba(191,91,64,.14));
  color: var(--ember-dark);
  text-align: center;
}

.firestorm-note span { font-size: 0.64rem; font-weight: 700; text-transform: uppercase; }
.firestorm-note i { color: var(--gold); font-style: normal; }

.weather-model {
  display: grid;
  min-height: 190px;
  grid-template-columns: minmax(150px, .9fr) 1.1fr;
  margin: 1.2rem 0 0;
  overflow: hidden;
  border: 1px solid rgba(102, 57, 71, 0.25);
  background: #fffaf0;
}

.weather-column {
  position: relative;
  min-height: 190px;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 36%, rgba(255,255,255,.2), transparent 24%),
    linear-gradient(180deg, #5b4755 0 43%, #b56b47 74%, #efc16f 100%);
}

.weather-cloud {
  position: absolute;
  top: 32px;
  left: 50%;
  z-index: 2;
  width: 138px;
  padding: 16px 10px 13px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: rgba(243, 234, 220, .92);
  box-shadow:
    -36px 13px 0 -8px rgba(224, 211, 202, .9),
    37px 10px 0 -10px rgba(240, 229, 217, .86),
    0 12px 28px rgba(34, 28, 33, .2);
  color: #4d3540;
  font-size: .58rem;
  font-style: normal;
  font-weight: 800;
  letter-spacing: .08em;
  text-align: center;
  text-transform: uppercase;
}

.weather-bolt {
  position: absolute;
  top: 84px;
  right: 28px;
  color: #ffd66f;
  font-size: 2.8rem;
  font-style: normal;
  line-height: 1;
  text-shadow: 0 2px 10px rgba(40, 28, 26, .5);
}

.weather-updraft {
  position: absolute;
  bottom: 33px;
  left: 50%;
  color: #fff4d5;
  font-size: .58rem;
  letter-spacing: .07em;
  text-transform: uppercase;
  transform: translateX(-50%);
  white-space: nowrap;
}

.weather-column em {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  padding: 7px;
  background: rgba(91, 31, 21, .76);
  color: #fff1cf;
  font-size: .55rem;
  font-style: normal;
  font-weight: 800;
  letter-spacing: .16em;
  text-align: center;
  text-transform: uppercase;
}

.weather-model figcaption {
  display: grid;
  align-content: center;
  padding: 20px;
  color: var(--muted);
  font-size: .72rem;
  line-height: 1.52;
}

.weather-model figcaption strong {
  display: block;
  margin-bottom: 7px;
  color: var(--ember-dark);
  font-family: var(--serif);
  font-size: 1.08rem;
  line-height: 1.15;
}

.scale-readout {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: stretch;
  gap: 1px;
  margin: 1.2rem 0 0;
  border: 1px solid rgba(158, 47, 28, 0.2);
  background: rgba(158, 47, 28, 0.2);
}

.scale-readout figcaption {
  display: flex;
  grid-column: 1 / -1;
  justify-content: space-between;
  padding: 9px 12px;
  background: rgba(255, 250, 240, 0.94);
  color: var(--muted);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.scale-readout figcaption small { color: var(--muted); font-size: inherit; font-weight: 500; letter-spacing: 0; text-transform: none; }
.scale-readout div { min-height: 92px; padding: 14px; background: rgba(255, 250, 240, 0.94); }
.scale-readout strong,
.scale-readout span { display: block; }
.scale-readout strong { color: var(--ember-dark); font-family: var(--serif); font-size: 1.45rem; }
.scale-readout span { margin-top: 7px; color: var(--muted); font-size: 0.62rem; line-height: 1.35; }
.scale-readout b { display: grid; min-width: 52px; place-items: center; background: var(--ember-dark); color: var(--paper-light); font-size: 0.72rem; }

.wind-shift {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  margin: 1.2rem 0;
  border: 1px solid rgba(37, 78, 60, 0.2);
  background: rgba(37, 78, 60, 0.2);
}

.wind-shift .risk-bearing { grid-column: 1 / -1; }

.wind-shift > div {
  display: grid;
  min-width: 0;
  grid-template-columns: 38px 1fr;
  align-items: center;
  padding: 11px 10px;
  background: rgba(255, 250, 240, 0.96);
}

.wind-shift time,
.wind-shift strong,
.wind-shift span { grid-column: 2; }
.wind-shift time { color: var(--muted); font-size: 0.58rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; }
.wind-shift strong { margin-top: 4px; color: var(--pine); font-size: 0.72rem; line-height: 1.3; }
.wind-shift span { margin-top: 2px; color: var(--muted); font-size: 0.64rem; }

.story-copy-followup { margin-top: 0.85rem; }
.wind-arrow {
  display: grid;
  width: 30px;
  height: 30px;
  grid-row: 1 / 4;
  place-items: center;
  color: var(--ember-dark);
  font-size: 1.45rem;
  line-height: 1;
  transform: rotate(var(--bearing));
}

.compare-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 1.15rem 0 0;
}

.compare-grid div {
  min-height: 118px;
  padding: 14px;
  border: 1px solid rgba(158, 47, 28, 0.18);
  background: rgba(158, 47, 28, 0.06);
}

.compare-grid span,
.compare-grid strong,
.compare-grid small { display: block; }
.compare-grid span { color: var(--muted); font-size: 0.61rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }
.compare-grid strong { margin-top: 8px; color: var(--ember-dark); font-family: var(--serif); font-size: 1.6rem; }
.compare-grid small { margin-top: 7px; color: var(--muted); font-size: 0.62rem; line-height: 1.35; }

.priority-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 1.2rem 0;
  padding: 0 !important;
  list-style: none;
  counter-reset: recovery;
}

.priority-list li {
  min-height: 126px;
  margin: 0;
  padding: 12px !important;
  border: 1px solid rgba(29, 73, 53, 0.2);
  background: rgba(29, 73, 53, 0.055);
  counter-increment: recovery;
}

.priority-list li::before {
  display: block;
  margin-bottom: 11px;
  color: var(--pine);
  content: "0" counter(recovery);
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 700;
}

.priority-list strong,
.priority-list span { display: block; }
.priority-list strong { color: var(--pine); font-size: 0.72rem; }
.priority-list span { margin-top: 6px; color: var(--muted); font-size: 0.61rem; line-height: 1.4; }

.impact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 14px 0 4px;
}

.impact-grid div {
  background: rgba(158, 47, 28, 0.07);
  border: 1px solid rgba(158, 47, 28, 0.18);
  border-radius: 10px;
  padding: 10px;
  display: grid;
  gap: 2px;
  align-content: start;
}

.impact-grid strong {
  font-family: 'Source Serif 4', serif;
  font-size: 1.25rem;
  color: var(--ember-dark, #7c2a18);
}

.impact-grid span {
  font-size: 0.72rem !important;
  line-height: 1.35 !important;
  color: #4b443a;
}

.evacuation-sequence {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin: 1.15rem 0 0;
  border: 1px solid rgba(42, 93, 91, .24);
  background: rgba(42, 93, 91, .24);
}

.evacuation-sequence div {
  position: relative;
  min-height: 94px;
  padding: 13px;
  background: rgba(255, 250, 240, .95);
}

.evacuation-sequence strong,
.evacuation-sequence span { display: block; }
.evacuation-sequence strong { color: #28636a; font-family: var(--serif); font-size: 1.25rem; }
.evacuation-sequence span { margin-top: 7px; color: var(--muted); font-size: .63rem; line-height: 1.35; }

.cause-chain {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 1.2rem 0;
}

.cause-chain div {
  position: relative;
  min-height: 150px;
  padding: 14px;
  border: 1px solid rgba(29, 73, 53, .2);
  background:
    linear-gradient(145deg, rgba(29,73,53,.08), transparent 72%),
    rgba(255,250,240,.82);
}

.cause-chain div + div::before {
  position: absolute;
  top: 50%;
  left: -12px;
  z-index: 2;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--pine);
  color: white;
  content: "+";
  font-size: .68rem;
  font-weight: 800;
  line-height: 15px;
  text-align: center;
  transform: translateY(-50%);
}

.cause-chain strong,
.cause-chain span { display: block; }
.cause-chain strong { color: var(--pine); font-family: var(--serif); font-size: 1rem; }
.cause-chain span { margin-top: 9px; color: var(--muted); font-size: .63rem; line-height: 1.45; }

@media (max-width: 420px) {
  .impact-grid { grid-template-columns: 1fr; }
}

.cliff {
  margin: 14px 0 0;
  padding-top: 12px;
  border-top: 1px solid rgba(158, 47, 28, 0.25);
  font-family: 'Source Serif 4', serif;
  font-size: 1.02rem !important;
  line-height: 1.45 !important;
  font-weight: 600;
  color: var(--ember-dark, #7c2a18);
}

.sources {
  margin: 1rem 0 0;
  padding-top: 0.8rem;
  border-top: 1px solid var(--line);
  font-size: 0.7rem !important;
  line-height: 1.45 !important;
}

.sources a {
  color: var(--ember-dark);
  font-weight: 700;
  text-underline-offset: 2px;
}

.distance-line {
  display: grid;
  grid-template-columns: auto 1fr auto 1fr auto;
  align-items: center;
  gap: 8px;
  margin: 1.3rem 0;
  padding: 14px;
  border: 1px solid rgba(29, 73, 53, 0.18);
  background: rgba(29, 73, 53, 0.05);
}

.distance-line span {
  color: var(--pine);
  font-size: 0.58rem;
  font-weight: 700;
  text-align: center;
  text-transform: uppercase;
}

.distance-line i {
  height: 1px;
  background: repeating-linear-gradient(90deg, var(--pine) 0 5px, transparent 5px 9px);
}

.confluence {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 18px;
  margin: 1.25rem 0;
  padding: 16px;
  border: 1px solid rgba(53, 103, 117, 0.25);
  background:
    linear-gradient(165deg, rgba(124, 166, 178, 0.13), rgba(246, 242, 230, 0.15)),
    repeating-linear-gradient(0deg, transparent 0 17px, rgba(53, 103, 117, 0.055) 17px 18px);
}

.confluence div {
  position: relative;
  padding-bottom: 13px;
  color: #315f6b;
}

.confluence div::after {
  position: absolute;
  right: 0;
  bottom: 5px;
  left: 0;
  height: 2px;
  background: #6f9eae;
  content: '';
}

.confluence div:first-child::after { transform: rotate(7deg); transform-origin: right; }
.confluence div:nth-child(2)::after { transform: rotate(-7deg); transform-origin: left; }
.confluence span { display: block; font-family: var(--serif); font-size: 1rem; font-weight: 700; }
.confluence small { color: var(--muted); font-size: .55rem; letter-spacing: .08em; text-transform: uppercase; }
.confluence b,
.confluence strong { grid-column: 1 / -1; text-align: center; }
.confluence b { color: var(--muted); font-size: .58rem; letter-spacing: .1em; text-transform: uppercase; }
.confluence strong { color: #315f6b; font-family: var(--serif); font-size: 1.18rem; }

.proximity-stat {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 1rem;
  padding: 14px 16px;
  border-left: 3px solid var(--ember);
  background: rgba(217, 79, 43, 0.06);
}

.proximity-stat strong {
  color: var(--ember-dark);
  font-family: var(--serif);
  font-size: 2.5rem;
  line-height: 1;
}

.proximity-stat span {
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.4;
}

.danger-scale {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: 1.2rem 0;
  overflow: hidden;
  border: 1px solid var(--line);
}

.danger-scale span {
  display: grid;
  min-height: 58px;
  place-items: end center;
  padding: 8px 4px;
  color: #fff;
  font-size: 0.55rem;
  font-weight: 700;
  text-transform: uppercase;
}

.danger-scale .low { background: #3f7f58; }
.danger-scale .moderate { background: #d3b343; color: #332c17; }
.danger-scale .high { background: #e27b30; }
.danger-scale .very-high { background: #bc3525; }

.prepared-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin: 1.2rem 0;
  border: 1px solid rgba(29, 73, 53, 0.18);
  background: rgba(29, 73, 53, 0.15);
}

.prepared-grid div {
  min-height: 96px;
  padding: 13px;
  background: rgba(246, 242, 230, 0.96);
}

.prepared-grid strong {
  display: block;
  color: var(--pine);
  font-family: var(--serif);
  font-size: 1.85rem;
}

.prepared-grid span {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 0.64rem;
  line-height: 1.35;
}

.card ol { padding-left: 1.25rem; }
.card li { margin: 0.8rem 0; padding-left: 0.35rem; }
.card li::marker { color: var(--ember); font-weight: 700; }
.card li strong { color: var(--ink-soft); }

.official-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 1.2rem 0;
}

.official-links a {
  min-height: 76px;
  padding: 12px;
  border: 1px solid rgba(29, 73, 53, 0.24);
  color: var(--pine);
  text-decoration: none;
}

.official-links span,
.official-links strong { display: block; }
.official-links span { color: var(--muted); font-size: 0.58rem; text-transform: uppercase; }
.official-links strong { margin-top: 7px; font-family: var(--serif); font-size: 1rem; }
.official-links a:hover { background: rgba(29, 73, 53, 0.06); }

.caveat {
  padding: 12px 14px;
  border: 1px solid rgba(217, 79, 43, 0.24);
  background: rgba(217, 79, 43, 0.06);
  color: var(--ink-soft) !important;
  font-size: 0.7rem !important;
  line-height: 1.5 !important;
}

.caveat strong { color: var(--ember-dark); }

footer {
  padding: 8vh 0 12vh;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.55;
}

.legend {
  position: fixed;
  z-index: 8;
  top: 16px;
  right: 16px;
  width: 228px;
  overflow: hidden;
  border: 1px solid rgba(255, 250, 240, 0.16);
  background: rgba(24, 45, 34, 0.95);
  box-shadow: 0 15px 45px rgba(28, 34, 28, 0.2);
  color: rgba(255, 250, 240, 0.74);
  font-size: 0.64rem;
  backdrop-filter: blur(14px);
}

.legend-head {
  display: flex;
  min-height: 39px;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  border-bottom: 1px solid rgba(255, 250, 240, 0.14);
  color: #fffaf0;
  font-size: 0.6rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.legend-head span {
  color: rgba(255, 250, 240, 0.45);
  font-size: 0.44rem;
}

.legend-toggle { display: none; }

.legend-body { padding: 8px 12px 4px; }

.legend-body > div {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 7px 0;
}

.key-fire,
.key-perimeter,
.key-late,
.key-place,
.key-city,
.key-forest,
.key-water,
.key-timeband,
.key-alert { flex: 0 0 auto; }

.key-fire {
  width: 19px;
  height: 19px;
  border: 2px solid #ff9a77;
  border-radius: 50%;
  background: rgba(217, 79, 43, 0.48);
}

.key-perimeter {
  width: 19px;
  height: 15px;
  border: 2px solid #8e2d1d;
  background: rgba(198, 64, 39, 0.46);
  clip-path: polygon(8% 36%, 27% 8%, 61% 15%, 92% 39%, 81% 81%, 45% 94%, 14% 74%);
}

.key-late {
  width: 15px;
  height: 15px;
  border: 2px solid #c76a4a;
  border-radius: 50%;
  background: rgba(176, 66, 31, 0.44);
}

.key-place {
  width: 10px;
  height: 10px;
  border: 2px solid white;
  border-radius: 50%;
  background: var(--gold);
}

.key-forest {
  width: 18px;
  height: 13px;
  border: 1px solid rgba(255,255,255,.75);
  background:
    repeating-linear-gradient(135deg, transparent 0 3px, rgba(33,58,48,.3) 3px 4px),
    #a8bea5;
}

.key-water {
  width: 20px;
  height: 7px;
  border-top: 2px solid #b9dce4;
  border-bottom: 1px solid rgba(185,220,228,.5);
  transform: skewX(-18deg);
}

.key-city {
  width: 12px;
  height: 12px;
  border: 2px solid white;
  background: var(--pine);
}

.key-timeband {
  width: 19px;
  height: 12px;
  border: 2px solid #f2be63;
  background: linear-gradient(90deg, rgba(169,46,31,.8), rgba(212,107,47,.65), rgba(213,168,61,.45));
  border-radius: 50%;
}

.key-alert {
  width: 19px;
  height: 13px;
  border: 1px dashed #f2be63;
  background: linear-gradient(145deg, transparent 42%, #cf7f29 44% 53%, transparent 55%);
  clip-path: polygon(0 100%, 100% 14%, 100% 100%);
}

.legend-details > p {
  margin: 6px 12px 11px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 250, 240, 0.14);
  color: rgba(255, 250, 240, 0.56);
  font-size: 0.57rem;
  line-height: 1.4;
}

.map-controls {
  position: fixed;
  z-index: 9;
  right: 16px;
  bottom: 50px;
  display: grid;
  grid-template-columns: 40px auto 40px;
  overflow: hidden;
  border: 1px solid rgba(255, 250, 240, 0.18);
  background: rgba(24, 45, 34, 0.95);
}

.map-controls button {
  min-width: 40px;
  min-height: 40px;
  border: 0;
  border-right: 1px solid rgba(255, 250, 240, 0.15);
  background: transparent;
  color: white;
  cursor: pointer;
  font-weight: 700;
}

.map-controls button:last-child { border-right: 0; }
.map-controls button:hover { background: rgba(255, 255, 255, 0.1); }
.map-controls .reset { padding: 0 12px; color: rgba(255,255,255,.72); font-size: .58rem; letter-spacing: .08em; text-transform: uppercase; }
.map-controls .short-label { display: none; }

.progress {
  position: fixed;
  z-index: 8;
  bottom: 18px;
  left: 28px;
  display: grid;
  width: min(310px, calc(100vw - 56px));
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  background: rgba(242, 234, 219, 0.95);
  box-shadow: 0 8px 28px rgba(39, 35, 27, 0.12);
  transition: opacity 220ms ease, transform 220ms ease;
}

@media (min-width: 701px) {
  body[data-active-step="overview"] .progress {
    opacity: 0;
    pointer-events: none;
    transform: translateY(12px);
  }
}

#progress-index,
#progress-title {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

#progress-index { color: var(--ember-dark); }
#progress-title { max-width: 92px; overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }

.progress-track { height: 2px; overflow: hidden; background: rgba(32,36,31,.16); }
#progress-fill { display: block; width: 12.5%; height: 100%; background: var(--ember); transition: width 400ms var(--ease); }

.status {
  position: fixed;
  z-index: 8;
  right: 16px;
  bottom: 14px;
  padding: 7px 10px;
  border: 1px solid rgba(38,42,35,.14);
  background: rgba(255,250,240,.9);
  color: var(--muted);
  font-size: .58rem;
  opacity: 0;
  transition: opacity 250ms ease;
}

.status.loaded { opacity: 1; }

.maplibregl-popup-content {
  max-width: 220px;
  padding: 13px 15px;
  border: 1px solid rgba(38,42,35,.2);
  border-radius: 0;
  background: var(--paper-light);
  box-shadow: 0 12px 32px rgba(39,35,27,.18);
  font-family: var(--sans);
}

.maplibregl-popup-content strong { color: var(--ember-dark); font-family: var(--serif); font-size: 1rem; }
.maplibregl-popup-content p { margin: 5px 0 0; color: var(--muted); font-size: .7rem; line-height: 1.4; }
.maplibregl-ctrl-top-right { top: 76px; }

@media (max-width: 900px) {
  :root { --story-panel: min(520px, 58vw); }
  .masthead, #story { width: var(--story-panel); }
  .masthead > p { display: none; }
}

@media (max-width: 700px) {
  :root {
    --story-panel: 100%;
    --mobile-map-height: clamp(220px, 34svh, 300px);
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-right: env(safe-area-inset-right, 0px);
    --safe-left: env(safe-area-inset-left, 0px);
    --mobile-header: calc(62px + var(--safe-top));
  }

  #map {
    z-index: 4;
    top: var(--mobile-header);
    bottom: auto;
    left: 0;
    height: var(--mobile-map-height);
    border-bottom: 1px solid rgba(38,42,35,.34);
    box-shadow: 0 14px 34px rgba(39,35,27,.16);
  }

  .action-panel {
    z-index: 7;
    top: var(--mobile-header);
    bottom: auto;
    left: 0;
    height: var(--mobile-map-height);
    place-items: stretch;
    padding: 10px 12px;
    overflow: hidden;
    border-bottom: 1px solid rgba(38,42,35,.34);
    box-shadow: 0 14px 34px rgba(39,35,27,.16);
  }

  .action-panel-inner {
    display: grid;
    height: 100%;
    align-content: center;
    padding: 12px;
    box-shadow: none;
  }

  .action-kicker { font-size: .52rem; }
  .action-panel h2 { margin: .3rem 0 .45rem; font-size: clamp(1.45rem, 7vw, 2rem); }
  .action-panel-inner > p:not(.action-emergency) { display: none; }
  .action-links { gap: 6px; margin-top: .35rem; }
  .action-links a { min-height: 48px; padding: 8px 9px; }
  .action-links span { font-size: .48rem; }
  .action-links strong { margin-top: 3px; font-size: .72rem; }
  .action-network { margin-top: 6px; }
  .action-network span { min-height: 38px; padding: 6px; font-size: .48rem; }
  .action-network strong { display: inline; margin: 0 3px 0 0; font-size: .72rem; }
  .action-panel .action-emergency { display: none; }

  .opening-orientation {
    top: calc(var(--mobile-header) + 78px);
    right: max(12px, var(--safe-right));
    padding: 5px 7px;
  }

  .masthead {
    z-index: 10;
    width: 100%;
    min-height: var(--mobile-header);
    padding: calc(10px + var(--safe-top)) max(16px, var(--safe-right)) 10px max(16px, var(--safe-left));
    background: rgba(242,234,219,.97);
  }

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

  #story {
    width: 100%;
    padding: calc(var(--mobile-header) + var(--mobile-map-height) + 58px) max(16px, var(--safe-right)) max(10vh, env(safe-area-inset-bottom, 0px)) max(16px, var(--safe-left));
    background: var(--paper);
  }

  .map-vignette { display: none; }
  .grain { z-index: 5; opacity: .1; }

  .step {
    scroll-margin-top: calc(var(--mobile-header) + var(--mobile-map-height) + 54px);
    opacity: 1;
    transform: none;
  }

  .hero {
    min-height: auto;
    justify-content: flex-start;
    padding: 18px 0 15vh;
  }

  .hero-meta { flex-wrap: wrap; gap: 6px; font-size: .61rem; }
  .hero-meta span + span::before { width: 14px; }
  h1 { font-size: clamp(3.15rem, 15vw, 4.8rem); }
  h2 { font-size: clamp(2.05rem, 9.3vw, 2.8rem); }
  .dek { font-size: 1.03rem; line-height: 1.47; }

  .hero-metrics { margin-top: 1.3rem; }
  .hero-metrics div { min-height: 98px; padding: 11px 9px; }
  .hero-metrics strong { font-size: 1.55rem; }
  .hero-metrics span { font-size: .58rem; }
  .live-source { padding: 13px 14px 14px 15px; }

  .card {
    z-index: 2;
    margin: 0 0 18vh;
    padding: 26px 22px 28px;
    background: var(--paper-light);
    box-shadow: 0 12px 32px rgba(39,35,27,.1);
    backdrop-filter: none;
  }

  .story-copy { font-size: 1rem !important; line-height: 1.52 !important; }
  .prepared-grid div { padding: 10px; }
  .prepared-grid strong { font-size: 1.55rem; }
  .prepared-grid span { font-size: .58rem; }
  .priority-list { grid-template-columns: 1fr; }
  .priority-list li { min-height: auto; }

  .legend {
    z-index: 11;
    top: calc(var(--mobile-header) + 6px);
    right: auto;
    left: max(12px, var(--safe-left));
    width: 112px;
  }

  .legend-head {
    min-height: 44px;
    padding: 0;
  }

  .legend-head > strong,
  .legend-head > span { display: none; }

  .legend-toggle {
    display: flex;
    width: 100%;
    min-height: 44px;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px;
    border: 0;
    background: transparent;
    color: var(--paper-light);
    cursor: pointer;
    font-size: .6875rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
  }

  .legend-toggle span { color: inherit; font-size: inherit; }
  .legend-toggle b { color: #f4c96f; font-size: 1rem; }

  .legend-details { display: none; }

  .legend.expanded {
    right: max(12px, var(--safe-right));
    width: auto;
  }

  .legend.expanded .legend-details { display: block; }

  .legend-body {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    padding: 6px 8px 8px;
  }

  .legend-body > div {
    flex-direction: column;
    gap: 3px;
    margin: 0;
    text-align: center;
    font-size: .6875rem;
    line-height: 1.25;
  }

  .key-fire { width: 14px; height: 14px; }
  .key-perimeter { width: 15px; height: 12px; }
  .key-place, .key-city { width: 10px; height: 10px; }
  .key-forest { width: 15px; height: 11px; }
  .key-water { width: 17px; }
  .key-timeband { width: 16px; height: 11px; }
  .legend-details > p { display: none; }

  .map-controls {
    z-index: 12;
    top: calc(var(--mobile-header) + 7px);
    right: max(13px, var(--safe-right));
    bottom: auto;
    grid-template-columns: 44px auto 44px;
    min-height: 44px;
    border: 0;
  }

  .map-controls button { min-width: 44px; min-height: 44px; }
  .map-controls .reset { padding: 0 8px; font-size: .6875rem; }
  .map-controls .full-label { display: none; }
  .map-controls .short-label { display: inline; }

  .progress {
    z-index: 11;
    top: calc(var(--mobile-header) + var(--mobile-map-height));
    bottom: auto;
    left: 0;
    width: 100%;
    min-height: 44px;
    padding: 9px max(16px, var(--safe-right)) 9px max(16px, var(--safe-left));
    border-width: 0 0 1px;
    background: rgba(242,234,219,.98);
  }

  #progress-index,
  #progress-title { font-size: .6875rem; }

  #progress-title { max-width: 108px; }

  .status { display: none; }
  .maplibregl-ctrl-bottom-right { bottom: 4px; }
  footer {
    /* Leave enough runway for the final chapter to clear the fixed map stage. */
    padding-bottom: calc(var(--mobile-header) + var(--mobile-map-height) + max(10vh, env(safe-area-inset-bottom, 0px)));
  }
}

@media (max-width: 390px) {
  h1 { font-size: 3rem; }
  .card { padding-right: 21px; padding-left: 21px; }
  .map-controls .reset { padding: 0 6px; }
  .hero-metrics { grid-template-columns: 1fr; }
  .hero-metrics div { min-height: auto; }
  .timeline,
  .compare-grid { grid-template-columns: 1fr; }
  .wind-shift { grid-template-columns: 1fr; }
  .wind-shift .risk-bearing { grid-column: auto; }
  .wind-shift > div { grid-template-columns: 44px 1fr; padding: 10px 12px; }
  .key-timeband,
  .key-alert { width: 16px; height: 11px; }
  .firestorm-note { grid-template-columns: 1fr; }
  .firestorm-note i { transform: rotate(90deg); }
  .weather-model { grid-template-columns: 1fr; }
  .weather-column { min-height: 175px; }
  .evacuation-sequence,
  .cause-chain { grid-template-columns: 1fr; }
  .evacuation-sequence div,
  .cause-chain div { min-height: auto; }
  .cause-chain div + div::before {
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
  }
  .scale-readout { grid-template-columns: 1fr; }
  .scale-readout b { min-height: 34px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
  }
}
