/* Keep illustration and copy in separate tracks on editorial story cards. */
.archive-page .archive-grid .story-card,
.three-column > .story-card,
.three-column > .story-card:first-child,
.three-column > .story-card:last-child {
  grid-template-columns: minmax(0, 1fr) minmax(0, .45fr);
  column-gap: 16px;
}

.featured-grid .story-card {
  grid-template-columns: minmax(0, 1fr) minmax(0, .66fr);
  column-gap: 20px;
}

.archive-page .archive-grid .story-card > .story-copy,
.featured-grid .story-card > .story-copy,
.three-column .story-card > .story-copy {
  min-width: 0;
}

.archive-page .archive-grid .story-card > .story-copy:only-child,
.featured-grid .story-card > .story-copy:only-child,
.three-column .story-card > .story-copy:only-child {
  grid-column: 1 / -1;
}

.archive-page .archive-grid .story-card > .story-art,
.featured-grid .story-card > .story-art,
.three-column .story-card > .story-art {
  position: static;
  inset: auto;
  align-self: center;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  height: auto;
  margin: 0;
}

.archive-page .archive-grid .story-card .story-art img,
.featured-grid .story-card .story-art img,
.three-column .story-card .story-art img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  object-fit: contain;
}

.archive-page .archive-grid .story-card .story-copy :is(h2, h3),
.featured-grid .story-card .story-copy :is(h2, h3),
.three-column .story-card .story-copy :is(h2, h3) {
  width: 100%;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.archive-page .archive-grid .story-card .story-copy p,
.featured-grid .story-card .story-copy p,
.three-column .story-card .story-copy p {
  max-width: 100%;
  overflow-wrap: anywhere;
}

.archive-page .archive-grid .story-card .read-link,
.featured-grid .story-card .read-link,
.three-column .story-card .read-link {
  max-width: 100%;
  white-space: normal;
}

.archive-page .archive-grid .story-card .read-link svg,
.featured-grid .story-card .read-link svg,
.three-column .story-card .read-link svg {
  flex-shrink: 0;
}

/* Reflow the outer archive before three cards become too narrow. */
@media (min-width: 701px) and (max-width: 1050px) {
  .archive-page .archive-grid,
  .three-column {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .archive-page .archive-grid .story-card,
  .three-column > .story-card {
    padding-inline: 18px;
    border-right: 1px solid var(--rule);
  }
  .archive-page .archive-grid .story-card:nth-child(2n + 1),
  .three-column > .story-card:nth-child(2n + 1) {
    padding-left: 0;
  }
  .archive-page .archive-grid .story-card:nth-child(2n),
  .three-column > .story-card:nth-child(2n) {
    padding-right: 0;
    border-right: 0;
  }
}

@media (min-width: 701px) and (max-width: 900px) {
  .featured-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .featured-grid > .story-lead {
    min-height: 0;
    padding: 0 0 20px;
    border-right: 0;
    border-bottom: 1px solid var(--rule);
  }
  .featured-grid .side-stories {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 20px 0 0;
  }
  .featured-grid .story-side {
    min-height: 0;
    margin: 0;
    padding: 0 18px 0 0;
    border-top: 0;
  }
  .featured-grid .story-side + .story-side {
    padding: 0 0 0 18px;
    border-left: 1px solid var(--rule);
  }
}

@media (max-width: 700px) {
  .home-hero > .hero-illustration {
    width: 100%;
    max-width: 100%;
    margin-inline: 0;
  }
  .archive-page .archive-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .archive-page .archive-grid .story-card {
    padding-inline: 0;
    border-right: 0;
  }
  .featured-grid .story-card {
    column-gap: 16px;
  }
}

/* More articles is a repeating grid: give every row the same gutters.
   Section rules carry the newspaper layout without boxing each story in. */
@media (min-width: 701px) {
  .three-column {
    gap: 40px 36px;
    padding: 24px 0 40px;
  }

  .three-column > .story-card:nth-child(n) {
    padding: 0;
    border: 0;
    min-height: 0;
  }
}

@media (max-width: 700px) {
  .three-column > .story-card:nth-child(n) {
    padding-block: 24px;
    min-height: 0;
  }
}
