/* ═══════════════════════════════════════════════════════════════════════════
   csa-palettes.css — rev_1200
   Accent palettes. A palette is a TEMPLATE: one block, seven tokens.

   Vincent: "go orange. but eventually this is a template thing."

   TWO DIMENSIONS, NOT FOUR THEMES
   ───────────────────────────────
     data-theme   = surfaces      (dark-minimal | light-minimal)
     data-palette = accent family (green | orange | …)

   Making orange a pair of new THEMES would duplicate every surface and status
   value per palette — six blocks for three palettes, and any surface tweak then
   has to be repeated in all of them. That is the same duplication that gave us
   drifting app lists (rev_1185) and nav lists (rev_1180). Keeping the two
   dimensions separate means a new palette composes with both surface themes for
   free.

   WHY EACH PALETTE STILL NEEDS TWO BLOCKS
   ───────────────────────────────────────
   The accent HUE is constant, but three of the seven tokens are surface-dependent
   and cannot be shared:
     --csa-accent-text   on a dark surface the accent reads fine as text; on a
                         light one it needs darkening to stay legible.
     --csa-accent-bg     a tint of the accent against the page: near-black on
                         dark, near-white on light.
     --csa-accent-hover  hover must move AWAY from the surface — lighter on dark,
                         darker on light.
   Getting that wrong is not cosmetic: rev_1167 found three primary buttons
   darkening on hover while every other one lightened.

   ADDING A PALETTE
   ────────────────
   Copy an orange pair, change the hue, add the id to CSA_PALETTES in topbar.js.
   Nothing else.

   Loaded AFTER cassandra-theme.css so these override its accent defaults. Custom
   properties resolve at use time, so no consumer needs reordering.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── GREEN — the default, declared explicitly ─────────────────────────────────
   Written out rather than left implicit so all palettes read the same way and
   `data-palette="green"` is a real, selectable value rather than a special case
   meaning "absent". Values identical to cassandra-theme.css, so this changes
   nothing for anyone who has not chosen a palette. */
[data-palette="green"]{
  --csa-accent:       #1d9e75;
  --csa-accent-rgb:   29,158,117;
  --csa-accent-text:  #1d9e75;
  --csa-accent-bg:    #0a2018;
  --csa-accent-hover: #2bbd8e;
  --csa-accent-soft:  rgba(29,158,117,.15);
  --csa-on-accent:    #ffffff;
}
[data-theme="light-minimal"][data-palette="green"]{
  --csa-accent-text:  #0f6e56;
  --csa-accent-bg:    #e1f5ee;
  --csa-accent-hover: #168a68;
  --csa-accent-soft:  rgba(29,158,117,.12);
}

/* ── ORANGE — the approved mock palette ──────────────────────────────────────
   #e0764a, taken from cassandra-material-design-audit.html and
   people-app-redesign-mocks.html, which Vincent approved. The shell shipped in
   rev_1186 was built in green and I never flagged that the mocks were a different
   colour — this is that correction.

   --on-accent is near-black here, NOT white. #e0764a is a light, warm hue: white
   text on it fails contrast badly, whereas the same hue in green (#1d9e75) is dark
   enough to carry white. A palette that only swapped the hue and kept white would
   have produced unreadable primary buttons. */
[data-palette="orange"]{
  --csa-accent:       #e0764a;
  --csa-accent-rgb:   224,118,74;
  --csa-accent-text:  #e0764a;
  --csa-accent-bg:    #3a1f14;   /* mock's --accent-bg */
  --csa-accent-hover: #ec8b63;   /* lighter: move away from a dark surface */
  --csa-accent-soft:  rgba(224,118,74,.15);
  --csa-on-accent:    #2a1206;   /* dark ON the accent — see the note above */
}
[data-theme="light-minimal"][data-palette="orange"]{
  --csa-accent-text:  #a34a22;   /* darkened so it stays legible on a light page */
  --csa-accent-bg:    #fdece4;
  --csa-accent-hover: #c25c2c;   /* darker: move away from a light surface */
  --csa-accent-soft:  rgba(224,118,74,.12);
  --csa-on-accent:    #ffffff;   /* against the darker light-mode accent, white wins */
}
