/* ============================================================
   JAX SCHEME — ember
   Amber on ash. The original Jax accent, and the default bundle.

   Colour contract only. Pairs with tokens.css, which owns every
   non-colour token and the shadow/tint formulas that read these.

   Both modes live in one declaration: light-dark(light, dark).
   tokens.css sets color-scheme, so the mode resolves from
   [data-theme] or the OS preference with no second block to drift.

   Hand-tuned, unlike the generated schemes: these are the values
   the light palette was retoned to in the paper/ember pass.
   ============================================================ */

:root {
    --scheme: "ember";

    /* --- Backgrounds --- */
    --bg-primary: light-dark(#fbfaf7, #0f0f0f);
    --bg-secondary: light-dark(#f2efe8, #1a1a1a);
    --bg-tertiary: light-dark(#e8e5dd, #242424);

    /* --- Text --- */
    --text-primary: light-dark(#1f1c17, #e0e0e0);
    --text-secondary: light-dark(#57514a, #b0b0b0);
    --text-muted: light-dark(#6d665c, #888888);
    /* Dark dim sits just under muted: #777777 misses AA against the ash
       page (4.28:1) and --text-dim is gated like any other ink. */
    --text-dim: light-dark(#77705f, #7d7d7d);

    /* --- Borders --- */
    --border-color: light-dark(#d9d4c9, #333333);
    --border-subtle: light-dark(#eae6de, #2a2a2a);

    /* --- Accent --- */
    --accent: light-dark(#d1731f, #e67e22);
    --accent-hover: light-dark(#b9631a, #d35400);

    /* --- Accent as a solid fill ---
       --color-accent-solid is the value a LABEL sits on, so it is checked
       against --text-on-accent rather than against the page behind it.

       Both modes put the darkest neutral they have on an amber block. That
       is what keeps the light fill a true amber instead of a dark rust: a
       LIGHT label would force the fill down to about #b34b00 to clear AA,
       and at that point the accent has stopped being amber. Dark ink pins
       the fill inside a narrow luminance band (0.228-0.285 in light), which
       is exactly where ember lives once its value comes down for paper.

       The hover diverges by mode. The light fill already sits near the top
       of that band, so it brightens where dark deepens; deepening it would
       drop the ink below 4.5:1. */
    --color-accent-solid: light-dark(#d1731f, #e67e22);
    --color-accent-solid-hover: light-dark(#dd8129, #d35400);
    --text-on-accent: light-dark(#1f1c17, #0f0f0f);

    /* --- Semantic fills --- */
    --color-ok: light-dark(#2f8757, #2ecc71);
    --color-warn: light-dark(#b0790e, #f1c40f);
    --color-error: light-dark(#b84a3c, #e74c3c);
    --color-info: light-dark(#35719e, #3498db);

    /* --- Semantic ink --- */
    --text-accent: light-dark(#96430d, #e67e22);
    --text-ok: light-dark(#256b45, #2ecc71);
    --text-warn: light-dark(#7c5309, #f1c40f);
    --text-error: light-dark(#a03b2d, #ef6b5c);
    --text-info: light-dark(#275a82, #40a3e5);

    /* --- Tint sources --- */
    --highlight: light-dark(#3d3428, #ffffff);
    --shadow: light-dark(#3d3428, #000000);
}
