/* AlanLabs visual tokens -- THE single source of truth (UI audit FIND-16, FIND-20).
 *
 * Every colour, surface, border, text role, radius, shadow, spacing step and status colour the
 * platform's shared styles use is defined HERE and nowhere else. Load this file first (the shells
 * do it through templates/partials/shared_styles.html). tests/test_visual_tokens.py fails if a
 * second :root definition appears, if a var() has no definition, or if a shell forgets this file.
 *
 * Layers, in order:
 *   1. canonical  --ads-*     the design system. New code uses only these.
 *   2. status     --ads-status-*   one healthy / warning / error / unknown set (FIND-20).
 *   3. legacy     --bg-soft --panel --panel-2 --border --text --muted --accent   seven value-less ALIASES
 *                 onto layer 1, kept only for the Telegram media admin page (see the section below).
 *                 The other 25 legacy names (--alp-*, --rc7-*, --good, ...) were retired in Phase D.
 *
 * Breakpoints cannot be custom properties (media queries do not read var()); the platform's shared
 * shells use 1050 / 700 / 480 px. The full breakpoint scale is Phase E (FIND-25) and is not decided here.
 *
 * INSTANT OPENING: static CSS, no request-time work of any kind.
 */
:root {
  /* ---- 1. canonical: surfaces, lines, text ---- */
  --ads-bg: #07101f;
  --ads-surface: #0e1930;
  --ads-surface-2: #13223e;
  --ads-line: #263856;
  --ads-border: rgba(255, 255, 255, .12);        /* hairline; was an undefined name with per-site fallbacks */
  --ads-text: #f5f8ff;
  --ads-muted: #9fb0ca;
  --ads-muted-2: #64748b;

  /* ---- canonical: accents ---- */
  --ads-accent: #58c7fa;
  --ads-accent-2: #3b82f6;
  --ads-accent-cyan: #22d3ee;
  --ads-blue-strong: #2563eb;
  --ads-violet: #8b5cf6;
  --ads-gold: #fbbf24;
  --ads-glass: rgba(15, 23, 42, .78);

  /* ---- canonical: semantic colours (the ONLY green / amber / red) ---- */
  --ads-success: #2dd47b;
  --ads-warning: #f3b53f;
  --ads-danger: #ff6478;
  --ads-success-soft: rgba(45, 212, 123, .14);
  --ads-warning-soft: rgba(243, 181, 63, .14);
  --ads-danger-soft: rgba(255, 100, 120, .12);
  --ads-success-line: rgba(45, 212, 123, .38);
  --ads-warning-line: rgba(243, 181, 63, .40);
  --ads-danger-line: rgba(255, 100, 120, .40);

  /* ---- canonical: shape, depth, rhythm ---- */
  --ads-radius-sm: 12px;
  --ads-radius: 18px;
  --ads-radius-lg: 24px;
  --ads-shadow: 0 18px 45px rgba(0, 0, 0, .22);
  --ads-shadow-md: 0 12px 30px rgba(0, 0, 0, .20);
  --ads-shadow-sm: 0 6px 16px rgba(0, 0, 0, .18);
  --ads-space-1: .4rem;
  --ads-space-2: .7rem;
  --ads-space-3: 1rem;
  --ads-space-4: 1.35rem;
  --ads-space-5: 1.8rem;

  /* ---- canonical: type ---- */
  --ads-font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --ads-font-emoji: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
  --ads-text-xs: .75rem;
  --ads-text-sm: .85rem;
  --ads-text-md: 1rem;
  --ads-text-lg: 1.15rem;

  /* ---- canonical: interaction ---- */
  --ads-focus: 0 0 0 2px var(--ads-bg), 0 0 0 4px var(--ads-accent);
  --ads-tap: 44px;                                /* minimum touch target */

  /* ---- 2. status set: healthy / warning / error / unknown (FIND-20) ----
     Every status renders colour AND a text label (FIND-30); the tone alone never carries meaning. */
  --ads-status-ok: var(--ads-success);
  --ads-status-warn: var(--ads-warning);
  --ads-status-bad: var(--ads-danger);
  --ads-status-unknown: var(--ads-muted);
  --ads-status-ok-soft: var(--ads-success-soft);
  --ads-status-warn-soft: var(--ads-warning-soft);
  --ads-status-bad-soft: var(--ads-danger-soft);
  --ads-status-unknown-soft: rgba(159, 176, 202, .10);
  --ads-status-ok-line: var(--ads-success-line);
  --ads-status-warn-line: var(--ads-warning-line);
  --ads-status-bad-line: var(--ads-danger-line);
  --ads-status-unknown-line: rgba(159, 176, 202, .30);

  /* ---- 3. legacy aliases (no values of their own) ----
     Phase D retired every alias whose consumers were in scope (style.css, rc6_final_ui.css, player.css, ads.css,
     rc6_task_manager.css, users.html, player_base.html now use the canonical names directly). These seven remain
     ONLY because templates/admin_telegram_media.html (Telegram media admin -- outside the UI programme's scope)
     still styles itself with them. Delete them when that page is migrated; tests/test_visual_tokens.py fails if an
     alias is defined but unused, or used but undefined. Do not use them in new code. */
  --bg-soft: var(--ads-surface);
  --panel: var(--ads-surface);
  --panel-2: var(--ads-surface-2);
  --border: var(--ads-line);
  --text: var(--ads-text);
  --muted: var(--ads-muted);
  --accent: var(--ads-accent);
}
