/* The design tokens every page draws from (Issue 111).
 *
 * Moved out of dashboard.css so the public dashboard and the operations pages
 * (the dev outbox, sign-in and the console) share one palette instead of starting
 * a second one. A new role is a token here in the light :root and the dark block,
 * in the same commit. A literal colour belongs here, never in a component rule. */

:root {
  color-scheme: light dark;

  --ink: #101422;
  --ink-soft: #4d566b;
  --ink-muted: #6b7488;

  --surface: #ffffff;
  --surface-sunken: #f2f4f9;
  --canvas: #f6f7fb;

  --line: #e4e7ef;
  --line-soft: #edeff5;

  --accent: #4f46e5;
  --accent-strong: #4338ca;
  --accent-tint: #eef0fe;

  --live: #067647;
  --live-tint: #e7f6ee;
  --deploying: #1d4ed8;
  --deploying-tint: #e8eefc;
  --degraded: #b54708;
  --degraded-tint: #fdf0e3;
  --offline: #b42318;
  --offline-tint: #fdecea;
  --registered: #5b6478;
  --registered-tint: #eef0f4;

  /* A QR code scans best dark on light in both schemes (Issue 115). */
  --qr-ink: #101422;
  --qr-paper: #ffffff;

  --shadow-sm: 0 1px 2px rgba(16, 20, 34, 0.05);
  --shadow-md: 0 6px 16px -6px rgba(16, 20, 34, 0.14), 0 2px 5px -2px rgba(16, 20, 34, 0.07);
  --shadow-lg: 0 18px 36px -14px rgba(16, 20, 34, 0.22), 0 4px 10px -4px rgba(16, 20, 34, 0.1);

  --radius: 14px;
  --radius-lg: 20px;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);

  /* Horizontal breathing room of the shell. Shared so the footer can bleed out
   * to the shell edges with a negative margin and still line its text up. */
  --shell-pad-x: clamp(1rem, 0.4rem + 1.8vw, 2.25rem);

  /* Everything below is sized in rem, so scaling the root scales the whole page
   * with the viewport: fixed at the browser default up to ~1280px, then growing
   * to 1.125x on large displays instead of stranding the layout mid-screen. */
  font-size: clamp(1rem, 0.78rem + 0.28vw, 1.125rem);
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #e9ecf5;
    --ink-soft: #a8b1c6;
    --ink-muted: #8b94ab;

    --surface: #151a29;
    --surface-sunken: #1b2133;
    --canvas: #0b0e18;

    --line: #262d42;
    --line-soft: #1f2537;

    --accent: #9aa3ff;
    --accent-strong: #b4bbff;
    --accent-tint: #1d2140;

    --live: #4ade80;
    --live-tint: #10281d;
    --deploying: #7cb0ff;
    --deploying-tint: #12203a;
    --degraded: #fbbf24;
    --degraded-tint: #2a2011;
    --offline: #fb8a82;
    --offline-tint: #2d1614;
    --registered: #9aa3b8;
    --registered-tint: #1e2434;

    --qr-ink: #101422;
    --qr-paper: #ffffff;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 6px 18px -8px rgba(0, 0, 0, 0.7);
    --shadow-lg: 0 20px 40px -16px rgba(0, 0, 0, 0.8);
  }
}
