/* Mind The Ducks 12 Hour — site styles */
:root {
  --ink: #10231C;        /* deep pond green, headers & text */
  --pond: #1F5C4A;       /* links, eyebrows */
  --line-dark: #2C5C4D;  /* rules on dark ground */
  --edge-dark: #4E7A6B;  /* outlines on dark ground */
  --mist: #CFE3DA;       /* body text on dark ground */
  --muted: #4A5A54;      /* secondary text on light */
  --panel: #F2F5F3;      /* light panels */
  --panel-2: #E6EEEA;
  --line: #DCE5E0;
  --paper: #FFFFFF;
  --duck: #FFC72C;       /* action yellow */
  --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(--pond); font-weight: 600; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--duck); 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(--duck); 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(--duck); }

.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(--duck); }
.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(16,35,28,.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-duck { background: var(--duck); color: var(--ink); }
.btn-duck:hover { background: #ffd65c; color: var(--ink); }
.btn-ink { background: var(--ink); color: #fff; }
.btn-ink:hover { background: var(--pond); 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(--duck); 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(--pond); }
.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(--duck); }

.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(--duck); }
.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: #CFE3DA; }
.course-art-note { margin: 12px 0 0; font-size: 13px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; color: #CFE3DA; }
.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(16,35,28,.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(--duck); }
.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(--pond); background: var(--panel); border-radius: 0 0 14px 14px; padding: 18px 16px 20px; }
.milestone.gold { border-top-color: var(--duck); }
.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(--duck); 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: #FFF6D6; 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(--pond); }
.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(--pond); border-bottom: 3px solid var(--pond); 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(--pond); }

/* 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: #99002f; 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(--duck); }
.reg-status[data-state="upcoming"] .reg-dot { background: var(--duck); box-shadow: 0 0 0 5px rgba(255,199,44,.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(--duck); }
.site-footer a { color: var(--duck); }
.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(16,35,28,.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(--duck); }
.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(16,35,28,.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(16,35,28,.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(--duck); 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(--duck); white-space: nowrap; }
.lb-credit { color: #9DB8AD; }
.lb-close, .lb-nav { position: fixed; border: 1px solid var(--edge-dark); background: rgba(16,35,28,.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(--duck); border-radius: var(--radius); padding: 22px 24px 16px; box-shadow: 0 18px 48px rgba(16,35,28,.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(--duck); }
.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(--duck); 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(--pond); 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(--pond); font-variant-numeric: tabular-nums; }
.mileage-table .ml-top .ml-rank { color: #B8860B; }
.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(--pond); }
.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(--pond); vertical-align: 1px; }
.ml-toggle[aria-expanded="true"] .ml-who::after { content: "–"; background: var(--pond); border-color: var(--pond); 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(--pond); 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(--duck); color: var(--ink); border-radius: 999px; padding: 2px 6px; text-align: center; }
.ml-years li.none { color: #8A9A94; }
.ml-years li.none .y { font-weight: 500; }
.ml-years li.sel .y { color: var(--ink); text-decoration: underline; text-decoration-color: var(--duck); 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(--duck); 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,199,44,.12); border: 1px solid var(--duck); 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(--duck); border-color: var(--duck); 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(--duck) 50%), linear-gradient(135deg, var(--duck) 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(--duck); }
.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(--duck); border-color: var(--duck); 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(--duck); 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(--pond); 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: #FFF6D6; }
.results-table tr.rs-win .rs-pos { color: #B8860B; }
.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(--pond); color: #fff; }
.rs-win .gp { background: var(--duck); 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(--pond); background: var(--panel); border-radius: 0 0 16px 16px; padding: 20px 20px 22px; }
.record.gold { border-top-color: var(--duck); }
.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(--pond); }
.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(--pond); 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: #8A9A94; }
.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(--duck); 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(--duck); 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(--pond); 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(--pond); 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(--duck); }
.facts-grid a.map-link:hover { color: var(--pond); }

/* ---------------------------------------------------------------
   Duck watermark (added Nov 30, 2026)
   A front-facing duck face that sits faintly in the bottom-right
   corner of every page (traced from the supplied line drawing). It floats over the content at low opacity
   and ignores clicks, so it never blocks links or buttons.
   Ink fill shows on white sections; its light outline shows on the
   dark-green ones. Artwork: assets/duck-watermark.svg (colour master:
   assets/duck-face.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(-40px, -3vw, -12px);   /* neck fades out below the edge */
  width: clamp(190px, 27vw, 380px);
  aspect-ratio: 156 / 188;
  background: url("duck-watermark.svg") no-repeat center / contain;
  opacity: .07;
  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: 170px; right: 6px; bottom: 64px; opacity: .06; } /* clear of the Sign up bar */
}
@media print {
  body::after { position: absolute; top: 40%; bottom: auto; right: 50%; transform: translateX(50%); width: 60%; opacity: .05; }
}

/* 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(--duck); 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; }
