/* ==========================================================================
   bowlingmalaysia.com — main stylesheet
   Layers: reset → base → layout → components → utilities
   The block between @critical-start and @critical-end is also inlined into
   every page <head> by the build script (see README).
   ========================================================================== */

/* @critical-start */
@layer reset, base, layout, components, utilities;

@font-face {
  font-family: "Anybody";
  font-style: normal;
  font-weight: 400 900;
  font-stretch: 50% 150%;
  font-display: swap;
  src: url("../fonts/anybody-var.woff2") format("woff2");
}
@font-face {
  font-family: "Atkinson Hyperlegible";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/atkinson-400.woff2") format("woff2");
}
@font-face {
  font-family: "Atkinson Hyperlegible";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/atkinson-700.woff2") format("woff2");
}
@font-face {
  font-family: "Atkinson Hyperlegible";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/atkinson-400i.woff2") format("woff2");
}

/* ---- Design tokens ---------------------------------------------------- */
:root {
  /* palette: approach carpet navy, lane maple, pin white, pin-stripe red */
  --navy: #13223f;
  --navy-deep: #0b1630;
  --navy-soft: #24375e;
  --maple: #e0b277;
  --maple-pale: #f6e9d3;
  --maple-dark: #8a5626;
  --pin: #ffffff;
  --red: #c8102e;
  --red-bright: #ff3b4e;

  --bg: var(--pin);
  --surface: #faf6ef;
  --surface-2: var(--maple-pale);
  --text: #16223a;
  --muted: #4d5872;
  --line: #e4d9c6;
  --link: #1b3d8f;
  --accent: var(--red);
  --on-accent: #ffffff;
  --board-line: rgba(138, 86, 38, 0.13);

  --font-display: "Anybody", "Arial Black", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Atkinson Hyperlegible", "Segoe UI", Roboto, Arial, sans-serif;

  /* fluid type scale (ratio ≈ 1.25 on mobile → 1.333 on desktop) */
  --step--1: clamp(0.84rem, 0.82rem + 0.1vw, 0.9rem);
  --step-0: clamp(1.02rem, 0.98rem + 0.2vw, 1.13rem);
  --step-1: clamp(1.25rem, 1.17rem + 0.4vw, 1.5rem);
  --step-2: clamp(1.5rem, 1.35rem + 0.75vw, 2rem);
  --step-3: clamp(1.85rem, 1.55rem + 1.4vw, 2.75rem);
  --step-4: clamp(2.2rem, 1.7rem + 2.6vw, 4rem);
  --step-5: clamp(2.6rem, 1.8rem + 4vw, 5.6rem);

  --space-xs: 0.5rem;
  --space-s: 1rem;
  --space-m: 1.5rem;
  --space-l: clamp(2rem, 1.5rem + 2vw, 3rem);
  --space-xl: clamp(3rem, 2rem + 4vw, 5.5rem);

  --measure: 68ch;
  --wrap: 1200px;
  --gutter: clamp(1rem, 0.5rem + 2.5vw, 2.5rem);
  --header-h: 4rem;
  --radius-board: 4px;
  --radius-ball: 999px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c1529;
    --surface: #131f3a;
    --surface-2: #1d2033;
    --text: #efe9df;
    --muted: #b6bccb;
    --line: #2b3a5e;
    --link: #9cc0ff;
    --accent: var(--red-bright);
    --on-accent: #0b1630;
    --maple-pale: #2a2219;
    --board-line: rgba(224, 178, 119, 0.08);
    }
}

@layer reset {
  *, *::before, *::after { box-sizing: border-box; }
  * { margin: 0; }
  html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
  img, picture, svg, video { display: block; max-width: 100%; height: auto; }
  input, button, select, textarea { font: inherit; }
  p, h1, h2, h3, h4, li, td, th { overflow-wrap: break-word; }
}

@layer base {
  html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 1rem); }
  body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: var(--step-0);
    line-height: 1.6;
    overflow-x: clip;
  }
  h1, h2, h3, h4 {
    font-family: var(--font-display);
    line-height: 1.08;
    letter-spacing: -0.01em;
    text-wrap: balance;
  }
  h1 { font-size: clamp(1.85rem, 1.45rem + 1.7vw, 3rem); font-weight: 600; font-stretch: 120%; }
  h2 { font-size: var(--step-2); font-weight: 780; font-stretch: 110%; }
  h3 { font-size: var(--step-1); font-weight: 720; font-stretch: 104%; }
  h4 { font-size: var(--step-0); font-weight: 700; }
  a { color: var(--link); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
  a:hover { text-decoration-thickness: 2px; }
  :focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
  strong { font-weight: 700; }
  @media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation: none !important; transition: none !important; }
  }
}

@layer layout {
  .wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
}

@layer components {
  /* skip link */
  .skip-link {
    position: absolute; left: 1rem; top: -4rem; z-index: 100;
    background: var(--accent); color: var(--on-accent);
    padding: 0.6rem 1rem; font-weight: 700; text-decoration: none;
  }
  .skip-link:focus { top: 0.75rem; }

  /* ---- site header ---------------------------------------------------- */
  .site-header {
    position: sticky; top: 0; z-index: 50;
    background: var(--navy-deep);
    color: #fff;
    border-bottom: 3px solid var(--maple);
  }
  .site-header .wrap {
    display: flex; align-items: center; justify-content: space-between;
    gap: 1rem; min-height: var(--header-h);
  }
  .brand {
    display: inline-flex; align-items: center; gap: 0.6rem;
    color: #fff; text-decoration: none;
    font-family: var(--font-display); font-weight: 820; font-stretch: 120%;
    font-size: 1.15rem; letter-spacing: -0.01em;
  }
  .brand svg { width: 2.2rem; height: 2.2rem; flex: none; }
  .brand span span { color: var(--maple); }
  .nav-toggle { position: absolute; opacity: 0; width: 1px; height: 1px; }
  .nav-button {
    display: inline-flex; align-items: center; gap: 0.5rem;
    cursor: pointer; padding: 0.5rem 0.75rem; border: 2px solid var(--navy-soft);
    border-radius: var(--radius-board); font-weight: 700; color: #fff;
  }
  .nav-button .bars, .nav-button .bars::before, .nav-button .bars::after {
    display: block; width: 18px; height: 2px; background: currentColor; position: relative;
  }
  .nav-button .bars::before, .nav-button .bars::after { content: ""; position: absolute; left: 0; }
  .nav-button .bars::before { top: -6px; }
  .nav-button .bars::after { top: 6px; }
  .nav-toggle:focus-visible + .nav-button { outline: 3px solid var(--maple); outline-offset: 2px; }
  .site-nav { display: none; }
  .nav-toggle:checked ~ .site-nav {
    display: block; position: absolute; inset: calc(var(--header-h) + 3px) 0 auto 0;
    background: var(--navy-deep); padding: 0.5rem var(--gutter) 1.5rem;
    max-height: calc(100dvh - var(--header-h)); overflow-y: auto;
    border-bottom: 3px solid var(--maple);
  }
  .site-nav ul { list-style: none; padding: 0; display: grid; gap: 0.15rem; }
  .site-nav a {
    display: block; color: #fff; text-decoration: none; padding: 0.6rem 0.25rem;
    border-bottom: 1px solid var(--navy-soft); font-weight: 700;
  }
  .site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--maple); }
  @media (min-width: 1080px) {
    .nav-button { display: none; }
    .site-nav, .nav-toggle:checked ~ .site-nav {
      display: block; position: static; padding: 0; background: none; border: 0; max-height: none; overflow: visible;
    }
    .site-nav ul { display: flex; gap: 0.1rem; }
    .site-nav a { border: 0; padding: 0.5rem 0.6rem; font-size: 0.95rem; border-radius: var(--radius-board); }
    .site-nav a:hover { background: var(--navy-soft); }
    .site-nav a[aria-current="page"] { box-shadow: inset 0 -3px 0 var(--maple); border-radius: 0; }
  }

  .lane-progress { display: none; } /* enabled in motion.css */

  /* ---- breadcrumbs ---------------------------------------------------- */
  .breadcrumbs ol {
    list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 0.25rem 0.5rem;
    font-size: var(--step--1);
  }
  .breadcrumbs li + li::before { content: "/"; margin-right: 0.5rem; opacity: 0.6; }
  .breadcrumbs a { color: inherit; }

  /* ---- home hero ------------------------------------------------------ */
  .hero {
    position: relative; isolation: isolate; color: #fff;
    background-color: var(--navy-deep);
    min-height: min(88vh, 760px);
    display: grid; align-items: center;
    padding-block: var(--space-xl);
    overflow: hidden;
  }
  /* photo on its own layer so the parallax in motion.css only moves a composited layer
     (background-attachment: fixed repaints on every scroll frame and made scrolling stutter) */
  .hero::before {
    content: ""; position: absolute; z-index: -1; inset: 0;
    background-image: linear-gradient(100deg, rgba(8, 15, 33, 0.94) 0%, rgba(8, 15, 33, 0.82) 45%, rgba(8, 15, 33, 0.62) 100%), url("../images/hero-lane-mobile.jpg");
    background-size: cover; background-position: center;
  }
  @media (min-width: 900px) {
    .hero::before { background-image: linear-gradient(100deg, rgba(8, 15, 33, 0.94) 0%, rgba(8, 15, 33, 0.82) 45%, rgba(8, 15, 33, 0.62) 100%), url("../images/hero-lane-banner.jpg"); }
  }
  .hero .wrap { display: grid; gap: var(--space-l); align-items: center; }
  @media (min-width: 900px) { .hero .wrap { grid-template-columns: 1.25fr 0.75fr; } }
  .hero h1 { font-size: clamp(2.2rem, 1.6rem + 2.8vw, 4rem); font-weight: 600; font-stretch: 130%; max-width: 15ch; }
  .hero p.hero-sub { font-size: var(--step-1); max-width: 40ch; margin-top: var(--space-m); color: #e9e2d5; }
  .hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: var(--space-l); }

  .btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
    min-height: 3rem; padding: 0.7rem 1.4rem;
    font-weight: 700; text-decoration: none; border-radius: var(--radius-ball);
    border: 2px solid transparent; line-height: 1.2;
  }
  .btn-primary { background: var(--red); color: #fff; }
  .btn-primary:hover { background: #a50c25; }
  .btn-ghost { border-color: rgba(255, 255, 255, 0.7); color: #fff; }
  .btn-ghost:hover { background: rgba(255, 255, 255, 0.12); }

  /* the lane: a 3D CSS lane; pins stand up off the deck and a ball hooks into the pocket */
  .hero-lane { display: none; }
  @media (min-width: 900px) {
    .hero-lane { display: block; position: relative; height: 460px; perspective: 600px; perspective-origin: 50% 0%; }
    .hero-lane .lane-surface {
      position: absolute; left: 22%; right: 22%; bottom: 0; height: 190%;
      transform: rotateX(64deg); transform-origin: bottom center; transform-style: preserve-3d;
      background:
        repeating-linear-gradient(90deg, rgba(120, 70, 25, 0.25) 0 1px, transparent 1px calc(100% / 13)),
        linear-gradient(180deg, #a86d34, #ddb075 45%, #f0d09c);
      border-left: 12px solid #141c30; border-right: 12px solid #141c30;
    }
    .hero-lane .lane-surface::after {
      content: ""; position: absolute; left: 4%; right: 4%; bottom: 22%; height: 9%;
      background: url("../svg/lane-arrows.svg") center / 100% 100% no-repeat; opacity: 0.8;
    }
    .hero-lane .pin {
      position: absolute; width: 10%; aspect-ratio: 2 / 5; margin-left: -5%;
      background: url("../svg/pin.svg") center bottom / contain no-repeat;
      transform: rotateX(-64deg); transform-origin: bottom center;
    }
    /* the track covers the whole lane; translating it (a % of the lane) moves the ball on the compositor */
    .hero-lane .ball-track {
      position: absolute; inset: 0; transform-style: preserve-3d;
      animation: hero-roll 3.6s cubic-bezier(0.3, 0.15, 0.35, 1) 0.5s both;
    }
    .hero-lane .ball {
      position: absolute; left: 62%; bottom: 0; width: 15%; aspect-ratio: 1; margin-left: -7.5%; border-radius: 50%;
      transform: rotateX(-64deg); transform-origin: bottom center;
      background: radial-gradient(circle at 32% 28%, #ff9aa4 0 6%, var(--red) 30%, #5b0612 78%);
      box-shadow: inset -6px -8px 14px rgba(0, 0, 0, 0.45);
    }
  }
  /* lane-plane coordinates: bottom = foul line, top = pin deck */
  @keyframes hero-roll {
    0% { transform: translate(0, 0); }
    55% { transform: translate(14%, -52%); }
    85% { transform: translate(1%, -80%); }
    100% { transform: translate(-6%, -87.5%); }
  }

  /* ---- inner page header ---------------------------------------------- */
  .page-head {
    background:
      repeating-linear-gradient(90deg, transparent 0 calc(100% / 39 - 1px), rgba(255, 255, 255, 0.04) calc(100% / 39 - 1px) calc(100% / 39)),
      linear-gradient(160deg, var(--navy-deep), var(--navy) 70%, #1d3156);
    color: #fff;
    padding-block: var(--space-l) var(--space-l);
  }
  .page-head .wrap { display: grid; gap: var(--space-m); align-items: center; }
  @media (min-width: 900px) {
    .page-head.has-image .wrap { grid-template-columns: 1.2fr 0.8fr; }
  }
  .page-head .breadcrumbs { color: #d8cfbf; margin-bottom: var(--space-s); }
  .page-head h1 { max-width: 22ch; }
  .page-head .standfirst { margin-top: var(--space-s); font-size: var(--step-1); color: #e9e2d5; max-width: 52ch; line-height: 1.45; }
  .page-meta { margin-top: var(--space-s); font-size: var(--step--1); color: #c8c0b2; display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; }
  .page-head figure img {
    width: 100%; aspect-ratio: 3 / 2; object-fit: cover;
    border-radius: var(--radius-board);
    border-bottom: 6px solid var(--maple);
  }
}
/* @critical-end */

/* ---- layout: article with side rail ------------------------------------ */
@layer layout {
  .page-body { padding-block: var(--space-l) var(--space-xl); }
  .page-grid { display: grid; gap: var(--space-l); grid-template-columns: minmax(0, 1fr); }
  @media (min-width: 1024px) {
    .page-grid.with-rail { grid-template-columns: minmax(0, 1fr) 280px; align-items: start; }
  }
  .rail { display: grid; gap: var(--space-m); }
  @media (min-width: 1024px) { .rail { position: sticky; top: calc(var(--header-h) + 1.5rem); } }
  .section-band { padding-block: var(--space-xl); }
  .section-band.wood { background: var(--surface-2); }
  .wood {
    background-image:
      repeating-linear-gradient(90deg, transparent 0 39px, var(--board-line) 39px 40px),
      linear-gradient(180deg, rgba(255, 255, 255, 0.0), rgba(138, 86, 38, 0.05));
  }
}

/* ---- prose ------------------------------------------------------------ */
@layer components {
  .prose { max-width: var(--measure); }
  .page-grid.with-rail .prose { max-width: none; }
  .prose > * + *, .prose section > * + * { margin-top: 1.1em; }
  .prose > section, .prose section + section { margin-top: var(--space-l); }
  .prose h2 { margin-top: 1.6em; }
  .prose section > h2:first-child { margin-top: 0; }
  .prose h3 { margin-top: 1.5em; }
  .prose :is(h2, h3) + * { margin-top: 0.6em; }
  .prose ul, .prose ol { padding-left: 1.3em; }
  .prose li + li { margin-top: 0.4em; }
  .prose li::marker { color: var(--maple-dark); font-weight: 700; }
  .prose > p:first-of-type, .prose .lead { font-size: var(--step-1); line-height: 1.5; }
  .prose blockquote { border-left: 4px solid var(--maple); padding-left: 1rem; font-style: italic; }
  @media (prefers-color-scheme: dark) { .prose li::marker { color: var(--maple); } }


  /* figures */
  .figure img { width: 100%; height: auto; border-radius: var(--radius-board); }
  .figure figcaption { font-size: var(--step--1); color: var(--muted); margin-top: 0.5rem; }

  /* tables: wrapper scrolls, first column sticks on narrow screens */
  .table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-board); }
  .table-wrap:focus-visible { outline-offset: 2px; }
  table { border-collapse: collapse; width: 100%; min-width: 540px; font-size: 0.95em; }
  caption { text-align: left; padding: 0.75rem 1rem; font-weight: 700; caption-side: top; }
  th, td { padding: 0.65rem 0.9rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
  thead th { background: var(--navy); color: #fff; font-family: var(--font-display); font-stretch: 105%; font-weight: 700; }
  tbody tr:nth-child(even) { background: var(--surface); }
  tbody th { font-weight: 700; }
  @media (max-width: 760px) {
    tbody th:first-child, tbody td:first-child, thead th:first-child {
      position: sticky; left: 0; z-index: 1; background: var(--bg);
      box-shadow: 1px 0 0 var(--line);
    }
    thead th:first-child { background: var(--navy); }
    tbody tr:nth-child(even) > :first-child { background: var(--surface); }
  }

  /* callouts */
  .callout {
    border-left: 6px solid var(--maple-dark); background: var(--surface);
    padding: 1rem 1.2rem; border-radius: 0 var(--radius-board) var(--radius-board) 0;
  }
  .callout > * + * { margin-top: 0.6em; }
  .callout-title { font-family: var(--font-display); font-weight: 750; font-stretch: 110%; display: flex; align-items: center; gap: 0.5rem; }
  .callout-title::before {
    content: ""; width: 1.1rem; height: 1.1rem; flex: none;
    background: url("../svg/pin.svg") center / contain no-repeat;
  }
  .callout.warning { border-left-color: var(--red); }
  .callout.warning .callout-title::before { background-image: url("../svg/warning.svg"); }
  @media (prefers-color-scheme: dark) { .callout { border-left-color: var(--maple); } }

  /* key facts box */
  .facts { display: grid; gap: 0; border: 2px solid var(--navy); border-radius: var(--radius-board); }
  .facts div { display: grid; grid-template-columns: 11rem 1fr; gap: 1rem; padding: 0.6rem 1rem; border-bottom: 1px solid var(--line); }
  .facts div:last-child { border-bottom: 0; }
  .facts dt { font-weight: 700; }
  .facts dd { margin: 0; }
  @media (max-width: 520px) { .facts div { grid-template-columns: 1fr; gap: 0.1rem; } }
  @media (prefers-color-scheme: dark) { .facts { border-color: var(--line); } }

  /* lane-arrow divider */
  .divider {
    height: 28px; margin-block: var(--space-l);
    background: url("../svg/lane-arrows-divider.svg") center / auto 100% no-repeat;
    border: 0;
  }

  /* rail boxes */
  .rail-box { border-top: 4px solid var(--maple); background: var(--surface); padding: 1rem 1.1rem; border-radius: 0 0 var(--radius-board) var(--radius-board); }
  .rail-box h2 { font-size: var(--step-0); font-stretch: 110%; margin-bottom: 0.6rem; }
  .rail-box ul { list-style: none; padding: 0; display: grid; gap: 0.15rem; font-size: 0.95rem; }
  .rail-box li a { display: block; padding: 0.3rem 0; }
  .toc ol { padding-left: 1.2rem; font-size: 0.95rem; display: grid; gap: 0.3rem; }

  /* ---- cards ---------------------------------------------------------- */
  .card-grid { display: grid; gap: var(--space-m); grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
  .card {
    position: relative; display: flex; flex-direction: column;
    background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-board);
    overflow: hidden;
  }
  .card img { aspect-ratio: 3 / 2; object-fit: cover; width: 100%; }
  .card-body { padding: 1rem 1.1rem 1.2rem; display: grid; gap: 0.45rem; }
  .card h3 { font-size: var(--step-1); }
  .card h3 a { color: inherit; text-decoration: none; }
  .card h3 a::after { content: ""; position: absolute; inset: 0; }
  .card:hover { border-color: var(--maple-dark); }
  .card:hover h3 a { text-decoration: underline; }
  .card:focus-within { outline: 3px solid var(--accent); outline-offset: 2px; }
  .card p { color: var(--muted); font-size: 0.97rem; }

  /* pin deck: ten sections laid out 1-2-3-4 like a rack seen from the foul line, back row first */
  .pin-deck { display: grid; gap: 0.9rem; justify-items: center; }
  /* rows never wrap, so the 4-3-2-1 triangle holds at every width above phone size */
  .pin-row { display: flex; flex-wrap: nowrap; justify-content: center; gap: 0.9rem; width: 100%; }
  .pin-card {
    position: relative; flex: 0 0 auto; width: min(15.5rem, calc((100% - 2.7rem) / 4));
    background: var(--bg); border: 1px solid var(--line); border-radius: 1.2rem 1.2rem var(--radius-board) var(--radius-board);
    padding: 1rem 1rem 1.1rem 3.6rem; text-decoration: none; color: var(--text);
    border-bottom: 3px solid var(--line);
  }
  .pin-card::before {
    content: ""; position: absolute; left: 0.9rem; top: 0.95rem; width: 1.8rem; height: 2.6rem;
    background: url("../svg/pin.svg") center / contain no-repeat;
  }
  .pin-card b { display: block; font-family: var(--font-display); font-weight: 780; font-stretch: 112%; font-size: 1.1rem; line-height: 1.15; }
  .pin-card span { display: block; color: var(--muted); font-size: 0.9rem; margin-top: 0.25rem; line-height: 1.35; }
  .pin-card:hover { border-color: var(--red); }
  .pin-card:hover b { text-decoration: underline; text-decoration-thickness: 2px; }
  .pin-card .pin-no {
    position: absolute; right: 0.7rem; top: 0.6rem; font-family: var(--font-display); font-weight: 800;
    font-size: 0.8rem; color: var(--maple-dark);
  }
  @media (prefers-color-scheme: dark) { .pin-card .pin-no { color: var(--maple); } }
  /* tablet and small laptop: narrower cards, pin icon above the label */
  @media (min-width: 701px) and (max-width: 1099px) {
    .pin-deck, .pin-row { gap: 0.6rem; }
    .pin-card { width: calc((100% - 1.8rem) / 4); padding: 3rem 0.75rem 0.9rem; }
    .pin-card::before { left: 0.75rem; top: 0.7rem; width: 1.3rem; height: 1.9rem; }
    .pin-card b { font-size: 1rem; }
    .pin-card span { font-size: 0.85rem; }
  }
  @media (max-width: 700px) {
    .pin-deck { justify-items: stretch; }
    .pin-row { display: grid; grid-template-columns: 1fr; }
    .pin-card { width: 100%; }
  }

  /* state selector */
  .state-grid { display: grid; gap: 0.6rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); list-style: none; padding: 0; }
  .prose .state-grid { padding: 0; }
  .prose .state-grid li + li { margin-top: 0; }
  .state-grid a {
    display: flex; justify-content: space-between; align-items: baseline; gap: 0.5rem;
    padding: 0.8rem 1rem; border: 1px solid var(--line); border-left: 5px solid var(--maple);
    border-radius: var(--radius-board); background: var(--bg); color: var(--text); text-decoration: none; font-weight: 700;
  }
  .state-grid a:hover { border-left-color: var(--red); background: var(--surface); }
  .state-grid small { font-weight: 400; color: var(--muted); white-space: nowrap; }

  /* venue listings */
  .venue-list { display: grid; gap: var(--space-m); }
  .venue {
    border: 1px solid var(--line); border-top: 5px solid var(--navy); border-radius: var(--radius-board);
    padding: 1.1rem 1.2rem; background: var(--bg);
  }
  .venue h3 { margin: 0 0 0.4rem; }
  .venue dl { display: grid; grid-template-columns: max-content 1fr; gap: 0.3rem 1rem; font-size: 0.97rem; }
  .venue dt { font-weight: 700; }
  .venue dd { margin: 0; overflow-wrap: anywhere; }
  .venue .venue-note { margin-top: 0.6rem; font-size: 0.9rem; color: var(--muted); }
  .badge {
    display: inline-block; font-size: 0.8rem; font-weight: 700; padding: 0.15rem 0.55rem;
    border-radius: var(--radius-ball); background: var(--surface-2); color: var(--text); vertical-align: middle;
  }
  .badge.verify { background: #fde3e6; color: #8a0a1f; }
  @media (prefers-color-scheme: dark) { .badge.verify { background: #4a1520; color: #ffd0d6; } .venue { border-top-color: var(--maple); } }
  @media (max-width: 520px) { .venue dl { grid-template-columns: 1fr; gap: 0 0; } .venue dd { margin-bottom: 0.4rem; } }

  /* horizontal scroll-snap carousel */
  .carousel {
    display: grid; grid-auto-flow: column; grid-auto-columns: min(78%, 300px); gap: var(--space-m);
    overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity;
    padding: 0.25rem 0.25rem 1rem; list-style: none; scrollbar-color: var(--maple-dark) transparent;
  }
  .prose .carousel { padding-left: 0.25rem; }
  .prose .carousel li + li { margin-top: 0; }
  .carousel > li { scroll-snap-align: start; display: flex; }
  .carousel > li > .card { width: 100%; }

  /* news */
  .news-card .date-badge {
    position: absolute; top: 0.8rem; left: 0.8rem; z-index: 1;
    display: grid; place-items: center; width: 3.6rem; height: 3.6rem; border-radius: 50%;
    background: var(--navy-deep); color: #fff; text-align: center; line-height: 1;
    font-family: var(--font-display); font-weight: 800; border: 3px solid var(--maple);
  }
  .date-badge b { font-size: 1.2rem; display: block; }
  .date-badge small { font-size: 0.68rem; display: block; margin-top: 2px; font-weight: 700; }
  .card .card-meta { font-size: 0.85rem; color: var(--muted); }

  /* athletes */
  .athlete-card .avatar {
    display: grid; place-items: center; aspect-ratio: 3 / 2;
    background: var(--navy); border-bottom: 4px solid var(--maple);
    color: #fff; font-family: var(--font-display); font-weight: 850; font-stretch: 140%; font-size: 2.6rem;
  }

  /* FAQ */
  .faq { margin-top: var(--space-l); }
  .faq h2 { margin-bottom: var(--space-s); }
  .faq details { border-bottom: 1px solid var(--line); }
  .faq details:first-of-type { border-top: 1px solid var(--line); }
  .faq summary {
    cursor: pointer; list-style: none; padding: 1rem 2.5rem 1rem 0; position: relative;
    font-weight: 700; font-size: var(--step-0);
  }
  .faq summary::-webkit-details-marker { display: none; }
  .faq summary::after {
    content: ""; position: absolute; right: 0.4rem; top: 50%; width: 1rem; height: 1rem; margin-top: -0.5rem;
    border-radius: 50%; background: var(--red);
    box-shadow: inset -3px -3px 4px rgba(0, 0, 0, 0.35);
    transition: transform 0.25s ease;
  }
  .faq details[open] summary::after { transform: rotate(180deg) scale(1.15); }
  .faq details > div { padding: 0 0 1rem; }
  .faq details > div > * + * { margin-top: 0.7em; }

  /* sources */
  .sources { margin-top: var(--space-l); padding-top: var(--space-m); border-top: 2px solid var(--line); font-size: 0.93rem; }
  .sources h2 { font-size: var(--step-1); margin-bottom: 0.6rem; }
  .sources ol { padding-left: 1.3em; display: grid; gap: 0.3rem; color: var(--muted); }
  .sources a { overflow-wrap: anywhere; }

  /* related */
  .related { margin-top: var(--space-xl); }
  .related h2 { margin-bottom: var(--space-m); }

  /* section headings in bands */
  .band-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: var(--space-l); }
  .band-head h2 { max-width: 20ch; }
  .band-head p { max-width: 46ch; color: var(--muted); }

  /* ---- footer --------------------------------------------------------- */
  .site-footer {
    background: var(--navy-deep); color: #d9d2c4; margin-top: 0;
    border-top: 6px solid var(--maple);
    padding-block: var(--space-xl) var(--space-l); font-size: 0.95rem;
  }
  .site-footer a { color: #fff; }
  .footer-grid { display: grid; gap: var(--space-l); grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); }
  .footer-grid h2 { font-size: 1rem; font-stretch: 112%; color: var(--maple); margin-bottom: 0.7rem; }
  .footer-grid ul { list-style: none; padding: 0; display: grid; gap: 0.35rem; }
  .footer-brand p { margin-top: 0.8rem; max-width: 34ch; }
  .social { display: flex; gap: 0.6rem; margin-top: 1rem; }
  .social a { display: grid; place-items: center; width: 2.6rem; height: 2.6rem; border-radius: 50%; border: 1px solid var(--navy-soft); }
  .social a:hover { background: var(--navy-soft); }
  .social svg { width: 1.2rem; height: 1.2rem; fill: currentColor; }
  .footer-bottom { margin-top: var(--space-l); padding-top: var(--space-m); border-top: 1px solid var(--navy-soft); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; font-size: 0.85rem; }

  /* ---- 404 ------------------------------------------------------------ */
  .gutter-ball { font-family: var(--font-display); font-size: clamp(5rem, 3rem + 10vw, 11rem); font-weight: 900; font-stretch: 150%; line-height: 0.9; color: var(--maple-dark); }
}

/* ---- utilities ---------------------------------------------------------- */
@layer utilities {
  .visually-hidden {
    position: absolute !important; width: 1px; height: 1px; overflow: hidden;
    clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
  }
  .center { text-align: center; }
  .mt-l { margin-top: var(--space-l); }
}

@media print {
  .site-header, .site-footer, .rail, .related, .skip-link { display: none !important; }
  body { background: #fff; color: #000; }
}
