/* TriRaceWeek: race-week logistics. Palette from race-course hardware: lake water, buoy orange,
   course-marker yellow, timing-mat teal. */
:root {
  --paper: #f5f7f6;
  --surface: #ffffff;
  --ink: #10242e;
  --ink-2: #3c5260;
  --muted: #6a7c86;
  --line: #d5dee1;
  --line-2: #e7edee;
  --buoy: #ff5a1f;
  --buoy-ink: #c43c0b;
  --marker: #f3c316;
  --mat: #0f9a88;
  --swim: #2c6be0;
  --finish: #10242e;
  --expo: #f3c316;
  --t1: #ff5a1f;
  --t2: #0f9a88;
  --hotel: #10242e;
  --bike: #7a4fd6;
  --focus: #2c6be0;
  --shadow: 0 1px 0 rgba(16, 36, 46, .06), 0 8px 24px -12px rgba(16, 36, 46, .25);
  --display: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --body: 'Barlow', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0b1a21; --surface: #10242e; --ink: #e8f0f2; --ink-2: #b9c8ce; --muted: #8aa0a9;
    --line: #23404d; --line-2: #19323d; --buoy: #ff6a33; --buoy-ink: #ff8a5c; --finish: #e8f0f2; --hotel: #e8f0f2;
    --shadow: 0 1px 0 rgba(0,0,0,.3), 0 10px 30px -14px rgba(0,0,0,.7); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0b1a21; --surface: #10242e; --ink: #e8f0f2; --ink-2: #b9c8ce; --muted: #8aa0a9;
  --line: #23404d; --line-2: #19323d; --buoy: #ff6a33; --buoy-ink: #ff8a5c; --finish: #e8f0f2; --hotel: #e8f0f2; color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 17px/1.55 var(--body); font-feature-settings: "tnum" 0; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--buoy-ink); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 3px; }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; letter-spacing: -.005em; line-height: 1.02; margin: 0; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
main { max-width: 1180px; margin: 0 auto; padding: 0 16px 64px; }

/* masthead */
.mast { max-width: 1180px; margin: 0 auto; padding: 18px 16px 14px; display: flex; align-items: center; gap: 14px; border-bottom: 2px solid var(--ink); }
.mark { display: inline-flex; align-items: baseline; text-decoration: none; font: 800 28px/1 var(--display); letter-spacing: -.01em; color: var(--ink); }
.mark-tri { color: var(--buoy); }
.mark-wk { font-weight: 600; }
.mast-line { margin: 0; color: var(--muted); font-size: 14px; }
.mast-nav { margin-left: auto; display: flex; gap: 18px; font-weight: 500; font-size: 15px; }
.mast-nav a { text-decoration: none; }
@media (max-width: 560px) { .mast-line { display: none; } }

/* ---------- home ---------- */
.hero { padding: 56px 0 28px; display: grid; gap: 22px; }
.hero h1 { font-size: clamp(44px, 8.2vw, 104px); font-weight: 800; max-width: 11ch; text-transform: none; }
.lede { margin: 0; max-width: 56ch; font-size: 19px; color: var(--ink-2); }

/* the bib: race number plate, four safety pins */
.bib { position: relative; display: block; background: var(--surface); border: 2px solid var(--ink); border-radius: 10px; padding: 18px 26px 14px; box-shadow: var(--shadow); max-width: 760px; }
.bib::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 8px; background: var(--buoy); border-radius: 8px 8px 0 0; }
.pin { position: absolute; width: 9px; height: 9px; border-radius: 50%; background: var(--paper); border: 2px solid var(--line); }
.p1 { top: 16px; left: 9px; } .p2 { top: 16px; right: 9px; } .p3 { bottom: 9px; left: 9px; } .p4 { bottom: 9px; right: 9px; }
.bib-label { display: block; font: 600 15px/1 var(--body); color: var(--muted); margin: 6px 0 2px; }
.bib input { width: 100%; border: 0; background: transparent; color: var(--ink); font: 700 clamp(30px, 5vw, 52px)/1.1 var(--display); padding: 2px 0 4px; outline: none; }
.bib input::placeholder { color: var(--line); }
.bib:focus-within { border-color: var(--focus); }

.filters, .months { display: flex; flex-wrap: wrap; gap: 8px; }
.f { border: 1.5px solid var(--ink); background: transparent; border-radius: 999px; padding: 6px 16px; font-weight: 600; font-size: 15px; }
.f[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.months { gap: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: thin; flex-wrap: nowrap; }
.m { border: 0; border-right: 1px solid var(--line-2); background: transparent; padding: 10px 14px 8px; display: grid; justify-items: start; min-width: 64px; }
.m b { font: 700 20px/1 var(--display); }
.m small { color: var(--muted); font-size: 12px; }
.m[aria-pressed="true"] { background: var(--marker); color: #10242e; }
.m[aria-pressed="true"] small { color: #10242e; }

.startlist { margin-top: 18px; }
.sl-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 6px 0 10px; }
.sl-head h2 { font-size: 34px; }
.sl-head p { margin: 0; color: var(--muted); font-size: 15px; }
.sl-cols, .row > a { display: grid; grid-template-columns: 92px minmax(0, 1.6fr) minmax(0, 1.1fr) 112px 70px; gap: 16px; align-items: center; }
.sl-cols { font-size: 13px; color: var(--muted); padding: 0 12px 6px; border-bottom: 2px solid var(--ink); }
.rows { list-style: none; margin: 0; padding: 0; }
.row > a { text-decoration: none; padding: 12px; border-bottom: 1px solid var(--line); }
.row > a:hover { background: var(--surface); color: inherit; }
.row > a:hover .r-name { color: var(--buoy-ink); }
.r-date { display: grid; line-height: 1.05; }
.r-date b { font: 700 21px/1 var(--display); }
.r-date small { color: var(--muted); font-size: 13px; }
.r-name { font: 600 22px/1.1 var(--display); display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.r-where { color: var(--ink-2); font-size: 15px; }
.r-hotels { font: 700 20px/1 var(--display); text-align: right; }
.r-hotels small { font: 400 13px var(--body); color: var(--muted); }
.r-cov { display: flex; gap: 5px; }
.tag { display: inline-block; font: 700 12px/1 var(--body); padding: 4px 7px 3px; border-radius: 4px; background: var(--line-2); color: var(--ink-2); white-space: nowrap; margin: 0; }
.tag-full { background: var(--ink); color: var(--paper); }
.tag-703 { background: var(--buoy); color: #fff; }
.tag-5150 { background: var(--mat); color: #fff; }
.cov { display: inline-block; width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--line); background: transparent; vertical-align: -2px; }
.cov.on.cov-expo { background: var(--expo); border-color: var(--expo); }
.cov.on.cov-t1 { background: var(--t1); border-color: var(--t1); }
.cov.on.cov-t2 { background: var(--t2); border-color: var(--t2); }
.cov.on.cov-swim { background: var(--swim); border-color: var(--swim); }
.cov.on.cov-finish { background: var(--finish); border-color: var(--finish); border-radius: 2px; }
.legend { color: var(--muted); font-size: 13px; display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 4px 16px; margin: -2px 0 18px; }
.legend .note { font-size: 12px; padding-left: 16px; border-left: 1px solid var(--line, rgba(0,0,0,.15)); }
@media (max-width: 720px) { .legend { justify-content: flex-start; margin-top: 0; } .legend .note { flex-basis: 100%; padding-left: 0; border-left: 0; } }
.legend .cov { margin-right: 6px; }
.empty { padding: 28px 12px; color: var(--ink-2); }
@media (max-width: 760px) {
  .sl-cols { display: none; }
  .row > a { grid-template-columns: 64px 1fr auto; grid-template-areas: "d n h" "d w c"; gap: 2px 12px; }
  .r-date { grid-area: d; } .r-name { grid-area: n; font-size: 20px; } .r-where { grid-area: w; font-size: 14px; }
  .r-cov { grid-area: c; justify-content: end; } .r-hotels { grid-area: h; }
}

/* ---------- race page ---------- */
.crumb { font-size: 14px; color: var(--muted); padding: 16px 0 0; }
.crumb a { color: var(--ink-2); }
.race-head { display: grid; grid-template-columns: 200px 1fr; gap: 32px; align-items: center; padding: 22px 0 30px; }
.bib-sm { display: grid; justify-items: center; align-content: center; padding: 22px 12px 14px; min-height: 150px; text-align: center; }
.bib-sm b { font: 800 72px/.9 var(--display); letter-spacing: -.02em; }
.bib-sm small { color: var(--muted); font-size: 14px; }
.race-title h1 { font-size: clamp(38px, 6vw, 72px); font-weight: 800; margin: 8px 0 10px; }
.facts { margin: 0 0 14px; display: flex; flex-wrap: wrap; gap: 6px 18px; color: var(--ink-2); }
.facts span + span::before { content: ""; display: inline-block; width: 5px; height: 5px; background: var(--buoy); border-radius: 50%; margin-right: 18px; vertical-align: 3px; margin-left: -12px; }
.race-links { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; }
.race-links a, .unit { border: 1.5px solid var(--ink); border-radius: 999px; padding: 5px 14px; font-weight: 600; font-size: 14px; text-decoration: none; background: transparent; }
.race-links a:first-child { background: var(--ink); color: var(--paper); }
@media (max-width: 680px) { .race-head { grid-template-columns: 1fr; gap: 18px; } .bib-sm { min-height: 0; max-width: 220px; } .bib-sm b { font-size: 56px; } }

.venues { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 0; border: 2px solid var(--ink); border-radius: 10px; overflow: hidden; background: var(--surface); }
.map { min-height: 460px; background: var(--line-2); }
.venue-list { padding: 22px 22px 18px; border-left: 2px solid var(--ink); }
.venue-list h2 { font-size: 28px; margin-bottom: 12px; }
.venue-list h3 { font-size: 19px; margin: 18px 0 6px; }
.locs { list-style: none; padding: 0; margin: 0; }
.loc { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "k a" "v v"; gap: 2px 10px; align-items: baseline; padding: 10px 0; border-top: 1px solid var(--line-2); cursor: pointer; }
.loc:first-child { border-top: 0; }
.loc-k { grid-area: k; font: 700 19px/1.2 var(--display); display: flex; align-items: center; gap: 8px; }
.loc-v { grid-area: v; padding-left: 20px; }
.loc-a { grid-area: a; }
.loc-k::before { content: ""; width: 12px; height: 12px; border-radius: 50%; flex: none; }
.loc-expo .loc-k::before, .loc-checkin .loc-k::before { background: var(--expo); }
.loc-t1 .loc-k::before { background: var(--t1); }
.loc-t2 .loc-k::before { background: var(--t2); }
.loc-swim .loc-k::before { background: var(--swim); }
.loc-finish .loc-k::before { background: var(--finish); border-radius: 2px; }
.loc-v b { font-weight: 500; display: block; line-height: 1.3; }
.loc-v small { color: var(--muted); font-size: 13px; }
.loc-a { font-size: 14px; color: var(--ink-2); white-space: nowrap; }
.pairs { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
.pairs li { display: flex; justify-content: space-between; border-bottom: 1px dotted var(--line); padding: 3px 0; font-size: 15px; }
.pairs b { font: 700 18px/1.2 var(--display); }
.note { color: var(--muted); font-size: 14.5px; max-width: 72ch; }
.note.strong { color: var(--ink); background: color-mix(in srgb, var(--marker) 28%, transparent); padding: 10px 12px; border-left: 4px solid var(--marker); }
@media (max-width: 880px) { .venues { grid-template-columns: 1fr; } .venue-list { border-left: 0; border-top: 2px solid var(--ink); } .map { min-height: 340px; } }

.sec-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; margin: 46px 0 12px; }
.stays h2, .bikes h2, .reviews h2 { font-size: 40px; }
.bikes h2, .reviews h2 { margin: 46px 0 12px; }
.sorter { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.sorter span { color: var(--muted); font-size: 14px; margin-right: 4px; }
.s { border: 1.5px solid var(--ink); background: transparent; border-radius: 6px; padding: 5px 12px; font: 700 17px/1 var(--display); }
.s[aria-pressed="true"] { background: var(--buoy); border-color: var(--buoy); color: #fff; }
.filters-sm { display: flex; gap: 18px; flex-wrap: wrap; font-size: 15px; color: var(--ink-2); margin-bottom: 8px; }
.filters-sm select { font: inherit; padding: 3px 6px; border: 1px solid var(--line); border-radius: 4px; background: var(--surface); color: var(--ink); }
.table-wrap { overflow-x: auto; border-top: 2px solid var(--ink); }
.hotels { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.hotels thead th { font: 600 13px var(--body); color: var(--muted); text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.hotels thead th.d { text-align: right; }
.hotels thead th.d.on { color: var(--buoy-ink); }
.hotels tbody th { text-align: left; font-weight: 400; padding: 10px; min-width: 220px; }
.hotels td { padding: 10px; border-bottom: 1px solid var(--line-2); }
.hotels tbody th { border-bottom: 1px solid var(--line-2); }
.hotels tbody tr:hover { background: var(--surface); }
.h-name { display: block; font-weight: 600; }
.h-meta { color: var(--muted); font-size: 13.5px; }
.walk { font-style: normal; color: var(--mat); font-weight: 600; }
.d { text-align: right; white-space: nowrap; font: 600 18px/1 var(--display); color: var(--ink-2); }
.d.on { color: var(--ink); font-weight: 800; }
.act { white-space: nowrap; text-align: right; }
.act a { font-size: 14px; margin-left: 12px; }
.act a:first-child { font-weight: 600; color: var(--buoy-ink); }
tr.hide { display: none; }
tr.flash { background: color-mix(in srgb, var(--marker) 30%, transparent) !important; }

.shops { list-style: none; padding: 0; margin: 0; border-top: 2px solid var(--ink); columns: 2; column-gap: 32px; }
.shop { display: grid; grid-template-columns: 64px 1fr; gap: 4px 12px; padding: 12px 0; border-bottom: 1px solid var(--line-2); break-inside: avoid; }
.shop-d { font: 800 22px/1 var(--display); color: var(--bike); grid-row: span 2; }
.shop-n small { display: block; color: var(--muted); font-size: 13.5px; }
.shop-a { grid-column: 2; display: flex; gap: 14px; font-size: 14px; }
@media (max-width: 760px) { .shops { columns: 1; } }

.reviews ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.reviews li { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px; }
.reviews blockquote { margin: 6px 0; font-style: italic; }
.reviews small { color: var(--muted); }

/* map markers */
.mk { width: 26px; height: 26px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.45); display: grid; place-items: center; font: 800 11px/1 var(--display); color: #fff; }
.mk-expo, .mk-checkin { background: var(--expo); color: #10242e; }
.mk-t1 { background: var(--t1); } .mk-t2 { background: var(--t2); } .mk-swim { background: var(--swim); }
.mk-finish { background: #10242e; border-radius: 4px; }
.mk-hotel { width: 12px; height: 12px; background: #10242e; border: 2px solid #fff; }
.mk-bike { width: 12px; height: 12px; background: var(--bike); border: 2px solid #fff; border-radius: 3px; }
.leaflet-container { font: 14px var(--body); }
.leaflet-popup-content b { font-weight: 600; }

/* prose & footer */
.prose { max-width: 720px; padding-top: 40px; }
.prose h1 { font-size: 56px; margin-bottom: 18px; }
.prose h2 { font-size: 28px; margin: 32px 0 8px; }
.foot { max-width: 1180px; margin: 0 auto; padding: 28px 16px 48px; border-top: 2px solid var(--ink); color: var(--muted); font-size: 13.5px; display: grid; gap: 6px; }
.foot p { margin: 0; max-width: 100ch; }
.foot strong { color: var(--ink); }
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; animation: none !important; } }
@media (max-width: 680px) { .facts { flex-direction: column; gap: 2px; } .facts span + span::before { display: none; } .hotels tbody th { min-width: 170px; } }
.report { margin-top: 46px; border: 2px solid var(--ink); border-radius: 10px; padding: 22px; background: var(--surface); }
.report h2 { font-size: 30px; margin-bottom: 14px; }
.report form { display: grid; grid-template-columns: 2fr 1fr; gap: 14px 18px; }
.report .fld { display: grid; gap: 4px; font-weight: 600; font-size: 15px; }
.report .wide, .report fieldset, .report .note, .report .go { grid-column: 1 / -1; }
.report input:not([type=checkbox]), .report select, .report textarea { font: inherit; font-weight: 400; padding: 8px 10px; border: 1.5px solid var(--line); border-radius: 6px; background: var(--paper); color: var(--ink); }
.report fieldset { border: 0; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 6px 18px; }
.report legend { font-weight: 600; font-size: 15px; margin-bottom: 6px; }
.report .go { justify-self: start; background: var(--buoy); color: #fff; border: 0; border-radius: 6px; padding: 10px 20px; font: 700 18px/1 var(--display); }
.hp { position: absolute; left: -9999px; }
@media (max-width: 600px) { .report form { grid-template-columns: 1fr; } }

.answer { margin: 0 0 14px; max-width: 70ch; font-size: 16px; color: var(--ink-2); border-left: 3px solid var(--buoy); padding-left: 12px; }
