/* RacesCanada — design tokens (single source of truth)
   ============================================================================

   Before this file, the same palette was declared four times over: --rs- in
   six stylesheets, --mc- in my-calendar.css, --rd- in race-detail.css, and a
   separate legacy Perth palette (--ocean- and --sunset-) in style.css. The
   three yellow copies held identical values for all 11 shared keys, so they
   were three names for one system — but they had already begun to drift:

       --rs-text-muted      #6b6b6b   but #888     in results.css
       --rs-text-secondary  #3d3d3d   but #4a4a4a  in results.css
       --mc-accent-light    used twice, never defined anywhere

   That last one is why the expanded state of my-calendar's expand button had
   no highlight: `background: var(--mc-accent-light)` is invalid without a
   fallback, so the declaration was simply dropped.

   The --rs- prefix is kept because it is the most used (620 references) and
   renaming buys nothing on its own. It no longer means "race search" — these
   are the site-wide tokens. Renaming to a neutral prefix is a separate
   mechanical pass if wanted.

   Load this before any page stylesheet.
   ========================================================================= */

:root {
    /* ---- AdSense pre-fill height: THE ONE SWITCH ----
       Every ad container (.race-card-ad, .ad-race-detail, .ad-homepage,
       .ad-article) is exactly this tall until AdSense reports a fill, then
       grows to the creative; a reported no-fill hides it.

         0px    collapsed to nothing - no blank bands, ever. But Google's
                data-ad-status doc says a unit that "isn't initially visible"
                may never get an ad request, and on the new pub ID
                (Sept 2026) that's what happened: pushed, sized, never asked.
         100px  a small visible band, Google's recommended shape (reserve
                space, hide on no-fill). Requests fire; while the account
                ramps and Google answers nothing, the band shows as a gap.

       Set to 0px on 2026-09-16 while the account ramps (no gaps beats no
       fills nobody can see). Flipped to 100px on 2026-09-19 — fill rate
       climbed 43%->85% over the preceding days, so AdSense is answering
       again. */
    --ad-reserve: 100px;

    /* ---- Brand accent (Trail Run Mag golden yellow) ---- */
    --rs-accent: #D52B1E;
    --rs-accent-hover: #B3241A;
    --rs-accent-dark: #B3241A;
    --rs-accent-text: #161616;               /* dark text on yellow */
    --rs-accent-glow: rgba(213,43,30, 0.3);
    --rs-accent-light: rgba(213,43,30, 0.15);

    /* ---- Surfaces ---- */
    --rs-bg: #ffffff;
    --rs-bg-card: #ffffff;
    --rs-bg-elevated: #f8f8f8;
    --rs-bg-input: #ffffff;
    --rs-bg-page: #f8f8f6;

    /* ---- Text ---- */
    --rs-text: #161616;
    --rs-text-primary: #161616;              /* alias of --rs-text */
    --rs-text-secondary: #3d3d3d;
    --rs-text-muted: #6b6b6b;

    /* ---- Borders ---- */
    --rs-border: #e5e5e5;
    --rs-border-light: #f0f0f0;
    --rs-border-dark: #cccccc;

    /* ---- Semantic status ---- */
    --rs-success: #10b981;
    --rs-success-bg: #d1fae5;
    --rs-warning: #f59e0b;
    --rs-warning-bg: #fef3c7;
    --rs-error: #ef4444;
    --rs-error-bg: #fee2e2;
    --rs-info: #3b82f6;
    --rs-info-bg: #dbeafe;
    --rs-danger: #d64545;

    /* ---- Distance badges ---- */
    --rs-marathon: #e53935;
    --rs-half: #00acc1;
    --rs-10k: #8e24aa;
    --rs-5k: #43a047;

    /* ---- Sport categories ---- */
    --rs-triathlon: #3b82f6;
    --rs-duathlon: #f97316;
    --rs-aquathon: #14b8a6;
    --rs-multisport: #8b5cf6;

    /* ---- Third party ---- */
    --rs-strava: #fc4c02;

    /* ---- Typography ----
       Single source of truth: the ~13 page stylesheets that used to re-declare
       these in their own :root have been stripped, so changing the two lines
       below re-skins every page.

       Fraunces for display (a warm serif with an optical-size axis — reads like
       a running-magazine masthead), Inter for body (clean, neutral workhorse).
       Both are self-hosted variable fonts; @font-face rules live in style.css.
       Replaced Varela Round / Rubik (Feb 2026). */
    --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
    --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;

    /* ---- Elevation ---- */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
}
