/* ══════════════════════════════════════════════════
   Save the Commons — Shared Styles
   Carbon Almanac redesign v2 — 2026
   ══════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,700;0,900;1,700&family=DM+Sans:opsz,wght@9..40,400;9..40,500;9..40,600;9..40,700&family=DM+Mono:wght@400;500&display=swap');

/* ── Reset ──────────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

/* ── Design tokens — Catppuccin Mocha ──────────── */
:root {
  /* Data semantics — map + tables */
  --flood: #e63946;
  --sprinkler: #f4a261;
  --dry: #e9c46a;
  --flood-glow: rgba(230, 57, 70, 0.4);
  --sprinkler-glow: rgba(244, 162, 97, 0.35);
  --dry-glow: rgba(233, 196, 106, 0.3);

  /* Dark UI — base surfaces */
  --bg: #11111b;
  --bg-alt: #181825;
  --surface: rgba(30, 30, 46, 0.92);
  --surface-solid: #1e1e2e;
  --surface-border: rgba(205, 214, 244, 0.06);
  --text: #cdd6f4;
  --text-dim: rgba(205, 214, 244, 0.45);
  --text-mid: rgba(205, 214, 244, 0.7);
  --accent: #94e2d5;
  --accent-hover: #7dd5c6;
  --nav-height: 60px;

  /* Font stacks */
  --font-display: 'Playfair Display', Georgia, serif;
  --font-sans:    'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono:    'DM Mono', monospace;
  /* Kept for backward compat (map page refs) */
  --font-serif-display: 'Playfair Display', Georgia, serif;
  --font-serif-body:    'DM Sans', sans-serif;

  /* Almanac content palette — Catppuccin Mocha dark */
  --almanac-paper:     #11111b;        /* Mocha Crust — matches body bg */
  --almanac-paper-alt: #11111b;        /* Mocha Crust — no alternation, uniform dark */
  --almanac-slate:     #11111b;        /* Mocha Crust — darkest bg */
  --almanac-ink:       #cdd6f4;        /* Mocha Text — primary text */
  --almanac-pencil:    #bac2de;        /* Mocha Subtext1 — body text */
  --almanac-whisper:   #a6adc8;        /* Mocha Subtext0 — captions, metadata */
  --almanac-ghost:     #6c7086;        /* Mocha Overlay0 — muted */
  --almanac-rule:      #313244;        /* Mocha Surface0 — row separators */
  --almanac-frame:     #45475a;        /* Mocha Surface1 — card borders */
  --almanac-edge:      #585b70;        /* Mocha Surface2 — emphasis borders */

  /* Teal accent — replaces Lakebed Coral */
  --almanac-highlight:       #94e2d5;
  --almanac-highlight-hover: #7dd5c6;
  --almanac-highlight-ink:   #11111b;  /* dark text on teal */

  /* Secondary palette */
  --almanac-amber:     #f9e2af;        /* Mocha Yellow */
  --almanac-deep-red:  #f38ba8;        /* Mocha Red */
  --almanac-dust-gold: #fab387;        /* Mocha Peach */
  --almanac-sage:      #a6e3a1;        /* Mocha Green — solutions/hope */
  --almanac-sage-dark: #74c7ec;        /* Mocha Sapphire */
}

/* ── Base element styles ─────────────────────────── */
html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a { color: inherit; }
img { max-width: 100%; }

/* Inline amber highlight — Carbon Almanac signature (amber, not coral) */
mark, .mark {
  background: var(--almanac-amber);
  color: #11111b;
  padding: 1px 4px;
  font-style: normal;
}

/* ── Legacy layout (map page + backward compat) ──── */
.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
.section { padding: 100px 24px; }
.section-alt { padding: 100px 24px; background: var(--bg-alt); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }

/* ── Legacy typography (map page + backward compat) ─ */
.section-label {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
  display: block;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(24px, 4vw, 42px);
  font-weight: 900;
  line-height: 1.05;
  margin-bottom: 20px;
  letter-spacing: -0.02em;
  color: var(--text);
}

.section-subtitle {
  font-size: 18px;
  color: var(--text-mid);
  line-height: 1.7;
  max-width: 640px;
}

/* ── Navigation (injected by nav.js) ────────────── */
.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  background: rgba(17, 17, 27, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--almanac-rule);
  transition: background 0.3s;
}

.nav-logo {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--almanac-ink);
  text-decoration: none;
  flex-shrink: 0;
}

.nav-logo span { color: var(--accent); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}

.nav-links a {
  font-size: 13px;
  font-weight: 500;
  color: var(--almanac-whisper);
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: color 0.2s;
  position: relative;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--almanac-ink);
}

.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0; right: 0;
  height: 2px;
  background: var(--almanac-highlight);
  border-radius: 1px;
}

.nav-cta {
  font-size: 13px;
  font-weight: 700;
  color: var(--almanac-highlight-ink) !important;
  background: var(--accent);
  padding: 9px 20px;
  border-radius: 0;
  transition: background 0.2s !important;
}

.nav-cta:hover {
  background: var(--accent-hover) !important;
  color: var(--almanac-highlight-ink) !important;
}

.nav-cta.active::after { display: none; }

/* Nav dropdowns */
.nav-dropdown { position: relative; }

.nav-dropdown-btn {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  color: var(--almanac-whisper);
  background: none;
  border: none;
  cursor: pointer;
  letter-spacing: 0.02em;
  transition: color 0.2s;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0;
}

.nav-dropdown-btn svg { transition: transform 0.2s; }
.nav-dropdown.open .nav-dropdown-btn svg { transform: rotate(180deg); }

.nav-dropdown-btn:hover,
.nav-dropdown.active .nav-dropdown-btn { color: var(--almanac-ink); }

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%);
  background: rgba(30, 30, 46, 0.97);
  border: 1px solid var(--almanac-rule);
  border-radius: 0;
  padding: 8px;
  min-width: 180px;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(-4px);
  transition: opacity 0.2s, transform 0.2s;
  z-index: 1001;
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}

.nav-dropdown.open .nav-dropdown-menu,
.nav-dropdown:hover .nav-dropdown-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.nav-dropdown-menu a {
  display: block !important;
  padding: 8px 14px !important;
  font-size: 13px;
  color: var(--almanac-pencil) !important;
  white-space: nowrap;
  border-bottom: none !important;
  width: auto !important;
  text-decoration: none;
}

.nav-dropdown-menu a:hover { background: var(--almanac-paper-alt); color: var(--almanac-ink) !important; }

.nav-dropdown-menu a.active {
  color: var(--almanac-ink) !important;
  background: rgba(148, 226, 213, 0.12);
}

.nav-dropdown-menu a.active::after { display: none; }

/* ── Nav override: dark on satellite hero only ────── */
body.page-satellite-hero .site-nav {
  background: rgba(17, 17, 27, 0.7);
  border-bottom: 1px solid rgba(205, 214, 244, 0.08);
}

body.page-satellite-hero .nav-logo { color: var(--text); }
body.page-satellite-hero .nav-links a { color: var(--text-dim); }
body.page-satellite-hero .nav-links a:hover,
body.page-satellite-hero .nav-links a.active { color: var(--text); }
body.page-satellite-hero .nav-dropdown-btn { color: var(--text-dim); }
body.page-satellite-hero .nav-dropdown-btn:hover { color: var(--text); }
body.page-satellite-hero .nav-cta { background: var(--accent); }
body.page-satellite-hero .nav-cta:hover { background: var(--accent-hover) !important; }
body.page-satellite-hero .nav-dropdown-menu {
  background: rgba(30, 30, 46, 0.97);
  border-color: rgba(255,255,255,0.1);
  box-shadow: none;
}
body.page-satellite-hero .nav-dropdown-menu a { color: var(--text-dim) !important; }
body.page-satellite-hero .nav-dropdown-menu a:hover { background: rgba(255,255,255,0.06); color: var(--text) !important; }
body.page-satellite-hero .nav-hamburger span { background: var(--text); }

/* ── Hamburger (mobile) ──────────────────────────── */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-hamburger span {
  width: 22px;
  height: 2px;
  background: var(--almanac-ink);
  border-radius: 1px;
  transition: transform 0.3s, opacity 0.3s;
}

.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Mobile menu overlay (lives on <body>, outside nav) ── */
.mobile-menu-overlay {
  display: none;
}
@media (max-width: 768px) {
  .mobile-menu-overlay {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 999;
    background: rgba(17, 17, 27, 0.97);
    padding-top: var(--nav-height);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s, visibility 0.25s;
  }
  .mobile-menu-overlay.open {
    opacity: 1;
    visibility: visible;
  }
  .mobile-menu-links {
    display: flex;
    flex-direction: column;
    padding: 24px;
    gap: 4px;
  }
  .mobile-menu-links a {
    display: block;
    padding: 14px 0;
    font-size: 16px;
    font-weight: 500;
    color: var(--text-dim);
    text-decoration: none;
    border-bottom: 1px solid rgba(205, 214, 244, 0.06);
  }
  .mobile-menu-links a:last-child {
    border-bottom: none;
  }
  .mobile-menu-links a:hover,
  .mobile-menu-links a.active {
    color: var(--text);
  }
  .mobile-menu-links a.nav-cta {
    margin-top: 12px;
    background: var(--accent);
    color: var(--bg);
    padding: 12px 20px;
    border-radius: 6px;
    text-align: center;
    font-weight: 600;
    border-bottom: none;
  }
  body.mobile-menu-open {
    overflow: hidden;
  }
}

/* ── Legacy glass card (map + backward compat) ────── */
.glass-card {
  background: var(--surface);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--surface-border);
  border-radius: 12px;
  padding: 28px;
  transition: transform 0.3s, border-color 0.3s;
}

.glass-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.12);
}

/* ── Legacy stat card ────────────────────────────── */
.stat-card {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: 12px;
  padding: 28px;
  text-align: center;
}

.stat-card .stat-number {
  font-family: var(--font-mono);
  font-size: 36px;
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 8px;
}

.stat-card .stat-label { font-size: 14px; color: var(--text-dim); }

.stat-card .stat-detail {
  font-size: 13px;
  color: var(--text-dim);
  margin-top: 8px;
  font-family: var(--font-mono);
}

/* ── Legacy buttons (map page + backward compat) ──── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 600;
  padding: 12px 28px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.btn-primary { background: var(--accent); color: var(--almanac-highlight-ink); }
.btn-primary:hover { background: var(--accent-hover); color: var(--almanac-highlight-ink); transform: translateY(-1px); }

.btn-outline { background: transparent; color: var(--text); border: 1px solid rgba(255, 255, 255, 0.15); }
.btn-outline:hover { border-color: rgba(255, 255, 255, 0.3); color: #fff; transform: translateY(-1px); }

.btn-sm { font-size: 13px; padding: 8px 18px; }

/* ── Legacy CTA block ────────────────────────────── */
.cta-block {
  text-align: center;
  padding: 60px 24px;
  background: linear-gradient(180deg, var(--bg) 0%, rgba(230, 57, 70, 0.06) 100%);
  border-radius: 16px;
  border: 1px solid var(--surface-border);
}

.cta-block .section-title { max-width: 600px; margin: 0 auto 12px; }
.cta-block .section-subtitle { max-width: 500px; margin: 0 auto 28px; }

/* ── Legacy pillar cards ─────────────────────────── */
.pillar-card {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: 12px;
  padding: 32px 28px;
  transition: transform 0.3s, border-color 0.3s;
  display: flex;
  flex-direction: column;
}

.pillar-card:hover { transform: translateY(-3px); border-color: rgba(255, 255, 255, 0.12); }
.pillar-stat { font-family: var(--font-mono); font-size: 32px; font-weight: 700; margin-bottom: 4px; }
.pillar-card h3 { font-size: 18px; font-weight: 600; margin-bottom: 10px; }
.pillar-card p { font-size: 14px; color: var(--text-dim); line-height: 1.6; flex: 1; }
.pillar-card .btn { margin-top: 20px; align-self: flex-start; }

/* ── Ticker bar ──────────────────────────────────── */
.ticker-bar {
  background: var(--surface-solid);
  border: 1px solid var(--surface-border);
  border-radius: 12px;
  padding: 24px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  text-align: center;
}

.ticker-item label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 6px;
}

.ticker-item .ticker-value {
  font-family: var(--font-mono);
  font-size: 24px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.02em;
}

.ticker-item .ticker-value.deficit { color: var(--accent); }

.ticker-item .ticker-unit {
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 2px;
}

.ticker-footnote {
  text-align: center;
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 10px;
}

/* ── Legacy data table ───────────────────────────── */
.data-table { width: 100%; border-collapse: collapse; font-size: 14px; }

.data-table th {
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  padding: 12px 16px;
  border-bottom: 1px solid var(--surface-border);
}

.data-table td {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  color: var(--text-mid);
}

.data-table td:first-child { color: var(--text); font-weight: 500; }
.data-table .mono { font-family: var(--font-mono); font-size: 13px; }
.data-table tr:last-child td { border-bottom: none; }

/* ── Legacy source / letter block ────────────────── */
.source { font-size: 12px; color: var(--text-dim); margin-top: 8px; font-style: italic; }
.source a { color: var(--text-dim); text-decoration: underline; text-underline-offset: 2px; }

.letter-block {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: 12px;
  padding: 28px;
  font-size: 14px;
  line-height: 1.8;
  color: var(--text-mid);
  white-space: pre-wrap;
  max-height: 400px;
  overflow-y: auto;
}

/* ── Legacy page header ──────────────────────────── */
.page-header { padding: 120px 0 48px; text-align: center; }
.page-header .section-title { font-size: clamp(28px, 5vw, 44px); }

/* ── Copy button ─────────────────────────────────── */
.copy-btn { position: relative; }

.copy-btn.copied::after {
  content: 'Copied!';
  position: absolute;
  top: -30px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: var(--almanac-highlight-ink);
  font-size: 12px;
  padding: 4px 10px;
  animation: fadeInOut 1.5s forwards;
}

/* ── Hero ────────────────────────────────────────── */
.hero { min-height: 90vh; display: flex; align-items: center; padding-top: var(--nav-height); }
.hero-content { max-width: 700px; }
.hero-acres { font-size: clamp(48px, 8vw, 80px); font-weight: 700; color: var(--accent); line-height: 1.0; margin-bottom: 8px; letter-spacing: -0.02em; }
.hero-headline { font-size: clamp(24px, 4vw, 36px); font-weight: 300; line-height: 1.3; margin-bottom: 24px; color: var(--text); }
.hero-subtitle { font-size: 18px; color: var(--text-mid); margin-bottom: 36px; max-width: 540px; line-height: 1.7; }
.hero-buttons { display: flex; gap: 14px; flex-wrap: wrap; }

/* ── Satellite hero ──────────────────────────────── */
.hero-satellite {
  position: relative;
  overflow: hidden;
  min-height: 100vh;
  padding-top: 0;
}

.hero-satellite .hero-content { position: relative; }

.sat-compare {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  visibility: hidden;
}

.sat-compare.sat-ready { visibility: visible; }

.sat-img { position: absolute; inset: 0; width: 100%; height: 100%; }
.sat-img img { width: 100%; height: 100%; object-fit: cover; display: block; }

.sat-before { z-index: 1; clip-path: inset(0 50% 0 0); }

.hero-overlay {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: var(--nav-height);
  background: linear-gradient(
    to bottom,
    rgba(17, 17, 27, 0.15) 0%,
    rgba(17, 17, 27, 0.25) 35%,
    rgba(17, 17, 27, 0.75) 65%,
    rgba(17, 17, 27, 0.92) 85%
  );
  pointer-events: none;
}

.hero-overlay .container,
.hero-overlay .hero-content,
.hero-overlay a,
.hero-overlay .btn { pointer-events: auto; }

/* Slider line */
.sat-slider {
  position: absolute;
  top: 0; bottom: 0;
  left: 50%;
  width: 3px;
  background: rgba(255, 255, 255, 0.8);
  z-index: 3;
  cursor: ew-resize;
  transform: translateX(-50%);
  touch-action: none;
}

.sat-slider::before,
.sat-slider::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  width: 20px;
}
.sat-slider::before { left: -20px; }
.sat-slider::after { right: -20px; }

.sat-slider-grip {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 40px; height: 40px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
}

.sat-slider-grip::before {
  content: '\25C2  \25B8';
  font-size: 14px;
  color: #333;
  letter-spacing: 2px;
}

.sat-label {
  position: absolute;
  top: calc(var(--nav-height) + 16px);
  z-index: 4;
  background: rgba(17, 17, 27, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  pointer-events: none;
}

.sat-label-left { left: 20px; }
.sat-label-right { right: 20px; }

.sat-hint {
  position: absolute;
  top: calc(50% + 36px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 4;
  color: rgba(255, 255, 255, 0.8);
  font-size: 13px;
  font-weight: 500;
  background: rgba(17, 17, 27, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 6px 16px;
  border-radius: 20px;
  pointer-events: none;
  transition: opacity 0.6s;
  white-space: nowrap;
}

.sat-mobile-label { display: none; }

.sat-attribution {
  position: absolute;
  bottom: 8px; right: 12px;
  z-index: 5;
  font-size: 10px;
  color: rgba(255, 255, 255, 0.35);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.6s;
}

.hero-satellite.sat-images-loaded .sat-attribution { opacity: 1; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.sat-slider, .sat-label, .sat-hint { opacity: 0; transition: opacity 0.6s; }
.sat-slider-ready .sat-slider,
.sat-slider-ready .sat-label,
.sat-slider-ready .sat-hint { opacity: 1; }

/* ── Footer ──────────────────────────────────────── */
.site-footer {
  border-top: 2px solid var(--almanac-frame);
  padding: 32px 24px;
  text-align: center;
  background: var(--almanac-paper-alt);
}

.site-footer p { font-size: 13px; color: var(--almanac-whisper); font-family: var(--font-sans); }
.site-footer a { color: var(--almanac-pencil); text-decoration: underline; text-underline-offset: 2px; }

/* ══════════════════════════════════════════════════
   ALMANAC DESIGN SYSTEM
   White pages. Bold sans. One accent color.
   ══════════════════════════════════════════════════ */

/* ── Almanac layout primitives ───────────────────── */
.almanac-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 32px;
}

.almanac-section {
  background: var(--almanac-paper);
  padding: 104px 0;
}

.almanac-section-alt {
  background: var(--almanac-paper-alt);
  padding: 104px 0;
}

.almanac-wide {
  max-width: 760px;
}

.almanac-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

.almanac-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.almanac-mixed {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 48px;
  align-items: start;
}

/* ── Almanac typography ──────────────────────────── */
.almanac-eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--almanac-whisper);
  display: block;
  margin-bottom: 16px;
}

.almanac-headline {
  font-family: var(--font-display);
  font-size: clamp(32px, 4.5vw, 56px);
  font-weight: 900;
  line-height: 1.0;
  color: var(--almanac-ink);
  margin-bottom: 24px;
  letter-spacing: -0.02em;
}

.almanac-headline--xl {
  font-size: clamp(48px, 8vw, 88px);
  font-weight: 900;
  letter-spacing: -0.02em;
}

.almanac-body {
  font-family: var(--font-sans);
  font-size: 18px;
  line-height: 1.75;
  color: var(--almanac-pencil);
}

.almanac-body strong { color: var(--almanac-ink); }

.almanac-body a {
  color: var(--almanac-ink);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--almanac-highlight);
}

.almanac-body a:hover { background: rgba(148, 226, 213, 0.2); }

.almanac-pullquote {
  font-family: var(--font-display);
  font-size: clamp(28px, 4.5vw, 52px);
  font-weight: 900;
  font-style: italic;
  line-height: 1.1;
  color: var(--almanac-ink);
  padding: 40px 0;
  border-top: 3px solid var(--almanac-frame);
  border-bottom: 3px solid var(--almanac-frame);
  margin: 48px 0;
  letter-spacing: -0.02em;
}

.almanac-source {
  font-family: var(--font-sans);
  font-size: 12px;
  color: var(--almanac-whisper);
  margin-top: 12px;
}

.almanac-mono {
  font-family: var(--font-mono);
  font-size: 13px;
}

/* ── Almanac section divider ─────────────────────── */
.almanac-section-divider {
  background: var(--almanac-slate);
  padding: 64px 0;
}

.almanac-section-divider__eyebrow {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--almanac-highlight);
  display: block;
  margin-bottom: 16px;
}

.almanac-section-divider__title {
  font-family: var(--font-display);
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 900;
  color: #fff;
  line-height: 1.0;
  margin-bottom: 24px;
  letter-spacing: -0.02em;
}

.almanac-section-divider__rule {
  width: 48px;
  height: 3px;
  background: var(--almanac-highlight);
}

/* ── Almanac chapter header ──────────────────────── */
.almanac-chapter-header {
  background: var(--almanac-paper);
  padding: calc(var(--nav-height) + 64px) 0 56px;
  border-bottom: 2px solid var(--almanac-frame);
}

.almanac-chapter-header__chapter {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--almanac-highlight);
  display: block;
  margin-bottom: 16px;
}

.almanac-chapter-header__title {
  font-family: var(--font-display);
  font-size: clamp(32px, 6vw, 56px);
  font-weight: 900;
  color: var(--almanac-ink);
  line-height: 0.95;
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}

.almanac-chapter-header__lead {
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.6;
  color: var(--almanac-pencil);
  max-width: 640px;
}

/* ── Almanac card components ─────────────────────── */
.almanac-card {
  background: #313244;
  border: 1px solid var(--almanac-rule);
  padding: 28px 32px;
}

.almanac-card h3 {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  color: var(--almanac-ink);
  margin-bottom: 12px;
  letter-spacing: -0.01em;
  line-height: 1.1;
}

/* Dark callout box — Mocha Crust "fast facts" style */
.almanac-callout {
  background: var(--almanac-slate);
  padding: 28px 32px;
}

.almanac-callout__label {
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--almanac-highlight);
  display: block;
  margin-bottom: 12px;
}

.almanac-callout__text {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--almanac-ink);
}

.almanac-callout__text strong { color: var(--almanac-highlight); }

/* Sidebar fact — dark panel for almanac-mixed layouts */
.almanac-sidebar-fact {
  background: var(--almanac-slate);
  padding: 28px 32px;
}

.almanac-sidebar-fact__label {
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--almanac-highlight);
  display: block;
  margin-bottom: 16px;
}

.almanac-sidebar-fact__number {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 700;
  color: #fff;
  line-height: 1.0;
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}

.almanac-sidebar-fact__desc {
  font-family: var(--font-sans);
  font-size: 13px;
  color: rgba(255, 255, 255, 0.45);
  line-height: 1.5;
}

/* ── Almanac data display ────────────────────────── */
.almanac-stat-display {
  text-align: center;
  padding: 20px 16px;
}

.almanac-stat-display__number {
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 500;
  line-height: 1;
  color: var(--almanac-ink);
}

.almanac-stat-display--flood .almanac-stat-display__number   { color: var(--flood); }
.almanac-stat-display--sprinkler .almanac-stat-display__number { color: var(--sprinkler); }
.almanac-stat-display--highlight .almanac-stat-display__number { color: var(--almanac-highlight); }
.almanac-stat-display--green .almanac-stat-display__number   { color: #a6e3a1; }

.almanac-stat-display__label {
  font-family: var(--font-sans);
  font-size: 12px;
  line-height: 1.5;
  color: var(--almanac-whisper);
  margin-top: 6px;
  max-width: 220px;
  margin-left: auto;
  margin-right: auto;
}

.almanac-stat-display__detail {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--almanac-ghost);
  margin-top: 6px;
}

/* On dark sections stat numbers go white */
section.almanac-slate .almanac-stat-display__number,
.almanac-terminal .almanac-stat-display__number {
  color: #fff;
}

/* ── Almanac data table ───────────────────────────── */
.almanac-table-wrap {
  border: 1px solid var(--almanac-rule);
  overflow-x: auto;
}

.almanac-data-table {
  width: 100%;
  border-collapse: collapse;
}

.almanac-data-table thead th {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--almanac-whisper);
  padding: 14px 16px;
  border-bottom: 2px solid var(--almanac-frame);
  text-align: left;
  background: var(--almanac-paper-alt);
  white-space: nowrap;
}

.almanac-data-table tbody td {
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--almanac-pencil);
  padding: 13px 16px;
  border-bottom: 1px solid var(--almanac-rule);
  vertical-align: top;
}

.almanac-data-table tbody tr:last-child td { border-bottom: none; }
.almanac-data-table .almanac-mono { font-family: var(--font-mono); font-size: 13px; }

/* ── Almanac ledger ──────────────────────────────── */
.almanac-ledger {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--almanac-rule);
}

.almanac-ledger__col--gains {
  padding: 32px;
  background: #313244;
  border-right: 1px solid var(--almanac-rule);
}

.almanac-ledger__col--losses {
  padding: 32px;
  background: var(--almanac-paper-alt);
}

.almanac-ledger__header {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--almanac-whisper);
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--almanac-frame);
}

.almanac-ledger__row {
  padding: 16px 0;
  border-bottom: 1px solid var(--almanac-rule);
}

.almanac-ledger__row:last-child { border-bottom: none; }

.almanac-ledger__amount {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 700;
  line-height: 1.0;
  letter-spacing: -0.01em;
}

.almanac-ledger__desc {
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--almanac-whisper);
  margin-top: 4px;
  line-height: 1.4;
}

/* ── Almanac myth card ───────────────────────────── */
.almanac-myth-card {
  border: 1px solid var(--almanac-rule);
  overflow: hidden;
}

.almanac-myth-card__header {
  background: var(--almanac-paper-alt);
  padding: 20px 24px;
  border-bottom: 1px solid var(--almanac-rule);
}

.almanac-myth-card__tag {
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--flood);
  display: block;
  margin-bottom: 10px;
}

.almanac-myth-card__myth {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  font-style: italic;
  color: var(--almanac-ink);
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.almanac-myth-card__body {
  background: #313244;
  padding: 20px 24px;
}

.almanac-myth-card__fact-tag {
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #a6e3a1;
  display: block;
  margin-bottom: 10px;
}

.almanac-myth-card__fact-text {
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--almanac-pencil);
  line-height: 1.65;
}

/* ── Almanac buttons ─────────────────────────────── */
.almanac-btn {
  display: inline-block;
  background: var(--almanac-highlight);
  color: var(--almanac-highlight-ink);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 700;
  padding: 14px 32px;
  text-decoration: none;
  border: 2px solid var(--almanac-highlight);
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.almanac-btn:hover { background: var(--almanac-highlight-hover); border-color: var(--almanac-highlight-hover); }

.almanac-btn-outline {
  display: inline-block;
  background: transparent;
  color: var(--almanac-highlight);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 700;
  padding: 14px 32px;
  text-decoration: none;
  border: 2px solid var(--almanac-highlight);
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.almanac-btn-outline:hover { background: var(--almanac-highlight); color: var(--almanac-highlight-ink); }

.almanac-btn-ghost {
  display: inline-block;
  background: transparent;
  color: #fff;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 700;
  padding: 14px 32px;
  text-decoration: none;
  border: 2px solid rgba(255, 255, 255, 0.35);
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background 0.15s;
}

.almanac-btn-ghost:hover { background: rgba(255, 255, 255, 0.1); }

.almanac-btn--sm { font-size: 12px; padding: 9px 20px; }

/* ── Almanac timeline ────────────────────────────── */
.almanac-timeline {
  list-style: none;
  border-left: 2px solid var(--almanac-rule);
  padding-left: 32px;
}

.almanac-timeline__entry {
  position: relative;
  padding-bottom: 36px;
}

.almanac-timeline__entry:last-child { padding-bottom: 0; }

.almanac-timeline__entry::before {
  content: '';
  position: absolute;
  left: -40px;
  top: 5px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #1e1e2e;
  border: 2px solid var(--almanac-rule);
}

.almanac-timeline__entry--terminal::before {
  background: var(--flood);
  border-color: var(--flood);
}

.almanac-timeline__year {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--almanac-whisper);
  margin-bottom: 8px;
  letter-spacing: 0.06em;
}

.almanac-timeline__title {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  color: var(--almanac-ink);
  margin-bottom: 8px;
  line-height: 1.0;
  letter-spacing: -0.01em;
}

.almanac-timeline__entry--terminal .almanac-timeline__title { color: var(--flood); }

.almanac-timeline__body {
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--almanac-whisper);
  line-height: 1.6;
}

/* ── Almanac letter block ─────────────────────────── */
.almanac-letter-block {
  background: #313244;
  border: 1px solid var(--almanac-rule);
  border-left: 4px solid var(--almanac-highlight);
  padding: 28px 32px;
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.85;
  color: var(--almanac-pencil);
  white-space: pre-wrap;
  max-height: 400px;
  overflow-y: auto;
}

/* ── Almanac pictograph grid ─────────────────────── */
.almanac-pictograph-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  max-width: 580px;
}

.almanac-pictograph-grid__unit {
  width: 20px;
  height: 20px;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

/* ── Homepage ticker transition ──────────────────── */
.homepage-ticker {
  background: var(--almanac-slate);
  padding: 48px 0;
}

/* ── Map bridge section ──────────────────────────── */
.map-bridge {
  background: var(--almanac-slate);
  padding: 80px 0;
  text-align: center;
}

.map-bridge__eyebrow {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--almanac-highlight);
  display: block;
  margin-bottom: 16px;
}

.map-bridge__headline {
  font-family: var(--font-display);
  font-size: clamp(40px, 6vw, 72px);
  font-weight: 900;
  color: #fff;
  line-height: 1.0;
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}

.map-bridge__sub {
  font-family: var(--font-sans);
  font-size: 17px;
  color: rgba(255, 255, 255, 0.55);
  margin-bottom: 36px;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

/* ── Almanac terminal CTA ────────────────────────── */
.almanac-terminal {
  background: var(--almanac-slate);
  padding: 80px 0;
  text-align: center;
}

.almanac-terminal__eyebrow {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--almanac-highlight);
  display: block;
  margin-bottom: 16px;
}

.almanac-terminal__headline {
  font-family: var(--font-display);
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 700;
  color: var(--almanac-ink);
  line-height: 1.0;
  margin-bottom: 16px;
  letter-spacing: -0.01em;
}

.almanac-terminal__sub {
  font-family: var(--font-sans);
  font-size: 17px;
  color: var(--almanac-pencil);
  margin-bottom: 36px;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

.almanac-terminal__buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ── Scroll animations ───────────────────────────── */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Keyframes ───────────────────────────────────── */
@keyframes fadeInOut {
  0%   { opacity: 0; transform: translateX(-50%) translateY(0); }
  20%  { opacity: 1; transform: translateX(-50%) translateY(-4px); }
  80%  { opacity: 1; transform: translateX(-50%) translateY(-4px); }
  100% { opacity: 0; transform: translateX(-50%) translateY(-8px); }
}

@keyframes countUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Responsive — Tablet ─────────────────────────── */
@media (max-width: 768px) {
  /* Nav */
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }

  /* Old nav-open expand removed — mobile menu is now a
     separate overlay on <body> to avoid backdrop-filter
     containing-block issues on iOS/Android. */

  .nav-dropdown-menu {
    position: static;
    transform: none;
    opacity: 1;
    pointer-events: auto;
    background: transparent;
    backdrop-filter: none;
    border: none;
    border-radius: 0;
    padding: 0;
    min-width: 0;
  }

  .nav-dropdown-menu a {
    padding: 8px 16px !important;
    font-size: 14px;
    color: var(--text-dim) !important;
    border-bottom: none !important;
  }

  .nav-dropdown-btn { display: none; }

  /* Satellite hero mobile */
  .sat-slider { display: none; }
  .sat-before { clip-path: none; z-index: 0; }

  .sat-mobile-label {
    display: block;
    position: absolute;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 4;
    background: rgba(17, 17, 27, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    padding: 6px 16px;
    border-radius: 20px;
    white-space: nowrap;
  }

  /* Almanac layout */
  .almanac-container { padding: 0 20px; }
  .almanac-section,
  .almanac-section-alt { padding: 60px 0; }
  .almanac-grid-2,
  .almanac-grid-3 { grid-template-columns: 1fr; gap: 20px; }
  .almanac-mixed { grid-template-columns: 1fr; }

  .almanac-headline { margin-bottom: 16px; }
  .almanac-body { font-size: 16px; }

  .almanac-ledger { grid-template-columns: 1fr; }
  .almanac-ledger__col--gains { border-right: none; border-bottom: 1px solid var(--almanac-rule); }

  .almanac-stat-display { padding: 16px 12px; }
  .almanac-stat-display__number { font-size: 20px; }

  .almanac-chapter-header { padding: calc(var(--nav-height) + 48px) 0 48px; }

  .almanac-terminal { padding: 60px 0; }
  .almanac-terminal__buttons { flex-direction: column; align-items: center; }

  .ticker-bar { grid-template-columns: 1fr; }

  .map-bridge { padding: 60px 0; }
  .homepage-ticker { padding: 36px 0; }
}

/* ── Responsive — Small mobile ───────────────────── */
@media (max-width: 640px) {
  .almanac-stat-display__number { font-size: 18px; }
  .almanac-chapter-header__title { font-size: clamp(40px, 12vw, 72px); }
  .almanac-pullquote { font-size: clamp(24px, 7vw, 40px); padding: 28px 0; }
  .almanac-btn, .almanac-btn-outline { padding: 12px 22px; }
  .almanac-card { padding: 20px 20px; }
  .almanac-callout { padding: 20px 20px; }
  .almanac-letter-block { padding: 20px 20px; font-size: 14px; }
}

/* ── Body class utilities ────────────────────────── */
body.page {
  background: var(--almanac-paper);
  color: var(--almanac-ink);
  padding-top: var(--nav-height);
}

body.page-satellite-hero {
  background: var(--bg);
  padding-top: 0;
}

