/* Use the tallest testimonial to reserve space above the carousel controls. */
#storyStage {
  display: grid;
  height: auto;
  grid-template-columns: minmax(0, 1fr);
  justify-items: start;
  padding-bottom: 80px;
}

#storyStage > .storyCard {
  position: relative;
  grid-area: 1 / 1;
  min-width: 0;
  overflow-wrap: anywhere;
}

.storyCard blockquote + blockquote {
  margin-top: -15px;
}

@media (max-width: 680px) {
  #storyStage {
    padding-bottom: 55px;
  }

  .storyCard blockquote,
  .featureCardContent > p:nth-of-type(2) {
    font-size: 16px;
  }

  .storyCard blockquote + blockquote {
    margin-top: -8px;
  }
}

/* A short, wide viewport cannot fit a pinned feature card below the header. */
@media (max-height: 560px) {
  .featureCard {
    position: relative;
    top: auto;
  }
}

/* Reserve a final scroll interval so the sixth card can settle like the first five. */
.featureStack {
  --card-inset: 92px;
  padding-bottom: 0;
}
.featureStack::after {
  content: "";
  min-height: max(72px, 10svh);
}
@media (max-width: 1040px) {
  .featureStack { --card-inset: 112px; }
}
@media (max-width: 680px) {
  .featureStack { --card-inset: 72px; }
}
@media (prefers-reduced-motion: no-preference) {
  .featureStack > .featureCard {
    position: sticky;
    top: min(var(--card-inset), calc(100svh - var(--card-height, 0px) - 12px));
  }
}
@media (prefers-reduced-motion: reduce) {
  .featureStack { gap: 24px; }
  .featureStack::after { display: none; }
  .featureStack > .featureCard { position: relative; top: auto; }
}

/* Keep the consultation link below the stack, including while the final card releases. */
.featureStack + .courseCampaign {
  margin-top: clamp(32px, 5svh, 64px);
}

/* The approved Wang Yu portrait has a white studio background. */
.teacher-t107 #tcard img {
  filter: none;
  mix-blend-mode: multiply;
}
