/* Demo video with chapters. Used on the home page and the guide. */
.walkthrough {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 290px;
  grid-template-areas: "stage chapters" "caption chapters";
  gap: 0 var(--s-300);
  padding: var(--s-200);
  border: 1px solid var(--line);
  border-radius: var(--r-3xl, 24px);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.wt-stage {
  grid-area: stage;
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--r-xl, 16px);
  background: #0f3d47;
}

.wt-video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #0f3d47;
}

.wt-fallback {
  display: block;
  width: 100%;
  height: auto;
}

.wt-big-play {
  position: absolute;
  left: 50%;
  top: 50%;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  border: 0;
  border-radius: var(--r-full);
  background: var(--ink);
  color: #fff;
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transform: translate(-50%, -50%);
  box-shadow: 0 12px 30px rgba(15, 40, 45, .32);
  transition: transform 200ms var(--ease), background-color 200ms var(--ease);
}

.wt-big-play i {
  font-size: 1.7rem;
}

.wt-big-play:hover {
  background: var(--accent-hover, var(--ink));
  transform: translate(-50%, -50%) scale(1.04);
}

.walkthrough.started .wt-big-play {
  display: none;
}

.wt-caption {
  grid-area: caption;
  padding: var(--s-200) var(--s-50) var(--s-50);
}

.wt-step {
  display: inline-block;
  padding: 2px 10px;
  border-radius: var(--r-full);
  background: var(--terra-soft, #fde7dc);
  color: var(--terra, #854529);
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.wt-title {
  margin: 8px 0 4px;
  font-size: 1.25rem;
  line-height: 1.3;
}

.wt-text {
  margin: 0;
  max-width: 70ch;
  color: var(--ink-2);
  line-height: 1.55;
}

.wt-chapters {
  grid-area: chapters;
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.wt-chapter {
  display: grid;
  grid-template-columns: 4.4em minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 8px;
  width: 100%;
  padding: 9px 12px;
  border: 0;
  border-radius: var(--r-lg);
  background: none;
  color: var(--ink-2);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.wt-chapter:hover {
  background: var(--surface-2);
}

.wt-chapter.on {
  background: var(--accent-soft);
  color: var(--ink);
}

.wt-chapter-step {
  color: var(--mute);
  font-size: .6875rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.wt-chapter-title {
  font-size: .9375rem;
  font-weight: 500;
}

.wt-chapter-time {
  color: var(--mute);
  font-size: .75rem;
  font-variant-numeric: tabular-nums;
}

/* Narrow screens and the guide's narrow column: video first, chapters as a scrolling row. */
@media (max-width: 900px) {
  .walkthrough {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "stage" "caption" "chapters";
    padding: var(--s-100);
  }

  .wt-big-play span {
    display: none;
  }
}

.guide-video .walkthrough {
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "stage" "caption" "chapters";
  padding: var(--s-100);
}

@media (max-width: 900px) {
  .wt-chapters {
    flex-direction: row;
    gap: 6px;
    margin-top: var(--s-100);
    overflow-x: auto;
    scrollbar-width: none;
  }

  .wt-chapter {
    display: flex;
    flex-direction: column;
    gap: 0;
    width: auto;
    white-space: nowrap;
    border: 1px solid var(--line);
  }

  .wt-chapter-time {
    display: none;
  }
}

.guide-video .wt-chapters {
  flex-direction: row;
  gap: 6px;
  margin-top: var(--s-100);
  overflow-x: auto;
  scrollbar-width: none;
}

.guide-video .wt-chapter {
  display: flex;
  flex-direction: column;
  gap: 0;
  width: auto;
  white-space: nowrap;
  border: 1px solid var(--line);
}

.guide-video .wt-chapter-time {
  display: none;
}

.guide-video {
  margin-bottom: var(--s-300);
}

@media (prefers-reduced-motion: reduce) {
  .wt-big-play {
    transition: none;
  }
}

/* Guide: a screenshot under each step */
.guide-steps .guide-shot {
  display: block;
  width: 100%;
  height: auto;
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-xl, 16px);
}

.guide-steps .guide-shot + .guide-shot {
  margin-top: var(--s-100);
}

.guide-steps li > div {
  min-width: 0;
}
