/* Final editorial landing-page system and whole-site content polish. */

.editorial-introduction {
  max-width: 62rem;
  margin-block: clamp(2rem, 5vw, 4rem);
  padding: clamp(1.5rem, 4vw, 3.5rem);
  border-left: 5px solid var(--red);
  background: var(--paper);
}

.editorial-introduction h2,
.story-editorial__chapter h2,
.career-record-card h2 {
  max-width: 18ch;
}

.editorial-link-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: clamp(1rem, 2vw, 1.5rem);
  margin-block: clamp(2rem, 5vw, 4rem);
}

.editorial-link-group {
  min-width: 0;
  padding: clamp(1.25rem, 3vw, 2rem);
  border: 1px solid var(--line);
  background: var(--white);
  box-shadow: 0 16px 38px rgba(16, 27, 43, .07);
}

.editorial-link-group h3 {
  margin: 0 0 .8rem;
  color: var(--red-dark);
  font-family: var(--sans);
  font-size: .76rem;
  font-weight: 850;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.editorial-link-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.editorial-link-list li {
  border-top: 1px solid var(--line);
}

.editorial-link-list li:last-child {
  border-bottom: 1px solid var(--line);
}

.editorial-link-list a {
  position: relative;
  display: block;
  padding: .72rem 1.5rem .72rem 0;
  color: var(--ink);
  font-family: var(--sans);
  font-size: .9rem;
  font-weight: 730;
  line-height: 1.4;
  text-decoration: none;
}

.editorial-link-list a::after {
  content: "→";
  position: absolute;
  right: .1rem;
  color: var(--red-dark);
  transition: transform .2s ease;
}

.editorial-link-list a:hover,
.editorial-link-list a:focus-visible {
  color: var(--red-dark);
}

.editorial-link-list a:hover::after,
.editorial-link-list a:focus-visible::after {
  transform: translateX(.2rem);
}

.story-editorial {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(1rem, 2.5vw, 2rem);
  margin-block: clamp(2.5rem, 6vw, 5rem);
}

.story-editorial__chapter {
  grid-column: span 4;
  padding: clamp(1.4rem, 3vw, 2.5rem);
  border-top: 4px solid var(--ink);
  background: var(--paper-light);
}

.story-editorial__chapter:nth-child(2) {
  border-top-color: var(--red);
}

.story-editorial__chapter:nth-child(3) {
  border-top-color: var(--blue, #315f86);
}

.story-editorial__chapter p:last-child {
  margin-bottom: 0;
}

.story-record-callout {
  margin-block: clamp(2.5rem, 6vw, 5rem);
  padding: clamp(1.5rem, 4vw, 3rem);
  background: var(--ink);
  color: var(--white);
}

.story-record-callout > h2,
.story-record-callout > p {
  color: inherit;
}

.story-record-callout .editorial-link-grid {
  margin-bottom: 0;
}

.story-record-callout .editorial-link-group {
  border-color: rgba(255, 255, 255, .18);
  background: rgba(255, 255, 255, .06);
  box-shadow: none;
}

.story-record-callout .editorial-link-group h3,
.story-record-callout .editorial-link-list a,
.story-record-callout .editorial-link-list a::after {
  color: var(--white);
}

.story-record-callout .editorial-link-list li {
  border-color: rgba(255, 255, 255, .18);
}

.career-record-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1rem, 2.5vw, 2rem);
  margin-block: clamp(2.5rem, 6vw, 5rem);
}

.career-record-card {
  padding: clamp(1.4rem, 3vw, 2.5rem);
  border: 1px solid var(--line);
  background: var(--white);
}

.career-record-card:nth-child(2) {
  background: var(--ink);
  color: var(--white);
}

.career-record-card:nth-child(2) h2,
.career-record-card:nth-child(2) p {
  color: inherit;
}

.contact-guidance {
  gap: clamp(1.5rem, 4vw, 4rem);
  margin-block: clamp(2rem, 5vw, 4rem);
  padding-block: clamp(1.5rem, 3vw, 2.5rem);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

@media (max-width: 60rem) {
  .story-editorial,
  .career-record-grid {
    grid-template-columns: 1fr;
  }

  .story-editorial__chapter {
    grid-column: auto;
  }
}

@media (max-width: 42rem) {
  .editorial-introduction,
  .story-editorial__chapter,
  .career-record-card,
  .story-record-callout,
  .editorial-link-group {
    padding: 1.2rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .editorial-link-list a::after {
    transition: none;
  }
}

/* Review corrections: horizontal editorial rows and a full-width visual archive. */
.page-slug-stevens-story .prose-entry,
.page-slug-career .prose-entry,
.page-slug-pre-accident-photos .prose-entry {
  max-width: none;
}

.page-slug-stevens-story .story-editorial,
.page-slug-career .career-record-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  overflow: hidden;
  margin-block: clamp(2.5rem, 6vw, 5rem);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.page-slug-stevens-story .story-editorial__chapter,
.page-slug-career .career-record-card {
  display: grid;
  grid-template-columns: minmax(9rem, .6fr) minmax(15rem, 1fr) minmax(20rem, 1.55fr);
  gap: clamp(1.5rem, 4vw, 4rem);
  align-items: start;
  min-width: 0;
  padding: clamp(1.75rem, 4vw, 3.5rem);
  border: 0;
  border-bottom: 1px solid var(--line);
  background: var(--white);
}

.page-slug-stevens-story .story-editorial__chapter:last-child,
.page-slug-career .career-record-card:last-child {
  border-bottom: 0;
}

.page-slug-stevens-story .story-editorial__chapter {
  border-left: 5px solid var(--ink);
}

.page-slug-stevens-story .story-editorial__chapter:nth-child(2) {
  border-left-color: var(--red);
  background: var(--paper-light);
}

.page-slug-stevens-story .story-editorial__chapter:nth-child(3) {
  border-left-color: var(--blue, #315f86);
}

.page-slug-stevens-story .story-editorial__chapter > .eyebrow,
.page-slug-career .career-record-card > .eyebrow {
  margin: .2rem 0 0;
}

.page-slug-stevens-story .story-editorial__chapter > h2,
.page-slug-career .career-record-card > h2 {
  max-width: none;
  margin: 0;
  font-size: clamp(2rem, 3.4vw, 3.35rem);
  line-height: 1.02;
}

.page-slug-stevens-story .story-editorial__chapter > p:not(.eyebrow),
.page-slug-career .career-record-card > p:not(.eyebrow) {
  max-width: 44rem;
  margin: 0;
  color: var(--ink-soft);
  font-size: clamp(1rem, 1.2vw, 1.12rem);
  line-height: 1.72;
}

.page-slug-career .career-record-card:nth-child(2) {
  background: var(--ink);
  color: var(--white);
}

.page-slug-career .career-record-card:nth-child(2) > .eyebrow {
  color: #f0c6ca;
}

.page-slug-career .career-record-card:nth-child(2) > h2,
.page-slug-career .career-record-card:nth-child(2) > p:not(.eyebrow) {
  color: var(--white);
}

.page-slug-career .career-record-card:nth-child(3) {
  background: var(--paper-light);
}

.page-slug-stevens-story .story-record-callout.record-callout {
  display: grid;
  grid-template-columns: minmax(15rem, .7fr) minmax(0, 1.3fr);
  grid-template-rows: auto 1fr;
  gap: clamp(1rem, 2vw, 1.5rem) clamp(2rem, 5vw, 5rem);
  align-items: start;
  margin-block: clamp(3rem, 7vw, 6rem);
  padding: clamp(2rem, 5vw, 4.5rem);
  border: 0;
  border-left: 5px solid var(--red);
  background: var(--ink) !important;
  color: var(--white) !important;
}

.page-slug-stevens-story .story-record-callout > h2 {
  grid-column: 1;
  grid-row: 1;
  max-width: 11ch;
  margin: 0;
  color: var(--white) !important;
  font-size: clamp(2.25rem, 4.5vw, 4.5rem);
  line-height: .98;
}

.page-slug-stevens-story .story-record-callout > p {
  grid-column: 1;
  grid-row: 2;
  max-width: 34rem;
  margin: 0;
  color: #d8e2ee !important;
  font-size: clamp(1rem, 1.25vw, 1.12rem);
  line-height: 1.7;
}

.page-slug-stevens-story .story-record-callout > .editorial-link-grid {
  grid-column: 2;
  grid-row: 1 / span 2;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-self: stretch;
  margin: 0;
}

.page-slug-stevens-story .story-record-callout .editorial-link-group {
  padding: clamp(1.4rem, 3vw, 2.25rem);
  border: 1px solid rgba(255, 255, 255, .12);
  background: var(--white);
  color: var(--ink);
  box-shadow: 0 18px 45px rgba(0, 0, 0, .18);
}

.page-slug-stevens-story .story-record-callout .editorial-link-group h3 {
  color: var(--red-dark);
}

.page-slug-stevens-story .story-record-callout .editorial-link-list li {
  border-color: var(--line);
}

.page-slug-stevens-story .story-record-callout .editorial-link-list a {
  color: var(--ink);
}

.page-slug-stevens-story .story-record-callout .editorial-link-list a::after {
  color: var(--red-dark);
}

.page-slug-stevens-story .story-record-callout .editorial-link-list a:hover,
.page-slug-stevens-story .story-record-callout .editorial-link-list a:focus-visible {
  color: var(--red-dark);
}

.page-slug-pre-accident-photos .prose-entry > p:first-child {
  max-width: 58rem;
  margin: 0 0 clamp(2rem, 5vw, 4rem);
  font-size: clamp(1.25rem, 2.2vw, 1.85rem);
  line-height: 1.45;
}

.page-slug-pre-accident-photos .prose-entry :is(.migration-gallery, .sfr-lightbox-gallery, .wp-block-gallery.has-nested-images) {
  display: grid !important;
  grid-template-columns: repeat(12, minmax(0, 1fr)) !important;
  grid-auto-flow: dense;
  grid-auto-rows: clamp(8rem, 11vw, 12rem);
  gap: clamp(.65rem, 1.4vw, 1.25rem) !important;
  width: 100%;
  margin: 0 0 clamp(3rem, 7vw, 7rem) !important;
}

.page-slug-pre-accident-photos .prose-entry :is(.migration-gallery, .sfr-lightbox-gallery, .wp-block-gallery.has-nested-images) > figure {
  position: relative;
  overflow: hidden;
  grid-column: span 3;
  grid-row: span 2;
  width: auto !important;
  max-width: none !important;
  min-width: 0;
  margin: 0 !important;
  background: var(--paper);
}

.page-slug-pre-accident-photos .prose-entry :is(.migration-gallery, .sfr-lightbox-gallery, .wp-block-gallery.has-nested-images) > figure:nth-child(1),
.page-slug-pre-accident-photos .prose-entry :is(.migration-gallery, .sfr-lightbox-gallery, .wp-block-gallery.has-nested-images) > figure:nth-child(11n + 1) {
  grid-column: span 6;
  grid-row: span 4;
}

.page-slug-pre-accident-photos .prose-entry :is(.migration-gallery, .sfr-lightbox-gallery, .wp-block-gallery.has-nested-images) > figure:nth-child(5n + 2) {
  grid-column: span 4;
  grid-row: span 3;
}

.page-slug-pre-accident-photos .prose-entry :is(.migration-gallery, .sfr-lightbox-gallery, .wp-block-gallery.has-nested-images) > figure:nth-child(7n + 4) {
  grid-column: span 5;
  grid-row: span 2;
}

.page-slug-pre-accident-photos .prose-entry :is(.migration-gallery, .sfr-lightbox-gallery, .wp-block-gallery.has-nested-images) > figure:nth-child(9n + 6) {
  grid-column: span 3;
  grid-row: span 3;
}

.page-slug-pre-accident-photos .prose-entry :is(.migration-gallery, .sfr-lightbox-gallery, .wp-block-gallery.has-nested-images) > figure a,
.page-slug-pre-accident-photos .prose-entry :is(.migration-gallery, .sfr-lightbox-gallery, .wp-block-gallery.has-nested-images) > figure img {
  display: block;
  width: 100%;
  height: 100%;
}

.page-slug-pre-accident-photos .prose-entry :is(.migration-gallery, .sfr-lightbox-gallery, .wp-block-gallery.has-nested-images) > figure img {
  object-fit: cover;
  filter: saturate(.9) contrast(1.03);
  transition: transform .4s ease, filter .3s ease;
}

.page-slug-pre-accident-photos .prose-entry :is(.migration-gallery, .sfr-lightbox-gallery, .wp-block-gallery.has-nested-images) > figure:hover img,
.page-slug-pre-accident-photos .prose-entry :is(.migration-gallery, .sfr-lightbox-gallery, .wp-block-gallery.has-nested-images) > figure:focus-within img {
  filter: saturate(1.04) contrast(1.07);
  transform: scale(1.035);
}

.page-slug-pre-accident-photos .prose-entry :is(.migration-gallery, .sfr-lightbox-gallery, .wp-block-gallery.has-nested-images) > figure figcaption {
  position: absolute;
  z-index: 2;
  right: .75rem;
  bottom: .75rem;
  left: .75rem;
  margin: 0;
  padding-top: 2.5rem;
  background: linear-gradient(transparent, rgba(5, 12, 22, .82));
  color: var(--white);
  font-family: var(--sans);
  font-size: .72rem;
  line-height: 1.4;
  opacity: 0;
  pointer-events: none;
  transform: translateY(.35rem);
  transition: opacity .25s ease, transform .25s ease;
}

.page-slug-pre-accident-photos .prose-entry :is(.migration-gallery, .sfr-lightbox-gallery, .wp-block-gallery.has-nested-images) > figure:hover figcaption,
.page-slug-pre-accident-photos .prose-entry :is(.migration-gallery, .sfr-lightbox-gallery, .wp-block-gallery.has-nested-images) > figure:focus-within figcaption {
  opacity: 1;
  transform: none;
}

@media (max-width: 70rem) {
  .page-slug-stevens-story .story-editorial__chapter,
  .page-slug-career .career-record-card {
    grid-template-columns: minmax(9rem, .6fr) minmax(0, 1.4fr);
    gap: 1rem clamp(1.5rem, 4vw, 3rem);
  }

  .page-slug-stevens-story .story-editorial__chapter > h2,
  .page-slug-stevens-story .story-editorial__chapter > p:not(.eyebrow),
  .page-slug-career .career-record-card > h2,
  .page-slug-career .career-record-card > p:not(.eyebrow) {
    grid-column: 2;
  }

  .page-slug-stevens-story .story-record-callout.record-callout {
    grid-template-columns: 1fr;
  }

  .page-slug-stevens-story .story-record-callout > h2,
  .page-slug-stevens-story .story-record-callout > p,
  .page-slug-stevens-story .story-record-callout > .editorial-link-grid {
    grid-column: 1;
    grid-row: auto;
  }

  .page-slug-stevens-story .story-record-callout > h2 {
    max-width: 14ch;
  }

  .page-slug-pre-accident-photos .prose-entry :is(.migration-gallery, .sfr-lightbox-gallery, .wp-block-gallery.has-nested-images) {
    grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
    grid-auto-rows: clamp(8rem, 20vw, 12rem);
  }

  .page-slug-pre-accident-photos .prose-entry :is(.migration-gallery, .sfr-lightbox-gallery, .wp-block-gallery.has-nested-images) > figure,
  .page-slug-pre-accident-photos .prose-entry :is(.migration-gallery, .sfr-lightbox-gallery, .wp-block-gallery.has-nested-images) > figure:nth-child(n) {
    grid-column: span 3;
    grid-row: span 2;
  }

  .page-slug-pre-accident-photos .prose-entry :is(.migration-gallery, .sfr-lightbox-gallery, .wp-block-gallery.has-nested-images) > figure:nth-child(5n + 1) {
    grid-column: span 6;
    grid-row: span 3;
  }
}

@media (max-width: 48rem) {
  .page-slug-stevens-story .story-editorial__chapter,
  .page-slug-career .career-record-card {
    grid-template-columns: 1fr;
    gap: .75rem;
    padding: 1.35rem;
  }

  .page-slug-stevens-story .story-editorial__chapter > h2,
  .page-slug-stevens-story .story-editorial__chapter > p:not(.eyebrow),
  .page-slug-career .career-record-card > h2,
  .page-slug-career .career-record-card > p:not(.eyebrow) {
    grid-column: 1;
  }

  .page-slug-stevens-story .story-record-callout.record-callout {
    padding: 1.35rem;
  }

  .page-slug-stevens-story .story-record-callout > .editorial-link-grid {
    grid-template-columns: 1fr;
  }

  .page-slug-pre-accident-photos .prose-entry :is(.migration-gallery, .sfr-lightbox-gallery, .wp-block-gallery.has-nested-images) {
    grid-template-columns: 1fr !important;
    grid-auto-rows: auto;
  }

  .page-slug-pre-accident-photos .prose-entry :is(.migration-gallery, .sfr-lightbox-gallery, .wp-block-gallery.has-nested-images) > figure,
  .page-slug-pre-accident-photos .prose-entry :is(.migration-gallery, .sfr-lightbox-gallery, .wp-block-gallery.has-nested-images) > figure:nth-child(n) {
    grid-column: auto;
    grid-row: auto;
    aspect-ratio: 4 / 3;
  }
}

@media (prefers-reduced-motion: reduce) {
  .page-slug-pre-accident-photos .prose-entry :is(.migration-gallery, .sfr-lightbox-gallery, .wp-block-gallery.has-nested-images) > figure img,
  .page-slug-pre-accident-photos .prose-entry :is(.migration-gallery, .sfr-lightbox-gallery, .wp-block-gallery.has-nested-images) > figure figcaption {
    transition: none;
  }
}