/* ============================================================================
   BENNY TERRACOTTA — brand theme
   ----------------------------------------------------------------------------
   A worked example of re-skinning the system WITHOUT forking it: token
   overrides only, loaded AFTER the base and the comms layer.

     <link rel="stylesheet" href="vendor/bennyr/agnt-stylesheet.css">
     <link rel="stylesheet" href="comms-layer.css">
     <link rel="stylesheet" href="themes/bennyr-terracotta.css">

   It also demonstrates the rule issue #1 exists to encode: a brand colour is
   picked once, but its accents are DERIVED PER SCHEME, because no single
   colour clears 4.5:1 against both near-black and white — the luminance bands
   do not overlap. The raw brand terracotta #D77757 is 6.12:1 on the dark page
   and only 3.15:1 on the white one, so light mode gets a darker step of the
   same hue rather than the same hex twice.

   Every value below is measured; `node tools/contrast.mjs` re-measures them
   from this file (not from a copy) and fails the build if one drifts.

   Contract each scheme has to satisfy:
     --accent   ≥ 3:1   vs --bg   (borders, focus ring, non-text fills)
     --accent2  ≥ 4.5:1 vs --bg   (link + label text — and, inverted, the
                                   button fill via --accent-interactive)
   ========================================================================== */

/* --- DARK (default) --- */
:root {
  --accent:  #D77757;   /* brand terracotta — 6.12:1 on --bg */
  --accent2: #E08A6C;   /* lighter step for text — 7.37:1 on --bg */
  --purple-bg: rgba(215,119,87,0.12);   /* brand tint, kept in step with --accent */
}

/* --- LIGHT --- */
/* Same hue, stepped darker: the light page needs low luminance where the dark
   page needed high. Override on `body.light-mode` — the selector the system
   itself uses — never once at :root for both schemes, or one of the two ends
   up unreadable (see memory/nested-token-alias-resolution for the related
   trap when the overridden value is an alias). --accent-interactive needs no
   restatement: the layer already declares it in BOTH scopes, so it picks up
   whichever --accent2 is in force. */
body.light-mode {
  --accent:  #B84E2E;   /* 5.04:1 on --bg */
  --accent2: #9E3F24;   /* 6.58:1 on --bg */
  --purple-bg: rgba(184,78,46,0.12);
}

/* The logo lockup follows the brand colour (base sheet convention). */
.topbar-logo span { color: var(--accent); }
