/* Three steps: the steps scroll on the left (5 of 12 columns), one sticky plate on the right (7 columns) shows the active
   step's figure. steps.js marks the active step and swaps the figure. At 900 px and under there is no sticky plate:
   each step shows its own figure (.pfig) above its text. */
.walk { margin-top: 28px; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--col-gap); }

ol.steps { grid-column: 1 / 6; grid-row: 1; list-style: none; position: relative; padding-left: 28px; }
/* the progress line: a faint track and an ink fill that follows the scroll (steps.js sets --p) */
ol.steps::before, ol.steps::after { content: ''; position: absolute; left: 0; top: 4px; bottom: 4px; width: 1px; background: var(--rule); }
ol.steps::after { background: var(--ink); transform-origin: top; transform: scaleY(var(--p, 0)); }
ol.steps > li { min-height: 56svh; min-width: 0; padding-bottom: 40px; }
ol.steps > li:last-child { min-height: 0; padding-bottom: 0; }
ol.steps .txt { min-width: 0; width: 100%; }
/* a step not yet reached stays readable: only its lead-in drops from ink to the soft grey */
ol.steps strong { font-weight: 500; color: var(--soft); transition: color .4s cubic-bezier(.4, 0, .2, 1); }
ol.steps > li.on strong { color: var(--ink); }
ol.steps .line { color: var(--soft); }
ol.steps .cmd, .prompts { margin-top: 14px; }
ol.steps .cmd code { white-space: normal; overflow-wrap: anywhere; }
ol.steps .note { margin-top: 10px; }
.prompts { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.prompts .cmd { margin-top: 0; }

/* the sticky plate: crop marks, and one .win layer per loaded figure (at most two) stacked inside */
.stage { grid-column: 6 / 13; grid-row: 1; align-self: start; position: sticky; top: max(24px, calc(50svh - 0.375 * min(56vw, 640px)));
  aspect-ratio: 4 / 3; background: var(--bg); }
.stage .win { opacity: 0; transform: scale(.98); filter: blur(4px);
  transition: opacity .4s cubic-bezier(.4, 0, .2, 1), transform .4s cubic-bezier(.4, 0, .2, 1), filter .4s cubic-bezier(.4, 0, .2, 1);
  background: radial-gradient(circle, var(--rule-2) 2px, transparent 2.5px) center no-repeat; }
.stage .win.in { opacity: 1; transform: none; filter: none; }
.stage .win iframe { transition: none; }
/* until a figure is live the dot shows; once it is, the iframe covers it */
.stage .win.ready { background: none; }

/* a step's own figure, for phones */
.pfig { display: none; position: relative; aspect-ratio: 4 / 3; margin: 0 0 16px; }

@media (max-width: 900px) {
  .walk { display: block; }
  .stage { display: none; }
  .pfig { display: block; }
  ol.steps { padding-left: 20px; }
  ol.steps > li { min-height: 0; padding-bottom: 48px; }
  ol.steps > li:last-child { padding-bottom: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .stage .win { transform: none; filter: none; transition: opacity .2s linear; }
  ol.steps strong { transition: color .2s linear; }
}
