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

:root {
  --green: #006747;
  --green-light: #00875f;
  --green-dim: rgba(0, 103, 71, 0.15);
  --green-glow: rgba(0, 103, 71, 0.25);
  --blue: #003a59;
  --blue-dim: rgba(0, 58, 89, 0.15);
  --bg: #0a0f0d;
  --bg-card: rgba(14, 22, 18, 0.65);
  --bg-card-solid: #0e1612;
  --fg: #d4e8dc;
  --fg-muted: rgba(180, 210, 195, 0.5);
  --fg-dim: rgba(180, 210, 195, 0.3);
  --border: rgba(0, 103, 71, 0.12);
  --radius: 2rem;
  --font-sans: 'Nunito', system-ui, -apple-system, sans-serif;
  --font-serif: 'Merriweather', Georgia, 'Times New Roman', serif;
}

/* Light mode */
[data-theme="light"] {
  --green: #006747;
  --green-light: #00875f;
  --green-dim: rgba(0, 103, 71, 0.1);
  --green-glow: rgba(0, 103, 71, 0.15);
  --blue: #003a59;
  --blue-dim: rgba(0, 58, 89, 0.08);
  --bg: #fcfdfc;
  --bg-card: rgba(255, 255, 255, 0.8);
  --bg-card-solid: #ffffff;
  --fg: #0d1411;
  --fg-muted: rgba(13, 20, 17, 0.65);
  --fg-dim: rgba(13, 20, 17, 0.45);
  --border: rgba(0, 103, 71, 0.12);
}

html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--fg);
  line-height: 1.6;
  overflow-x: hidden;
}

/* ===== Utility ===== */
.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;
}

/* ===== Glass ===== */
.glass {
  background: rgba(10, 16, 14, 0.7);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border);
}
[data-theme="light"] .glass {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(0, 103, 71, 0.15);
}
.glass-light {
  background: rgba(255,255,255,0.06);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 14px 32px rgba(0,0,0,0.12);
  border-radius: 1.4rem;
}
[data-theme="light"] .glass-light {
  background: rgba(255, 255, 255, 0.78);
}

/* Soft, organic cards to reduce 'boxy' look */
.soft-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(0,0,0,0.08));
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 1.8rem;
  padding: 1rem;
  box-shadow: 0 12px 28px rgba(0,0,0,0.18);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--fg);
}
[data-theme="light"] .soft-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.92), rgba(245,250,248,0.97));
  box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}

.history-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
  margin-top: 2rem;
}

.history-card {
  border-radius: 1.7rem;
  padding: 1.5rem;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.14);
  box-shadow: 0 10px 22px rgba(0,0,0,0.10);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.history-card h3 {
  margin-bottom: 0.65rem;
}

.history-card p,
.history-card ul {
  color: var(--fg-muted);
  line-height: 1.75;
  margin: 0;
}

.history-card ul {
  padding-left: 1.25rem;
}

.feature-grid {
  display: grid;
  grid-template-columns: minmax(320px, 1.4fr) minmax(260px, 0.9fr);
  gap: 1.5rem;
  margin-top: 2rem;
  align-items: start;
}

.feature-stack {
  display: grid;
  gap: 1.5rem;
}

.feature-card {
  position: relative;
  padding: 2rem;
  border-radius: 2rem;
  overflow: hidden;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.14);
  box-shadow: 0 14px 36px rgba(0,0,0,0.14);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.feature-card::before,
.feature-card::after {
  display: none;
}

.feature-card h3,
.feature-card p {
  position: relative;
}

.feature-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.85rem;
  border-radius: 9999px;
  font-size: 0.74rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: rgba(0,103,71,0.12);
  color: var(--green);
  margin-bottom: 1rem;
  position: relative;
  z-index: 1;
}

.feature-card .body-sm {
  color: var(--fg-muted);
  line-height: 1.75;
  position: relative;
  z-index: 1;
}

.feature-card--hero {
  min-height: 320px;
}

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

/* Mosaic / floating cards */
.mosaic-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.8rem; }
.mosaic-card {
  border-radius: 1.5rem;
  padding: 1rem;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(0,0,0,0.08));
  box-shadow: 0 12px 30px rgba(0,0,0,0.16);
}
.mosaic-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 35px rgba(0,0,0,0.18);
}

/* Softer team tiles */
.team-tile {
  border-radius: 1.8rem;
  padding: 1.1rem;
  background: linear-gradient(180deg, rgba(0,103,71,0.05), rgba(0,103,71,0.02));
  box-shadow: 0 12px 28px rgba(0,0,0,0.14);
}

/* Polished quote figures */
figure.glass-light {
  padding: 1.25rem;
  border-radius: 1.5rem;
  background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(0,0,0,0.06));
  border: none;
  box-shadow: 0 14px 32px rgba(0,0,0,0.18);
}
[data-theme="light"] figure.glass-light {
  background: linear-gradient(180deg, rgba(255,255,255,0.94), rgba(250,250,250,0.98));
  box-shadow: 0 8px 18px rgba(0,0,0,0.08);
}

/* Reduce harsh spacing for a more organic rhythm */
.section-inner { padding-left:0.5rem; padding-right:0.5rem; }

/* ===== Organic Blob ===== */
.blob {
  position: absolute;
  border-radius: 50%;
  opacity: 0.06;
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
}
[data-theme="light"] .blob {
  opacity: 0.12;
  filter: blur(100px);
}

/* ===== Fluid Typography ===== */
.heading-xl {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: clamp(2.2rem, 5vw + 0.5rem, 4.5rem);
  line-height: 1.1;
  text-wrap: balance;
}
.heading-lg {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: clamp(1.8rem, 3.5vw + 0.3rem, 3.2rem);
  line-height: 1.15;
  text-wrap: balance;
}
.heading-md {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: clamp(1.1rem, 1.5vw + 0.3rem, 1.4rem);
  line-height: 1.3;
}
.body-sm { font-size: clamp(0.82rem, 0.8vw + 0.2rem, 0.92rem); }
.label-xs {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  color: var(--fg-muted);
}
.tag {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  border-radius: 9999px;
  background: var(--green-dim);
  color: var(--fg-muted);
}

/* Data page interactive legend and table */
.pie-legend { list-style:none; padding:0; margin:0; display:flex; flex-direction:column; gap:0.4rem; }
.pie-legend li { display:flex; align-items:center; gap:0.6rem; cursor:pointer; color:var(--fg); }
.pie-legend li .swatch { width:12px; height:12px; border-radius:2px; display:inline-block; }
.pie-legend li.muted { opacity:0.45; color:var(--fg-muted); }
.pie-hidden { opacity:0.12 !important; }

/* Table interactions */
#data-table { width:100%; border-collapse:collapse; }
#data-table thead th { cursor:pointer; color:var(--fg); padding:0.6rem; text-align:left; }
#data-table tbody tr { transition: background 180ms ease, transform 160ms ease; }
#data-table tbody tr:hover { background: rgba(255,255,255,0.02); transform: translateY(-2px); }
#data-table tbody tr.selected { background: linear-gradient(90deg, rgba(0,103,71,0.06), transparent); }
#table-filter { width:100%; padding:0.5rem 0.6rem; border-radius:0.5rem; border:1px solid var(--border); background:transparent; color:var(--fg); }
#table-filter::placeholder { color:var(--fg-muted); }

/* Polished table container for cleaner look */
.glass-light table { border-radius: 0.75rem; overflow: hidden; }
.glass-light table thead th { background: linear-gradient(180deg, rgba(0,103,71,0.06), rgba(0,0,0,0.02)); border-bottom: 1px solid var(--border); }
.glass-light table thead th { position: sticky; top: 0; z-index: 10; }
.glass-light #data-table tbody tr:nth-child(odd) { background: rgba(255,255,255,0.01); }
.glass-light #data-table tbody td { padding: 0.75rem 0.9rem; }
.glass-light #data-table thead th { padding: 0.9rem 0.9rem; font-size:0.85rem; }
.glass-light #data-table tbody tr:hover { transform: none; background: rgba(0,103,71,0.04); }
.glass-light .data-controls { gap:0.75rem; }

/* Chart cards */
.chart-grid { display:grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap:1rem; align-items:start; }
.chart-card {
  padding:1rem;
  border-radius:1.5rem;
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(0,0,0,0.06));
  box-shadow: 0 14px 36px rgba(0,0,0,0.16);
}
.chart-title { font-weight:700; margin-bottom:0.6rem; font-family: var(--font-serif); }
.flow-svg { width:100%; height:160px; }

/* Table density options */
.table-compact td, .table-compact th { padding: 0.32rem 0.45rem; font-size:0.86rem; }
.table-compact tbody tr { height: 34px; }
.table-comfy td, .table-comfy th { padding: 0.7rem 0.9rem; font-size:0.95rem; }

.data-controls { display:flex; gap:0.6rem; align-items:center; width:100%; }
.data-controls select, .data-controls button { background: transparent; color:var(--fg); border:1px solid var(--border); padding:0.45rem 0.6rem; border-radius:0.45rem; }
.data-controls .muted-note { color:var(--fg-muted); font-size:0.88rem; }
.row-select { width:16px; height:16px; }

/* ===== Section Spacing ===== */
section { position: relative; padding: 5rem 1rem; }
@media (min-width: 768px) { section { padding: 7rem 2rem; } }
.section-inner { max-width: 76rem; margin: 0 auto; position: relative; z-index: 1; }
.section-header { text-align: center; margin-bottom: 3.5rem; }
.section-header .label-xs { margin-bottom: 1rem; display: block; }

.text-green { color: var(--green-light); }

/* ===== Nav ===== */
#nav {
  position: fixed; top: 1rem; left: 50%; transform: translateX(-50%);
  z-index: 1000; display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem; padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  width: min(90%, 860px);
  transition: all 0.5s ease;
}
[data-theme="light"] #nav {
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(0, 103, 71, 0.15);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}
#nav.scrolled { width: min(94%, 940px); box-shadow: 0 8px 40px rgba(0,0,0,0.5); }
[data-theme="light"] #nav.scrolled { box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12); }
#nav .nav-brand { display: flex; align-items: center; gap: 0.75rem; }
#nav .nav-brand-icon {
  width: 2rem; height: 2rem; border-radius: 50%;
  background: var(--green-dim);
  display: flex; align-items: center; justify-content: center;
}
#nav .nav-brand span {
  font-family: var(--font-serif);
  font-size: 0.85rem; font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--fg);
}
#nav .nav-links { display: none; align-items: center; gap: 1.5rem; }
@media (min-width: 768px) { #nav .nav-links { display: flex; } }
#nav .nav-links a {
  font-size: 0.65rem; text-transform: uppercase;
  letter-spacing: 0.2em; color: var(--fg-muted);
  text-decoration: none; transition: color 0.3s; font-weight: 500;
}
#nav .nav-links a:hover { color: var(--fg); }
#nav .nav-links a.active { color: var(--green); font-weight: 700; }
#nav .nav-socials { display: flex; align-items: center; gap: 0.75rem; }
#nav .nav-socials a {
  color: var(--fg-muted); transition: color 0.3s;
  display: flex; align-items: center;
  padding: 0.35rem;
  border-radius: 0.35rem;
}
#nav .nav-socials a:hover { color: var(--fg); background: var(--green-dim); }
#nav .nav-socials svg { width: 1rem; height: 1rem; }

/* Theme Toggle */
.theme-toggle {
  background: none;
  border: none;
  color: var(--fg-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  padding: 0;
  margin: 0;
  transition: color 0.3s;
}
.theme-toggle:hover {
  color: var(--fg);
  background: var(--green-dim);
  border-radius: 0.35rem;
}
.theme-toggle svg {
  width: 1rem;
  height: 1rem;
  position: absolute;
  opacity: 1;
  transition: opacity 0.3s, transform 0.3s;
}
.theme-toggle .sun-icon {
  opacity: 1;
}
.theme-toggle .moon-icon {
  opacity: 0;
  transform: rotate(-180deg);
}
[data-theme="light"] .theme-toggle .sun-icon {
  opacity: 0;
  transform: rotate(-180deg);
}
[data-theme="light"] .theme-toggle .moon-icon {
  opacity: 1;
  transform: rotate(0deg);
}

/* ===== Hero / Map ===== */
#hero { padding-top: 7rem; }
@media (min-width: 768px) { #hero { padding-top: 9rem; } }
.hero-text { text-align: center; padding-bottom: 3rem; }
.hero-text p { max-width: 36rem; margin: 0 auto; color: var(--fg-muted); }
.map-wrap {
  position: relative; border-radius: var(--radius); overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
[data-theme="light"] .map-wrap {
  box-shadow: 0 12px 40px rgba(0,0,0,0.12);
}
.map-wrap::after {
  content: ''; position: absolute; inset: 0;
  border-radius: var(--radius); border: 1px solid var(--border);
  pointer-events: none; z-index: 500;
}
#map-container { width: 100%; height: 400px; }
@media (min-width: 768px) { #map-container { height: 520px; } }
@media (min-width: 1024px) { #map-container { height: 580px; } }

/* Leaflet popup custom */
.leaflet-popup-content-wrapper {
  background: rgba(10, 16, 14, 0.92) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  border: 1px solid var(--border) !important;
  border-radius: 1.5rem !important;
  box-shadow: 0 16px 48px rgba(0,0,0,0.6) !important;
  color: var(--fg) !important;
  padding: 0 !important;
}
[data-theme="light"] .leaflet-popup-content-wrapper {
  background: rgba(255, 255, 255, 0.95) !important;
  box-shadow: 0 16px 48px rgba(0,0,0,0.15) !important;
}
.leaflet-popup-content { margin: 0 !important; }
.leaflet-popup-tip { background: rgba(10, 16, 14, 0.92) !important; }
[data-theme="light"] .leaflet-popup-tip { background: rgba(255, 255, 255, 0.95) !important; }
.leaflet-popup-close-button { color: var(--fg-muted) !important; font-size: 18px !important; top: 8px !important; right: 12px !important; }

.popup-inner { padding: 1.25rem 1.5rem; min-width: 220px; }
.popup-name { font-family: var(--font-serif); font-size: 1rem; font-weight: 700; color: var(--fg); margin-bottom: 0.25rem; }
.popup-meta { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.15em; color: var(--fg-dim); margin-bottom: 0.75rem; }
.popup-quote {
  font-style: italic; font-size: 0.82rem; line-height: 1.6;
  color: var(--fg-muted);
  border-left: 2px solid rgba(0,103,71,0.5); padding-left: 0.75rem;
}

/* Map filter buttons */
#map-container + div > button {
  transition: all 0.3s ease;
  font-weight: 500;
}
#map-container + div > button:hover {
  box-shadow: 0 8px 24px rgba(0,103,71,0.2);
  transform: translateY(-2px);
}
#map-container + div > button:active {
  transform: translateY(0);
}

/* Leaflet controls theme */
.leaflet-control-zoom, .leaflet-control-attribution {
  background: rgba(10, 16, 14, 0.85) !important;
  backdrop-filter: blur(16px) !important;
  border: 1px solid var(--border) !important;
  border-radius: 0.75rem !important;
}
[data-theme="light"] .leaflet-control-zoom,
[data-theme="light"] .leaflet-control-attribution {
  background: rgba(255, 255, 255, 0.85) !important;
}
.leaflet-control-zoom-in, .leaflet-control-zoom-out {
  background-color: rgba(0, 103, 71, 0.15) !important;
  color: var(--fg) !important;
  border: 1px solid var(--border) !important;
  font-weight: bold !important;
  transition: all 0.3s !important;
}
.leaflet-control-zoom-in:hover, .leaflet-control-zoom-out:hover {
  background-color: rgba(0, 103, 71, 0.3) !important;
  box-shadow: 0 4px 12px rgba(0,103,71,0.2) !important;
}
.leaflet-control-attribution {
  font-size: 0.7rem !important;
  color: var(--fg-dim) !important;
}

/* Story card hover effect for map */
.bento-card { transition: all 0.3s ease; }
.bento-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 48px rgba(0,103,71,0.15);
}

/* Stats bar */
.stats-bar { display: flex; flex-wrap: wrap; justify-content: center; gap: 2rem; margin-top: 2rem; }
@media (min-width: 768px) { .stats-bar { gap: 4rem; } }
.stat-item { text-align: center; }
.stat-value { font-family: var(--font-serif); font-size: clamp(1.4rem, 2vw + 0.4rem, 1.8rem); font-weight: 700; }
.stat-label { font-size: 0.6rem; text-transform: uppercase; letter-spacing: 0.2em; color: var(--fg-muted); margin-top: 0.25rem; }

/* ===== SVG Divider ===== */
.wave-divider { position: relative; height: 6rem; overflow: hidden; }
@media (min-width: 768px) { .wave-divider { height: 8rem; } }
.wave-divider svg { position: absolute; bottom: 0; width: 100%; height: 100%; }

/* ===== Feature Vine ===== */
.feature-vine {
  position: relative;
  margin-bottom: 4rem;
  padding: 2rem 0;
}
.feature-vine-svg {
  display: none;
  position: absolute; left: 50%; top: 0;
  transform: translateX(-50%);
  width: 100%; height: 100%;
  pointer-events: none; z-index: 0;
}
@media (min-width: 768px) { .feature-vine-svg { display: block; } }
.feature-item {
  position: relative; z-index: 1;
  display: flex; align-items: flex-start; gap: 1.5rem;
  padding: 2rem 0;
  max-width: 26rem;
  opacity: 0; transform: translateY(1.5rem);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.feature-item.visible { opacity: 1; transform: translateY(0); }
/* stagger left/right on desktop */
@media (min-width: 768px) {
  .feature-item { padding: 2.5rem 0; }
  .feature-item:nth-child(1) { margin-left: 8%; }
  .feature-item:nth-child(2) { margin-left: auto; margin-right: 6%; }
  .feature-item:nth-child(3) { margin-left: 12%; }
  .feature-item:nth-child(4) { margin-left: auto; margin-right: 10%; }
}
.feature-orb {
  flex-shrink: 0;
  width: 4.5rem; height: 4.5rem;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  position: relative;
  transition: transform 0.5s ease, box-shadow 0.5s ease;
}
.feature-item:hover .feature-orb {
  transform: scale(1.1);
  box-shadow: 0 0 40px rgba(0,103,71,0.3);
}
[data-theme="light"] .feature-item:hover .feature-orb {
  box-shadow: 0 0 40px rgba(0,103,71,0.2);
}
.feature-orb::before {
  content: '';
  position: absolute; inset: -6px;
  border-radius: 50%;
  border: 1px solid rgba(0,103,71,0.15);
  animation: orb-pulse 3s ease-in-out infinite;
}
@keyframes orb-pulse {
  0%, 100% { transform: scale(1); opacity: 0.5; }
  50% { transform: scale(1.15); opacity: 0; }
}
.feature-orb svg {
  width: 1.5rem; height: 1.5rem;
  stroke: var(--fg); fill: none;
  stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.feature-body h3 {
  margin-bottom: 0.35rem;
  transition: color 0.3s;
}
.feature-item:hover .feature-body h3 { color: var(--green-light); }
.feature-card h3 { margin-bottom: 0.5rem; }

.bento-grid {
  display: grid; grid-template-columns: 1fr;
  gap: 1.25rem;
}
@media (min-width: 768px) { .bento-grid { grid-template-columns: repeat(3, 1fr); } }
.bento-card {
  position: relative; border-radius: var(--radius); padding: 1.5rem;
  overflow: hidden; transition: box-shadow 0.5s, transform 0.5s;
  display: flex; flex-direction: column; justify-content: space-between;
  background: var(--bg-card-solid);
  border: 1px solid var(--border);
}
@media (min-width: 768px) { .bento-card { padding: 2rem; } }
.bento-card:hover { 
  box-shadow: 0 16px 48px rgba(0,103,71,0.12); 
  transform: translateY(-3px); 
}
[data-theme="light"] .bento-card:hover {
  box-shadow: 0 16px 48px rgba(0,103,71,0.08);
}
.bento-card .corner-accent {
  position: absolute; top: 0; right: 0; width: 6rem; height: 6rem;
  background: var(--green-dim); border-radius: 0 0 0 4rem;
  transition: background 0.5s;
}
.bento-card:hover .corner-accent { background: var(--green-glow); }
.bento-card.wide { grid-column: span 1; }
@media (min-width: 768px) { .bento-card.wide { grid-column: span 2; } }
.bento-card.tall { grid-row: span 1; }
@media (min-width: 768px) { .bento-card.tall { grid-row: span 2; } }

.quote-text {
  font-family: var(--font-serif); font-style: italic;
  line-height: 1.5; color: var(--fg);
  margin-bottom: 1.5rem;
}
.quote-lg { font-size: clamp(1.05rem, 1.2vw + 0.3rem, 1.3rem); }
.quote-sm { font-size: clamp(0.92rem, 0.9vw + 0.2rem, 1rem); }
.avatar-row { display: flex; align-items: center; gap: 0.75rem; }
.avatar-circle {
  width: 2.5rem; height: 2.5rem; border-radius: 50%;
  background: var(--green-dim);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-serif); font-weight: 700;
  font-size: 0.8rem; color: var(--fg-muted);
}
.avatar-name { font-size: 0.85rem; font-weight: 500; color: var(--fg); }
.avatar-origin { font-size: 0.72rem; color: var(--fg-muted); }

/* ===== Timeline ===== */
.timeline-wrap { position: relative; }
.timeline-line {
  display: none; position: absolute; left: 50%; top: 0; bottom: 0;
  width: 2px; transform: translateX(-50%);
}
@media (min-width: 768px) { .timeline-line { display: block; } }
.timeline-entries { display: flex; flex-direction: column; gap: 2rem; }
@media (min-width: 768px) { .timeline-entries { gap: 3rem; } }
.tl-entry {
  display: flex; align-items: center; gap: 1.5rem;
  opacity: 0; transform: translateY(2rem);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.tl-entry.visible { opacity: 1; transform: translateY(0); }
@media (min-width: 768px) { .tl-entry { gap: 3rem; } }
.tl-entry.right { flex-direction: row; }
@media (min-width: 768px) { .tl-entry.right { flex-direction: row-reverse; } }
.tl-card {
  flex: 1; border-radius: var(--radius); padding: 1.5rem;
  transition: box-shadow 0.5s;
  background: var(--bg-card-solid);
  border: 1px solid var(--border);
}
@media (min-width: 768px) { .tl-card { padding: 2rem; } }
.tl-card:hover { box-shadow: 0 12px 40px rgba(0,103,71,0.1); }
@media (min-width: 768px) { .tl-entry.right .tl-card { text-align: right; } }
.tl-dot {
  display: none; flex-shrink: 0; width: 1rem; height: 1rem;
  border-radius: 50%; background: var(--green);
  box-shadow: 0 0 12px rgba(0,103,71,0.4);
  position: relative; z-index: 2;
}
@media (min-width: 768px) { .tl-dot { display: block; } }
.tl-spacer { display: none; flex: 1; }
@media (min-width: 768px) { .tl-spacer { display: block; } }

/* ===== Demographics ===== */
.demo-grid {
  display: grid; grid-template-columns: 1fr; gap: 1.25rem;
}
@media (min-width: 1024px) { .demo-grid { grid-template-columns: 3fr 2fr; } }
.rings-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
@media (min-width: 768px) { .rings-grid.four { grid-template-columns: repeat(4, 1fr); } }
.ring-item { display: flex; flex-direction: column; align-items: center; gap: 1rem; }
.ring-svg { filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3)); }
[data-theme="light"] .ring-svg { filter: drop-shadow(0 4px 12px rgba(0,103,71,0.15)); }
.ring-center {
  position: absolute; inset: 0; display: flex;
  align-items: center; justify-content: center;
}
.ring-value { font-family: var(--font-serif); font-size: 1.5rem; font-weight: 700; }
.ring-pct { font-size: 0.75rem; color: var(--fg-muted); }
.ring-label { font-size: 0.85rem; font-weight: 500; text-align: center; }
.ring-desc { font-size: 0.72rem; color: var(--fg-muted); text-align: center; max-width: 10rem; line-height: 1.5; }

.insight-grid {
  display: grid; grid-template-columns: 1fr; gap: 1.25rem; margin-top: 1.25rem;
}
@media (min-width: 768px) { .insight-grid { grid-template-columns: 2fr 1fr; } }
.insight-row { display: flex; align-items: flex-start; gap: 1.5rem; }
.insight-icon {
  width: 4rem; height: 4rem; flex-shrink: 0; border-radius: 1rem;
  background: var(--green-dim); display: flex;
  align-items: center; justify-content: center;
  font-family: var(--font-serif); font-size: 1.5rem; font-weight: 700;
  border: 1px solid var(--border);
}
.insight-center {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; text-align: center; height: 100%;
}
.insight-big { font-family: var(--font-serif); font-size: 2.5rem; font-weight: 700; margin-bottom: 0.5rem; }

/* ===== Footer ===== */
#footer {
  margin-top: 4rem;
  padding: 2rem;
}
@media (min-width: 768px) { #footer { padding: 3rem; } }
#footer a { color: var(--fg-muted); text-decoration: none; transition: color 0.3s; }
#footer a:hover { color: var(--fg); }
.footer-inner {
  border-radius: var(--radius); padding: 2rem;
  display: flex; flex-direction: column; gap: 2rem;
  background: var(--bg-card-solid);
  border: 1px solid var(--border);
}
@media (min-width: 768px) {
  .footer-inner { padding: 3rem; }
  .footer-top { flex-direction: row; align-items: center; }
  .footer-right { align-items: flex-end; }
}
.footer-top { display: flex; flex-direction: column; justify-content: space-between; gap: 2rem; }
.footer-right { display: flex; flex-direction: column; gap: 1rem; }
.footer-socials { display: flex; gap: 1rem; }
.footer-socials a {
  width: 2.5rem; height: 2.5rem; border-radius: 50%;
  background: var(--green-dim); display: flex;
  align-items: center; justify-content: center;
  color: var(--fg-muted); transition: all 0.3s;
}
.footer-socials a:hover { background: var(--green-glow); color: var(--fg); }
.footer-socials svg { width: 1rem; height: 1rem; }
.footer-divider { border-top: 1px solid var(--border); padding-top: 1.5rem; display: flex; flex-direction: column; gap: 1rem; align-items: center; }
@media (min-width: 768px) { .footer-divider { flex-direction: row; justify-content: space-between; } }

/* ===== Loading Spinner ===== */
.map-loader {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 0.75rem;
  background: var(--bg-card-solid); border-radius: var(--radius); z-index: 600;
  transition: opacity 0.5s;
}
.map-loader.hidden { opacity: 0; pointer-events: none; }
.spinner {
  width: 2rem; height: 2rem; border: 2px solid var(--green-dim);
  border-top-color: var(--green); border-radius: 50%;
  animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== Animations ===== */
.fade-up {
  opacity: 0; transform: translateY(1.5rem);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.fade-up.visible { opacity: 1; transform: translateY(0); }
