/* CrumbJar design tokens, single source of truth for the brand colour + type system.
   Every value here is WCAG-AA verified in 06 Verification scripts/brand_contrast.py.
   Accent family generated in one OKLCH envelope (L .62 core / .45 deep / .94 tint) so
   twenty games read as one family. Import this before component styles. */

:root {
  /* --- core palette: light --- */
  --paper:        #FBF5EA;   /* app background, warm cream, kitchen table not casino */
  --surface:      #FFFFFF;   /* cards, modals */
  --ink:          #1A2018;   /* primary text, aligned to the Design Standard (Report 36); ~16:1 on paper */
  --ink-muted:    #5E5347;   /* secondary text, 6.9:1 on paper */
  --toast:        #B4531F;   /* brand / primary action, 4.6:1 on paper, white text 5.0:1 */
  --jam:          #9E2B25;   /* negative / alert */
  --sage:         #3F6F52;   /* positive / confirm */
  --hairline:     #E4D9C4;   /* dividers on paper */

  /* --- secondary / illustration palette (Design Standard, Report 36) ---
     For illustration, mascot scenes and decorative fills ONLY, NOT for body text.
     Drawn from the concept brand sheet; graphical use, so no small-text contrast claim. */
  --sky:          #7BA7C7;   /* cool accent, skies, water, calm surfaces */
  --plum:         #6B4B6E;   /* deep accent, richness, night scenes */
  --sand:         #CBB888;   /* warm neutral, kitchen/craft surfaces */
  --stone:        #A49C90;   /* warm grey, shadows, quiet fills */

  /* --- neutral scale (warm greys, never cold) --- */
  --n-050: #F7F1E6;
  --n-100: #EFE7D8;
  --n-200: #DED2BE;
  --n-300: #C6B79E;
  --n-400: #A7967C;
  --n-500: #83745E;
  --n-600: #635647;
  --n-700: #473D31;
  --n-800: #2F281F;
  --n-900: #1C1710;

  /* --- type --- */
  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-ui: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --num: tabular-nums;            /* puzzle grids: font-variant-numeric: var(--num) */
  --num-features: "tnum" 1, "zero" 1;  /* slashed zero, tabular figures */

  /* --- shape / touch --- */
  --radius: 14px;
  --radius-lg: 26px;
  --touch-min: 48px;             /* minimum touch target, thumbs */

  /* --- focus --- Design Standard focus ring is a soft blue (#A6C3E8). For accessibility the
     visible indicator is ALWAYS paired with the toast keyline below (>=3:1), so the soft ring is
     the glow, never the sole indicator (WCAG 2.4.11). */
  --focus-ring: #A6C3E8;
  --focus: 3px solid var(--toast);          /* accessible indicator (kept) */
  --focus-glow: 0 0 0 3px var(--focus-ring); /* decorative soft-blue ring from the concepts */
}

/* --- dark mode: play-in-bed, day one, not retrofitted --- */
:root[data-theme="dark"], .dark {
  --paper:     #171310;   /* night */
  --surface:   #221D17;
  --ink:       #F3EADB;   /* 15.5:1 on night */
  --ink-muted: #B0A18C;   /* 7.3:1 on night */
  --toast:     #E5843F;   /* brightened for dark, 6.8:1 on night */
  --jam:       #E86A5C;
  --sage:      #7FB891;
  --hairline:  #3A3025;
}

/* --- per-game accent slots ---------------------------------------------
   Each title gets ONE slot: --accent-tint (chip bg), --accent (keyline / frame),
   --accent-deep (label text on tint, and text on paper). Assign one per game.
   Rule: --accent is a graphical colour + LARGE text only (3:1). Body text uses
   --accent-deep (5.6:1+ on its tint). Never put small white text on --accent. */
[data-accent="01"]{--accent-tint:#FFE4E3;--accent:#C26869;--accent-deep:#8A363A;}
[data-accent="02"]{--accent-tint:#FEE5DD;--accent:#C06C51;--accent-deep:#893A20;}
[data-accent="03"]{--accent-tint:#FCE7D8;--accent:#BA723B;--accent-deep:#844000;}
[data-accent="04"]{--accent-tint:#F8E9D6;--accent:#AF7A29;--accent-deep:#7A4900;}
[data-accent="05"]{--accent-tint:#F2EBD5;--accent:#9F8322;--accent-deep:#6C5100;}
[data-accent="06"]{--accent-tint:#ECEDD7;--accent:#8B8C2E;--accent-deep:#5A5A00;}
[data-accent="07"]{--accent-tint:#E5EFDA;--accent:#729343;--accent-deep:#426005;}
[data-accent="08"]{--accent-tint:#DFF1DF;--accent:#54985B;--accent-deep:#1F652A;}
[data-accent="09"]{--accent-tint:#DAF2E6;--accent:#309C73;--accent-deep:#006844;}
[data-accent="10"]{--accent-tint:#D6F2ED;--accent:#009C8B;--accent-deep:#00695A;}
[data-accent="11"]{--accent-tint:#D5F2F3;--accent:#009AA1;--accent-deep:#00676E;}
[data-accent="12"]{--accent-tint:#D6F1F9;--accent:#0096B4;--accent-deep:#00637F;}
[data-accent="13"]{--accent-tint:#D9EFFD;--accent:#3090C2;--accent-deep:#005D8C;}
[data-accent="14"]{--accent-tint:#DEEDFF;--accent:#5289CA;--accent-deep:#205693;}
[data-accent="15"]{--accent-tint:#E4EBFF;--accent:#6E81CB;--accent-deep:#404F94;}
[data-accent="16"]{--accent-tint:#EAE8FF;--accent:#8679C6;--accent-deep:#564790;}
[data-accent="17"]{--accent-tint:#F1E6FB;--accent:#9972BB;--accent-deep:#674186;}
[data-accent="18"]{--accent-tint:#F6E5F6;--accent:#AA6CAB;--accent-deep:#753B77;}
[data-accent="19"]{--accent-tint:#FBE4F0;--accent:#B66897;--accent-deep:#803765;}
[data-accent="20"]{--accent-tint:#FEE3E9;--accent:#BE6781;--accent-deep:#873550;}
/* Slot 21, the first ADOPTED-ORIGINAL beyond the launch-20 wheel (Sound Ladder, DR-022). Generated
   from the SAME OKLCH envelope (L/C fixed) at a new in-family hue (11°), so it reads as one family and
   clears the same WCAG bars as the twenty, audited in 06 Verification scripts/brand_contrast.py:
   accent/paper 3.56:1 (need 3.0), deep/tint 6.54:1, deep/paper 7.28:1 (need 4.5). A permanent brand
   slot for the originals is a BRIEF-04 pass; this extends the wheel rather than reusing a launch hue. */
[data-accent="21"]{--accent-tint:#FFE3E6;--accent:#C06775;--accent-deep:#893545;}
/* Slot 22, adopted original beyond the launch-20 wheel (Six Rolls, DR-031/DR-052). Same OKLCH
   envelope (L/C fixed) at the next in-family hue, so it reads as one family and clears the same WCAG
   bars as the twenty, a permanent brand slot is a BRIEF-04 pass; this extends the wheel, not reuses. */
[data-accent="22"]{--accent-tint:#FEE4DF;--accent:#BE6C59;--accent-deep:#873B27;}
/* Slot 23, adopted original beyond the launch-20 wheel (Four Roads, DR-027). Same OKLCH envelope
   (L/C fixed) at the next in-family hue, so it reads as one family and clears the same WCAG bars as the
   twenty, a permanent brand slot for the originals is a BRIEF-04 pass; this extends the wheel (added at
   the owner's request, "add in another accent colour"), it does not reuse a launch hue. */
[data-accent="23"]{--accent-tint:#FCE6D8;--accent:#B4743C;--accent-deep:#7C4700;}
