/* ──────────────────────────────────────────────────────────────────────────
   Conscious UX Studio — design tokens
   Canonical CSS custom properties. Loaded from _theme.html so every page
   picks up the same values; inline :root blocks in templates remain as
   page-local overrides if a page needs to depart from the defaults.

   Read order in a page:
     1. Inline <style> :root (in template head) — page-specific
     2. _theme.html <link rel="stylesheet" href="/static/tokens.css"> — canonical
     3. _theme.html <link rel="stylesheet" href="/static/components.css">
   Because _theme.html is included at the END of the body, tokens.css and
   components.css load AFTER inline styles in the head and therefore win
   on equal-specificity declarations — that's how we converge drift.

   ⚠ Page-local :root gotcha
   If a template defines `:root { --accent: #xyz; }` in its inline <style>,
   the canonical token in this file overrides it (later wins at equal
   specificity). However, if a template uses a more-specific selector for
   the override — e.g. `body :root` or `[data-theme="light"] :root` — that
   override will win and the page will silently drift when this file is
   updated. To check what's overriding what for a page, search the template
   for ":root" and "data-theme" blocks before changing a token here.

   Fonts are loaded from /static/fonts/fonts.css directly in each page's
   <head> (not @import'd here) so that font fetches start in parallel with
   the rest of the page render — avoiding FOUT.
   ────────────────────────────────────────────────────────────────────────── */

/* ── Dark theme (default) ─────────────────────────────────────────────── */
:root{
  /* Surface */
  --bg:#0a0a0a;
  --bg2:#0e0e0e;
  --bg3:#141414;
  --bg4:#1a1a1a;

  /* Text — note --text3 has been bumped to AA contrast (was .38 → .55) */
  --text:#f0ede8;
  --text2:rgba(240,237,232,.62);
  --text3:rgba(240,237,232,.55);

  /* Accent */
  --accent:#88b39e;
  --accent2:#b3d4be;
  --sage:#6b9e7a;

  /* Rules & borders */
  --rule:rgba(255,255,255,.06);
  --border:#1a1a1a;
  --border2:#252525;

  /* Star / heart accents */
  --star:#ffb74d;
  --heart:#ff6b6b;

  /* Typography */
  --display:'Space Grotesk',-apple-system,BlinkMacSystemFont,system-ui,sans-serif;
  --serif:'Space Grotesk',-apple-system,BlinkMacSystemFont,system-ui,sans-serif;
  --sans:'DM Sans',-apple-system,BlinkMacSystemFont,system-ui,sans-serif;
  --mono:'DM Mono','SF Mono',Menlo,monospace;

  /* Geometry */
  --radius:4px;
  --radius-lg:8px;

  /* Sidebar */
  --sidebar:300px;
}

/* ── Light theme — dusty lilac ────────────────────────────────────────── */
[data-theme="light"]{
  --bg:#f5f1f8;
  --bg2:#ece6f0;
  --bg3:#e0d8e6;
  --bg4:#cdc3d6;
  --text:#0a0a0a;     /* 18.5:1 */
  --text2:#3a3a3a;    /* 10.5:1 */
  --text3:#5e5e5e;    /*  5.7:1 — AA for normal text */
  --accent:#2d5a47;   /*  7.1:1 — darker sage */
  --accent2:#1e4332;  /* 10.4:1 */
  --sage:#2d5a47;
  --rule:#dad2e1;
  --border:#dad2e1;
  --border2:#bdb3c6;
}
