/* The follow-along experience — XKCD edition. The stage is a comic panel,
   the radio is a hand-drawn box, and the count digit is scrawled huge like
   the punchline. Everything from the navbar to the bottom of the panels is
   budgeted to fit above the fold on a ~740px-tall viewport, so the hero is
   deliberately compact. */
main { padding-block-start: 0.7rem; }
.hero { margin-block: 0; }
.hero .kicker { margin-block: 0 0.15rem; }
.hero h1 {
  font-size: clamp(1.5rem, 1.1rem + 1.5vw, 2.4rem);
  margin-block: 0 0.35rem;
}
.hero .answer-lead {
  font-size: 1rem;
  margin-block: 0;
  max-width: 62rem;
  color: var(--text-dim);
}

.experience {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 1.2rem;
  align-items: stretch;
  margin-block: 0.9rem 3rem;
}
@media (max-width: 760px) {
  .experience { grid-template-columns: 1fr; }
}

/* comic panel */
.stage {
  position: relative;
  background: var(--bg);
  border: var(--stroke) solid var(--ink);
  border-radius: var(--wobble);
  padding: 0.8rem;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  align-items: center;
  min-block-size: 14rem;
}
.figure-svg { inline-size: 100%; max-block-size: min(46vh, 27rem); display: block; }

.count-col {
  text-align: center;
  padding-inline: 0.5rem;
  max-inline-size: clamp(7rem, 38%, 18rem);
}
.movement-label { overflow-wrap: break-word; }
#count-digit {
  font-family: var(--font-display);
  font-size: clamp(4rem, 14vw, 10.5rem);
  line-height: 0.9;
  color: var(--accent);
  display: block;
  min-inline-size: 1.2em;
  min-block-size: 1em; /* reserve space while empty so the first count doesn't shift layout */
  transform: rotate(-2deg);
}
#count-digit.pulse { animation: count-pulse 0.28s ease-out; }
@keyframes count-pulse {
  0% { transform: rotate(-2deg) scale(1.18); }
  100% { transform: rotate(-2deg) scale(1); }
}
.movement-label { margin-block-start: 0.4rem; }
#movement-name { font-family: var(--font-display); font-size: 1.15rem; display: block; }
#movement-num { font-family: var(--font-display); color: var(--text-dim); font-size: 0.95rem; }

/* ---------- the radio (a box someone drew) ---------- */
.radio-panel {
  background: var(--bg);
  border: var(--stroke) solid var(--ink);
  border-radius: var(--wobble-2);
  padding: 0.9rem 1.2rem 1.1rem;
  color: var(--text);
  position: relative;
  align-self: start;
}
.radio-panel .kicker { color: var(--text-dim); }

/* the speaker IS the mute toggle: red slash through it = muted (the default) */
.speaker-doodle {
  position: absolute; inset-block-start: 0.9rem; inset-inline-end: 1rem;
  color: var(--text-dim);
  background: none; border: none; padding: 0.35rem; cursor: pointer;
  border-radius: 8px;
}
.speaker-doodle:hover { color: var(--text); }
.mute-slash { stroke: var(--accent); stroke-width: 3; }
.radio-on .mute-slash { display: none; }
.radio-on .speaker-doodle { color: var(--text); }

/* routine toggle: No. 1 (default) / No. 2 — drawn like the old preset keys */
.routine-toggle {
  display: inline-flex; border: var(--stroke) solid var(--ink);
  border-radius: var(--wobble-2); overflow: hidden; margin-block-start: 0.4rem;
}
.routine-toggle button {
  background: transparent; color: var(--text); border: none; cursor: pointer;
  padding: 0.3rem 0.85rem; font-size: 1rem; font-family: var(--font-display);
}
.routine-toggle button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }

/* the dial gets its own hand-drawn frame, like the glass window on a set */
.dial-frame {
  border: var(--stroke) solid var(--ink);
  border-radius: var(--wobble);
  padding: 0.5rem 0.6rem 0.2rem;
  margin-block: 0.7rem 0.9rem;
}
#dial { inline-size: 100%; display: block; cursor: pointer; touch-action: none; border-radius: 8px; }
#dial:focus-visible { outline: var(--stroke) dashed var(--focus); }
#dial-stations circle { fill: var(--text-dim); transition: fill 0.2s; }
#dial-stations circle.active { fill: var(--accent); }
#dial .dial-strip { fill: none; stroke: var(--ink); stroke-width: 2; }
#dial-needle { stroke: var(--accent); stroke-width: 3; stroke-linecap: round; }
#dial text { fill: var(--text-dim); font-family: var(--font-display); font-size: 13px; }

.transport { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
#play-btn { font-size: 1.15rem; flex-shrink: 0; }
#play-btn .play-glyph { inline-size: 0.9rem; }

#tempo-wrap { display: flex; align-items: center; gap: 0.5rem; font-size: 1rem; flex: 1; min-inline-size: 10rem; }
#tempo-slider { accent-color: var(--accent); flex: 1; min-inline-size: 5rem; }
#tempo-value { font-family: var(--font-display); min-inline-size: 3.2em; }

#complete-banner {
  margin-block-start: 1rem;
  border: var(--stroke) solid var(--accent);
  border-radius: var(--wobble);
  padding: 0.9rem 1.1rem;
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
}
#stamp-seal {
  inline-size: 3rem; block-size: 3rem; border: var(--stroke) solid var(--stamp);
  border-radius: 48% 52% 55% 45% / 52% 48% 45% 55%;
  display: grid; place-items: center; color: var(--stamp);
  font-family: var(--font-display); font-size: 1.5rem;
  transform: rotate(-10deg);
}
.support-line { flex-basis: 100%; font-size: 0.92rem; color: var(--text-dim); }
.sponsor-line { font-size: 0.9rem; color: var(--text-dim); margin-block: 0.2rem 0; font-style: italic; }
#stamp-seal.stamped { animation: stamp-in 0.35s cubic-bezier(0.2, 1.6, 0.4, 1); }
@keyframes stamp-in {
  0% { transform: rotate(-10deg) scale(2.2); opacity: 0; }
  100% { transform: rotate(-10deg) scale(1); opacity: 1; }
}

/* how-to steps: numbered by hand, circled */
.how-steps { list-style: none; padding: 0; counter-reset: step; max-width: 46rem; }
.how-steps li {
  counter-increment: step; position: relative;
  padding-inline-start: 3.2rem; margin-block: 1rem;
}
.how-steps li::before {
  content: counter(step);
  position: absolute; inset-inline-start: 0; inset-block-start: 0;
  inline-size: 2.2rem; block-size: 2.2rem;
  border-radius: 50% 46% 54% 48% / 47% 53% 46% 54%;
  display: grid; place-items: center;
  background: var(--bg); border: var(--stroke) solid var(--ink); color: var(--text);
  font-family: var(--font-display); font-size: 1.15rem;
}
.how-steps li:nth-child(even)::before { transform: rotate(4deg); }

@media (prefers-reduced-motion: reduce) {
  #count-digit.pulse { animation: none; }
  #stamp-seal.stamped { animation: none; }
  #power-btn, #power-btn .knob-line { transition: none; }
}

@media (min-width: 1600px) {
  .experience { gap: 2.5rem; }
  .stage { min-block-size: 26rem; }
}
