/** Locked Mindful Retro: global palette → semantic aliases → component tokens. */
:root{color-scheme:light;--page:#f7f4ec;--surface:#fffdf8;--soft:#eee9de;--ink:#202927;--muted:#52605b;--line:#d9dbd0;--spruce:#2f5353;--accent:#b33d34;--accent-hover:#942e27;--on-accent:#fff;--focus:#2f5353;--shadow:0 20px 60px #24372c0d;--serif:'DM Serif Display',Georgia,serif;--sans:'DM Sans',Arial,sans-serif;--gutter:32px;--section:80px}
[data-theme=dark]{color-scheme:dark;--page:#141618;--surface:#1d2424;--soft:#252d2b;--ink:#f7f4ec;--muted:#c5cec7;--line:#45534e;--spruce:#a4c6ba;--accent:#e78376;--accent-hover:#ef9a90;--on-accent:#241a18;--focus:#d5b58b;--shadow:0 20px 60px #0002}
:root {
  --color-bg:var(--page);--color-surface:var(--surface);--color-surface-2:var(--soft);
  --color-text:var(--ink);--color-text-muted:var(--muted);--color-text-subtle:var(--muted);
  --color-accent:var(--spruce);--color-highlight:var(--accent);--color-highlight-hover:var(--accent-hover);
  --color-border:var(--line);--color-header-bg:var(--page);--font-display:var(--serif);--font-ui:var(--sans);
  --font-mono:ui-monospace,Consolas,monospace;--content-readable:65ch;--container-max:1384px;
  --space-1:4px;--space-2:8px;--space-3:12px;--space-4:16px;--space-5:20px;--space-6:24px;
  --space-8:32px;--space-10:40px;--space-12:48px;--space-16:64px;--space-20:80px;--space-24:96px;
  --radius-sm:4px;--radius-md:8px;--radius-lg:16px;--radius-pill:999px;
  --transition-fast:150ms ease;--transition-base:250ms ease;--transition-slow:320ms ease;
  --text-h1:clamp(38px,4.4vw,64px);--text-h2:clamp(30px,3vw,44px);--text-h3:22px;
  --text-body:17px;--text-sm:14px;--text-xs:12px;--line-height-body:1.65;--line-height-heading:1.15;
  --color-observed:var(--spruce);--color-unavailable:var(--accent);--color-not-checked:var(--muted);--color-blocked:var(--accent);
  --button-primary-background:var(--accent);--button-primary-text:var(--on-accent);--input-focus-border:var(--focus);
  --shadow-subtle:var(--shadow);--shadow-card:var(--shadow);
}
@media(max-width:900px){:root{--gutter:24px;--section:64px}}
@media(max-width:639px){:root{--gutter:16px;--section:48px}}
@media(prefers-reduced-motion:reduce){:root{--transition-fast:0ms;--transition-base:0ms;--transition-slow:0ms}}
/* ABQ Citability Semantic Tokens */
:root {
  --abq-gauge-track: var(--line);
  --abq-gauge-stroke: var(--spruce);
  --abq-pill-bg: var(--soft);
  --abq-pill-text: var(--spruce);
  --abq-card-border: var(--line);
  --abq-quote-border: var(--spruce);
  --abq-citation-bg: var(--surface);
  --abq-citation-badge: var(--spruce);
  --abq-ochre: #c98a2c;
  --abq-ochre-soft: #faf4e8;
}
[data-theme=dark] {
  --abq-gauge-track: #2b3531;
  --abq-gauge-stroke: var(--spruce);
  --abq-pill-bg: #1e2b25;
  --abq-pill-text: var(--spruce);
  --abq-card-border: var(--line);
  --abq-quote-border: var(--spruce);
  --abq-citation-bg: var(--surface);
  --abq-citation-badge: var(--spruce);
  --abq-ochre: #e0a952;
  --abq-ochre-soft: #2e271d;
}

/* ==========================================================================
   CQwerty 1:1 Forensic Tokens Suite
   ========================================================================== */
:root {
  --cqs-font-sans: 'DM Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --cqs-font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;

  /* Surfaces & Canvas (Light Mode) */
  --cqs-canvas: #fbfbfe;
  --cqs-surface: #ffffff;
  --cqs-surface-tint: #f3f4f8;
  --cqs-surface-deep: #ebedf5;
  --cqs-raised: #ffffff;

  /* Typography Colors */
  --cqs-fg: #101218;
  --cqs-fg-soft: #252833;
  --cqs-body: #474d5d;
  --cqs-muted: #6b7280;
  --cqs-faint: #9ca3af;
  --cqs-dim: #c5cad5;

  /* Hairlines & Borders */
  --cqs-line: rgba(216, 218, 228, 0.70);
  --cqs-line-soft: rgba(230, 232, 240, 0.85);
  --cqs-line-hi: #d8dae4;

  /* Semantic Accents */
  --cqs-emerald: #059669;
  --cqs-emerald-hi: #10b981;
  --cqs-amber: #b45309;
  --cqs-amber-hi: #d97706;
  --cqs-red: #b91c1c;
  --cqs-red-hi: #dc2626;
  --cqs-sky: #0369a1;
  --cqs-spruce: #2f5353;
  --cqs-champagne: #d4a97a;

  /* Status Aliases */
  --cqs-verified: var(--cqs-emerald);
  --cqs-missing: var(--cqs-red);
  --cqs-partial: var(--cqs-amber);

  /* Container & Radius Constants */
  --cqs-max-width: 1380px;
  --cqs-radius-sm: 8px;
  --cqs-radius-md: 14px;
  --cqs-radius-lg: 16px;
  --cqs-radius-pill: 999px;
}

[data-theme="dark"] {
  --cqs-canvas: #0a0b0e;
  --cqs-surface: #12141a;
  --cqs-surface-tint: #181b24;
  --cqs-surface-deep: #1e222d;
  --cqs-raised: #1e222d;

  --cqs-fg: #f4f5f8;
  --cqs-fg-soft: #e2e4ec;
  --cqs-body: #b8bdcb;
  --cqs-muted: #8e95a5;
  --cqs-faint: #646b7a;
  --cqs-dim: #434958;

  --cqs-line: rgba(255, 255, 255, 0.09);
  --cqs-line-soft: rgba(255, 255, 255, 0.05);
  --cqs-line-hi: rgba(255, 255, 255, 0.16);

  --cqs-emerald: #10b981;
  --cqs-emerald-hi: #34d399;
  --cqs-amber: #f59e0b;
  --cqs-amber-hi: #fbbf24;
  --cqs-red: #ef4444;
  --cqs-red-hi: #f87171;
  --cqs-sky: #38bdf8;
  --cqs-spruce: #447575;
  --cqs-champagne: #e5b777;

  /* Status Aliases */
  --cqs-verified: var(--cqs-emerald);
  --cqs-missing: var(--cqs-red);
  --cqs-partial: var(--cqs-amber);
}
