/* ──────────────────────────────────────────────────────────────────────────
   Swiss AI Trust Tag — design tokens
   Layout: Swiss 12-col grid, 1280px measure, hairline rules; obsidian dark-first,
   "Swiss paper" light theme. Semantic colours (emerald / amber / crimson) are
   reserved for statistical state; crimson doubles as the brand accent.
   ────────────────────────────────────────────────────────────────────────── */
:root,
.dark-island {
  color-scheme: dark;
  --bg: #06070a;
  --bg-dot: rgba(255, 255, 255, 0.05);
  --surface: #0d0f14;
  --surface-2: #11141b;
  --surface-3: #181c26;
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.14);
  --fg: #f3f4f6;
  --fg-2: rgba(243, 244, 246, 0.7);
  --fg-3: rgba(243, 244, 246, 0.52);
  --crimson: #f43f5e;
  --crimson-ink: #fb4d6d;
  --crimson-soft: rgba(225, 29, 72, 0.14);
  --emerald: #10b981;
  --emerald-ink: #34d399;
  --emerald-soft: rgba(16, 185, 129, 0.13);
  --amber: #f59e0b;
  --amber-ink: #fbbf24;
  --amber-soft: rgba(245, 158, 11, 0.13);
  --baseline: #2196e6;
  --baseline-soft: rgba(33, 150, 230, 0.16);
  --grid-line: rgba(255, 255, 255, 0.07);
  --grid-faint: rgba(255, 255, 255, 0.028);
  --on-accent: #ffffff;
  --focus: #fb4d6d;
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.035) inset, 0 24px 48px -28px rgba(0, 0, 0, 0.85);
  --spot: rgba(255, 255, 255, 0.055);
  --spot-line: rgba(52, 211, 153, 0.75);
  --neon: #34d399;
  --neon-glow: rgba(52, 211, 153, 0.35);
  --glow-top: rgba(225, 29, 72, 0.16);
  --glow-side: rgba(16, 185, 129, 0.07);
  --code-bg: #0a0c11;
  --tk-cmd: #fb7185;
  --tk-brace: #8d97ad;
  --tk-str: #34d399;
  --tk-num: #fbbf24;
  --tk-com: rgba(243, 244, 246, 0.42);
  --tk-math: #93c5fd;

  --font-ui: 'Inter', 'IBM Plex Sans Arabic', system-ui, -apple-system, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  --font-display: 'Inter Tight', 'Inter', 'IBM Plex Sans Arabic', system-ui, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
  --font-paper: 'STIX Two Text', 'Times New Roman', Times, serif;

  --track-caps: 0.09em;
  --track-tight: -0.035em;
  --r-sm: 8px;
  --r-md: 10px;
  --r-lg: 16px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --gutter: max(16px, min(4vw, 40px));
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme='dark']) {
    color-scheme: light;
    --bg: #f4f5f7;
    --bg-dot: rgba(10, 14, 25, 0.075);
    --surface: #ffffff;
    --surface-2: #f2f3f6;
    --surface-3: #e9ebf0;
    --line: rgba(10, 14, 25, 0.1);
    --line-2: rgba(10, 14, 25, 0.18);
    --fg: #0a0c12;
    --fg-2: rgba(10, 12, 18, 0.72);
    --fg-3: rgba(10, 12, 18, 0.57);
    --crimson: #e11d48;
    --crimson-ink: #be123c;
    --crimson-soft: rgba(225, 29, 72, 0.08);
    --emerald: #059669;
    --emerald-ink: #047857;
    --emerald-soft: rgba(5, 150, 105, 0.09);
    --amber: #d97706;
    --amber-ink: #b45309;
    --amber-soft: rgba(217, 119, 6, 0.1);
    --baseline: #0284c7;
    --baseline-soft: rgba(2, 132, 199, 0.12);
    --grid-line: rgba(10, 14, 25, 0.09);
    --grid-faint: rgba(10, 14, 25, 0.035);
    --focus: #be123c;
    --shadow: 0 1px 2px rgba(10, 14, 25, 0.05), 0 16px 32px -24px rgba(10, 14, 25, 0.28);
    --spot: rgba(225, 29, 72, 0.03);
    --spot-line: rgba(5, 150, 105, 0.6);
  --neon: #059669;
  --neon-glow: rgba(5, 150, 105, 0.22);
    --glow-top: rgba(225, 29, 72, 0.07);
    --glow-side: rgba(5, 150, 105, 0.05);
    --code-bg: #0d0f14;
  }
}
:root[data-theme='light'] {
  color-scheme: light;
  --bg: #f4f5f7;
  --bg-dot: rgba(10, 14, 25, 0.075);
  --surface: #ffffff;
  --surface-2: #f2f3f6;
  --surface-3: #e9ebf0;
  --line: rgba(10, 14, 25, 0.1);
  --line-2: rgba(10, 14, 25, 0.18);
  --fg: #0a0c12;
  --fg-2: rgba(10, 12, 18, 0.72);
  --fg-3: rgba(10, 12, 18, 0.57);
  --crimson: #e11d48;
  --crimson-ink: #be123c;
  --crimson-soft: rgba(225, 29, 72, 0.08);
  --emerald: #059669;
  --emerald-ink: #047857;
  --emerald-soft: rgba(5, 150, 105, 0.09);
  --amber: #d97706;
  --amber-ink: #b45309;
  --amber-soft: rgba(217, 119, 6, 0.1);
  --baseline: #0284c7;
  --baseline-soft: rgba(2, 132, 199, 0.12);
  --grid-line: rgba(10, 14, 25, 0.09);
  --grid-faint: rgba(10, 14, 25, 0.035);
  --focus: #be123c;
  --shadow: 0 1px 2px rgba(10, 14, 25, 0.05), 0 16px 32px -24px rgba(10, 14, 25, 0.28);
  --spot: rgba(225, 29, 72, 0.03);
  --spot-line: rgba(5, 150, 105, 0.6);
  --neon: #059669;
  --neon-glow: rgba(5, 150, 105, 0.22);
  --glow-top: rgba(225, 29, 72, 0.07);
  --glow-side: rgba(5, 150, 105, 0.05);
  --code-bg: #0d0f14;
}

/* Arabic script must never be letter-spaced (it breaks cursive joining). */
:root[dir='rtl'] {
  --track-caps: 0;
  --track-tight: 0;
}
