/**
 * Shared design tokens (learn / www / admin).
 * Feature hues: docs/semantic-colors.md
 * Stack: docs/designs/ui-stack.md
 */
:root {
  color-scheme: light;

  --bg: #f8fafc;
  --bg-muted: #f1f5f9;
  --bg-elevated: #ffffff;
  --bg-header: rgb(248 250 252 / 92%);

  --ink: #0f172a;
  --ink-muted: #475569;
  --ink-subtle: #64748b;

  --brand-50: #f0f9ff;
  --brand-100: #e0f2fe;
  --brand-500: #0ea5e9;
  --brand-600: #0284c7;
  --brand-700: #0369a1;
  --brand: var(--brand-600);
  --brand-deep: var(--brand-700);
  --accent: var(--brand-600);
  --accent-hover: var(--brand-700);

  --border: #e2e8f0;
  --ok: #059669;
  --ok-bg: #ecfdf5;
  --ok-border: #a7f3d0;
  --ok-text: #065f46;
  --danger: #b91c1c;
  --danger-bg: #fff1f2;
  --danger-border: #fecdd3;
  --danger-text: #9f1239;
  --warn-bg: #fffbeb;
  --warn-border: #fde68a;
  --warn-text: #92400e;

  --ai: #7c3aed;
  --ai-deep: #7c3aed;
  --ai-ink: #5b21b6;
  --tree: #059669;
  --tree-deep: #047857;

  --radius: 0.75rem;
  --radius-btn: 0.5rem;
  --shadow: 0 1px 2px 0 rgb(15 23 42 / 0.06), 0 8px 24px -8px rgb(15 23 42 / 0.1);
  --max: 68rem;
  --font: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --focus: 0 0 0 3px rgb(14 165 233 / 40%);

  /* Motion — transform/opacity only; see docs/designs/ui-stack.md */
  --motion-fast: 150ms;
  --motion-base: 200ms;
  --motion-slow: 280ms;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);

  /* Map / list status — fill-weight distinguishes Ready vs Mastered */
  --map-mastered-fill: #047857;
  --map-mastered-border: #064e3b;
  --map-mastered-ink: #ecfdf5;
  --map-ready-fill: #ffffff;
  --map-ready-border: #059669;
  --map-ready-ink: #064e3b;
  --map-learning-fill: #0284c7;
  --map-learning-border: #075985;
  --map-learning-ink: #f0f9ff;
  --map-not_started-fill: #eef2f6;
  --map-not_started-border: #64748b;
  --map-not_started-ink: #334155;
  --map-skipped-fill: #e2e8f0;
  --map-skipped-border: #475569;
  --map-skipped-ink: #334155;
  --map-edge-ready: #34d399;
  --map-edge-learning: #0ea5e9;
  --map-edge-mastered: #059669;
  --map-edge-muted: #cbd5e1;
  --map-edge-soft: #94a3b8;
  --map-edge-skipped: #64748b;
}

html.dark {
  color-scheme: dark;

  --bg: #020617;
  --bg-muted: #0f172a;
  --bg-elevated: #0f172a;
  --bg-header: rgb(2 6 23 / 92%);

  --ink: #e2e8f0;
  --ink-muted: #cbd5e1;
  --ink-subtle: #94a3b8;

  --brand-50: rgba(14, 165, 233, 0.12);
  --brand-100: rgba(14, 165, 233, 0.18);
  --brand-500: #38bdf8;
  --brand-600: #0284c7;
  --brand-700: #38bdf8;
  --brand: #38bdf8;
  --brand-deep: #7dd3fc;
  --accent: #0284c7;
  --accent-hover: #0369a1;

  --border: #334155;
  --ok: #34d399;
  --ok-bg: rgba(16, 185, 129, 0.12);
  --ok-border: rgba(52, 211, 153, 0.35);
  --ok-text: #a7f3d0;
  --danger: #fca5a5;
  --danger-bg: rgba(244, 63, 94, 0.12);
  --danger-border: rgba(244, 63, 94, 0.35);
  --danger-text: #fecdd3;
  --warn-bg: rgba(245, 158, 11, 0.12);
  --warn-border: rgba(245, 158, 11, 0.35);
  --warn-text: #fcd34d;

  --ai: #a78bfa;
  --ai-deep: #7c3aed;
  --ai-ink: #ddd6fe;
  --tree: #34d399;
  --tree-deep: #047857;

  --shadow: 0 1px 2px 0 rgb(0 0 0 / 0.4), 0 10px 24px -8px rgb(0 0 0 / 0.45);
  --focus: 0 0 0 3px rgb(56 189 248 / 40%);

  --map-mastered-fill: #052e27;
  --map-mastered-border: #34d399;
  --map-mastered-ink: #a7f3d0;
  --map-ready-fill: #0b1220;
  --map-ready-border: #34d399;
  --map-ready-ink: #a7f3d0;
  --map-learning-fill: #082f49;
  --map-learning-border: #38bdf8;
  --map-learning-ink: #e0f2fe;
  --map-not_started-fill: #0b1220;
  --map-not_started-border: #64748b;
  --map-not_started-ink: #94a3b8;
  --map-skipped-fill: #111827;
  --map-skipped-border: #94a3b8;
  --map-skipped-ink: #94a3b8;
  --map-edge-ready: #34d399;
  --map-edge-learning: #0ea5e9;
  --map-edge-mastered: #059669;
  --map-edge-muted: #94a3b8;
  --map-edge-soft: #cbd5e1;
  --map-edge-skipped: #94a3b8;
}

@media (prefers-reduced-motion: reduce) {
  :root,
  html.dark {
    --motion-fast: 0.01ms;
    --motion-base: 0.01ms;
    --motion-slow: 0.01ms;
  }
}
