/* Design tokens. Light by default, dark via prefers-color-scheme or [data-theme="dark"]. */
:root {
  color-scheme: light;
  --bg: #f4f7f7;
  --bg-tint: #e9f2f1;
  --surface: #ffffff;
  --surface-2: #f6f9f9;
  --surface-3: #edf2f2;
  --border: #dbe5e5;
  --border-strong: #c2d1d1;
  --text: #0e1f24;
  --text-2: #3d545a;
  --text-3: #5b7076;
  --primary: #0b6b67;
  --primary-strong: #08524f;
  --primary-soft: #e1f1ef;
  --primary-ink: #ffffff;
  --accent: #c2552f;
  --accent-soft: #fbece4;
  --accent-ink: #8a3518;
  --focus: #d9661f;
  --on-danger: #ffffff;
  --on-accent: #ffffff;
  --ok: #1d7a4c;
  --ok-soft: #e2f3e9;
  --warn: #8a5a00;
  --warn-soft: #fbf0d6;
  --danger: #b42318;
  --danger-soft: #fdeceb;
  --info: #1f5fa6;
  --info-soft: #e6eefa;
  --violet: #6941c6;
  --violet-soft: #f0ebfb;
  --neutral-soft: #eef2f3;

  --header-bg: rgba(244, 247, 247, 0.86);
  --start-ring: rgba(255, 255, 255, 0.4);
  --stage-1: #e3f2f0;
  --stage-2: #f8fbfb;
  --agent-bubble: #e5f2f0;
  --caller-bubble: #fbeee6;
  --code-bg: #f3f7f7;
  --j-key: #08524f;
  --j-str: #8a3518;
  --j-num: #1f5fa6;
  --j-bool: #6941c6;
  --grid-line: rgba(14, 31, 36, 0.07);
  --session-bg: rgba(11, 107, 103, 0.06);
  --slot-free: #e6f4f1;
  --slot-free-line: #b9dcd5;
  --slot-booked: #c9d6d8;
  --hatch: rgba(14, 31, 36, 0.12);
  --arch-line: #7c9599;

  --orb-agent: #0b6b67;
  --orb-agent-2: #5cc4b6;
  --orb-caller: #c2552f;
  --orb-caller-2: #f4b896;
  --orb-idle: #9cb3b6;
  --orb-glow: rgba(11, 107, 103, 0.16);

  --shadow-sm: 0 1px 2px rgba(14, 31, 36, 0.05), 0 1px 1px rgba(14, 31, 36, 0.03);
  --shadow-md: 0 14px 34px -18px rgba(14, 31, 36, 0.28), 0 2px 6px rgba(14, 31, 36, 0.05);
  --shadow-lg: 0 24px 60px -28px rgba(11, 82, 79, 0.45);

  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 20px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --gutter: 16px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

@media (min-width: 760px) {
  :root { --gutter: 24px; }
}
@media (min-width: 1280px) {
  :root { --gutter: 32px; }
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0b1517;
    --bg-tint: #0f1d20;
    --surface: #111e21;
    --surface-2: #15252a;
    --surface-3: #1b2f34;
    --border: #23393e;
    --border-strong: #314c52;
    --text: #e6f0f0;
    --text-2: #b6c8cb;
    --text-3: #8fa6aa;
    --primary: #4cc3b6;
    --primary-strong: #84dacf;
    --primary-soft: #143936;
    --primary-ink: #04201e;
    --accent: #f0a07a;
    --accent-soft: #3b2319;
    --accent-ink: #f7c6ad;
    --focus: #f6a35f;
    --on-danger: #2a0b07;
    --on-accent: #2b130a;
    --ok: #5fd39a;
    --ok-soft: #12301f;
    --warn: #f2c35c;
    --warn-soft: #33280d;
    --danger: #ff8a7a;
    --danger-soft: #3b1714;
    --info: #8ab8f5;
    --info-soft: #14263d;
    --violet: #bba3f6;
    --violet-soft: #251b3e;
    --neutral-soft: #1b2b2f;
    --header-bg: rgba(11, 21, 23, 0.84);
    --start-ring: rgba(76, 195, 182, 0.16);
    --stage-1: #123533;
    --stage-2: #0f1b1e;
    --agent-bubble: #15312f;
    --caller-bubble: #352219;
    --code-bg: #0d181a;
    --j-key: #84dacf;
    --j-str: #f7c6ad;
    --j-num: #8ab8f5;
    --j-bool: #bba3f6;
    --grid-line: rgba(230, 240, 240, 0.07);
    --session-bg: rgba(76, 195, 182, 0.07);
    --slot-free: #15302d;
    --slot-free-line: #24524c;
    --slot-booked: #34474b;
    --hatch: rgba(230, 240, 240, 0.14);
    --arch-line: #6f8b90;
    --orb-agent: #1f8f86;
    --orb-agent-2: #7fe0d3;
    --orb-caller: #d9764d;
    --orb-caller-2: #f6c4a8;
    --orb-idle: #4e6a6f;
    --orb-glow: rgba(76, 195, 182, 0.2);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 16px 40px -20px rgba(0, 0, 0, 0.7), 0 2px 6px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 24px 60px -28px rgba(0, 0, 0, 0.8);
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b1517;
  --bg-tint: #0f1d20;
  --surface: #111e21;
  --surface-2: #15252a;
  --surface-3: #1b2f34;
  --border: #23393e;
  --border-strong: #314c52;
  --text: #e6f0f0;
  --text-2: #b6c8cb;
  --text-3: #8fa6aa;
  --primary: #4cc3b6;
  --primary-strong: #84dacf;
  --primary-soft: #143936;
  --primary-ink: #04201e;
  --accent: #f0a07a;
  --accent-soft: #3b2319;
  --accent-ink: #f7c6ad;
  --focus: #f6a35f;
  --on-danger: #2a0b07;
  --on-accent: #2b130a;
  --ok: #5fd39a;
  --ok-soft: #12301f;
  --warn: #f2c35c;
  --warn-soft: #33280d;
  --danger: #ff8a7a;
  --danger-soft: #3b1714;
  --info: #8ab8f5;
  --info-soft: #14263d;
  --violet: #bba3f6;
  --violet-soft: #251b3e;
  --neutral-soft: #1b2b2f;
  --header-bg: rgba(11, 21, 23, 0.84);
  --start-ring: rgba(76, 195, 182, 0.16);
  --stage-1: #123533;
  --stage-2: #0f1b1e;
  --agent-bubble: #15312f;
  --caller-bubble: #352219;
  --code-bg: #0d181a;
  --j-key: #84dacf;
  --j-str: #f7c6ad;
  --j-num: #8ab8f5;
  --j-bool: #bba3f6;
  --grid-line: rgba(230, 240, 240, 0.07);
  --session-bg: rgba(76, 195, 182, 0.07);
  --slot-free: #15302d;
  --slot-free-line: #24524c;
  --slot-booked: #34474b;
  --hatch: rgba(230, 240, 240, 0.14);
  --arch-line: #6f8b90;
  --orb-agent: #1f8f86;
  --orb-agent-2: #7fe0d3;
  --orb-caller: #d9764d;
  --orb-caller-2: #f6c4a8;
  --orb-idle: #4e6a6f;
  --orb-glow: rgba(76, 195, 182, 0.2);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 16px 40px -20px rgba(0, 0, 0, 0.7), 0 2px 6px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 24px 60px -28px rgba(0, 0, 0, 0.8);
}
