/* ============================================================
   The Omni Ledger — UFO/UAP Research Database
   Premium Stylesheet
   ============================================================
   Design: Declassified government files × modern SaaS
   ============================================================ */

/* ── Google Fonts ─────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=JetBrains+Mono:wght@400;500&family=Space+Grotesk:wght@500;600;700&display=swap');

/* ── CSS Custom Properties ────────────────────────────────── */
:root {
  /* Backgrounds */
  --bg-primary:     #0b0e17;
  --bg-secondary:   #141824;
  --bg-card:        #1a1f2e;
  --bg-card-hover:  #1f2537;
  --bg-elevated:    #232a3b;

  /* Accents */
  --accent-green:   #4ade80;
  --accent-green-dim: rgba(74, 222, 128, 0.15);
  --accent-green-glow: rgba(74, 222, 128, 0.25);
  --accent-amber:   #f59e0b;
  --accent-amber-dim: rgba(245, 158, 11, 0.15);
  --accent-red:     #ef4444;
  --accent-red-dim: rgba(239, 68, 68, 0.15);

  /* Text */
  --text-primary:   #e2e8f0;
  --text-secondary: #94a3b8;
  --text-muted:     #64748b;

  /* Borders */
  --border:         #1e293b;
  --border-light:   #334155;

  /* Fonts */
  --font-heading:   'Space Grotesk', sans-serif;
  --font-body:      'Inter', sans-serif;
  --font-mono:      'JetBrains Mono', monospace;

  /* Spacing scale */
  --space-xs:  0.25rem;   /*  4px */
  --space-sm:  0.5rem;    /*  8px */
  --space-md:  1rem;      /* 16px */
  --space-lg:  1.5rem;    /* 24px */
  --space-xl:  2rem;      /* 32px */
  --space-2xl: 3rem;      /* 48px */
  --space-3xl: 4rem;      /* 64px */
  --space-4xl: 6rem;      /* 96px */

  /* Radius */
  --radius-sm:  4px;
  --radius-md:  8px;
  --radius-lg:  12px;
  --radius-xl:  16px;
  --radius-full: 9999px;

  /* Transitions */
  --ease-out:  cubic-bezier(0.16, 1, 0.3, 1);
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
  --duration-fast: 150ms;
  --duration-base: 250ms;
  --duration-slow: 400ms;

  /* Layout */
  --header-height: 72px;
  --container-max: 1200px;
  --container-narrow: 720px;
}


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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.7;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  overflow-x: hidden;
  min-height: 100vh;
}

img, video, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: var(--accent-green);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-smooth);
}

a:hover {
  color: #86efac; /* lighter green */
}

ul, ol { list-style: none; }

button, input, textarea, select {
  font: inherit;
  color: inherit;
  border: none;
  background: none;
  outline: none;
}

button { cursor: pointer; }


/* ── Selection ────────────────────────────────────────────── */
::selection {
  background: var(--accent-green);
  color: var(--bg-primary);
}

::-moz-selection {
  background: var(--accent-green);
  color: var(--bg-primary);
}


/* ── Custom Scrollbar ─────────────────────────────────────── */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: var(--border-light);
  border-radius: var(--radius-full);
  transition: background var(--duration-fast);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-green);
}

/* Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--border-light) var(--bg-primary);
}


/* ── Typography ───────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.75rem); }
h4 { font-size: 1.25rem; }

p {
  color: var(--text-secondary);
  max-width: 72ch;
}

p + p {
  margin-top: var(--space-md);
}

strong { color: var(--text-primary); }

small {
  font-size: 0.8125rem;
  color: var(--text-muted);
}


/* ── Utility Classes ──────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.container--narrow {
  max-width: var(--container-narrow);
}

.text-green  { color: var(--accent-green) !important; }
.text-amber  { color: var(--accent-amber) !important; }
.text-red    { color: var(--accent-red)   !important; }
.text-muted  { color: var(--text-muted)   !important; }

.monospace {
  font-family: var(--font-mono);
  font-size: 0.875em;
  letter-spacing: 0.04em;
}

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


/* ── Section Labels ───────────────────────────────────────── */
.section-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-green);
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-sm);
}

.section-label::before {
  content: '';
  display: inline-block;
  width: 12px;
  height: 1px;
  background: var(--accent-green);
}

.section-header {
  margin-bottom: var(--space-2xl);
}

.section-header h2 {
  margin-top: var(--space-xs);
}

.section-header p {
  margin-top: var(--space-md);
}


/* ── Scanlines Effect ─────────────────────────────────────── */
.scanlines {
  position: relative;
}

.scanlines::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(74, 222, 128, 0.03) 2px,
    rgba(74, 222, 128, 0.03) 4px
  );
  pointer-events: none;
  z-index: 1;
}


/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  /* Must clear Leaflet's own control corners (z-index:1000) — the header
     creates its own stacking context, so raising the nested .main-nav's
     z-index alone (see below) can't lift it past this ceiling; the header
     itself has to sit above them on the map page. */
  z-index: 1500;
  transition: background-color var(--duration-base) var(--ease-smooth),
              border-color var(--duration-base) var(--ease-smooth),
              backdrop-filter var(--duration-base) var(--ease-smooth);
  border-bottom: 1px solid transparent;
}

.site-header.scrolled {
  background-color: rgba(11, 14, 23, 0.92);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom-color: var(--border);
}

/* backdrop-filter makes .site-header a new containing block for its
   position:fixed descendants (.main-nav included) per spec — so
   opening the mobile menu after scrolling past the "scrolled"
   threshold made the nav panel's top/bottom:0 resolve against the
   ~64px header box instead of the viewport, squashing it. Dropping
   backdrop-filter for as long as the menu is open (js/main.js toggles
   .nav-open) removes that containing block regardless of scroll
   position; the header's opaque background-color still applies. */
.site-header.nav-open {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 1.125rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-primary);
  text-decoration: none;
  flex-shrink: 0;
}

.logo:hover {
  color: var(--text-primary);
}

.logo-icon {
  width: 32px;
  height: 32px;
  border: 2px solid var(--accent-green);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: var(--accent-green);
  position: relative;
}

.logo-icon::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: var(--radius-sm);
  box-shadow: 0 0 12px var(--accent-green-dim);
}

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

.logo-img {
  height: 55px;
  width: auto;
  display: block;
  object-fit: contain;
  transition: opacity var(--duration-fast) var(--ease-smooth);
}

.logo-img:hover {
  opacity: 0.85;
}

/* Nav */
.main-nav {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: clamp(0.85rem, 1.4vw, var(--space-xl));
}

.main-nav a {
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  letter-spacing: 0.02em;
  padding: var(--space-xs) 0;
  position: relative;
  white-space: nowrap;
  transition: color var(--duration-fast) var(--ease-smooth);
}

.main-nav a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent-green);
  transition: width var(--duration-base) var(--ease-out);
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--text-primary);
}

.main-nav a:hover::after,
.main-nav a.active::after {
  width: 100%;
}

/* Nav dropdown (Craft Types under Sightings DB, Witnesses under Key Figures) */
.nav-item-dropdown {
  position: relative;
  display: flex;
  align-items: center;
}

.nav-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 0.6rem;
  background: var(--bg-card, #1a1f2e);
  border: 1px solid var(--border, rgba(255, 255, 255, 0.08));
  border-radius: 8px;
  padding: 0.35rem;
  min-width: 150px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity var(--duration-fast, 0.18s) var(--ease-smooth, ease),
    transform var(--duration-fast, 0.18s) var(--ease-smooth, ease),
    visibility var(--duration-fast, 0.18s);
  z-index: 200;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.nav-item-dropdown:hover .nav-dropdown-menu,
.nav-item-dropdown:focus-within .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-dropdown-menu a {
  display: block;
  padding: 0.45rem 0.7rem;
  font-size: 0.82rem;
  border-radius: 5px;
  white-space: nowrap;
}

.nav-dropdown-menu a:hover {
  background: rgba(255, 255, 255, 0.06);
}

/* Header actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  flex-shrink: 0;
}

.btn-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  transition: all var(--duration-fast) var(--ease-smooth);
}

.btn-icon:hover {
  background: var(--bg-card);
  color: var(--text-primary);
}

.btn-icon svg {
  width: 20px;
  height: 20px;
}

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  width: 40px;
  height: 40px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border-radius: var(--radius-md);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text-secondary);
  border-radius: 1px;
  transition: all var(--duration-base) var(--ease-out);
}

.menu-toggle.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.menu-toggle.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}


/* ============================================================
   SEARCH OVERLAY
   ============================================================ */
.search-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(11, 14, 23, 0.9);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 20vh;
  opacity: 0;
  visibility: hidden;
  transition: all var(--duration-base) var(--ease-smooth);
}

.search-overlay.active {
  opacity: 1;
  visibility: visible;
}

.search-overlay-content {
  width: 100%;
  max-width: 640px;
  padding: 0 var(--space-lg);
  transform: translateY(-20px);
  transition: transform var(--duration-slow) var(--ease-out);
  position: relative;
}

.search-overlay.active .search-overlay-content {
  transform: translateY(0);
}

.search-close {
  position: absolute;
  top: -48px;
  right: var(--space-lg);
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-sm);
  transition: color var(--duration-fast);
}

.search-close:hover {
  color: var(--text-primary);
}

.search-input-wrapper {
  position: relative;
}

.search-input-wrapper svg {
  position: absolute;
  left: var(--space-lg);
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  color: var(--text-muted);
  pointer-events: none;
}

.search-input {
  width: 100%;
  height: 64px;
  padding: 0 var(--space-xl);
  padding-left: 60px;
  font-size: 1.125rem;
  font-family: var(--font-mono);
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  color: var(--text-primary);
  transition: border-color var(--duration-fast);
}

.search-input::placeholder {
  color: var(--text-muted);
}

.search-input:focus {
  border-color: var(--accent-green);
  box-shadow: 0 0 0 4px var(--accent-green-dim);
}

.search-hints {
  margin-top: var(--space-md);
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.search-hint-label {
  margin-right: var(--space-sm);
}

.search-hint {
  display: inline-block;
  padding: 2px 10px;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin: 2px;
  color: var(--text-secondary);
  transition: border-color var(--duration-fast), color var(--duration-fast);
}

.search-hint:hover {
  border-color: var(--accent-green);
  color: var(--accent-green);
}

/* Live results — populated by js/main.js as the user types. Explicit
   text-align/alignment on every level: this gets mounted into both the
   header overlay (left-aligned by default) and the homepage hero card
   (center-aligned by default), and needs to look identical in both. */
.search-results {
  margin-top: var(--space-md);
  max-height: 50vh;
  overflow-y: auto;
  border-radius: var(--radius-lg);
  text-align: left;
}

.search-result {
  display: flex;
  align-items: baseline;
  justify-content: flex-start;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius-md);
  text-decoration: none;
  text-align: left;
  transition: background var(--duration-fast);
}

.search-result:hover,
.search-result.is-active {
  background: var(--bg-card);
}

.search-result-type {
  flex: 0 0 auto;
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  color: var(--accent-green);
  background: var(--accent-green-dim);
  white-space: nowrap;
}

.search-result-type.type-figure { color: #60a5fa; background: rgba(96,165,250,0.12); }
.search-result-type.type-location { color: #c084fc; background: rgba(192,132,252,0.12); }
.search-result-type.type-theory { color: #f59e0b; background: rgba(245,158,11,0.12); }
.search-result-type.type-ancient { color: #f472b6; background: rgba(244,114,182,0.12); }
.search-result-type.type-craft { color: #34d399; background: rgba(52,211,153,0.12); }

.search-result-body {
  flex: 1 1 auto;
  min-width: 0;
}

.search-result-title {
  color: var(--text-primary);
  font-size: 0.9375rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-result-meta {
  color: var(--text-muted);
  font-size: 0.75rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-no-results,
.search-loading {
  margin-top: var(--space-md);
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--text-muted);
  padding: var(--space-lg);
}


/* ============================================================
   HERO SECTION
   ============================================================ */
.hero-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: var(--bg-primary);
  overflow: hidden;
  padding-top: var(--header-height, 72px);
  box-sizing: border-box;
}

/* Gradient overlay */
.hero-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(74, 222, 128, 0.08), transparent 60%),
    radial-gradient(ellipse 60% 40% at 50% 110%, rgba(74, 222, 128, 0.04), transparent 50%);
  z-index: 1;
}

/* Radar sweep */
.hero-radar {
  position: absolute;
  width: 600px;
  height: 600px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  opacity: 0.06;
  z-index: 0;
}

.hero-radar::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid var(--accent-green);
}

.hero-radar::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(
    from 0deg,
    transparent 0deg,
    transparent 340deg,
    rgba(74, 222, 128, 0.3) 355deg,
    transparent 360deg
  );
  animation: radar-sweep 6s linear infinite;
}

@keyframes radar-sweep {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* Radar rings */
.hero-radar-ring {
  position: absolute;
  border: 1px solid rgba(74, 222, 128, 0.15);
  border-radius: 50%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.hero-radar-ring:nth-child(1) { width: 200px; height: 200px; }
.hero-radar-ring:nth-child(2) { width: 400px; height: 400px; }
.hero-radar-ring:nth-child(3) { width: 600px; height: 600px; }

/* Grid lines behind hero */
.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(74, 222, 128, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(74, 222, 128, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  z-index: 0;
}

/* Hero content */
.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  padding: 0 var(--space-lg);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-green);
  background: var(--accent-green-dim);
  padding: var(--space-xs) var(--space-md);
  border-radius: var(--radius-full);
  border: 1px solid rgba(74, 222, 128, 0.2);
  margin-bottom: var(--space-xl);
}

.hero-badge .pulse-dot {
  width: 6px;
  height: 6px;
  background: var(--accent-green);
  border-radius: 50%;
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.8); }
}

.hero-title {
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 7vw, 5rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: var(--space-lg);
}

.hero-title .accent {
  color: var(--accent-green);
  position: relative;
}

.hero-title .mono-accent {
  font-family: var(--font-mono);
  font-size: 0.5em;
  color: var(--accent-green);
  display: block;
  letter-spacing: 0.15em;
  margin-bottom: var(--space-sm);
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto var(--space-2xl);
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  flex-wrap: wrap;
}


/* ── Buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9375rem;
  padding: 12px 28px;
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: all var(--duration-base) var(--ease-out);
  white-space: nowrap;
  cursor: pointer;
}

.btn svg {
  width: 18px;
  height: 18px;
}

.btn-primary {
  background: var(--accent-green);
  color: var(--bg-primary);
  box-shadow: 0 0 20px var(--accent-green-dim);
}

.btn-primary:hover {
  background: #86efac;
  color: var(--bg-primary);
  box-shadow: 0 0 30px var(--accent-green-glow);
  transform: translateY(-1px);
}

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-light);
}

.btn-secondary:hover {
  border-color: var(--accent-green);
  color: var(--accent-green);
  background: var(--accent-green-dim);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  padding: 8px 16px;
}

.btn-ghost:hover {
  color: var(--accent-green);
}

.btn-sm {
  font-size: 0.8125rem;
  padding: 8px 16px;
}


/* ============================================================
   NAVIGATION CATEGORIES (Filter Pills)
   ============================================================ */
.nav-categories {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  overflow-x: auto;
  padding-bottom: var(--space-sm);
  margin-bottom: var(--space-2xl);
  -webkit-overflow-scrolling: touch;
}

.nav-categories::-webkit-scrollbar {
  height: 0;
}

.nav-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  white-space: nowrap;
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-smooth);
  text-decoration: none;
}

.nav-pill:hover {
  border-color: var(--border-light);
  color: var(--text-primary);
  background: var(--bg-card);
}

.nav-pill.active {
  background: var(--accent-green-dim);
  border-color: rgba(74, 222, 128, 0.3);
  color: var(--accent-green);
}

.nav-pill .pill-count {
  font-size: 0.625rem;
  background: var(--bg-elevated);
  padding: 1px 6px;
  border-radius: var(--radius-full);
  color: var(--text-muted);
}

.nav-pill.active .pill-count {
  background: rgba(74, 222, 128, 0.2);
  color: var(--accent-green);
}


/* ============================================================
   CASE FILE CARDS
   ============================================================ */
.cases-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: var(--space-lg);
}

.case-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent-green);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  transition: all var(--duration-base) var(--ease-out);
  cursor: pointer;
  overflow: hidden;
}

.case-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-light);
  transform: translateY(-4px);
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.3),
    0 0 0 1px var(--border-light),
    0 0 30px var(--accent-green-dim);
  color: inherit;
}

.case-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-md);
}

.case-card-id {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--accent-green);
  text-transform: uppercase;
}

.case-card-title {
  font-family: var(--font-heading);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
  margin-top: var(--space-xs);
}

.case-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm) var(--space-md);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.case-card-meta span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.case-card-meta svg {
  width: 14px;
  height: 14px;
  opacity: 0.6;
}

.case-card-desc {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.case-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: var(--space-md);
  border-top: 1px solid var(--border);
}

/* Craft type badge */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid;
}

.badge-craft {
  color: var(--accent-amber);
  background: var(--accent-amber-dim);
  border-color: rgba(245, 158, 11, 0.2);
}

.badge-witness {
  color: var(--accent-green);
  background: var(--accent-green-dim);
  border-color: rgba(74, 222, 128, 0.2);
}

.badge-radar {
  color: #818cf8;
  background: rgba(129, 140, 248, 0.15);
  border-color: rgba(129, 140, 248, 0.2);
}


/* ── Credibility Meter ────────────────────────────────────── */
.credibility {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.credibility-label {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.credibility-dots {
  display: flex;
  gap: 3px;
}

.credibility-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--border);
  transition: background var(--duration-fast);
}

.credibility-dot.filled {
  background: var(--accent-green);
  box-shadow: 0 0 6px var(--accent-green-dim);
}

/* Bar variant */
.credibility-bar {
  position: relative;
  width: 80px;
  height: 4px;
  background: var(--border);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.credibility-bar-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, var(--accent-green), #22c55e);
  box-shadow: 0 0 8px var(--accent-green-dim);
  transition: width var(--duration-slow) var(--ease-out);
}

.credibility-value {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--accent-green);
}


/* ============================================================
   STAMPS / LABELS
   ============================================================ */
.stamp {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 3px 10px;
  border: 2px solid;
  border-radius: 2px;
  transform: rotate(-2deg);
  opacity: 0.9;
  user-select: none;
  white-space: nowrap;
}

.stamp-classified {
  color: var(--accent-red);
  border-color: var(--accent-red);
  background: var(--accent-red-dim);
}

.stamp-open {
  color: var(--accent-green);
  border-color: var(--accent-green);
  background: var(--accent-green-dim);
}

.stamp-analysis {
  color: var(--accent-amber);
  border-color: var(--accent-amber);
  background: var(--accent-amber-dim);
}

/* Larger stamp variant (for case detail page) */
.stamp-lg {
  font-size: 0.875rem;
  padding: 6px 18px;
  border-width: 3px;
  transform: rotate(-3deg);
}

/* ── Credibility Stamps ── */
.stamp-verified {
  color: #60a5fa;
  border-color: #60a5fa;
  background: rgba(96, 165, 250, 0.12);
}

.stamp-credible {
  color: var(--accent-green);
  border-color: var(--accent-green);
  background: var(--accent-green-dim);
}

.stamp-disputed {
  color: var(--accent-amber);
  border-color: var(--accent-amber);
  background: var(--accent-amber-dim);
}

.stamp-unverified {
  color: var(--text-muted);
  border-color: var(--text-muted);
  background: rgba(100, 116, 139, 0.12);
}

.stamp-debunked {
  color: var(--accent-red);
  border-color: var(--accent-red);
  background: var(--accent-red-dim);
  text-decoration: line-through;
  text-decoration-thickness: 2px;
}

.stamp-disinfo {
  color: var(--accent-red);
  border-color: var(--accent-red);
  background: var(--accent-red-dim);
}

.stamp-hoax {
  color: #f87171;
  border-color: #f87171;
  background: rgba(248, 113, 113, 0.12);
}/* ============================================================
   CASE FILE DETAIL PAGE
   ============================================================ */
.case-detail {
  padding-top: calc(var(--header-height) + var(--space-3xl));
  padding-bottom: var(--space-4xl);
}

.case-detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-lg);
  margin-bottom: var(--space-2xl);
  padding-bottom: var(--space-2xl);
  border-bottom: 1px solid var(--border);
}

.case-detail-stamp {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--accent-green);
  margin-bottom: var(--space-sm);
}

.case-detail-title {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
}

.case-detail-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: var(--space-3xl);
  align-items: start;
}

/* Main narrative */
.case-detail-content {
  line-height: 1.8;
}

.case-detail-content h3 {
  margin-top: var(--space-2xl);
  margin-bottom: var(--space-md);
  font-size: 1.25rem;
}

.case-detail-content p {
  margin-bottom: var(--space-md);
  max-width: none;
}

.case-detail-content blockquote {
  border-left: 3px solid var(--accent-green);
  padding: var(--space-md) var(--space-lg);
  margin: var(--space-xl) 0;
  background: var(--accent-green-dim);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.case-detail-content blockquote p {
  font-style: italic;
  font-size: 1.0625rem;
  color: var(--text-primary);
  margin: 0;
}

/* Metadata sidebar */
.case-detail-sidebar {
  position: sticky;
  top: calc(var(--header-height) + var(--space-xl));
}

.case-meta-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.case-meta-header {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-green);
  padding: var(--space-md) var(--space-lg);
  border-bottom: 1px solid var(--border);
  background: rgba(74, 222, 128, 0.03);
}

.case-meta-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: var(--space-md) var(--space-lg);
  border-bottom: 1px solid var(--border);
}

.case-meta-row:last-child {
  border-bottom: none;
}

.case-meta-label {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.case-meta-value {
  font-size: 0.9375rem;
  color: var(--text-primary);
}


/* ============================================================
   TIMELINE
   ============================================================ */
.timeline {
  position: relative;
  padding: var(--space-xl) 0;
}

/* Center line */
.timeline::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  background: linear-gradient(
    180deg,
    transparent 0%,
    var(--accent-green) 10%,
    var(--accent-green) 90%,
    transparent 100%
  );
  opacity: 0.3;
  transform: translateX(-50%);
}

.timeline-entry {
  position: relative;
  display: flex;
  align-items: flex-start;
  width: 100%;
  margin-bottom: var(--space-2xl);
}

/* Alternating layout */
.timeline-entry:nth-child(odd) {
  justify-content: flex-start;
  padding-right: calc(50% + var(--space-2xl));
}

.timeline-entry:nth-child(even) {
  justify-content: flex-end;
  padding-left: calc(50% + var(--space-2xl));
}

/* Node dot */
.timeline-entry::before {
  content: '';
  position: absolute;
  left: 50%;
  top: var(--space-lg);
  width: 14px;
  height: 14px;
  background: var(--bg-primary);
  border: 3px solid var(--accent-green);
  border-radius: 50%;
  transform: translateX(-50%);
  z-index: 2;
  box-shadow: 0 0 12px var(--accent-green-dim);
}

.timeline-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  width: 100%;
  transition: all var(--duration-base) var(--ease-out);
}

.timeline-card:hover {
  border-color: var(--border-light);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}

.timeline-date {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--accent-green);
  margin-bottom: var(--space-sm);
}

.timeline-card h4 {
  font-family: var(--font-heading);
  font-size: 1.0625rem;
  margin-bottom: var(--space-sm);
}

.timeline-card p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
}


/* ============================================================
   ABOUT / FOUNDER STORY
   ============================================================ */
.about-section {
  padding: var(--space-4xl) 0;
}

.about-content {
  max-width: var(--container-narrow);
  margin: 0 auto;
}

.about-content h3 {
  margin-top: var(--space-2xl);
  margin-bottom: var(--space-md);
}

.about-content p {
  margin-bottom: var(--space-md);
  font-size: 1.0625rem;
  line-height: 1.8;
  max-width: none;
}

/* Pull quotes */
.pull-quote {
  border-left: 3px solid var(--accent-green);
  padding: var(--space-lg) var(--space-xl);
  margin: var(--space-2xl) 0;
  background: linear-gradient(135deg, var(--accent-green-dim), transparent);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.pull-quote p {
  font-size: 1.25rem;
  font-style: italic;
  color: var(--text-primary);
  line-height: 1.6;
  margin: 0;
}

.pull-quote cite {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-style: normal;
  color: var(--text-muted);
  margin-top: var(--space-md);
  letter-spacing: 0.04em;
}


/* ============================================================
   FAQ / ACCORDION
   ============================================================ */
.faq-list {
  max-width: var(--container-narrow);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color var(--duration-fast);
}

.faq-item.active {
  border-color: var(--border-light);
}

.faq-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  padding: var(--space-lg);
  text-align: left;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1rem;
  color: var(--text-primary);
  cursor: pointer;
  transition: color var(--duration-fast);
}

.faq-trigger:hover {
  color: var(--accent-green);
}

.faq-trigger-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.faq-trigger-icon::before,
.faq-trigger-icon::after {
  content: '';
  position: absolute;
  background: var(--text-muted);
  border-radius: 1px;
  transition: transform var(--duration-base) var(--ease-out);
}

.faq-trigger-icon::before {
  width: 12px;
  height: 2px;
}

.faq-trigger-icon::after {
  width: 2px;
  height: 12px;
}

.faq-item.active .faq-trigger-icon::after {
  transform: rotate(90deg);
}

.faq-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--duration-slow) var(--ease-out);
}

.faq-content-inner {
  padding: 0 var(--space-lg) var(--space-lg);
}

.faq-content-inner p {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.7;
}


/* ============================================================
   STATS ROW
   ============================================================ */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-lg);
  padding: var(--space-3xl) 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.stat-item {
  text-align: center;
}

.stat-value {
  display: block;
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  color: var(--accent-green);
  line-height: 1;
}

.stat-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: var(--space-sm);
}


/* ============================================================
   FEATURED / HIGHLIGHT CARD
   ============================================================ */
.featured-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-2xl);
  overflow: hidden;
}

.featured-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-green), transparent);
}


/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: var(--space-3xl) 0 var(--space-xl);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--space-2xl);
  align-items: start;
  margin-bottom: var(--space-2xl);
}

.footer-brand .logo {
  margin-bottom: var(--space-md);
}

.footer-brand p {
  font-size: 0.875rem;
  color: var(--text-muted);
  max-width: 360px;
}

.footer-nav {
  display: flex;
  gap: var(--space-3xl);
}

.footer-nav-group h5 {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: var(--space-md);
}

.footer-nav-group a {
  display: block;
  font-size: 0.875rem;
  color: var(--text-secondary);
  padding: var(--space-xs) 0;
  transition: color var(--duration-fast);
}

.footer-nav-group a:hover {
  color: var(--accent-green);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-md);
  padding-top: var(--space-xl);
  border-top: 1px solid var(--border);
}

.footer-copyright {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

.footer-disclaimer {
  font-size: 0.75rem;
  color: var(--text-muted);
  max-width: 600px;
  line-height: 1.6;
  font-style: italic;
}

.footer-disclaimer a {
  color: var(--accent-green);
  text-decoration: none;
  opacity: 0.8;
}

.footer-disclaimer a:hover {
  opacity: 1;
  text-decoration: underline;
}


/* ============================================================
   ANIMATIONS
   ============================================================ */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s var(--ease-out),
              transform 0.7s var(--ease-out);
}

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

/* Stagger children */
.stagger-children .animate-on-scroll:nth-child(1)  { transition-delay: 0ms; }
.stagger-children .animate-on-scroll:nth-child(2)  { transition-delay: 80ms; }
.stagger-children .animate-on-scroll:nth-child(3)  { transition-delay: 160ms; }
.stagger-children .animate-on-scroll:nth-child(4)  { transition-delay: 240ms; }
.stagger-children .animate-on-scroll:nth-child(5)  { transition-delay: 320ms; }
.stagger-children .animate-on-scroll:nth-child(6)  { transition-delay: 400ms; }
.stagger-children .animate-on-scroll:nth-child(7)  { transition-delay: 480ms; }
.stagger-children .animate-on-scroll:nth-child(8)  { transition-delay: 560ms; }
.stagger-children .animate-on-scroll:nth-child(9)  { transition-delay: 640ms; }

/* Fade in from left (for timeline) */
.fade-in-left {
  opacity: 0;
  transform: translateX(-30px);
  transition: opacity 0.7s var(--ease-out),
              transform 0.7s var(--ease-out);
}

.fade-in-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.fade-in-right {
  opacity: 0;
  transform: translateX(30px);
  transition: opacity 0.7s var(--ease-out),
              transform 0.7s var(--ease-out);
}

.fade-in-right.visible {
  opacity: 1;
  transform: translateX(0);
}

/* Subtle pulse for live indicators */
@keyframes glow-pulse {
  0%, 100% { box-shadow: 0 0 6px var(--accent-green-dim); }
  50% { box-shadow: 0 0 18px var(--accent-green-glow); }
}

.glow-pulse {
  animation: glow-pulse 3s ease-in-out infinite;
}

/* Typing cursor blink */
@keyframes cursor-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.typing-cursor::after {
  content: '▌';
  color: var(--accent-green);
  animation: cursor-blink 1s step-end infinite;
  margin-left: 2px;
}


/* ============================================================
   SECTIONS (common)
   ============================================================ */
.section {
  padding: var(--space-4xl) 0;
}

.section--alt {
  background: var(--bg-secondary);
}

.section--bordered {
  border-top: 1px solid var(--border);
}


/* ============================================================
   RESPONSIVE BREAKPOINTS
   ============================================================ */

/* ── ≤ 1200px ─────────────────────────────────────────────── */
@media (max-width: 1200px) {
  .cases-grid {
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  }

  .case-detail-layout {
    grid-template-columns: 1fr 280px;
    gap: var(--space-2xl);
  }
}


/* ── ≤ 992px ──────────────────────────────────────────────── */
@media (max-width: 992px) {
  .case-detail-layout {
    grid-template-columns: 1fr;
  }

  .case-detail-sidebar {
    position: static;
    order: -1;
  }

  .stats-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-inner {
    grid-template-columns: 1fr;
  }

  .footer-nav {
    gap: var(--space-2xl);
  }

  /* Timeline collapses to left-aligned */
  .timeline::before {
    left: 20px;
  }

  .timeline-entry:nth-child(odd),
  .timeline-entry:nth-child(even) {
    padding-left: 56px;
    padding-right: 0;
    justify-content: flex-start;
  }

  .timeline-entry::before {
    left: 20px;
  }
}


/* ── ≤ 768px ──────────────────────────────────────────────── */
@media (max-width: 768px) {
  :root {
    --header-height: 64px;
  }

  .menu-toggle {
    display: flex;
  }

  .main-nav {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    bottom: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: var(--space-xl) var(--space-lg);
    background: rgba(11, 14, 23, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transform: translateX(100%);
    transition: transform var(--duration-slow) var(--ease-out);
    /* Matches .site-header's z-index (see there for why: Leaflet's own
       control corners on the map page). Doesn't need to match exactly,
       just needs to clear the header's other children. */
    z-index: 1500;
    /* The nav has grown taller than most phone viewports (Sightings DB
       and Key Figures dropdowns each add 3 extra rows) — without this,
       body scroll is locked while the menu is open (see initMobileMenu
       in js/main.js) and the panel itself didn't scroll either, so
       Sources, The Vault, and About were completely unreachable. */
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .main-nav.open {
    transform: translateX(0);
  }

  .main-nav a {
    font-size: 1.125rem;
    padding: var(--space-md) 0;
    width: 100%;
    border-bottom: 1px solid var(--border);
  }

  .nav-item-dropdown {
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
  }

  .nav-item-dropdown > a {
    border-bottom: none;
  }

  .nav-dropdown-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: none;
    background: transparent;
    padding: 0 0 0 1.25rem;
    margin-top: 0;
    min-width: 0;
    width: 100%;
  }

  .nav-dropdown-menu a {
    font-size: 1rem;
    padding: var(--space-sm, 0.5rem) 0;
    border-bottom: 1px solid var(--border);
    color: var(--text-secondary);
  }

  .hero-title {
    font-size: clamp(2rem, 8vw, 3rem);
  }

  .hero-actions {
    flex-direction: column;
    width: 100%;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .cases-grid {
    grid-template-columns: 1fr;
  }

  .hero-radar {
    width: 400px;
    height: 400px;
  }

  .hero-radar-ring:nth-child(1) { width: 130px; height: 130px; }
  .hero-radar-ring:nth-child(2) { width: 265px; height: 265px; }
  .hero-radar-ring:nth-child(3) { width: 400px; height: 400px; }

  .stats-row {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
  }

  .footer-nav {
    flex-direction: column;
    gap: var(--space-xl);
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  .footer-disclaimer {
    text-align: center;
  }
}


/* ── ≤ 480px ──────────────────────────────────────────────── */
@media (max-width: 480px) {
  .container {
    padding: 0 var(--space-md);
  }

  .section {
    padding: var(--space-3xl) 0;
  }

  .case-card {
    padding: var(--space-md);
  }

  .case-card-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-sm);
  }

  .stamp {
    font-size: 0.5625rem;
  }

  .pull-quote p {
    font-size: 1.0625rem;
  }

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

  .stat-value {
    font-size: 1.75rem;
  }

  .hero-radar {
    width: 300px;
    height: 300px;
  }

  .hero-radar-ring:nth-child(1) { width: 100px; height: 100px; }
  .hero-radar-ring:nth-child(2) { width: 200px; height: 200px; }
  .hero-radar-ring:nth-child(3) { width: 300px; height: 300px; }

  .timeline-entry:nth-child(odd),
  .timeline-entry:nth-child(even) {
    padding-left: 44px;
  }

  .timeline-entry::before {
    left: 16px;
    width: 10px;
    height: 10px;
    border-width: 2px;
  }

  .timeline::before {
    left: 16px;
  }
}


/* ── Print Styles ─────────────────────────────────────────── */
@media print {
  .site-header,
  .hero-radar,
  .hero-grid,
  .scanlines::after,
  .search-overlay {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
  }

  .case-card {
    break-inside: avoid;
  }
}

/* ══════════════════════════════════════════════════════════════
   FORENSIC DATA PROFILE — Six-Domain Schema v1.0
   ══════════════════════════════════════════════════════════════ */

/* Domain accent colors */
:root {
  --d1-color: #38bdf8;   /* Spatiotemporal — sky blue */
  --d2-color: #4ade80;   /* Observables — green */
  --d3-color: #fb923c;   /* Morphological — orange */
  --d4-color: #a78bfa;   /* Environmental — purple */
  --d5-color: #f87171;   /* Forensic — red */
  --d6-color: #facc15;   /* Credibility — amber/gold */
}

.forensic-profile {
  margin: 3rem 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.forensic-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.875rem 1.25rem;
  background: rgba(255,255,255,0.03);
  border-bottom: 1px solid var(--border);
}

.forensic-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-primary);
}

.forensic-version {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--text-muted);
}

/* Individual domain card */
.forensic-domain {
  border-bottom: 1px solid var(--border);
}
.forensic-domain.domain-last {
  border-bottom: none;
}

.domain-header {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  padding: 0.625rem 1.25rem;
  border-left: 3px solid;
}

.domain-spatial  { border-color: var(--d1-color); background: rgba(56,189,248,0.04); }
.domain-observables { border-color: var(--d2-color); background: rgba(74,222,128,0.04); }
.domain-morpho   { border-color: var(--d3-color); background: rgba(251,146,60,0.04); }
.domain-environ  { border-color: var(--d4-color); background: rgba(167,139,250,0.04); }
.domain-forensic { border-color: var(--d5-color); background: rgba(248,113,113,0.04); }
.domain-cred     { border-color: var(--d6-color); background: rgba(250,204,21,0.04); }

.domain-num {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  opacity: 0.5;
  color: var(--text-primary);
}

.domain-title {
  font-family: var(--font-heading);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
}

.domain-spatial  .domain-title { color: var(--d1-color); }
.domain-observables .domain-title { color: var(--d2-color); }
.domain-morpho   .domain-title { color: var(--d3-color); }
.domain-environ  .domain-title { color: var(--d4-color); }
.domain-forensic .domain-title { color: var(--d5-color); }
.domain-cred     .domain-title { color: var(--d6-color); }

.domain-sub {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--text-muted);
  margin-left: auto;
}

/* Field rows */
.domain-fields {
  padding: 0.375rem 0;
}

.domain-field {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 0.5rem 1rem;
  padding: 0.4375rem 1.25rem;
  border-top: 1px solid rgba(255,255,255,0.03);
  align-items: baseline;
}
.domain-field:first-child { border-top: none; }

.field-key {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1.6;
  padding-top: 0.125rem;
  white-space: nowrap;
}

.field-val {
  font-family: var(--font-body);
  font-size: 0.8125rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* Data Integrity bar */
.di-field { align-items: flex-start; }
.di-val { display: flex; flex-direction: column; gap: 0.5rem; }

.di-bar-wrap {
  width: 100%;
  max-width: 320px;
  height: 6px;
  background: rgba(255,255,255,0.06);
  border-radius: 4px;
  overflow: hidden;
  display: inline-block;
  vertical-align: middle;
  margin-right: 0.625rem;
}

.di-bar {
  height: 100%;
  border-radius: 4px;
  transition: width 0.6s ease;
}

.di-score {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  vertical-align: middle;
}

.di-max {
  font-size: 0.6875rem;
  color: var(--text-muted);
}

.di-notes {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.6;
  font-style: italic;
  display: block;
  margin-top: 0.25rem;
}

/* Investigation status badges */
.invest-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 0.25rem 0.625rem;
  border-radius: 4px;
}

.invest-anomalous         { background: rgba(74,222,128,0.12);  color: #4ade80;  border: 1px solid rgba(74,222,128,0.25); }
.invest-under-investigation { background: rgba(251,146,60,0.12); color: #fb923c; border: 1px solid rgba(251,146,60,0.25); }
.invest-unverified        { background: rgba(148,163,184,0.10); color: #94a3b8;  border: 1px solid rgba(148,163,184,0.2); }
.invest-insufficient-data { background: rgba(167,139,250,0.12); color: #a78bfa; border: 1px solid rgba(167,139,250,0.25); }
.invest-identified\/debunked { background: rgba(239,68,68,0.10); color: #ef4444; border: 1px solid rgba(239,68,68,0.2); }

/* Responsive */
@media (max-width: 640px) {
  .domain-field {
    grid-template-columns: 1fr;
    gap: 0.25rem;
    padding: 0.625rem 1rem;
  }
  .field-key { white-space: normal; }
  .domain-sub { display: none; }
  .di-bar-wrap { max-width: 100%; }
}

/* ══════════════════════════════════════════════════════════════
   DECLASSIFIED GOVERNMENT RECORDS — Section Styles
   ══════════════════════════════════════════════════════════════ */

.gov-records-section {
  margin: 3rem 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.gov-records-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.875rem 1.25rem;
  background: rgba(245,158,11,0.05);
  border-bottom: 1px solid var(--border);
  border-left: 3px solid var(--accent-amber);
}

.gov-records-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-amber);
}

.gov-records-sub {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--text-muted);
}

.gov-records-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

.gov-section-sub {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin: 0.5rem 0 0.625rem;
  padding-bottom: 0.375rem;
  border-bottom: 1px solid var(--border);
}

/* Individual document card */
.gov-doc-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem 1.25rem;
}

.gov-doc-card.gov-doc-nara {
  border-color: rgba(56,189,248,0.2);
  background: rgba(56,189,248,0.03);
}

.gov-doc-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}

.gov-doc-agency {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--accent-amber);
  background: rgba(245,158,11,0.1);
  border: 1px solid rgba(245,158,11,0.2);
  padding: 0.125rem 0.5rem;
  border-radius: 3px;
}

.gov-doc-type {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  color: var(--text-muted);
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  padding: 0.125rem 0.5rem;
  border-radius: 3px;
}

.gov-doc-date {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  color: var(--text-muted);
  margin-left: auto;
}

.gov-doc-title {
  display: block;
  font-family: var(--font-heading);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
  text-decoration: none;
  margin-bottom: 0.4375rem;
  line-height: 1.4;
  transition: color 0.15s;
}
.gov-doc-title:hover { color: var(--accent-amber); }

.gov-doc-desc {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin: 0 0 0.5rem;
}

.gov-doc-class {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.625rem;
  color: var(--text-muted);
  border: 1px solid var(--border);
  padding: 0.125rem 0.5rem;
  border-radius: 3px;
}

.gov-no-docs {
  font-size: 0.875rem;
  color: var(--text-muted);
  font-style: italic;
  margin: 0.5rem 0;
}

/* Search link grid */
.gov-search-links {
  margin-top: 0.75rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.gov-search-label {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.gov-search-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.5rem;
}

.gov-search-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.875rem;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 6px;
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-secondary);
  transition: all 0.15s;
  min-width: 0;
}
.gov-search-btn span:not(.gov-search-icon) {
  overflow-wrap: break-word;
  min-width: 0;
}
.gov-search-btn:hover {
  background: rgba(245,158,11,0.07);
  border-color: rgba(245,158,11,0.3);
  color: var(--accent-amber);
}

.gov-search-icon { font-size: 1rem; flex-shrink: 0; }

@media (max-width: 640px) {
  .gov-search-grid { grid-template-columns: 1fr 1fr; }
  .gov-records-header { flex-direction: column; align-items: flex-start; }
  .gov-doc-date { margin-left: 0; }
}

/* ── Rule 34: Key Figure Links ───────────────────────────────── */
.figure-link {
  color: var(--accent-green);
  text-decoration: none;
  border-bottom: 1px dotted var(--accent-green);
  transition: border-color 0.2s, opacity 0.2s;
}
.figure-link:hover {
  opacity: 0.8;
  border-bottom-color: transparent;
}

/* ── Rule 36: Location Links ─────────────────────────────────── */
.location-link {
  color: #60a5fa;
  text-decoration: none;
  border-bottom: 1px dotted #60a5fa;
  transition: border-color 0.2s, opacity 0.2s;
}
.location-link:hover {
  opacity: 0.8;
  border-bottom-color: transparent;
}

/* ── Case File: Five Observables Grid & Cards ────────────────── */
.observables-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.75rem;
  margin: 1.5rem 0;
}
.observable-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.875rem;
  text-align: center;
  transition: all 0.2s ease;
}
.observable-item.present {
  border-color: var(--accent-green);
  box-shadow: 0 0 10px rgba(0, 255, 136, 0.05);
}
.observable-item.absent {
  opacity: 0.5;
}
.observable-item.speculative {
  border-color: #f59e0b;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.05);
}
.observable-item .obs-icon {
  font-size: 1.5rem;
  margin-bottom: 0.375rem;
}
.observable-item .obs-name {
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 0.6875rem;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.observable-item .obs-status {
  font-family: var(--font-body, 'Inter', sans-serif);
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}
@media (max-width: 640px) {
  .observables-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ── Book Cards & Lists (Further Reading) ────────────────────── */
.book-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
  margin-top: 1.5rem;
}
.book-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem;
  text-decoration: none;
  display: flex;
  gap: 1rem;
  transition: all 0.2s;
}
.book-card:hover {
  border-color: var(--accent-green);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(0, 255, 136, 0.08);
}
.book-cover {
  width: 60px;
  min-width: 60px;
  height: 90px;
  background: var(--bg-secondary);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 1.5rem;
  overflow: hidden;
}
.book-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.book-info h4 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
  line-height: 1.3;
}
.book-info .book-author {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--accent-green);
  margin-bottom: 0.375rem;
}
.book-info p {
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0;
}

/* ── Video Cards & Grids (Essential Viewing) ─────────────────── */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
  gap: 1.25rem;
  margin-top: 1.5rem;
  justify-content: center;
}
.video-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.2s;
}
.video-card:hover {
  border-color: var(--accent-green);
}
.video-card iframe {
  width: 100%;
  aspect-ratio: 16/9;
  border: none;
  display: block;
}
.video-card .video-caption {
  padding: 0.875rem 1rem;
}
.video-card .video-caption h4 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
  line-height: 1.3;
}
.video-card .video-caption p {
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin: 0;
}

/* ── Timeline Tables ────────────────────────────────────────── */
.timeline-table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; }
.timeline-table th { font-family: 'JetBrains Mono', monospace; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent-green); text-align: left; padding: 0.75rem 1rem; border-bottom: 2px solid var(--border); }
.timeline-table td { font-size: 0.9375rem; color: var(--text-secondary); padding: 0.75rem 1rem; border-bottom: 1px solid var(--border); vertical-align: top; line-height: 1.6; }
.timeline-table td:first-child { font-family: 'JetBrains Mono', monospace; font-size: 0.8125rem; color: var(--text-primary); white-space: nowrap; font-weight: 500; min-width: 140px; }
.timeline-table tr:last-child td { border-bottom: none; }
