@font-face {
    font-family: "Manrope";
    font-style: normal;
    font-weight: 400 800;
    font-display: swap;
    src: url("/fonts/manrope-cyrillic.woff2") format("woff2");
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
    font-family: "Manrope";
    font-style: normal;
    font-weight: 400 800;
    font-display: swap;
    src: url("/fonts/manrope-latin.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
    color-scheme: light;

    --font: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

    --bg: #f5f6f8;
    --surface: #ffffff;
    --surface-2: #eef1f4;
    --surface-3: #e2e6eb;
    --text: #14181f;
    --text-2: #3b4350;
    --muted: #5f6b7a;
    --border: #dde2e8;
    --border-strong: #c3cad3;

    --brand: #2f7d32;
    --brand-hover: #276a2a;
    --brand-soft: #e6f3e6;
    --brand-contrast: #ffffff;

    /* Letter states, shared by mask cells, keyboard, answer tiles. */
    --tile-correct: #3d8b40;
    --tile-present: #c99a14;
    --tile-absent: #6b7380;
    --tile-text: #ffffff;
    --tile-empty: var(--surface);

    --ok: #1f7a3a;
    --warn: #9a5b00;
    --danger: #c0262d;
    --danger-soft: #fdecec;
    --highlight: #fff4c2;

    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 18px;
    --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.06);
    --shadow: 0 1px 3px rgba(16, 24, 40, 0.08), 0 1px 2px rgba(16, 24, 40, 0.04);
    --shadow-lg: 0 12px 32px rgba(16, 24, 40, 0.14);
    --focus-ring: 0 0 0 3px color-mix(in srgb, var(--brand) 35%, transparent);

    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.5rem;
    --space-6: 2rem;
    --space-7: 3rem;

    --container: 1120px;
    --sidebar: 300px;
    --header-h: 64px;
}

:root[data-theme="dark"] {
    color-scheme: dark;

    --bg: #0e1116;
    --surface: #161a21;
    --surface-2: #1d222b;
    --surface-3: #272d38;
    --text: #e8ebf0;
    --text-2: #c4cad4;
    --muted: #98a2b3;
    --border: #2a303b;
    --border-strong: #3a4250;

    --brand: #5cb860;
    --brand-hover: #74c977;
    --brand-soft: #1c2b1d;
    --brand-contrast: #0b130b;

    --tile-correct: #4f9a52;
    --tile-present: #c4951a;
    --tile-absent: #3c4350;
    --tile-empty: var(--surface);

    --ok: #6fd08a;
    --warn: #f0b54a;
    --danger: #ff6b6b;
    --danger-soft: #3a1c1f;
    --highlight: #3a3418;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.55);
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        color-scheme: dark;

        --bg: #0e1116;
        --surface: #161a21;
        --surface-2: #1d222b;
        --surface-3: #272d38;
        --text: #e8ebf0;
        --text-2: #c4cad4;
        --muted: #98a2b3;
        --border: #2a303b;
        --border-strong: #3a4250;

        --brand: #5cb860;
        --brand-hover: #74c977;
        --brand-soft: #1c2b1d;
        --brand-contrast: #0b130b;

        --tile-correct: #4f9a52;
        --tile-present: #c4951a;
        --tile-absent: #3c4350;
        --tile-empty: var(--surface);

        --ok: #6fd08a;
        --warn: #f0b54a;
        --danger: #ff6b6b;
        --danger-soft: #3a1c1f;
        --highlight: #3a3418;

        --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
        --shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
        --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.55);
    }
}
