/* Trimer stage layer ("Jarvis, not a dashboard").
   Promoted from ui_kits/trimer-v4/index.html and preview/web/design.css into named tokens.
   Rules (docs/design/DECISIONS.md):
   - D1  one teal: --hud is the brand --teal-400. No second teal value anywhere.
   - D2  state colours are references to the semantic tokens in colors.css, never their own hex.
   - D3  DEMO is a provenance mark, not a state: neutral colour + dashed border + hatching, own token.
   - D4  the MVP stage is dark-only. The light block below is kept for parity, not required for acceptance.
   - Names follow the shipped code (--presence-*, --hud-*), so implementation needs no migration.
   Requires colors.css to be loaded first. */
:root{
  /* Surfaces */
  --presence-bg:#04090B;                       /* stage ground */
  --presence-vignette:#0A1A1C;                 /* radial light behind the core */
  --presence-panel:rgba(8,16,18,.72);          /* satellite fill */
  --presence-sheet:#061013;                    /* overlays: transcript, evidence, dialogs */
  --presence-scrim:rgba(2,5,6,.72);            /* behind overlays */
  --presence-composer:var(--team-card,rgba(6,14,16,.92));
  --core-fill:#050A0C;
  --core-glow:rgba(79,196,184,.10);
  --grid-line:rgba(79,196,184,.027);
  --team-card:rgba(6,14,16,.92);
  --team-card-selected:rgba(14,30,32,.96);

  /* Ink */
  --hud:var(--teal-400);                       /* D1. 9.46:1 on --presence-bg */
  --hud-fg:#E6F4F2;                            /* 17.72:1 */
  --hud-fg2:#9FB7B4;                           /*  9.44:1 */
  --hud-mute:#819C99;                          /*  6.81:1, lowest text colour allowed on the stage */
  --hud-on-accent:var(--presence-bg);          /* text on a filled --hud button, 9.46:1 */

  /* Lines. Decorative lines may be faint; anything a person operates must reach 3:1 (WCAG 1.4.11). */
  --hud-faint:color-mix(in srgb,var(--hud) 12%,transparent);        /* dividers only, 1.18:1 */
  --hud-line:color-mix(in srgb,var(--hud) 34%,transparent);         /* satellite frame, decorative */
  --hud-control-line:color-mix(in srgb,var(--hud) 55%,transparent); /* inputs, buttons, chips, 3.47:1 */
  --hud-glow:0 0 14px color-mix(in srgb,var(--hud) 45%,transparent);

  /* States. D2: aliases of colors.css. */
  --hud-ok:var(--success-fg);                  /* healthy result, verified. Never the core. 8.61:1 */
  --hud-warn:var(--warning-fg);                /* needs you, pending approval. 9.45:1 */
  --hud-crit:var(--danger-fg);                 /* STOP, failure. 7.15:1 */
  --hud-info:var(--info-fg);                   /* "reported, not verified". 7.87:1 */
  --hud-agent:var(--agent-fg);                 /* agent identity only. 7.36:1 */
  --hud-warn-line:color-mix(in srgb,var(--hud-warn) 50%,transparent);
  --hud-crit-line:color-mix(in srgb,var(--hud-crit) 70%,transparent); /* STOP control frame, 3.91:1 */
  --hud-ok-line:color-mix(in srgb,var(--hud-ok) 40%,transparent);

  /* D3: DEMO */
  --demo-fg:#C8CDD2;                           /* neutral, 12.51:1. Never purple (agent) or amber (warn). */
  --demo-line:color-mix(in srgb,var(--demo-fg) 60%,transparent);
  --demo-hatch:repeating-linear-gradient(135deg,color-mix(in srgb,var(--demo-fg) 7%,transparent) 0 6px,transparent 6px 12px);

  /* Geometry */
  --sat-w:300px;
  --sat-header-h:30px;
  --sat-bracket:9px;
  --sat-dim:.42;                               /* non-primary satellites: frame, brackets, glow and fill only. Text switches to --hud-mute, never opacity. */
  --sat-recede:.28;                            /* while the Owner types or speaks: same rule, decorations only */
  --core-size:280px;
  --core-size-compact:220px;
  --stage-breakpoint:1081px;                   /* below: no drag, satellites stack (documentation only; CSS cannot read it) */
  --hold-to-stop:1000ms;                       /* STOP hold duration, linear */
  --hold-release:180ms;                        /* fill returns after early release */
  --tap-threshold:250ms;                       /* release before this = short press, opens the STOP dialog */
  --approve-window:30s;                        /* voice approval: window after the read-back (ADR-0005 §6.1) */
  --stop-confirm-window:10s;                   /* voice STOP: confirmation window (ADR-0005 §7) */
}

/* D4: kept for parity with preview/web/design.css. Not part of MVP-1 acceptance. */
/* Scoped to :root so a control that carries data-theme (the theme picker) does not get light tokens. */
:root[data-theme="light"]{
  --presence-bg:var(--surface-0);
  --presence-vignette:var(--surface-0);
  --presence-panel:rgba(255,255,255,.88);
  --presence-sheet:#FFFFFF;
  --presence-scrim:rgba(28,30,32,.32);
  --core-fill:#F7F7F6;
  --core-glow:rgba(20,134,124,.07);
  --grid-line:rgba(15,110,102,.025);
  --team-card:rgba(255,255,255,.92);
  --team-card-selected:#EEF6F5;
  --hud:var(--teal-700);
  --hud-fg:var(--fg-1);
  --hud-fg2:var(--fg-2);
  --hud-mute:#596E6B;
  --hud-on-accent:#FFFFFF;
  --demo-fg:#5B6166;
}
