/* ── Codex Theme Tokens (v55) ───────────────────────────────────────────────
   The site's entire palette flows from TEN role tokens the DM can retint
   from Admin → Appearance. Every other shade is DERIVED with color-mix so
   one accent change re-tints borders, hovers, gradients, and button text
   coherently. Derived tokens can still be overridden individually (inline
   overrides on <html> win over these :root defaults).
   Defaults reproduce the shipped gold-parchment look exactly. */
:root{
  /* ── the ten DM-facing roles ── */
  --cx-accent:#f4c867;        /* titles, links, gold highlights */
  --cx-accent-deep:#c9a24a;   /* small-caps labels, deep gold */
  --cx-bg:#0d0b08;            /* page background */
  --cx-surface:#14100a;       /* cards and panels */
  --cx-field:#100c06;         /* inputs and wells */
  --cx-text:#e8dcc0;          /* primary text */
  --cx-text-soft:#b0a488;     /* secondary text */
  --cx-text-dim:#8a8377;      /* muted text, hints */
  --cx-danger:#e06060;        /* destructive, errors */
  --cx-success:#7fbf87;       /* confirmations, healthy */

  /* ── derived family ── */
  --cx-accent-bright:color-mix(in srgb,var(--cx-accent) 64%,white);
  --cx-accent-dim:color-mix(in srgb,var(--cx-accent) 48%,var(--cx-bg));
  --cx-on-accent:color-mix(in srgb,var(--cx-accent) 12%,#161006); /* dark text on accent buttons */
  --cx-bg-2:color-mix(in srgb,var(--cx-bg) 60%,var(--cx-surface));
  --cx-surface-2:color-mix(in srgb,var(--cx-surface) 96%,white);
  --cx-surface-3:color-mix(in srgb,var(--cx-surface) 92%,white);
  --cx-border:color-mix(in srgb,var(--cx-accent) 14%,var(--cx-bg));
  --cx-border-strong:color-mix(in srgb,var(--cx-accent) 38%,var(--cx-bg));
  --cx-text-strong:color-mix(in srgb,var(--cx-text) 80%,white);
  --cx-text-faint:color-mix(in srgb,var(--cx-text-dim) 60%,var(--cx-bg));
  --cx-danger-deep:color-mix(in srgb,var(--cx-danger) 58%,black);
  --cx-success-deep:color-mix(in srgb,var(--cx-success) 70%,black);
}
