/* ---------------------------------------------------------------------------
 * chepi — warm token CSS (v0.1.0), scoped to `.warm`.
 *
 * INTERIM, HAND-AUTHORED from tokens/raw.json. Style Dictionary build is
 * deferred (§15.4 YAGNI); `tokens/raw.json` remains the source of truth. When
 * a token changes, change raw.json first, then mirror here.
 *
 * Scoped to `.warm` (not :root) on purpose: the legacy app globals reuse names
 * like `--muted`, so global tokens would collide. Everything under a `.warm`
 * subtree gets these values. Dark mode = `.warm[data-theme="dark"]` plus the
 * OS preference when no explicit theme is set.
 * ------------------------------------------------------------------------- */

.warm {
  --bg: #FBF1EC;
  --surface: #FFFAF6;
  --surface-2: #FFFFFF;
  --field: #FFFFFF;
  --text: #2E2420;
  --muted: #8A7A72;
  --rule: #F0E2D9;
  --rule-strong: #E4D0C3;
  --accent: #EA6A80;
  --accent-strong: #D74E68;
  --accent-soft: #FDE4E9;
  --on-accent: #FFFFFF;
  --ok: #5F9E6A;
  --ok-soft: #E6F1E6;
  --warn: #C77D1E;
  --warn-soft: #FAEDDA;
  --danger: #CE5A4E;
  --danger-soft: #FBE4E0;
  --punc: #C9A9A0;

  --shadow-sm: 0 1px 2px rgba(60, 30, 20, .07);
  --shadow-md: 0 2px 4px rgba(60, 30, 20, .06), 0 12px 30px rgba(46, 36, 32, .10);
  --shadow-accent: 0 6px 18px rgba(234, 106, 128, .34);

  /* Nunito / Figtree are UNVERIFIED candidates (not installed) — falls back to
     the system rounded stack until a licensed webfont is added. */
  --font-display: "Nunito", ui-rounded, "SF Pro Rounded", "Segoe UI", system-ui, sans-serif;
  --font-body: "Figtree", ui-rounded, "SF Pro Rounded", "Segoe UI", system-ui, sans-serif;

  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-pill: 999px;

  color-scheme: light;
}

.warm[data-theme="dark"] {
  --bg: #211A17;
  --surface: #2A211D;
  --surface-2: #332822;
  --field: #2F261F;
  --text: #F3E7DF;
  --muted: #B7A79D;
  --rule: #3D302A;
  --rule-strong: #4A3A32;
  --accent: #F2839A;
  --accent-strong: #F7A0B2;
  --accent-soft: #3A2A2D;
  --on-accent: #2A1418;
  --ok: #7FBE85;
  --ok-soft: #26332A;
  --warn: #E3A94A;
  --warn-soft: #3A2F1C;
  --danger: #E58479;
  --danger-soft: #3A2420;
  --punc: #8F746C;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow-md: 0 2px 4px rgba(0, 0, 0, .35), 0 14px 34px rgba(0, 0, 0, .5);
  --shadow-accent: 0 6px 18px rgba(0, 0, 0, .45);

  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  .warm:not([data-theme="light"]) {
    --bg: #211A17;
    --surface: #2A211D;
    --surface-2: #332822;
    --field: #2F261F;
    --text: #F3E7DF;
    --muted: #B7A79D;
    --rule: #3D302A;
    --rule-strong: #4A3A32;
    --accent: #F2839A;
    --accent-strong: #F7A0B2;
    --accent-soft: #3A2A2D;
    --on-accent: #2A1418;
    --ok: #7FBE85;
    --ok-soft: #26332A;
    --warn: #E3A94A;
    --warn-soft: #3A2F1C;
    --danger: #E58479;
    --danger-soft: #3A2420;
    --punc: #8F746C;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow-md: 0 2px 4px rgba(0, 0, 0, .35), 0 14px 34px rgba(0, 0, 0, .5);
    --shadow-accent: 0 6px 18px rgba(0, 0, 0, .45);

    color-scheme: dark;
  }
}
