/* ---------------------------------------------------------------------------
   Academic Challenge — "Scoreboard" design system.
   Palette, type scale, and component styles. No gradients, no imagery.
--------------------------------------------------------------------------- */

:root {
  /* Palette matched to the club logo: charcoal backdrop, book-cover
     green, trophy gold. */
  --color-bg: #f4f1ea;
  --color-surface: #fbfaf6;
  --color-ink: #14181a;
  --color-ink-soft: #4a5254;
  --color-charcoal: #212227;
  --color-green: #146b3a;
  --color-green-soft: #0f5029;
  --color-amber: #f2b705;
  --color-steel: #4b6357;
  --color-red: #b23a2f;
  --color-border: #d8d3c4;
  --color-border-strong: #a8a08a;

  --font-display: "Space Grotesk", "Arial Narrow", sans-serif;
  --font-body: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "IBM Plex Mono", "Courier New", monospace;

  --header-height: 4.25rem;
  --shell-width: 72rem;
  --radius: 3px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.55;
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

img { max-width: 100%; display: block; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  margin: 0 0 0.6em;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(1.9rem, 4.5vw, 2.9rem); }
h2 { font-size: clamp(1.35rem, 3vw, 1.75rem); }
h3 { font-size: 1.1rem; }

p { margin: 0 0 1em; }

a {
  color: var(--color-steel);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.18em;
}
a:hover { color: var(--color-green); }

a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--color-amber);
  outline-offset: 2px;
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 0.5rem; top: -3rem;
  background: var(--color-amber);
  color: var(--color-ink);
  padding: 0.6rem 1rem;
  font-family: var(--font-mono);
  font-weight: 600;
  border-radius: var(--radius);
  z-index: 100;
  transition: top 0.15s ease;
}
.skip-link:focus { top: 0.5rem; }
@media (prefers-reduced-motion: reduce) { .skip-link { transition: none; } }

/* ---- Buttons -------------------------------------------------------- */
.button {
  display: inline-block;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  padding: 0.75rem 1.3rem;
  border-radius: var(--radius);
  text-decoration: none;
  border: 2px solid transparent;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.button-primary {
  background: var(--color-amber);
  color: var(--color-ink);
  border-color: var(--color-amber);
}
.button-primary:hover { background: #d9a300; border-color: #d9a300; color: var(--color-ink); }
.button-secondary {
  background: transparent;
  color: var(--color-green);
  border-color: var(--color-green);
}
.button-secondary:hover { background: var(--color-green); color: #fff; }

/* ---- Header / nav ----------------------------------------------------- */
.site-header {
  background: var(--color-charcoal);
  color: #f4f1ea;
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 4px solid var(--color-amber);
}
.header-inner {
  max-width: var(--shell-width);
  margin: 0 auto;
  padding: 0 1.25rem;
  min-height: var(--header-height);
  display: flex;
  align-items: center;
  gap: 1rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: #f4f1ea;
  text-decoration: none;
  margin-right: auto;
}
.brand-mark {
  height: 2.5rem;
  width: 2.5rem;
  object-fit: contain;
  flex-shrink: 0;
}
.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem; height: 2.5rem;
  background: transparent;
  border: 2px solid rgba(244,241,234,0.4);
  border-radius: var(--radius);
  color: #f4f1ea;
  cursor: pointer;
}
.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: "";
  display: block;
  width: 1.1rem;
  height: 2px;
  background: #f4f1ea;
  position: relative;
}
.nav-toggle-bars::before { position: absolute; top: -6px; }
.nav-toggle-bars::after { position: absolute; top: 6px; }

.site-nav ul {
  list-style: none;
  margin: 0; padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.nav-item { position: relative; }
.nav-parent { display: flex; align-items: stretch; }
.nav-link {
  display: block;
  color: #e7e3d8;
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 0.92rem;
  letter-spacing: 0.02em;
  padding: 0.9rem 0.5rem;
  border-bottom: 3px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.nav-item.has-dropdown .nav-parent .nav-link { flex: 1; }
.nav-link[aria-current="page"] {
  color: var(--color-amber);
  border-bottom-color: var(--color-amber);
}
.dropdown-toggle {
  background: transparent;
  border: none;
  color: #e7e3d8;
  padding: 0 0.6rem;
  cursor: pointer;
}
.caret { display: inline-block; font-size: 0.7rem; }

.dropdown-menu {
  list-style: none;
  margin: 0; padding: 0;
  max-height: 0;
  overflow: hidden;
}
.dropdown-menu a {
  display: block;
  padding: 0.6rem 0.5rem 0.6rem 1.25rem;
  color: #d8d3c4;
  font-size: 0.9rem;
  text-decoration: none;
  transition: color 0.15s ease;
}
.dropdown-menu a:hover,
.dropdown-menu a[aria-current="page"] { color: var(--color-amber); }
.nav-item.dropdown-open .dropdown-menu,
.nav-item:focus-within .dropdown-menu {
  max-height: 20rem;
}

@media (min-width: 780px) {
  .nav-toggle { display: none; }
  .site-nav { display: block; }
  .site-nav ul { flex-direction: row; align-items: stretch; gap: 0.25rem; }
  .nav-link { padding: 0 0.75rem; display: flex; align-items: center; height: var(--header-height); }
  .dropdown-toggle { padding: 0 0.35rem; }
  .nav-item.has-dropdown { display: flex; flex-direction: column; }
  .dropdown-menu {
    position: absolute;
    top: 100%; left: 0;
    background: var(--color-charcoal);
    border: 1px solid rgba(244,241,234,0.15);
    border-top: 3px solid var(--color-amber);
    min-width: 13rem;
    max-height: none;
    visibility: hidden;
    opacity: 0;
    transform: translateY(-4px);
  }
  .nav-item:hover .dropdown-menu,
  .nav-item:focus-within .dropdown-menu,
  .nav-item.dropdown-open .dropdown-menu {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
  }
  @media (prefers-reduced-motion: no-preference) {
    .dropdown-menu { transition: opacity 0.12s ease, transform 0.12s ease, visibility 0.12s; }
  }
}

@media (max-width: 779.98px) {
  .site-nav {
    display: none;
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--color-charcoal);
    border-bottom: 4px solid var(--color-amber);
    max-height: calc(100vh - var(--header-height));
    overflow-y: auto;
  }
  .site-nav.nav-open { display: block; }
  .header-inner { flex-wrap: wrap; position: relative; }
}

/* ---- Layout shell ------------------------------------------------------ */
.page-shell {
  max-width: var(--shell-width);
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
}

.breadcrumbs { margin-bottom: 1.25rem; }
.breadcrumbs ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0; padding: 0;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--color-ink-soft);
}
.breadcrumbs a { color: var(--color-steel); text-decoration: none; }
.breadcrumbs a:hover { text-decoration: underline; }
.breadcrumbs li[aria-current="page"] { color: var(--color-ink); font-weight: 600; }
.crumb-sep { color: var(--color-border-strong); }

.page-header { margin-bottom: 2rem; }
.eyebrow {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.82rem;
  color: var(--color-steel);
  margin: 0 0 0.5rem;
}
.page-header-lede { font-size: 1.1rem; color: var(--color-ink-soft); max-width: 46rem; }

/* ---- Overview: text beside a big program logo ------------------------- */
.overview-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: center;
}
@media (min-width: 780px) {
  .overview-grid { grid-template-columns: 1.2fr 1fr; gap: 2.5rem; }
}
.overview-text h2 { margin-bottom: 0.75rem; }
.overview-media {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.5rem;
}
.program-logo { width: 100%; max-width: 22rem; height: auto; }

/* ---- Photo gallery: full natural aspect ratio, no cropping ------------ */
.program-gallery {
  list-style: none;
  margin: 1.75rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr));
  gap: 1.5rem;
  align-items: start;
}
.gallery-item {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
}
.gallery-item img {
  width: 100%;
  height: auto;
  display: block;
}
.gallery-caption {
  display: block;
  padding: 0.6rem 0.85rem;
  border-top: 3px solid var(--color-green);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--color-steel);
}

.section { margin: 2.75rem 0; scroll-margin-top: calc(var(--header-height) + 1.5rem); }

/* Scroll-reveal: sections fade/rise in as they enter view. Gated behind
   .js (added by an inline script in <head>) so content is never hidden
   if JS fails — and behind prefers-reduced-motion so motion-sensitive
   users just see everything immediately. Kept short (0.4s, 14px) so it
   reads as quick and responsive rather than a loading delay. */
@media (prefers-reduced-motion: no-preference) {
  .js .section {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.4s ease, transform 0.4s ease;
  }
  .js .section.is-visible {
    opacity: 1;
    transform: translateY(0);
  }
}
.section:first-child { margin-top: 0; }
.section-heading-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  border-bottom: 3px solid var(--color-green);
  padding-bottom: 0.5rem;
  margin-bottom: 1.25rem;
}
.section-heading-row h2 { margin: 0; border: none; padding: 0; }
.section-heading-link {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  text-decoration: none;
  white-space: nowrap;
}
.section > h2 {
  border-bottom: 3px solid var(--color-green);
  padding-bottom: 0.5rem;
  margin-bottom: 1.25rem;
}
.section-footnote { font-family: var(--font-mono); font-size: 0.9rem; }
.empty-note { color: var(--color-ink-soft); font-style: italic; }

code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: rgba(20,107,58,0.08);
  padding: 0.1em 0.35em;
  border-radius: var(--radius);
}

/* ---- Hero --------------------------------------------------------------- */
.hero { padding: 1.5rem 0 2.5rem; }
.hero-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2rem;
}
.hero-text { flex: 1 1 26rem; max-width: 44rem; }
.hero-logo {
  height: 9rem;
  width: auto;
  flex-shrink: 0;
  margin: 0 auto;
}
@media (min-width: 700px) {
  .hero-logo { height: 12rem; margin: 0; }
}
.hero-tagline { font-size: 1.2rem; color: var(--color-green); font-weight: 600; margin-top: 0.75rem; }
.hero-intro { font-size: 1.05rem; color: var(--color-ink-soft); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.5rem; }

.highlight-list {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}
.highlight-photo {
  display: block;
  max-width: 34rem;
  width: 100%;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-top: 4px solid var(--color-amber);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: var(--color-ink);
  transition: border-color 0.15s ease;
}
.highlight-photo:hover { border-top-color: var(--color-green); }
.highlight-photo img { width: 100%; height: auto; display: block; }
.highlight-caption {
  display: block;
  padding: 0.85rem 1rem;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--color-ink);
}
@media (prefers-reduced-motion: no-preference) {
  .highlight-photo { transition: border-color 0.15s ease, transform 0.15s ease; }
  .highlight-photo:hover { transform: translateY(-3px); }
}

.join-section {
  background: var(--color-charcoal);
  color: #f4f1ea;
  padding: 2.25rem;
  border-radius: var(--radius);
}
.join-section h2 { color: #fff; border: none !important; padding: 0 !important; }
.join-section p { color: #e7e3d8; }

/* ---- Grids / cards -------------------------------------------------- */
.program-grid, .route-grid, .person-grid {
  list-style: none;
  margin: 0; padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
@media (min-width: 560px) {
  .program-grid, .route-grid { grid-template-columns: repeat(2, 1fr); }
  .person-grid { grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); }
}
@media (min-width: 900px) {
  .program-grid, .route-grid { grid-template-columns: repeat(3, 1fr); }
}

.program-card a, .route-card a {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  height: 100%;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-top: 4px solid var(--color-green);
  border-radius: var(--radius);
  padding: 1.25rem;
  text-decoration: none;
  color: var(--color-ink);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.program-card a:hover, .route-card a:hover {
  border-top-color: var(--color-amber);
  box-shadow: 0 4px 0 0 rgba(20, 24, 26, 0.08);
}
@media (prefers-reduced-motion: no-preference) {
  .program-card a, .route-card a { transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease; }
  .program-card a:hover, .route-card a:hover { transform: translateY(-3px); }
}
.program-card-name, .route-card-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--color-ink);
}
.program-card-desc, .route-card-desc { color: var(--color-ink-soft); flex-grow: 1; }
.program-card-link, .route-card-link {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--color-steel);
  margin-top: 0.25rem;
}

.person-card {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 0.85rem;
  text-decoration: none;
  color: var(--color-ink);
  height: 100%;
  transition: border-color 0.15s ease;
}
.person-card:hover { border-color: var(--color-green); }
@media (prefers-reduced-motion: no-preference) {
  .person-card { transition: border-color 0.15s ease, transform 0.15s ease; }
  .person-card:hover { transform: translateY(-2px); }
}
.person-card-body { display: flex; flex-direction: column; }
.person-card-name { font-weight: 600; }
.person-card-role {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--color-steel);
}

/* ---- Avatars ------------------------------------------------------------ */
.avatar { border-radius: var(--radius); flex-shrink: 0; }
.avatar-initials {
  background: var(--color-green);
  color: var(--color-amber);
  font-family: var(--font-mono);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.avatar--md { width: 3rem; height: 3rem; font-size: 1rem; }
.avatar--lg { width: 5.5rem; height: 5.5rem; font-size: 1.6rem; }
.avatar-photo.avatar--md { width: 3rem; height: 3rem; object-fit: cover; }
.avatar-photo.avatar--lg { width: 5.5rem; height: 5.5rem; object-fit: cover; }

.person-header { display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap; }
.person-classyear { font-family: var(--font-mono); color: var(--color-steel); margin: 0; }
.role-list { padding-left: 1.2rem; }
.role-list li { margin-bottom: 0.3rem; }

/* ---- Tables --------------------------------------------------------- */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}
.data-table th {
  background: var(--color-green);
  color: #f4f1ea;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.78rem;
  text-align: left;
  padding: 0.6rem 0.75rem;
}
.data-table td {
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid var(--color-border);
}
.data-table tbody tr:hover { background: rgba(20,107,58,0.05); }
.col-year {
  font-family: var(--font-mono);
  font-weight: 600;
  white-space: nowrap;
}
.data-table .col-year {
  background: var(--color-charcoal);
  color: var(--color-amber);
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius);
  margin: 0.2rem 0;
}
.data-table-wrap { overflow-x: auto; }

/* ---- Definition lists (fact lists) ----------------------------------- */
.fact-list { display: grid; gap: 1rem; margin: 0; }
.fact-list > div {
  border-left: 3px solid var(--color-green);
  padding-left: 0.9rem;
}
.fact-list dt {
  font-family: var(--font-mono);
  text-transform: uppercase;
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  color: var(--color-steel);
}
.fact-list dd { margin: 0.15rem 0 0; }

.link-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.link-list a { font-weight: 600; }

.contact-list { list-style: none; margin: 0 0 1.5rem; padding: 0; display: grid; gap: 0.6rem; }
.contact-list:last-child { margin-bottom: 0; }
.contact-list li { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: baseline; }
.contact-name { font-weight: 600; }
.contact-role { font-family: var(--font-mono); font-size: 0.82rem; color: var(--color-steel); }

/* ---- Instagram (horizontal, one-at-a-time carousel) ------------------ */
.instagram-carousel-wrap { max-width: 34rem; margin: 0 auto; }
.instagram-carousel {
  list-style: none;
  margin: 0; padding: 0 0 0.25rem;
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  gap: 1.25rem;
}
.instagram-carousel:focus-visible { outline: 3px solid var(--color-amber); outline-offset: 4px; }
.instagram-post {
  flex: 0 0 100%;
  scroll-snap-align: center;
  border: 1px solid var(--color-border);
  border-top: 4px solid var(--color-green);
  border-radius: var(--radius);
  background: var(--color-surface);
  overflow: hidden;
}
.instagram-post .instagram-media {
  margin: 0 !important;
  border: 0 !important;
  width: 100% !important;
  min-width: 0 !important;
}
.carousel-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 1rem;
}
.carousel-nav {
  flex: 0 0 auto;
  width: 2.75rem; height: 2.75rem;
  border-radius: 50%;
  border: 2px solid var(--color-green);
  background: var(--color-surface);
  color: var(--color-green);
  font-size: 1.1rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.carousel-nav:hover:not(:disabled) { background: var(--color-green); color: #fff; }
.carousel-nav:disabled { opacity: 0.35; cursor: not-allowed; }
.carousel-status {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--color-steel);
  min-width: 7rem;
  text-align: center;
  margin: 0;
}
.instagram-section .empty-note { margin-bottom: 1rem; }

.instagram-widget-wrap {
  max-width: 40rem;
  margin: 0 auto;
  overflow-x: auto;
}
.instagram-widget-wrap iframe { max-width: 100%; border: 0; }

/* ---- Program pager ---------------------------------------------------- */
.program-pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 3rem;
  border-top: 3px solid var(--color-green);
  padding-top: 1.25rem;
}
.pager-link {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--color-ink);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  transition: border-color 0.15s ease;
}
.pager-link:hover { border-color: var(--color-green); }
.pager-next { text-align: right; }
.pager-direction {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--color-steel);
  text-transform: uppercase;
}
.pager-name { font-weight: 600; font-family: var(--font-display); }

/* ---- In-page index (sticky) -------------------------------------------- */
.page-with-index {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}
@media (min-width: 900px) {
  .page-with-index { grid-template-columns: 14rem 1fr; align-items: start; }
}
.page-index-rail { position: sticky; top: calc(var(--header-height) + 1rem); }
.page-index {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-surface);
  padding: 0.9rem;
}
.page-index-label {
  font-family: var(--font-mono);
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--color-steel);
  margin: 0 0 0.5rem;
}
.page-index ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.15rem; }
.page-index-link {
  display: block;
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  border-left: 3px solid transparent;
  padding: 0.4rem 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--color-ink-soft);
  cursor: pointer;
  border-radius: 0 var(--radius) var(--radius) 0;
}
.page-index-link:hover { background: rgba(20,107,58,0.06); color: var(--color-ink); }
.page-index-link[aria-current="true"] {
  border-left-color: var(--color-amber);
  color: var(--color-green);
  font-weight: 600;
  background: rgba(242,183,5,0.12);
}

@media (max-width: 899.98px) {
  .page-index-rail { position: sticky; top: var(--header-height); z-index: 10; background: var(--color-bg); padding-top: 0.5rem; margin: 0 -1.25rem; padding-left: 1.25rem; padding-right: 1.25rem; }
  .page-index { display: flex; overflow-x: auto; gap: 0.25rem; padding: 0.6rem; }
  .page-index-label { display: none; }
  .page-index ul { display: flex; flex-direction: row; gap: 0.25rem; }
  .page-index-link { white-space: nowrap; border-left: none; border-bottom: 3px solid transparent; border-radius: var(--radius) var(--radius) 0 0; }
  .page-index-link[aria-current="true"] { border-left-color: transparent; border-bottom-color: var(--color-amber); }
}

/* ---- Footer ------------------------------------------------------------ */
.site-footer {
  background: var(--color-charcoal);
  color: #e7e3d8;
  border-top: 4px solid var(--color-amber);
  margin-top: 3rem;
}
.footer-inner {
  max-width: var(--shell-width);
  margin: 0 auto;
  padding: 2.5rem 1.25rem 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 2rem 2.5rem;
}
.footer-brand { display: flex; gap: 0.6rem; align-items: flex-start; flex: 0 1 18rem; }
.footer-brand p { margin: 0; color: #f4f1ea; font-weight: 600; }
.footer-tagline { display: block; font-weight: 400; color: #c7c2b3; font-size: 0.9rem; margin-top: 0.2rem; }
.footer-sitemap {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem 2.5rem;
  flex: 1 1 24rem;
}
.footer-group { flex: 1 1 9rem; }
@media (min-width: 700px) {
  .footer-inner { flex-wrap: nowrap; justify-content: space-between; }
  .footer-sitemap { justify-content: space-between; }
}
.footer-group h2 {
  font-family: var(--font-mono);
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  color: var(--color-amber);
  border: none;
  margin: 0 0 0.6rem;
}
.footer-group ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.4rem; }
.footer-group a { color: #d8d3c4; text-decoration: none; font-size: 0.9rem; }
.footer-group a:hover { color: #fff; text-decoration: underline; }
.footer-fineprint {
  max-width: var(--shell-width);
  margin: 0 auto;
  padding: 0 1.25rem 1.5rem;
  font-size: 0.78rem;
  color: #a9a392;
}
