/* =============================================
   21st Memory — Main CSS (Professional Serious Archive Theme)
   Serious • Important • Humanity Knowledge
   ============================================= */
/* Fonts loaded via <link> in each HTML page for faster discovery (see head preconnect) */

:root {
  --primary-deep: #1E1135;       /* deep professional purple-navy */
  --primary-navy: #1E1135;       /* alias for primary-deep (used in nav & section accents) */
  --primary-deep-bg: #1A0F2E;    /* cooler variant for subtle backgrounds & depth */
  --primary-purple: #4C1D95;     /* refined cooler violet for depth & trust */
  --accent-violet: #5B21B6;      /* deeper static accents for professional seriousness */
  --accent-violet-hover: #7C3AED; /* softened, elegant hover state */
  --accent-purple: #5B21B6;      /* alias for accent-violet (mobile menu hover) */
  --accent-indigo: #6366F1;      /* cooler indigo accent for trust & clarity */
  --accent-indigo-cool: #6366F1; /* alias for cooler trust accents */
  --accent-gold: #B45309;        /* warm professional gold for emphasis */
  --accent-gold-muted: #A67C4C;  /* desaturated warm gold for subtle highlights & important badges */
  --accent-gold-reverence: #D97706; /* warmer muted gold for reverence & sacred emphasis */
  --deep-bg: #0F0A1F;            /* deep purple-black for serious depth */
  --card-bg: #1A1433;            /* solid deep purple card background */
  --text-primary: #F8FAFC;       /* clean high-contrast white */
  --text-secondary: #CBD5E1;     /* professional light slate */
  --text-body: #F1EBFF;          /* higher-contrast off-white for long reports & premium readability */
  --border-subtle: #4C3D6B;      /* subtle purple border */
  --glow: rgba(124, 58, 237, 0.25); /* subtle purple glow for scroll animations */
  --glow-subtle: rgba(124, 58, 237, 0.08); /* ultra-subtle layered atmospheric glow for depth */
  --light-scrim: rgba(248, 250, 252, 0.035); /* faint top-light scrim for true volumetric lighting */
  --heading-gradient: linear-gradient(90deg, #5B21B6 0%, #7C3AED 48%, #4C1D95 100%); /* luminous violet-to-deep-navy with mid-stop for dramatic premium depth & glow */
  --text-muted: #A78BFA;
  --text-soft: #C4B5FD;
  --text-prose: #E0D4FF;
  --text-body-tint: #EDE4FF;
  --text-dim: #6B5B95;
  --accent-violet-bright: #8B3DFF;
  --accent-purple-bright: #6D28D9;
  --surface-hover: #2A1F40;
  --surface-inset: #120A2E;
  --link-hover: #C026D3;
  --surface-gloss: linear-gradient(to bottom, rgba(255, 255, 255, 0.09) 0%, rgba(255, 255, 255, 0.03) 38%, transparent 68%);
  --surface-rim: 0 0 0 1px rgba(124, 58, 237, 0.14);

  /* ── 3D depth design tokens (lit-from-above, consistent material tiers) ── */
  --depth-inset-top: inset 0 1.5px 0 rgba(255, 255, 255, 0.1);
  --depth-inset-top-strong: inset 0 2.5px 0 rgba(255, 255, 255, 0.32);
  --depth-inset-bottom: inset 0 -1px 0 rgba(0, 0, 0, 0.2);
  --depth-inset-bottom-strong: inset 0 -5px 0 rgba(30, 17, 53, 0.7);
  --depth-ambient: 0 0 48px -12px rgba(91, 33, 182, 0.2);
  --depth-elev-1: 0 10px 28px -12px rgba(0, 0, 0, 0.55);
  --depth-elev-1-hover:
    0 18px 36px -8px rgba(0, 0, 0, 0.65),
    0 0 0 1px rgba(124, 58, 237, 0.1);
  --depth-elev-2:
    0 14px 45px -12px rgba(0, 0, 0, 0.7),
    0 8px 25px -8px rgba(0, 0, 0, 0.45);
  --depth-elev-2-hover:
    0 28px 60px -15px rgba(0, 0, 0, 0.8),
    0 12px 30px -8px rgba(91, 33, 182, 0.25),
    0 0 0 1px var(--glow-subtle);
  --depth-elev-3:
    0 22px 50px -14px rgba(0, 0, 0, 0.68),
    0 10px 28px -10px rgba(0, 0, 0, 0.45);
  --depth-recessed:
    inset 0 3px 8px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  --gloss-surface: linear-gradient(to bottom, rgba(255, 255, 255, 0.08) 0%, transparent 45%);

  /* Tier composites — use on surfaces instead of ad-hoc shadow stacks */
  --surface-tier-recessed: var(--depth-recessed);
  --surface-tier-base: var(--depth-elev-1);
  --surface-tier-base-hover: var(--depth-elev-1-hover);
  --surface-tier-elevated:
    var(--depth-elev-2),
    var(--depth-inset-top),
    var(--depth-inset-bottom);
  --surface-tier-elevated-hover:
    var(--depth-elev-2-hover),
    inset 0 2px 0 rgba(255, 255, 255, 0.15),
    inset 0 -2px 0 rgba(0, 0, 0, 0.25);
  --surface-tier-floating:
    var(--depth-ambient),
    var(--depth-elev-3),
    var(--surface-rim),
    inset 0 2px 0 rgba(255, 255, 255, 0.09),
    inset 0 -1.5px 0 rgba(0, 0, 0, 0.2);
  --surface-tier-btn:
    0 10px 22px -8px rgba(0, 0, 0, 0.6),
    0 6px 14px -4px rgba(59, 7, 100, 0.35),
    var(--depth-inset-top-strong),
    var(--depth-inset-bottom-strong);
  --surface-tier-btn-hover:
    0 14px 28px -10px rgba(0, 0, 0, 0.65),
    0 8px 18px -5px rgba(59, 7, 100, 0.4),
    inset 0 3px 0 rgba(255, 255, 255, 0.38),
    inset 0 -5px 0 rgba(30, 17, 53, 0.65);
  --surface-tier-btn-active:
    0 6px 14px -6px rgba(0, 0, 0, 0.55),
    0 3px 8px -3px rgba(59, 7, 100, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    inset 0 -3px 0 rgba(30, 17, 53, 0.75);
  --surface-tier-topic-hover:
    0 20px 48px -12px rgba(0, 0, 0, 0.75),
    0 10px 26px -8px rgba(91, 33, 182, 0.18),
    inset 0 2px 0 rgba(255, 255, 255, 0.13),
    inset 0 -1.5px 0 rgba(0, 0, 0, 0.22);
  --surface-tier-control:
    0 9px 20px -8px rgba(0, 0, 0, 0.6),
    0 4px 11px -5px rgba(0, 0, 0, 0.4),
    var(--depth-inset-top),
    var(--depth-inset-bottom);
  --surface-tier-control-hover:
    0 14px 28px -10px rgba(0, 0, 0, 0.65),
    0 7px 16px -6px rgba(59, 7, 100, 0.25),
    inset 0 2px 0 rgba(255, 255, 255, 0.15),
    inset 0 -1.5px 0 rgba(0, 0, 0, 0.2);
  --surface-tier-control-sm:
    0 4px 14px -4px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    inset 0 -1px 0 rgba(0, 0, 0, 0.25);
  --surface-tier-control-sm-hover:
    0 8px 20px -6px rgba(109, 40, 217, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    inset 0 -1px 0 rgba(0, 0, 0, 0.2);
  --surface-tier-control-active:
    0 6px 22px -4px rgba(109, 40, 217, 0.55),
    0 0 0 1px rgba(124, 58, 237, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.15),
    inset 0 -2px 0 rgba(0, 0, 0, 0.3);
  --surface-tier-pill:
    0 6px 18px -10px rgba(0, 0, 0, 0.55),
    0 0 20px -12px rgba(91, 33, 182, 0.35),
    var(--depth-inset-top);
  --surface-tier-pill-lg:
    0 8px 22px -10px rgba(0, 0, 0, 0.58),
    0 0 28px -10px rgba(91, 33, 182, 0.4),
    inset 0 1.5px 0 rgba(255, 255, 255, 0.14);
  --surface-tier-frame:
    var(--depth-elev-2),
    var(--surface-rim),
    var(--depth-inset-top);
  --surface-tier-frame-inner: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
  --surface-tier-navbar:
    0 8px 28px -6px rgba(0, 0, 0, 0.55),
    var(--depth-inset-top);
  --surface-tier-dock: var(--surface-tier-btn);
  --surface-tier-dock-hover: var(--surface-tier-btn-hover);
  --surface-tier-journey:
    var(--depth-elev-1),
    var(--depth-inset-top);
  --surface-tier-journey-hover:
    0 16px 32px -12px rgba(109, 40, 217, 0.32),
    0 0 20px -10px rgba(124, 58, 237, 0.25),
    inset 0 1.5px 0 rgba(255, 255, 255, 0.12);
  --surface-tier-chip:
    0 4px 12px -6px rgba(0, 0, 0, 0.45),
    var(--depth-inset-top);
  --surface-tier-chip-hover:
    0 6px 16px -6px rgba(91, 33, 182, 0.3),
    inset 0 1.5px 0 rgba(255, 255, 255, 0.12);
  --surface-tier-recessed-tray:
    var(--depth-recessed),
    0 4px 14px -8px rgba(0, 0, 0, 0.35);

  /* Legacy aliases — kept for existing references */
  --shadow-elevated: var(--depth-elev-3);
  --shadow-ambient: var(--depth-ambient);
}

/* Smooth transitions — scoped to interactive elements only (avoids global repaint cost) */
a, button, input, select, textarea,
[role="button"], [role="link"],
.nav-link, .btn-primary, .btn-secondary, .text-link, .btn-topic-nav,
.memory-card, .content-card, .source-card, .lesson-content-card, .channel-card,
.topic-root-card, .topic-leaf-btn, .category-toggle,
#back-to-top, #mobile-menu-btn, #global-loader,
.mobile-menu .nav-link,
.topic-control-btn, .breadcrumb-link,
.section-pill, .media-frame, .journey-card, .btn-jump-pill,
.codex-search-field, .nav-cta, .nav-logo-icon {
  transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, transform, box-shadow, opacity, filter;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 200ms;
}

.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 10000;
  padding: 0.75rem 1.25rem;
  background: var(--accent-violet);
  color: #fff;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  border-radius: 0 0 0.5rem 0.5rem;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 0;
  outline: 2px solid var(--accent-indigo);
  outline-offset: 2px;
}

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

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--deep-bg);
  color: var(--text-body-tint);
  line-height: 1.7;
  font-size: 1.05rem;
  font-feature-settings: "ss03" 1, "ss04" 1; /* premium rounded g/a + ss04 for expensive printed-book feel */
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  max-width: 100%;
  padding-top: 5rem; /* space for fixed navbar */
}

body.menu-open {
  overflow: hidden;
}

/* Desktop body font increase for premium readability */
@media (min-width: 768px) {
  body {
    font-size: 1.1rem;
  }
}

html {
  overflow-x: hidden;
  max-width: 100%;
}

/* Layered atmospheric background — lit-from-above vault feel */
.cosmic-bg {
  background:
    linear-gradient(168deg, rgba(255, 255, 255, 0.025) 0%, transparent 42%),
    radial-gradient(ellipse 90% 55% at 50% -8%, rgba(91, 33, 182, 0.18) 0%, transparent 58%),
    radial-gradient(ellipse 55% 40% at 92% 88%, rgba(99, 102, 241, 0.08) 0%, transparent 55%),
    radial-gradient(ellipse 45% 35% at 6% 92%, rgba(76, 29, 149, 0.1) 0%, transparent 50%),
    var(--deep-bg);
}

/* Elevated surface highlight — floating tier (violet rim + ambient bloom) */
.glow-purple {
  box-shadow: var(--surface-tier-floating);
}

/* Consistent SVG card icons */
.card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  color: #A78BFA;
  opacity: 0.75;
  flex-shrink: 0;
}

.card-icon svg {
  width: 100%;
  height: 100%;
}

.card-icon-lg {
  width: 2.25rem;
  height: 2.25rem;
}

.card-icon-sm {
  width: 1.125rem;
  height: 1.125rem;
  opacity: 1;
}

.section-icon {
  display: inline-flex;
  width: 1.25rem;
  height: 1.25rem;
  color: #6366F1;
}

/* =============================================
   3D SURFACE TIERS — shared material depth system
   Recessed → inputs/wells | Base → content cards
   Elevated → channel/topic cards | Floating → static vault panels
   ============================================= */

/* =============================================
   PROFESSIONAL SERIOUS CARDS — Base tier
   :where() fallbacks let Tailwind padding/layout utilities win
   ============================================= */
:where(.memory-card, .content-card, .source-card, .lesson-content-card) {
  display: flex;
  flex-direction: column;
  padding: 1.85rem 2rem;
}

.memory-card,
.content-card,
.source-card,
.lesson-content-card {
  background: #1A1433;
  border: 1px solid #4C3D6B;
  border-radius: 16px;
  box-shadow: var(--surface-tier-base);
  position: relative;
  overflow: hidden;
}

.items-stretch > :is(
  .memory-card, .content-card, .channel-card, .source-card,
  a.memory-card, a.content-card, a.channel-card, a.source-card
) {
  height: 100%;
}

/* Enhanced professional top highlight + volumetric corner glows for masterful light & depth */
.memory-card::before,
.content-card::before,
.source-card::before,
.lesson-content-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    var(--gloss-surface),
    radial-gradient(circle at 15% 15%, var(--glow-subtle) 0%, transparent 55%),
    radial-gradient(circle at 85% 85%, var(--light-scrim) 0%, transparent 60%);
  border-radius: 16px;
  pointer-events: none;
  z-index: 1;
}

/* =============================================
   NETWORK CHANNEL CARDS — Elevated tier (reference 3D treatment)
   ============================================= */

:where(.channel-card) {
  display: flex;
  flex-direction: column;
  padding: 2rem;
}

.channel-card {
  background: var(--card-bg);
  border: none;
  border-radius: 16px;
  position: relative;
  overflow: hidden;
  min-height: 0;
  box-shadow: var(--surface-tier-elevated);
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* Directory cards — balanced height, not tall slabs */
.network-directory-grid > a.channel-card {
  min-height: 13.5rem;
  height: 100%;
  padding: 1.35rem 1.4rem 1.25rem;
}

.network-directory-grid > a.channel-card > * {
  position: relative;
  z-index: 2;
}

/* Enhanced professional top highlight + volumetric corner glows for masterful light & depth (3D network cards) */
.channel-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    var(--gloss-surface),
    radial-gradient(circle at 18% 12%, var(--glow-subtle) 0%, transparent 50%),
    radial-gradient(circle at 82% 88%, var(--light-scrim) 0%, transparent 55%);
  border-radius: 16px;
  pointer-events: none;
  z-index: 1;
}

/* Unified interactive card hover */
.memory-card:not(.static-card):not(.topics-filter-panel):hover,
.content-card:not(.static-card):not(.topics-filter-panel):hover,
.source-card:not(.static-card):hover,
.lesson-content-card:not(.static-card):hover,
.topic-root-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-violet-hover);
  box-shadow: var(--surface-tier-base-hover);
}

.channel-card:not(.static-card):not(.video-card):not(.topics-filter-panel):hover {
  transform: translateY(-7px) scale(1.015);
  box-shadow: var(--surface-tier-elevated-hover);
  border-color: #6B21A8;
}

/* Active / pressed state */
.channel-card:active {
  transform: translateY(-2px) scale(0.995);
  box-shadow:
    0 10px 25px -10px rgba(0, 0, 0, 0.6),
    var(--depth-inset-top);
}

/* Video transmission cards on deep-dive page — calm, no lift or enhanced hover (embeds should stay static) */
.video-card:hover {
  transform: none !important;
  box-shadow: var(--surface-tier-elevated) !important;
}

.video-card:active {
  transform: none !important;
}

/* Ensure text and icons pop on the 3D surface */
.channel-card h3 {
  color: var(--text-primary);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.channel-card p {
  flex-grow: 1 !important;
  margin-bottom: 1.25rem;
  color: var(--text-secondary);
}

/* Inner link text highlight on hover */
.channel-card .inline-flex {
  transition: color 0.2s ease;
}

.channel-card:hover .inline-flex {
  color: #fff;
}

/* =============================================
   END NETWORK 3D BUTTON CARDS
   ============================================= */

/* Static card — floating tier: glass vault depth + gloss, no hover lift */
.static-card {
  transform: none !important;
  box-shadow: var(--surface-tier-floating) !important;
  border: none !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  min-height: 0;
}

.static-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    var(--surface-gloss),
    radial-gradient(ellipse 70% 45% at 50% 0%, rgba(124, 58, 237, 0.07) 0%, transparent 65%);
  border-radius: inherit;
  pointer-events: none;
  z-index: 1;
}

.static-card:hover {
  transform: none !important;
  box-shadow: var(--surface-tier-floating) !important;
}

.static-card .btn-primary {
  /* Keep depth consistent with global primary buttons */
  box-shadow:
    0 10px 24px -10px rgba(0, 0, 0, 0.55),
    0 4px 12px -6px rgba(91, 33, 182, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.static-card .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow:
    0 14px 28px -10px rgba(0, 0, 0, 0.6),
    0 6px 16px -6px rgba(109, 40, 217, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

/* Sources cards inner link highlight */
.content-card.group:hover .inline-flex {
  color: #fff;
  transition: all 0.2s ease;
}

/* Ensure description paragraphs in cards grow to fill space for perfect uniform height in grids */
.memory-card p,
.content-card p,
.source-card p,
.channel-card p,
.lesson-content-card p {
  flex-grow: 1 !important;
  margin-bottom: 1.25rem;
}

/* Buttons — Premium 3D Professional CTA (Enhanced Depth & Polish for Dark Theme)
   Strong bevel, glossy highlight, realistic press/lift — serious, trustworthy, modern premium feel */
/* Shared action-button family — identical footprint on <button> and <a>.
   Clean professional fill vs outline; light depth without heavy bevels. */
button.btn-primary,
a.btn-primary,
button.btn-secondary,
a.btn-secondary,
.btn-primary,
.btn-secondary {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  box-sizing: border-box;
  min-height: 3rem;
  padding: 0.85rem 1.75rem;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: inherit;
  letter-spacing: 0.01em;
  line-height: 1.25;
  border-radius: 14px;
  text-decoration: none;
  text-align: center;
  white-space: nowrap;
  cursor: pointer;
  overflow: hidden;
  transition:
    transform 0.28s cubic-bezier(0.23, 1, 0.32, 1),
    box-shadow 0.28s cubic-bezier(0.23, 1, 0.32, 1),
    background 0.28s ease,
    border-color 0.28s ease,
    color 0.28s ease,
    opacity 0.2s ease;
  -webkit-appearance: none;
  appearance: none;
  margin: 0;
  vertical-align: middle;
}

button.btn-primary,
a.btn-primary,
.btn-primary {
  background: linear-gradient(165deg, #5B21B6 0%, #4C1D95 48%, #3B0764 100%);
  color: #ffffff !important;
  border: 1px solid rgba(196, 181, 253, 0.35);
  box-shadow:
    0 10px 24px -10px rgba(0, 0, 0, 0.55),
    0 4px 12px -6px rgba(91, 33, 182, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

button.btn-primary:hover,
a.btn-primary:hover,
.btn-primary:hover {
  background: linear-gradient(165deg, #6D28D9 0%, #5B21B6 48%, #4C1D95 100%);
  color: #ffffff !important;
  border-color: rgba(221, 214, 254, 0.45);
  transform: translateY(-2px);
  box-shadow:
    0 14px 28px -10px rgba(0, 0, 0, 0.6),
    0 6px 16px -6px rgba(109, 40, 217, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

button.btn-primary:active,
a.btn-primary:active,
.btn-primary:active {
  transform: translateY(0);
  box-shadow:
    0 6px 14px -8px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

button.btn-primary:focus-visible,
a.btn-primary:focus-visible,
.btn-primary:focus-visible {
  outline: 2px solid rgba(167, 139, 250, 0.85);
  outline-offset: 3px;
}

/* Label always inherits button color (fixes washed/ghost native buttons) */
.btn-primary > *,
.btn-secondary > * {
  position: relative;
  z-index: 1;
  color: inherit;
  pointer-events: none;
}

/* Micro-animation for arrows */
.btn-primary span,
.group-hover\:translate-x-1 {
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary:hover span,
.group:hover .group-hover\:translate-x-1 {
  transform: translateX(3px);
}

/* Secondary — same size as primary; quieter outline treatment */
button.btn-secondary,
a.btn-secondary,
.btn-secondary {
  background: linear-gradient(165deg, rgba(42, 31, 64, 0.75) 0%, rgba(26, 20, 51, 0.55) 100%);
  color: var(--text-soft) !important;
  border: 1.5px solid rgba(124, 58, 237, 0.5);
  box-shadow:
    0 8px 18px -10px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

button.btn-secondary:hover,
a.btn-secondary:hover,
.btn-secondary:hover {
  background: linear-gradient(165deg, rgba(59, 7, 100, 0.55) 0%, rgba(42, 31, 64, 0.65) 100%);
  border-color: rgba(167, 139, 250, 0.65);
  color: var(--text-primary) !important;
  transform: translateY(-2px);
  box-shadow:
    0 12px 24px -10px rgba(0, 0, 0, 0.55),
    0 0 20px -10px rgba(91, 33, 182, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

button.btn-secondary:active,
a.btn-secondary:active,
.btn-secondary:active {
  transform: translateY(0);
  box-shadow:
    0 4px 12px -6px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

button.btn-secondary:focus-visible,
a.btn-secondary:focus-visible,
.btn-secondary:focus-visible {
  outline: 2px solid rgba(167, 139, 250, 0.7);
  outline-offset: 3px;
}

button.btn-primary:disabled,
button.btn-secondary:disabled,
.btn-primary:disabled,
.btn-secondary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none !important;
  pointer-events: none;
  box-shadow: none;
}

/* Tertiary text link for low-emphasis actions */
.text-link {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.95rem;
  text-decoration: none;
}

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

/* Section divider pills — unified across pages */
.section-pill-wrap {
  display: flex;
  align-items: center;
  gap: 1rem;
  justify-content: center;
}

.section-pill-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(
    to right,
    transparent 0%,
    rgba(139, 61, 255, 0.15) 35%,
    var(--accent-violet-bright) 50%,
    rgba(139, 61, 255, 0.15) 65%,
    transparent 100%
  );
}

.section-pill {
  position: relative;
  padding: 0.5rem 2rem;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--accent-indigo);
  border: 1px solid rgba(139, 61, 255, 0.38);
  border-radius: 9999px;
  white-space: nowrap;
  background: rgba(26, 20, 51, 0.62);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  box-shadow: var(--surface-tier-pill);
}

.section-pill-lg {
  padding: 0.75rem 2.5rem;
  font-size: 1rem;
  letter-spacing: 0.06em;
  border-color: rgba(139, 61, 255, 0.48);
  box-shadow: var(--surface-tier-pill-lg);
}

/* Card typography tokens */
.card-label {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--text-soft);
  text-transform: uppercase;
  white-space: normal;
  word-break: normal;
  overflow-wrap: normal;
}

.card-action {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-soft);
  font-weight: 500;
}

.channel-card:hover .card-action {
  color: #fff;
}

/* Network channel cards — subtle platform identity */
.channel-card[data-section="telegram"] {
  box-shadow: var(--surface-tier-elevated), 0 0 0 1px rgba(34, 158, 217, 0.18);
}

.channel-card[data-section="telegram"] .card-label {
  color: #7DD3FC;
}

.channel-card[data-section="rumble"] {
  box-shadow: var(--surface-tier-elevated), 0 0 0 1px rgba(133, 187, 101, 0.2);
}

.channel-card[data-section="rumble"] .card-label {
  color: #A3E635;
}

.channel-card[data-section="official"] {
  box-shadow: var(--surface-tier-elevated), 0 0 0 1px rgba(212, 168, 75, 0.28);
}

.channel-card[data-section="official"] .card-label {
  color: var(--accent-gold-muted);
}

.channel-card-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-body-tint);
  background: rgba(91, 33, 182, 0.45);
  border: 1px solid rgba(167, 139, 250, 0.35);
  border-radius: 9999px;
  padding: 0.22rem 0.5rem;
  line-height: 1.2;
  margin-bottom: 0.45rem;
  width: fit-content;
  z-index: 2;
  position: relative;
}

.channel-card-badge--recommended {
  color: #F5E6C8;
  background: rgba(180, 83, 9, 0.35);
  border-color: rgba(212, 168, 75, 0.45);
}

/* ── Network page layout system (CSS-owned grids; no Tailwind dependency) ── */
.network-featured-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  align-items: stretch;
}

@media (min-width: 640px) {
  .network-featured-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.15rem;
  }
}

@media (min-width: 1024px) {
  .network-featured-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.25rem;
  }
}

.network-directory-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.15rem;
  align-items: stretch;
}

@media (min-width: 768px) {
  .network-directory-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
  }
}

@media (min-width: 1024px) {
  .network-directory-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Start-here compact cards — equal tiles, not full-width slabs */
.network-start-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  min-height: 11.5rem;
  height: 100%;
  padding: 1.15rem 1.2rem 1.1rem;
  text-decoration: none;
  color: inherit;
  border-radius: 1.1rem;
  background:
    linear-gradient(165deg, rgba(42, 31, 72, 0.95) 0%, rgba(26, 20, 51, 0.98) 55%, rgba(20, 14, 40, 1) 100%);
  box-shadow: var(--surface-tier-elevated);
  border: 1px solid rgba(76, 61, 107, 0.65);
  overflow: hidden;
  transition:
    transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    border-color 0.3s ease;
  z-index: 0;
}

.network-start-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, rgba(255, 255, 255, 0.06) 0%, transparent 42%),
    radial-gradient(circle at 12% 0%, rgba(124, 58, 237, 0.14) 0%, transparent 48%);
  pointer-events: none;
  z-index: 0;
}

.network-start-card > * {
  position: relative;
  z-index: 1;
}

.network-start-card:hover {
  transform: translateY(-4px);
  border-color: rgba(124, 58, 237, 0.45);
  box-shadow: var(--surface-tier-elevated-hover);
}

.network-start-card:focus-visible {
  outline: 2px solid var(--accent-indigo);
  outline-offset: 3px;
}

.network-start-card[data-section="official"] {
  border-color: rgba(212, 168, 75, 0.38);
  box-shadow: var(--surface-tier-elevated), 0 0 28px -12px rgba(180, 83, 9, 0.35);
}

.network-start-card[data-section="telegram"] {
  border-color: rgba(34, 158, 217, 0.28);
}

.network-start-card[data-section="rumble"] {
  border-color: rgba(133, 187, 101, 0.28);
}

.network-start-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.network-start-card__meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  min-width: 0;
}

.network-start-card__chip {
  display: inline-flex;
  align-items: center;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #F5E6C8;
  background: rgba(180, 83, 9, 0.32);
  border: 1px solid rgba(212, 168, 75, 0.4);
  border-radius: 9999px;
  padding: 0.18rem 0.45rem;
  line-height: 1.2;
}

.network-start-card__chip--archive {
  color: var(--text-body-tint);
  background: rgba(91, 33, 182, 0.45);
  border-color: rgba(167, 139, 250, 0.4);
}

.network-start-card__label {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-soft);
  line-height: 1.3;
}

.network-start-card[data-section="official"] .network-start-card__label {
  color: var(--accent-gold-muted);
}

.network-start-card[data-section="telegram"] .network-start-card__label {
  color: #7DD3FC;
}

.network-start-card[data-section="rumble"] .network-start-card__label {
  color: #A3E635;
}

.network-start-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.35rem;
  height: 2.35rem;
  flex-shrink: 0;
  border-radius: 0.75rem;
  color: #C4B5FD;
  background: rgba(91, 33, 182, 0.28);
  border: 1px solid rgba(124, 58, 237, 0.28);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.network-start-card__icon .card-icon,
.network-start-card__icon .card-icon-lg {
  width: 1.2rem;
  height: 1.2rem;
  opacity: 0.95;
  color: inherit;
}

.network-start-card[data-section="official"] .network-start-card__icon {
  color: #E8C98A;
  background: rgba(180, 83, 9, 0.2);
  border-color: rgba(212, 168, 75, 0.35);
}

.network-start-card[data-section="telegram"] .network-start-card__icon {
  color: #7DD3FC;
  background: rgba(14, 116, 144, 0.22);
  border-color: rgba(34, 158, 217, 0.3);
}

.network-start-card[data-section="rumble"] .network-start-card__icon {
  color: #A3E635;
  background: rgba(63, 98, 18, 0.28);
  border-color: rgba(133, 187, 101, 0.3);
}

.network-start-card__title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: #fff;
}

.network-start-card__desc {
  margin: 0;
  flex: 1 1 auto;
  font-size: 0.84rem;
  line-height: 1.45;
  color: var(--text-prose);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

.network-start-card__action {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.15rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-soft);
  transition: color 0.2s ease, gap 0.2s ease;
}

.network-start-card:hover .network-start-card__action {
  color: #fff;
  gap: 0.5rem;
}

.network-section-heading {
  grid-column: 1 / -1;
  margin-top: 0.35rem;
  margin-bottom: 0;
  padding-top: 0.5rem;
}

.network-section-heading:first-child {
  margin-top: 0;
  padding-top: 0;
}

.network-section-title {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.network-controls {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.75rem;
}

@media (min-width: 1024px) {
  .network-controls {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.network-search-wrap {
  width: 100%;
  max-width: 18rem;
}

.network-search-input {
  width: 100%;
  min-height: 2.75rem;
  padding: 0.55rem 1rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-body-tint);
  background: linear-gradient(180deg, #221A42 0%, #1A1433 100%);
  border: 1px solid #4C3D6B;
  box-shadow: var(--surface-tier-recessed);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

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

.network-search-input:hover {
  border-color: var(--accent-violet-hover);
}

.network-search-input:focus-visible {
  border-color: #7C3AED;
  box-shadow:
    var(--surface-tier-recessed),
    0 0 0 3px rgba(124, 58, 237, 0.28);
}

.network-skeleton-card {
  min-height: 13.5rem;
  display: flex;
  flex-direction: column;
  pointer-events: none;
}

.network-featured-grid .network-skeleton-card {
  min-height: 11.5rem;
  border-radius: 1.1rem;
}

.network-empty-state .network-retry-btn {
  margin-top: 0.25rem;
}

.network-noscript-list a {
  color: var(--text-soft);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.network-noscript-list a:hover {
  color: var(--text-primary);
}

@media (prefers-reduced-motion: reduce) {
  .network-start-card:hover {
    transform: none;
  }
}

/* Site footer */
.site-footer {
  position: relative;
  border-top: 1px solid transparent;
  border-image: linear-gradient(
      90deg,
      transparent 0%,
      rgba(109, 40, 217, 0.45) 20%,
      rgba(167, 139, 250, 0.35) 50%,
      rgba(109, 40, 217, 0.45) 80%,
      transparent 100%
    )
    1;
  padding: 3.25rem 0 3rem;
  text-align: center;
  color: var(--text-primary);
  box-shadow: 0 -3px 12px rgba(0, 0, 0, 0.3);
  background:
    radial-gradient(ellipse 80% 55% at 50% -5%, rgba(109, 40, 217, 0.18) 0%, transparent 55%),
    radial-gradient(ellipse 50% 40% at 15% 30%, rgba(91, 33, 182, 0.08) 0%, transparent 60%),
    var(--deep-bg);
  overflow: hidden;
}

.site-footer svg {
  filter: drop-shadow(0 0 10px rgba(91, 33, 182, 0.4));
}

.site-footer .border-t {
  border-color: transparent;
  border-image: linear-gradient(
      90deg,
      transparent 0%,
      rgba(76, 61, 107, 0.9) 18%,
      rgba(109, 40, 217, 0.35) 50%,
      rgba(76, 61, 107, 0.9) 82%,
      transparent 100%
    )
    1;
}

.site-footer a {
  color: var(--text-secondary);
}

.site-footer a:hover {
  color: var(--accent-violet);
}

.footer-heading {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent-purple-bright);
  letter-spacing: 0.04em;
  margin-bottom: 0.875rem;
}

.footer-link {
  display: block;
  color: var(--text-soft);
  font-size: 0.875rem;
  padding: 0.35rem 0;
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-link:hover {
  color: var(--link-hover);
}

/* Connect: 2-column compact social rows */
.footer-social-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem 0.55rem;
}

.footer-social {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-secondary);
  font-size: 0.8125rem;
  padding: 0.45rem 0.6rem;
  border-radius: 10px;
  text-decoration: none;
  border: 1px solid rgba(76, 61, 107, 0.55);
  background: rgba(255, 255, 255, 0.02);
  transition:
    color 0.2s ease,
    background 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

.footer-social .card-icon {
  width: 1.15rem;
  height: 1.15rem;
  flex-shrink: 0;
  color: var(--text-soft);
  transition: color 0.2s ease;
}

.footer-social:hover {
  color: var(--text-primary);
  background: rgba(109, 40, 217, 0.12);
  border-color: rgba(139, 92, 246, 0.55);
  box-shadow:
    0 0 0 1px rgba(124, 58, 237, 0.12),
    0 6px 18px -8px rgba(91, 33, 182, 0.45);
  transform: translateY(-1px);
}

.footer-social:hover .card-icon {
  color: var(--accent-purple-bright);
}

.footer-support {
  position: relative;
  padding: 1.5rem 1.15rem 1.35rem;
  margin-top: 0.5rem;
  margin-bottom: 0.25rem;
  border-radius: 16px;
  text-align: left;
  border: 1px solid rgba(76, 61, 107, 0.45);
  background:
    radial-gradient(ellipse 70% 60% at 50% 0%, rgba(109, 40, 217, 0.1) 0%, transparent 65%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.03) 0%, rgba(0, 0, 0, 0.12) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.footer-support::before {
  content: '';
  position: absolute;
  top: 0;
  left: 8%;
  right: 8%;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(167, 139, 250, 0.45) 30%,
    rgba(109, 40, 217, 0.55) 50%,
    rgba(167, 139, 250, 0.45) 70%,
    transparent 100%
  );
  pointer-events: none;
}

.footer-support .footer-heading {
  margin-bottom: 0.45rem;
}

.footer-support-message {
  color: var(--text-dim);
  font-size: 0.8125rem;
  line-height: 1.55;
  margin: 0 0 1.1rem;
  max-width: 40rem;
}

.footer-donate-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.875rem;
}

@media (min-width: 640px) {
  .footer-donate-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    align-items: stretch;
  }
}

@media (min-width: 1024px) {
  .footer-donate-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.footer-donate-card {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  padding: 1.125rem 1.125rem 1.2rem;
  border-radius: 14px;
  border: 1px solid var(--border-subtle);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0%, rgba(0, 0, 0, 0.18) 100%);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  min-height: 100%;
  transition:
    transform 0.22s ease,
    border-color 0.22s ease,
    box-shadow 0.22s ease;
}

.footer-donate-card:hover {
  transform: translateY(-2px);
  border-color: rgba(139, 92, 246, 0.55);
  box-shadow:
    0 14px 32px -10px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(124, 58, 237, 0.12),
    0 0 28px -8px rgba(109, 40, 217, 0.35);
}

.footer-donate-card--btc:hover {
  border-color: rgba(217, 119, 6, 0.45);
  box-shadow:
    0 14px 32px -10px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(180, 83, 9, 0.15),
    0 0 28px -8px rgba(217, 119, 6, 0.22);
}

.footer-donate-card--kofi:hover {
  border-color: rgba(167, 139, 250, 0.55);
  box-shadow:
    0 14px 32px -10px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(139, 92, 246, 0.14),
    0 0 28px -8px rgba(139, 92, 246, 0.3);
}

.footer-donate-card--gofundme:hover {
  border-color: rgba(192, 38, 211, 0.4);
  box-shadow:
    0 14px 32px -10px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(192, 38, 211, 0.12),
    0 0 28px -8px rgba(192, 38, 211, 0.22);
}

.footer-donate-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-purple-bright);
}

.footer-donate-media-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 6.75rem;
  min-height: 6.75rem;
  padding: 0.55rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background:
    radial-gradient(ellipse at 50% 0%, rgba(139, 92, 246, 0.12) 0%, transparent 70%),
    rgba(255, 255, 255, 0.025);
}

.footer-donate-media-wrap--qr {
  background:
    radial-gradient(ellipse at 50% 40%, rgba(255, 255, 255, 0.08) 0%, transparent 65%),
    rgba(255, 255, 255, 0.03);
}

.footer-donate-media {
  display: block;
  width: 100%;
  max-width: 168px;
  height: 5.5rem;
  object-fit: cover;
  object-position: center;
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.32);
}

.footer-donate-media--qr {
  width: 5.5rem;
  height: 5.5rem;
  max-width: 5.5rem;
  object-fit: contain;
  background: #fff;
  padding: 0.35rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
}

.footer-donate-desc {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--text-secondary);
  flex: 1;
  min-height: 2.4em;
}

.footer-support-address {
  display: block;
  width: 100%;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.75rem;
  line-height: 1.45;
  color: var(--text-soft);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 0.5rem 0.65rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  user-select: all;
  letter-spacing: 0.01em;
}

.footer-donate-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  align-self: stretch;
  padding: 10px 16px !important;
  font-size: 0.8125rem !important;
  border-radius: 14px !important;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  margin-top: auto;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.footer-donate-btn::before {
  border-radius: 14px !important;
}

.site-footer .footer-donate-btn,
.site-footer .footer-donate-btn:hover {
  color: #fff;
}

.footer-support-copy.copied {
  box-shadow:
    0 0 0 1px rgba(167, 139, 250, 0.45),
    0 0 20px -4px rgba(139, 92, 246, 0.55) !important;
}

.footer-copyright {
  margin-top: 0.65rem;
  font-size: 0.6875rem;
  color: var(--text-dim);
  letter-spacing: 0.03em;
  opacity: 0.85;
}

.footer-donate-btn-icon {
  display: inline-flex;
  width: 1rem;
  height: 1rem;
  position: relative;
  z-index: 3;
}

.footer-donate-btn-icon svg {
  width: 100%;
  height: 100%;
  filter: none;
}

.footer-donate-btn > span:last-child {
  position: relative;
  z-index: 3;
}

@media (prefers-reduced-motion: reduce) {
  .footer-social,
  .footer-donate-card,
  .footer-donate-btn,
  .footer-link {
    transition: none;
  }

  .footer-social:hover,
  .footer-donate-card:hover {
    transform: none;
  }
}

/* Topic nav buttons — Professional deep purple, clean and serious */
.btn-topic-nav {
  background: linear-gradient(145deg, #2A1F40 0%, #231A35 100%);
  color: var(--text-secondary);
  border: 1px solid #4C3D6B;
  font-weight: 600;
  border-radius: 14px;
  padding: 10px 22px;
  font-size: 0.875rem;
  box-shadow: var(--surface-tier-control-sm);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-topic-nav:hover {
  background: linear-gradient(145deg, #3D2A5C 0%, #2A1F40 100%);
  color: #E0D4FF;
  border-color: #6B21A8;
  transform: translateY(-2px);
  box-shadow: var(--surface-tier-control-sm-hover);
}

/* Navbar — floating glass shelf (floating tier) */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 50;
  background: rgba(30, 17, 53, 0.88);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(76, 61, 107, 0.65);
  box-shadow: var(--surface-tier-navbar);
  padding-top: env(safe-area-inset-top, 0px);
  padding-left: env(safe-area-inset-left, 0px);
  padding-right: env(safe-area-inset-right, 0px);
}

.nav-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.nav-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 5rem;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.nav-logo-icon {
  background: linear-gradient(145deg, #5B21B6 0%, #4C1D95 55%, #3B0764 100%);
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--surface-tier-control-sm);
}

.nav-logo:hover .nav-logo-icon {
  box-shadow: var(--surface-tier-control-sm-hover);
  transform: translateY(-1px);
}

.nav-logo-text {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  line-height: 1;
}

.nav-logo-subtitle {
  font-size: 0.65rem;
  color: var(--text-secondary);
  letter-spacing: 0.6px;
  margin-top: -1px;
  opacity: 0.9;
}

.nav-links {
  display: none;
  align-items: center;
  gap: 1.1rem;
  flex-wrap: nowrap;
}

.nav-link {
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.84rem;
  text-decoration: none;
  position: relative;
  padding-bottom: 2px;
  white-space: nowrap;
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.45rem 1rem;
  margin-left: 0.25rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: #F8FAFC;
  text-decoration: none;
  white-space: nowrap;
  background: linear-gradient(145deg, rgba(91, 33, 182, 0.95) 0%, rgba(76, 29, 149, 0.9) 100%);
  border: 1px solid rgba(124, 58, 237, 0.45);
  border-radius: 9999px;
  box-shadow: var(--surface-tier-control-sm);
}

.nav-cta:hover {
  background: linear-gradient(145deg, rgba(109, 40, 217, 0.98) 0%, rgba(91, 33, 182, 0.95) 100%);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: var(--surface-tier-control-sm-hover);
}

.nav-cta-mobile {
  margin-top: 0.5rem;
  text-align: center;
  background: rgba(91, 33, 182, 0.2);
  border: 1px solid rgba(124, 58, 237, 0.35);
  border-radius: 10px;
}

.nav-link:hover {
  color: var(--accent-violet);
}

.nav-link.active {
  color: var(--text-primary);
  font-weight: 600;
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(to right, var(--primary-navy), var(--accent-violet));
  border-radius: 2px;
}

.mobile-menu-btn:hover {
  color: var(--accent-purple);
}

/* =============================================
   MOBILE MENU — Professional dropdown for mobile
   ============================================= */
.mobile-menu {
  display: none !important;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1rem 1.5rem;
  background: #0F0A1F;
  border-top: 1px solid var(--border-subtle);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.6);
  z-index: 60;
  width: 100%;
}

.mobile-menu.open {
  display: flex !important;
}

.mobile-menu .nav-link {
  display: block;
  padding: 0.85rem 1.25rem;
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: 10px;
  transition: all 0.2s ease;
}

.mobile-menu .nav-link:hover {
  background: rgba(91, 33, 182, 0.12);
  color: #fff;
  transform: translateX(4px);
}

.mobile-menu .nav-link.active {
  background: rgba(91, 33, 182, 0.2);
  color: var(--text-primary);
  font-weight: 600;
}

/* Hamburger button — mobile only (display controlled by breakpoint) */
.mobile-menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: color 0.2s ease;
}

.mobile-menu-btn svg {
  width: 26px;
  height: 26px;
}

/* Navbar responsive behavior — single source of truth */
@media (max-width: 767px) {
  .nav-links {
    display: none !important;
  }

  .mobile-menu-btn {
    display: flex;
  }
}

@media (min-width: 768px) {
  .nav-links {
    display: flex;
  }

  .mobile-menu-btn,
  .mobile-menu,
  .mobile-menu.open {
    display: none !important;
  }
}

/* Headings */
h1, h2, h3, .section-header {
  font-family: 'Space Grotesk', sans-serif;
  letter-spacing: -0.025em;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

h1 { font-size: 2.75rem; line-height: 1.08; letter-spacing: -0.03em; color: var(--text-primary); font-weight: 700; }
h2 { font-size: 1.85rem; line-height: 1.2; letter-spacing: -0.025em; color: var(--text-primary); font-weight: 700; }
h3 { font-size: 1.35rem; line-height: 1.3; letter-spacing: -0.02em; color: var(--text-secondary); font-weight: 600; }
/* Interior page display titles — calmer than homepage brand hero */
.section-header {
  font-size: 2.35rem;
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  font-weight: 700;
}

@media (min-width: 768px) {
  h1 { font-size: 3.25rem; line-height: 1.05; letter-spacing: -0.04em; }
  .section-header { font-size: 3.1rem; letter-spacing: -0.04em; }
  h2 { font-size: 2.15rem; }
  h3 { font-size: 1.5rem; }
}

@media (min-width: 1024px) {
  h1 { font-size: 3.5rem; }
  .section-header { font-size: 3.35rem; }
}

/* Homepage brand hero keeps dramatic scale */
.page-hero-title,
.page-home .page-hero-title {
  font-size: 3.4rem;
  line-height: 0.95;
  letter-spacing: -0.04em;
  color: var(--text-primary);
  font-weight: 700;
  text-shadow: 0 2px 24px rgba(91, 33, 182, 0.35);
}

@media (min-width: 768px) {
  .page-hero-title {
    font-size: 5.5rem;
    letter-spacing: -0.055em;
  }
}

@media (min-width: 1024px) {
  .page-hero-title {
    font-size: 6.5rem;
  }
}

@media (max-width: 640px) {
  h1 { font-size: 2.15rem !important; line-height: 1.12; letter-spacing: -0.03em; }
  .section-header { font-size: 2rem !important; }
  .page-hero-title { font-size: 2.85rem !important; line-height: 1.02; }
}

/* Utility */

/* Full-bleed dividers — Robust mobile fix to prevent any horizontal overflow */
.full-bleed-divider {
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 100%;
  width: 100dvw;
  max-width: 100dvw;
  margin-left: 0;
  margin-right: 0;
  padding-left: 0 !important;
  padding-right: 0 !important;
  box-sizing: border-box;
  overflow: hidden;
}

/* Shrink divider badges on very small mobile screens to guarantee perfect fit */
@media (max-width: 480px) {
  .full-bleed-divider > div[class*="px-10"],
  .full-bleed-divider > div[class*="px-8"],
  .section-pill-wrap .section-pill,
  .section-pill-wrap .section-pill-lg {
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
    font-size: 0.7rem !important;
    letter-spacing: 0.04em !important;
    white-space: normal !important;
    max-width: 85vw;
  }
}

/* Page overrides */
.hero-gradient {
  background:
    radial-gradient(ellipse 75% 55% at 50% 0%, rgba(124, 58, 237, 0.12) 0%, transparent 62%),
    linear-gradient(180deg, rgba(124, 58, 237, 0.08) 0%, transparent 72%),
    linear-gradient(135deg, rgba(91, 33, 182, 0.05) 0%, transparent 58%),
    linear-gradient(225deg, rgba(99, 102, 241, 0.04) 0%, transparent 50%);
  background-size: 100% 100%;
  background-position: center;
}

/* Hero spotlight — soft radial glow behind title block */
.hero-spotlight {
  isolation: isolate;
}

.hero-spotlight::before {
  content: '';
  position: absolute;
  top: -8%;
  left: 50%;
  transform: translateX(-50%);
  width: min(92%, 52rem);
  height: 55%;
  background: radial-gradient(ellipse at center, rgba(124, 58, 237, 0.16) 0%, transparent 68%);
  pointer-events: none;
  z-index: 0;
}

.hero-spotlight > * {
  position: relative;
  z-index: 2;
}

header.hero-spotlight.static-card {
  box-shadow: var(--surface-tier-floating);
}

/* Premium gradient headings in hero sections for expensive feel */
.hero-gradient h1,
.hero-gradient .section-header,
header.hero-gradient h1 {
  background: var(--heading-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 700;
  letter-spacing: -0.04em;
  filter: drop-shadow(0 2px 14px rgba(91, 33, 182, 0.35));
}

/* Mounted media — picture-frame bezel (frame tier) */
.media-frame {
  position: relative;
  width: 100%;
  max-width: 28rem;
  padding: 0.35rem;
  border-radius: 1.15rem;
  background: linear-gradient(145deg, rgba(42, 31, 64, 0.5) 0%, rgba(18, 10, 46, 0.35) 100%);
  border: 1px solid rgba(124, 58, 237, 0.28);
  box-shadow: var(--surface-tier-frame);
}

.media-frame::before {
  content: '';
  position: absolute;
  inset: 0.35rem;
  border-radius: 0.95rem;
  box-shadow: var(--surface-tier-frame-inner);
  pointer-events: none;
  z-index: 2;
}

.media-frame img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 0.95rem;
  position: relative;
  z-index: 1;
  box-shadow:
    var(--surface-tier-frame-inner),
    0 8px 24px -12px rgba(0, 0, 0, 0.55);
}

.media-panel {
  position: relative;
}

.surface-media.media-frame {
  max-width: none;
}

#about .max-w-6xl .content-card {
    margin-top: 60px !important;
}

/* Source viewer polish */
.source-text-block {
    max-width: 52ch;
}

/* =============================================
   DEEP DIVE REPORT — MAXIMUM READABILITY & PROFESSIONALISM (REFINED)
   ============================================= */

#report-section .content-card {
    background: #1F1A35; /* slightly warmer, lighter deep charcoal/navy for reduced eye fatigue & premium archival feel */
    border: 1px solid #4C3D6B;
    box-shadow: 
      0 20px 50px -15px rgba(0, 0, 0, 0.6);
    position: relative;
    overflow: hidden;
}

/* Very faint paper grain texture (<2% opacity) for subtle readability depth without distraction */
#report-section .content-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: 
      linear-gradient(rgba(255,255,255,0.012) 1px, transparent 1px),
      linear-gradient(90deg, rgba(255,255,255,0.012) 1px, transparent 1px);
    background-size: 2.5px 2.5px;
    pointer-events: none;
    z-index: 1;
    border-radius: 24px; /* matches rounded-3xl in deep-dive.html */
}

#report-container {
  font-size: 1.18rem;
  line-height: 1.90;
  color: #F6F2FF; /* cooler, higher-contrast off-white for superior long-form readability on dark archival backgrounds */
  max-width: min(100%, 48rem);
  width: 100%;
  margin-left: 0;
  margin-right: 0;
  font-feature-settings: "kern" 1, "liga" 1, "ss03" 1, "ss04" 1;
  text-rendering: optimizeLegibility;
}

/* When a TOC is present, keep the body readable inside the remaining column */
.report-layout:has(.report-toc:not([hidden])) #report-container {
  max-width: min(100%, 46rem);
}

/* Desktop premium readability boost */
@media (min-width: 768px) {
  #report-container {
    font-size: 1.22rem;
  }
}

/* Mobile report polish — one horizontal gutter (outer wrap), no double padding on body text */
@media (max-width: 767px) {
  #report-section > .max-w-6xl {
    padding-left: 0.85rem;
    padding-right: 0.85rem;
  }

  #report-section .content-card:not(.dive-continue),
  #report-section .dive-report-card {
    padding: 1.15rem 1rem !important;
    border-radius: 1.15rem;
  }

  #report-section .content-card::after {
    border-radius: 1.15rem;
  }

  #report-container {
    font-size: 1.05rem;
    line-height: 1.72;
    max-width: 100%;
    padding-left: 0;
    padding-right: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
  }
}

/* Professional, calm heading hierarchy */
#report-container h1 {
  font-size: 2.35rem !important;
  font-weight: 800;
  color: var(--text-primary) !important;
  margin-top: 0.1rem;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 3px solid var(--accent-violet-hover);
  letter-spacing: -0.028em;
  font-family: 'Space Grotesk', sans-serif;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

#report-container h2 {
  font-size: 1.55rem !important;
  font-weight: 700;
  color: var(--text-secondary) !important;
  margin-top: 3.5rem;
  margin-bottom: 1.5rem;
  letter-spacing: -0.018em;
  font-family: 'Space Grotesk', sans-serif;
  padding-left: 0.85rem;
  border-left: 6px solid var(--accent-violet-hover);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.25); /* subtle depth for premium heading presence */
}

#report-container h3 {
  font-size: 1.22rem !important;
  font-weight: 600;
  color: var(--text-secondary) !important;
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
  font-family: 'Space Grotesk', sans-serif;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

#report-container p {
  margin-bottom: 1.85rem;
  color: #F6F2FF; /* slightly higher contrast for long-form premium readability */
}

#report-container strong {
  color: #A67C4C; /* accent-gold-muted for crisp, high-contrast emphasis without purple blur/fatigue */
  font-weight: 700;
  letter-spacing: -0.005em;
}

#report-container em {
  color: var(--text-secondary);
  font-style: italic;
}

#report-container ul, 
#report-container ol {
  margin-bottom: 1.75rem;
  padding-left: 1.5rem;
}

#report-container ul li {
  position: relative;
  padding-left: 0.35rem;
}

#report-container ul li::before {
  content: '•';
  color: var(--accent-violet-hover);
  font-weight: 700;
  position: absolute;
  left: -0.9rem;
}

#report-container ol li::marker {
  color: var(--accent-violet-hover);
  font-weight: 700;
}

#report-container blockquote {
  border-left: 6px solid var(--accent-violet-hover);
  background: rgba(35, 26, 60, 0.50);
  color: #E8E0FF;
  padding: 1.5rem 2rem;
  margin: 2.25rem 0;
  font-style: italic;
  border-radius: 0 12px 12px 0;
  box-shadow: inset 3px 0 0 rgba(124, 58, 237, 0.15);
}

#report-container a {
  color: var(--text-secondary);
  text-decoration-color: var(--accent-violet);
  text-underline-offset: 3px;
}

#report-container a:hover {
  color: var(--accent-violet);
  text-decoration-color: var(--text-secondary);
}

#report-container pre,
#report-container code {
  border: 1px solid rgba(124, 58, 237, 0.25);
  background: rgba(15, 10, 30, 0.6);
  color: var(--text-secondary);
  border-radius: 8px;
}

#report-container hr {
  border: none;
  height: 1px;
  background: linear-gradient(to right, transparent, #4C3D6B, transparent);
  margin: 3.5rem 0;
  opacity: 0.55;
}

#report-container th {
  background: rgba(124, 58, 237, 0.15);
  color: var(--text-secondary);
  font-weight: 600;
}

#report-container td {
  border-color: rgba(124, 58, 237, 0.2);
}

/* Back to Top — Professional floating button (visible on scroll) */
#back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: linear-gradient(135deg, #3B0764, #4C1D95);
  color: white;
  font-size: 1.5rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  box-shadow: var(--surface-tier-btn);
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
}

#back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
}

#back-to-top:hover {
  transform: translateY(-3px) scale(1.06);
  box-shadow: var(--surface-tier-btn-hover);
  background: linear-gradient(135deg, #4C1D95, #581C87);
}

#back-to-top:active {
  transform: translateY(1px) scale(0.96);
  box-shadow: var(--surface-tier-btn-active);
}

/* =============================================
   ACCESSIBILITY IMPROVEMENTS
   ============================================= */

.text-\[var(--text-secondary)\] { color: var(--text-secondary); }

#infographic-modal {
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

#infographic-modal button:focus-visible {
  outline: 4px solid var(--text-primary) !important;
  outline-offset: 4px;
  box-shadow: 0 0 0 6px rgba(168, 85, 247, 0.55);
}

#infographic-modal-close {
  box-shadow: var(--surface-tier-btn) !important;
}

#infographic-modal-close:hover {
  box-shadow: var(--surface-tier-btn-hover) !important;
}

.infographic-modal-viewport {
  overflow: hidden;
  width: 100%;
  max-width: 98vw;
  max-height: 92vh;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: none;
  border-radius: 1.5rem;
  background: rgba(15, 10, 31, 0.45);
  border: 1px solid rgba(124, 58, 237, 0.28);
  box-shadow: var(--surface-tier-floating);
}

.infographic-modal-image {
  display: block;
  max-width: 100%;
  max-height: 92vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 1.5rem;
  box-shadow:
    var(--surface-tier-frame-inner),
    0 24px 48px -20px rgba(0, 0, 0, 0.65);
  border: 1px solid rgba(124, 58, 237, 0.2);
  transition: none;
  transform-origin: center center;
  will-change: transform, width, height;
  cursor: zoom-in;
  user-select: none;
  -webkit-user-drag: none;
  image-rendering: auto;
}

#back-to-top:focus-visible {
  outline: 3px solid var(--text-primary);
  outline-offset: 4px;
}

.btn-primary:focus-visible,
.btn-secondary:focus-visible,
.text-link:focus-visible,
.btn-topic-nav:focus-visible,
.nav-link:focus-visible,
.nav-cta:focus-visible,
.topic-control-btn:focus-visible,
a.content-card:focus-visible,
a.channel-card:focus-visible,
a.source-card:focus-visible,
a.journey-card:focus-visible,
.codex-search-card:focus-visible {
  outline: 2px solid #7C3AED;
  outline-offset: 3px;
  box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.35);
}

iframe:focus-visible {
  outline: 3px solid var(--accent-violet);
  outline-offset: 2px;
}

/* =============================================
   CONSOLIDATED REUSABLE CLASSES
   ============================================= */

.source-card {
  padding: 2rem;
  display: block;
  text-decoration: none;
}

/* =============================================
   SCROLL ANIMATIONS (Intersection Observer driven)
   ============================================= */

/* Scroll-triggered fade-in + lift for content cards (static cards excluded for calm professional feel) */
.section-card:not(.channel-card) {
  opacity: 0;
  transform: translateY(25px);
  transition: opacity 0.65s cubic-bezier(0.4, 0, 0.2, 1), 
              transform 0.65s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 0.65s ease;
}

.section-card.visible:not(.channel-card) {
  opacity: 1;
  transform: translateY(0);
  box-shadow: 0 12px 35px -12px var(--glow);
}

/* =============================================
   MICRO-INTERACTIONS & LOADING FEEDBACK (Premium Feel)
   ============================================= */

/* Enhanced crisp focus states for all interactive elements */
button:focus-visible,
a:focus-visible,
[role="button"]:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid #7C3AED;
  outline-offset: 3px;
  box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.2);
  transition: box-shadow 0.15s ease;
}

/* =============================================
   SOURCE VIEWER — 3D TOPIC BUTTONS (Premium Archive Treatment)
   Subtler material depth, realistic matte cardstock/metal finish, calm premium lift
   ============================================= */

/* Large root topic cards — premium professional entry points with refined 3D depth */
.topic-root-card {
  background: #1A1433;
  border: none;
  border-radius: 18px;
  padding: 1.7rem 1.9rem;
  box-shadow: var(--surface-tier-elevated);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  max-width: 100%;
  min-height: 215px;
  height: auto !important;
}

/* Subtle consistent top-edge highlight (1-2px white gradient <10% opacity) — visible resting, brightens on hover */
.topic-root-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    var(--gloss-surface),
    linear-gradient(to right, rgba(255, 255, 255, 0.08) 0%, transparent 12%);
  border-radius: 18px;
  pointer-events: none;
  z-index: 1;
}

.topic-root-card:hover {
  transform: translateY(-4px) scale(1.008);
  box-shadow: var(--surface-tier-topic-hover);
}

/* Refined typography hierarchy & breathing room for premium tile feel */
.topic-root-card h3 {
  font-weight: 700;
  letter-spacing: -0.028em;
  line-height: 1.05;
}

.topic-root-card .root-icon {
  width: 100px;
  height: 100px;
  font-size: 2.8rem;
  background: #120A2E;
  border: 2px solid var(--accent-violet);
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #E0D4FF;
  flex-shrink: 0;
  box-shadow: 0 10px 30px rgba(91, 33, 182, 0.35);
  overflow: hidden;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease;
  margin-right: 0.35rem; /* refined breathing room */
}

.topic-root-card:hover .root-icon {
  transform: scale(1.03);
  box-shadow: 0 14px 40px rgba(91, 33, 182, 0.42);
  border-color: #8B3DFF;
}

.topic-root-card .root-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 16px;
  display: block;
}

.topic-root-card .explore-badge {
  background: linear-gradient(145deg, #3B0764 0%, #4C1D95 100%);
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  padding: 9px 22px;
  border-radius: 14px;
  box-shadow: 0 4px 10px -3px rgba(59, 7, 100, 0.4);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.topic-root-card:hover .explore-badge {
  background: linear-gradient(145deg, #4C1D95 0%, #581C87 100%);
  transform: scale(1.02);
  box-shadow: 0 6px 14px -4px rgba(59, 7, 100, 0.42);
}

/* Category toggle buttons — Clean professional deep purple with refined 3D */
.category-toggle {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0.9rem 1.5rem;
  background: linear-gradient(145deg, #2A1F40 0%, #231A35 100%);
  border: none;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.97rem;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  position: relative;
  overflow: hidden;
  box-shadow: var(--surface-tier-control);
}

/* Subtle top-edge highlight */
.category-toggle::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(255,255,255,0.075) 0%, transparent 52%);
  border-radius: 12px;
  pointer-events: none;
  z-index: 1;
}

.category-toggle:hover {
  background: linear-gradient(145deg, #3D2A5C 0%, #2A1F40 100%);
  border-color: #6B21A8;
  color: #E0D4FF;
  transform: translateY(-3px) scale(1.008);
  box-shadow: var(--surface-tier-control-hover);
}

.category-toggle:active {
  transform: translateY(-2px) scale(0.995);
  box-shadow: 
    0 6px 14px -6px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.category-toggle .chevron {
  font-size: 1.05rem;
  color: var(--accent-violet);
  transition: transform 0.25s ease;
  position: relative;
  z-index: 2;
}

.category-toggle:hover .chevron {
  transform: translateX(4px);
}

/* Leaf topic buttons (pills) — Premium refined 3D with generous whitespace */
.topic-leaf-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 11px 20px;
  min-height: 44px;
  background: linear-gradient(145deg, #2A1F40 0%, #231A35 100%);
  border: none;
  border-radius: 14px;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: -0.008em;
  color: var(--text-primary);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
  box-shadow: var(--surface-tier-control);
}

/* Subtle top-edge highlight */
.topic-leaf-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gloss-surface);
  border-radius: 14px;
  pointer-events: none;
  z-index: 1;
}

.topic-leaf-btn:hover {
  transform: translateY(-3px) scale(1.008);
  background: linear-gradient(145deg, #3D2A5C 0%, #2A1F40 100%);
  border-color: #6B21A8;
  color: #E0D4FF;
  box-shadow: var(--surface-tier-control-hover);
}

.topic-leaf-btn:active {
  transform: translateY(-1px) scale(0.985);
  box-shadow: 
    0 5px 12px -5px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

/* Inner text highlight on hover for leaf buttons */
.topic-leaf-btn:hover span {
  color: #fff;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

/* =============================================
   PRINT / PDF — REPORT ONLY
   Only the deep-dive report body prints (no hero, media, videos,
   "Continue learning", prev/next, footer, or page chrome).
   Uses display:none (not visibility:hidden) so hidden blocks
   take no page space and the PDF ends when the report ends.
   ============================================= */
@media print {
  @page {
    margin: 0.7in;
  }

  html,
  body {
    background: #ffffff !important;
    color: #111111 !important;
    height: auto !important;
    min-height: 0 !important;
    overflow: visible !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  /* Drop all page chrome / non-report siblings from the layout */
  body > *:not(main),
  main > *:not(#report-section),
  .section-nav-sticky,
  .reading-progress,
  .navbar,
  .mobile-menu,
  .site-footer,
  #infographic-modal,
  .skip-link,
  #back-to-top {
    display: none !important;
  }

  main,
  #report-section {
    display: block !important;
    position: static !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #ffffff !important;
    min-height: 0 !important;
  }

  /* Chrome that lives inside #report-section (must beat .content-card rules below) */
  #report-section .section-pill-wrap,
  #report-section .dive-section-head,
  #report-section .report-study-toolbar,
  #report-section .report-toc,
  #report-section .report-toc-mobile,
  #report-section .report-toc-inner,
  #report-section .topic-prev-next,
  #report-section .dive-continue,
  #report-section aside.dive-continue,
  #report-section .dive-continue.content-card,
  #report-section .dive-continue * {
    display: none !important;
  }

  #report-section .max-w-6xl,
  #report-section .content-card:not(.dive-continue),
  #report-section .report-layout,
  #report-section .report-main,
  #report-section .dive-report-card {
    display: block !important;
    max-width: none !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #ffffff !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
  }

  #report-section .content-card::before,
  #report-section .content-card::after {
    display: none !important;
    content: none !important;
  }

  #report-container {
    display: block !important;
    max-width: 100% !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    color: #111111 !important;
    font-size: 11pt !important;
    line-height: 1.65 !important;
    background: #ffffff !important;
  }

  #report-container h1,
  #report-container h2,
  #report-container h3 {
    color: #000000 !important;
    text-shadow: none !important;
    page-break-after: avoid;
    break-after: avoid;
  }

  #report-container h1 {
    border-bottom: 2px solid #333 !important;
  }

  #report-container h2 {
    border-left: 4px solid #555 !important;
    padding-left: 0.6rem !important;
  }

  #report-container p,
  #report-container ul,
  #report-container ol,
  #report-container li,
  #report-container strong,
  #report-container em,
  #report-container span,
  #report-container blockquote,
  #report-container .term-card__def {
    color: #222222 !important;
  }

  #report-container strong,
  #report-container .term-card__term {
    color: #6b4a1e !important;
  }

  #report-container blockquote {
    background: #f5f5f5 !important;
    border-left-color: #666 !important;
    color: #222 !important;
  }

  #report-container pre,
  #report-container code {
    background: #f4f4f5 !important;
    color: #111111 !important;
    border-color: #d1d5db !important;
  }

  #report-container .term-card-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 0.5rem !important;
  }

  #report-container .term-card {
    break-inside: avoid;
    border: 1px solid #cccccc !important;
    background: #fafafa !important;
    box-shadow: none !important;
    padding: 0.65rem 0.75rem !important;
  }

  #report-container .term-card__term {
    text-shadow: none !important;
    border: 0 !important;
  }
}

/* =============================================
   DYNAMIC THEME ACCENTS — Subtle 3D Breathing Effect (Professional, Non-Neon, No Overwhelm)
   Uses lightweight CSS keyframes for hover/scroll-responsive depth without JS or neon
   ============================================= */

/* Subtle breathing glow on interactive cards for 3D "living" premium feel */
.channel-card,
.memory-card,
.content-card,
.topic-root-card,
.lesson-content-card {
  transition: border-color 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
              box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Hero gradient — static atmospheric depth */
.hero-gradient {
  background-size: 100% 100%;
}

/* Subtle border shift on topic nav and buttons for dynamic accent */
.btn-topic-nav:hover,
.category-toggle:hover {
  border-color: var(--accent-indigo-cool);
}

/* =============================================
   BREADCRUMBS, TOPIC FILTERS & ARCHIVE PROGRESS
   ============================================= */
.breadcrumb-link {
  display: inline-flex;
  align-items: center;
  padding: 0.22rem 0.6rem;
  border-radius: 9999px;
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  background: linear-gradient(180deg, rgba(42, 31, 64, 0.5) 0%, rgba(26, 20, 51, 0.4) 100%);
  border: 1px solid rgba(76, 61, 107, 0.45);
  box-shadow: var(--surface-tier-chip);
}

.breadcrumb-link:hover {
  color: var(--text-primary);
  border-color: rgba(124, 58, 237, 0.45);
  box-shadow: var(--surface-tier-chip-hover);
  transform: translateY(-1px);
}

.topics-filter-panel {
  background: var(--card-bg);
  border: 1px solid #4C3D6B;
  box-shadow: var(--surface-tier-recessed-tray);
  position: relative;
  overflow: hidden;
  padding: 1.15rem 1.35rem;
  min-height: unset !important;
  height: auto !important;
  cursor: default;
  transform: none !important;
  display: block !important;
  flex-direction: unset !important;
}

.topics-filter-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gloss-surface);
  border-radius: inherit;
  pointer-events: none;
}

.topics-filter-panel:hover {
  transform: none !important;
  border-color: #4C3D6B !important;
  box-shadow: var(--surface-tier-recessed-tray) !important;
}

.topics-filter-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid rgba(76, 61, 107, 0.45);
}

.topics-filter-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.topics-filter-subtitle {
  margin-top: 0.2rem;
  font-size: 0.8rem;
  color: #A78BFA;
  line-height: 1.4;
}

.topics-filter-summary {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.35rem 0.75rem;
  border-radius: 9999px;
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.2);
  font-size: 0.72rem;
  color: #C4B5FD;
  white-space: nowrap;
}

.topics-filter-stat strong {
  color: #EDE4FF;
  font-weight: 700;
}

.topics-filter-stat-divider {
  width: 1px;
  height: 0.85rem;
  background: rgba(76, 61, 107, 0.8);
}

.topics-filter-toolbar {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.topics-filter-section {
  display: grid;
  grid-template-columns: minmax(4.5rem, auto) 1fr;
  gap: 0.65rem 1rem;
  align-items: start;
}

.topics-filter-label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #6366F1;
  padding-top: 0.45rem;
}

.topics-filter-btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.topics-filter-btn-group--scroll {
  max-height: 7.5rem;
  overflow-y: auto;
  padding-right: 0.25rem;
  scrollbar-width: thin;
  scrollbar-color: #4C3D6B transparent;
}

@media (min-width: 900px) {
  .topics-filter-panel {
    padding: 1.25rem 1.5rem;
  }

  .topics-filter-toolbar {
    display: grid;
    grid-template-columns: minmax(220px, 0.9fr) minmax(0, 1.4fr);
    gap: 1.25rem 2rem;
    align-items: start;
  }

  .topics-filter-section--status {
    padding-right: 1.25rem;
    border-right: 1px solid rgba(76, 61, 107, 0.4);
  }

  .topics-filter-btn-group--scroll {
    max-height: none;
    overflow: visible;
  }
}

.topic-control-btn,
.network-filter-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.95rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.3px;
  color: #C4B5FD;
  background: linear-gradient(180deg, #221A42 0%, #1A1433 100%);
  border: 1px solid #4C3D6B;
  cursor: pointer;
  box-shadow: var(--surface-tier-control-sm);
}

.network-filter-btn {
  min-height: 2.75rem;
}

.topic-control-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.35rem;
  height: 1.15rem;
  padding: 0 0.3rem;
  border-radius: 9999px;
  font-size: 0.62rem;
  font-weight: 700;
  color: #A78BFA;
  background: rgba(255, 255, 255, 0.06);
}

.topic-control-btn.active .topic-control-count {
  color: #EDE4FF;
  background: rgba(255, 255, 255, 0.14);
}

.topic-control-btn-sm {
  font-size: 0.68rem;
  padding: 0.42rem 0.85rem;
}

.topic-control-btn:hover,
.network-filter-btn:hover {
  color: #F8FAFC;
  border-color: var(--accent-violet-hover);
  transform: translateY(-2px);
  box-shadow: var(--surface-tier-control-sm-hover);
}

.topic-control-btn.active,
.network-filter-btn.active {
  color: #F8FAFC;
  background: linear-gradient(180deg, #5B21B6 0%, #4C1D95 100%);
  border-color: #7C3AED;
  box-shadow: var(--surface-tier-control-active);
}

.topic-control-btn:active,
.network-filter-btn:active {
  transform: translateY(0);
}

.archive-progress-bar {
  height: 6px;
  border-radius: 9999px;
  background: rgba(76, 61, 107, 0.5);
  overflow: hidden;
}

.archive-progress-fill {
  height: 100%;
  border-radius: 9999px;
  background: linear-gradient(90deg, #5B21B6, #7C3AED);
  transition: width 0.9s cubic-bezier(0.4, 0, 0.2, 1);
  width: 0;
}

.archive-progress-fill[data-progress]:not([style*="width"]) {
  width: 0;
}

/* =============================================
   CODEX ARCHIVE — Stats, search, topic results
   ============================================= */
.codex-stats-bar {
  padding: 1.35rem 1.5rem;
}

.codex-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1.25rem;
}

@media (min-width: 768px) {
  .codex-stats-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.codex-stat {
  text-align: center;
  padding: 0.75rem 0.5rem;
  border-radius: 12px;
  background: rgba(91, 33, 182, 0.08);
  border: 1px solid rgba(124, 58, 237, 0.15);
}

.codex-stat-value {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
}

.codex-stat-label {
  margin-top: 0.35rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.03em;
}

.codex-toolbar {
  padding: 1.25rem 1.5rem;
  border-radius: 1rem;
}

.codex-toolbar-header {
  margin-bottom: 1rem;
}

.codex-search-row {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

@media (min-width: 768px) {
  .codex-search-row {
    flex-direction: row;
    align-items: stretch;
  }
}

.codex-search-field {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex: 1;
  min-width: 0;
  padding: 0.65rem 1rem;
  border-radius: 14px;
  border: 1px solid var(--border-subtle);
  background: rgba(15, 10, 31, 0.55);
  box-shadow: var(--surface-tier-recessed);
}

.codex-search-field:focus-within {
  border-color: var(--accent-violet-hover);
  box-shadow:
    var(--surface-tier-recessed),
    0 0 0 2px rgba(124, 58, 237, 0.2);
}

.codex-search-icon {
  color: var(--text-muted);
  font-size: 1.1rem;
  line-height: 1;
  flex-shrink: 0;
}

.codex-search-input {
  width: 100%;
  border: none;
  background: transparent;
  color: var(--text-primary);
  font-size: 0.95rem;
  outline: none;
}

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

.codex-sort-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.codex-sort-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.codex-sort-select {
  appearance: none;
  padding: 0.65rem 2rem 0.65rem 0.85rem;
  border-radius: 14px;
  border: 1px solid var(--border-subtle);
  background: rgba(15, 10, 31, 0.55) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23A78BFA' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 0.75rem center;
  color: var(--text-primary);
  font-size: 0.9rem;
  cursor: pointer;
  box-shadow: var(--surface-tier-recessed);
}

.codex-sort-select:focus {
  outline: none;
  border-color: var(--accent-violet-hover);
  box-shadow:
    var(--surface-tier-recessed),
    0 0 0 2px rgba(124, 58, 237, 0.2);
}

.codex-source-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.codex-meta-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 9999px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text-soft);
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.22);
}

.codex-meta-pill--soon {
  color: #FCD34D;
  background: rgba(251, 191, 36, 0.1);
  border-color: rgba(251, 191, 36, 0.25);
}

.codex-topic-results-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
}

@media (min-width: 768px) {
  .codex-topic-results-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .codex-topic-results-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.codex-topic-result {
  display: block;
  padding: 1.1rem 1.2rem;
  text-decoration: none;
  min-height: 0;
  height: auto !important;
}

.codex-topic-result-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.codex-topic-result:hover {
  transform: translateY(-3px);
}

.codex-empty-state,
.codex-loading {
  text-align: center;
  padding: 2.5rem 1.5rem;
  color: var(--text-muted);
}

.codex-loading {
  grid-column: 1 / -1;
}

/* =============================================
   WAVE 1 — Skeletons, search cards, deep-dive hero
   ============================================= */
@keyframes skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton {
  border-radius: 10px;
  background: linear-gradient(
    90deg,
    rgba(76, 61, 107, 0.35) 0%,
    rgba(124, 58, 237, 0.18) 50%,
    rgba(76, 61, 107, 0.35) 100%
  );
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.6s ease-in-out infinite;
  box-shadow: var(--surface-tier-recessed);
  border: 1px solid rgba(76, 61, 107, 0.35);
}

.skeleton-bar {
  height: 0.85rem;
  margin-bottom: 0.65rem;
}

.skeleton-block {
  width: 100%;
  margin-bottom: 0.75rem;
}

.skeleton-block--image {
  aspect-ratio: 4 / 3;
  border-radius: 1.25rem;
  min-height: 12rem;
}

.skeleton-panel {
  padding: 1.5rem;
}

.skeleton-grid {
  display: grid;
  gap: 1rem;
}

.skeleton-grid--4 {
  grid-template-columns: repeat(2, 1fr);
  margin-bottom: 1.25rem;
}

@media (min-width: 768px) {
  .skeleton-grid--4 {
    grid-template-columns: repeat(4, 1fr);
  }
}

.skeleton-grid--sources {
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .skeleton-grid--sources {
    grid-template-columns: repeat(2, 1fr);
  }
}

.skeleton-grid--header {
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 768px) {
  .skeleton-grid--header {
    grid-template-columns: 1.2fr 0.8fr;
    align-items: start;
  }
}

.skeleton-grid--media {
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .skeleton-grid--media {
    grid-template-columns: 1fr 1fr;
  }
}

.skeleton-source-card {
  padding: 1.25rem;
}

.skeleton-category-card {
  padding: 1.5rem;
}

.skeleton-hero-band {
  height: 14rem;
  border-radius: 1.5rem;
  margin-top: 1rem;
}

@media (min-width: 768px) {
  .skeleton-hero-band {
    height: 18rem;
  }
}

.skeleton-media-block {
  height: 16rem;
  border-radius: 1.25rem;
}

/* Thumbnail search cards */
.codex-search-card {
  display: grid;
  grid-template-columns: 5.5rem 1fr;
  gap: 0.85rem;
  padding: 0.85rem;
  text-decoration: none;
  min-height: 0;
  height: auto !important;
  align-items: stretch;
}

@media (min-width: 640px) {
  .codex-search-card {
    grid-template-columns: 6.5rem 1fr;
    gap: 1rem;
    padding: 1rem;
  }
}

.codex-search-card-thumb {
  border-radius: 12px;
  overflow: hidden;
  background: rgba(15, 10, 31, 0.8);
  border: 1px solid rgba(124, 58, 237, 0.2);
  min-height: 5rem;
  position: relative;
  box-shadow: var(--surface-tier-control-sm);
}

.codex-search-card-thumb--fallback {
  background: linear-gradient(135deg, rgba(91, 33, 182, 0.25), rgba(26, 20, 51, 0.9));
}

.codex-search-card-thumb--fallback::after {
  content: '◈';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 1.25rem;
  opacity: 0.6;
}

.codex-search-card-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 5rem;
}

.codex-search-card-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.codex-search-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
}

.codex-search-card-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.25;
  transition: color 0.2s ease;
}

.codex-search-card:hover .codex-search-card-title {
  color: var(--accent-indigo);
}

.codex-search-card-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.codex-search-card-path {
  font-size: 0.7rem;
  color: var(--text-soft);
  margin-top: auto;
  padding-top: 0.45rem;
}

/* Deep-dive cinematic hero */
.deep-dive-hero {
  position: relative;
  border-radius: 1.5rem;
  overflow: hidden;
  margin-bottom: 0;
  min-height: 18rem;
  border: 1px solid rgba(124, 58, 237, 0.25);
  box-shadow: 0 20px 50px -12px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(124, 58, 237, 0.08);
}

@media (min-width: 768px) {
  .deep-dive-hero {
    min-height: 22rem;
  }
}

.deep-dive-hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.02);
  filter: saturate(1.05);
}

.deep-dive-hero-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(15, 10, 31, 0.82) 0%,
    rgba(26, 20, 51, 0.62) 45%,
    rgba(15, 10, 31, 0.78) 100%
  );
}

.deep-dive-hero-content {
  position: relative;
  z-index: 1;
  padding: 2rem 1.5rem 2.25rem;
}

@media (min-width: 768px) {
  .deep-dive-hero-content {
    padding: 2.5rem 2.5rem 2.75rem;
  }
}

.deep-dive-hero-accent {
  width: 3.5rem;
  height: 3px;
  border-radius: 9999px;
  background: linear-gradient(90deg, var(--accent-gold-muted), var(--accent-gold-reverence));
  margin: 0.75rem 0 1rem;
}

.deep-dive-hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 1rem;
}

.deep-dive-reading-time {
  font-size: 0.75rem;
  color: var(--text-soft);
  letter-spacing: 0.04em;
}

/* Hero action hierarchy: segments → primary quiz → quiet text links */
.dive-hero-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.15rem;
  max-width: 100%;
}

.dive-hero-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.15rem;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  width: 100%;
  max-width: 36rem;
}

.dive-hero-link {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.35rem;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--text-muted);
  background: transparent;
  border: 0;
  border-radius: 0.35rem;
  cursor: pointer;
  text-decoration: none;
  transition: color 0.15s ease;
}

.dive-hero-link:hover,
.dive-hero-link:focus-visible {
  color: #e8e0ff;
  outline: none;
}

.dive-hero-link:focus-visible {
  box-shadow: 0 0 0 2px rgba(167, 139, 250, 0.45);
}

.dive-hero-link-sep {
  color: rgba(184, 176, 212, 0.35);
  font-size: 0.75rem;
  user-select: none;
  padding: 0 0.1rem;
}

.share-menu--inline {
  display: inline-flex;
  position: relative;
}

.share-menu--inline .share-menu__toggle {
  font: inherit;
}

.deep-dive-quiz-cta {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.55rem;
  max-width: min(100%, 28rem);
  min-width: 0;
  margin: 0;
}

/* Section headers — same family as segment control (not mixed pill chrome) */
.dive-section-head {
  display: flex;
  align-items: center;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 1.75rem;
  scroll-margin-top: calc(5rem + 3.25rem + 0.5rem + env(safe-area-inset-top, 0px));
}

@media (min-width: 768px) {
  .dive-section-head {
    scroll-margin-top: calc(5rem + 3.25rem + 0.65rem + env(safe-area-inset-top, 0px));
  }
}

.dive-section-head__line {
  flex: 1;
  height: 1px;
  background: linear-gradient(
    to right,
    transparent 0%,
    rgba(139, 61, 255, 0.12) 30%,
    rgba(139, 61, 255, 0.35) 50%,
    rgba(139, 61, 255, 0.12) 70%,
    transparent 100%
  );
}

.dive-section-head__label {
  flex-shrink: 0;
  padding: 0.4rem 1.15rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #c4b8e8;
  border: 1px solid rgba(139, 61, 255, 0.3);
  border-radius: 9999px;
  background: #16102a;
  white-space: nowrap;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

@media (max-width: 639px) {
  .dive-section-head__label {
    font-size: 0.62rem;
    letter-spacing: 0.08em;
    padding: 0.38rem 0.75rem;
    white-space: normal;
    text-align: center;
    max-width: 70vw;
  }
}

/* Media grid — equal frames, less empty void */
.dive-media-grid {
  align-items: stretch;
}

.dive-media-card {
  min-height: 100%;
  background: rgba(22, 16, 42, 0.92) !important;
  border-color: rgba(139, 61, 255, 0.28) !important;
}

.dive-media-card__scrim,
.dive-media-card .dive-media-card__scrim {
  min-height: 260px;
  background: #0c0818;
}

@media (min-width: 768px) {
  .dive-media-card__scrim,
  .dive-media-card .dive-media-card__scrim {
    min-height: 380px;
  }
}

.dive-media-card .infographic-artifact,
.dive-media-card .slide-deck-artifact {
  width: 100%;
  height: 100%;
  min-height: inherit;
}

.dive-media-card .infographic-artifact img,
.dive-media-card .slide-deck-artifact img {
  object-fit: contain;
  background: #0c0818;
}

/* Video cards */
.dive-video-grid {
  align-items: stretch;
}

.dive-video-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: rgba(22, 16, 42, 0.92) !important;
  border-color: rgba(139, 61, 255, 0.28) !important;
  transition: border-color 0.2s ease;
}

.dive-video-card:hover {
  border-color: rgba(167, 139, 250, 0.4) !important;
  transform: none !important;
}

.dive-video-card__frame {
  flex-shrink: 0;
  background: #0c0818;
}

.dive-video-card__title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin: 0.85rem 0 0;
  line-height: 1.35;
}

.dive-video-card__desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin: 0.4rem 0 0;
  line-height: 1.5;
}

/* Report card / study toolbar calm rail */
.dive-report-card {
  position: relative;
}

.report-study-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  margin: 0 0 1.1rem;
  padding: 0 0 0.85rem;
  border-bottom: 1px solid rgba(124, 58, 237, 0.18);
  background: transparent;
  border-radius: 0;
  position: static;
}

.report-study-btn {
  min-height: 2rem;
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #b8b0d4;
  background: rgba(15, 10, 31, 0.65);
  border: 1px solid rgba(139, 61, 255, 0.28);
}

.report-study-btn:hover {
  color: #f0ebff;
  background: rgba(40, 30, 72, 0.85);
  border-color: rgba(139, 61, 255, 0.42);
}

.report-toc-inner {
  background: rgba(15, 10, 31, 0.55) !important;
  border: 1px solid rgba(139, 61, 255, 0.22);
  box-shadow: none;
}

/* Override global .btn-primary nowrap so long topic titles wrap on mobile */
.deep-dive-quiz-cta__btn,
.deep-dive-quiz-cta .btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  max-width: 100%;
  height: auto;
  min-height: 3rem;
  padding: 0.75rem 1.15rem;
  white-space: normal;
  text-align: center;
  box-sizing: border-box;
}

.deep-dive-quiz-cta__btn > svg,
.deep-dive-quiz-cta__btn > .card-icon-sm,
.deep-dive-quiz-cta .btn-primary > svg,
.deep-dive-quiz-cta .btn-primary > .card-icon-sm {
  flex-shrink: 0;
}

.deep-dive-quiz-cta__btn span,
.deep-dive-quiz-cta .btn-primary span {
  white-space: normal;
  overflow-wrap: break-word;
  word-break: break-word;
  line-height: 1.3;
  min-width: 0;
  flex: 1 1 auto;
}

.deep-dive-quiz-cta__btn:hover span,
.deep-dive-quiz-cta .btn-primary:hover span {
  transform: none;
}

.deep-dive-quiz-cta__desc {
  margin: 0;
  max-width: 100%;
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--text-muted);
}

@media (min-width: 640px) {
  .deep-dive-quiz-cta {
    align-items: flex-start;
  }

  .deep-dive-quiz-cta__btn,
  .deep-dive-quiz-cta .btn-primary {
    width: auto;
    max-width: min(100%, 28rem);
  }
}

/* Dive section jump — professional segmented control (one system for hero + sticky) */
.dive-jump-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.55rem;
}

.jump-to-pills,
.dive-section-seg {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 0.12rem;
  padding: 0.28rem;
  border-radius: 9999px;
  background: rgba(15, 10, 31, 0.72);
  border: 1px solid rgba(139, 61, 255, 0.28);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 6px 18px -12px rgba(0, 0, 0, 0.55);
  max-width: 100%;
  box-sizing: border-box;
  /* visible so active pill radius isn't clipped; track still contains layout */
  overflow: visible;
}

.btn-jump-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.48rem 0.95rem;
  border-radius: 9999px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #b8b0d4;
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  box-shadow: none;
  transform: none;
  transition: color 0.18s ease, background 0.18s ease, border-color 0.18s ease;
  white-space: nowrap;
  min-height: 2.15rem;
  min-width: 0;
  flex: 1 1 auto;
  box-sizing: border-box;
  line-height: 1.15;
}

.btn-jump-pill:hover {
  color: #f0ebff;
  background: rgba(91, 33, 182, 0.22);
  border-color: transparent;
  box-shadow: none;
  transform: none;
}

/* Active segment — violet (site primary), never gold */
.btn-jump-pill.is-active,
.btn-jump-pill.active,
.jump-to-pills .btn-jump-pill.is-active,
.jump-to-pills .btn-jump-pill.active,
.section-nav-sticky .btn-jump-pill.is-active,
.section-nav-sticky .btn-jump-pill.active {
  color: #f5f0ff;
  background: linear-gradient(180deg, rgba(109, 40, 217, 0.72) 0%, rgba(76, 29, 149, 0.78) 100%);
  border-color: rgba(167, 139, 250, 0.35);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transform: none;
}

.btn-jump-pill:focus-visible {
  outline: 2px solid rgba(167, 139, 250, 0.65);
  outline-offset: 2px;
}

/* Infographic artifact frame */
.infographic-artifact {
  position: relative;
  width: 100%;
  height: 100%;
  cursor: pointer;
  border-radius: 1rem;
  overflow: hidden;
  border: 1px solid rgba(124, 58, 237, 0.35);
  box-shadow:
    var(--surface-tier-frame),
    inset 0 0 40px rgba(124, 58, 237, 0.08);
}

.infographic-artifact img {
  width: 100%;
  height: auto;
  max-height: 520px;
  object-fit: contain;
  transition: transform 0.35s ease;
}

.infographic-artifact:hover img {
  transform: scale(1.02);
}

.infographic-artifact-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0.65rem 1rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-soft);
  background: linear-gradient(to top, rgba(15, 10, 31, 0.95), transparent);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.infographic-artifact-zoom {
  opacity: 0.7;
  font-size: 0.85rem;
}

/* Slide deck preview — matches infographic artifact treatment */
.slide-deck-artifact {
  position: relative;
  width: 100%;
  height: 100%;
  cursor: pointer;
  border-radius: 1rem;
  overflow: hidden;
  border: 1px solid rgba(124, 58, 237, 0.35);
  box-shadow:
    var(--surface-tier-frame),
    inset 0 0 40px rgba(124, 58, 237, 0.08);
  background: #120A2E;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.slide-deck-artifact:hover {
  border-color: rgba(167, 139, 250, 0.55);
  box-shadow:
    var(--surface-tier-elevated-hover),
    inset 0 0 40px rgba(124, 58, 237, 0.12);
}

.slide-deck-artifact img {
  width: 100%;
  height: auto;
  max-height: 520px;
  object-fit: contain;
  display: block;
  transition: transform 0.35s ease;
}

.slide-deck-artifact:hover img {
  transform: scale(1.02);
}

.slide-deck-artifact-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0.65rem 1rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-soft);
  background: linear-gradient(to top, rgba(15, 10, 31, 0.95), transparent);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.slide-deck-artifact-action {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  opacity: 0.85;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
}

.slide-deck-artifact:hover .slide-deck-artifact-action {
  opacity: 1;
  color: var(--text-primary);
}

.slide-deck-download-btn {
  margin-top: 0.15rem;
}

#pdf-preview-container .slide-deck-artifact {
  min-height: 100%;
}

/* Report layout — single column by default.
   Only switch to TOC + body when a visible TOC sidebar is present.
   (Static dive pages have no TOC; a bare 220px 1fr grid was crushing text into the first track.) */
.report-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  align-items: start;
  width: 100%;
}

.report-main {
  min-width: 0;
  width: 100%;
}

@media (min-width: 1024px) {
  .report-layout:has(.report-toc:not([hidden])) {
    grid-template-columns: minmax(180px, 220px) minmax(0, 1fr);
    gap: 2rem;
  }
}

.report-toc {
  display: none;
}

@media (min-width: 1024px) {
  .report-toc:not([hidden]) {
    display: block;
    position: sticky;
    top: 6.5rem;
    max-height: calc(100vh - 8rem);
    overflow-y: auto;
  }
}

.report-toc-inner {
  padding: 1rem 1.1rem;
}

.report-toc-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.report-toc-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.report-toc-item--h3 .report-toc-link {
  padding-left: 0.85rem;
  font-size: 0.78rem;
}

.report-toc-link {
  display: block;
  padding: 0.35rem 0;
  font-size: 0.82rem;
  color: var(--text-muted);
  text-decoration: none;
  line-height: 1.35;
  border-left: 2px solid transparent;
  padding-left: 0.5rem;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.report-toc-link:hover,
.report-toc-link.active {
  color: var(--text-primary);
  border-left-color: var(--accent-violet-hover);
}

.report-toc-mobile {
  display: block;
  margin-bottom: 1.25rem;
}

@media (min-width: 1024px) {
  .report-toc-mobile {
    display: none;
  }
}

/* Collapsible topic sections */
.topic-section-group {
  margin-bottom: 1.5rem;
}

.topic-section-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  max-width: 36rem;
}

.category-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.65rem;
  border-radius: 12px;
  border: 1px solid rgba(124, 58, 237, 0.25);
  background: rgba(91, 33, 182, 0.12);
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s ease;
  flex: 1;
  min-width: 0;
  text-align: left;
}

.category-toggle-btn:hover {
  border-color: var(--accent-violet-hover);
  background: rgba(91, 33, 182, 0.22);
}

.category-toggle-btn .chevron {
  flex-shrink: 0;
  transition: transform 0.25s ease;
  color: var(--text-muted);
}

.topic-section-group[data-expanded="true"] .category-toggle-btn .chevron {
  transform: rotate(90deg);
}

.topic-section-link {
  flex-shrink: 0;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  text-decoration: none;
  padding: 0.4rem 0.65rem;
  border-radius: 9999px;
  border: 1px solid rgba(124, 58, 237, 0.2);
  transition: color 0.2s ease, border-color 0.2s ease;
}

.topic-section-link:hover {
  color: var(--text-primary);
  border-color: var(--accent-violet-hover);
}

.topic-section-children {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  padding-left: 1rem;
  border-left: 2px solid rgba(124, 58, 237, 0.15);
  margin-left: 0.35rem;
  overflow: hidden;
  transition: max-height 0.35s ease, opacity 0.25s ease;
}

.topic-section-group[data-expanded="false"] .topic-section-children {
  max-height: 0 !important;
  opacity: 0;
  margin-bottom: 0;
  padding-top: 0;
  padding-bottom: 0;
  border-left-color: transparent;
}

@media (min-width: 640px) {
  .topic-section-children {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .topic-section-children {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Homepage — hero, chapters, essence, codex panel */
.hero-home-grid {
  display: grid;
  gap: 2rem;
  align-items: center;
  text-align: left;
}

@media (min-width: 900px) {
  .hero-home-grid {
    grid-template-columns: 1.05fr 0.95fr;
    gap: 2.5rem;
  }
}

.home-display {
  font-size: clamp(3.25rem, 10vw, 5.5rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 0.95;
  margin-bottom: 1.25rem;
  background: var(--heading-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-home-lead {
  font-size: clamp(1.05rem, 2.2vw, 1.25rem);
  line-height: 1.65;
  color: var(--text-secondary, #C4B5FD);
  max-width: 42ch;
  margin-bottom: 0.85rem;
}

.hero-home-tagline {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-bottom: 1.15rem;
}

.hero-archive-badge {
  margin-bottom: 1.35rem;
  max-width: 28rem;
  text-align: left;
}

.hero-home-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.hero-home-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.6rem;
  font-size: 0.88rem;
}

.hero-home-link {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.hero-home-link:hover {
  color: #fff;
}

.hero-home-link-sep {
  color: rgba(167, 139, 250, 0.45);
}

.hero-home-image {
  display: block;
  width: 100%;
  max-width: 22rem;
  margin: 0 auto;
  border-radius: 1.15rem;
  border: 1px solid rgba(124, 58, 237, 0.28);
  box-shadow:
    0 28px 56px -22px rgba(0, 0, 0, 0.7),
    0 0 32px -14px rgba(91, 33, 182, 0.28);
}

.home-section-title {
  font-size: clamp(2rem, 4.5vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.08;
  color: #fff;
}

.home-chapter-wrap {
  margin: 0.5rem 0 1.75rem;
}

.home-chapter-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.home-chapter-divider__line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(139, 92, 246, 0.32), transparent);
}

.home-chapter-divider__label {
  flex-shrink: 0;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(196, 181, 253, 0.65);
  padding: 0.3rem 0.75rem;
  border-radius: 9999px;
  border: 1px solid rgba(139, 92, 246, 0.2);
  background: rgba(139, 92, 246, 0.06);
}

.codex-how-it-works {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem 0.75rem;
  margin-top: 1.5rem;
  padding: 0.85rem 1rem;
  border-radius: 0.9rem;
  border: 1px solid rgba(124, 58, 237, 0.22);
  background: rgba(18, 12, 36, 0.45);
}

.codex-how-step {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text-primary);
}

.codex-how-arrow {
  color: rgba(167, 139, 250, 0.5);
  font-size: 0.75rem;
}

.home-essence-block {
  padding-top: 0.25rem;
}

.home-essence-header {
  margin-bottom: 1.25rem;
}

.home-essence-sub {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-muted);
  max-width: 52ch;
  margin-top: 0.5rem;
}

.home-essence-card {
  position: relative;
  display: block;
  border-radius: 1.35rem;
  padding: 1.5rem 1.65rem;
  border: 2px solid rgba(251, 191, 36, 0.38);
  background: linear-gradient(145deg, rgba(30, 20, 58, 0.96) 0%, rgba(18, 10, 46, 0.96) 100%);
  box-shadow:
    0 18px 44px -16px rgba(0, 0, 0, 0.7),
    0 0 36px -10px rgba(251, 191, 36, 0.18);
  overflow: hidden;
  transition: transform 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease;
}

.home-essence-card:hover {
  transform: translateY(-4px);
  border-color: rgba(251, 191, 36, 0.55);
  box-shadow:
    0 24px 52px -14px rgba(0, 0, 0, 0.75),
    0 0 44px -8px rgba(251, 191, 36, 0.28);
}

.home-essence-card__glow {
  position: absolute;
  inset: -30% auto auto -10%;
  width: 60%;
  height: 70%;
  background: radial-gradient(ellipse at center, rgba(251, 191, 36, 0.12) 0%, transparent 70%);
  pointer-events: none;
}

.home-essence-card__inner {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  position: relative;
  z-index: 1;
}

.home-essence-icon {
  width: 6.5rem;
  height: 6.5rem;
  flex-shrink: 0;
  border-radius: 1rem;
  overflow: hidden;
  border: 2px solid rgba(251, 191, 36, 0.45);
  background: #120A2E;
}

.home-essence-icon-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: rgba(251, 191, 36, 0.7);
}

.home-essence-badge {
  display: inline-flex;
  margin-bottom: 0.5rem;
  padding: 0.22rem 0.65rem;
  border-radius: 9999px;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #FDE68A;
  background: rgba(251, 191, 36, 0.1);
  border: 1px solid rgba(251, 191, 36, 0.22);
}

.home-essence-title {
  font-size: clamp(1.35rem, 3vw, 1.85rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.1;
  color: #fff;
  margin-bottom: 0.55rem;
}

.home-essence-desc {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-secondary, #C4B5FD);
  margin-bottom: 0.85rem;
}

.home-essence-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #FDE68A;
}

.home-essence-footnote {
  margin-top: 0.85rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.oracle-home-card {
  padding-bottom: 2rem !important;
}

.media-frame--compact {
  max-width: 16rem;
}

.journey-card--essence {
  border-color: rgba(251, 191, 36, 0.42);
  box-shadow:
    var(--surface-tier-journey),
    0 0 18px -8px rgba(251, 191, 36, 0.22);
}

.journey-card--essence .journey-card-step {
  color: #FDE68A;
  border-color: rgba(251, 191, 36, 0.4);
}

.journey-card--all {
  flex: 0 0 9.5rem;
  display: flex !important;
  align-items: center;
  justify-content: center;
  min-height: 8.5rem;
  background: linear-gradient(160deg, rgba(91, 33, 182, 0.35) 0%, rgba(18, 10, 46, 0.85) 100%);
  border-color: rgba(167, 139, 250, 0.45);
}

.journey-card-all-body {
  text-align: center;
  padding: 1rem 0.75rem;
  position: relative;
  z-index: 1;
}

.journey-card-all-count {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-gold-muted);
  margin-bottom: 0.45rem;
}

/* Homepage Codex section */
.codex-home-stack {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.codex-home-panel {
  padding: 2rem 1.75rem 2.25rem;
  border: 1px solid rgba(124, 58, 237, 0.18);
  background: linear-gradient(165deg, rgba(22, 16, 42, 0.92) 0%, rgba(12, 8, 26, 0.88) 100%);
  box-shadow: var(--surface-tier-floating);
}

.codex-home-header {
  max-width: 38rem;
  margin-bottom: 2rem;
}

.codex-home-eyebrow {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(196, 181, 253, 0.72);
  margin: 0 0 0.85rem;
}

.codex-home-title {
  font-size: clamp(1.85rem, 4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: #fff;
  margin: 0;
}

.codex-home-deck {
  margin: 0.9rem 0 0;
  font-size: 1.02rem;
  line-height: 1.65;
  color: var(--text-prose);
}

.codex-home-metrics {
  padding: 1.25rem 1.35rem 1.35rem;
  border-radius: 1rem;
  border: 1px solid rgba(124, 58, 237, 0.16);
  background: rgba(8, 5, 18, 0.45);
  margin-bottom: 1.75rem;
}

.codex-home-metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem 1.25rem;
}

.codex-home-metric {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.codex-home-metric-value {
  font-size: clamp(1.5rem, 3vw, 1.85rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
  color: #fff;
  font-variant-numeric: tabular-nums;
}

.codex-home-metric-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.codex-home-progress {
  margin-top: 1.15rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(124, 58, 237, 0.14);
}

.codex-home-progress-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.55rem;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.codex-home-progress .archive-progress-bar {
  height: 5px;
}

.codex-home-metrics-fallback {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.codex-home-formats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem 1rem;
  margin: 0 0 1.75rem;
  padding: 0;
}

.codex-home-format {
  margin: 0;
  padding: 0.85rem 0.95rem;
  border-radius: 0.85rem;
  border: 1px solid rgba(124, 58, 237, 0.14);
  background: rgba(255, 255, 255, 0.02);
}

.codex-home-format dt {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text-primary);
  margin-bottom: 0.2rem;
}

.codex-home-format dd {
  margin: 0;
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.codex-home-cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
}

.codex-home-cta-link {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.codex-home-cta-link:hover {
  color: #fff;
}

.codex-home-journey-panel {
  padding: 1.5rem 1.35rem 1.35rem;
  border-radius: 1.25rem;
  border: 1px solid rgba(124, 58, 237, 0.16);
  background: rgba(14, 10, 28, 0.55);
  min-width: 0;
}

.codex-home-journey-head {
  margin-bottom: 1.15rem;
}

.codex-home-journey-panel .journey-scroll {
  display: flex;
  gap: 0.85rem;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 0.35rem;
  scroll-snap-type: x mandatory;
  touch-action: pan-x;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scroll-padding-inline: 0.25rem;
}

@media (min-width: 768px) {
  .codex-home-panel {
    padding: 2.5rem 2.25rem 2.75rem;
  }

  .codex-home-journey-panel {
    padding: 1.75rem 1.75rem 1.5rem;
  }

  .codex-home-journey-panel .journey-scroll {
    gap: 1rem;
  }

  .codex-home-journey-panel .journey-card {
    flex: 0 0 10.5rem;
  }

  .codex-home-journey-panel .journey-card--all {
    flex: 0 0 9.5rem;
  }
}

@media (min-width: 1024px) {
  .codex-home-journey-panel .journey-card {
    flex: 0 0 11rem;
  }
}

@media (max-width: 899px) {
  .hero-home-copy {
    text-align: center;
  }

  .hero-home-lead,
  .hero-home-tagline {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-archive-badge {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-home-actions,
  .hero-home-links {
    justify-content: center;
  }

  .home-essence-card__inner {
    flex-direction: column;
    align-items: stretch;
  }

  .home-essence-icon {
    width: 5.5rem;
    height: 5.5rem;
  }
}

@media (max-width: 767px) {
  .codex-home-panel {
    padding: 1.5rem 1.25rem 1.75rem;
  }

  .codex-home-metrics {
    padding: 1rem 1rem 1.1rem;
  }

  .codex-home-metrics-grid {
    gap: 0.75rem;
  }

  .codex-home-metric-value {
    font-size: 1.35rem;
  }

  .codex-home-formats {
    grid-template-columns: 1fr;
  }

  .codex-home-cta-row {
    flex-direction: column;
    align-items: stretch;
  }

  .codex-home-cta-row .btn-primary {
    width: 100%;
  }

  .codex-home-journey-panel .journey-scroll {
    margin-left: -0.15rem;
    margin-right: -0.15rem;
    padding-left: 0.15rem;
    padding-right: 0.15rem;
  }
}

/* Main root transmission — dedicated section above category blocks */
.topics-main-root-section {
  margin-top: 0.5rem;
  margin-bottom: 0;
}

.topics-main-root-header {
  margin-bottom: 1.35rem;
}

.topics-main-root-heading {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: #fff;
  margin-bottom: 0.55rem;
}

.topics-main-root-subheading {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-muted, #A78BFA);
  max-width: 58ch;
}

.topics-section-divider {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin: 3.25rem 0 3rem;
}

.topics-section-divider__line {
  flex: 1;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(139, 92, 246, 0.35) 20%,
    rgba(251, 191, 36, 0.28) 50%,
    rgba(139, 92, 246, 0.35) 80%,
    transparent 100%
  );
}

.topics-section-divider__label {
  flex-shrink: 0;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(196, 181, 253, 0.72);
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  border: 1px solid rgba(139, 92, 246, 0.22);
  background: rgba(139, 92, 246, 0.08);
}

.topics-categories-section {
  padding-top: 0.25rem;
}

.topic-main-root-block {
  position: relative;
}

.topic-main-root-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  padding: 0.35rem 0.9rem;
  border-radius: 9999px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #FDE68A;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.14) 0%, rgba(139, 92, 246, 0.12) 100%);
  border: 1px solid rgba(251, 191, 36, 0.28);
}

.topic-main-root-eyebrow-icon {
  color: #FBBF24;
  font-size: 0.85rem;
  line-height: 1;
}

.topic-main-root-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 1.85rem 2rem;
  border-radius: 22px;
  background:
    linear-gradient(145deg, rgba(30, 20, 58, 0.98) 0%, rgba(18, 10, 46, 0.98) 55%, rgba(24, 14, 52, 0.98) 100%);
  border: 2px solid rgba(251, 191, 36, 0.42);
  box-shadow:
    0 0 0 1px rgba(139, 92, 246, 0.18) inset,
    0 18px 48px -16px rgba(0, 0, 0, 0.72),
    0 0 42px -8px rgba(251, 191, 36, 0.22);
  overflow: hidden;
  min-height: 240px;
  transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.32s ease, border-color 0.32s ease;
}

.topic-main-root-card__glow {
  position: absolute;
  inset: -40% -20% auto;
  height: 70%;
  background: radial-gradient(ellipse at center, rgba(251, 191, 36, 0.1) 0%, transparent 68%);
  pointer-events: none;
}

.topic-main-root-card:hover {
  transform: translateY(-2px);
  border-color: rgba(251, 191, 36, 0.62);
  box-shadow:
    0 0 0 1px rgba(167, 139, 250, 0.28) inset,
    0 26px 58px -14px rgba(0, 0, 0, 0.78),
    0 0 56px -6px rgba(251, 191, 36, 0.34);
}

.topic-main-root-card__header {
  display: flex;
  align-items: flex-start;
  gap: 1.35rem;
  position: relative;
  z-index: 1;
}

.topic-main-root-icon {
  width: 128px;
  height: 128px;
  border-radius: 20px;
  border: 2px solid rgba(251, 191, 36, 0.55);
  background: #120A2E;
  box-shadow:
    0 14px 36px rgba(91, 33, 182, 0.38),
    0 0 24px -4px rgba(251, 191, 36, 0.28);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.topic-main-root-card:hover .topic-main-root-icon {
  transform: scale(1.04);
  box-shadow:
    0 18px 42px rgba(91, 33, 182, 0.45),
    0 0 30px -2px rgba(251, 191, 36, 0.38);
}

.topic-main-root-card__body {
  flex: 1;
  min-width: 0;
}

.topic-main-root-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.65rem;
}

.topic-main-root-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.28rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #FDE68A;
  background: rgba(251, 191, 36, 0.12);
  border: 1px solid rgba(251, 191, 36, 0.22);
}

/* Sits beside Essence · Start Here on the root card */
.topic-main-root-lang-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.28rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #c4b5fd;
  background: rgba(139, 61, 255, 0.16);
  border: 1px solid rgba(167, 139, 250, 0.35);
  white-space: nowrap;
}

/* Video language switcher (Essence multi-language) */
.video-lang-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1rem;
  margin: 0 0 1.35rem;
}

.video-lang-bar__label {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted, #a89bc4);
}

.video-lang-bar__control {
  position: relative;
  min-width: min(100%, 16rem);
}

.video-lang-select {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  min-width: 12rem;
  max-width: 20rem;
  padding: 0.65rem 2.4rem 0.65rem 1rem;
  border-radius: 9999px;
  border: 1px solid rgba(139, 61, 255, 0.32);
  background-color: rgba(22, 16, 42, 0.95);
  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='%23a78bfa' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.9rem center;
  background-size: 0.9rem;
  color: #f5f0ff;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.video-lang-select:hover {
  border-color: rgba(167, 139, 250, 0.55);
}

.video-lang-select:focus {
  outline: none;
  border-color: rgba(167, 139, 250, 0.75);
  box-shadow: 0 0 0 3px rgba(139, 61, 255, 0.2);
}

.video-lang-select option {
  background: #160f2a;
  color: #f5f0ff;
}

.topic-main-root-title {
  font-size: clamp(1.65rem, 3vw, 2.35rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: #fff;
  margin-bottom: 0.75rem;
}

.topic-main-root-desc {
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text-secondary, #C4B5FD);
  max-width: 62ch;
}

.topic-main-root-footer {
  margin-top: auto;
  padding-top: 1.35rem;
  position: relative;
  z-index: 1;
}

.topic-main-root-explore {
  background: linear-gradient(145deg, #78350F 0%, #92400E 38%, #6D28D9 100%);
  color: #fff;
  padding: 0.72rem 1.4rem;
  border-radius: 14px;
  box-shadow: 0 6px 18px -6px rgba(120, 53, 15, 0.55);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.topic-main-root-card:hover .topic-main-root-explore {
  transform: scale(1.02);
  box-shadow: 0 8px 22px -5px rgba(120, 53, 15, 0.62);
}

@media (max-width: 639px) {
  .topic-main-root-card {
    padding: 1.35rem 1.25rem;
  }

  .topic-main-root-card__header {
    flex-direction: column;
    align-items: stretch;
  }

  .topic-main-root-icon {
    width: 88px;
    height: 88px;
    align-self: flex-start;
  }
}

/* Topic root card — mobile-friendly header layout */
.topic-root-card__header {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.topic-root-card__body {
  flex: 1;
  min-width: 0;
}

.topic-category-count {
  display: inline-flex;
  align-items: center;
  margin-top: 0.5rem;
  margin-bottom: 0.65rem;
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.08);
  width: fit-content;
  max-width: 100%;
}

@media (max-width: 639px) {
  .topic-root-card__header {
    flex-direction: column;
    align-items: stretch;
  }

  .topic-root-card .root-icon {
    width: 72px;
    height: 72px;
    align-self: flex-start;
  }

  .topic-section-header {
    flex-direction: column;
    align-items: stretch;
    max-width: none;
  }

  .topic-section-link {
    align-self: flex-start;
    margin-top: 0.25rem;
  }

  .topic-control-btn {
    min-height: 44px;
    padding-top: 0.55rem;
    padding-bottom: 0.55rem;
  }

  /* Jump pills keep their own mobile sizing (see max-width 639 block near sticky nav)
     so a 44px min-height does not vertically clip labels inside the pill track. */

}

.journey-strip-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin: 0 0 0.35rem;
}

.journey-strip-sub {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.45;
  max-width: 36rem;
}

.journey-card {
  display: block !important;
  flex: 0 0 10.75rem;
  scroll-snap-align: start;
  text-decoration: none;
  border-radius: 0.85rem;
  overflow: hidden;
  border: 1px solid rgba(124, 58, 237, 0.2);
  background: rgba(12, 8, 24, 0.75);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  min-height: 0 !important;
  height: auto !important;
  padding: 0 !important;
  box-shadow: 0 4px 14px -8px rgba(0, 0, 0, 0.55);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  cursor: pointer;
  position: relative;
}

.journey-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--surface-gloss);
  border-radius: inherit;
  pointer-events: none;
  z-index: 2;
}

.journey-card:hover {
  transform: translateY(-2px);
  border-color: rgba(167, 139, 250, 0.4);
  box-shadow: 0 8px 22px -10px rgba(0, 0, 0, 0.6);
}

.journey-card-thumb {
  position: relative;
  z-index: 1;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: rgba(26, 20, 51, 0.8);
}

.journey-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.journey-card:hover .journey-card-thumb img {
  transform: scale(1.04);
}

.journey-card-step {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #fff;
  padding: 0.2rem 0.45rem;
  border-radius: 9999px;
  background: rgba(8, 5, 18, 0.72);
  border: 1px solid rgba(167, 139, 250, 0.35);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.journey-card-body {
  position: relative;
  z-index: 1;
  padding: 0.7rem 0.75rem 0.85rem;
}

.journey-card-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.35;
}

@media (min-width: 1024px) {
  .journey-card-title {
    font-size: 0.85rem;
  }
}

/* Click-to-play video */
.video-poster-wrap {
  position: relative;
  width: 100%;
  height: 100%;
  cursor: pointer;
  background: #000;
  border-radius: 1rem;
  overflow: hidden;
}

.video-poster-wrap img,
.video-poster-fallback {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 100%;
}

.video-poster-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1A1433, #0F0A1F);
  min-height: 10rem;
}

.video-play-btn {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.35);
  transition: background 0.2s ease;
}

.video-poster-wrap:hover .video-play-btn {
  background: rgba(0, 0, 0, 0.5);
}

.video-play-icon {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 9999px;
  background: rgba(91, 33, 182, 0.9);
  border: 2px solid rgba(255, 255, 255, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  transition: transform 0.2s ease;
}

.video-poster-wrap:hover .video-play-icon {
  transform: scale(1.08);
}

@media (prefers-reduced-motion: reduce) {
  .hero-gradient {
    animation: none;
  }

  a, button, [role="button"],
  .memory-card, .content-card, .channel-card, .source-card,
  .btn-primary, .btn-secondary, .static-card,
  .topic-root-card, .topic-leaf-btn, .category-toggle {
    transition-duration: 0.01ms !important;
  }

  .memory-card:hover, .content-card:hover, .channel-card:hover,
  .source-card:hover, .topic-root-card:hover, .topic-leaf-btn:hover,
  .category-toggle:hover, .btn-primary:hover, .btn-secondary:hover,
  .journey-card:hover, .breadcrumb-link:hover, .btn-jump-pill:hover,
  .topic-control-btn:hover, .network-filter-btn:hover, .nav-cta:hover,
  #back-to-top:hover {
    transform: none !important;
  }

  .nav-logo:hover .nav-logo-icon {
    transform: none !important;
  }

  .skeleton {
    animation: none;
    background: rgba(76, 61, 107, 0.35);
  }

  .archive-progress-fill {
    transition-duration: 0.01ms !important;
  }

  .topic-section-children {
    transition-duration: 0.01ms !important;
  }
}



/* =============================================
   NOSCRIPT NOTICE — JS-dependent pages
   ============================================= */

.noscript-notice {
  margin-bottom: 1.5rem;
  padding: 1rem 1.25rem;
  border-radius: 14px;
  border: 1px solid rgba(251, 191, 36, 0.35);
  background: rgba(251, 191, 36, 0.08);
  color: var(--text-prose);
  font-size: 0.95rem;
  line-height: 1.55;
  box-shadow: var(--surface-tier-recessed-tray);
}

.noscript-notice a {
  color: var(--text-soft);
  font-weight: 600;
  text-decoration: underline;
}

.noscript-notice a:hover {
  color: var(--text-primary);
}

/* =============================================
   ERROR PAGE — embossed numerals
   ============================================= */

.error-page-code {
  text-shadow:
    0 2px 4px rgba(0, 0, 0, 0.45),
    0 0 32px rgba(91, 33, 182, 0.4),
    0 -1px 0 rgba(255, 255, 255, 0.08);
  filter: drop-shadow(0 8px 16px rgba(91, 33, 182, 0.25));
}

/* =============================================
   TOPIC PAGE POLISH — badges, nav, reading progress
   ============================================= */

.topic-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.15rem 0.5rem;
  border-radius: 9999px;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #C4B5FD;
  background: rgba(91, 33, 182, 0.2);
  border: 1px solid rgba(124, 58, 237, 0.35);
  vertical-align: middle;
}

.topic-badge--inline {
  margin-left: 0.35rem;
}

.topic-badge--section {
  margin-left: 0.45rem;
}

.topic-badge--corner {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 3;
}

.topic-image-fallback {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  width: 100%;
  height: 100%;
  min-height: 4rem;
  color: var(--text-muted);
  font-size: 0.65rem;
  letter-spacing: 0.04em;
  text-align: center;
  padding: 0.75rem;
}

.topic-image-fallback .card-icon {
  opacity: 0.55;
}

.topic-image-fallback--soon {
  background: rgba(91, 33, 182, 0.12);
  border: 1px dashed rgba(124, 58, 237, 0.28);
  border-radius: 12px;
}

.topic-image-fallback--compact {
  gap: 0;
  padding: 0;
  min-height: 0;
  border-radius: 16px;
}

.topic-image-fallback--compact .card-icon {
  width: 2rem;
  height: 2rem;
  opacity: 0.75;
}

.topic-root-card--soon {
  opacity: 0.92;
  border: 1px dashed rgba(124, 58, 237, 0.35);
  background: linear-gradient(145deg, #1A1433 0%, #151028 100%);
  filter: none;
}

.topic-root-card--soon:hover {
  transform: none;
  box-shadow:
    0 12px 32px -14px rgba(0, 0, 0, 0.65),
    0 5px 14px -6px rgba(0, 0, 0, 0.45),
    inset 0 1.5px 0 rgba(255, 255, 255, 0.09),
    inset 0 -1px 0 rgba(0, 0, 0, 0.18);
}

.topic-root-card--soon .root-icon {
  border-color: rgba(124, 58, 237, 0.45);
  box-shadow: none;
  background: rgba(91, 33, 182, 0.1);
}

.topic-root-card .explore-badge--soon {
  background: rgba(91, 33, 182, 0.18);
  color: #C4B5FD;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.68rem;
  box-shadow: none;
  cursor: default;
}

.topic-root-card--soon:hover .explore-badge--soon {
  transform: none;
  background: rgba(91, 33, 182, 0.18);
}

.category-toggle-btn__label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.category-toggle-btn {
  flex-wrap: nowrap;
}

.topic-leaf-btn {
  gap: 0.5rem;
}

.topic-leaf-btn__label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topic-leaf-btn .topic-badge--inline {
  margin-left: 0;
  flex-shrink: 0;
}

.topic-badge--section {
  margin-left: 0.5rem;
  flex-shrink: 0;
}

.category-toggle-btn .chevron .card-icon {
  width: 0.95rem;
  height: 0.95rem;
}

.codex-search-icon .card-icon {
  width: 1rem;
  height: 1rem;
  opacity: 0.7;
}

.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 200;
  pointer-events: none;
  background: transparent;
}

.reading-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent-violet), var(--accent-gold-muted));
  transition: width 0.12s ease-out;
}

.topic-prev-next {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(124, 58, 237, 0.2);
}

.topic-prev-next__slot--empty {
  display: none;
}

.topic-prev-next__link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.15rem;
  border-radius: 14px;
  border: 1px solid rgba(124, 58, 237, 0.25);
  background: rgba(26, 20, 51, 0.65);
  text-decoration: none;
  color: var(--text-primary);
  transition: border-color 0.2s ease, background 0.2s ease;
}

.topic-prev-next__link--next {
  justify-content: flex-end;
  text-align: right;
}

.topic-prev-next__link:hover {
  border-color: var(--accent-violet-hover);
  background: rgba(91, 33, 182, 0.18);
}

.topic-prev-next__text {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.topic-prev-next__label {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.topic-prev-next__title {
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

#report-container .report-lead {
  font-size: 1.12rem;
  line-height: 1.75;
  color: var(--text-secondary, #C4B5FD);
  margin-bottom: 1.75rem;
}

.report-toc-mobile .report-toc-link {
  display: block;
  padding: 0.35rem 0;
  font-size: 0.82rem;
  color: var(--text-muted);
  text-decoration: none;
  border-left: 2px solid transparent;
  padding-left: 0.65rem;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.report-toc-mobile .report-toc-link:hover,
.report-toc-mobile .report-toc-link.active {
  color: var(--text-primary);
  border-left-color: var(--accent-violet);
}

@media (max-width: 640px) {
  .topic-prev-next {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .topic-root-card:hover,
  .topic-leaf-btn:hover,
  .topic-main-root-card:hover,
  .topic-control-btn:hover,
  .topic-root-card:hover .root-icon,
  .topic-main-root-card:hover .topic-main-root-icon {
    transform: none;
  }

  .reading-progress-fill {
    transition: none;
  }

  .topic-restore-highlight {
    animation: none;
    box-shadow:
      0 0 0 2px rgba(139, 61, 255, 0.55),
      0 0 24px rgba(124, 58, 237, 0.35);
  }
}

/* =============================================
   NAV RETURN — scroll restore highlight
   ============================================= */
[data-topic-id] {
  scroll-margin-top: 7rem;
}

@keyframes topic-restore-pulse {
  0% {
    box-shadow:
      0 0 0 0 rgba(139, 61, 255, 0.55),
      0 0 0 0 rgba(124, 58, 237, 0);
  }
  35% {
    box-shadow:
      0 0 0 3px rgba(139, 61, 255, 0.7),
      0 0 28px 4px rgba(124, 58, 237, 0.4);
  }
  100% {
    box-shadow:
      0 0 0 0 rgba(139, 61, 255, 0),
      0 0 0 0 rgba(124, 58, 237, 0);
  }
}

.topic-restore-highlight {
  position: relative;
  z-index: 2;
  animation: topic-restore-pulse 1.8s ease-out 1;
  border-radius: inherit;
}

.codex-search-card--soon {
  opacity: 0.72;
  cursor: default;
  pointer-events: none;
  filter: grayscale(0.25);
}

.codex-search-card--soon:hover {
  transform: none;
}

.topic-leaf-btn--soon {
  cursor: default;
}

.topic-main-root-card--soon {
  cursor: default;
  pointer-events: none;
}

.topic-root-card--soon {
  cursor: default;
  pointer-events: none;
}

/* =============================================
   POLISH — sticky filters, leaf entrances, codex hero
   ============================================= */

.topics-filter-sticky-wrap {
  position: sticky;
  top: 5.25rem;
  z-index: 45;
  margin-bottom: 2rem;
  /* Isolate so hover transforms on children don't escape */
  isolation: isolate;
}

.topics-filter-sticky-wrap .topics-filter-panel {
  background: rgba(26, 20, 51, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow:
    var(--surface-tier-recessed-tray),
    0 12px 40px -16px rgba(0, 0, 0, 0.55);
  border-color: rgba(124, 58, 237, 0.28);
}

@media (max-width: 767px) {
  .topics-filter-sticky-wrap {
    top: 4.35rem;
    margin-bottom: 1.25rem;
  }

  .topics-filter-sticky-wrap .topics-filter-subtitle {
    display: none;
  }

  .topics-filter-sticky-wrap .topics-filter-header {
    margin-bottom: 0.65rem;
    padding-bottom: 0.55rem;
  }

  .topics-filter-sticky-wrap .topics-filter-btn-group--scroll {
    max-height: 4.75rem;
  }

  .topics-filter-sticky-wrap .topics-filter-panel {
    padding: 0.85rem 1rem;
  }
}

/* Staggered leaf entrances */
@keyframes topic-leaf-enter {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.topic-leaf-enter {
  animation: topic-leaf-enter 0.42s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: calc(var(--leaf-i, 0) * 0.032s);
}

.topic-category-block {
  animation: topic-leaf-enter 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.topic-category-block:nth-child(1) { animation-delay: 0.02s; }
.topic-category-block:nth-child(2) { animation-delay: 0.06s; }
.topic-category-block:nth-child(3) { animation-delay: 0.1s; }
.topic-category-block:nth-child(4) { animation-delay: 0.14s; }
.topic-category-block:nth-child(5) { animation-delay: 0.18s; }
.topic-category-block:nth-child(6) { animation-delay: 0.22s; }
.topic-category-block:nth-child(7) { animation-delay: 0.26s; }
.topic-category-block:nth-child(8) { animation-delay: 0.3s; }

/* Codex hero density (especially mobile) */
.codex-hero-card {
  padding: 1.35rem 1.25rem 1.6rem;
}

@media (min-width: 640px) {
  .codex-hero-card {
    padding: 2rem 2rem 2.25rem;
  }
}

@media (min-width: 768px) {
  .codex-hero-card {
    padding: 3rem 3.5rem 4rem;
  }
}

@media (max-width: 767px) {
  .codex-hero-media {
    max-width: 16rem;
  }

  .codex-hero-copy-secondary {
    display: none;
  }

  .codex-hero-copy p {
    font-size: 0.95rem;
    line-height: 1.55;
  }
}

/* Codex toolbar sticky while browsing results */
#codex-toolbar {
  position: sticky;
  top: 5.25rem;
  z-index: 40;
}

#codex-toolbar .codex-toolbar {
  background: rgba(26, 20, 51, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(124, 58, 237, 0.22);
  box-shadow:
    var(--surface-tier-recessed-tray),
    0 12px 36px -18px rgba(0, 0, 0, 0.5);
}

@media (max-width: 767px) {
  #codex-toolbar {
    top: 4.35rem;
  }

  #codex-toolbar .codex-toolbar-header .topics-filter-subtitle {
    display: none;
  }
}

/* Stronger search-card hover (match root-card lift) */
a.codex-search-card:hover {
  transform: translateY(-3px) scale(1.008);
  box-shadow: var(--surface-tier-topic-hover);
  border-color: rgba(139, 61, 255, 0.35);
}

@media (prefers-reduced-motion: reduce) {
  .topic-leaf-enter,
  .topic-category-block {
    animation: none;
  }

  a.codex-search-card:hover {
    transform: none;
  }
}

/* Compact partial-media note (quieter than full empty panels) */
.media-coming-soon-note {
  border-radius: 12px;
  border: 1px dashed rgba(124, 58, 237, 0.28);
  background: rgba(15, 10, 31, 0.45);
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

/* ── Quizzes hub ── */
.quiz-hub-stats {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  margin-bottom: 1.75rem;
}

@media (min-width: 640px) {
  .quiz-hub-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.quiz-hub-stat {
  padding: 1.1rem 1.25rem;
  border-radius: 1rem;
  background: rgba(26, 20, 51, 0.85);
  border: 1px solid rgba(124, 58, 237, 0.22);
  box-shadow: var(--surface-tier-base);
  text-align: center;
}

.quiz-hub-stat__value {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.85rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.quiz-hub-stat__label {
  margin-top: 0.35rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.quiz-hub-toolbar {
  position: sticky;
  top: 5.25rem;
  z-index: 40;
  padding: 0.85rem 1rem;
  border-radius: 1rem;
  background: rgba(26, 20, 51, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(124, 58, 237, 0.22);
  box-shadow: var(--surface-tier-recessed-tray), 0 12px 36px -18px rgba(0, 0, 0, 0.5);
}

@media (max-width: 767px) {
  .quiz-hub-toolbar {
    top: 4.35rem;
  }
}

.quiz-hub-toolbar__row {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

@media (min-width: 768px) {
  .quiz-hub-toolbar__row {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.quiz-hub-search {
  display: block;
  flex: 1 1 auto;
  min-width: 0;
}

.quiz-hub-search .codex-search-field {
  width: 100%;
}

.quiz-hub-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.quiz-hub-filters .topic-control-btn.is-active,
.quiz-hub-filters .topic-control-btn[aria-pressed="true"] {
  box-shadow: var(--surface-tier-control-active);
  border-color: rgba(139, 61, 255, 0.45);
  color: var(--text-primary);
}

.quiz-hub-count {
  margin: 0.65rem 0 0;
}

.quiz-hub-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.9rem;
}

@media (min-width: 768px) {
  .quiz-hub-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .quiz-hub-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

a.quiz-hub-card {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 1.15rem 1.2rem 1.2rem;
  text-decoration: none;
  color: inherit;
  border-radius: 1.15rem;
  min-height: 9.5rem;
  border: 1px solid rgba(124, 58, 237, 0.2);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

a.quiz-hub-card:hover {
  transform: translateY(-3px) scale(1.008);
  box-shadow: var(--surface-tier-topic-hover);
  border-color: rgba(139, 61, 255, 0.35);
}

a.quiz-hub-card:focus-visible {
  outline: 2px solid var(--accent-indigo);
  outline-offset: 3px;
}

.quiz-hub-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.quiz-hub-card__count {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.quiz-hub-card__title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  line-height: 1.25;
  margin: 0;
}

.quiz-hub-card__subtitle {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--text-soft);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1 1 auto;
}

.quiz-hub-card__footer {
  margin-top: auto;
  padding-top: 0.35rem;
}

.quiz-hub-card__cta {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-soft);
}

a.quiz-hub-card:hover .quiz-hub-card__cta {
  color: var(--link-hover);
}

@media (prefers-reduced-motion: reduce) {
  a.quiz-hub-card:hover {
    transform: none;
  }
}

/* -- Phase 4 polish: hierarchy, media, mobile, reading -- */

.page-hero {
  position: relative;
}

.page-hero-eyebrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
  padding: 0.4rem 1rem;
  border-radius: 9999px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-soft);
  background: rgba(91, 33, 182, 0.18);
  border: 1px solid rgba(124, 58, 237, 0.28);
  box-shadow: var(--surface-tier-pill);
}

.section-eyebrow {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.home-media-panel {
  border: 1px solid rgba(124, 58, 237, 0.2);
  background:
    radial-gradient(ellipse 70% 50% at 50% 0%, rgba(109, 40, 217, 0.12) 0%, transparent 60%),
    rgba(26, 20, 51, 0.72);
  box-shadow: var(--surface-tier-base);
}

/* Homepage video facades */
#home-rumble-grid .video-poster-wrap {
  background:
    radial-gradient(circle at 50% 45%, rgba(124, 58, 237, 0.35) 0%, transparent 55%),
    linear-gradient(160deg, #1A0F2E 0%, #0F0A1F 100%);
}

/* Report reading comfort (dive + SPA) — full card width, not a skinny centered column */
#report-container,
.report-prerendered {
  max-width: min(100%, 48rem);
  width: 100%;
  margin-inline: 0;
}

#report-container h1,
.report-prerendered h1 {
  font-size: 1.85rem !important;
  margin-top: 0;
  margin-bottom: 1rem;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

#report-container h2,
.report-prerendered h2 {
  font-size: 1.35rem !important;
  margin-top: 1.75rem;
  margin-bottom: 0.65rem;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

#report-container h3,
.report-prerendered h3 {
  font-size: 1.15rem !important;
  margin-top: 1.35rem;
  margin-bottom: 0.5rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

#report-container p,
.report-prerendered p {
  line-height: 1.75;
}

#report-container .report-lead,
.report-prerendered > p:first-of-type {
  font-size: 1.05rem;
  color: var(--text-prose);
}

/* Nested markdown list paragraphs — avoid huge gaps between bullets */
#report-container li > p {
  margin-bottom: 0.45rem;
}

#report-container li > p:last-child {
  margin-bottom: 0;
}

#report-container li {
  margin-bottom: 0.65rem;
}

#report-container li:last-child {
  margin-bottom: 0;
}

#report-container pre {
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  white-space: pre-wrap;
  word-break: break-word;
  padding: 0.75rem 0.9rem;
  font-size: 0.9em;
}

#report-container code {
  word-break: break-word;
  overflow-wrap: anywhere;
}

#report-container pre code {
  white-space: inherit;
  word-break: inherit;
}

#report-container table {
  width: 100%;
  max-width: 100%;
  border-collapse: collapse;
  font-size: 0.92em;
}

/* Touch targets (jump pills size themselves via .btn-jump-pill rules) */
.topic-control-btn,
.network-filter-btn,
.quiz-hub-filters .topic-control-btn {
  min-height: 44px;
  min-width: 44px;
}

.mobile-menu .nav-link {
  min-height: 48px;
  display: flex;
  align-items: center;
}

/* Sticky toolbars / filters � safe area */
.quiz-hub-toolbar,
#codex-toolbar,
.topics-filter-sticky-wrap {
  top: calc(4.35rem + env(safe-area-inset-top, 0px));
}

@media (min-width: 768px) {
  .quiz-hub-toolbar,
  #codex-toolbar,
  .topics-filter-sticky-wrap {
    top: calc(5.25rem + env(safe-area-inset-top, 0px));
  }
}

/* Horizontal chip scroll on narrow screens */
@media (max-width: 639px) {
  .quiz-hub-filters,
  .network-filter-bar,
  .topics-filter-btn-group--scroll {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
    gap: 0.5rem;
    padding-bottom: 0.25rem;
    mask-image: linear-gradient(90deg, #000 0%, #000 calc(100% - 1.5rem), transparent 100%);
  }

  .quiz-hub-filters > *,
  .network-filter-bar > *,
  .topics-filter-btn-group--scroll > * {
    flex: 0 0 auto;
    scroll-snap-align: start;
  }
}

#back-to-top {
  bottom: calc(1.25rem + env(safe-area-inset-bottom, 0px));
  right: calc(1.25rem + env(safe-area-inset-right, 0px));
}

/* Interior pages: main top padding accounts for fixed nav */
.page-interior main#main {
  padding-top: 0.25rem;
}

/* 404 / empty consistency */
.error-page-code {
  background: linear-gradient(90deg, #7C3AED, #6366F1);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* -- Phase 5: continue learning + stub actions -- */
.dive-continue {
  border: 1px solid rgba(124, 58, 237, 0.28);
  background:
    radial-gradient(ellipse 80% 60% at 20% 0%, rgba(109, 40, 217, 0.14) 0%, transparent 55%),
    rgba(26, 20, 51, 0.9);
}

.dive-continue__title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin: 0 0 0.65rem;
}

.dive-continue__lead {
  margin: 0 0 1.15rem;
  color: var(--text-prose);
  line-height: 1.65;
  font-size: 0.98rem;
  max-width: 62ch;
}

.dive-continue__actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.65rem;
}

@media (min-width: 640px) {
  .dive-continue__actions {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
  }
}

.dive-continue__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.7rem 1.15rem;
  text-align: center;
  white-space: normal;
}

.dive-continue__hint {
  margin: 0;
  width: 100%;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.dive-continue__link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.25rem 0.15rem;
}

.dive-continue__disclaimer {
  margin: 1.25rem 0 0;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.8rem;
  line-height: 1.55;
  color: var(--text-dim);
}

.dive-continue__updated {
  color: var(--text-muted);
  white-space: nowrap;
}

.dive-stub-actions {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  max-width: 22rem;
  margin: 0 auto;
}

@media (min-width: 640px) {
  .dive-stub-actions {
    max-width: none;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
  }
}

/* -- UX polish: dual journey, premium play, quiz catalog -- */

.codex-home-journey-head {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-bottom: 1.25rem;
}

@media (min-width: 768px) {
  .codex-home-journey-head {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
  }
}

.journey-strip-codex-link {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  padding: 0.65rem 1rem;
  border-radius: 0.9rem;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--text-soft);
  text-decoration: none;
  border: 1px solid rgba(124, 58, 237, 0.3);
  background: rgba(26, 20, 51, 0.75);
  transition: border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.journey-strip-codex-link:hover {
  color: #fff;
  border-color: rgba(167, 139, 250, 0.5);
  transform: translateY(-1px);
}

.journey-strip-codex-meta {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

.journey-path-stack {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.journey-path-row {
  padding: 1rem 0 0.25rem;
  border-top: 1px solid rgba(124, 58, 237, 0.16);
}

.journey-path-row:first-child {
  border-top: 0;
  padding-top: 0;
}

.journey-path-row__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.65rem 1rem;
  margin-bottom: 0.85rem;
}

.journey-path-row__eyebrow {
  margin: 0 0 0.25rem;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.journey-path-row__title {
  margin: 0;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.journey-path-row__link {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-soft);
  text-decoration: none;
}

.journey-path-row__link:hover {
  color: var(--link-hover);
}

/* Premium video facades */
.video-facade .video-poster-wrap,
#home-rumble-grid .video-poster-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  background:
    radial-gradient(circle at 50% 42%, rgba(139, 61, 255, 0.28) 0%, transparent 42%),
    linear-gradient(165deg, #221845 0%, #120A2E 48%, #0B0618 100%);
}

.video-facade-glow {
  position: absolute;
  width: 9rem;
  height: 9rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(167, 139, 250, 0.35) 0%, transparent 70%);
  pointer-events: none;
  filter: blur(2px);
}

.video-play-btn {
  position: relative;
  inset: auto;
  background: transparent;
  width: auto;
  height: auto;
}

.video-play-icon {
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 9999px;
  background: linear-gradient(145deg, #A78BFA 0%, #7C3AED 45%, #5B21B6 100%);
  border: 2px solid rgba(255, 255, 255, 0.55);
  box-shadow:
    0 0 0 8px rgba(124, 58, 237, 0.18),
    0 14px 36px rgba(0, 0, 0, 0.45),
    inset 0 2px 0 rgba(255, 255, 255, 0.35);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.video-play-icon svg {
  margin-left: 3px;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.35));
}

.video-play-label {
  position: relative;
  z-index: 1;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(237, 228, 255, 0.88);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.45);
}

.video-poster-wrap:hover .video-play-icon,
.video-poster-wrap:focus-visible .video-play-icon {
  transform: scale(1.08);
  box-shadow:
    0 0 0 10px rgba(124, 58, 237, 0.24),
    0 18px 40px rgba(0, 0, 0, 0.5),
    inset 0 2px 0 rgba(255, 255, 255, 0.4);
}

.video-poster-wrap:hover .video-play-btn,
.video-poster-wrap:focus-visible .video-play-btn {
  background: transparent;
}

/* Quiz catalog by transmission */
.quiz-hub-stats {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

@media (min-width: 640px) {
  .quiz-hub-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

button.quiz-hub-stat {
  cursor: pointer;
  text-align: center;
  font: inherit;
  color: inherit;
  padding: 1.1rem 1.25rem;
  border-radius: 1rem;
  background: rgba(26, 20, 51, 0.85);
  border: 1px solid rgba(124, 58, 237, 0.22);
  box-shadow: var(--surface-tier-base);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

button.quiz-hub-stat:hover {
  border-color: rgba(167, 139, 250, 0.4);
  transform: translateY(-1px);
}

button.quiz-hub-stat.is-active,
button.quiz-hub-stat.active,
button.quiz-hub-stat[aria-pressed="true"] {
  border-color: rgba(167, 139, 250, 0.55);
  box-shadow: var(--surface-tier-control-active);
  background: linear-gradient(180deg, rgba(91, 33, 182, 0.28) 0%, rgba(26, 20, 51, 0.92) 100%);
}

.quiz-hub-catalog {
  display: flex;
  flex-direction: column;
  gap: 2.25rem;
}

.quiz-hub-section {
  scroll-margin-top: 7rem;
}

.quiz-hub-section__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.75rem 1.25rem;
  margin-bottom: 1rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid rgba(124, 58, 237, 0.2);
}

.quiz-hub-section__eyebrow {
  margin: 0 0 0.3rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.quiz-hub-section__title {
  margin: 0;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.45rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.quiz-hub-section__meta {
  margin: 0.35rem 0 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.quiz-hub-section__link {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-soft);
  text-decoration: none;
}

.quiz-hub-section__link:hover {
  color: var(--link-hover);
}

.quiz-hub-section__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
}

@media (min-width: 768px) {
  .quiz-hub-section__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .quiz-hub-section__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.quiz-hub-card__dive {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-left: auto;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.quiz-hub-card__footer {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.quiz-hub-filters .topic-control-btn.is-active,
.quiz-hub-filters .topic-control-btn.active,
.quiz-hub-filters .topic-control-btn[aria-pressed="true"] {
  box-shadow: var(--surface-tier-control-active);
  border-color: rgba(139, 61, 255, 0.5);
  color: var(--text-primary);
  background: rgba(91, 33, 182, 0.35);
}

/* -- Compact quiz catalog rows + score chips -- */
.quiz-hub-section__list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  border: 1px solid rgba(124, 58, 237, 0.2);
  border-radius: 1rem;
  overflow: hidden;
  background: rgba(18, 12, 36, 0.55);
}

a.quiz-hub-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.65rem 1rem;
  padding: 0.7rem 0.9rem;
  text-decoration: none;
  color: inherit;
  border-bottom: 1px solid rgba(124, 58, 237, 0.12);
  background: transparent;
  min-height: 2.85rem;
  transition: background 0.15s ease, border-color 0.15s ease;
}

a.quiz-hub-row:last-child {
  border-bottom: 0;
}

a.quiz-hub-row:hover {
  background: rgba(91, 33, 182, 0.16);
}

a.quiz-hub-row:focus-visible {
  outline: 2px solid var(--accent-indigo);
  outline-offset: -2px;
  z-index: 1;
}

a.quiz-hub-row.has-score {
  background: rgba(91, 33, 182, 0.08);
}

.quiz-hub-row__title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--text-primary);
  line-height: 1.3;
  min-width: 0;
}

.quiz-hub-row__meta {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-shrink: 0;
}

.quiz-hub-row__count {
  font-size: 0.72rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.quiz-hub-row__score {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #C4B5FD;
  padding: 0.18rem 0.45rem;
  border-radius: 9999px;
  background: rgba(109, 40, 217, 0.28);
  border: 1px solid rgba(167, 139, 250, 0.35);
  white-space: nowrap;
}

.quiz-hub-row__score.is-set {
  display: inline-flex;
}

.quiz-hub-row__cta {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-soft);
  white-space: nowrap;
}

a.quiz-hub-row:hover .quiz-hub-row__cta {
  color: #fff;
}

@media (max-width: 520px) {
  a.quiz-hub-row {
    grid-template-columns: 1fr;
    gap: 0.35rem;
    padding: 0.75rem 0.85rem;
  }

  .quiz-hub-row__meta {
    justify-content: flex-start;
  }
}

.quiz-meta-chip--score {
  color: #EDE4FF;
  border-color: rgba(167, 139, 250, 0.45);
  background: rgba(109, 40, 217, 0.25);
}

.quiz-score-best {
  margin: 0.65rem 0 0;
  font-size: 0.92rem;
  color: var(--text-soft);
}


/* =============================================
   PHASE 1 � Archive reader (TOC, terms, toolbar, share)
   ============================================= */

/* --- Terminology definition cards --- */
.term-card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
  margin: 0 0 2rem;
  padding: 0;
  list-style: none;
}

@media (min-width: 640px) {
  .term-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
  }
}

.term-card {
  margin: 0;
  padding: 1rem 1.15rem 1.1rem;
  border-radius: 0.9rem;
  background: rgba(15, 10, 31, 0.55);
  border: 1px solid rgba(124, 58, 237, 0.28);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

#report-container .term-card__term,
.term-card__term {
  margin: 0 0 0.45rem !important;
  padding: 0 !important;
  border: 0 !important;
  border-left: 0 !important;
  text-shadow: none !important;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.95rem !important;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #A67C4C !important;
  line-height: 1.3;
}

#report-container .term-card__def,
.term-card__def {
  margin: 0;
  font-size: 0.95em;
  line-height: 1.65;
  color: #EDE4FF;
}

#report-container .term-card__def p {
  margin: 0 0 0.5rem;
}

#report-container .term-card__def p:last-child {
  margin-bottom: 0;
}

/* Essence-style insight quotes — same card language as terminology */
#report-container blockquote.report-insight-card,
#report-container .report-insight-card {
  border-left: 4px solid rgba(166, 124, 76, 0.75);
  background: rgba(15, 10, 31, 0.55);
  border: 1px solid rgba(124, 58, 237, 0.28);
  border-left-width: 4px;
  border-left-color: rgba(166, 124, 76, 0.75);
  border-radius: 0.9rem;
  padding: 1.15rem 1.25rem 1.2rem;
  margin: 1.5rem 0;
  font-style: italic;
  color: #ede4ff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

#report-container .report-insight-card p {
  margin-bottom: 0.65rem;
}

#report-container .report-insight-card p:last-child {
  margin-bottom: 0;
}



/* Dive section anchors — clear navbar (5rem) + sticky section nav + gap */
#infographics-section,
#videos-section,
#report-section {
  scroll-margin-top: calc(5rem + 3.25rem + 0.5rem + env(safe-area-inset-top, 0px));
}

@media (min-width: 768px) {
  #infographics-section,
  #videos-section,
  #report-section {
    scroll-margin-top: calc(5rem + 3.25rem + 0.65rem + env(safe-area-inset-top, 0px));
  }
}

/* Sticky clone of the same segmented control — solid so page text never bleeds through.
   Must sit fully BELOW .navbar: nav-content is 5rem + safe-area padding-top. */
.section-nav-sticky {
  position: fixed;
  left: 50%;
  transform: translateX(-50%) translateY(-120%);
  /* navbar height (5rem) + safe-area + small gap so pills aren't clipped */
  top: calc(5rem + 0.4rem + env(safe-area-inset-top, 0px));
  z-index: 45; /* below .navbar (50), above page content */
  display: flex;
  justify-content: center;
  align-items: center;
  /* Leave side gutters so edges aren't clipped by viewport / overflow-x:hidden */
  width: min(calc(100vw - 1.5rem - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px)), 28rem);
  max-width: min(calc(100vw - 1.5rem - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px)), 28rem);
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  isolation: isolate;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  box-sizing: border-box;
}

@media (min-width: 768px) {
  .section-nav-sticky {
    top: calc(5rem + 0.5rem + env(safe-area-inset-top, 0px));
  }
}

.section-nav-sticky.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

/* Subtle fade only — no bounce/lift on sticky appear */
@media (prefers-reduced-motion: no-preference) {
  .section-nav-sticky {
    transition: opacity 0.22s ease;
  }

  .section-nav-sticky.is-visible {
    transform: translateX(-50%) translateY(0);
  }
}

.section-nav-sticky .dive-section-seg--sticky,
.dive-section-seg--sticky {
  width: 100%;
  max-width: 100%;
  background: #16102a;
  border-color: rgba(139, 61, 255, 0.34);
  box-shadow:
    0 12px 36px -12px rgba(0, 0, 0, 0.75),
    0 0 0 1px rgba(15, 10, 31, 0.95),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.section-nav-sticky .btn-jump-pill {
  padding: 0.45rem 0.7rem;
  font-size: 0.64rem;
  min-height: 2.15rem;
  letter-spacing: 0.04em;
}

@media (max-width: 639px) {
  .dive-section-seg,
  .jump-to-pills {
    width: 100%;
    max-width: 100%;
    padding: 0.3rem;
    gap: 0.1rem;
  }

  .btn-jump-pill {
    flex: 1 1 0;
    padding-left: 0.35rem;
    padding-right: 0.35rem;
    padding-top: 0.42rem;
    padding-bottom: 0.42rem;
    font-size: 0.58rem;
    letter-spacing: 0.02em;
    min-height: 2.35rem;
    line-height: 1.1;
  }

  .section-nav-sticky .btn-jump-pill {
    min-height: 2.2rem;
    padding-left: 0.3rem;
    padding-right: 0.3rem;
    font-size: 0.56rem;
    letter-spacing: 0.02em;
  }
}

@media (prefers-reduced-motion: reduce) {
  .section-nav-sticky {
    transition: none;
  }
}

/* --- Share menu --- */
.share-menu {
  position: relative;
  display: inline-flex;
}

.share-menu__panel {
  position: absolute;
  top: calc(100% + 0.4rem);
  left: 0;
  z-index: 40;
  min-width: 12.5rem;
  padding: 0.4rem;
  border-radius: 0.75rem;
  background: rgba(15, 10, 31, 0.96);
  border: 1px solid rgba(124, 58, 237, 0.4);
  box-shadow: 0 14px 40px -12px rgba(0, 0, 0, 0.65);
}

.share-menu__panel[hidden] {
  display: none !important;
}

.share-menu__item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.55rem 0.75rem;
  border: 0;
  border-radius: 0.5rem;
  background: transparent;
  color: var(--text-soft);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

.share-menu__item:hover,
.share-menu__item:focus-visible {
  background: rgba(91, 33, 182, 0.35);
  color: var(--text-primary);
  outline: none;
}

/* Report layout: ensure TOC sits correctly inside card */
.lesson-content-card .report-layout {
  position: relative;
  z-index: 2;
}

/* =============================================
   DIVE REPORT — MOBILE READING EXPERIENCE
   Headings, lists, cards, TOC, prev/next, continue
   ============================================= */
@media (max-width: 767px) {
  /* Hierarchy scaled for phone width */
  #report-container h1,
  .report-prerendered h1 {
    font-size: 1.45rem !important;
    margin-bottom: 0.85rem;
    padding-bottom: 0.7rem;
    border-bottom-width: 2px;
    letter-spacing: -0.02em;
  }

  #report-container h2,
  .report-prerendered h2 {
    font-size: 1.18rem !important;
    margin-top: 1.5rem;
    margin-bottom: 0.55rem;
    padding-left: 0.65rem;
    border-left-width: 4px;
  }

  #report-container h3,
  .report-prerendered h3 {
    font-size: 1.05rem !important;
    margin-top: 1.15rem;
    margin-bottom: 0.4rem;
  }

  #report-container p,
  .report-prerendered p {
    margin-bottom: 1.15rem;
    line-height: 1.72;
  }

  #report-container .report-lead,
  .report-prerendered > p:first-of-type {
    font-size: 1rem;
    margin-bottom: 1.25rem;
  }

  #report-container ul,
  #report-container ol {
    margin-bottom: 1.25rem;
    padding-left: 1.15rem;
  }

  #report-container ul li::before {
    left: -0.85rem;
  }

  #report-container blockquote,
  #report-container blockquote.report-insight-card,
  #report-container .report-insight-card {
    padding: 0.9rem 0.95rem;
    margin: 1.25rem 0;
    border-radius: 0.75rem;
    font-size: 0.98em;
  }

  #report-container hr {
    margin: 1.75rem 0;
  }

  /* Terminology cards — full width, readable, no cramped 2-col on tiny screens */
  .term-card-grid {
    gap: 0.7rem;
    margin-bottom: 1.5rem;
  }

  .term-card {
    padding: 0.85rem 0.9rem 0.9rem;
    border-radius: 0.8rem;
  }

  #report-container .term-card__term,
  .term-card__term {
    font-size: 0.9rem !important;
    margin-bottom: 0.35rem !important;
  }

  #report-container .term-card__def,
  .term-card__def {
    font-size: 0.92em;
    line-height: 1.58;
  }

  /* Study toolbar — easy thumb target, full-width feel */
  .report-study-toolbar {
    justify-content: stretch;
    margin-bottom: 0.85rem;
    padding-bottom: 0.7rem;
    gap: 0.45rem;
  }

  .report-study-btn {
    flex: 1 1 auto;
    min-height: 2.5rem;
    padding: 0.45rem 0.9rem;
    font-size: 0.78rem;
    text-align: center;
  }

  /* Mobile TOC links — larger touch targets */
  .report-toc-mobile {
    margin-bottom: 1rem;
  }

  .report-toc-mobile .report-toc-link {
    padding: 0.55rem 0.35rem 0.55rem 0.7rem;
    font-size: 0.86rem;
    line-height: 1.35;
    min-height: 2.5rem;
    display: flex;
    align-items: center;
  }

  /* Prev / next topic cards */
  .topic-prev-next {
    gap: 0.65rem;
    margin-top: 1.35rem;
    padding-top: 1.15rem;
  }

  .topic-prev-next__link {
    padding: 0.85rem 0.9rem;
    border-radius: 12px;
    min-height: 3.25rem;
  }

  .topic-prev-next__title {
    font-size: 0.88rem;
  }

  /* Continue learning block under report */
  #report-section .dive-continue {
    margin-top: 1.25rem;
    padding: 1.15rem 1rem !important;
    border-radius: 1.15rem;
  }

  .dive-continue__title {
    font-size: 1.15rem;
  }

  .dive-continue__lead {
    font-size: 0.92rem;
    margin-bottom: 0.95rem;
  }

  .dive-continue__btn {
    width: 100%;
    max-width: 100%;
    white-space: normal;
    line-height: 1.3;
  }

  .dive-continue__hint {
    font-size: 0.82rem;
  }

  .dive-continue__disclaimer {
    font-size: 0.75rem;
    margin-top: 1rem;
  }

  .dive-continue__updated {
    white-space: normal;
  }

  /* Section label above report */
  #report-section .dive-section-head {
    margin-bottom: 1.15rem;
    gap: 0.65rem;
  }
}

/* Very small phones — maximize line length a bit more */
@media (max-width: 379px) {
  #report-section > .max-w-6xl {
    padding-left: 0.65rem;
    padding-right: 0.65rem;
  }

  #report-section .content-card:not(.dive-continue),
  #report-section .dive-report-card {
    padding: 1rem 0.85rem !important;
  }

  #report-container {
    font-size: 1.02rem;
  }

  #report-container h1,
  .report-prerendered h1 {
    font-size: 1.32rem !important;
  }

  #report-container h2,
  .report-prerendered h2 {
    font-size: 1.1rem !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .section-nav-sticky {
    transition: none;
  }
}
