/*
 * Graphite Atelier — design tokens for the nood ERP.
 *
 * The ONLY file in the ERP allowed to contain raw colour values. Everything
 * else (components.css, page templates, chart config) reads these variables.
 * Source of truth: .claude/skills/graphite-atelier/assets/graphite-atelier-reference.html
 * (its final "neutral graphite" and "final art-direction pass" layers).
 * Decisions (Hayden, 2026-11-16): dark only, olive accent.
 */
:root {
  color-scheme: dark;

  /* Surfaces — warm neutral graphite, no blue/green undertone */
  --bg: #29292A;            /* canvas */
  --bg-2: #303031;          /* canvas, lighter end of the page gradient */
  --bg-3: #252526;          /* canvas, darker end; sidebar base */
  --panel: #333334;         /* standard surface */
  --panel-2: #3A3A3B;       /* raised surface / inputs */
  --panel-3: #424142;       /* deepest lift: selected segment, hover on raised */
  --card-top: #383839;      /* primary card gradient */
  --card-bottom: #323233;
  --hero-1: #414140;        /* focal surface gradient */
  --hero-2: #363636;
  --hero-3: #303031;
  --scrim: rgba(18, 18, 18, .62);

  /* Ink */
  --ink: #F4F2EE;           /* primary text */
  --ink-2: #DFDCD5;         /* secondary text, table cells */
  --muted: #C3C0B9;         /* supporting copy (lifted from the reference's #B6B3AD: measured too faint at ERP sizes) */
  --muted-2: #B8B5AE;       /* metadata, captions, axis labels (lifted from #AAA79F for 11px legibility) */
  --muted-3: #99958E;       /* disabled, placeholders */

  /* Rules and edges */
  --line: #4B4947;          /* standard divider */
  --line-2: #57534F;        /* stronger divider */
  --edge: rgba(255, 255, 255, .08);       /* hairline border on surfaces */
  --edge-soft: rgba(255, 255, 255, .05);
  --edge-hi: rgba(255, 255, 255, .045);   /* top-edge highlight */
  --row-line: rgba(255, 255, 255, .105);  /* ledger / table row divider */
  --hover: rgba(255, 255, 255, .035);
  --hover-2: rgba(255, 255, 255, .06);
  --seg-bg: rgba(255, 255, 255, .03);        /* segmented-control track */
  --table-head-bg: rgba(0, 0, 0, .06);       /* table header band */
  --strip-bg: rgba(20, 20, 20, .14);         /* stat strip under a focal surface */

  /* Accent — olive family (the only accent in the ERP) */
  --accent: #89906B;
  --accent-2: #A0A783;      /* light: hover, focus ring */
  --accent-3: #656C4D;      /* dark */
  --accent-4: #C3C9AA;      /* pale: text-forward actions, accent text */
  --accent-rgb: 137, 144, 107;
  --accent-fade: rgba(137, 144, 107, .045);
  --accent-soft: rgba(137, 144, 107, .12);
  --accent-strong: rgba(137, 144, 107, .2);
  --accent-edge: rgba(137, 144, 107, .34);
  --primary-top: rgba(137, 144, 107, .34);   /* primary button gradient */
  --primary-bottom: rgba(137, 144, 107, .2);

  /* Status — restrained, always paired with a text label */
  --ok: #7FC46E;       --ok-ink: #BDE7AA;   --ok-bg: rgba(127, 196, 110, .10);  --ok-edge: rgba(127, 196, 110, .20);
  --warn: #D79A4A;     --warn-ink: #F1C694; --warn-bg: rgba(215, 154, 74, .12); --warn-edge: rgba(215, 154, 74, .22);
  --bad: #D15F55;      --bad-ink: #F4AAA2;  --bad-bg: rgba(209, 95, 85, .13);  --bad-edge: rgba(209, 95, 85, .32);  /* clearly red, not salmon: must not read as Warning (Hayden, 2026-11-16) */
  --info-ink: var(--ink-2); --info-bg: rgba(255, 255, 255, .05); --info-edge: rgba(255, 255, 255, .07);

  /* Charts */
  --chart-grid: rgba(255, 255, 255, .09);
  --chart-axis: var(--muted-2);
  --chart-series-1: var(--accent-2);
  --chart-series-2: rgba(244, 242, 238, .55);  /* neutral comparison / baseline */
  --chart-series-3: rgba(244, 242, 238, .32);
  --chart-series-4: rgba(195, 201, 170, .55);
  --chart-fill: rgba(137, 144, 107, .16);

  /* Type */
  --font: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --fs-display: clamp(31px, 3vw, 42px);
  --fs-h2: clamp(22px, 2vw, 26px);
  --fs-h3: 18px;
  --fs-h4: 15px;
  --fs-body: 13px;
  --fs-small: 12px;
  --fs-meta: 11px;
  --fs-label: 10px;
  --ls-display: -1.65px;
  --ls-tight: -.45px;
  --ls-label: 1.4px;

  /* Space (4px base) */
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 20px;
  --s-6: 24px; --s-7: 28px; --s-8: 32px; --s-10: 40px; --s-12: 48px;

  /* Geometry */
  --radius: 10px;      /* surfaces */
  --radius-sm: 6px;    /* controls */
  --radius-xs: 4px;    /* tags, chips */
  --sidebar-w: 248px;
  --topbar-h: 60px;
  --content-max: 1630px;
  --control-h: 36px;

  /* Depth — selective: primary > secondary > tertiary (none) */
  --shadow-card: 0 11px 22px rgba(8, 8, 8, .13), 0 2px 6px rgba(8, 8, 8, .06), inset 0 1px 0 var(--edge-hi);
  --shadow-hero: 0 24px 48px rgba(0, 0, 0, .17), 0 4px 12px rgba(0, 0, 0, .11), inset 0 1px 0 rgba(255, 255, 255, .05);
  --shadow-float: 0 18px 40px rgba(0, 0, 0, .28), 0 4px 12px rgba(0, 0, 0, .16), inset 0 1px 0 var(--edge-hi);
  --shadow-flat: 0 5px 12px rgba(0, 0, 0, .09);
  --shadow-control: inset 0 1px 0 rgba(255, 255, 255, .03);
  --shadow-primary: inset 0 1px 0 rgba(255, 255, 255, .10), inset 0 -1px 0 rgba(0, 0, 0, .12), 0 10px 20px rgba(137, 144, 107, .12);

  /* Motion — event-driven only */
  --t-fast: 120ms;
  --t: 180ms;
  --t-slow: 240ms;
  --ease: cubic-bezier(.2, .7, .3, 1);
}
