/* ==========================================================
   AI INFRASTRUCTURE SERIES - EPISODE 3: GPU MEMORY & VRAM
   Aesthetics: Deep Obsidian, Cyber Amber & Crimson OOM Alert
   ========================================================== */

:root {
  --bg-base: #07090f;
  --bg-surface: #0f1424;
  --bg-surface-elevated: #161e36;
  --border-subtle: rgba(255, 255, 255, 0.08);
  
  --mem-blue: #38bdf8;
  --mem-amber: #f59e0b;
  --mem-purple: #a855f7;
  --mem-coral: #f43f5e;
  --mem-green: #10b981;
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  
  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'Fira Code', monospace;
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  
  --transition-fast: 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-smooth: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: var(--bg-base);
  color: var(--text-main);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

/* Glow Orbs */
.glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.22;
}
.orb-1 { width: 600px; height: 600px; background: radial-gradient(circle, #f59e0b, transparent 70%); top: -200px; left: -100px; }
.orb-2 { width: 700px; height: 700px; background: radial-gradient(circle, #f43f5e, transparent 70%); bottom: -250px; right: -150px; }
.orb-3 { width: 450px; height: 450px; background: radial-gradient(circle, #38bdf8, transparent 70%); top: 40%; left: 60%; opacity: 0.15; }

.grid-overlay {
  position: absolute;
  inset: 0;
  background-image: 
    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: 40px 40px;
  pointer-events: none;
  z-index: 0;
}

.app-container {
  position: relative;
  width: 100vw;
  height: 100vh;
  display: flex;
  flex-direction: column;
  z-index: 1;
}

/* ==========================================================
   TOP NAV HUD
   ========================================================== */
.top-nav {
  height: 64px;
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(10, 15, 26, 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  z-index: 10;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.hub-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
  transition: all var(--transition-fast);
}

.hub-back-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.series-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: #fcd34d;
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #f59e0b;
  box-shadow: 0 0 10px #f59e0b;
  animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.ep-tag {
  background: rgba(255, 255, 255, 0.12);
  padding: 2px 6px;
  border-radius: 4px;
  color: #fff;
}

.nav-topic-title {
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 600;
  color: var(--text-muted);
}

.nav-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.timeline-indicator {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
}

.timeline-bar {
  width: 180px;
  height: 5px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}

.timeline-fill {
  width: 14%;
  height: 100%;
  background: linear-gradient(90deg, #f59e0b, #f43f5e);
  border-radius: 999px;
  transition: width 0.3s ease;
}

.slide-dots {
  display: flex;
  gap: 8px;
}

.slide-dot-item {
  width: 24px;
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.15);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.slide-dot-item.active {
  background: #f59e0b;
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.7);
  width: 32px;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.nav-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.nav-btn.active-btn {
  background: rgba(245, 158, 11, 0.15);
  border-color: var(--mem-amber);
  color: #fcd34d;
}

.shortcut-pill {
  padding: 1px 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
}

/* ==========================================================
   PRESENTATION STAGE & SLIDES
   ========================================================== */
.presentation-stage {
  flex: 1;
  position: relative;
  overflow: hidden;
  display: flex;
}

.slide-view {
  position: absolute;
  inset: 0;
  padding: 36px 64px 80px 64px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transform: translateX(40px) scale(0.98);
  transition: opacity 0.45s cubic-bezier(0.16, 1, 0.3, 1), transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

.slide-view.active {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0) scale(1);
}

.slide-view.prev-out {
  transform: translateX(-40px) scale(0.98);
  opacity: 0;
}

/* Badges */
.badge-tag {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
}
.badge-tag.rent-accent { background: rgba(56, 189, 248, 0.12); color: var(--mem-blue); border: 1px solid rgba(56, 189, 248, 0.3); }
.badge-tag.kv-accent { background: rgba(245, 158, 11, 0.12); color: var(--mem-amber); border: 1px solid rgba(245, 158, 11, 0.3); }
.badge-tag.sim-accent { background: rgba(244, 63, 94, 0.12); color: var(--mem-coral); border: 1px solid rgba(244, 63, 94, 0.3); }
.badge-tag.quant-accent { background: rgba(16, 185, 129, 0.12); color: var(--mem-green); border: 1px solid rgba(16, 185, 129, 0.3); }
.badge-tag.trap-accent { background: rgba(244, 63, 94, 0.15); color: #fb7185; border: 1px solid rgba(244, 63, 94, 0.4); }
.badge-tag.finale-accent { background: rgba(168, 85, 247, 0.15); color: #c084fc; border: 1px solid rgba(168, 85, 247, 0.4); }

.slide-title {
  font-family: var(--font-heading);
  font-size: 38px;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 14px;
  color: #fff;
  letter-spacing: -0.02em;
}

.gradient-text {
  background: linear-gradient(135deg, #ffffff 30%, #f59e0b 70%, #f43f5e 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.slide-subtitle {
  font-size: 17px;
  line-height: 1.6;
  color: var(--text-muted);
  max-width: 900px;
}

/* ==========================================================
   SLIDE 1: TERMINAL CRASH MOCKUP
   ========================================================== */
.hero-layout {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 1100px;
  margin: 0 auto;
  gap: 24px;
}

.hook-pill {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #fb7185;
  background: rgba(244, 63, 94, 0.12);
  border: 1px solid rgba(244, 63, 94, 0.3);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 12px;
}

.terminal-crash-card {
  width: 100%;
  max-width: 860px;
  background: #05070d;
  border: 1px solid rgba(244, 63, 94, 0.4);
  box-shadow: 0 15px 50px -10px rgba(244, 63, 94, 0.3);
  border-radius: var(--radius-md);
  overflow: hidden;
  text-align: left;
}

.terminal-header {
  background: rgba(255, 255, 255, 0.04);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--border-subtle);
}

.term-dot { width: 10px; height: 10px; border-radius: 50%; }
.term-dot.red { background: #ef4444; }
.term-dot.yellow { background: #f59e0b; }
.term-dot.green { background: #10b981; }

.term-title {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
  margin-left: 6px;
}

.terminal-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.5;
}

.term-line.prompt { color: #f8fafc; }
.term-line.info { color: var(--text-dim); }
.term-line.error-line {
  color: #fb7185;
  background: rgba(244, 63, 94, 0.1);
  padding: 8px 12px;
  border-radius: 6px;
  border-left: 3px solid #f43f5e;
  animation: pulseError 2s infinite;
}

@keyframes pulseError {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.25); }
}

.rhetorical-callout {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 24px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  font-size: 15px;
  color: var(--text-main);
}

/* ==========================================================
   SPLIT LAYOUTS (SLIDES 2, 3, 6)
   ========================================================== */
.split-layout {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.analogy-lead {
  font-size: 18px;
  line-height: 1.6;
  color: #e2e8f0;
  margin-bottom: 24px;
  background: rgba(255, 255, 255, 0.03);
  padding: 16px 20px;
  border-left: 3px solid #f59e0b;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.feature-bullets {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.bullet-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--text-muted);
}

.bullet-item strong { color: #fff; }
.bullet-icon { font-size: 20px; }

.visual-chip-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.weights-die-card { border-color: rgba(56, 189, 248, 0.3); }
.kv-diagram-card { border-color: rgba(245, 158, 11, 0.3); }
.training-trap-card { border-color: rgba(244, 63, 94, 0.35); }

.chip-diagram-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  font-family: var(--font-mono);
  font-size: 11px;
}

.die-label { color: var(--text-muted); font-weight: 600; }
.clock-badge { background: rgba(56, 189, 248, 0.15); color: var(--mem-blue); padding: 3px 8px; border-radius: 4px; font-weight: 700; }
.clock-badge.kv-badge { background: rgba(245, 158, 11, 0.15); color: var(--mem-amber); }
.clock-badge.trap-badge { background: rgba(244, 63, 94, 0.15); color: #fb7185; }

/* Weights Bars */
.model-weights-bars {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.weight-bar-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.w-info {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
}

.highlight-blue { color: #38bdf8; font-weight: 700; }
.highlight-amber { color: #f59e0b; font-weight: 700; }
.highlight-purple { color: #a855f7; font-weight: 700; }
.highlight-coral { color: #fb7185; font-weight: 700; }

.w-track {
  height: 10px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 999px;
  overflow: hidden;
}

.w-fill { height: 100%; border-radius: 999px; }
.bar-8b { background: var(--mem-blue); }
.bar-13b { background: var(--mem-amber); }
.bar-moe { background: var(--mem-purple); }
.bar-70b { background: var(--mem-coral); }

.analogy-caption {
  margin-top: 14px;
  font-size: 13px;
  color: var(--text-muted);
  font-style: italic;
  text-align: center;
}

/* KV Visual Box */
.kv-animation-box {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.tokens-timeline {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.tok-pill {
  padding: 4px 8px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
}

.tok-pill.highlight-tok {
  background: rgba(245, 158, 11, 0.2);
  color: #fcd34d;
  border: 1px solid rgba(245, 158, 11, 0.4);
  font-weight: 700;
}

.cache-growth-visual {
  background: #060810;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cache-layer {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.c-label { font-family: var(--font-mono); font-size: 10px; color: var(--text-dim); }

.kv-tensor-blocks {
  display: flex;
  gap: 4px;
}

.k-b { width: 14px; height: 14px; background: #f59e0b; border-radius: 2px; }
.v-b { width: 14px; height: 14px; background: #fb7185; border-radius: 2px; }

.formula-box {
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.2);
  padding: 8px;
  border-radius: 6px;
  text-align: center;
}

.formula-box code { font-family: var(--font-mono); font-size: 11px; color: #fcd34d; }

/* ==========================================================
   SLIDE 4: INTERACTIVE VRAM BUDGET SIMULATOR
   ========================================================== */
.interactive-layout {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
}

.simulator-arena {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 28px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 24px 32px;
  align-items: center;
}

.sim-controls-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sim-control-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ctrl-header {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  font-family: var(--font-body);
  font-weight: 600;
}

.ctrl-val {
  font-family: var(--font-mono);
  color: #fcd34d;
  font-size: 12px;
}

input[type="range"] {
  width: 100%;
  accent-color: #f59e0b;
  cursor: pointer;
}

.slider-marks {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-dim);
}

select {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: #fff;
  border-radius: 6px;
  padding: 8px 10px;
  font-family: var(--font-body);
  font-size: 13px;
  cursor: pointer;
}

/* VRAM Tank Visual */
.sim-vram-tank-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.tank-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.gpu-target-switch {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
}

.gpu-target-switch select {
  font-size: 11px;
  padding: 4px 8px;
}

.total-vram-badge {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  padding: 4px 10px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  color: #fff;
}

.stacked-tank-wrapper {
  position: relative;
  height: 48px;
  background: #05070d;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.vram-stacked-bar {
  display: flex;
  height: 100%;
  width: 100%;
}

.vram-segment {
  height: 100%;
  transition: width 0.3s ease;
}

.seg-weights { background: #38bdf8; }
.seg-kv { background: #f59e0b; }
.seg-cuda { background: #64748b; }

.limit-line {
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  width: 2px;
  background: #ef4444;
  pointer-events: none;
}

.oom-alert-banner {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: rgba(244, 63, 94, 0.15);
  border: 1px solid #f43f5e;
  border-radius: var(--radius-sm);
  font-size: 12px;
  color: #fb7185;
  animation: pulseError 1.5s infinite;
}

.oom-alert-banner.active-oom {
  display: flex;
}

.tank-legend {
  display: flex;
  gap: 16px;
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--text-muted);
}

.leg-item { display: flex; align-items: center; gap: 6px; }
.dot-swatch { width: 8px; height: 8px; border-radius: 50%; }
.dot-swatch.blue { background: #38bdf8; }
.dot-swatch.amber { background: #f59e0b; }
.dot-swatch.grey { background: #64748b; }

/* ==========================================================
   SLIDE 5: QUANTIZATION CARDS
   ========================================================== */
.quantization-showcase-grid {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.quant-card {
  flex: 1;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  transition: transform var(--transition-smooth);
}

.quant-card:hover { transform: translateY(-4px); }

.highlight-quant {
  border-color: rgba(16, 185, 129, 0.4);
  box-shadow: 0 10px 30px -10px rgba(16, 185, 129, 0.3);
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.08) 0%, rgba(15, 20, 36, 0.95) 100%);
}

.q-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  background: rgba(244, 63, 94, 0.15);
  color: #fb7185;
}
.q-badge.purple { background: rgba(168, 85, 247, 0.15); color: #c084fc; }
.q-badge.green { background: rgba(16, 185, 129, 0.15); color: #34d399; }

.q-icon { font-size: 32px; }

.q-formula { font-size: 13px; color: var(--text-muted); }
.q-formula strong { color: #fff; }

.model-size-calc {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-dim);
}

.size-val { font-family: var(--font-mono); font-size: 15px; font-weight: 800; }
.size-val.red { color: #fb7185; }
.size-val.purple { color: #c084fc; }
.size-val.green { color: #34d399; }

.hardware-needed {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-dim);
  background: rgba(255, 255, 255, 0.04);
  padding: 4px 8px;
  border-radius: 4px;
}

.quant-operator {
  font-size: 24px;
  font-weight: 800;
  color: var(--text-dim);
}

.connection-banner {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 24px;
  background: linear-gradient(90deg, rgba(16, 185, 129, 0.1), rgba(245, 158, 11, 0.05));
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: var(--radius-lg);
  margin-top: 14px;
}

.banner-icon { font-size: 24px; }
.banner-text { font-size: 14px; line-height: 1.55; color: #e2e8f0; }

/* ==========================================================
   SLIDE 6: TRAINING VS INFERENCE GAP
   ========================================================== */
.side-by-side-bars {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: flex-end;
  height: 240px;
  padding-bottom: 12px;
}

.bar-column {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  height: 100%;
}

.column-title {
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
}

.column-title.highlight-red { color: #fb7185; }

.col-track {
  width: 70px;
  flex: 1;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 8px;
  display: flex;
  flex-direction: column-reverse;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
}

.col-seg {
  font-family: var(--font-mono);
  font-size: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  text-align: center;
}

.inf-w { height: 70%; background: #38bdf8; }
.inf-kv { height: 15%; background: #f59e0b; }

.train-w { height: 14%; background: #38bdf8; }
.train-grad { height: 28%; background: #f59e0b; }
.train-opt { height: 58%; background: #f43f5e; }

.col-total {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 700;
}

/* ==========================================================
   SLIDE 7: FINALE & EPISODE 4 TEASER
   ========================================================== */
.wrapup-layout {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: center;
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
}

.summary-cards-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 18px;
}

.sum-card {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px 20px;
}

.sum-number {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(245, 158, 11, 0.15);
  color: #fcd34d;
  font-family: var(--font-mono);
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sum-card h4 { font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.sum-card p { font-size: 13px; color: var(--text-muted); line-height: 1.4; }

.teaser-card {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.1) 0%, rgba(15, 20, 36, 0.95) 100%);
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: var(--radius-xl);
  padding: 32px;
  box-shadow: 0 15px 40px -10px rgba(56, 189, 248, 0.2);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.teaser-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: #38bdf8;
  letter-spacing: 0.08em;
}

.teaser-title {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 800;
  line-height: 1.25;
  color: #fff;
}

.teaser-desc { font-size: 14px; line-height: 1.6; color: var(--text-muted); }

.phases-preview-tags {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.p-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 6px 12px;
  border-radius: 6px;
}
.prefill-tag { background: rgba(56, 189, 248, 0.15); color: #38bdf8; border: 1px solid rgba(56, 189, 248, 0.3); }
.decode-tag { background: rgba(245, 158, 11, 0.15); color: #fcd34d; border: 1px solid rgba(245, 158, 11, 0.3); }

.teaser-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
}

.series-countdown { font-family: var(--font-mono); font-size: 10px; color: var(--text-dim); }

.next-series-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--border-subtle);
  color: #fff;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.next-series-btn:hover { background: #fff; color: #000; }

/* ==========================================================
   BOTTOM CONTROLS BAR & SCRIPT DRAWER
   ========================================================== */
.bottom-controls {
  height: 56px;
  background: rgba(10, 15, 26, 0.9);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--border-subtle);
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 10;
}

.controls-left, .controls-center, .controls-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ctrl-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.ctrl-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
}

.ctrl-btn:disabled { opacity: 0.35; cursor: not-allowed; }

.play-pause-btn {
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.3);
  color: #fcd34d;
}

.play-pause-btn:hover { background: rgba(245, 158, 11, 0.25); }

.slide-counter {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  min-width: 85px;
  text-align: center;
}

.keyboard-hints {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--text-dim);
}

.key-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 2px 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  color: var(--text-muted);
}

.script-drawer {
  position: absolute;
  bottom: 56px;
  right: 28px;
  width: 480px;
  max-height: 480px;
  background: rgba(15, 20, 36, 0.95);
  backdrop-filter: blur(24px);
  border: 1px solid rgba(245, 158, 11, 0.35);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  transform: translateY(20px);
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 20;
}

.script-drawer.open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.drawer-header {
  padding: 14px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(0, 0, 0, 0.2);
}

.drawer-title-box { display: flex; align-items: center; gap: 10px; }
.drawer-title-box h3 { font-family: var(--font-heading); font-size: 15px; font-weight: 700; color: #fff; }

.slide-target-time {
  font-family: var(--font-mono);
  font-size: 11px;
  background: rgba(245, 158, 11, 0.15);
  color: #fcd34d;
  padding: 2px 6px;
  border-radius: 4px;
}

.drawer-actions { display: flex; align-items: center; gap: 10px; }

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

.voice-speed-selector select {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-subtle);
  color: #fff;
  border-radius: 4px;
  font-size: 11px;
  padding: 2px 4px;
}

.drawer-icon-btn {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 16px;
  cursor: pointer;
}

.drawer-body {
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.script-meta-strip {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-dim);
  font-family: var(--font-mono);
}

.script-voice-text {
  font-size: 15px;
  line-height: 1.65;
  color: #e2e8f0;
  white-space: pre-line;
}

.presenter-tips-box {
  font-size: 12px;
  line-height: 1.5;
  background: rgba(245, 158, 11, 0.08);
  border-left: 3px solid var(--mem-amber);
  padding: 10px 14px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: #fed7aa;
}

.hidden { display: none !important; }

@media (max-width: 1024px) {
  .split-layout, .wrapup-layout, .simulator-arena {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .visual-chip-card, .teaser-card { display: none; }
  .script-drawer { width: 90vw; right: 5vw; }
}

/* ==========================================================
   CLEAN RECORDING MODE: Hide presenter tools & dev hints
   ========================================================== */
#btnScriptToggle,
#btnAudioRehearse,
.keyboard-hints,
.controls-center {
  display: none !important;
}
