:root {
  --bg: #000000;
  --bg-2: #0a0a0a;
  --elev: #111111;
  --card: #171717;
  --line: #2e2e2e;
  --text: #ffffff;
  --muted: #b5b5b5;
  --quiet: #8a8a8a;
  --peace: #ffffff;
  --peace-dim: rgba(255, 255, 255, 0.08);
  --war: #ef7a7a;
  --war-dim: rgba(239, 122, 122, 0.12);
  --nation: #ffffff;
  --extract: #d4d4d4;
  --peace-green: #4ade80;
  --peace-green-dim: rgba(74, 222, 128, 0.10);
  --peace-green-border: rgba(74, 222, 128, 0.30);
  --serif: "Source Serif 4", "Source Serif Pro", "Times New Roman", serif;
  --sans: "Source Sans 3", "Source Sans Pro", "Segoe UI", sans-serif;
  --radius: 12px;
  --radius-btn: 8px;
  --glass: rgba(255, 255, 255, 0.035);
  --glass-border: rgba(255, 255, 255, 0.12);
  --shadow: none;
}
* { box-sizing: border-box; }
html { scroll-padding-top: 76px; }
html, body { background: var(--bg); }
body {
  margin: 0;
  color: var(--text);
  font-family: var(--sans);
  text-align: left;
  line-height: 1.5;
  background: var(--bg);
}
button, select, input { font-family: inherit; }
a { color: var(--nation); }
:focus-visible { outline: 2px solid var(--peace); outline-offset: 2px; }

.sticky-nav {
  position: sticky; top: 0; z-index: 1000;
  display: flex; align-items: center; gap: 16px;
  padding: 12px 36px;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  border-bottom: 1px solid var(--glass-border);
}
.nav-brand {
  font-family: var(--serif);
  font-size: 1.28rem;
  font-weight: 650;
  color: var(--peace);
  letter-spacing: -0.02em;
  white-space: nowrap;
  text-decoration: none;
}
.app-tabs {
  display: flex; gap: 4px; flex: 1; min-width: 0;
  overflow-x: auto; scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.app-tabs::-webkit-scrollbar { display: none; }
.app-tab, .pane-tab {
  appearance: none; border: 0; background: transparent;
  color: var(--muted); cursor: pointer;
  padding: 8px 12px; border-radius: var(--radius-btn);
  font-size: 0.86rem; font-weight: 500; white-space: nowrap;
  transition: background 0.25s ease, color 0.25s ease;
}
.app-tab:hover, .pane-tab:hover { color: var(--text); background: rgba(255,255,255,0.04); }
.app-tab.active, .pane-tab.active {
  color: #000; background: #fff;
}
.nav-controls { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.mission-btn {
  background: transparent; color: var(--peace);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: var(--radius-btn); padding: 7px 12px; font-weight: 500; cursor: pointer;
}
.mission-btn:hover { background: var(--peace-dim); }
#language-dropdown {
  background: var(--elev); color: var(--text);
  border: 1px solid var(--line); padding: 7px 10px; border-radius: 10px;
}

.modal {
  display: none; position: fixed; inset: 0; z-index: 2000;
  background: rgba(5, 8, 12, 0.72); backdrop-filter: blur(10px);
}
.modal-content {
  background: rgba(10, 10, 10, 0.92); margin: 6vh auto; padding: 36px;
  border: 1px solid var(--glass-border); border-radius: var(--radius);
  width: min(760px, 92vw); max-height: 82vh; overflow-y: auto;
  backdrop-filter: blur(24px); position: relative;
}
.modal-content h2 {
  font-family: var(--serif); font-size: clamp(1.8rem, 4vw, 2.6rem);
  color: var(--peace); margin: 0 10px 8px 0; letter-spacing: -0.03em;
}
.modal-kicker {
  color: var(--nation); font-size: 0.78rem; letter-spacing: 0.16em;
  text-transform: uppercase; margin: 0 0 16px; font-weight: 600;
}
.modal-content p { color: var(--text); font-size: 1.05rem; line-height: 1.7; }
.close-btn {
  position: absolute; right: 16px; top: 10px; font-size: 32px;
  color: var(--muted); cursor: pointer; background: none; border: 0;
}
.close-btn:hover { color: var(--text); }

.dashboard {
  width: min(1320px, calc(100% - 40px));
  margin: 0 auto 96px;
}
.engine-chip {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--quiet); font-size: 0.75rem; letter-spacing: 0.04em;
  margin-bottom: 18px;
}
.app-panel[hidden] { display: none !important; }
.app-panel {
  scroll-margin-top: 76px;
  padding: 56px 0 28px;
  border-top: 1px solid var(--glass-border);
}
#global-module.app-panel { border-top: 0; padding-top: 28px; }
[data-reveal] {
  opacity: 0;
  transform: translate3d(0, 32px, 0);
  filter: blur(6px);
  transition:
    opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.9s cubic-bezier(0.22, 1, 0.36, 1),
    filter 0.9s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--reveal-delay, 0ms);
}
[data-reveal].is-in {
  opacity: 1;
  transform: none;
  filter: none;
}
.panel-head { margin-bottom: 22px; }
.kicker {
  margin: 0 0 6px; color: var(--quiet); font-size: 0.72rem;
  letter-spacing: 0.18em; text-transform: uppercase; font-weight: 600;
}
.section-header, .panel-head h1, .panel-head h2 {
  font-family: var(--serif); font-weight: 650;
  letter-spacing: -0.03em; line-height: 1.15;
  margin: 0 0 8px; border: 0; padding: 0; text-align: left;
}
.panel-head h1 { font-size: clamp(1.8rem, 4vw, 2.7rem); }
.panel-head h2 { font-size: clamp(1.6rem, 3.4vw, 2.2rem); }
.lede { color: var(--muted); margin: 0; max-width: 52rem; font-size: 1.02rem; }

.year-hero {
  display: grid; grid-template-columns: minmax(160px, auto) 1fr;
  gap: 18px; align-items: end; margin-bottom: 18px;
}
.spark-wrap { grid-column: 1 / -1; cursor: pointer; }
.spark-hint { font-size: 0.72rem; color: var(--quiet); margin: 0 0 6px; }
.spend-clock {
  background: var(--glass);
  border: 1px solid rgba(239, 122, 122, 0.35);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 18px;
  backdrop-filter: blur(18px);
}
.spend-clock-value {
  font-family: var(--serif);
  font-size: clamp(1.25rem, 2.6vw, 2.05rem);
  font-weight: 650;
  color: var(--war);
  letter-spacing: -0.035em;
  line-height: 1.02;
  margin: 2px 0 6px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.spend-clock-meta {
  color: var(--war);
  font-weight: 600;
  margin: 0 0 10px;
  font-size: 0.95rem;
}
.spend-clock-note {
  color: var(--quiet);
  font-size: 0.8rem;
  line-height: 1.45;
  margin: 0;
  max-width: 46rem;
}
.spend-clock-note a { color: #fecaca; }
.year-display {
  font-family: var(--serif); font-size: clamp(2.4rem, 7vw, 4.4rem);
  font-weight: 650; letter-spacing: -0.04em; line-height: 0.95; margin: 0;
}
.year-box {
  background: var(--glass); border: 1px solid var(--glass-border);
  border-radius: var(--radius); padding: 14px 16px;
  backdrop-filter: blur(18px);
}
.year-box label { color: var(--muted); font-size: 0.82rem; }
.conflict-map-wrap {
  position: relative;
  height: min(42vh, 420px);
  min-height: 260px;
  margin-bottom: 16px;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  overflow: hidden;
  background: #050505;
}
#conflict-map { height: 100%; width: 100%; background: #050505; }
.map-legend {
  position: absolute; left: 10px; bottom: 10px; z-index: 500;
  margin: 0; max-width: min(420px, 70%);
  background: rgba(0,0,0,0.72); padding: 8px 10px; border-radius: 8px;
  pointer-events: none;
}
.leaflet-container { font-family: var(--sans); background: #050505; }
.leaflet-popup-content-wrapper, .leaflet-popup-tip { background: rgba(12,12,12,0.94); color: #fff; box-shadow: none; border: 1px solid var(--glass-border); }
.leaflet-popup-content { margin: 12px 14px; color: #fff; }
.leaflet-popup-content a { color: #fecaca; }
.leaflet-popup-close-button { color: #fff !important; }
.leaflet-control-attribution { background: rgba(0,0,0,0.55) !important; color: #8a8a8a !important; }
.leaflet-control-attribution a { color: #b5b5b5 !important; }
.map-pop-name { font-weight: 700; margin-bottom: 4px; }
.map-pop-money { color: var(--war); font-weight: 700; font-size: 1.05rem; margin: 8px 0 4px; }
.map-pop-note { color: #8a8a8a; font-size: 0.78rem; line-height: 1.4; }
.year-play-row {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-bottom: 2px;
}
#timeline-play {
  appearance: none; background: transparent; color: #fff;
  border: 1px solid rgba(255,255,255,0.35); font-weight: 500; border-radius: var(--radius-btn);
  padding: 7px 16px; min-width: 76px; cursor: pointer;
}
#timeline-play:hover { background: rgba(255,255,255,0.06); }
#timeline-play[aria-pressed="true"] {
  background: #fff; color: #000; border-color: #fff;
}
input[type="range"] {
  width: 100%; accent-color: var(--peace); cursor: pointer; margin-top: 10px;
}

.top-metrics { display: grid; grid-template-columns: 3fr 2fr; gap: 14px; margin-bottom: 18px; }
.metric-box {
  background: var(--glass); border: 1px solid var(--glass-border);
  border-radius: var(--radius); padding: 22px 22px;
  backdrop-filter: blur(18px);
}
.metric-box.peace { border-color: var(--glass-border); background: var(--glass); }
.metric-box.war { border-color: rgba(239, 122, 122, 0.32); background: rgba(239, 122, 122, 0.06); }
.metric-label {
  margin: 0; color: var(--quiet); text-transform: uppercase;
  letter-spacing: 0.12em; font-size: 0.72rem; font-weight: 600;
}
#cumulative-budget {
  font-size: clamp(1.7rem, 4.4vw, 3.1rem);
  color: var(--war); margin: 10px 0 6px; line-height: 1.05;
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
#active-wars-count { font-size: clamp(2rem, 5vw, 3.1rem); color: var(--war); margin: 10px 0 6px; }
.spend-annual { font-size: 0.95rem; color: var(--war); font-weight: 600; display: block; }

.pane-switch { display: flex; gap: 6px; margin: 6px 0 14px; }
.pane-switch .pane-tab { border: 1px solid var(--line); }
.timeline-explore { display: grid; gap: 16px; }
.timeline-pane[hidden] { display: none !important; }
.timeline-pane { }
@media (min-width: 861px) {
  .timeline-explore {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    align-items: start;
  }
  .pane-switch { display: none; }
  .timeline-explore .timeline-pane[hidden] { display: block !important; }
}

.nation-section, .extraction-section, .human-section, .greed-section, .archive-section, .year-box, .honesty-section {
  background: var(--glass); padding: 22px; border-radius: var(--radius);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(18px);
}
.nation-section { border-color: var(--line); }
.extraction-section { border-color: var(--line); }
.human-section { border-color: var(--line); }
.greed-section { border-color: rgba(239, 122, 122, 0.28); }
.human-layer-title {
  margin: 18px 0 6px;
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 600;
}
.human-layer-title:first-child { margin-top: 0; }
#human-alt { margin-top: 22px; }
#human-alt-grid { margin-top: 12px; grid-template-columns: 1fr; max-width: 560px; }
.archive-section { border-color: var(--line); }
.nation-controls, .archive-controls { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 16px 0; }
select, button {
  font-size: 0.95rem; padding: 9px 12px; background: rgba(0,0,0,0.35);
  color: var(--text); border: 1px solid var(--glass-border); border-radius: var(--radius-btn); cursor: pointer;
}
button.action-btn { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,0.35); font-weight: 500; }
button.action-btn:hover { background: rgba(255,255,255,0.06); }
button.red-btn { background: transparent; color: var(--war); border: 1px solid rgba(239,122,122,0.5); font-weight: 500; }
button.red-btn:hover { background: var(--war-dim); }

.quote-card {
  color: var(--muted); font-style: italic; background: var(--bg);
  padding: 14px 16px; border-left: 3px solid var(--nation); border-radius: 8px; margin-top: 8px;
}
.period-label { margin: 22px 0 8px; color: var(--text); border-bottom: 1px solid var(--line); padding-bottom: 6px; font-size: 1.1rem; }

.honesty-section { margin-top: 22px; }
.honesty-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; }
.honesty-box { background: var(--bg); padding: 16px; border-radius: 10px; border-left: 3px solid; }
.honesty-box .big { font-size: 1.6rem; color: var(--text); font-weight: 700; display: block; margin-top: 6px; }
.honesty-box.peace-alt { border-color: var(--peace-green-border); background: var(--peace-green-dim); }
.honesty-box.peace-alt .cf-name { display: block; }
.honesty-box.peace-alt .big { color: var(--peace-green); font-size: 1.7rem; }

.alt-panel { text-align: left; }
.alt-panel h3 {
  color: var(--text); margin: 0 0 14px;
  font-family: var(--serif); font-size: 1.4rem; font-weight: 650;
  letter-spacing: -0.02em;
}
.cf-name {
  color: var(--text);
  font-size: 1.12rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.cf-note {
  color: var(--quiet);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.01em;
}
.alt-controls { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 14px; color: var(--muted); }
.nation-build-in {
  margin: 0; color: var(--text); font-size: 0.95rem; font-weight: 650;
  letter-spacing: -0.01em; flex: 1 1 auto;
}
.nation-build-in span { color: var(--quiet); font-weight: 500; font-size: 0.8rem; }
.alt-mode { display: flex; gap: 6px; }
.alt-mode button { background: var(--bg); color: var(--muted); }
.alt-mode button.active { background: #fff; color: #000; border-color: #fff; }
.alt-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.plate {
  background: rgba(255,255,255,0.045);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 24px;
  padding: 20px;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.03),
    0 1px 2px rgba(0,0,0,0.35),
    0 8px 24px rgba(0,0,0,0.22);
  transition:
    transform 0.25s ease,
    box-shadow 0.35s ease,
    border-color 0.35s ease,
    background 0.35s ease;
}
.plate:hover {
  transform: translateY(-8px) scale(1.025);
  border-color: rgba(255,255,255,0.28);
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.06),
    0 18px 40px rgba(0,0,0,0.5);
}
.plate-icon { display: none; }
.alt-card {
  cursor: pointer;
  text-align: left;
}
.alt-card:hover { background: rgba(74, 222, 128, 0.08); border-color: var(--peace-green-border); }
.alt-card.open { background: var(--peace-green-dim); border-color: var(--peace-green); }
.alt-card .nation-val { color: var(--peace-green); letter-spacing: -0.03em; font-size: 1.7rem; }
.alt-card-h {
  color: var(--text); font-size: 1.12rem; font-weight: 700;
  letter-spacing: -0.02em; line-height: 1.2;
}
.alt-card-hint { font-size: 0.7rem; color: var(--quiet); margin-top: 8px; }
.alt-card.open .alt-card-hint { display: none; }
.alt-card-more { display: none; margin-top: 8px; }
.alt-card.open .alt-card-more { display: block; }
.alt-shares { display: grid; gap: 8px; margin-bottom: 14px; background: var(--bg); padding: 12px; border-radius: 10px; }
.alt-shares[hidden] { display: none !important; }
.alt-share { display: grid; grid-template-columns: minmax(140px, 1fr) 1fr 52px; gap: 8px; align-items: center; color: var(--text); font-size: 0.82rem; }
.alt-share input { width: 100%; }
.nation-val { font-size: 1.45rem; font-weight: 700; margin-top: 6px; color: var(--text); }
.nation-card { text-align: left; color: var(--text); }
.nation-card .cf-name { display: block; }
.nation-card .nation-val { margin-top: 10px; font-size: 1.7rem; }
#extraction-results { margin-top: 18px; padding: 0; background: transparent; border: 0; }
#extraction-alt[hidden] { display: none !important; }
#extraction-alt-grid { margin-top: 12px; }
.alt-note, .conflict-note { color: var(--quiet); font-size: 0.82rem; line-height: 1.45; }
.alt-note { margin-top: 10px; }

.study-stack { display: grid; gap: 10px; margin: 12px 0 16px; }
.study-card { background: rgba(239,122,122,0.06); border: 1px solid rgba(239,122,122,0.28); border-radius: var(--radius); padding: 14px 16px; }
.study-card h4 { margin: 0 0 8px; color: #f3b4b4; font-size: 1.02rem; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.study-kind { font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.4px; color: #fecaca; background: #3a151b; border: 1px solid #5c2a32; border-radius: 999px; padding: 2px 8px; font-weight: 600; }
.study-headline { font-size: 1.28rem; color: var(--war); font-weight: 700; }
.study-year-tag { font-size: 0.72rem; font-weight: 600; color: var(--muted); margin-left: 8px; }
.study-published { color: var(--quiet); font-size: 0.82rem; margin: 4px 0 8px; }
.study-scope { color: var(--muted); font-size: 0.8rem; margin: 6px 0; line-height: 1.45; }
.study-fig { color: var(--text); font-size: 0.8rem; margin: 4px 0; }
.study-excl { color: #f3b4b4; font-size: 0.78rem; margin: 8px 0 6px; }
.study-src { font-size: 0.75rem; color: var(--quiet); }
.study-src a { color: #fecaca; }
.study-badge { font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.4px; color: #f3b4b4; margin-left: 8px; }
.conflict-row.has-study { box-shadow: inset 3px 0 0 #8b3a44; }
.year-conflicts h3 { margin: 0 0 10px; font-size: 0.78rem; color: var(--quiet); text-transform: uppercase; letter-spacing: 0.12em; }
.conflict-note { margin: 0 0 12px; }
.conflict-scroll { max-height: min(52vh, 420px); overflow-y: auto; display: grid; gap: 6px; }
.conflict-row {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 12px;
  padding: 10px 12px; background: var(--glass); border-radius: var(--radius-btn); border-left: 2px solid #555;
  cursor: pointer;
}
.conflict-row:hover { background: rgba(255,255,255,0.05); }
.conflict-row.war { border-left-color: var(--war); }
.conflict-row.war:hover { background: rgba(239,122,122,0.07); }
.conflict-row.open { background: rgba(255,255,255,0.06); }
.conflict-row .cparties { display: none; }
.conflict-row.open .cparties { display: block; }
.study-fold { margin: 8px 0 14px; }
.study-fold summary {
  cursor: pointer; color: var(--muted); font-size: 0.82rem; font-weight: 600;
  list-style: none; padding: 8px 0;
}
.study-fold summary::-webkit-details-marker { display: none; }
.study-fold summary::after { content: " ▾"; color: var(--quiet); }
.conflict-row .cname { color: var(--text); font-weight: 600; font-size: 0.92rem; }
.conflict-row .cmeta { color: var(--muted); font-size: 0.78rem; text-align: right; white-space: nowrap; }
.conflict-row .cparties { color: var(--quiet); font-size: 0.78rem; margin-top: 4px; }
.ctype { display: inline-block; font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.4px; padding: 2px 6px; border-radius: 4px; background: var(--bg); color: var(--muted); margin-right: 8px; }
#ledger-results { padding: 16px; background: var(--bg); border-radius: 12px; border-left: 3px solid var(--muted); color: var(--muted); }

@media (max-width: 860px) {
  .sticky-nav { flex-wrap: wrap; padding: 10px 12px; gap: 10px; }
  .app-tabs { order: 3; flex-basis: 100%; }
  .app-tab, .pane-tab { padding: 7px 10px; font-size: 0.8rem; }
  .nav-controls { margin-left: 0; }
  .year-hero, .top-metrics, .honesty-grid, .alt-grid { grid-template-columns: 1fr; }
  .conflict-map-wrap { height: min(36vh, 320px); min-height: 220px; }
  .map-legend { max-width: 92%; font-size: 0.72rem; }
  .dashboard { width: calc(100% - 16px); margin-top: 12px; }
  .conflict-row { flex-direction: column; }
  .conflict-row .cmeta { text-align: left; white-space: normal; }
  .modal-content { padding: 22px; margin: 4vh auto; }
  .hero-grid { grid-template-columns: 1fr; min-height: 0; width: calc(100% - 24px); }
  .hero-globe-wrap { height: min(48vh, 380px); min-height: 240px; }
  .hero-content { padding: 20px 4px 36px; max-width: none; }
  .hero-clock-value { white-space: normal; font-size: clamp(2.35rem, 9.4vw, 3.6rem); }
  .spend-clock-value, #cumulative-budget { white-space: normal; }
  #hero-canvas { inset: -4% -8% -6% -8%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  [data-reveal], .story-beat, .story-alt-mini, .hero-card, .hero-eyebrow, .hero-clock-value, .hero-clock-label, .hero-divider, .hero-what, .hero-cta, .plate {
    opacity: 1 !important; transform: none !important; filter: none !important; animation: none !important;
  }
}

/* ─── HERO ─── */
.ww-hero {
  position: relative;
  min-height: calc(100svh - 58px);
  overflow: hidden;
  background: #000;
  padding: 0;
}
.ww-hero::before {
  content: "";
  position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,0.08) 1px, transparent 1.15px);
  background-size: 22px 22px;
  mask-image: radial-gradient(ellipse 80% 75% at 72% 48%, #000 10%, transparent 72%);
  -webkit-mask-image: radial-gradient(ellipse 80% 75% at 72% 48%, #000 10%, transparent 72%);
  pointer-events: none;
  z-index: 0;
}
.hero-grid {
  position: relative; z-index: 1;
  width: min(1760px, calc(100% - 40px));
  margin: 0 auto;
  min-height: calc(100svh - 58px);
  display: grid;
  grid-template-columns: minmax(520px, 1.28fr) minmax(280px, 0.9fr);
  gap: 12px 20px;
  align-items: center;
}
.hero-globe-wrap {
  position: relative;
  height: min(82vh, 720px);
  min-height: 340px;
}
#hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: auto;
  cursor: grab;
}
#hero-canvas:active { cursor: grabbing; }
#hero-canvas.is-over-hit { cursor: pointer; }
.hero-globe-pop {
  position: absolute;
  z-index: 6;
  width: min(300px, calc(100% - 16px));
  background: rgba(12,12,12,0.94);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 12px 32px 14px 14px;
  color: #fff;
  pointer-events: auto;
  box-shadow: 0 18px 40px rgba(0,0,0,0.45);
  backdrop-filter: blur(16px);
}
.hero-globe-pop[hidden] { display: none !important; }
.hero-globe-pop-x {
  position: absolute; top: 6px; right: 8px;
  background: none; border: 0; color: var(--muted);
  font-size: 22px; line-height: 1; cursor: pointer; padding: 2px 6px;
}
.hero-globe-pop-x:hover { color: #fff; }
.hero-content {
  position: relative; z-index: 2;
  text-align: left;
  padding: 40px 8px 48px 0;
  max-width: none;
  width: 100%;
  min-width: 0;
}
.hero-eyebrow {
  font-size: 0.7rem; letter-spacing: 0.28em; text-transform: uppercase;
  color: var(--quiet); margin: 0 0 28px;
  animation: heroFadeUp 1s ease both;
}
.hero-clock-value {
  font-family: var(--serif);
  font-size: clamp(2.9rem, 5.2vw, 6.1rem);
  font-weight: 650; color: var(--war);
  letter-spacing: -0.05em; line-height: 0.92;
  font-variant-numeric: tabular-nums;
  margin: 0 0 10px;
  max-width: 100%;
  text-shadow: 0 0 100px rgba(239, 122, 122, 0.35), 0 0 40px rgba(239, 122, 122, 0.2);
  animation: heroFadeUp 1s ease 0.15s both;
  white-space: nowrap;
}
.hero-clock-label {
  color: var(--muted); font-size: 1rem; font-weight: 500;
  margin: 0 0 44px;
  animation: heroFadeUp 1s ease 0.3s both;
}
.hero-divider {
  width: 48px; height: 1px; background: var(--line);
  margin: 0 0 28px;
  animation: heroFadeUp 1s ease 0.4s both;
}
.hero-what {
  color: var(--text); font-size: 0.82rem; font-weight: 650;
  text-transform: uppercase; letter-spacing: 0.16em;
  margin: 0 0 18px;
  animation: heroFadeUp 1s ease 0.48s both;
}
.hero-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px 36px;
  margin-bottom: 36px;
  max-width: 760px;
}
.hero-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 0;
  background: none;
  border: 0;
  box-shadow: none;
  border-radius: 0;
}
.hero-card-label {
  margin: 0;
  min-height: 2.7em;
}
.hero-card-label .cf-name { display: block; font-size: 1.08rem; }
.hero-card-label .cf-note { display: block; margin-top: 2px; }
.hero-card-value {
  font-family: var(--serif); font-size: clamp(1.45rem, 2.4vw, 2rem); font-weight: 650;
  color: var(--peace-green); letter-spacing: -0.02em; line-height: 1;
  font-variant-numeric: tabular-nums;
  margin: 0;
}
@media (max-width: 700px) {
  .hero-cards { grid-template-columns: 1fr; gap: 18px; max-width: none; }
  .hero-card-label { min-height: 0; }
}
.hero-cta {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--text); border: 1px solid rgba(255,255,255,0.28);
  border-radius: var(--radius-btn); padding: 12px 26px;
  font-size: 0.9rem; font-weight: 500; cursor: pointer;
  text-decoration: none; background: transparent;
  transition: background 0.2s, border-color 0.2s;
  animation: heroFadeUp 1s ease 0.88s both;
}
.hero-cta:hover { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.5); }
.hero-cta-arrow { transition: transform 0.2s; }
.hero-cta:hover .hero-cta-arrow { transform: translateY(3px); }
@keyframes heroFadeUp {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ─── SCROLL STORYTELLING ─── */
.story-section {
  background: var(--bg);
  padding: 40px 0 100px;
}
.story-beat {
  max-width: 840px; margin: 0 auto 160px;
  text-align: center; padding: 0 24px;
  opacity: 0; transform: translateY(48px);
  filter: blur(8px);
  transition: opacity 1s cubic-bezier(0.22, 1, 0.36, 1), transform 1s cubic-bezier(0.22, 1, 0.36, 1), filter 1s cubic-bezier(0.22, 1, 0.36, 1);
}
.story-beat.sb-visible { opacity: 1; transform: translateY(0); filter: none; }
.story-kicker {
  display: block; font-size: 0.7rem; letter-spacing: 0.24em;
  text-transform: uppercase; color: var(--quiet); margin-bottom: 20px;
}
.story-big-num {
  font-family: var(--serif);
  font-size: clamp(4rem, 13vw, 10rem);
  font-weight: 650; letter-spacing: -0.045em;
  color: var(--text); line-height: 0.95;
  margin-bottom: 20px;
  font-variant-numeric: tabular-nums;
}
.story-big-num.s-red {
  color: var(--war);
  text-shadow: 0 0 70px rgba(239,122,122,0.28);
}
.story-label {
  font-size: 1.05rem; color: var(--muted); margin: 0 0 8px;
  font-weight: 500;
}
.story-sub {
  font-size: 0.73rem; color: var(--quiet); margin: 0;
  letter-spacing: 0.04em; line-height: 1.5;
}
.story-bar-track {
  height: 3px; background: rgba(255,255,255,0.08);
  border-radius: 2px; margin: 28px auto 28px;
  max-width: 480px; overflow: hidden;
}
.story-bar-fill {
  height: 100%; background: linear-gradient(90deg, rgba(239,122,122,0.6), var(--war));
  border-radius: 2px; width: 0%;
  transition: width 2.4s cubic-bezier(0.25, 1, 0.5, 1);
}

/* Split beat */
.story-split {
  max-width: 1100px;
  display: grid;
  grid-template-columns: 1fr 40px 1fr;
  align-items: center; gap: 24px;
  text-align: left;
}
.story-split-war, .story-split-peace { padding: 28px; }
.story-split-war {
  background: rgba(239,122,122,0.08);
  border: 1px solid rgba(239,122,122,0.22);
  border-radius: var(--radius);
  backdrop-filter: blur(16px);
}
.story-split-peace {
  background: var(--peace-green-dim);
  border: 1px solid var(--peace-green-border);
  border-radius: var(--radius);
  backdrop-filter: blur(16px);
}
.split-kicker {
  font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.18em;
  font-weight: 600; margin-bottom: 12px; display: block;
}
.split-kicker.war  { color: var(--war); }
.split-kicker.peace { color: var(--peace-green); font-size: 0.8rem; font-weight: 700; }
.split-big {
  font-family: var(--serif);
  font-size: clamp(2.2rem, 5vw, 4rem);
  font-weight: 650; letter-spacing: -0.04em;
  line-height: 1; margin-bottom: 10px;
  font-variant-numeric: tabular-nums;
}
.split-big.war  { color: var(--war); }
.split-big.peace { color: var(--peace-green); }
.split-label { font-size: 0.9rem; color: var(--muted); }
.story-split-vs {
  text-align: center; font-size: 0.8rem; color: var(--line);
  font-weight: 700; letter-spacing: 0.1em;
}
.story-alt-minis { display: grid; gap: 10px; margin-top: 14px; }
.story-alt-mini {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center; gap: 12px;
  padding: 14px 16px;
}
.story-alt-mini-num {
  font-family: var(--serif); font-size: 1.55rem; font-weight: 650;
  color: var(--peace-green); letter-spacing: -0.02em; white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.story-alt-mini-lbl {
  display: flex; flex-direction: column; gap: 2px; align-items: flex-start;
}
@media (max-width: 700px) {
  .story-split { grid-template-columns: 1fr; }
  .story-split-vs { padding: 4px 0; }
}

/* ─── SPARKLINE ─── */
.spark-wrap {
  position: relative; margin-bottom: 12px;
  border-radius: 8px; overflow: hidden;
}
#spark-canvas {
  width: 100%; height: 56px; display: block;
  border-radius: 8px;
}
.spark-cursor {
  position: absolute; top: 0; bottom: 0;
  width: 2px; background: var(--war);
  pointer-events: none;
  box-shadow: 0 0 8px rgba(239,122,122,0.6);
  transition: left 0.08s linear;
}

/* Responsive overrides stay after the base hero rules so they win the cascade. */
@media (max-width: 860px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
    width: calc(100% - 24px);
  }
  .hero-globe-wrap {
    height: min(48vh, 380px);
    min-height: 240px;
  }
  .hero-content {
    min-width: 0;
    padding: 20px 4px 36px;
    max-width: none;
  }
  .hero-eyebrow,
  .hero-clock-label,
  .hero-what { overflow-wrap: anywhere; }
  .hero-clock-value {
    white-space: normal;
    font-size: clamp(2rem, 9.4vw, 3.6rem);
  }
  .spend-clock-value,
  #cumulative-budget { white-space: normal; }
  #hero-canvas { inset: -4% -8% -6% -8%; }
}
