/* 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. */
.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: 12svh; bottom: 12svh; width: 1px; background: var(--rule); }
ol.steps::after { background: var(--ink); transform-origin: top; transform: scaleY(var(--p, 0)); }
ol.steps > li { min-height: 80svh; display: flex; align-items: center; min-width: 0; }
ol.steps .txt { min-width: 0; width: 100%; opacity: .4; transition: opacity .4s cubic-bezier(.4, 0, .2, 1); }
ol.steps > li.on .txt { opacity: 1; }
ol.steps strong { font-weight: 500; }
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; }

@media (max-width: 900px) {
  .walk { display: block; }
  .stage { position: sticky; top: 0; z-index: 1; height: 42svh; aspect-ratio: auto; margin-inline: -6px; }
  ol.steps { padding-left: 20px; }
  ol.steps::before, ol.steps::after { top: 8svh; bottom: 8svh; }
  ol.steps > li { min-height: 70svh; }
}

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