/* House design tokens: the single source for every app's look. The ingress image
   also ships this file to the portal. See docs/app-standards/styling.md.
   Apps copy it verbatim (or import it) and build on the variables only. */
:root {
  color-scheme: dark light;

  /* Surfaces & text (dark default) */
  --bg: #0f172a;
  --surface: #1e293b;
  --surface-raised: #273449;
  --border: #334155;
  --text: #f8fafc;
  --text-muted: #94a3b8;

  /* Accent & status */
  --accent: #38bdf8;
  --accent-ink: #082f49;       /* text on an accent background */
  --accent-glow: rgba(56, 189, 248, 0.15);
  --success: #4ade80;
  --warning: #fbbf24;
  --danger: #f87171;

  /* Type */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.25rem;
  --text-xl: 1.75rem;

  /* Space (4px grid), radius, motion */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --radius-sm: 6px;
  --radius: 12px;
  --radius-lg: 16px;
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  --ease: 150ms ease;
  --focus-ring: 0 0 0 3px var(--accent-glow), 0 0 0 1px var(--accent);
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f8fafc;
    --surface: #ffffff;
    --surface-raised: #f1f5f9;
    --border: #cbd5e1;
    --text: #0f172a;
    --text-muted: #475569;
    --accent: #0369a1;
    --accent-ink: #ffffff;
    --accent-glow: rgba(3, 105, 161, 0.18);
    --success: #15803d;
    --warning: #b45309;
    --danger: #b91c1c;
    --shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
  }
}

@media (prefers-reduced-motion: reduce) {
  :root { --ease: 0ms; }
}
