/* =========================================================
   County Antrim Harriers — site stylesheet
   ---------------------------------------------------------
   HOW THE COLOURS WORK
   1. BRAND COLOURS: the four colours from the crest, defined
      once. Change a hex value here and the whole site follows.
   2. ROLES: what each colour is *for* (text, buttons, accents).
      The rest of the stylesheet only ever uses the roles, never
      the brand colours directly. That keeps the bright crest
      colours in small doses and the page calm.
   ========================================================= */

/* Self-hosted Archivo (no visitor data sent to Google).
   Put the font file(s) in static/fonts/ — see README. */
@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo-variable.woff2") format("woff2"),
       url("../fonts/archivo-variable.ttf") format("truetype");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}

:root {
  /* ---- 1. Brand colours (from the crest) ---- */
  --cah-green:   #3CA047;
  --cah-orange:  #EBAC22;
  --cah-ketchup: #CC2029;
  --cah-red:     #B52125;

  /* Supporting shades, mixed from the brand colours so they stay
     on-brand. Deep green is used where text sits on green, because
     the bright green is too light for small white text to read. */
  --cah-green-deep: color-mix(in srgb, var(--cah-green) 55%, #00140a);
  --cah-green-tint: color-mix(in srgb, var(--cah-green) 10%, #ffffff);
  --cah-orange-tint: color-mix(in srgb, var(--cah-orange) 18%, #ffffff);

  /* Neutrals: these do most of the work on the page */
  --neutral-paper: #F5F7F3;
  --neutral-white: #FFFFFF;
  --neutral-ink:   #17201A;
  --neutral-muted: #525E55;
  --neutral-line:  #D8DED5;

  /* ---- 2. Roles (light scheme) ---- */
  --bg:            var(--neutral-paper);
  --surface:       var(--neutral-white);
  --text:          var(--neutral-ink);
  --text-muted:    var(--neutral-muted);
  --line:          var(--neutral-line);

  --brand:         var(--cah-green-deep);  /* headings, links, the training band */
  --brand-bright:  var(--cah-green);       /* decorative only: the sash, rules */
  --on-brand:      #FFFFFF;

  --accent:        var(--cah-orange);      /* main call-to-action button */
  --on-accent:     var(--neutral-ink);     /* orange needs dark text, not white */
  --accent-soft:   var(--cah-orange-tint);

  --alert:         var(--cah-red);         /* badges like "Entries close soon" */
  --alert-hover:   var(--cah-ketchup);
  --link:          var(--cah-green-deep);
  --link-hover:    var(--cah-red);

  --footer-bg:     var(--neutral-ink);
  --footer-text:   #DCE3DA;

  /* ---- Type & spacing ---- */
  --font: "Archivo", "Helvetica Neue", Arial, system-ui, sans-serif;
  --step--1: clamp(0.84rem, 0.82rem + 0.1vw, 0.9rem);
  --step-0:  clamp(1rem, 0.97rem + 0.15vw, 1.08rem);
  --step-1:  clamp(1.25rem, 1.15rem + 0.45vw, 1.5rem);
  --step-2:  clamp(1.6rem, 1.35rem + 1.1vw, 2.2rem);
  --step-3:  clamp(2.4rem, 1.7rem + 3.4vw, 4.6rem);

  --space-s: 0.75rem;
  --space-m: 1.5rem;
  --space-l: clamp(2.5rem, 2rem + 3vw, 4.5rem);
  --wrap: 72rem;
  --radius: 6px;

  color-scheme: light;
}

/* ---- 3. Themes ----
   The roles above are the LIGHT theme (off-white page).
   The block below is the DARK theme. Only roles change here;
   the brand colours stay exactly the same.
   Which theme shows is set by data-theme="light" or "dark" on
   the <html> tag (the theme button in the header switches it). */
:root[data-theme="dark"] {
  --bg: #111713;
  --surface: #18201A;
  --text: #E7ECE5;
  --text-muted: #A9B4AB;
  --line: #2C372F;
  --brand: var(--cah-green);
  --link: #7CCB84;
  --link-hover: var(--cah-orange);
  --alert: #E2585C;
  --accent-soft: #2A2615;
  --footer-bg: #0B100D;
  color-scheme: dark;
}

/* =========================================================
   Base
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: var(--step-0);
  line-height: 1.6;
}

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3 {
  font-stretch: 72%;
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.005em;
  margin: 0 0 0.5em;
}
h2 { font-size: var(--step-2); color: var(--brand); }
h3 { font-size: var(--step-1); }

p { margin: 0 0 1em; max-width: 65ch; }

a { color: var(--link); text-underline-offset: 0.18em; }
a:hover { color: var(--link-hover); }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

.wrap {
  width: min(100% - 2.5rem, var(--wrap));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0.5rem;
  background: var(--surface);
  padding: 0.5rem 1rem;
  z-index: 10;
}
.skip-link:focus { left: 0.5rem; }

/* =========================================================
   Buttons
   ========================================================= */
.button {
  display: inline-block;
  padding: 0.8em 1.4em;
  border-radius: var(--radius);
  font-weight: 700;
  text-decoration: none;
  line-height: 1.2;
  border: 2px solid transparent;
  transition: background-color 0.15s, color 0.15s;
}
.button--primary {
  background: var(--accent);
  color: var(--on-accent);
}
.button--primary:hover {
  background: color-mix(in srgb, var(--accent) 85%, #000);
  color: var(--on-accent);
}
.button--secondary {
  border-color: currentColor;
  color: var(--brand);
  background: transparent;
}
button.button { font: inherit; font-weight: 700; cursor: pointer; }
.button--secondary:hover { background: var(--brand); color: var(--on-brand); border-color: var(--brand); }

/* =========================================================
   Header & navigation
   Small screens: logo + burger button; the menu drops down
   as a full-width list when the button is pressed.
   Wide screens (64rem / 1024px and up): logo left, links right.
   If JavaScript is off, the links simply show as a wrapped list.
   ========================================================= */
.site-header {
  position: relative;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding-block: 0.75rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  color: var(--text);
  text-decoration: none;
  font-weight: 800;
  font-stretch: 72%;
  font-size: 1.35rem;
  line-height: 1;
}
.brand img { width: 3.25rem; flex-shrink: 0; }

/* ---- Header buttons: theme switch + burger ---- */
.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  order: 2;
}
.site-nav { order: 3; }

.theme-toggle {
  display: none;                 /* only shown when JavaScript is available */
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: transparent;
  color: var(--text);
  cursor: pointer;
}
.js .theme-toggle { display: grid; }
.theme-toggle:hover { border-color: var(--brand); color: var(--brand); }
.theme-toggle svg { width: 1.25rem; height: 1.25rem; }
/* Show the icon for the theme you'd switch TO */
:root[data-theme="dark"]  .theme-toggle .icon-moon { display: none; }
:root[data-theme="light"] .theme-toggle .icon-sun  { display: none; }

/* ---- Burger button (hidden until JavaScript switches it on) ---- */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 0.5rem;
  height: 2.75rem;
  padding: 0 0.75rem;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: transparent;
  color: var(--text);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.nav-toggle:hover { border-color: var(--brand); color: var(--brand); }

/* Three bars drawn with CSS; they turn into an X when the menu is open */
.nav-toggle__icon,
.nav-toggle__icon::before,
.nav-toggle__icon::after {
  display: block;
  width: 1.25rem;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.2s, background-color 0.2s;
}
.nav-toggle__icon { position: relative; }
.nav-toggle__icon::before,
.nav-toggle__icon::after { content: ""; position: absolute; left: 0; }
.nav-toggle__icon::before { top: -6px; }
.nav-toggle__icon::after  { top: 6px; }
.nav-toggle[aria-expanded="true"] .nav-toggle__icon { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle__icon::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__icon::after  { transform: translateY(-6px) rotate(-45deg); }

/* ---- Links ---- */
.site-nav { width: 100%; }
.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.site-nav a {
  display: block;
  padding: 0.5rem 0.75rem;
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  border-bottom: 3px solid transparent;
}
.site-nav a:hover { color: var(--brand); }
.site-nav a[aria-current="page"] { border-bottom-color: var(--accent); }

/* ---- Member sign in / sign out ---- */
.site-nav form { margin: 0; }
.site-nav .nav-signout {
  display: block;
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 0;
  border-bottom: 3px solid transparent;
  background: none;
  color: var(--text);
  font: inherit;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}
.site-nav .nav-signout:hover { color: var(--brand); }
.site-nav .nav-signin { color: var(--brand); }

/* ---- Small screens with JavaScript: burger menu ---- */
@media (max-width: 63.99rem) {
  .js .nav-toggle { display: inline-flex; }
  .js .site-nav { display: none; }
  .js .site-nav.is-open { display: block; }

  .js .site-nav ul {
    flex-direction: column;
    gap: 0;
    padding-block: 0.5rem;
    border-top: 1px solid var(--line);
  }
  .js .site-nav a {
    padding: 0.85rem 0.25rem;      /* big, thumb-friendly tap targets */
    font-size: var(--step-1);
    border-bottom: 1px solid var(--line);
  }
  .js .site-nav li:last-child a { border-bottom: 0; }
  .js .site-nav .nav-signout { padding: 0.85rem 0.25rem; font-size: var(--step-1); }
  .js .site-nav a[aria-current="page"] {
    border-bottom-color: var(--line);
    box-shadow: inset 4px 0 0 var(--accent);
    padding-left: 1rem;
  }
}

/* Very narrow phones (e.g. 320px): shrink the logo and name a little */
@media (max-width: 22rem) {
  .brand { font-size: 1.1rem; gap: 0.5rem; }
  .brand img { width: 2.6rem; }
  .nav-toggle__label { display: none; }   /* icon only; the button keeps its accessible name */
}

/* ---- Wide screens: links sit beside the logo ---- */
@media (min-width: 64rem) {
  .site-header .wrap { gap: 0.5rem 1rem; }
  .brand { margin-right: auto; }
  .site-nav { width: auto; order: 2; }
  .site-nav ul { flex-wrap: nowrap; }
  .header-actions { order: 3; }
}

/* =========================================================
   Hero — the crest worn like a medal on a club sash
   A green sash with orange edges runs behind a round "medal"
   holding the crest. This is the one big splash of brand
   colour on the page; everything else stays calm.
   ========================================================= */
.hero {
  position: relative;
  overflow: hidden;
  padding-block: var(--space-l);
}
.hero > .wrap {
  display: grid;
  gap: var(--space-l);
  align-items: center;
}
.hero h1 {
  font-size: var(--step-3);
  color: var(--text);
  max-width: 12ch;
}
.hero__intro { font-size: var(--step-1); line-height: 1.45; color: var(--text-muted); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: var(--space-m); }

.hero__visual {
  position: relative;
  display: grid;
  place-items: center;
  padding-block: 1.5rem;
  overflow: clip;          /* on mobile, keep the sash inside this box */
}
.hero__visual::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: clamp(7rem, 18vw, 14rem);
  height: 300%;
  translate: -50% -50%;
  rotate: 12deg;
  background: linear-gradient(90deg,
    var(--cah-orange) 0 0.5rem,
    var(--brand-bright) 0.5rem calc(100% - 0.5rem),
    var(--cah-orange) calc(100% - 0.5rem));
}
.hero__medal {
  position: relative;
  width: min(78%, 22rem);
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--neutral-white);   /* stays white in dark mode so the crest reads */
  box-shadow: 0 0.5rem 1.5rem rgb(0 0 0 / 0.18);
}
.hero__medal img { width: 78%; }

@media (min-width: 48rem) {
  .hero > .wrap { grid-template-columns: 1.3fr 1fr; }
  .hero__visual { overflow: visible; padding-block: 0; }  /* sash runs the full height of the hero */
  .hero__medal { width: min(100%, 24rem); }
}

/* =========================================================
   Sections
   ========================================================= */
.section { padding-block: var(--space-l); }
.section__head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem 1.5rem;
  margin-bottom: var(--space-m);
}
.section__head h2 { margin: 0; }

/* ---- Training week (deep green band) ---- */
.section--training {
  background: var(--cah-green-deep);
  color: var(--on-brand);
}
.section--training h2 { color: var(--on-brand); }
.section--training a { color: var(--cah-orange); }

.week {
  display: grid;
  gap: 1px;
  margin: 0;
  padding: 0;
  list-style: none;
  background: rgb(255 255 255 / 0.18);
  border-block: 1px solid rgb(255 255 255 / 0.18);
}
.week > li {
  display: grid;
  gap: 0.5rem 1.5rem;
  padding: 1.1rem 0;
  background: var(--cah-green-deep);
}
.week__day {
  font-stretch: 72%;
  font-weight: 800;
  font-size: var(--step-2);
  line-height: 1;
}
.week__sessions { display: grid; gap: 0.9rem; margin: 0; padding: 0; list-style: none; }
.week__what { display: block; font-weight: 700; font-size: var(--step-1); line-height: 1.3; }
.week__what time { color: var(--cah-orange); margin-right: 0.35rem; }
.week__detail { opacity: 0.88; margin: 0.15rem 0 0; }
.week__season { display: inline-block; font-style: italic; }
.week__notice {
  display: inline-block;
  margin: 0.4rem 0 0;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius);
  background: rgb(255 255 255 / 0.12);
  font-weight: 700;
  font-size: var(--step--1);
}
.week__notice--alert { background: var(--cah-red); color: #fff; }
.week__notice-date { font-weight: 800; margin-right: 0.3rem; }

@media (min-width: 40rem) {
  .week > li { grid-template-columns: 11rem 1fr; align-items: baseline; }
}

/* ---- Race calendar ---- */
.races { display: grid; gap: var(--space-s); margin: 0; padding: 0; list-style: none; }
.race {
  display: grid;
  grid-template-columns: 4.5rem 1fr;
  gap: 0 1.25rem;
  padding: 1rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 5px solid var(--brand-bright);
  border-radius: var(--radius);
}
.race--champs { border-left-color: var(--accent); }
.race__date {
  grid-row: span 3;
  text-align: center;
  line-height: 1;
  font-weight: 800;
  font-stretch: 72%;
}
.race__date span { display: block; font-size: 2.4rem; color: var(--brand); }
.race__date small { font-size: 1rem; color: var(--text-muted); font-weight: 600; }
.race h3 { margin: 0 0 0.2rem; font-size: var(--step-1); }
.race__meta { margin: 0; color: var(--text-muted); }
.race__tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.5rem; }

.tag {
  display: inline-block;
  white-space: nowrap;
  padding: 0.15em 0.6em;
  border-radius: 999px;
  font-size: var(--step--1);
  font-weight: 700;
  background: var(--accent-soft);
  color: var(--text);
}
.tag--alert { background: var(--alert); color: #fff; }

@media (min-width: 56rem) {
  .races { grid-template-columns: repeat(2, 1fr); }
}

/* ---- News ---- */
.news { display: grid; gap: var(--space-m); }
.news article { border-top: 3px solid var(--line); padding-top: 1rem; }
.news article:first-child { border-top-color: var(--alert); }
.news time { color: var(--text-muted); font-size: var(--step--1); font-weight: 600; }
.news h3 { margin-top: 0.35rem; }
.news h3 a { color: var(--text); text-decoration: none; }
.news h3 a:hover { color: var(--link-hover); text-decoration: underline; }

@media (min-width: 48rem) {
  .news { grid-template-columns: repeat(3, 1fr); }
}

/* ---- Join strip ---- */
.join {
  background: var(--accent-soft);
  border-block: 4px solid var(--accent);
}
.join .wrap {
  display: grid;
  gap: var(--space-m);
  align-items: center;
}
.join h2 { color: var(--text); margin-bottom: 0.3em; }
.join p { margin: 0; color: var(--text-muted); }
@media (min-width: 48rem) {
  .join .wrap { grid-template-columns: 1fr auto; }
}

/* =========================================================
   Footer
   ========================================================= */
.site-footer {
  background: var(--footer-bg);
  color: var(--footer-text);
  padding-block: var(--space-l) var(--space-m);
  font-size: var(--step--1);
}
.site-footer a { color: var(--footer-text); }
.site-footer a:hover { color: var(--cah-orange); }
.footer-grid { display: grid; gap: var(--space-m); }
.footer-grid h2 {
  font-size: var(--step-1);
  color: #fff;
}
.footer-grid ul { list-style: none; margin: 0; padding: 0; line-height: 2; }
.footer-crest { width: 5rem; margin-bottom: 0.75rem; }
.footer-motto { font-style: italic; }
.footer-base {
  margin-top: var(--space-l);
  padding-top: var(--space-m);
  border-top: 1px solid rgb(255 255 255 / 0.15);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
}
.footer-base p { margin: 0; }

@media (min-width: 40rem) { .footer-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 64rem) { .footer-grid { grid-template-columns: 1.5fr 1fr 1fr 1fr; } }

/* =========================================================
   Accessibility: respect reduced-motion settings
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

/* Race titles are links in the Django version */
.race h3 a { color: var(--text); text-decoration: none; }
.race h3 a:hover { color: var(--link-hover); text-decoration: underline; }

/* =========================================================
   Inner pages: page header
   A short slice of the club sash echoes the home page.
   ========================================================= */
.page-header {
  position: relative;
  overflow: hidden;
  padding-block: var(--space-l) var(--space-m);
  border-bottom: 1px solid var(--line);
}
.page-header .wrap { position: relative; }
.page-header h1 {
  font-size: clamp(2.2rem, 1.6rem + 3vw, 3.8rem);
  max-width: 20ch;
  margin-bottom: 0.3em;
}
.page-header__intro {
  font-size: var(--step-1);
  line-height: 1.45;
  color: var(--text-muted);
  max-width: 48ch;
  margin: 0.5rem 0 0;
}
.page-header__badges { display: flex; flex-wrap: wrap; gap: 0.4rem; }

@media (min-width: 48rem) {
  .page-header::after {
    content: "";
    position: absolute;
    top: -50%;
    right: 8%;
    width: clamp(3rem, 6vw, 5rem);
    height: 200%;
    rotate: 12deg;
    background: linear-gradient(90deg,
      var(--cah-orange) 0 0.35rem,
      var(--brand-bright) 0.35rem calc(100% - 0.35rem),
      var(--cah-orange) calc(100% - 0.35rem));
  }
  .page-header .wrap { padding-right: 9rem; }
}

/* ---- Breadcrumbs ---- */
.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0;
  margin: 0 0 1rem;
  padding: 0;
  list-style: none;
  font-size: var(--step--1);
  font-weight: 600;
}
.breadcrumbs li:not(:last-child)::after {
  content: "/" / "";
  margin-inline: 0.5rem;
  color: var(--text-muted);
}
.breadcrumbs a { color: var(--text-muted); }
.breadcrumbs a:hover { color: var(--link-hover); }
.breadcrumbs [aria-current] { color: var(--text); }

/* =========================================================
   Inner pages: layout with optional "On this page" list
   ========================================================= */
.page-layout { padding-block: var(--space-l); }

.page-toc {
  margin-bottom: var(--space-m);
  padding: 0.25rem 0 0.25rem 1rem;
  border-left: 3px solid var(--brand-bright);
  font-size: var(--step--1);
}
.page-toc__title { font-weight: 700; margin: 0 0 0.4rem; }
.page-toc ul { list-style: none; margin: 0; padding: 0; line-height: 1.4; }
.page-toc li + li { margin-top: 0.45rem; }
.page-toc a { color: var(--text-muted); text-decoration: none; }
.page-toc a:hover { color: var(--link-hover); text-decoration: underline; }

@media (min-width: 64rem) {
  .page-layout--with-toc {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 15rem;
    gap: 4rem;
    align-items: start;
  }
  .page-layout--with-toc .page-toc {
    grid-column: 2;
    grid-row: 1;
    position: sticky;
    top: 1.5rem;
    margin-bottom: 0;
  }
  .page-layout--with-toc .page-main { grid-column: 1; grid-row: 1; }
}

.page-updated {
  margin-top: var(--space-l);
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  font-size: var(--step--1);
  color: var(--text-muted);
}

/* =========================================================
   Prose: styles for markdown written in the admin
   ========================================================= */
.prose { max-width: 68ch; }
.prose > :first-child { margin-top: 0; }
.prose h2 { margin-top: 2em; }
.prose h3 { margin-top: 1.6em; color: var(--text); }
.prose h4 { margin: 1.4em 0 0.4em; font-size: var(--step-0); }
.prose h2, .prose h3, .prose h4 { scroll-margin-top: 1.5rem; }

.prose ul, .prose ol { margin: 0 0 1em; padding-left: 1.4em; }
.prose li + li { margin-top: 0.35em; }
.prose li::marker { color: var(--brand); font-weight: 700; }

.prose blockquote {
  margin: 1.75em 0;
  padding: 0.2em 0 0.2em 1.25em;
  border-left: 4px solid var(--accent);
  font-size: var(--step-1);
  line-height: 1.45;
}
.prose blockquote p:last-child { margin-bottom: 0; }

.prose table {
  display: block;            /* lets wide tables scroll sideways on phones */
  overflow-x: auto;
  max-width: 100%;
  width: max-content;
  margin: 1.5em 0;
  border-collapse: collapse;
  font-size: var(--step--1);
}
.prose th, .prose td {
  padding: 0.6em 1em;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
.prose th {
  border-bottom: 2px solid var(--brand-bright);
  font-weight: 700;
}

.prose img { margin: 1.5em 0; border-radius: var(--radius); }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2.5em 0; }
.prose code {
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 0.9em;
  padding: 0.1em 0.35em;
  border-radius: 4px;
  background: var(--surface);
  border: 1px solid var(--line);
}
.prose .footnote { margin-top: var(--space-l); font-size: var(--step--1); color: var(--text-muted); }

/* =========================================================
   Members-only notice
   ========================================================= */
.members-notice {
  max-width: 38rem;
  padding: var(--space-m);
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 4px solid var(--brand-bright);
  border-radius: var(--radius);
}
.members-notice__icon { width: 2rem; height: 2rem; color: var(--brand); margin-bottom: 0.75rem; }
.members-notice h2 { font-size: var(--step-2); }
.members-notice__small { margin: 1rem 0 0; font-size: var(--step--1); color: var(--text-muted); }

/* =========================================================
   Members' area: links to member sections
   ========================================================= */
.member-areas {
  display: grid;
  gap: var(--space-s);
  margin: 0;
  padding: 0;
  list-style: none;
}
.member-area {
  position: relative;
  padding: 1.25rem 1.25rem 1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 5px solid var(--brand-bright);
  border-radius: var(--radius);
}
.member-area h2 { font-size: var(--step-1); color: var(--text); margin-bottom: 0.35rem; }
.member-area p { margin: 0; color: var(--text-muted); }
/* The whole card is clickable when the section is available */
.member-area h2 a { color: inherit; text-decoration: none; }
.member-area h2 a::after { content: ""; position: absolute; inset: 0; }
.member-area:has(a):hover { border-color: var(--brand); border-left-color: var(--accent); }
.member-area:has(a:focus-visible) { outline: 3px solid var(--accent); outline-offset: 3px; }
.member-area h2 a:focus-visible { outline: none; }
.member-area--soon { border-left-color: var(--line); }
.member-area--soon .tag { margin-bottom: 0.5rem; }

@media (min-width: 40rem) { .member-areas { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 64rem) { .member-areas { grid-template-columns: repeat(3, 1fr); } }

/* =========================================================
   Filter tabs (e.g. All / Club news / Race reports)
   ========================================================= */
.filter-tabs { margin-bottom: var(--space-m); overflow-x: auto; }
.filter-tabs ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.filter-tabs a {
  display: block;
  padding: 0.45rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  font-size: var(--step--1);
}
.filter-tabs a:hover { border-color: var(--brand); color: var(--brand); }
.filter-tabs a[aria-current="page"] {
  background: var(--brand);
  border-color: var(--brand);
  color: var(--on-brand);
}

/* =========================================================
   Article listing
   ========================================================= */
.article-list {
  display: grid;
  gap: var(--space-m);
  margin: 0;
  padding: 0;
  list-style: none;
}
.article-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.article-card:hover { border-color: var(--brand); }
.article-card:has(a:focus-visible) { outline: 3px solid var(--accent); outline-offset: 3px; }
.article-card__image {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}
.article-card--no-image { border-top: 4px solid var(--brand-bright); }
.article-card__body { padding: 1rem 1.25rem 1.25rem; }
.article-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.6rem;
  margin: 0 0 0.6rem;
  font-size: var(--step--1);
  color: var(--text-muted);
  font-weight: 600;
}
.article-card h2 { font-size: var(--step-1); color: var(--text); margin-bottom: 0.4rem; }
.article-card h2 a { color: inherit; text-decoration: none; }
.article-card h2 a::after { content: ""; position: absolute; inset: 0; }   /* whole card clickable */
.article-card h2 a:focus-visible { outline: none; }
.article-card__summary { margin: 0; color: var(--text-muted); }

@media (min-width: 40rem) {
  .article-list { grid-template-columns: repeat(2, 1fr); }
  .article-card--featured { grid-column: 1 / -1; }
}
@media (min-width: 64rem) {
  .article-list { grid-template-columns: repeat(3, 1fr); }
  /* Newest article: photo beside the text, bigger title */
  .article-card--featured:not(.article-card--no-image) {
    display: grid;
    grid-template-columns: 3fr 2fr;
  }
  .article-card--featured .article-card__image { aspect-ratio: auto; height: 100%; min-height: 20rem; }
  .article-card--featured .article-card__body { padding: var(--space-m); align-self: center; }
  .article-card--featured h2 { font-size: var(--step-2); }
}

.empty-state { color: var(--text-muted); }

/* =========================================================
   Pagination
   ========================================================= */
.pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: var(--space-l);
}
.pagination ul { display: flex; flex-wrap: wrap; gap: 0.25rem; margin: 0; padding: 0; list-style: none; }
.pagination a, .pagination span {
  display: grid;
  place-items: center;
  min-width: 2.75rem;
  height: 2.75rem;
  padding-inline: 0.75rem;
  border-radius: var(--radius);
  font-weight: 700;
  text-decoration: none;
}
.pagination a { color: var(--text); border: 1px solid var(--line); }
.pagination a:hover { border-color: var(--brand); color: var(--brand); }
.pagination [aria-current="page"] { background: var(--brand); color: var(--on-brand); }
.pagination__gap { color: var(--text-muted); }

/* =========================================================
   Single article
   ========================================================= */
.article__meta {
  margin: 0 0 var(--space-m);
  color: var(--text-muted);
  font-weight: 600;
  font-size: var(--step--1);
}
.article__figure { margin: 0 0 var(--space-m); }
.article__figure img { width: 100%; border-radius: var(--radius); }
.article__figure figcaption {
  margin-top: 0.5rem;
  font-size: var(--step--1);
  color: var(--text-muted);
}
@media (min-width: 64rem) {
  /* Let the lead photo run a little wider than the text */
  .article__figure { width: min(100%, 52rem); }
}

.article-pager {
  display: grid;
  gap: var(--space-s);
  max-width: 68ch;
  margin-top: var(--space-l);
  padding-top: var(--space-m);
  border-top: 1px solid var(--line);
}
.article-pager__link {
  display: block;
  padding: 1rem 1.25rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text);
}
.article-pager__link:hover { border-color: var(--brand); }
.article-pager__label { display: block; font-size: var(--step--1); font-weight: 700; color: var(--brand); }
.article-pager__title { font-weight: 700; }
.article-pager__link--older { text-align: right; }
@media (min-width: 40rem) {
  .article-pager { grid-template-columns: 1fr 1fr; }
  .article-pager__link--older { grid-column: 2; }
}

/* On phones, the last breadcrumb repeats the page title right below it */
@media (max-width: 40rem) {
  .breadcrumbs li:last-child { display: none; }
}

/* =========================================================
   Race calendar
   ========================================================= */
/* Filters fold away behind a "Filter races" button (no JavaScript needed).
   They open automatically when a filter is in use. */
.race-filters {
  margin-bottom: var(--space-m);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.race-filters summary {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 0.75rem;
  padding: 0.8rem 1rem;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}
.race-filters summary::-webkit-details-marker { display: none; }
.race-filters summary::after {
  content: "";
  width: 0.55rem;
  height: 0.55rem;
  margin-left: auto;
  align-self: center;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  rotate: 45deg;
  translate: 0 -0.15rem;
  transition: rotate 0.15s;
}
.race-filters[open] summary::after { rotate: 225deg; translate: 0 0.1rem; }
.race-filters__current { font-weight: 500; color: var(--text-muted); font-size: var(--step--1); }
.race-filters .filter-tabs { margin: 0; padding: 0 1rem 0.9rem; }
.filter-tabs--secondary a { font-weight: 500; }
.series-intro { margin-bottom: var(--space-m); }

.race-month + .race-month { margin-top: var(--space-l); }
.race-month h2 {
  font-size: var(--step-1);
  padding-bottom: 0.5rem;
  margin-bottom: var(--space-s);
  border-bottom: 1px solid var(--line);
}

.race--cancelled { border-left-color: var(--line); }
.race--cancelled h3 a { text-decoration: line-through; color: var(--text-muted); }

.race-archive-link { margin-top: var(--space-l); font-weight: 600; }

/* =========================================================
   Race detail
   ========================================================= */
.race-facts {
  margin-bottom: var(--space-l);
  padding: var(--space-m);
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 4px solid var(--brand-bright);
  border-radius: var(--radius);
}
.race-facts dl {
  display: grid;
  gap: 1rem 2rem;
  margin: 0;
}
.race-facts dt {
  font-size: var(--step--1);
  font-weight: 600;
  color: var(--text-muted);
}
.race-facts dd { margin: 0.1rem 0 0; font-weight: 700; }
.race-facts__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: var(--space-m);
  padding-top: var(--space-m);
  border-top: 1px solid var(--line);
}
@media (min-width: 40rem) {
  .race-facts dl { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 64rem) {
  .race-facts dl { grid-template-columns: repeat(4, 1fr); }
}

.race-reports { margin-top: var(--space-l); }
.race-reports h2 { font-size: var(--step-2); }

.article__race { margin: -1rem 0 var(--space-m); font-weight: 600; font-size: var(--step--1); }

/* Narrow phones: slimmer date column gives race names more room */
@media (max-width: 30rem) {
  .race { grid-template-columns: 3rem 1fr; gap: 0 0.9rem; padding: 0.9rem 1rem; }
  .race__date span { font-size: 2rem; }
}

/* =========================================================
   Results and club records
   ========================================================= */
.table-scroll {
  overflow-x: auto;
  margin: var(--space-s) 0 var(--space-m);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.table-scroll:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.results-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--step--1);
}
.results-table th, .results-table td {
  padding: 0.65em 0.9em;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}
.results-table tbody tr:last-child td { border-bottom: 0; }
.results-table th {
  font-weight: 700;
  white-space: nowrap;
  border-bottom: 2px solid var(--brand-bright);
}
.results-table .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.results-table__name { font-weight: 700; margin-right: 0.35rem; }
.results-table__time { font-weight: 700; }
.results-table__note { display: block; color: var(--text-muted); font-size: 0.92em; }
.results-table__catpos { color: var(--text-muted); white-space: nowrap; }
.results-table .tag { font-size: 0.78rem; vertical-align: 0.1em; }
.tag--record { background: var(--accent); color: var(--on-accent); }
.records-table td:first-child { font-weight: 600; white-space: nowrap; }

.race-results { margin-top: var(--space-l); max-width: 50rem; }
.results-table th.num:first-child, .results-table td.num:first-child { width: 1%; }
.results-table__cat-inline { display: none; }
/* Narrow phones: fold the category under the runner's name */
@media (max-width: 30rem) {
  .results-table .results-table__cat { display: none; }
  .results-table__cat-inline { display: block; }
}
.race-results h2 { font-size: var(--step-2); }

/* Signpost to the club records from the results page */
.records-link {
  display: block;
  margin-bottom: var(--space-m);
  padding: 1rem 1.25rem;
  background: var(--accent-soft);
  border: 1px solid var(--line);
  border-left: 5px solid var(--accent);
  border-radius: var(--radius);
  color: var(--text);
  text-decoration: none;
}
.records-link:hover { border-color: var(--accent); color: var(--text); }
.records-link__title { display: block; font-weight: 800; font-size: var(--step-1); font-stretch: 72%; }
.records-link__text { color: var(--text-muted); }

/* Jump links to each event on the records page */
.records-index ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  margin: 0 0 var(--space-m);
  padding: 0;
  list-style: none;
  font-weight: 600;
}
.records-event + .records-event { margin-top: var(--space-l); }
.records-event h2 { font-size: var(--step-2); scroll-margin-top: 1rem; }

/* Narrow phones: each record becomes a small card instead of a wide table row */
@media (max-width: 40rem) {
  .records-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .records-table, .records-table tbody { display: block; }
  .records-table tr {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.15rem 1rem;
    padding: 0.8rem 1rem;
    border-bottom: 1px solid var(--line);
  }
  .records-table tbody tr:last-child { border-bottom: 0; }
  .records-table td { display: block; padding: 0; border: 0; }
  .records-table td:first-child { grid-column: 1 / -1; color: var(--brand); }
  .records-table td.num { grid-column: 2; grid-row: 2; text-align: right; }
  .records-table td[data-label] { grid-column: 1 / -1; color: var(--text-muted); }
  .records-table td[data-label]:empty { display: none; }
}

/* =========================================================
   Training page and members' training details
   ========================================================= */
.training-callout {
  max-width: 50rem;
  margin-top: var(--space-m);
  padding: var(--space-m);
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 5px solid var(--brand-bright);
  border-radius: var(--radius);
}
.training-callout h2 { font-size: var(--step-1); color: var(--text); }
.training-callout .button { margin: 0.25rem 0.5rem 0 0; }
.training-callout--join { border-left-color: var(--accent); }

.training-day + .training-day { margin-top: var(--space-l); }
.training-day h2 {
  font-size: var(--step-1);
  padding-bottom: 0.5rem;
  margin-bottom: var(--space-s);
  border-bottom: 1px solid var(--line);
}
.session-card {
  max-width: 50rem;
  margin-bottom: var(--space-s);
  padding: 1rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 5px solid var(--brand-bright);
  border-radius: var(--radius);
}
.session-card--cancelled { border-left-color: var(--alert); }
.session-card--cancelled h3 { text-decoration: line-through; color: var(--text-muted); }
.session-card__head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0 1rem;
  align-items: start;
}
.session-card__time {
  margin: 0;
  font-weight: 800;
  font-stretch: 72%;
  font-size: var(--step-1);
  color: var(--brand);
  white-space: nowrap;
}
.session-card h3 { font-size: var(--step-1); margin: 0; }
.session-card__meta { margin: 0.1rem 0 0; color: var(--text-muted); font-size: var(--step--1); }
.session-card__notice { margin: 0.75rem 0 0; font-weight: 700; }
.session-card__block { margin-top: 0.9rem; padding-top: 0.9rem; border-top: 1px solid var(--line); }
.session-card__block h4 { margin: 0 0 0.4rem; font-size: var(--step--1); color: var(--text-muted); }
.session-card__block .prose { font-size: var(--step--1); }
.session-card__routes { margin: 0; padding: 0; list-style: none; }
.session-card__routes li + li { margin-top: 0.25rem; }
.session-card__routes a { font-weight: 700; }
.session-card__muted { color: var(--text-muted); font-size: var(--step--1); }
.session-card > .session-card__muted { margin: 0.6rem 0 0; }

.coach-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 0.6rem; }
.coach-list li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.1rem 0.75rem; }
.coach-list__name { font-weight: 700; }
.coach-list__contact { font-weight: 600; }

/* =========================================================
   Running routes (members)
   ========================================================= */
.route-images { display: grid; gap: var(--space-m); max-width: 52rem; margin-bottom: var(--space-m); }
.route-images .article__figure { margin: 0; }
.route-section { max-width: 50rem; margin-top: var(--space-l); }
.route-section h2 { font-size: var(--step-2); }
.risk-panel {
  padding: var(--space-m);
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 4px solid var(--brand-bright);
  border-radius: var(--radius);
}
.risk-panel--alert { border-top-color: var(--alert); }
.risk-panel h3 { font-size: var(--step-1); margin-top: var(--space-m); }
.risk-panel__facts { display: grid; gap: 0.75rem 2rem; margin: 0; }
.risk-panel__facts dt { font-size: var(--step--1); font-weight: 600; color: var(--text-muted); }
.risk-panel__facts dd { margin: 0.1rem 0 0; font-weight: 700; }
@media (min-width: 40rem) { .risk-panel__facts { grid-template-columns: repeat(2, 1fr); } }

/* =========================================================
   Sign-in pages
   ========================================================= */
.auth-panel {
  max-width: 30rem;
  padding: var(--space-m);
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 4px solid var(--brand-bright);
  border-radius: var(--radius);
}
.auth-panel > :last-child { margin-bottom: 0; }
.auth-providers { display: grid; gap: 0.75rem; margin: 0 0 var(--space-m); padding: 0; list-style: none; }
.auth-providers form { margin: 0; }
.auth-provider {
  display: block;
  width: 100%;
  padding: 0.9rem 1rem;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
}
.auth-provider:hover { border-color: var(--brand); color: var(--brand); }
.auth-panel__notes { font-size: var(--step--1); color: var(--text-muted); }
.auth-panel__notes p { margin-bottom: 0.6rem; }
.auth-panel .button { margin: 0.25rem 0.5rem 0 0; }

.auth-steps { padding-left: 1.3em; }
.auth-steps li + li { margin-top: 0.4rem; }
.auth-qr {
  width: 14rem;
  max-width: 100%;
  margin: var(--space-s) 0;
  padding: 0.5rem;
  background: #fff;          /* QR codes need a white background in both themes */
  border-radius: var(--radius);
}
.auth-qr svg { display: block; width: 100%; height: auto; }
.auth-secret code { word-break: break-all; }
.auth-error {
  padding: 0.6rem 0.8rem;
  border-radius: var(--radius);
  background: var(--alert);
  color: #fff;
  font-weight: 700;
}
.auth-code-form { display: grid; gap: 0.5rem; max-width: 16rem; margin: var(--space-s) 0 var(--space-m); }
.auth-code-form label { font-weight: 700; }
.auth-code-form input {
  padding: 0.7rem 0.8rem;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 1.4rem;
  letter-spacing: 0.25em;
  font-variant-numeric: tabular-nums;
}
.auth-code-form input:focus { outline: 3px solid var(--accent); outline-offset: 1px; border-color: var(--brand); }

/* =========================================================
   Document library
   ========================================================= */
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}
.doc-intro { margin-bottom: var(--space-m); }
.doc-signin { font-weight: 600; }

.doc-search { max-width: 36rem; margin-bottom: var(--space-s); }
.doc-search label { display: block; font-weight: 700; margin-bottom: 0.35rem; }
.doc-search__row { display: flex; gap: 0.5rem; }
.doc-search input {
  flex: 1;
  min-width: 0;
  padding: 0.7rem 0.8rem;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font: inherit;
}
.doc-search input:focus { outline: 3px solid var(--accent); outline-offset: 1px; border-color: var(--brand); }
.doc-results { color: var(--text-muted); font-weight: 600; }

.doc-list {
  max-width: 52rem;
  margin: 0;
  padding: 0;
  list-style: none;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.doc {
  position: relative;
  display: grid;
  grid-template-columns: 3.6rem 1fr;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--line);
}
.doc:last-child { border-bottom: 0; }
.doc:hover { background: color-mix(in srgb, var(--brand-bright) 6%, transparent); }
.doc__kind {
  display: grid;
  place-items: center;
  height: 3.6rem;
  border-radius: var(--radius);
  background: var(--accent-soft);
  border: 1px solid var(--line);
  font-size: 0.72rem;
  font-weight: 800;
  text-align: center;
  line-height: 1.1;
}
.doc__title { font-size: var(--step-1); color: var(--text); margin: 0 0 0.2rem; }
.doc__title a { color: inherit; text-decoration: none; }
.doc__title a::after { content: ""; position: absolute; inset: 0; }   /* whole row downloads */
.doc__title a:focus-visible { outline: none; }
.doc:has(.doc__title a:focus-visible) { outline: 3px solid var(--accent); outline-offset: -3px; }
.doc__description { margin: 0 0 0.25rem; color: var(--text-muted); }
.doc__meta { margin: 0; font-size: var(--step--1); color: var(--text-muted); font-weight: 600; }
.doc__tags { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.5rem; }
.doc__tags:empty { display: none; }
.tag--link { position: relative; z-index: 1; text-decoration: none; color: var(--text); border: 1px solid transparent; }
.tag--link:hover { border-color: var(--brand); color: var(--brand); }
.tag--access { background: var(--cah-green-deep); color: #fff; }

.doc-pages { max-width: 52rem; margin-top: var(--space-l); }
.doc-pages h2 { font-size: var(--step-1); color: var(--text); }
.doc-pages ul { margin: 0; padding-left: 1.2em; }
.doc-pages li + li { margin-top: 0.35rem; }
.doc-pages a { font-weight: 600; }

@media (max-width: 30rem) {
  .doc { grid-template-columns: 2.8rem 1fr; gap: 0.75rem; padding: 0.9rem 1rem; }
  .doc__kind { height: 2.8rem; font-size: 0.62rem; }
}

/* =========================================================
   Messages ("Document added", etc.)
   ========================================================= */
.messages { list-style: none; margin: var(--space-m) 0 0; padding: 0; display: grid; gap: 0.5rem; }
.message {
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  border-left: 5px solid var(--brand-bright);
  background: var(--surface);
  font-weight: 600;
}
.message--error, .message--warning { border-left-color: var(--alert); }

/* =========================================================
   Site forms (committee document upload, and later forms)
   ========================================================= */
.doc-actions { margin-bottom: var(--space-m); }
.doc__manage { position: relative; z-index: 1; display: flex; gap: 1rem; margin: 0.6rem 0 0; font-weight: 700; font-size: var(--step--1); }

.site-form { max-width: 40rem; }
.site-form__field { margin-bottom: 1.4rem; }
.site-form__field > label, .site-form legend { display: block; font-weight: 700; margin-bottom: 0.4rem; }
.site-form fieldset { border: 0; margin: 0; padding: 0; }
.site-form__optional { font-weight: 500; color: var(--text-muted); }
.site-form input[type="text"], .site-form input[type="date"], .site-form input[type="file"],
.site-form input[type="email"], .site-form textarea, .site-form select {
  width: 100%;
  padding: 0.7rem 0.8rem;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font: inherit;
}
.site-form input:focus, .site-form textarea:focus, .site-form select:focus {
  outline: 3px solid var(--accent); outline-offset: 1px; border-color: var(--brand);
}
.site-form__field--choices div > div, .site-form__field--choices ul > li { margin: 0.35rem 0; }
.site-form__field--choices ul { list-style: none; margin: 0; padding: 0; }
.site-form__field--choices label { font-weight: 500; display: inline-flex; gap: 0.5rem; align-items: center; }
.site-form input[type="radio"], .site-form input[type="checkbox"] { width: 1.15rem; height: 1.15rem; accent-color: var(--cah-green-deep); }
.site-form__field--check { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.site-form__field--check label { font-weight: 700; }
.site-form__field--check .site-form__help { flex-basis: 100%; }
.site-form__help { margin: 0.35rem 0 0; font-size: var(--step--1); color: var(--text-muted); }
.site-form__current { margin: 0 0 0.4rem; font-size: var(--step--1); }
.site-form__error { margin: 0.35rem 0 0; color: var(--alert); font-weight: 700; font-size: var(--step--1); }
.site-form__field--error input, .site-form__field--error textarea { border-color: var(--alert); }
.site-form__errors { padding: 0.75rem 1rem; border-radius: var(--radius); background: var(--alert); color: #fff; margin-bottom: 1rem; }
.site-form__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: var(--space-m); }

/* Routes: summer and winter sections, one or two images */
.route-season + .route-season { margin-top: var(--space-l); }
.route-season__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 1rem;
  padding-bottom: 0.5rem;
  margin-bottom: var(--space-s);
  border-bottom: 1px solid var(--line);
}
.route-season__head h2 { margin: 0; font-size: var(--step-2); scroll-margin-top: 1rem; }
.route-list h3 { font-size: var(--step-1); color: var(--text); margin-bottom: 0.4rem; }
.route-list h3 a { color: inherit; text-decoration: none; }
.route-list h3 a::after { content: ""; position: absolute; inset: 0; }
.route-list h3 a:focus-visible { outline: none; }
.route-section--first { margin-top: 0; }
.route-images--pair { max-width: none; }
@media (min-width: 48rem) {
  .route-images--pair { grid-template-columns: 1fr 1fr; max-width: 72rem; }
}
.route-directions ol li + li { margin-top: 0.6em; }

/* =========================================================
   FAQ
   ========================================================= */
.faq-toggle-all-wrap { display: none; max-width: 52rem; text-align: right; margin: 0 0 0.5rem; }
.js .faq-toggle-all-wrap { display: block; }
.faq-toggle-all {
  border: 0; background: none; padding: 0.25rem 0;
  color: var(--link); font: inherit; font-weight: 700; cursor: pointer;
  text-decoration: underline; text-underline-offset: 0.18em;
}
.faq-toggle-all:hover { color: var(--link-hover); }

.faq-group + .faq-group { margin-top: var(--space-l); }
.faq-group h2 { font-size: var(--step-2); scroll-margin-top: 1rem; }
.faq-list {
  max-width: 52rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.faq-item + .faq-item { border-top: 1px solid var(--line); }
.faq-item { scroll-margin-top: 1rem; }
.faq-item summary {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  font-weight: 700;
  font-size: var(--step-0);
  cursor: pointer;
  list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::before {
  content: "+";
  flex: none;
  width: 1.2rem;
  font-weight: 800;
  color: var(--brand);
  font-size: 1.2em;
  line-height: 1;
}
.faq-item[open] summary::before { content: "−"; }
.faq-item summary:hover .faq-item__question { color: var(--brand); }
.faq-item__question { flex: 1; }
.faq-item__answer { padding: 0 1.25rem 1.1rem 3.2rem; }
.faq-item__answer > :first-child { margin-top: 0; }
.faq-item__link { font-size: var(--step--1); margin: 0.5rem 0 0; }
.faq-item:target summary { background: var(--accent-soft); }
.faq-members-note { margin-top: var(--space-m); font-weight: 600; }
@media (max-width: 30rem) {
  .faq-item summary { padding: 0.9rem 1rem; }
  .faq-item__answer { padding: 0 1rem 1rem 1rem; }
}
