/* ============================================================
   Cursos Mercado Monkey — motor de presentación (curso.css)
   Depende de ../styles.css (variables de marca, .glass, .btn, .grad,
   .eyebrow, .serif-it, .backdrop, .grain, @keyframes pulse).
   Todo lo propio va con prefijo .cs-*. Tema oscuro por defecto (proyección)
   y tema claro al final del archivo (html[data-theme="light"]).
   ============================================================ */

[hidden] { display: none !important; }

html, body { height: 100%; overflow: hidden !important; }
body { background: var(--ink); }

/* Un solo anillo de foco de marca */
.cs-app :focus-visible, .cs-gate :focus-visible {
  outline: 2px solid rgba(240,54,225,0.75); outline-offset: 3px; border-radius: 12px;
}
.btn:focus-visible { border-radius: 999px; }

/* ---------- Gate (copiado del onboarding) ---------- */
.cs-gate {
  position: fixed; inset: 0; z-index: 999;
  display: grid; place-items: center; padding: 24px;
  background: var(--backdrop-gradient);
}
.cs-gate-card { width: 100%; max-width: 400px; padding: 36px 32px 28px; border-radius: 24px; text-align: center; }
.cs-gate-card img { height: 44px; width: auto; margin: 0 auto 20px; display: block; }
.cs-gate-card h1 { font-size: 21px; font-weight: 500; letter-spacing: -0.02em; margin: 0 0 6px; }
.cs-gate-card p { font-size: 13.5px; color: var(--paper-dim); margin: 0 0 22px; line-height: 1.5; }
.cs-gate-card input {
  width: 100%; box-sizing: border-box; height: 50px; text-align: center; letter-spacing: 0.08em;
  background: rgba(255,255,255,0.04); border: 1px solid var(--line-strong); color: var(--paper);
  padding: 0 16px; border-radius: 12px; font: inherit; font-size: 15px; outline: none;
  transition: border-color .25s, background .25s, box-shadow .25s;
}
.cs-gate-card input:focus {
  border-color: rgba(240,54,225,0.6); background: rgba(255,255,255,0.06);
  box-shadow: 0 0 0 3px rgba(240,54,225,0.12);
}
.cs-gate-card .btn { width: 100%; height: 50px; justify-content: center; margin-top: 12px; }
.cs-gate-err { font-size: 13px; color: #ff7a92; margin: 10px 0 0; min-height: 16px; }

/* ---------- App shell ---------- */
.cs-app { position: fixed; inset: 0; z-index: 2; display: flex; flex-direction: column; }

/* Barra de progreso (gradiente de marca) */
.cs-progress { position: absolute; top: 0; left: 0; right: 0; height: 3px; background: rgba(255,255,255,0.07); z-index: 30; }
.cs-progress i { display: block; height: 100%; width: 0; background: linear-gradient(110deg, #f036e1, #9149ff); transition: width .5s cubic-bezier(.2,.8,.2,1); }

/* Top bar */
.cs-top {
  position: absolute; top: 3px; left: 0; right: 0; z-index: 25;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px 28px 0;
  pointer-events: none;
}
.cs-top > * { pointer-events: auto; }
.cs-brand { display: flex; align-items: center; gap: 11px; text-decoration: none; color: var(--paper); }
.cs-brand img { height: 30px; width: auto; display: block; }
.cs-brand span { font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--paper-faint); }
.cs-brand b { display: block; font-weight: 500; font-size: 12.5px; letter-spacing: 0; text-transform: none; color: var(--paper-dim); margin-top: 2px; }
.cs-bloque-lbl {
  font-family: 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--paper-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 34vw;
}
.cs-bloque-lbl em { font-style: normal; color: var(--pink); }

/* Relojes */
.cs-clocks { display: flex; align-items: center; gap: 10px; }
.cs-clock {
  display: flex; flex-direction: column; align-items: flex-end; gap: 2px;
  padding: 8px 14px; border-radius: 14px;
}
.cs-clock small { font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--paper-faint); }
.cs-clock .v { font-family: 'JetBrains Mono', monospace; font-size: 15px; color: var(--paper-dim); font-variant-numeric: tabular-nums; }
.cs-clock .v .delta { margin-left: 8px; font-size: 12px; }
.cs-clock .delta.ok { color: #5ed29c; }
.cs-clock .delta.late { color: var(--pink); }
.cs-clock .v .fin { margin-left: 8px; font-size: 11px; color: var(--paper-faint); }

/* Contador de la diapositiva */
.cs-timer {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 16px 8px 12px; border-radius: 16px;
  font-family: 'JetBrains Mono', monospace; font-variant-numeric: tabular-nums;
  transition: box-shadow .3s, background .3s;
}
.cs-timer .ring { width: 30px; height: 30px; flex-shrink: 0; transform: rotate(-90deg); }
.cs-timer .ring circle { fill: none; stroke-width: 3; }
.cs-timer .ring .bg { stroke: rgba(255,255,255,0.1); }
.cs-timer .ring .fg { stroke: url(#csGrad); stroke-linecap: round; transition: stroke-dashoffset 1s linear; }
.cs-timer .num { font-size: 26px; line-height: 1; color: var(--paper); letter-spacing: -0.02em; min-width: 4.2ch; text-align: right; }
.cs-timer .lbl { font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--paper-faint); }
.cs-timer.is-warn .num { color: #ffd166; }
.cs-timer.is-over { background: rgba(240,54,225,0.14); box-shadow: inset 0 0 0 1px rgba(240,54,225,0.5), 0 0 40px -6px rgba(240,54,225,0.6); }
.cs-timer.is-over .num { color: var(--pink); animation: pulse 1.1s ease-in-out infinite; }
.cs-timer.is-over .ring .fg { stroke: var(--pink); }
.cs-timer.is-paused .num { color: var(--paper-faint); }
.cs-timer.is-paused .lbl::after { content: " · pausa"; color: #ffd166; }
.cs-timer.is-off { opacity: 0; pointer-events: none; }

/* ---------- Escenario ---------- */
.cs-stage { position: absolute; inset: 0; overflow: hidden; }
.cs-slide {
  position: absolute; inset: 0; display: grid; grid-template-rows: 1fr;
  padding: 96px 6vw 88px;
  opacity: 0; visibility: hidden; pointer-events: none;
  transform: translateY(24px) scale(.985);
  transition: opacity .55s cubic-bezier(.2,.8,.2,1), transform .55s cubic-bezier(.2,.8,.2,1), visibility 0s linear .55s;
}
.cs-slide.is-active { opacity: 1; visibility: visible; pointer-events: auto; transform: none; transition-delay: 0s; z-index: 2; }
.cs-slide.is-prev { transform: translateY(-24px) scale(.985); }
.cs-inner { width: 100%; max-width: 1360px; margin: 0 auto; display: flex; flex-direction: column; justify-content: flex-start; min-height: 0; position: relative; z-index: 2; overflow-y: auto; scrollbar-width: none; }
.cs-inner::-webkit-scrollbar { display: none; }
.cs-inner > * { flex-shrink: 0; }
/* Centrado con márgenes auto: si el contenido no cabe, se puede hacer scroll desde arriba */
.cs-inner > :first-child { margin-top: auto; }
.cs-inner > :last-child { margin-bottom: auto; }

/* Foto de fondo con overlay de marca + Ken Burns */
.cs-bg { position: absolute; inset: 0; z-index: 0; overflow: hidden; }
.cs-bg img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: .55; filter: saturate(.85) contrast(1.05); transform: scale(1); }
.cs-slide.is-active .cs-bg img { animation: csKen 28s ease-out forwards; }
.cs-bg::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(1,1,1,0.55) 0%, rgba(1,1,1,0.25) 40%, rgba(1,1,1,0.85) 100%),
    radial-gradient(900px 700px at 15% 20%, rgba(240,54,225,0.28), transparent 60%),
    radial-gradient(900px 700px at 85% 70%, rgba(145,73,255,0.32), transparent 60%);
}
.cs-bg.soft img { opacity: .35; }
.cs-bg.soft::after {
  background:
    linear-gradient(180deg, rgba(1,1,1,0.75) 0%, rgba(1,1,1,0.6) 50%, rgba(1,1,1,0.9) 100%),
    radial-gradient(900px 700px at 15% 20%, rgba(240,54,225,0.2), transparent 60%),
    radial-gradient(900px 700px at 85% 70%, rgba(145,73,255,0.25), transparent 60%);
}
@keyframes csKen { from { transform: scale(1); } to { transform: scale(1.09); } }

/* Reveals escalonados */
.cs-r { opacity: 0; transform: translateY(18px); transition: opacity .6s cubic-bezier(.2,.8,.2,1), transform .6s cubic-bezier(.2,.8,.2,1); }
.cs-slide.is-active .cs-r { opacity: 1; transform: none; }
.cs-slide.is-active .cs-r:nth-child(1) { transition-delay: .15s; }
.cs-slide.is-active .cs-r:nth-child(2) { transition-delay: .25s; }
.cs-slide.is-active .cs-r:nth-child(3) { transition-delay: .35s; }
.cs-slide.is-active .cs-r:nth-child(4) { transition-delay: .45s; }
.cs-slide.is-active .cs-r:nth-child(5) { transition-delay: .55s; }
.cs-slide.is-active .cs-r:nth-child(6) { transition-delay: .65s; }
.cs-slide.is-active .cs-r:nth-child(7) { transition-delay: .75s; }
.cs-slide.is-active .cs-r:nth-child(8) { transition-delay: .85s; }
.cs-slide.is-active .cs-r:nth-child(n+9) { transition-delay: .95s; }
/* Fragmentos: bullets que aparecen con → */
.cs-frag { opacity: .18; transform: translateX(-6px); transition: opacity .45s, transform .45s; }
.cs-frag.is-on { opacity: 1; transform: none; }

/* ---------- Tipografía base de slide ---------- */
.cs-eyebrow { display: inline-flex; align-items: center; gap: 10px; align-self: flex-start; }
.cs-eyebrow.pink { border-color: rgba(240,54,225,0.45); color: #ffb3f5; background: rgba(240,54,225,0.08); }
.cs-eyebrow.pink .dot { background: var(--pink); box-shadow: 0 0 12px var(--pink); }
.cs-eyebrow.violet { border-color: rgba(145,73,255,0.45); color: #d3bcff; background: rgba(145,73,255,0.08); }
.cs-eyebrow.violet .dot { background: var(--violet); box-shadow: 0 0 12px var(--violet); }
.cs-h1 {
  font-size: clamp(34px, 4.4vw, 68px); line-height: 1.02; letter-spacing: -0.03em; font-weight: 500;
  margin: 18px 0 14px; text-wrap: balance;
}
.cs-h1 .grad { display: inline-block; }
.cs-sub { font-size: clamp(16px, 1.35vw, 21px); color: var(--paper-dim); line-height: 1.5; max-width: 62ch; margin: 0; text-wrap: pretty; }
.cs-note {
  margin-top: 26px; padding: 14px 18px; border-radius: 16px; align-self: flex-start;
  font-size: clamp(13px, 1.05vw, 16px); color: var(--paper-dim); line-height: 1.5; max-width: 70ch;
  background: rgba(145,73,255,0.10); border: 1px solid rgba(145,73,255,0.28);
}
.cs-note b { color: #d3bcff; font-weight: 600; }

/* ---------- Layout con foto lateral ---------- */
.cs-cols { display: grid; grid-template-columns: 1.25fr .9fr; gap: clamp(28px, 4vw, 64px); align-items: center; }
.cs-cols.wide { grid-template-columns: 1fr; }
.cs-cols > * { min-width: 0; }
.cs-stage, .cs-slide { max-width: 100vw; overflow: hidden; }
.cs-photo {
  position: relative; border-radius: 28px; overflow: hidden; aspect-ratio: 4/5; max-height: 66vh;
  box-shadow: inset 0 0 0 1px var(--line), 0 40px 80px -40px rgba(0,0,0,0.8), 0 0 80px -30px rgba(145,73,255,0.5);
}
.cs-photo img { width: 100%; height: 100%; object-fit: cover; display: block; filter: saturate(.9); }
.cs-slide.is-active .cs-photo img { animation: csKen 30s ease-out forwards; }
.cs-photo::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(200deg, rgba(240,54,225,0.28), transparent 45%),
    linear-gradient(20deg, rgba(145,73,255,0.42), transparent 55%),
    linear-gradient(180deg, transparent 60%, rgba(1,1,1,0.55));
  mix-blend-mode: normal;
}
.cs-photo .cap {
  position: absolute; left: 18px; bottom: 16px; right: 18px; z-index: 2;
  font-family: 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(244,238,246,0.75);
}

/* ---------- Bullets con explicación ---------- */
.cs-bullets { list-style: none; margin: 26px 0 0; padding: 0; display: flex; flex-direction: column; gap: clamp(10px, 1.3vh, 18px); }
.cs-bullets li {
  display: grid; grid-template-columns: 34px 1fr; gap: 14px; align-items: start;
  padding: clamp(10px, 1.2vh, 16px) 18px clamp(10px, 1.2vh, 16px) 14px; border-radius: 18px;
  background: rgba(255,255,255,0.035); box-shadow: inset 0 0 0 1px var(--line);
}
.cs-bullets li .ic {
  width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; flex-shrink: 0;
  background: linear-gradient(135deg, rgba(240,54,225,0.22), rgba(145,73,255,0.22));
  box-shadow: inset 0 0 0 1px rgba(240,54,225,0.28); color: #ffb3f5;
  font-family: 'JetBrains Mono', monospace; font-size: 12px; font-weight: 500;
}
.cs-bullets li .t { font-size: clamp(16px, 1.45vw, 22px); font-weight: 600; letter-spacing: -0.015em; line-height: 1.25; }
.cs-bullets li .d { font-size: clamp(13.5px, 1.1vw, 17px); color: var(--paper-dim); line-height: 1.5; margin-top: 3px; text-wrap: pretty; }
.cs-bullets li .d b { color: var(--paper); font-weight: 600; }
.cs-bullets.compact li { padding: 8px 14px 8px 10px; border-radius: 14px; }
.cs-bullets.compact li .t { font-size: clamp(14px, 1.2vw, 18px); }
.cs-bullets.compact li .d { font-size: clamp(12.5px, 1vw, 15px); }

/* ---------- Portada ---------- */
.cs-slide.t-portada .cs-inner { align-items: center; text-align: center; }
.cs-slide.t-portada .cs-h1 { font-size: clamp(42px, 6.4vw, 104px); max-width: 16ch; margin-top: 22px; }
.cs-slide.t-portada .cs-sub { max-width: 56ch; margin: 0 auto; }
.cs-meta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; justify-content: center; }
.cs-meta span {
  display: inline-flex; align-items: center; gap: 9px; padding: 9px 16px; border-radius: 999px;
  border: 1px solid var(--line); background: rgba(1,1,1,0.35); backdrop-filter: blur(10px);
  font-size: 13px; color: var(--paper-dim);
}
.cs-meta span::before { content: ""; width: 6px; height: 6px; border-radius: 999px; flex-shrink: 0; background: linear-gradient(135deg, var(--pink), var(--violet)); }
.cs-portada-cta { margin-top: 36px; display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.cs-portada-cta .btn { padding: 16px 28px; font-size: 15px; }
.cs-logo-big { height: clamp(56px, 7vw, 96px); width: auto; margin-bottom: clamp(18px, 3vh, 34px); filter: drop-shadow(0 20px 40px rgba(240,54,225,0.35)); }
.cs-days { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 30px; }
.cs-days button {
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px; flex: 1 1 200px; max-width: 250px; text-align: left;
  padding: 14px 18px; border-radius: 18px; cursor: pointer; color: var(--paper); font: inherit;
  background: rgba(255,255,255,0.04); border: 1px solid var(--line-strong); backdrop-filter: blur(10px);
  transition: transform .25s, background .25s, border-color .25s;
}
.cs-days button:hover { transform: translateY(-3px); background: rgba(255,255,255,0.08); border-color: rgba(240,54,225,0.5); }
.cs-days button small { font-family: 'JetBrains Mono', monospace; font-size: 10.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--pink); }
.cs-days button b { font-weight: 500; font-size: 15px; letter-spacing: -0.01em; }
.cs-days button i { font-style: normal; font-size: 12px; color: var(--paper-faint); }

/* ---------- Separador de bloque ---------- */
.cs-slide.t-bloque .cs-inner { padding-bottom: 4vh; }
.cs-slide.t-bloque .cs-inner > :last-child { margin-bottom: 0; }
.cs-bloque-num {
  font-family: 'JetBrains Mono', monospace; font-size: clamp(64px, 12vw, 200px); line-height: .9; font-weight: 500; letter-spacing: -0.05em;
  background: linear-gradient(110deg, #f036e1 0%, #9149ff 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  opacity: .95;
}
.cs-slide.t-bloque .cs-h1 { font-size: clamp(40px, 6vw, 92px); max-width: 18ch; margin-top: 18px; }
.cs-bloque-meta { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 18px; font-family: 'JetBrains Mono', monospace; font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--paper-faint); }
.cs-bloque-meta span::before { content: "— "; color: var(--pink); }

/* ---------- Glosario ---------- */
.cs-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: clamp(12px, 1.4vw, 22px); margin-top: 28px; }
.cs-card { padding: clamp(18px, 2vw, 30px); border-radius: 24px; display: flex; flex-direction: column; gap: 10px; min-height: 0; }
.cs-card .term { font-size: clamp(22px, 2.3vw, 36px); font-weight: 600; letter-spacing: -0.03em; line-height: 1; }
.cs-card .full { font-family: 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--paper-faint); margin-top: -4px; }
.cs-card .def { font-size: clamp(14px, 1.15vw, 18px); color: var(--paper-dim); line-height: 1.5; text-wrap: pretty; }
.cs-card .def b { color: var(--paper); font-weight: 600; }
.cs-card .ej {
  margin-top: auto; padding: 10px 14px; border-radius: 12px; font-family: 'JetBrains Mono', monospace; font-size: clamp(12px, .95vw, 14px); line-height: 1.5;
  background: rgba(240,54,225,0.08); box-shadow: inset 0 0 0 1px rgba(240,54,225,0.25); color: #ffd6fa;
}
.cs-card .ej::before { content: "ej. "; color: var(--pink); }

/* ---------- Comparativa ---------- */
.cs-vs { display: grid; grid-template-columns: 1fr auto 1fr; gap: clamp(12px, 2vw, 28px); align-items: stretch; margin-top: 28px; }
.cs-vs .col { padding: clamp(18px, 2vw, 30px); border-radius: 26px; display: flex; flex-direction: column; }
.cs-vs .col h3 { margin: 0 0 4px; font-size: clamp(20px, 2vw, 32px); font-weight: 600; letter-spacing: -0.025em; }
.cs-vs .col .tag { font-family: 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--paper-faint); margin-bottom: 14px; }
.cs-vs .col.a h3 { color: #ffb3f5; } .cs-vs .col.b h3 { color: #d3bcff; }
.cs-vs .col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.cs-vs .col li { display: grid; grid-template-columns: 18px 1fr; gap: 10px; font-size: clamp(14px, 1.15vw, 18px); color: var(--paper-dim); line-height: 1.45; }
.cs-vs .col li::before { content: ""; width: 7px; height: 7px; border-radius: 50%; margin-top: .55em; background: linear-gradient(135deg, var(--pink), var(--violet)); }
.cs-vs .col li b { color: var(--paper); font-weight: 600; }
.cs-vs .col li span { min-width: 0; }
.cs-vs .col .win { margin-top: auto; padding-top: 14px; font-size: clamp(13px, 1vw, 15.5px); color: #b8efd2; }
.cs-vs .col .win::before { content: "→ "; color: #5ed29c; }
.cs-vs .mid { display: grid; place-items: center; font-family: 'JetBrains Mono', monospace; font-size: 13px; letter-spacing: 0.16em; color: var(--paper-faint); }

/* ---------- Ejercicio práctico ---------- */
.cs-slide.t-ejercicio .cs-cols { grid-template-columns: 1.5fr .72fr; }
.cs-cols:has(.cs-bullets.compact) { grid-template-columns: 1.5fr .72fr; }
.cs-steps { list-style: none; margin: 24px 0 0; padding: 0; display: flex; flex-direction: column; gap: clamp(8px, 1.1vh, 14px); counter-reset: step; }
.cs-steps li {
  display: grid; grid-template-columns: 44px 1fr; gap: 14px; align-items: start;
  padding: clamp(10px, 1.1vh, 14px) 16px clamp(10px, 1.1vh, 14px) 12px; border-radius: 18px;
  background: rgba(255,255,255,0.035); box-shadow: inset 0 0 0 1px var(--line);
}
.cs-steps li::before {
  counter-increment: step; content: counter(step, decimal-leading-zero);
  width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center;
  font-family: 'JetBrains Mono', monospace; font-size: 15px; font-weight: 500; color: #fff;
  background: linear-gradient(110deg, #f036e1, #9149ff); box-shadow: 0 10px 24px -10px rgba(240,54,225,0.6);
}
.cs-steps.dense { gap: 6px; }
.cs-steps.dense li { padding: 7px 14px 7px 10px; border-radius: 14px; grid-template-columns: 36px 1fr; }
.cs-steps.dense li::before { width: 36px; height: 36px; border-radius: 11px; font-size: 13px; }
.cs-steps.dense li .t { font-size: clamp(14px, 1.15vw, 18px); }
.cs-steps.dense li .d { font-size: clamp(12.5px, .95vw, 15px); }
.cs-steps li .t { font-size: clamp(15px, 1.3vw, 20px); font-weight: 600; letter-spacing: -0.01em; line-height: 1.3; }
.cs-steps li .d { font-size: clamp(13px, 1.05vw, 16px); color: var(--paper-dim); line-height: 1.5; margin-top: 3px; }
.cs-steps li .d b { color: var(--paper); font-weight: 600; }
.cs-goal { margin-top: 18px; display: flex; gap: 12px; align-items: flex-start; padding: 14px 18px; border-radius: 16px; background: rgba(94,210,156,0.08); border: 1px solid rgba(94,210,156,0.3); font-size: clamp(13.5px, 1.1vw, 17px); color: #d6f5e4; line-height: 1.5; }
.cs-goal b { color: #5ed29c; font-weight: 600; white-space: nowrap; }
.cs-live {
  position: absolute; top: 0; right: 0; display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-radius: 999px; font-family: 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase;
  background: rgba(240,54,225,0.12); border: 1px solid rgba(240,54,225,0.45); color: #ffb3f5;
}
.cs-live::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--pink); box-shadow: 0 0 12px var(--pink); animation: pulse 1.6s ease-in-out infinite; }

/* ---------- Break / Preguntas ---------- */
.cs-slide.t-break .cs-inner, .cs-slide.t-preguntas .cs-inner { align-items: center; text-align: center; }
.cs-slide.t-break .cs-eyebrow, .cs-slide.t-preguntas .cs-eyebrow, .cs-slide.t-portada .cs-eyebrow, .cs-slide.t-cierre .cs-eyebrow { align-self: center; }
.cs-big-timer { position: relative; width: clamp(220px, 30vh, 340px); height: clamp(220px, 30vh, 340px); margin: 26px auto 8px; display: grid; place-items: center; }
.cs-big-timer svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.cs-big-timer circle { fill: none; stroke-width: 6; }
.cs-big-timer .bg { stroke: rgba(255,255,255,0.09); }
.cs-big-timer .fg { stroke: url(#csGrad); stroke-linecap: round; transition: stroke-dashoffset 1s linear; }
.cs-big-timer .num { font-family: 'JetBrains Mono', monospace; font-size: clamp(54px, 7vh, 84px); letter-spacing: -0.04em; font-variant-numeric: tabular-nums; line-height: 1; }
.cs-big-timer .lbl { position: absolute; bottom: 22%; font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--paper-faint); }
.cs-big-timer.is-over .num { color: var(--pink); animation: pulse 1.1s ease-in-out infinite; }
.cs-big-timer.is-over .fg { stroke: var(--pink); }
.cs-slide.t-break .cs-h1 { font-size: clamp(38px, 5.4vw, 84px); }
.cs-slide.t-break .cs-sub, .cs-slide.t-preguntas .cs-sub { margin: 0 auto; }
.cs-qmark {
  font-size: clamp(90px, 16vh, 200px); line-height: .85; font-weight: 500; letter-spacing: -0.06em;
  background: linear-gradient(110deg, #f036e1 0%, #9149ff 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  animation: csFloat 6s ease-in-out infinite;
}
@keyframes csFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
.cs-guia { margin: 26px auto 0; max-width: 900px; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }
.cs-guia span { padding: 12px 16px; border-radius: 14px; font-size: clamp(13px, 1.05vw, 16px); color: var(--paper-dim); background: rgba(255,255,255,0.035); box-shadow: inset 0 0 0 1px var(--line); text-align: left; line-height: 1.4; }
.cs-guia span::before { content: "¿ "; color: var(--pink); }
.cs-guia-lbl { margin-top: 26px; font-family: 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--paper-faint); }

/* ---------- Resumen ---------- */
.cs-checks { list-style: none; margin: 24px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: 10px 18px; }
.cs-checks li { display: grid; grid-template-columns: 28px 1fr; gap: 12px; align-items: start; font-size: clamp(15px, 1.25vw, 19.5px); line-height: 1.4; padding: 10px 0; border-bottom: 1px solid var(--line); }
.cs-checks li::before {
  content: "✓"; width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; font-size: 14px; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, #f036e1, #9149ff); box-shadow: 0 8px 18px -8px rgba(240,54,225,0.7);
}
.cs-checks li > div { min-width: 0; }
.cs-checks li small { display: block; color: var(--paper-dim); font-size: .82em; margin-top: 2px; line-height: 1.45; }

/* ---------- Cierre ---------- */
.cs-slide.t-cierre .cs-inner { align-items: center; text-align: center; }
.cs-contact { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 30px; }
.cs-contact a { display: inline-flex; align-items: center; gap: 10px; padding: 14px 22px; border-radius: 999px; text-decoration: none; font-size: 14.5px; font-weight: 500; color: var(--paper); background: rgba(255,255,255,0.05); border: 1px solid var(--line-strong); transition: transform .25s, background .25s; }
.cs-contact a:hover { transform: translateY(-2px); background: rgba(255,255,255,0.1); }
.cs-contact a.wa { background: rgba(37,211,102,0.14); border-color: rgba(37,211,102,0.45); color: #c9f7dc; }

/* ---------- Bottom bar ---------- */
.cs-bottom {
  position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 25;
  display: flex; align-items: center; gap: 6px; padding: 8px 10px; border-radius: 999px;
}
.cs-bottom button {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 999px; cursor: pointer; border: none;
  background: transparent; color: var(--paper-dim); transition: background .2s, color .2s;
}
.cs-bottom button:hover { background: rgba(255,255,255,0.08); color: var(--paper); }
.cs-bottom button.on { color: #ffb3f5; background: rgba(240,54,225,0.12); }
.cs-bottom button svg { width: 18px; height: 18px; }
.cs-bottom .count { font-family: 'JetBrains Mono', monospace; font-size: 12.5px; letter-spacing: 0.06em; color: var(--paper-dim); padding: 0 12px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cs-bottom .count em { font-style: normal; color: var(--paper); }
.cs-bottom .sep { width: 1px; height: 22px; background: var(--line-strong); margin: 0 4px; }
.cs-hint { position: absolute; right: 28px; bottom: 30px; z-index: 25; font-family: 'JetBrains Mono', monospace; font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--paper-faint); opacity: .7; }
.cs-hint kbd { display: inline-block; padding: 2px 6px; border-radius: 6px; border: 1px solid var(--line-strong); font: inherit; color: var(--paper-dim); margin: 0 2px; }
.cs-next-lbl { position: absolute; left: 28px; bottom: 30px; z-index: 25; font-family: 'JetBrains Mono', monospace; font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--paper-faint); opacity: .7; max-width: 30vw; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cs-next-lbl em { font-style: normal; color: var(--paper-dim); }

/* ---------- Vista general (overview) ---------- */
.cs-overview { position: absolute; inset: 0; z-index: 40; overflow: auto; padding: 90px 40px 60px; background: rgba(1,1,1,0.82); backdrop-filter: blur(20px); }
.cs-ov-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 22px; }
.cs-overview h2 { margin: 0 0 6px; font-size: 22px; font-weight: 500; letter-spacing: -0.02em; }
.cs-ov-search { position: relative; flex: 1 1 320px; max-width: 520px; }
.cs-ov-search svg { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); width: 17px; height: 17px; color: var(--paper-faint); pointer-events: none; }
.cs-ov-search input {
  width: 100%; box-sizing: border-box; height: 48px; padding: 0 92px 0 44px; border-radius: 14px; font: inherit; font-size: 15px; color: var(--paper); outline: none;
  background: rgba(255,255,255,0.05); border: 1px solid var(--line-strong); transition: border-color .25s, box-shadow .25s, background .25s;
}
.cs-ov-search input::-webkit-search-cancel-button, .cs-ov-search input::-webkit-search-decoration { -webkit-appearance: none; display: none; }
.cs-ov-search input::placeholder { color: var(--paper-faint); }
.cs-ov-search input:focus { border-color: rgba(240,54,225,0.6); background: rgba(255,255,255,0.07); box-shadow: 0 0 0 3px rgba(240,54,225,0.12); }
.cs-ov-search .cnt { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); font-family: 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--pink); pointer-events: none; }
.cs-ov-item .snip { font-size: 12px; color: var(--paper-dim); line-height: 1.45; }
.cs-ov-item .snip mark { background: rgba(240,54,225,0.25); color: #ffd6fa; border-radius: 4px; padding: 0 2px; }
.cs-ov-empty { grid-column: 1 / -1; padding: 30px; text-align: center; color: var(--paper-dim); font-size: 15px; }
.cs-overview .sum { font-family: 'JetBrains Mono', monospace; font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--paper-faint); }
.cs-ov-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.cs-ov-item {
  text-align: left; cursor: pointer; padding: 14px 16px; border-radius: 18px; color: var(--paper); font: inherit;
  background: rgba(255,255,255,0.04); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; min-height: 104px;
  transition: transform .2s, border-color .2s, background .2s;
}
.cs-ov-item:hover { transform: translateY(-2px); border-color: rgba(240,54,225,0.5); background: rgba(255,255,255,0.07); }
.cs-ov-item.is-cur { border-color: rgba(240,54,225,0.8); box-shadow: 0 0 0 3px rgba(240,54,225,0.15); }
.cs-ov-item.is-done { opacity: .55; }
.cs-ov-item .k { display: flex; justify-content: space-between; font-family: 'JetBrains Mono', monospace; font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--paper-faint); }
.cs-ov-item .k b { font-weight: 500; color: var(--pink); }
.cs-ov-item .n { font-size: 14px; font-weight: 500; line-height: 1.3; letter-spacing: -0.01em; }
.cs-ov-item .tp { margin-top: auto; font-size: 11px; color: var(--paper-faint); }
.cs-ov-item.tp-break, .cs-ov-item.tp-preguntas { background: rgba(145,73,255,0.10); }
.cs-ov-item.tp-ejercicio { background: rgba(94,210,156,0.08); }
.cs-ov-item.tp-bloque { background: rgba(240,54,225,0.10); }

/* ---------- Toast ---------- */
.cs-toast {
  position: absolute; left: 50%; top: 84px; transform: translate(-50%, -10px); z-index: 50; opacity: 0; pointer-events: none;
  padding: 10px 18px; border-radius: 999px; font-size: 13px; color: var(--paper); background: rgba(22,24,26,0.9); border: 1px solid var(--line-strong);
  transition: opacity .3s, transform .3s;
}
.cs-toast.on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Responsive ---------- */
@media (max-width: 1600px) {
  .cs-hint .long { display: none; }
}
@media (max-width: 1024px) {
  .cs-cols, .cs-slide.t-ejercicio .cs-cols { grid-template-columns: 1fr; gap: 20px; }
  .cs-photo { display: none; }
  .cs-vs { grid-template-columns: 1fr; }
  .cs-vs .mid { display: none; }
  .cs-bloque-lbl { display: none; }
}
@media (max-width: 720px) {
  .cs-slide { padding: 92px 18px 96px; }
  .cs-top { padding: 12px 16px 0; }
  .cs-brand span, .cs-brand b { display: none; }
  .cs-clock { display: none; }
  .cs-timer .lbl { display: none; }
  .cs-timer .num { font-size: 20px; }
  .cs-hint, .cs-next-lbl { display: none; }
  .cs-bottom { bottom: 12px; padding: 6px; gap: 2px; max-width: calc(100vw - 24px); }
  .cs-bottom button { width: 36px; height: 36px; }
  .cs-bottom .count { padding: 0 8px; font-size: 11.5px; }
  #csBtnHome, #csBtnMute { display: none; }
  .cs-timer { padding: 6px 10px 6px 8px; }
  .cs-bullets li, .cs-steps li { grid-template-columns: 28px 1fr; gap: 10px; }
  .cs-bullets li .ic { width: 28px; height: 28px; }
  .cs-h1 { font-size: clamp(28px, 8vw, 40px); }
  .cs-inner { justify-content: flex-start; overflow: auto; }
  .cs-live { position: static; margin-bottom: 10px; align-self: flex-start; }
  .cs-overview { padding: 80px 16px 40px; }
}
@media (max-height: 1100px) {
  .cs-h1 { font-size: clamp(32px, 3.8vw, 58px); margin: 14px 0 10px; }
  .cs-bullets li { padding: 9px 16px 9px 12px; }
  .cs-bullets li .d, .cs-steps li .d { line-height: 1.4; }
  .cs-bullets.compact { gap: 7px; }
  .cs-bullets.compact li { padding: 6px 12px 6px 9px; }
  .cs-steps.dense { gap: 5px; }
  .cs-steps.dense li { padding: 6px 12px 6px 9px; }
  .cs-note { margin-top: 18px; }
  .cs-cards { margin-top: 22px; }
}
@media (max-height: 820px) {
  .cs-slide { padding-top: 72px; padding-bottom: 68px; }
  .cs-h1 { font-size: clamp(26px, 3vw, 40px); margin: 10px 0 6px; }
  .cs-sub { font-size: clamp(13.5px, 1.05vw, 15.5px); }
  .cs-eyebrow { padding: 4px 11px; font-size: 10.5px; }
  .cs-steps, .cs-bullets { margin-top: 12px; }
  .cs-bullets { gap: 6px; }
  .cs-bullets li { padding: 7px 12px 7px 9px; border-radius: 14px; grid-template-columns: 30px 1fr; gap: 10px; }
  .cs-bullets li .ic { width: 30px; height: 30px; border-radius: 9px; }
  .cs-bullets li .t { font-size: clamp(14px, 1.2vw, 17px); }
  .cs-bullets li .d { font-size: clamp(12px, .92vw, 14px); line-height: 1.4; }
  .cs-bullets.compact li { padding: 5px 11px 5px 8px; }
  .cs-bullets.compact li .t { font-size: clamp(13px, 1.1vw, 15.5px); }
  .cs-bullets.compact li .d { font-size: clamp(11.5px, .88vw, 13.5px); }
  .cs-steps { gap: 6px; }
  .cs-steps li { padding: 7px 12px 7px 9px; grid-template-columns: 36px 1fr; gap: 10px; }
  .cs-steps li::before { width: 36px; height: 36px; border-radius: 11px; font-size: 13px; }
  .cs-steps li .t { font-size: clamp(14px, 1.15vw, 17px); }
  .cs-steps li .d { font-size: clamp(12px, .92vw, 14px); line-height: 1.4; }
  .cs-steps.dense { gap: 4px; }
  .cs-steps.dense li { padding: 4px 11px 4px 7px; grid-template-columns: 32px 1fr; }
  .cs-steps.dense li::before { width: 32px; height: 32px; font-size: 12px; }
  .cs-steps.dense li .t { font-size: clamp(13px, 1.05vw, 15.5px); }
  .cs-steps.dense li .d { font-size: clamp(11.5px, .88vw, 13.5px); }
  .cs-goal { margin-top: 10px; padding: 8px 12px; font-size: 13px; }
  .cs-note { margin-top: 12px; padding: 8px 12px; font-size: 13px; }
  .cs-cards { margin-top: 16px; gap: 12px; }
  .cs-card { padding: 16px 18px; gap: 6px; }
  .cs-card .term { font-size: clamp(20px, 2vw, 28px); }
  .cs-card .def { font-size: clamp(13px, 1.05vw, 15.5px); }
  .cs-card .ej { padding: 8px 12px; font-size: 12px; }
  .cs-vs { margin-top: 16px; }
  .cs-vs .col { padding: 16px 18px; }
  .cs-vs .col h3 { font-size: clamp(18px, 1.7vw, 26px); }
  .cs-vs .col li { font-size: clamp(13px, 1.05vw, 15.5px); }
  .cs-vs .col ul { gap: 6px; }
  .cs-checks { margin-top: 14px; gap: 4px 16px; }
  .cs-checks li { font-size: clamp(13.5px, 1.1vw, 16px); padding: 6px 0; }
  .cs-slide.t-ejercicio .cs-photo { display: none; }
  .cs-slide.t-ejercicio .cs-cols { grid-template-columns: 1fr; }
  .cs-photo { max-height: 58vh; }
  .cs-cols { gap: 28px; }
  .cs-live { padding: 5px 11px; font-size: 10px; }
  .cs-slide.t-ejercicio { padding-bottom: 62px; }
  .cs-slide.t-ejercicio .cs-h1 { font-size: clamp(24px, 2.6vw, 34px); margin: 8px 0 4px; }
  .cs-steps.dense { gap: 3px; }
}
@media (max-height: 720px) {
  .cs-slide { padding-top: 84px; padding-bottom: 76px; }
  .cs-bullets { gap: 8px; }
  .cs-bullets li { padding: 8px 14px 8px 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .cs-slide.is-active .cs-bg img, .cs-slide.is-active .cs-photo img, .cs-qmark { animation: none !important; }
  .cs-r { transition: none; }
}

/* ============================================================
   TEMA CLARO — html[data-theme="light"]
   Todo color fijo del tema oscuro tiene aquí su equivalente.
   Paleta: rosa #a8138f · violeta #5618c4 · verde #1d7a4a · ámbar #b07a00
   ============================================================ */
html[data-theme="light"] .cs-gate-card input,
html[data-theme="light"] .cs-ov-search input { background: rgba(255,255,255,0.65); }
html[data-theme="light"] .cs-gate-card input:focus,
html[data-theme="light"] .cs-ov-search input:focus { background: rgba(255,255,255,0.9); }
html[data-theme="light"] .cs-gate-err { color: #c8203f; }

html[data-theme="light"] .cs-progress { background: rgba(22,16,26,0.08); }
html[data-theme="light"] .cs-clock .delta.ok { color: #1d7a4a; }
html[data-theme="light"] .cs-timer .ring .bg,
html[data-theme="light"] .cs-big-timer .bg { stroke: rgba(22,16,26,0.12); }
html[data-theme="light"] .cs-timer.is-warn .num { color: #b07a00; }
html[data-theme="light"] .cs-timer.is-paused .lbl::after { color: #b07a00; }
html[data-theme="light"] .cs-timer.is-over { background: rgba(240,54,225,0.10); }

/* Foto de fondo: overlay claro para que el texto oscuro se lea */
html[data-theme="light"] .cs-bg img { opacity: .5; }
html[data-theme="light"] .cs-bg::after {
  background:
    linear-gradient(180deg, rgba(250,247,251,0.72) 0%, rgba(250,247,251,0.52) 40%, rgba(250,247,251,0.9) 100%),
    radial-gradient(900px 700px at 15% 20%, rgba(240,54,225,0.16), transparent 60%),
    radial-gradient(900px 700px at 85% 70%, rgba(145,73,255,0.18), transparent 60%);
}
html[data-theme="light"] .cs-bg.soft img { opacity: .3; }
html[data-theme="light"] .cs-bg.soft::after {
  background:
    linear-gradient(180deg, rgba(250,247,251,0.85) 0%, rgba(250,247,251,0.75) 50%, rgba(250,247,251,0.94) 100%),
    radial-gradient(900px 700px at 15% 20%, rgba(240,54,225,0.12), transparent 60%),
    radial-gradient(900px 700px at 85% 70%, rgba(145,73,255,0.14), transparent 60%);
}

html[data-theme="light"] .cs-eyebrow.pink { color: #a8138f; }
html[data-theme="light"] .cs-eyebrow.violet { color: #5618c4; }
html[data-theme="light"] .cs-note b { color: #5618c4; }

html[data-theme="light"] .cs-bullets li,
html[data-theme="light"] .cs-steps li,
html[data-theme="light"] .cs-guia span { background: rgba(255,255,255,0.55); }
html[data-theme="light"] .cs-bullets li .ic { color: #a8138f; }

html[data-theme="light"] .cs-meta span { background: rgba(255,255,255,0.6); }
html[data-theme="light"] .cs-days button { background: rgba(255,255,255,0.6); }
html[data-theme="light"] .cs-days button:hover { background: rgba(255,255,255,0.9); }
html[data-theme="light"] .cs-days button small { color: #a8138f; }
html[data-theme="light"] .cs-bloque-num,
html[data-theme="light"] .cs-qmark {
  background: linear-gradient(110deg, #a8138f 0%, #5618c4 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
html[data-theme="light"] .cs-bloque-meta span::before,
html[data-theme="light"] .cs-guia span::before,
html[data-theme="light"] .cs-bloque-lbl em,
html[data-theme="light"] .cs-ov-item .k b,
html[data-theme="light"] .cs-ov-search .cnt,
html[data-theme="light"] .cs-card .ej::before { color: #a8138f; }

html[data-theme="light"] .cs-card .ej { color: #7a0d66; background: rgba(240,54,225,0.07); }
html[data-theme="light"] .cs-vs .col.a h3 { color: #a8138f; }
html[data-theme="light"] .cs-vs .col.b h3 { color: #5618c4; }
html[data-theme="light"] .cs-vs .col .win { color: #14522f; }
html[data-theme="light"] .cs-vs .col .win::before { color: #1d7a4a; }
html[data-theme="light"] .cs-goal { background: rgba(29,122,74,0.07); border-color: rgba(29,122,74,0.3); color: #14522f; }
html[data-theme="light"] .cs-goal b { color: #1d7a4a; }
html[data-theme="light"] .cs-live { color: #a8138f; background: rgba(240,54,225,0.08); }

html[data-theme="light"] .cs-contact a { background: rgba(255,255,255,0.6); }
html[data-theme="light"] .cs-contact a:hover { background: rgba(255,255,255,0.9); }
html[data-theme="light"] .cs-contact a.wa { background: rgba(37,211,102,0.12); border-color: rgba(29,122,74,0.4); color: #14522f; }

html[data-theme="light"] .cs-bottom button:hover { background: rgba(22,16,26,0.06); }
html[data-theme="light"] .cs-bottom button.on { color: #a8138f; background: rgba(240,54,225,0.1); }
html[data-theme="light"] .cs-hint kbd { background: rgba(255,255,255,0.6); }

html[data-theme="light"] .cs-overview { background: rgba(250,247,251,0.9); }
html[data-theme="light"] .cs-ov-item { background: rgba(255,255,255,0.6); }
html[data-theme="light"] .cs-ov-item:hover { background: rgba(255,255,255,0.9); }
html[data-theme="light"] .cs-ov-item .snip mark { color: #7a0d66; background: rgba(240,54,225,0.18); }
html[data-theme="light"] .cs-ov-item.tp-break, html[data-theme="light"] .cs-ov-item.tp-preguntas { background: rgba(145,73,255,0.09); }
html[data-theme="light"] .cs-ov-item.tp-ejercicio { background: rgba(29,122,74,0.08); }
html[data-theme="light"] .cs-ov-item.tp-bloque { background: rgba(240,54,225,0.09); }
html[data-theme="light"] .cs-toast { background: rgba(255,255,255,0.96); box-shadow: 0 18px 40px -20px rgba(22,16,26,0.35); }

/* Botón de tema (gate + barra inferior) */
.cs-theme-btn .ic-moon { display: none; }
html[data-theme="light"] .cs-theme-btn .ic-moon { display: block; }
html[data-theme="light"] .cs-theme-btn .ic-sun { display: none; }
.cs-gate-theme {
  position: absolute; top: 18px; right: 18px; width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center;
  background: rgba(255,255,255,0.05); border: 1px solid var(--line); color: var(--paper); cursor: pointer; transition: background .2s;
}
.cs-gate-theme:hover { background: rgba(255,255,255,0.1); }
html[data-theme="light"] .cs-gate-theme { background: rgba(255,255,255,0.6); }
html[data-theme="light"] .cs-gate-theme:hover { background: rgba(255,255,255,0.9); }
.cs-gate-theme svg { width: 17px; height: 17px; }
