.story-page {
  --story-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  --story-gap: clamp(23px, 2.9vw, 43px);
  padding-block-end: clamp(44px, 6vw, 88px);
}

.story-intro {
  padding-block: clamp(31px, 3.35vw, 51px) clamp(23px, 2.45vw, 36px);
}
.story-intro h1 {
  font-size: clamp(34px, 4.1vw, 54px);
  line-height: 1.03;
}
.story-intro p {
  max-inline-size: 62ch;
  margin-block-start: .48em;
  font-size: 17px;
  line-height: 1.38;
}

.story-layout[data-enhanced] {
  display: grid;
  grid-template-columns: var(--story-columns);
  align-items: start;
  gap: var(--story-gap);
}

.story-stage {

  min-inline-size: 0;

}
.story-layout[data-enhanced] .story-stage {
  position: sticky;
  z-index: 1;
  top: 18px;
}

.story-stage__frames, .story-chapter__photo {
  position: relative;
  inline-size: 100%;
  overflow: clip;
  aspect-ratio: 8 / 5;
  max-block-size: min(54svh, 562px);
  border-radius: var(--radius-lg);
  background: var(--soft);
}
.story-frame {
  position: absolute;
  inset: 0;
}
.story-frame img, .story-chapter__photo img {
  inline-size: 100%;
  block-size: 100%;
  object-fit: cover;
  object-position: center;
}
.story-caption {
  position: absolute;
  inset: auto auto 12px 12px;
  padding: 5px 10px;
  border-radius: 8px;
  background: var(--surface);
  color: var(--pine);
  font-size: 13px;
  font-weight: 750;
  line-height: 1.24;
}

.story-nav {

  margin-block: 7px 17px;

}
.story-layout[data-enhanced] .story-nav {
  margin-block-end: 0;
}
.story-nav ol {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.story-nav a {
  position: relative;
  display: grid;
  place-items: center;
  min-block-size: 53px;
  padding: 8px 3px 12px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.16;
  text-align: center;
  text-decoration: none;
}
.story-nav a::after {
  position: absolute;
  inset: auto 0 0;
  block-size: 4px;
  border-radius: 4px;
  background: var(--selected);
  content: '';
}
.story-nav a[aria-current="step"] {
  color: var(--moss);
}
.story-nav a[aria-current="step"]::after {
  background: var(--moss);
}

.story-chapter {
  position: relative;
  display: grid;
  grid-template: 'photo copy' auto / var(--story-columns);
  gap: var(--story-gap);
  padding-block-end: clamp(28px, 4vw, 59px);
  scroll-margin-block-start: 20px;
}
.story-layout[data-enhanced] .story-chapter {
  display: block;
  min-block-size: clamp(340px, 55svh, 480px);
}
.story-chapter__copy {
  grid-area: copy;
  min-inline-size: 0;
  padding-block-start: clamp(32px, 7svh, 78px);
}
.story-chapter__photo {
  grid-area: photo;
}
.story-layout[data-enhanced] .story-chapter__photo {
  position: absolute;
  inset-block-start: 0;
  inline-size: 1px;
  block-size: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
.story-chapter__count {
  margin-block-end: .57em;
  font-size: clamp(15px, 1.48vw, 22px);
  font-weight: 600;
  line-height: 1.25;
}
.story-chapter h2 {
  font-size: clamp(28px, 2.8vw, 38px);
  line-height: 1.03;
  overflow-wrap: break-word;
}
.story-chapter:focus-visible {
  outline: none;
}
.story-chapter:focus-visible h2 {
  inline-size: fit-content;
  max-inline-size: 100%;
  border-radius: 3px;
  outline: 2px solid var(--focus);
  outline-offset: 5px;
}
.story-chapter__text {
  max-inline-size: 35ch;
  margin-block-start: clamp(13px, 1.75vw, 26px);
  font-size: 17px;
  line-height: 1.7;
}

.story-outro {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 15px 28px;
  margin-block-start: clamp(17px, 3vw, 44px);
  padding: clamp(20px, 3.2vw, 48px);
  border-radius: var(--radius-lg);
  background: var(--sage);
}
.story-outro h2 {
  font-size: clamp(26px, 2.5vw, 34px);
}
.story-sources {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 14px;
  margin-block-start: 18px;
  color: var(--muted);
  font-size: 14px;
}
.story-sources span {
  font-weight: 600;
}
.story-sources ul {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.story-sources a {
  text-underline-offset: .23em;
}

@media (hover: hover) and (pointer: fine) {
  .story-nav a:hover {
    color: var(--moss);
  }
  .story-nav a:hover::after {
    background: var(--strong-rule);
  }
  .story-nav a[aria-current="step"]:hover::after {
    background: var(--moss);
  }
}

@media (max-width: 760px) {
  .story-layout[data-enhanced] {
    display: block;
  }

  .story-layout[data-enhanced] .story-stage {
    top: 0;
    padding-block: 8px;
    background: var(--paper);
  }
  .story-stage__frames {
    block-size: min(36svh, 282px);
    border-radius: var(--radius);
  }
  .story-nav {
    margin-block: 3px 16px;
  }
  .story-nav ol {
    gap: 4px;
  }
  .story-nav a {
    min-block-size: 44px;
    padding: 6px 0 9px;
    font-size: clamp(12px, 3.2vw, 16px);
  }

  .story-chapter {
    grid-template: 'copy' auto 'photo' auto / minmax(0, 1fr);
    gap: 15px;
  }
  .story-layout[data-enhanced] .story-chapter {
    min-block-size: max(200px, calc((100svh - var(--story-stage-height, 290px)) * .62));
    scroll-margin-block-start: calc(var(--story-stage-height, 290px) + 12px);
  }
  .story-chapter__copy {
    padding-block-start: clamp(17px, 3.4svh, 33px);
  }
  .story-chapter__photo, .story-outro {
    border-radius: var(--radius);
  }
  .story-caption {
    inset: auto auto 8px 8px;
    font-size: 12px;
  }
  .story-chapter h2 {
    font-size: 30px;
  }
}
