/* Canonical design tokens — the SINGLE SOURCE for the attendee, admin and
   marketing builds. Each surface consumes this file rather than duplicating
   these custom properties.

   Extracted from src/index.css (issue #342 / CF-50): staff.html used to carry
   its own hand-copied version of this block that drifted from the app's real
   values (red-orange accent vs the brand terracotta, a colder ink ramp, a
   --fog-400 silently pinned to --fog-300's hex) despite a comment claiming to
   match src/index.css. Values below are unchanged from src/index.css, which
   was picked as canonical. */

:root {
  /* Runtime-overridden per festival via AccentProvider. Fallback = terracota.
     Dark text reads better on this terracota than white (contrast ~5.6:1).

     Five tokens, five jobs (issues #411/#412 — do not collapse them):
       --accent       FILL only: backgrounds, rings, borders, dots.
       --accent-rgb   the same fill colour as an "R G B" triplet so Tailwind's
                      `/opacity` modifiers work on it. Always --accent's own
                      channels — never a foreground token's.
       --accent-ink   readable text/marks ON TOP of --accent.
       --accent-text  --accent used AS foreground text on a CONTENT surface —
                      --ink-900..--ink-600 and the low-opacity accent washes
                      painted over them — solved to >=4.5:1 on the worst of
                      those. The brand terracota needs a nudge even in dark
                      theme: #D77A69 is 4.39:1 on bare --ink-600.
       --accent-scrim --accent used AS foreground text on a `bg-black/NN` SCRIM
                      over an artist photo. A separate token because that is a
                      separate surface: a scrim is dark in BOTH themes, so the
                      light-theme --accent-text (which travels toward black)
                      reads WORSE there than the unsolved fill — 7.07:1 ->
                      3.28:1 for the DROPS cyan on ArtistCard's headliner
                      badge. Never swap the two.
     All five are AccentProvider.accentTokens() output; the values baked here
     are the static fallback for screens with no festival loaded (Home and
     Admin) and are pinned to the live derivation by
     src/test/accentProvider.test.js. --accent/--accent-rgb must move together
     (AGENTS.md, design-system rules; src/test/accentPairScan.test.js), and
     the solved tokens' drift is caught by the same scan.

     The hex form of --accent is still read directly by the color-mix() call
     sites that predate #412 (src/index.css, src/screens/Lineup.jsx,
     src/screens/Wallet.jsx, src/components/TimeRuler.jsx,
     src/screens/LedScroller.jsx) and by public/*.html (which declare their own
     --accent and link no stylesheet that could supply these). */
  --accent: #D77A69;
  --accent-ink: #1a1a25;
  --accent-rgb: 215 122 105;
  --accent-text: #dd8c7e;
  --accent-scrim: #e7b1a6;

  /* Day/night tokens — RGB triplets (no rgb()/commas) so Tailwind's `/opacity`
     modifiers (bg-ink-700/90, text-danger/15, ...) work against them. Dark is
     the default; light lives under [data-theme="light"] below.
     Tinta #1A1A25 + ciruela #513750 tint — laminate/warm motif. */
  --ink-900: 26 26 37;
  --ink-800: 33 30 45;
  --ink-700: 40 35 52;
  --ink-600: 51 43 66;
  --ink-500: 68 56 83;
  --ink-400: 92 75 110;
  --fog-500: 162 146 166;
  --fog-400: 188 174 190;
  --fog-300: 222 210 214;
  --fog-100: 242 233 231;
  --ok: 61 220 151;
  --warn: 255 176 32;
  --danger: 255 77 109;
  color-scheme: dark;
}

:root[data-theme="light"] {
  /* Terracota darkened to #9B584C by LIGHT_DARKEN_FACTOR — an aesthetic move
     so a bright accent does not glow off the paper background, NOT a contrast
     guarantee (it lands this terracota at 4.15:1 on --ink-600). The guarantee
     lives in --accent-text / --accent-scrim, solved per accent; see the :root
     block above and src/components/AccentProvider.jsx. AccentProvider derives
     all five the same way for a festival's own accent_color; these are the
     static fallbacks for screens with no festival loaded (Home, Admin). */
  --accent: #9B584C;
  --accent-ink: #F2F2F7;
  --accent-rgb: 155 88 76;   /* #9B584C, same rationale as :root's --accent-rgb above */
  --accent-text: #874d42;
  /* Lighter than --accent, not darker: the scrim it sits on is dark in BOTH
     themes, so this one travels toward white while --accent-text above
     travels toward black. That divergence is the whole reason they are two
     tokens (PR #428 review, B1). */
  --accent-scrim: #d4b7b1;
  --ink-900: 250 245 241;
  --ink-800: 243 236 230;
  --ink-700: 255 255 255;
  --ink-600: 234 224 218;
  --ink-500: 217 203 199;
  --ink-400: 188 168 166;
  --fog-500: 125 106 116;
  --fog-400: 94 77 87;
  --fog-300: 59 46 56;
  --fog-100: 28 20 30;
  /* CF-22 (#337): darkened from #169463/#AD6400 — #337 review blocker
     caught an earlier revision of this comment claiming the OLD pair "read
     the required 4.5:1 at face value against the page background", which
     was false in EITHER reading: flat against `--ink-900` they measured
     3.559:1 / 4.217:1 (both already below 4.5:1 — not a near-miss), and
     against the COMPOSITED strip background these tokens actually paint as
     TEXT (`text-ok`/`text-warn` at 100% opacity over their own
     `bg-ok/10`/`bg-warn/10` wash on `body.bg-ink-900` — §8's real
     requirement, since the self-tint moves the effective background a hair
     toward the token's own color) they measured 3.166:1 / 3.741:1, further
     below the floor still. These land at 4.538:1 / 4.953:1 against that
     same composited background (see src/test/adminA11y.test.js's contrast
     unit check, which computes the real ratio rather than asserting it in
     prose — and a negative control there proves the check can actually
     fail, using these same pre-#337 hex values). */
  --ok: 14 118 80;
  --warn: 143 83 0;
  --danger: 196 31 63;
  color-scheme: light;
}
