/* CandleLight Timed Ultras — site styles (layout shared with Mind The Ducks 12 Hour) */
:root {
  --ink: #141B2D;        /* midnight blue, headers & text */
  --dusk: #3A5290;       /* dusk blue: links, eyebrows */
  --line-dark: #2B3655;  /* rules on dark ground */
  --edge-dark: #5A6690;  /* outlines on dark ground */
  --mist: #D5DBEC;       /* body text on dark ground */
  --muted: #4E566E;      /* secondary text on light */
  --panel: #F6F4EF;      /* light panels */
  --panel-2: #EDE9E0;
  --line: #E4DFD3;
  --paper: #FFFFFF;
  --flame: #FFB23E;       /* candle flame: actions */
  --display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --body: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius: 20px;
  --wrap: 1200px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--body); color: var(--ink); background: var(--paper); font-size: 17px; line-height: 1.55; }
img { max-width: 100%; display: block; }
a { color: var(--dusk); font-weight: 600; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--flame); outline-offset: 3px; border-radius: 6px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--flame); color: var(--ink); padding: 10px 16px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }

/* ---------- Header ---------- */
.site-header { background: var(--ink); color: #fff; position: sticky; top: 0; z-index: 50; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 14px; padding-bottom: 14px; }
.brand { display: flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; }
.brand:hover { color: #fff; }
.brand-name { font-family: var(--display); font-weight: 800; font-size: 24px; letter-spacing: .5px; text-transform: uppercase; line-height: 1; }
.brand-name small { display: block; font-size: 14px; font-weight: 600; letter-spacing: 3px; color: var(--flame); }

.nav { display: flex; align-items: center; gap: 4px; }
.nav > ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 2px; }
.nav li { position: relative; }
.nav a.top { display: block; color: #fff; text-decoration: none; font-weight: 600; padding: 12px 14px; border-radius: 10px; }
.nav a.top:hover, .nav a.top[aria-current="page"] { background: rgba(255,255,255,.08); color: var(--flame); }
.nav .sub { display: none; position: absolute; top: 100%; left: 0; min-width: 220px; list-style: none; margin: 0; padding: 8px; background: #fff; border-radius: 14px; box-shadow: 0 14px 40px rgba(20,27,45,.25); }
.nav li:hover > .sub, .nav li:focus-within > .sub { display: block; }
.nav .sub a { display: block; padding: 10px 12px; color: var(--ink); text-decoration: none; font-weight: 500; border-radius: 8px; }
.nav .sub a:hover { background: var(--panel); }
.menu-toggle { display: none; width: 44px; height: 44px; border: 1px solid var(--edge-dark); background: transparent; border-radius: 12px; color: #fff; cursor: pointer; align-items: center; justify-content: center; }

/* ---------- Buttons & chips ---------- */
.btn { display: inline-block; text-decoration: none; font-weight: 700; font-size: 17px; padding: 14px 26px; border-radius: 999px; border: 2px solid transparent; line-height: 1.2; text-align: center; }
.btn-flame { background: var(--flame); color: var(--ink); }
.btn-flame:hover { background: #FFC66E; color: var(--ink); }
.btn-ink { background: var(--ink); color: #fff; }
.btn-ink:hover { background: var(--dusk); color: #fff; }
.btn-ghost { color: #fff; border-color: var(--edge-dark); }
.btn-ghost:hover { border-color: #fff; color: #fff; }
.btn-sm { font-size: 16px; padding: 11px 20px; }
.pill { display: inline-block; border: 1px solid var(--edge-dark); border-radius: 999px; padding: 7px 15px; font-weight: 600; font-size: 15px; color: var(--mist); }
.tag { display: inline-block; background: var(--flame); color: var(--ink); font-weight: 700; padding: 7px 14px; border-radius: 999px; font-size: 15px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips a { text-decoration: none; border: 1px solid var(--edge-dark); color: #fff; border-radius: 999px; padding: 10px 16px; font-weight: 600; }
.chips a:hover { border-color: #fff; color: #fff; }

/* ---------- Type ---------- */
h1, h2, h3 { font-family: var(--display); font-weight: 800; text-transform: uppercase; line-height: 1; margin: 0; }
h2 { font-size: clamp(40px, 5vw, 56px); }
h3 { font-size: 28px; }
.eyebrow { margin: 0 0 8px; font-size: 14px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: var(--dusk); }
.lede { margin: 16px 0 0; font-size: 19px; color: var(--muted); max-width: 660px; }
.label { margin: 0; font-size: 13px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted); }
.big { margin: 6px 0 0; font-family: var(--display); font-weight: 700; font-size: 30px; line-height: 1.1; }
.note { font-size: 14px; color: var(--muted); }
.muted { color: var(--muted); }

/* ---------- Sections ---------- */
.section { padding: 96px 0; }
.section-tight { padding: 56px 0; }
.section-alt { background: var(--panel); }
.section-dark { background: var(--ink); color: #fff; }
.section-dark .lede, .section-dark .muted { color: var(--mist); }
.section-dark .eyebrow { color: var(--flame); }

.page-hero { background: var(--ink); color: #fff; padding: 64px 0 72px; }
.page-hero h1 { font-size: clamp(52px, 7vw, 88px); line-height: .92; }
.page-hero .lede { color: var(--mist); }

/* Home hero */
.hero { background: var(--ink); color: #fff; overflow: hidden; }
.hero .wrap { display: flex; flex-wrap: wrap; gap: 48px; align-items: center; padding-top: 72px; padding-bottom: 112px; }
.hero-copy { flex: 999 1 560px; min-width: 0; }
.hero h1 { font-size: clamp(56px, 8vw, 112px); line-height: .9; letter-spacing: -1px; margin-top: 20px; }
.hero h1 span { color: var(--flame); }
.hero .lede { color: var(--mist); font-size: 20px; }
.hero-subtitle { margin: 24px 0 0; max-width: 640px; color: #fff; font-size: clamp(22px, 2.4vw, 28px); font-weight: 600; line-height: 1.3; }
.hero-art { flex: 1 1 300px; min-width: 0; display: flex; justify-content: center; }
.hero-art svg { width: 100%; max-width: 320px; height: auto; }
/* Course outline (assets/course-outline.svg) with the lap distance laid over it */
.course-art { position: relative; margin: 0; width: 100%; max-width: 320px; container-type: inline-size; text-align: center; }
.course-art img { display: block; width: 100%; height: auto; }
.course-art figcaption { position: absolute; left: 49.4%; top: 52%; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; line-height: 1; pointer-events: none; }
.course-art-miles { font-family: var(--display); font-weight: 800; font-size: 46px; font-size: 14.4cqw; color: #fff; }
.course-art-unit { margin-top: 4px; font-weight: 600; font-size: 12px; font-size: 3.75cqw; letter-spacing: 1.5px; text-transform: uppercase; color: #D5DBEC; }
.course-art-note { margin: 12px 0 0; font-size: 13px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; color: #D5DBEC; }
.brand-logo { display: block; flex: none; }
.actions { margin-top: 36px; display: flex; flex-wrap: wrap; gap: 12px; }

/* Facts strip */
.facts { margin-top: -56px; position: relative; }
.facts-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 2px; background: var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: 0 12px 40px rgba(20,27,45,.12); }
.facts-grid > div { background: #fff; padding: 24px 28px; }
.facts-grid .sub { margin: 2px 0 0; font-size: 15px; color: var(--muted); }

/* Grids & cards */
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(var(--min, 260px), 1fr)); }
.split { display: flex; flex-wrap: wrap; gap: 24px; }
.split > * { flex: 1 1 420px; min-width: 0; }
.head-row { display: flex; flex-wrap: wrap; gap: 24px; align-items: end; justify-content: space-between; margin-bottom: 48px; }
.head-row > div { flex: 1 1 520px; min-width: 0; }
.card { background: #fff; border-radius: 16px; padding: 24px; }
.card h3 { font-family: var(--body); text-transform: none; font-size: 19px; font-weight: 700; line-height: 1.3; }
.card p { margin: 8px 0 0; color: var(--muted); }
.card-line { border: 2px solid var(--line); border-radius: var(--radius); padding: 28px; }
.card-line p { color: var(--muted); }
.card-dark { background: var(--ink); color: #fff; border-radius: var(--radius); padding: 28px; }
.card-dark p { color: var(--mist); }
.card-dark a { color: var(--flame); }
.placeholder { background: var(--panel-2); border-radius: var(--radius); min-height: 320px; display: flex; align-items: center; justify-content: center; color: var(--muted); font-weight: 600; text-align: center; padding: 24px; }

/* Milestones */
.milestones { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; }
.milestone { border-top: 6px solid var(--dusk); background: var(--panel); border-radius: 0 0 14px 14px; padding: 18px 16px 20px; }
.milestone.gold { border-top-color: var(--flame); }
.milestone .n { margin: 0; font-family: var(--display); font-weight: 800; font-size: 44px; line-height: 1; }
.milestone .d { margin: 2px 0 0; font-size: 12px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted); }
.milestone .p { margin: 14px 0 0; font-weight: 600; line-height: 1.3; }

/* Divisions */
.divs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 20px; }
.divs div { background: var(--panel); border-radius: 12px; padding: 16px; }
.divs strong { display: block; font-size: 18px; }
.divs span { color: var(--muted); }

/* Leaders */
.leaders { list-style: none; margin: 20px 0 0; padding: 0; }
.leaders li { display: flex; align-items: baseline; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line-dark); }
.leaders li:last-child { border-bottom: 0; }
.leaders .rank { font-family: var(--display); font-weight: 800; font-size: 28px; color: var(--flame); width: 24px; }
.leaders .who { flex: 1; font-size: 18px; font-weight: 600; }
.leaders .mi { font-family: var(--display); font-weight: 700; font-size: 28px; }

/* Price tiers */
.tiers { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.tier { background: #fff; border-radius: 16px; padding: 22px 20px; }
.tier.now { background: var(--ink); color: #fff; }
.tier .t { margin: 0; font-size: 13px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; opacity: .85; }
.tier .price { margin: 8px 0 0; font-family: var(--display); font-weight: 800; font-size: 44px; line-height: 1; }
.tier .when { margin: 10px 0 0; font-size: 15px; font-weight: 500; }

/* Timeline */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: flex; gap: 24px; padding: 18px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.timeline time { font-family: var(--display); font-weight: 800; font-size: 28px; min-width: 110px; }
.timeline strong { display: block; font-size: 18px; }
.timeline span { color: var(--muted); }

/* Tables */
.table-box { overflow-x: auto; border: 2px solid var(--line); border-radius: 16px; }
table { width: 100%; border-collapse: collapse; font-size: 16px; }
th, td { text-align: left; padding: 14px 18px; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { background: var(--panel); font-size: 13px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted); }
tr:last-child td { border-bottom: 0; }
tr.hl td { background: #FFF1D9; font-weight: 600; }

/* FAQ */
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; padding: 20px 40px 20px 0; font-size: 19px; font-weight: 700; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 14px; font-size: 28px; font-weight: 500; color: var(--dusk); }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 0 0 20px; color: var(--muted); max-width: 760px; }

/* Lists */
.ticks { list-style: none; margin: 16px 0 0; padding: 0; }
.ticks li { padding: 10px 0 10px 30px; position: relative; border-bottom: 1px solid var(--line); }
.ticks li::before { content: ""; position: absolute; left: 4px; top: 19px; width: 12px; height: 7px; border-left: 3px solid var(--dusk); border-bottom: 3px solid var(--dusk); transform: rotate(-45deg); }
.reasons { counter-reset: r; list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.reasons li { counter-increment: r; background: var(--panel); border-radius: 16px; padding: 20px 20px 20px 72px; position: relative; font-weight: 500; }
.reasons li::before { content: counter(r); position: absolute; left: 20px; top: 12px; font-family: var(--display); font-weight: 800; font-size: 40px; color: var(--dusk); }

/* Sponsors */
.sponsors { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.sponsors > a, .sponsors > div { background: var(--panel); border-radius: 14px; min-height: 96px; display: flex; align-items: center; justify-content: center; color: var(--muted); text-decoration: none; padding: 16px; text-align: center; }
.sponsors > a:hover { background: var(--panel-2); color: var(--ink); }
.sponsors img { display: block; height: 48px; width: auto; flex: none; }
.sponsors > :has(img) { gap: 12px; color: var(--ink); font-weight: 600; }

/* ---------- Registration status (home) ---------- */
.reg-status-wrap { padding-bottom: 0; }
.reg-status { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px 40px; border: 2px solid var(--line); border-left: 10px solid #2E9E6B; border-radius: var(--radius); padding: 28px 32px; background: #fff; }
.reg-status-main { flex: 1 1 380px; }
.reg-status h2 { display: flex; align-items: center; gap: 12px; margin: 0; font-size: clamp(30px, 4vw, 44px); }
.reg-status-detail { margin: 10px 0 0; color: var(--muted); max-width: 60ch; }
.reg-status-side { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; }
.reg-count { margin: 0; color: var(--muted); font-weight: 600; }
.reg-count .n { font-family: var(--display); font-weight: 800; font-size: 44px; line-height: 1; color: var(--ink); vertical-align: -4px; }
.reg-dot { width: 14px; height: 14px; border-radius: 50%; background: #2E9E6B; flex: none; box-shadow: 0 0 0 5px rgba(46,158,107,.18); }
.reg-status[data-state="upcoming"] { border-left-color: var(--flame); }
.reg-status[data-state="upcoming"] .reg-dot { background: var(--flame); box-shadow: 0 0 0 5px rgba(255,178,62,.25); }
.reg-status[data-state="full"] { border-left-color: #D9822B; }
.reg-status[data-state="full"] .reg-dot { background: #D9822B; box-shadow: 0 0 0 5px rgba(217,130,43,.2); }
.reg-status[data-state="closed"], .reg-status[data-state="over"] { border-left-color: var(--edge-dark); }
.reg-status[data-state="closed"] .reg-dot, .reg-status[data-state="over"] .reg-dot { background: var(--edge-dark); box-shadow: none; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: var(--mist); }
.site-footer .cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 32px; padding-top: 56px; padding-bottom: 40px; }
.site-footer .fname { margin: 0; font-family: var(--display); font-weight: 800; font-size: 24px; color: #fff; text-transform: uppercase; }
.site-footer h4 { margin: 0 0 10px; color: #fff; font-size: 16px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li a { display: inline-block; padding: 5px 0; color: var(--mist); text-decoration: none; font-weight: 500; }
.site-footer li a:hover { color: var(--flame); }
.site-footer a { color: var(--flame); }
.site-footer .legal { border-top: 1px solid var(--line-dark); padding-top: 20px; padding-bottom: 32px; font-size: 14px; }

/* Mobile sticky CTA */
.sticky-cta { display: none; }

/* ---------- Small screens ---------- */
@media (max-width: 900px) {
  .menu-toggle { display: inline-flex; }
  .nav { position: absolute; left: 0; right: 0; top: 100%; background: var(--ink); flex-direction: column; align-items: stretch; padding: 8px 16px 20px; display: none; border-top: 1px solid var(--line-dark); max-height: calc(100vh - 72px); overflow-y: auto; }
  .nav.open { display: flex; }
  .nav > ul { flex-direction: column; }
  .nav .sub { display: block; position: static; box-shadow: none; background: transparent; padding: 0 0 8px 12px; min-width: 0; }
  .nav .sub a { color: var(--mist); padding: 8px 12px; }
  .nav .sub a:hover { background: rgba(255,255,255,.06); }
  .nav .btn { margin-top: 12px; }
  .section { padding: 64px 0; }
  .wrap { padding: 0 16px; }
  .hero .wrap { padding-top: 40px; padding-bottom: 96px; }
  .divs { grid-template-columns: 1fr 1fr; }
  .timeline li { flex-direction: column; gap: 4px; }
  .sticky-cta { display: flex; position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 40; background: #fff; border-radius: 999px; box-shadow: 0 8px 28px rgba(20,27,45,.3); padding: 8px 8px 8px 20px; align-items: center; justify-content: space-between; gap: 12px; font-size: 14px; font-weight: 600; line-height: 1.25; }
  .sticky-cta span span { display: block; color: var(--muted); font-weight: 500; }
  body { padding-bottom: 84px; }
}

/* Race countdown (home hero, race-day header). Each unit is styled like a race bib. */
.countdown { margin: 28px 0 4px; }
.countdown-label { margin: 0 0 10px; font-weight: 600; font-size: 15px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--flame); }
.countdown[data-state="live"] .countdown-label { font-size: 20px; letter-spacing: .5px; text-transform: none; }
.countdown-units { display: flex; gap: 12px; flex-wrap: wrap; }
.countdown-units[hidden] { display: none; }
.cd-unit { position: relative; min-width: 124px; padding: 14px 18px 12px; background: var(--paper); color: var(--ink); border-radius: 12px; text-align: center;
  background-image: radial-gradient(circle at 10px 10px, var(--ink) 3px, transparent 3.5px), radial-gradient(circle at calc(100% - 10px) 10px, var(--ink) 3px, transparent 3.5px),
    radial-gradient(circle at 10px calc(100% - 10px), var(--ink) 3px, transparent 3.5px), radial-gradient(circle at calc(100% - 10px) calc(100% - 10px), var(--ink) 3px, transparent 3.5px); }
.cd-unit .n { display: block; font-family: var(--display); font-weight: 800; font-size: 56px; line-height: 1; font-variant-numeric: tabular-nums; }
.cd-unit .u { display: block; margin-top: 4px; font-weight: 600; font-size: 13px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted); }
@media (max-width: 520px) {
  .countdown-units { gap: 8px; }
  .cd-unit { flex: 1 1 0; min-width: 0; padding: 12px 8px 10px; }
  .cd-unit .n { font-size: 44px; }
  .cd-unit .u { font-size: 11px; letter-spacing: 1px; }
}

/* ---------- Race pictures (photos.html) ---------- */
.btn svg { vertical-align: -3px; margin-right: 6px; }
.btn-ghost-ink { color: var(--ink); border-color: var(--line); background: #fff; }
.btn-ghost-ink:hover { border-color: var(--ink); color: var(--ink); }
.gallery-bar { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; }
.gallery-filter { display: flex; flex-wrap: wrap; gap: 8px; }
.gallery-filter button { font: inherit; font-weight: 600; font-size: 16px; cursor: pointer; border: 2px solid var(--line); background: #fff; color: var(--ink); border-radius: 999px; padding: 9px 18px; }
.gallery-filter button:hover { border-color: var(--ink); }
.gallery-filter button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.gallery-status { margin: 16px 0 0; min-height: 1.5em; }
.gallery { margin-top: 12px; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.gallery .placeholder { min-height: 0; aspect-ratio: 1; }

/* Course map (MapMyRun embed) */
.course-map { margin: 0; background: #fff; border-radius: var(--radius); overflow: hidden; }
.course-map iframe { display: block; width: 100%; height: 520px; border: 0; }
.course-map figcaption { padding: 10px 16px; font-size: 14px; font-weight: 600; }
@media (max-width: 640px) { .course-map iframe { height: 440px; } }
.gallery-item { position: relative; display: block; width: 100%; padding: 0; border: 0; cursor: zoom-in; aspect-ratio: 1; border-radius: 16px; overflow: hidden; background: var(--panel-2); }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.gallery-item:hover img { transform: scale(1.04); }
.gallery-item .src { position: absolute; left: 10px; top: 10px; background: rgba(20,27,45,.85); color: #fff; font-size: 12px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; padding: 5px 10px; border-radius: 999px; }
.gallery-item .cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 32px 14px 12px; color: #fff; font-size: 15px; font-weight: 500; text-align: left; line-height: 1.3; background: linear-gradient(transparent, rgba(20,27,45,.85)); opacity: 0; transition: opacity .2s; }
.gallery-item:hover .cap, .gallery-item:focus-visible .cap { opacity: 1; }
.gallery-more { margin-top: 24px; text-align: center; }
.social-card { display: flex; flex-direction: column; text-decoration: none; color: var(--ink); border: 2px solid transparent; }
.social-card:hover { border-color: var(--ink); color: var(--ink); }
.social-ico { width: 48px; height: 48px; border-radius: 12px; background: var(--ink); color: var(--flame); display: inline-flex; align-items: center; justify-content: center; margin-bottom: 16px; }

.lightbox { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; }
.lightbox::backdrop { background: rgba(10,22,18,.92); }
.lightbox[open] { display: flex; align-items: center; justify-content: center; }
.lightbox figure { margin: 0; max-width: min(1100px, 86vw); }
.lightbox img { max-width: 100%; max-height: 78vh; margin: 0 auto; border-radius: 12px; }
.lightbox figcaption { margin-top: 12px; color: var(--mist); text-align: center; font-size: 16px; }
.lightbox figcaption a { color: var(--flame); white-space: nowrap; }
.lb-credit { color: #A8B1CC; }
.lb-close, .lb-nav { position: fixed; border: 1px solid var(--edge-dark); background: rgba(20,27,45,.7); color: #fff; border-radius: 999px; width: 48px; height: 48px; font-size: 30px; line-height: 1; cursor: pointer; }
.lb-close:hover, .lb-nav:hover { border-color: #fff; }
.lb-close { top: 16px; right: 16px; }
.lb-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 16px; top: 50%; transform: translateY(-50%); }
@media (max-width: 600px) {
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .gallery-item .cap { display: none; }
  .lightbox figure { max-width: 100vw; padding: 0 8px; }
  .lb-nav { top: auto; bottom: 20px; transform: none; }
}

/* ---------- Follow along prompt (all pages; settings in race.json followPrompt) ---------- */
.follow-prompt { position: fixed; left: 24px; bottom: 24px; z-index: 45; width: min(380px, calc(100vw - 24px)); background: var(--ink); color: #fff; border: 1px solid var(--line-dark); border-top: 6px solid var(--flame); border-radius: var(--radius); padding: 22px 24px 16px; box-shadow: 0 18px 48px rgba(20,27,45,.35);
  opacity: 0; transform: translateY(24px); transition: opacity .3s ease, transform .3s ease; }
.follow-prompt.in { opacity: 1; transform: none; }
.fp-eyebrow { margin: 0 0 6px; font-size: 13px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: var(--flame); }
.fp-title { margin: 0; padding-right: 28px; font-family: var(--display); font-weight: 800; font-size: 26px; line-height: 1.05; text-transform: uppercase; }
.fp-text { margin: 10px 0 0; color: var(--mist); font-size: 16px; }
.fp-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.fp-actions .btn { flex: 1 1 auto; }
.fp-close { position: absolute; top: 12px; right: 12px; width: 36px; height: 36px; border: 0; border-radius: 999px; background: transparent; color: var(--mist); font-size: 26px; line-height: 1; cursor: pointer; }
.fp-close:hover { background: rgba(255,255,255,.08); color: #fff; }
.fp-later { display: block; margin: 10px auto 0; border: 0; background: none; color: var(--mist); font: inherit; font-size: 14px; font-weight: 600; text-decoration: underline; cursor: pointer; padding: 6px; }
.fp-later:hover { color: #fff; }
@media (max-width: 900px) {
  .follow-prompt { left: 12px; right: 12px; width: auto; bottom: 84px; }
}
@media (prefers-reduced-motion: reduce) {
  .follow-prompt { transition: none; transform: none; }
}

/* Mileage leaders (results.html): names link to the full list */
.leaders .who a { color: #fff; text-decoration: none; }
.leaders .who a:hover { color: var(--flame); text-decoration: underline; }

/* Full mileage list (mileage.html) */
.mileage-bar { display: flex; flex-wrap: wrap; gap: 16px 20px; align-items: end; }
.mileage-bar .field { display: flex; flex-direction: column; gap: 6px; }
.mileage-bar .field-grow { flex: 1 1 280px; }
.mileage-bar input, .mileage-bar select { font: inherit; font-size: 17px; color: var(--ink); background: #fff; border: 2px solid var(--line); border-radius: 12px; padding: 10px 14px; min-height: 48px; }
.mileage-bar input:focus, .mileage-bar select:focus { border-color: var(--dusk); outline: none; }
.mileage-bar input { width: 100%; }
.mileage-table td { vertical-align: middle; }
.mileage-table th.num, .mileage-table td.ml-miles, .mileage-table td.ml-races, .mileage-table td.ml-best { text-align: right; font-variant-numeric: tabular-nums; }
.mileage-table .ml-rank { width: 64px; font-family: var(--display); font-weight: 800; font-size: 22px; color: var(--dusk); font-variant-numeric: tabular-nums; }
.mileage-table .ml-top .ml-rank { color: #B26A00; }
.mileage-table .ml-miles { font-family: var(--display); font-weight: 700; font-size: 22px; }
.mileage-table .ml-name { width: 100%; white-space: normal; }
.ml-toggle { font: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-align: left; color: var(--ink); display: block; }
.ml-toggle .ml-who { font-weight: 700; color: var(--dusk); }
.ml-toggle .ml-who::after { content: "+"; display: inline-block; margin-left: 8px; width: 20px; height: 20px; line-height: 18px; text-align: center; border: 1.5px solid var(--line); border-radius: 50%; font-size: 15px; color: var(--dusk); vertical-align: 1px; }
.ml-toggle[aria-expanded="true"] .ml-who::after { content: "–"; background: var(--dusk); border-color: var(--dusk); color: #fff; }
.ml-toggle:hover .ml-who { color: var(--ink); text-decoration: underline; }
.ml-toggle .ml-town { display: block; font-size: 14px; color: var(--muted); }
.mileage-table tr.open td { border-bottom-color: transparent; background: var(--panel); }
.mileage-table tr.ml-detail td { background: var(--panel); padding-top: 0; white-space: normal; }
.ml-detail-head { margin: 0 0 12px; color: var(--muted); font-size: 15px; }
.ml-detail-head strong { color: var(--ink); }
.ml-years { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px 32px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.ml-years li { display: grid; grid-template-columns: 44px 1fr 52px 40px; align-items: center; gap: 10px; font-size: 15px; }
.ml-years .y { font-weight: 700; font-variant-numeric: tabular-nums; }
.ml-years .bar { height: 10px; background: #fff; border-radius: 999px; overflow: hidden; }
.ml-years .fill { display: block; height: 100%; background: var(--dusk); border-radius: 999px; }
.ml-years .v { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.ml-years .best { font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; background: var(--flame); color: var(--ink); border-radius: 999px; padding: 2px 6px; text-align: center; }
.ml-years li.none { color: #8B92A8; }
.ml-years li.none .y { font-weight: 500; }
.ml-years li.sel .y { color: var(--ink); text-decoration: underline; text-decoration-color: var(--flame); text-decoration-thickness: 3px; }
@media (max-width: 640px) {
  .mileage-table th, .mileage-table td { padding: 12px 10px; }
  .mileage-table .ml-races, .mileage-table .ml-best { display: none; }
  .ml-years { grid-template-columns: 1fr; }
}

/* ---------- Results archive (results-archive.php) ---------- */
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.page-hero .crumb { color: var(--flame); text-decoration: none; }
.page-hero .crumb::before { content: "← "; }
.page-hero .crumb:hover { color: #fff; text-decoration: underline; }
.archive-notice { margin: 20px 0 0; display: inline-block; background: rgba(255,178,62,.12); border: 1px solid var(--flame); color: #fff; border-radius: 12px; padding: 10px 16px; font-weight: 600; }
.year-chips a { font-variant-numeric: tabular-nums; }
.year-chips a:hover { background: var(--flame); border-color: var(--flame); color: var(--ink); }

/* Year pager (hero and under the table) */
.year-pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 32px; }
.year-jump { display: flex; gap: 8px; align-items: center; }
.year-jump select { font: inherit; font-weight: 700; font-size: 17px; color: #fff; background: transparent; border: 2px solid var(--edge-dark); border-radius: 999px; padding: 9px 36px 9px 18px; min-height: 46px; cursor: pointer;
  appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--flame) 50%), linear-gradient(135deg, var(--flame) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
.year-jump select:hover, .year-jump select:focus { border-color: #fff; outline: none; }
.year-jump select option { color: var(--ink); background: #fff; }
.year-pager-foot { margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--line); }

/* Stats and podiums */
.race-stats .big { font-size: 40px; font-variant-numeric: tabular-nums; }
.race-stats .sub { overflow-wrap: anywhere; }
.podiums { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
.podium { background: var(--ink); color: #fff; border-radius: var(--radius); padding: 28px 28px 12px; }
.podium h2 { font-size: 40px; color: var(--flame); }
.podium ol { list-style: none; margin: 12px 0 0; padding: 0; }
.podium li { display: flex; align-items: center; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line-dark); }
.podium li:last-child { border-bottom: 0; }
.podium .pl { flex: none; width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--edge-dark); display: inline-flex; align-items: center; justify-content: center; font-family: var(--display); font-weight: 800; font-size: 22px; }
.podium li.first .pl { background: var(--flame); border-color: var(--flame); color: var(--ink); }
.podium .who { flex: 1; min-width: 0; font-size: 19px; font-weight: 700; }
.podium .who a { color: #fff; text-decoration: none; }
.podium .who a:hover { color: var(--flame); text-decoration: underline; }
.podium .who small, .podium .mi small { display: block; font-family: var(--body); font-size: 14px; font-weight: 500; color: var(--mist); text-transform: none; }
.podium .mi { text-align: right; font-family: var(--display); font-weight: 800; font-size: 32px; line-height: 1; font-variant-numeric: tabular-nums; }
.podium .mi small { margin-top: 4px; }
.div-winners { margin-top: 16px; }
.div-winners th[scope="row"] { background: none; font-size: 15px; letter-spacing: 0; text-transform: none; color: var(--ink); font-weight: 700; }
.div-winners td { white-space: normal; }
.div-winners td a { text-decoration: none; }
.div-winners td a:hover { text-decoration: underline; }

/* Full results table */
.results-table { background: #fff; }
.results-table th.num, .results-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.results-table td { vertical-align: middle; }
.results-table .rs-pos { width: 56px; font-family: var(--display); font-weight: 800; font-size: 22px; color: var(--dusk); text-align: right; font-variant-numeric: tabular-nums; }
.results-table .rs-name { width: 100%; white-space: normal; min-width: 180px; }
.results-table .rs-name a { font-weight: 700; text-decoration: none; }
.results-table .rs-name a:hover { text-decoration: underline; }
.results-table .rs-town { display: block; font-size: 14px; color: var(--muted); }
.results-table .rs-miles { font-family: var(--display); font-weight: 700; font-size: 22px; }
.results-table .rs-time, .results-table .rs-bib { color: var(--muted); }
.results-table .rs-div { font-size: 15px; }
.results-table .rs-year a { font-weight: 700; text-decoration: none; }
.results-table .rs-year a:hover { text-decoration: underline; }
.results-table tr.rs-win td { background: #FFF1D9; }
.results-table tr.rs-win .rs-pos { color: #B26A00; }
.gp { display: inline-block; min-width: 44px; text-align: center; font-size: 14px; font-weight: 700; border-radius: 999px; padding: 2px 8px; background: var(--panel); color: var(--muted); font-variant-numeric: tabular-nums; }
.rs-top .gp { background: var(--dusk); color: #fff; }
.rs-win .gp { background: var(--flame); color: var(--ink); }
.results-small { margin-top: 20px; max-width: 860px; }
.results-small .note { margin: 0 0 8px; }

/* Records and year cards */
.records { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.record { border-top: 6px solid var(--dusk); background: var(--panel); border-radius: 0 0 16px 16px; padding: 20px 20px 22px; }
.record.gold { border-top-color: var(--flame); }
.record .n { margin: 8px 0 0; font-family: var(--display); font-weight: 800; font-size: 52px; line-height: 1; font-variant-numeric: tabular-nums; }
.record .n small { font-size: 22px; font-weight: 700; }
.record .who { margin: 10px 0 0; font-size: 19px; font-weight: 700; }
.record .who a { text-decoration: none; }
.record .who a:hover { text-decoration: underline; }
.record .d { margin: 2px 0 0; color: var(--muted); font-size: 15px; }
.year-cards { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.year-card { display: flex; flex-direction: column; background: #fff; color: var(--ink); text-decoration: none; font-weight: 400; border: 2px solid transparent; border-radius: 16px; padding: 20px 22px; }
a.year-card:hover { border-color: var(--ink); color: var(--ink); }
.year-card p { margin: 0; }
.yc-year { font-family: var(--display); font-weight: 800; font-size: 44px; line-height: 1; }
a.year-card:hover .yc-year { color: var(--dusk); }
.yc-date { margin-top: 4px !important; font-size: 14px; font-weight: 600; color: var(--muted); }
.year-card dl { margin: 16px 0 0; display: grid; gap: 6px; }
.year-card dl div { display: grid; grid-template-columns: 64px 1fr; gap: 8px; align-items: baseline; }
.year-card dt { font-size: 12px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted); }
.year-card dd { margin: 0; font-weight: 600; }
.year-card dd span { color: var(--muted); font-weight: 500; white-space: nowrap; }
.yc-go { margin-top: auto !important; padding-top: 16px; color: var(--dusk); font-weight: 700; }
.year-card.off { background: transparent; border: 2px dashed var(--line); justify-content: center; min-height: 120px; }
.year-card.off .yc-year { color: #8B92A8; }
.yc-none { color: var(--muted); font-weight: 600; margin-top: 4px !important; }
.repeat-winners .rank { width: 44px; }
.repeat-winners .yrs { font-size: 15px; color: var(--mist); text-align: right; }
.repeat-winners .yrs a { color: var(--mist); text-decoration: none; }
.repeat-winners .yrs a:hover { color: var(--flame); text-decoration: underline; }

@media (max-width: 760px) {
  .results-table th, .results-table td { padding: 12px 8px; }
  .results-table .rs-bib, .results-table .rs-age, .results-table .rs-time, .results-table .rs-laps { display: none; }
  .results-table .rs-div { white-space: normal; font-size: 14px; }
  .podium { padding: 22px 18px 8px; }
  .year-pager .btn { padding: 10px 14px; }
}
@media (max-width: 480px) {
  .results-table .rs-div { display: none; }
  .record .n { font-size: 44px; }
}
.year-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.year-links a { text-decoration: none; border: 2px solid var(--line); border-radius: 999px; padding: 6px 14px; font-variant-numeric: tabular-nums; }
.year-links a:hover { border-color: var(--ink); color: var(--ink); }

/* ---------- Hall of Fame (hall-of-fame.php) ---------- */
.hof-photo { margin: 0 0 20px; }
.hof-photo img { width: 100%; height: auto; border-radius: 12px; }
.hof-photo figcaption { margin-top: 8px; font-size: 14px; color: var(--muted); }
.hof-count { margin: 0; font-weight: 600; color: var(--muted); }
.hof-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.hof-entry { display: grid; grid-template-columns: 140px 1fr; gap: 0; border: 2px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; }
.hof-year { margin: 0; background: var(--flame); color: var(--ink); display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 22px 12px; text-align: center; }
.hof-year .label { color: var(--ink); font-size: 12px; }
.hof-year .n { font-family: var(--display); font-weight: 800; font-size: 56px; line-height: 1; font-variant-numeric: tabular-nums; margin-top: 4px; }
.hof-body { padding: 24px 28px; min-width: 0; }
.hof-name { font-size: clamp(32px, 4vw, 44px); }
.hof-meta { margin: 10px 0 0; display: flex; flex-wrap: wrap; gap: 6px 18px; color: var(--muted); font-size: 15px; font-weight: 600; }
.hof-meta span + span::before { content: "·"; margin-right: 18px; color: var(--line-dark); }
.hof-citation { margin: 12px 0 0; font-size: 18px; }
.hof-story { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 12px; }
.hof-story summary { cursor: pointer; font-weight: 700; color: var(--dusk); width: fit-content; }
.hof-story summary:hover { color: var(--ink); }
.hof-story p { margin: 12px 0 0; color: var(--muted); max-width: 760px; }
.hof-mini { list-style: none; margin: 16px 0 0; padding: 0; }
.hof-mini li { display: flex; gap: 14px; align-items: baseline; padding: 10px 0; border-bottom: 1px solid var(--line); }
.hof-mini .y { font-family: var(--display); font-weight: 800; font-size: 24px; color: var(--dusk); min-width: 52px; }
.hof-mini a { text-decoration: none; color: var(--ink); font-size: 18px; }
.hof-mini a:hover { text-decoration: underline; }
@media (max-width: 600px) {
  .hof-entry { grid-template-columns: 1fr; }
  .hof-year { flex-direction: row; justify-content: flex-start; gap: 12px; padding: 12px 20px; }
  .hof-year .n { font-size: 36px; margin-top: 0; }
  .hof-body { padding: 20px; }
  .hof-meta span + span::before { display: none; }
}

/* Map links in the home page facts strip */
.facts-grid a.map-link { color: inherit; font-weight: inherit; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; text-decoration-color: var(--flame); }
.facts-grid a.map-link:hover { color: var(--dusk); }

/* ---------------------------------------------------------------
   Candle watermark
   A single candle flame sits faintly in the bottom-right corner of every
   page. It floats over the content at low opacity and ignores clicks, so it
   never blocks links or buttons. Artwork: assets/flame-watermark.svg.
   To turn it off on one page, add class="no-watermark" to that page's <body>.
---------------------------------------------------------------- */
body::after {
  content: "";
  position: fixed;
  right: clamp(8px, 2vw, 32px);
  bottom: clamp(-30px, -2vw, -8px);
  width: clamp(110px, 14vw, 190px);
  aspect-ratio: 100 / 200;
  background: url("flame-watermark.svg") no-repeat center / contain;
  opacity: .08;
  pointer-events: none;
  z-index: 30;            /* above page content, below sticky Sign up bar (40), follow prompt (45) and header (50) */
}
body.no-watermark::after { content: none; }
@media (max-width: 900px) {
  body::after { width: 90px; right: 6px; bottom: 64px; opacity: .06; } /* clear of the Sign up bar */
}
@media print { body::after { content: none; } }

/* Registration fee schedule (includes/fees.php) */
.fee-tiers { list-style: none; margin: 0; padding: 0; }
.fee-tiers .tier.past { background: transparent; border: 2px dashed var(--line); color: var(--muted); }
.fee-tiers .tier.past .price { text-decoration: line-through; text-decoration-thickness: 3px; }
.fee-badge { display: inline-block; margin-left: 6px; padding: 2px 8px; border-radius: 999px; font-size: 11px; letter-spacing: 1px; background: var(--flame); color: var(--ink); opacity: 1; vertical-align: 1px; }
.tier.past .fee-badge { background: var(--line); color: var(--muted); }
.fee-increases { margin-top: 16px; background: #fff; }
.fee-increases caption { text-align: left; padding: 16px 18px 4px; font-weight: 700; font-size: 17px; }
.fee-increases td { white-space: normal; }
.fee-increases tr.past td { color: var(--muted); }
.fee-increases tr.tbd td { color: var(--muted); font-style: italic; }
.fee-note { margin-top: 14px; }

/* ===============================================================
   CandleLight additions: two events (24 hour and 12 hour) plus relays
   =============================================================== */

/* Night sky on the dark heroes: a soft glow low on the right, like a lamp on the course */
.hero, .page-hero { background: radial-gradient(ellipse 60% 70% at 85% 110%, rgba(255,178,62,.16), transparent 70%), radial-gradient(ellipse 50% 40% at 10% -10%, rgba(90,102,144,.35), transparent 70%), var(--ink); }

/* Home hero: the 24-hour dial (both events on one clock) */
.dial { margin: 0; width: 100%; max-width: 360px; }
.dial svg { width: 100%; height: auto; display: block; }
.dial figcaption { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 8px 18px; justify-content: center; font-size: 13px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; color: var(--mist); }
.dial .key { display: inline-flex; align-items: center; gap: 8px; }
.dial .key::before { content: ""; width: 22px; height: 6px; border-radius: 3px; background: var(--flame); }
.dial .key.k12::before { background: #FFE2A8; }

/* Event cards: one per race option */
.events { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.event { position: relative; display: flex; flex-direction: column; background: #fff; border: 2px solid var(--line); border-radius: var(--radius); padding: 26px 24px 24px; overflow: hidden; }
.event::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 6px; background: var(--flame); }
.event.e12::before { background: linear-gradient(90deg, var(--dusk), var(--flame)); }
.event .hrs { margin: 4px 0 0; font-family: var(--display); font-weight: 800; font-size: 64px; line-height: .9; }
.event .hrs small { font-size: 22px; letter-spacing: 1px; margin-left: 4px; }
.event .kind { margin: 6px 0 0; font-size: 13px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: var(--dusk); }
.event .when { margin: 14px 0 0; font-weight: 600; }
.event .when span { display: block; color: var(--muted); font-weight: 500; font-size: 15px; }
.event ul { list-style: none; margin: 14px 0 0; padding: 0; color: var(--muted); font-size: 15px; }
.event ul li { padding: 6px 0; border-top: 1px solid var(--line); }
.event .cost { margin: auto 0 0; padding-top: 18px; font-family: var(--display); font-weight: 800; font-size: 30px; }
.event .cost span { font-family: var(--body); font-size: 14px; font-weight: 600; color: var(--muted); margin-left: 6px; }
.event-dark { background: var(--ink); border-color: var(--ink); color: #fff; }
.event-dark .kind { color: var(--flame); }
.event-dark .when span, .event-dark ul, .event-dark .cost span { color: var(--mist); }
.event-dark ul li { border-top-color: var(--line-dark); }

/* Two fee schedules side by side */
.fee-pair { display: grid; gap: 40px; }
.fee-pair h3 { margin: 0 0 16px; font-size: 32px; }
.fee-pair h3 small { font-family: var(--body); font-size: 15px; font-weight: 600; text-transform: none; color: var(--muted); margin-left: 8px; letter-spacing: 0; }

/* Night / day timeline: two columns of the same schedule */
.timeline .ev { display: inline-block; margin-left: 8px; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; vertical-align: 2px; background: var(--panel-2); color: var(--ink); }
.timeline .ev.all { background: var(--flame); }
.timeline li.night time { color: var(--dusk); }

/* Compare table */
.compare th[scope="row"] { background: transparent; color: var(--ink); font-size: 15px; letter-spacing: 0; text-transform: none; font-weight: 700; }
.compare td { white-space: normal; }
.compare thead th { white-space: nowrap; }

/* Swag strip */
.swag { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.swag div { background: var(--panel); border-radius: 14px; padding: 18px 16px; }
.swag .n { margin: 0; font-family: var(--display); font-weight: 800; font-size: 36px; line-height: 1; }
.swag .d { margin: 4px 0 0; font-size: 12px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted); }
.swag .p { margin: 12px 0 0; font-weight: 600; line-height: 1.3; }
.swag div.gold { background: var(--ink); color: #fff; }
.swag div.gold .d { color: var(--flame); }

/* Beneficiary band */
.cause { display: grid; gap: 32px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); align-items: center; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.stats div { border-top: 4px solid var(--flame); padding-top: 12px; }
.stats .n { margin: 0; font-family: var(--display); font-weight: 800; font-size: 44px; line-height: 1; }
.stats .d { margin: 4px 0 0; font-size: 14px; color: var(--mist); }

/* A small "to be confirmed" marker for details the race director still needs to confirm */
.tbc { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; background: var(--panel-2); color: var(--muted); vertical-align: 2px; }
.site-footer a { overflow-wrap: anywhere; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
code { font-family: ui-monospace, Consolas, monospace; font-size: .92em; background: var(--panel-2); color: var(--ink); padding: 1px 6px; border-radius: 6px; }
.card-dark .btn-flame, .card-dark .btn-flame:hover { color: var(--ink); }
.section-alt .sponsors > a, .section-alt .sponsors > div { background: #fff; }

/* ---------- Results: four events ---------- */
/* Event tabs on the results archive and results across the years (in the dark page hero) */
.event-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.event-tabs a { display: inline-flex; align-items: baseline; gap: 8px; text-decoration: none; border: 2px solid var(--edge-dark); color: #fff; border-radius: 999px; padding: 10px 18px; font-weight: 700; }
.event-tabs a span { font-weight: 500; font-size: 14px; color: var(--mist); font-variant-numeric: tabular-nums; }
.event-tabs a:hover { border-color: #fff; color: #fff; }
.event-tabs a[aria-current="page"] { background: var(--flame); border-color: var(--flame); color: var(--ink); }
.event-tabs a[aria-current="page"] span { color: var(--ink); }
/* Year cards list the winners of both solo races */
.year-card dl.yc-winners div { grid-template-columns: 96px 1fr; }
/* Relay team rows */
.results-table tr.rs-team .rs-name strong { color: var(--ink); }
.results-table .rs-time sup { color: #B26A00; font-weight: 700; margin-left: 2px; }
/* Mileage leaders: number of races under the name */
.leaders .leader-sub { display: block; font-size: 14px; font-weight: 500; color: var(--mist); }
/* Year-by-year miles: event tag (24 / 12) and years outside the chosen event */
.ml-years li { grid-template-columns: 44px 30px 1fr 52px 40px; }
.ml-years .ev { font-size: 12px; font-weight: 700; text-align: center; border-radius: 6px; color: var(--dusk); background: #fff; line-height: 20px; }
.ml-years .ev:empty { background: transparent; }
.ml-years .ev24 { background: var(--ink); color: var(--flame); }
.ml-years li.other { opacity: .45; }

/* Race night sky: sunset, sunrise and moon (home page, under the key facts; data from includes/sky.php) */
.sky-grid { margin-top: 12px; }
.sky-grid > div { background: var(--ink); color: #fff; }
.sky-grid .label { color: var(--flame); }
.sky-grid .sub { color: var(--mist); }
.moon-big { display: flex; align-items: center; gap: 10px; }
.moon-pic { flex: none; }
.sky-credit { margin: 10px 0 0; font-size: 13px; color: var(--muted); text-align: right; }
.sky-credit a { color: var(--muted); }

/* CandleLight: seven solo price periods sit in one row on wide screens */
.fee-tiers { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.fee-tiers .tier { padding-left: 16px; padding-right: 16px; }
.fee-tiers .tier .price { font-size: clamp(30px, 2.6vw, 38px); }
@media (min-width: 1100px) { .fee-tiers { grid-template-columns: repeat(7, minmax(0, 1fr)); } }
.fee-tiers .fee-badge { white-space: nowrap; }

/* Records on the Results page: record type and race pickers (light background) */
.rec-pick { display: flex; flex-wrap: wrap; gap: 16px 40px; }
.rec-pick .label { margin: 0 0 8px; font-size: 12px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted); }
.rec-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.rec-tabs a { display: inline-flex; align-items: baseline; gap: 8px; text-decoration: none; border: 2px solid var(--line); color: var(--ink); border-radius: 999px; padding: 8px 16px; font-weight: 700; }
.rec-tabs a span { font-weight: 500; font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; }
.rec-tabs a:hover { border-color: var(--ink); }
.rec-tabs a[aria-current="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.rec-tabs a[aria-current="true"] span { color: var(--mist); }
.rec-title { margin: 32px 0 16px; font-size: 28px; }
.rec-title small { display: block; margin-top: 4px; font-family: var(--body); font-size: 15px; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--muted); }
.rec-compare th[scope="row"] { background: none; font-size: 15px; letter-spacing: 0; text-transform: none; color: var(--ink); font-weight: 700; white-space: nowrap; }
.rec-compare td, .div-winners td { white-space: normal; }
.rec-compare thead a { color: inherit; }
.rec-mi { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rec-compare caption, .div-winners caption { caption-side: top; text-align: left; padding: 16px 20px 12px; font-weight: 700; color: var(--ink); }
@media (max-width: 700px) {
  .rec-compare th[scope="row"] { white-space: normal; min-width: 96px; }
  .rec-compare td, #records .div-winners td { min-width: 150px; }
  #records .div-winners th[scope="row"] .muted { display: block; }
}
.rec-age { font-weight: 600; color: var(--muted); }
.record .who .rec-age { font-weight: 600; }

/* Streaks on the Results page */
.streaks td, .streaks th { white-space: nowrap; }
.streaks .num { text-align: right; font-variant-numeric: tabular-nums; }
.streak-dots { display: inline-flex; gap: 4px; vertical-align: middle; }
.streak-dots .sd { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--line); background: transparent; }
.streak-dots .sd.on { background: var(--flame); border-color: var(--flame); }
.streak-dots .sd.raced { background: var(--dusk); border-color: var(--dusk); opacity: .45; }
.sd-key { display: inline-block; width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--line); vertical-align: -1px; }
.sd-key.on { background: var(--flame); border-color: var(--flame); }
.sd-key.raced { background: var(--dusk); border-color: var(--dusk); opacity: .45; }
@media (max-width: 700px) {
  .streaks .col-dots, .streaks .col-total { display: none; }
  .streaks td, .streaks th { white-space: normal; padding-left: 10px; padding-right: 10px; }
}
