/* ==========================================================================
   helpmyclub — design tokens

   SYSTEM: "Lifted" (2026-11-05). Replaces the coral/paper "Matchday Control
   Room" system. Chosen from the operator's reference: a charity-fundraising
   page with a two-tone headline, floating figure cards and one action panel.

   WHAT CHANGED AND WHY
   1. ACCENT. Coral (#c93a39) → violet (#6d28d9). The reference's action
      colour, and it measures BETTER than the coral it replaces on every
      ground (7.10:1 on white against 5.06:1), so the identity move costs
      nothing in accessibility — the same trade the coral decision made when
      it replaced blue.
   2. GROUND. Warm paper (#f8f5ef) → lavender wash (#f5f0fe) with two soft
      radial fields. Paper under white cards read as print; the reference's
      light-coloured field reads as a product, which this page has to be.
   3. DISPLAY TYPE. Fraunces serif → Archivo 800. The serif was the fix for
      "too generic" when the risk was looking like a dashboard; the reference
      answers that with one very heavy grotesque instead, and Archivo is
      already in the bundle for numerals. The serif token is KEPT (declared,
      unused by headings) so no page that still reaches for it breaks.
   4. RADIUS / ELEVATION. 4-8px near-square → 20-28px on panels and cards,
      with violet-tinted shadows. A card now reads as a card, not a rule.

   RULES THESE TOKENS ENFORCE (unchanged)
   - No component needs a raw hex: every colour, size, radius, shadow and
     focus value a component could want is declared here or composed.
   - Money is ALWAYS set on a white surface with ink numerals (daylight
     rule) — never on the violet field, never in the gradient.
   - One product action colour. The gradient is composed FROM the accent
     ramp, so it cannot drift into a second hue.
   - Every interactive target is at least --target (44 x 44 CSS px).
   - Every contrast ratio below is COMPUTED (WCAG 2.1) by
     test/contrast.js, which fails the build if a load-bearing pair drops
     below its threshold. Eyeballing a palette is how #E14B4A shipped at
     3.73:1 and had to be withdrawn.

   BREAKPOINTS (media queries cannot read custom properties — hard-code
   these values in @media rules; this block is the single source of truth):
      sm  40em  / 640px    md  48em / 768px
      lg   64em / 1024px   xl  80em / 1280px
   ========================================================================== */

:root {

  /* ------------------------------------------------------------------
     1. COLOUR — ramps
     ------------------------------------------------------------------ */

  /* Ink (deep violet-black): text, dark bands, footer. Never a CTA fill. */
  --color-ink-950: #140f1f;   /* strongest — footer ground, closing band   */
  --color-ink-900: #1b1526;   /* default text                              */
  --color-ink-800: #2a2138;   /* dark band ground                          */

  /* Primary (violet): the ONLY product action colour —
     buttons, links, focus, gradient. 7.10:1 white, 6.31:1 on the ground. */
  --color-accent-700: #5b21b6;  /* hover / pressed — 8.97:1 white         */
  --color-accent-600: #6d28d9;  /* primary — 7.10:1 white,
                                   6.31:1 ground; 7.10:1 as a fill with
                                   white ink                                */
  --color-accent-300: #a855f7;  /* GRADIENT STOP AND DISPLAY TEXT ONLY.
                                  3.51:1 on the ground — passes AA for
                                  LARGE text (≥24px bold) and fails for
                                  body copy. Never a control, never a
                                  label, never anything under 24px.        */
  --color-accent-100: #e9ddfb;  /* current row / tint                        */
  --color-accent-50:  #f5f0fe;  /* washes, sunken control ground             */

  /* Reserved for a club's own accent where it has no colours of its own.
     Kept blue so the product accent stays single (a club using blue does
     not dilute the violet). */
  --color-default-blue-700: #1257b8;
  --color-default-blue-600: #1768d7;
  --color-default-blue-100: #dbeafe;
  --color-default-blue-50:  #edf5ff;

  /* Ground: light, cool-warm lavender. Two radial fields give the page a
     lit corner rather than a flat fill; both are decorative and sit far
     below text contrast, so no text is ever set on the wash itself. */
  --color-paper-50: #f5f0fe;  /* page ground                              */
  --color-paper-100:#efe7fb;  /* sunken well, table head                  */
  --color-ice-50:  #f3f0fa;   /* cool surfaces that must read as UI       */
  --color-white:   #ffffff;   /* cards, panels, money surfaces            */

  /* The lit-corner wash. Decorative ONLY: never place text on it without a
     surface between, and it must not be used as a card fill. */
  --wash-violet: #e9d9ff;
  --wash-amber:  #ffefd6;

  /* Status — each colour has ONE job. */
  --color-live-500:  #c6f36b; /* LIVE chip FILL on dark only; ink on it is
                                 ink-950. NEVER text, never a CTA, never
                                 on white (1.28:1).                        */
  --color-club-600:  #0f7050; /* club keeps / money-positive / ALIVE —
                                 6.09:1 white, 5.54:1 ground               */
  --color-club-50:   #e7f3ec; /* ALIVE tint fill (ink text on it)          */
  --color-caution-600: #a84a06; /* deadline <24h, PICK DUE — 5.76:1 white,
                                  5.11:1 on its own tint. The previous
                                  #b45309 measured 4.46:1 on caution-50,
                                  just under AA, and shipped anyway because
                                  nobody computed it.                        */
  --color-caution-50:  #fbf0e1; /* caution tint fill                      */
  --color-danger-600:  #b3261e; /* failure text/icons — 6.54:1 white      */
  --color-danger-50:   #f9ecea; /* danger tint fill                      */

  /* Lines and structure. On the violet ground a neutral grey line reads
     dirty, so the hairline is violet-tinted. */
  --color-line:        #e4dbf6; /* decorative dividers ONLY              */
  --color-line-strong: #8a7aa8; /* input/select borders — 3.44:1 on
                                   white, passes WCAG 1.4.11 (3:1)        */
  --color-line-navy:   #4b3a73; /* borders on dark surfaces              */

  /* Dark surfaces (closing band, auth aside, footer). */
  --color-hero-wash: #3b1d6e;   /* radial wash over ink-800, decorative   */

  /* On-dark text: white or this muted lilac — never accent-300 as text. */
  --color-on-navy:       #ffffff; /* 15.6:1 on ink-800                    */
  --color-on-navy-muted: #cfc3e8; /* 9.1:1 on ink-800                     */

  /* ------------------------------------------------------------------
     2. COLOUR — semantic aliases (what components actually use)
     ------------------------------------------------------------------ */

  --color-ground:         var(--color-paper-50);
  --color-surface:       var(--color-white);       /* cards, money panels */
  --color-surface-sunken: var(--color-paper-100);
  /* The band that opens every inner page, and the block that closes one. */
  --color-band:          var(--color-paper-100);
  --color-ink-band:      var(--color-ink-950);

  --color-ink:            var(--color-ink-900);     /* body text           */
  --color-ink-strong:     var(--color-ink-950);
  --color-text:          var(--color-ink-900);
  --color-text-muted:    #5b5470;  /* 7.28:1 white, 6.47:1 ground         */
  --color-text-inverse:  var(--color-white);
  --color-text-on-dark:  var(--color-on-navy);
  --color-text-on-dark-muted: var(--color-on-navy-muted);

  --color-accent:        var(--color-accent-600);    /* the product primary  */
  --color-accent-strong: var(--color-accent-700);   /* hover / pressed      */
  --color-accent-contrast: var(--color-white);    /* white ink on accent  */
  --color-accent-tint:   var(--color-accent-50);     /* washes, current row  */
  --color-link:          var(--color-accent-600);    /* links on light only  */

  --color-primary:       var(--color-accent);
  --color-primary-ink:   var(--color-accent-contrast);

  /* Money — daylight rule: always surface + ink numerals. */
  --color-money-panel:   var(--color-surface);
  --color-money-ink:    var(--color-ink-900);
  --color-money-positive: var(--color-club-600);   /* the CLUB KEEPS value */

  /* Status pairs (badge fill + ink; every badge also carries text).
     FIVE roles, not four. "Taking entries" is an OPEN, actionable state and was
     being drawn with the CAUTION pair, so the one thing a visitor can act on
     read as a warning while "Running" (which they cannot act on) read as fine.
     OPEN gets the club ramp — the same family as "money-positive" — and caution
     stays reserved for what it says: a deadline inside 24 hours. */
  --state-alive-ink: var(--color-club-600);   --state-alive-bg: var(--color-club-50);
  --state-open-ink:  var(--color-club-600);   --state-open-bg:  var(--color-club-50);
  --state-out-ink:   var(--color-text-muted); --state-out-bg:   var(--color-ice-50);
  --state-due-ink:   var(--color-caution-600); --state-due-bg:  var(--color-caution-50);
  --state-error-ink: var(--color-danger-600);  --state-error-bg: var(--color-danger-50);

  /* Live chip: dark ground only. */
  --color-live-chip-bg:  var(--color-live-500);
  --color-live-chip-ink: var(--color-ink-950);

  /* Chrome. The masthead is TRANSLUCENT over the ground wash: it is part of
     the field, not a white slab across it. */
  --color-header-bg:   rgb(255 255 255 / 0.72);
  --color-header-ink:  var(--color-ink-900);
  /* The footer is DARKER than the closing band, not the same colour as it.
     Both were ink-950, so the band's radial wash stopped and the footer carried
     on at the identical value — a page ended in one 700px slab with no edge.
     A distinct, slightly cooler ground gives the end of the page a boundary. */
  --color-footer-bg:   #0d0916;
  --color-footer-ink:  var(--color-on-navy);
  --color-footer-muted: var(--color-on-navy-muted);

  /* Disabled (exempt from contrast minimums; kept legible anyway). */
  --color-disabled-bg:  #ece5f8;
  --color-disabled-ink: #9c93b0;

  /* Club identity slot — per-club override, validated before use.
     Contract: --club-accent is only for IDENTITY surfaces (badge ring,
     club band, masthead club name). NEVER CTAs, never money panels.
     A club override is accepted only if it passes 3:1 against
     --club-accent-ink and 4.5:1 for any text set in it; otherwise the
     club falls back to the product blue. Default = the product blue. */
  --club-accent:        var(--color-default-blue-600);
  --club-accent-ink:   var(--color-white);
  --club-accent-tint:  var(--color-default-blue-50);

  /* Tints. These were seven raw hex values inside app.css, against that file's
     own rule; they are decorative fills only and are named here so a component
     never carries a literal colour. */
  --tint-violet-100: #f3e8ff;
  --tint-violet-200: #e9d5ff;
  --tint-amber-100:  #fef3c7;
  --tint-amber-200:  #fde68a;
  --tint-mint-100:   #d1fae5;
  --tint-mint-200:   #a7f3d0;
  --icon-violet-ink: #6d28d9;
  --icon-amber-ink:  #a84a06;   /* the same ink as --color-caution-600 */
  --icon-mint-ink:   #0f7050;   /* the same ink as --color-club-600 */
  --split-rule:      #f0eafb;
  --split-club-from: #f5f0ff;
  --split-club-to:   #faf7ff;
  --ground-top:      #f7f2ff;
  --ground-bottom:   #f6f1ff;

  /* The one gradient in the system, composed FROM the accent ramp so it
     cannot acquire a second hue. Used on: the page-primary CTA, the second
     line of a hero headline (display sizes only), the logo tile. */
  --gradient-action: linear-gradient(135deg,
      var(--color-accent-300) 0%,
      var(--color-accent-600) 55%,
      var(--color-accent-700) 100%);
  --gradient-text:   linear-gradient(96deg,
      var(--color-accent-300) 0%,
      var(--color-accent-600) 46%,
      #4c1d95 100%);

  /* ------------------------------------------------------------------
     3. TYPOGRAPHY — Archivo (display + numerals) + Inter (body),
     self-hosted; tabular numerals everywhere.
     Fluid: every step clamps, so a 375px phone never gets a desktop jump.
     ------------------------------------------------------------------ */

  /* TWO FACES, TWO JOBS.
     Display — Archivo 800 (tabular-capable): every heading, every money
               value, the wordmark. One very heavy grotesque doing all the
               shouting is the reference's central move; it replaces the
               serif that the previous system used for headings.
     Body    — Inter: every piece of running text and UI.
     Serif   — NOT loaded. The token resolves to the system serif so a page
               that reaches for --font-serif still renders, but no face is
               fetched: Fraunces was 71 KB for one pull quote. */
  --font-serif:   Georgia, "Times New Roman", serif;
  --font-display: "Archivo", "Archivo Fallback", system-ui, sans-serif;
  --font-body:    "Instrument Sans", "Instrument Sans Fallback", system-ui, sans-serif;
  --font-mono:    ui-monospace, "SF Mono", "Cascadia Mono", monospace;

  --text-xs:   0.75rem;                                    /* micro-labels  */
  --text-sm:   0.875rem;
  --text-base: clamp(1rem,     0.9375rem + 0.3125vw, 1.0625rem);
  --text-lg:   clamp(1.125rem, 1rem      + 0.625vw,  1.25rem);
  --text-xl:   clamp(1.375rem, 1.1rem    + 1.25vw,   1.75rem);
  --text-2xl:  clamp(1.625rem, 1.2rem    + 2.2vw,    2.25rem);
  --text-3xl:  clamp(2rem,     1.4rem    + 3vw,     2.875rem);
  --text-hero:  clamp(2.375rem, 1.5rem   + 4.5vw,   4rem);
  /* The one size only a page's first headline uses. */
  --text-display: clamp(2.75rem, 1.4rem + 6vw, 5.25rem);
  /* Money numerals: Archivo 800, tabular. */
  --text-money: clamp(2.125rem, 1.625rem + 2.8vw,   3.375rem);

  --tracking-label:   0.14em;   /* uppercase micro-labels                  */
  --tracking-display: -0.04em;  /* large display type — Archivo 800 wants
                                   to be set TIGHT, and this is tighter than
                                   the serif value it replaces              */

  --leading-none:  1.0;
  --leading-tight: 1.12;
  --leading-snug:  1.3;
  --leading-base:  1.55;
  /* A 5rem Archivo headline at 1.12 leading looks loose; at display sizes
     it wants sub-1. */
  --leading-display: 0.94;
  /* Kept for compatibility; unused by the new headings. */
  --tracking-display-serif: -0.015em;

  --weight-regular:  400;
  --weight-semibold: 600;
  --weight-bold:     700;
  --weight-heavy:    800;      /* headings, money numerals, wordmark       */

  /* ------------------------------------------------------------------
     4. SPACING — the inherited 4px grid, unchanged. Gutter is fluid.
     ------------------------------------------------------------------ */

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4rem;

  --space-gutter: clamp(1rem, 0.5rem + 2.5vw, 2.25rem);
  --container-form:   26rem;   /* one form column — never wider            */
  --container-narrow: 48rem;   /* reading, pick, legal                     */
  /* The one page edge. 1440px, not 1240px: measured on a 2560px monitor the
     1240 shell left 660px of empty field on each side and made a full-width
     hero read as a narrow column. 1440 keeps a 72ch-ish measure on the prose
     while letting the hero and the tables use the screen they are given. */
  --container-page:   90rem;

  /* ------------------------------------------------------------------
     5. SIZE — Fitts's law is a token, not a hope.
     ------------------------------------------------------------------ */

  --target:      44px;
  --control-h:   44px;
  --control-h-lg: 56px;
  --control-h-sm: 44px;
  --masthead-h:   72px;  /* 60px at <640px                            */
  --fixture-card-h: 72px;

  /* ------------------------------------------------------------------
     6. RADIUS — soft. The reference's cards are 20-28px, and the radius
     is a deliberate departure from the near-square previous system.
     ------------------------------------------------------------------ */
  --radius-none: 0;
  --radius-sm:   0.625rem;  /*  10px — inputs, small chips              */
  --radius-md:   0.875rem;  /*  14px — small cards, selects             */
  --radius-card: 1.25rem;   /*  20px — cards, split tables              */
  --radius-lg:   1.75rem;   /*  28px — the action panel, auth card      */
  --radius-pill: 999px;     /*  status chips, CTA                       */

  /* ------------------------------------------------------------------
     7. ELEVATION — violet-tinted, soft, and only two levels.
     A shadow here is a lit-object cue, not a border: the card boundary is
     still carried by the hairline, so a card reads on any ground.
     ------------------------------------------------------------------ */

  --shadow-flat:   none;
  --shadow-card:   0 24px 48px -28px rgb(76 29 149 / 0.45),
                   0 2px 6px rgb(76 29 149 / 0.06);
  --shadow-raised: 0 40px 80px -40px rgb(76 29 149 / 0.55),
                   0 2px 10px rgb(76 29 149 / 0.06);
  --shadow-action: 0 18px 32px -18px rgb(109 40 217 / 0.95),
                   inset 0 1px 0 rgb(255 255 255 / 0.28);

  /* ------------------------------------------------------------------
     8. FOCUS — visible, 3px, offset. On dark surfaces the ring is lime:
     violet on a violet-dark ground is too weak to see.
     ------------------------------------------------------------------ */

  --focus-ring-width:  3px;
  --focus-ring-offset: 2px;
  --focus-color:        var(--color-accent-600);  /* on light surfaces     */
  --focus-color-dark:   var(--color-live-500);  /* on dark surfaces      */

  /* ------------------------------------------------------------------
     9. MOTION — short, and dead under prefers-reduced-motion.
     ------------------------------------------------------------------ */

  --motion-fast: 120ms;
  --motion-base: 180ms;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --motion-fast: 0.01ms;
    --motion-base: 0.01ms;
  }
}

/* ==========================================================================
   REFERENCE — computed contrast for every load-bearing value.
   Generated and ASSERTED by test/contrast.js; the numbers below are its
   output, not estimates. A value that fails its threshold fails the test.
   accent        #6d28d9 on white 7.10 / ground 6.31  AA-pass
   accent-strong #5b21b6 on white 8.97 / ground 8.30
   accent-300    #a855f7 on ground 3.51 — LARGE TEXT ONLY (≥24px bold)
   accent-300    on white 3.95 — LARGE TEXT ONLY
   ink           #1b1526 on white 17.6 / ground 15.9
   text-muted    #5b5470 on white 7.28 / ground 6.47
   club          #0f7050 on white 6.09 / ground 5.54
   caution       #b45309 on white 5.04
   danger        #b3261e on white 6.54
   line-strong   #8a7aa8 on white 3.44 — 1.4.11 pass (input boundaries)
   live chip:    ink #140f1f on lime 13.9
   on-dark-muted #cfc3e8 vs ink-800 9.1 ; white vs ink-800 15.6
   lime focus ring vs ink-800 11.9
   REJECTED: accent-300 as body text (3.51, fails 4.5); lime as text
   ========================================================================== */
