/* Belfort design tokens.
   Light palette on :root; dark palette under prefers-color-scheme and under
   [data-theme="dark"]; [data-theme="light"] forces light. One accent hue (cyan-teal). */

:root {
  color-scheme: light;

  /* Surfaces */
  --bg: #f2f4f7;
  --bg-glow: rgba(14, 125, 157, 0.07);
  --surface: #ffffff;
  --surface-2: #eaeef3;
  --surface-3: #dfe5ec;
  --line: rgba(17, 24, 32, 0.09);
  --line-strong: rgba(17, 24, 32, 0.18);
  --grid-line: rgba(17, 24, 32, 0.035);

  /* Text */
  --text: #131a22;
  --text-2: #4d5866;
  --text-3: #7f8a98;
  --text-inverse: #f6f8fa;

  /* Accent (the one brand colour) */
  --accent: #0e7d9d;
  --accent-strong: #0a627c;
  --accent-soft: rgba(14, 125, 157, 0.10);
  --accent-line: rgba(14, 125, 157, 0.35);
  --accent-glow: 0 0 0 1px rgba(14, 125, 157, 0.25);
  --on-accent: #ffffff;

  /* Semantic states (muted, used only for status) */
  --ok: #2f8f5b;
  --ok-soft: rgba(47, 143, 91, 0.12);
  --warn: #b7791f;
  --warn-soft: rgba(183, 121, 31, 0.13);
  --danger: #c2413b;
  --danger-soft: rgba(194, 65, 59, 0.12);

  /* Shape */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 18px;
  --r-xl: 24px;
  --shadow-1: 0 1px 2px rgba(17, 24, 32, 0.05), 0 4px 16px rgba(17, 24, 32, 0.04);
  --shadow-2: 0 2px 6px rgba(17, 24, 32, 0.08), 0 16px 40px rgba(17, 24, 32, 0.10);

  /* Space */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --s-7: 48px;
  --s-8: 64px;

  /* Type */
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue",
          "Segoe UI", "Noto Sans Hebrew", "Arial Hebrew", "Heebo", "Assistant",
          "David", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --fs-xs: 12px;
  --fs-sm: 13.5px;
  --fs-md: 15px;
  --fs-lg: 18px;
  --fs-xl: 24px;
  --fs-2xl: 32px;
  --fs-3xl: 44px;

  /* Layout */
  --rail-w: 92px;
  --tabbar-h: 64px;
  --drawer-w: 420px;
  --content-max: 1240px;

  /* Motion */
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --t-fast: 140ms;
  --t-med: 260ms;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0a0f15;
    --bg-glow: rgba(76, 201, 232, 0.09);
    --surface: #111821;
    --surface-2: #17202b;
    --surface-3: #1e2935;
    --line: rgba(255, 255, 255, 0.075);
    --line-strong: rgba(255, 255, 255, 0.16);
    --grid-line: rgba(255, 255, 255, 0.03);

    --text: #e6ecf2;
    --text-2: #a3aebb;
    --text-3: #6f7b89;
    --text-inverse: #0a0f15;

    --accent: #4cc9e8;
    --accent-strong: #7ddcf2;
    --accent-soft: rgba(76, 201, 232, 0.12);
    --accent-line: rgba(76, 201, 232, 0.40);
    --accent-glow: 0 0 0 1px rgba(76, 201, 232, 0.35), 0 0 22px rgba(76, 201, 232, 0.16);
    --on-accent: #06141a;

    --ok: #5fc98f;
    --ok-soft: rgba(95, 201, 143, 0.14);
    --warn: #e0b45a;
    --warn-soft: rgba(224, 180, 90, 0.14);
    --danger: #ef7a72;
    --danger-soft: rgba(239, 122, 114, 0.14);

    --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.35), 0 6px 20px rgba(0, 0, 0, 0.30);
    --shadow-2: 0 4px 10px rgba(0, 0, 0, 0.45), 0 24px 60px rgba(0, 0, 0, 0.55);
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0a0f15;
  --bg-glow: rgba(76, 201, 232, 0.09);
  --surface: #111821;
  --surface-2: #17202b;
  --surface-3: #1e2935;
  --line: rgba(255, 255, 255, 0.075);
  --line-strong: rgba(255, 255, 255, 0.16);
  --grid-line: rgba(255, 255, 255, 0.03);

  --text: #e6ecf2;
  --text-2: #a3aebb;
  --text-3: #6f7b89;
  --text-inverse: #0a0f15;

  --accent: #4cc9e8;
  --accent-strong: #7ddcf2;
  --accent-soft: rgba(76, 201, 232, 0.12);
  --accent-line: rgba(76, 201, 232, 0.40);
  --accent-glow: 0 0 0 1px rgba(76, 201, 232, 0.35), 0 0 22px rgba(76, 201, 232, 0.16);
  --on-accent: #06141a;

  --ok: #5fc98f;
  --ok-soft: rgba(95, 201, 143, 0.14);
  --warn: #e0b45a;
  --warn-soft: rgba(224, 180, 90, 0.14);
  --danger: #ef7a72;
  --danger-soft: rgba(239, 122, 114, 0.14);

  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.35), 0 6px 20px rgba(0, 0, 0, 0.30);
  --shadow-2: 0 4px 10px rgba(0, 0, 0, 0.45), 0 24px 60px rgba(0, 0, 0, 0.55);
}
