/* ---------- Base layout & theme ---------- */

:root {
  --bg-main: #050816;
  --bg-panel: #020617;
  --bg-panel-soft: #0b1220;
  --bg-glass: rgba(15, 23, 42, 0.9);
  --border-subtle: rgba(148, 163, 184, 0.4);
  --text-main: #e5e7eb;
  --text-muted: #9ca3af;
  --accent-cyan: #22d3ee;
  --accent-blue: #38bdf8;
  --accent-green: #22c55e;
  --accent-yellow: #eab308;
  --accent-orange: #f97316;
  --accent-red: #ef4444;
  --shadow-strong: 0 24px 60px rgba(0, 0, 0, 0.75);
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-pill: 999px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text",
    "Segoe UI", sans-serif;
  background: radial-gradient(circle at top, #0b1120 0, #020617 40%, #000 100%);
  color: var(--text-main);
  scroll-behavior: smooth;
}

body {
  position: relative;
  min-height: 100vh;
}

/* Background glow */
.page-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 10% 0%, rgba(56, 189, 248, 0.18) 0, transparent 55%),
    radial-gradient(circle at 90% 10%, rgba(34, 197, 94, 0.16) 0, transparent 55%),
    radial-gradient(circle at 50% 100%, rgba(59, 130, 246, 0.18) 0, transparent 60%);
  opacity: 0.9;
  z-index: -1;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(16px);
  background: linear-gradient(
    to bottom,
    rgba(15, 23, 42, 0.96),
    rgba(15, 23, 42, 0.85),
    transparent
  );
  border-bottom: 1px solid rgba(31, 41, 55, 0.8);
}

.header-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.logo-mark {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 30% 0, #38bdf8, #0f172a);
  box-shadow: 0 0 18px rgba(56, 189, 248, 0.7);
  font-size: 18px;
}

.header-title {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.header-nav {
  margin-left: auto;
  display: flex;
  gap: 16px;
  font-size: 13px;
}

.header-nav a {
  color: var(--text-muted);
  text-decoration: none;
  padding: 4px 8px;
  border-radius: 999px;
  transition: color 0.2s ease, background 0.2s ease;
}

.header-nav a:hover {
  color: var(--accent-cyan);
  background: rgba(15, 23, 42, 0.9);
}

/* ---------- Sections ---------- */

.section {
  padding: 56px 16px;
}

.section-inner {
  max-width: 1120px;
  margin: 0 auto;
}

.section-label {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-cyan);
  margin-bottom: 8px;
}

.section h2 {
  margin: 0 0 12px;
  font-size: 24px;
}

.section p {
  margin: 0 0 10px;
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Scroll-in animation */
.observe {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.observe.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Hero ---------- */

.team-intro-section {
  min-height: calc(100vh - 92px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 72px 16px 42px;
}

.team-intro-frame {
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: clamp(36px, 6vw, 64px);
  border-radius: 28px;
  background:
    radial-gradient(circle at 0 100%, rgba(56, 189, 248, 0.16), transparent 34%),
    radial-gradient(circle at 100% 0, rgba(34, 197, 94, 0.14), transparent 36%),
    rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.45);
  box-shadow: var(--shadow-strong);
}

.team-intro-frame h1 {
  margin: 18px 0 0;
  color: #f8fafc;
  font-size: clamp(44px, 8vw, 86px);
  line-height: 0.98;
  letter-spacing: -0.04em;
}

.team-intro-frame p {
  margin: 28px 0 0;
  color: #cbd5e1;
  font-size: clamp(20px, 2.6vw, 28px);
  line-height: 1.35;
}

.team-name-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 44px;
}

.team-name-grid span {
  min-height: 62px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  border-radius: 18px;
  background: rgba(2, 6, 23, 0.62);
  border: 1px solid rgba(148, 163, 184, 0.36);
  color: #f8fafc;
  font-size: 20px;
  font-weight: 750;
}

.team-intro-button {
  display: inline-flex;
  margin-top: 42px;
  text-decoration: none;
}

.team-intro-hint {
  margin-top: 28px;
  text-align: center;
  color: var(--text-muted);
  font-size: 16px;
  font-weight: 600;
}


.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.hero-tag {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(148, 163, 184, 0.5);
  background: radial-gradient(circle at 0 0, rgba(56, 189, 248, 0.18), rgba(15, 23, 42, 0.9));
  color: var(--text-main);
}

.primary-button,
.secondary-button,
.ghost-button {
  font-size: 13px;
  border-radius: var(--radius-pill);
  padding: 8px 16px;
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease,
    color 0.15s ease, border-color 0.15s ease;
}

.primary-button {
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-cyan));
  color: #0b1120;
  font-weight: 600;
  box-shadow: 0 14px 35px rgba(56, 189, 248, 0.5);
}

.primary-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 45px rgba(56, 189, 248, 0.7);
}

.secondary-button {
  background: rgba(15, 23, 42, 0.95);
  color: var(--text-main);
  border: 1px solid rgba(148, 163, 184, 0.7);
}

.secondary-button:hover {
  background: rgba(15, 23, 42, 1);
  border-color: var(--accent-blue);
}

.ghost-button {
  background: transparent;
  color: var(--text-muted);
  border: 1px dashed rgba(148, 163, 184, 0.6);
}

.ghost-button:hover:not(:disabled) {
  border-style: solid;
  color: var(--accent-cyan);
}

.ghost-button:disabled {
  opacity: 0.4;
  cursor: default;
}

.hero-visual {
  display: flex;
  justify-content: center;
}

.hero-thermo-shell {
  width: 220px;
  padding: 16px 16px 18px;
  border-radius: 20px;
  background: radial-gradient(circle at 0 0, rgba(56, 189, 248, 0.18), rgba(15, 23, 42, 0.96));
  box-shadow: var(--shadow-strong);
  border: 1px solid rgba(148, 163, 184, 0.6);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-thermo-label {
  font-size: 11px;
  color: var(--accent-cyan);
  margin-bottom: 2px;
}

.hero-thermo-temp {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 12px;
}

.hero-thermo-bar {
  width: 40px;
  height: 180px;
  border-radius: 999px;
  background: #020617;
  border: 1px solid #1f2937;
  padding: 4px;
  display: flex;
  align-items: flex-end;
  margin-bottom: 10px;
}

.hero-thermo-fill {
  width: 100%;
  height: 65%;
  border-radius: 999px;
  background: linear-gradient(to top, #f97316, #fde047);
  box-shadow: 0 0 18px rgba(249, 115, 22, 0.7);
  animation: heroPulse 2.8s ease-in-out infinite;
}

.hero-thermo-base {
  width: 64px;
  height: 64px;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 0, #f97316, #7f1d1d);
  box-shadow: 0 0 24px rgba(248, 113, 113, 0.7);
  margin-bottom: 8px;
}

.hero-thermo-caption {
  font-size: 15px;
  text-align: center;
  color: var(--text-muted);
}

.hero-thermo-caption-sub {
  display: block;
  font-size: 10px;
  color: #64748b;
}

.hero-scroll-hint {
  margin-top: 32px;
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
}

@keyframes heroPulse {
  0%,
  100% {
    box-shadow: 0 0 18px rgba(249, 115, 22, 0.7);
  }
  50% {
    box-shadow: 0 0 28px rgba(249, 115, 22, 1);
  }
}

/* ============================================
   HERO SECTION — IMPROVED LAYOUT & VISUALS
   ============================================ */

.hero-section {
  padding-top: 90px;
  padding-bottom: 60px;
}

.hero-content {
  max-width: 1120px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  gap: 48px;
  align-items: center;
}

/* Title */
.hero-title {
  font-size: 50px;
  line-height: 1.15;
  font-weight: 700;
  color: #f8fafc;
  margin-bottom: 10px;
  text-shadow: 0 0 18px rgba(56, 189, 248, 0.4);
}

.hero-title-sub {
  font-size: 28px;
  font-weight: 500;
  color: #cbd5e1;
  display: block;
  margin-top: 6px;
}

/* Subtitle */
.hero-subtitle {
  font-size: 20px;
  color: #cbd5e1;
  margin-bottom: 18px;
}

/* CTA button */
.hero-cta {
  margin-top: 10px;
}

/* Thermometer visual */
.hero-visual {
  display: flex;
  justify-content: center;
}

.hero-thermo-shell {
  width: 240px;
  padding: 20px;
  border-radius: 20px;
  background: radial-gradient(circle at 0 0,
              rgba(56, 189, 248, 0.18),
              rgba(15, 23, 42, 0.96));
  border: 1px solid rgba(148, 163, 184, 0.6);
  box-shadow: var(--shadow-strong);
  text-align: center;
}

/* Scroll hint */
.hero-scroll-hint {
  margin-top: 40px;
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
}

/* Responsive */
@media (max-width: 900px) {
  .hero-content {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-text {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .hero-subtitle {
    max-width: 100%;
  }
}


/* ---------- Narrative section ---------- */

.narrative-section {
  padding-top: 32px;
}

/* Center the entire narrative block */
.narrative-section {
  display: flex;
  justify-content: center;
  width: 100%;
}

/* Center the inner text container */
.narrative-section .section-inner {
  max-width: 760px;       /* perfect readable width */
  text-align: center;     /* center the text */
  margin: 0 auto;
}

/* Make the text larger + centered */
.narrative-section p {
  font-size: 17px;
  line-height: 1.75;
  color: #f1f5f9;
  font-weight: 400;
  margin-bottom: 18px;
  text-align: center;
}

/* Center headings too */
.narrative-section h2,
.narrative-section h3 {
  text-align: center;
  color: var(--accent-cyan);
  font-weight: 650;
  letter-spacing: 0.02em;
}



/* ---------- Panels & layout ---------- */

.panel {
  border-radius: var(--radius-lg);
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-strong);
  padding: 16px 16px 18px;
}

.panel-glass {
  background: radial-gradient(circle at 0 0, rgba(56, 189, 248, 0.12), rgba(15, 23, 42, 0.96));
}

/* Section header row */
.section-header-row {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  margin-bottom: 16px;
}

.controls-panel {
  margin-left: auto;
  min-width: 260px;
  max-width: 320px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: rgba(15, 23, 42, 0.96);
  border: 1px solid rgba(55, 65, 81, 0.9);
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.7);
  font-size: 12px;
}

.control-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.control-row:last-child {
  margin-bottom: 0;
}

.control-label {
  font-size: 12px;
  font-weight: 500;
}

#year-slider {
  flex: 1;
}

.toggle-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--text-muted);
}

/* Viz caption */
.viz-caption {
  margin-top: 10px;
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.viz-caption-main {
  color: var(--text-main);
}

.viz-caption-sub {
  color: #64748b;
}

/* ---------- Threshold section ---------- */

.threshold-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 2fr);
  gap: 24px;
  align-items: flex-start;
}

.threshold-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.threshold-card {
  padding: 12px 12px 14px;
  border-radius: var(--radius-md);
  background: rgba(15, 23, 42, 0.96);
  border: 1px solid rgba(55, 65, 81, 0.9);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.7);
}

.threshold-card h3 {
  margin: 6px 0 6px;
  font-size: 14px;
}

.threshold-card p {
  font-size: 12px;
  margin: 0;
}

.threshold-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 600;
  color: #020617;
}

.threshold-pill-15 {
  background: linear-gradient(135deg, #22c55e, #a3e635);
}

.threshold-pill-20 {
  background: linear-gradient(135deg, #eab308, #facc15);
}

.threshold-pill-30 {
  background: linear-gradient(135deg, #f97316, #fb923c);
}

.threshold-pill-40 {
  background: linear-gradient(135deg, #ef4444, #f97373);
}

/* Risk narrative */

.risk-narrative {
  margin-top: 20px;
  font-size: 13px;
}

.risk-narrative-title {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 8px;
}

.risk-narrative p {
  font-size: 13px;
  margin-bottom: 8px;
}

.risk-narrative-placeholder {
  color: var(--text-muted);
}

/* ---------- Legend / line chart ---------- */

.legend-panel {
  margin-left: auto;
  min-width: 220px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: rgba(15, 23, 42, 0.96);
  border: 1px solid rgba(55, 65, 81, 0.9);
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.7);
  font-size: 12px;
}

.legend-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.legend-items {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
}

.legend-item-label {
  font-size: 11px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.legend-item-label span {
  font-size: 11px;
}

/* ---------- Closing section ---------- */

.closing-section p:last-child {
  margin-bottom: 0;
}

.video-link-card {
  width: min(860px, 100%);
  min-height: 190px;
  margin: 22px auto 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 30px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  background:
    radial-gradient(circle at 0 0, rgba(56, 189, 248, 0.18), transparent 42%),
    rgba(15, 23, 42, 0.96);
  box-shadow: var(--shadow-strong);
  color: var(--text-main);
  text-align: left;
  text-decoration: none;
  transition: transform 0.16s ease, border-color 0.16s ease;
}

.video-link-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent-cyan);
}

.video-play-button {
  width: 62px;
  height: 62px;
  flex: 0 0 62px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--accent-cyan);
  color: #020617;
  font-size: 24px;
  box-shadow: 0 18px 45px rgba(34, 211, 238, 0.35);
}

.video-link-card strong,
.video-link-card em {
  display: block;
}

.video-link-card strong {
  font-size: clamp(20px, 3vw, 32px);
}

.video-link-card em {
  margin-top: 8px;
  color: var(--text-muted);
  font-style: normal;
  font-size: 14px;
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid rgba(31, 41, 55, 0.9);
  background: rgba(15, 23, 42, 0.98);
  padding: 10px 16px 14px;
  margin-top: 24px;
}

.footer-inner {
  max-width: 1120px;
  margin: 0 auto;
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

/* ---------- Tooltip ---------- */

.tooltip {
  position: absolute;
  pointer-events: none;
  background: rgba(15, 23, 42, 0.98);
  color: var(--text-main);
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 11px;
  max-width: 240px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.8);
  border: 1px solid rgba(148, 163, 184, 0.7);
  z-index: 50;
}

/* ---------- Map section ---------- */

.map-section {
  padding-top: 40px;
}

.map-container {
  max-width: 1120px;
  margin: 16px auto 0;
}

.map-container {
  position: relative;
  height: auto;
}

#world-map-svg {
  width: 100%;
  height: auto;
  display: block;
}

.country {
  fill: #020617;
  stroke: rgba(148, 163, 184, 0.5);
  stroke-width: 0.5;
  transition: fill 0.15s ease, stroke 0.15s ease, stroke-width 0.15s ease;
}

.country:hover {
  fill: rgba(56, 189, 248, 0.25);
  stroke: rgba(56, 189, 248, 0.9);
  stroke-width: 0.8;
}

.country.selected {
  fill: rgba(56, 189, 248, 0.45);
  stroke: rgba(56, 189, 248, 1);
  stroke-width: 1.1;
}

.country.risk-highlight {
  fill: rgba(239, 68, 68, 0.45);
  stroke: #ef4444;
  stroke-width: 1.2;
}

.map-controls-row {
  max-width: 1120px;
  margin: 10px auto 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
}

.map-status-label {
  color: var(--text-muted);
}

.map-status-value {
  font-weight: 600;
  color: var(--accent-cyan);
}

.map-control-bar {
  max-width: 1120px;
  margin: 12px auto 0;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  align-items: center;
  font-size: 12px;
}

.map-control-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.map-control-group label {
  font-size: 12px;
  color: var(--text-muted);
}

.map-control-group select {
  background: rgba(15, 23, 42, 0.96);
  color: var(--text-main);
  border-radius: 999px;
  border: 1px solid rgba(55, 65, 81, 0.9);
  padding: 4px 10px;
  font-size: 12px;
}

.map-year-controls {
  margin-left: auto;
}

#map-year-slider {
  width: 180px;
}

.map-container {
  position: relative; /* important so legend can overlay */
}

.map-legend {
  position: absolute;
  bottom: 16px;
  left: 16px;

  padding: 10px 12px;
  border-radius: 10px;

  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.35);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.55);

  font-size: 12px;
  color: #e5e7eb;

  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 50; /* ensures it sits above the map */
}

.legend-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.legend-swatch {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  border: 1px solid rgba(148, 163, 184, 0.6);
}

/* Colors match your map */
.legend-swatch.default {
  background: #020617;
}

.legend-swatch.selected {
  background: rgba(56, 189, 248, 0.45);
  border-color: rgba(56, 189, 248, 1);
}

.legend-swatch.threshold {
  background: rgba(239, 68, 68, 0.45);
  border-color: #ef4444;
}

.legend-swatch.both {
  background: #a855f7;
  border-color: #c084fc;
}



/* Selected AND crosses threshold → purple */
.country.selected.risk-highlight {
  fill: #6826a5 !important;
  stroke: #c084fc !important;
  stroke-width: 1.4;
}

.country.selected:hover {
  fill: rgba(56, 189, 248, 0.55);
  stroke: rgba(56, 189, 248, 1);
  stroke-width: 1.2;
}

.country.risk-highlight:hover {
  fill: rgba(166, 48, 212, 0.55); 
  stroke: #bf44ef;
  stroke-width: 1.3;
}

.country.selected.risk-highlight:hover {
  fill: #962cff9d !important;
  stroke: #c084fc !important;
  stroke-width: 1.4;
}


/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .team-name-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-content {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-visual {
    order: -1;
  }

  .section-header-row {
    flex-direction: column;
  }

  .controls-panel,
  .legend-panel {
    margin-left: 0;
    max-width: 100%;
  }

  .threshold-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .threshold-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .map-controls-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .map-control-bar {
    flex-direction: column;
    align-items: flex-start;
  }

  .map-year-controls {
    margin-left: 0;
  }
}

/* Generic writeup section */
.writeup {
  max-width: 1120px;
  margin: 32px auto;
  padding: 20px 24px;
  border-radius: 16px;

  /* Glass panel look */
  background: radial-gradient(circle at 0 0,
              rgba(56, 189, 248, 0.10),
              rgba(15, 23, 42, 0.92));
  border: 1px solid rgba(148, 163, 184, 0.35);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.55);

  color: #e5e7eb;
  font-size: 14px;
  line-height: 1.6;
}

/* Headings inside writeups */
.writeup h2,
.writeup h3 {
  margin-top: 0;
  margin-bottom: 10px;
  font-weight: 600;
  color: #f1f5f9;
}

.writeup h2 {
  font-size: 20px;
}

.writeup h3 {
  font-size: 16px;
  color: #cbd5e1;
}

/* Paragraphs */
.writeup p {
  margin: 0 0 12px;
  color: #cbd5e1;
}

#scenario-focus-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);

  display: none;
  visibility: hidden;
  pointer-events: none;

  backdrop-filter: blur(4px);
  z-index: 200;

  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: center;
  gap: 40px;
}

#scenario-focus-svg {
  overflow: visible;
  margin-bottom: 8px;
  margin-top: -120px;
}

#scenario-focus-panel {
  margin-top: 360px;
  padding: 18px 22px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.35);
  color: #e5e7eb;
  font-size: 14px;
  max-width: 360px;
  text-align: left;
  box-shadow: 0 18px 45px rgba(0,0,0,0.55);
}

#scenario-focus-exit {
  margin-top: 360px;
  padding: 6px 14px;
  font-size: 13px;
  border-radius: 8px;
  background: rgba(56, 189, 248, 0.25);
  border: 1px solid rgba(56, 189, 248, 0.5);
  color: #e0f2fe;
  cursor: pointer;
}


#global-year-controls {
  position: sticky;
  top: 0;
  z-index: 999;
  background: #0f172a;
  padding: 10px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.1);

  display: flex;
  align-items: center;
}

/* Center the slider group */
.global-year-left {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
}

/* Keep buttons on the right */
.global-year-right {
  display: flex;
  align-items: center;
  gap: 10px;
}


.global-year-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

#global-year-slider {
  width: 100%;
  max-width: 900px;   /* matches your chart inner width visually */
}


#global-play-button,
#global-reset-button {
  padding: 6px 14px;
  font-size: 13px;
  border-radius: 8px;
  background: rgba(56, 189, 248, 0.25);
  border: 1px solid rgba(56, 189, 248, 0.5);
  color: #e0f2fe;
  cursor: pointer;
}

html {
  scroll-padding-top: 90px; /* match your header height */
}

#world-map-svg {
  cursor: grab;
}

#world-map-svg:active {
  cursor: grabbing;
}

#divergence-card {
  margin-top: 14px;
  padding: 14px 16px;
}

#divergence-text {
  margin: 6px 0 0;
  color: #cbd5e1;
  font-size: 13px;
  line-height: 1.6;
}

#country-select {
  min-width: 180px;
  max-width: 240px;
}

.line-hover-layer {
  cursor: crosshair;
}
