/* CricHeroes Web Design System — official tokens, copied verbatim from
   'CH- Web Design System/cricheroes-design-guidelines.html' :root (lines 19-229). Do not edit here. */
:root {

  /* ─── TIER 1 · FOUNDATIONS (Brand Primitives) ───
     REFERENCE ONLY — do NOT use directly in components.
     These exist solely to compose semantic tokens. */

  --brand-primary:      #E21C28;
  --brand-primary-10:   #F9D2D4;
  --brand-primary-30:   #EE777E;
  --brand-primary-70:   #8C151C;
  --brand-primary-80:   #611217;

  --brand-secondary:    #18958F;
  --brand-secondary-10: #D1EAE9;
  --brand-secondary-30: #74BFBC;
  --brand-secondary-60: #157975;
  --brand-secondary-80: #104240;

  --brand-grey:    #8E8E93;
  --brand-grey-2:  #AEAEB2;
  --brand-grey-3:  #C7C7CC;
  --brand-grey-4:  #D1D1D6;
  --brand-grey-5:  #E5E5EA;
  --brand-grey-6:  #F2F2F7;

  --brand-black:   #0B0B0B;
  --brand-white:   #FEFFFF;

  /* RGB triplets — power opacity-based semantic tokens */
  --rgb-primary:        226 28 40;
  --rgb-secondary:      24 149 143;
  --rgb-secondary-30:   116 191 188;     /* brighter teal accent (= --brand-secondary-30) · used by the dark doc-panel surface */
  --rgb-grey:           142 142 147;
  --rgb-black:          11 11 11;
  --rgb-white:          254 255 255;


  /* ─── TIER 2 · SEMANTIC TOKENS ───
     The only tokens components should consume. */

  /* Screen Background — solid surfaces only (no opacity) */
  --bg-primary:   #FEFFFF;
  --bg-secondary: #F3F3F3;
  --bg-tertiary:  #FEFFFF;

  /* Labels / Primary — branded red text */
  --label-primary-high:    rgb(var(--rgb-primary));
  --label-primary-medium:  rgb(var(--rgb-primary) / 0.52);
  --label-primary-low:     rgb(var(--rgb-primary) / 0.30);
  --label-primary-muted:   rgb(var(--rgb-primary) / 0.14);

  /* Labels / Secondary — interaction teal text */
  --label-secondary-high:   rgb(var(--rgb-secondary));
  --label-secondary-medium: rgb(var(--rgb-secondary) / 0.54);
  --label-secondary-low:    rgb(var(--rgb-secondary) / 0.30);
  --label-secondary-muted:  rgb(var(--rgb-secondary) / 0.18);

  /* Labels / Grey — primary body-text hierarchy */
  --label-grey-high:    rgb(var(--rgb-black));
  --label-grey-medium:  rgb(var(--rgb-black) / 0.60);
  --label-grey-low:     rgb(var(--rgb-black) / 0.30);
  --label-grey-muted:   rgb(var(--rgb-black) / 0.18);

  /* Labels / Static — fixed tone for colored / image surfaces */
  --label-static-black-high:    rgb(var(--rgb-black));
  --label-static-black-medium:  rgb(var(--rgb-black) / 0.60);
  --label-static-black-low:     rgb(var(--rgb-black) / 0.30);
  --label-static-black-muted:   rgb(var(--rgb-black) / 0.16);
  --label-static-white-high:    rgb(var(--rgb-white));
  --label-static-white-medium:  rgb(var(--rgb-white) / 0.60);
  --label-static-white-low:     rgb(var(--rgb-white) / 0.30);
  --label-static-white-muted:   rgb(var(--rgb-white) / 0.16);

  /* Fill / Grey — neutral surfaces, dividers, hover, disabled */
  --fill-grey-prominent: rgb(var(--rgb-grey));
  --fill-grey-high:      rgb(var(--rgb-grey) / 0.20);
  --fill-grey-medium:    rgb(var(--rgb-grey) / 0.16);
  --fill-grey-low:       rgb(var(--rgb-grey) / 0.12);
  --fill-grey-muted:     rgb(var(--rgb-grey) / 0.08);

  /* Fill / Primary — branded surfaces, live / urgent moments */
  --fill-primary-prominent: rgb(var(--rgb-primary));
  --fill-primary-high:      rgb(var(--rgb-primary) / 0.20);
  --fill-primary-medium:    rgb(var(--rgb-primary) / 0.16);
  --fill-primary-low:       rgb(var(--rgb-primary) / 0.12);
  --fill-primary-muted:     rgb(var(--rgb-primary) / 0.08);

  /* Fill / Secondary — interaction surfaces, selected, focus tint */
  --fill-secondary-prominent: rgb(var(--rgb-secondary));
  --fill-secondary-high:      rgb(var(--rgb-secondary) / 0.20);
  --fill-secondary-medium:    rgb(var(--rgb-secondary) / 0.16);
  --fill-secondary-low:       rgb(var(--rgb-secondary) / 0.12);
  --fill-secondary-muted:     rgb(var(--rgb-secondary) / 0.08);


  /* ─── TIER 3 · COMPONENT TOKENS ───
     Pre-mapped for the most opinionated components. */

  /* Buttons / Background */
  --btn-bg-primary-prominent:   rgb(var(--rgb-secondary));            /* Main CTA — Teal */
  --btn-bg-primary-disable:     rgb(var(--rgb-secondary) / 0.20);
  --btn-bg-secondary-prominent: rgb(var(--rgb-primary));              /* Brand CTA — Red */
  --btn-bg-secondary-disable:   rgb(var(--rgb-primary) / 0.14);
  --btn-bg-grey-prominent:      rgb(var(--rgb-grey) / 0.12);
  --btn-bg-grey-disable:        rgb(var(--rgb-grey) / 0.12);
  --btn-bg-black-prominent:     rgb(var(--rgb-black));

  /* Buttons / Label */
  --btn-label-primary-prominent:        rgb(var(--rgb-white));
  --btn-label-primary-disable:          rgb(var(--rgb-white) / 0.60);
  --btn-label-secondary-prominent:      rgb(var(--rgb-white));
  --btn-label-secondary-disable:        rgb(var(--rgb-white) / 0.50);
  --btn-label-grey-prominent:           rgb(var(--rgb-black));
  --btn-label-grey-disable:             rgb(var(--rgb-black) / 0.30);
  --btn-label-primary-text-prominent:   rgb(var(--rgb-secondary));
  --btn-label-primary-text-disable:     rgb(var(--rgb-secondary) / 0.60);
  --btn-label-secondary-text-prominent: rgb(var(--rgb-primary));
  --btn-label-secondary-text-disable:   rgb(var(--rgb-primary) / 0.50);
  --btn-label-black-text-prominent:     rgb(var(--rgb-black));
  --btn-label-black-text-disable:       rgb(var(--rgb-black) / 0.30);

  /* Icons */
  --icon-primary-high:    rgb(var(--rgb-primary));
  --icon-secondary-high:  rgb(var(--rgb-secondary));
  --icon-grey-prominent:  rgb(var(--rgb-black));
  --icon-grey-high:       rgb(var(--rgb-grey));
  --icon-grey-medium:     rgb(var(--rgb-grey) / 0.50);      /* was raw #C7C7CC · now opacity-driven · keeps perceptual surface compatibility */
  --icon-grey-low:        rgb(var(--rgb-grey) / 0.30);      /* was raw #E5E5EA · now opacity-driven */
  --icon-static-black:    rgb(var(--rgb-black));
  --icon-static-white:    rgb(var(--rgb-white));


  /* ─── Typography · Families ─── */
  --font-primary: 'Ubuntu Sans', 'Ubuntu', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-brand:   'Ubuntu Sans', 'Ubuntu', sans-serif;
  --font-mono:    'Ubuntu Sans', 'Ubuntu', sans-serif;

  /* ─── Typography · M3 Type Scale (CSS-var mirror of typography.css) ───
     Every component CSS that needs a font-size should consume one of these vars,
     never a raw px value. --ch-font-label-sm (12 px) is the system FLOOR. */
  --ch-font-display-lg:    64px;
  --ch-font-display-md:    56px;
  --ch-font-display-sm:    48px;
  --ch-font-headline-lg:   40px;
  --ch-font-headline-md:   32px;
  --ch-font-headline-sm:   28px;
  --ch-font-title-lg:      24px;
  --ch-font-title-md:      20px;
  --ch-font-title-sm:      18px;
  --ch-font-body-lg:       18px;
  --ch-font-body-md:       16px;
  --ch-font-body-sm:       14px;
  --ch-font-label-lg:      16px;
  --ch-font-label-md:      14px;
  --ch-font-label-sm:      12px;
  --ch-font-display-hero: 100px;   /* marketing hero only · cricket-news headline scale */

  /* ─── Typography · Button Label (component-specific) ───
     Own slot in the typography system so buttons can evolve independently of the generic
     Label tokens. Values mirror Label S/M/L today; bump weight or tracking here only. */
  --ch-button-label-sm-family:   var(--font-primary);
  --ch-button-label-sm-size:     0.75rem;   /* 12 px */
  --ch-button-label-sm-lh:       1rem;      /* 16 px */
  --ch-button-label-sm-weight:   500;
  --ch-button-label-sm-tracking: 0.04em;

  --ch-button-label-md-family:   var(--font-primary);
  --ch-button-label-md-size:     0.875rem;  /* 14 px */
  --ch-button-label-md-lh:       1.25rem;   /* 20 px */
  --ch-button-label-md-weight:   500;
  --ch-button-label-md-tracking: 0.01em;

  --ch-button-label-lg-family:   var(--font-primary);
  --ch-button-label-lg-size:     1rem;      /* 16 px */
  --ch-button-label-lg-lh:       1.5rem;    /* 24 px */
  --ch-button-label-lg-weight:   500;
  --ch-button-label-lg-tracking: 0.01em;

  /* ─── Spacing (4pt) — 12 foundation tokens ───
     Retired (do not reintroduce): --sp-6 · --sp-10 · --sp-96 (off-grid or unused) */
  --sp-2:  2px;  --sp-4:  4px;  --sp-8:  8px;   --sp-12: 12px;
  --sp-16: 16px; --sp-20: 20px; --sp-24: 24px;  --sp-32: 32px;
  --sp-40: 40px; --sp-48: 48px; --sp-64: 64px;  --sp-80: 80px;

  /* ─── Radius ─── */
  --radius-none: 0;
  --radius-xs:   4px;     /* inputs, badges, code chips */
  --radius-sm:   8px;     /* buttons (Small / Medium), chips, search */
  --radius-md:   12px;    /* cards (default), most surfaces */
  --radius-lg:   16px;    /* M3-aligned · analytics / promo / large surfaces (was 20 — shifted for M3 alignment) */
  --radius-xl:   28px;    /* NEW · modals, drawers, bottom sheets, large dialogs */
  --radius-full: 9999px;  /* pills, avatars, status chips, FAB */

  /* ─── Elevation · 6 levels (Material 3-aligned) ─── */
  --elevation-0: none;
  --elevation-1: 0 0 0 1px rgb(var(--rgb-black) / 0.04);
  --elevation-2: 0 1px 2px rgb(var(--rgb-black) / 0.04), 0 1px 3px rgb(var(--rgb-black) / 0.06);
  --elevation-3: 0 4px 12px rgb(var(--rgb-black) / 0.06), 0 1px 3px rgb(var(--rgb-black) / 0.04);
  --elevation-4: 0 8px 20px rgb(var(--rgb-black) / 0.08), 0 2px 4px rgb(var(--rgb-black) / 0.06);
  --elevation-5: 0 12px 32px rgb(var(--rgb-black) / 0.10), 0 2px 6px rgb(var(--rgb-black) / 0.06);

  /* Backward-compat aliases — existing component code keeps working */
  --shadow-ambient: var(--elevation-1);
  --shadow-card:    var(--elevation-2);
  --shadow-raised:  var(--elevation-3);
  --shadow-overlay: var(--elevation-5);

  /* ─── Focus ring ─── */
  --focus-ring:      0 0 0 3px rgb(var(--rgb-secondary) / 0.30);
  --focus-ring-chip: 0 0 0 2px rgb(var(--rgb-secondary) / 0.45);  /* chip-only · 2 px so it doesn't compete with the 32 px chip; 0.45 alpha keeps contrast against tonal teal fills */
}
