/* ============================================================
   The Lexington Subdivision — C&O Railway history site
   Archival / timetable-inspired design system
   ============================================================ */

:root {
  --paper:      #f3eee1;
  --card:       #fcf9f0;
  --card-edge:  #e4dbc4;
  --ink:        #26241f;
  --muted:      #6f6553;
  --navy:       #17324f;
  --navy-deep:  #0e2136;
  --navy-soft:  #24466b;
  --cream:      #f2ead6;
  --cream-dim:  #c9bfa4;
  --rust:       #a63d28;
  --rust-dark:  #86301f;
  --gold:       #b8892d;
  --gold-soft:  #d4b36a;
  --line:       #d8cdb4;
  --serif: Georgia, 'Times New Roman', 'Palatino Linotype', serif;
  --sans: 'Segoe UI', -apple-system, 'Helvetica Neue', Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--serif);
  background: var(--paper);
  color: var(--ink);
  font-size: 17px;
  line-height: 1.65;
}

img { max-width: 100%; display: block; }
a { color: var(--rust); }
a:hover { color: var(--rust-dark); }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.wrap-narrow { max-width: 860px; margin: 0 auto; padding: 0 24px; }

/* ---------------- header / nav ---------------- */

.site-header {
  background: var(--navy-deep);
  border-bottom: 3px solid var(--gold);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 14px rgba(14, 33, 54, .35);
}

.site-header .bar {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 62px;
}

.brand {
  display: flex; align-items: center; gap: 12px;
  text-decoration: none;
  color: var(--cream);
  white-space: nowrap;
}
.brand:hover { color: #fff; }

.brand .roundel {
  width: 38px; height: 38px; flex: none;
}

.brand .brand-text { line-height: 1.15; }
.brand .brand-top {
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--gold-soft);
}
.brand .brand-main {
  font-size: 19px;
  letter-spacing: .02em;
}

.site-nav { display: flex; gap: 4px; flex-wrap: wrap; }

.site-nav a {
  font-family: var(--sans);
  font-size: 12.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--cream);
  padding: 8px 11px;
  border-radius: 3px;
  transition: background .15s, color .15s;
}
.site-nav a:hover { background: rgba(242, 234, 214, .12); color: #fff; }
.site-nav a.active { color: var(--gold-soft); box-shadow: inset 0 -2px 0 var(--gold); border-radius: 3px 3px 0 0; }

.nav-toggle {
  display: none;
  background: none; border: 1px solid rgba(242,234,214,.4); border-radius: 4px;
  color: var(--cream); font-size: 22px; line-height: 1;
  padding: 6px 10px; cursor: pointer;
}

@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .site-nav {
    display: none;
    position: absolute; left: 0; right: 0; top: 100%;
    background: var(--navy-deep);
    border-bottom: 3px solid var(--gold);
    flex-direction: column;
    padding: 8px 16px 16px;
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 12px 10px; border-bottom: 1px solid rgba(242,234,214,.12); }
  .site-nav a.active { box-shadow: none; color: var(--gold-soft); }
}

/* ---------------- hero ---------------- */

.hero {
  position: relative;
  background: var(--navy-deep);
  color: var(--cream);
  overflow: hidden;
}
.hero .hero-bg {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center 55%;
  filter: sepia(.25) contrast(1.02);
  opacity: .55;
}
.hero .hero-shade {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(14,33,54,.25) 0%, rgba(14,33,54,.55) 55%, rgba(14,33,54,.92) 100%);
}
.hero .hero-inner {
  position: relative;
  max-width: 1180px; margin: 0 auto;
  padding: 120px 24px 90px;
  text-align: center;
}

/* Home hero: fills the viewport together with the header and stat band.
   JS (site.js) sets the exact min-height; the calc below is the no-JS fallback. */
.hero.hero-full {
  display: flex; align-items: center; justify-content: center;
  min-height: max(480px, calc(100svh - 170px));
}
.hero.hero-full .hero-inner { padding: 60px 24px 70px; }
@media (max-width: 560px) { .hero.hero-full .hero-inner { padding: 34px 20px 58px; } }

/* Sub-page banners: one uniform height on every page, content centered. */
.hero.hero-page {
  display: flex; align-items: center; justify-content: center;
  min-height: clamp(340px, 44vh, 470px);
}
.hero.hero-page .hero-inner { padding: 48px 24px 56px; }

.kicker {
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: .34em;
  text-transform: uppercase;
  color: var(--gold-soft);
  margin-bottom: 14px;
}

.hero h1 {
  font-size: clamp(38px, 6.5vw, 74px);
  font-weight: normal;
  letter-spacing: .01em;
  line-height: 1.05;
  margin-bottom: 18px;
  text-shadow: 0 2px 18px rgba(0,0,0,.45);
}

.hero .sub {
  font-size: clamp(16px, 2.2vw, 21px);
  font-style: italic;
  color: #e8dfc8;
  max-width: 720px;
  margin: 0 auto 30px;
}

.hero .rule, .rule-orn {
  display: flex; align-items: center; justify-content: center; gap: 14px;
  margin: 22px auto;
  color: var(--gold-soft);
}
.hero .rule::before, .hero .rule::after,
.rule-orn::before, .rule-orn::after {
  content: "";
  height: 1px; width: min(160px, 26vw);
  background: linear-gradient(90deg, transparent, var(--gold-soft));
}
.rule-orn::after { background: linear-gradient(90deg, var(--gold-soft), transparent); }
.hero .rule::after { background: linear-gradient(90deg, var(--gold-soft), transparent); }
.rule-orn { color: var(--gold); margin: 10px auto 26px; }

.btn-row { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

.btn {
  font-family: var(--sans);
  font-size: 13px;
  letter-spacing: .16em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 13px 26px;
  border-radius: 3px;
  transition: all .18s;
  display: inline-block;
}
.btn-solid { background: var(--rust); color: #fdf6e9; border: 1px solid var(--rust); }
.btn-solid:hover { background: var(--rust-dark); color: #fff; }
.btn-ghost { border: 1px solid rgba(242,234,214,.65); color: var(--cream); }
.btn-ghost:hover { background: rgba(242,234,214,.14); color: #fff; }
.btn-navy { background: var(--navy); color: var(--cream); border: 1px solid var(--navy); }
.btn-navy:hover { background: var(--navy-soft); color: #fff; }

.hero .credit-tag {
  position: absolute; right: 14px; bottom: 10px;
  font-family: var(--sans); font-size: 10.5px; letter-spacing: .06em;
  color: rgba(242,234,214,.55);
}
@media (max-width: 640px) {
  .hero .credit-tag { left: 14px; right: 14px; font-size: 9.5px; text-align: right; }
}

/* ---------------- stat band ---------------- */

.stat-band {
  background: var(--navy);
  border-top: 1px solid var(--navy-soft);
  color: var(--cream);
}
.stat-band .stats {
  max-width: 1180px; margin: 0 auto;
  padding: 26px 24px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 18px;
  text-align: center;
}
.stat .num {
  font-size: 34px;
  color: var(--gold-soft);
  line-height: 1.1;
}
.stat .lbl {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: #bfd0e2;
  margin-top: 4px;
}

/* ---------------- sections ---------------- */

.section { padding: 64px 0; }
.section.alt { background: #ece5d2; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.sec-head { text-align: center; margin-bottom: 40px; }
.sec-head .kicker { color: var(--rust); }
.sec-head h2 {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: normal;
  color: var(--navy);
  line-height: 1.15;
}
.sec-head .sec-sub {
  font-style: italic; color: var(--muted);
  max-width: 640px; margin: 12px auto 0;
}

.double-rule {
  border: none;
  border-top: 3px double var(--gold);
  width: 120px;
  margin: 18px auto 0;
}

/* ---------------- cards ---------------- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 26px;
}

.card {
  background: var(--card);
  border: 1px solid var(--card-edge);
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(38, 36, 31, .08);
  display: flex;
  flex-direction: column;
  transition: transform .18s, box-shadow .18s;
  text-decoration: none;
  color: var(--ink);
}
.card:hover { transform: translateY(-3px); box-shadow: 0 8px 22px rgba(38,36,31,.16); color: var(--ink); }

.card .card-img {
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: var(--navy-deep);
  position: relative;
}
.card .card-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: sepia(.12);
  transition: transform .35s;
}
.card:hover .card-img img { transform: scale(1.04); }

.card .card-body { padding: 20px 22px 22px; flex: 1; }
.card .card-label {
  font-family: var(--sans); font-size: 10.5px; letter-spacing: .22em;
  text-transform: uppercase; color: var(--rust); margin-bottom: 7px;
}
.card h3 { font-size: 21px; font-weight: normal; color: var(--navy); margin-bottom: 8px; line-height: 1.25; }
.card p { font-size: 15px; color: var(--muted); line-height: 1.55; }
.card .card-cta {
  font-family: var(--sans); font-size: 11.5px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--rust); margin-top: 14px;
}

/* ---------------- pull quote ---------------- */

.pullquote {
  max-width: 780px; margin: 0 auto; text-align: center; padding: 0 24px;
}
.pullquote blockquote {
  font-size: clamp(19px, 2.6vw, 25px);
  font-style: italic;
  line-height: 1.55;
  color: var(--navy);
}
.pullquote .attr {
  font-family: var(--sans); font-size: 12px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--muted); margin-top: 18px;
}

/* ---------------- prose (history/timeline body text) ---------------- */

.prose { font-size: 17.5px; }
.prose p { margin-bottom: 1.2em; }
.prose h2, .prose h3 { font-weight: normal; color: var(--navy); }
.prose .chapter { margin-bottom: 64px; }
.prose .chapter > h2 {
  font-size: 30px;
  line-height: 1.2;
  padding-top: 26px;
  border-top: 3px double var(--gold);
  margin-bottom: 6px;
}
.prose .ch-no {
  font-family: var(--sans); font-size: 11px; letter-spacing: .28em; text-transform: uppercase;
  color: var(--rust); margin-bottom: 10px; display: block; padding-top: 8px;
}
.prose .chapter h3 {
  font-size: 21.5px;
  font-style: italic;
  margin: 1.6em 0 .7em;
}
.prose .chapter > p:first-of-type::first-letter {
  font-size: 3.4em;
  float: left;
  line-height: .82;
  padding: 4px 8px 0 0;
  color: var(--rust);
}
.prose .src {
  font-family: var(--sans);
  font-size: 12px;
  color: #988c74;
}

.prose figure, .fig-block, .tl figure {
  margin: 30px 0;
  background: var(--card);
  border: 1px solid var(--card-edge);
  border-radius: 4px;
  padding: 12px;
  box-shadow: 0 1px 5px rgba(38,36,31,.09);
}
.tl figure { margin: 26px 0 26px 138px; }
@media (max-width: 640px) { .tl figure { margin-left: 92px; } }
.prose figure img, .fig-block img, .tl figure img { width: 100%; border-radius: 2px; cursor: zoom-in; }
.prose figcaption, .fig-block figcaption, .tl figcaption {
  font-family: var(--sans);
  font-size: 12.5px;
  color: var(--muted);
  padding: 10px 4px 2px;
  line-height: 1.5;
}

/* ---------------- history layout w/ TOC ---------------- */

.history-layout {
  max-width: 1180px; margin: 0 auto; padding: 48px 24px;
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 48px;
  align-items: start;
}

.toc {
  position: sticky; top: 86px;
  max-height: calc(100vh - 110px);
  overflow-y: auto;
  background: var(--card);
  border: 1px solid var(--card-edge);
  border-radius: 4px;
  padding: 18px 6px 18px 18px;
}
.toc .toc-title {
  font-family: var(--sans); font-size: 11px; letter-spacing: .24em; text-transform: uppercase;
  color: var(--rust); margin-bottom: 10px;
}
.toc a {
  display: block;
  font-family: var(--sans);
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
  padding: 5px 8px;
  border-left: 2px solid transparent;
  line-height: 1.35;
}
.toc a:hover { color: var(--navy); }
.toc a.on { color: var(--rust); border-left-color: var(--rust); background: rgba(166,61,40,.05); }

@media (max-width: 920px) {
  .history-layout { grid-template-columns: 1fr; }
  .toc { position: static; max-height: none; margin-bottom: 8px; }
  .toc.collapsed .toc-links { display: none; }
  .toc .toc-title { cursor: pointer; }
}

/* ---------------- filter bar ---------------- */

.filter-bar {
  background: var(--card);
  border: 1px solid var(--card-edge);
  border-radius: 4px;
  padding: 16px 18px;
  margin-bottom: 26px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  box-shadow: 0 1px 4px rgba(38,36,31,.07);
}

.filter-bar label {
  font-family: var(--sans); font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--muted);
  display: block; margin-bottom: 4px;
}

.filter-bar select, .filter-bar input[type="search"] {
  font-family: var(--sans);
  font-size: 14px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 8px 10px;
  min-width: 150px;
}
.filter-bar input[type="search"] { min-width: 210px; }
.filter-bar select:focus, .filter-bar input:focus { outline: 2px solid var(--gold-soft); }

.filter-bar .f-group { flex: 0 1 auto; }
.filter-bar .f-count {
  margin-left: auto;
  font-family: var(--sans);
  font-size: 13px;
  color: var(--muted);
}
.filter-bar .f-clear {
  font-family: var(--sans); font-size: 12px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--rust); background: none; border: 1px solid var(--rust);
  border-radius: 3px; padding: 8px 14px; cursor: pointer;
}
.filter-bar .f-clear:hover { background: var(--rust); color: #fdf6e9; }

@media (max-width: 700px) {
  .filter-bar .f-group, .filter-bar select, .filter-bar input[type="search"] { width: 100%; min-width: 0; }
  .filter-bar .f-count { margin: 0; }
}

/* ---------------- photo grid ---------------- */

.photo-grid {
  column-count: 4;
  column-gap: 18px;
}
@media (max-width: 1100px) { .photo-grid { column-count: 3; } }
@media (max-width: 800px)  { .photo-grid { column-count: 2; } }
@media (max-width: 500px)  { .photo-grid { column-count: 1; } }

.tile {
  break-inside: avoid;
  margin-bottom: 18px;
  background: var(--card);
  border: 1px solid var(--card-edge);
  border-radius: 4px;
  overflow: hidden;
  cursor: zoom-in;
  box-shadow: 0 1px 4px rgba(38,36,31,.08);
  transition: transform .16s, box-shadow .16s;
}
.tile:hover { transform: translateY(-2px); box-shadow: 0 7px 18px rgba(38,36,31,.17); }
.tile img { width: 100%; height: auto; background: #dcd3bd; }
.tile .tile-meta {
  padding: 9px 12px 11px;
  font-family: var(--sans);
  font-size: 12px;
  color: var(--muted);
  display: flex; justify-content: space-between; gap: 8px;
  border-top: 1px solid var(--card-edge);
}
.tile .tile-meta .t-loc { color: var(--navy); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile .tile-meta .t-yr { color: var(--rust); flex: none; }
.tile .tile-cap {
  padding: 0 12px 10px;
  font-family: var(--sans);
  font-size: 12px;
  line-height: 1.45;
  color: var(--muted);
  overflow-wrap: break-word;
}

.load-more-row { text-align: center; margin: 28px 0 8px; }

.chip-row { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: 28px; }
.chip {
  font-family: var(--sans); font-size: 12.5px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  border-radius: 30px;
  padding: 7px 16px;
  cursor: pointer;
  transition: all .15s;
  text-decoration: none;
}
.chip:hover { border-color: var(--gold); color: var(--rust); }
.chip.on { background: var(--navy); border-color: var(--navy); color: var(--cream); }
.chip .n { color: var(--gold); margin-left: 5px; }
.chip.on .n { color: var(--gold-soft); }

/* ---------------- collection cards (archive) ---------------- */

.coll-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
  gap: 14px;
  margin-bottom: 34px;
}
.coll-card {
  background: var(--card);
  border: 1px solid var(--card-edge);
  border-left: 4px solid var(--navy);
  border-radius: 3px;
  padding: 14px 16px;
  cursor: pointer;
  transition: all .15s;
}
.coll-card:hover { border-left-color: var(--gold); box-shadow: 0 4px 12px rgba(38,36,31,.12); }
.coll-card.on { background: var(--navy); border-color: var(--navy); }
.coll-card.on h4, .coll-card.on p { color: var(--cream); }
.coll-card.on .cnt { color: var(--gold-soft); }
.coll-card h4 { font-weight: normal; font-size: 16.5px; color: var(--navy); line-height: 1.25; }
.coll-card p { font-family: var(--sans); font-size: 12px; color: var(--muted); margin-top: 5px; line-height: 1.45; }
.coll-card .cnt { font-family: var(--sans); font-size: 11.5px; color: var(--rust); margin-top: 7px; letter-spacing: .08em; }

/* ---------------- route ladder ---------------- */

.route-wrap { max-width: 900px; margin: 0 auto; padding: 0 24px; }

.county-band {
  font-family: var(--sans);
  letter-spacing: .26em;
  text-transform: uppercase;
  font-size: 12px;
  color: var(--cream);
  background: var(--navy);
  border-radius: 3px;
  padding: 9px 18px;
  margin: 34px 0 10px;
  display: flex; justify-content: space-between; align-items: center;
}
.county-band .cnty-note { letter-spacing: .04em; color: #bfd0e2; font-size: 11.5px; text-transform: none; }

.station {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 0 22px;
  position: relative;
  padding: 13px 6px 13px 0;
  border-bottom: 1px dotted var(--line);
}
.station::before {
  content: "";
  position: absolute;
  left: 119px;   /* runs through the station dot centers (92px mp col + 22px gap + dot offset) */
  top: 0; bottom: 0;
  width: 3px;
  background: var(--navy-soft);
  opacity: .35;
}
.station .mp {
  text-align: right;
  font-family: var(--sans);
  font-size: 12.5px;
  color: var(--muted);
  padding-top: 3px;
}
.station .mp b { display: block; color: var(--rust); font-size: 14.5px; }
.station .st-body { padding-left: 26px; position: relative; }
.station .st-body::before {
  content: "";
  position: absolute; left: -2px; top: 8px;
  width: 11px; height: 11px;
  border-radius: 50%;
  background: var(--paper);
  border: 3px solid var(--navy);
}
.station.agency .st-body::before { background: var(--gold); border-color: var(--navy); }
.station .st-name { font-size: 19px; color: var(--navy); }
.station.agency .st-name { font-weight: bold; letter-spacing: .03em; }
.station .st-note { font-size: 14.5px; color: var(--muted); font-style: italic; margin-top: 2px; }
.station .st-links { margin-top: 6px; display: flex; gap: 8px; flex-wrap: wrap; }
.st-chip {
  font-family: var(--sans); font-size: 11px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--rust); text-decoration: none;
  border: 1px solid rgba(166,61,40,.45);
  border-radius: 20px; padding: 3px 11px;
  white-space: nowrap;
  display: inline-block;
}
.st-chip:hover { background: var(--rust); color: #fdf6e9; }

.feature-row {
  position: relative;
  margin: 4px 0;
  padding: 10px 14px 10px 140px;
  font-size: 14px;
  font-style: italic;
  color: var(--rust-dark);
}
.feature-row::before {
  content: "";
  position: absolute;
  left: 119px; top: 0; bottom: 0;
  width: 3px;
  background: var(--navy-soft);
  opacity: .35;
}
.feature-row .f-ico {
  position: absolute; left: 120.5px; top: 12px;
  transform: translateX(-50%);
  font-style: normal; font-size: 11px;
  background: var(--paper);
  padding: 1px 0;
}
.feature-row b { font-style: normal; font-family: var(--sans); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; }

@media (max-width: 560px) {
  .station { grid-template-columns: 64px 1fr; }
  .station::before, .feature-row::before { left: 91px; }
  .feature-row { padding-left: 112px; }
  .feature-row .f-ico { left: 92.5px; }
}

/* ---------------- timeline ---------------- */

.tl { position: relative; max-width: 860px; margin: 0 auto; padding: 10px 24px 40px; }
.tl::before {
  content: "";
  position: absolute; left: 145px; top: 0; bottom: 0;
  width: 3px; background: var(--navy-soft); opacity: .3;
  /* 24px container padding + 96px year col + half the 42px gap = through the dot centers */
}
.tl .era {
  position: relative;
  margin: 44px 0 20px;
  padding-left: 138px;
}
.tl .era h3 {
  display: inline-block;
  font-weight: normal;
  font-size: 24px;
  color: var(--navy);
  border-top: 3px double var(--gold);
  border-bottom: 3px double var(--gold);
  padding: 6px 4px;
}
.tl-item {
  position: relative;
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 0 42px;
  padding: 12px 0;
}
.tl-item::before {
  content: "";
  position: absolute; left: 113px; top: 22px;
  width: 13px; height: 13px; border-radius: 50%;
  background: var(--gold);
  border: 3px solid var(--navy);
  z-index: 1;
}
.tl-item .yr {
  text-align: right;
  font-size: 21px;
  color: var(--rust);
  padding-top: 6px;
}
.tl-item .yr small { display: block; font-family: var(--sans); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.tl-item .tl-body h4 { font-weight: normal; font-size: 18.5px; color: var(--navy); margin-bottom: 4px; }
.tl-item .tl-body p { font-size: 15px; color: #55503f; line-height: 1.6; }

@media (max-width: 640px) {
  .tl::before { left: 105px; }
  .tl .era { padding-left: 92px; }
  .tl-item { grid-template-columns: 58px 1fr; gap: 0 34px; }
  .tl-item::before { left: 73px; }
  .tl-item .yr { font-size: 17px; }
}

/* ---------------- library / documents ---------------- */

.doc-group { margin-bottom: 52px; }
.doc-group > h3 {
  font-weight: normal;
  font-size: 25px;
  color: var(--navy);
  padding-bottom: 8px;
  border-bottom: 3px double var(--gold);
  margin-bottom: 6px;
}
.doc-group > .dg-sub { font-style: italic; color: var(--muted); font-size: 15px; margin-bottom: 18px; }

.doc-list { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 20px; }
@media (max-width: 800px) { .doc-list { grid-template-columns: 1fr; } }

.doc {
  display: flex; gap: 14px; align-items: flex-start;
  background: var(--card);
  border: 1px solid var(--card-edge);
  border-radius: 4px;
  padding: 14px 16px;
  text-decoration: none;
  color: var(--ink);
  transition: box-shadow .15s, transform .15s;
}
.doc:hover { box-shadow: 0 5px 14px rgba(38,36,31,.14); transform: translateY(-1px); color: var(--ink); }
.doc .d-ico {
  flex: none;
  width: 40px; height: 48px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: #fff;
  color: var(--rust);
  font-family: var(--sans); font-size: 10px; font-weight: 700; letter-spacing: .05em;
  display: flex; align-items: center; justify-content: center;
}
.doc .d-body h4 { font-weight: normal; font-size: 16.5px; color: var(--navy); line-height: 1.3; }
.doc .d-body p { font-family: var(--sans); font-size: 12.5px; color: var(--muted); margin-top: 4px; line-height: 1.5; }

.media-box {
  background: var(--card);
  border: 1px solid var(--card-edge);
  border-radius: 4px;
  padding: 22px;
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 22px;
  align-items: center;
}
.media-box img { border-radius: 3px; }
.media-box h4 { font-weight: normal; font-size: 20px; color: var(--navy); margin-bottom: 6px; }
.media-box p { font-size: 14.5px; color: var(--muted); margin-bottom: 12px; }
.media-box audio { width: 100%; }
@media (max-width: 640px) { .media-box { grid-template-columns: 1fr; } }

/* ---------------- lightbox ---------------- */

.lb {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(10, 16, 24, .93);
  display: none;
}
.lb.open { display: block; }

.lb .lb-stage {
  position: absolute; inset: 0 0 0 0;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.lb .lb-stage img {
  max-width: calc(100vw - 120px);
  max-height: calc(100vh - 150px);
  box-shadow: 0 8px 40px rgba(0,0,0,.6);
  cursor: zoom-in;
  user-select: none;
  -webkit-user-drag: none;
}
.lb.zoomed .lb-stage img {
  max-width: none; max-height: none;
  cursor: grab;
}
.lb.zoomed.panning .lb-stage img { cursor: grabbing; }

.lb .lb-cap {
  position: absolute; left: 0; right: 0; bottom: 0;
  background: linear-gradient(0deg, rgba(8,12,18,.96) 60%, transparent);
  color: #e8e2d2;
  padding: 34px 70px 16px;
  text-align: center;
}
.lb .lb-cap .lb-title { font-size: 16.5px; line-height: 1.45; max-width: 980px; margin: 0 auto; }
.lb .lb-cap .lb-meta {
  font-family: var(--sans); font-size: 12px; color: #a99;
  color: #b3ab97; margin-top: 6px;
}
.lb .lb-cap .lb-meta a { color: var(--gold-soft); text-decoration: none; }
.lb .lb-cap .lb-meta a:hover { text-decoration: underline; }

.lb button {
  position: absolute;
  background: rgba(242,234,214,.08);
  border: 1px solid rgba(242,234,214,.25);
  color: #efe8d5;
  font-size: 22px;
  width: 46px; height: 46px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 2;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s;
  font-family: var(--sans);
}
.lb button:hover { background: rgba(242,234,214,.22); }
.lb .lb-close { top: 16px; right: 16px; }
.lb .lb-prev { left: 12px; top: 50%; transform: translateY(-50%); }
.lb .lb-next { right: 12px; top: 50%; transform: translateY(-50%); }
.lb .lb-count {
  position: absolute; top: 26px; left: 24px;
  font-family: var(--sans); font-size: 12.5px; letter-spacing: .1em;
  color: #cfc7b2;
}
.lb .lb-zoomhint {
  position: absolute; top: 30px; left: 50%; transform: translateX(-50%);
  font-family: var(--sans); font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase;
  color: rgba(242,234,214,.5);
}
@media (max-width: 640px) {
  .lb .lb-stage img { max-width: 100vw; max-height: calc(100vh - 170px); }
  .lb .lb-cap { padding: 30px 14px 12px; }
  .lb .lb-zoomhint { display: none; }
}

/* ---------------- footer ---------------- */

.site-footer {
  background: var(--navy-deep);
  color: #b9c6d4;
  margin-top: 70px;
  border-top: 3px solid var(--gold);
}
.site-footer .foot-inner {
  max-width: 1180px; margin: 0 auto;
  padding: 44px 24px 30px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 34px;
}
.site-footer h5 {
  font-family: var(--sans); font-size: 11px; letter-spacing: .22em; text-transform: uppercase;
  color: var(--gold-soft); margin-bottom: 12px; font-weight: 600;
}
.site-footer p, .site-footer a { font-size: 14px; line-height: 1.7; color: #b9c6d4; }
.site-footer a { display: block; text-decoration: none; }
.site-footer a:hover { color: var(--cream); }
.site-footer .foot-base {
  border-top: 1px solid rgba(185,198,212,.18);
  text-align: center;
  font-family: var(--sans);
  font-size: 12px;
  color: #7f92a5;
  padding: 16px 24px;
}
@media (max-width: 760px) { .site-footer .foot-inner { grid-template-columns: 1fr; gap: 24px; } }

/* ---------------- misc ---------------- */

.note-box {
  background: rgba(184,137,45,.09);
  border: 1px solid rgba(184,137,45,.35);
  border-left: 4px solid var(--gold);
  border-radius: 3px;
  padding: 14px 18px;
  font-size: 14.5px;
  color: #5c5238;
  margin: 22px 0;
}

.table-wrap { overflow-x: auto; }
table.tt {
  border-collapse: collapse;
  width: 100%;
  font-family: var(--sans);
  font-size: 14px;
  background: var(--card);
  border: 1px solid var(--card-edge);
}
table.tt th {
  background: var(--navy);
  color: var(--cream);
  font-size: 11px; letter-spacing: .16em; text-transform: uppercase;
  padding: 10px 14px; text-align: left;
  font-weight: 600;
}
table.tt td { padding: 9px 14px; border-bottom: 1px solid var(--line); }
table.tt tr:last-child td { border-bottom: none; }

::selection { background: var(--gold-soft); color: var(--navy-deep); }

/* ---------------- accessibility ---------------- */

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 300;
  background: var(--gold); color: var(--navy-deep);
  font-family: var(--sans); font-size: 14px; font-weight: 700;
  padding: 10px 18px; border-radius: 0 0 4px 0;
}
.skip-link:focus { left: 0; }

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}
.site-header :focus-visible, .lb :focus-visible, .hero :focus-visible {
  outline-color: #ffd97a;
}

.tile:focus-visible, .coll-card:focus-visible, .doc:focus-visible {
  outline: 3px solid var(--rust);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------------- asset protection ---------------- */

img { -webkit-user-drag: none; user-select: none; }

/* ---------------- lightbox embeds (PDF / audio / media) ---------------- */

.lb .lb-embed {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
}
.lb .lb-embed[hidden] { display: none; }
.lb .lb-frame {
  width: min(1100px, calc(100vw - 120px));
  height: calc(100vh - 160px);
  border: none; border-radius: 3px;
  background: #2a2a2e;
}
@media (max-width: 640px) {
  .lb .lb-frame { width: 100vw; height: calc(100vh - 170px); }
}
.lb .lb-audio {
  text-align: center; color: #e8e2d2; max-width: 640px; padding: 0 20px;
}
.lb .lb-audio img {
  max-width: 100%; max-height: calc(100vh - 320px);
  border-radius: 3px; margin-bottom: 22px;
}
.lb .lb-audio audio { width: 100%; min-width: min(480px, 80vw); }
.lb .lb-video {
  max-width: min(1280px, calc(100vw - 120px));
  max-height: calc(100vh - 180px);
  border-radius: 3px;
  background: #000;
}
@media (max-width: 640px) { .lb .lb-video { max-width: 100vw; } }
