/* An embedded walkthrough (src/assets/walkthroughs/*), loaded only on the post that embeds one.
   Three modes, set by walkthrough-embed.js from the room the page has:
   - wide: the frame leaves the text column and spans the free width between the series nav and the right column,
     up to the walkthrough's desktop width, so every scene shows whole;
   - poster: on a desktop page with too little free width for whole scenes, a still of one step that opens the
     walkthrough full screen; never a narrow live frame with cut-off scenes;
   - narrow: on a phone, the live frame in its narrow layout (the scene scrolls sideways inside it), with a hint and a
     full-screen button.
   The markup starts in poster mode (scripts/walkthrough.cjs), so without JavaScript a reader gets the poster and the
   steps as text. The caption's live line (Next, arrow keys) shows in wide and narrow; in poster mode, where nothing in
   the picture can be pressed, the still line says to open it to step through instead, and a line names which step of
   the walkthrough the poster is (its own drawing, not the post's numbered steps). The whole poster is the link
   that opens the walkthrough (target="_top"), with a visible focus ring.
   The walkthrough itself is dark on any theme; the frame is drawn with the site's border token. */
.walkthrough-embed { margin: var(--space-xl) 0; }
.walkthrough-embed iframe,
.walkthrough-embed__poster img {
  display: block;
  width: 100%;
  border: 1px solid var(--color-border);
  border-radius: 0.75rem;
}
.walkthrough-embed__poster { display: none; text-decoration: none; }
.walkthrough-embed__poster img { height: auto; }
.walkthrough-embed__poster:focus-visible { outline: none; }
.walkthrough-embed__poster:focus-visible img { outline: 3px solid var(--color-accent); outline-offset: 3px; }
.walkthrough-embed__open:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
.walkthrough-embed[data-mode="poster"] iframe { display: none; }
.walkthrough-embed[data-mode="poster"] .walkthrough-embed__poster { display: block; }
.walkthrough-embed__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-sm);
  margin-top: var(--space-sm);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}
.walkthrough-embed__open {
  display: inline-flex;
  align-items: center;
  padding: var(--space-xs) var(--space-md);
  border: 1px solid var(--color-accent);
  border-radius: 999rem;
  color: var(--color-accent);
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  text-decoration: none;
}
.walkthrough-embed__open:hover { background: var(--color-accent-light); }
.walkthrough-embed__hint { display: none; }
.walkthrough-embed[data-mode="narrow"] .walkthrough-embed__hint { display: inline; }
.walkthrough-embed__still,
.walkthrough-embed__from { display: none; }
.walkthrough-embed[data-mode="poster"] .walkthrough-embed__still,
.walkthrough-embed[data-mode="poster"] .walkthrough-embed__from { display: inline; }
.walkthrough-embed[data-mode="poster"] .walkthrough-embed__live { display: none; }
