/* ==========================================================================
   Design tokens. Dark is the default; light is applied via
   <html data-theme="light">, set by js/theme.js (and the inline boot script).
   ========================================================================== */

:root {
    color-scheme: dark;

    /* Surfaces */
    --bg: #0a0d12;
    --bg-elev: #0f131a;
    --surface: #121720;
    --surface-2: #171d28;
    --surface-3: #1e2532;
    --border: #232b39;
    --border-strong: #2f3a4c;

    /* Text */
    --text: #d9dfea;
    --text-strong: #f3f6fb;
    --muted: #8a94a8;
    --faint: #5b6578;

    /* Accents (editor palette) */
    --accent: #3ddc97;          /* terminal green */
    --accent-rgb: 61, 220, 151;
    --accent-ink: #04140d;      /* text on accent */
    --cyan: #5ccfe6;
    --purple: #c3a6ff;
    --orange: #ffb86c;
    --yellow: #ffd866;
    --red: #ff6b7a;
    --blue: #7aa2f7;

    /* Syntax tokens */
    --tk-key: var(--cyan);
    --tk-str: #a5e075;
    --tk-num: var(--orange);
    --tk-kw: var(--purple);
    --tk-fn: var(--yellow);
    --tk-com: #5c6a80;
    --tk-punc: #8a94a8;
    --tk-type: var(--blue);

    /* Effects */
    --glow: 0 0 0 1px rgba(var(--accent-rgb), .25), 0 10px 40px -10px rgba(var(--accent-rgb), .35);
    --shadow: 0 1px 0 rgba(255, 255, 255, .03) inset, 0 20px 50px -20px rgba(0, 0, 0, .7);
    --grid-dot: rgba(255, 255, 255, .06);
    --selection: rgba(var(--accent-rgb), .28);

    /* Type */
    --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
    --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

    /* Layout */
    --radius-sm: 6px;
    --radius: 10px;
    --radius-lg: 16px;
    --container: 1160px;
    --gutter: clamp(16px, 4vw, 32px);
    --topbar-h: 56px;
    --statusbar-h: 26px;

    --ease-out: cubic-bezier(.16, 1, .3, 1);
}

:root[data-theme="light"] {
    color-scheme: light;

    --bg: #f5f6f8;
    --bg-elev: #eef0f4;
    --surface: #ffffff;
    --surface-2: #f7f8fa;
    --surface-3: #eceff4;
    --border: #dfe3ea;
    --border-strong: #c9d0db;

    --text: #262c38;
    --text-strong: #0d1117;
    --muted: #5b6474;
    --faint: #8c95a5;

    --accent: #0b8a5a;
    --accent-rgb: 11, 138, 90;
    --accent-ink: #ffffff;
    --cyan: #0b7a94;
    --purple: #7c4dda;
    --orange: #c2620a;
    --yellow: #9a7400;
    --red: #d1364a;
    --blue: #2f5fd0;

    --tk-str: #3f7d12;
    --tk-com: #8c95a5;
    --tk-punc: #6b7484;

    --glow: 0 0 0 1px rgba(var(--accent-rgb), .25), 0 10px 30px -12px rgba(var(--accent-rgb), .35);
    --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 18px 40px -22px rgba(16, 24, 40, .25);
    --grid-dot: rgba(13, 17, 23, .08);
    --selection: rgba(var(--accent-rgb), .18);
}
