/* ==========================================================================
   Snowy Ridge Classic — site styles
   Frameworkless. Tokens up top; components below. Mobile first.
   ========================================================================== */
@import url('../fonts/fonts.css');

:root {
  --ink: #15181b;            /* near-black */
  --ink-2: #22262b;          /* dark panel */
  --ink-3: #2e3339;          /* dark card */
  --paper: #f3eee4;          /* warm off-white */
  --paper-2: #e9e2d4;        /* darker paper */
  --stone: #8a8f94;
  --mist: #c9ccd0;
  --rust: #b4511f;           /* accent */
  --rust-2: #d9672c;
  --sage: #7a8c6c;
  --snow: #ffffff;

  --text: #1d2024;
  --text-muted: #5d636a;
  --text-on-dark: #ece7dd;
  --text-on-dark-muted: #a9adb3;

  --font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

  --max: 1120px;
  --gutter: 20px;
  --radius: 6px;
  --nav-h: 64px;
  --shadow: 0 10px 30px rgba(0,0,0,.18);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background: var(--paper);
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--rust); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--rust-2); }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.15; margin: 0 0 .5em; font-weight: 600; letter-spacing: -.005em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); }
h3 { font-size: clamp(1.3rem, 2.2vw, 1.6rem); }
h4 { font-size: 1.1rem; font-family: var(--font-body); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
p { margin: 0 0 1em; }
.lede { font-size: clamp(1.1rem, 1.6vw, 1.3rem); line-height: 1.55; color: var(--text-muted); max-width: 46em; }
.eyebrow { font-family: var(--font-body); font-size: .8rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--rust); margin-bottom: .75rem; display: block; }
.measure { max-width: 42em; }
.muted { color: var(--text-muted); }
.small { font-size: .9rem; }
hr.rule { border: 0; border-top: 1px solid rgba(0,0,0,.12); margin: 2rem 0; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.container--narrow { max-width: 820px; }
.section { padding: clamp(3rem, 8vw, 6rem) 0; }
.section--tight { padding: clamp(2rem, 5vw, 3.5rem) 0; }
.section--dark { background: var(--ink); color: var(--text-on-dark); }
.section--dark h1, .section--dark h2, .section--dark h3 { color: var(--snow); }
.section--dark .lede, .section--dark .muted { color: var(--text-on-dark-muted); }
.section--dark a { color: #f0a46e; }
.section--paper2 { background: var(--paper-2); }
.section-head { margin-bottom: clamp(1.5rem, 4vw, 2.5rem); }
.section-head h2 { max-width: 20em; }

.skip-link { position: absolute; left: -999px; top: 8px; background: var(--snow); color: var(--ink); padding: .5rem .75rem; z-index: 200; }
.skip-link:focus { left: 8px; }

/* Buttons ---------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .85rem 1.4rem; border-radius: var(--radius);
  font-weight: 600; font-size: .95rem; letter-spacing: .02em; text-decoration: none;
  border: 1.5px solid transparent; cursor: pointer; transition: background .15s, color .15s, border-color .15s, transform .15s;
  min-height: 48px; line-height: 1.1;
}
.btn--primary { background: var(--rust); color: var(--snow); }
.btn--primary:hover { background: var(--rust-2); color: var(--snow); }
.btn--ghost { background: transparent; color: var(--snow); border-color: rgba(255,255,255,.7); }
.btn--ghost:hover { background: rgba(255,255,255,.12); color: var(--snow); }
.btn--outline { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn--outline:hover { background: var(--ink); color: var(--snow); }
.btn[aria-disabled="true"] { opacity: .6; cursor: default; pointer-events: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; }

/* Nav --------------------------------------------------------------------- */
.nav {
  position: fixed; inset: 0 0 auto 0; height: var(--nav-h); z-index: 100;
  display: flex; align-items: center;
  color: var(--snow);
  transition: background .25s, box-shadow .25s;
}
.nav--solid, .nav--always-solid { background: rgba(21,24,27,.94); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); box-shadow: 0 1px 0 rgba(255,255,255,.06); }
.nav .container { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.nav__brand { display: flex; align-items: center; gap: .6rem; color: var(--snow); text-decoration: none; font-family: var(--font-display); font-size: 1.15rem; font-weight: 600; letter-spacing: .01em; white-space: nowrap; }
.nav__brand img { height: 34px; width: auto; }
.nav__links { display: none; list-style: none; margin: 0; padding: 0; gap: 1.6rem; align-items: center; }
.nav__links a { color: var(--snow); text-decoration: none; font-weight: 500; font-size: .95rem; opacity: .9; }
.nav__links a:hover, .nav__links a[aria-current="page"] { opacity: 1; text-decoration: underline; text-underline-offset: 6px; text-decoration-color: var(--rust-2); }
.nav__cta { display: none; }
.nav__toggle {
  background: transparent; border: 0; color: var(--snow); width: 44px; height: 44px; cursor: pointer; display: grid; place-items: center; border-radius: 6px;
}
.nav__toggle span { display: block; width: 24px; height: 2px; background: currentColor; position: relative; transition: transform .2s, background .2s; }
.nav__toggle span::before, .nav__toggle span::after { content: ""; position: absolute; left: 0; width: 24px; height: 2px; background: currentColor; transition: transform .2s, top .2s; }
.nav__toggle span::before { top: -7px; } .nav__toggle span::after { top: 7px; }
body.menu-open .nav__toggle span { background: transparent; }
body.menu-open .nav__toggle span::before { top: 0; transform: rotate(45deg); }
body.menu-open .nav__toggle span::after { top: 0; transform: rotate(-45deg); }
.menu {
  position: fixed; inset: 0; z-index: 90; background: rgba(21,24,27,.98); color: var(--snow);
  display: flex; flex-direction: column; justify-content: center; padding: calc(var(--nav-h) + 1rem) var(--gutter) 2rem;
  transform: translateY(-100%); opacity: 0; transition: transform .25s ease, opacity .2s; visibility: hidden;
}
body.menu-open .menu { transform: none; opacity: 1; visibility: visible; }
body.menu-open { overflow: hidden; }
.menu ul { list-style: none; margin: 0; padding: 0; }
.menu li + li { border-top: 1px solid rgba(255,255,255,.08); }
.menu a { display: block; padding: 1rem 0; color: var(--snow); text-decoration: none; font-family: var(--font-display); font-size: 1.6rem; }
.menu a[aria-current="page"] { color: var(--rust-2); }
.menu .btn { margin-top: 1.5rem; width: 100%; }
@media (min-width: 880px) {
  .nav__links { display: flex; }
  .nav__cta { display: inline-flex; }
  .nav__toggle, .menu { display: none; }
}

/* Hero --------------------------------------------------------------------- */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh; display: grid; place-items: center;
  color: var(--snow); text-align: center; overflow: hidden; background: var(--ink);
}
.hero__bg, .hero__bg img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 40%; }
.hero__bg::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.45) 0%, rgba(0,0,0,.25) 35%, rgba(0,0,0,.35) 60%, rgba(21,24,27,.92) 100%);
}
.hero__inner { position: relative; z-index: 1; padding: calc(var(--nav-h) + 2rem) var(--gutter) 5rem; width: 100%; max-width: 860px; }
.hero__logo { width: min(78vw, 540px); margin: 0 auto 1.6rem; filter: drop-shadow(0 6px 24px rgba(0,0,0,.55)); }
.hero__date { font-family: var(--font-display); font-size: clamp(1.15rem, 2.4vw, 1.6rem); margin: 0 0 .35rem; }
.hero__place { font-size: .85rem; letter-spacing: .18em; text-transform: uppercase; opacity: .9; margin: 0 0 2rem; }
.hero .btn-row { justify-content: center; }
.hero__scroll { position: absolute; left: 50%; bottom: 1.5rem; transform: translateX(-50%); z-index: 1; display: flex; flex-direction: column; align-items: center; width: 44px; height: 48px; justify-content: flex-end; }
.hero__scroll::after { content: ""; width: 1px; height: 36px; background: linear-gradient(rgba(255,255,255,.8), transparent); animation: drop 1.8s ease-in-out infinite; }
@keyframes drop { 0% { transform: scaleY(0); transform-origin: top; } 50% { transform: scaleY(1); transform-origin: top; } 51% { transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }
@media (prefers-reduced-motion: reduce) { .hero__scroll::after { animation: none; } html { scroll-behavior: auto; } }

/* Page hero (inner pages) -------------------------------------------------- */
.page-hero { position: relative; padding: calc(var(--nav-h) + clamp(3rem, 9vw, 6rem)) 0 clamp(2.5rem, 6vw, 4rem); background: var(--ink); color: var(--text-on-dark); overflow: hidden; }
.page-hero__bg, .page-hero__bg img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.page-hero__bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(21,24,27,.72), rgba(21,24,27,.88)); }
.page-hero .container { position: relative; z-index: 1; }
.page-hero h1 { color: var(--snow); max-width: 14em; }
.page-hero .lede { color: var(--text-on-dark); opacity: .9; }

/* Stats strip --------------------------------------------------------------- */
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.08); border-radius: var(--radius); overflow: hidden; }
.stat { background: var(--ink-2); padding: 1.25rem 1rem; text-align: center; }
.stat__value { font-family: var(--font-display); font-size: clamp(1.8rem, 4vw, 2.6rem); color: var(--snow); line-height: 1; }
.stat__label { font-size: .75rem; letter-spacing: .14em; text-transform: uppercase; color: var(--text-on-dark-muted); margin-top: .5rem; }
@media (min-width: 700px) { .stats { grid-template-columns: repeat(5, 1fr); } }

/* Two-column feature ----------------------------------------------------- */
.feature { display: grid; gap: 2rem; align-items: center; }
.feature__media img { border-radius: var(--radius); box-shadow: var(--shadow); aspect-ratio: 4 / 5; object-fit: cover; width: 100%; }
.feature__media--wide img { aspect-ratio: 4 / 3; }
@media (min-width: 820px) {
  .feature { grid-template-columns: 1fr 1fr; gap: 4rem; }
  .feature--flip .feature__media { order: 2; }
}

/* Cards ------------------------------------------------------------------ */
.cards { display: grid; gap: 1.25rem; }
@media (min-width: 640px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .cards--3 { grid-template-columns: repeat(3, 1fr); } .cards--4 { grid-template-columns: repeat(4, 1fr); } }
.card { background: var(--snow); border: 1px solid rgba(0,0,0,.08); border-radius: var(--radius); padding: 1.4rem; display: flex; flex-direction: column; gap: .5rem; }
.card h3 { margin-bottom: .25rem; }
.card p:last-child { margin-bottom: 0; }
.card--dark { background: var(--ink-3); border-color: rgba(255,255,255,.08); color: var(--text-on-dark); }
.card--dark h3 { color: var(--snow); }
.card--link { text-decoration: none; color: inherit; transition: transform .15s, box-shadow .15s; }
.card--link:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.card__more { margin-top: auto; font-weight: 600; color: var(--rust); }

/* Photo strip ----------------------------------------------------------- */
.strip { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
.strip img { width: 100%; aspect-ratio: 1; object-fit: cover; }
@media (min-width: 700px) { .strip { grid-template-columns: repeat(4, 1fr); } }
.strip figure { margin: 0; position: relative; }
.strip figcaption { position: absolute; inset: auto 0 0 0; padding: .5rem .6rem; font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; color: var(--snow); background: linear-gradient(transparent, rgba(0,0,0,.6)); }

/* Tables ---------------------------------------------------------------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.data { width: 100%; border-collapse: collapse; font-size: .95rem; background: var(--snow); border: 1px solid rgba(0,0,0,.08); border-radius: var(--radius); overflow: hidden; }
table.data th, table.data td { padding: .7rem .8rem; text-align: left; vertical-align: top; border-bottom: 1px solid rgba(0,0,0,.08); }
table.data th { font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; color: var(--text-muted); background: var(--paper-2); font-weight: 700; }
table.data tr:last-child td { border-bottom: 0; }
table.data td.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.yes { color: #2f7a3a; font-weight: 600; } .no { color: var(--text-muted); }
.pill { display: inline-block; font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: .2rem .5rem; border-radius: 999px; background: var(--paper-2); color: var(--text); white-space: nowrap; }
.pill--crew { background: #dfe9d7; color: #2f5a2a; }
.pill--bc { background: #ece3d3; color: #6d4a1f; }
.pill--pacer { background: #dbe6f2; color: #27476b; }
.pill--bag { background: #f1e0d2; color: #7a3d14; }

/* Aid station cards (mobile) ------------------------------------------------ */
.aid-list { display: grid; gap: .75rem; }
.aid { background: var(--snow); border: 1px solid rgba(0,0,0,.08); border-left: 4px solid var(--stone); border-radius: var(--radius); padding: .9rem 1rem; display: grid; grid-template-columns: auto 1fr; gap: .25rem .9rem; align-items: baseline; }
.aid--crew { border-left-color: var(--sage); }
.aid__mile { font-family: var(--font-display); font-size: 1.5rem; line-height: 1; color: var(--ink); grid-row: span 3; min-width: 3.2rem; }
.aid__mile small { display: block; font-family: var(--font-body); font-size: .62rem; letter-spacing: .12em; text-transform: uppercase; color: var(--text-muted); margin-top: .2rem; }
.aid__name { font-weight: 700; font-size: 1.05rem; }
.aid__tags { display: flex; flex-wrap: wrap; gap: .35rem; }
.aid__cut { font-size: .85rem; color: var(--text-muted); }
.aid__cut strong { color: var(--rust); }
.aid__note { grid-column: 2; font-size: .88rem; color: var(--text-muted); margin-top: .25rem; }

/* Accordion (details) ------------------------------------------------------ */
.acc { border-top: 1px solid rgba(0,0,0,.12); }
.acc details { border-bottom: 1px solid rgba(0,0,0,.12); }
.acc summary { list-style: none; cursor: pointer; padding: 1rem 0; display: grid; grid-template-columns: auto 1fr auto; gap: .25rem 1rem; align-items: center; }
.acc summary::-webkit-details-marker { display: none; }
.acc summary:focus-visible { outline: 2px solid var(--rust); outline-offset: 4px; }
.acc__n { font-family: var(--font-display); font-size: 1.4rem; color: var(--rust); min-width: 2ch; }
.acc__title { font-weight: 600; font-size: 1.05rem; }
.acc__meta { grid-column: 2; font-size: .82rem; color: var(--text-muted); }
.acc__chev { width: 12px; height: 12px; border-right: 2px solid var(--ink); border-bottom: 2px solid var(--ink); transform: rotate(45deg); transition: transform .2s; grid-row: span 2; }
details[open] .acc__chev { transform: rotate(-135deg); }
.acc__body { padding: 0 0 1.5rem; max-width: 46em; }
.acc__body p { margin-bottom: .9em; }
.acc__stats { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; font-size: .85rem; color: var(--text-muted); margin-bottom: 1rem; font-variant-numeric: tabular-nums; }
.acc__stats b { color: var(--ink); }

/* Map + profile ---------------------------------------------------------- */
.map-wrap { position: relative; background: var(--ink-2); }
#map { height: clamp(300px, 42vh, 520px); width: 100%; background: #dfe3e0; z-index: 1; }
.map-wrap.is-full { position: fixed; inset: 0; z-index: 120; }
.map-wrap.is-full #map { height: 100vh; height: 100dvh; }
.map-btn { position: absolute; top: 10px; right: 10px; z-index: 5; background: var(--snow); color: var(--ink); border: 2px solid rgba(0,0,0,.2); border-radius: 4px; padding: 0 .7rem; height: 36px; font: 600 .8rem var(--font-body); cursor: pointer; box-shadow: 0 1px 4px rgba(0,0,0,.25); }
.map-btn:hover { background: #f4f4f4; }
.map-legend { display: flex; flex-wrap: wrap; gap: .5rem 1.2rem; font-size: .82rem; color: var(--text-on-dark-muted); padding: .75rem var(--gutter); }
.map-legend span::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: .4rem; vertical-align: -1px; background: var(--c); }
.profile .map-attrib { margin: .25rem 0 0; opacity: .7; }
.profile .map-attrib a { color: inherit; }
.leaflet-container { font-family: var(--font-body); }
.leaflet-popup-content { font-size: .9rem; line-height: 1.45; margin: 10px 14px; }
.leaflet-popup-content b { font-family: var(--font-display); font-size: 1.05rem; }
.marker-aid { background: var(--rust); color: var(--snow); border: 2px solid var(--snow); border-radius: 50%; width: 24px !important; height: 24px !important; display: grid; place-items: center; font: 700 .72rem var(--font-body); box-shadow: 0 1px 4px rgba(0,0,0,.4); }
.marker-aid--crew { background: #3e6b36; }
.marker-aid--pass { background: var(--stone); }
.marker-flag { background: var(--ink); color: var(--snow); border: 2px solid var(--snow); border-radius: 3px; padding: 0 5px; width: auto !important; height: 20px !important; line-height: 16px; font: 700 .66rem/16px var(--font-body); letter-spacing: .06em; white-space: nowrap; box-shadow: 0 1px 4px rgba(0,0,0,.4); }
.marker-mile { background: rgba(255,255,255,.9); color: var(--ink); border-radius: 3px; width: auto !important; height: 16px !important; padding: 0 4px; font: 600 .62rem/16px var(--font-body); white-space: nowrap; border: 1px solid rgba(0,0,0,.25); }
.marker-hover { width: 14px !important; height: 14px !important; border-radius: 50%; background: #ffd34d; border: 2px solid var(--ink); box-shadow: 0 0 0 4px rgba(255,211,77,.35); }

.profile { position: relative; background: var(--ink-2); padding: .5rem var(--gutter) 1rem; color: var(--text-on-dark); user-select: none; -webkit-user-select: none; }
.profile svg { width: 100%; height: 200px; display: block; touch-action: pan-y; }
[data-profile] { width: 100%; }
.profile__readout { display: flex; flex-wrap: wrap; gap: .25rem 1.2rem; font-size: .85rem; color: var(--text-on-dark-muted); min-height: 1.5em; font-variant-numeric: tabular-nums; margin-bottom: .25rem; }
.profile__readout b { color: var(--snow); font-weight: 600; }
.profile__hint { font-size: .75rem; color: var(--text-on-dark-muted); margin-top: .5rem; }

/* Terrain bars ------------------------------------------------------------- */
.bars { display: grid; gap: .6rem; }
.bar { display: grid; grid-template-columns: 1fr auto; gap: .2rem .75rem; font-size: .9rem; align-items: center; }
.bar__track { grid-column: 1 / -1; height: 8px; background: rgba(0,0,0,.1); border-radius: 4px; overflow: hidden; }
.bar__fill { height: 100%; background: var(--rust); border-radius: 4px; }
.bar b { font-variant-numeric: tabular-nums; }

/* Cutoff table and planner -------------------------------------------------- */
.planner { background: var(--snow); border: 1px solid rgba(0,0,0,.08); border-radius: var(--radius); padding: 1.25rem; }
.planner__controls { display: grid; gap: .75rem; margin-bottom: 1rem; }
.planner label { font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); display: block; margin-bottom: .3rem; }
.planner input[type="range"] { width: 100%; accent-color: var(--rust); }
.planner__select { width: 100%; min-height: 44px; font: 500 .95rem var(--font-body); padding: .4rem .6rem; border: 1px solid rgba(0,0,0,.2); border-radius: var(--radius); background: var(--snow); color: var(--text); }
.planner__goal { font-family: var(--font-display); font-size: 2rem; line-height: 1; color: var(--ink); font-variant-numeric: tabular-nums; }
.planner__goal small { font-family: var(--font-body); font-size: .85rem; color: var(--text-muted); margin-left: .5rem; }
@media (min-width: 700px) { .planner__controls { grid-template-columns: 1fr 1fr; align-items: end; } }
.late { color: #b3261e; font-weight: 700; }
.tight { color: #a86a00; font-weight: 600; }
.margin { font-size: .8rem; color: var(--text-muted); }

/* Checklist ------------------------------------------------------------------ */
.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: .35rem; }
.checklist li label { display: flex; gap: .75rem; align-items: flex-start; background: var(--snow); border: 1px solid rgba(0,0,0,.08); border-radius: var(--radius); padding: .7rem .9rem; cursor: pointer; font-size: .95rem; }
.checklist input { width: 20px; height: 20px; margin: .1rem 0 0; accent-color: var(--rust); flex: none; }
.checklist input:checked + span { color: var(--text-muted); text-decoration: line-through; }
.checklist--reset { margin-top: .75rem; background: none; border: 0; color: var(--rust); font: 600 .85rem var(--font-body); cursor: pointer; padding: 0; }

/* Prose ----------------------------------------------------------------------- */
.prose { max-width: 42em; }
.prose h2 { margin-top: 2.5rem; }
.prose h3 { margin-top: 2rem; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: .4em; }
.callout { border-left: 4px solid var(--rust); background: var(--snow); padding: 1rem 1.2rem; border-radius: 0 var(--radius) var(--radius) 0; margin: 1.5rem 0; }
.callout--dark { background: var(--ink-3); color: var(--text-on-dark); }
blockquote { margin: 2rem 0; padding: 0; font-family: var(--font-display); font-style: italic; font-size: clamp(1.25rem, 2.2vw, 1.6rem); line-height: 1.4; max-width: 30em; }
blockquote cite { display: block; font-family: var(--font-body); font-style: normal; font-size: .85rem; color: var(--text-muted); margin-top: .75rem; }
.section--dark blockquote cite { color: var(--text-on-dark-muted); }
.toc { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 1.5rem; padding: 0; list-style: none; }
.toc a { display: inline-block; padding: .4rem .8rem; border: 1px solid rgba(0,0,0,.15); border-radius: 999px; font-size: .85rem; text-decoration: none; color: var(--ink); background: var(--snow); }
.toc a:hover { border-color: var(--rust); color: var(--rust); }

/* Countdown ----------------------------------------------------------------- */
.countdown { display: flex; gap: 1.2rem; justify-content: center; flex-wrap: wrap; }
.countdown div { text-align: center; min-width: 64px; }
.countdown b { display: block; font-family: var(--font-display); font-size: clamp(1.8rem, 4vw, 2.6rem); line-height: 1; color: var(--snow); font-variant-numeric: tabular-nums; }
.countdown span { font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--text-on-dark-muted); }

/* Footer ----------------------------------------------------------------------- */
.footer { background: var(--ink); color: var(--text-on-dark-muted); padding: 3rem 0 2rem; font-size: .9rem; }
.footer__grid { display: grid; gap: 2rem; }
@media (min-width: 760px) { .footer__grid { grid-template-columns: 1.4fr 1fr 1fr; } }
.footer img { width: 140px; margin-bottom: 1rem; }
.footer a { color: var(--text-on-dark); }
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer li { margin-bottom: .4rem; }
.footer h4 { color: var(--snow); font-size: .8rem; }
.footer__bottom { border-top: 1px solid rgba(255,255,255,.08); margin-top: 2rem; padding-top: 1.25rem; font-size: .8rem; display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; justify-content: space-between; }

/* Reveal ------------------------------------------------------------------ */
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* Utility ------------------------------------------------------------------ */
.grid-2 { display: grid; gap: 2rem; }
@media (min-width: 820px) { .grid-2 { grid-template-columns: 1fr 1fr; gap: 3rem; } }
.mt-1 { margin-top: 1rem; } .mt-2 { margin-top: 2rem; } .mb-0 { margin-bottom: 0; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Aid stations: cards on phones, table on wide screens */
.aid-table-wrap { display: none; }
@media (min-width: 900px) { .aid-table-wrap { display: block; } [data-aid-list] { display: none; } }

/* Sticky sub-nav (in-page chips that pin under the main nav once scrolled past) */
.subnav { position: sticky; top: var(--nav-h); z-index: 80; background: var(--ink); border-bottom: 1px solid rgba(255,255,255,.08); }
.subnav .container { position: relative; }
.subnav .toc { margin: 0; padding: .6rem 0; flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; gap: .4rem; scroll-snap-type: x proximity; }
.subnav .toc::-webkit-scrollbar { display: none; }
.subnav .toc li { flex: none; scroll-snap-align: start; }
.subnav .toc a { background: transparent; color: var(--text-on-dark); border-color: rgba(255,255,255,.22); font-size: .82rem; padding: .35rem .75rem; white-space: nowrap; min-height: 36px; display: inline-flex; align-items: center; }
.subnav .toc a:hover { border-color: var(--rust-2); color: var(--snow); }
.subnav .toc a.is-active { background: var(--rust); border-color: var(--rust); color: var(--snow); }
.subnav--stuck { box-shadow: 0 6px 18px rgba(0,0,0,.25); }
/* Right-edge fade shows while more chips are hidden off-screen (toggled by JS) */
.subnav .container::after { content: ""; position: absolute; top: 0; bottom: 0; right: 0; width: 56px; pointer-events: none; background: linear-gradient(90deg, rgba(21,24,27,0), var(--ink) 70%); opacity: 0; transition: opacity .2s; }
.subnav.has-more .container::after { opacity: 1; }
.has-subnav [id] { scroll-margin-top: calc(var(--nav-h) + 60px); }
@media (max-width: 879px) {
  /* Bleed the row to the viewport edges so a partially visible chip signals there is more to scroll */
  .subnav .container { padding: 0; }
  .subnav .toc { padding-left: var(--gutter); padding-right: var(--gutter); scroll-padding-left: var(--gutter); }
}
