/* Shared editorial route baseline for Marine Science #20. */

.section-page main {
  width: var(--site-shell-width);
  margin: 0 auto;
  padding: 8rem 0 var(--space-8);
}

.section-hero {
  display: grid;
  gap: var(--space-5);
  align-items: end;
  padding: var(--space-6) 0 var(--space-7);
  border-bottom: 1px solid var(--line);
}

.section-hero-copy {
  max-width: var(--reading);
}

.section-hero h1,
.section-page h2,
.section-page h3 {
  font-family: var(--font-editorial);
  font-weight: 400;
  letter-spacing: -0.035em;
}

.section-hero h1 {
  max-width: 12ch;
  margin: 0;
  font-size: var(--type-display);
  line-height: 0.96;
}

.section-lead {
  max-width: 42rem;
  margin: var(--space-4) 0 0;
  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.3rem);
}

.section-hero-media {
  overflow: hidden;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--deep);
  box-shadow: var(--shadow);
}

.section-hero-media img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.editorial-section {
  padding: var(--space-7) 0;
  border-bottom: 1px solid var(--line);
}

.editorial-section:last-child {
  border-bottom: 0;
}

.editorial-grid {
  display: grid;
  gap: var(--space-5);
}

.editorial-copy {
  max-width: var(--reading);
}

.editorial-copy h2,
.editorial-section > h2 {
  margin: 0 0 var(--space-4);
  font-size: var(--type-section);
  line-height: 1.03;
}

.editorial-copy h3,
.card-grid h3,
.record-card h3 {
  margin: 0 0 var(--space-3);
  font-size: var(--type-subhead);
  line-height: 1.08;
}

.editorial-copy p,
.record-card p {
  margin: 0 0 var(--space-4);
  color: var(--muted);
}

.editorial-copy p:last-child,
.record-card p:last-child {
  margin-bottom: 0;
}

.editorial-media {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--deep);
}

.editorial-media img {
  width: 100%;
  height: 100%;
  min-height: 18rem;
  object-fit: cover;
}

.pull-quote {
  max-width: 18ch;
  margin: var(--space-6) 0;
  color: var(--text);
  font-family: var(--font-editorial);
  font-size: var(--type-pull);
  line-height: 1.02;
  letter-spacing: -0.045em;
}

.card-grid {
  display: grid;
  gap: var(--space-4);
}

.record-card-body {
  padding: var(--space-4);
}

.record-card a {
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

.archive-table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.archive-table {
  width: 100%;
  min-width: 44rem;
  border-collapse: collapse;
  background: rgba(var(--ink-rgb), 0.7);
}

.archive-table th,
.archive-table td {
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.archive-table th {
  color: var(--sand);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.archive-table td {
  color: var(--muted);
}

.archive-table tr:last-child td {
  border-bottom: 0;
}

.section-page .desktop-nav a[aria-current="page"] {
  color: var(--sea);
}

@media (min-width: 48rem) {
  .section-page main {
    padding-top: 9rem;
  }

  .section-hero,
  .editorial-grid--split {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  }

  .editorial-grid--split-reverse {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  }

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

@media (min-width: 70rem) {
  .card-grid--four {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .card-grid--three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Research-first About with visible biographies and the complete field photo. */
.section-hero--text { grid-template-columns: minmax(0, 1fr); }
.biography + .biography { margin-top: var(--space-5); }
.team-photo { margin: var(--space-5) 0 0; }
.team-photo img { width: 100%; height: auto; border-radius: var(--radius); }
.team-photo figcaption { margin-top: var(--space-3); color: var(--muted); }

/* Complete historical reviews, including criticism, live with their book. */
.comment-archive { max-width: var(--reading); }
.comment-archive article { padding: var(--space-5) 0; border-bottom: 1px solid var(--line); }
.comment-archive article:last-of-type { border-bottom: 0; }
.comment-archive p { color: var(--muted); white-space: pre-line; }
.comment-archive strong { color: var(--text); }

:where(#mission, #people, #reader-comments, #school-project-samples) { scroll-margin-top: 7rem; }

/* One complete-cover contract across all canonical publication details. */
.publication-cover img { aspect-ratio: 3 / 4; max-height: 32rem; object-fit: contain; padding: var(--space-4); }
.publication-cover a { display: block; }
.publication-notes { scroll-margin-top: 7rem; }
.publication-notes > summary { cursor: pointer; font-family: var(--font-editorial); font-size: var(--type-subhead); }
.publication-notes > .editorial-copy { margin-top: var(--space-5); }
