/*
 * AMO Racing theme (customer layer). Brand tokens first, then the design layer.
 * Look: Ontario grassroots motocross. Paper page, galvanized gate steel, sand, loam, AMO logo red.
 * Studio edits the tokens below (cms/schema.json "design"); site.json participant.theme mirrors them so
 * my.amomx.livelaps.com matches. Headlines: Big Shoulders Display (self-hosted), body: Inter (self-hosted).
 */

/* ------------------------------------------------------------------ fonts (self-hosted, OFL; see /licenses) */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/fonts/inter-variable.woff2') format('woff2');
}
@font-face {
  font-family: 'Big Shoulders Display';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/big-shoulders-display-700.woff2') format('woff2');
}
@font-face {
  font-family: 'Big Shoulders Display';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('/fonts/big-shoulders-display-800.woff2') format('woff2');
}
@font-face {
  font-family: 'Big Shoulders Display';
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url('/fonts/big-shoulders-display-900.woff2') format('woff2');
}
/* Metric-matched fallbacks keep the layout still while the web fonts load. */
@font-face {
  font-family: 'Inter Fallback';
  src: local('Arial');
  size-adjust: 107%;
  ascent-override: 90%;
  descent-override: 22%;
  line-gap-override: 0%;
}
@font-face {
  font-family: 'Big Shoulders Fallback';
  src: local('Arial Narrow'), local('Arial');
  size-adjust: 84%;
  ascent-override: 105%;
  descent-override: 25%;
  line-gap-override: 0%;
}

/* ------------------------------------------------------------------ tokens */
:root {
  --background: #f4f5f3;
  --foreground: #1f2226;
  --card: #ffffff;
  --card-foreground: #1f2226;
  --popover: #ffffff;
  --popover-foreground: #1f2226;
  --primary: #d01f27;
  --primary-foreground: #ffffff;
  --secondary: #e6e8e4;
  --secondary-foreground: #1f2226;
  --muted: #eceee9;
  --muted-foreground: #565b63;
  --accent: #f6dfdd;
  --accent-foreground: #1f2226;
  --destructive: #b42318;
  --destructive-foreground: #ffffff;
  --border: #d3d6d0;
  --input: #d3d6d0;
  --ring: #d01f27;
  --chart-1: #d01f27;
  --chart-2: #2b2e33;
  --chart-3: #7a808a;
  --chart-4: #b9a176;
  --chart-5: #4e3b2a;
  --sidebar: #eceee9;
  --sidebar-foreground: #1f2226;
  --sidebar-primary: #d01f27;
  --sidebar-primary-foreground: #ffffff;
  --sidebar-accent: #f6dfdd;
  --sidebar-accent-foreground: #1f2226;
  --sidebar-border: #d3d6d0;
  --sidebar-ring: #d01f27;
  --font-sans: 'Inter', 'Inter Fallback', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-serif: ui-serif, Georgia, Cambria, 'Times New Roman', Times, serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
  --tracking-normal: 0em;
  --radius: 0.375rem;
  --spacing: 0.25rem;
  --shadow-2xs: 0px 1px 3px 0px rgb(31 34 38 / 0.08);
  --shadow-xs: 0px 1px 3px 0px rgb(31 34 38 / 0.08);
  --shadow-sm: 0px 2px 6px 0px rgb(31 34 38 / 0.1), 0px 1px 2px -1px rgb(31 34 38 / 0.1);
  --shadow: 0px 2px 6px 0px rgb(31 34 38 / 0.1), 0px 1px 2px -1px rgb(31 34 38 / 0.1);
  --shadow-md: 0px 3px 8px 0px rgb(31 34 38 / 0.1), 0px 2px 4px -1px rgb(31 34 38 / 0.1);
  --shadow-lg: 0px 4px 10px 0px rgb(31 34 38 / 0.12), 0px 4px 6px -1px rgb(31 34 38 / 0.1);
  --shadow-xl: 0px 6px 14px 0px rgb(31 34 38 / 0.14), 0px 8px 10px -1px rgb(31 34 38 / 0.1);
  --shadow-2xl: 0px 8px 24px 0px rgb(31 34 38 / 0.25);

  /* design layer (not Studio tokens) */
  --font-display: 'Big Shoulders Display', 'Big Shoulders Fallback', 'Arial Narrow', Impact, sans-serif;
  --signal: #e2242b;            /* the logo red: plate O-block, active nav, rules; never small text */
  --steel: #2b2e33;             /* galvanized starting-gate grey */
  --steel-deep: #1f2226;
  --sand: #d8c49c;
  --sand-ink: #2b2e33;
  --loam: #4e3b2a;
  --plate-yellow: #f3c318;      /* live / status chips only */
  --band-alt: #ffffff;
  --band-line: #d3d6d0;
  --header-bg: #2b2e33;
  --header-fg: #ffffff;
  --header-link: #ffffff;
  --header-border: #43474e;
  --footer-bg: #2b2e33;
  --footer-fg: #f4f5f3;
  --footer-link: #ffffff;
  --footer-border: #43474e;
  --site-header-row-height: 4.5rem;
}

.dark {
  --background: #1f2226;
  --foreground: #f4f5f3;
  --card: #2b2e33;
  --card-foreground: #f4f5f3;
  --popover: #2b2e33;
  --popover-foreground: #f4f5f3;
  --primary: #ff6b70;
  --primary-foreground: #1f2226;
  --secondary: #353940;
  --secondary-foreground: #f4f5f3;
  --muted: #272a2f;
  --muted-foreground: #a9aeb6;
  --accent: #3a2a2b;
  --accent-foreground: #f4f5f3;
  --destructive: #ff8a80;
  --destructive-foreground: #1f2226;
  --border: #43474e;
  --input: #43474e;
  --ring: #ff6b70;
  --chart-1: #ff6b70;
  --chart-2: #c9cdd3;
  --chart-3: #8a909a;
  --chart-4: #d8c49c;
  --chart-5: #a58a6b;
  --sidebar: #272a2f;
  --sidebar-foreground: #f4f5f3;
  --sidebar-primary: #ff6b70;
  --sidebar-primary-foreground: #1f2226;
  --sidebar-accent: #3a2a2b;
  --sidebar-accent-foreground: #f4f5f3;
  --sidebar-border: #43474e;
  --sidebar-ring: #ff6b70;
  --band-alt: #272a2f;
  --band-line: #43474e;
  --header-bg: #2b2e33;
  --footer-bg: #2b2e33;
}

/* ------------------------------------------------------------------ base */
html { scroll-padding-top: calc(var(--site-header-height, 4.5rem) + 1rem); }
body { font-family: var(--font-sans); -webkit-font-smoothing: antialiased; }
:focus-visible { outline-color: var(--ring); }
::selection { background: var(--signal); color: #fff; }

/* Display headings: Big Shoulders, sentence case, tight leading. Scale ratio 1.25. */
main h1, main h2 { font-family: var(--font-display); font-weight: 800; line-height: 1; letter-spacing: 0; text-wrap: balance; }
main h1 { font-size: clamp(2.44rem, 1.7rem + 3vw, 3.82rem); }
main h2 { font-size: clamp(1.95rem, 1.5rem + 1.6vw, 3.05rem); }
main h3 { letter-spacing: -0.005em; }
main p, main li { max-width: 75ch; }
main [data-live-page] p, main [data-live-page] li { max-width: none; }
main > section[data-cms-section='page-heading'] { padding-block: clamp(2rem, 5vw, 3.5rem) 1.25rem; }
main > section[data-cms-section='page-heading'] [data-cms='public-intro'] { margin-top: 1rem; font-size: 1.0625rem; max-width: 46rem; }

/* ------------------------------------------------------------------ buttons (own markup) */
.amo-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 3rem; padding: 0.7rem 1.5rem;
  font-family: var(--font-sans); font-weight: 600; font-size: 1rem; line-height: 1.2; text-decoration: none;
  background: #d01f27; color: #fff; border: 2px solid #d01f27; border-radius: 0.5rem;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.amo-btn:hover { background: #a9161d; border-color: #a9161d; color: #fff; }
.amo-btn:focus-visible { outline: 3px solid #fff; outline-offset: 2px; box-shadow: 0 0 0 6px #1f2226; }
.amo-btn--ghost { background: transparent; color: #fff; border-color: rgb(255 255 255 / 0.9); }
.amo-btn--ghost:hover { background: #fff; color: #1f2226; border-color: #fff; }
.amo-btn--light { background: #fff; color: #1f2226; border-color: #fff; }
.amo-btn--light:hover { background: #1f2226; color: #fff; border-color: #1f2226; }
.amo-btn--outline { background: transparent; color: var(--foreground); border-color: var(--foreground); }
.amo-btn--outline:hover { background: var(--foreground); color: var(--background); border-color: var(--foreground); }

/* ------------------------------------------------------------------ header: gate steel, in both colour modes */
/* Mirrored by site.json participant.theme.header / .footer (checked by .checks/participant-theme.mjs). */
[data-theme-region='header'], [data-theme-region='footer'] { background-color: #2b2e33; }
[data-site-header] {
  background-color: var(--header-bg);
  color: var(--header-fg);
  border-color: var(--header-border);
  border-bottom: 3px solid var(--signal);
  --background: var(--header-bg);
  --foreground: var(--header-fg);
  --muted: rgb(255 255 255 / 0.12);
  --muted-foreground: #c9cdd3;
  --border: var(--header-border);
  --primary: #d01f27;
  --primary-foreground: #fff;
  --ring: #fff;
}
[data-site-header] img { height: 2.75rem; width: auto; max-width: 11rem; }
[data-site-header] [data-header-brand] { padding-block: 0.25rem; }
[data-site-header] :is([data-slot='navigation-menu-link'], [data-slot='navigation-menu-trigger'], [data-probe-item] > span, [data-probe-more] > span, [data-header-actions] a, [data-probe-actions] > span, [data-header-menu], [data-probe-menu]) {
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: 0;
}
[data-site-header] :is([data-slot='navigation-menu-link'], [data-slot='navigation-menu-trigger']) {
  background-color: transparent;
  color: var(--header-link);
}
[data-site-header] :is([data-slot='navigation-menu-link'], [data-slot='navigation-menu-trigger']):is(:hover, :focus-visible, [data-popup-open]) {
  background-color: rgb(255 255 255 / 0.12);
}
[data-site-header] [data-slot='navigation-menu-link'][data-active]::after { background: var(--signal); opacity: 1; height: 3px; bottom: 0.15rem; }
[data-site-header] :focus-visible { outline: 2px solid #fff; outline-offset: 2px; box-shadow: none; }
[data-site-header] [data-header-actions] a:not(:last-child) { color: var(--header-link); }
[data-site-header] [data-header-actions] a:not(:last-child):hover { background: rgb(255 255 255 / 0.12); color: #fff; }
[data-site-header] [data-header-actions] a:last-child { background: #d01f27; color: #fff; font-weight: 600; padding-inline: 1rem; }
[data-site-header] [data-header-actions] a:last-child:hover { background: #a9161d; color: #fff; }
[data-site-header] [data-header-utilities] button,
[data-site-header] [data-header-menu] { color: var(--header-link); background: transparent; }
[data-site-header] [data-header-utilities] button:hover,
[data-site-header] [data-header-menu]:hover { background: rgb(255 255 255 / 0.14); color: #fff; }
.imported-menu-popup, .imported-sheet-panel, [data-slot='navigation-menu-content'] { font-family: var(--font-sans); }

/* ------------------------------------------------------------------ footer: gate steel */
[data-cms-shared='footer-en'] { background: var(--footer-bg); color: var(--footer-fg); border-top: 3px solid var(--signal); margin-top: 0; }
.amo-footer { max-width: 80rem; margin-inline: auto; padding: 3rem 1rem 1.5rem; display: grid; gap: 2.5rem; font-size: 0.95rem; }
@media (min-width: 640px) { .amo-footer { padding-inline: 1.5rem; } }
@media (min-width: 1024px) { .amo-footer { padding-inline: 2rem; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; } }
.amo-footer a { color: var(--footer-link); text-decoration: none; }
.amo-footer a:hover { text-decoration: underline; text-underline-offset: 3px; }
.amo-footer :focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.amo-footer__logo { display: inline-block; }
.amo-footer__logo img { height: 3.5rem; width: auto; display: block; }
.amo-footer__mission { margin-top: 1.1rem; max-width: 24rem; color: #c9cdd3; line-height: 1.6; }
.amo-footer__title { font-family: var(--font-display); font-weight: 800; font-size: 1.5rem; line-height: 1; color: #fff; margin: 0 0 0.9rem; }
.amo-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.55rem; }
.amo-footer__contact { color: #c9cdd3; }
.amo-footer__apps { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; }
.amo-footer__apps img { height: 2.5rem; width: auto; }
.amo-footer aside > div { background: transparent; border: 0; box-shadow: none; padding: 0; }
.amo-footer aside [data-slot='card'] { background: transparent; box-shadow: none; padding: 0; gap: 0.75rem; color: inherit; }
.amo-footer aside [data-slot='card-title'] { font-size: 0.95rem; font-weight: 500; color: #c9cdd3; }
.amo-footer aside [data-slot='card-content'] { display: flex; flex-wrap: wrap; gap: 0.6rem; padding: 0; }
.amo-footer aside [data-slot='card-header'] { padding: 0; }
.amo-footer-base { border-top: 1px solid var(--footer-border); }
.amo-footer-base > div { max-width: 80rem; margin-inline: auto; padding: 1.25rem 1rem 1.75rem; display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; justify-content: space-between; color: #c9cdd3; font-size: 0.875rem; }
@media (min-width: 640px) { .amo-footer-base > div { padding-inline: 1.5rem; } }
@media (min-width: 1024px) { .amo-footer-base > div { padding-inline: 2rem; } }
.amo-footer-base a { color: #fff; text-decoration: underline; text-underline-offset: 3px; }

/* ------------------------------------------------------------------ home: shared helpers */
.amo-wrap { max-width: 75rem; margin-inline: auto; padding-inline: 1rem; }
@media (min-width: 640px) { .amo-wrap { padding-inline: 1.5rem; } }
@media (min-width: 1024px) { .amo-wrap { padding-inline: 2rem; } }
.amo-band { position: relative; padding-block: clamp(3rem, 6vw, 5.5rem); }
.amo-band--alt { background: var(--band-alt); }
.amo-band--steel {
  background: var(--steel); color: #f4f5f3;
  --background: #2b2e33; --foreground: #f4f5f3; --card: #1f2226; --card-foreground: #f4f5f3;
  --muted: #34383e; --muted-foreground: #c9cdd3; --border: #4a4f57; --input: #4a4f57;
  --primary: #ff6b70; --primary-foreground: #1f2226; --secondary: #353940; --secondary-foreground: #f4f5f3;
  --accent: #3a2a2b; --accent-foreground: #f4f5f3; --popover: #1f2226; --popover-foreground: #f4f5f3; --ring: #ff6b70;
}
.amo-head { max-width: 42rem; margin-bottom: clamp(1.5rem, 3vw, 2.5rem); }
.amo-head h2 { margin: 0; }
.amo-head p { margin: 0.9rem 0 0; font-size: 1.0625rem; line-height: 1.65; color: var(--muted-foreground); }
.amo-link { color: var(--primary); font-weight: 600; text-underline-offset: 3px; }

/* ------------------------------------------------------------------ home: hero */
.amo-hero {
  position: relative; isolation: isolate; overflow: hidden; color: #fff; background: var(--steel);
  min-height: clamp(34rem, 80svh, 50rem); display: flex; align-items: center;
}
.amo-hero__photo { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: 60% 40%; }
.amo-hero::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, rgb(43 46 51 / 0.96) 0%, rgb(43 46 51 / 0.82) 38%, rgb(43 46 51 / 0.2) 78%, rgb(43 46 51 / 0) 100%);
}
@media (max-width: 899px) {
  .amo-hero::before { background: linear-gradient(180deg, rgb(43 46 51 / 0.92) 0%, rgb(43 46 51 / 0.78) 100%); }
  .amo-plate { margin-left: 0.6rem; }
}
.amo-hero__inner {
  width: 100%; max-width: 75rem; margin-inline: auto; padding: 5rem 1rem 6.5rem;
  display: grid; gap: 2.5rem; align-items: center;
}
@media (min-width: 640px) { .amo-hero__inner { padding-inline: 1.5rem; } }
@media (min-width: 900px) { .amo-hero__inner { padding-inline: 2rem; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); } }
.amo-hero h1 { margin: 0; max-width: 15ch; font-size: clamp(2.8rem, 1.4rem + 4.6vw, 5.2rem); line-height: 0.95; font-weight: 800; text-shadow: 0 2px 20px rgb(0 0 0 / 0.3); }
.amo-hero__text { margin: 1.25rem 0 0; max-width: 34rem; font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.25rem); line-height: 1.55; color: #eceee9; }
.amo-hero__cta { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 1.75rem; }
.amo-hero :focus-visible { outline: 3px solid #fff; }

/* Race number plate: the 11th season as a rider number. */
.amo-plate {
  position: relative; justify-self: start; display: grid; justify-items: center; align-content: center;
  width: clamp(11.5rem, 8rem + 14vw, 20rem); padding: 2.6rem 1.25rem 1.1rem;
  background: #fff; color: var(--steel); border: 0.4rem solid var(--steel); border-radius: 1.6rem;
  transform: rotate(4deg); box-shadow: 0 0 0 0.28rem #fff, 0 18px 40px rgb(0 0 0 / 0.45);
}
@media (min-width: 900px) { .amo-plate { justify-self: center; } }
.amo-plate::before {
  content: ''; position: absolute; top: 0.7rem; left: 0.9rem; width: 3.6rem; height: 1.45rem; background: var(--signal);
  clip-path: polygon(14% 0, 100% 0, 86% 100%, 0 100%); border-radius: 0.2rem;
}
.amo-plate__number { font-family: var(--font-display); font-weight: 900; font-size: clamp(6.5rem, 3.5rem + 12vw, 12.5rem); line-height: 0.8; letter-spacing: -0.02em; }
.amo-plate__label { margin-top: 0.6rem; font-weight: 600; font-size: 0.95rem; color: #3b3f46; text-align: center; }

/* Starting gate: steel slats drop once when the page loads. */
.amo-gate { position: absolute; z-index: 1; left: 0; right: 0; bottom: 0; height: 2.6rem; pointer-events: none; }
.amo-gate::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 0.5rem; background: #1f2226; }
.amo-gate::after {
  content: ''; position: absolute; inset: 0.5rem 0 0 0; transform-origin: top;
  background: repeating-linear-gradient(90deg, var(--steel) 0 2.2rem, transparent 2.2rem 2.9rem);
  animation: amo-gate-drop 0.6s cubic-bezier(0.3, 0.9, 0.3, 1) 0.15s both;
}
@keyframes amo-gate-drop { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@media (prefers-reduced-motion: reduce) { .amo-gate::after { animation: none; } }

/* ------------------------------------------------------------------ home: story + timeline on sand */
.amo-sand {
  background-color: var(--sand); color: var(--sand-ink);
  background-image:
    repeating-linear-gradient(100deg, rgb(78 59 42 / 0.07) 0 3px, transparent 3px 26px),
    repeating-linear-gradient(100deg, rgb(78 59 42 / 0.05) 0 2px, transparent 2px 9px);
  background-position: 0 0, 40px 0;
  --foreground: #2b2e33; --muted-foreground: #4a4234; --background: #d8c49c; --primary: #8f1219; --border: #b6a37d;
}
.amo-sand .amo-head p { color: #4a4234; }
.amo-story__grid { display: grid; gap: clamp(2rem, 4vw, 3rem); }
.amo-story__body { font-size: 1.0625rem; line-height: 1.7; color: #3a2e21; max-width: 44rem; }
.amo-story__body p { margin: 0 0 0.9rem; }
.amo-timeline { list-style: none; margin: 0; padding: 0; position: relative; display: grid; gap: 1.75rem; overflow-x: clip; }
.amo-timeline::before { content: ''; position: absolute; left: 0.55rem; top: 0.3rem; bottom: 0.3rem; width: 4px; background: var(--steel); border-radius: 2px; }
.amo-timeline__item { position: relative; padding-left: 2.4rem; }
.amo-timeline__item::before { content: ''; position: absolute; left: 0; top: 0.35rem; width: 1.3rem; height: 1.3rem; background: #fff; border: 4px solid var(--steel); border-radius: 0.3rem; box-sizing: border-box; }
.amo-timeline__item--now::before { background: var(--signal); border-color: var(--steel); }
.amo-timeline__year { display: block; font-family: var(--font-display); font-weight: 900; font-size: 2.44rem; line-height: 1; color: var(--steel); }
.amo-timeline__title { margin: 0.3rem 0 0.15rem; font-weight: 700; font-size: 1.0625rem; color: var(--steel); }
.amo-timeline__text { margin: 0; line-height: 1.55; color: #3a2e21; }
@media (min-width: 40rem) {
  /* every entry draws its own marker and its own piece of the track, so any number of entries wraps cleanly */
  .amo-timeline { grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); gap: 2.25rem 1.5rem; }
  .amo-timeline::before { display: none; }
  .amo-timeline__item { padding: 2rem 0 0; }
  .amo-timeline__item::before { top: 0; left: 0; }
  .amo-timeline__item::after { content: ''; position: absolute; top: 0.5rem; left: 1.3rem; right: -1.5rem; height: 4px; background: var(--steel); }
  .amo-timeline__item:last-child::after { display: none; }
}

/* ------------------------------------------------------------------ home: series (one feature, three compact) */
.amo-series__grid { display: grid; gap: clamp(1.5rem, 3vw, 2.5rem); }
@media (min-width: 900px) { .amo-series__grid { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); align-items: stretch; } }
.amo-feature {
  position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; gap: 0.9rem;
  min-height: 21rem; padding: clamp(1.5rem, 3vw, 2.5rem); background: var(--steel); color: #fff; border-radius: 0.25rem;
}
.amo-feature::before {
  content: ''; position: absolute; right: -0.5rem; top: -1rem; width: 9rem; height: 6.5rem; background: var(--signal); opacity: 0.95;
  clip-path: polygon(14% 0, 100% 0, 86% 100%, 0 100%);
}
.amo-feature__rounds { position: relative; margin: 0; font-family: var(--font-display); font-weight: 900; font-size: 1.95rem; line-height: 1; color: #fff; }
.amo-feature h3 { margin: 0; font-family: var(--font-display); font-weight: 800; font-size: clamp(2.44rem, 1.7rem + 2.5vw, 3.82rem); line-height: 0.98; letter-spacing: 0; }
.amo-feature p { margin: 0; max-width: 32rem; line-height: 1.6; color: #e1e4e8; }
.amo-feature .amo-btn { align-self: flex-start; margin-top: 0.4rem; }
.amo-series__list { list-style: none; margin: 0; padding: 0; border-top: 3px solid var(--steel); }
.amo-series__item { padding: 1.25rem 0; border-bottom: 1px solid var(--band-line); }
.amo-series__item:last-child { border-bottom: 0; }
.amo-series__name { margin: 0; font-family: var(--font-display); font-weight: 800; font-size: 1.95rem; line-height: 1.02; color: var(--foreground); }
.amo-series__text { margin: 0.35rem 0 0.6rem; color: var(--muted-foreground); line-height: 1.55; }
.amo-series__link { font-weight: 600; color: var(--primary); text-underline-offset: 3px; }
.amo-series__link:hover { text-decoration-thickness: 2px; }

/* ------------------------------------------------------------------ home: race center (gate steel) */
.amo-race__stack { display: grid; gap: 2.5rem; }
.amo-race section { padding-block: 0; }
.amo-race [data-imported-schedule], .amo-race [data-imported-standings] { background: transparent; }

/* ------------------------------------------------------------------ home: news line */
.amo-news { padding-block: clamp(2.5rem, 5vw, 4rem); border-bottom: 1px solid var(--band-line); }
.amo-news__row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.25rem 2rem; }
.amo-news__row h2 { margin: 0; font-size: clamp(1.95rem, 1.5rem + 1.6vw, 2.44rem); }
.amo-news__row p { margin: 0.5rem 0 0; color: var(--muted-foreground); max-width: 40rem; }

/* ------------------------------------------------------------------ home: partners */
.amo-partners { padding-block: clamp(2.5rem, 5vw, 4rem) clamp(1.5rem, 3vw, 2.5rem); }
.amo-partners .amo-head { margin-bottom: 1.25rem; }
.dark .amo-partners .sponsor-banner img { background: #fff; padding: 0.4rem 0.6rem; border-radius: 0.25rem; opacity: 1; }
.amo-partners .sponsor-banner { background: transparent; border-block: 1px solid var(--band-line); }

/* ------------------------------------------------------------------ home: membership band (logo red) */
.amo-join { background: var(--signal); color: #fff; padding-block: clamp(2.5rem, 5vw, 4rem); }
.amo-join__grid { display: grid; gap: 1.25rem 2rem; align-items: center; }
@media (min-width: 860px) { .amo-join__grid { grid-template-columns: 1fr auto; } }
.amo-join h2 { margin: 0; color: #fff; font-size: clamp(2.44rem, 1.7rem + 2.5vw, 3.82rem); }
.amo-join p { margin: 0.7rem 0 0; font-size: 1.125rem; line-height: 1.5; max-width: 36rem; color: #fff; }
.amo-join .amo-btn { background: #fff; color: #1f2226; border-color: #fff; }
.amo-join .amo-btn:hover { background: #1f2226; color: #fff; border-color: #1f2226; }

/* ------------------------------------------------------------------ home: existing blocks, restyled */
.amo-band-faq { background: var(--band-alt); }
[data-livelaps='imported-announcements'] { border-bottom: 3px solid var(--signal); }
[data-imported-contact] [data-slot='button'][type='submit'] { background: #d01f27; color: #fff; font-weight: 600; min-height: 2.75rem; }
[data-imported-contact] [data-slot='button'][type='submit']:hover { background: #a9161d; }

/* ------------------------------------------------------------------ home: existing blocks, restyled */
main [data-imported-testimonials] { background: var(--background); }
main [data-imported-testimonials] [data-testimonials-slide] blockquote { font-size: clamp(1.2rem, 1rem + 0.8vw, 1.65rem); font-weight: 500; line-height: 1.5; }
[data-slot='accordion-item'] { border-color: var(--border); }
[data-slot='accordion-trigger'], [data-slot='accordion-item'] button { font-weight: 600; }
[data-imported-contact-info] [data-slot='card'] { border-top: 4px solid var(--signal); border-radius: var(--radius); }

/* ------------------------------------------------------------------ news / articles (long form) */
main .prose { --tw-prose-body: var(--foreground); max-width: 72ch; }
main .prose h2, main .prose h3 { font-family: var(--font-display); margin-top: 2rem; }
main .prose h2 { font-size: 2.44rem; } main .prose h3 { font-size: 1.95rem; font-weight: 800; }
main .prose img, main article img { border-radius: var(--radius); width: 100%; height: auto; }
main .prose a { color: var(--primary); text-underline-offset: 3px; }
main .prose p, main .prose li { line-height: 1.75; }
.dark main .prose { --tw-prose-body: var(--foreground); }
main [data-slot='card'] { border-radius: var(--radius); }
main nav[aria-label='Blog sections'] a { border-radius: 0.375rem; font-weight: 600; }

/* ------------------------------------------------------------------ reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}
@media print {
  .amo-gate { display: none; }
}

/* Rules accordion: chapter titles keep the body face (their source text is long and capitalised). */
[data-imported-rules] [data-slot='collapsible-trigger'] :is(h2, h3), [data-imported-rules] [data-slot='accordion-trigger'] :is(h2, h3) { font-family: var(--font-sans); font-size: 1.125rem; font-weight: 600; line-height: 1.35; }

/* ------------------------------------------------------------------ AMO News: list and article pages (generated from the content library) */
.amo-nl [hidden], .amo-art [hidden] { display: none !important; }
.amo-wrap--read { max-width: 50rem; }
.amo-meta { display: flex; flex-wrap: wrap; gap: 0.25rem 0.9rem; margin: 0; font-size: 0.9375rem; color: var(--muted-foreground); }
.amo-meta > * + *::before { content: ''; display: inline-block; width: 0.3rem; height: 0.3rem; margin-right: 0.9rem; vertical-align: middle; border-radius: 50%; background: var(--signal); }
.amo-chip { display: inline-block; padding: 0.5rem 0.95rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); color: var(--foreground); font-weight: 600; font-size: 0.9375rem; text-decoration: none; white-space: nowrap; }
.amo-chip:hover { border-color: var(--foreground); }
.amo-chip[aria-current='page'] { background: var(--steel); border-color: var(--steel); color: #fff; }
.dark .amo-chip[aria-current='page'] { background: var(--foreground); border-color: var(--foreground); color: var(--background); }

.amo-nl__head { padding-block: clamp(2rem, 5vw, 3.5rem) 1rem; }
.amo-nl__head h1 { margin: 0; }
.amo-nl__intro { margin: 1rem 0 0; font-size: 1.0625rem; max-width: 46rem; }
.amo-nl__count { margin: 0.9rem 0 0; color: var(--muted-foreground); }
.amo-nl__tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.9rem 1.5rem; padding-block: 0.75rem 1.25rem; }
.amo-nl__filters { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.amo-field { display: inline-flex; align-items: center; gap: 0.6rem; font-weight: 600; font-size: 0.9375rem; }
.amo-field select { min-height: 2.5rem; padding: 0.4rem 0.8rem; border: 1px solid var(--input); border-radius: var(--radius); background: var(--card); color: var(--foreground); font: inherit; font-weight: 500; }
.amo-nl__results { padding-bottom: clamp(3rem, 6vw, 5rem); }
.amo-nl__status { margin: 0 0 1rem; min-height: 1.4em; font-weight: 600; }

.amo-nf { display: grid; border-top: 4px solid var(--steel); background: var(--card); border-radius: 0 0 var(--radius) var(--radius); box-shadow: var(--shadow-sm); overflow: hidden; margin-bottom: clamp(1.5rem, 3vw, 2.5rem); }
.amo-nf__cover { display: block; background: var(--muted); }
.amo-nf__cover img { display: block; width: 100%; height: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.amo-nf__body { padding: clamp(1.25rem, 3vw, 2.25rem); display: flex; flex-direction: column; gap: 0.9rem; justify-content: center; }
.amo-nf__title { margin: 0; font-size: clamp(1.95rem, 1.4rem + 2vw, 3.05rem); overflow-wrap: anywhere; }
.amo-nf__title a, .amo-nr__title a { color: inherit; text-decoration: none; }
.amo-nf__title a:hover, .amo-nr__title a:hover { color: var(--primary); text-decoration: underline; text-underline-offset: 4px; }
.amo-nf__summary { margin: 0; font-size: 1.0625rem; line-height: 1.65; color: var(--muted-foreground); }
.amo-nf__body p:last-child { margin: 0; }
@media (min-width: 62rem) { .amo-nf { grid-template-columns: 1.15fr 1fr; } .amo-nf__cover img { aspect-ratio: auto; min-height: 22rem; } }

.amo-nl__list { list-style: none; margin: 0; padding: 0; }
.amo-nl__yearhead { padding: 2rem 0 0.6rem; border-bottom: 3px solid var(--steel); max-width: none; }
.dark .amo-nl__yearhead { border-color: var(--border); }
.amo-nl__yearhead h2 { margin: 0; font-family: var(--font-display); font-weight: 900; font-size: 2.44rem; line-height: 1; }
.amo-nr { display: grid; grid-template-columns: 1fr; gap: 0.9rem 1.5rem; align-items: start; padding: 1.25rem 0; border-bottom: 1px solid var(--band-line); max-width: none; }
.amo-nr__body { display: grid; gap: 0.4rem; min-width: 0; }
.amo-nr__title { margin: 0; font-family: var(--font-sans); font-weight: 700; font-size: 1.1875rem; line-height: 1.3; overflow-wrap: anywhere; }
.amo-nr__summary { margin: 0; color: var(--muted-foreground); line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.amo-nr__thumb { display: block; }
.amo-nr__thumb img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: var(--radius); background: var(--muted); }
.amo-nl__empty { padding: 2rem 0; color: var(--muted-foreground); }
@media (min-width: 40rem) {
  .amo-nr { grid-template-columns: 1fr 9.5rem; }
  .amo-nr__thumb { order: 2; }
  .amo-nr__thumb img { aspect-ratio: 4 / 3; }
}

.amo-art__head { padding-block: clamp(1.75rem, 4vw, 3rem) 1.25rem; }
.amo-art__back { margin: 0 0 1.25rem; }
.amo-art__back a { color: var(--primary); font-weight: 600; text-underline-offset: 3px; }
.amo-art__head h1 { margin: 0.9rem 0 0; font-size: clamp(2.2rem, 1.5rem + 3.4vw, 3.82rem); text-wrap: balance; overflow-wrap: anywhere; }
.amo-art__cover { margin-block: 0.5rem 1.5rem; }
.amo-art__cover img { display: block; width: 100%; max-height: 30rem; aspect-ratio: 16 / 9; object-fit: cover; object-position: center 35%; border-radius: var(--radius); background: var(--muted); }
.amo-art__body { font-size: 1.0625rem; line-height: 1.75; overflow-wrap: anywhere; }
.amo-art__body > * { margin: 0 0 1.1rem; max-width: 70ch; }
.amo-art__body h2, .amo-art__body h3, .amo-art__body h4 { font-family: var(--font-display); font-weight: 800; line-height: 1.05; margin: 2.2rem 0 0.8rem; text-wrap: balance; }
.amo-art__body h2 { font-size: 2.44rem; }
.amo-art__body h3 { font-size: 1.95rem; }
.amo-art__body h4 { font-size: 1.56rem; }
.amo-art__body a { color: var(--primary); text-underline-offset: 3px; }
.amo-art__body a:hover { text-decoration-thickness: 2px; }
.amo-art__body ul, .amo-art__body ol { padding-left: 1.4rem; }
.amo-art__body li { max-width: 70ch; margin-bottom: 0.35rem; }
.amo-art__body blockquote { padding: 0.2rem 0 0.2rem 1.1rem; border-left: 4px solid var(--signal); color: var(--muted-foreground); }
.amo-art__body hr { border: 0; border-top: 1px solid var(--band-line); margin-block: 2rem; max-width: none; }
.amo-art__body img { display: block; width: 100%; max-width: none; height: auto; border-radius: var(--radius); }
.amo-art__body p:has(> img) { max-width: none; margin-block: 1.5rem; }
.amo-art__body table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; font-size: 0.9375rem; line-height: 1.45; margin-block: 1.5rem; }
.amo-art__body td, .amo-art__body th { padding: 0.45rem 0.7rem; border: 1px solid var(--band-line); vertical-align: top; text-align: left; min-width: 4rem; }
.amo-art__body td img { min-width: 6rem; }
.amo-art__body a[data-video] { display: flex; align-items: center; gap: 1rem; max-width: 36rem; padding: 0.75rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); color: var(--foreground); font-weight: 700; text-decoration: none; }
.amo-art__body a[data-video]::before { content: ''; flex: none; width: 3.25rem; height: 3.25rem; border-radius: 50%; background: var(--signal) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M9 6.5v11l9-5.5z'/%3E%3C/svg%3E") center / 62% no-repeat; }
.amo-art__body a[data-video]:hover { border-color: var(--foreground); }
.amo-video__thumb { flex: none; width: 10rem; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 0.25rem; background: var(--steel); }
.amo-art__body a[data-video] .amo-video__thumb img { width: 100%; height: 100%; object-fit: cover; border-radius: 0; }
.amo-art__body a[data-video]:has(.amo-video__thumb) { display: grid; grid-template-columns: auto 1fr 10rem; }
.amo-art__body a[data-video] .amo-video__thumb { grid-column: 3; grid-row: 1; }
@media (max-width: 34rem) {
  .amo-art__body a[data-video]:has(.amo-video__thumb) { grid-template-columns: auto 1fr; }
  .amo-art__body a[data-video] .amo-video__thumb { grid-column: 1 / -1; grid-row: 2; width: 100%; }
}
.amo-art__foot { padding-block: 1.5rem 4rem; }

/* ------------------------------------------------------------------ home: latest articles, footer social */
.amo-news__items { list-style: none; margin: clamp(1.5rem, 3vw, 2.25rem) 0 0; padding: 0; display: grid; gap: 1.5rem; }
.amo-newsitem { position: relative; display: grid; gap: 0.5rem; align-content: start; max-width: none; }
.amo-newsitem__img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; border-radius: var(--radius); background: var(--muted); }
.amo-newsitem__date { margin: 0.35rem 0 0; font-size: 0.9375rem; color: var(--muted-foreground); }
.amo-newsitem__link { font-weight: 700; font-size: 1.125rem; line-height: 1.3; color: var(--foreground); text-decoration: none; overflow-wrap: anywhere; }
.amo-newsitem__link::after { content: ''; position: absolute; inset: 0; }
.amo-newsitem__link:hover { color: var(--primary); text-decoration: underline; text-underline-offset: 3px; }
@media (min-width: 48rem) { .amo-news__items { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; } }

/* Menus opened from the header: body-level dropdowns/mobile sheet and the in-header theme menu. */
:is(.imported-menu-popup, .imported-sheet-panel, [data-slot="navigation-menu-content"], [data-slot="sheet-content"]) :is(a, button, summary, [role="button"]):focus-visible,
[role="menu"] [role^="menuitem"]:focus-visible { outline: 3px solid currentColor; outline-offset: -3px; box-shadow: none; }
