/* Aurora design tokens. Every colour, radius, shadow and font in the app comes from here.
   Light values on :root, dark values under [data-theme="dark"]. */

@font-face {
    font-family: "Plus Jakarta Sans";
    src: url("../lib/fonts/plus-jakarta-sans-latin.woff2") format("woff2");
    font-weight: 200 800;
    font-style: normal;
    font-display: swap;
}

:root {
    /* Surfaces */
    --em-shell: #0b1026;            /* sidebar and the frame around the canvas */
    --em-canvas: #ffffff;           /* page background inside the frame */
    --em-surface: #ffffff;          /* cards, inputs, modals */
    --em-surface-2: #f1f3f8;        /* subtle fills: hover rows, table foot, code */
    --em-line: #b9c0ce;             /* lines between rows and around cards */
    --em-border: #5f6878;           /* control borders: at least 4.5:1 on the surface */

    /* Text */
    --em-text: #000000;             /* body text is black on white, with no grey steps */
    --em-muted: #262c38;            /* secondary text: still at least 13:1 on white */
    --em-placeholder: #596273;      /* placeholder text only, so it cannot pass for a typed value */
    --em-on-accent: #ffffff;

    /* Accent */
    --em-a1: #5b5bf6;
    --em-a2: #8b5cf6;
    --em-a3: #22d3ee;
    --em-accent-ink: #3525b0;       /* accent text on light surfaces */
    --em-accent-soft: #e6e9ff;
    --em-accent-strong: #4338ca;    /* fills that carry white text: at least 7:1, same in both themes */
    --em-accent-strong-2: #6d28d9;
    --em-grad: linear-gradient(135deg, var(--em-accent-strong), var(--em-accent-strong-2));
    --em-grad-hero: linear-gradient(135deg, #3b32b8 0%, #5b25c9 55%, #7a22c9 100%);

    /* Status: a solid, an ink (text on soft or on surface) and a soft fill each */
    --em-ok: #059669;       --em-ok-ink: #04543c;       --em-ok-soft: #d9f7ea;
    --em-warn: #f59e0b;     --em-warn-ink: #7a3206;     --em-warn-soft: #fdf0d5;
    --em-bad: #e11d48;      --em-bad-ink: #94102f;      --em-bad-soft: #ffe1e8;
    --em-info: #0891b2;     --em-info-ink: #0b4a5c;     --em-info-soft: #d5f5fb;
    --em-neutral-ink: #1a202c;                          --em-neutral-soft: #e6e9f1;

    /* Sidebar (always dark, in both themes) */
    --em-nav-text: #f2f4fc;
    --em-nav-group: #c5cbe6;

    /* Shape and depth */
    --em-radius-sm: 8px;
    --em-radius: 12px;
    --em-radius-lg: 20px;
    --em-radius-xl: 24px;
    --em-radius-pill: 999px;
    --em-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 10px 30px -12px rgba(30, 41, 99, .14);
    --em-shadow-lg: 0 24px 60px -20px rgba(15, 23, 42, .35);
    --em-ring: 0 0 0 3px rgba(67, 56, 202, .45);

    /* Type */
    --em-font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --em-font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

    /* Layout */
    --em-sidebar-w: 244px;
    --em-frame: 10px;

    /* Motion */
    --em-fast: 150ms ease;
}

[data-theme="dark"] {
    --em-shell: #070a1a;
    --em-canvas: #0c1022;
    --em-surface: #141a33;
    --em-surface-2: #1a2140;
    --em-line: #46507c;
    --em-border: #98a2c8;

    --em-text: #ffffff;
    --em-muted: #dde2f2;
    --em-placeholder: #a9b2d0;

    --em-a1: #7c7cff;
    --em-a2: #a78bfa;
    --em-accent-ink: #d0d3ff;
    --em-accent-soft: #232a5c;

    --em-ok: #34d399;       --em-ok-ink: #8cf5d2;       --em-ok-soft: #0f3a2f;
    --em-warn: #fbbf24;     --em-warn-ink: #fde27a;     --em-warn-soft: #3a2c0d;
    --em-bad: #fb7185;      --em-bad-ink: #ffc2ca;      --em-bad-soft: #3d1524;
    --em-info: #22d3ee;     --em-info-ink: #9aefff;     --em-info-soft: #0c3440;
    --em-neutral-ink: #eef1fb;                          --em-neutral-soft: #1e2545;

    --em-shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 14px 34px -14px rgba(0, 0, 0, .6);
    --em-shadow-lg: 0 24px 60px -20px rgba(0, 0, 0, .8);
    --em-ring: 0 0 0 3px rgba(160, 160, 255, .6);
}
