/* =============================================================
   Lesson deck framework — shared by every /lessons/* interactive
   deck. Page-specific demo widgets stay inline in each deck's own
   <style> block; only the common frame lives here.
   ============================================================= */

:root {
  --ink-black: #070b0b;
  --panel: #0d1414;
  --neon-mint: #2de0c8;
  --neon-cyan: #38bdf8;
  --soft-white: #eafffb;
  --dim: #7c8f8c;
  --line: rgba(45, 224, 200, 0.18);
  --glow-mint: 0 0 18px rgba(45, 224, 200, 0.35);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
body {
  background: var(--ink-black);
  color: var(--soft-white);
  font-family: 'Inter', sans-serif;
  overflow: hidden;
}

#deck { position: relative; height: 100vh; display: flex; flex-direction: column; }

/* ===== Back to Lessons ===== */
#deck-topbar { padding: 14px 28px 0; }
.deck-back {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--dim);
  text-decoration: none;
  transition: color .2s ease;
}
.deck-back:hover { color: var(--neon-mint); }

/* ===== Progress timeline ===== */
#timeline { display: flex; align-items: center; gap: 0; padding: 22px 28px 10px; user-select: none; }
.commit { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--line); background: transparent; cursor: pointer; flex-shrink: 0; transition: all .25s ease; }
.commit.visited { border-color: var(--neon-mint); background: rgba(45,224,200,.25); }
.commit.current { border-color: var(--neon-mint); background: var(--neon-mint); box-shadow: var(--glow-mint); transform: scale(1.25); }
.commit-edge { height: 2px; flex: 1; background: var(--line); transition: background .25s ease; }
.commit-edge.visited { background: var(--neon-mint); }
#timeline-label { font-family: 'Space Grotesk', sans-serif; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); padding: 0 28px 6px; }

/* ===== Slides ===== */
#stage { flex: 1; position: relative; overflow: hidden; }
.slide { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; padding: 24px clamp(24px, 8vw, 110px); opacity: 0; transform: translateX(40px); transition: opacity .35s ease, transform .35s ease; pointer-events: none; overflow-y: auto; }
.slide.active { opacity: 1; transform: translateX(0); pointer-events: auto; }
.slide.exit-left { transform: translateX(-40px); }

.eyebrow { font-family: 'Space Grotesk', sans-serif; color: var(--neon-cyan); font-size: 12px; letter-spacing: .22em; text-transform: uppercase; margin-bottom: 18px; }
h1 { font-family: 'Space Grotesk', sans-serif; font-size: clamp(2rem, 5.4vw, 3.6rem); font-weight: 700; line-height: 1.08; margin-bottom: 22px; max-width: 16ch; }
h1 .hl { color: var(--neon-mint); }
.slide p { font-size: clamp(1rem, 1.7vw, 1.2rem); line-height: 1.65; color: #c6d9d6; max-width: 58ch; margin-bottom: 14px; }
.slide p strong { color: var(--soft-white); }

.badges { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 18px; }
.badge { font-family: 'Space Grotesk', sans-serif; font-size: 14px; padding: 9px 18px; border: 1px solid var(--neon-mint); border-radius: 999px; color: var(--neon-mint); }

.ribbon { position: absolute; right: -60px; bottom: -40px; width: 340px; height: 340px; opacity: .5; pointer-events: none; }
.ribbon path { fill: none; stroke-width: 2.5; stroke-linecap: round; stroke-dasharray: 900; stroke-dashoffset: 900; }
.slide.active .ribbon path { animation: draw 1.4s ease forwards; }
.slide.active .ribbon path:nth-child(2) { animation-delay: .15s; }
.slide.active .ribbon path:nth-child(3) { animation-delay: .3s; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) {
  .slide, .commit, .commit-edge { transition: none; }
  .slide.active .ribbon path { animation: none; stroke-dashoffset: 0; }
}

/* ===== Quiz ===== */
.quiz-options { display: flex; flex-direction: column; gap: 12px; margin-top: 8px; max-width: 560px; }
.quiz-option { text-align: left; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 15px 20px; color: var(--soft-white); font-size: 15px; font-family: 'Inter', sans-serif; cursor: pointer; transition: border-color .2s ease, box-shadow .2s ease; }
.quiz-option:hover:not(:disabled) { border-color: var(--neon-cyan); }
.quiz-option.correct { border-color: var(--neon-mint); box-shadow: var(--glow-mint); }
.quiz-option.wrong { border-color: #e05a5a; opacity: .55; }
.quiz-option:disabled { cursor: default; }
.quiz-feedback { margin-top: 16px; font-size: 14px; min-height: 22px; color: var(--neon-mint); }
.quiz-feedback.err { color: #e08585; }

/* ===== CTA / email ===== */
.cta-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 22px; align-items: center; }
.btn { font-family: 'Space Grotesk', sans-serif; font-size: 15px; font-weight: 500; padding: 13px 26px; border-radius: 999px; border: 1px solid var(--neon-mint); cursor: pointer; transition: box-shadow .2s ease, transform .2s ease; }
.btn-primary { background: var(--neon-mint); color: var(--ink-black); }
.btn-primary:hover { box-shadow: var(--glow-mint); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--neon-mint); }
.btn-ghost:hover { box-shadow: var(--glow-mint); }
#email-wrap { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }

/* ===== Footer nav ===== */
#nav { display: flex; justify-content: space-between; align-items: center; padding: 14px 28px 22px; }
.nav-btn { font-family: 'Space Grotesk', sans-serif; background: transparent; border: 1px solid var(--line); color: var(--soft-white); font-size: 14px; padding: 11px 22px; border-radius: 999px; cursor: pointer; transition: border-color .2s ease, box-shadow .2s ease; }
.nav-btn:hover:not(:disabled) { border-color: var(--neon-mint); box-shadow: var(--glow-mint); }
.nav-btn:disabled { opacity: .3; cursor: default; }
#nav-hint { font-size: 12px; color: var(--dim); }
button:focus-visible, .commit:focus-visible { outline: 2px solid var(--neon-cyan); outline-offset: 3px; }

@media (max-width: 640px) {
  #nav-hint { display: none; }
  .ribbon { width: 220px; height: 220px; opacity: .3; }
}
