/* ============================================================
   NATIVE PRAXIS AI LABS — product palette
   ------------------------------------------------------------
   Companion to rootlife-tokens.css, same architecture: the DS
   ships .brand-ai; this file adds the roles the Heirloom Praxis surfaces
   (Soil Data Console, Hub Demand Forecast, Member Recommendations,
   Compost Loop) actually use and the DS does not name.

   Link AFTER the DS token sheets and styles.css. A full AI page wraps its body in
   class="brand-ai ai-page"; a Labs inset embedded in a Root Life page uses
   class="brand-ai ai-surface" instead — same tokens, but it must not repaint the canvas.

     --bg-page #080B10  --bg-sunken #04060A  --surface-card #12161C
     --surface-raised #20262D  --text-strong #EAE6D9
     --text-body #C4CDD2  --text-muted #7C878F
     --border-subtle #232A32  --border-strong #35404A
     --accent #157A7A  --accent-hover #1B9494  --accent-soft #103038
     --highlight #63DDD5  --link-hover #8BEBE3
   all come from the DS .brand-ai scope — do not redefine them here.
   ============================================================ */

:root {
  --bg-page-ai: #080B10;
}

/* `ai-page` = the page's own wrapper (paints the canvas).
   `ai-surface` = a nested Labs inset on a page of another brand (must NOT paint the canvas).
   Both get the tokens; only ai-page reaches body. */
body:has(.ai-page) {
  background: var(--bg-page-ai);
}

.brand-ai.ai-page,
.brand-ai .ai-page,
.brand-ai.ai-surface,
.brand-ai .ai-surface {
  /* ---- dark surface ladder (above --surface-card) ---- */
  --surface-sunken: #0C1015;       /* the workhorse panel: insets, cards, callouts */
  --surface-panel: #10161C;
  --surface-panel-cool: #101E2A;
  --surface-panel-deep: #10202A;
  --surface-panel-warm: #12202A;
  --surface-slate: #171D24;
  --surface-ink: #101A1C;

  /* ---- borders ---- */
  --border-panel: #1D2A30;
  --border-slate: #24333A;
  --border-faint: #1D3540;         /* decorative rings, low-opacity guides */
  --border-data: #2A5560;          /* data ranges, chart furniture */

  /* ---- violet on dark ----
     The DS brand violet #7357A6 is a DARK colour. Used as chip ink on its own 16%
     tint it measures 2.75:1, unlike the gold and cyan chips beside it, which are
     both light. This is the on-dark step the brand violet is missing: 5.7:1. */
  --ai-violet-on-dark: #A98FD6;

  /* ---- teal scale (below --accent, above --accent-soft) ---- */
  --teal-stroke: #3FA39B;          /* active chart strokes */
  --teal-mid: #2C6E6A;
  --teal-deep: #245450;
  --teal-shadow: #183A38;
  --teal-abyss: #08201E;
  --teal-abyss-warm: #10241F;
  --teal-muted: #5E8B84;

  /* ---- interactive grounds ----
     --accent #157A7A is a no-man's-land luminance: bone ink on it is 4.11:1 and the DS's own
     --text-on-accent (void, #080B10) is 3.84:1, so NEITHER clears AA at normal text sizes.
     Never put text on --accent. Use these pairs instead. */
  --cta-ground: var(--highlight);        /* #63DDD5 + void ink = 12.04:1 */
  --cta-ink: var(--bg-page);
  --chip-on-ground: var(--teal-mid);     /* #2C6E6A + bone ink = 4.74:1 */
  --chip-on-ink: var(--text-strong);

  /* ---- text steps the DS does not name ---- */
  --text-body-soft: #9BB0B5;       /* secondary copy, between body and muted */
  --text-muted-cool: #8B99A2;
  --text-dim: #55606A;             /* inactive indicators — NOT for reading text */

  /* ---- critical / required ---- */
  --critical: #E9A6A0;
  --critical-bg: #2A1A1E;
  --critical-text: #F1CFCB;

  /* ---- network map furniture (Community Impact Map) ---- */
  --net-edge: #20424A;             /* inactive hub-to-hub edge */
  --net-edge-active: #3C6E76;      /* edge touching the selected hub */
  --surface-chip-cool: #24505A;    /* legend / count chip ground on the map */

  /* ---- Root Life green, where an AI surface references the farm ---- */
  --eco-ground: #1D3B2A;
  --eco-ground-deep: #12281B;
}
