/* ==========================================================================
   REEBOK — design tokens
   Edit these values to adjust the brand without changing individual sections.
   ========================================================================== */
:root {
  --sage: #b5bca3;
  --sand: #c2b29e;
  --taupe: #a58a7e;
  --earth: #715d55;
  --charcoal: #29282a;
  --paper: #f5f3ed;
  --white: #fffdf8;
  --muted: #65635c;
  --line: #d9d6cc;
  --font-display: "Barlow Condensed", Impact, "Arial Narrow", sans-serif;
  --font-body: "DM Sans", Arial, sans-serif;
  --content-width: 1320px;
  --gutter: clamp(1.25rem, 5vw, 5rem);
  --section-space: clamp(4rem, 8vw, 8rem);
  --header-height: 104px;
  --space-1: .5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2rem;
  --space-5: 3rem;
  --space-6: 4rem;
}

/* Dynamic agenda controls use the existing ride-card design. */
.agenda-controls { display: flex; flex-wrap: wrap; align-items: start; gap: 16px; margin-top: 28px; }
.calendar-subscribe { max-width: 100%; }
.calendar-subscribe summary { cursor: pointer; list-style: none; }
.calendar-subscribe summary::-webkit-details-marker { display: none; }
.calendar-subscribe[open] summary .icon { transform: rotate(180deg); }
.calendar-options { display: grid; gap: 14px; padding: 24px; border: 1px solid var(--line); max-width: 520px; background: var(--white); }
.calendar-options a, .ride-gpx { text-decoration: underline; text-underline-offset: 4px; font-weight: 600; }
.calendar-options label, .calendar-options p { font-size: .875rem; }
.calendar-options input { min-width: 0; width: 100%; padding: 10px; border: 1px solid var(--muted); background: var(--paper); color: var(--charcoal); font: inherit; font-size: 1rem; }
.ride-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; margin-top: 18px; }
.ride-gpx { display: inline-block; padding-block: 12px; font-size: .875rem; }
.ride-disclosure summary { cursor: pointer; }
.ride-disclosure p, #ride-dialog-description { white-space: pre-line; }
.ride-disclosure p { margin-top: 16px; }
.ride-card h3, .ride-summary, .ride-meta dd, .ride-disclosure p, #ride-dialog-description { overflow-wrap: anywhere; }

/* Base and accessible defaults */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-offset, var(--header-height)); }
body {
  margin: 0;
  background: var(--paper);
  color: var(--charcoal);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
body:has(dialog[open]) { overflow: hidden; }
:where(h1, h2, h3, p, figure, ul, dl) { margin: 0; }
:where(h1, h2, h3) {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -.025em;
  line-height: 1;
  text-wrap: balance;
  overflow-wrap: anywhere;
}
h2 { font-size: clamp(3rem, 5.2vw, 5rem); }
h3 { font-size: clamp(2rem, 2.6vw, 2.625rem); }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
button { cursor: pointer; }
a, button, summary { touch-action: manipulation; -webkit-tap-highlight-color: #b5bca340; }
img { display: block; max-width: 100%; height: auto; }
svg { display: block; flex-shrink: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--earth); outline-offset: 5px; }
.hero :focus-visible, .contact :focus-visible { outline-color: var(--sage); }
::selection { background: var(--sage); color: var(--charcoal); }
[id] { scroll-margin-top: 24px; }
.container { width: min(var(--content-width), calc(100% - var(--gutter) * 2)); margin-inline: auto; }
.section { padding-block: var(--section-space); }
.icon { width: 22px; height: 22px; }
.icon-definitions { position: absolute; width: 0; height: 0; overflow: hidden; }
.muted { color: var(--muted); }
.prose { color: var(--muted); max-width: 46ch; text-wrap: pretty; }
.prose p + p { margin-top: var(--space-2); }
.section-label { font-size: .875rem; font-weight: 600; margin-bottom: var(--space-3); }
.square-marker { display: inline-block; flex: 0 0 9px; width: 9px; height: 9px; background: currentColor; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}
.skip-link {
  position: fixed; left: var(--space-2); top: 0; z-index: 100;
  padding: 12px 20px; background: var(--charcoal); color: var(--white);
  transform: translateY(-150%);
}
.skip-link:focus { transform: translateY(12px); }

/* Shared controls */
.button {
  display: inline-flex; align-items: center; justify-content: space-between;
  gap: var(--space-4); min-height: 56px; padding: 14px 24px;
  border: 1px solid transparent; border-radius: 0;
  font-size: .875rem; font-weight: 600; line-height: 1.4;
  transition: background-color 160ms, color 160ms, border-color 160ms;
}
.button-dark { background: var(--charcoal); color: var(--white); }
.button-sage { background: var(--sage); color: var(--charcoal); }
.button-outline { background: transparent; color: inherit; border-color: currentColor; }
.inline-link {
  display: inline-flex; align-items: center; gap: 12px; min-height: 44px; max-width: 100%; overflow-wrap: anywhere;
  border: 0; border-radius: 0; background: transparent; padding: 0;
  font-weight: 500; text-align: left; text-underline-offset: 5px;
}
.inline-link .icon { width: 18px; height: 18px; }

/* Header and navigation */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: var(--paper); border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 28px; min-height: var(--header-height); }
.brand { display: inline-flex; align-items: center; gap: 16px; flex-shrink: 0; }
.brand-mark { width: 86px; height: 78px; object-fit: contain; }
.brand-name { font-family: var(--font-display); font-size: 2.5rem; font-weight: 800; font-style: italic; line-height: 1; }
.brand-name > span { display: block; margin-top: 7px; font-family: var(--font-body); font-size: .625rem; font-weight: 500; font-style: normal; letter-spacing: .04em; }
.site-nav { display: flex; align-items: center; gap: clamp(20px, 2.5vw, 38px); }
.site-nav > a:not(.button) { display: inline-flex; align-items: center; min-height: 44px; font-size: .875rem; text-underline-offset: 7px; }
.site-nav [aria-current] { text-decoration: underline; text-decoration-thickness: 2px; }
.nav-cta { margin-left: 8px; }
.menu-toggle { display: none; }

/* Hero: the photograph and stepped pixel edge are the primary visual gesture. */
.hero {
  position: relative; isolation: isolate; display: flex; align-items: center;
  min-height: 740px; margin: 20px 20px 0; overflow: clip;
  background: #384432; color: var(--white);
}
.hero-media { position: absolute; inset: 0; z-index: -2; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: 67% 52%; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, #161e17d9 0%, #161e1785 43%, #161e1708 77%);
}
.hero-content { padding-block: 64px 120px; }
.hero-category { display: flex; align-items: center; gap: 12px; margin-bottom: 26px; font-size: .875rem; font-weight: 500; }
.hero-category .square-marker { color: var(--sage); }
.hero h1 { font-size: clamp(5rem, 7.8vw, 7.75rem); line-height: .94; max-width: 850px; text-wrap: initial; }
.hero h1 > span { display: block; }
.hero-description { max-width: 42ch; margin-top: 28px; color: #f5f3ede0; text-wrap: pretty; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.hero .button-outline { border-color: #fffdf87d; }
.pixel-cluster { display: grid; grid-template-columns: repeat(3, var(--pixel-size)); grid-template-rows: repeat(2, var(--pixel-size)); }
.pixel-cluster i { display: block; }
.pixel-cluster i:nth-child(1) { grid-column: 1; background: var(--sage); }
.pixel-cluster i:nth-child(2) { grid-column: 1; grid-row: 2; background: var(--paper); }
.pixel-cluster i:nth-child(3) { grid-column: 2; grid-row: 2; background: var(--taupe); }
.pixel-cluster i:nth-child(4) { grid-column: 3; grid-row: 2; background: var(--sand); }
.pixel-cluster i:nth-child(5) { grid-column: 3; grid-row: 1; background: transparent; }
.hero-pixels { --pixel-size: 64px; position: absolute; bottom: 0; left: 0; }
.club-values { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-block: 30px; border-bottom: 1px solid var(--line); }
.club-values p { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.25rem, 2.2vw, 2rem); line-height: 1.2; }
.club-values .square-marker { color: var(--taupe); }

/* Club identity */
.club-grid { display: grid; grid-template-columns: .88fr 1.12fr; gap: clamp(48px, 7.5vw, 110px); align-items: center; }
.club-art { position: relative; display: grid; place-items: center; min-height: 470px; background: var(--sage); }
.club-art img { position: relative; width: 78%; max-height: 360px; object-fit: contain; }
.art-tile { position: absolute; width: 85px; height: 85px; }
.art-tile-sand { top: 0; right: 0; background: var(--paper); }
.art-tile-taupe { bottom: 0; left: 0; background: var(--taupe); }
.club-copy .prose { margin-top: 28px; }
.club-strava { margin-top: 20px; min-height: 48px; max-width: 100%; padding: 10px 16px; gap: 14px; border-color: var(--charcoal); background: transparent; overflow-wrap: anywhere; }
.club-strava .icon { width: 18px; height: 18px; }
.club-disciplines { display: flex; flex-wrap: wrap; gap: 24px; list-style: none; padding: 28px 0 0; margin-top: 32px; border-top: 1px solid var(--line); }
.club-disciplines li { display: flex; align-items: center; gap: 8px; font-size: .8125rem; font-weight: 500; }
.club-disciplines svg { width: 30px; height: 30px; color: var(--earth); }

/* Club photographs: a native filmstrip with manual navigation. */
.gallery { padding-top: 0; }
.gallery-heading { display: flex; align-items: end; justify-content: space-between; flex-wrap: wrap; gap: 24px; margin-bottom: 32px; }
.gallery-heading h2 { max-width: 12ch; }
.gallery-controls { display: flex; align-items: center; gap: 10px; }
.gallery-count { margin-right: 12px; color: var(--muted); font-size: .8125rem; font-variant-numeric: tabular-nums; }
.gallery-button { display: grid; place-items: center; width: 48px; min-height: 48px; padding: 8px; border: 1px solid var(--charcoal); border-radius: 0; background: transparent; font-size: 1.5rem; line-height: 1; }
.gallery-button[aria-disabled="true"] { opacity: .4; cursor: default; }
.gallery-track { display: flex; gap: 20px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: thin; scrollbar-color: var(--taupe) var(--line); padding-bottom: 18px; }
.gallery-slide { flex: 0 0 84%; min-width: 0; scroll-snap-align: start; }
.gallery-image { display: grid; place-items: center; aspect-ratio: 16 / 10; background: #e4e5dc; overflow: hidden; }
.gallery-image img { width: 100%; height: 100%; min-height: 0; object-fit: contain; }
.gallery-slide figcaption { padding-top: 14px; font-size: .875rem; color: var(--muted); }

/* Rides: shared cards rendered from scripts/rides.js. */
.rides { padding-top: 32px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 40px; margin-bottom: 42px; }
.section-heading-aside { padding-bottom: 3px; }
.section-heading-aside > p:first-child { font-size: 1rem; font-weight: 600; }
.section-heading-aside > p + p { font-size: .8125rem; margin-top: 3px; }
.rides-copy { max-width: 70ch; margin-bottom: 36px; }
.ride-location { text-decoration: underline; text-underline-offset: 4px; }
.ride-filters { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 24px; }
.ride-filters button { min-height: 44px; padding: 10px 16px; border: 1px solid var(--line); border-radius: 0; background: transparent; font-size: .8125rem; }
.ride-filters [aria-pressed="true"] { background: var(--charcoal); border-color: var(--charcoal); color: var(--white); }
.ride-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.rides-fallback { grid-column: 1 / -1; }
.ride-card { display: flex; flex-direction: column; min-width: 0; border: 1px solid var(--line); background: var(--white); }
.ride-card-top { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 24px 28px; background: var(--ride-color, var(--sage)); }
.ride-kind { display: inline-flex; align-items: center; gap: 8px; font-size: .8125rem; font-weight: 500; }
.ride-kind .square-marker { width: 7px; height: 7px; flex-basis: 7px; }
.ride-season { padding-block: 10px; font-size: .75rem; }
.ride-card-body { display: flex; flex-direction: column; flex: 1; padding: 30px 28px 0; }
.ride-card h3 { min-height: 2em; }
.ride-summary { margin-top: 16px; font-size: .875rem; color: var(--muted); }
.ride-meta { display: grid; gap: 8px; padding-block: 24px; margin-top: auto; }
.ride-meta > div { display: flex; justify-content: space-between; gap: 12px; font-size: .8125rem; }
.ride-meta dt { color: var(--muted); }
.ride-meta dd { margin: 0; text-align: right; }
.ride-details { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 62px; padding: 16px 0; border: 0; border-top: 1px solid var(--line); background: none; font-size: .875rem; font-weight: 600; }
.ride-details .icon { transition: transform 160ms; }
.ride-empty { grid-column: 1 / -1; display: flex; align-items: center; gap: 32px; padding: clamp(28px, 4vw, 48px); border: 1px solid var(--line); background: var(--white); }
.ride-empty-mark { display: grid; place-items: center; flex: 0 0 auto; width: 88px; height: 88px; background: var(--sage); }
.ride-empty-mark .icon { width: 40px; height: 40px; }
.ride-empty-copy { min-width: 0; }
.ride-empty h3 { font-size: clamp(2rem, 3vw, 2.75rem); }
.ride-empty p { max-width: 64ch; margin-top: 12px; color: var(--muted); font-size: .9375rem; }
.ride-invitation { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; margin-top: 28px; color: var(--muted); font-size: .875rem; }
.ride-invitation a { color: var(--charcoal); }
.archive-link { margin-top: 24px; color: var(--muted); font-size: .875rem; }
.archive-link a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: underline; text-underline-offset: 4px; }
.archive { min-height: 65vh; }
.archive h1 { font-size: clamp(2.5rem, 7vw, 6rem); }
.archive-intro { max-width: 52ch; margin-top: 20px; color: var(--muted); }
.archive .section-heading { flex-wrap: wrap; gap: 24px; }
.archive .ride-filters { margin-top: 0; }
.archive-header { flex-wrap: wrap; gap: 8px 24px; padding-block: 12px; }
.archive-return { min-height: 44px; }

/* Club kit: the black image background is part of the supplied asset. */
.kit { background: #e9e9df; }
.kit-grid { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: clamp(48px, 8vw, 120px); }
.kit-copy .prose { margin-top: 26px; }
.color-swatches { display: flex; gap: 8px; padding: 0; list-style: none; margin-block: 30px; }
.color-swatches li { width: 44px; height: 44px; }
.swatch-sage { background: var(--sage); }
.swatch-sand { background: var(--sand); }
.swatch-taupe { background: var(--taupe); }
.swatch-earth { background: var(--earth); }
.swatch-charcoal { background: var(--charcoal); }
.kit-visual { position: relative; display: grid; place-items: center; height: 590px; background: #000; overflow: hidden; }
.kit-views { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: center; gap: 12px; width: 94%; }
.kit-view { min-width: 0; }
.kit-view img { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: contain; }
.kit-visual > figcaption { position: absolute; top: 22px; left: 24px; font-size: .75rem; color: #ddd7c9; }
.kit-pixels { position: absolute; bottom: 0; right: 0; display: grid; grid-template-columns: repeat(2, 56px); grid-template-rows: repeat(2, 56px); }
.kit-pixels i:nth-child(1) { grid-column: 2; background: var(--sage); }
.kit-pixels i:nth-child(2) { background: var(--taupe); }
.kit-pixels i:nth-child(3) { background: var(--sand); }

/* Sponsors: preserve the supplied logos and give each a legible surface. */
.sponsors-heading { display: flex; align-items: center; justify-content: space-between; gap: 32px; margin-bottom: 40px; }
.sponsors-heading .prose { margin-top: 22px; }
.sponsor-pixels { display: flex; align-self: start; padding-top: 8px; }
.sponsor-pixels i { width: clamp(32px, 4vw, 56px); aspect-ratio: 1; background: var(--sage); }
.sponsor-pixels i:nth-child(2) { background: var(--sand); }
.sponsor-pixels i:nth-child(3) { background: var(--taupe); }
.sponsor-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; padding: 0; list-style: none; }
.sponsor-grid > li { min-width: 0; }
.sponsor-card { display: flex; flex-direction: column; height: 100%; padding: 28px; border: 1px solid var(--line); background: var(--white); transition: border-color 160ms; }
.sponsor-card-dark { background: var(--charcoal); border-color: var(--charcoal); color: var(--paper); }
.sponsor-logo { display: grid; place-items: center; height: 160px; }
.sponsor-logo img { width: 100%; max-width: 285px; height: 116px; object-fit: contain; }
.sponsor-caption { overflow-wrap: anywhere; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); font-size: .8125rem; font-weight: 500; }
.sponsor-card-dark .sponsor-caption { border-color: #fffdf833; }
.sponsor-caption .icon { width: 18px; height: 18px; }

/* Contact */
.contact { background: var(--charcoal); color: var(--paper); }
.contact-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 60px; }
.contact-grid > * { min-width: 0; }
.contact h2 { font-size: clamp(5rem, 9vw, 9rem); line-height: .92; }
.contact-copy > p:not(.section-label) { max-width: 43ch; margin-top: 28px; color: #d1cec3; }
.contact-copy .button { margin-top: 30px; }
.contact-aside { display: flex; flex-direction: column; align-items: end; justify-content: space-between; gap: 40px; }
.meeting-point { width: 100%; min-width: 0; background: var(--paper); color: var(--charcoal); }
.meeting-point-copy { padding: 28px; }
.meeting-point-copy > p { margin-bottom: 12px; font-size: .8125rem; color: var(--muted); }
.meeting-point h3 { font-size: clamp(2.5rem, 4vw, 3.5rem); }
.meeting-point address { margin-block: 18px 8px; font-style: normal; overflow-wrap: anywhere; }
.meeting-point .inline-link { font-size: .875rem; }
.meeting-point :focus-visible { outline-color: var(--earth); }
.meeting-point-map { display: block; width: 100%; height: 280px; border: 0; background: var(--sage); }

/* Footer */
.footer-main { display: flex; justify-content: space-between; align-items: center; gap: 32px; padding-block: 36px; }
.footer-main .brand-mark { width: 68px; height: 65px; }
.footer-main .brand-name { font-size: 2rem; }
.back-to-top { display: inline-flex; align-items: center; min-height: 44px; gap: 24px; font-size: .8125rem; }
.back-to-top span { font-size: 1.5rem; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding-block: 16px; border-top: 1px solid var(--line); font-size: .75rem; color: var(--muted); }
.footer-bottom nav { display: flex; flex-wrap: wrap; gap: 20px; }
.footer-bottom nav a { display: inline-flex; align-items: center; min-height: 44px; }

/* Public policy pages work without JavaScript or third-party requests. */
html:has(.policy-page) { scroll-padding-top: 0; }
.policy-page .site-header { position: static; }
.policy-page .header-inner { flex-wrap: wrap; padding-block: 16px; }
.policy-back { display: inline-flex; align-items: center; gap: 12px; min-height: 44px; font-size: .875rem; text-decoration: underline; text-underline-offset: 4px; }
.policy-main { padding-block: clamp(40px, 6vw, 76px); }
.policy-intro { padding-bottom: 36px; border-bottom: 1px solid var(--line); }
.policy-intro h1 { font-size: clamp(3rem, 7vw, 5.5rem); }
.policy-lead { margin-top: 24px; max-width: 60ch; color: var(--muted); }
.policy-date { margin-top: 16px; font-size: .8125rem; color: var(--muted); }
.policy-layout { display: grid; grid-template-columns: minmax(180px, 230px) minmax(0, 70ch); align-items: start; gap: clamp(32px, 6vw, 80px); margin-top: 36px; }
.policy-nav { display: grid; gap: 4px; padding: 20px; border: 1px solid var(--line); background: var(--white); }
.policy-nav p { margin-bottom: 8px; font-size: .875rem; font-weight: 700; }
.policy-nav a { display: flex; align-items: center; min-height: 44px; padding-block: 6px; font-size: .875rem; overflow-wrap: anywhere; text-decoration: underline; text-underline-offset: 4px; }
.policy-copy { min-width: 0; overflow-wrap: anywhere; }
.policy-copy section + section { margin-top: 40px; }
.policy-copy h2 { margin-bottom: 18px; font-size: clamp(1.75rem, 3vw, 2.25rem); line-height: 1.15; }
.policy-copy p + p, .policy-copy p + ul, .policy-copy ul + p { margin-top: 16px; }
.policy-copy ul { padding-left: 24px; }
.policy-copy li + li { margin-top: 12px; }
.policy-copy a { text-decoration: underline; text-underline-offset: 4px; }
.policy-copy code { font-size: .9em; }
.policy-data > div + div { margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--line); }
.policy-data dt { font-weight: 700; margin-bottom: 8px; }
.policy-data dd { margin: 0; }
.policy-footer { padding-bottom: 28px; }
@media (max-width: 900px) {
  .policy-layout { grid-template-columns: 1fr; }
  .policy-copy { max-width: 70ch; }
  .policy-footer { flex-wrap: wrap; }
}

/* Dialogs */
.dialog:not([open]) { display: none; }
.dialog { width: min(580px, calc(100% - 32px)); max-height: calc(100svh - 40px); padding: clamp(28px, 4vw, 48px); border: 0; border-radius: 0; background: var(--paper); color: var(--charcoal); overscroll-behavior: contain; }
.dialog::backdrop { background: #161815bf; backdrop-filter: blur(5px); }
.dialog-close { position: absolute; top: 10px; right: 10px; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 0; background: transparent; }
.dialog .section-label { margin-top: 8px; color: var(--earth); padding-right: 28px; }
.dialog h2 { font-size: clamp(2.75rem, 5vw, 3.5rem); margin-bottom: 22px; }
.dialog > p:not(.section-label) { margin-top: 20px; }
.dialog > .button { margin-top: 24px; }
.ride-sharing { margin-top: 16px; }
.share-status { font-size: .8125rem; color: var(--muted); }
.ride-sharing label { display: block; margin-top: 12px; font-size: .8125rem; }
.ride-sharing input { display: block; width: 100%; margin-block: 8px; min-height: 44px; padding: 10px; border: 1px solid var(--line); background: var(--white); font: inherit; font-size: 1rem; }
.shared-ride { padding-block: 40px; }
.shared-ride h2 { font-size: clamp(2.5rem, 6vw, 4rem); overflow-wrap: anywhere; }
.shared-ride p { max-width: 65ch; margin-bottom: 16px; }
.shared-ride a { margin-right: 24px; }
.notice { padding: 16px; background: #e5e2d7; color: #514c45; font-size: .8125rem; }
.notice a { text-decoration: underline; }
.dialog-details { margin-block: 24px; }
.dialog-details > div { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; padding-block: 10px; border-bottom: 1px solid var(--line); font-size: .875rem; }
.dialog-details dt { color: var(--muted); }
.dialog-details dd { margin: 0; text-align: right; }

/* GPX preview: loaded only for an opened ride with a route. */
.dialog-with-route { width: min(760px, calc(100% - 32px)); }
.ride-route { margin-block: 28px 12px; border: 1px solid var(--line); background: var(--white); }
.route-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 16px; padding: 10px 16px; }
.route-heading h3 { font-size: 1.75rem; }
.route-reset { min-height: 44px; padding: 8px 0; border: 0; background: none; font-size: .75rem; font-weight: 600; text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }
.route-map { height: clamp(240px, 36vw, 340px); background: #e5e8dc; isolation: isolate; }
.ride-route .route-map { font-family: var(--font-body); }
.route-status { padding: 0 16px 16px; font-size: .8125rem; color: var(--muted); }
.route-status:empty { display: none; }
.ride-route > .route-reset { margin: 0 16px 12px; }
.route-legend { display: flex; flex-wrap: wrap; gap: 8px 20px; padding: 12px 16px; color: var(--muted); font-size: .75rem; }
.route-legend span { display: inline-flex; align-items: center; gap: 8px; }
.route-legend span::before { content: ''; width: 9px; height: 9px; border: 1px solid var(--white); border-radius: 50%; background: #40533c; }
.route-legend .route-end-key::before { background: var(--earth); }
.ride-route .route-map .leaflet-bar { border: 1px solid var(--line); border-radius: 0; box-shadow: none; }
.ride-route .route-map .leaflet-bar a { width: 44px; height: 44px; line-height: 44px; background: var(--white); color: var(--charcoal); border-radius: 0; }
.ride-route .route-map .leaflet-bar a:is(:first-child, :last-child) { border-radius: 0; }
.ride-route .leaflet-control-attribution { max-width: 100%; background: #fffdf8ed; font-size: 10px; }
.ride-route .leaflet-control-attribution a { color: #40533c; text-decoration: underline; }
.ride-route .leaflet-container a:focus-visible, .route-map:focus-visible { outline: 3px solid var(--charcoal); outline-offset: -3px; }
.route-elevation { border-top: 1px solid var(--line); padding: 16px; }
.route-elevation h4 { margin: 0; font-family: var(--font-display); font-size: 1.5rem; line-height: 1.1; }
.elevation-summary { font-size: .875rem; margin-top: 4px; }
.route-elevation svg { display: block; width: 100%; max-width: 640px; height: auto; margin-top: 12px; overflow: visible; }
.route-elevation svg text { fill: var(--muted); font: 15px var(--font-body); }
.elevation-grid { fill: none; stroke: var(--line); }
.elevation-fill { fill: var(--sage); opacity: .5; }
.elevation-line { fill: none; stroke: #40533c; stroke-width: 2; vector-effect: non-scaling-stroke; }
.elevation-note { font-size: .75rem; color: var(--muted); margin-top: 8px; }
.dialog-route-expanded { position: fixed; inset: 0; margin: 0; width: 100%; max-width: none; height: 100dvh; max-height: none; padding: max(8px, env(safe-area-inset-top)) max(8px, env(safe-area-inset-right)) max(8px, env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left)); }
.dialog-route-expanded > :not(.ride-route) { display: none; }
.dialog-route-expanded .ride-route { display: flex; flex-direction: column; height: 100%; margin: 0; overflow: auto; }
.dialog-route-expanded .route-map { flex: 1 0 40dvh; min-height: 180px; height: auto; }
.dialog-route-expanded .route-elevation svg { max-width: 480px; }
@media (max-height: 500px) {
  .dialog-route-expanded .route-map { flex-basis: calc(100dvh - 90px); min-height: 240px; }
}
@media (max-width: 500px) {
  .route-heading { gap: 0 14px; padding: 8px 12px; }
  .route-heading h3 { flex-basis: 100%; }
  .route-elevation { padding: 12px; }
}

/* Standalone 404: shared brand styles, no JavaScript dependency. */
.error-page { display: flex; flex-direction: column; min-height: 100svh; }
.error-main { display: grid; grid-template-columns: 1.1fr 1fr; align-items: center; gap: clamp(40px, 7vw, 100px); flex: 1; padding-block: var(--section-space); }
.error-copy h1 { font-size: clamp(4.5rem, 8vw, 8rem); line-height: .94; }
.error-copy .prose { max-width: 38ch; margin-top: 28px; }
.error-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 16px 28px; margin-top: 32px; }
.error-art { position: relative; display: grid; place-items: center; min-height: 400px; background: var(--sage); }
.error-art img { width: 78%; max-height: 320px; object-fit: contain; }
.error-pixels { --pixel-size: 48px; position: absolute; right: 0; bottom: 0; }
.error-footer { padding-block: 24px; border-top: 1px solid var(--line); color: var(--muted); font-size: .8125rem; }

/* Pointer feedback, without gratuitous card or scroll motion. */
@media (hover: hover) {
  .button-dark:hover { background: var(--earth); }
  .club-strava:hover { background: var(--sage); }
  .button-sage:hover { background: var(--sand); }
  .button-outline:hover { background: var(--charcoal); color: var(--white); border-color: var(--charcoal); }
  .hero .button-outline:hover { background: var(--white); color: var(--charcoal); border-color: var(--white); }
  .inline-link:hover, .site-nav > a:not(.button):hover, .footer-bottom a:hover, .back-to-top:hover { text-decoration: underline; }
  .ride-filters button:hover:not([aria-pressed="true"]) { border-color: var(--charcoal); }
  .ride-details:hover .icon { transform: translate(3px, -3px); }
  .sponsor-card:hover { border-color: var(--earth); }
  .sponsor-card:hover .sponsor-caption { text-decoration: underline; text-underline-offset: 5px; }
  .dialog-close:hover { background: #e5e2d7; }
  .gallery-button:not([aria-disabled="true"]):hover { background: var(--charcoal); color: var(--paper); }
}

/* Tablet */
@media (max-width: 1100px) {
  :root { --gutter: 32px; --header-height: 92px; }
  .brand-mark { width: 70px; height: 66px; }
  .brand-name { font-size: 2.25rem; }
  .site-nav { gap: 20px; }
  .nav-cta { padding-inline: 18px; gap: 18px; }
  .hero { min-height: 680px; }
  .hero-content { padding-block: 60px 110px; }
  .hero h1 { font-size: clamp(5rem, 9vw, 6.5rem); }
  .hero-media img { object-position: 72% center; }
  .club-grid, .kit-grid { gap: 48px; }
  .club-art { min-height: 390px; }
  .club-disciplines { gap: 16px; }
  .club-disciplines li { font-size: .75rem; }
  .ride-card-top, .ride-card-body { padding-inline: 22px; }
  .ride-kind { font-size: .75rem; }
  .ride-card-top { flex-wrap: wrap; }
  .kit-visual { height: 500px; }
  .sponsor-card { padding: 22px; }
}

/* Collapsible navigation and intermediate layouts */
@media (max-width: 900px) {
  .site-header { position: static; }
  .js .site-header { position: sticky; }
  .header-inner { flex-wrap: wrap; }
  .site-nav { width: 100%; flex-wrap: wrap; padding-bottom: 20px; }
  .js .header-inner { flex-wrap: wrap; padding-block: 12px; }
  .brand { min-width: 0; max-width: 100%; flex-shrink: 1; }
  .brand-mark { flex-shrink: 0; }
  .brand-name { min-width: 0; overflow-wrap: anywhere; }
  .js .menu-toggle { display: inline-flex; align-items: center; gap: 14px; min-height: 48px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 0; background: transparent; font-size: .875rem; }
  .menu-icon { position: relative; width: 20px; height: 12px; border-block: 1.5px solid currentColor; }
  .menu-icon::after { content: ""; position: absolute; top: 4px; left: 0; width: 20px; border-top: 1.5px solid currentColor; }
  .menu-toggle[aria-expanded="true"] .menu-icon { height: 0; border-bottom: 0; transform: rotate(45deg); }
  .menu-toggle[aria-expanded="true"] .menu-icon::after { top: -1.5px; transform: rotate(90deg); }
  .js .site-nav { display: none; position: absolute; top: 100%; left: 0; width: 100%; max-height: calc(100dvh - var(--header-offset, var(--header-height))); overflow-y: auto; overscroll-behavior: contain; padding: 18px var(--gutter) 26px; background: var(--paper); border-bottom: 1px solid var(--line); box-shadow: 0 16px 20px #29282a14; }
  .js .site-nav.is-open { display: flex; flex-direction: column; align-items: stretch; gap: 3px; }
  .site-nav > a:not(.button) { font-size: 1rem; }
  .nav-cta { margin: 10px 0 0; }
  .section-heading { display: block; }
  .section-heading-aside { margin-top: 28px; }
  .ride-grid { gap: 14px; }
  .ride-card-top, .ride-card-body { padding-inline: 18px; }
  .ride-card h3 { font-size: 2rem; }
  .ride-meta > div { flex-wrap: wrap; gap: 0 12px; }
  .kit-visual { height: 440px; }
  .contact-grid { gap: 30px; }
}

/* Mobile: copy and photograph become separate full-width blocks. */
@media (max-width: 700px) {
  :root { --gutter: 22px; --header-height: 84px; }
  h2 { font-size: clamp(2.875rem, 9.5vw, 4rem); }
  .header-inner { gap: 12px; }
  .brand { gap: 10px; }
  .brand-mark { width: 64px; height: 60px; }
  .brand-name { font-size: 2.125rem; }
  .brand-name > span { font-size: .5625rem; }
  .js .menu-toggle { padding-inline: 12px; gap: 10px; }
  .hero { display: flex; flex-direction: column; align-items: stretch; min-height: 0; margin: 0; background: var(--paper); color: var(--charcoal); overflow: clip; }
  .hero::before { content: none; }
  .hero-content { order: 0; padding-block: 36px 32px; }
  .hero-category { font-size: .8125rem; margin-bottom: 22px; }
  .hero-category .square-marker { color: var(--earth); }
  .hero h1 { font-size: clamp(3.5rem, 13vw, 5.5rem); line-height: .96; }
  .hero-description { margin-top: 22px; color: var(--muted); font-size: .9375rem; }
  .hero-actions { gap: 10px; margin-top: 24px; }
  .hero-actions .button { padding-inline: 18px; gap: 14px; font-size: .8125rem; }
  .hero .button-outline { border-color: var(--charcoal); }
  .hero :focus-visible { outline-color: var(--earth); }
  .hero-media { position: relative; inset: auto; order: 1; z-index: 0; display: block; height: 350px; }
  .hero-media img { object-position: 70% center; }
  .hero-pixels { --pixel-size: 44px; z-index: 1; }
  .club-values { justify-content: space-between; gap: 10px; padding-block: 24px; }
  .club-values p { min-width: 0; overflow-wrap: anywhere; font-size: clamp(1rem, 4.4vw, 1.5rem); max-width: 10ch; }
  .club-values .square-marker { width: 5px; height: 5px; flex-basis: 5px; }
  .club-grid { display: flex; flex-direction: column-reverse; gap: 36px; align-items: stretch; }
  .club-copy .prose { margin-top: 24px; }
  .club-art { min-height: 360px; }
  .club-art img { width: 78%; max-height: 300px; }
  .art-tile { width: 66px; height: 66px; }
  .club-disciplines { gap: 12px; justify-content: space-between; margin-top: 26px; padding-top: 22px; }
  .club-disciplines li { flex-direction: column; align-items: start; gap: 6px; font-size: .75rem; }
  .club-disciplines svg { width: 26px; height: 26px; }
  .gallery-heading { align-items: start; gap: 20px; margin-bottom: 24px; }
  .gallery-heading h2 { max-width: none; }
  .gallery-controls { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; max-width: 100%; }
  .gallery-count { min-width: 0; overflow-wrap: anywhere; }
  .gallery-track { gap: 12px; }
  .gallery-slide { flex-basis: 88%; }
  .gallery-image { aspect-ratio: 4 / 5; }
  .gallery-slide figcaption { font-size: .8125rem; }
  .rides { padding-top: 12px; }
  .section-heading { margin-bottom: 28px; }
  .section-heading-aside { margin-top: 24px; }
  .ride-filters { margin-top: 20px; gap: 6px; }
  .ride-filters button { padding-inline: 12px; font-size: .75rem; }
  .ride-grid { grid-template-columns: 1fr; gap: 20px; }
  .ride-card-top { flex-wrap: wrap; padding: 22px 24px; }
  .ride-kind { font-size: .8125rem; }
  .ride-card-body { padding: 26px 24px 0; }
  .ride-card h3 { min-height: 0; font-size: 2.375rem; }
  .ride-meta > div { flex-wrap: wrap; }
  .ride-empty { flex-direction: column; align-items: start; gap: 24px; padding: 28px 24px; }
  .ride-empty-mark { width: 64px; height: 64px; }
  .ride-empty-mark .icon { width: 32px; height: 32px; }
  .ride-invitation { display: block; margin-top: 24px; }
  .ride-invitation a { display: flex; gap: 8px; font-size: .8125rem; }
  .kit-grid { grid-template-columns: 1fr; gap: 36px; }
  .kit-visual { height: 480px; }
  .kit-visual > figcaption { font-size: .6875rem; }
  .color-swatches li { width: 40px; height: 40px; }
  .sponsors-heading { align-items: start; gap: 20px; margin-bottom: 28px; }
  .sponsor-pixels { flex-direction: column; }
  .sponsor-pixels i { width: 24px; }
  .sponsor-grid { grid-template-columns: 1fr; gap: 16px; }
  .sponsor-card { padding: 24px; }
  .sponsor-logo { height: 140px; }
  .sponsor-caption { margin-top: 12px; }
  .contact-grid { grid-template-columns: 1fr; gap: 44px; }
  .contact h2 { font-size: clamp(4.5rem, 17vw, 7rem); }
  .contact-copy > p:not(.section-label) { font-size: .9375rem; }
  .contact-aside { align-items: stretch; gap: 32px; }
  .meeting-point-copy { padding: 24px; }
  .meeting-point-map { height: 250px; }
  .footer-main { flex-wrap: wrap; gap: 14px; padding-block: 28px; }
  .footer-main .brand { gap: 8px; }
  .footer-main .brand-mark { width: 48px; height: 48px; }
  .footer-main .brand-name { font-size: 1.75rem; }
  .footer-main .brand-name > span { font-size: .5rem; }
  .back-to-top { font-size: .75rem; gap: 10px; }
  .footer-bottom { display: block; padding-block: 20px; }
  .footer-bottom nav { gap: 22px; margin-top: 10px; }
  .dialog h2 { font-size: 2.75rem; }
  .dialog .button { gap: 16px; padding-inline: 18px; font-size: .8125rem; }
  .error-main { grid-template-columns: 1fr; gap: 40px; }
  .error-copy h1 { font-size: clamp(4.5rem, 17vw, 6rem); }
  .error-art { min-height: 280px; }
  .error-art img { max-height: 230px; }
  .error-pixels { --pixel-size: 32px; }
}

@media (max-width: 360px) {
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .button { justify-content: center; }
  .hero-media { height: 300px; }
  .footer-main .brand-mark { width: 40px; }
  .footer-main .brand-name { font-size: 1.5rem; }
  .back-to-top { gap: 6px; }
}

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