/* =====================================================================
   tokens.css — the ONLY place for design decisions.
   variant-d-mix: DARK-FIRST, console-v2 palette + density, no page grid. ":root" = night shift (default).
   Day shift = [data-theme="light"], or [data-theme="auto"] + OS light.
   ===================================================================== */
:root{
  color-scheme:dark;
  /* ---- colour: surfaces & ink (night shift, blue-slate control room) ---- */
  --bg:#0E1215;        /* page */
  --panel:#151A1E;     /* raised surfaces */
  --panel-2:#1B2126;   /* sunken / hover */
  --ink:#E3E8E4;       /* primary text */
  --ink-2:#A3AEA8;     /* secondary text */
  --ink-3:#8B9691;     /* labels, meta (AA on --bg and --panel) */
  --line:#283036;      /* hairlines */
  --line-2:#36404A;    /* control borders */
  --grid:transparent; /* no page grid */

  /* ---- colour: accent (machine layer + scan line) ---- */
  --accent:#9AA8FF;
  --accent-ink:#0E1215;
  --accent-soft:#232B55;
  --glow:0 0 0 3px rgba(147,163,255,.22), 0 0 14px rgba(147,163,255,.35);

  /* ---- colour: status (meaningful only) ---- */
  --ok:#4CC38A;   --ok-soft:#173226;
  --warn:#E0A93B; --warn-soft:#3A2D12;
  --fail:#FF8073; --fail-soft:#3D1C19;
  --idle:#7F8A85;
  --sim:#C9B6FF;  /* "simulated" label colour — never used for real data */

  /* ---- colour: code / JSON ---- */
  --code-key:var(--accent); --code-str:#7FD6A8; --code-num:var(--warn);

  /* ---- scan line (Human <-> Machine signature) ---- */
  --scan:var(--accent);
  --scan-ink:var(--accent-ink);
  --scan-trail:rgba(147,163,255,.20);
  --scan-grid:rgba(147,163,255,.28);
  --scan-trail-h:140px;
  --scan-dur:950ms;        /* full-viewport sweep; + 180ms scramble tail < 1.2s */
  --scramble-dur:180ms;

  /* ---- type ---- */
  --f-display:"Archivo", "Arial Narrow", system-ui, sans-serif;
  --f-body:"IBM Plex Sans", system-ui, sans-serif;
  --f-mono:"Martian Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --fs-micro:.6875rem;   /* 11px labels */
  --fs-mono:.75rem;      /* 12px data */
  --fs-small:.875rem;
  --fs-body:1rem;
  --fs-lede:1.125rem;
  --fs-h2:clamp(1.9rem, 1.2rem + 2.6vw, 2.9rem);
  --fs-h1:clamp(2.5rem, 1rem + 5vw, 4.6rem); /* hero title fits on one line at desktop */
  --wdth-hero:112; --wdth-h2:100; --wdth-tight:82;

  /* ---- layout ---- */
  --bar-h:52px;
  --dock-h:44px;
  --rail-w:236px;
  --max-w:1280px;
  --gutter:16px;
  --main-pad:40px;
  --unit-pad:72px;
  --unit-pad-b:72px;      /* space before the separator between sections */
  --r:6px;

  /* ---- motion ---- */
  --ease-out:cubic-bezier(0.23,1,0.32,1);
  --ease-in-out:cubic-bezier(0.77,0,0.175,1);
  --dur-press:120ms;
  --dur-ui:160ms;
  --tick:330ms;           /* simulation step */
}

/* ---- day shift: enamel ---- */
:root[data-theme="light"]{
  color-scheme:light;
  --bg:#E4E7E2; --panel:#F4F5F2; --panel-2:#ECEEE9;
  --ink:#121A16; --ink-2:#47524C; --ink-3:#5F6A64;
  --line:#C8CEC6; --line-2:#B3BAB1; --grid:transparent;
  --accent:#2A3BC7; --accent-ink:#FFFFFF; --accent-soft:#DCE0FA;
  --glow:0 0 0 3px rgba(42,59,199,.16);
  --ok:#15784A; --ok-soft:#D5EBDD; --warn:#875800; --warn-soft:#F4E6C6; --fail:#B3261E; --fail-soft:#F6DAD6; --idle:#6A746E;
  --sim:#6B3FC4;
  --code-str:#15784A;
  --scan-trail:rgba(42,59,199,.13); --scan-grid:rgba(42,59,199,.22);
}
@media (prefers-color-scheme: light){
  :root[data-theme="auto"]{
    color-scheme:light;
    --bg:#E4E7E2; --panel:#F4F5F2; --panel-2:#ECEEE9;
    --ink:#121A16; --ink-2:#47524C; --ink-3:#5F6A64;
    --line:#C8CEC6; --line-2:#B3BAB1; --grid:transparent;
    --accent:#2A3BC7; --accent-ink:#FFFFFF; --accent-soft:#DCE0FA;
    --glow:0 0 0 3px rgba(42,59,199,.16);
    --ok:#15784A; --ok-soft:#D5EBDD; --warn:#875800; --warn-soft:#F4E6C6; --fail:#B3261E; --fail-soft:#F6DAD6; --idle:#6A746E;
    --sim:#6B3FC4;
    --code-str:#15784A;
    --scan-trail:rgba(42,59,199,.13); --scan-grid:rgba(42,59,199,.22);
  }
}

@media (max-width:1024px){ :root{ --main-pad:var(--gutter) } }
@media (max-width:600px){ :root{ --bar-h:96px; --unit-pad:56px; --unit-pad-b:56px; --dock-h:46px } }
