/* ==========================================================================
   ViralScope — Awwwards-Level Design System & Stylesheet
   Art Direction: "The Attention Physics Lab"
   Typography: Syne (Display), Space Grotesk (Subhead), Plus Jakarta Sans (UI), JetBrains Mono (Data)
   Palette: Void Obsidian & Electric Cyan (Dark) / Pure Alabaster & Sapphire (Light)
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Design Tokens & CSS Custom Properties
   -------------------------------------------------------------------------- */
:root,
html[data-theme="dark"],
body[data-theme="dark"],
[data-theme="dark"] {
  /* Color Tokens - Midnight Laboratory Dark */
  --bg-void: #07090e;
  --bg-main: #0a0d14;
  --bg-panel: #0d121c;
  --bg-card: #121826;
  --bg-card-hover: #172033;
  --bg-card-elevated: #161e2e;
  --bg-input: #0b0f17;
  --bg-input-focus: #101622;
  --bg-canvas-wrapper: radial-gradient(circle at center, #0e1626 0%, #060911 100%);

  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-medium: rgba(255, 255, 255, 0.14);
  --border-accent: rgba(0, 242, 254, 0.38);
  --border-glow: rgba(0, 242, 254, 0.2);

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-on-accent: #07090e;

  /* Bioluminescent Accents */
  --accent-cyan: #00f2fe;
  --accent-cyan-glow: rgba(0, 242, 254, 0.25);
  --accent-cyan-light: rgba(0, 242, 254, 0.12);
  --accent-blue: #3b82f6;
  --accent-blue-light: rgba(59, 130, 246, 0.14);
  --accent-indigo: #6366f1;
  --accent-indigo-light: rgba(99, 102, 241, 0.15);
  --accent-emerald: #10b981;
  --accent-emerald-light: rgba(16, 185, 129, 0.15);
  --accent-amber: #f59e0b;
  --accent-amber-light: rgba(245, 158, 11, 0.15);
  --accent-rose: #f43f5e;
  --accent-rose-light: rgba(244, 63, 94, 0.15);

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow-card: 0 8px 32px -4px rgba(0, 0, 0, 0.6), 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-card-hover: 0 16px 48px -4px rgba(0, 0, 0, 0.75), 0 0 24px var(--accent-cyan-glow);
  --shadow-glow: 0 0 35px rgba(0, 242, 254, 0.3);

  --gauge-bg: rgba(255, 255, 255, 0.08);
  --gauge-stroke: #00f2fe;
}

html[data-theme="light"],
body[data-theme="light"],
[data-theme="light"] {
  /* Color Tokens - Modern Editorial Light */
  --bg-void: #f1f5f9;
  --bg-main: #f8fafc;
  --bg-panel: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #f8fafc;
  --bg-card-elevated: #f1f5f9;
  --bg-input: #f1f5f9;
  --bg-input-focus: #e2e8f0;
  --bg-canvas-wrapper: radial-gradient(circle at center, #ffffff 0%, #e2e8f0 100%);

  --border-subtle: rgba(15, 23, 42, 0.08);
  --border-medium: rgba(15, 23, 42, 0.14);
  --border-accent: rgba(2, 132, 199, 0.4);
  --border-glow: rgba(2, 132, 199, 0.18);

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --text-on-accent: #ffffff;

  --accent-cyan: #0284c7;
  --accent-cyan-glow: rgba(2, 132, 199, 0.2);
  --accent-cyan-light: #e0f2fe;
  --accent-blue: #2563eb;
  --accent-blue-light: #dbeafe;
  --accent-indigo: #4f46e5;
  --accent-indigo-light: #e0e7ff;
  --accent-emerald: #059669;
  --accent-emerald-light: #d1fae5;
  --accent-amber: #d97706;
  --accent-amber-light: #fef3c7;
  --accent-rose: #e11d48;
  --accent-rose-light: #ffe4e6;

  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06);
  --shadow-card: 0 6px 24px -2px rgba(15, 23, 42, 0.07), 0 2px 6px -1px rgba(15, 23, 42, 0.04);
  --shadow-card-hover: 0 16px 36px -4px rgba(15, 23, 42, 0.12), 0 4px 12px -2px rgba(15, 23, 42, 0.06);
  --shadow-glow: 0 0 28px rgba(2, 132, 199, 0.2);

  --gauge-bg: rgba(15, 23, 42, 0.08);
  --gauge-stroke: #0284c7;
}

:root {
  /* Common System Metrics */
  --font-display: 'Syne', -apple-system, sans-serif;
  --font-subhead: 'Space Grotesk', sans-serif;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 26px;
  --radius-pill: 9999px;

  --transition-instant: 0.1s ease-out;
  --transition-fast: 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-smooth: 0.32s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-bounce: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* --------------------------------------------------------------------------
   2. Reset, Base & Smooth Scroll Setup
   -------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Lenis Recommended Engine CSS */
html.lenis, html.lenis body {
  height: auto;
}

.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}

.lenis.lenis-smooth [data-lenis-prevent] {
  overscroll-behavior: contain;
}

.lenis.lenis-stopped {
  overflow: hidden;
}

.lenis.lenis-scrolling iframe {
  pointer-events: none;
}

body {
  background-color: var(--bg-void);
  color: var(--text-primary);
  font-family: var(--font-sans);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  transition: background-color var(--transition-smooth), color var(--transition-smooth);
}

/* Accessible focus outline */
:focus-visible {
  outline: 2px solid var(--accent-cyan);
  outline-offset: 3px;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

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

::-webkit-scrollbar-thumb {
  background: var(--border-medium);
  border-radius: var(--radius-pill);
}

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

/* Section anchors for smooth jump navigation */
.section-anchor {
  display: block;
  position: relative;
  top: -85px;
  visibility: hidden;
}

/* --------------------------------------------------------------------------
   3. Ambient Decorative Glows
   -------------------------------------------------------------------------- */
.ambient-glow {
  position: fixed;
  pointer-events: none;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.12;
  z-index: 0;
  transform: translateZ(0);
}

.ambient-cyan {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, #00f2fe 0%, transparent 70%);
  top: 10%;
  right: -100px;
}

.ambient-indigo {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, #6366f1 0%, transparent 70%);
  bottom: 20%;
  left: -150px;
}

/* --------------------------------------------------------------------------
   4. Floating Telemetry HUD Navigation
   -------------------------------------------------------------------------- */
.top-nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(10, 13, 20, 0.78);
  border-bottom: 1px solid var(--border-subtle);
  transition: background var(--transition-smooth), border-color var(--transition-smooth);
}

html[data-theme="light"] .top-nav {
  background: rgba(255, 255, 255, 0.85);
}

.nav-container {
  max-width: 1380px;
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text-primary);
  transition: transform var(--transition-fast);
}

.brand:hover {
  transform: translateY(-1px);
}

.brand-logo {
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #ffffff 0%, var(--accent-cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

html[data-theme="light"] .brand-name {
  background: linear-gradient(135deg, #0f172a 0%, #0284c7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-tagline {
  font-family: var(--font-subhead);
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
}

/* Nav Links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.nav-link {
  font-family: var(--font-subhead);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  letter-spacing: 0.04em;
  padding: 0.35rem 0.6rem;
  border-radius: var(--radius-sm);
  transition: color var(--transition-fast), background var(--transition-fast);
}

.nav-link:hover {
  color: var(--accent-cyan);
  background: var(--accent-cyan-light);
}

/* Nav Actions Cluster */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-pill);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  border: 1px solid transparent;
  transition: all var(--transition-fast);
}

.badge-neutral {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
  border-color: var(--border-subtle);
}

html[data-theme="light"] .badge-neutral {
  background: #f1f5f9;
  color: #475569;
}

.badge-info {
  background: var(--accent-blue-light);
  color: var(--accent-blue);
  border-color: rgba(59, 130, 246, 0.25);
}

.badge-accent {
  background: var(--accent-cyan-light);
  color: var(--accent-cyan);
  border-color: rgba(0, 242, 254, 0.3);
}

.status-indicator {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-emerald);
  box-shadow: 0 0 8px var(--accent-emerald);
  display: inline-block;
  animation: pulse-emerald 2s infinite ease-in-out;
}

@keyframes pulse-emerald {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.6; }
}

/* Theme Toggle Button */
.theme-toggle-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-pill);
  padding: 0.25rem 0.65rem;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.theme-toggle-btn:hover {
  border-color: var(--accent-cyan);
  color: var(--text-primary);
}

.theme-toggle-track {
  position: relative;
  width: 38px;
  height: 20px;
  background: var(--bg-input);
  border-radius: var(--radius-pill);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 4px;
}

.theme-icon {
  font-size: 0.65rem;
  line-height: 1;
  z-index: 1;
}

.theme-toggle-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent-cyan);
  box-shadow: 0 0 6px var(--accent-cyan);
  transition: transform var(--transition-smooth);
}

html[data-theme="light"] .theme-toggle-thumb {
  transform: translateX(18px);
  background: #0284c7;
}

.theme-label {
  font-family: var(--font-subhead);
  font-size: 0.75rem;
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   5. Cautionary Transparency Ribbon
   -------------------------------------------------------------------------- */
.caveat-banner {
  background: linear-gradient(90deg, rgba(99, 102, 241, 0.08) 0%, rgba(0, 242, 254, 0.08) 100%);
  border-bottom: 1px solid rgba(0, 242, 254, 0.15);
  padding: 0.5rem 1.5rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
  position: relative;
  z-index: 900;
}

.caveat-inner {
  max-width: 1380px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.caveat-icon {
  color: var(--accent-cyan);
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.caveat-text {
  font-size: 0.78rem;
  line-height: 1.4;
}

/* --------------------------------------------------------------------------
   6. Hero Viewport: The Attention Physics Chamber
   -------------------------------------------------------------------------- */
.hero-section {
  position: relative;
  min-height: 82vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4rem 1.5rem 5rem;
  overflow: hidden;
  border-bottom: 1px solid var(--border-subtle);
}

.hero-webgl-wrapper {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
}

#hero-webgl-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.hero-fallback-poster {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.35;
  filter: blur(30px) saturate(1.4);
  z-index: -1;
  pointer-events: none;
}

.hero-vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, transparent 40%, var(--bg-void) 95%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 10;
  max-width: 960px;
  margin: 0 auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.95rem;
  background: rgba(0, 242, 254, 0.08);
  border: 1px solid rgba(0, 242, 254, 0.25);
  border-radius: var(--radius-pill);
  font-family: var(--font-subhead);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-cyan);
  margin-bottom: 1.5rem;
  backdrop-filter: blur(8px);
}

.pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-cyan);
  box-shadow: 0 0 8px var(--accent-cyan);
  animation: pulse-emerald 2s infinite ease-in-out;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5.5vw, 4.4rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.035em;
  color: var(--text-primary);
  margin-bottom: 1.35rem;
  max-width: 880px;
}

.split-word {
  display: inline-block;
  margin-right: 0.18em;
  transition: transform var(--transition-fast);
}

.split-word:hover {
  transform: translateY(-2px);
}

.gradient-text {
  background: linear-gradient(135deg, #00f2fe 0%, #6366f1 70%, #ec4899 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

html[data-theme="light"] .gradient-text {
  background: linear-gradient(135deg, #0284c7 0%, #4f46e5 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-lead {
  font-size: clamp(1rem, 1.8vw, 1.18rem);
  line-height: 1.65;
  color: var(--text-secondary);
  max-width: 740px;
  margin-bottom: 2.25rem;
}

/* Hero Telemetry Specs Grid */
.hero-telemetry-grid {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1.5rem;
  background: rgba(18, 24, 38, 0.6);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-pill);
  padding: 0.75rem 1.75rem;
  margin-bottom: 2.5rem;
  backdrop-filter: blur(12px);
}

html[data-theme="light"] .hero-telemetry-grid {
  background: rgba(255, 255, 255, 0.75);
}

.telemetry-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
}

.telemetry-label {
  font-family: var(--font-subhead);
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.telemetry-val {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-primary);
}

.telemetry-divider {
  width: 1px;
  height: 24px;
  background: var(--border-subtle);
}

/* Hero Action Buttons */
.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.4rem;
  border-radius: var(--radius-md);
  font-family: var(--font-subhead);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition-fast);
  border: 1px solid transparent;
  user-select: none;
}

.btn:active {
  transform: scale(0.98);
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
}

.btn-hero-primary {
  background: linear-gradient(135deg, #00f2fe 0%, #2563eb 100%);
  color: #07090e;
  font-weight: 700;
  box-shadow: 0 4px 20px rgba(0, 242, 254, 0.35);
}

.btn-hero-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 242, 254, 0.5);
  color: #07090e;
}

.btn-hero-secondary {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
  border-color: var(--border-medium);
  backdrop-filter: blur(8px);
}

.btn-hero-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  transform: translateY(-2px);
}

/* --------------------------------------------------------------------------
   7. Layout Container & Panels
   -------------------------------------------------------------------------- */
.main-container {
  max-width: 1380px;
  margin: 0 auto;
  padding: 3rem 1.5rem 6rem;
  display: flex;
  flex-direction: column;
  gap: 3.5rem;
  position: relative;
  z-index: 10;
}

.panel {
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 2.25rem;
  box-shadow: var(--shadow-card);
  transition: border-color var(--transition-smooth), box-shadow var(--transition-smooth);
}

.panel:hover {
  border-color: var(--border-medium);
}

.panel-hero-bar {
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 1.5rem;
}

.panel-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 0.5rem;
}

.section-tag {
  font-family: var(--font-subhead);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-cyan);
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 2.8vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--text-primary);
}

.section-desc {
  font-size: 0.92rem;
  color: var(--text-secondary);
  max-width: 780px;
}

/* --------------------------------------------------------------------------
   8. Cockpit Asymmetric Studio Grid
   -------------------------------------------------------------------------- */
.cockpit-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 2rem;
}

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

.cockpit-col {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.cockpit-subcard {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  transition: all var(--transition-fast);
}

.cockpit-subcard:hover {
  border-color: var(--border-medium);
  box-shadow: var(--shadow-sm);
}

.subcard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1.35rem;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 0.85rem;
}

.subcard-number {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent-cyan);
}

.subcard-header h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  flex: 1;
}

/* Forms & Controls */
.form-group {
  margin-bottom: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.form-row-dual {
  display: flex;
  gap: 1rem;
}

.flex-1 {
  flex: 1;
}

label {
  font-family: var(--font-subhead);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.input-spec {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
}

.input-select, .form-control {
  width: 100%;
  background: var(--bg-input);
  color: var(--text-primary);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  padding: 0.7rem 0.95rem;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  transition: all var(--transition-fast);
  appearance: none;
  -webkit-appearance: none;
}

.input-select:focus, .form-control:focus {
  border-color: var(--accent-cyan);
  background: var(--bg-input-focus);
  box-shadow: 0 0 0 3px var(--accent-cyan-light);
  outline: none;
}

select.input-select, select.form-control {
  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='%2300f2fe' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.95rem center;
  background-size: 14px;
  padding-right: 2.5rem;
}

html[data-theme="light"] select.input-select {
  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='%230284c7' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
}

.input-textarea {
  resize: vertical;
  min-height: 95px;
  line-height: 1.5;
}

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

/* Custom Dropzone */
.dropzone-box {
  border: 2px dashed var(--border-medium);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  text-align: center;
  background: rgba(0, 0, 0, 0.15);
  cursor: pointer;
  transition: all var(--transition-fast);
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.dropzone-box:hover, .dropzone-box.drag-over {
  border-color: var(--accent-cyan);
  background: var(--accent-cyan-light);
  transform: translateY(-1px);
}

.dropzone-icon {
  color: var(--accent-cyan);
}

.dropzone-title {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
}

.dropzone-subtitle {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.file-input-hidden {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

/* Video Preview Player */
.video-preview-wrapper {
  margin-top: 0.75rem;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #000;
  border: 1px solid var(--border-medium);
}

#video-preview-player {
  width: 100%;
  max-height: 220px;
  display: block;
}

.file-info-badge {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent-cyan);
  background: var(--accent-cyan-light);
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-sm);
  margin-top: 0.4rem;
}

/* Progress Box */
.upload-progress-box {
  margin-top: 0.75rem;
  background: var(--bg-card-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.75rem;
}

.progress-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-bottom: 0.45rem;
}

.progress-bar-track {
  height: 6px;
  background: var(--bg-input);
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.progress-bar-indicator {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, #00f2fe, #6366f1);
  border-radius: var(--radius-pill);
  animation: shimmer-bar 1.5s infinite linear;
}

@keyframes shimmer-bar {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.upload-error-banner {
  margin-top: 0.75rem;
  border-color: rgba(244, 63, 94, 0.4);
  background: var(--accent-rose-light);
  color: var(--accent-rose);
}

/* Seed Randomizer input */
.seed-input-wrap {
  display: flex;
  gap: 0.35rem;
}

.btn-icon-seed {
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  padding: 0 0.75rem;
  cursor: pointer;
  font-size: 1rem;
  transition: all var(--transition-fast);
}

.btn-icon-seed:hover {
  border-color: var(--accent-cyan);
  transform: rotate(20deg);
}

/* Mode Explanations */
.mode-help-text {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin-top: 0.35rem;
}

.mode-groq-notice {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  color: var(--accent-emerald);
  margin-top: 0.35rem;
}

.bullet-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

/* Action Dock & Master Buttons */
.action-dock {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.btn-master-run {
  position: relative;
  overflow: hidden;
  padding: 1rem 1.75rem;
  font-size: 1rem;
  font-weight: 700;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #00f2fe 0%, #2563eb 100%);
  color: #07090e;
  box-shadow: 0 4px 20px rgba(0, 242, 254, 0.35);
  border: none;
}

.btn-master-run:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 242, 254, 0.55);
}

.btn-master-run:active {
  transform: scale(0.98);
}

.btn-shimmer {
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  animation: button-shimmer 3s infinite ease-in-out;
}

@keyframes button-shimmer {
  0% { left: -100%; }
  40%, 100% { left: 100%; }
}

.btn-primary {
  background: linear-gradient(135deg, #00f2fe 0%, #2563eb 100%);
  color: #07090e;
}

.btn-primary:hover {
  box-shadow: 0 4px 18px rgba(0, 242, 254, 0.4);
}

.btn-secondary {
  background: var(--bg-card-elevated);
  color: var(--text-primary);
  border: 1px solid var(--border-medium);
}

.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

.btn-full {
  width: 100%;
}

.btn-sm {
  padding: 0.45rem 0.85rem;
  font-size: 0.78rem;
}

/* Content Brief Inspector Card */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-fast);
}

.card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 0.85rem;
}

.card-kicker {
  font-family: var(--font-subhead);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-cyan);
  display: block;
  margin-bottom: 0.2rem;
}

.card-header h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
}

.brief-body {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.brief-field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.field-label {
  font-family: var(--font-subhead);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.field-value {
  font-size: 0.88rem;
  color: var(--text-primary);
}

.quote-box {
  font-family: var(--font-display);
  font-size: 1rem;
  font-style: italic;
  line-height: 1.45;
  color: var(--accent-cyan);
  border-left: 3px solid var(--accent-cyan);
  padding: 0.5rem 0 0.5rem 0.85rem;
  background: var(--accent-cyan-light);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.cta-badge {
  display: inline-block;
  background: var(--accent-indigo-light);
  color: var(--accent-indigo);
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   9. Results Dashboard: Metrics & Gauges
   -------------------------------------------------------------------------- */
.results-panel {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 1.25rem;
}

.provenance-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.prov-label {
  font-family: var(--font-subhead);
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Empty State Idle Screen */
.empty-state {
  text-align: center;
  padding: 4.5rem 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px dashed var(--border-medium);
  border-radius: var(--radius-xl);
  background: rgba(0, 0, 0, 0.1);
}

.empty-state-radar {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  border: 2px solid var(--border-medium);
  position: relative;
  margin-bottom: 1.5rem;
  overflow: hidden;
  box-shadow: 0 0 24px var(--accent-cyan-glow);
}

.radar-sweep {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 45px;
  height: 45px;
  background: linear-gradient(45deg, var(--accent-cyan), transparent);
  transform-origin: 0% 0%;
  animation: radar-spin 2.5s infinite linear;
}

@keyframes radar-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.radar-dot {
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent-cyan);
}

.dot-1 { top: 30%; left: 40%; animation: pulse-emerald 1.8s infinite 0.2s; }
.dot-2 { top: 60%; left: 70%; animation: pulse-emerald 1.8s infinite 0.8s; }
.dot-3 { top: 75%; left: 30%; animation: pulse-emerald 1.8s infinite 1.2s; }

.empty-state h3 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  margin-bottom: 0.5rem;
}

.empty-state p {
  color: var(--text-secondary);
  max-width: 500px;
  font-size: 0.92rem;
}

/* Metrics Grid */
.metrics-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.75rem;
}

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

.metric-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.metric-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.metric-subtitle {
  font-family: var(--font-subhead);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
}

.metric-badge-heuristic {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--border-subtle);
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-pill);
}

/* Radial Gauge Styling */
.readiness-gauge-wrap {
  position: relative;
  width: 140px;
  height: 140px;
  margin: 0.5rem auto 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.radial-gauge {
  transform: rotate(-90deg);
  width: 100%;
  height: 100%;
}

.gauge-bg {
  stroke: var(--gauge-bg);
}

.gauge-fill {
  stroke: var(--gauge-stroke);
  stroke-linecap: round;
  transition: stroke-dashoffset 1.2s cubic-bezier(0.16, 1, 0.3, 1), stroke 0.3s ease;
  filter: drop-shadow(0 0 6px var(--accent-cyan-glow));
}

.score-display-center {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.score-number {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1;
  color: var(--text-primary);
}

.score-total {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
}

.badge-tier {
  align-self: center;
  font-size: 0.82rem;
  padding: 0.35rem 0.95rem;
  font-weight: 700;
  background: var(--accent-emerald-light);
  color: var(--accent-emerald);
  border: 1px solid rgba(16, 185, 129, 0.3);
  margin-bottom: 0.75rem;
}

.reach-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin: 0.5rem 0 1.25rem;
}

.reach-submetrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

.submetric-pill {
  background: var(--bg-card-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.65rem 0.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
}

.submetric-label {
  font-family: var(--font-subhead);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.submetric-pill strong {
  font-size: 1.15rem;
  color: var(--accent-cyan);
}

.metric-footnote {
  font-size: 0.74rem;
  color: var(--text-muted);
  line-height: 1.35;
  text-align: center;
}

/* --------------------------------------------------------------------------
   10. Synthetic Audience Propagation Graph & Studio Controls
   -------------------------------------------------------------------------- */
.canvas-card {
  padding: 2rem;
  background: var(--bg-card);
}

.canvas-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.canvas-header-controls {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.canvas-wrapper {
  position: relative;
  width: 100%;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-medium);
  background: var(--bg-canvas-wrapper);
  box-shadow: inset 0 0 35px rgba(0, 0, 0, 0.5);
  margin: 1.25rem 0;
}

.canvas-radar-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: 
    radial-gradient(circle at center, transparent 30%, rgba(0, 242, 254, 0.02) 70%),
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 100% 100%, 40px 40px, 40px 40px;
}

#propagation-canvas {
  width: 100%;
  height: 420px;
  display: block;
  cursor: crosshair;
}

/* Studio Playback Controls */
.canvas-controls-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 0.75rem 1rem;
  background: var(--bg-card-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}

.canvas-playback-btns {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.canvas-speed-ctrl {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-subhead);
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.input-select-sm {
  background: var(--bg-input);
  color: var(--text-primary);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  padding: 0.35rem 0.65rem;
  font-size: 0.78rem;
}

/* Legend */
.canvas-legend-row {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-top: 1rem;
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.dot-unexposed { background: #64748b; }
.dot-pool { background: #00f2fe; box-shadow: 0 0 6px #00f2fe; }
.dot-exposed { background: #3b82f6; box-shadow: 0 0 6px #3b82f6; }
.dot-shared { background: #f59e0b; box-shadow: 0 0 8px #f59e0b; }

.canvas-disclaimer {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: 0.75rem;
}

/* Canvas Node Tooltip */
.canvas-tooltip {
  position: absolute;
  pointer-events: none;
  background: rgba(10, 13, 20, 0.94);
  border: 1px solid var(--accent-cyan);
  border-radius: var(--radius-md);
  padding: 0.65rem 0.85rem;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.6);
  z-index: 2000;
  backdrop-filter: blur(8px);
  font-size: 0.78rem;
  color: #fff;
  max-width: 260px;
}

.tooltip-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
}

.tooltip-tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--accent-cyan);
}

.tooltip-meta {
  color: #94a3b8;
  margin-bottom: 0.2rem;
}

.tooltip-hint {
  font-size: 0.7rem;
  color: var(--accent-cyan);
  margin-top: 0.35rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 0.25rem;
}

/* --------------------------------------------------------------------------
   11. Heuristic Spectrum & Component Bars
   -------------------------------------------------------------------------- */
.components-list {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  margin-top: 1.25rem;
}

.component-row {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.component-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
}

.component-name {
  font-weight: 600;
  color: var(--text-primary);
}

.component-val {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--accent-cyan);
}

.progress-bar-bg {
  height: 8px;
  background: var(--bg-input);
  border-radius: var(--radius-pill);
  overflow: hidden;
  position: relative;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-cyan), #6366f1);
  border-radius: var(--radius-pill);
  transition: width 0.85s cubic-bezier(0.16, 1, 0.3, 1);
}

/* --------------------------------------------------------------------------
   12. Actionable Improvement Hypotheses
   -------------------------------------------------------------------------- */
.tips-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-top: 1.25rem;
}

.tip-item {
  background: var(--bg-card-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.35rem;
  transition: all var(--transition-fast);
}

.tip-item:hover {
  border-color: var(--border-medium);
  transform: translateX(3px);
}

.tip-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
}

.tip-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
}

.tip-badges-wrap {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.tip-priority {
  font-family: var(--font-subhead);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-pill);
}

.priority-high {
  background: var(--accent-rose-light);
  color: var(--accent-rose);
  border: 1px solid rgba(244, 63, 94, 0.3);
}

.priority-medium {
  background: var(--accent-amber-light);
  color: var(--accent-amber);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.priority-low {
  background: var(--accent-blue-light);
  color: var(--accent-blue);
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.tip-direction {
  font-family: var(--font-subhead);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-pill);
  background: var(--accent-cyan-light);
  color: var(--accent-cyan);
}

.tip-suggestion {
  font-size: 0.88rem;
  color: var(--text-primary);
  line-height: 1.5;
  margin-bottom: 0.45rem;
}

.tip-why {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

.tip-evidence-chips {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.75rem;
  flex-wrap: wrap;
}

.evidence-tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-xs);
  color: var(--accent-cyan);
}

/* --------------------------------------------------------------------------
   13. Counterfactual Simulation Comparison Studio
   -------------------------------------------------------------------------- */
.counterfactual-card {
  background: var(--bg-card);
  border: 1px solid var(--border-accent);
  box-shadow: 0 0 24px var(--accent-cyan-glow);
}

.cf-form {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  margin-top: 1.25rem;
  background: var(--bg-card-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}

.cf-checkbox-group {
  margin-bottom: 0;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.84rem;
  color: var(--text-secondary);
  cursor: pointer;
}

.cf-comparison-result {
  margin-top: 1.75rem;
  border-top: 1px solid var(--border-subtle);
  padding-top: 1.5rem;
}

.cf-result-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.cf-result-header h4 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
}

.cf-disclaimer-callout {
  background: var(--accent-cyan-light);
  border-left: 3px solid var(--accent-cyan);
  padding: 0.75rem 1rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin-bottom: 1rem;
  font-size: 0.82rem;
  color: var(--text-primary);
}

.cf-warning-callout {
  background: var(--accent-amber-light);
  border-left: 3px solid var(--accent-amber);
  padding: 0.75rem 1rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin-bottom: 1rem;
  font-size: 0.82rem;
  color: var(--accent-amber);
}

.cf-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

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

.cf-subcard {
  background: var(--bg-card-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem;
}

.cf-subcard h5 {
  font-family: var(--font-subhead);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 0.85rem;
}

.cf-meta-table {
  width: 100%;
  font-size: 0.8rem;
  border-collapse: collapse;
}

.cf-meta-table td {
  padding: 0.35rem 0;
}

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

.meta-val {
  text-align: right;
  color: var(--text-primary);
  font-weight: 600;
}

.cf-deltas-container {
  background: var(--bg-card-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem;
}

.cf-deltas-title {
  font-family: var(--font-subhead);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.cf-deltas-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.85rem;
}

@media (max-width: 900px) {
  .cf-deltas-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.cf-delta-cell {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.85rem;
  text-align: center;
}

/* --------------------------------------------------------------------------
   14. Synthetic Audience Inspector with Photography Avatars
   -------------------------------------------------------------------------- */
.persona-inspector-card {
  background: var(--bg-panel);
  border: 1px solid var(--border-accent);
}

.inspector-grid {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 1.75rem;
  margin-top: 1.25rem;
  min-height: 520px;
}

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

.inspector-list-col {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  height: 100%;
}

.input-search {
  padding: 0.6rem 0.85rem;
  font-size: 0.82rem;
}

.personas-scroll-list {
  flex: 1;
  max-height: 480px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding-right: 0.4rem;
}

.persona-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0.85rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.persona-list-item:hover {
  border-color: var(--accent-cyan);
  background: var(--bg-card-hover);
  transform: translateX(2px);
}

.persona-list-item.active {
  border-color: var(--accent-cyan);
  background: var(--accent-cyan-light);
  box-shadow: 0 0 12px var(--accent-cyan-glow);
}

.item-id {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--accent-cyan);
  background: rgba(0, 242, 254, 0.1);
  padding: 0.15rem 0.4rem;
  border-radius: var(--radius-xs);
  margin-right: 0.5rem;
}

.item-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
}

.item-seg {
  font-family: var(--font-subhead);
  font-size: 0.68rem;
  text-transform: capitalize;
  color: var(--text-muted);
}

/* Persona Profile Card */
.profile-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2rem;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.profile-empty-msg {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--text-muted);
  font-size: 0.9rem;
  text-align: center;
}

.profile-header-with-photo {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 1.25rem;
}

.persona-photo-avatar {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--accent-cyan);
  box-shadow: 0 0 14px var(--accent-cyan-glow);
  flex-shrink: 0;
}

.profile-title h4 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-primary);
}

.profile-subtitle {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

.profile-section-title {
  font-family: var(--font-subhead);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin: 1.15rem 0 0.5rem;
}

.profile-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.tag-chip {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  background: var(--bg-card-elevated);
  border: 1px solid var(--border-subtle);
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-pill);
  color: var(--text-secondary);
}

.traits-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

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

.trait-row {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.trait-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
}

.trait-name {
  color: var(--text-secondary);
  text-transform: capitalize;
}

.trait-val {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--accent-cyan);
}

/* --------------------------------------------------------------------------
   15. Persona Quotes & Event Log
   -------------------------------------------------------------------------- */
.quotes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
  margin-top: 1.25rem;
}

.quote-card {
  background: var(--bg-card-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.quote-persona {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.quote-author-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.quote-avatar-small {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--accent-cyan);
}

.quote-content {
  font-style: italic;
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--text-primary);
}

/* Event Log */
.events-log {
  max-height: 280px;
  overflow-y: auto;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.75rem;
}

.event-entry {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.35rem 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.event-id {
  color: var(--accent-cyan);
}

.event-type {
  color: var(--accent-indigo);
  font-weight: 600;
}

.event-detail {
  color: var(--text-muted);
  word-break: break-all;
}

/* --------------------------------------------------------------------------
   16. Accordions, Disclaimers & Footer
   -------------------------------------------------------------------------- */
.limitations-card {
  background: var(--bg-card);
  cursor: pointer;
}

.limitations-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-subhead);
  font-weight: 700;
  font-size: 0.95rem;
  outline: none;
  list-style: none;
}

.limitations-summary::-webkit-details-marker {
  display: none;
}

.summary-badge {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent-cyan);
  background: var(--accent-cyan-light);
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-pill);
}

.limitations-body {
  margin-top: 1.25rem;
  border-top: 1px solid var(--border-subtle);
  padding-top: 1rem;
}

.limitations-clean-list, .warnings-clean-list {
  padding-left: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.disclaimer-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
}

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

.disclaimer-header h4 {
  font-family: var(--font-subhead);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

#disclaimer-text {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.5;
  font-style: italic;
}

/* Site Footer */
.site-footer {
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-void);
  padding: 4rem 1.5rem 2.5rem;
  position: relative;
  z-index: 10;
}

.footer-container {
  max-width: 1380px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

@media (max-width: 800px) {
  .footer-container {
    grid-template-columns: 1fr;
  }
}

.footer-brand-col {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.logo-mark {
  font-family: var(--font-mono);
  font-weight: 800;
  background: var(--accent-cyan);
  color: #07090e;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-xs);
  font-size: 0.85rem;
}

.logo-name {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-primary);
}

.footer-tagline {
  font-size: 0.88rem;
  color: var(--text-secondary);
  max-width: 440px;
}

.footer-meta {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
}

.footer-nav-col h4 {
  font-family: var(--font-subhead);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.footer-nav-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.85rem;
}

.footer-nav-col a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.footer-nav-col a:hover {
  color: var(--accent-cyan);
}

.footer-bottom {
  max-width: 1380px;
  margin: 0 auto;
  border-top: 1px solid var(--border-subtle);
  padding-top: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   17. Accessibility & Reduced Motion Safeguards
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .hero-webgl-wrapper canvas {
    display: none !important;
  }

  .hero-fallback-poster {
    opacity: 0.65 !important;
    filter: none !important;
  }

  .status-indicator, .pulse-dot, .radar-sweep, .btn-shimmer, .progress-bar-indicator {
    animation: none !important;
  }
}