/* Scene layouts, motion, and reduced-motion fallback.
   The "static fallback" is not a separate DOM — it is the same markup
   with all transforms/opacity animations disabled and each layer stacked
   in document order. */

/* -------------------------------------------------------------------------
   Site chrome — header + footer
   ------------------------------------------------------------------------- */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  padding: 0.75rem var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  z-index: var(--z-header);
  background: linear-gradient(to bottom, rgba(14, 24, 38, 0.72), rgba(14, 24, 38, 0));
  color: var(--c-on-navy);
  pointer-events: none;
}
.site-header a { color: var(--c-on-navy); text-decoration: none; pointer-events: auto; }
.wordmark {
  font-family: var(--ff-display);
  font-variant-caps: all-small-caps;
  letter-spacing: 0.2em;
  font-size: 0.95rem;
  white-space: nowrap;
}
.site-nav {
  display: flex;
  gap: clamp(0.5rem, 2vw, 1.25rem);
  flex-wrap: wrap;
  justify-content: flex-end;
}
.site-nav__link {
  font-family: var(--ff-ui);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.15rem 0;
  border-bottom: 1px solid transparent;
  transition: border-color var(--motion-fast) var(--easing);
}
.site-nav__link:hover { border-bottom-color: var(--c-rust); }
.site-nav__link--current { border-bottom-color: var(--c-rust); }

@media (max-width: 640px) {
  .site-header { padding: 0.55rem 0.75rem; }
  .site-nav { gap: 0.55rem; }
  .site-nav__link { font-size: 0.68rem; letter-spacing: 0.08em; }
  /* Hide the deep-cut items on very small viewports; wordmark + Chapters + Contribute + About stays. */
  .site-nav__link[href="/voices/"],
  .site-nav__link[href="/archive/"],
  .site-nav__link[href="/map/"] {
    display: none;
  }
}

.site-footer {
  background: var(--c-near-black);
  color: var(--c-on-navy-muted);
  padding: 3rem var(--gutter);
}
.site-footer__inner {
  max-width: 60rem;
  margin-inline: auto;
  display: grid;
  gap: 0.75rem;
  text-align: center;
}
.site-footer__wordmark {
  font-family: var(--ff-display);
  font-variant-caps: all-small-caps;
  letter-spacing: 0.2em;
  color: var(--c-on-navy);
  margin: 0;
}
.site-footer__colophon {
  font-size: 0.9rem;
  margin: 0;
  color: var(--c-on-navy-muted);
}
.site-footer__nav {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 0.5rem;
  font-family: var(--ff-ui);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.site-footer__nav a {
  color: var(--c-on-navy);
  text-decoration: none;
  border-bottom: 1px solid rgba(245, 239, 228, 0.15);
  padding-bottom: 0.1rem;
}
.site-footer__nav a:hover { border-bottom-color: var(--c-rust); }

/* -------------------------------------------------------------------------
   Chapter lede
   ------------------------------------------------------------------------- */

/* Chapter head — documentary treatment: an oversized navy numeral sits
   behind the title text. The lede sits at prose measure, centered, with
   the numeral overlapping to give it monument weight. */
.chapter-lede {
  position: relative;
  max-width: var(--measure-prose);
  margin: 6rem auto 3rem;
  padding: 0 var(--gutter);
  text-align: center;
  background: transparent;
  isolation: isolate;
}
.chapter-lede__numeral {
  position: absolute;
  top: -3.2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: -1;
  font-family: var(--ff-display);
  font-weight: 500;
  font-size: clamp(9rem, 22vw, 16rem);
  line-height: 0.85;
  color: var(--c-navy);
  opacity: 0.09;
  letter-spacing: -0.04em;
  user-select: none;
  pointer-events: none;
  font-variation-settings: "opsz" 144;
}
.chapter-eyebrow {
  font-family: var(--ff-ui);
  font-variant-caps: all-small-caps;
  letter-spacing: 0.22em;
  font-size: 0.85rem;
  color: var(--c-ink-muted);
  margin: 0 0 1rem;
}
.chapter-title {
  font-family: var(--ff-display);
  max-width: 20ch;
  margin: 0 auto 0.5rem;
  font-weight: 500;
  font-variation-settings: "opsz" 144;
  line-height: 1.05;
}
.chapter-subtitle {
  font-family: var(--ff-ui);
  font-variant-caps: all-small-caps;
  letter-spacing: 0.18em;
  font-size: 0.85rem;
  color: var(--c-ink-muted);
  margin: 0 0 1.5rem;
}
.chapter-dek {
  max-width: 34rem;
  margin: 0 auto 2.5rem;
  font-style: italic;
  color: var(--c-ink-muted);
  font-size: 1.1rem;
  line-height: 1.5;
}
.chapter-hero {
  width: 100%;
  max-width: 100vw;
  margin: 0;
}
.chapter-hero .media {
  width: 100%;
  height: auto;
  max-height: 82vh;
  object-fit: cover;
  border-radius: 0;
}
.chapter-hero__meta {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  justify-content: flex-end;
  padding: 0.6rem var(--gutter) 0.2rem;
  max-width: var(--measure-wide);
  margin-inline: auto;
}
.chapter-hero__meta .media-attribution { margin: 0; }
.scroll-hint,
.landing-scroll-hint {
  margin-top: 2rem;
  opacity: 0.65;
  font-family: var(--ff-ui);
  font-variant-caps: all-small-caps;
  letter-spacing: 0.2em;
  font-size: 0.75rem;
}

/* -------------------------------------------------------------------------
   Scene shell
   ------------------------------------------------------------------------- */

/* -------------------------------------------------------------------------
   v2 documentary layout — three-width grid.
   DESIGN-SYSTEM-v2-spec.md §1. Every direct grid item declares one of
   .prose (default measure), .wide (figures/pull-quotes), .full (viewport).
   ------------------------------------------------------------------------- */

.chapter-scenes {
  display: grid;
  grid-template-columns:
    [full-start] 1fr
    [wide-start] 1fr
    [prose-start] var(--measure-prose)
    [prose-end] 1fr
    [wide-end] 1fr
    [full-end];
  row-gap: var(--space-section);
  padding-block: var(--space-section);
}

/* Scenes span the full grid and expose subgrid columns to their children.
   Preserves the scene box for focus outlines and semantic wrapping while
   letting each .prose / .wide / .full child slot into the parent grid. */
.chapter-scenes > .scene {
  grid-column: full-start / full-end;
  display: grid;
  grid-template-columns: subgrid;
  row-gap: var(--space-block);
}

/* Fallback for engines without subgrid: scenes collapse to a single
   column stack; utility classes still apply their max-widths via
   justify-self + max-width, so figures stay bounded. */
@supports not (grid-template-columns: subgrid) {
  .chapter-scenes > .scene {
    display: block;
  }
  .chapter-scenes > .scene > .prose {
    max-width: var(--measure-prose);
    margin-inline: auto;
    padding-inline: var(--gutter);
  }
  .chapter-scenes > .scene > .wide {
    margin-inline: auto;
  }
}

/* Utility classes — every grid child chooses one. */
.chapter-scenes .prose {
  grid-column: prose-start / prose-end;
}
.chapter-scenes .wide {
  grid-column: wide-start / wide-end;
  justify-self: center;
  width: 100%;
  max-width: var(--measure-wide);
}
.chapter-scenes .full {
  grid-column: full-start / full-end;
  justify-self: stretch;
  width: 100%;
}

/* Mobile — wide and full converge to edge with safe padding; prose keeps
   its measure. */
@media (max-width: 900px) {
  .chapter-scenes {
    grid-template-columns:
      [full-start wide-start] var(--gutter)
      [prose-start] 1fr
      [prose-end] var(--gutter)
      [wide-end full-end];
    row-gap: calc(var(--space-section) * 0.72);
  }
  .chapter-scenes .prose {
    grid-column: prose-start / prose-end;
    max-width: 100%;
  }
  .chapter-scenes .wide {
    grid-column: wide-start / wide-end;
    padding-inline: var(--gutter);
  }
  .chapter-scenes .full {
    grid-column: full-start / full-end;
  }
}

/* Section ornament — centered rust dash between scenes as a breather. */
.chapter-scenes > .scene:not(:last-child)::after {
  content: "";
  display: block;
  grid-column: prose-start / prose-end;
  justify-self: center;
  width: 2.5rem;
  height: 2px;
  background: var(--c-rust);
  opacity: 0.65;
  margin-block: calc(var(--space-section) * 0.55) 0;
}
/* Hide the ornament above a full-bleed exhale so the panel breathes fully. */
.chapter-scenes > .scene:has(+ .scene .full)::after,
.chapter-scenes > .scene:has(.full)::after {
  display: none;
}

.scene {
  position: relative;
  scroll-margin-top: 4rem;
}

.scene[tabindex="0"]:focus { outline: none; }
.scene[tabindex="0"]:focus-visible {
  outline: 2px solid var(--c-rust);
  outline-offset: -6px;
}

.scene-label {
  position: absolute;
  top: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  color: var(--c-ink-muted);
  z-index: var(--z-scene-overlay);
}
.scene[data-scene-type="prose"] .scene-label {
  position: static;
  transform: none;
  text-align: center;
  margin-bottom: 1.5rem;
}

.scene-body {
  display: block;
}

.scene-caption {
  color: var(--c-ink-muted);
  font-style: italic;
}
.scene-stub-note {
  font-family: var(--ff-ui);
  font-size: 0.85rem;
  color: var(--c-ink-muted);
  border-left: 2px solid var(--c-rust);
  padding-left: 0.75rem;
  margin-bottom: 1rem;
}

/* Prose scene — flowing measure, no fixed height */
.scene-prose { padding: 1rem 0; }

/* v2 prose block — the grid-native prose column. Direct paragraph
   descendants keep body typography. First paragraph of each prose block
   gets a drop cap. */
.chapter-scenes .prose {
  color: var(--c-ink);
  font-family: var(--ff-body);
  line-height: 1.65;
  font-size: 1.075rem;
}
.chapter-scenes .prose > p {
  margin: 0 0 var(--space-paragraph);
}
.chapter-scenes .prose > p:last-child {
  margin-bottom: 0;
}
/* Drop cap — first paragraph of the FIRST prose block in each scene.
   A pull-quote splits the prose into multiple .prose siblings; only the
   opening block gets the letter. */
.chapter-scenes .scene > .prose:first-of-type > p:first-of-type::first-letter {
  font-family: var(--ff-display);
  color: var(--c-navy);
  font-weight: 600;
  -webkit-initial-letter: 3 2;
  initial-letter: 3 2;
  margin-right: 0.14em;
  padding-right: 0.02em;
  font-variation-settings: "opsz" 144;
}
@supports not (initial-letter: 3 2) {
  .chapter-scenes .scene > .prose:first-of-type > p:first-of-type::first-letter {
    float: left;
    font-size: 4.5em;
    line-height: 0.82;
    padding: 0.06em 0.12em 0 0;
  }
}
/* Suppress the drop cap when a leading <strong> label owns the paragraph
   (the chapter uses "**The 1524 landfall.**" style openers). */
.chapter-scenes .scene > .prose:first-of-type > p:first-of-type:has(> strong:first-child)::first-letter {
  font-family: inherit;
  color: inherit;
  font-weight: inherit;
  initial-letter: 1;
  -webkit-initial-letter: 1;
  float: none;
  font-size: inherit;
  padding: 0;
  margin: 0;
}

/* -------------------------------------------------------------------------
   Full-bleed
   ------------------------------------------------------------------------- */

.scene-fullbleed {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  background: var(--c-near-black);
  color: var(--c-on-navy);
}
.scene-fullbleed__media {
  position: absolute;
  inset: 0;
  z-index: var(--z-scene-media);
}
.scene-fullbleed__media .media {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.85;
}
.scene-fullbleed__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  padding: 3rem var(--gutter);
  background: linear-gradient(to top, rgba(14, 24, 38, 0.85) 0%, rgba(14, 24, 38, 0.15) 60%);
  z-index: var(--z-scene-overlay);
}
.scene-fullbleed__text {
  max-width: var(--measure);
  text-align: center;
  color: var(--c-on-navy);
}
.scene-fullbleed__text p { color: var(--c-on-navy); }
.scene-fullbleed__text .prose-column { padding-inline: 0; }
.scene-fullbleed .scene-caption { color: var(--c-on-navy-muted); }
.scene-fullbleed__meta {
  position: absolute;
  bottom: 0.75rem;
  right: 1rem;
  display: flex;
  gap: 0.5rem;
  align-items: center;
  z-index: var(--z-scene-overlay);
}
.scene-fullbleed__meta .media-attribution,
.scene-fullbleed__meta .colorized-badge {
  color: var(--c-on-navy-muted);
  margin: 0;
}

/* -------------------------------------------------------------------------
   Then / Now dissolve
   ------------------------------------------------------------------------- */

/* Then/Now: sticky stage plus enough scroll length to feel tidal. */
.scene-thennow {
  position: relative;
  min-height: 260vh;
}
.scene-thennow__stage {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  background: var(--c-near-black);
}
.scene-thennow__layer {
  position: absolute;
  inset: 0;
}
/* Non-JS default: both layers visible so the reader sees both. The JS
   runtime, once booted, marks the scene as JS-controlled and drives the
   crossfade progressively. */
.scene-thennow__layer .media {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.scene-thennow[data-js="on"] .scene-thennow__layer--now { opacity: 0; }
.scene-thennow__meta {
  position: absolute;
  bottom: 0.75rem;
  left: 1rem;
  display: flex;
  gap: 0.5rem;
  align-items: center;
  color: var(--c-on-navy-muted);
}
.scene-thennow__meta .media-attribution,
.scene-thennow__meta .colorized-badge,
.scene-thennow__caption {
  color: var(--c-on-navy-muted);
  margin: 0;
}
.scene-thennow__text {
  padding: 4rem var(--gutter);
  background: var(--c-cream);
}

/* -------------------------------------------------------------------------
   Map flight
   ------------------------------------------------------------------------- */

/* Map scene: sticky stage stays pinned while the reader scrolls past a
   tall spacer, giving the map camera room to fly across waypoints. Height
   scales with the waypoint count via --waypoints (set inline from build).
   Text sits at the end. */
.scene-map {
  position: relative;
  min-height: calc(var(--waypoints, 3) * 80vh + 100vh);
}
.scene-map__stage {
  position: sticky;
  top: 0;
  height: 100vh;
  background: var(--c-navy);
  overflow: hidden;
}
.scene-map__stage canvas { display: block; }
.scene-map__fallback {
  color: var(--c-on-navy);
  padding: 1rem;
}
.scene-map__text {
  padding: 4rem var(--gutter);
  background: var(--c-cream);
}
.scene-map__label {
  position: absolute;
  top: 4rem;
  left: 1rem;
  padding: 0.35rem 0.65rem;
  background: rgba(14, 24, 38, 0.75);
  color: var(--c-on-navy);
  font-family: var(--ff-ui);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  border-radius: 2px;
  z-index: var(--z-map-labels);
  pointer-events: none;
}

/* -------------------------------------------------------------------------
   Artifact — document/object framed for close reading, on cream.
   ------------------------------------------------------------------------- */

.scene-artifact {
  padding: 4rem var(--gutter);
  background: var(--c-cream);
  display: grid;
  gap: 1.75rem;
  justify-items: center;
}
.artifact-figure {
  margin: 0;
  max-width: min(28rem, 90vw);
  background: #fbf7ee;
  padding: 1rem;
  box-shadow: 0 6px 26px rgba(14, 24, 38, 0.10);
  border: 1px solid rgba(14, 24, 38, 0.08);
}
.artifact-figure .media {
  width: 100%;
  height: auto;
  display: block;
}
.artifact-meta {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  justify-content: flex-end;
  padding-top: 0.5rem;
}
.artifact-caption {
  max-width: var(--measure);
  text-align: center;
  color: var(--c-ink-muted);
  font-style: italic;
  margin: 0;
}
.artifact-body {
  padding-inline: 0;
}

/* -------------------------------------------------------------------------
   Attribution + colorized badge
   ------------------------------------------------------------------------- */

.media-attribution {
  font-family: var(--ff-ui);
  font-size: 0.72rem;
  letter-spacing: 0.03em;
  color: var(--c-ink-muted);
  margin: 0.35rem 0 0 0;
}
.colorized-badge {
  display: inline-block;
  padding: 0.15rem 0.4rem;
  background: var(--c-rust);
  color: var(--c-cream);
  font-family: var(--ff-ui);
  font-variant-caps: all-small-caps;
  font-weight: 600;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  border-radius: 1px;
}

/* -------------------------------------------------------------------------
   Next chapter footer
   ------------------------------------------------------------------------- */

.chapter-next {
  padding: 5rem var(--gutter);
  text-align: center;
  background: var(--c-near-black);
  color: var(--c-on-navy);
}
.chapter-next__label { color: var(--c-on-navy-muted); margin-bottom: 0.5rem; }
.chapter-next__link {
  color: var(--c-on-navy);
  text-decoration: none;
  font-family: var(--ff-display);
  font-size: 1.75rem;
  border-bottom: 1px solid var(--c-rust);
  padding-bottom: 0.15rem;
}
.chapter-next__link:hover { color: var(--c-rust); }

/* -------------------------------------------------------------------------
   Landing
   ------------------------------------------------------------------------- */

.landing-page { background: var(--c-near-black); color: var(--c-on-navy); }
.landing-frame {
  position: relative;
  height: 100vh;
  overflow: hidden;
  background:
    radial-gradient(circle at 30% 40%, rgba(193, 77, 46, 0.15), transparent 60%),
    linear-gradient(to bottom, #14243A 0%, #0A1220 100%);
}
.landing-scrim {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at bottom, rgba(14, 24, 38, 0.6), transparent 70%);
}
.landing-copy {
  position: relative;
  z-index: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 var(--gutter);
  max-width: 40rem;
  margin: 0 auto;
  text-align: center;
}
.landing-eyebrow { color: var(--c-on-navy-muted); margin-bottom: 1.5rem; }
.landing-headline {
  color: var(--c-on-navy);
  font-size: clamp(2.5rem, 1.7rem + 4vw, 5rem);
  margin: 0 0 1.5rem 0;
  font-variation-settings: "opsz" 144;
}
.landing-line {
  color: var(--c-on-navy-muted);
  font-style: italic;
  font-size: 1.15rem;
  margin-bottom: 2.5rem;
}
.landing-copy p { color: var(--c-on-navy-muted); }
.landing-cta { margin-top: 2rem; }
.cta-link {
  display: inline-block;
  padding: 0.85rem 1.5rem;
  color: var(--c-cream);
  background: transparent;
  border: 1px solid var(--c-rust);
  text-decoration: none;
  font-family: var(--ff-ui);
  letter-spacing: 0.05em;
  transition: background var(--motion-fast) var(--easing), color var(--motion-fast) var(--easing);
}
.cta-link:hover { background: var(--c-rust); color: var(--c-cream); }
.landing-scroll-hint {
  position: absolute;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  color: var(--c-on-navy-muted);
}

/* -------------------------------------------------------------------------
   Landing mission + chapter cards
   ------------------------------------------------------------------------- */

.landing-mission {
  background: var(--c-cream);
  color: var(--c-ink);
  padding: 5rem var(--gutter);
}
.landing-mission__inner {
  max-width: 42rem;
  margin-inline: auto;
  text-align: center;
}
.mission-headline {
  max-width: 22ch;
  margin: 0 auto 1.5rem;
  font-size: clamp(1.75rem, 1.4rem + 1.8vw, 2.75rem);
}
.landing-mission__body {
  margin-inline: auto;
  text-align: left;
}
.landing-mission__body p:first-of-type::first-letter {
  font-family: var(--ff-display);
  font-size: 3.2rem;
  float: left;
  line-height: 0.95;
  margin: 0.15rem 0.5rem 0 0;
  color: var(--c-rust);
}

.landing-cards {
  background: var(--c-near-black);
  color: var(--c-on-navy);
  padding: 5rem var(--gutter);
}
.landing-cards__heading {
  text-align: center;
  color: var(--c-on-navy);
  margin: 0 0 2.5rem 0;
  font-variation-settings: "opsz" 60;
}
.landing-cards__grid {
  display: grid;
  gap: 1.5rem;
  max-width: 60rem;
  margin-inline: auto;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr));
}

.chapter-card {
  display: flex;
  flex-direction: column;
  color: var(--c-on-navy);
  text-decoration: none;
  background: rgba(245, 239, 228, 0.04);
  border: 1px solid rgba(245, 239, 228, 0.10);
  transition: transform var(--motion-fast) var(--easing),
              border-color var(--motion-fast) var(--easing),
              background var(--motion-fast) var(--easing);
  overflow: hidden;
}
.chapter-card:hover {
  border-color: var(--c-rust);
  background: rgba(245, 239, 228, 0.08);
  transform: translateY(-2px);
}
.chapter-card__media {
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: #0A1220;
}
.chapter-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.chapter-card__meta {
  padding: 1.25rem 1.25rem 1.5rem;
  display: grid;
  gap: 0.5rem;
}
.chapter-card__eyebrow {
  font-family: var(--ff-ui);
  font-variant-caps: all-small-caps;
  letter-spacing: 0.12em;
  font-size: 0.8rem;
  color: var(--c-on-navy-muted);
  margin: 0;
}
.chapter-card__title {
  font-family: var(--ff-display);
  color: var(--c-on-navy);
  font-size: 1.75rem;
  margin: 0;
  font-variation-settings: "opsz" 60;
}
.chapter-card__dek {
  color: var(--c-on-navy-muted);
  font-style: italic;
  margin: 0;
  font-size: 0.95rem;
}
.chapter-card__cta {
  font-family: var(--ff-ui);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--c-rust);
  margin: 0.5rem 0 0 0;
}

/* -------------------------------------------------------------------------
   Simple text pages (/about, /support, stubs)
   ------------------------------------------------------------------------- */

.simple-page { background: var(--c-cream); color: var(--c-ink); }
.simple-main {
  padding: 8rem var(--gutter) 5rem;
  max-width: 42rem;
  margin-inline: auto;
}
.simple-main h1 {
  font-variation-settings: "opsz" 144;
  margin-bottom: 1.5rem;
}
.simple-main h2 {
  margin-top: 2.5rem;
  border-top: 1px solid rgba(14, 24, 38, 0.10);
  padding-top: 1.5rem;
}
.simple-main a { color: var(--c-rust); }
.page-eyebrow {
  font-family: var(--ff-ui);
  font-variant-caps: all-small-caps;
  letter-spacing: 0.12em;
  color: var(--c-ink-muted);
  margin-bottom: 0.5rem;
}
.page-cta {
  display: inline-block;
  margin-top: 1.5rem;
  padding: 0.85rem 1.5rem;
  color: var(--c-cream);
  background: var(--c-rust);
  text-decoration: none;
  font-family: var(--ff-ui);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.page-cta:hover { background: var(--c-near-black); color: var(--c-cream); }

.stub-note {
  margin-top: 3rem;
  padding: 1.25rem 1.5rem;
  background: rgba(193, 77, 46, 0.08);
  border-left: 3px solid var(--c-rust);
  font-family: var(--ff-ui);
  color: var(--c-ink-muted);
  font-size: 0.95rem;
}

/* -------------------------------------------------------------------------
   /contribute/ form
   ------------------------------------------------------------------------- */

.contribute-agreement {
  margin: 1.5rem 0;
  padding: 1.25rem 1.5rem;
  background: rgba(14, 24, 38, 0.04);
  border-left: 3px solid var(--c-navy);
}
.contribute-agreement h3 {
  margin-top: 0;
  font-size: 1rem;
  font-family: var(--ff-ui);
  font-variant-caps: all-small-caps;
  letter-spacing: 0.14em;
  color: var(--c-ink-muted);
}
.contribute-agreement p {
  margin: 0;
  font-style: italic;
  color: var(--c-ink);
}

.contribute-form { display: grid; gap: 1.5rem; margin: 2rem 0; }
.contribute-form fieldset {
  border: 1px solid rgba(14, 24, 38, 0.10);
  padding: 1.25rem 1.5rem 1.5rem;
  display: grid;
  gap: 1rem;
}
.contribute-form legend {
  font-family: var(--ff-ui);
  font-variant-caps: all-small-caps;
  letter-spacing: 0.14em;
  color: var(--c-ink-muted);
  font-size: 0.85rem;
  padding: 0 0.5rem;
}
.contribute-form label {
  display: grid;
  gap: 0.35rem;
  font-family: var(--ff-ui);
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  color: var(--c-ink-muted);
}
.contribute-form input,
.contribute-form select,
.contribute-form textarea {
  width: 100%;
  padding: 0.65rem 0.85rem;
  font-family: var(--ff-body);
  font-size: 1rem;
  background: #fbf7ee;
  color: var(--c-ink);
  border: 1px solid rgba(14, 24, 38, 0.15);
  border-radius: 2px;
}
.contribute-form input:focus,
.contribute-form select:focus,
.contribute-form textarea:focus {
  outline: 2px solid var(--c-rust);
  outline-offset: 2px;
  border-color: transparent;
}
.contribute-form .fine-print {
  font-family: var(--ff-body);
  font-size: 0.9rem;
  color: var(--c-ink-muted);
  font-style: italic;
  margin: 0;
}
.contribute-form .checkbox {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  font-family: var(--ff-body);
  font-size: 0.95rem;
  color: var(--c-ink);
  letter-spacing: 0;
}
.contribute-form .checkbox input {
  width: auto;
  margin-top: 0.25rem;
  accent-color: var(--c-rust);
}
.agreement-fieldset { background: rgba(193, 77, 46, 0.05); }
.contribute-actions { text-align: right; margin: 0; }
.contribute-form .hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.contribute ol {
  padding-left: 1.4em;
}
.contribute ol li {
  margin-bottom: 0.55em;
}

/* -------------------------------------------------------------------------
   Archive — index + item pages + then/now slider
   ------------------------------------------------------------------------- */

.archive-page { background: var(--c-cream); color: var(--c-ink); }

.archive-index {
  max-width: 68rem;
  margin-inline: auto;
  padding: 6rem var(--gutter) 4rem;
}
.archive-index__lede {
  text-align: center;
  margin-bottom: 3rem;
  max-width: 42rem;
  margin-inline: auto;
}
.archive-index__blurb {
  color: var(--c-ink-muted);
  font-style: italic;
}
.archive-index__controls {
  display: grid;
  gap: 1rem;
  margin-bottom: 2rem;
}
#archive-search {
  width: 100%;
  padding: 0.85rem 1rem;
  font-family: var(--ff-body);
  font-size: 1.05rem;
  background: var(--c-cream);
  color: var(--c-ink);
  border: 1px solid rgba(14, 24, 38, 0.15);
  border-radius: 2px;
}
#archive-search:focus {
  outline: 2px solid var(--c-rust);
  outline-offset: 2px;
  border-color: transparent;
}
.archive-index__facets {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.facet {
  display: inline-flex;
  gap: 0.35rem;
  padding: 0.4rem 0.75rem;
  font-family: var(--ff-ui);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: transparent;
  color: var(--c-ink-muted);
  border: 1px solid rgba(14, 24, 38, 0.15);
  cursor: pointer;
  border-radius: 2px;
}
.facet:hover { border-color: var(--c-rust); color: var(--c-ink); }
.facet[aria-pressed="true"] {
  background: var(--c-rust);
  color: var(--c-cream);
  border-color: var(--c-rust);
}

.archive-index__grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr));
}
.archive-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--c-ink);
  background: #fbf7ee;
  border: 1px solid rgba(14, 24, 38, 0.08);
  transition: transform var(--motion-fast) var(--easing),
              border-color var(--motion-fast) var(--easing);
}
.archive-card:hover {
  border-color: var(--c-rust);
  transform: translateY(-2px);
  color: var(--c-ink);
}
.archive-card__media {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #0A1220;
}
.archive-card__media img,
.archive-card__media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.archive-card__meta {
  padding: 0.75rem 0.85rem 1rem;
  display: grid;
  gap: 0.25rem;
}
.archive-card__title {
  font-family: var(--ff-display);
  font-size: 1.05rem;
  line-height: 1.25;
  margin: 0;
  font-weight: 500;
}
.archive-card__date {
  font-family: var(--ff-ui);
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  color: var(--c-ink-muted);
}
.archive-card__location {
  font-size: 0.85rem;
  color: var(--c-ink-muted);
  margin: 0;
}
.archive-card__placeholder-flag {
  font-family: var(--ff-ui);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  color: var(--c-rust);
  text-transform: uppercase;
}
.archive-index__empty {
  padding: 3rem 1rem;
  text-align: center;
  color: var(--c-ink-muted);
  grid-column: 1 / -1;
}

/* Item page */
.archive-item {
  max-width: 46rem;
  margin-inline: auto;
  padding: 6rem var(--gutter) 4rem;
}
.archive-item__crumb {
  margin-bottom: 1rem;
  font-family: var(--ff-ui);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
}
.archive-item__crumb a { color: var(--c-ink-muted); text-decoration: none; }
.archive-item__crumb a:hover { color: var(--c-rust); }
.archive-item__frame {
  position: relative;
  background: #fbf7ee;
  padding: 1rem;
  box-shadow: 0 8px 32px rgba(14, 24, 38, 0.10);
  border: 1px solid rgba(14, 24, 38, 0.10);
  margin-bottom: 2rem;
}
.archive-item__media {
  width: 100%;
  height: auto;
  display: block;
}
.archive-item__meta-row {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  padding-top: 0.5rem;
}
.archive-item__title {
  margin: 1rem 0 0.25rem;
  font-variation-settings: "opsz" 144;
}
.archive-item__daterow {
  font-family: var(--ff-ui);
  font-variant-caps: all-small-caps;
  letter-spacing: 0.12em;
  color: var(--c-ink-muted);
  margin: 0 0 0.35rem 0;
}
.archive-item__location {
  color: var(--c-ink-muted);
  margin: 0 0 1.5rem;
  font-style: italic;
}
.archive-item__description {
  font-size: 1.1rem;
  line-height: 1.7;
}
.archive-item__related {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(14, 24, 38, 0.10);
}
.archive-item__related h2 { font-size: 1.15rem; margin-bottom: 0.5rem; }
.archive-item__related ul { padding-left: 1.25rem; }
.related-role {
  font-family: var(--ff-ui);
  font-size: 0.72rem;
  color: var(--c-ink-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* Citation */
.citation {
  margin-top: 2.5rem;
  padding: 1.5rem;
  background: rgba(14, 24, 38, 0.04);
  border-left: 3px solid var(--c-navy);
}
.citation h2 {
  margin-top: 0;
  font-size: 1.2rem;
}
.citation__list {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.35rem 1rem;
  margin: 0.5rem 0;
  font-size: 0.9rem;
}
.citation__list dt {
  font-family: var(--ff-ui);
  font-variant-caps: all-small-caps;
  letter-spacing: 0.1em;
  color: var(--c-ink-muted);
}
.citation__list dd { margin: 0; }
.citation__list code {
  font-family: SFMono-Regular, ui-monospace, Menlo, monospace;
  font-size: 0.85rem;
  color: var(--c-navy);
}
.citation__flag {
  margin-top: 0.75rem;
  padding: 0.5rem 0.75rem;
  background: rgba(193, 77, 46, 0.10);
  color: var(--c-rust);
  font-size: 0.85rem;
  border-left: 2px solid var(--c-rust);
}
.citation__flag--warn { background: #C14D2E; color: var(--c-cream); }
.citation__cite {
  margin-top: 1rem;
}
.citation__cite summary {
  cursor: pointer;
  font-family: var(--ff-ui);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c-rust);
}
.citation__cite-text {
  font-family: Georgia, serif;
  font-size: 0.95rem;
  margin: 0.75rem 0;
  padding: 0.75rem;
  background: #fbf7ee;
  border-left: 2px solid rgba(14, 24, 38, 0.15);
}
.citation__copy {
  margin-top: 0.25rem;
  padding: 0.45rem 0.85rem;
  background: transparent;
  color: var(--c-rust);
  border: 1px solid var(--c-rust);
  font-family: var(--ff-ui);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  cursor: pointer;
  text-transform: uppercase;
}
.citation__copy:hover { background: var(--c-rust); color: var(--c-cream); }
.citation__copy[data-state="copied"] { background: var(--c-navy); border-color: var(--c-navy); color: var(--c-cream); }

/* Then/now slider */
.thennow-slider {
  margin: 2rem 0;
}
.thennow-slider h2 { font-size: 1.2rem; margin-bottom: 0.75rem; }
.thennow-slider__stage {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--c-near-black);
  cursor: ew-resize;
  user-select: none;
  touch-action: none;
}
.thennow-slider__stage:focus-visible { outline: 2px solid var(--c-rust); outline-offset: 2px; }
.thennow-slider__then,
.thennow-slider__now {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  -webkit-user-drag: none;
  user-select: none;
}
.thennow-slider__now-wrap {
  position: absolute;
  inset: 0;
  overflow: hidden;
  width: 50%;
  pointer-events: none;
}
.thennow-slider__handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  background: var(--c-cream);
  transform: translateX(-1px);
  z-index: 2;
  pointer-events: none;
}
.thennow-slider__grip {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--c-cream);
  box-shadow: 0 2px 8px rgba(14, 24, 38, 0.30);
  display: flex;
  align-items: center;
  justify-content: center;
}
.thennow-slider__grip::before {
  content: "◀ ▶";
  font-size: 0.75rem;
  color: var(--c-navy);
  letter-spacing: 2px;
}
.thennow-slider__labels {
  position: absolute;
  inset: auto 0 0.5rem 0;
  display: flex;
  justify-content: space-between;
  padding: 0 0.75rem;
  z-index: 2;
}
.thennow-slider__label {
  font-family: var(--ff-ui);
  font-variant-caps: all-small-caps;
  letter-spacing: 0.12em;
  font-size: 0.75rem;
  padding: 0.2rem 0.5rem;
  background: rgba(14, 24, 38, 0.75);
  color: var(--c-on-navy);
  border-radius: 1px;
}

/* Reduced-motion collapses the slider to stacked figures. */
html[data-motion="reduced"] .thennow-slider__stage {
  aspect-ratio: auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  cursor: default;
}
html[data-motion="reduced"] .thennow-slider__then,
html[data-motion="reduced"] .thennow-slider__now {
  position: relative;
  inset: auto;
  aspect-ratio: 4 / 3;
}
html[data-motion="reduced"] .thennow-slider__now-wrap {
  position: relative;
  inset: auto;
  width: auto;
  overflow: visible;
}
html[data-motion="reduced"] .thennow-slider__handle,
html[data-motion="reduced"] .thennow-slider__labels { display: none; }
@media (max-width: 640px) {
  html[data-motion="reduced"] .thennow-slider__stage { grid-template-columns: 1fr; }
}

/* -------------------------------------------------------------------------
   /voices/ — index + narrator pages + audio player
   ------------------------------------------------------------------------- */

.voices-page { background: var(--c-cream); color: var(--c-ink); }
.voices-index {
  max-width: 60rem;
  margin-inline: auto;
  padding: 6rem var(--gutter) 4rem;
}
.voices-index__lede {
  text-align: center;
  margin-bottom: 3rem;
  max-width: 42rem;
  margin-inline: auto;
}
.voices-index__blurb { color: var(--c-ink-muted); font-style: italic; }
.voices-index__grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 1fr));
}
.voice-card {
  display: grid;
  grid-template-rows: auto 1fr auto;
  background: #fbf7ee;
  border: 1px solid rgba(14, 24, 38, 0.08);
  color: var(--c-ink);
  text-decoration: none;
  transition: border-color var(--motion-fast) var(--easing),
              transform var(--motion-fast) var(--easing);
  overflow: hidden;
}
.voice-card:hover {
  border-color: var(--c-rust);
  transform: translateY(-2px);
  color: var(--c-ink);
}
.voice-card__portrait {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--c-navy);
}
.voice-card__portrait img { width: 100%; height: 100%; object-fit: cover; }
.voice-card__meta {
  padding: 1rem 1.15rem 1.25rem;
  display: grid;
  gap: 0.35rem;
}
.voice-card__name {
  font-family: var(--ff-display);
  font-size: 1.15rem;
  font-weight: 500;
  margin: 0;
}
.voice-card__years {
  font-family: var(--ff-ui);
  font-variant-caps: all-small-caps;
  letter-spacing: 0.12em;
  color: var(--c-ink-muted);
  font-size: 0.78rem;
  margin: 0;
}
.voice-card__summary {
  color: var(--c-ink-muted);
  font-size: 0.9rem;
  margin: 0;
  line-height: 1.5;
}

/* Single narrator page */
.voice-page {
  max-width: 46rem;
  margin-inline: auto;
  padding: 6rem var(--gutter) 4rem;
}
.voice-page__crumb {
  margin-bottom: 1rem;
  font-family: var(--ff-ui);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
}
.voice-page__crumb a { color: var(--c-ink-muted); text-decoration: none; }
.voice-page__crumb a:hover { color: var(--c-rust); }

.voice-page__header {
  display: grid;
  grid-template-columns: 8rem 1fr;
  gap: 1.5rem;
  margin-bottom: 2rem;
}
@media (max-width: 640px) {
  .voice-page__header { grid-template-columns: 5rem 1fr; gap: 1rem; }
}
.voice-page__portrait {
  aspect-ratio: 1 / 1;
  background: var(--c-navy);
  overflow: hidden;
}
.voice-page__portrait img { width: 100%; height: 100%; object-fit: cover; }
.voice-page__name {
  margin: 0.25rem 0 0.5rem 0;
  font-variation-settings: "opsz" 96;
  font-size: clamp(1.75rem, 1.4rem + 1.5vw, 2.4rem);
}
.voice-page__years {
  font-family: var(--ff-ui);
  font-variant-caps: all-small-caps;
  letter-spacing: 0.12em;
  color: var(--c-ink-muted);
  font-size: 0.85rem;
  margin: 0 0 0.35rem 0;
}
.voice-page__summary {
  color: var(--c-ink);
  font-style: italic;
  margin: 0;
}

.voice-player {
  display: grid;
  gap: 1rem;
  margin: 1.5rem 0 2rem;
  padding: 1.25rem 1.5rem;
  background: rgba(14, 24, 38, 0.04);
  border-left: 3px solid var(--c-navy);
}
.voice-player__controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.voice-player__btn {
  padding: 0.5rem 1rem;
  background: var(--c-navy);
  color: var(--c-cream);
  border: none;
  font-family: var(--ff-ui);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  font-size: 0.85rem;
}
.voice-player__btn:hover { background: var(--c-rust); }
.voice-player__btn[aria-pressed="true"] { background: var(--c-rust); }
.voice-player__seek {
  padding: 0.4rem 0.7rem;
  background: transparent;
  color: var(--c-navy);
  border: 1px solid rgba(14, 24, 38, 0.15);
  font-family: var(--ff-ui);
  font-size: 0.8rem;
  cursor: pointer;
}
.voice-player__seek:hover { border-color: var(--c-rust); color: var(--c-rust); }
.voice-player__progress {
  flex: 1;
  min-width: 120px;
  height: 6px;
  background: rgba(14, 24, 38, 0.10);
  cursor: pointer;
  border-radius: 2px;
  overflow: hidden;
}
.voice-player__progress-fill {
  height: 100%;
  width: 0;
  background: var(--c-rust);
  transition: width 0.1s linear;
}
.voice-player__time {
  font-family: var(--ff-ui);
  font-size: 0.8rem;
  color: var(--c-ink-muted);
  min-width: 5.5rem;
  text-align: right;
}
.voice-player__transcript {
  max-height: 20rem;
  overflow-y: auto;
  padding: 0.5rem;
  background: #fbf7ee;
  border: 1px solid rgba(14, 24, 38, 0.06);
  scroll-behavior: smooth;
}
.voice-cue {
  padding: 0.35rem 0.65rem;
  margin: 0;
  cursor: pointer;
  border-left: 2px solid transparent;
  transition: background var(--motion-fast) var(--easing),
              border-color var(--motion-fast) var(--easing);
  font-size: 0.95rem;
  line-height: 1.55;
}
.voice-cue:hover { background: rgba(14, 24, 38, 0.04); }
.voice-cue--active {
  background: rgba(193, 77, 46, 0.10);
  border-left-color: var(--c-rust);
  color: var(--c-ink);
}

.voice-page__meta {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.35rem 1rem;
  font-size: 0.9rem;
  margin: 1.5rem 0;
}
.voice-page__meta dt {
  font-family: var(--ff-ui);
  font-variant-caps: all-small-caps;
  letter-spacing: 0.1em;
  color: var(--c-ink-muted);
}
.voice-page__meta dd { margin: 0; }
.voice-page__downloads {
  margin: 1.5rem 0;
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.voice-page__download {
  padding: 0.5rem 1rem;
  color: var(--c-rust);
  background: transparent;
  border: 1px solid var(--c-rust);
  text-decoration: none;
  font-family: var(--ff-ui);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.voice-page__download:hover { background: var(--c-rust); color: var(--c-cream); }

/* -------------------------------------------------------------------------
   /timeline/ — master timeline rail
   ------------------------------------------------------------------------- */

.timeline-page { background: var(--c-cream); color: var(--c-ink); }
.timeline {
  max-width: 60rem;
  margin-inline: auto;
  padding: 6rem var(--gutter) 4rem;
}
.timeline__lede {
  text-align: center;
  margin-bottom: 3rem;
  max-width: 42rem;
  margin-inline: auto;
}
.timeline__blurb {
  color: var(--c-ink-muted);
  font-style: italic;
}
.timeline__controls {
  display: grid;
  gap: 0.75rem;
  padding: 1rem 0;
  margin-bottom: 2rem;
  border-top: 1px solid rgba(14, 24, 38, 0.10);
  border-bottom: 1px solid rgba(14, 24, 38, 0.10);
}
.timeline__facets {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}
.timeline__facet-label {
  font-family: var(--ff-ui);
  font-variant-caps: all-small-caps;
  letter-spacing: 0.12em;
  color: var(--c-ink-muted);
  font-size: 0.75rem;
  margin-right: 0.35rem;
}
.timeline__count {
  font-family: var(--ff-ui);
  font-size: 0.8rem;
  color: var(--c-ink-muted);
  margin: 0;
}

.timeline__rail {
  list-style: none;
  padding: 0;
  margin: 0;
  position: relative;
}
.timeline__rail::before {
  content: "";
  position: absolute;
  left: 5.5rem;
  top: 0;
  bottom: 0;
  width: 1px;
  background: rgba(14, 24, 38, 0.15);
}
@media (max-width: 640px) {
  .timeline__rail::before { left: 4rem; }
}

.timeline-event {
  display: grid;
  grid-template-columns: 6.5rem 1fr;
  gap: 1rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid rgba(14, 24, 38, 0.06);
}
@media (max-width: 640px) {
  .timeline-event { grid-template-columns: 5rem 1fr; gap: 0.5rem; }
}
.timeline-event__date {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  padding-right: 1.25rem;
  border-right: 3px solid var(--c-rust);
  position: relative;
}
.timeline-event__date::before {
  content: "";
  position: absolute;
  top: 0.5rem;
  right: -0.5rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--c-rust);
  border: 2px solid var(--c-cream);
}
.timeline-event__year {
  font-family: var(--ff-display);
  font-size: 1.5rem;
  line-height: 1;
  font-weight: 500;
  color: var(--c-navy);
}
.timeline-event__era {
  font-family: var(--ff-ui);
  font-variant-caps: all-small-caps;
  letter-spacing: 0.12em;
  color: var(--c-ink-muted);
  font-size: 0.7rem;
  margin-top: 0.25rem;
}
.timeline-event__body {
  padding-left: 0.5rem;
}
.timeline-event__title {
  font-family: var(--ff-display);
  font-size: 1.15rem;
  margin: 0 0 0.35rem 0;
  font-weight: 500;
}
.timeline-event__summary {
  color: var(--c-ink);
  margin: 0 0 0.4rem 0;
  font-size: 0.95rem;
  line-height: 1.6;
}
.timeline-event__meta {
  margin: 0 0 0.25rem 0;
  font-family: var(--ff-ui);
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  color: var(--c-ink-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
}
.timeline-event__chapter {
  color: var(--c-rust);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-decoration: none;
  border-bottom: 1px solid transparent;
}
.timeline-event__chapter:hover { border-bottom-color: var(--c-rust); }
.timeline-event__threads {
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.timeline-event__flag {
  padding: 0.1rem 0.4rem;
  background: rgba(193, 77, 46, 0.15);
  color: var(--c-rust);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.7rem;
}
.timeline-event__flag--warn { background: var(--c-rust); color: var(--c-cream); }
.timeline-event__source {
  margin: 0;
  font-family: var(--ff-ui);
  font-size: 0.7rem;
  color: var(--c-ink-muted);
  font-style: italic;
}

/* -------------------------------------------------------------------------
   /map/ — the Photo Map
   ------------------------------------------------------------------------- */

.map-page {
  background: var(--c-navy);
  color: var(--c-on-navy);
  overflow: hidden;
}
.map-main {
  position: fixed;
  inset: 0;
  top: 3rem;
}
#map-stage {
  position: absolute;
  inset: 0;
}
.map-hint {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.35rem 0.75rem;
  background: rgba(14, 24, 38, 0.75);
  color: var(--c-on-navy);
  font-family: var(--ff-ui);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  border-radius: 2px;
  pointer-events: none;
  z-index: 3;
}

.map-card {
  position: absolute;
  right: 1rem;
  top: 1rem;
  bottom: 1rem;
  width: min(24rem, calc(100vw - 2rem));
  background: var(--c-cream);
  color: var(--c-ink);
  overflow: auto;
  transform: translateX(calc(100% + 2rem));
  transition: transform var(--motion-med) var(--easing);
  box-shadow: -8px 0 32px rgba(14, 24, 38, 0.24);
  z-index: 4;
}
.map-card[data-open] { transform: translateX(0); }

.map-card__close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 32px;
  height: 32px;
  border: none;
  background: rgba(245, 239, 228, 0.8);
  color: var(--c-navy);
  font-size: 1.5rem;
  cursor: pointer;
  z-index: 2;
  border-radius: 50%;
}
.map-card__close:hover { background: var(--c-rust); color: var(--c-cream); }
.map-card__media {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #0A1220;
}
.map-card__media img,
.map-card__media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.map-card__media .thennow-slider__stage {
  aspect-ratio: 4 / 3;
  height: auto;
}
.map-card__meta {
  padding: 1rem 1.25rem 1.5rem;
  display: grid;
  gap: 0.5rem;
}
.map-card__date {
  font-family: var(--ff-ui);
  font-variant-caps: all-small-caps;
  letter-spacing: 0.12em;
  color: var(--c-ink-muted);
  margin: 0;
  font-size: 0.85rem;
}
.map-card__title {
  font-family: var(--ff-display);
  font-size: 1.5rem;
  line-height: 1.2;
  margin: 0;
  font-variation-settings: "opsz" 60;
}
.map-card__location {
  color: var(--c-ink-muted);
  margin: 0;
  font-style: italic;
}
.map-card__conf {
  font-style: normal;
  font-family: var(--ff-ui);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--c-rust);
  padding-left: 0.25rem;
}
.map-card__chapters {
  font-size: 0.85rem;
  color: var(--c-ink-muted);
  margin: 0;
}
.map-card__chapters a { color: var(--c-rust); text-decoration: underline; }
.map-card__cta {
  display: inline-block;
  margin-top: 0.5rem;
  color: var(--c-rust);
  font-family: var(--ff-ui);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  font-size: 0.85rem;
}
.map-card__cta:hover { color: var(--c-navy); }

@media (max-width: 640px) {
  .map-card {
    top: auto;
    right: 0;
    left: 0;
    bottom: 0;
    width: auto;
    max-height: 60vh;
    transform: translateY(calc(100% + 2rem));
  }
  .map-card[data-open] { transform: translateY(0); }
}

/* -------------------------------------------------------------------------
   /now — live window
   ------------------------------------------------------------------------- */

.now-page { background: var(--c-near-black); color: var(--c-on-navy); }
.now-main {
  padding: 5rem var(--gutter) 3rem;
  max-width: 68rem;
  margin-inline: auto;
}
.now-hero {
  text-align: center;
  margin-bottom: 2.5rem;
}
.now-hero h1 {
  color: var(--c-on-navy);
  margin: 0.5rem 0;
}
.now-hero p {
  color: var(--c-on-navy-muted);
  font-style: italic;
  margin: 0;
}
.now-eyebrow {
  font-family: var(--ff-ui);
  font-variant-caps: all-small-caps;
  letter-spacing: 0.14em;
  color: var(--c-on-navy-muted);
  margin: 0;
}
.now-stream {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #0A1220;
  overflow: hidden;
  margin-bottom: 1.5rem;
}
.now-stream video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.now-stream__note {
  position: absolute;
  bottom: 0.75rem;
  right: 0.75rem;
  padding: 0.3rem 0.6rem;
  font-family: var(--ff-ui);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  background: rgba(14, 24, 38, 0.7);
  color: var(--c-on-navy-muted);
}
.now-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 0.75rem 0 1.25rem;
  flex-wrap: wrap;
}
.now-freshness {
  font-family: var(--ff-ui);
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  color: var(--c-seaglass);
}
.now-freshness[data-state="stale"] { color: var(--c-rust); }
.now-toggle {
  background: transparent;
  color: var(--c-cream);
  border: 1px solid var(--c-rust);
  padding: 0.55rem 1rem;
  font-family: var(--ff-ui);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: background var(--motion-fast) var(--easing);
}
.now-toggle:hover { background: var(--c-rust); }
.now-map {
  width: 100%;
  aspect-ratio: 4 / 3;
  background: var(--c-navy);
  border: 1px solid rgba(245, 239, 228, 0.1);
}
.now-fallback {
  padding: 2rem;
  color: var(--c-on-navy);
  font-style: italic;
  text-align: center;
}

/* Vessel markers */
.now-vessel {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  pointer-events: none;
  transform: translate(-50%, -50%);
}
.now-vessel__dot {
  width: 10px;
  height: 10px;
  background: var(--c-rust);
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(14, 24, 38, 0.6);
  flex-shrink: 0;
}
.now-vessel__label {
  font-family: var(--ff-ui);
  font-size: 0.72rem;
  letter-spacing: 0.03em;
  padding: 0.15rem 0.4rem;
  background: rgba(14, 24, 38, 0.85);
  color: var(--c-on-navy);
  border-radius: 1px;
  white-space: nowrap;
  transition: opacity var(--motion-slow) var(--easing);
}
.now-vessel--ferry .now-vessel__dot     { background: var(--c-seaglass); }
.now-vessel--pilot .now-vessel__dot     { background: #FFCB6B; }
.now-vessel--cargo .now-vessel__dot     { background: var(--c-cream); }
.now-vessel--fishing .now-vessel__dot   { background: #E8896B; }
.now-vessel--coast_guard .now-vessel__dot { background: #6B9AE8; }
.now-vessel--party_boat .now-vessel__dot { background: #C8A868; }
.now-vessel--large .now-vessel__dot     { width: 14px; height: 14px; }
.now-vessel--crown .now-vessel__label   { color: #FFCB6B; }

/* Legend row under the map */
.now-legend {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1rem;
  font-family: var(--ff-ui);
  font-size: 0.75rem;
  color: var(--c-on-navy-muted);
}
.now-legend__key {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.now-legend__key::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}
.now-legend__key--ferry::before      { background: var(--c-seaglass); }
.now-legend__key--pilot::before      { background: #FFCB6B; }
.now-legend__key--cargo::before      { background: var(--c-cream); }
.now-legend__key--fishing::before    { background: #E8896B; }
.now-legend__key--coast_guard::before { background: #6B9AE8; }
.now-legend__key--party_boat::before { background: #C8A868; }

.now-body {
  margin-top: 3rem;
  max-width: 42rem;
  margin-inline: auto;
}
.now-body p { color: var(--c-on-navy-muted); }
.now-body a { color: var(--c-rust); }

/* -------------------------------------------------------------------------
   Reduced-motion fallback: no motion, all content visible, stacked.
   Driven by `html[data-motion="reduced"]`. The attribute is set by the
   runtime when either `prefers-reduced-motion: reduce` matches or the
   `?motion=reduced` URL param is present. The @media rule below is a
   belt-and-braces for pages that load with no JS.
   ------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html:not([data-motion]) { }  /* trigger for the ruleset below via CSS var */
  :root { --motion: reduced; }
}

html[data-motion="reduced"],
html:where([data-motion="reduced"]) body {
  scroll-behavior: auto;
}

html[data-motion="reduced"] * {
  transition: none !important;
  animation: none !important;
}

/* Then/Now: both layers stacked in the flow, side-by-side or wrapped. */
html[data-motion="reduced"] .scene-thennow { min-height: 0; display: block; }
html[data-motion="reduced"] .scene-thennow__stage {
  position: static;
  height: auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  background: var(--c-cream);
}
html[data-motion="reduced"] .scene-thennow__layer {
  position: relative;
  inset: auto;
  aspect-ratio: 4 / 3;
  opacity: 1 !important;
}
html[data-motion="reduced"] .scene-thennow__meta {
  position: static;
  padding: 0.5rem;
  color: var(--c-ink-muted);
}
html[data-motion="reduced"] .scene-thennow__meta .media-attribution,
html[data-motion="reduced"] .scene-thennow__meta .colorized-badge,
html[data-motion="reduced"] .scene-thennow__caption {
  color: var(--c-ink-muted);
}
@media (max-width: 640px) {
  html[data-motion="reduced"] .scene-thennow__stage { grid-template-columns: 1fr; }
}

/* Full-bleed: neutralize opacity dimming */
html[data-motion="reduced"] .scene-fullbleed__media .media { opacity: 1; }

/* Map: collapse the scene, hide the interactive stage, show a
   text-only fallback caption in ATH voice. */
html[data-motion="reduced"] .scene-map { min-height: 0; }
html[data-motion="reduced"] .scene-map__stage {
  position: static;
  height: auto;
  display: none;
}
html[data-motion="reduced"] .scene-map[data-static-fallback]::before {
  content: attr(data-static-fallback);
  display: block;
  padding: 2rem var(--gutter);
  background: var(--c-navy);
  color: var(--c-on-navy);
  font-style: italic;
  font-family: var(--ff-body);
}

/* ---------------------------------------------------------------------------
   Family Name Index — /families/, family pages, person pages
   -------------------------------------------------------------------------- */

.families-index { max-width: 900px; margin: 0 auto; }
.families-index__blurb { max-width: 640px; color: var(--c-ink-muted); }
.families-index__search { margin: 2.5rem 0 1.5rem; }
.families-index__search input[type="search"] {
  width: 100%;
  padding: 1rem 1.25rem;
  font-family: var(--ff-body);
  font-size: 1.125rem;
  background: var(--c-cream);
  color: var(--c-near-black);
  border: 2px solid var(--c-navy);
  border-radius: 4px;
}
.families-index__search input[type="search"]:focus {
  outline: 2px solid var(--c-rust);
  outline-offset: 2px;
}
.families-index__results {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
}
.families-index__results li a {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 1rem;
  padding: 0.75rem 1rem;
  background: var(--c-cream);
  border-bottom: 1px solid rgba(0,0,0,0.06);
  color: var(--c-near-black);
  text-decoration: none;
}
.families-index__results li a:hover { background: rgba(193,77,46,0.06); }
.families-index__result-name { font-family: var(--ff-display); font-weight: 500; }
.families-index__result-years { color: var(--c-ink-muted); font-style: italic; }
.families-index__result-surname {
  color: var(--c-rust); font-family: var(--ff-ui);
  font-size: 0.875rem; text-transform: uppercase; letter-spacing: 2px;
}
.families-index__empty {
  padding: 1rem 0;
  color: var(--c-ink-muted);
  font-style: italic;
}
.families-index__empty a { color: var(--c-rust); }
.families-index__browse-heading {
  font-family: var(--ff-display);
  font-size: 1.5rem;
  margin: 3rem 0 1rem;
  color: var(--c-navy);
}
.families-index__az {
  list-style: none;
  padding: 0;
  columns: 2;
  column-gap: 2rem;
}
@media (min-width: 800px) { .families-index__az { columns: 3; } }
.families-index__az li a {
  display: block;
  padding: 0.4rem 0;
  color: var(--c-navy);
  text-decoration: none;
  border-bottom: 1px dotted rgba(28,46,74,0.15);
}
.families-index__az li a:hover { color: var(--c-rust); }
.families-index__count { color: var(--c-ink-muted); font-size: 0.875rem; }
.families-index__grid { display: none; }  /* A-Z is the primary browse */

.family-page__crumb, .person-page__crumb {
  font-family: var(--ff-ui);
  font-size: 0.875rem;
  color: var(--c-ink-muted);
  margin-bottom: 1.5rem;
}
.family-page__crumb a, .person-page__crumb a { color: var(--c-rust); text-decoration: none; }

.family-page__name, .person-page__name {
  font-family: var(--ff-display);
  font-weight: 700;
  color: var(--c-navy);
  margin: 0.5rem 0;
}
.family-page__name { font-size: clamp(2rem, 4.5vw, 3.5rem); }
.person-page__name { font-size: clamp(1.75rem, 4vw, 3rem); }
.family-page__variants, .person-page__aka {
  color: var(--c-ink-muted); font-style: italic; margin: 0.25rem 0 1rem;
}
.person-page__years {
  font-family: var(--ff-display);
  color: var(--c-rust);
  font-size: 1.25rem;
  font-style: italic;
  margin: 0.25rem 0;
}
.person-page__header {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2rem;
  align-items: center;
  margin: 2rem 0;
}
@media (max-width: 640px) { .person-page__header { grid-template-columns: 1fr; } }
.person-page__portrait img {
  width: 180px; height: 180px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--c-navy);
}
.person-page__summary { max-width: 640px; }

.person-page__appears, .person-page__related, .person-page__cta,
.person-page__lookout, .family-page__people, .family-page__cta {
  margin: 3rem 0;
}
.person-page__appears h2, .person-page__related h2, .person-page__cta h2,
.person-page__lookout h2, .family-page__people h2, .family-page__cta h2 {
  font-family: var(--ff-display);
  font-size: 1.5rem;
  color: var(--c-navy);
  margin-bottom: 1rem;
}
.person-page__chapters { list-style: none; padding: 0; }
.person-page__chapters li { margin: 0.5rem 0; }
.person-page__chapters a { color: var(--c-rust); }
.person-page__no-chapters { color: var(--c-ink-muted); font-style: italic; }

.person-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}
.person-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  padding: 1rem;
  background: var(--c-cream);
  border-radius: 4px;
  text-decoration: none;
  color: var(--c-near-black);
  border: 1px solid rgba(28,46,74,0.08);
}
.person-card:hover { border-color: var(--c-rust); }
.person-card__portrait {
  width: 56px; height: 56px; border-radius: 50%;
  overflow: hidden; background: var(--c-navy);
  border: 2px solid var(--c-navy);
}
.person-card__portrait img { width: 100%; height: 100%; object-fit: cover; }
.person-card__portrait--empty {
  background: linear-gradient(135deg, var(--c-navy) 0%, var(--c-sea-glass) 100%);
}
.person-card__name {
  font-family: var(--ff-display);
  font-size: 1.125rem;
  margin: 0 0 0.125rem;
  color: var(--c-navy);
  font-weight: 600;
}
.person-card__years { color: var(--c-ink-muted); font-style: italic; font-size: 0.875rem; margin: 0; }
.person-card__summary {
  color: var(--c-ink-muted);
  font-size: 0.875rem;
  margin: 0.5rem 0 0;
  line-height: 1.4;
}

.family-card {
  display: block;
  padding: 1.25rem;
  background: var(--c-cream);
  border: 1px solid rgba(28,46,74,0.08);
  border-radius: 4px;
  text-decoration: none;
  color: var(--c-near-black);
}
.family-card:hover { border-color: var(--c-rust); }
.family-card__name {
  font-family: var(--ff-display);
  color: var(--c-navy);
  margin: 0;
}
.family-card__count {
  color: var(--c-ink-muted);
  font-size: 0.875rem;
  margin: 0.25rem 0 0;
}

.person-page__cta, .family-page__cta {
  background: var(--c-cream);
  padding: 2rem;
  border-radius: 4px;
  border-left: 4px solid var(--c-rust);
}

.lookout-form { display: grid; gap: 0.75rem; max-width: 480px; }
.lookout-form label { display: block; }
.lookout-form input[type="email"] {
  width: 100%;
  padding: 0.75rem 1rem;
  font-family: var(--ff-body);
  border: 2px solid var(--c-navy);
  border-radius: 4px;
}
.hp { position: absolute; left: -9999px; opacity: 0; }

.person-link {
  color: var(--c-rust);
  text-decoration: underline;
  text-decoration-color: rgba(193,77,46,0.35);
  text-underline-offset: 3px;
}
.person-link:hover { text-decoration-color: currentColor; }

/* Inline citation marks + end-of-chapter Sources block */
sup.cite {
  font-size: 0.7em;
  line-height: 0;
  vertical-align: super;
  margin-left: 0.05em;
}
sup.cite a {
  color: var(--c-rust);
  text-decoration: none;
  font-family: var(--ff-ui);
  font-weight: 500;
  padding: 0 0.2em;
  border-radius: 2px;
}
sup.cite a:hover,
sup.cite a:focus-visible {
  background: rgba(193,77,46,0.10);
  text-decoration: underline;
  text-underline-offset: 2px;
}
sup.cite + sup.cite { margin-left: 0.15em; }
sup.cite:target a,
li.chapter-source:target {
  background: rgba(193,77,46,0.14);
  outline: 2px solid var(--c-rust);
  outline-offset: 2px;
  border-radius: 2px;
}

.chapter-sources {
  max-width: 44rem;
  margin: 4rem auto 3rem;
  padding: 2rem 1.25rem 2.25rem;
  border-top: 1px solid rgba(14,24,38,0.15);
  font-family: var(--ff-body);
}
.chapter-sources h2 {
  font-family: var(--ff-ui);
  font-variant-caps: all-small-caps;
  letter-spacing: 0.12em;
  font-size: 1rem;
  margin: 0 0 1.25rem;
  color: var(--c-navy);
}
.chapter-sources__list {
  list-style: decimal outside;
  padding-left: 2.25rem;
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--c-navy);
}
.chapter-source {
  margin-bottom: 0.9rem;
  padding-left: 0.35rem;
}
.chapter-source__body em { font-style: italic; }
.chapter-source__body {
  display: inline;
}
.chapter-source__url {
  color: var(--c-rust);
  text-decoration: underline;
  text-decoration-color: rgba(193,77,46,0.35);
  text-underline-offset: 2px;
  margin-left: 0.25rem;
}
.chapter-source__backlink {
  color: rgba(14,24,38,0.55);
  margin-left: 0.4rem;
  text-decoration: none;
  font-size: 0.9em;
}
.chapter-source__backlink:hover { color: var(--c-rust); }
.chapter-source__notes {
  display: block;
  margin-top: 0.2rem;
  color: rgba(14,24,38,0.65);
  font-size: 0.85em;
  font-style: italic;
}
.chapter-source__flag {
  display: inline-block;
  font-family: var(--ff-ui);
  font-size: 0.7em;
  font-variant-caps: all-small-caps;
  letter-spacing: 0.08em;
  padding: 0.05em 0.4em;
  border-radius: 2px;
  margin-left: 0.35em;
  vertical-align: 0.05em;
}
.chapter-source__flag--u {
  background: rgba(193,77,46,0.10);
  color: var(--c-rust);
  border: 1px solid rgba(193,77,46,0.35);
}
.chapter-source__flag--d {
  background: rgba(193,77,46,0.20);
  color: var(--c-rust);
  border: 1px solid var(--c-rust);
}
@media (max-width: 600px) {
  .chapter-sources { padding: 1.5rem 1rem 2rem; margin: 3rem auto 2rem; }
  .chapter-sources__list { padding-left: 1.75rem; }
}

/* Chapter figures — constrained to 760px per design language Rule 1.
   Panels are self-contained (cream or dark navy) so figures never float
   on the page gradient.
*/
.chapter-figure {
  margin: 2.25rem auto;
  padding: 0;
  width: 100%;
  max-width: 760px;
  display: block;
}
.chapter-figure__svg,
.chapter-figure__raster {
  display: block;
  width: 100%;
  height: auto;
  max-width: 760px;
}
.chapter-figure__caption {
  font-family: var(--ff-body);
  font-style: italic;
  font-size: 0.85rem;
  line-height: 1.5;
  color: rgba(14, 24, 38, 0.72);
  padding: 0.5rem 0.25rem 0;
  margin: 0;
  text-align: left;
}
@media (max-width: 600px) {
  .chapter-figure { margin: 1.75rem auto; }
  .chapter-figure__caption { font-size: 0.8rem; padding-top: 0.4rem; }
}

/* -------------------------------------------------------------------------
   Pull quote — .wide, Fraunces Italic, rust rule above.
   DESIGN-SYSTEM-v2 §2.
   ------------------------------------------------------------------------- */
.chapter-scenes .pull-quote {
  margin: var(--space-section) auto;
  padding: 2rem clamp(1rem, 4vw, 3rem);
  border: none;
  position: relative;
  text-align: center;
}
.chapter-scenes .pull-quote::before {
  content: "";
  display: block;
  width: 3rem;
  height: 3px;
  background: var(--c-rust);
  margin: 0 auto 1.5rem;
  border-radius: 2px;
}
.chapter-scenes .pull-quote p {
  font-family: var(--ff-display);
  font-style: italic;
  font-size: clamp(1.35rem, 2.6vw, 1.9rem);
  line-height: 1.35;
  color: var(--c-navy);
  margin: 0;
  max-width: 32ch;
  margin-inline: auto;
  font-variation-settings: "opsz" 144;
}
@media (max-width: 900px) {
  .chapter-scenes .pull-quote {
    padding-inline: var(--gutter);
    margin-block: calc(var(--space-section) * 0.7);
  }
}

/* -------------------------------------------------------------------------
   <scrolly-figure> — sticky graphic + scrolling steps.
   DESIGN-SYSTEM-v2 §3.
   Default (no JS OR reduced motion): steps flow in the document; the
   graphic is not sticky. All step text is present regardless — view-source
   remains the acceptance test.
   With JS active (`data-js="on"`): the graphic pins to viewport while
   steps scroll past. Native scroll only.
   ------------------------------------------------------------------------- */

scrolly-figure {
  display: block;
  width: 100%;
}
scrolly-figure .scrolly-figure__sticky {
  display: block;
  width: 100%;
  background: var(--c-cream);
}
scrolly-figure .scrolly-figure__sticky > svg {
  display: block;
  width: 100%;
  height: auto;
  max-height: 78vh;
}
scrolly-figure .scrolly-figure__steps {
  display: block;
  max-width: 720px;
  margin: 2rem auto 0;
}
scrolly-figure .scrolly-figure__step {
  padding: 1.75rem 0;
  border-top: 1px solid rgba(28, 46, 74, 0.14);
}
scrolly-figure .scrolly-figure__step:first-child {
  border-top: none;
  padding-top: 0.5rem;
}
scrolly-figure .scrolly-figure__step-kicker {
  font-family: var(--ff-ui);
  font-variant-caps: all-small-caps;
  letter-spacing: 0.14em;
  font-size: 0.85rem;
  color: var(--c-rust);
  margin: 0 0 0.35rem;
  font-weight: 600;
}
scrolly-figure .scrolly-figure__step p {
  font-family: var(--ff-body);
  font-size: 1.05rem;
  line-height: 1.55;
  color: var(--c-ink);
  margin: 0;
}

/* JS-active sticky layout — kicks in only when the runtime signals. */
scrolly-figure[data-js="on"] {
  position: relative;
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(300px, 460px);
  gap: 2.5rem;
  align-items: start;
  padding: 4rem clamp(1rem, 4vw, 2rem);
}
scrolly-figure[data-js="on"] .scrolly-figure__sticky {
  position: sticky;
  top: max(2rem, calc((100vh - 78vh) / 2));
  align-self: start;
  border: 1px solid rgba(28, 46, 74, 0.14);
}
scrolly-figure[data-js="on"] .scrolly-figure__steps {
  margin: 0;
  max-width: none;
}
scrolly-figure[data-js="on"] .scrolly-figure__step {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-top: none;
  padding: 3rem 0;
}
scrolly-figure[data-js="on"] .scrolly-figure__step:first-child {
  padding-top: 0;
}

/* Mobile: sticky graphic pinned at reduced height above steps.
   Grid stacks; the sticky graphic gets a shorter viewport window. */
@media (max-width: 900px) {
  scrolly-figure[data-js="on"] {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 2.5rem var(--gutter);
  }
  scrolly-figure[data-js="on"] .scrolly-figure__sticky {
    position: sticky;
    top: 0.5rem;
    max-height: 55vh;
    overflow: hidden;
    border-radius: 2px;
  }
  scrolly-figure[data-js="on"] .scrolly-figure__sticky > svg {
    max-height: 55vh;
  }
  scrolly-figure[data-js="on"] .scrolly-figure__step {
    min-height: 90vh;
  }
}

/* Reduced-motion path — collapse to a plain sequence, one graphic per
   step. The runtime marks the component; CSS shows every state via a
   set of copies (rendered in the HTML when the scene is a scrolly). */
scrolly-figure[data-motion="reduced"] .scrolly-figure__sticky {
  position: static;
  max-height: none;
}

/* -------------------------------------------------------------------------
   Artifact chip — inline pill (default) / Tufte sidenote at ≥1200px.
   DESIGN-SYSTEM-v2 §5.
   ------------------------------------------------------------------------- */
.artifact-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.65rem 0.35rem 0.4rem;
  margin: 0.15rem 0.15rem 0.15rem 0.05rem;
  background: var(--c-navy);
  color: var(--c-on-navy);
  text-decoration: none;
  border-radius: 999px;
  font-family: var(--ff-ui);
  font-size: 0.72rem;
  line-height: 1.2;
  letter-spacing: 0.02em;
  vertical-align: middle;
  max-width: 100%;
}
.artifact-chip:hover,
.artifact-chip:focus-visible {
  color: var(--c-on-navy);
  background: #253c60;
  outline: none;
  box-shadow: 0 0 0 2px var(--c-rust);
}
.artifact-chip__thumb {
  display: block;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  object-fit: cover;
  flex: 0 0 auto;
}
.artifact-chip__thumb--empty {
  background: var(--c-rust);
}
.artifact-chip__body {
  display: inline-flex;
  align-items: baseline;
  gap: 0.4rem;
  min-width: 0;
}
.artifact-chip__title {
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.artifact-chip__date {
  color: var(--c-on-navy-muted);
  font-variant-numeric: tabular-nums;
  font-size: 0.68rem;
}

/* Desktop ≥1200px — chip becomes a Tufte sidenote in the right margin
   of its containing paragraph. Requires the paragraph to be the
   positioning context, which we set here without upsetting the drop
   cap or normal flow. */
@media (min-width: 1200px) {
  .chapter-scenes .prose > p:has(.artifact-chip) {
    position: relative;
  }
  .chapter-scenes .prose .artifact-chip {
    position: absolute;
    left: 100%;
    top: 0.15rem;
    margin-left: 1.25rem;
    width: 14rem;
    max-width: calc(100vw - 100% - 3rem - var(--gutter));
    padding: 0.75rem 0.85rem;
    border-radius: 4px;
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    font-size: 0.75rem;
    line-height: 1.35;
    background: var(--c-navy);
  }
  .chapter-scenes .prose .artifact-chip__thumb {
    width: 44px;
    height: 44px;
    border-radius: 2px;
  }
  .chapter-scenes .prose .artifact-chip__body {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.15rem;
    min-width: 0;
  }
  .chapter-scenes .prose .artifact-chip__title {
    font-family: var(--ff-body);
    font-weight: 500;
    font-size: 0.82rem;
    white-space: normal;
    text-transform: none;
    letter-spacing: 0;
  }
  .chapter-scenes .prose .artifact-chip__date {
    font-family: var(--ff-ui);
    font-variant-caps: all-small-caps;
    letter-spacing: 0.1em;
    font-size: 0.7rem;
    color: var(--c-on-navy-muted);
  }
}

/* -------------------------------------------------------------------------
   Archive strip — "From the archive" at the end of a section.
   DESIGN-SYSTEM-v2 §5.
   ------------------------------------------------------------------------- */
.archive-strip {
  margin: var(--space-section) auto;
  padding: 2rem 1rem;
  border-top: 1px solid rgba(28, 46, 74, 0.14);
  border-bottom: 1px solid rgba(28, 46, 74, 0.14);
}
.archive-strip__label {
  font-family: var(--ff-ui);
  font-variant-caps: all-small-caps;
  letter-spacing: 0.18em;
  font-size: 0.85rem;
  color: var(--c-ink-muted);
  margin: 0 0 1rem;
  text-align: center;
  font-weight: 600;
}
.archive-strip__grid {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
}
.archive-strip__card > a {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  text-decoration: none;
  color: var(--c-ink);
  padding: 0.5rem;
  border-radius: 2px;
  transition: background 180ms ease;
}
.archive-strip__card > a:hover,
.archive-strip__card > a:focus-visible {
  background: rgba(28, 46, 74, 0.06);
  outline: none;
}
.archive-strip__thumb {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: rgba(28, 46, 74, 0.08);
  border-radius: 2px;
}
.archive-strip__thumb--empty {
  background: var(--c-rust);
  opacity: 0.6;
}
.archive-strip__title {
  font-family: var(--ff-body);
  font-size: 0.85rem;
  line-height: 1.3;
  color: var(--c-navy);
}
.archive-strip__date {
  font-family: var(--ff-ui);
  font-variant-caps: all-small-caps;
  letter-spacing: 0.1em;
  font-size: 0.72rem;
  color: var(--c-ink-muted);
}

/* -------------------------------------------------------------------------
   Chapter-end furniture — Objects + People grids.
   DESIGN-SYSTEM-v2 §5.
   ------------------------------------------------------------------------- */
.chapter-furniture {
  max-width: var(--measure-wide);
  margin: 4rem auto 2rem;
  padding: 3rem clamp(1rem, 4vw, 2rem) 2rem;
  border-top: 2px solid rgba(28, 46, 74, 0.12);
}
.chapter-furniture h2 {
  font-family: var(--ff-ui);
  font-variant-caps: all-small-caps;
  letter-spacing: 0.16em;
  font-size: 0.95rem;
  color: var(--c-navy);
  margin: 0 0 1.25rem;
  font-weight: 600;
}
.chapter-furniture__section {
  margin-bottom: 3rem;
}
.chapter-furniture__grid {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
}
.chapter-furniture__grid > li > a {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  text-decoration: none;
  color: var(--c-ink);
  padding: 0.5rem 0.5rem 0.75rem;
  border-radius: 2px;
  transition: background 180ms ease;
}
.chapter-furniture__grid > li > a:hover,
.chapter-furniture__grid > li > a:focus-visible {
  background: rgba(28, 46, 74, 0.06);
  outline: none;
}
.chapter-furniture__thumb {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 2px;
  background: rgba(28, 46, 74, 0.08);
}
.chapter-furniture__thumb--person {
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--c-navy);
  color: var(--c-on-navy);
  font-family: var(--ff-display);
  font-size: 1.75rem;
  font-weight: 500;
  border-radius: 999px;
  width: 72px;
  height: 72px;
}
.chapter-furniture__title {
  font-family: var(--ff-body);
  font-size: 0.85rem;
  line-height: 1.3;
  color: var(--c-navy);
}
.chapter-furniture__meta {
  font-family: var(--ff-ui);
  font-variant-caps: all-small-caps;
  letter-spacing: 0.1em;
  font-size: 0.72rem;
  color: var(--c-ink-muted);
}

/* -------------------------------------------------------------------------
   OpenSeadragon deep-zoom viewer.
   DESIGN-SYSTEM-v2 §4.
   Default = static fallback image + "Enter the object" button. The JS
   swaps in the OSD viewer on interaction intent (button click) or on
   viewport approach.
   ------------------------------------------------------------------------- */
.osd-viewer {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  background: var(--c-near-black);
  overflow: hidden;
  border-radius: 2px;
  cursor: zoom-in;
}
.osd-viewer__fallback {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: var(--c-near-black);
}
.osd-viewer__enter {
  position: absolute;
  right: 0.75rem;
  bottom: 0.75rem;
  padding: 0.5rem 0.9rem;
  border: none;
  border-radius: 999px;
  background: var(--c-navy);
  color: var(--c-on-navy);
  font-family: var(--ff-ui);
  font-size: 0.75rem;
  font-variant-caps: all-small-caps;
  letter-spacing: 0.12em;
  cursor: pointer;
  transition: background 180ms ease;
  z-index: 2;
}
.osd-viewer__enter:hover,
.osd-viewer__enter:focus-visible {
  background: var(--c-rust);
  outline: none;
}
.osd-viewer--activating .osd-viewer__enter {
  opacity: 0.5;
  pointer-events: none;
}
.osd-viewer--active .osd-viewer__fallback,
.osd-viewer--active .osd-viewer__enter {
  display: none;
}
.osd-viewer--active {
  cursor: default;
}
