/* Every colour, spacing step, radius and font of the app lives here. app.css only uses var(--…).
   Restyling = editing this file. Dark mode follows the OS (prefers-color-scheme). */
:root {
  color-scheme: light dark;

  /* surfaces and text */
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-2: #f1f5f9;
  --surface-hover: #e8eef5;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --text: #1f2937;
  --text-muted: #5b6b80;
  --accent: #1f2937;
  --accent-text: #ffffff;
  --link: #1d4ed8;
  --focus: #2563eb;
  --overlay: rgba(15, 23, 42, 0.55);
  --shadow: 0 8px 24px rgba(15, 23, 42, 0.18);

  /* status */
  --danger: #b91c1c;
  --danger-bg: #fee2e2;
  --danger-text: #7f1d1d;
  --warn-bg: #fef3c7;
  --warn-text: #78350f;
  --ok: #15803d;
  --ok-bg: #dcfce7;
  --ok-text: #14532d;
  --info-bg: #e0f2fe;
  --info-text: #0c4a6e;

  /* matrix quadrants */
  --q-do_first-bg: #fffbeb;
  --q-do_first-border: #f59e0b;
  --q-schedule-bg: #f0f9ff;
  --q-schedule-border: #7dd3fc;
  --q-delegate-bg: #faf5ff;
  --q-delegate-border: #c4b5fd;
  --q-eliminate-bg: #f8fafc;
  --q-eliminate-border: #cbd5e1;
  --drop-bg: #dbeafe;
  --drop-border: #2563eb;

  /* life roles (the dot on every task) */
  --role-family: #2563eb;
  --role-worker: #059669;
  --role-disciple: #7c3aed;
  --role-self: #d97706;
  --role-fallback: #6b7280;

  /* spacing, radii, type */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --gutter: 16px;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-pill: 999px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --text-xs: 0.75rem;
  --text-sm: 0.8125rem;
  --text-md: 0.9375rem;
  --text-lg: 1.125rem;
  --text-xl: 1.5rem;
  --max-width: 1100px;
  --tap: 40px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f172a;
    --surface: #1e293b;
    --surface-2: #273449;
    --surface-hover: #334155;
    --border: #334155;
    --border-strong: #475569;
    --text: #e5e7eb;
    --text-muted: #9fb0c6;
    --accent: #e5e7eb;
    --accent-text: #0f172a;
    --link: #93c5fd;
    --focus: #60a5fa;
    --overlay: rgba(0, 0, 0, 0.65);
    --shadow: 0 8px 24px rgba(0, 0, 0, 0.5);

    --danger: #f87171;
    --danger-bg: #450a0a;
    --danger-text: #fecaca;
    --warn-bg: #451a03;
    --warn-text: #fde68a;
    --ok: #4ade80;
    --ok-bg: #052e16;
    --ok-text: #bbf7d0;
    --info-bg: #082f49;
    --info-text: #bae6fd;

    --q-do_first-bg: #2a2110;
    --q-do_first-border: #b45309;
    --q-schedule-bg: #0f2536;
    --q-schedule-border: #0e7490;
    --q-delegate-bg: #231a38;
    --q-delegate-border: #6d28d9;
    --q-eliminate-bg: #1a2332;
    --q-eliminate-border: #475569;
    --drop-bg: #1e3a8a;
    --drop-border: #60a5fa;

    --role-family: #60a5fa;
    --role-worker: #34d399;
    --role-disciple: #a78bfa;
    --role-self: #fbbf24;
    --role-fallback: #9ca3af;
  }
}
