/* ============================================
   AI WRAPPED — slides.css
   Mobile-first stories layout · Bold per-slide colors
   ============================================ */

/* ══════════════════════════════════════════
   WRAPPED VIEW — Phone card on desktop
   ══════════════════════════════════════════ */

#wrapped-view {
  position: fixed;
  inset: 0;
  display: none;
  background: transparent;
}

/* Veil removed — full-canvas mode */
#wrapped-view::before {
  content: none;
}

#wrapped-view.visible {
  display: block;
  overflow-y: auto;
  overflow-x: hidden;
}

#slides-container {
  width: 100%;
  position: relative;
  z-index: 1;
}

/* ══════════════════════════════════════════
   SCROLLYTELLING LAYOUT
   Split-screen: sticky vis (left) + narrative (right)
   ══════════════════════════════════════════ */

#scrollytelling-wrapper {
  display: flex;
  align-items: flex-start;
  width: 100%;
  min-height: 100vh;
}

/* ── Sticky visual panel ── */
#sticky-vis {
  position: sticky;
  top: 0;
  width: 45%;
  height: 100vh;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(32px, 4vw, 64px);
  overflow: hidden;
  background: transparent;
}

/* Subtle separator between vis and narrative panels */
[data-theme="original"] #sticky-vis::after {
  content: '';
  position: absolute;
  right: 0;
  top: 10%;
  height: 80%;
  width: 1px;
  background: linear-gradient(to bottom, transparent, rgba(255,255,255,0.06) 30%, rgba(255,255,255,0.06) 70%, transparent);
  pointer-events: none;
}

/* ── Narrative scroll panel ── */
#narrative-panel {
  flex: 1;
  min-width: 0;
}

/* ── Each narrative step ── */
.story-step {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(56px, 9vw, 140px) clamp(40px, 6vw, 100px);
  color: var(--slide-fg, var(--text));
  background: transparent;
}

/* ── Step eyebrow ── */
.step-eyebrow {
  font-size: clamp(10px, 1.2vw, 13px);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  font-family: 'JetBrains Mono', monospace;
  color: var(--slide-accent, currentColor);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.9s ease, transform 0.9s ease; /* exit: slow fade */
  margin-bottom: clamp(16px, 2.5vh, 28px);
}

.story-step.is-active .step-eyebrow {
  opacity: 0.9;
  transform: translateY(0);
  transition: opacity 0.5s ease 0.1s, transform 0.5s ease 0.1s; /* enter: staggered */
}

/* ── Step hook — DM Serif Display editorial headline ── */
.step-hook {
  font-family: 'DM Serif Display', serif;
  font-weight: 400;
  font-style: italic;
  font-size: clamp(2.2rem, 4.5vw, 5rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--slide-fg, currentColor);
  text-wrap: balance;
  margin: 0 0 clamp(20px, 3vh, 36px);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 1s ease, transform 1s ease; /* exit */
}

.story-step.is-active .step-hook {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.65s ease 0.25s, transform 0.65s ease 0.25s; /* enter */
}

/* ── Stat pill — monospace data highlight ── */
.step-stat-pill {
  display: inline-flex;
  margin-bottom: clamp(20px, 3vh, 36px);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.9s ease, transform 0.9s ease; /* exit */
}

.step-stat-pill span {
  display: inline-block;
  padding: 8px 18px;
  background: color-mix(in srgb, var(--slide-accent, currentColor) 18%, transparent);
  border: 1px solid color-mix(in srgb, var(--slide-accent, currentColor) 35%, transparent);
  border-radius: 100px;
  font-family: 'JetBrains Mono', monospace;
  font-size: clamp(12px, 1.4vw, 16px);
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--slide-accent, currentColor);
}

.story-step.is-active .step-stat-pill {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.5s ease 0.45s, transform 0.5s ease 0.45s; /* enter */
}

/* ── Insight body text ── */
.step-insight {
  font-family: 'DM Sans', 'Space Grotesk', sans-serif;
  font-size: clamp(12px, 1.5vw, 18px);
  line-height: 1.25;
  color: var(--slide-fg, currentColor);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.9s ease, transform 0.9s ease; /* exit */
  max-width: 52ch;
  text-wrap: pretty;
}

.story-step.is-active .step-insight {
  opacity: 0.85;
  transform: translateY(0);
  transition: opacity 0.5s ease 0.6s, transform 0.5s ease 0.6s; /* enter */
}

/* ── Privacy tips checklist ── */
.step-tips {
  list-style: none;
  margin: clamp(16px, 2.5vh, 28px) 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.9s ease, transform 0.9s ease;
}

.story-step.is-active .step-tips {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.5s ease 0.8s, transform 0.5s ease 0.8s;
}

.step-tips li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-family: 'JetBrains Mono', monospace;
  font-size: clamp(11px, 1.15vw, 13.5px);
  line-height: 1.5;
  color: var(--slide-fg, currentColor);
  opacity: 0.7;
  padding: 8px 12px;
  background: color-mix(in srgb, var(--slide-accent, currentColor) 8%, transparent);
  border-left: 2px solid color-mix(in srgb, var(--slide-accent, currentColor) 40%, transparent);
  border-radius: 0 4px 4px 0;
}

.step-tips li::before {
  content: '→';
  color: var(--slide-accent, currentColor);
  flex-shrink: 0;
  font-weight: 700;
}

/* ── Final card CTA group ── */
.final-cta-group {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: clamp(24px, 4vh, 48px);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.9s ease, transform 0.9s ease; /* exit */
}

.story-step.is-active .final-cta-group {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.5s ease 0.75s, transform 0.5s ease 0.75s; /* enter */
}

/* ── Chart stage (inside sticky-vis) ── */
#chart-stage {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* ── Chart vis wrapper override (keeps .slide class for D3 color compat) ── */
.chart-vis-inner.slide {
  padding: 0 !important;
  position: static !important;
  width: 100% !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
}

/* ── Decorative background text in sticky vis ── */
.vis-bg-text {
  position: absolute;
  inset: -5%;
  font-size: clamp(100px, 28vw, 200px);
  font-family: 'DM Serif Display', serif;
  font-weight: 400;
  line-height: 0.85;
  letter-spacing: -0.04em;
  color: currentColor;
  opacity: 0.055;
  transform: rotate(-6deg);
  pointer-events: none;
  user-select: none;
  overflow: hidden;
  word-break: break-all;
  white-space: nowrap;
  animation: texture-drift 20s ease-in-out infinite alternate;
  z-index: 0;
}

/* ── Vis typography helpers ── */
.vis-big-year {
  font-family: 'DM Serif Display', serif;
  font-weight: 400;
  font-size: clamp(18px, 4vw, 18px);
  line-height: 0.9;
  letter-spacing: -0.03em;
  margin-bottom: 1.5rem;
}

.vis-big-count {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 800;
  font-size: clamp(64px, 11vw, 130px);
  line-height: 0.9;
  letter-spacing: -0.04em;
}

.vis-pct-number {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 800;
  font-size: clamp(72px, 12vw, 130px);
  line-height: 1;
}

.vis-pct-sup {
  font-size: 0.42em;
  vertical-align: super;
  letter-spacing: 0;
}

.vis-label-mono {
      font-family: 'JetBrains Mono', monospace;
    font-size: clamp(16px, 1.4vw, 16px);
    letter-spacing: 0.18em;
    text-transform: uppercase;
    opacity: 0.4;
}

.vis-emoji {
  font-size: clamp(72px, 11vw, 120px);
  line-height: 1;
  margin-bottom: 16px;
}

.vis-archetype-label {
  font-family: 'DM Serif Display', serif;
  font-style: italic;
  font-size: clamp(22px, 3.5vw, 40px);
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.vis-platform-logo {
  width: 80px;
  height: 80px;
  object-fit: contain;
  display: block;
  margin: 0 auto 20px;
}

.vis-brand-logo {
  height: 32px;
  display: block;
  margin: 0 auto;
  opacity: 0.8;
}

.vis-platform-breakdown {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 14px;
  margin-top: 14px;
  opacity: 0.65;
}

.vis-breakdown-item {
  display: flex;
    font-family: 'JetBrains Mono', monospace;
    font-size: clamp(20px, 1.8vw, 30px);
    letter-spacing: 0.06em;
    white-space: nowrap;
    flex-direction: column;
}

.vis-breakdown-item strong {
  opacity: 0.9;
}

.vis-breakdown-text {
    font-family: 'JetBrains Mono', monospace;
    font-size: clamp(10px, 1.2vw, 13px);
    letter-spacing: 0.18em;
    text-transform: uppercase;
    opacity: 0.4;
}

/* ── Routine slide ────────────────────────────────────────────────────── */
.routine-insight {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(20px, 4vw, 28px);
  font-weight: 400;
  letter-spacing: -0.02em;
  text-align: center;
  line-height: 1.15;
  margin-bottom: 14px;
}

.routine-tod {
  /* Limitamos el ancho total del componente para que no se estire en pantallas grandes */
  width: 100%;
  max-width: 45ch; /* Ancho basado en caracteres, se mantiene cuadrado */
  display: flex;
  flex-direction: column;
  gap: 12px; /* Aumentamos el aire entre filas para legibilidad */
  margin: 10px 0;
}

.routine-tod-row {
  display: grid;
  /* Definimos anchos basados en contenido (auto) y un ancho relativo para la barra */
  grid-template-columns: auto 12vw auto; 
  align-items: center;
  gap: 15px; /* Más espacio entre etiquetas y barra */
}

.routine-tod-name {
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px; /* Aumento de tamaño para mejor lectura */
  text-align: right;
  letter-spacing: -0.5px;
}

.routine-tod-track {
  height: 6px; /* Ligeramente más gruesa para que se vea "más cuadrada" */
  border-radius: 4px;
  background: rgba(255,255,255,0.12);
  overflow: hidden;
}

.routine-tod-fill {
  height: 100%;
  border-radius: 3px;
  background: var(--slide-accent, #7c93f7);
}

.routine-tod-pct {
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px; /* Aumento de tamaño para que destaque el dato */
  font-weight: 800;
  min-width: 3.5ch; /* Evita saltos de línea y asegura alineación */
  text-align: left;
}

.vis-stats-row {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  justify-content: center;
  margin-top: 28px;
}

.vis-stat-block {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.vis-stat-context {
  font-size: 1rem;
  opacity: 0.8;
  margin-bottom: .3rem;
  line-height: 1.3;
}

.vis-tech-section {
  margin-top: 20px;
}

.vis-stat-val {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 800;
  font-size: clamp(30px, 5vw, 62px);
  line-height: 1;
}

/* ── Nav bar: expand to full-width on desktop ── */
@media (min-width: 768px) {
  #nav-bar {
    max-width: 100%;
    padding: 16px clamp(24px, 4vw, 60px);
  }
}

/* ══════════════════════════════════════════
   MOBILE — Single-column fallback (< 768px)
   ══════════════════════════════════════════ */
@media (max-width: 767px) {
  #scrollytelling-wrapper {
    display: block;
  }

  #sticky-vis {
    position: sticky;
    top: 0;
    width: 100%;
    height: 45vmax;
    min-height: 220px;
    padding: 24px;
    z-index: 5;
  }

  #narrative-panel {
    width: 100%;
  }

  .story-step {
    min-height: 55vh;
    padding: 40px 28px;
  }

  .step-hook {
    font-size: clamp(1.6rem, 7vw, 2.8rem);
  }

  .vis-big-year {
    font-size: clamp(46px, 14vw, 80px);
  }

  .vis-big-count {
    font-size: clamp(48px, 14vw, 90px);
  }
}

.slide-section {
  /* Legacy: kept for compatibility; new layout uses .story-step */
  height: 100vh;
  position: relative;
  display: grid;
  place-items: center;
  padding: 24px clamp(20px, 5vw, 80px);
}

/* ══════════════════════════════════════════
   INDIVIDUAL SLIDE
   ══════════════════════════════════════════ */

.slide {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  padding: clamp(28px, 5vh, 56px) clamp(28px, 5vw, 64px);
  overflow: visible;
  background: none;
  border-radius: 0;
  box-shadow: none;
  color: var(--slide-fg, var(--text));
  pointer-events: all;
}

.slide-bg {
  display: none;
}

.slide-bg::after {
  content: none;
}


/* ── Texture: giant repeating number in background ── */
.slide-texture {
  position: absolute;
  inset: -10%;
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow: hidden;
  pointer-events: none;
  user-select: none;
  z-index: 0;
  font-size: clamp(80px, 22vw, 148px);
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 0.85;
  letter-spacing: -0.04em;
  color: currentColor;
  opacity: 0;
  transform: rotate(-6deg);
  white-space: nowrap;
  word-break: break-all;
  transition: opacity 0.8s ease 0.3s;
  animation: texture-drift 20s ease-in-out infinite alternate;
}

.slide-section.is-active .slide-texture {
  opacity: 0.07;
}

@keyframes texture-drift {
  0%   { transform: rotate(-6deg) translate(0, 0); }
  100% { transform: rotate(-6deg) translate(-8px, 6px); }
}

/* ── Content sits on top of texture ── */
.slide-content {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(12px, 2.5vh, 22px);
  min-height: 0;
  opacity: 0;
  filter: blur(10px);
  transform: translateY(20px);
  transition: opacity 0.9s ease-out, filter 0.9s ease-out, transform 0.9s ease-out;
}

.slide-visible .slide-content {
  opacity: 1;
  filter: blur(0);
  transform: translateY(0);
}

/* ══════════════════════════════════════════
   SLIDE TYPOGRAPHY
   ══════════════════════════════════════════ */

.slide-eyebrow {
  font-size: 12px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  font-family: var(--font-display);
  color: currentColor;
  opacity: 0;
  filter: blur(8px);
  transform: translateY(10px);
  transition:
    opacity 0.5s ease 0.15s,
    filter 0.5s ease 0.15s,
    transform 0.5s ease 0.15s;
  mix-blend-mode: normal;
  line-height: 1.5;
}

/* Override blend for dark slides */
.slide[style*="--slide-bg: #1"] .slide-eyebrow,
.slide[style*="--slide-bg: #0"] .slide-eyebrow {
  mix-blend-mode: normal;
  opacity: 0;
}

.slide-section.is-active .slide-eyebrow {
  opacity: 0.95;
  filter: blur(0);
  transform: translateY(0);
}

/* Big stat number */
.slide-number-display {
  font-size: clamp(60px, min(16vw, 16vh), 140px);
  font-family: Comfortaa, var(--font-display), sans-serif;
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: -0.04em;
  color: currentColor;
  opacity: 0;
  filter: blur(10px);
  transform: scale(0.9) translateY(20px);
  transition:
    opacity 0.6s ease 0.25s,
    filter 0.6s ease 0.25s,
    transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.25s;
  word-break: break-all;
}

.slide-section.is-active .slide-number-display {
  opacity: 1;
  filter: blur(0);
  transform: scale(1) translateY(0);
}

/* Headline — Hero typography */
.slide-headline {
  font-size: clamp(3rem, 8vw, 6rem);
  font-family: Comfortaa, var(--font-display), sans-serif;
  font-weight: 800;
  line-height: 1;
  color: currentColor;
  letter-spacing: -0.03em;
  text-wrap: balance;
  opacity: 0;
  filter: blur(10px);
  transform: translateY(20px);
  transition:
    opacity 0.5s ease 0.35s,
    filter 0.5s ease 0.35s,
    transform 0.5s ease 0.35s;
}

.slide-section.is-active .slide-headline {
  opacity: 1;
  filter: blur(0);
  transform: translateY(0);
}

/* Serif accent within headlines */
.slide-headline .accent-serif {
  font-family: var(--font-display);
  font-style: normal;
  font-weight: 400;
  font-size: 1.1em;
}

/* Accent color highlight */
.slide-headline .highlight {
  color: var(--slide-accent, currentColor);
  font-style: italic;
}

/* Sub text */
.slide-subtext {
  font-size: clamp(13px, min(3.8vw, 2.4vh), 18px);
  line-height: 1.55;
  color: currentColor;
  text-wrap: pretty;
  opacity: 0;
  filter: blur(8px);
  transform: translateY(10px);
  transition:
    opacity 0.5s ease 0.5s,
    filter 0.5s ease 0.5s,
    transform 0.5s ease 0.5s;
}

.slide-section.is-active .slide-subtext {
  opacity: 0.95;
  filter: blur(0);
  transform: translateY(0);
}

.slide-subtext strong {
  color: currentColor;
  opacity: 1;
  font-weight: 700;
}

/* Multi-model comparison blocks */
.mm-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
  margin: 4px 0;
}

.mm-block {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.mm-block-label {
  font-size: 0.7rem;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.55;
  color: currentColor;
}

.mm-block-main {
  display: flex;
  align-items: center;
  font-size: clamp(22px, min(6vw, 5vh), 38px);
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  line-height: 1.1;
  gap: 4px;
}

.mm-block-name {
  flex: 1;
  min-width: 0;
}

.mm-block-pct {
  font-size: clamp(20px, min(5.5vw, 4.5vh), 34px);
  font-family: 'JetBrains Mono', monospace;
  font-weight: 800;
  opacity: 0.95;
}

.mm-block-stats {
  font-size: 0.72rem;
  font-family: 'JetBrains Mono', monospace;
  opacity: 0.5;
  color: currentColor;
}

/* Chart container */
.chart-wrap {
  flex: 1;
  min-height: 0;
  width: 100%;
  opacity: 0;
  filter: blur(8px);
  transform: translateY(14px);
  transition:
    opacity 0.6s ease 0.5s,
    filter 0.6s ease 0.5s,
    transform 0.6s ease 0.5s;
}

.slide-section.is-active .chart-wrap {
  opacity: 1;
  filter: blur(0);
  transform: translateY(0);
}

/* ══════════════════════════════════════════
   NAVIGATION BAR
   ══════════════════════════════════════════ */

#nav-bar {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  z-index: 100;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: transparent;
  border: none;
  pointer-events: none;
}

.entaina-nav-brand,
#restart-btn {
  pointer-events: all;
}

/* ── Slide progress indicator ───────────────────────────────────────────────
   Desktop: lateral derecho, centrado verticalmente, dots en columna.
   Mobile (futuro): bottom center, dots en fila horizontal.
   ────────────────────────────────────────────────────────────────────────── */
#slide-nav {
  position: fixed;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}

#progress-dots {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  pointer-events: all;
}

#slide-counter {
  font-family: var(--font-display);
  font-size: 10px;
  color: color-mix(in srgb, var(--slide-accent, var(--accent)) 60%, transparent);
  letter-spacing: 0.05em;
  pointer-events: none;
}

.entaina-nav-brand {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.entaina-nav-icon {
  width: 16px;
  height: 16px;
  object-fit: contain;
}

.progress-dot {
  width: 8px;
  height: 8px;
  border: none;
  border-radius: 4px;
  background: color-mix(in srgb, var(--slide-accent, var(--accent)) 30%, transparent);
  transition: height 0.35s cubic-bezier(0.22, 1, 0.36, 1),
              border-radius 0.35s ease,
              background 0.35s ease;
  cursor: pointer;
  flex-shrink: 0;
}

.progress-dot.active {
  height: 32px;
  border-radius: 4px;
  background: var(--slide-accent, var(--accent));
}

.progress-dot.visited {
  background: color-mix(in srgb, var(--slide-accent, var(--accent)) 55%, transparent);
}

.progress-dot:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.nav-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--text-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.25s ease;
  flex-shrink: 0;
  font-size: 15px;
}

.nav-btn:hover {
  background: color-mix(in srgb, var(--primary) 32%, transparent);
  color: var(--text);
}

.nav-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
.nav-btn:disabled:hover {
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--text-dim);
}
.nav-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

#slide-counter {
  font-family: var(--font-display);
  font-size: 10px;
  color: var(--text-dim);
  flex-shrink: 0;
  min-width: 32px;
  text-align: right;
}

#restart-btn {
  font-size: 10px;
  font-family: var(--font-display);
  color: #fff;
  background: rgba(0,0,0,0.28);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 100px;
  padding: 5px 12px;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: color 0.25s;
  flex-shrink: 0;
}

#restart-btn:hover {
  color: #fff;
  background: rgba(0,0,0,0.45);
}

/* ══════════════════════════════════════════
   SLIDE COMPONENTS
   ══════════════════════════════════════════ */

/* ── Platform badges ── */
.platform-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.platform-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  background: color-mix(
    in srgb,
    var(--slide-bg, var(--surface-alt)) 76%,
    transparent
  );
  border: 1px solid
    color-mix(in srgb, var(--slide-bg, var(--surface-alt)) 85%, transparent);
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
  color: currentColor;
  opacity: 0;
  transform: scale(0.85) translateY(6px);
  transition:
    opacity 0.35s ease,
    transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.platform-badge-logo,
.inline-platform-logo {
  width: 16px;
  height: 16px;
  object-fit: contain;
  flex-shrink: 0;
}

/* On dark slides use white badge */
.slide .platform-badge {
  background: color-mix(in srgb, var(--on-dark) 12%, transparent);
  border-color: color-mix(in srgb, var(--on-dark) 20%, transparent);
}

.slide-section.is-active .platform-badge:nth-child(1) {
  opacity: 1;
  transform: none;
  transition-delay: 0.75s;
}
.slide-section.is-active .platform-badge:nth-child(2) {
  opacity: 1;
  transform: none;
  transition-delay: 0.9s;
}
.slide-section.is-active .platform-badge:nth-child(3) {
  opacity: 1;
  transform: none;
  transition-delay: 1.05s;
}

/* ── Category list ── */
.category-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.category-row {
  display: flex;
  align-items: center;
  gap: 10px;
  opacity: 0;
  transform: translateX(-14px);
  transition:
    opacity 0.35s ease,
    transform 0.35s ease;
}

.slide-section.is-active .category-row:nth-child(1) {
  opacity: 1;
  transform: none;
  transition-delay: 0.45s;
}
.slide-section.is-active .category-row:nth-child(2) {
  opacity: 1;
  transform: none;
  transition-delay: 0.55s;
}
.slide-section.is-active .category-row:nth-child(3) {
  opacity: 1;
  transform: none;
  transition-delay: 0.65s;
}
.slide-section.is-active .category-row:nth-child(4) {
  opacity: 1;
  transform: none;
  transition-delay: 0.75s;
}
.slide-section.is-active .category-row:nth-child(5) {
  opacity: 1;
  transform: none;
  transition-delay: 0.85s;
}
.slide-section.is-active .category-row:nth-child(6) {
  opacity: 1;
  transform: none;
  transition-delay: 0.95s;
}
.slide-section.is-active .category-row:nth-child(7) {
  opacity: 1;
  transform: none;
  transition-delay: 1.05s;
}

.category-icon {
  font-size: 15px;
  width: 24px;
  text-align: center;
  flex-shrink: 0;
}
.category-name {
  font-size: 12px;
  font-weight: 600;
  width: 90px;
  flex-shrink: 0;
  color: currentColor;
  opacity: 0.9;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.category-bar-bg {
  flex: 1;
  height: 5px;
  background: color-mix(
    in srgb,
    var(--slide-bg, var(--surface-alt)) 84%,
    transparent
  );
  border-radius: 3px;
  overflow: hidden;
}

.category-bar-fill {
  height: 100%;
  border-radius: 3px;
  width: 0%;
  background: var(--slide-accent, currentColor);
  opacity: 0.75;
  transition: width 1s cubic-bezier(0.4, 0, 0.2, 1) 0.6s;
}

.slide-section.is-active .category-bar-fill {
  width: var(--target-width);
}

.category-pct {
  font-size: 10px;
  font-family: var(--font-display);
  color: currentColor;
  opacity: 0.6;
  width: 30px;
  text-align: right;
  flex-shrink: 0;
}

/* ── Timeline footer stats ── */
.timeline-footer {
  display: flex;
  gap: 16px;
  flex-shrink: 0;
}

.timeline-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.4s ease 0.9s, transform 0.4s ease 0.9s;
}

.slide-section.is-active .timeline-stat {
  opacity: 1;
  transform: none;
}

.timeline-stat-value {
  font-size: clamp(16px, 4.5vw, 22px);
  font-family: Comfortaa, var(--font-display), sans-serif;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--slide-accent, currentColor);
  line-height: 1;
}

.timeline-stat-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: currentColor;
  opacity: 0.55;
  font-family: var(--font-display);
}

/* ── Collaboration (merged autonomy + criticalness) ── */
.collab-sections {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  margin: 4px 0;
}

.collab-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.collab-section-header {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.collab-section-title {
  font-size: clamp(13px, min(3.8vw, 2.4vh), 16px);
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  color: currentColor;
  opacity: 0.85;
  line-height: 1.3;
}

.collab-score-wrap {
  display: flex;
  align-items: baseline;
  gap: 2px;
  flex-shrink: 0;
}

.collab-score-num {
  font-size: clamp(36px, min(10vw, 8vh), 56px);
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 800;
  color: var(--slide-accent);
  line-height: 1;
}

.collab-score-denom {
  font-size: clamp(13px, 3.5vw, 18px);
  font-family: 'JetBrains Mono', monospace;
  color: currentColor;
  opacity: 0.3;
}


/* ── Autonomy score (legacy, kept for spectrum reuse) ── */
.autonomy-hero {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin: 2px 0 6px;
}

.autonomy-hero-number {
  font-size: clamp(72px, min(20vw, 15vh), 108px);
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 800;
  color: var(--slide-accent);
  line-height: 1;
}

.autonomy-hero-denom {
  font-size: clamp(20px, 5vw, 32px);
  font-family: 'JetBrains Mono', monospace;
  color: currentColor;
  opacity: 0.3;
}

.autonomy-spectrum {
  margin: 10px 0 8px;
  width: 100%;
}

.autonomy-spectrum-track {
  position: relative;
  height: 6px;
  background: color-mix(in srgb, currentColor 15%, transparent);
  border-radius: 3px;
}

.autonomy-spectrum-fill {
  position: absolute;
  left: 0; top: 0;
  height: 100%;
  background: var(--slide-accent);
  border-radius: 3px;
  opacity: 0.8;
  transition: width 0s; /* animated via JS */
}

.autonomy-spectrum-dot {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 13px; height: 13px;
  background: var(--slide-accent);
  border: 2px solid var(--slide-bg);
  border-radius: 50%;
  transition: left 0s;
}

.autonomy-spectrum-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  font-size: 0.62rem;
  font-family: 'JetBrains Mono', monospace;
  color: currentColor;
  opacity: 0.4;
}

.autonomy-facts {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-top: 6px;
}

.autonomy-fact {
  font-size: 0.75rem;
  font-family: 'JetBrains Mono', monospace;
  color: currentColor;
  opacity: 0.75;
  padding: 6px 10px;
  background: color-mix(in srgb, currentColor 8%, transparent);
  border-radius: 8px;
  line-height: 1.4;
}

.autonomy-fact strong {
  color: currentColor;
  opacity: 1;
  font-weight: 700;
}

/* ── Highlights ── */
.highlights-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  width: 100%;
}

/* Compact all cards when grid has 5+ items */
.highlights-grid:has(.highlight-card:nth-child(5)) .highlight-card {
  padding: 9px 8px;
}
.highlights-grid:has(.highlight-card:nth-child(5)) .highlight-card-icon {
  font-size: 15px;
  margin-bottom: 5px;
}
.highlights-grid:has(.highlight-card:nth-child(5)) .highlight-card-value {
  font-size: clamp(16px, 5vw, 22px);
  margin-bottom: 2px;
}
.highlights-grid:has(.highlight-card:nth-child(5)) .highlight-card-title,
.highlights-grid:has(.highlight-card:nth-child(5)) .highlight-card-sub {
  font-size: 10px;
}

.highlight-card {
  padding: 12px 10px;
  background: color-mix(
    in srgb,
    var(--slide-bg, var(--surface-alt)) 76%,
    transparent
  );
  border-radius: 12px;
  opacity: 0;
  transform: translateY(14px) scale(0.95);
  transition:
    opacity 0.4s ease,
    transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.slide-section.is-active .highlight-card:nth-child(1) {
  opacity: 1;
  transform: none;
  transition-delay: 0.4s;
}
.slide-section.is-active .highlight-card:nth-child(2) {
  opacity: 1;
  transform: none;
  transition-delay: 0.5s;
}
.slide-section.is-active .highlight-card:nth-child(3) {
  opacity: 1;
  transform: none;
  transition-delay: 0.6s;
}
.slide-section.is-active .highlight-card:nth-child(4) {
  opacity: 1;
  transform: none;
  transition-delay: 0.7s;
}
.slide-section.is-active .highlight-card:nth-child(5) {
  opacity: 1;
  transform: none;
  transition-delay: 0.8s;
}
.slide-section.is-active .highlight-card:nth-child(6) {
  opacity: 1;
  transform: none;
  transition-delay: 0.9s;
}

.highlight-card-icon {
  font-size: 18px;
  margin-bottom: 8px;
}
.highlight-card-value {
  font-size: clamp(20px, 6vw, 28px);
  font-family: Comfortaa, var(--font-display), sans-serif;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: currentColor;
  line-height: 1;
  margin-bottom: 4px;
}
.highlight-card-title {
  font-size: 11px;
  font-weight: 600;
  color: currentColor;
  opacity: 0.85;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.highlight-card-sub {
  font-size: 11px;
  color: currentColor;
  opacity: 0.85;
  font-family: var(--font-display);
  margin-top: 2px;
  line-height: 1.5;
}

/* ── Model comparison bars ── */
.model-comparison {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
}

.model-row {
  display: flex;
  align-items: center;
  gap: 12px;
  opacity: 0;
  transform: translateX(-14px);
  transition:
    opacity 0.4s ease,
    transform 0.4s ease;
}

.slide-section.is-active .model-row:nth-child(1) {
  opacity: 1;
  transform: none;
  transition-delay: 0.4s;
}
.slide-section.is-active .model-row:nth-child(2) {
  opacity: 1;
  transform: none;
  transition-delay: 0.55s;
}
.slide-section.is-active .model-row:nth-child(3) {
  opacity: 1;
  transform: none;
  transition-delay: 0.7s;
}

.model-icon {
  font-size: 18px;
  width: 28px;
  text-align: center;
  flex-shrink: 0;
}
.model-name {
  width: 68px;
  font-size: 13px;
  font-weight: 600;
  flex-shrink: 0;
  color: currentColor;
}

.model-bar-bg {
  flex: 1;
  height: 7px;
  background: color-mix(
    in srgb,
    var(--slide-bg, var(--surface-alt)) 84%,
    transparent
  );
  border-radius: 4px;
  overflow: hidden;
}

.model-bar-fill {
  height: 100%;
  border-radius: 4px;
  width: 0%;
  background: color-mix(in srgb, var(--slide-fg, var(--text)) 42%, transparent);
  transition: width 1.1s cubic-bezier(0.4, 0, 0.2, 1) 0.6s;
}

.slide-section.is-active .model-bar-fill {
  width: var(--target-width);
}

.model-count {
  font-size: 12px;
  font-family: var(--font-display);
  color: currentColor;
  opacity: 0.6;
  width: 48px;
  text-align: right;
  flex-shrink: 0;
}

/* ── Outro ── */
.outro-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 18px;
}

.outro-brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--on-dark) 18%, transparent);
  background: color-mix(in srgb, var(--on-dark) 10%, transparent);
}

.outro-brand-icon {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.outro-brand-logo {
  height: 13px;
  width: auto;
  object-fit: contain;
  opacity: 0.9;
}

.outro-title {
  font-size: clamp(40px, min(12vw, 10vh), 80px);
  font-family: Comfortaa, var(--font-display), sans-serif;
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.035em;
  color: currentColor;
}

.outro-title .serif-line {
  display: block;
  font-family: var(--font-display);
  font-style: normal;
  font-weight: 400;
  font-size: 1.05em;
  color: var(--slide-accent, currentColor);
}

.outro-sub {
  font-size: 14px;
  line-height: 1.6;
  color: currentColor;
  opacity: 0.6;
}

.outro-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  background: color-mix(in srgb, var(--on-dark) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--on-dark) 22%, transparent);
  border-radius: 100px;
  font-size: 12px;
  color: currentColor;
  font-family: var(--font-display);
  cursor: pointer;
  transition: all 0.25s;
  backdrop-filter: blur(10px);
}

.outro-cta--share {
  background: color-mix(in srgb, var(--on-dark) 20%, transparent);
  border-color: var(--slide-accent, var(--accent));
  color: var(--slide-accent, var(--on-dark));
  font-weight: 700;
}

.outro-cta:hover {
  background: color-mix(in srgb, var(--on-dark) 20%, transparent);
}
.outro-cta--share:hover {
  background: color-mix(in srgb, var(--on-dark) 28%, transparent);
}

/* ══════════════════════════════════════════
   STORY SHARE MODAL
   ══════════════════════════════════════════ */

.story-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: color-mix(in srgb, var(--primary-dark) 78%, transparent);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.story-modal-overlay.story-modal-visible {
  opacity: 1;
}

.story-modal-box {
  position: relative;
  background: var(--surface-alt);
  border: 1px solid color-mix(in srgb, var(--text) 12%, transparent);
  border-radius: 20px;
  padding: 28px 24px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  max-width: min(92vw, 420px);
  width: 100%;
  height: min(92dvh, 900px);
  overflow-y: auto;
  transform: translateY(20px);
  transition: transform 0.35s cubic-bezier(0.22, 0.68, 0, 1.2), max-width 0.3s ease;
  box-shadow: 0 24px 80px
    color-mix(in srgb, var(--primary-dark) 70%, transparent);
}

.story-modal-visible .story-modal-box {
  transform: translateY(0);
}

.story-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: color-mix(in srgb, var(--text) 12%, transparent);
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  color: var(--text);
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.story-modal-close:hover {
  background: color-mix(in srgb, var(--text) 22%, transparent);
}

.story-modal-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 13px;
  color: color-mix(in srgb, var(--text) 62%, transparent);
  text-align: center;
}

.story-preview {
  width: 100%;
  max-width: 300px;
  border-radius: 14px;
  border: 1px solid color-mix(in srgb, var(--text) 12%, transparent);
  box-shadow: 0 8px 32px
    color-mix(in srgb, var(--primary-dark) 50%, transparent);
  display: block;
}

.story-modal-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  width: 100%;
}

.story-btn {
      align-items: center;
    padding: 12px 4rem;
    border-radius: 100px;
    font-family: var(--font-display);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
    border: none;
}

.story-btn--download {
  background: var(--primary);
  color: var(--on-primary);
}
.story-btn--download:hover {
  background: var(--primary-dark);
}

.story-btn--native {
  background: color-mix(in srgb, var(--on-dark) 14%, transparent);
  color: var(--text);
  border: 1px solid color-mix(in srgb, var(--text) 25%, transparent);
}
.story-btn--native:hover {
  background: color-mix(in srgb, var(--text) 22%, transparent);
}

.story-modal-hint {
  margin: 0;
  font-size: 11px;
  color: color-mix(in srgb, var(--text-subtle) 55%, transparent);
  text-align: center;
  font-family: var(--font-display);
}

/* ── D3 charts adapt to slide color ── */
.d3-chart {
  width: 100%;
  overflow: visible;
}
.d3-chart text {
  font-family: var(--font-display);
}

.d3-tooltip {
  position: absolute;
  background: color-mix(in srgb, var(--primary-dark) 85%, transparent);
  border-radius: 7px;
  padding: 7px 11px;
  font-size: 11px;
  font-family: var(--font-display);
  color: var(--on-dark);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s;
  z-index: 100;
  line-height: 1.5;
}

/* ══════════════════════════════════════════
   PERSONALITY SLIDE
   ══════════════════════════════════════════ */

.personality-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 16px;
}

.personality-emoji {
  font-size: 2.8rem;
  line-height: 1;
  flex-shrink: 0;
}

.personality-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}

.pstat-card {
  background: color-mix(in srgb, var(--on-dark) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--on-dark) 14%, transparent);
  border-radius: 12px;
  padding: 10px 6px;
  text-align: center;
  backdrop-filter: blur(4px);
  opacity: 0;
  transform: translateY(12px);
  transition:
    opacity 0.4s ease,
    transform 0.4s ease;
}

.slide-section.is-active .pstat-card:nth-child(1) {
  opacity: 1;
  transform: none;
  transition-delay: 0.35s;
}
.slide-section.is-active .pstat-card:nth-child(2) {
  opacity: 1;
  transform: none;
  transition-delay: 0.45s;
}
.slide-section.is-active .pstat-card:nth-child(3) {
  opacity: 1;
  transform: none;
  transition-delay: 0.55s;
}
.slide-section.is-active .pstat-card:nth-child(4) {
  opacity: 1;
  transform: none;
  transition-delay: 0.65s;
}

.pstat-card--alert {
  border-color: color-mix(in srgb, var(--danger) 35%, transparent);
  background: color-mix(in srgb, var(--danger) 14%, transparent);
}

.pstat-icon {
  font-size: 16px;
  margin-bottom: 4px;
}
.pstat-value {
  font-size: clamp(18px, 5vw, 24px);
  font-family: Comfortaa, var(--font-display), sans-serif;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--slide-accent);
  margin-bottom: 3px;
}
.pstat-label {
  font-size: 8px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  opacity: 0.65;
  font-family: var(--font-display);
  line-height: 1.3;
  margin-top: 2px;
}

/* Per-platform topic bars */
.ptopic-section-label {
  font-size: 0.72em;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  opacity: 0.6;
  margin-bottom: 8px;
  font-family: var(--font-display);
}

.ptopic-platforms {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ptopic-block {
  background: color-mix(in srgb, var(--on-dark) 10%, transparent);
  border-radius: 10px;
  padding: 8px 10px;
  opacity: 0;
  transform: translateY(10px);
  transition:
    opacity 0.4s ease,
    transform 0.4s ease;
}

.slide-section.is-active .ptopic-block:nth-child(1) {
  opacity: 1;
  transform: none;
  transition-delay: 0.7s;
}
.slide-section.is-active .ptopic-block:nth-child(2) {
  opacity: 1;
  transform: none;
  transition-delay: 0.85s;
}
.slide-section.is-active .ptopic-block:nth-child(3) {
  opacity: 1;
  transform: none;
  transition-delay: 1s;
}

.ptopic-platform-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
  font-size: 0.82em;
}

.ptopic-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
  font-size: 0.78em;
}

.ptopic-icon {
  width: 16px;
  text-align: center;
  flex-shrink: 0;
}
.ptopic-label {
  width: 76px;
  flex-shrink: 0;
  font-size: 0.85em;
  opacity: 0.85;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ptopic-bar-bg {
  flex: 1;
  height: 6px;
  background: color-mix(in srgb, var(--on-dark) 14%, transparent);
  border-radius: 3px;
  overflow: hidden;
}

.ptopic-bar-fill {
  height: 100%;
  width: 0;
  border-radius: 3px;
  transition: width 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.slide-section.is-active .ptopic-bar-fill {
  width: var(--ptopic-width, 0%);
}

.ptopic-pct {
  width: 28px;
  text-align: right;
  font-family: var(--font-display);
  font-size: 0.78em;
  opacity: 0.7;
  flex-shrink: 0;
}

/* ══════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════ */

/* Desktop: larger typography for floating-card layout */
@media (min-width: 900px) {
  .slide-eyebrow {
    font-size: 14px;
    letter-spacing: 0.32em;
  }
  .slide-number-display {
    font-size: clamp(80px, 12vw, 160px);
  }
  .slide-headline {
    font-size: clamp(26px, 3.6vw, 48px);
    -webkit-line-clamp: 4;
  }
  .slide-subtext {
    font-size: clamp(16px, 1.5vw, 20px);
    line-height: 1.6;
  }
  .slide {
    border-radius: 24px;
  }
}

/* Mobile: reduce radius on small screens */
@media (max-width: 600px) {
  .slide {
    border-radius: 14px;
    box-shadow:
      0 16px 48px rgba(0, 0, 0, 0.24),
      0 4px 16px rgba(0, 0, 0, 0.14);
  }
  .slide-section {
    padding: 12px 10px;
  }
}

/* Short screens: reduce internal padding */
@media (max-height: 700px) {
  .slide {
    padding: 24px 24px 16px;
  }
  .slide-content {
    gap: 10px;
  }
  .slide-number-display {
    font-size: clamp(48px, min(13vw, 12vh), 100px);
  }
  .slide-headline {
    font-size: clamp(16px, min(4.5vw, 3.5vh), 28px);
  }
  .slide-subtext {
    font-size: 12px;
  }
  .highlights-grid {
    gap: 8px;
  }
  .highlight-card {
    padding: 10px;
  }
  .highlight-card-value {
    font-size: 20px;
  }
  .autonomy-gauge {
    width: 130px;
    height: 130px;
  }
  .autonomy-description {
    font-size: 18px;
  }
  .outro-title {
    font-size: clamp(32px, 9vh, 60px);
  }
  #nav-bar {
    padding: 10px 16px;
  }
}

/* Ultra-short screens */
@media (max-height: 600px) {
  .slide {
    padding: 14px 18px 10px;
  }
  .slide-content {
    gap: 6px;
  }
  .slide-eyebrow {
    font-size: 10px;
    letter-spacing: 0.2em;
  }
  .slide-number-display {
    font-size: clamp(40px, min(11vw, 10vh), 72px);
  }
  .slide-headline {
    font-size: clamp(14px, min(4vw, 3vh), 22px);
  }
  .slide-subtext {
    font-size: 11px;
    line-height: 1.4;
  }
  .personality-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
    margin-bottom: 8px;
  }
  .personality-header {
    margin-bottom: 8px;
  }
  .personality-emoji {
    font-size: 2rem;
  }
  .autonomy-gauge {
    width: 100px;
    height: 100px;
  }
  .autonomy-description {
    font-size: 16px;
  }
  .highlights-grid {
    gap: 5px;
  }
  .highlight-card {
    padding: 7px 6px;
  }
  .highlight-card-icon {
    font-size: 13px;
    margin-bottom: 3px;
  }
  .highlight-card-value {
    font-size: 16px;
  }
  .highlight-card-title,
  .highlight-card-sub {
    font-size: 9px;
  }
  .outro-title {
    font-size: clamp(26px, 7vh, 48px);
  }
}

/* Very small mobile */
@media (max-width: 360px) {
  .slide {
    padding: 24px 18px 14px;
  }
  .highlights-grid {
    grid-template-columns: 1fr 1fr;
    gap: 7px;
  }
  .slide-number-display {
    font-size: clamp(48px, 16vw, 80px);
  }
}

/* ══════════════════════════════════════════
   THEME: ORIGINAL — Slide visual overrides
   Radial glows + grain texture on each slide
   ══════════════════════════════════════════ */

/* Slide background: radial glows layered over solid color */
[data-theme="original"] .slide-bg {
  background:
    radial-gradient(135% 95% at 8% 88%, color-mix(in srgb, var(--slide-accent, #FFD23F) 34%, transparent) 0%, transparent 72%),
    radial-gradient(125% 90% at 92% 8%, color-mix(in srgb, var(--slide-accent, #FFD23F) 42%, #FF6F00 30%) 0%, transparent 70%),
    linear-gradient(145deg, color-mix(in srgb, var(--slide-bg, #111) 90%, #0F1407 10%) 0%, color-mix(in srgb, var(--slide-bg, #111) 74%, #24320C 26%) 58%, color-mix(in srgb, var(--slide-bg, #111) 82%, #412705 18%) 100%);
}

/* Grain overlay on slides */
[data-theme="original"] .slide-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.12;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.95' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 140px 140px;
  mix-blend-mode: soft-light;
}

/* Desktop phone card: deeper shadow for dark theme */
@media (min-width: 600px) {
  [data-theme="original"] #slides-container {
    box-shadow:
      0 0 0 1px rgba(255, 255, 255, 0.07),
      0 40px 80px rgba(0, 0, 0, 0.9),
      0 80px 160px rgba(0, 0, 0, 0.6);
  }
}

/* Nav bar: transparent in scrollytelling mode */
[data-theme="original"] #nav-bar {
  background: transparent;
}

/* Progress dots: green-to-gold gradient for active */
[data-theme="original"] .progress-dot {
  background: rgba(255, 210, 63, 0.28);
}
[data-theme="original"] .progress-dot.active {
  background: linear-gradient(90deg, #6BE675 0%, #FFD23F 100%);
}
[data-theme="original"] .progress-dot.visited {
  background: rgba(255, 159, 26, 0.62);
}

/* Nav buttons: dark glass */
[data-theme="original"] .nav-btn {
  border-color: rgba(255, 210, 63, 0.2);
  background: rgba(255, 210, 63, 0.08);
  color: var(--cream);
}
[data-theme="original"] .nav-btn:hover {
  background: rgba(255, 210, 63, 0.18);
  color: var(--gold);
}

/* Wrapped view background */
[data-theme="original"] #wrapped-view {
  background: #071321;
}

/* Story modal: dark overlay */
[data-theme="original"] .story-modal-overlay {
  background: rgba(7, 19, 33, 0.85);
}
[data-theme="original"] .story-modal-box {
  background: #0B2233;
  border-color: rgba(255, 159, 26, 0.2);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.8);
}

/* ── Limited-data disclaimer note ── */
.limited-data-note {
  font-size: 0.7rem;
  opacity: 0.5;
  text-align: center;
  margin-top: 1rem;
  font-style: italic;
}

/* ── Personality signal chips ── */
.personality-signals {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 0.75rem;
}

.psignal-chip {
  background: color-mix(in srgb, var(--on-dark) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--on-dark) 18%, transparent);
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--slide-fg);
  opacity: 0;
  transform: scale(0.85);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.slide-section.is-active .psignal-chip {
  opacity: 1;
  transform: scale(1);
}

.slide-section.is-active .psignal-chip:nth-child(1) { transition-delay: 0.5s; }
.slide-section.is-active .psignal-chip:nth-child(2) { transition-delay: 0.6s; }
.slide-section.is-active .psignal-chip:nth-child(3) { transition-delay: 0.7s; }
.slide-section.is-active .psignal-chip:nth-child(4) { transition-delay: 0.8s; }
.slide-section.is-active .psignal-chip:nth-child(5) { transition-delay: 0.9s; }

/* ── Language detection chips ── */
.plang-section {
  margin-top: 0.75rem;
}

.plang-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.55;
  margin-bottom: 6px;
}

.plang-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.plang-chip {
  background: color-mix(in srgb, var(--on-dark) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--on-dark) 15%, transparent);
  border-radius: 20px;
  padding: 4px 10px;
  font-size: 0.8rem;
  opacity: 0;
  transform: scale(0.85);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.plang-chip--primary {
  background: color-mix(in srgb, var(--slide-accent) 20%, transparent);
  border-color: color-mix(in srgb, var(--slide-accent) 40%, transparent);
  font-weight: 600;
}

.slide-section.is-active .plang-chip { opacity: 1; transform: scale(1); }
.slide-section.is-active .plang-chip:nth-child(1) { transition-delay: 0.35s; }
.slide-section.is-active .plang-chip:nth-child(2) { transition-delay: 0.45s; }
.slide-section.is-active .plang-chip:nth-child(3) { transition-delay: 0.55s; }
.slide-section.is-active .plang-chip:nth-child(4) { transition-delay: 0.65s; }
.slide-section.is-active .plang-chip:nth-child(5) { transition-delay: 0.75s; }
.slide-section.is-active .plang-chip:nth-child(6) { transition-delay: 0.85s; }

/* ══════════════════════════════════════════
   SHARE PANEL (multi-format)
   ══════════════════════════════════════════ */

.share-panel-box {
  gap: 14px;
}

/* Box adapts to the aspect ratio of the active format */
.share-panel-box[data-fmt="twitter"] {
  max-width: min(92vw, 1024px);
}

.share-panel-box[data-fmt="square"] {
  max-width: min(88vw, 580px);
}

.share-panel-box[data-fmt="story"] {
  max-width: min(88vw, 420px);
}

.share-format-selector {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  width: 100%;
}

.share-format-btn {
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--text) 20%, transparent);
  background: transparent;
  color: color-mix(in srgb, var(--text) 65%, transparent);
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.share-format-btn.active,
.share-format-btn:hover {
  background: var(--primary);
  color: var(--on-primary);
  border-color: var(--primary);
}

.share-preview-wrap {
  flex: 1 1 0;
  min-height: 0;
  min-width: 0;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.share-preview-placeholder {
  font-family: var(--font-display);
  font-size: 12px;
  color: color-mix(in srgb, var(--text) 40%, transparent);
  text-align: center;
  padding: 32px;
}

.share-preview-wrap img {
  width: fit-content;
  height: 100%;
  object-fit: contain;
  display: block;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--text) 12%, transparent);
  box-shadow: 0 8px 32px color-mix(in srgb, var(--primary-dark) 50%, transparent);
}

.share-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  width: 100%;
}

.share-links-row {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding-top: 4px;
  border-top: 1px solid color-mix(in srgb, var(--text) 8%, transparent);
}

.share-links-row--primary {
  border-top: none;
  padding-top: 0;
}

.share-link-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: color-mix(in srgb, var(--text) 8%, transparent);
  color: color-mix(in srgb, var(--text) 70%, transparent);
  text-decoration: none;
  transition: all 0.2s;
  flex-shrink: 0;
  cursor: pointer;
}

.share-link-btn:hover {
  background: color-mix(in srgb, var(--primary) 20%, transparent);
  color: var(--primary);
}

.share-link-btn--wide {
  width: auto;
  border-radius: 999px;
  padding: 0 18px;
  height: 40px;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  flex: 1;
  max-width: 180px;
  white-space: nowrap;
}

/* ══════════════════════════════════════════
   FINAL CARD — Dashboard Footer
   Seamless scroll + full-width dashboard
   ══════════════════════════════════════════ */

.final-card-section {
  min-height: 100vh !important;
  width: 100% !important;
  padding: 0 !important;
  background: var(--slide-bg) !important;
  color: var(--slide-fg) !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  scroll-snap-align: center !important;
  scroll-snap-stop: always !important;
}

.final-card-content {
  width: 100%;
  padding: clamp(48px, 8vw, 80px) clamp(24px, 5vw, 80px);
  background: var(--slide-bg);
  color: var(--slide-fg);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(28px, 4vh, 48px);
}

/* Logo */
.final-card-logo {
  height: clamp(32px, 5vw, 48px);
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.6s ease 0.2s;
}

.final-card-section.is-active .final-card-logo {
  opacity: 0.9;
  transform: translateY(0);
}

/* Top section: Archetype + Primary platform */
.final-card-top {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(16px, 2vh, 24px);
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.6s ease 0.3s;
}

.final-card-section.is-active .final-card-top {
  opacity: 1;
  transform: translateY(0);
}

.final-card-emoji {
  font-size: clamp(56px, 8vw, 96px);
}

.final-card-archetype {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(28px, 4.5vw, 52px);
  font-weight: 400;
  font-style: italic;
  color: var(--slide-accent);
  margin: 0;
}

.final-card-platform {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: center;
  font-family: 'DM Sans', sans-serif;
  font-size: clamp(14px, 1.6vw, 18px);
  color: color-mix(in srgb, var(--slide-fg) 75%, transparent);
}

.final-card-platform img {
  height: clamp(20px, 3vw, 32px);
  width: auto;
  object-fit: contain;
}

/* Stats grid */
.final-card-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: clamp(16px, 2.5vw, 32px);
  width: 100%;
  max-width: 80vw;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.6s ease 0.4s;
}

.final-card-section.is-active .final-card-stats {
  opacity: 1;
  transform: translateY(0);
}

.final-card-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: clamp(16px, 2vw, 24px);
  border-radius: 8px;
  background: color-mix(in srgb, var(--slide-accent) 6%, transparent);
  border: 1px solid color-mix(in srgb, var(--slide-accent) 12%, transparent);
  justify-content: center;
}

.final-card-stat-value {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  font-size: clamp(20px, 3.2vw, 40px);
  color: var(--slide-accent);
  line-height: 1;
}

.final-card-stat-value.is-text {
  font-size: clamp(13px, 1.8vw, 20px);
  word-break: break-word;
  overflow-wrap: break-word;
  text-align: center;
  line-height: 1.25;
}

.final-card-stat-label {
  font-family: 'DM Sans', sans-serif;
  font-size: clamp(11px, 1.2vw, 13px);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--slide-fg) 55%, transparent);
}

/* Date range */
.final-card-date {
  font-family: 'DM Sans', sans-serif;
  font-size: clamp(13px, 1.4vw, 15px);
  letter-spacing: 0.06em;
  color: color-mix(in srgb, var(--slide-fg) 65%, transparent);
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.6s ease 0.5s;
}

.final-card-section.is-active .final-card-date {
  opacity: 1;
  transform: translateY(0);
}

/* CTA buttons */
.final-card-cta {
  display: flex;
  gap: clamp(12px, 2vw, 20px);
  flex-wrap: wrap;
  justify-content: center;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.6s ease 0.6s;
  margin-top: clamp(12px, 2vh, 24px);
}

.final-card-section.is-active .final-card-cta {
  opacity: 1;
  transform: translateY(0);
}

.final-card-share-btn,
.final-card-restart-btn {
  font-family: 'DM Sans', sans-serif;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  padding: 12px 28px;
  font-size: clamp(13px, 1.4vw, 15px);
  letter-spacing: 0.02em;
  transition: opacity 0.2s, box-shadow 0.2s;
}

.final-card-share-btn {
  background: var(--slide-accent);
  color: var(--slide-bg);
  border: none;
}

.final-card-share-btn:hover {
  opacity: 0.88;
  box-shadow: 0 4px 12px color-mix(in srgb, var(--slide-accent) 30%, transparent);
}

.final-card-restart-btn {
  background: transparent;
  color: var(--slide-fg);
  border: 1.5px solid color-mix(in srgb, var(--slide-fg) 28%, transparent);
}

.final-card-restart-btn:hover {
  background: color-mix(in srgb, var(--slide-fg) 7%, transparent);
}

/* Mobile adjustments */
@media (max-width: 767px) {
  .final-card-content {
    padding: clamp(40px, 6vw, 56px) clamp(16px, 4vw, 32px);
    gap: clamp(20px, 3.5vh, 36px);
  }

  .final-card-archetype {
    font-size: clamp(24px, 5.5vw, 36px);
  }

  .final-card-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: clamp(12px, 2vw, 20px);
  }

  .final-card-cta {
    flex-direction: column;
    width: 100%;
  }

  .final-card-share-btn,
  .final-card-restart-btn {
    width: 100%;
  }
}

/* ══════════════════════════════════════════
   VIS — Humanization & Privacy shared rows
   ══════════════════════════════════════════ */

.vis-human-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
  width: 100%;
  padding: 0;
}

.vis-human-row {
  display: flex;
  align-items: center;
  gap: 20px;
  width: 100%;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05); 
}

.vis-human-emoji {
  font-size: 2rem;
  flex-shrink: 0;
  width: 45px;
  text-align: center;
}

[data-slide-id="humanization"] .vis-human-list {
  width: fit-content;
}

[data-slide-id="humanization"] .vis-human-emoji {
  font-size: 3rem;
  width: 60px;
  filter: sepia(1) saturate(1.5) hue-rotate(50deg) brightness(0.8) contrast(1.5);
}

.vis-human-count {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 800;
  /* Escala más agresiva para ocupar ancho */
  font-size: clamp(30px, 5vw, 48px); 
  line-height: 1;
  flex-shrink: 0;
  min-width: 80px;
  text-align: right;
}

.vis-human-label {
  /* Hacemos que el label crezca para ocupar el resto del contenedor */
  flex: 1; 
  font-size: 1.1rem; /* Texto más legible */
  font-weight: 500;
  opacity: 0.9;
  text-align: left;
  line-height: 1.3;
  word-wrap: break-word;
}

/* ── Depth: technique pills ── */

.vis-tech-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 4px;
}

.vis-tech-pill {
  border: 1.5px solid;
  border-radius: 99px;
  padding: 4px 12px;
  font-size: 0.78rem;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
  letter-spacing: 0.02em;
  opacity: 0.9;
}
