/*
 * Local LLM Harness — Design Tokens (Single Source of Truth)
 * ----------------------------------------------------------
 * Both `admin-console` (port 8020) and `ai-portal` (port 8030) load this file
 * via `<link href="/shared/design-tokens/tokens.css">`. The 3-tier structure
 * is split across separate files for maintainability (Phase 1, 2026-05-24):
 *
 *   primitive.css  ← Tier 1: shadow / radius / space / motion / typography
 *                    (color raw scales pending — Phase 1.D)
 *   semantic.css   ← Tier 2: surface / text / border / accent / feedback
 *                    (light default + [data-theme="dark"] override)
 *   component.css  ← Tier 3: input / button / modal
 *
 * This entry file:
 *   1. @imports the 3 tier files in order (primitive → semantic → component)
 *   2. Defines legacy aliases (--bg / --accent / --surface / ...) used by
 *      older selectors that haven't migrated to --ds-* prefix yet.
 *   3. Sets the default <html> font-family.
 *
 * Editing tokens:
 *   - Tier 1 (non-color primitives): edit primitive.css
 *   - Tier 2 (semantic colors, light + dark): edit semantic.css
 *   - Tier 3 (component intent): edit component.css
 *   - Legacy aliases: edit this file
 *
 * Conventions:
 *   - Prefix every token with `--ds-` (Design System).
 *   - Light mode is default; dark mode flips via `[data-theme="dark"]` on
 *     <html> or <body>.
 *   - Feedback colors live in `--ds-feedback-*` and never use raw hex outside
 *     this file or its tier siblings.
 */

@import url('./primitive.css');
@import url('./semantic.css');
@import url('./component.css');

/* ====================================================================== *
 * @deprecated — Compatibility aliases (Phase 1.E, 2026-05-24)
 * ----------------------------------------------------------------------
 * These 17 short-name aliases predate the --ds-* prefix convention and
 * are retained for backward compatibility with legacy stylesheets that
 * still reference the old names. Heaviest consumer is ai-portal (37
 * `var(--accent)` calls); admin-console mostly migrated to --ds-* but
 * additionally redefines a subset in its own "AI Workspace Design Token
 * Bridge" (apps/admin-console/app/static/styles.css:1086-1135) to drive
 * its monochrome design layer — so the values resolved in admin differ
 * from the values resolved in portal.
 *
 * Migration plan (deferred to a later sub-phase):
 *   - Inventory: docs/product/85-legacy-alias-inventory.md
 *   - Step 1 (portal): grep-replace 37 `var(--accent)` → `var(--ds-color-accent)`
 *     and similar; verify visual parity.
 *   - Step 2 (admin): decide fate of "AI Workspace Design Token Bridge"
 *     (formalize as separate design system vs. unify with --ds-*).
 *   - Step 3 (tokens.css): remove this block once all callsites migrate.
 *
 * Do NOT delete this block until the migration plan completes — removing
 * it will instantly break portal visuals (indigo accent disappears).
 * ====================================================================== */
:root {
  --bg:           var(--ds-color-bg);
  --surface:      var(--ds-color-surface-solid);
  --surface-2:    var(--ds-color-surface-muted);
  --ink:          var(--ds-color-ink);
  --ink-soft:     var(--ds-color-ink-soft);
  --muted:        var(--ds-color-muted);
  --line:         var(--ds-color-line);
  --accent:       var(--ds-color-accent);
  --accent-2:     var(--ds-color-accent-2);
  --accent-soft:  var(--ds-color-accent-soft);
  --danger:       var(--ds-feedback-bad-fg);
  --success:      var(--ds-feedback-ok-fg);
  --shadow:       var(--ds-shadow-lg);
  --shadow-panel: var(--ds-shadow-panel);
  --radius-sm:    var(--ds-radius-sm);
  --radius-md:    var(--ds-radius-md);
  --radius-lg:    var(--ds-radius-lg);
  --radius-xl:    var(--ds-radius-xl);
  --radius-2xl:   var(--ds-radius-2xl);
  --motion:       var(--ds-motion-default);

  font-family: var(--ds-font-family-sans);
}
