/* Default theme: a modern take on the current product (same violet accent, calmer surfaces). Light by default, dark automatically
   when the operating system asks for it, and forceable either way with <html data-mode="light|dark">. */
:root {
  --font-body: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-heading: var(--font-body); --font-button: var(--font-body);
  --font-size-base: 16px; --font-size-h1: 1.75rem; --font-size-h2: 1.25rem;
  --font-weight-heading: 650; --font-weight-button: 600;
  --space-1: .25rem; --space-2: .5rem; --space-3: .75rem; --space-4: 1rem; --space-5: 1.5rem; --space-6: 2rem;
  --radius-sm: 6px; --radius-md: 10px; --radius-lg: 16px; --radius-xl: 22px; --content-max: 72rem;
  --motion: 180ms; --ease: cubic-bezier(.2, .7, .2, 1);
  --env-banner-h: 0px;      /* the height the page keeps free at its foot for the environment banner (base.css raises it on a system that has one) */
  --nav-width: 18rem; --rail-width: 4.75rem;      /* the whole menu: the rail of areas plus the column of the open area */
  --sidebar-accent: color-mix(in srgb, var(--color-accent) 45%, var(--sidebar-active-text));   /* the accent as it must look on the dark sidebar */
  --icon-tone: color-mix(in srgb, var(--color-accent) 30%, transparent);   /* the second tone of every icon and of the brand mark */

  --color-bg: #f6f7fb; --color-surface: #ffffff; --color-surface-2: #eef0f7; --color-border: #dfe3ee;
  --color-text: #0f172a; --color-text-muted: #4f5a70;
  --color-accent: #5b52ee; --color-accent-hover: #4a41d9; --color-on-accent: #ffffff; --color-accent-text: #4a41d9;
  --color-focus: #5b52ee;
  --color-danger-soft: #fdecec; --color-danger-text: #9b1c1c;
  --color-env-bg: #8f1d1d; --color-env-text: #ffffff;      /* the environment banner: white on a dark red, in both modes */
  --color-assume-ro-bg: #dbeafe; --color-assume-ro-text: #0b2a4a; --color-assume-rw-bg: #ffd60a; --color-assume-rw-text: #231a00;      /* the Assume User bar: calm blue for read-only, amber for read-write (the words and the icon say it too) */
  --color-live-on: #166534; --color-live-off: #b91c1c; --color-live-away: #92400e; --color-live-fg: #ffffff;      /* the provider's big on/off switch: online, offline, away; the text on all three */
  --sidebar-bg: #0f1220; --sidebar-text: #c9cde0; --sidebar-hover-bg: #181c30;
  --sidebar-active-bg: #1d2140; --sidebar-active-text: #ffffff;
  --shadow-card: 0 1px 2px rgb(15 23 42 / .06), 0 4px 16px rgb(15 23 42 / .04);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-mode="light"]) {
    --color-bg: #0b0d14; --color-surface: #141826; --color-surface-2: #1b2033; --color-border: #2a3047;
    --color-text: #e8eaf3; --color-text-muted: #a3acc2;
    --color-accent: #8f89ff; --color-accent-hover: #a29dff; --color-on-accent: #0b0d14; --color-accent-text: #a29dff;
    --color-focus: #a29dff;
    --color-danger-soft: #3a1717; --color-danger-text: #ffb4b4;
  --color-env-bg: #a8231b; --color-env-text: #ffffff;
  --color-assume-ro-bg: #12365c; --color-assume-ro-text: #e6f0ff; --color-assume-rw-bg: #ffd60a; --color-assume-rw-text: #231a00;
    --color-live-on: #15803d; --color-live-off: #dc2626; --color-live-away: #b45309; --color-live-fg: #ffffff;
    --sidebar-bg: #080a10; --sidebar-text: #aeb5cc; --sidebar-hover-bg: #10131f;
    --sidebar-active-bg: #181c30; --sidebar-active-text: #ffffff;
    --shadow-card: 0 1px 2px rgb(0 0 0 / .4), 0 4px 16px rgb(0 0 0 / .3);
  }
}
:root[data-mode="dark"] {
  --color-bg: #0b0d14; --color-surface: #141826; --color-surface-2: #1b2033; --color-border: #2a3047;
  --color-text: #e8eaf3; --color-text-muted: #a3acc2;
  --color-accent: #8f89ff; --color-accent-hover: #a29dff; --color-on-accent: #0b0d14; --color-accent-text: #a29dff;
  --color-focus: #a29dff;
  --color-danger-soft: #3a1717; --color-danger-text: #ffb4b4;
  --color-env-bg: #a8231b; --color-env-text: #ffffff;
  --color-assume-ro-bg: #12365c; --color-assume-ro-text: #e6f0ff; --color-assume-rw-bg: #ffd60a; --color-assume-rw-text: #231a00;
  --color-live-on: #15803d; --color-live-off: #dc2626; --color-live-away: #b45309; --color-live-fg: #ffffff;
  --sidebar-bg: #080a10; --sidebar-text: #aeb5cc; --sidebar-hover-bg: #10131f;
  --sidebar-active-bg: #181c30; --sidebar-active-text: #ffffff;
  --shadow-card: 0 1px 2px rgb(0 0 0 / .4), 0 4px 16px rgb(0 0 0 / .3);
}
