/* ═══════════════════════════════════════════════════
   TIMETREKK — LIGHT THEME REDESIGN
   Clean white surfaces, blue accent, subtle shadows
   This file overrides style.css + stage7-patch.css
   ═══════════════════════════════════════════════════ */

/* ── Force light theme: override ALL root/dark variables ── */
:root, [data-theme="light"], [data-theme="dark"] {
  /* Surfaces — clean white */
  --color-bg: #f8f9fb;
  --color-surface: #ffffff;
  --color-surface-2: #ffffff;
  --color-surface-offset: #f1f3f7;
  --color-surface-dynamic: #e8ebf0;
  --color-divider: #e2e5eb;
  --color-border: #d4d9e2;

  /* Text */
  --color-text: #1a1f2e;
  --color-text-muted: #5c6478;
  --color-text-faint: #9ca3b4;
  --color-text-inverse: #ffffff;

  /* Primary — Blue */
  --color-primary: #2563eb;
  --color-primary-hover: #1d4ed8;
  --color-primary-active: #1e40af;
  --color-primary-highlight: #dbeafe;

  /* Category colors (accessible on white) */
  --color-cat-politics: #7c5a3a;
  --color-cat-science: #0f766e;
  --color-cat-culture: #7e22ce;
  --color-cat-war: #dc2626;
  --color-cat-exploration: #0369a1;
  --color-cat-economics: #4d7c0f;

  /* Map on light — soft blue ocean */
  --map-panel-bg: #e8f0f8;
  --map-panel-border: #d0dce8;
  --map-ocean: #dce8f2;
  --map-grid-color: #b8c8d8;
  --map-compass-stroke: #8ea0b4;
  --map-land-fill: #c8d0d8;
  --map-land-stroke: #a8b4c0;
  --map-land-hover-fill: #b8c4d0;
  --map-linked-fill: #bcc8d4;
  --map-label-fill: #6882a0;
  --map-label-active-fill: #2563eb;
  --map-active-fill: #2563eb;
  --map-active-stroke: #3b82f6;
  --map-active-hover-fill: #3b82f6;
  --map-france-fill: #b45309;
  --map-france-stroke: #d97706;
  --map-france-hover-fill: #d97706;
  --map-japan-fill: #dc2626;
  --map-japan-stroke: #ef4444;
  --map-japan-hover-fill: #ef4444;
  --map-hotspot-glow: rgba(37, 99, 235, 0.25);
  --map-hotspot-ring: rgba(59, 130, 246, 0.15);

  /* Landing — WHITE + Blue accent */
  --landing-bg: #f8f9fb;
  --landing-surface: #ffffff;
  --landing-surface-2: #f5f7fa;
  --landing-border: #e2e5eb;
  --landing-border-glow: #c7d2e0;
  --landing-text: #1a1f2e;
  --landing-text-muted: #5c6478;
  --landing-text-faint: #9ca3b4;
  --landing-accent: #2563eb;
  --landing-accent-dim: #3b82f6;
  --landing-accent-glow: rgba(37, 99, 235, 0.1);

  /* Stat cards */
  --stat-bg: #ffffff;
  --stat-border: #e2e5eb;
  --stat-value-color: #1a1f2e;
  --stat-label-color: #5c6478;

  /* Shadows — soft, warm-neutral */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.1);
  --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.04), 0 4px 16px rgba(0, 0, 0, 0.06);
  --shadow-card-hover: 0 4px 12px rgba(0, 0, 0, 0.08), 0 12px 28px rgba(0, 0, 0, 0.08);
}

/* Also override @media prefers-color-scheme dark */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --color-bg: #f8f9fb;
    --color-surface: #ffffff;
    --color-surface-2: #ffffff;
    --color-surface-offset: #f1f3f7;
    --color-surface-dynamic: #e8ebf0;
    --color-divider: #e2e5eb;
    --color-border: #d4d9e2;
    --color-text: #1a1f2e;
    --color-text-muted: #5c6478;
    --color-text-faint: #9ca3b4;
    --color-text-inverse: #ffffff;
    --color-primary: #2563eb;
    --color-primary-hover: #1d4ed8;
    --color-primary-active: #1e40af;
    --color-primary-highlight: #dbeafe;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.1);

    --landing-bg: #f8f9fb;
    --landing-surface: #ffffff;
    --landing-surface-2: #f5f7fa;
    --landing-border: #e2e5eb;
    --landing-border-glow: #c7d2e0;
    --landing-text: #1a1f2e;
    --landing-text-muted: #5c6478;
    --landing-text-faint: #9ca3b4;
    --landing-accent: #2563eb;
    --landing-accent-dim: #3b82f6;
    --landing-accent-glow: rgba(37, 99, 235, 0.1);

    --map-panel-bg: #e8f0f8;
    --map-panel-border: #d0dce8;
    --map-ocean: #dce8f2;
    --map-grid-color: #b8c8d8;
    --map-compass-stroke: #8ea0b4;
    --map-land-fill: #c8d0d8;
    --map-land-stroke: #a8b4c0;
    --map-land-hover-fill: #b8c4d0;
    --map-linked-fill: #bcc8d4;
    --map-label-fill: #6882a0;
    --map-label-active-fill: #2563eb;
    --map-active-fill: #2563eb;
    --map-active-stroke: #3b82f6;
    --map-active-hover-fill: #3b82f6;
    --map-france-fill: #b45309;
    --map-france-stroke: #d97706;
    --map-france-hover-fill: #d97706;
    --map-japan-fill: #dc2626;
    --map-japan-stroke: #ef4444;
    --map-japan-hover-fill: #ef4444;
  }
}

/* ═══════════════════════════════════════════════════
   BODY — light bg
   ═══════════════════════════════════════════════════ */

body {
  background-color: var(--color-bg) !important;
}

/* ═══════════════════════════════════════════════════
   LANDING VIEW — Clean white
   ═══════════════════════════════════════════════════ */

.landing-view {
  background: var(--landing-bg) !important;
  color: var(--landing-text) !important;
}

/* ── Header bar ── */
.dash-header {
  background: var(--landing-surface) !important;
  border-bottom: 1px solid var(--landing-border) !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

/* ── Logo — keep blue ── */
.logo,
.trek-dot-accent {
  color: #2563eb !important;
  fill: #2563eb !important;
}

.trek-line-mark {
  color: #2563eb !important;
}

.logo-text {
  color: var(--landing-text) !important;
}

.home-logo-btn:hover .logo-text,
.home-logo-btn:focus-visible .logo-text {
  color: #2563eb !important;
}

/* ── Search box in header ── */
.header-search-box {
  background: var(--landing-surface-2) !important;
  border-color: var(--landing-border) !important;
  color: var(--landing-text-faint) !important;
}

/* ── Header buttons ── */
.header-icon-btn {
  color: var(--landing-text-muted) !important;
}
.header-icon-btn:hover {
  background: var(--landing-surface-2) !important;
  color: var(--landing-text) !important;
}

.header-avatar {
  background: var(--landing-surface-2) !important;
  border-color: var(--landing-border) !important;
  color: var(--landing-text-muted) !important;
}

/* ── Theme toggle — hidden ── */
.theme-toggle {
  display: none !important;
}

/* ═══════════════════════════════════════════════════
   DASHBOARD CARDS — White with shadows
   ═══════════════════════════════════════════════════ */

/* Hero section */
.dash-hero-title {
  color: var(--landing-text) !important;
}
.dash-hero-brand {
  color: #2563eb !important;
}
.dash-hero-sub {
  color: var(--landing-text-muted) !important;
}

/* Hero CTA button — blue gradient */
.dash-hero-cta {
  background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.25) !important;
}
.dash-hero-cta:hover {
  box-shadow: 0 6px 24px rgba(37, 99, 235, 0.35) !important;
}

/* ── Map panel ── */
.dash-map-panel {
  background: var(--map-panel-bg) !important;
  border: 1px solid var(--map-panel-border) !important;
  box-shadow: var(--shadow-card) !important;
  border-radius: var(--radius-xl);
}

/* Map info strip */
.map-info-strip {
  background: rgba(255, 255, 255, 0.7) !important;
  border: 1px solid rgba(37, 99, 235, 0.08) !important;
  color: var(--landing-text-muted) !important;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.map-info-strip.mis--active {
  background: rgba(255, 255, 255, 0.9) !important;
  border-color: rgba(37, 99, 235, 0.15) !important;
  color: var(--landing-text) !important;
}
.mis-idle {
  color: var(--landing-text-faint) !important;
}
.mis-name {
  color: var(--landing-text) !important;
}
.mis-divider {
  background: var(--landing-border) !important;
}
.mis-stat {
  color: var(--landing-text-muted) !important;
}
.mis-cue {
  color: #2563eb !important;
}
.mis-coming {
  color: var(--landing-text-faint) !important;
}

/* ── Stat cards — white with shadow ── */
.dash-stat-card {
  background: var(--landing-surface) !important;
  border: 1px solid var(--landing-border) !important;
  box-shadow: var(--shadow-sm) !important;
  transition: box-shadow var(--transition-interactive), transform var(--transition-interactive) !important;
}
.dash-stat-card:hover {
  box-shadow: var(--shadow-card) !important;
  transform: translateY(-1px);
  border-color: var(--landing-border-glow) !important;
  background: var(--landing-surface) !important;
}
.dash-stat-value {
  color: var(--landing-text) !important;
}
.dash-stat-label {
  color: var(--landing-text-muted) !important;
}

/* ── Panel cards (editorial, explore) — white + shadow ── */
.dash-panel-card {
  background: var(--landing-surface) !important;
  border: 1px solid var(--landing-border) !important;
  box-shadow: var(--shadow-card) !important;
}
.dash-panel-card:hover {
  border-color: var(--landing-border-glow) !important;
  box-shadow: var(--shadow-card-hover) !important;
}

.dash-panel-heading {
  color: #2563eb !important;
}

/* ── Explore panel ── */
.dash-explore-toolbar {
  display: none !important;
}

.dash-explore-title {
  color: var(--landing-text) !important;
}

.dash-explore-search {
  background: var(--landing-surface-2) !important;
  border-color: var(--landing-border) !important;
  color: var(--landing-text-muted) !important;
}

.explore-search-input {
  background: transparent !important;
  color: var(--landing-text) !important;
  border: none !important;
  outline: none !important;
}
.explore-search-input::placeholder {
  color: var(--landing-text-faint) !important;
}
.dash-explore-search:focus-within {
  border-color: #2563eb !important;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1) !important;
}

/* Random event button */
.explore-random-btn {
  background: transparent !important;
  border: 1px solid var(--landing-border) !important;
  color: var(--landing-text-faint) !important;
}
.explore-random-btn:hover {
  border-color: #2563eb !important;
  color: #2563eb !important;
  background: rgba(37, 99, 235, 0.04) !important;
}

/* Explore spotlight */
.dash-explore-spotlight {
  background: var(--landing-surface-2) !important;
  border: 1px solid var(--landing-border) !important;
}

/* ── Explore tags ── */
.explore-tag {
  background: var(--landing-surface-2) !important;
  border-color: var(--landing-border) !important;
  color: var(--landing-text-muted) !important;
}
.explore-tag:hover {
  border-color: #2563eb !important;
  color: var(--landing-text) !important;
  background: rgba(37, 99, 235, 0.05) !important;
}
.explore-tag--active {
  background: #2563eb !important;
  color: #ffffff !important;
  border-color: #2563eb !important;
}
.explore-tag--active:hover {
  background: #3b82f6 !important;
  border-color: #3b82f6 !important;
  color: #ffffff !important;
}

/* ── Monthly Facts Widget ── */
.mf-heading {
  color: #2563eb !important;
}
.mf-icon {
  background: rgba(37, 99, 235, 0.1) !important;
  color: #2563eb !important;
}
.mf-pill {
  background: transparent !important;
  border-color: var(--landing-border) !important;
  color: var(--landing-text-muted) !important;
}
.mf-pill:hover {
  border-color: var(--landing-border-glow) !important;
  color: var(--landing-text) !important;
}
.mf-pill.active {
  background: rgba(37, 99, 235, 0.1) !important;
  border-color: rgba(37, 99, 235, 0.3) !important;
  color: #2563eb !important;
}
.mf-fact {
  background: var(--landing-surface-2) !important;
  border-color: var(--landing-border) !important;
}
.mf-fact:hover {
  border-color: var(--landing-border-glow) !important;
  background: #eef2f8 !important;
}
.mf-fact-title {
  color: var(--landing-text) !important;
}
.mf-fact-blurb {
  color: var(--landing-text-muted) !important;
}
.mf-fact-meta {
  color: var(--landing-text-faint) !important;
}
.mf-coming-text {
  color: var(--landing-text) !important;
}
.mf-coming-sub {
  color: var(--landing-text-faint) !important;
}

/* Light theme category colours (brighter for light bg) */
:root {
  --color-cat-tech: #2563eb;
  --color-cat-fun: #d97706;
}

/* ── Featured Connections items ── */
.fc-shuffle-btn {
  border-color: var(--landing-border) !important;
  color: var(--landing-text-muted) !important;
}
.fc-shuffle-btn:hover {
  color: #2563eb !important;
  border-color: #2563eb !important;
  background: rgba(37, 99, 235, 0.06) !important;
}
.fc-thread-badge {
  background: rgba(0, 0, 0, 0.04) !important;
  border-color: var(--landing-border) !important;
  color: var(--landing-text-muted) !important;
}
.fc-thread-name {
  color: var(--landing-text) !important;
}
.fc-item:hover {
  background: rgba(0, 0, 0, 0.03) !important;
}
.fc-item-country {
  color: var(--landing-text-muted) !important;
}
.fc-item-year {
  color: #2563eb !important;
}
.fc-item-title {
  color: var(--landing-text) !important;
}
.fc-item-note {
  color: var(--landing-text-muted) !important;
}
.fc-item-arrow {
  color: var(--landing-text-faint) !important;
}
.fc-item:hover .fc-item-arrow {
  color: #2563eb !important;
}
.fc-dot {
  box-shadow: 0 0 0 2px var(--landing-surface) !important;
}
.fc-line {
  background: var(--landing-border) !important;
}

/* ── Spotlight ── */
.spotlight-name {
  color: var(--landing-text) !important;
}
.spotlight-sub {
  color: var(--landing-text-muted) !important;
}
.spotlight-blurb {
  color: var(--landing-text-muted) !important;
}
.spotlight-stats {
  border-top-color: var(--landing-border) !important;
}
.spotlight-stat-value {
  color: #2563eb !important;
}
.spotlight-stat-label {
  color: var(--landing-text-faint) !important;
}

.spotlight-cta {
  background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 2px 12px rgba(37, 99, 235, 0.2) !important;
}
.spotlight-cta:hover {
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.3) !important;
}

/* Spotlight category chips */
.spotlight-cat-chip {
  background: var(--landing-surface-2) !important;
  border-color: var(--landing-border) !important;
  color: var(--landing-text) !important;
}
.spotlight-cat-chip:hover {
  background: rgba(37, 99, 235, 0.05) !important;
  border-color: rgba(37, 99, 235, 0.3) !important;
}
.spotlight-cat-count {
  color: var(--landing-text-muted) !important;
}

/* ── Era bars ── */
.era-bar-label {
  color: var(--landing-text-muted) !important;
}
.era-bar-track {
  background: var(--landing-surface-2) !important;
}
.era-bar-fill {
  background: linear-gradient(90deg, #3b82f6, #2563eb) !important;
}
.era-bar-count {
  color: #2563eb !important;
}
.era-bar-row--clickable:hover {
  background: var(--landing-surface-2) !important;
}
.era-bar-arrow {
  color: var(--landing-text-faint) !important;
}
.era-bar-row--clickable:hover .era-bar-arrow {
  color: #2563eb !important;
}

/* ── Era category chips ── */
.era-cat-chip {
  background: var(--landing-surface-2) !important;
  border-color: var(--landing-border) !important;
  color: var(--landing-text-muted) !important;
}

/* ── Featured Discovery / Panel Events ── */
.panel-event-year {
  color: #2563eb !important;
}
.panel-event-title {
  color: var(--landing-text) !important;
}
.panel-event-desc {
  color: var(--landing-text-muted) !important;
}
.panel-event-meta {
  border-top-color: var(--landing-border) !important;
}
.panel-event-badge {
  background: var(--landing-surface-2) !important;
  color: var(--landing-text-muted) !important;
}
.panel-event-figures {
  color: var(--landing-text-faint) !important;
}
.panel-event-cta {
  color: #2563eb !important;
}
.panel-event-cta:hover {
  color: #1d4ed8 !important;
}
.panel-event-cta::before,
.notable-quote-cta::before {
  background: #2563eb !important;
}

/* ── Panel Quote ── */
.panel-quote {
  border-left-color: #3b82f6 !important;
  background: rgba(37, 99, 235, 0.04) !important;
}
.panel-quote p {
  color: var(--landing-text) !important;
}
.panel-quote footer {
  color: var(--landing-text-muted) !important;
}

/* ── Notable Quote ── */
.notable-quote-block {
  background: rgba(37, 99, 235, 0.04) !important;
  border-left-color: #2563eb !important;
}
.notable-quote-mark {
  color: #2563eb !important;
}
.notable-quote-text {
  color: var(--landing-text) !important;
}
.notable-quote-attr-text {
  color: #2563eb !important;
}
.notable-quote-event {
  color: var(--landing-text-faint) !important;
}
.notable-quote-separator {
  background: var(--landing-text-faint) !important;
}
.notable-quote-cta {
  color: #2563eb !important;
}
.notable-quote-cta:hover {
  color: #1d4ed8 !important;
}

/* ── Key Figures ── */
.figure-avatar {
  border-width: 2px !important;
  border-style: solid !important;
  font-weight: 700 !important;
}
.figure-name {
  color: var(--landing-text) !important;
}
.figure-event-link {
  color: var(--landing-text-faint) !important;
}
.figure-era-badge {
  background: var(--landing-surface-2) !important;
  border: 1px solid var(--landing-border) !important;
  color: var(--landing-text-muted) !important;
}
.figure-chip:hover {
  background: var(--landing-surface-2) !important;
  border-color: var(--landing-border) !important;
}
.figure-chip:hover .figure-avatar {
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1) !important;
}
.figure-arrow {
  color: var(--landing-text-faint) !important;
}
.figures-empty {
  color: var(--landing-text-faint) !important;
  font-size: 0.6875rem;
  padding: 8px 4px;
  text-align: center;
}

/* Explore tag count & dot */
.explore-tag-count {
  opacity: 0.5;
  font-size: 0.5625rem;
  font-weight: 400;
}
.explore-tag-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 2px;
  flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════
   MAP — Light rewrite
   ═══════════════════════════════════════════════════ */

/* Map zoom controls */
.map-zoom-controls {
  background: rgba(255, 255, 255, 0.9) !important;
  border: 1px solid var(--landing-border) !important;
  box-shadow: var(--shadow-sm) !important;
}
.map-zoom-btn {
  color: var(--landing-text-muted) !important;
}
.map-zoom-btn:hover {
  background: rgba(37, 99, 235, 0.08) !important;
  color: #2563eb !important;
}
.map-zoom-btn:active {
  background: rgba(37, 99, 235, 0.15) !important;
}
.map-zoom-btn:focus-visible {
  outline-color: #2563eb !important;
}
.map-zoom-btn:disabled {
  color: var(--landing-text-faint) !important;
}
.map-zoom-btn--reset {
  border-top-color: var(--landing-border) !important;
}
.map-zoom-level {
  color: var(--landing-text-faint) !important;
}

/* Map search bar — light */
.map-search-input {
  background: rgba(0, 0, 0, 0.03) !important;
  border: 1px solid var(--landing-border) !important;
  color: var(--landing-text) !important;
}
.map-search-input::placeholder {
  color: var(--landing-text-faint) !important;
}
.map-search-input:focus {
  border-color: rgba(37, 99, 235, 0.3) !important;
  background: rgba(0, 0, 0, 0.02) !important;
}
.map-search-icon {
  color: var(--landing-text-faint) !important;
}
.map-search-results {
  background: rgba(255, 255, 255, 0.98) !important;
  border: 1px solid var(--landing-border) !important;
  box-shadow: var(--shadow-md) !important;
}
.map-search-result-item {
  color: var(--landing-text-muted) !important;
  border-bottom-color: var(--landing-border) !important;
}
.map-search-result-item:hover,
.map-search-result-item.is-highlighted {
  background: rgba(37, 99, 235, 0.06) !important;
  color: var(--landing-text) !important;
}
.map-search-result-item .msr-status--active {
  color: #2563eb !important;
}
.map-search-no-results {
  color: var(--landing-text-faint) !important;
}

/* Map search highlight — light theme */
.map-country--search-highlight {
  fill: #f59e0b !important;
  stroke: #d97706 !important;
  stroke-width: 1;
  opacity: 1 !important;
  filter: drop-shadow(0 0 5px rgba(217, 119, 6, 0.5)) !important;
}
.map-country--flash {
  fill: #f59e0b !important;
  stroke: #d97706 !important;
  stroke-width: 1.2;
  opacity: 1 !important;
  filter: drop-shadow(0 0 6px rgba(217, 119, 6, 0.6)) !important;
}

/* Map country focus */
.map-country:focus-visible {
  stroke: #2563eb !important;
  filter: drop-shadow(0 0 4px rgba(37, 99, 235, 0.3)) !important;
}

/* Map tooltip — light */
.map-tooltip {
  background: rgba(255, 255, 255, 0.95) !important;
  color: var(--landing-text) !important;
  border: 1px solid var(--landing-border) !important;
  box-shadow: var(--shadow-md) !important;
}

/* UK pulse on map */
.map-pulse-uk {
  fill: #2563eb !important;
}
.map-pulse-uk-outer {
  stroke: #3b82f6 !important;
}

/* ═══════════════════════════════════════════════════
   CONTINENT-BASED VARIED COUNTRY SHADING — Light Theme
   Each continent gets a distinct hue family. Within each
   continent, 4 shade levels (data-shade 0–3) add variety
   so neighbouring countries are visually distinguishable.
   ═══════════════════════════════════════════════════ */

/* ── Europe: cool blue-grey tones ── */
.map-country[data-continent="europe"][data-shade="0"] { fill: #b8c6d4 !important; }
.map-country[data-continent="europe"][data-shade="1"] { fill: #c2ceda !important; }
.map-country[data-continent="europe"][data-shade="2"] { fill: #aebdd0 !important; }
.map-country[data-continent="europe"][data-shade="3"] { fill: #c8d4de !important; }

/* ── Asia: warm grey with a hint of sage ── */
.map-country[data-continent="asia"][data-shade="0"] { fill: #bcc8c4 !important; }
.map-country[data-continent="asia"][data-shade="1"] { fill: #c6d0cc !important; }
.map-country[data-continent="asia"][data-shade="2"] { fill: #b2c0bc !important; }
.map-country[data-continent="asia"][data-shade="3"] { fill: #ccd6d0 !important; }

/* ── Africa: warm sand/terracotta tints ── */
.map-country[data-continent="africa"][data-shade="0"] { fill: #ccc4b8 !important; }
.map-country[data-continent="africa"][data-shade="1"] { fill: #d4ccc0 !important; }
.map-country[data-continent="africa"][data-shade="2"] { fill: #c4bab0 !important; }
.map-country[data-continent="africa"][data-shade="3"] { fill: #d8d0c6 !important; }

/* ── Americas: cool slate-green tones ── */
.map-country[data-continent="americas"][data-shade="0"] { fill: #bcc6c8 !important; }
.map-country[data-continent="americas"][data-shade="1"] { fill: #c6d0d2 !important; }
.map-country[data-continent="americas"][data-shade="2"] { fill: #b2bec2 !important; }
.map-country[data-continent="americas"][data-shade="3"] { fill: #ccd6d6 !important; }

/* ── Oceania: muted teal-grey ── */
.map-country[data-continent="oceania"][data-shade="0"] { fill: #b8c8cc !important; }
.map-country[data-continent="oceania"][data-shade="1"] { fill: #c2d0d4 !important; }
.map-country[data-continent="oceania"][data-shade="2"] { fill: #aec0c6 !important; }
.map-country[data-continent="oceania"][data-shade="3"] { fill: #c8d4d8 !important; }

/* ── Fallback for unmapped countries ── */
.map-country[data-continent="other"][data-shade="0"] { fill: #c0c8cc !important; }
.map-country[data-continent="other"][data-shade="1"] { fill: #c8d0d4 !important; }
.map-country[data-continent="other"][data-shade="2"] { fill: #b8c2c8 !important; }
.map-country[data-continent="other"][data-shade="3"] { fill: #ccd4d8 !important; }

/* ── Countries with events: varied blue shades (generic, excluding France & Japan) ──
   Override the continent colours with blue accent shades.
   Uses [data-continent] in selector for specificity parity. */
.map-country.map-country--has-events:not(.map-country--france):not(.map-country--japan)[data-continent][data-shade="0"] { fill: #2563eb !important; }
.map-country.map-country--has-events:not(.map-country--france):not(.map-country--japan)[data-continent][data-shade="1"] { fill: #3b82f6 !important; }
.map-country.map-country--has-events:not(.map-country--france):not(.map-country--japan)[data-continent][data-shade="2"] { fill: #1d4ed8 !important; }
.map-country.map-country--has-events:not(.map-country--france):not(.map-country--japan)[data-continent][data-shade="3"] { fill: #4f8ff7 !important; }

/* ── UK keeps its distinct treatment ── */
.map-country.map-country--uk[data-continent] { fill: #2563eb !important; }

/* ── France — amber/gold (light theme) ── */
.map-country.map-country--france[data-continent] { fill: var(--map-france-fill) !important; }
.map-country.map-country--france[data-continent]:hover,
.map-country.map-country--france[data-continent].map-country--hovered { fill: var(--map-france-hover-fill) !important; }

/* ── Japan — crimson red (light theme) ── */
.map-country.map-country--japan[data-continent] { fill: var(--map-japan-fill) !important; }
.map-country.map-country--japan[data-continent]:hover,
.map-country.map-country--japan[data-continent].map-country--hovered { fill: var(--map-japan-hover-fill) !important; }

/* ── Hover states: darken slightly from continent shade ── */
.map-country[data-continent="europe"]:hover,
.map-country[data-continent="europe"].map-country--hovered { fill: #a0b0c2 !important; }
.map-country[data-continent="asia"]:hover,
.map-country[data-continent="asia"].map-country--hovered { fill: #a4b4b0 !important; }
.map-country[data-continent="africa"]:hover,
.map-country[data-continent="africa"].map-country--hovered { fill: #b8b0a4 !important; }
.map-country[data-continent="americas"]:hover,
.map-country[data-continent="americas"].map-country--hovered { fill: #a4b0b4 !important; }
.map-country[data-continent="oceania"]:hover,
.map-country[data-continent="oceania"].map-country--hovered { fill: #a0b4b8 !important; }
.map-country[data-continent="other"]:hover,
.map-country[data-continent="other"].map-country--hovered { fill: #a8b4b8 !important; }

/* Has-events hover — still blue but brighter */
/* Generic has-events hover (blue) — France and Japan handled above */
.map-country.map-country--has-events:not(.map-country--france):not(.map-country--japan)[data-continent]:hover,
.map-country.map-country--has-events:not(.map-country--france):not(.map-country--japan)[data-continent].map-country--hovered { fill: #3b82f6 !important; }
.map-country.map-country--uk[data-continent]:hover { fill: #3b82f6 !important; }

/* Map land 3D feel — subtle */
.map-landmasses {
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1)) !important;
}

/* Hotspot markers */
.map-hotspot__core {
  fill: #10b981 !important;
}
.map-hotspot__ring {
  stroke: #10b981 !important;
}

/* Live dot */
.live-dot {
  background: #2563eb !important;
  box-shadow: 0 0 6px rgba(37, 99, 235, 0.4) !important;
}

/* ═══════════════════════════════════════════════════
   COUNTRY GRID — White cards, shadow
   ═══════════════════════════════════════════════════ */

.country-grid-heading {
  color: var(--landing-text-muted) !important;
  border-bottom-color: var(--landing-border) !important;
}
.country-grid-heading-count {
  color: var(--landing-text-faint) !important;
  background: var(--landing-surface-2) !important;
}

.country-card {
  background: var(--landing-surface) !important;
  border: 1px solid var(--landing-border) !important;
  box-shadow: var(--shadow-sm) !important;
}
.country-card:hover {
  box-shadow: var(--shadow-card-hover) !important;
  border-color: rgba(37, 99, 235, 0.2) !important;
  transform: translateY(-2px);
}
.country-card-name {
  color: var(--landing-text) !important;
}
.country-card-sub {
  color: var(--landing-text-muted) !important;
}
.country-card-bottom {
  border-top-color: var(--landing-border) !important;
}
.country-card-count {
  color: #2563eb !important;
}
.country-card-arrow {
  color: var(--landing-text-faint) !important;
}
.country-card:hover .country-card-arrow {
  color: #2563eb !important;
}
.country-card.coming-soon:hover {
  border-color: var(--landing-border) !important;
}

/* ── Globe hint ── */
.globe-hint {
  color: var(--landing-text-faint) !important;
  border-color: var(--landing-border) !important;
}

/* ═══════════════════════════════════════════════════
   TIMELINE VIEW — Clean light
   ═══════════════════════════════════════════════════ */

.timeline-view {
  background: var(--landing-bg) !important;
  color: var(--landing-text) !important;
}

/* Sidebar */
.sidebar {
  background: var(--landing-surface) !important;
  border-right: 1px solid var(--landing-border) !important;
  color: var(--landing-text) !important;
  box-shadow: 1px 0 3px rgba(0, 0, 0, 0.04);
}

.sidebar-brand .logo-text {
  color: var(--landing-text) !important;
}
.sidebar-brand .logo {
  color: #2563eb !important;
}

.back-btn {
  color: var(--landing-text-muted) !important;
}
.back-btn:hover {
  background: var(--landing-surface-2) !important;
  color: var(--landing-text) !important;
}

.sidebar-country {
  background: var(--landing-surface-2) !important;
  border: 1px solid var(--landing-border) !important;
}
.sidebar-country-name {
  color: var(--landing-text) !important;
}
.sidebar-country-sub {
  color: var(--landing-text-muted) !important;
}

.filter-heading {
  color: var(--landing-text-muted) !important;
}

/* Chips */
.chip {
  border-color: var(--landing-border) !important;
  color: var(--landing-text-muted) !important;
  background: transparent !important;
}
.chip:hover {
  border-color: #2563eb !important;
  color: #2563eb !important;
  background: rgba(37, 99, 235, 0.05) !important;
}
.chip.active {
  background: #2563eb !important;
  color: #ffffff !important;
  border-color: #2563eb !important;
}
.chip.active:hover {
  background: #3b82f6 !important;
  border-color: #3b82f6 !important;
}
.chip .chip-dot {
  filter: none !important;
}

.btn-secondary {
  background: var(--landing-surface-2) !important;
  color: var(--landing-text-muted) !important;
  border: 1px solid var(--landing-border) !important;
}
.btn-secondary:hover {
  background: rgba(37, 99, 235, 0.05) !important;
  color: var(--landing-text) !important;
  border-color: #2563eb !important;
}

.sidebar-footer {
  border-top-color: var(--landing-border) !important;
}
.sidebar-count {
  color: var(--landing-text-faint) !important;
}

/* Top bar */
.topbar {
  background: var(--landing-surface) !important;
  border-bottom: 1px solid var(--landing-border) !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.topbar-breadcrumb {
  color: var(--landing-text-faint) !important;
}
.topbar-breadcrumb-link {
  color: var(--landing-text-faint) !important;
}
.topbar-breadcrumb-link:hover {
  color: #2563eb !important;
}
.topbar-breadcrumb-current {
  color: var(--landing-text) !important;
}
.topbar-breadcrumb-sep {
  color: var(--landing-text-faint) !important;
}

.search-wrapper {
  background: var(--landing-surface-2) !important;
  border: 1px solid var(--landing-border) !important;
}
.search-wrapper:focus-within {
  border-color: #2563eb !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1) !important;
}
.search-icon {
  color: var(--landing-text-faint) !important;
}
.search-input {
  color: var(--landing-text) !important;
}
.search-input::placeholder {
  color: var(--landing-text-faint) !important;
}

.era-label {
  color: var(--landing-text-faint) !important;
}

/* Main wrapper */
.main-wrapper {
  background: var(--landing-bg) !important;
}
.timeline-container {
  background: var(--landing-bg) !important;
}

/* Timeline vertical line */
.timeline-vertical::before {
  background: var(--landing-border) !important;
}

/* Era markers */
.timeline-era-label {
  color: var(--landing-text-muted) !important;
}
.timeline-era-label::before {
  background: var(--landing-surface) !important;
  border-color: var(--landing-border) !important;
}

/* ── Event cards — white with shadow ── */
.timeline-event {
  background: var(--landing-surface) !important;
  border: 1px solid var(--landing-border) !important;
  box-shadow: var(--shadow-card) !important;
}
.timeline-event:hover {
  box-shadow: var(--shadow-card-hover) !important;
  border-color: rgba(37, 99, 235, 0.2) !important;
  transform: translateX(4px);
}
.timeline-event.active {
  border-color: #2563eb !important;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15), var(--shadow-md) !important;
}

/* Timeline dot */
.timeline-event::before {
  background: #3b82f6 !important;
  border-color: var(--landing-surface) !important;
}
.timeline-event:hover::before {
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15) !important;
}

/* Connector line */
.timeline-event::after {
  background: var(--landing-border) !important;
}

.timeline-event-year {
  color: #2563eb !important;
}
.timeline-event-title {
  color: var(--landing-text) !important;
}
.timeline-event-desc {
  color: var(--landing-text-muted) !important;
}

/* Event badges */
.event-badge {
  background: var(--landing-surface-2) !important;
  color: var(--landing-text-muted) !important;
  border: 1px solid var(--landing-border) !important;
}
.event-figures {
  color: var(--landing-text-faint) !important;
}

/* Event thumbnail */
.timeline-event-thumb {
  background: var(--landing-surface-2) !important;
}

/* ── Featured event card ── */
.timeline-event--featured {
  border: 2px solid rgba(37, 99, 235, 0.3) !important;
  background: var(--landing-surface) !important;
  box-shadow: var(--shadow-card) !important;
}
.timeline-event--featured:hover {
  border-color: #2563eb !important;
  box-shadow: var(--shadow-card-hover) !important;
}
.featured-image-slot {
  background: var(--landing-surface-2) !important;
  border-bottom: 1px solid var(--landing-border) !important;
}
.featured-image-slot img {
  filter: none !important;
}
.timeline-event--featured:hover .featured-image-slot img {
  filter: brightness(1.02) !important;
}
.featured-image-placeholder {
  background: var(--landing-surface-2) !important;
  color: var(--landing-text-faint) !important;
}

/* Featured card quote */
.timeline-event-quote {
  border-left-color: #2563eb !important;
  background: rgba(37, 99, 235, 0.04) !important;
}
.timeline-event-quote p {
  color: var(--landing-text) !important;
}
.timeline-event-quote footer {
  color: var(--landing-text-muted) !important;
}

/* Pulse highlight */
@keyframes event-pulse-light {
  0% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.35); }
  40% { box-shadow: 0 0 0 8px rgba(37, 99, 235, 0.12); }
  100% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0); }
}
.timeline-event.event-pulse-highlight {
  animation: event-pulse-light 700ms ease 2 !important;
  border-color: #2563eb !important;
  background: rgba(37, 99, 235, 0.04) !important;
}

/* ═══════════════════════════════════════════════════
   DETAIL PANEL — White, shadowed
   ═══════════════════════════════════════════════════ */

.detail-overlay::before {
  background: rgba(0, 0, 0, 0.2) !important;
  backdrop-filter: blur(2px) !important;
  -webkit-backdrop-filter: blur(2px) !important;
}
.detail-panel {
  background: var(--landing-surface) !important;
  border-left: 1px solid var(--landing-border) !important;
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.1) !important;
}
.detail-header {
  background: var(--landing-surface) !important;
  border-bottom: 1px solid var(--landing-border) !important;
}
.detail-close {
  color: var(--landing-text-muted) !important;
  border: 1px solid var(--landing-border) !important;
}
.detail-close:hover {
  background: var(--landing-surface-2) !important;
  color: var(--landing-text) !important;
}

.detail-category-badge {
  background: var(--landing-surface-2) !important;
  border: 1px solid var(--landing-border) !important;
  color: var(--landing-text) !important;
}
.detail-featured-badge {
  background: rgba(37, 99, 235, 0.08) !important;
  color: #2563eb !important;
  border-color: rgba(37, 99, 235, 0.25) !important;
}

.detail-date {
  color: #2563eb !important;
}
.detail-title {
  color: var(--landing-text) !important;
}
.detail-description {
  color: var(--landing-text) !important;
}
.detail-location {
  border-color: var(--landing-border) !important;
  color: var(--landing-text-muted) !important;
  background: var(--landing-surface-2) !important;
}

.detail-facts li {
  color: var(--landing-text) !important;
}

.detail-quote {
  border-left-color: #2563eb !important;
  background: rgba(37, 99, 235, 0.04) !important;
}
.detail-quote p {
  color: var(--landing-text) !important;
}
.detail-quote footer {
  color: var(--landing-text-muted) !important;
}

.detail-section-heading {
  color: var(--landing-text-muted) !important;
  border-top-color: var(--landing-border) !important;
}

.detail-key-figures li {
  color: var(--landing-text) !important;
  border-bottom-color: var(--landing-border) !important;
}

.detail-significance {
  color: var(--landing-text-muted) !important;
}

.detail-nearby-events li {
  border-bottom-color: var(--landing-border) !important;
  color: var(--landing-text) !important;
}
.detail-nearby-events li:hover {
  color: #2563eb !important;
}
.detail-nearby-year {
  color: var(--landing-text-faint) !important;
}
.detail-nearby-title {
  color: var(--landing-text) !important;
}
.detail-nearby-events li:hover .detail-nearby-title {
  color: #2563eb !important;
}

/* Detail panel image */
.detail-image-wrap {
  background: var(--landing-surface-2) !important;
}
.detail-image-credit {
  background: linear-gradient(to top, rgba(0,0,0,0.02), transparent) !important;
  color: var(--landing-text-faint) !important;
}

/* Detail panel scrollbar */
.detail-panel {
  scrollbar-color: var(--landing-border) var(--landing-surface) !important;
}
.detail-panel::-webkit-scrollbar-track {
  background: var(--landing-surface) !important;
}
.detail-panel::-webkit-scrollbar-thumb {
  background: var(--landing-border) !important;
}

/* ═══════════════════════════════════════════════════
   EMPTY STATE
   ═══════════════════════════════════════════════════ */

.empty-state {
  color: var(--landing-text-muted) !important;
}
.empty-state svg {
  color: var(--landing-text-faint) !important;
}
.empty-state h3 {
  color: var(--landing-text) !important;
}
.empty-state p {
  color: var(--landing-text-muted) !important;
}

/* ═══════════════════════════════════════════════════
   MOBILE CONTROLS
   ═══════════════════════════════════════════════════ */

.mobile-back-btn,
.mobile-filter-btn {
  background: var(--landing-surface) !important;
  border-color: var(--landing-border) !important;
  color: var(--landing-text) !important;
}
.mobile-back-btn {
  border-right-color: var(--landing-border) !important;
}
.mobile-filter-btn {
  border-left-color: var(--landing-border) !important;
}
.mobile-back-btn:active,
.mobile-filter-btn:active {
  background: var(--landing-surface-2) !important;
}

/* ═══════════════════════════════════════════════════
   SCROLL-TO-TOP FAB
   ═══════════════════════════════════════════════════ */

.scroll-top-fab {
  background: #2563eb !important;
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.3) !important;
}
.scroll-top-fab:hover {
  background: #3b82f6 !important;
  box-shadow: 0 6px 24px rgba(37, 99, 235, 0.4) !important;
}

/* ═══════════════════════════════════════════════════
   SCROLLBARS
   ═══════════════════════════════════════════════════ */

.timeline-container {
  scrollbar-color: var(--landing-border) var(--landing-surface-2) !important;
}
.timeline-container::-webkit-scrollbar-track {
  background: var(--landing-surface-2) !important;
}
.timeline-container::-webkit-scrollbar-thumb {
  background: var(--landing-border) !important;
}
.timeline-container::-webkit-scrollbar-thumb:hover {
  background: var(--landing-text-faint) !important;
}

.sidebar {
  scrollbar-color: var(--landing-border) transparent !important;
}
.sidebar::-webkit-scrollbar-thumb {
  background: var(--landing-border) !important;
}

/* ═══════════════════════════════════════════════════
   SELECTION
   ═══════════════════════════════════════════════════ */

::selection {
  background: rgba(37, 99, 235, 0.15) !important;
  color: var(--landing-text) !important;
}

/* ═══════════════════════════════════════════════════
   FOCUS VISIBLE
   ═══════════════════════════════════════════════════ */

:focus-visible {
  outline-color: #2563eb !important;
}

/* ═══════════════════════════════════════════════════
   QUICK START GUIDE (light)
   ═══════════════════════════════════════════════════ */

.quick-start-step {
  background: var(--landing-surface) !important;
  border-color: var(--landing-border) !important;
  box-shadow: var(--shadow-sm) !important;
}
.quick-start-step:hover {
  background: var(--landing-surface) !important;
  border-color: rgba(37, 99, 235, 0.2) !important;
  box-shadow: var(--shadow-card) !important;
}
.qs-number {
  background: rgba(37, 99, 235, 0.08) !important;
  color: #2563eb !important;
  border-color: rgba(37, 99, 235, 0.15) !important;
}
.qs-text strong {
  color: var(--landing-text) !important;
}
.qs-text span {
  color: var(--landing-text-muted) !important;
}
.qs-connector {
  color: var(--landing-border) !important;
}

/* Hero CTA button (Stage 5 style) — blue */
.hero-cta.hero-cta--primary {
  background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%) !important;
  border-color: rgba(37, 99, 235, 0.3) !important;
  box-shadow: 0 4px 20px rgba(37, 99, 235, 0.2) !important;
}
.hero-cta.hero-cta--primary:hover {
  background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 100%) !important;
  box-shadow: 0 8px 32px rgba(37, 99, 235, 0.3) !important;
}

/* ═══════════════════════════════════════════════════
   MOBILE SIDEBAR (light)
   ═══════════════════════════════════════════════════ */

@media (max-width: 768px) {
  .sidebar {
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.1) !important;
  }
}

/* Mobile: detail image treatment */
@media (max-width: 480px) {
  .detail-image-wrap {
    background: var(--landing-surface-2) !important;
  }
}

/* ═══════════════════════════════════════════════════
   FEATURED IMAGE — No dark filters on light theme
   ═══════════════════════════════════════════════════ */

.featured-image-slot img,
.detail-featured-image img {
  filter: none !important;
}

/* ═══════════════════════════════════════════════════
   STAT CARD refinements
   ═══════════════════════════════════════════════════ */

.stat-card {
  background: var(--landing-surface) !important;
  border-color: var(--landing-border) !important;
  box-shadow: var(--shadow-sm) !important;
}
.stat-card:hover {
  background: var(--landing-surface) !important;
  border-color: rgba(37, 99, 235, 0.12) !important;
  box-shadow: var(--shadow-card) !important;
}

/* ═══════════════════════════════════════════════════
   DASHBOARD DIVIDER
   ═══════════════════════════════════════════════════ */

.dashboard-divider-line {
  background: linear-gradient(90deg, transparent, rgba(37, 99, 235, 0.15), transparent) !important;
}

/* ═══════════════════════════════════════════════════
   PANEL & COUNTRY CARD HOVER
   ═══════════════════════════════════════════════════ */

.panel-card:hover {
  border-color: rgba(37, 99, 235, 0.12) !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06), 0 0 0 1px rgba(37, 99, 235, 0.06) !important;
}

.country-card:not(.coming-soon):hover {
  box-shadow: var(--shadow-card-hover) !important;
  border-color: rgba(37, 99, 235, 0.2) !important;
}


/* ═══════════════════════════════════════════════════
   EVENT PAGE VIEW — Full-width event detail page
   Replaces the cramped side panel with an open layout.
   ═══════════════════════════════════════════════════ */

.event-page-view {
  position: absolute;
  inset: 0;
  z-index: 200;
  display: flex;
  flex-direction: column;
  background: var(--landing-bg);
  color: var(--landing-text);
  overflow-y: auto;
  animation: eventPageFadeIn 250ms ease forwards;
}

.event-page-view[hidden] {
  display: none;
}

@keyframes eventPageFadeIn {
  from { opacity: 0; transform: translateX(40px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ── Event Page Topbar ── */

.event-page-topbar {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1.5rem;
  background: var(--landing-surface);
  border-bottom: 1px solid var(--landing-border);
  position: sticky;
  top: 0;
  z-index: 10;
  flex-shrink: 0;
}

.event-page-back {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.75rem;
  border: 1px solid var(--landing-border);
  border-radius: 6px;
  background: transparent;
  color: var(--landing-text-muted);
  font-size: 0.8125rem;
  font-family: var(--font-body);
  cursor: pointer;
  transition: all 160ms ease;
  white-space: nowrap;
}

.event-page-back:hover {
  background: var(--landing-surface-2);
  color: var(--landing-text);
  border-color: rgba(37, 99, 235, 0.25);
}

.event-page-breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  color: var(--landing-text-muted);
  overflow: hidden;
}

.event-page-bc-link {
  background: none;
  border: none;
  color: var(--landing-text-muted);
  font-family: var(--font-body);
  font-size: 0.75rem;
  cursor: pointer;
  padding: 0;
  white-space: nowrap;
}

.event-page-bc-link:hover {
  color: #2563eb;
  text-decoration: underline;
}

.event-page-bc-sep {
  color: var(--landing-text-muted);
  opacity: 0.4;
}

.event-page-bc-current {
  color: var(--landing-text);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 240px;
}

/* ── Event Page Body ── */

.event-page-body {
  flex: 1;
  padding: 2rem;
  max-width: 840px;
  width: 100%;
  margin: 0 auto;
}

/* ── Event Page: Hero image ── */

.ep-hero-image {
  width: 100%;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 1.5rem;
  position: relative;
  background: var(--landing-surface-2);
}

.ep-hero-image img {
  width: 100%;
  height: auto;
  max-height: 400px;
  object-fit: cover;
  object-position: center 20%;
  display: block;
}

.ep-hero-credit {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0.4rem 0.75rem;
  background: rgba(0,0,0,0.5);
  color: rgba(255,255,255,0.8);
  font-size: 0.65rem;
  font-family: var(--font-body);
}

/* ── Event Page: Header area ── */

.ep-header {
  margin-bottom: 1.75rem;
}

.ep-badges {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.ep-category-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.65rem;
  border: 1px solid var(--landing-border);
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 500;
  font-family: var(--font-body);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--landing-text-muted);
  background: var(--landing-surface-2);
}

.ep-category-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.ep-era-badge {
  font-size: 0.7rem;
  color: var(--landing-text-muted);
  opacity: 0.7;
}

.ep-date {
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  color: #2563eb;
  margin-bottom: 0.35rem;
}

.ep-title {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 600;
  line-height: 1.2;
  color: var(--landing-text);
  margin: 0 0 0.75rem;
}

.ep-description {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--landing-text);
  opacity: 0.88;
  margin: 0;
}

/* ── Event Page: Location ── */

.ep-location {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--landing-border);
  border-radius: 8px;
  background: var(--landing-surface-2);
  color: var(--landing-text-muted);
  font-size: 0.8rem;
  margin-top: 1rem;
}

/* ── Event Page: Content sections ── */

.ep-sections {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.ep-section {
  padding-top: 1.25rem;
  border-top: 1px solid var(--landing-border);
}

.ep-section-heading {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--landing-text-muted);
  margin: 0 0 0.75rem;
}

/* Facts */

.ep-facts {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.ep-facts li {
  position: relative;
  padding-left: 1.25rem;
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--landing-text);
}

.ep-facts li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #2563eb;
  opacity: 0.5;
}

/* Quote */

.ep-quote {
  border-left: 3px solid #2563eb;
  padding: 1rem 1.25rem;
  margin: 0;
  background: rgba(37, 99, 235, 0.04);
  border-radius: 0 8px 8px 0;
}

.ep-quote p {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-style: italic;
  line-height: 1.6;
  color: var(--landing-text);
  margin: 0 0 0.5rem;
}

.ep-quote footer {
  font-size: 0.8rem;
  color: var(--landing-text-muted);
}

/* Key Figures */

.ep-key-figures {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.ep-figure-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.75rem;
  border: 1px solid var(--landing-border);
  border-radius: 999px;
  background: var(--landing-surface-2);
  font-size: 0.8rem;
  color: var(--landing-text);
}

.ep-figure-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(37, 99, 235, 0.1);
  color: #2563eb;
  font-size: 0.55rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.ep-figure-avatar--img {
  background: transparent;
  padding: 0;
}

.ep-figure-avatar--img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  border-radius: 50%;
  display: block;
}

/* Significance */

.ep-significance {
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--landing-text);
  opacity: 0.88;
}

/* ── Event Page: Nearby Events ── */

.ep-nearby {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.75rem;
}

.ep-nearby-card {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--landing-border);
  border-radius: 8px;
  background: var(--landing-surface);
  cursor: pointer;
  transition: all 160ms ease;
}

.ep-nearby-card:hover {
  border-color: rgba(37, 99, 235, 0.3);
  background: var(--landing-surface-2);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.ep-nearby-year {
  font-size: 0.7rem;
  font-weight: 600;
  color: #2563eb;
  font-family: var(--font-body);
}

.ep-nearby-title {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--landing-text);
  line-height: 1.35;
}

.ep-nearby-category {
  font-size: 0.65rem;
  color: var(--landing-text-muted);
  opacity: 0.7;
}

/* ── Event Page: Navigation (prev/next) ── */

.ep-nav-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--landing-border);
}

.ep-nav-btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--landing-border);
  border-radius: 8px;
  background: transparent;
  color: var(--landing-text-muted);
  font-size: 0.8rem;
  font-family: var(--font-body);
  cursor: pointer;
  transition: all 160ms ease;
  max-width: 45%;
}

.ep-nav-btn:hover {
  background: var(--landing-surface-2);
  color: var(--landing-text);
  border-color: rgba(37, 99, 235, 0.25);
}

.ep-nav-btn--disabled {
  opacity: 0.3;
  pointer-events: none;
}

.ep-nav-direction {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  opacity: 0.7;
}

.ep-nav-title {
  font-weight: 500;
  color: var(--landing-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Event Page: Responsive ── */

@media (max-width: 768px) {
  .event-page-topbar {
    padding: 0.6rem 1rem;
    gap: 0.75rem;
  }

  .event-page-back span {
    display: none;
  }

  .event-page-back {
    padding: 0.4rem;
    min-width: 36px;
    justify-content: center;
  }

  .event-page-breadcrumb {
    font-size: 0.7rem;
  }

  .event-page-bc-current {
    max-width: 140px;
  }

  .event-page-body {
    padding: 1.25rem 1rem;
  }

  .ep-title {
    font-size: 1.35rem;
  }

  .ep-hero-image img {
    max-height: 250px;
  }

  .ep-nearby {
    grid-template-columns: 1fr;
  }

  .ep-nav-row {
    flex-direction: column;
    gap: 0.5rem;
  }

  .ep-nav-btn {
    max-width: 100%;
  }
}

/* ═══════════════════════════════════════════════
   PERSON PAGE VIEW — dedicated figure profile
   ═══════════════════════════════════════════════ */

.person-page-view {
  position: absolute;
  inset: 0;
  z-index: 210;
  display: flex;
  flex-direction: column;
  background: var(--landing-bg);
  color: var(--landing-text);
  overflow-y: auto;
  animation: personPageFadeIn 280ms ease forwards;
}

.person-page-view[hidden] {
  display: none;
}

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

/* Topbar reuses event-page-back / breadcrumb classes */
.person-page-topbar {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1.5rem;
  background: var(--landing-surface);
  border-bottom: 1px solid var(--landing-border);
  position: sticky;
  top: 0;
  z-index: 10;
  flex-shrink: 0;
}

/* Person page body */
.person-page-body {
  flex: 1;
  padding: 2.5rem 2rem 3rem;
  max-width: 840px;
  width: 100%;
  margin: 0 auto;
}

/* -- Person Header -- */
.pp-header {
  display: flex;
  gap: 1.75rem;
  align-items: flex-start;
  margin-bottom: 2rem;
}

.pp-portrait-frame {
  flex-shrink: 0;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--landing-surface-2);
  border: 3px solid var(--landing-border);
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

.pp-portrait-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  display: block;
}

.pp-portrait-initials {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 700;
  font-family: var(--font-body);
  color: #2563eb;
  background: rgba(37, 99, 235, 0.08);
}

.pp-header-info {
  flex: 1;
  min-width: 0;
}

.pp-name {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 600;
  line-height: 1.2;
  color: var(--landing-text);
  margin: 0 0 0.5rem;
}

.pp-era-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.6rem;
  border: 1px solid var(--landing-border);
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 500;
  font-family: var(--font-body);
  color: var(--landing-text-muted);
  background: var(--landing-surface-2);
  margin-bottom: 0;
}

.pp-era-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #2563eb;
  opacity: 0.6;
}

.pp-blurb {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--landing-text);
  opacity: 0.88;
  margin: 0;
}

/* -- Person sections (reuse event page pattern) -- */
.pp-sections {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.pp-section {
  padding-top: 1.25rem;
  border-top: 1px solid var(--landing-border);
}

.pp-section-heading {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--landing-text-muted);
  margin: 0 0 0.75rem;
}

/* -- Event cards in person page -- */
.pp-event-card {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.85rem 1.1rem;
  border: 1px solid var(--landing-border);
  border-radius: 10px;
  background: var(--landing-surface);
  cursor: pointer;
  transition: all 180ms ease;
  margin-bottom: 0.65rem;
}

.pp-event-card:hover,
.pp-event-card:focus-visible {
  border-color: rgba(37, 99, 235, 0.3);
  background: var(--landing-surface-2);
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
  outline: none;
}

.pp-event-card-top {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.pp-event-year {
  font-size: 0.7rem;
  font-weight: 600;
  color: #2563eb;
  font-family: var(--font-body);
  flex-shrink: 0;
}

.pp-event-category {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.6rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--landing-text-muted);
  opacity: 0.7;
}

.pp-event-cat-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  flex-shrink: 0;
}

.pp-event-title {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--landing-text);
  line-height: 1.35;
}

.pp-event-desc {
  font-size: 0.8rem;
  line-height: 1.55;
  color: var(--landing-text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.pp-event-role {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.7rem;
  color: var(--landing-text-muted);
  opacity: 0.75;
  margin-top: 0.15rem;
}

.pp-event-role svg {
  opacity: 0.5;
}

/* -- Timeline spine within person page -- */
.pp-timeline {
  position: relative;
  padding-left: 1.75rem;
}

.pp-timeline::before {
  content: '';
  position: absolute;
  left: 5px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--landing-border);
  border-radius: 1px;
}

.pp-timeline .pp-event-card {
  position: relative;
}

.pp-timeline .pp-event-card::before {
  content: '';
  position: absolute;
  left: -1.75rem;
  top: 1rem;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--landing-surface);
  border: 2px solid #2563eb;
  z-index: 1;
  margin-left: 1px;
}

/* -- Related figures grid -- */
.pp-related-figures {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.pp-related-figure {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.75rem 0.4rem 0.4rem;
  border: 1px solid var(--landing-border);
  border-radius: 999px;
  background: var(--landing-surface-2);
  font-size: 0.8rem;
  color: var(--landing-text);
  cursor: pointer;
  transition: all 160ms ease;
}

.pp-related-figure:hover,
.pp-related-figure:focus-visible {
  border-color: rgba(37, 99, 235, 0.3);
  background: var(--landing-surface);
  box-shadow: 0 1px 6px rgba(0,0,0,0.05);
  outline: none;
}

.pp-related-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.5rem;
  font-weight: 600;
  background: rgba(37, 99, 235, 0.08);
  color: #2563eb;
}

.pp-related-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  display: block;
}

/* -- Stats row in person header -- */
.pp-stats {
  display: flex;
  gap: 1.25rem;
  margin-top: 0.85rem;
}

.pp-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--landing-border);
  border-radius: 8px;
  background: var(--landing-surface-2);
  min-width: 80px;
}

.pp-stat-value {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--landing-text);
  font-family: var(--font-body);
}

.pp-stat-label {
  font-size: 0.6rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--landing-text-muted);
  opacity: 0.7;
}

/* -- Person page meta tags row (era + category tags) -- */
.pp-meta-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.5rem;
}

.pp-category-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.55rem;
  border: 1px solid var(--landing-border);
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 500;
  font-family: var(--font-body);
  color: var(--landing-text-muted);
  background: var(--landing-surface-2);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.pp-cat-tag-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* -- Active period line -- */
.pp-active-period {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: var(--landing-text-muted);
  margin-bottom: 0.5rem;
}

.pp-active-period svg {
  opacity: 0.5;
  flex-shrink: 0;
}

/* -- At a Glance grid -- */
.pp-glance-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.pp-glance-item {
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--landing-border);
  border-radius: 8px;
  background: var(--landing-surface);
}

.pp-glance-label {
  font-size: 0.6rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--landing-text-muted);
  opacity: 0.7;
  margin-bottom: 0.25rem;
}

.pp-glance-value {
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--landing-text);
}

/* -- Historical Significance section -- */
.pp-significance-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.pp-significance-item {
  padding: 0.75rem 1rem;
  border-left: 3px solid #2563eb;
  border-radius: 0 8px 8px 0;
  background: var(--landing-surface);
}

.pp-significance-event {
  font-size: 0.7rem;
  font-weight: 600;
  color: #2563eb;
  margin-bottom: 0.3rem;
}

.pp-significance-text {
  font-size: 0.85rem;
  line-height: 1.65;
  color: var(--landing-text);
  opacity: 0.9;
  margin: 0;
}

/* -- Key Facts list -- */
.pp-facts-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.pp-fact-item {
  font-size: 0.82rem;
  line-height: 1.55;
  color: var(--landing-text);
  opacity: 0.88;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--landing-border);
  border-radius: 8px;
  background: var(--landing-surface);
  position: relative;
  padding-left: 1.5rem;
}

.pp-fact-item::before {
  content: '';
  position: absolute;
  left: 0.6rem;
  top: 0.75rem;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #2563eb;
  opacity: 0.4;
}

/* -- Clickable figure chips on event page (make ep-figure-chip clickable) -- */
.ep-figure-chip--link {
  cursor: pointer;
  transition: all 160ms ease;
}

.ep-figure-chip--link:hover,
.ep-figure-chip--link:focus-visible {
  border-color: rgba(37, 99, 235, 0.3);
  background: var(--landing-surface);
  box-shadow: 0 1px 6px rgba(0,0,0,0.05);
  outline: none;
}

/* -- Responsive: Person Page -- */
@media (max-width: 768px) {
  .person-page-topbar {
    padding: 0.6rem 1rem;
    gap: 0.75rem;
  }

  .person-page-topbar .event-page-back span {
    display: none;
  }

  .person-page-topbar .event-page-back {
    padding: 0.4rem;
    min-width: 36px;
    justify-content: center;
  }

  .person-page-body {
    padding: 1.5rem 1rem 2rem;
  }

  .pp-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
  }

  .pp-portrait-frame {
    width: 100px;
    height: 100px;
  }

  .pp-name {
    font-size: 1.35rem;
  }

  .pp-stats {
    justify-content: center;
  }

  .pp-meta-tags {
    justify-content: center;
  }

  .pp-active-period {
    justify-content: center;
    width: 100%;
  }

  .pp-related-figures {
    justify-content: center;
  }

  .pp-glance-grid {
    grid-template-columns: 1fr;
  }

  .pp-facts-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .pp-portrait-frame {
    width: 80px;
    height: 80px;
  }

  .pp-name {
    font-size: 1.15rem;
  }

  .pp-stats {
    gap: 0.75rem;
  }

  .pp-stat {
    min-width: 64px;
    padding: 0.4rem 0.5rem;
  }
}

/* ═══════════════════════════════════════════════
   IMAGE LIGHTBOX — full-image viewer
   ═══════════════════════════════════════════════ */

.lightbox-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.92);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  opacity: 0;
  animation: lightbox-fade-in 0.25s ease forwards;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.lightbox-overlay[hidden] {
  display: none !important;
}

@keyframes lightbox-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 10001;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.85);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.lightbox-close:hover,
.lightbox-close:focus-visible {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  outline: none;
}

.lightbox-content {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 0;
  overflow: auto;
}

.lightbox-img {
  max-width: 100%;
  max-height: calc(100vh - 8rem);
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
  user-select: none;
  -webkit-user-drag: none;
}

.lightbox-credit {
  margin-top: 0.75rem;
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.7rem;
  font-family: var(--font-body);
  text-align: center;
  max-width: 600px;
}

/* Clickable hero image cursor hint */
.ep-hero-image--clickable {
  cursor: zoom-in;
  transition: opacity 0.2s ease;
}

.ep-hero-image--clickable:hover {
  opacity: 0.92;
}

.ep-hero-image--clickable::after {
  content: '';
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round'%3E%3Cpolyline points='15 3 21 3 21 9'/%3E%3Cpolyline points='9 21 3 21 3 15'/%3E%3Cline x1='21' y1='3' x2='14' y2='10'/%3E%3Cline x1='3' y1='21' x2='10' y2='14'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 16px;
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

.ep-hero-image--clickable:hover::after {
  opacity: 1;
}

/* Mobile lightbox adjustments */
@media (max-width: 640px) {
  .lightbox-overlay {
    padding: 1rem;
  }
  .lightbox-close {
    top: 0.5rem;
    right: 0.5rem;
    width: 40px;
    height: 40px;
  }
  .lightbox-img {
    max-height: calc(100vh - 6rem);
    border-radius: 4px;
  }
  .lightbox-credit {
    font-size: 0.6rem;
  }
}


/* ═══════════════════════════════════════════════════
   JOURNEY EXPLORER MODAL
   Clean, focused country chooser with continent tabs
   ═══════════════════════════════════════════════════ */

.journey-overlay[hidden] {
  display: none !important;
}

.journey-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  padding: 1.5rem;
  animation: journeyFadeIn 250ms ease;
}

@keyframes journeyFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes journeySlideUp {
  from { opacity: 0; transform: translateY(16px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.journey-panel {
  position: relative;
  background: #ffffff;
  border-radius: 16px;
  box-shadow:
    0 24px 80px rgba(0, 0, 0, 0.12),
    0 8px 24px rgba(0, 0, 0, 0.06),
    0 0 0 1px rgba(0, 0, 0, 0.04);
  width: 100%;
  max-width: 620px;
  max-height: calc(100vh - 3rem);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: journeySlideUp 300ms ease;
}

.journey-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #9ca3b4;
  cursor: pointer;
  transition: background 150ms, color 150ms;
}
.journey-close:hover {
  background: #f1f3f7;
  color: #5c6478;
}

.journey-header {
  padding: 28px 28px 0;
  text-align: center;
  flex-shrink: 0;
}

.journey-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: #eff6ff;
  color: #2563eb;
  margin-bottom: 14px;
}

.journey-title {
  font-family: var(--font-display, 'Zodiak', Georgia, serif);
  font-size: 1.3rem;
  font-weight: 600;
  color: #1a1f2e;
  margin: 0 0 6px;
  letter-spacing: -0.01em;
}

.journey-subtitle {
  font-family: var(--font-body, 'Satoshi', sans-serif);
  font-size: 0.82rem;
  color: #5c6478;
  line-height: 1.55;
  margin: 0;
  max-width: 42ch;
  margin-inline: auto;
}

/* Continent tabs */
.journey-continent-tabs {
  display: flex;
  gap: 4px;
  padding: 18px 28px 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  flex-shrink: 0;
}
.journey-continent-tabs::-webkit-scrollbar { display: none; }

.journey-tab {
  flex-shrink: 0;
  padding: 6px 14px;
  font-family: var(--font-body, 'Satoshi', sans-serif);
  font-size: 0.75rem;
  font-weight: 500;
  color: #5c6478;
  background: #f1f3f7;
  border: 1px solid transparent;
  border-radius: 20px;
  cursor: pointer;
  transition: all 150ms ease;
  white-space: nowrap;
  line-height: 1.4;
}
.journey-tab:hover {
  background: #e8ebf0;
  color: #1a1f2e;
}
.journey-tab[aria-selected="true"] {
  background: #2563eb;
  color: #ffffff;
  border-color: #2563eb;
}
.journey-tab-count {
  font-weight: 400;
  opacity: 0.7;
  margin-left: 3px;
}

/* Country list */
.journey-country-list {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px 8px;
  scrollbar-width: thin;
  scrollbar-color: #d4d9e2 transparent;
  min-height: 0;
}
.journey-country-list::-webkit-scrollbar {
  width: 5px;
}
.journey-country-list::-webkit-scrollbar-thumb {
  background: #d4d9e2;
  border-radius: 10px;
}

.journey-country-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 150ms;
  border: 1px solid transparent;
}
.journey-country-item:hover {
  background: #f8f9fb;
}
.journey-country-item--active {
  background: #eff6ff;
  border-color: #bfdbfe;
}
.journey-country-item--active:hover {
  background: #dbeafe;
}

.journey-country-flag {
  font-size: 1.5rem;
  line-height: 1;
  flex-shrink: 0;
  width: 36px;
  text-align: center;
}

.journey-country-info {
  flex: 1;
  min-width: 0;
}

.journey-country-name {
  font-family: var(--font-body, 'Satoshi', sans-serif);
  font-size: 0.85rem;
  font-weight: 600;
  color: #1a1f2e;
  line-height: 1.3;
}

.journey-country-sub {
  font-family: var(--font-body, 'Satoshi', sans-serif);
  font-size: 0.72rem;
  color: #5c6478;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Right-side action area */
.journey-country-action {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.journey-explore-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  font-family: var(--font-body, 'Satoshi', sans-serif);
  font-size: 0.7rem;
  font-weight: 600;
  color: #2563eb;
  background: #eff6ff;
  border-radius: 20px;
  transition: background 150ms, color 150ms;
  white-space: nowrap;
}
.journey-country-item--active:hover .journey-explore-badge {
  background: #2563eb;
  color: #ffffff;
}
.journey-explore-badge svg {
  flex-shrink: 0;
}

.journey-event-count {
  font-family: var(--font-body, 'Satoshi', sans-serif);
  font-size: 0.65rem;
  font-weight: 500;
  color: #9ca3b4;
  white-space: nowrap;
}

/* Coming soon state */
.journey-country-item--soon {
  opacity: 0.55;
  cursor: default;
}
.journey-country-item--soon:hover {
  background: transparent;
}
.journey-coming-label {
  font-family: var(--font-body, 'Satoshi', sans-serif);
  font-size: 0.65rem;
  font-weight: 500;
  color: #9ca3b4;
  font-style: italic;
}

/* Footer */
.journey-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px 18px;
  font-family: var(--font-body, 'Satoshi', sans-serif);
  font-size: 0.68rem;
  color: #9ca3b4;
  line-height: 1.5;
  border-top: 1px solid #e8ebf0;
  flex-shrink: 0;
}
.journey-footer svg {
  flex-shrink: 0;
  opacity: 0.6;
}

/* Section header inside list when showing all */
.journey-section-header {
  padding: 8px 12px 4px;
  font-family: var(--font-body, 'Satoshi', sans-serif);
  font-size: 0.65rem;
  font-weight: 600;
  color: #9ca3b4;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.journey-section-header:first-child {
  padding-top: 0;
}

/* Responsive */
@media (max-width: 640px) {
  .journey-panel {
    max-width: 100%;
    max-height: calc(100vh - 2rem);
    border-radius: 14px;
  }
  .journey-header {
    padding: 22px 20px 0;
  }
  .journey-title {
    font-size: 1.15rem;
  }
  .journey-continent-tabs {
    padding: 14px 20px 0;
  }
  .journey-country-list {
    padding: 12px 12px 8px;
  }
  .journey-footer {
    padding: 10px 20px 14px;
  }
}

/* ═══════════════════════════════════════════
   JOURNEY EXPLORER — People discovery additions
   ═══════════════════════════════════════════ */

/* Mode tabs (Countries / People) */
.journey-mode-tabs {
  display: flex;
  gap: 4px;
  padding: 16px 28px 0;
  flex-shrink: 0;
}

.journey-mode-tab {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  font-family: var(--font-body, 'Satoshi', sans-serif);
  font-size: 0.78rem;
  font-weight: 600;
  color: #5c6478;
  background: #f1f3f7;
  border: 1px solid transparent;
  border-radius: 10px;
  cursor: pointer;
  transition: all 180ms ease;
  white-space: nowrap;
  line-height: 1.4;
}
.journey-mode-tab:hover {
  background: #e8ebf0;
  color: #1a1f2e;
}
.journey-mode-tab[aria-selected="true"] {
  background: #2563eb;
  color: #ffffff;
  border-color: #2563eb;
}
.journey-mode-tab[aria-selected="true"] svg {
  opacity: 1;
}
.journey-mode-tab svg {
  opacity: 0.6;
  flex-shrink: 0;
}

/* Search bar */
.journey-search-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 12px 28px 0;
  padding: 8px 14px;
  background: #f8f9fb;
  border: 1px solid #e8ebf0;
  border-radius: 10px;
  flex-shrink: 0;
  transition: border-color 180ms;
}
.journey-search-bar:focus-within {
  border-color: #2563eb;
  background: #ffffff;
}
.journey-search-bar svg {
  flex-shrink: 0;
  color: #9ca3b4;
}
.journey-search-input {
  flex: 1;
  border: none;
  background: transparent;
  font-family: var(--font-body, 'Satoshi', sans-serif);
  font-size: 0.8rem;
  color: #1a1f2e;
  outline: none;
  min-width: 0;
}
.journey-search-input::placeholder {
  color: #9ca3b4;
}

/* Mode content containers */
.journey-mode-content {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}
.journey-mode-content[hidden] {
  display: none !important;
}

/* Alpha rail */
/* Country filter tabs inside People mode */
.journey-people-country-rail {
  display: flex;
  gap: 6px;
  padding: 10px 20px 4px;
  flex-wrap: wrap;
  flex-shrink: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.journey-people-country-rail::-webkit-scrollbar {
  display: none;
}
.journey-pcountry-btn {
  flex-shrink: 0;
  padding: 5px 12px;
  font-family: var(--font-body, 'Satoshi', sans-serif);
  font-size: 0.72rem;
  font-weight: 500;
  color: #5c6478;
  background: #f1f3f7;
  border: 1px solid transparent;
  border-radius: 18px;
  cursor: pointer;
  transition: all 150ms ease;
  white-space: nowrap;
  line-height: 1.4;
}
.journey-pcountry-btn:hover {
  background: #e8ebf0;
  color: #1a1f2e;
}
.journey-pcountry-btn--active {
  background: #2563eb;
  color: #ffffff;
  border-color: #2563eb;
}
.journey-pcountry-count {
  font-weight: 400;
  opacity: 0.7;
  margin-left: 3px;
}

.journey-people-alpha-rail {
  display: flex;
  gap: 2px;
  padding: 12px 20px 4px;
  flex-wrap: wrap;
  flex-shrink: 0;
  justify-content: center;
}

.journey-alpha-btn {
  min-width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body, 'Satoshi', sans-serif);
  font-size: 0.65rem;
  font-weight: 600;
  color: #5c6478;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  cursor: pointer;
  transition: all 150ms;
  padding: 0 2px;
}
.journey-alpha-btn:hover:not(:disabled) {
  background: #f1f3f7;
  color: #1a1f2e;
}
.journey-alpha-btn--active {
  background: #2563eb !important;
  color: #ffffff !important;
  border-color: #2563eb;
}
.journey-alpha-btn--empty {
  opacity: 0.3;
  cursor: default;
}

/* People list */
.journey-people-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px 20px 8px;
  scrollbar-width: thin;
  scrollbar-color: #d4d9e2 transparent;
}
.journey-people-list::-webkit-scrollbar {
  width: 5px;
}
.journey-people-list::-webkit-scrollbar-thumb {
  background: #d4d9e2;
  border-radius: 10px;
}

/* Person item */
.journey-person-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 150ms;
  border: 1px solid transparent;
}
.journey-person-item:hover {
  background: #eff6ff;
  border-color: #bfdbfe;
}

/* Person avatar */
.journey-person-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: #f1f3f7;
  display: flex;
  align-items: center;
  justify-content: center;
}
.journey-person-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
}
.journey-person-initials {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body, 'Satoshi', sans-serif);
  font-size: 0.6rem;
  font-weight: 700;
  color: #2563eb;
  background: rgba(37, 99, 235, 0.08);
}

/* Person info */
.journey-person-info {
  flex: 1;
  min-width: 0;
}
.journey-person-name {
  font-family: var(--font-body, 'Satoshi', sans-serif);
  font-size: 0.85rem;
  font-weight: 600;
  color: #1a1f2e;
  line-height: 1.3;
}
.journey-person-meta {
  font-family: var(--font-body, 'Satoshi', sans-serif);
  font-size: 0.7rem;
  color: #5c6478;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Person action (right side) */
.journey-person-action {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}
.journey-person-item:hover .journey-explore-badge {
  background: #2563eb;
  color: #ffffff;
}

/* Empty state */
.journey-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 40px 20px;
  text-align: center;
  color: #9ca3b4;
}
.journey-empty-state svg {
  opacity: 0.4;
}
.journey-empty-state p {
  font-family: var(--font-body, 'Satoshi', sans-serif);
  font-size: 0.82rem;
  margin: 0;
}

/* Responsive — people additions */
@media (max-width: 640px) {
  .journey-mode-tabs {
    padding: 12px 20px 0;
  }
  .journey-search-bar {
    margin: 10px 20px 0;
  }
  .journey-people-country-rail {
    padding: 8px 12px 2px;
    gap: 4px;
  }
  .journey-pcountry-btn {
    padding: 4px 10px;
    font-size: 0.68rem;
  }
  .journey-people-alpha-rail {
    padding: 8px 12px 2px;
    gap: 1px;
  }
  .journey-alpha-btn {
    min-width: 22px;
    height: 22px;
    font-size: 0.6rem;
  }
  .journey-people-list {
    padding: 6px 12px 8px;
  }
  .journey-person-avatar {
    width: 32px;
    height: 32px;
  }
  .journey-person-name {
    font-size: 0.8rem;
  }
  .journey-person-meta {
    font-size: 0.65rem;
  }
}

/* ═══════════════════════════════════════════════════
   ABOUT BUTTON IN HEADER
   ═══════════════════════════════════════════════════ */

.header-about-btn {
  appearance: none;
  background: transparent;
  border: 1px solid var(--landing-border);
  border-radius: var(--radius-full, 999px);
  padding: 5px 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--landing-text-muted);
  font-family: var(--font-body, 'Satoshi', sans-serif);
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.header-about-btn:hover {
  background: var(--landing-surface-2);
  border-color: var(--landing-border-glow);
  color: #2563eb;
}

.header-about-btn:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

/* Keep About button text-based on all sizes */
.header-about-icon {
  display: none;
}

@media (max-width: 768px) {
  .header-about-btn {
    padding: 6px 12px;
    border-radius: 999px;
    min-height: 34px;
    justify-content: center;
    font-size: 0.78rem;
  }
}

/* ═══════════════════════════════════════════════════
   ABOUT PAGE VIEW
   ═══════════════════════════════════════════════════ */

:root {
  --about-timeline-stroke: #2563eb;
  --about-timeline-dot: #2563eb;
}

.about-view {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: var(--landing-bg, #f8f9fb);
  overflow-y: auto;
  overflow-x: hidden;
}

/* Top bar */
.about-topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  padding: 12px 24px;
  background: rgba(248, 249, 251, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--landing-border);
}

.about-back {
  appearance: none;
  background: transparent;
  border: 1px solid var(--landing-border);
  border-radius: var(--radius-full, 999px);
  padding: 6px 16px 6px 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--landing-text-muted);
  font-family: var(--font-body, 'Satoshi', sans-serif);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.about-back:hover {
  background: var(--landing-surface);
  border-color: var(--landing-border-glow);
  color: var(--landing-text);
}

/* Content container */
.about-content {
  position: relative;
  z-index: 1;
  max-width: 680px;
  margin: 0 auto;
  padding: 40px 24px 60px;
}

/* Hero */
.about-hero {
  text-align: center;
  margin-bottom: 48px;
}

.about-logo {
  display: inline-block;
  color: #2563eb;
  margin-bottom: 16px;
}

.about-title {
  font-family: var(--font-display, 'Zodiak', serif);
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--landing-text);
  margin: 0 0 8px;
  letter-spacing: -0.02em;
}

.about-tagline {
  font-family: var(--font-body, 'Satoshi', sans-serif);
  font-size: 1rem;
  color: var(--landing-text-muted);
  margin: 0;
  line-height: 1.6;
}

/* Sections */
.about-section {
  margin-bottom: 36px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(37, 99, 235, 0.08);
  border-radius: 16px;
  padding: 22px 24px;
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(2px);
}

.about-section-title {
  font-family: var(--font-display, 'Zodiak', serif);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--landing-text);
  margin: 0 0 12px;
  letter-spacing: -0.01em;
}

.about-section-text {
  font-family: var(--font-body, 'Satoshi', sans-serif);
  font-size: 0.92rem;
  color: var(--landing-text-muted);
  line-height: 1.7;
  margin: 0 0 12px;
}

.about-section-text:last-child {
  margin-bottom: 0;
}

/* Founder signoff */
.about-section-signoff {
  font-weight: 600;
  color: var(--landing-text);
  font-style: italic;
  margin-top: 20px;
}

/* Founder section — slightly different feel */
.about-section--founder {
  background: var(--landing-surface);
  border: 1px solid var(--landing-border);
  border-radius: 12px;
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

/* Contact section */
.about-section--contact {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--landing-border);
}

/* Contact form */
.about-contact-form {
  margin-top: 20px;
}

.about-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.about-form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.about-form-row .about-form-field {
  margin-bottom: 0;
}

.about-form-field label {
  font-family: var(--font-body, 'Satoshi', sans-serif);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--landing-text);
  letter-spacing: 0.01em;
}

.about-form-field input,
.about-form-field textarea {
  font-family: var(--font-body, 'Satoshi', sans-serif);
  font-size: 0.88rem;
  padding: 10px 14px;
  border: 1px solid var(--landing-border);
  border-radius: 8px;
  background: var(--landing-surface);
  color: var(--landing-text);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  resize: vertical;
}

.about-form-field input::placeholder,
.about-form-field textarea::placeholder {
  color: var(--landing-text-faint);
}

.about-form-field input:focus,
.about-form-field textarea:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.about-form-submit {
  appearance: none;
  background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 11px 28px;
  font-family: var(--font-body, 'Satoshi', sans-serif);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: box-shadow 0.2s ease, transform 0.15s ease;
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.25);
}

.about-form-status {
  margin-top: 12px;
  font-family: var(--font-body, 'Satoshi', sans-serif);
  font-size: 0.82rem;
  color: var(--landing-text-muted);
}

.about-form-submit:hover {
  box-shadow: 0 6px 24px rgba(37, 99, 235, 0.35);
  transform: translateY(-1px);
}

.about-form-submit:active {
  transform: translateY(0);
}

.about-form-submit:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

.about-form-note {
  font-family: var(--font-body, 'Satoshi', sans-serif);
  font-size: 0.75rem;
  color: var(--landing-text-faint);
  margin: 14px 0 0;
}

.about-form-note strong {
  color: var(--landing-text-muted);
}

/* Footer */
.about-footer {
  margin-top: 48px;
  text-align: center;
  padding-bottom: 24px;
}

.about-footer-home {
  appearance: none;
  background: transparent;
  border: 1px solid var(--landing-border);
  border-radius: var(--radius-full, 999px);
  padding: 8px 20px 8px 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--landing-text-muted);
  font-family: var(--font-body, 'Satoshi', sans-serif);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.about-footer-home:hover {
  background: var(--landing-surface);
  border-color: #2563eb;
  color: #2563eb;
}

/* Mobile responsive */
@media (max-width: 600px) {
  .about-content {
    padding: 24px 16px 48px;
  }

  .about-title {
    font-size: 1.4rem;
  }

  .about-hero {
    margin-bottom: 32px;
  }

  .about-form-row {
    grid-template-columns: 1fr;
  }

  .about-topbar {
    padding: 10px 16px;
  }

  .about-section--founder {
    padding: 18px;
  }

  .about-logo {
    width: 48px;
    height: 48px;
  }
}

/* Fade-in animation */
.about-view:not([hidden]) {
  animation: aboutFadeIn 0.3s ease-out;
}

@keyframes aboutFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ═══════════════════════════════════════════════
   LANDING FOOTER LINKS
   ═══════════════════════════════════════════════ */

.landing-footer-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
  padding-top: 4px;
}

.landing-footer-link {
  appearance: none;
  background: transparent;
  border: none;
  padding: 0;
  font-family: var(--font-body, 'Satoshi', sans-serif);
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--landing-text-faint);
  cursor: pointer;
  transition: color 0.2s ease;
  text-decoration: none;
}

.landing-footer-link:hover {
  color: var(--landing-text-muted);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.landing-footer-sep {
  color: var(--landing-text-faint);
  font-size: 0.72rem;
  opacity: 0.5;
  user-select: none;
}

/* ═══════════════════════════════════════════════
   TERMS & CONDITIONS PAGE
   ═══════════════════════════════════════════════ */

.terms-view {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: var(--landing-bg, #f8f9fb);
  overflow-y: auto;
  overflow-x: hidden;
}

.terms-view:not([hidden]) {
  animation: termsFadeIn 0.3s ease-out;
}

@keyframes termsFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Top bar */
.terms-topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  padding: 12px 24px;
  background: rgba(248, 249, 251, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--landing-border);
}

.terms-back {
  appearance: none;
  background: transparent;
  border: 1px solid var(--landing-border);
  border-radius: var(--radius-full, 999px);
  padding: 6px 16px 6px 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--landing-text-muted);
  font-family: var(--font-body, 'Satoshi', sans-serif);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.terms-back:hover {
  background: var(--landing-surface);
  border-color: var(--landing-border-glow);
  color: var(--landing-text);
}

/* Content container */
.terms-content {
  position: relative;
  z-index: 1;
  max-width: 680px;
  margin: 0 auto;
  padding: 40px 24px 60px;
}

/* Hero */
.terms-hero {
  text-align: center;
  margin-bottom: 40px;
}

.terms-icon {
  display: inline-block;
  color: #2563eb;
  margin-bottom: 16px;
  opacity: 0.8;
}

.terms-title {
  font-family: var(--font-display, 'Zodiak', serif);
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--landing-text);
  margin: 0 0 8px;
  letter-spacing: -0.02em;
}

.terms-tagline {
  font-family: var(--font-body, 'Satoshi', sans-serif);
  font-size: 0.85rem;
  color: var(--landing-text-faint);
  margin: 0;
  line-height: 1.6;
}

/* Sections */
.terms-section {
  margin-bottom: 24px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(37, 99, 235, 0.08);
  border-radius: 16px;
  padding: 20px 24px;
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(2px);
}

.terms-section-title {
  font-family: var(--font-display, 'Zodiak', serif);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--landing-text);
  margin: 0 0 10px;
  letter-spacing: -0.01em;
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.terms-section-number {
  color: #2563eb;
  font-size: 0.95rem;
  font-weight: 700;
  opacity: 0.7;
  font-family: var(--font-body, 'Satoshi', sans-serif);
}

.terms-section-text {
  font-family: var(--font-body, 'Satoshi', sans-serif);
  font-size: 0.88rem;
  color: var(--landing-text-muted);
  line-height: 1.72;
  margin: 0 0 10px;
}

.terms-section-text:last-child {
  margin-bottom: 0;
}

/* Contact section — subtle border-top treatment */
.terms-section--contact {
  margin-top: 8px;
}

/* Inline link button (used for "contact form on our About page") */
.terms-inline-link {
  appearance: none;
  background: transparent;
  border: none;
  padding: 0;
  font-family: inherit;
  font-size: inherit;
  color: #2563eb;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
  font-weight: 500;
  transition: color 0.15s ease;
}

.terms-inline-link:hover {
  color: #1d4ed8;
}

/* Footer */
.terms-footer {
  margin-top: 48px;
  text-align: center;
  padding-bottom: 24px;
}

.terms-footer-home {
  appearance: none;
  background: transparent;
  border: 1px solid var(--landing-border);
  border-radius: var(--radius-full, 999px);
  padding: 8px 20px 8px 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--landing-text-muted);
  font-family: var(--font-body, 'Satoshi', sans-serif);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.terms-footer-home:hover {
  background: var(--landing-surface);
  border-color: #2563eb;
  color: #2563eb;
}

/* Mobile responsive */
@media (max-width: 600px) {
  .terms-content {
    padding: 24px 16px 48px;
  }

  .terms-title {
    font-size: 1.4rem;
  }

  .terms-hero {
    margin-bottom: 28px;
  }

  .terms-topbar {
    padding: 10px 16px;
  }

  .terms-section {
    padding: 16px 18px;
  }

  .terms-icon {
    width: 36px;
    height: 36px;
  }
}

/* Spotlight multi-country divider */
.spotlight-country-divider {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-border);
}
.figure-country-flag {
  font-size: 0.75rem;
  margin-right: 0.15rem;
}
.panel-event-country-flag {
  font-size: 0.85rem;
  margin-left: 0.35rem;
}


/* ═══════════════════════════════════════════════════
   CROSS-COUNTRY EXPLORE RESULTS VIEW
   Shows matching events across all countries.
   ═══════════════════════════════════════════════════ */

.explore-results-view {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  flex-direction: column;
  background: var(--landing-bg);
  color: var(--landing-text);
  overflow-y: auto;
  animation: eventPageFadeIn 250ms ease forwards;
}

.explore-results-view[hidden] {
  display: none;
}

.explore-results-topbar {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1.5rem;
  background: var(--landing-surface, rgba(12, 14, 20, 0.95));
  border-bottom: 1px solid var(--landing-border);
  position: sticky;
  top: 0;
  z-index: 10;
  flex-shrink: 0;
  backdrop-filter: blur(12px);
}

.explore-results-body {
  flex: 1;
  overflow-y: auto;
}

/* ── Container ── */
.xr-container {
  max-width: 960px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

/* ── Header ── */
.xr-header {
  margin-bottom: 2.5rem;
}

.xr-header-top {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

.xr-header-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  font-family: var(--font-body);
  border: 1px solid;
  border-radius: var(--radius-full, 9999px);
  letter-spacing: 0.03em;
}

.xr-header-badge svg {
  display: inline;
  vertical-align: -2px;
}

.xr-header-badge--era {
  color: var(--landing-text-muted);
  border-color: var(--landing-border);
}

.xr-title {
  font-family: var(--font-display, 'Zodiak', serif);
  font-size: clamp(1.5rem, 1.2rem + 1.25vw, 2.25rem);
  font-weight: 600;
  line-height: 1.2;
  color: var(--landing-text);
  margin-bottom: 0.5rem;
}

.xr-subtitle {
  font-size: 0.875rem;
  color: var(--landing-text-muted);
  line-height: 1.6;
  max-width: 56ch;
}

/* ── Filter Chips ── */
/* ── Stepped Filter Layout ── */
.xr-filter-stepped {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.xr-filter-row {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.xr-filter-label {
  flex-shrink: 0;
  font-size: 0.6875rem;
  font-weight: 600;
  font-family: var(--font-body);
  color: var(--landing-text-faint);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  min-width: 4.5rem;
  padding-top: 0.35rem;
  user-select: none;
}

.xr-filter-row-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.xr-filter-reset {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.7rem;
  font-size: 0.6875rem;
  font-weight: 500;
  font-family: var(--font-body);
  color: var(--landing-text-faint);
  background: transparent;
  border: 1px dashed var(--landing-border);
  border-radius: 9999px;
  cursor: pointer;
  transition: color 180ms ease, border-color 180ms ease, background 180ms ease;
  align-self: flex-start;
}

.xr-filter-reset:hover {
  color: #dc2626;
  border-color: #dc2626;
  background: rgba(220, 38, 38, 0.04);
}

/* Legacy single-row fallback */
.xr-filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 1.25rem;
}

.xr-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.3rem 0.75rem;
  font-size: 0.6875rem;
  font-weight: 600;
  font-family: var(--font-body);
  color: var(--landing-text-muted);
  background: var(--landing-surface-2);
  border: 1px solid var(--landing-border);
  border-radius: 9999px;
  cursor: pointer;
  transition: border-color 180ms ease, background 180ms ease, color 180ms ease;
  white-space: nowrap;
}

.xr-chip:hover {
  border-color: #2563eb;
  color: var(--landing-text);
  background: rgba(37, 99, 235, 0.05);
}

.xr-chip--active {
  background: #2563eb;
  color: #ffffff;
  border-color: #2563eb;
}

.xr-chip--active:hover {
  background: #3b82f6;
  border-color: #3b82f6;
  color: #ffffff;
}

.xr-chip-count {
  opacity: 0.65;
  font-weight: 500;
  margin-left: 0.15rem;
}

.xr-chip-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Mobile: stack label above chips */
@media (max-width: 640px) {
  .xr-filter-row {
    flex-direction: column;
    gap: 0.35rem;
  }
  .xr-filter-label {
    min-width: unset;
    padding-top: 0;
  }
}

/* ── Era Sections ── */
.xr-era-section {
  margin-bottom: 2.5rem;
}

.xr-era-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--landing-border);
  margin-bottom: 1.25rem;
}

.xr-era-title {
  font-family: var(--font-display, 'Zodiak', serif);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--landing-text);
}

.xr-era-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.xr-era-count {
  font-size: 0.75rem;
  color: var(--landing-text-muted);
  font-weight: 500;
}

.xr-era-flags {
  font-size: 0.875rem;
  letter-spacing: 0.1em;
}

/* ── Event Grid ── */
.xr-events-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

/* ── Event Card ── */
.xr-event-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--landing-border);
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.xr-event-card:hover {
  border-color: rgba(88, 196, 255, 0.3);
  background: rgba(255, 255, 255, 0.05);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.xr-event-card:focus-visible {
  outline: 2px solid var(--landing-accent);
  outline-offset: 2px;
}

.xr-card-image {
  width: 100%;
  height: 140px;
  overflow: hidden;
  position: relative;
}

.xr-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 300ms ease;
}

.xr-event-card:hover .xr-card-image img {
  transform: scale(1.03);
}

.xr-card-body {
  padding: 0.875rem 1rem;
}

.xr-card-top-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.5rem;
}

.xr-card-flag {
  font-size: 0.875rem;
}

.xr-card-country {
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--landing-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.xr-card-year {
  margin-left: auto;
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--landing-accent);
  font-variant-numeric: tabular-nums;
}

.xr-card-title {
  font-family: var(--font-display, 'Zodiak', serif);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--landing-text);
  margin-bottom: 0.4rem;
}

.xr-card-desc {
  font-size: 0.75rem;
  line-height: 1.5;
  color: var(--landing-text-muted);
  margin-bottom: 0.75rem;
}

.xr-card-footer {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.xr-card-cat {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.6875rem;
  font-weight: 600;
}

.xr-card-cat-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  flex-shrink: 0;
}

.xr-card-figures {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin-left: auto;
}

.xr-card-figure-link {
  font-size: 0.6875rem;
  color: var(--landing-accent-dim, #2a80c0);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  font-family: var(--font-body);
  text-decoration: underline;
  text-decoration-color: transparent;
  transition: color 160ms ease, text-decoration-color 160ms ease;
}

.xr-card-figure-link:hover {
  color: var(--landing-accent);
  text-decoration-color: var(--landing-accent);
}

.xr-card-more {
  font-size: 0.625rem;
  color: var(--landing-text-faint);
  font-weight: 500;
}

/* ── Empty state ── */
.xr-empty {
  text-align: center;
  padding: 4rem 1rem;
  color: var(--landing-text-muted);
  font-size: 0.875rem;
}

/* ═══════════════════════════════════════════════
   EXPLORE RESULTS — MOBILE RESPONSIVE
   ═══════════════════════════════════════════════ */

@media (max-width: 640px) {
  .xr-container {
    padding: 1.25rem 1rem 3rem;
  }

  .xr-title {
    font-size: 1.25rem;
  }

  .xr-events-grid {
    grid-template-columns: 1fr;
  }

  .xr-era-header {
    flex-direction: column;
    gap: 0.4rem;
  }

  .explore-results-topbar {
    padding: 0.6rem 1rem;
  }
}
