/* Waterhead Tour Tracker. Mobile-first, club-site layout.
   Colours are set in config.js and override the defaults below. */
@font-face { font-family: "Oswald"; font-style: normal; font-weight: 200 700; font-display: swap; src: url("../fonts/oswald-latin-variable.woff2") format("woff2"); }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("../fonts/montserrat-latin-variable.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 600; font-display: swap; src: url("../fonts/barlow-condensed-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 700; font-display: swap; src: url("../fonts/barlow-condensed-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 800; font-display: swap; src: url("../fonts/barlow-condensed-latin-800-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 400; font-display: swap; src: url("../fonts/inter-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 600; font-display: swap; src: url("../fonts/inter-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 700; font-display: swap; src: url("../fonts/inter-latin-700-normal.woff2") format("woff2"); }

:root {
  --primary: #8b1e2d;
  --accent: #1b6e38;
  --accent-text: #ffffff;
  --accent-on-dark: #88cc70;
  --ink: #1d1b1e;
  --paper: #f6f6f6;
  --muted: #5a5b5d;
  --line: #dadada;
  --card: #ffffff;
  --primary-deep: color-mix(in srgb, var(--primary) 72%, #000);
  --accent-deep: color-mix(in srgb, var(--accent) 78%, #000);
  --t-run: #c8412f; --t-walk: #d79a12; --t-bike: #1f7a6d; --t-swim: #2f6fa8; --t-row: #5b4a9c; --t-post: #5a5b5d;
  --font-head: "Oswald", "Barlow Condensed", "Arial Narrow", Arial, sans-serif;
  --font-body: "Montserrat", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-num: "Barlow Condensed", "Oswald", "Arial Narrow", Arial, sans-serif;
  --s1: 4px; --s2: 8px; --s3: 16px; --s4: 24px; --s5: 40px; --s6: 64px;
  --radius: 8px;
  --radius-pill: 999px;
  --dots: radial-gradient(rgba(0,0,0,.05) 1px, transparent 1px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 152px; -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 400 1rem/1.6 var(--font-body); color: var(--ink); background: var(--paper); }
img { max-width: 100%; }
a { color: var(--accent); }
a:hover { color: var(--primary); }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.05; margin: 0; letter-spacing: .02em; font-weight: 700; text-transform: uppercase; }
p { margin: 0 0 var(--s3); }
.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 var(--s3); }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; padding: 0; }
.skip-link { position: absolute; left: -999px; top: 0; background: var(--ink); color: #fff; padding: 10px 16px; z-index: 2000; }
.skip-link:focus { left: 8px; top: 8px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; box-shadow: 0 0 0 5px var(--ink); }
.fine { font-size: .8125rem; color: var(--muted); }
.empty { color: var(--muted); padding: var(--s3) 0; }

/* banners */
.banner { padding: 10px var(--s3); text-align: center; font-size: .85rem; font-weight: 600; }
.banner-demo { background: var(--accent); color: var(--accent-text); }
.banner-error { background: #7a1020; color: #fff; }
.banner[hidden] { display: none; }

/* ========== HEADER (utility bar + centred club crest) ========== */
.site-header { position: sticky; top: 0; z-index: 1000; background: var(--card); }
.top-bar { background: var(--accent); color: #fff; }
.top-bar-inner { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); min-height: 36px; padding-top: 2px; padding-bottom: 2px; }
.top-bar-club { margin: 0; font: 700 .75rem/1.2 var(--font-head); letter-spacing: .08em; text-transform: uppercase; min-width: 0; }
.top-bar-club #top-bar-highlight { color: #fff; }
.top-bar-club #top-bar-place { font-weight: 500; opacity: .85; margin-left: 0; font-family: var(--font-body); letter-spacing: .04em; }
.top-bar .btn-donate { margin-left: auto; box-shadow: none; border-color: transparent; background: var(--primary); color: #fff; min-height: 32px; padding: 6px 16px; font-size: .75rem; letter-spacing: .08em; }
.top-bar .btn-donate:hover { background: color-mix(in srgb, var(--primary) 85%, #000); transform: none; box-shadow: none; }

.header-main { background: #fff; border-bottom: 1px solid var(--line); position: relative; }
.header-inner { display: flex; align-items: center; gap: var(--s3); min-height: 64px; padding-top: 8px; padding-bottom: 8px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); min-width: 0; }
.brand:hover { color: var(--ink); }
.brand-logo { width: auto; height: 64px; object-fit: contain; flex: none; }
.brand-name { font-family: var(--font-head); font-weight: 700; font-size: 1.05rem; letter-spacing: .04em; text-transform: uppercase; line-height: 1.1; min-width: 0; text-wrap: balance; }

.nav-toggle { margin-left: auto; width: 44px; height: 44px; border: 0; background: transparent; cursor: pointer; display: flex; align-items: center; justify-content: center; flex: none; }
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after {
  display: block; width: 22px; height: 2px; background: var(--accent); border-radius: 1px; position: relative; transition: transform .15s, opacity .15s;
}
.nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bars::before { top: -7px; }
.nav-toggle-bars::after { top: 7px; }
.site-header.is-nav-open .nav-toggle-bars { background: transparent; }
.site-header.is-nav-open .nav-toggle-bars::before { top: 0; transform: rotate(45deg); }
.site-header.is-nav-open .nav-toggle-bars::after { top: 0; transform: rotate(-45deg); }

.site-nav { display: none; }
.site-nav a { color: var(--accent); text-decoration: none; font-family: var(--font-head); font-weight: 600; font-size: .95rem; letter-spacing: .08em; text-transform: uppercase; padding: 8px 0; border-bottom: 3px solid transparent; }
.site-nav a:hover, .site-nav a:focus-visible { color: var(--primary); border-bottom-color: var(--primary); }
.site-nav a[hidden] { display: none; }

@media (max-width: 899px) {
  .site-header.is-nav-open .site-nav {
    display: flex; flex-direction: column; align-items: stretch; gap: 0;
    position: absolute; left: 0; right: 0; top: 100%;
    background: #fff; padding: 8px var(--s3) 16px;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 8px 20px rgba(0,0,0,.08);
  }
  .site-header.is-nav-open .site-nav a { border-bottom: 1px solid var(--line); padding: 14px 0; }
}

@media (min-width: 900px) {
  html { scroll-padding-top: 255px; }
  .nav-toggle { display: none; }
  .header-inner { flex-direction: column; align-items: center; min-height: 0; padding: 16px 0 0; gap: 4px; }
  .brand { flex-direction: column; text-align: center; gap: 8px; margin: 0; }
  .brand-logo { width: auto; height: 108px; }
  .brand-name { font-size: 1.35rem; letter-spacing: .06em; }
  .site-nav { display: flex; justify-content: center; flex-wrap: wrap; gap: 4px 28px; padding: 8px 0 12px; }
}

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; font: 600 .875rem/1 var(--font-head); letter-spacing: .08em; text-transform: uppercase; padding: 14px 24px; border-radius: var(--radius-pill); border: 2px solid transparent; text-decoration: none; cursor: pointer; min-height: 44px; transition: background-color .15s, color .15s, border-color .15s; }
.btn-small { padding: 8px 16px; min-height: 36px; font-size: .8125rem; }
.btn-large { font-size: 1rem; padding: 16px 28px; min-height: 48px; }
.btn-donate { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
.btn-donate:hover { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-ghost { color: #fff; border-color: #fff; background: transparent; }
.btn-ghost:hover { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-outline { color: var(--primary); background: var(--card); border-color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: #fff; }

/* ========== HERO ========== */
.hero { background: var(--primary); color: #fff; position: relative; overflow: hidden; padding: var(--s5) 0 var(--s6); min-height: 0; }
.hero-bg-word {
  position: absolute; left: 0; bottom: 0; margin: 0; pointer-events: none;
  font: 700 14vw/0.8 var(--font-head); text-transform: uppercase; letter-spacing: 0.06em;
  color: #fff; opacity: .08; white-space: nowrap; user-select: none;
}

.hero-mascot { display: none; }

.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(ellipse 70% 60% at 75% 30%, rgba(255,255,255,.10), transparent 60%),
    linear-gradient(180deg, transparent 40%, rgba(0,0,0,.45) 100%);
}
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .18; z-index: 0;
  background: repeating-linear-gradient(-18deg, transparent, transparent 42px, rgba(0,0,0,.35) 42px, rgba(0,0,0,.35) 44px);
}
.hero-grid { position: relative; display: grid; gap: var(--s5); z-index: 1; }
.eyebrow { font: 600 .8rem/1 var(--font-head); text-transform: uppercase; letter-spacing: .16em; color: var(--accent-on-dark); margin-bottom: var(--s3); }
.hero h1 { font-size: clamp(2.15rem, 7vw, 4.1rem); font-weight: 700; text-transform: uppercase; letter-spacing: .01em; line-height: 0.95; }
.big-number { display: flex; align-items: baseline; gap: 10px; margin: var(--s4) 0 0; line-height: .9; }
.big-km { font: 800 clamp(5rem, 22vw, 9.5rem)/.85 var(--font-num); color: var(--accent-on-dark); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.big-unit { font: 600 clamp(1.5rem, 6vw, 2.5rem)/1 var(--font-head); text-transform: uppercase; letter-spacing: .06em; }
.big-caption { font-size: 1.0625rem; margin: var(--s2) 0 var(--s4); }
.progress { position: relative; height: 14px; background: rgba(0,0,0,.35); border-radius: var(--radius-pill); border: 0; overflow: hidden; }
.progress-fill { height: 100%; background: var(--accent); width: 0; transition: width 1.2s cubic-bezier(.2,.7,.2,1); border-radius: var(--radius-pill); }
.progress-ticks i { position: absolute; top: 0; bottom: 0; width: 2px; background: #fff; opacity: .55; }
.progress-meta { margin: var(--s2) 0 var(--s4); font-size: 1rem; }
.progress-meta strong { font: 600 1.5rem/1 var(--font-head); }
.dot-sep { margin: 0 6px; opacity: .6; }
.raised { margin: 0 0 var(--s4); max-width: 420px; }
.mini-bar { height: 8px; background: rgba(29,27,30,.12); border-radius: var(--radius-pill); margin-top: 6px; overflow: hidden; }
.mini-bar > div { height: 100%; background: var(--primary); }
.raised .mini-bar { background: rgba(0,0,0,.35); } .raised .mini-bar > div { background: var(--accent); }
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--s3); margin-bottom: var(--s3); }
.hero .fine { color: rgba(255,255,255,.82); max-width: 46ch; }

.hero-side { background: var(--accent-deep); border: 0; border-radius: var(--radius); padding: var(--s4); align-self: end; box-shadow: 0 8px 24px rgba(0,0,0,.25); }
.side-title { font-size: 1rem; text-transform: uppercase; letter-spacing: .12em; color: var(--accent-on-dark); font-weight: 600; margin-bottom: var(--s3); }
.where-now { font: 600 1.75rem/1.15 var(--font-head); margin-bottom: var(--s2); text-transform: none; letter-spacing: 0; }
.where-next { margin-bottom: var(--s4); color: rgba(255,255,255,.88); }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); margin: 0; padding-top: var(--s3); border-top: 1px solid rgba(255,255,255,.28); }
.stats dt { font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; color: rgba(255,255,255,.8); font-weight: 600; }
.stats dd { margin: 2px 0 0; font: 600 1.75rem/1.1 var(--font-head); }

/* sections */
.section { padding: 60px 0; background: #fff; background-image: var(--dots); background-size: 18px 18px; }
.section-tint { background-color: var(--paper); background-image: var(--dots); background-size: 18px 18px; border-top: 0; border-bottom: 0; }
.section-head { display: flex; flex-direction: column; gap: var(--s3); margin-bottom: var(--s4); }
.section h2 { font-size: clamp(1.75rem, 4.5vw, 2.5rem); font-weight: 700; text-transform: uppercase; color: var(--accent); margin-bottom: var(--s2); letter-spacing: .04em; }
.section h3 { font-size: 1.35rem; font-weight: 600; margin-bottom: var(--s3); }
.lede { color: var(--muted); max-width: 62ch; margin: 0; }
.lede strong { color: var(--ink); }
.map-tools { display: flex; gap: var(--s2); flex-wrap: wrap; }

/* map */
.map-layout { display: grid; gap: var(--s4); }
.map-frame { position: relative; border-radius: var(--radius); overflow: hidden; }
#map { height: 400px; background: #d9e4ea; border: 0; border-radius: var(--radius); }
.map-note { font-size: .75rem; color: var(--muted); margin: 6px 0 0; }
.map-fallback { padding: var(--s4); }
.list-title { font-size: 1.15rem !important; text-transform: uppercase; letter-spacing: .08em; color: var(--accent); }
.milestones { list-style: none; margin: 0; padding: 0; position: relative; max-height: 520px; overflow: auto; border: 1px solid var(--line); background: var(--card); border-radius: var(--radius); }
.ms-item { display: grid; grid-template-columns: 22px 1fr auto; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--line); align-items: start; }
.ms-item:last-child { border-bottom: 0; }
.ms-dot { width: 16px; height: 16px; border-radius: 50%; border: 3px solid #9a949d; background: #fff; margin-top: 4px; }
.ms-item.is-unlocked .ms-dot { background: var(--primary); border-color: var(--primary); box-shadow: inset 0 0 0 3px #fff; }
.ms-item.is-latest { background: #eef6e6; box-shadow: inset 4px 0 0 var(--accent); }
.ms-item.is-locked { color: #55505a; }
.ms-country { font-size: .8125rem; color: var(--muted); margin-left: 4px; }
.ms-detail { font-size: .8125rem; color: var(--muted); }
.ms-km { text-align: right; display: flex; flex-direction: column; font-weight: 700; font-variant-numeric: tabular-nums; font-size: .9375rem; white-space: nowrap; }
.ms-state { font-size: .6875rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.ms-item.is-unlocked .ms-state { color: var(--primary); }

/* leaflet bits */
.ms-wrap { background: none; border: 0; }
.ms-pin { display: block; width: 18px; height: 18px; border-radius: 50%; border: 3px solid #6b6670; background: #fff; box-shadow: 0 0 0 2px rgba(255,255,255,.9); }
.ms-pin.is-unlocked { background: var(--primary); border-color: #fff; box-shadow: 0 0 0 2px var(--primary); }
.ms-pin.is-end { border-radius: 3px; transform: rotate(45deg) scale(.85); }

/* Warrior mascot "we are here" marker */
.mascot-wrap { background: none !important; border: 0 !important; overflow: visible !important; }
.team-mascot { width: 100%; height: 100%; pointer-events: none; }
.team-mascot img {
  display: block; width: 100%; height: 100%; object-fit: contain; object-position: bottom center;
  filter: drop-shadow(0 3px 6px rgba(0,0,0,.45));
}

.leaflet-tooltip.ms-label { font: 600 12px/1.2 var(--font-body); color: var(--ink); border: 1px solid var(--ink); border-radius: 4px; padding: 3px 6px; box-shadow: none; }
.leaflet-tooltip.team-label { font: 600 12px/1.35 var(--font-body); background: #1d1b1e; color: #fff; border: 0; border-radius: 6px; padding: 6px 10px; box-shadow: none; width: max-content; min-width: 150px; max-width: 240px; white-space: normal; text-align: center; pointer-events: none; }
.leaflet-tooltip.team-label .team-label-sub { display: block; font-weight: 400; font-size: 11px; color: #d6d1d8; margin-top: 2px; }
.leaflet-tooltip-top.team-label::before { border-top-color: #1d1b1e; }
.leaflet-popup-content { font: 400 .875rem/1.45 var(--font-body); margin: 12px 14px; }
.pop-sub { color: var(--muted); font-size: .8125rem; }
.leaflet-container a { color: var(--primary); }
#map.osm-tiles .leaflet-tile-pane { filter: saturate(.55) contrast(.95) brightness(1.04); }
.leaflet-container { font-family: var(--font-body); }

/* leaderboard */
.two-col { display: grid; gap: var(--s5); }
.legend { display: flex; flex-wrap: wrap; gap: 6px var(--s3); list-style: none; padding: 0; margin: 0 0 var(--s3); font-size: .875rem; font-weight: 600; }
.legend li { display: flex; align-items: center; gap: 6px; }
.swatch { display: inline-block; width: 12px; height: 12px; border-radius: 2px; flex: none; }
.t-run { background: var(--t-run); } .t-walk { background: var(--t-walk); } .t-bike { background: var(--t-bike); } .t-swim { background: var(--t-swim); } .t-row { background: var(--t-row); } .t-post { background: var(--t-post); }
.leaderboard { list-style: none; margin: 0 0 var(--s3); padding: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,.04); }
.lb-row { display: grid; grid-template-columns: 34px 1fr auto; gap: 10px 12px; align-items: start; padding: 14px; border-bottom: 1px solid var(--line); }
.lb-row:last-child { border-bottom: 0; }
.lb-rank { font: 700 1.5rem/1 var(--font-head); color: var(--muted); text-align: center; padding-top: 2px; }
.lb-row.is-podium .lb-rank { color: var(--primary); }
.lb-row:first-child { background: #eef6e6; }
.lb-top { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; margin-bottom: 6px; }
.lb-name { font-weight: 700; font-size: 1.0625rem; }
.lb-team { font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; }
.lb-bar { display: flex; height: 12px; background: #e6ebe3; border-radius: var(--radius-pill); overflow: hidden; }
.seg { display: block; height: 100%; border-right: 1px solid #fff; }
.lb-chips { display: flex; flex-wrap: wrap; gap: 2px 12px; margin-top: 6px; font-size: .75rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.chip { display: inline-flex; align-items: center; gap: 5px; }
.chip .swatch { width: 8px; height: 8px; }
.lb-total { text-align: right; font-size: .8125rem; color: var(--muted); white-space: nowrap; }
.lb-total strong { font: 700 1.5rem/1 var(--font-head); color: var(--ink); }

/* side panels */
.panel { background: var(--card); border: 1px solid var(--line); padding: var(--s4); margin-bottom: var(--s4); border-radius: var(--radius); box-shadow: 0 2px 8px rgba(0,0,0,.04); }
.panel h3 { font-size: 1.2rem !important; text-transform: uppercase; letter-spacing: .08em; margin-bottom: var(--s3) !important; color: var(--accent); }
.team-list, .feed { list-style: none; margin: 0; padding: 0; }
.team-list li { margin-bottom: var(--s3); } .team-list li:last-child { margin-bottom: 0; }
.team-row { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.team-name { font-weight: 600; } .team-members { font-weight: 400; font-size: .8125rem; color: var(--muted); margin-left: 4px; }

.feed { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 2px 8px rgba(0,0,0,.04); overflow: hidden; }
.feed-item { display: grid; grid-template-columns: 40px 1fr; gap: 12px 16px; align-items: start; padding: 16px; border-bottom: 1px solid var(--line); }
.feed-item:last-child { border-bottom: 0; }
.feed-icon { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; flex: none; }
.feed-icon svg { width: 18px; height: 18px; display: block; }
.feed-text { display: block; font-size: .9875rem; }
.feed-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 4px; font-size: .8125rem; color: var(--muted); }
.feed-total { font: 700 .875rem/1.3 var(--font-head); letter-spacing: .04em; text-transform: uppercase; color: var(--accent); }
.feed-extra { font-size: .8125rem; color: var(--muted); }
.feed-kicker { margin: 0 0 4px; font: 600 .75rem/1 var(--font-head); letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
.feed-post-title { font-size: 1.15rem; margin: 0 0 6px; color: var(--ink); text-transform: none; letter-spacing: 0; }
.feed-post-text { margin: 0 0 8px; }
.feed-photos { display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); margin: 8px 0; }
.feed-photos img { width: 100%; height: 160px; object-fit: cover; border-radius: var(--radius); background: var(--paper); }
.feed-empty, .feed li.empty { padding: 24px 16px; margin: 0; border: 0; box-shadow: none; }
.feed-by { font-size: .8125rem; }
.feed-note { margin: 6px 0 8px; font-size: .9375rem; color: var(--ink); }

.sponsor-placeholder-tile {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center;
  min-height: 120px; padding: 24px 16px; border: 2px dashed var(--accent); border-radius: var(--radius);
  background: color-mix(in srgb, var(--accent) 6%, #fff); color: var(--ink);
}
.sponsor-placeholder-title { font: 700 1.25rem/1.1 var(--font-head); letter-spacing: .04em; text-transform: uppercase; color: var(--primary); }
.sponsor-placeholder-sub { font-size: .875rem; color: var(--muted); }
.sponsor-card.sponsor-placeholder { background: transparent; border: 0; box-shadow: none; }
.sponsor-card.sponsor-placeholder .sponsor-link { text-decoration: none; color: inherit; display: block; }
.sponsor-card.sponsor-placeholder .sponsor-link:hover .sponsor-placeholder-tile { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 7%, #fff); }
.sponsor-grid-placeholder { background: transparent; border: 0; display: block; }
.sponsor-grid-placeholder .sponsor-card { margin: 0; }


.fund-title-link { color: inherit; text-decoration: none; }
.fund-title-link:hover { color: var(--primary); text-decoration: underline; }

/* Event detail page */
.event-page .event-detail { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--s5); box-shadow: 0 2px 8px rgba(0,0,0,.04); max-width: 720px; }
.event-page .event-kicker { margin: 0 0 var(--s2); font: 600 .8rem/1 var(--font-head); letter-spacing: .16em; text-transform: uppercase; color: var(--accent); }
.event-page .event-detail h1 { font-size: clamp(2rem, 5vw, 3rem); color: var(--primary); margin-bottom: var(--s3); }
.event-page .event-meta { margin: 0 0 var(--s4); color: var(--muted); }
.event-page .event-block { margin-bottom: var(--s4); }
.event-page .event-block h2 { font-size: 1.15rem; color: var(--accent); margin-bottom: var(--s2); }
.event-page .coming-soon { color: var(--muted); font-style: italic; }
.event-page .event-missing { padding: var(--s5) 0; }

/* Under-hero headline + gold sponsor banner */
.tour-sponsor-banner { background: var(--card); border-bottom: 1px solid var(--line); }
.headline-sponsor-band { padding: var(--s5) 0 var(--s4); text-align: center; }
.sponsor-band-kicker {
  margin: 0 0 var(--s3);
  font: 600 .8rem/1 var(--font-head);
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--accent);
}
.headline-sponsor-inner { max-width: 800px; }
#headline-sponsor-slot { max-width: 720px; margin: 0 auto; }
.sponsor-slot-tile {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center;
  min-height: 148px; padding: 28px 24px;
  border: 2px dashed var(--accent);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--accent) 6%, #fff);
}
.sponsor-slot-headline { min-height: 156px; }
.sponsor-slot-headline .sponsor-placeholder-title { font-size: clamp(1.35rem, 3vw, 1.7rem); }
.headline-sponsor-cta { margin: var(--s3) 0 0; }
.headline-sponsor-cta-link {
  font-size: .875rem; color: var(--muted);
  text-decoration: underline; text-underline-offset: 3px;
}
.headline-sponsor-cta-link:hover { color: var(--primary); }

.gold-sponsor-band {
  padding: var(--s4) 0 var(--s5);
  background: var(--paper);
  border-top: 1px solid var(--line);
  text-align: center;
}
.gold-sponsor-row {
  list-style: none; margin: 0 auto; padding: 0;
  display: grid; grid-template-columns: 1fr 1fr;
  gap: var(--s3);
  max-width: 720px;
}
.gold-sponsor-row > li { min-width: 0; }
.sponsor-slot-gold { min-height: 100px; padding: 20px 16px; }
.sponsor-slot-gold .sponsor-placeholder-title { font-size: 1.15rem; }

.sponsor-slot-link { display: block; text-decoration: none; color: inherit; }
.sponsor-slot-link.is-placeholder:hover .sponsor-slot-tile,
.sponsor-slot-link.is-placeholder:focus-visible .sponsor-slot-tile {
  border-color: var(--primary);
  background: color-mix(in srgb, var(--primary) 7%, #fff);
}
.sponsor-slot-logo { display: block; width: auto; max-width: 100%; height: 96px; object-fit: contain; margin: 0 auto; }
.sponsor-slot-headline + .sponsor-slot-logo,
.headline-sponsor-band .sponsor-slot-logo { height: 112px; }
.gold-sponsor-row .sponsor-slot-logo { height: 72px; }
.sponsor-slot-static,
.sponsor-slot-link.is-filled {
  display: flex; align-items: center; justify-content: center;
  min-height: 100px; padding: 16px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
}
.headline-sponsor-band .sponsor-slot-link.is-filled,
.headline-sponsor-band .sponsor-slot-static { min-height: 148px; }

/* Mid-page "Supported by" placements — quiet, not cluttered */
.supported-by {
  padding: 20px 0;
  background: var(--card);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.supported-by-inner { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.supported-by-kicker {
  margin: 0;
  font: 600 .7rem/1 var(--font-head);
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
}
.supported-by-slot { width: 100%; max-width: 280px; }
.sponsor-slot-supporter { min-height: 72px; padding: 14px 12px; }
.sponsor-slot-supporter .sponsor-placeholder-title { font-size: 1rem; }
.supported-by .sponsor-slot-logo { height: 48px; }
.supported-by .sponsor-slot-link.is-filled,
.supported-by .sponsor-slot-static { min-height: 72px; padding: 10px 12px; }

@media (max-width: 560px) {
  .gold-sponsor-row { grid-template-columns: 1fr; max-width: 400px; }
  .headline-sponsor-band { padding: var(--s4) 0 var(--s3); }
  .gold-sponsor-band { padding: var(--s3) 0 var(--s4); }
  .sponsor-slot-headline { min-height: 120px; padding: 22px 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .sponsor-slot-link.is-placeholder .sponsor-slot-tile { transition: none; }
}

/* full sponsors section — partner-grid feel */
.sponsor-tier { margin-bottom: var(--s5); }
.sponsor-tier:last-child { margin-bottom: var(--s4); }
.sponsor-tier-title { font-size: 1.15rem !important; text-transform: uppercase; letter-spacing: .1em; color: var(--accent); margin-bottom: var(--s3) !important; }
.sponsor-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.sponsor-grid.sponsor-grid-placeholder { background: transparent; border: 0; gap: 0; overflow: visible; display: block; }
.sponsor-grid-headline { grid-template-columns: 1fr; justify-items: stretch; }
.sponsor-grid-gold { grid-template-columns: 1fr; }
.sponsor-grid-supporter { grid-template-columns: 1fr 1fr; }
.sponsor-card { display: flex; flex-direction: column; align-items: center; text-align: center; background: var(--card); border: 0; padding: var(--s4); }
.sponsor-grid-headline .sponsor-card { padding: var(--s4); max-width: none; width: 100%; }
.sponsor-link { display: flex; flex-direction: column; align-items: center; width: 100%; text-decoration: none; color: inherit; }
.sponsor-link:hover { color: var(--primary); }
.sponsor-logo { display: block; width: auto; max-width: 100%; height: 96px; object-fit: contain; background: transparent; }
.sponsor-grid-gold .sponsor-logo { height: 80px; }
.sponsor-grid-supporter .sponsor-logo { height: 64px; }
.sponsor-fallback { display: flex; align-items: center; justify-content: center; min-height: 64px; padding: 12px 16px; font: 700 1.125rem/1.1 var(--font-head); letter-spacing: .04em; text-transform: uppercase; color: var(--primary); border: 2px solid var(--accent); border-radius: var(--radius); }
.sponsor-name { margin: 10px 0 0; font-weight: 700; font-size: .9375rem; }
.sponsor-msg { margin: 6px 0 0; font-size: .8125rem; color: var(--muted); max-width: 36ch; }
.sponsor-cta { margin: var(--s4) 0 0; }

@media (min-width: 700px) {
  .sponsor-grid-gold { grid-template-columns: 1fr 1fr; }
  .sponsor-grid-supporter { grid-template-columns: 1fr 1fr 1fr; }
  .sponsor-grid-headline .sponsor-logo { height: 110px; }
}

/* other fundraising */
.fund-total { margin: var(--s3) 0 0; font: 600 1.25rem/1.2 var(--font-head); color: var(--accent); letter-spacing: .04em; text-transform: uppercase; }
.fund-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s4); grid-template-columns: 1fr; }
.fund-card { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); min-width: 0; border-radius: var(--radius); overflow: hidden; box-shadow: 0 2px 10px rgba(0,0,0,.05); }
.fund-media { aspect-ratio: 16 / 9; background: #e8eee4; overflow: hidden; }
.fund-media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.fund-body { display: flex; flex-direction: column; flex: 1; padding: var(--s3) var(--s3) var(--s4); }
.fund-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 0 0 8px; font-size: .8125rem; color: var(--muted); }
.fund-status { font: 600 .7rem/1 var(--font-head); letter-spacing: .08em; text-transform: uppercase; padding: 4px 8px; border-radius: 4px; }
.fund-status-upcoming { color: #fff; background: var(--primary); }
.fund-status-done { color: #fff; background: var(--muted); }
.fund-status-ongoing { color: #fff; background: var(--accent); }
.fund-card h3 { font-size: 1.4rem; color: var(--accent); margin: 0 0 8px; text-transform: none; letter-spacing: 0; }
.fund-desc { margin: 0; color: var(--ink); }
.fund-amount { margin: 12px 0 0; font: 600 1.15rem/1.2 var(--font-head); color: var(--accent); }
.fund-action { margin: auto 0 0; padding-top: var(--s3); }
@media (min-width: 700px) {
  .fund-grid { grid-template-columns: 1fr 1fr; }
}

/* about + share */
.about { background: var(--accent-deep); color: #fff; background-image: none; }
.about h2 { color: #fff; }
.about-grid { display: grid; gap: var(--s5); }
.about-text { font-size: 1.125rem; line-height: 1.65; max-width: 56ch; margin-bottom: var(--s4); }
.share-box { border: 1px solid rgba(255,255,255,.35); padding: var(--s4); align-self: start; border-radius: var(--radius); background: rgba(0,0,0,.15); }
.share-box h3 { color: #fff; }
.share-list { list-style: none; padding: 0; margin: var(--s3) 0 0; display: flex; flex-wrap: wrap; gap: var(--s2); }
.share-box .btn-outline { background: transparent; color: #fff; border-color: rgba(255,255,255,.75); }
.share-box .btn-outline:hover { background: #fff; color: var(--accent-deep); }
.share-status { min-height: 1.5em; margin: var(--s2) 0 0; color: var(--accent-on-dark); font-weight: 600; font-size: .9rem; }

/* organiser check */
.check-panel { padding-top: var(--s4); padding-bottom: var(--s5); }
.check-panel h2 { font-size: 1.5rem; color: var(--primary); }

/* footer — two-tone green, club-site style */
.site-footer { background: var(--accent-deep); color: #fff; padding: 0; }
.site-footer .fine { color: rgba(255,255,255,.8); }
.site-footer a { color: #fff; }
.footer-upper { padding: 56px 0 40px; }
.footer-inner { display: grid; gap: var(--s4); }
.footer-club-name { font-family: var(--font-head); font-size: 1.25rem; letter-spacing: .06em; text-transform: uppercase; margin: 0 0 var(--s3); line-height: 1.3; }
.footer-lower { background: var(--accent); padding: 40px 0 48px; text-align: center; }
.footer-logo { display: inline-block; height: 168px; width: auto; max-width: min(320px, 72vw); object-fit: contain; }

/* >= 700px */
@media (min-width: 700px) {
  .wrap { padding: 0 var(--s4); }
  .brand-name { font-size: 1.15rem; }
  .section { padding: 72px 0; }
  .section-head { flex-direction: row; justify-content: space-between; align-items: flex-end; }
  #map { height: 520px; }
  .hero { padding: 72px 0 80px; }
  .footer-inner { grid-template-columns: 1.2fr 1fr; gap: var(--s5); }
  .footer-logo { height: 200px; max-width: 360px; }
}
/* >= 1000px */
@media (min-width: 1000px) {
  .hero-grid { grid-template-columns: minmax(0, 1.55fr) minmax(300px, .75fr); align-items: end; gap: var(--s6); }
  .map-layout { grid-template-columns: minmax(0, 1.75fr) minmax(300px, .85fr); align-items: start; }
  .milestones { max-height: 548px; }
  .two-col { grid-template-columns: minmax(0, 1.5fr) minmax(300px, .9fr); align-items: start; }
  .about-grid { grid-template-columns: 1.4fr 1fr; align-items: start; }
  .hero h1 { font-size: 4.1rem; }
  .hero-mascot {
    display: block;
    position: absolute;
    right: max(-40px, calc((100% - 1180px) / 2 - 80px));
    bottom: -48px;
    height: min(820px, 108%);
    width: auto;
    max-width: none;
    pointer-events: none;
    user-select: none;
    z-index: 1; /* in front of the faint diagonal stripes (::after) */
    filter: drop-shadow(0 18px 28px rgba(0,0,0,.4));
  }
  .hero-side { position: relative; z-index: 2; }
}
@media (max-width: 420px) {
  .lb-total strong { font-size: 1.4rem; }
  .hero-actions .btn { width: 100%; }
}
/* Shrink the header to just the nav (or hamburger) once the page is scrolled. */
.top-bar,
.brand,
.header-inner,
.site-nav {
  transition: max-height .35s ease, opacity .25s ease, padding .35s ease, margin .35s ease, min-height .35s ease, gap .35s ease, visibility .35s ease, width .35s ease;
}
.top-bar { max-height: 48px; overflow: hidden; }
.brand { overflow: hidden; max-height: 8.5rem; }

html.is-scrolled { scroll-padding-top: 56px; }
html.is-scrolled .top-bar {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  visibility: hidden;
  pointer-events: none;
}
html.is-scrolled .brand {
  max-height: 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  margin: 0;
  padding: 0;
  gap: 0;
}
html.is-scrolled .header-inner {
  min-height: 48px;
  padding-top: 2px;
  padding-bottom: 2px;
}

@media (max-width: 899px) {
  html.is-scrolled .brand {
    width: 0;
    min-width: 0;
    flex: 0 0 0;
  }
}

@media (min-width: 900px) {
  html.is-scrolled { scroll-padding-top: 52px; }
  .brand { max-height: 12.5rem; }
  html.is-scrolled .header-inner { padding: 0; gap: 0; min-height: 0; }
  html.is-scrolled .site-nav { padding: 6px 0 8px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .team-mascot img { filter: drop-shadow(0 2px 3px rgba(0,0,0,.4)); }
  .progress-fill, .btn, .nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after,
  .top-bar, .brand, .header-inner, .site-nav { transition: none; }
}
