/* ==========================================================
   Fitness Coach Marathon Challenge
   Palette: ink #283845 · teal #28AFB0 · red #F71735 · paper #F4EBD9
   ========================================================== */
:root {
  --ink: #283845;
  --ink-2: #3B4E5E;
  --ink-soft: #5E6B75;
  --teal: #28AFB0;
  --teal-ink: #17797A;      /* teal dark enough for text on paper */
  --teal-wash: #D3EAE3;
  --red: #F71735;
  --red-ink: #C80F28;
  --red-wash: #FBD9D3;
  --paper: #F4EBD9;
  --paper-2: #EBDFC6;
  --paper-3: #E1D2B4;
  --card: #FBF6EC;
  --line: rgba(40, 56, 69, .16);
  --display: "Big Shoulders Display", Impact, "Arial Narrow", sans-serif;
  --body: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;
  --cond: "Barlow Condensed", "Arial Narrow", sans-serif;
  --r: 10px;
  --shadow: 5px 5px 0 var(--ink);
  --wrap: 1120px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.55 var(--body);
  background-image:
    radial-gradient(rgba(40,56,69,.05) 1px, transparent 1px);
  background-size: 18px 18px;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--teal-ink); text-underline-offset: 3px; }
a:hover { color: var(--red-ink); }
h1, h2, h3 { font-family: var(--display); font-weight: 900; line-height: .98; letter-spacing: .3px; margin: 0; text-transform: uppercase; }
h1 { font-size: clamp(40px, 7vw, 72px); }
h2 { font-size: clamp(30px, 4.6vw, 46px); }
h3 { font-size: 24px; }
p { margin: 0 0 1em; }
code { background: var(--paper-2); padding: 1px 6px; border-radius: 4px; font-size: .88em; }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Masthead ---------- */
.masthead {
  background-color: var(--ink);
  background-image:
    repeating-linear-gradient(115deg, transparent 0 46px, rgba(244,235,217,.045) 46px 48px),
    linear-gradient(180deg, #2D3F4E 0%, var(--ink) 100%);
  color: var(--paper);
}
.masthead__inner { max-width: var(--wrap); margin: 0 auto; padding: 18px 20px; }
.brand { display: flex; align-items: center; gap: 18px; color: inherit; text-decoration: none; }
.brand:hover { color: inherit; }
.logo { width: 74px; height: 74px; flex: none; filter: drop-shadow(0 3px 0 rgba(0,0,0,.25)); }
.logo--sm { width: 54px; height: 54px; }
.brand__words { display: flex; flex-direction: column; font-family: var(--display); text-transform: uppercase; line-height: .9; }
.brand__top { font-weight: 700; font-size: 18px; letter-spacing: 5px; color: var(--teal); }
.brand__main { font-weight: 900; font-size: clamp(30px, 5.4vw, 46px); letter-spacing: .5px; }
.brand__main em { font-style: normal; color: var(--paper); -webkit-text-stroke: 0; position: relative; }
.masthead--big .masthead__inner { padding: 34px 20px 30px; }
.masthead--big .logo { width: clamp(92px, 16vw, 148px); height: auto; }
.masthead--big .brand { gap: clamp(16px, 3vw, 30px); }
.masthead--big .brand__top { font-size: clamp(18px, 2.6vw, 28px); letter-spacing: 7px; }
.masthead--big .brand__main { font-size: clamp(42px, 9vw, 104px); }
.masthead--big .brand__main em { display: block; color: var(--red); }

.strip { background: var(--red); color: #fff; border-top: 2px solid var(--ink); border-bottom: 2px solid var(--ink); display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 4px 16px; padding: 7px 16px; }
.strip span { font-family: var(--cond); font-weight: 700; text-transform: uppercase; letter-spacing: 1.8px; font-size: 14px; white-space: nowrap; }
.strip .dot { width: 6px; height: 6px; background: var(--paper); border-radius: 50%; }
@media (max-width: 600px) { .strip span:nth-child(3), .strip span:nth-child(4) { display: none; } .strip span { font-size: 12.5px; letter-spacing: 1.2px; } }

.nav { background: var(--paper-2); border-bottom: 2px solid var(--ink); position: sticky; top: 0; z-index: 20; }
.nav__inner { max-width: var(--wrap); margin: 0 auto; padding: 0 12px; display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.nav__inner::-webkit-scrollbar { display: none; }
.nav__link {
  font-family: var(--cond); font-weight: 700; font-size: 17px; text-transform: uppercase; letter-spacing: 1.4px;
  color: var(--ink); text-decoration: none; padding: 13px 14px 11px; white-space: nowrap; border-bottom: 4px solid transparent;
}
.nav__link:hover { color: var(--ink); background: var(--paper-3); }
.nav__link.is-active { border-bottom-color: var(--teal); }
.nav__link--cta { color: var(--red-ink); }
.nav__link--cta.is-active { border-bottom-color: var(--red); }
.nav__link--log { background: var(--teal); border-radius: 8px 8px 0 0; margin: 6px 4px 0; padding-top: 7px; }
.nav__link--log:hover { background: #3cc0c1; }
.nav__link--log.is-active { border-bottom-color: var(--ink); }

.demo-banner { background: #FFF3C4; border-bottom: 1px solid #E5CF7A; font-size: 14px; padding: 8px 20px; text-align: center; }
.linkish { background: none; border: 0; padding: 0; color: var(--teal-ink); font: inherit; text-decoration: underline; cursor: pointer; }

/* ---------- Layout ---------- */
main { max-width: var(--wrap); margin: 0 auto; padding: 36px 20px 64px; }
.section { margin-top: 56px; }
.section:first-child { margin-top: 0; }
.eyebrow { font-family: var(--cond); font-weight: 700; text-transform: uppercase; letter-spacing: 2.5px; font-size: 14px; color: var(--teal-ink); display: inline-flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.eyebrow::before { content: ""; width: 26px; height: 4px; background: var(--red); border-radius: 2px; }
.lede { font-size: 20px; max-width: 62ch; color: var(--ink-2); }
.page-head { margin-bottom: 28px; }
.page-head p { margin-top: 12px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
@media (max-width: 820px) { .grid-2 { grid-template-columns: 1fr; } }

.card {
  background: var(--card);
  border: 2px solid var(--ink);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  padding: 24px;
}
.card--ink { background: var(--ink); color: var(--paper); box-shadow: 5px 5px 0 var(--teal); }
.card + .card { margin-top: 24px; }
.card h3 { margin-bottom: 12px; }
.muted { color: var(--ink-soft); }
.small { font-size: 14px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--cond); font-weight: 800; font-size: 19px; letter-spacing: 1.6px; text-transform: uppercase;
  padding: 13px 26px; border-radius: 8px; border: 2px solid var(--ink); cursor: pointer; text-decoration: none;
  background: var(--red); color: #fff; box-shadow: 4px 4px 0 var(--ink); transition: transform .08s, box-shadow .08s;
}
.btn:hover { color: #fff; transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--ink); }
.btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--ink); }
.btn[disabled] { opacity: .55; cursor: wait; }
.btn--teal { background: var(--teal); color: var(--ink); }
.btn--teal:hover { color: var(--ink); }
.btn--ghost { background: var(--card); color: var(--ink); }
.btn--ghost:hover { color: var(--ink); }
.btn--sm { font-size: 15px; padding: 8px 14px; box-shadow: 3px 3px 0 var(--ink); }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 22px; }

/* ---------- Home ---------- */
.hero { display: grid; grid-template-columns: 1.25fr 1fr; gap: 36px; align-items: center; }
@media (max-width: 860px) { .hero { grid-template-columns: 1fr; } }
.hero h1 span { color: var(--red); }
.hero-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border: 2px solid var(--ink); border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow); background: var(--card); }
.hero-stat { padding: 18px 14px; text-align: center; border-right: 2px solid var(--ink); }
.hero-stat:last-child { border-right: 0; }
.hero-stat b { display: block; font-family: var(--display); font-weight: 900; font-size: clamp(34px, 5vw, 52px); line-height: 1; }
.hero-stat span { font-family: var(--cond); text-transform: uppercase; letter-spacing: 1.4px; font-size: 13px; font-weight: 700; color: var(--ink-soft); }
.hero-stat:nth-child(2) b { color: var(--red); }
.hero-stat:nth-child(3) b { color: var(--teal-ink); }

.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; counter-reset: s; margin-top: 22px; }
@media (max-width: 900px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } }
.step { position: relative; background: var(--card); border: 2px solid var(--ink); border-radius: var(--r); padding: 54px 18px 18px; }
.step::before {
  counter-increment: s; content: "STEP " counter(s);
  position: absolute; top: -2px; left: -2px; background: var(--ink); color: var(--paper);
  font-family: var(--cond); font-weight: 800; letter-spacing: 2px; font-size: 14px; padding: 6px 12px; border-radius: var(--r) 0 var(--r) 0;
}
.step h3 { font-size: 22px; margin-bottom: 8px; }
.step p { margin: 0; font-size: 16px; color: var(--ink-2); }

.rules { columns: 2 300px; column-gap: 34px; padding: 0; margin: 18px 0 0; list-style: none; }
.rules li { break-inside: avoid; padding: 10px 0 10px 32px; position: relative; border-bottom: 1px dashed var(--line); }
.rules li::before { content: ""; position: absolute; left: 4px; top: 17px; width: 14px; height: 10px; border-left: 3px solid var(--teal); border-bottom: 3px solid var(--teal); transform: rotate(-45deg); }

/* ---------- Activity tiles ---------- */
.act-badge { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; flex: none; color: var(--paper); border: 2px solid var(--ink); }
.act-badge svg { width: 60%; height: 60%; }
.act-badge.sm { width: 30px; height: 30px; border-radius: 9px; border-width: 1.5px; }
.act-badge.lg { width: 56px; height: 56px; border-radius: 16px; }
.tone-teal { background: var(--teal); color: var(--ink); }
.tone-red { background: var(--red); color: #fff; }
.tone-navy { background: var(--ink); color: var(--paper); }

.act-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.act-tile {
  display: flex; flex-direction: column; align-items: flex-start; gap: 10px; text-align: left;
  background: var(--card); border: 2px solid var(--ink); border-radius: var(--r); padding: 14px; cursor: pointer;
  font: inherit; color: var(--ink); transition: transform .08s, box-shadow .08s, background .1s;
}
.act-tile:hover { transform: translate(-2px, -2px); box-shadow: 4px 4px 0 var(--ink); }
.act-tile b { font-family: var(--cond); font-size: 18px; text-transform: uppercase; letter-spacing: 1px; line-height: 1.1; }
.act-tile small { font-size: 12.5px; color: var(--ink-soft); line-height: 1.25; margin-top: -6px; }
.act-tile[aria-pressed="true"] { background: var(--ink); color: var(--paper); box-shadow: 4px 4px 0 var(--red); transform: translate(-2px, -2px); }
.act-tile[aria-pressed="true"] small { color: var(--teal); }
.act-tile[aria-pressed="true"] .tone-navy { background: var(--paper); color: var(--ink); }
.act-grid--static .act-tile { cursor: default; }
.act-grid--static .act-tile:hover { transform: none; box-shadow: none; }

/* ---------- Forms ---------- */
.form-step { padding: 26px 0; border-top: 2px dashed var(--line); }
.form-step:first-of-type { border-top: 0; padding-top: 4px; }
.form-step__head { display: flex; align-items: baseline; gap: 14px; margin-bottom: 16px; }
.form-step__num { font-family: var(--display); font-weight: 900; font-size: 34px; color: var(--teal); line-height: 1; }
.form-step__head h3 { font-size: 26px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field label, .label { font-family: var(--cond); font-weight: 700; text-transform: uppercase; letter-spacing: 1.2px; font-size: 15px; }
.field .hint { font-size: 14px; color: var(--ink-soft); margin-top: -2px; }
.req { color: var(--red-ink); }
input[type="text"], input[type="email"], input[type="number"], input[type="date"], input[type="search"], select {
  width: 100%; font: 18px var(--body); color: var(--ink); background: #FFFDF8;
  border: 2px solid var(--ink); border-radius: 8px; padding: 12px 14px; min-height: 50px;
}
input:focus, select:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 4px rgba(40,175,176,.25); }
input.is-bad, select.is-bad { border-color: var(--red); box-shadow: 0 0 0 4px rgba(247,23,53,.15); }
.row { display: grid; gap: 14px; grid-template-columns: repeat(var(--cols, 2), 1fr); }
.row--addr { grid-template-columns: 2fr 1fr 1fr; }
@media (max-width: 600px) { .row, .row--addr { grid-template-columns: 1fr; } }
.err { color: var(--red-ink); font-size: 14px; font-weight: 600; min-height: 0; }

/* chip-style radios */
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.chip span {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border: 2px solid var(--ink); border-radius: 999px;
  background: #FFFDF8; font-family: var(--cond); font-weight: 700; font-size: 17px; letter-spacing: .8px; text-transform: uppercase; cursor: pointer;
}
.chip input:checked + span { background: var(--ink); color: var(--paper); }
.chip input:focus-visible + span { outline: 3px solid var(--teal); outline-offset: 2px; }
.chips--sizes .chip span { min-width: 58px; justify-content: center; padding: 10px 12px; }

/* big yes/no cards */
.choice-grid { display: grid; grid-template-columns: repeat(var(--cols, 2), 1fr); gap: 14px; }
@media (max-width: 640px) { .choice-grid { grid-template-columns: 1fr; } }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; inset: 0; cursor: pointer; z-index: 1; }
.choice__body { display: flex; gap: 14px; align-items: flex-start; padding: 16px; border: 2px solid var(--ink); border-radius: var(--r); background: #FFFDF8; height: 100%; transition: box-shadow .08s, transform .08s; }
.choice__body b { font-family: var(--cond); font-size: 19px; text-transform: uppercase; letter-spacing: 1px; display: block; line-height: 1.15; }
.choice__body small { display: block; color: var(--ink-soft); font-size: 14.5px; margin-top: 3px; line-height: 1.35; }
.choice__ring { width: 22px; height: 22px; border: 2px solid var(--ink); border-radius: 50%; flex: none; margin-top: 2px; position: relative; background: #fff; }
.choice input:checked ~ .choice__body { box-shadow: 4px 4px 0 var(--teal); transform: translate(-2px, -2px); background: var(--card); }
.choice input:checked ~ .choice__body .choice__ring::after { content: ""; position: absolute; inset: 3px; border-radius: 50%; background: var(--red); }
.choice input:focus-visible ~ .choice__body { outline: 3px solid var(--teal); outline-offset: 2px; }
.choice__icon { width: 34px; height: 34px; flex: none; color: var(--ink); }

.reveal { display: none; margin-top: 18px; padding: 18px; border-left: 4px solid var(--teal); background: rgba(255,253,248,.7); border-radius: 0 var(--r) var(--r) 0; }
.reveal.is-on { display: block; }

.pay-detail { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.qr { width: 170px; border: 2px solid var(--ink); border-radius: var(--r); background: #fff; padding: 8px; }

/* ---------- Bib (sign-up confirmation) ---------- */
.bib {
  position: relative; max-width: 460px; margin: 0 auto; background: #fff; border: 3px solid var(--ink); border-radius: 14px;
  padding: 28px 26px 22px; text-align: center; box-shadow: 8px 8px 0 var(--ink); transform: rotate(-1.5deg);
}
.bib::before, .bib::after { content: ""; position: absolute; top: 12px; width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--ink); background: var(--paper); }
.bib::before { left: 12px; } .bib::after { right: 12px; }
.bib__top { display: flex; justify-content: space-between; align-items: center; font-family: var(--cond); font-weight: 800; text-transform: uppercase; letter-spacing: 2px; font-size: 13px; padding: 0 22px; }
.bib__band { background: var(--red); color: #fff; margin: 12px -26px; padding: 6px; font-family: var(--cond); font-weight: 800; letter-spacing: 3px; text-transform: uppercase; }
.bib__num { font-family: var(--display); font-weight: 900; font-size: 128px; line-height: .9; letter-spacing: -2px; }
.bib__name { font-family: var(--cond); font-weight: 800; font-size: 26px; text-transform: uppercase; letter-spacing: 1.5px; }
.bib__foot { display: flex; justify-content: center; gap: 6px; margin-top: 12px; }
.bib__foot span { width: 46px; height: 8px; border-radius: 4px; background: var(--teal); }
.bib__foot span:nth-child(2) { background: var(--ink); } .bib__foot span:nth-child(3) { background: var(--red); }

.checklist { list-style: none; padding: 0; margin: 0; counter-reset: c; }
.checklist li { counter-increment: c; position: relative; padding: 14px 0 14px 54px; border-bottom: 1px dashed var(--line); }
.checklist li::before { content: counter(c); position: absolute; left: 0; top: 12px; width: 36px; height: 36px; border-radius: 50%; background: var(--teal); border: 2px solid var(--ink); display: grid; place-items: center; font-family: var(--display); font-weight: 900; font-size: 20px; }
.checklist li b { font-family: var(--cond); text-transform: uppercase; letter-spacing: 1px; font-size: 18px; }

/* ---------- Log page ---------- */
.who { position: relative; }
.suggest { position: absolute; left: 0; right: 0; top: calc(100% + 4px); background: #FFFDF8; border: 2px solid var(--ink); border-radius: 8px; box-shadow: var(--shadow); z-index: 10; max-height: 300px; overflow: auto; display: none; }
.suggest.is-on { display: block; }
.suggest button { display: flex; width: 100%; align-items: center; gap: 12px; padding: 11px 14px; border: 0; background: none; font: inherit; color: var(--ink); text-align: left; cursor: pointer; border-bottom: 1px solid var(--line); }
.suggest button:last-child { border-bottom: 0; }
.suggest button:hover, .suggest button.is-hi { background: var(--teal-wash); }
.suggest .bibno { font-family: var(--display); font-weight: 900; font-size: 18px; color: var(--ink-soft); min-width: 40px; }
.selected-person { display: flex; align-items: center; gap: 14px; padding: 12px 14px; background: var(--ink); color: var(--paper); border-radius: 10px; }
.selected-person .bibno { font-family: var(--display); font-weight: 900; font-size: 30px; color: var(--teal); }
.selected-person b { font-family: var(--cond); font-size: 22px; text-transform: uppercase; letter-spacing: 1px; flex: 1; }
.selected-person button { background: none; border: 1.5px solid var(--paper); color: var(--paper); border-radius: 6px; padding: 5px 10px; cursor: pointer; font: 600 14px var(--body); }
.tabs { display: inline-flex; border: 2px solid var(--ink); border-radius: 999px; overflow: hidden; margin-bottom: 16px; background: #FFFDF8; }
.tabs button { border: 0; background: none; padding: 8px 16px; font: 700 15px var(--cond); text-transform: uppercase; letter-spacing: 1px; cursor: pointer; color: var(--ink); }
.tabs button[aria-selected="true"] { background: var(--ink); color: var(--paper); }

.miles-input { display: flex; align-items: stretch; gap: 0; max-width: 360px; }
.miles-input input { font-family: var(--display); font-weight: 800; font-size: 34px; border-radius: 8px 0 0 8px; text-align: center; padding: 6px 10px; }
.miles-input .unit { display: grid; place-items: center; padding: 0 16px; background: var(--ink); color: var(--paper); border-radius: 0 8px 8px 0; font-family: var(--cond); font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; }
.credit-preview { margin-top: 12px; font-size: 16px; padding: 10px 14px; border-radius: 8px; background: var(--teal-wash); display: none; }
.credit-preview.is-on { display: block; }
.credit-preview b { font-family: var(--display); font-size: 22px; }
.quick { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.quick button { border: 1.5px solid var(--ink); background: #FFFDF8; border-radius: 6px; padding: 5px 12px; font: 600 15px var(--body); cursor: pointer; color: var(--ink); }
.quick button:hover { background: var(--teal-wash); }

.success { text-align: center; padding: 30px 20px; }
.success__big { font-family: var(--display); font-weight: 900; font-size: clamp(64px, 12vw, 110px); line-height: .9; color: var(--ink); }
.success__big small { font-size: .35em; color: var(--teal-ink); }
.milestone { margin: 18px auto 0; max-width: 520px; }

/* ---------- Progress track (to 26.2) ---------- */
.track-bar { position: relative; height: 18px; background: var(--paper-3); border: 2px solid var(--ink); border-radius: 999px; overflow: hidden; }
.track-bar__fill { position: absolute; inset: 0 auto 0 0; background: repeating-linear-gradient(135deg, var(--teal) 0 10px, #33BDBE 10px 20px); border-right: 2px solid var(--ink); transition: width .8s cubic-bezier(.2,.8,.2,1); }
.track-bar.is-done .track-bar__fill { background: repeating-linear-gradient(135deg, var(--red) 0 10px, #FF3B55 10px 20px); }
.track-labels { display: flex; justify-content: space-between; font-family: var(--cond); font-weight: 700; font-size: 14px; letter-spacing: 1px; text-transform: uppercase; margin-top: 6px; color: var(--ink-soft); }

/* ---------- Community road bar ---------- */
.road-card { padding: 22px 24px 18px; }
.road-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 12px 24px; margin-bottom: 16px; }
.road-total { font-family: var(--display); font-weight: 900; font-size: clamp(54px, 9vw, 88px); line-height: .85; color: var(--paper); }
.road-total small { font-size: .32em; color: var(--teal); letter-spacing: 1px; margin-left: 6px; }
.road-meta { display: flex; gap: 26px; flex-wrap: wrap; }
.road-meta div { font-family: var(--cond); text-transform: uppercase; letter-spacing: 1.3px; font-size: 13px; color: rgba(244,235,217,.75); }
.road-meta b { display: block; font-family: var(--display); font-size: 32px; color: var(--paper); letter-spacing: 0; line-height: 1.05; }
.road { position: relative; height: 46px; background: #1C2A35; border-radius: 8px; border: 2px solid var(--paper); overflow: hidden; }
.road::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 3px; transform: translateY(-50%); background: repeating-linear-gradient(90deg, rgba(244,235,217,.55) 0 18px, transparent 18px 34px); }
.road__fill { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, #1E8F90, var(--teal)); transition: width 1.2s cubic-bezier(.2,.8,.2,1); }
.road__runner { position: absolute; top: 50%; width: 34px; height: 34px; margin-left: -17px; transform: translateY(-50%); border-radius: 50%; background: var(--red); border: 2px solid var(--paper); color: #fff; display: grid; place-items: center; z-index: 2; transition: left 1.2s cubic-bezier(.2,.8,.2,1); }
.road__runner svg { width: 20px; height: 20px; }
.road-ticks { position: relative; height: 22px; margin-top: 6px; font-family: var(--cond); font-weight: 700; font-size: 13px; color: rgba(244,235,217,.7); }
.road-ticks span { position: absolute; transform: translateX(-50%); white-space: nowrap; }
.road-ticks span:first-child { transform: none; }
.road-ticks span:last-child { transform: translateX(-100%); }

/* ---------- Leaderboard ---------- */
.board-layout { display: grid; grid-template-columns: 380px 1fr; gap: 24px; align-items: start; margin-top: 28px; }
@media (max-width: 960px) { .board-layout { grid-template-columns: 1fr; } }
.lb { list-style: none; margin: 0; padding: 0; }
.lb li { display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 10px; padding: 9px 8px; border-bottom: 1px dashed var(--line); cursor: pointer; border-radius: 6px; }
.lb li:hover { background: var(--paper-2); }
.lb li.is-sel { background: var(--ink); color: var(--paper); }
.lb li.is-sel .lb__bar { background: rgba(244,235,217,.2); }
.lb li.is-sel .lb__rank { color: var(--teal); }
.lb__rank { font-family: var(--display); font-weight: 900; font-size: 22px; text-align: center; color: var(--ink-soft); }
.lb li:nth-child(1) .lb__rank { color: var(--red); }
.lb__name { font-weight: 600; font-size: 16px; line-height: 1.2; display: flex; align-items: center; gap: 6px; min-width: 0; }
.lb__name span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb__bar { grid-column: 2 / 3; height: 6px; border-radius: 3px; background: var(--paper-3); margin-top: 5px; overflow: hidden; }
.lb__bar i { display: block; height: 100%; background: var(--teal); border-radius: 3px; }
.lb__miles { font-family: var(--display); font-weight: 800; font-size: 22px; text-align: right; }
.medal { flex: none; width: 18px; height: 18px; border-radius: 50%; background: var(--red); color: #fff; display: inline-grid; place-items: center; font-size: 10px; font-weight: 800; font-family: var(--cond); }
.lb-more { width: 100%; margin-top: 10px; }

.chart-head { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-end; justify-content: space-between; margin-bottom: 14px; }
.chart-head .field { margin: 0; min-width: 240px; }
.chart-box { position: relative; height: 420px; }
@media (max-width: 600px) { .chart-box { height: 320px; } }
.legend-note { display: flex; flex-wrap: wrap; gap: 16px; font-size: 14px; color: var(--ink-soft); margin-top: 10px; }
.legend-note i { display: inline-block; width: 22px; height: 4px; border-radius: 2px; vertical-align: middle; margin-right: 6px; }

.person-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border: 2px solid var(--ink); border-radius: var(--r); overflow: hidden; margin: 20px 0; background: #FFFDF8; }
@media (max-width: 640px) { .person-strip { grid-template-columns: 1fr 1fr; } .person-strip > div:nth-child(2) { border-right: 0; } .person-strip > div:nth-child(-n+2) { border-bottom: 2px solid var(--ink); } }
.person-strip > div { padding: 14px; border-right: 2px solid var(--ink); }
.person-strip > div:last-child { border-right: 0; }
.person-strip b { display: block; font-family: var(--display); font-weight: 900; font-size: 32px; line-height: 1; }
.person-strip span { font-family: var(--cond); text-transform: uppercase; letter-spacing: 1.2px; font-size: 13px; font-weight: 700; color: var(--ink-soft); }

.mini-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.mini { background: #FFFDF8; border: 2px solid var(--ink); border-radius: var(--r); overflow: hidden; }
.mini__head { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-bottom: 2px solid var(--ink); background: var(--paper-2); }
.mini__head b { font-family: var(--cond); text-transform: uppercase; letter-spacing: 1px; font-size: 17px; flex: 1; }
.mini__head .tot { font-family: var(--display); font-weight: 900; font-size: 22px; }
.mini table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.mini td { padding: 6px 12px; border-bottom: 1px dashed var(--line); }
.mini tr:last-child td { border-bottom: 0; }
.mini td:last-child { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.mini .rule { font-size: 12.5px; color: var(--ink-soft); padding: 6px 12px; background: var(--teal-wash); }
.mini tr.me td { background: var(--red-wash); font-weight: 700; }

.entries { width: 100%; border-collapse: collapse; font-size: 15px; }
.entries th { text-align: left; font-family: var(--cond); text-transform: uppercase; letter-spacing: 1px; font-size: 13px; color: var(--ink-soft); border-bottom: 2px solid var(--ink); padding: 8px; }
.entries td { padding: 8px; border-bottom: 1px dashed var(--line); vertical-align: middle; }
.entries td.num { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.entries .act-cell { display: flex; align-items: center; gap: 10px; }
.entries .del { border: 0; background: none; color: var(--red-ink); cursor: pointer; font: 600 13px var(--body); text-decoration: underline; }
.table-scroll { overflow-x: auto; }

.empty { text-align: center; padding: 40px 20px; color: var(--ink-soft); }
.loading { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 40px; font-family: var(--cond); text-transform: uppercase; letter-spacing: 2px; color: var(--ink-soft); }
.loading::before { content: ""; width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--paper-3); border-top-color: var(--teal); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.notice { padding: 14px 16px; border: 2px solid var(--ink); border-radius: var(--r); background: var(--teal-wash); font-size: 16px; }
.notice--warn { background: #FFF3C4; }
.notice--red { background: var(--red-wash); }

/* ---------- Toast ---------- */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 140%); background: var(--ink); color: var(--paper); padding: 12px 20px; border-radius: 10px; border: 2px solid var(--paper); font-weight: 600; z-index: 100; transition: transform .25s; max-width: calc(100% - 32px); }
.toast.is-on { transform: translate(-50%, 0); }
.toast--bad { background: var(--red); color: #fff; }

/* ---------- Footer ---------- */
.footer { background: var(--ink); color: var(--paper); border-top: 4px solid var(--red); }
.footer__inner { max-width: var(--wrap); margin: 0 auto; padding: 26px 20px; display: flex; gap: 18px; align-items: center; font-size: 15px; }
.footer a { color: var(--teal); }

@media (max-width: 600px) {
  body { font-size: 16px; }
  main { padding: 26px 16px 48px; }
  .masthead__inner { padding: 14px 16px; }
  .logo { width: 56px; height: 56px; }
  .brand__top { font-size: 14px; letter-spacing: 3.5px; }
  .card { padding: 18px; box-shadow: 4px 4px 0 var(--ink); }
  .bib__num { font-size: 96px; }
}
.board-layout > .card { margin-top: 0; }
@media (max-width: 600px) {
  .road-meta { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; width: 100%; }
  .road-meta b { font-size: 24px; }
  .road-meta div { font-size: 11px; letter-spacing: .6px; }
  .nav__link { padding: 12px 8px 10px; font-size: 14px; letter-spacing: .6px; }
  .nav__inner { padding: 0 6px; }
  .road-ticks span:nth-child(2), .road-ticks span:nth-child(4) { display: none; }
}

/* ---------- v2 additions ---------- */
.support-note { font-size: 14.5px; color: var(--ink-soft); margin: 18px 0 0; }
.support-note a { font-weight: 600; }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 200; }
.medal-svg { flex: none; display: inline-block; vertical-align: middle; }
.navpill { display: inline-block; font-family: var(--cond); font-weight: 800; text-transform: uppercase; letter-spacing: 1.2px; font-size: .9em; background: var(--teal); color: var(--ink); border: 2px solid var(--ink); border-radius: 6px; padding: 0 8px; white-space: nowrap; text-decoration: none; }
a.navpill:hover { color: var(--ink); background: #3cc0c1; }
.navpill--red { background: var(--red); color: #fff; }

/* Welcome (after sign-up) */
.welcome { display: grid; grid-template-columns: auto 1fr; gap: 28px; align-items: center; }
@media (max-width: 640px) { .welcome { grid-template-columns: 1fr; text-align: center; } .welcome .logo { margin: 0 auto; } }
.welcome .logo { width: 130px; height: 130px; }
.summary-list { list-style: none; margin: 0; padding: 0; }
.summary-list li { display: flex; justify-content: space-between; gap: 16px; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.summary-list li span:first-child { font-family: var(--cond); font-weight: 700; text-transform: uppercase; letter-spacing: 1px; font-size: 14px; color: var(--ink-soft); }
.summary-list li span:last-child { text-align: right; font-weight: 600; }

/* How-to-log walkthrough */
.howto { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; counter-reset: h; margin-top: 18px; }
@media (max-width: 900px) { .howto { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .howto { grid-template-columns: 1fr; } }
.howto li { list-style: none; counter-increment: h; background: #FFFDF8; border: 2px solid var(--ink); border-radius: var(--r); padding: 14px; position: relative; font-size: 15.5px; line-height: 1.4; }
.howto li::before { content: counter(h); display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--red); color: #fff; font-family: var(--display); font-weight: 900; font-size: 17px; margin-bottom: 8px; border: 2px solid var(--ink); }
.howto b { display: block; font-family: var(--cond); text-transform: uppercase; letter-spacing: .8px; font-size: 17px; margin-bottom: 3px; }
.howto--plain { padding: 0; }

/* 26.2 Club */
.club { margin-top: 24px; background: var(--card); border: 2px solid var(--ink); border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden; }
.club__head { display: flex; align-items: center; gap: 16px; padding: 16px 20px; background: linear-gradient(90deg, var(--teal-wash), var(--card)); border-bottom: 2px solid var(--ink); flex-wrap: wrap; }
.club__head h3 { margin: 0; font-size: 28px; }
.club__head p { margin: 0; color: var(--ink-2); font-size: 15px; flex: 1 1 260px; }
.club__count { font-family: var(--display); font-weight: 900; font-size: 44px; line-height: 1; color: var(--red); }
.club__list { display: flex; flex-wrap: wrap; gap: 10px; padding: 16px 20px; max-height: 240px; overflow: auto; }
.club-chip { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px 5px 6px; border: 2px solid var(--ink); border-radius: 999px; background: #FFFDF8; cursor: pointer; font: inherit; color: var(--ink); }
.club-chip b { font-weight: 700; font-size: 15px; }
.club-chip small { font-family: var(--cond); font-weight: 700; color: var(--teal-ink); letter-spacing: .5px; text-transform: uppercase; font-size: 12.5px; }
.club-chip.is-first { background: var(--ink); color: var(--paper); }
.club-chip.is-first small { color: var(--teal); }
.club-chip:hover { box-shadow: 3px 3px 0 var(--ink); transform: translate(-1px,-1px); }
.club__empty { padding: 16px 20px; color: var(--ink-soft); }

/* activity tables: show everyone, scroll */
.mini__scroll { max-height: 236px; overflow-y: auto; overscroll-behavior: contain; }
.mini__scroll::-webkit-scrollbar { width: 8px; } .mini__scroll::-webkit-scrollbar-thumb { background: var(--paper-3); border-radius: 4px; }
.mini td:first-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 0; width: 100%; }
.mini .rk { display: inline-block; min-width: 22px; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.mini__count { font-size: 12.5px; color: var(--ink-soft); padding: 6px 12px; border-top: 2px solid var(--ink); background: var(--paper-2); font-family: var(--cond); font-weight: 700; letter-spacing: .6px; text-transform: uppercase; }
.mini__empty { padding: 14px 12px; color: var(--ink-soft); font-size: 14px; }

/* Celebration */
.celebrate { margin: 6px auto 18px; max-width: 520px; display: flex; gap: 16px; align-items: center; text-align: left; background: var(--ink); color: var(--paper); padding: 16px 20px; border-radius: var(--r); box-shadow: 5px 5px 0 var(--red); }
.celebrate b { font-family: var(--display); font-weight: 900; font-size: 30px; line-height: 1; display: block; text-transform: uppercase; }
.celebrate span { font-size: 15px; opacity: .9; }
.club-banner { display: flex; align-items: center; gap: 16px; padding: 14px 18px; border: 2px solid var(--ink); border-radius: var(--r); background: var(--teal-wash); margin-top: 20px; }
.club-banner b { font-family: var(--display); font-weight: 900; font-size: 24px; text-transform: uppercase; display: block; line-height: 1.05; }

/* Admin */
.admin-kpis { display: grid; grid-template-columns: repeat(6, 1fr); border: 2px solid var(--ink); border-radius: var(--r); overflow: hidden; background: #FFFDF8; box-shadow: var(--shadow); }
@media (max-width: 900px) { .admin-kpis { grid-template-columns: repeat(3, 1fr); } }
.admin-kpis > div { padding: 14px; border-right: 2px solid var(--ink); border-bottom: 2px solid var(--ink); margin-bottom: -2px; }
.admin-kpis b { display: block; font-family: var(--display); font-weight: 900; font-size: 34px; line-height: 1; }
.admin-kpis span { font-family: var(--cond); text-transform: uppercase; letter-spacing: 1.1px; font-size: 13px; font-weight: 700; color: var(--ink-soft); }
.admin-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 28px 0 16px; }
.admin-tabs button { font: 800 16px var(--cond); text-transform: uppercase; letter-spacing: 1.2px; padding: 10px 16px; border: 2px solid var(--ink); border-radius: 8px; background: #FFFDF8; cursor: pointer; color: var(--ink); }
.admin-tabs button[aria-selected="true"] { background: var(--ink); color: var(--paper); box-shadow: 3px 3px 0 var(--teal); }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 14px; }
.toolbar input[type="search"] { max-width: 320px; min-height: 44px; padding: 8px 12px; font-size: 16px; }
.toolbar select { max-width: 220px; min-height: 44px; padding: 8px 12px; font-size: 16px; }
.toolbar .spacer { flex: 1; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 14.5px; background: #FFFDF8; }
.admin-table th { position: sticky; top: 0; background: var(--paper-2); text-align: left; font-family: var(--cond); text-transform: uppercase; letter-spacing: .8px; font-size: 13px; padding: 9px 10px; border-bottom: 2px solid var(--ink); white-space: nowrap; cursor: pointer; user-select: none; }
.admin-table th[data-sort]:hover { color: var(--teal-ink); }
.admin-table td { padding: 9px 10px; border-bottom: 1px dashed var(--line); vertical-align: top; }
.admin-table tr:hover td { background: #FFF8EA; }
.admin-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.admin-table .nm { font-weight: 700; }
.admin-table .sub { display: block; font-size: 13px; color: var(--ink-soft); }
.admin-wrap { border: 2px solid var(--ink); border-radius: var(--r); overflow: auto; max-height: 70vh; box-shadow: var(--shadow); }
.tag { display: inline-block; font: 700 12px var(--cond); text-transform: uppercase; letter-spacing: .8px; padding: 2px 8px; border-radius: 999px; border: 1.5px solid var(--ink); white-space: nowrap; }
.tag--yes { background: var(--teal-wash); } .tag--no { background: var(--paper-2); } .tag--red { background: var(--red-wash); }
.check { width: 22px; height: 22px; accent-color: var(--teal); cursor: pointer; }
.size-grid { border-collapse: collapse; background: #FFFDF8; font-size: 16px; }
.size-grid th, .size-grid td { border: 1.5px solid var(--ink); padding: 8px 14px; text-align: center; }
.size-grid th { background: var(--paper-2); font-family: var(--cond); text-transform: uppercase; letter-spacing: .8px; }
.size-grid td.tot { font-weight: 800; background: var(--teal-wash); }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(520px, 100%); background: var(--card); border-left: 3px solid var(--ink); box-shadow: -8px 0 0 rgba(40,56,69,.15); z-index: 60; overflow-y: auto; padding: 24px; transform: translateX(105%); transition: transform .2s; }
.drawer.is-on { transform: none; }
.drawer__close { position: absolute; top: 16px; right: 16px; }
.drawer h2 { font-size: 32px; padding-right: 60px; }
.drawer .field input, .drawer .field textarea { font-size: 16px; }
.drawer textarea { width: 100%; min-height: 70px; font: 16px var(--body); border: 2px solid var(--ink); border-radius: 8px; padding: 10px; background: #FFFDF8; }
.toggles { display: grid; gap: 10px; margin: 16px 0; }
.toggles label { display: flex; gap: 10px; align-items: center; font-weight: 600; }
.login { max-width: 420px; margin: 40px auto; text-align: center; }
.login .logo { width: 110px; height: 110px; margin: 0 auto 14px; }

.howto-details { margin-top: 16px; }
.howto-details summary { cursor: pointer; font-family: var(--cond); font-weight: 800; text-transform: uppercase; letter-spacing: 1.2px; color: var(--teal-ink); font-size: 16px; }
.howto { padding: 0; }
.grid-2 > .card { margin-top: 0; }
.nav__link--admin { margin-left: auto; color: var(--ink-soft); font-size: 15px; }
.nav__link--admin.is-active { color: var(--ink); }
/* v3: log confirmation */
.email-find { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.email-find .btn { min-height: 50px; }
.who-pick { display: flex; flex-wrap: wrap; gap: 10px; }
.success { text-align: center; }
.done-row { display: grid; grid-template-columns: 1.3fr 1fr; gap: 14px; margin: 14px 0 18px; text-align: left; }
@media (max-width: 640px) { .done-row { grid-template-columns: 1fr; } }
.done-stat { display: flex; gap: 14px; align-items: center; padding: 16px 18px; border: 2px solid var(--ink); border-radius: var(--r); background: #FFFDF8; }
.done-stat span { display: block; font-family: var(--cond); font-weight: 800; text-transform: uppercase; letter-spacing: 1.4px; font-size: 13px; color: var(--ink-soft); }
.done-stat b { display: block; font-family: var(--display); font-weight: 900; font-size: clamp(48px, 9vw, 68px); line-height: .95; }
.done-stat b small { font-size: .4em; color: var(--teal-ink); }
.done-stat em { display: block; font-style: normal; font-size: 14px; color: var(--ink-soft); margin-top: 4px; }
.done-stat--total { background: var(--ink); color: var(--paper); }
.done-stat--total span, .done-stat--total em { color: rgba(244,235,217,.75); }
.done-stat--total b small { color: var(--teal); }
.mine { margin: 22px auto 0; text-align: left; border: 2px solid var(--ink); border-radius: var(--r); background: #FFFDF8; padding: 14px 14px 6px; }
.mine__head { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 4px 12px; margin-bottom: 6px; }
.mine__head b { font-family: var(--cond); text-transform: uppercase; letter-spacing: 1.2px; font-size: 17px; }
.mine__head span { font-size: 14px; color: var(--ink-soft); }
.mine__chart { height: 260px; }
@media (max-width: 600px) {
  .mine__chart { height: 220px; }
  .nav__link--admin { margin-left: 0; }
  .act-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .act-tile { padding: 10px 8px; gap: 6px; }
  .act-tile b { font-size: 14.5px; }
  .act-tile small { font-size: 11.5px; }
  .chart-head .field { min-width: 0; width: 100%; }
  .success { padding: 22px 14px; }
}

.kpi-sub { display: block; font-style: normal; font-size: 12.5px; color: var(--ink-soft); margin-top: 4px; line-height: 1.3; }
.add-log { background: #FFFDF8; border: 2px solid var(--ink); border-radius: var(--r); padding: 14px 14px 4px; }
.add-log .field { margin-bottom: 10px; }
.drawer .chips .chip span { font-size: 15px; padding: 8px 14px; }
[hidden] { display: none !important; }
