/* ==========================================================================
   NABBAH design tokens — "The Analyst's Brief"
   Deep aubergine paper, ivory ink, one violet accent. Editorial serif for voice and numerals,
   a neutral sans for working text. Hairline rules do the work that boxes did before.
   Chart colours were validated with the dataviz palette checks (surface #1A102A).
   NOTE: names such as --ink-850, --line-1, --side-w and --sp-3 are referenced by the locked eyes
   layout (base.css .side-brand) — keep them defined.
   ========================================================================== */
:root{
  color-scheme: dark;

  /* ---- aubergine surfaces ---- */
  --ink-950:#0C0614;
  --ink-900:#140B21;   /* page: the "paper" */
  --ink-850:#0E0717;   /* rail: the spine */
  --ink-800:#1B112C;   /* plate: inset wells (charts, forms) */
  --ink-750:#201533;
  --ink-700:#271B3D;   /* inputs */
  --ink-600:#312248;   /* hover */
  --ink-500:#42305F;   /* strong fill / tracks */

  /* ---- rules (hairlines replace borders) ---- */
  --line-1:rgba(226,208,255,.10);
  --line-2:rgba(226,208,255,.20);
  --line-3:rgba(226,208,255,.34);

  /* ---- violet ---- */
  --violet-200:#E4D9FF;
  --violet-300:#CDB9FF;
  --violet-400:#B79CFF;
  --violet-500:#9B7BFF;
  --violet-600:#7C5CE6;
  --violet-700:#6445D2;
  --violet-800:#4B2FB5;
  --violet-glow:rgba(124,92,230,.34);

  /* ---- ink (text) ---- */
  --tx-1:#F6F1FC;   /* 16.4:1 on paper */
  --tx-2:#D5CAE8;   /* 11.2:1 */
  --tx-3:#ADA1C6;   /* 7.3:1 */
  --tx-4:#9285AE;   /* 5.3:1 — hints only */

  /* ---- status (reserved meaning; always paired with icon + label) ---- */
  --ok:#1CAA7B;       --ok-tx:#5BE0B0;     --ok-bg:rgba(28,170,123,.14);
  --warn:#C98F20;     --warn-tx:#F2BF5A;   --warn-bg:rgba(201,143,32,.15);
  --crit:#EB6143;     --crit-tx:#FF8F73;   --crit-bg:rgba(235,97,67,.15);
  --info:#5688EE;     --info-tx:#93B3FF;   --info-bg:rgba(86,136,238,.15);

  /* ---- data viz (fixed order, validated) ---- */
  --series-1:#9B7BFF; --series-2:#1FA3C0; --series-3:#C98F20; --series-4:#1CAA7B; --series-5:#5688EE; --series-6:#EB6143;
  --viz-grid:rgba(226,208,255,.07);
  --viz-axis:#9285AE;

  /* ---- type ---- */
  --font-display:"Playfair Display","Markazi Text","IBM Plex Sans Arabic",Georgia,serif;
  --font-text:"IBM Plex Sans Arabic",system-ui,-apple-system,"Segoe UI",sans-serif;
  --fs-xs:12px; --fs-sm:13px; --fs-md:14.5px; --fs-lg:17px; --fs-xl:22px; --fs-2xl:34px; --fs-3xl:56px;
  --lh-tight:1.2; --lh-base:1.65;

  /* ---- space (4px grid) ---- */
  --sp-1:4px; --sp-2:8px; --sp-3:12px; --sp-4:16px; --sp-5:20px; --sp-6:24px; --sp-8:32px; --sp-10:40px; --sp-12:56px; --sp-16:80px;

  /* ---- radius: small and restrained ---- */
  --r-xs:3px; --r-sm:5px; --r-md:6px; --r-lg:8px; --r-xl:10px; --r-pill:999px;

  /* ---- elevation: almost none; depth comes from tone ---- */
  --sh-panel:none;
  --sh-pop:0 28px 60px -16px rgba(0,0,0,.7), 0 0 0 1px var(--line-2);
  --glow:0 0 0 1px rgba(155,123,255,.45);

  /* ---- motion ---- */
  --ease:cubic-bezier(.2,.7,.2,1);
  --t-fast:120ms; --t-med:220ms; --t-slow:480ms;

  /* ---- layout ---- */
  --side-w:264px;
  --dock-w:420px;
  --top-h:64px;
  --page-max:1280px;

  /* ---- legacy aliases (existing inline styles and chart code read these) ---- */
  --bg:var(--ink-900); --panel:var(--ink-800); --panel-2:var(--ink-700);
  --surface:var(--ink-800); --surface-2:var(--ink-700);
  --border:var(--line-1); --border-strong:var(--line-2);
  --text:var(--tx-1); --text-2:var(--tx-2); --muted:var(--tx-3);
  --v1:var(--violet-600); --v2:var(--violet-400); --v3:var(--violet-500);
  --brand:var(--violet-400); --brand-soft:rgba(124,92,230,.16);
  --s1:var(--series-1); --bar:var(--violet-500);
  --neg:var(--crit); --neu:var(--tx-4); --pos:var(--ok);
  --good:var(--ok-tx); --good-soft:var(--ok-bg); --warn-soft:var(--warn-bg); --crit-soft:var(--crit-bg);
  --grid:var(--viz-grid);
  --fh:var(--font-display); --fb:var(--font-text); --fm:var(--font-display);
}

/* easy-read mode: larger type, stronger contrast */
html.easy{
  --tx-2:#E6DEF4; --tx-3:#CBC0E0; --tx-4:#B3A6CE;
  --line-1:rgba(226,208,255,.20); --line-2:rgba(226,208,255,.34);
}
html.easy body{zoom:1.14}
