.walkthrough-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem 1.35rem;
}
#walkthrough-play {
  padding: 0.5rem 0.9rem;
  border: 1px solid var(--rule);
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-size: 1.08rem;
  line-height: 1.2;
}
#walkthrough-play:hover {
  color: var(--rust);
  border-color: currentColor;
}
/* Reserve no space until the SVG document is ready. It can load while the
   three ordinary images and their captions are available to the reader. */
#walkthrough-stage {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  visibility: hidden;
}
#walkthrough-film {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  pointer-events: none;
}
.walkthrough[data-playback] #walkthrough-stage {
  position: relative;
  visibility: visible;
  width: 100%;
  height: auto;
  aspect-ratio: 960 / 216;
}
.walkthrough[data-playback] #walkthrough-film {
  position: absolute;
  inset: 0;
}
.walkthrough[data-playback] .walkthrough-steps img {
  display: none;
}
.walkthrough[data-playback] .walkthrough-steps li[data-current] h3 {
  color: var(--rust);
}
#walkthrough-chapters {
  display: none;
}
@media (max-width: 920px) {
  .walkthrough[data-playback] #walkthrough-stage {
    width: min(100%, 28rem);
    aspect-ratio: 320 / 216;
    margin-inline: auto;
  }
  #walkthrough-chapters:not([hidden]) {
    display: flex;
    gap: clamp(0.8rem, 4vw, 2rem);
    justify-content: center;
    margin: 0.8rem auto 1.5rem;
  }
  #walkthrough-chapters button {
    border: 0;
    border-bottom: 2px solid transparent;
    background: transparent;
    padding: 0.45rem 0.12rem;
    color: var(--quiet);
    font: inherit;
    font-size: 1.06rem;
  }
  #walkthrough-chapters button[aria-pressed="true"] {
    border-color: var(--rust);
    color: var(--ink);
  }
  /* Overlap the captions in a single grid cell so the longest caption sets
     the height. Playing or stepping through the film never moves the page. */
  .walkthrough[data-playback] .walkthrough-steps {
    max-width: 36rem;
    margin-inline: auto;
    gap: 0;
  }
  .walkthrough[data-playback] .walkthrough-steps li {
    grid-area: 1 / 1;
    display: block;
    border: 0;
    padding: 0;
    visibility: hidden;
  }
  .walkthrough[data-playback] .walkthrough-steps li[data-current] {
    visibility: visible;
  }
  .walkthrough[data-playback] .walkthrough-steps h3 {
    margin-top: 0;
  }
}
