/* Lower Bucks MTB — site styles.
   Colors come from themes.css (custom properties on <html data-theme>). Nothing here hard-codes a color. */

@font-face {
  font-family: 'Archivo';
  src: url('../fonts/archivo-latin-wdth-normal.woff2') format('woff2');
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}
@font-face {
  font-family: 'Atkinson Hyperlegible Next';
  src: url('../fonts/atkinson-hyperlegible-next-latin-400-normal.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Atkinson Hyperlegible Next';
  src: url('../fonts/atkinson-hyperlegible-next-latin-400-italic.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Atkinson Hyperlegible Next';
  src: url('../fonts/atkinson-hyperlegible-next-latin-700-normal.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
}

:root {
  --display: 'Archivo', 'Arial Narrow', system-ui, sans-serif;
  --text: 'Atkinson Hyperlegible Next', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --gutter: clamp(16px, 4vw, 32px);
  --measure: 66ch;
  --r-card: 14px;
  --r-ctl: 10px;
  --space: clamp(48px, 8vw, 96px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--text);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; }
a { color: var(--link); text-underline-offset: 0.18em; text-decoration-thickness: 0.09em; }
a:hover { text-decoration-thickness: 0.16em; }
:focus-visible { outline: 3px solid var(--link); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 800;
  font-stretch: 125%;
  font-variation-settings: 'wdth' 125;
  line-height: 1.06;
  letter-spacing: -0.012em;
  margin: 0;
  text-wrap: balance;
}
h1 { font-size: clamp(2.5rem, 6.6vw, 4.9rem); letter-spacing: -0.022em; line-height: 0.98; }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.5rem); }
h3 { font-size: 1.3rem; font-variation-settings: 'wdth' 112; font-stretch: 112%; }
h4 { font-size: 1.05rem; font-variation-settings: 'wdth' 100; font-stretch: 100%; letter-spacing: 0; }
p { margin: 0 0 1em; max-width: var(--measure); }
ul, ol { margin: 0 0 1em; padding-left: 1.25em; max-width: var(--measure); }
li { margin-bottom: 0.4em; }
small, .small { font-size: 0.9rem; }
.muted { color: var(--ink2); }
.num { font-variant-numeric: tabular-nums; }

.wrap { width: 100%; max-width: 1160px; margin-inline: auto; padding-inline: var(--gutter); }
.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--pop); color: var(--popInk); padding: 10px 16px; border-radius: var(--r-ctl); font-weight: 700;
}
.skip:focus { top: 12px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- header ---------- */
.site-head { border-bottom: 1px solid var(--line); }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; }
.brand { white-space: nowrap; display: inline-flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; }
.brand-logo { display: block; height: 72px; margin-block: 4px; width: auto; flex: none; }
@media (max-width: 560px) { .brand-logo { height: 58px; } }
.brand-name { font-family: var(--display); font-weight: 800; font-variation-settings: 'wdth' 125; font-stretch: 125%; font-size: 1.15rem; letter-spacing: -0.01em; line-height: 1; }
.nav { display: flex; gap: 4px; align-items: center; }
.nav a {
  white-space: nowrap; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 0.95rem;
  padding: 10px 12px; border-radius: 8px; border-bottom: 3px solid transparent; border-radius: 8px 8px 0 0;
}
.nav a:hover { background: var(--surface2); }
.nav a[aria-current='page'] { border-bottom-color: var(--pop); }
.nav-toggle {
  display: none; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px;
  background: transparent; color: var(--ink); border: 2px solid var(--ink); border-radius: var(--r-ctl);
  font: 700 0.95rem var(--text); cursor: pointer;
}
@media (max-width: 1080px) {
  .nav-toggle { display: inline-flex; }
  .nav {
    display: none; position: absolute; left: 0; right: 0; top: 68px; z-index: 40;
    flex-direction: column; align-items: stretch; gap: 0; padding: 8px var(--gutter) 16px;
    background: var(--bg); border-bottom: 1px solid var(--line);
  }
  .site-head { position: relative; }
  .nav.open { display: flex; }
  .nav a { padding: 14px 4px; border-radius: 0; border-bottom: 1px solid var(--line); }
  .nav a[aria-current='page'] { border-bottom-color: var(--pop); border-bottom-width: 3px; }
}

/* ---------- shared bits ---------- */
main { display: block; }
.section { padding-block: var(--space); }
.section + .section { padding-top: 0; }
.section-tight { padding-block: clamp(28px, 5vw, 56px); }
.lead { font-size: clamp(1.15rem, 2vw, 1.4rem); line-height: 1.5; max-width: 56ch; }
.page-head { padding-block: clamp(40px, 7vw, 80px) clamp(24px, 4vw, 40px); }
.page-head h1 { max-width: 16ch; margin-bottom: 20px; }
.crumbs { font-size: 0.95rem; margin-bottom: 18px; }
.crumbs a { color: var(--ink2); }

.rule { border: 0; border-top: 1px solid var(--line); margin: 0; }
.stack > * + * { margin-top: 1.25rem; }

/* race plate: the week number */
.plate {
  display: inline-grid; place-items: center; min-width: 2.7em; padding: 0.12em 0.5em;
  background: var(--ink); color: var(--bg); border-radius: 8px;
  font-family: var(--display); font-weight: 800; font-variation-settings: 'wdth' 110; font-stretch: 110%;
  font-variant-numeric: tabular-nums; line-height: 1.2;
  box-shadow: inset 0 0 0 2px var(--bg), 0 0 0 2px var(--ink);
  margin: 2px;
}
.plate-lg { font-size: clamp(2.2rem, 5vw, 3.4rem); padding: 0.05em 0.35em; border-radius: 12px; }
.plate.now { background: var(--pop); color: var(--popInk); box-shadow: inset 0 0 0 2px var(--popInk), 0 0 0 2px var(--popInk); }

/* track markers: pepper icons (bell pepper, jalapeño, habanero). Identity by shape and color, without ranking. */
.mk { --mk: var(--ink2); display: inline-block; width: 1.25em; height: 1.25em; flex: none; vertical-align: -0.25em; }
.mk .body { fill: var(--mk); }
.mk .stem { fill: var(--ink); }
[data-track='bell'] { --mk: var(--bell); }
[data-track='jalapeno'] { --mk: var(--jalapeno); }
[data-track='habanero'] { --mk: var(--habanero); }
.mk-lg { width: 3rem; height: 3rem; }
.heat { display: inline-flex; align-items: center; gap: 5px; margin: 6px 0 10px; font-size: 0.85rem; font-weight: 700; color: var(--ink2); }
.heat i { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--mk); box-sizing: border-box; }
.heat i.on { background: var(--mk); }
.heat span { margin-left: 4px; }
.trk { display: inline-flex; align-items: center; gap: 0.5em; font-weight: 700; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px;
  border-radius: var(--r-ctl); border: 2px solid var(--ink); color: var(--ink); background: transparent;
  font: 700 1rem var(--text); text-decoration: none; cursor: pointer;
}
.btn:hover { background: var(--surface2); }
.btn-pop { background: var(--pop); border-color: var(--pop); color: var(--popInk); }
.btn-pop:hover { background: var(--pop); filter: brightness(1.06); box-shadow: 0 0 0 3px var(--surface2); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

.callout {
  border-left: 5px solid var(--pop); background: var(--surface); padding: 16px 20px; border-radius: 0 var(--r-ctl) var(--r-ctl) 0;
  max-width: var(--measure);
}
.callout > :last-child { margin-bottom: 0; }
.callout strong { font-family: var(--display); font-variation-settings: 'wdth' 110; font-stretch: 110%; }

.tag {
  display: inline-block; padding: 2px 10px; border-radius: 999px; border: 1.5px solid var(--ink2);
  font-size: 0.85rem; font-weight: 700; color: var(--ink2); white-space: nowrap;
}

/* ---------- hero & trail map ---------- */
.hero { padding-block: clamp(36px, 7vw, 84px) clamp(20px, 3vw, 36px); }
.hero h1 { max-width: none; }
.hero h1 .l { display: block; }
.hero .lead { margin: 24px 0 28px; }

.trailmap {
  position: relative; background: var(--land); border: 1px solid var(--line); border-radius: var(--r-card); overflow: hidden;
  padding: clamp(14px, 2.4vw, 28px);
}
.trailmap .contours { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 1; pointer-events: none; }
.trailmap-body { position: relative; }
.trailmap svg.map { display: block; width: 100%; height: auto; overflow: visible; }
.map-v { display: none !important; }
@media (max-width: 720px) { .map-h { display: none !important; } .map-v { display: block !important; } }
.map .band { fill: var(--surface); opacity: 0.55; }
.map .band-label { font-family: var(--display); font-weight: 800; font-size: 17px; fill: var(--ink); font-variation-settings: 'wdth' 118; }
.map .band-sub { font-family: var(--text); font-size: 13.5px; fill: var(--ink2); }
.map .tread { fill: none; stroke: var(--surface); stroke-width: 15; stroke-linecap: round; stroke-linejoin: round; }
.map .line { fill: none; stroke: var(--brand); stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 0.1 12; }
.map .wk { cursor: pointer; }
.map .wk rect { fill: var(--surface); stroke: var(--ink); stroke-width: 2; }
.map .wk text { font-family: var(--display); font-weight: 800; font-size: 16px; fill: var(--ink); font-variant-numeric: tabular-nums; text-anchor: middle; dominant-baseline: central; font-variation-settings: 'wdth' 110; }
.map .wk.past rect { fill: var(--ink); }
.map .wk.past text { fill: var(--bg); }
.map .wk.now rect { fill: var(--pop); stroke: var(--ink); stroke-width: 3; }
.map .wk.now text { fill: var(--popInk); }
.map .wk .test { fill: var(--pop); stroke: var(--ink); stroke-width: 1.5; }
.map .wk:hover rect, .map .wk:focus-visible rect { stroke-width: 4; }
.map .wk:focus-visible { outline: none; }
.map .here { display: none; }
.map .wk.now .here { display: block; }
.map .here rect { fill: var(--ink); stroke: none; }
.map .here text { fill: var(--bg); font-family: var(--text); font-weight: 700; font-size: 12.5px; font-variation-settings: normal; }
.map .here path { fill: var(--ink); }
/* the one page-load moment: week plates pop in along the trail, first to last */
@media (prefers-reduced-motion: no-preference) {
  .map .wk { transform-box: fill-box; transform-origin: center; animation: plate-in 0.45s ease-out backwards; animation-delay: calc(0.15s + var(--i) * 0.06s); }
  @keyframes plate-in { from { opacity: 0; transform: scale(0.6); } }
}
.map-note { position: relative; display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 14px 0 0; font-size: 0.92rem; color: var(--ink2); }
.map-note span { display: inline-flex; align-items: center; gap: 8px; }
.dot-test { width: 12px; height: 12px; border-radius: 50%; background: var(--pop); border: 1.5px solid var(--ink); display: inline-block; }
.map-title { position: relative; display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.map-title h2 { font-size: clamp(1.2rem, 2.4vw, 1.6rem); }

/* ---------- this week ---------- */
.thisweek { display: grid; grid-template-columns: auto 1fr; gap: clamp(18px, 4vw, 44px); align-items: start; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: clamp(20px, 3vw, 36px); }
.thisweek .status { color: var(--ink2); margin: 6px 0 0; }
.thisweek h2 { font-size: clamp(1.4rem, 3vw, 2rem); margin-bottom: 4px; }
.days { display: grid; gap: 0; margin-top: 18px; border-top: 1px solid var(--line); }
.day { display: grid; grid-template-columns: 7.2rem 1fr auto; gap: 8px 20px; align-items: baseline; padding: 14px 0; border-bottom: 1px solid var(--line); }
.day .d { font-weight: 700; }
.day .d small { display: block; color: var(--ink2); font-weight: 400; }
.day .t { font-weight: 700; }
.day .t small { display: block; color: var(--ink2); font-weight: 400; }
@media (max-width: 640px) {
  .thisweek { grid-template-columns: 1fr; }
  .day { grid-template-columns: 1fr; gap: 2px; }
}

/* ---------- tracks (home) ---------- */
.tracks-3 { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); }
.tracks-3 > div { padding: 28px 28px 8px 0; }
.tracks-3 > div + div { padding-left: 28px; border-left: 1px solid var(--line); }
.tracks-3 h3 { margin: 14px 0 8px; font-size: 1.6rem; }
.tracks-3 p { margin-bottom: 0.7em; }
@media (max-width: 760px) {
  .tracks-3 { grid-template-columns: 1fr; }
  .tracks-3 > div, .tracks-3 > div + div { padding: 24px 0 8px; border-left: 0; }
  .tracks-3 > div + div { border-top: 1px solid var(--line); }
}

.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(24px, 5vw, 64px); align-items: start; }
@media (max-width: 860px) { .split { grid-template-columns: minmax(0, 1fr); } }
.split > *, .unit > *, .track-full > *, .two-day > * { min-width: 0; }
.section-head { margin-bottom: clamp(20px, 3vw, 36px); }
.section-head h2 { margin-bottom: 12px; }
.section-head p { color: var(--ink2); }

/* ---------- rhythm / time blocks ---------- */
.rhythm { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(20px, 3vw, 40px); }
@media (max-width: 860px) { .rhythm { grid-template-columns: 1fr; } }
.rhythm h3 { margin-bottom: 4px; }
.rhythm .kicker { color: var(--ink2); margin-bottom: 14px; }
.blocks { list-style: none; padding: 0; margin: 0; }
.bar { display: flex; gap: 2px; height: 14px; border-radius: 7px; overflow: hidden; margin-bottom: 14px; }
.bar span { display: block; min-width: 2px; background: color-mix(in srgb, var(--brand) 100%, transparent); }
.bar span:nth-child(1) { opacity: 0.35; }
.bar span:nth-child(2) { opacity: 0.6; }
.bar span:nth-child(3) { opacity: 1; }
.bar span:nth-child(4) { opacity: 0.48; }
.blocks li { display: grid; grid-template-columns: 3.4rem 4.4rem 1fr; gap: 8px; padding: 9px 0; border-top: 1px solid var(--line); margin: 0; align-items: baseline; }
.blocks li:last-child { border-bottom: 1px solid var(--line); }
.blocks .time { font-variant-numeric: tabular-nums; font-weight: 700; }
.blocks .mins { font-variant-numeric: tabular-nums; color: var(--ink2); }
.intensity { margin-top: 14px; padding-left: 12px; border-left: 4px solid var(--pop); }
.intensity b { font-weight: 700; }

/* ---------- units (season page) ---------- */
.unit { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(20px, 5vw, 64px); padding-block: clamp(32px, 5vw, 56px); border-top: 1px solid var(--line); }
@media (max-width: 860px) { .unit { grid-template-columns: minmax(0, 1fr); } }
.unit h2 { margin-bottom: 8px; }
.unit .when { font-weight: 700; color: var(--ink2); margin-bottom: 14px; }
.unit dl { margin: 0 0 24px; }
.unit dt { font-weight: 700; margin-top: 12px; }
.unit dd { margin: 2px 0 0; max-width: var(--measure); }
.goal-rows { list-style: none; padding: 0; margin: 0; max-width: none; }
.goal-rows li { display: grid; grid-template-columns: 6.2rem 1fr; gap: 14px; padding: 12px 0; border-top: 1px solid var(--line); margin: 0; align-items: baseline; }
.goal-rows li:last-child { border-bottom: 1px solid var(--line); }
.goal-rows .trk { font-weight: 700; }
@media (max-width: 520px) { .goal-rows li { grid-template-columns: 1fr; gap: 4px; } }

/* ---------- tracks page ---------- */
.track-full { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(20px, 5vw, 64px); padding-block: clamp(32px, 5vw, 56px); border-top: 1px solid var(--line); }
@media (max-width: 860px) { .track-full { grid-template-columns: minmax(0, 1fr); } }
.track-full h2 { margin: 14px 0 8px; }
.facts { margin: 0; display: grid; grid-template-columns: 9rem 1fr; gap: 0; max-width: none; }
.facts dt { font-weight: 700; padding: 12px 12px 12px 0; border-top: 1px solid var(--line); }
.facts dd { margin: 0; padding: 12px 0; border-top: 1px solid var(--line); }
.facts dt:last-of-type, .facts dd:last-of-type { border-bottom: 1px solid var(--line); }
@media (max-width: 520px) { .facts { grid-template-columns: 1fr; } .facts dt { border-bottom: 0; padding-bottom: 0; } .facts dd { border-top: 0; padding-top: 2px; } }

.mixchart { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(16px, 3vw, 32px); }
@media (max-width: 860px) { .mixchart { grid-template-columns: 1fr; } }
.mixchart h3 { font-size: 1.2rem; margin-bottom: 12px; }
.mixrow { display: grid; grid-template-columns: 5.2rem 1fr; gap: 10px; align-items: center; margin-bottom: 6px; }
.mixrow .m { font-size: 0.92rem; color: var(--ink2); }
.mixbar { display: flex; gap: 2px; height: 28px; }
.mixbar span { display: grid; align-items: center; padding-inline: 8px; font-size: 0.85rem; font-weight: 700; font-variant-numeric: tabular-nums; min-width: 0; white-space: nowrap; overflow: hidden; }
.mixbar .s { background: var(--c1); border-radius: 6px 0 0 6px; color: var(--c1ink); }
.mixbar .f { background: var(--c2); border-radius: 0 6px 6px 0; color: var(--c2ink); }
.legend { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 0 0 20px; font-size: 0.95rem; }
.legend span { display: inline-flex; align-items: center; gap: 8px; }
.legend i { width: 14px; height: 14px; border-radius: 4px; display: inline-block; }
.legend .s { background: var(--c1); }
.legend .f { background: var(--c2); }

table.tbl { width: 100%; border-collapse: collapse; font-size: 0.98rem; }
table.tbl th, table.tbl td { text-align: left; vertical-align: top; padding: 12px 14px 12px 0; border-top: 1px solid var(--line); }
table.tbl th { font-weight: 700; }
table.tbl tr:last-child td, table.tbl tr:last-child th { border-bottom: 1px solid var(--line); }
table.tbl thead th { border-top: 0; border-bottom: 2px solid var(--ink); color: var(--ink); font-size: 0.92rem; }
.scroll-x { overflow-x: auto; -webkit-overflow-scrolling: touch; }
details.data { margin-top: 12px; }
details.data summary { cursor: pointer; font-weight: 700; padding: 8px 0; }

.steps { counter-reset: s; list-style: none; padding: 0; margin: 0; max-width: var(--measure); }
.steps li { counter-increment: s; position: relative; padding: 4px 0 18px 3rem; margin: 0; }
.steps li::before {
  content: counter(s); position: absolute; left: 0; top: 0; width: 2.1rem; height: 2.1rem; display: grid; place-items: center;
  background: var(--ink); color: var(--bg); border-radius: 8px; font: 800 1rem var(--display); font-variation-settings: 'wdth' 110;
}

/* ---------- leaders ---------- */
.ladder { list-style: none; padding: 0; margin: 0; max-width: none; position: relative; }
.ladder li { display: grid; grid-template-columns: 2.4rem minmax(0, 1fr); gap: 18px; padding-bottom: 28px; margin: 0; position: relative; }
.ladder li::before { content: ''; position: absolute; left: 1.05rem; top: 2.4rem; bottom: 0; border-left: 3px dotted var(--brand); }
.ladder li:last-child::before { display: none; }
.ladder .node { width: 2.1rem; height: 2.1rem; border-radius: 50%; background: var(--surface); border: 3px solid var(--brand); margin-top: 2px; }
.ladder h3 { margin-bottom: 2px; }
.ladder .when { color: var(--ink2); font-weight: 700; margin-bottom: 6px; }
.ladder .measure { color: var(--ink2); }

/* ---------- skills passport ---------- */
.levels { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.levels > div { padding: 18px 18px 18px 0; }
.levels > div + div { padding-left: 18px; border-left: 1px solid var(--line); }
.levels .ln { font: 800 2.6rem/1 var(--display); font-variation-settings: 'wdth' 118; color: var(--brand); }
.levels b { display: block; margin-top: 8px; }
.levels p { margin: 4px 0 0; color: var(--ink2); font-size: 0.95rem; }
@media (max-width: 760px) { .levels { grid-template-columns: 1fr 1fr; } .levels > div { padding: 16px 12px 16px 0; border-left: 0 !important; border-top: 1px solid var(--line); } .levels > div:nth-child(-n+2) { border-top: 0; } }

.passport-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.progress { min-width: min(100%, 340px); }
.progress .meter { height: 14px; border-radius: 7px; background: var(--surface2); border: 1px solid var(--line); overflow: hidden; margin-top: 6px; }
.progress .meter i { display: block; height: 100%; width: 0; background: var(--brand); transition: width 0.25s ease; }
.skill-row { display: grid; grid-template-columns: 2.4rem minmax(0, 1fr) auto; gap: 8px 18px; align-items: center; padding: 18px 0; border-top: 1px solid var(--line); }
.skill-row:last-child { border-bottom: 1px solid var(--line); }
.skill-row .sn { font: 800 1.6rem/1 var(--display); font-variation-settings: 'wdth' 115; color: var(--ink2); font-variant-numeric: tabular-nums; }
.skill-row h3 { font-size: 1.15rem; font-variation-settings: 'wdth' 106; margin-bottom: 4px; }
.skill-row p { margin: 0; color: var(--ink2); font-size: 0.97rem; }
fieldset.seg { margin: 0; padding: 0; min-width: 0; }
.seg { display: inline-flex; border: 2px solid var(--ink); border-radius: var(--r-ctl); overflow: hidden; }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; cursor: pointer; margin: 0; }
.seg span { display: grid; place-items: center; width: 46px; height: 46px; font-weight: 700; font-variant-numeric: tabular-nums; }
.seg label + label span { border-left: 2px solid var(--ink); }
.seg input:checked + span { background: var(--ink); color: var(--bg); }
.seg input:focus-visible + span { outline: 3px solid var(--link); outline-offset: -5px; }
.seg input:hover + span { background: var(--surface2); }
.seg input:checked:hover + span { background: var(--ink); }
@media (max-width: 640px) { .skill-row { grid-template-columns: 2rem 1fr; } .skill-row .seg { grid-column: 1 / -1; justify-self: start; } }

/* ---------- weeks list ---------- */
.unit-head { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; padding: 36px 0 12px; }
.unit-head h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
.weeklist { list-style: none; padding: 0; margin: 0; max-width: none; border-top: 2px solid var(--ink); }
.weeklist li { margin: 0; border-bottom: 1px solid var(--line); }
.weeklist a {
  display: grid; grid-template-columns: 5rem 8.4rem minmax(0, 1fr) minmax(0, 1fr) minmax(0, 0.8fr); gap: 8px 20px; align-items: baseline;
  padding: 16px 8px 16px 0; color: var(--ink); text-decoration: none;
}
.weeklist a:hover { background: var(--surface); }
.weeklist .dt { color: var(--ink2); font-variant-numeric: tabular-nums; }
.weeklist .pl small, .weeklist .col small { display: block; color: var(--ink2); font-size: 0.85rem; }
.weeklist .col b { font-weight: 700; display: block; }
.weeklist .plate { font-size: 1.05rem; }
@media (max-width: 900px) {
  .weeklist a { grid-template-columns: 4.5rem 1fr; }
  .weeklist .col { grid-column: 2; }
}

/* ---------- week page ---------- */
.week-head { display: flex; align-items: center; gap: clamp(16px, 3vw, 32px); flex-wrap: wrap; }
.week-head h1 { font-size: clamp(2rem, 5vw, 3.6rem); max-width: 18ch; }
.week-meta { display: flex; flex-wrap: wrap; gap: 8px 12px; margin-top: 14px; align-items: center; color: var(--ink2); }
.daycard { border-top: 3px solid var(--ink); padding-top: 20px; }
.daycard h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); margin-bottom: 4px; }
.daycard .sub { color: var(--ink2); margin-bottom: 16px; }
.two-day { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 64px); }
@media (max-width: 960px) { .two-day { grid-template-columns: minmax(0, 1fr); } }
.pertrack { list-style: none; padding: 0; margin: 12px 0 0; max-width: none; }
.pertrack li { display: grid; grid-template-columns: 5.6rem 1fr; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); margin: 0; align-items: baseline; }
.pertrack li:last-child { border-bottom: 1px solid var(--line); }
@media (max-width: 480px) { .pertrack li { grid-template-columns: 1fr; gap: 2px; } }
.station { margin-bottom: 14px; }
.station b { display: block; }
.station span { color: var(--ink2); }
.block-h { font-size: 1.05rem; font-variation-settings: 'wdth' 100; letter-spacing: 0; margin: 26px 0 8px; }
.skillchips { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 0; }
.satcard { margin-top: clamp(32px, 5vw, 56px); padding: 20px 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); display: grid; grid-template-columns: 8rem 1fr; gap: 6px 24px; }
.satcard h2 { font-size: 1.5rem; }
@media (max-width: 640px) { .satcard { grid-template-columns: 1fr; } }
.pager { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 24px; margin-top: clamp(32px, 5vw, 56px); }
.pager a { display: inline-flex; flex-direction: column; text-decoration: none; padding: 10px 0; min-height: 44px; }
.pager small { color: var(--ink2); }
.pager b { font-family: var(--display); font-variation-settings: 'wdth' 110; font-size: 1.1rem; color: var(--link); }
.pager .next { text-align: right; margin-left: auto; }

/* ---------- coaches ---------- */
pre.template {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-ctl); padding: 18px 20px; overflow-x: auto;
  font: 0.9rem/1.65 ui-monospace, 'SF Mono', Menlo, Consolas, monospace; max-width: 100%; color: var(--ink);
}
.checklist { list-style: none; padding: 0; margin: 0; max-width: var(--measure); }
.checklist li { margin: 0; }
.checklist label { display: flex; gap: 14px; padding: 12px 0; border-top: 1px solid var(--line); cursor: pointer; align-items: flex-start; }
.checklist li:last-child label { border-bottom: 1px solid var(--line); }
.checklist input { width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--brand); flex: none; }
.checklist input:checked + span { color: var(--ink2); text-decoration: line-through; text-decoration-thickness: 1px; }
.sources { columns: 2; column-gap: 40px; max-width: none; padding-left: 1.1em; }
.sources li { break-inside: avoid; }
@media (max-width: 720px) { .sources { columns: 1; } }

/* ---------- footer ---------- */
.site-foot { border-top: 1px solid var(--line); padding-block: 36px 56px; margin-top: var(--space); color: var(--ink2); font-size: 0.95rem; }
.site-foot .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 40px; }
.site-foot p { margin: 0 0 6px; }
.site-foot a { color: var(--ink2); }

/* ---------- theme lab (design preview only) ---------- */
.lab-btn {
  position: fixed; right: 16px; bottom: 16px; z-index: 90; min-height: 48px; padding: 0 18px; border-radius: 999px;
  background: var(--pop); color: var(--popInk); border: 2px solid var(--ink); font: 700 1rem var(--text); cursor: pointer;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.28);
}
.lab {
  position: fixed; right: 16px; bottom: 76px; z-index: 90; width: min(360px, calc(100vw - 32px)); max-height: calc(100vh - 100px); overflow: auto;
  background: var(--surface); color: var(--ink); border: 2px solid var(--ink); border-radius: var(--r-card); padding: 18px; box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}
.lab[hidden] { display: none; }
.lab h2 { font-size: 1.25rem; margin-bottom: 4px; }
.lab p { font-size: 0.92rem; color: var(--ink2); margin-bottom: 14px; }
.lab .themes { display: grid; gap: 8px; margin: 0 0 16px; padding: 0; list-style: none; max-width: none; }
.lab .themes li { margin: 0; }
.lab .theme-opt { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: center; width: 100%; text-align: left; padding: 10px; background: var(--bg); color: var(--ink); border: 2px solid var(--line); border-radius: var(--r-ctl); cursor: pointer; font: inherit; }
.lab .theme-opt[aria-pressed='true'] { border-color: var(--pop); box-shadow: 0 0 0 2px var(--pop); }
.lab .sw { display: flex; }
.lab .sw i { width: 20px; height: 34px; display: block; }
.lab .sw i:first-child { border-radius: 6px 0 0 6px; }
.lab .sw i:last-child { border-radius: 0 6px 6px 0; }
.lab .theme-opt b { display: block; }
.lab .theme-opt small { color: var(--ink2); }
.lab label.f { display: block; font-weight: 700; margin-bottom: 6px; }
.lab input[type='date'], .lab input[type='range'] { width: 100%; font: inherit; }
.lab input[type='date'] { min-height: 44px; padding: 0 10px; border: 2px solid var(--ink); border-radius: var(--r-ctl); background: var(--bg); color: var(--ink); }
.lab .row { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.lab .row button { min-height: 40px; padding: 0 12px; border: 2px solid var(--ink); background: transparent; color: var(--ink); border-radius: var(--r-ctl); font: 700 0.9rem var(--text); cursor: pointer; }

@media (max-width: 640px) { .lab-btn { min-height: 44px; padding: 0 14px; font-size: 0.9rem; right: 12px; bottom: 12px; } .lab { bottom: 68px; right: 12px; } }

/* ---------- print ---------- */
/* ---------- new riders ---------- */
.stats { list-style: none; margin: 0 0 28px; padding: 0; max-width: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(10px, 2vw, 20px); }
.stats li { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 16px 18px; }
.stats b { display: block; font-family: var(--display); font-variation-settings: 'wdth' 125; font-stretch: 125%; font-weight: 800; font-size: clamp(1.8rem, 4vw, 2.8rem); line-height: 1.05; color: var(--brand); }
.stats span { color: var(--ink2); font-size: 0.95rem; }
@media (max-width: 640px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.jump { display: flex; flex-wrap: wrap; gap: 8px; }
.jump a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border: 2px solid var(--ink); border-radius: 999px; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 0.92rem; background: var(--bg); }
.jump a:hover { background: var(--surface2); }
.two-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(16px, 3vw, 32px); }
.two-cards > div { border-top: 3px solid var(--brand); padding-top: 14px; }
@media (max-width: 720px) { .two-cards { grid-template-columns: minmax(0, 1fr); } }
.people { list-style: none; padding: 0; margin: 0 0 8px; max-width: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.people li { margin: 0; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); }
.people b { display: block; font-size: 1.1rem; }
.people span { color: var(--ink2); }
@media (max-width: 480px) { .people { grid-template-columns: minmax(0, 1fr); } }
.shops { list-style: none; padding: 0; margin: 0; max-width: none; }
.shops li { margin: 0; padding: 12px 0; border-top: 1px solid var(--line); }
.shops li:last-child { border-bottom: 1px solid var(--line); }
.stamp { display: inline-block; vertical-align: middle; margin-left: 8px; padding: 3px 10px; border: 2px solid var(--pop); background: var(--surface); color: var(--ink); border-radius: 999px; font-family: var(--body); font-size: 0.78rem; font-weight: 700; letter-spacing: 0; font-variation-settings: normal; font-stretch: normal; }
table.costs th.best, table.costs td.best { background: var(--surface2); padding-inline: 14px; }
table.costs tr.total th, table.costs tr.total td { font-weight: 800; font-size: 1.08rem; border-top: 2px solid var(--ink); }
table.costs td { white-space: nowrap; }
table.costs td, table.costs thead th:not(:first-child) { padding-left: 14px; }
.kick { font-weight: 700; margin: 0 0 8px; }
table.costs thead th .sub { display: block; font-weight: 400; color: var(--ink2); }
@media (max-width: 640px) { table.costs { font-size: 0.9rem; } table.costs th, table.costs td { padding-right: 6px; } table.costs td, table.costs thead th:not(:first-child) { padding-left: 8px; } table.costs th.best, table.costs td.best { padding-inline: 8px; } table.costs th[scope=row] { width: 26%; } }
.ttc { list-style: none; padding: 0; margin: 0; max-width: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(14px, 2.4vw, 28px); }
.ttc li { margin: 0; border-top: 6px solid var(--brand); padding-top: 12px; }
.ttc li:nth-child(2) { border-top-color: var(--bell); }
.ttc li:nth-child(3) { border-top-color: var(--habanero); }
.ttc li:nth-child(4) { border-top-color: var(--c1); }
.ttc h3 { margin-bottom: 6px; }
@media (max-width: 860px) { .ttc { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .ttc { grid-template-columns: minmax(0, 1fr); } }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
section[id] { scroll-margin-top: 72px; }

/* ---------- forms ---------- */
@media (max-width: 860px) { .split-form .main { order: -1; } }
.form { display: grid; gap: 18px; max-width: 40rem; }
.form-lead { margin: 0; color: var(--ink2); }
.row2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
@media (max-width: 560px) { .row2 { grid-template-columns: minmax(0, 1fr); } }
.row2[hidden], .field[hidden] { display: none; }
.field label { display: block; font-weight: 700; margin-bottom: 6px; }
.field .req, .field .opt { font-weight: 400; font-size: 0.85rem; color: var(--ink2); margin-left: 6px; }
.field .hint { margin: -2px 0 6px; font-size: 0.9rem; color: var(--ink2); }
.field input, .field select, .field textarea {
  display: block; width: 100%; min-height: 48px; padding: 10px 12px; font: inherit; color: var(--ink);
  background: var(--surface); border: 2px solid var(--ink); border-radius: var(--r-ctl); box-sizing: border-box;
}
.field textarea { resize: vertical; line-height: 1.5; min-height: 9rem; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: 3px solid var(--link); outline-offset: 2px; }
.field.bad input, .field.bad select, .field.bad textarea { border-color: var(--habanero); box-shadow: 0 0 0 1px var(--habanero); }
.field .err { margin: 6px 0 0; color: var(--ink); font-weight: 700; font-size: 0.92rem; padding-left: 12px; border-left: 4px solid var(--habanero); }
.field .count { margin: 4px 0 0; font-size: 0.85rem; color: var(--ink2); text-align: right; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.status-box { border-left: 5px solid var(--pop); background: var(--surface); padding: 16px 20px; border-radius: 0 var(--r-ctl) var(--r-ctl) 0; }
.status-box.ok { border-left-color: var(--bell); }
.status-box.warn { border-left-color: var(--habanero); }
.status-box > :last-child { margin-bottom: 0; }
.composed { width: 100%; box-sizing: border-box; font: inherit; font-size: 0.92rem; padding: 10px 12px; border: 2px solid var(--line); border-radius: var(--r-ctl); background: var(--bg); color: var(--ink); }

/* ---------- announcement banner ---------- */
.banners:empty { display: none; }
.banner { border-bottom: 1px solid var(--line); }
.banner .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 10px; }
.banner p { margin: 0; max-width: none; font-weight: 600; }
.banner a { color: inherit; font-weight: 700; text-underline-offset: 3px; }
.banner.info { background: var(--pop); color: var(--popInk); }
.banner.urgent { background: var(--surface); color: var(--ink); border-bottom: 5px solid var(--habanero); }
.banner.urgent a { color: var(--link); }
.b-label { display: inline-flex; align-items: center; gap: 6px; margin-right: 6px; text-transform: uppercase; letter-spacing: 0.04em; font-size: 0.82rem; font-weight: 800; }
.banner.urgent .b-label { color: var(--ink); }
.b-label svg { color: var(--habanero); flex: none; }
.b-x { flex: none; min-height: 36px; padding: 0 12px; background: transparent; color: inherit; border: 2px solid currentColor; border-radius: 999px; font: 700 0.85rem var(--text); cursor: pointer; }
.b-x:hover { background: rgba(255, 255, 255, 0.35); }
.sample { display: inline-block; vertical-align: 1px; margin-left: 6px; padding: 0 7px; border: 1px dashed currentColor; border-radius: 999px; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }

/* ---------- welcome hero ---------- */
.hero-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(24px, 5vw, 64px); align-items: center; }
@media (max-width: 860px) { .hero-grid { grid-template-columns: minmax(0, 1fr); } }
.hero-welcome h1 { font-size: clamp(2.3rem, 5.2vw, 3.9rem); line-height: 1.02; }
.eyebrow { margin: 0 0 12px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; font-size: 0.85rem; color: var(--ink2); }
.camo-card { position: relative; overflow: hidden; border-radius: var(--r-card); border: 1px solid var(--line); background: var(--land); min-height: 340px; display: grid; }
.camo-card .contours { position: absolute; inset: 0; width: 100%; height: 100%; }
.camo-inner { position: relative; display: grid; place-content: center; justify-items: center; gap: 14px; padding: 28px; text-align: center; }
.peppers { display: flex; gap: clamp(10px, 2vw, 18px); }
.peppers .mk { width: 3.6rem; height: 3.6rem; padding: 10px; box-sizing: content-box; background: var(--surface); border-radius: 50%; border: 2px solid var(--ink); }
.camo-title, .camo-sub { margin: 0; background: var(--surface); padding: 6px 14px; border-radius: 10px; }
.camo-title { font-family: var(--display); font-weight: 800; font-variation-settings: 'wdth' 125; font-stretch: 125%; font-size: 1.4rem; }
.camo-sub { max-width: 22rem; color: var(--ink2); font-size: 0.95rem; }
.ttc.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ttc.three li:nth-child(1) { border-top-color: var(--bell); }
.ttc.three li:nth-child(2) { border-top-color: var(--jalapeno); }
.ttc.three li:nth-child(3) { border-top-color: var(--habanero); }
@media (max-width: 760px) { .ttc.three { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Instagram ---------- */
.igfeed { min-width: 0; }
.igask { max-width: 560px; padding: 20px 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); }
.igask > :last-child { margin-bottom: 0; }
.igposts { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 16px; }
.igposts .instagram-media { min-width: 0 !important; max-width: 100% !important; width: 100% !important; margin: 0 !important; }
.igtiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.igtile { aspect-ratio: 1; border-radius: 10px; background: var(--camo1); border: 1px solid var(--line); position: relative; overflow: hidden; }
.igtile::before, .igtile::after { content: ''; position: absolute; border-radius: 50%; background: var(--camo2); }
.igtile::before { width: 70%; height: 38%; left: -10%; top: 12%; transform: rotate(-18deg); }
.igtile::after { width: 60%; height: 34%; right: -12%; bottom: 10%; transform: rotate(14deg); }
.igtile.t2::before { left: 30%; top: 40%; } .igtile.t3::after { right: 10%; bottom: 30%; } .igtile.t4::before { top: 50%; } .igtile.t5::after { bottom: 40%; } .igtile.t6::before { left: 20%; top: 5%; }

/* ---------- news, events, filters ---------- */
.parents-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(24px, 5vw, 64px); }
@media (max-width: 860px) { .parents-grid { grid-template-columns: minmax(0, 1fr); } }
.feed { min-width: 0; }
.feed .empty { padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 0; }
.newsitem { padding: 16px 0; border-top: 1px solid var(--line); }
.feed > :last-child { border-bottom: 1px solid var(--line); }
.newsitem h4, .event h4 { margin: 6px 0 4px; font-size: 1.1rem; }
.newsitem p { margin: 0; }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; color: var(--ink2); font-size: 0.9rem; margin: 0; }
.tag { display: inline-block; padding: 1px 9px; border: 2px solid var(--ink); border-radius: 999px; background: var(--surface); color: var(--ink); font-size: 0.75rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; }
.tag-alert, .tag-canceled { background: var(--ink); color: var(--bg); }
.tag-race { border-color: var(--brand); }
.tag-deadline { border-style: dashed; }
.alertitem.urgent { border-left: 5px solid var(--habanero); padding-left: 16px; }
.event { display: grid; grid-template-columns: 4.2rem minmax(0, 1fr); gap: 16px; padding: 14px 0; border-top: 1px solid var(--line); align-items: start; }
.event .note { margin: 4px 0 0; color: var(--ink2); }
.event.off h4 { text-decoration: line-through; text-decoration-thickness: 2px; color: var(--ink2); }
.datechip { display: grid; place-items: center; width: 4.2rem; padding: 6px 4px; background: var(--surface); border: 2px solid var(--ink); border-radius: 12px; text-align: center; line-height: 1.05; }
.datechip b { font-family: var(--display); font-variation-settings: 'wdth' 110; font-stretch: 110%; font-size: 1.15rem; }
.datechip span { font-size: 0.72rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; color: var(--ink2); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.chip { min-height: 40px; padding: 0 16px; border: 2px solid var(--ink); border-radius: 999px; background: var(--bg); color: var(--ink); font: 700 0.9rem var(--text); cursor: pointer; }
.chip:hover { background: var(--surface2); }
.chip[aria-pressed='true'] { background: var(--ink); color: var(--bg); }

/* ---------- draft ribbon ---------- */
.draft-ribbon { background: var(--ink); color: var(--bg); font-size: 0.9rem; }
.draft-ribbon .wrap { padding-block: 8px; }
.draft-ribbon p { margin: 0; max-width: none; }
.draft-ribbon a { color: var(--bg); font-weight: 700; text-underline-offset: 3px; margin-left: 8px; }

@media print {
  .draft-ribbon, .site-head, .site-foot, .lab, .lab-btn, .nav-toggle, .btn-row, .skip { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .section, .page-head { padding-block: 12pt; }
  a { color: #000; text-decoration: none; }
  .unit, .track-full, .daycard { break-inside: avoid; }
}

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { animation: none !important; transition: none !important; } }

/* ---------- skills (public page) ---------- */
.skill-info { align-items: start; }
.skill-info p + p { margin-top: 8px; }
.skill-info .check { font-size: 0.93rem; }
.skill-info .tag { margin-top: 4px; white-space: nowrap; }
@media (max-width: 560px) { .skill-info { grid-template-columns: 2.4rem minmax(0, 1fr); } .skill-info .tag { grid-column: 2; justify-self: start; } }
.fbfeed { max-width: 500px; border-radius: var(--r-card); overflow: hidden; background: var(--surface); border: 1px solid var(--line); }
.fbfeed iframe { display: block; max-width: 100%; }
/* Facebook timeline and Instagram side by side on wide screens, stacked on phones. Instagram scrolls inside a box the height of the Facebook feed. */
.socialgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 24px; align-items: start; }
.socialgrid .fbfeed { justify-self: center; width: 100%; }
.socialgrid .igposts { grid-template-columns: minmax(0, 1fr); max-height: 640px; overflow-y: auto; padding-right: 4px; border-radius: var(--r-card); }
.socialgrid .igwidget { min-width: 0; }
