.news-shell {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 0 0 5rem;
  color: #575757;
}

/* News landing page */
.news-index-page .news-hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: clamp(420px, 48vw, 610px);
  margin: 0 calc(50% - 50vw);
  padding: clamp(3rem, 7vw, 6rem) max(1rem, calc((100vw - 1180px) / 2));
  color: #FFFFFF;
  isolation: isolate;
  overflow: hidden;
  background-image:
    linear-gradient(90deg, rgba(22, 52, 153, .96) 0%, rgba(50, 102, 255, .88) 34%, rgba(50, 102, 255, .52) 58%, rgba(50, 102, 255, .12) 82%, rgba(50, 102, 255, .03) 100%),
    linear-gradient(180deg, rgba(0, 0, 0, .06) 0%, rgba(0, 0, 0, .18) 100%),
    url("./Joyful Tropical Swim Lesson.png");
  background-size: cover;
  background-position: center 44%;
  background-repeat: no-repeat;
}

.news-index-page .news-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(0deg, rgba(24, 64, 191, .18), transparent 38%);
  pointer-events: none;
}

.news-hero__content {
  width: min(620px, 100%);
  position: relative;
  z-index: 1;
}

.news-hero h1,
.news-article h1,
.news-section h2,
.news-lead-card h2,
.news-side-card h2,
.news-story-card h3,
.news-archive-row h3,
.news-year h2,
.news-card h3 {
  font-family: "Work Sans", sans-serif;
}

.news-hero h1,
.news-article h1 {
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.08;
  margin: .25rem 0 1rem;
}

.news-index-page .news-hero h1 {
  color: #FFFFFF;
}

.news-index-page .news-hero__summary {
  max-width: 760px;
  margin: 0;
  font-size: 1.125rem;
  line-height: 1.6;
}

.news-kicker {
  font-family: "Work Sans", sans-serif;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-size: .82rem;
  margin: 0;
}

.news-topic-nav {
  display: flex;
  gap: 1.4rem;
  overflow-x: auto;
  padding: .9rem 0;
  margin-bottom: 2rem;
  border-bottom: 1px solid rgba(87, 87, 87, .25);
  scrollbar-width: thin;
}

.news-topic-nav a {
  flex: 0 0 auto;
  color: #575757;
  font-family: "Work Sans", sans-serif;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.news-topic-nav a:hover,
.news-topic-nav a:focus-visible,
.news-lead-card a:hover,
.news-lead-card a:focus-visible,
.news-side-card a:hover,
.news-side-card a:focus-visible,
.news-story-card a:hover,
.news-story-card a:focus-visible,
.news-archive-row a:hover,
.news-archive-row a:focus-visible {
  color: #3266FF;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: .16em;
}

.news-feature {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
  gap: 1.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid rgba(87, 87, 87, .25);
}

.news-feature__secondary {
  display: grid;
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
}

.news-lead-card,
.news-side-card,
.news-story-card {
  min-width: 0;
  background: #FFFFFF;
}

.news-lead-card .news-card__image-link,
.news-side-card .news-card__image-link,
.news-story-card .news-card__image-link {
  display: block;
  overflow: hidden;
  background: #3266FF;
  color: #FFFFFF;
  text-decoration: none;
}

.news-lead-card .news-card__image-link {
  aspect-ratio: 16 / 9;
}

.news-side-card .news-card__image-link,
.news-story-card .news-card__image-link {
  aspect-ratio: 16 / 9;
}

.news-card__image-link img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform .25s ease;
}

.news-lead-card:hover .news-card__image-link img,
.news-side-card:hover .news-card__image-link img,
.news-story-card:hover .news-card__image-link img {
  transform: scale(1.025);
}

.news-card__image-placeholder {
  width: 100%;
  height: 100%;
  min-height: 160px;
  display: grid;
  place-items: center;
  background: #3266FF;
  color: #FFFFFF;
  font-family: "Work Sans", sans-serif;
  font-weight: 700;
  letter-spacing: .04em;
}

.news-lead-card__body {
  padding-top: 1rem;
}

.news-side-card__body,
.news-story-card__body {
  padding-top: .8rem;
}

.news-card__label {
  margin: 0 0 .45rem;
  color: #3266FF;
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .065em;
  text-transform: uppercase;
}

.news-lead-card h2 {
  max-width: 800px;
  margin: 0 0 .65rem;
  font-size: clamp(1.75rem, 3.2vw, 2.65rem);
  font-weight: 700;
  line-height: 1.08;
}

.news-side-card h2 {
  margin: 0 0 .55rem;
  font-size: clamp(1.2rem, 2vw, 1.5rem);
  font-weight: 700;
  line-height: 1.15;
}

.news-story-card h3 {
  margin: 0 0 .55rem;
  font-size: clamp(1.25rem, 2vw, 1.55rem);
  font-weight: 700;
  line-height: 1.16;
}

.news-lead-card h2 a,
.news-side-card h2 a,
.news-story-card h3 a,
.news-archive-row h3 a {
  color: #202020;
  text-decoration: none;
}

.news-card__excerpt {
  margin: 0 0 .75rem;
  line-height: 1.55;
}

.news-card__date {
  margin: 0;
  color: #575757;
  font-size: .86rem;
}

.news-section {
  margin-top: 3.25rem;
  scroll-margin-top: 6rem;
}

.news-section[hidden] {
  display: none;
}

.news-section__heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.2rem;
  padding-top: .8rem;
  border-top: 4px solid #3266FF;
}

.news-section__heading h2 {
  margin: 0;
  color: #202020;
  font-size: clamp(1.8rem, 3vw, 2.35rem);
  font-weight: 700;
  line-height: 1.1;
}

.news-section__heading p {
  margin: 0;
}

.news-story-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}

.news-story-card {
  border-bottom: 1px solid rgba(87, 87, 87, .25);
  padding-bottom: 1.25rem;
}

.news-loading {
  grid-column: 1 / -1;
  margin: .75rem 0;
}

.news-archive .news-section__heading {
  align-items: baseline;
}

.news-archive-year {
  border-top: 1px solid rgba(87, 87, 87, .3);
}

.news-archive-year:last-child {
  border-bottom: 1px solid rgba(87, 87, 87, .3);
}

.news-archive-year summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0;
  cursor: pointer;
  color: #202020;
  font-family: "Work Sans", sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
}

.news-archive-year summary:hover,
.news-archive-year summary:focus-visible {
  color: #3266FF;
}

.news-archive-year__count {
  color: #575757;
  font-family: inherit;
  font-size: .82rem;
  font-weight: 600;
}

.news-archive-year__list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 2rem;
  padding-bottom: 1rem;
}

.news-archive-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 116px;
  gap: 1rem;
  padding: 1rem 0;
  border-top: 1px solid rgba(87, 87, 87, .16);
}

.news-archive-row:has(.news-archive-row__body:only-child) {
  grid-template-columns: 1fr;
}

.news-archive-row h3 {
  margin: 0 0 .45rem;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.2;
}

.news-archive-row__image {
  display: block;
  align-self: start;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #3266FF;
}

.news-archive-row__image img,
.news-archive-row__image .news-card__image-placeholder {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 0;
}

.news-archive-row__image .news-card__image-placeholder span {
  font-size: .7rem;
}

/* Existing article-page styling */
.news-breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  margin: .25rem 0 2rem;
  font-size: .92rem;
}

.news-breadcrumbs a,
.news-article__footer a,
.news-article__body a {
  color: #3266FF;
}

.news-article {
  max-width: 900px;
  margin: 0 auto;
}

.news-article__header {
  padding: clamp(1.5rem, 5vw, 3.5rem) 0 1.5rem;
}

.news-article__header h1 {
  color: #575757;
}

.news-article__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .45rem;
}

.news-article__meta time {
  font-weight: 700;
}

.news-tag {
  display: inline-block;
  border-radius: 999px;
  background: #66F172;
  color: #202020;
  padding: .2rem .55rem;
  font-size: .78rem;
  font-weight: 700;
}

.news-article__hero-image {
  margin: 0 0 2rem;
}

.news-article__hero-image img,
.news-article__body img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: .75rem;
}

.news-article__body {
  max-width: 780px;
  min-width: 0;
  font-size: 1.05rem;
  line-height: 1.75;
  overflow-wrap: anywhere;
}

.news-article__body h2 {
  font-family: "Work Sans", sans-serif;
  font-size: clamp(2rem, 4vw, 2.625rem);
  font-weight: 700;
  line-height: 1.15;
  margin: 2.2rem 0 1rem;
}

.news-article__body h3 {
  font-family: "Work Sans", sans-serif;
  font-size: clamp(1.5rem, 3vw, 1.875rem);
  font-weight: 700;
  line-height: 1.2;
  margin: 1.8rem 0 .8rem;
}

.news-article__body figure {
  margin: 1.8rem 0;
}

.news-article__body figcaption {
  font-size: .9rem;
  line-height: 1.4;
  margin-top: .5rem;
}

.news-article__body iframe,
.news-article__body video {
  width: 100%;
  max-width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
}

.news-article__body pre {
  max-width: 100%;
  overflow-x: auto;
  white-space: pre;
}

.news-article__body blockquote {
  border-left: 5px solid #66F172;
  margin: 1.5rem 0;
  padding: .25rem 0 .25rem 1.25rem;
}

.news-article__body table {
  width: 100%;
  border-collapse: collapse;
  display: block;
  overflow-x: auto;
}

.news-article__body th,
.news-article__body td {
  border: 1px solid rgba(87, 87, 87, .25);
  padding: .6rem;
}

.news-article__footer {
  border-top: 1px solid rgba(87, 87, 87, .2);
  margin-top: 3rem;
  padding-top: 1.25rem;
  font-weight: 700;
}

/* Compatibility for a previously generated index */
.news-year-nav {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin: 0 0 2.5rem;
}

.news-year-nav a {
  border: 2px solid #3266FF;
  border-radius: 999px;
  padding: .45rem .8rem;
  color: #3266FF;
  text-decoration: none;
  font-weight: 700;
}

.news-year {
  margin: 3rem 0 4rem;
  scroll-margin-top: 6rem;
}

.news-year h2 {
  font-size: clamp(2rem, 4vw, 2.625rem);
  font-weight: 700;
  color: #575757;
  margin-bottom: 1.25rem;
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}

.news-card {
  border: 1px solid rgba(87, 87, 87, .2);
  border-radius: 1rem;
  padding: 1.4rem;
  background: #FFFFFF;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.news-card h3 {
  font-size: clamp(1.5rem, 3vw, 1.875rem);
  font-weight: 700;
  line-height: 1.15;
  margin: .4rem 0 .8rem;
}

.news-card h3 a,
.news-card__link a {
  color: #3266FF;
}

.news-card__tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .45rem;
  margin-top: auto;
  padding-top: .8rem;
}

.news-card__link {
  margin-bottom: 0;
  font-weight: 700;
}

@media (max-width: 900px) {

  .news-feature {
    grid-template-columns: 1fr;
  }

  .news-feature__secondary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: none;
  }

  .news-story-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .news-archive-year__list {
    grid-template-columns: 1fr;
  }

  .news-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .news-shell {
    width: min(100% - 1.25rem, 1180px);
  }

  .news-index-page .news-hero {
    min-height: 500px;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    padding-left: 1rem;
    padding-right: 1rem;
    background-image:
      linear-gradient(180deg, rgba(22, 52, 153, .90) 0%, rgba(50, 102, 255, .70) 48%, rgba(22, 52, 153, .58) 100%),
      url("./Joyful Tropical Swim Lesson.png");
    background-position: 58% center;
  }


  .news-topic-nav {
    margin-bottom: 1.5rem;
  }

  .news-feature__secondary,
  .news-story-grid,
  .news-grid {
    grid-template-columns: 1fr;
  }

  .news-feature,
  .news-feature__secondary {
    gap: 1.75rem;
  }

  .news-lead-card h2 {
    font-size: clamp(1.75rem, 8vw, 2.25rem);
  }

  .news-section {
    margin-top: 2.5rem;
  }

  .news-section__heading,
  .news-archive .news-section__heading {
    display: block;
  }

  .news-section__heading p {
    margin-top: .45rem;
  }

  .news-archive-row {
    grid-template-columns: minmax(0, 1fr) 96px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .news-card__image-link img {
    transition: none;
  }

  .news-lead-card:hover .news-card__image-link img,
  .news-side-card:hover .news-card__image-link img,
  .news-story-card:hover .news-card__image-link img {
    transform: none;
  }
}
