/* ============================================================
   STADUM FAMILY ARCHIVE — Design System
   stadum.css  v1.0
   ============================================================ */

/* ── Accessibility: skip-to-main-content ──────────────────── */
#skip-to-main {
  position: absolute;
  top: -100%;
  left: 16px;
  z-index: 10000;
  padding: 10px 20px;
  background: var(--green, #3C5A47);
  color: #fff;
  font-family: var(--sans, sans-serif);
  font-size: 14px;
  font-weight: 600;
  border-radius: 0 0 4px 4px;
  text-decoration: none;
  transition: top 0.15s;
}
#skip-to-main:focus {
  top: 0;
  outline: 3px solid var(--brass, #A9854E);
  outline-offset: 2px;
}

/* ── Fonts ─────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Newsreader:ital,opsz,wght@0,6..72,300;0,6..72,400;0,6..72,500;0,6..72,600;1,6..72,300;1,6..72,400&family=Archivo:wght@400;500;600;700&family=Space+Mono:wght@400;700&display=swap');

/* ── Tokens ─────────────────────────────────────────────────── */
:root {

  /* Color — backgrounds */
  --paper:   #F4EEE2;
  --paper-2: #EFE7D6;
  --paper-3: #E8DFCB;

  /* Color — ink */
  --ink:      #23211C;
  --ink-70:   #544F44;
  --ink-50:   #837C6D;
  --ink-soft: rgba(35,33,28,0.33);
  --line:     rgba(35,33,28,0.13);
  --line-2:   rgba(35,33,28,0.07);

  /* Color — identity */
  --green:       #3C5A47;
  --green-2:     #2F4838;
  --green-tint:  #E4E9E0;

  /* Color — editorial accents */
  --brass:       #A9854E;
  --brass-2:     #8A6C3C;
  --brass-soft:  #C9A86A;
  --brass-tint:  #EFE3CB;

  /* Color — semantic */
  --blue:        #35495E;   /* place / map */
  --amber:       #9A7A2E;   /* review / uncertain */
  --terracotta:  #8C4A3B;   /* error / destructive */
  --slate:       #7A6F5C;   /* theme / topic */

  /* Color — status tints */
  --tint-draft:    rgba(154,122,46,0.12);
  --tint-review:   rgba(169,133,78,0.14);
  --tint-private:  rgba(140,74,59,0.10);
  --tint-ok:       rgba(60,90,71,0.10);
  --tint-uncertain:rgba(122,111,92,0.12);

  /* Typography */
  --serif: 'Newsreader', Georgia, 'Times New Roman', serif;
  --sans:  'Archivo', system-ui, -apple-system, sans-serif;
  --mono:  'Space Mono', 'SFMono-Regular', monospace;

  /* Type scale */
  --text-display: 400 78px/0.98 var(--serif);
  --text-h1:      400 44px/1.05 var(--serif);
  --text-h2:      400 38px/1.08 var(--serif);
  --text-h3:      500 24px/1.18 var(--serif);
  --text-lead:    300 22px/1.5  var(--serif);
  --text-body:    400 19px/1.62 var(--serif);
  --text-body-sm: 400 16px/1.5  var(--serif);
  --text-eyebrow: 600 12px/.9   var(--sans);
  --text-caption: 400 12px/1.4  var(--mono);
  --text-credit:  400 11px/1.35 var(--mono);

  /* Spacing */
  --sp-1:  4px;
  --sp-2:  8px;
  --sp-3:  12px;
  --sp-4:  16px;
  --sp-5:  24px;
  --sp-6:  32px;
  --sp-7:  48px;
  --sp-8:  64px;
  --sp-9:  88px;
  --sp-10: 120px;

  /* Layout widths */
  --w-narrow:  720px;
  --w-content: 1140px;
  --w-wide:    1280px;

  /* Radius */
  --r-sm:   3px;
  --r-md:   4px;
  --r-lg:   6px;
  --r-pill: 40px;

  /* Shadow */
  --shadow-card:  0 8px 24px -16px rgba(35,33,28,0.32);
  --shadow-hover: 0 14px 30px -18px rgba(35,33,28,0.45);
  --shadow-green: 0 18px 40px -20px rgba(60,90,71,0.7);

  /* Transition */
  --ease: .18s ease;
}

/* ── Reset & Base ────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: var(--text-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
/* Content-body links should be visibly blue */
.ls-prose a,
.ls-panel__body a,
.etl-desc a,
.wtl-desc a,
.wtl-body a,
.ls-time__body a,
.source-card__body a,
.ls-section p a,
.ls-two p a {
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.ls-prose a:hover,
.ls-panel__body a:hover,
.ls-section p a:hover,
.ls-two p a:hover {
  color: #1d4ed8;
}
img { display: block; max-width: 100%; }
::selection { background: var(--brass-tint); }

/* ── Layout helpers ──────────────────────────────────────────── */
.wrap        { max-width: var(--w-content); margin: 0 auto; padding: 0 40px; }
.wrap--narrow { max-width: var(--w-narrow);  margin: 0 auto; padding: 0 40px; }
.wrap--wide   { max-width: var(--w-wide);    margin: 0 auto; padding: 0 40px; }

/* ── Type utilities ──────────────────────────────────────────── */
.eyebrow {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brass-2);
}
.mono { font-family: var(--mono); font-size: 12px; letter-spacing: 0.02em; }
.caption { font: var(--text-caption); color: var(--ink-50); }
.credit  { font: var(--text-credit);  color: var(--ink-50); font-style: italic; }
.lead    { font: var(--text-lead); }

/* ============================================================
   GLOBAL CHROME
   ============================================================ */

/* ── Top navigation bar ──────────────────────────────────────── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 200;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.topbar .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: 56px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}
/* Wordmark */
.wordmark {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  color: var(--ink);
}
.wordmark__mark {
  width: 10px;
  height: 10px;
  background: var(--green);
  transform: rotate(45deg);
  border-radius: 1px;
  flex: none;
}
/* Nav links (center) */
.topbar-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
}
.topbar-nav__link {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-70);
  padding: 6px 11px;
  border-radius: 5px;
  transition: color .13s, background .13s;
  white-space: nowrap;
  letter-spacing: 0.01em;
}
.topbar-nav__link:hover,
.topbar-nav__link.active { color: var(--ink); background: var(--paper-2); }
/* Dropdown */
.topbar-nav__dropdown {
  position: relative;
}
.topbar-nav__dropdown-btn {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-70);
  padding: 6px 11px;
  border-radius: 5px;
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: color .13s, background .13s;
  white-space: nowrap;
  letter-spacing: 0.01em;
}
.topbar-nav__dropdown-btn:hover,
.topbar-nav__dropdown.open .topbar-nav__dropdown-btn {
  color: var(--ink); background: var(--paper-2);
}
.topbar-nav__dropdown-btn svg {
  width: 12px; height: 12px;
  transition: transform .2s;
}
.topbar-nav__dropdown.open .topbar-nav__dropdown-btn svg { transform: rotate(-180deg); }
.topbar-nav__menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 200px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 7px;
  box-shadow: 0 8px 24px rgba(35,33,28,.1);
  padding: 6px;
  display: none;
  z-index: 300;
}
.topbar-nav__dropdown.open .topbar-nav__menu { display: block; }
.topbar-nav__menu a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 5px;
  font-family: var(--sans);
  font-size: 13px;
  color: var(--ink-70);
  transition: background .12s, color .12s;
}
.topbar-nav__menu a:hover { background: var(--paper-2); color: var(--ink); }
.topbar-nav__menu-label {
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-50);
  padding: 8px 12px 4px;
}
.topbar-nav__divider {
  height: 1px;
  background: var(--line);
  margin: 4px 0;
}
/* Right-side context + actions */
.topbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.topbar__label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--ink-50);
  text-transform: uppercase;
  white-space: nowrap;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* Mobile collapse button */
.topbar-hamburger {
  display: none;
  background: none;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 6px 8px;
  cursor: pointer;
  color: var(--ink-70);
}
.topbar-hamburger svg { display: block; width: 16px; height: 16px; }
/* Mobile collapse panel */
.topbar-collapse {
  display: none;
  flex-direction: column;
  gap: 2px;
  padding: 10px 16px 14px;
  border-top: 1px solid var(--line);
  background: var(--paper);
}
.topbar-collapse.open { display: flex; }
.topbar-collapse a {
  font-family: var(--sans);
  font-size: 14px;
  color: var(--blue);
  padding: 9px 12px;
  border-radius: 5px;
  transition: background .12s, color .12s;
}
.ls-lightbox__close { position: fixed; top: 16px; right: 16px; background: #ffffff; color: var(--ink); border: 0; border-radius: 999px; width: 38px; height: 38px; font-size: 22px; cursor: pointer; }
.archive-tile[data-lightbox] { cursor: pointer; }

/* ── TimelineJS Overrides ── */
.tl-timeline, .tl-storyslider, .tl-slide, .tl-slide-content, .tl-slide-scrollable-container, .tl-timenav, .tl-media {
  background-color: #ffffff !important;
}
.tl-text-content p, .tl-text-content h1, .tl-text-content h2, .tl-text-content h3 {
  color: var(--ink) !important;
}
.tl-slide-background {
  background-color: #ffffff !important;
}

.topbar-collapse a:hover { background: var(--paper-2); color: var(--ink); }
.topbar-collapse__sep {
  height: 1px;
  background: var(--line);
  margin: 6px 0;
}
/* Responsive breakpoints */
@media (max-width: 860px) {
  .topbar-nav { display: none; }
  .topbar-hamburger { display: flex; align-items: center; }
}
@media (max-width: 540px) {
  .topbar__label { display: none; }
  .topbar .wrap { padding: 0 16px; }
}

/* ── Topbar / Nav Search ─────────────────────────────────────── */
.site-search {
  position: relative;
  display: flex;
  align-items: center;
  margin-left: auto;
  margin-right: 16px;
}
.site-search__input {
  width: 200px;
  padding: 7px 32px 7px 12px;
  font-family: var(--sans);
  font-size: 13px;
  color: var(--ink);
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  outline: none;
  transition: border-color .15s, width .2s, background .15s;
  cursor: pointer;
}
.site-search__input:focus {
  border-color: var(--green);
  background: var(--paper);
  width: 240px;
  cursor: text;
}
.site-search__input::placeholder { color: var(--ink-50); }
.site-search__icon {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--ink-50);
  display: flex;
}
/* Homepage nav variant */
.site-nav .site-search { margin-left: 0; margin-right: 0; }
.site-nav .site-search__input { width: 200px; }
.site-nav .site-search__input:focus { width: 240px; }
@media (max-width: 700px) {
  .site-search__input { width: 130px; }
  .site-search__input:focus { width: 160px; }
}

/* ── Breadcrumbs ─────────────────────────────────────────────── */
.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--sans);
  font-size: 12.5px;
  letter-spacing: 0.04em;
  color: var(--ink-50);
  padding: 10px 0;
}
.breadcrumbs a { color: var(--blue); }
.breadcrumbs a:hover { color: var(--green); }
.breadcrumbs__sep { color: var(--ink-50); opacity: .5; }
.breadcrumbs__current { color: var(--ink); }

/* ── Sticky subnav ───────────────────────────────────────────── */
.subnav {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(244,238,226,0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.subnav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}
.subnav__who {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 500;
  opacity: 0;
  transform: translateY(4px);
  transition: all .25s ease;
  pointer-events: none;
}
.subnav.scrolled .subnav__who { opacity: 1; transform: none; }
.subnav nav { display: flex; gap: 6px; }
.subnav a {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--blue);
  padding: 8px 14px;
  border-radius: var(--r-sm);
  transition: color var(--ease), background var(--ease);
  position: relative;
}
.subnav a:hover { color: var(--ink); }
.subnav a.active { color: var(--green); }
.subnav a.active::after {
  content: "";
  position: absolute;
  left: 14px; right: 14px; bottom: 2px;
  height: 2px;
  background: var(--green);
}

/* ── Footer / source note ─────────────────────────────────────── */
.site-footer { padding: 64px 0 72px; background: var(--paper); }
.site-footer__grid {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--sp-7);
  flex-wrap: wrap;
}
.site-footer__note {
  max-width: 54ch;
  font: 300 18px/1.55 var(--serif);
  color: var(--ink-70);
}
.site-footer__tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: var(--sp-5); }
.site-footer__tags span {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  padding: 5px 12px;
  color: var(--ink-50);
}
.site-footer__brand { font-family: var(--sans); text-align: right; }
.site-footer__brand-name {
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 14px;
}
.site-footer__brand-sub {
  font-size: 12.5px;
  color: var(--ink-50);
  margin-top: 8px;
  letter-spacing: 0.04em;
  line-height: 1.5;
}

/* ============================================================
   PAGE STRUCTURE
   ============================================================ */

/* ── Section base ────────────────────────────────────────────── */
.sec { padding: var(--sp-9) 0; border-bottom: 1px solid var(--line); }
.sec--alt { background: var(--paper-2); }
.sec--dark { background: var(--ink); color: var(--paper); border-bottom: none; }
.sec--dark .sec-head h2 { color: var(--paper); }
.sec--dark .eyebrow { color: var(--brass-soft); }

.sec-head { margin-bottom: var(--sp-7); }
.sec-head h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 38px;
  line-height: 1.08;
  letter-spacing: -0.015em;
  margin: 14px 0 0;
}
section[id] { scroll-margin-top: 70px; }

/* ── Hero ────────────────────────────────────────────────────── */
.hero { padding: 74px 0 64px; border-bottom: 1px solid var(--line); }
.hero-grid {
  display: grid;
  grid-template-columns: 1.02fr 0.78fr;
  gap: var(--sp-8);
  align-items: center;
}
.hero h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 78px;
  line-height: 0.98;
  letter-spacing: -0.02em;
  margin: 18px 0 0;
  text-wrap: balance;
}
.hero__sub {
  font-size: 22px;
  line-height: 1.5;
  color: var(--ink-70);
  margin: 24px 0 0;
  max-width: 30ch;
  font-weight: 300;
}
.hero__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 30px;
  font-family: var(--sans);
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--ink-50);
  text-transform: uppercase;
}
.hero__meta .dot {
  width: 3px; height: 3px;
  border-radius: 50%;
  background: var(--ink-50);
  flex: none;
}
.cta-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 38px; }

/* ── Story overview / intro block ────────────────────────────── */
.story-intro .lead {
  font-family: var(--serif);
  font-weight: 300;
  font-size: 30px;
  line-height: 1.45;
  letter-spacing: -0.01em;
  max-width: 24ch;
}
.story-intro-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: var(--sp-8);
  align-items: start;
}
.story-intro__body { font-size: 19px; color: var(--ink-70); max-width: 46ch; }
.story-intro__body p { margin: 0 0 18px; }
.story-intro__body p:last-child { margin-bottom: 0; }

.pull-stats {
  margin-top: 30px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
}
.pull-stat { display: flex; flex-direction: column; gap: 4px; }
.pull-stat__num {
  font-family: var(--serif);
  font-size: 34px;
  line-height: 1;
  color: var(--green);
}
.pull-stat__label {
  font-family: var(--sans);
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-50);
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  font-family: var(--sans);
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  padding: 14px 24px;
  border-radius: var(--r-sm);
  cursor: pointer;
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: all var(--ease);
}
.btn--primary   { background: var(--green); color: var(--paper); }
.btn--primary:hover { background: var(--green-2); transform: translateY(-1px); }
.btn--secondary { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--secondary:hover { border-color: var(--ink); background: rgba(35,33,28,0.03); }
.btn--ghost     { background: transparent; color: var(--green); border-color: var(--green-tint); }
.btn--ghost:hover { border-color: var(--green); background: var(--green-tint); }
.btn--sm { font-size: 13px; padding: 9px 16px; }
.btn--lg { font-size: 16px; padding: 18px 30px; }
.btn__icon { width: 15px; height: 15px; flex: none; }

/* ============================================================
   MEDIA PLACEHOLDERS / FRAMES
   ============================================================ */
.ph {
  position: relative;
  overflow: hidden;
  background: var(--paper-3);
  background-image: repeating-linear-gradient(135deg, rgba(35,33,28,0.05) 0 2px, transparent 2px 11px);
  border: 1px solid var(--line);
}
.ph--photo { filter: grayscale(1) contrast(1.02); }
.ph--doc {
  background-image: repeating-linear-gradient(0deg, rgba(35,33,28,0.05) 0 1px, transparent 1px 9px);
}
.spine__year {
  position: absolute; left: 12px; right: 0;
  text-align: center;
  padding-left: 0;
  padding-top: 12px;
  font-family: var(--mono); font-size: 9px; letter-spacing: 0.06em;
  color: var(--ink-50); margin-top: 48px;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  line-height: 1;
}
.ph__cap {
  position: absolute;
  left: 12px; bottom: 11px; right: 12px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.04em;
  color: var(--ink-50);
  text-transform: uppercase;
  line-height: 1.4;
}
.ph__tag {
  position: absolute;
  top: 12px; left: 12px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 4px 8px;
  color: var(--ink-70);
  text-transform: uppercase;
}
.media-frame {
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
}
.media-caption {
  padding: var(--sp-3) var(--sp-4);
  font: var(--text-caption);
  color: var(--ink-50);
  border-top: 1px solid var(--line);
  background: var(--paper-2);
}
.media-credit {
  font: var(--text-credit);
  color: var(--ink-50);
  font-style: italic;
}

/* ============================================================
   TAGS & BADGES
   ============================================================ */
.tag {
  display: inline-flex;
  align-items: center;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  padding: 4px 11px;
  color: var(--ink-50);
  background: var(--paper);
}
.tag--theme   { color: var(--slate);       border-color: rgba(122,111,92,0.3);  background: var(--tint-uncertain); }
.tag--place   { color: var(--blue);        border-color: rgba(53,73,94,0.3);    background: rgba(53,73,94,0.07); }
.tag--person  { color: var(--brass-2);     border-color: rgba(169,133,78,0.3);  background: var(--brass-tint); }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  border: 1px solid transparent;
}
/* status */
.badge--public    { color: var(--green);      background: var(--tint-ok);      border-color: rgba(60,90,71,0.25); }
.badge--draft     { color: var(--amber);      background: var(--tint-draft);   border-color: rgba(154,122,46,0.3); }
.badge--private   { color: var(--terracotta); background: var(--tint-private); border-color: rgba(140,74,59,0.25); }
.badge--review    { color: var(--brass-2);    background: var(--tint-review);  border-color: rgba(169,133,78,0.3); }
/* confidence */
.badge--confirmed   { color: var(--green);   background: var(--tint-ok);       border-color: rgba(60,90,71,0.25); }
.badge--uncertain   { color: var(--slate);   background: var(--tint-uncertain); border-color: rgba(122,111,92,0.3); }
.badge--unverified  { color: var(--amber);   background: var(--tint-draft);    border-color: rgba(154,122,46,0.3); }
/* counts */
.badge--count {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-50);
  background: transparent;
  border-color: var(--line);
  padding: 3px 9px;
}

.badge__dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; flex: none; }

/* date badge */
.date-badge {
  display: inline-block;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.06em;
  color: var(--brass-2);
}

/* ============================================================
   CARDS — Archive
   ============================================================ */

/* ── Card base ───────────────────────────────────────────────── */
.card {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color var(--ease), transform var(--ease), box-shadow var(--ease);
}
.card:hover {
  border-color: var(--brass);
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}
.card__thumb {
  position: relative;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.card__thumb img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.card__body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.card__foot {
  margin-top: auto;
  padding-top: 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

/* ── Person profile card ─────────────────────────────────────── */
.person-card { }
.person-card .card__thumb { aspect-ratio: 3/4; }
.person-card .card__thumb .ph { height: 100%; }
.person-card__name {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 22px;
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 10px 0 0;
}
.person-card__dates {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--brass-2);
  margin-top: 6px;
}
.person-card__role {
  font-family: var(--sans);
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-50);
  margin-top: 5px;
}
.person-card__bio {
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink-70);
  margin: 12px 0 0;
}
.person-card__link {
  font-family: var(--sans);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--green);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ── Event card ──────────────────────────────────────────────── */
.event-card .card__thumb { aspect-ratio: 16/10; }
.event-card .card__thumb .ph { height: 100%; }
.event-card__year { font-family: var(--mono); font-size: 13px; letter-spacing: 0.06em; color: var(--brass-2); }
.event-card__title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 23px;
  line-height: 1.18;
  margin: 10px 0 0;
  letter-spacing: -0.01em;
}
.event-card__desc { font-size: 16px; line-height: 1.5; color: var(--ink-70); margin: 12px 0 0; }

/* ── Story card ──────────────────────────────────────────────── */
.story-card .card__thumb { aspect-ratio: 3/2; }
.story-card__label { }
.story-card__title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 22px;
  line-height: 1.16;
  letter-spacing: -0.01em;
  margin: 10px 0 0;
}
.story-card__excerpt { font-size: 16px; color: var(--ink-70); margin: 10px 0 0; line-height: 1.5; }

/* ── Source / asset card ─────────────────────────────────────── */
.source-card { cursor: pointer; }
.source-card .card__thumb { aspect-ratio: 5/4; position: relative; }
.source-card .card__thumb .ph { height: 100%; }
.source-card--photo .card__thumb .ph { filter: grayscale(1); }
.source-card--doc .card__thumb .ph,
.source-card--pdf .card__thumb .ph { }

.type-label {
  position: absolute;
  top: 12px; left: 12px;
  font-family: var(--sans);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 9px;
  border-radius: 2px;
  background: var(--paper);
  border: 1px solid var(--line);
  color: var(--ink-70);
  z-index: 1;
}
.source-card--photo .type-label { color: var(--green); }
.source-card--pdf .type-label   { color: var(--brass-2); }

.doc-glyph {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--serif);
  font-size: 46px;
  color: rgba(35,33,28,0.16);
}
.source-card__title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 19px;
  line-height: 1.22;
  margin: 0;
  letter-spacing: -0.005em;
}
.source-card__by {
  font-size: 14.5px;
  color: var(--ink-50);
  margin: 6px 0 0;
  font-style: italic;
  font-weight: 300;
}
.source-card__view {
  margin-top: auto;
  padding-top: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--sans);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--green);
}
.source-card__view .arr { transition: transform var(--ease); }
.source-card:hover .source-card__view .arr { transform: translateX(4px); }

/* ── Media card ──────────────────────────────────────────────── */
.media-card .card__thumb { aspect-ratio: 16/9; }

/* ============================================================
   PERSON PROFILE BLOCK (full-width)
   ============================================================ */
.person-block {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: var(--sp-8);
  align-items: start;
}
.person-block__photo {
  aspect-ratio: 3/4;
  border: 1px solid var(--line);
  overflow: hidden;
  border-radius: var(--r-md);
}
.person-block__name {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 44px;
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin: 0 0 var(--sp-2);
}
.person-block__dates {
  font-family: var(--mono);
  font-size: 14px;
  letter-spacing: 0.08em;
  color: var(--brass-2);
  margin-bottom: var(--sp-4);
}
.person-block__bio { font-size: 19px; line-height: 1.6; color: var(--ink-70); max-width: 52ch; }

/* ============================================================
   AVATAR STACK
   ============================================================ */
.avatar-stack { display: flex; align-items: center; }
.avatar-stack__av {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--paper-3);
  border: 2px solid var(--paper);
  margin-left: -8px;
  background-image: repeating-linear-gradient(135deg, rgba(35,33,28,0.08) 0 2px, transparent 2px 6px);
  overflow: hidden;
}
.avatar-stack__av:first-child { margin-left: 0; }
.avatar-stack__av img { width: 100%; height: 100%; object-fit: cover; }

/* chip-meta shorthand */
.chip-meta {
  font-family: var(--sans);
  font-size: 11.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-50);
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.chip-meta__dot { width: 3px; height: 3px; border-radius: 50%; background: var(--ink-50); }

/* ============================================================
   AUDIO EPISODE CARD
   ============================================================ */
.audio-card {
  background: var(--green);
  color: #EFE7D6;
  border-radius: var(--r-lg);
  padding: 46px 48px;
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 54px;
  align-items: center;
  position: relative;
  overflow: hidden;
}
.audio-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: repeating-linear-gradient(135deg, rgba(255,255,255,0.025) 0 2px, transparent 2px 14px);
}
.audio-card__status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--sans);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #D9C79A;
  border: 1px solid rgba(217,199,154,0.4);
  padding: 6px 12px;
  border-radius: var(--r-pill);
}
.audio-card__status-dot { width: 6px; height: 6px; border-radius: 50%; background: #D9C79A; }
.audio-card__title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 33px;
  line-height: 1.1;
  letter-spacing: -0.015em;
  margin: 20px 0 0;
}
.audio-card__desc {
  font-size: 17px;
  line-height: 1.5;
  color: rgba(239,231,214,0.78);
  margin: 14px 0 0;
  font-weight: 300;
  max-width: 34ch;
}

/* ── Player ──────────────────────────────────────────────────── */
.player { position: relative; z-index: 1; }
.player__top { display: flex; align-items: center; gap: 18px; }
.play-btn {
  width: 62px; height: 62px;
  border-radius: 50%;
  background: #EFE7D6;
  color: var(--green);
  border: none;
  cursor: pointer;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .15s ease;
}
.play-btn:hover { transform: scale(1.05); }
.play-btn svg { width: 22px; height: 22px; }
.player__info { display: flex; flex-direction: column; gap: 3px; }
.player__title {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #EFE7D6;
}
.player__sub { font-family: var(--mono); font-size: 12px; color: rgba(239,231,214,0.7); }
.player__wave {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 54px;
  margin: 26px 0 14px;
  cursor: pointer;
}
.player__bar { flex: 1; background: rgba(239,231,214,0.28); border-radius: 2px; transition: background .1s ease; min-height: 5px; }
.player__bar--played { background: #D9C79A; }
.player__scrub { height: 4px; background: rgba(239,231,214,0.22); border-radius: var(--r-sm); position: relative; cursor: pointer; }
.player__fill { position: absolute; left: 0; top: 0; bottom: 0; background: #EFE7D6; border-radius: var(--r-sm); }
.player__knob { position: absolute; top: 50%; width: 12px; height: 12px; border-radius: 50%; background: #EFE7D6; transform: translate(-50%,-50%); }
.player__times { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 12px; color: rgba(239,231,214,0.7); margin-top: 10px; }

/* ── Audio episode card (compact / list variant) ─────────────── */
.audio-episode {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  transition: border-color var(--ease), transform var(--ease);
}
.audio-episode:hover { border-color: var(--green); transform: translateY(-1px); }
.audio-episode__play {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--green);
  color: var(--paper);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  cursor: pointer;
  transition: background var(--ease);
}
.audio-episode__play:hover { background: var(--green-2); }
.audio-episode__play svg { width: 16px; height: 16px; }
.audio-episode__info { flex: 1; min-width: 0; }
.audio-episode__title {
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.005em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.audio-episode__meta { font-family: var(--mono); font-size: 11.5px; color: var(--ink-50); margin-top: 4px; }

/* ============================================================
   RELATIONSHIP MAP
   ============================================================ */
.relmap-wrap { display: grid; grid-template-columns: 0.62fr 1fr; gap: 54px; align-items: center; }
.relmap { position: relative; height: 540px; width: 100%; }
.relmap__lines { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.relmap__lines line { stroke: rgba(35,33,28,0.22); stroke-width: 1; }
.relmap__center {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%,-50%);
  z-index: 3;
  width: 148px; height: 148px;
  border-radius: 50%;
  background: var(--green);
  color: #EFE7D6;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  box-shadow: var(--shadow-green);
  border: 5px solid var(--paper);
}
.relmap__center-name {
  font-family: var(--serif);
  font-size: 20px;
  line-height: 1.05;
  font-weight: 500;
  padding: 0 14px;
}
.relmap__center-role {
  font-family: var(--sans);
  font-size: 9.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #D9C79A;
  margin-top: 6px;
}
.relmap__node {
  position: absolute;
  transform: translate(-50%,-50%);
  z-index: 2;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  padding: 9px 15px;
  display: flex;
  align-items: center;
  gap: 9px;
  white-space: nowrap;
  transition: border-color var(--ease), transform var(--ease), box-shadow var(--ease);
  cursor: default;
}
.relmap__node:hover {
  border-color: var(--brass);
  transform: translate(-50%,-50%) scale(1.04);
  box-shadow: var(--shadow-card);
}
.relmap__node-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.relmap__node-name { font-family: var(--sans); font-size: 13.5px; font-weight: 500; letter-spacing: 0.01em; }
.relmap__node-rel { font-family: var(--sans); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-50); display: block; }

/* node color key */
.c-person { background: var(--brass); }
.c-place  { background: var(--blue); }
.c-org    { background: var(--green); }
.c-theme  { background: var(--slate); }

/* legend */
.relmap-legend { display: flex; flex-direction: column; gap: 18px; }
.relmap-legend__item { display: flex; gap: 14px; align-items: flex-start; }
.relmap-legend__swatch { width: 11px; height: 11px; border-radius: 50%; flex: none; margin-top: 5px; }
.relmap-legend__title { font-family: var(--sans); font-size: 14px; font-weight: 600; letter-spacing: 0.02em; }
.relmap-legend__desc { font-size: 15px; color: var(--ink-70); line-height: 1.45; margin-top: 2px; }

/* ── Connected-to list ───────────────────────────────────────── */
.connected-list { display: flex; flex-direction: column; gap: 1px; }
.connected-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.connected-row:last-child { border-bottom: none; }
.connected-row__dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.connected-row__info { flex: 1; }
.connected-row__name { font-family: var(--serif); font-size: 18px; font-weight: 500; }
.connected-row__rel  { font-family: var(--sans); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-50); margin-top: 2px; }
.connected-row__count { font-family: var(--mono); font-size: 12px; color: var(--ink-50); white-space: nowrap; }

/* ============================================================
   EVIDENCE TRAIL / SOURCE NOTE
   ============================================================ */
.evidence-trail { display: flex; flex-direction: column; gap: 0; }
.evidence-item {
  display: flex;
  gap: 20px;
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
  position: relative;
}
.evidence-item:last-child { border-bottom: none; }
.evidence-item__line {
  position: absolute;
  left: 6px;
  top: 36px;
  bottom: -1px;
  width: 1px;
  background: var(--line);
}
.evidence-item:last-child .evidence-item__line { display: none; }
.evidence-item__dot {
  width: 13px; height: 13px;
  border-radius: 50%;
  background: var(--paper);
  border: 2px solid var(--brass);
  flex: none;
  margin-top: 5px;
  position: relative;
  z-index: 1;
}
.evidence-item__body { flex: 1; }
.evidence-item__type {
  font-family: var(--sans);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brass-2);
}
.evidence-item__title {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 500;
  line-height: 1.25;
  margin: 4px 0;
}
.evidence-item__note { font-size: 15px; color: var(--ink-70); line-height: 1.5; }
.evidence-item__meta { font-family: var(--mono); font-size: 11px; color: var(--ink-50); margin-top: 8px; }

/* source packet note */
.source-packet {
  background: #ffffff;
  border: 1px solid var(--line);
  border-left: 3px solid var(--brass);
  border-radius: var(--r-md);
  padding: 20px 24px;
}
.source-packet__label { font-family: var(--sans); font-size: 11px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--brass-2); }
.source-packet__title { font-family: var(--serif); font-size: 20px; font-weight: 500; margin: 6px 0 0; }
.source-packet__body { font-size: 15px; color: var(--ink-70); margin: 10px 0 0; line-height: 1.55; }

/* ============================================================
   TIMELINE MILESTONE STRIP (dark)
   ============================================================ */
.timeline-strip { background: var(--ink); color: var(--paper); padding: var(--sp-9) 0; }
.timeline-strip .eyebrow { color: var(--brass-soft); }
.tl-track { position: relative; margin-top: 30px; }
.tl-line { position: absolute; left: 0; right: 0; top: 13px; height: 1px; background: rgba(244,238,226,0.22); }
.tl-items { display: grid; grid-template-columns: repeat(5,1fr); position: relative; }
.tl-item { padding-right: 24px; position: relative; }
.tl-dot {
  width: 13px; height: 13px;
  border-radius: 50%;
  background: var(--paper);
  position: relative; z-index: 1;
  margin-bottom: 24px;
  border: 3px solid var(--ink);
  outline: 1px solid rgba(244,238,226,0.3);
}
.tl-item--key .tl-dot { background: var(--brass-soft); outline-color: var(--brass); }
.tl-year { font-family: var(--serif); font-size: 30px; line-height: 1; color: var(--paper); }
.tl-label { font-family: var(--sans); font-size: 13px; letter-spacing: 0.03em; color: rgba(244,238,226,0.62); margin-top: 10px; line-height: 1.4; max-width: 18ch; }

/* ============================================================
   KNIGHT LAB EMBEDS
   ============================================================ */
.embed-frame {
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--paper-2);
}
.embed-frame iframe { display: block; width: 100%; border: none; }
.embed-callout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 28px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}
.embed-callout__text { }
.embed-callout__eyebrow { font-family: var(--sans); font-size: 11px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-50); }
.embed-callout__title { font-family: var(--serif); font-size: 22px; font-weight: 500; margin: 4px 0 0; }

/* SoundCite inline audio snippet */
.soundcite-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--green-tint);
  border: 1px solid rgba(60,90,71,0.25);
  border-radius: var(--r-pill);
  padding: 3px 12px 3px 6px;
  cursor: pointer;
  transition: background var(--ease);
}
.soundcite-wrap:hover { background: var(--green-tint); border-color: var(--green); }
.soundcite-play {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--green);
  color: var(--paper);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
.soundcite-play svg { width: 10px; height: 10px; }
.soundcite-label { font-family: var(--sans); font-size: 13px; font-weight: 500; color: var(--green-2); }

/* ============================================================
   CONTENT STATES
   ============================================================ */
.state-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 12px;
  padding: 64px 32px;
  border: 1px dashed var(--line);
  border-radius: var(--r-md);
  background: var(--paper-2);
}
.state-block__icon { font-size: 36px; color: var(--ink-50); font-family: var(--serif); }
.state-block__title {
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-70);
}
.state-block__body { font-size: 16px; color: var(--ink-50); max-width: 32ch; line-height: 1.5; }

.state-block--draft { border-color: rgba(154,122,46,0.3); background: var(--tint-draft); }
.state-block--draft .state-block__title { color: var(--amber); }
.state-block--private { border-color: rgba(140,74,59,0.25); background: var(--tint-private); }
.state-block--private .state-block__title { color: var(--terracotta); }
.state-block--review { border-color: rgba(169,133,78,0.3); background: var(--tint-review); }
.state-block--review .state-block__title { color: var(--brass-2); }
.state-block--error  { border-color: rgba(140,74,59,0.4); background: var(--tint-private); }
.state-block--error .state-block__title { color: var(--terracotta); }
.state-block--loading { opacity: 0.6; }

/* skeleton shimmer */
@keyframes shimmer { 0%,100%{opacity:1} 50%{opacity:0.45} }
.skeleton {
  background: var(--paper-3);
  border-radius: var(--r-sm);
  animation: shimmer 1.6s ease-in-out infinite;
}
.skeleton--text { height: 14px; border-radius: 2px; }
.skeleton--img  { aspect-ratio: 4/3; }

/* ============================================================
   CHART & GRAPH HOLDERS
   ============================================================ */
.chart-wrap {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 32px;
}
.chart-wrap__title {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-50);
  margin-bottom: 24px;
}

/* ============================================================
   FORM / SEARCH
   ============================================================ */
.search-bar {
  display: flex;
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 0 16px;
  gap: 12px;
  transition: border-color var(--ease);
}
.search-bar:focus-within { border-color: var(--green); }
.search-bar__icon { color: var(--ink-50); flex: none; }
.search-bar input {
  flex: 1;
  border: none;
  background: transparent;
  font: var(--text-body);
  font-size: 17px;
  color: var(--ink);
  padding: 14px 0;
  outline: none;
}
.search-bar input::placeholder { color: var(--ink-50); }

.field { display: flex; flex-direction: column; gap: 6px; }
.field label {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-70);
}
.field input,
.field select,
.field textarea {
  font: var(--text-body);
  font-size: 17px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 12px 16px;
  outline: none;
  transition: border-color var(--ease);
  width: 100%;
}
.field input:focus,
.field select:focus,
.field textarea:focus { border-color: var(--green); }
.field textarea { resize: vertical; min-height: 120px; }

/* ============================================================
   THEME CLOUD
   ============================================================ */
.theme-cloud { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.theme-cloud .tag { cursor: pointer; transition: background var(--ease), border-color var(--ease); }
.theme-cloud .tag:hover { border-color: var(--ink-50); background: #ffffff; }
.theme-cloud .tag.active { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* ============================================================
   GRID UTILITIES
   ============================================================ */
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 24px; }
.grid-2 { display: grid; grid-template-columns: repeat(2,1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4,1fr); gap: 20px; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1020px) {
  .grid-4 { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 920px) {
  .hero h1 { font-size: 58px; }
  .hero-grid,
  .story-intro-grid,
  .audio-card,
  .relmap-wrap,
  .person-block { grid-template-columns: 1fr; gap: 40px; }
  .grid-3 { grid-template-columns: repeat(2,1fr); }
  .relmap { height: 460px; }
  .tl-items { grid-template-columns: repeat(2,1fr); gap: 32px 0; }
  .tl-line { display: none; }
  .subnav a { padding: 8px 9px; }
}
@media (max-width: 600px) {
  .wrap, .wrap--narrow, .wrap--wide { padding: 0 22px; }
  .hero h1 { font-size: 44px; }
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: 1fr; }
  .sec { padding: 60px 0; }
  .audio-card { padding: 32px 26px; }
  .relmap { height: 400px; }
  .subnav__who { display: none; }
  .tl-items { grid-template-columns: 1fr; }
  .embed-callout { flex-direction: column; align-items: flex-start; }
}

/* ── Evidence Timeline (etl-*) ─────────────────────── */
.etl { position: relative; }
.etl-item {
  display: flex; gap: 24px; padding: 40px 0;
  border-bottom: 1px solid var(--line); position: relative;
}
.etl-item:last-child { border-bottom: none; }
.etl-left { width: 80px; flex: none; text-align: right; }
.etl-year { font-family: var(--mono); font-size: 13px; color: var(--brass-2); letter-spacing: 0.06em; }
.etl-dot {
  position: absolute; left: 80px; top: 36px;
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--paper); border: 2px solid var(--brass);
  transform: translateX(-50%); z-index: 1;
}
.etl-line {
  position: absolute; left: 80px; top: 0; bottom: 0;
  width: 1px; background: var(--line);
}
.etl-item:last-child .etl-line { bottom: 50%; }
.etl-body { flex: 1; padding-left: 24px; }
.etl-title { font-family: var(--serif); font-size: 20px; font-weight: 500; line-height: 1.2; }
.etl-title a { color: inherit; transition: color .15s; }
.etl-title a:hover { color: var(--green); }
.etl-desc { font-size: 16px; color: var(--ink-70); margin-top: 8px; line-height: 1.55; }
.etl-sources { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
@media (max-width: 600px) {
  .etl-left { width: 52px; }
  .etl-dot, .etl-line { left: 52px; }
  .etl-year { font-size: 11px; }
  .etl-title { font-size: 17px; }
}

/* ══════════════════════════════════════════════════
   OPENING / CODYHOUSE INTRO HERO
   Full-bleed parallax hero used on section index pages
══════════════════════════════════════════════════ */
.opening {
  position: relative;
  min-height: 72vh;
  display: flex;
  align-items: center;
  padding: clamp(5rem, 10vw, 9rem) 1.5rem clamp(4rem, 8vw, 7rem);
  color: #fff;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  background-color: var(--ink);
}
.opening__overlay {
  position: absolute; inset: 0;
  background: linear-gradient(
    90deg,
    rgba(35,33,28,0.82) 0%,
    rgba(35,33,28,0.55) 45%,
    rgba(35,33,28,0.18) 100%
  );
  z-index: 1;
}
.opening__content {
  position: relative; z-index: 2;
  width: min(100%, 760px);
  margin: 0 auto 0 0;
  padding: 0 clamp(1rem, 4vw, 3rem);
}
.opening__archive {
  margin: 0 0 1rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #C9A86A;
}
.opening__name {
  margin: 0;
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(3rem, 8vw, 6.5rem);
  line-height: 0.93;
  letter-spacing: -0.03em;
  color: #fff;
}
.opening__name em {
  font-style: italic; font-weight: 200;
  color: rgba(244,238,226,0.7); display: block;
}
.opening__tagline {
  max-width: 46ch;
  margin: 1.25rem 0 0;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(1.05rem, 2.2vw, 1.3rem);
  line-height: 1.55;
  color: rgba(244,238,226,0.82);
}
.opening__actions {
  display: flex; flex-wrap: wrap;
  align-items: center; gap: 12px;
  margin-top: 2rem;
}
.btn-open {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--sans); font-size: 14px; font-weight: 600;
  letter-spacing: 0.02em; padding: 12px 22px;
  border-radius: 999px; cursor: pointer;
  transition: all .18s; border: none; text-decoration: none;
}
.btn-open--primary { background: var(--paper); color: var(--ink); }
.btn-open--primary:hover { background: var(--paper-2); }
.btn-open--outline {
  background: transparent;
  color: rgba(244,238,226,0.88);
  border: 1px solid rgba(244,238,226,0.3);
}
.btn-open--outline:hover { border-color: rgba(244,238,226,0.7); color: #fff; }
@media (max-width: 700px) {
  .opening { min-height: 60vh; background-attachment: scroll; }
  .opening__name { font-size: 3rem; }
}

/* Lab card image thumbnails */
.lab-card__img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: 4px;
  margin-bottom: 18px;
  display: block;
}

/* ALL CARDS MUST BE WHITE OVERRIDE */
.card, .conn-card, .story-card, .event-card, .person-card, .place-card,
.ls-media-card, .ls-panel, .ls-cover, .ls-cover__body, .ls-source, .ls-update-card,
.audio-episode, .chart-wrap, .person-list-item, .event-chip, .evidence-item,
.source-card, .media-card, .lab-card, .photo-mosaic, .tl-timemarker-content-container {
  background: #ffffff !important;
  background-color: #ffffff !important;
}

/* === EXPLICIT TYPOGRAPHY OVERRIDES === */
h1 { font: var(--text-h1) !important; }
h2 { font: var(--text-h2) !important; }
h3 { font: var(--text-h3) !important; }
.lead, .opening__tagline { font: var(--text-lead) !important; }
p, body { font: var(--text-body); }
.text-sm, .card__desc { font: var(--text-body-sm) !important; }
.caption, .photo-full__cap span { font: var(--text-caption) !important; }
.credit, .photo-full__cap em { font: var(--text-credit) !important; }
.display, .hero h1, .hero-title, .opening__name { font: var(--text-display) !important; }

/* TimelineJS Padding Fix */
.etl-year, .tl-year { padding-right: 15px !important; }

/* Global Card & Panel Styles */
.uk-card-default,
.ls-panel,
.lab-card,
.card {
  background: #ffffff !important;
}

/* Make entire cards clickable */
.uk-card-default, .lab-card, .card {
  position: relative;
}
.uk-card-default a::after, .lab-card a::after, .card a::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1;
}

/* Blue Flourish */
a {
  color: var(--blue, #0B57D0);
}
a:hover {
  color: var(--blue-dark, #0842A0);
}

/* TimelineJS Background Overrides */
.tl-timeline,
.tl-storyjs,
.tl-timemarker-content-container,
.tl-slide,
.tl-slidenav-title,
.tl-slidenav-description {
  background-color: #ffffff !important;
  background: #ffffff !important;
}
