/* ==========================================================================
   Shared palette for wyattiscool.com, update.wyattiscool.com and grumps.
   One definition, three origins.

   Each page keeps its own :root block as a fallback; these rules use
   :root[data-theme="..."] so they win on specificity regardless of load order,
   and only take effect once a theme has actually been chosen.

   The choice lives in a cookie scoped to .wyattiscool.com, so it follows you
   between the apex, the update host and anything else on the domain.
   ========================================================================== */

/* Canonical token names (the Grumps set) plus aliases for the Gaia download
   page, which grew its own vocabulary before there was a shared one. Defined
   once here so neither page had to be rewritten. */
:root[data-theme] {
  --panel: var(--surface);
  --edge: var(--line2);
  --dim: var(--muted);
  --gold: var(--accent);
  --ok: var(--good);
}

/* ---------- Midnight — the default: deep navy, violet accent ---------- */
:root[data-theme='midnight'] {
  --bg: #0a0d16;
  --surface: #121826;
  --surface2: #19212f;
  --line: #28324a;
  --line2: #3a4767;
  --text: #e7ebf3;
  --muted: #8b95ab;
  --faint: #5c6680;
  --accent: #8b7bf5;
  --accent-dim: #5b4f9e;
  --spend: #f0b45a;
  --refund: #4fd1c5;
  --danger: #ea6b5c;
  --good: #5bc98a;
}

/* ---------- Ember — warm dark, amber accent (the old Gaia look) ---------- */
:root[data-theme='ember'] {
  --bg: #12100e;
  --surface: #1c1815;
  --surface2: #251f1a;
  --line: #3a3128;
  --line2: #4a3f32;
  --text: #e8e0d4;
  --muted: #9c8f7e;
  --faint: #6d6355;
  --accent: #d9a441;
  --accent-dim: #8a6a2b;
  --spend: #e8874a;
  --refund: #7fa650;
  --danger: #c96a52;
  --good: #7fa650;
}

/* ---------- Verdant — forest dark, moss accent ---------- */
:root[data-theme='verdant'] {
  --bg: #0a1210;
  --surface: #121e1a;
  --surface2: #182823;
  --line: #23392f;
  --line2: #325041;
  --text: #e2ece6;
  --muted: #86a294;
  --faint: #5a7268;
  --accent: #5cc98e;
  --accent-dim: #38855c;
  --spend: #d9b45a;
  --refund: #4fc5d1;
  --danger: #d97b5c;
  --good: #5cc98e;
}

/* ---------- Crimson — near-black, oxblood accent ---------- */
:root[data-theme='crimson'] {
  --bg: #120a0c;
  --surface: #1e1315;
  --surface2: #29191c;
  --line: #3d2226;
  --line2: #563136;
  --text: #f0e4e6;
  --muted: #a88f93;
  --faint: #755f63;
  --accent: #e2596b;
  --accent-dim: #93313f;
  --spend: #e0a052;
  --refund: #5bb9c4;
  --danger: #e2596b;
  --good: #6fb87f;
}

/* ---------- Slate — neutral grey, cool blue accent ---------- */
:root[data-theme='slate'] {
  --bg: #0e1114;
  --surface: #171b20;
  --surface2: #1f252b;
  --line: #2c333b;
  --line2: #3e4854;
  --text: #e6eaee;
  --muted: #8d97a3;
  --faint: #616b78;
  --accent: #61a5e8;
  --accent-dim: #3a6da0;
  --spend: #e0b05c;
  --refund: #55c2b8;
  --danger: #e0705c;
  --good: #63bd83;
}

/* ---------- Parchment — the light one ---------- */
:root[data-theme='parchment'] {
  --bg: #efe9dc;
  --surface: #f7f3ea;
  --surface2: #ffffff;
  --line: #d6ccb8;
  --line2: #bfb298;
  --text: #241f18;
  --muted: #5f574a;
  --faint: #8a8172;
  --accent: #7a5bd0;
  --accent-dim: #a893e0;
  --spend: #b07515;
  --refund: #1d7f75;
  --danger: #b1402c;
  --good: #3d7a3a;
}

/* Parchment inverts the page's assumptions about glow, so soften the big
   radial washes that were designed against a near-black ground. */
:root[data-theme='parchment'] body {
  background-image: none !important;
}
