:root {
    color-scheme: light;
    --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
    --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

    --bg: #f4f6f9;
    --bg-elevated: #ffffff;
    --bg-sunken: #eceff4;
    --bg-hover: #e6eaf1;
    --border: #dde2ea;
    --border-strong: #c7cfdb;
    --text: #141a24;
    --text-muted: #5b6676;
    --text-faint: #8a94a3;

    --accent: #2f6bff;
    --accent-strong: #1f54d6;
    --accent-soft: #e5edff;
    --accent-text: #ffffff;

    --success: #138a52;
    --success-soft: #e1f5ea;
    --warning: #b26a00;
    --warning-soft: #fff1d9;
    --danger: #d12f3f;
    --danger-soft: #fde6e8;
    --info: #2f6bff;
    --info-soft: #e5edff;
    --neutral: #5b6676;
    --neutral-soft: #eceff4;
    --violet: #6c4ce0;
    --violet-soft: #eee9ff;

    --radius-sm: 6px;
    --radius: 10px;
    --radius-lg: 14px;
    --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.06);
    --shadow: 0 1px 3px rgba(16, 24, 40, 0.08), 0 4px 12px rgba(16, 24, 40, 0.05);
    --shadow-lg: 0 12px 32px rgba(16, 24, 40, 0.16);
    --focus: 0 0 0 3px rgba(47, 107, 255, 0.28);

    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 24px;
    --space-8: 32px;

    --sidebar-width: 232px;
    --transition: 140ms ease;
}

@media (prefers-color-scheme: dark) {
    :root {
        color-scheme: dark;
        --bg: #0d1117;
        --bg-elevated: #151b24;
        --bg-sunken: #0a0e14;
        --bg-hover: #1d2531;
        --border: #232c39;
        --border-strong: #324051;
        --text: #e6ebf2;
        --text-muted: #98a3b3;
        --text-faint: #6b7686;
        --accent: #5b8cff;
        --accent-strong: #7aa2ff;
        --accent-soft: #1a2540;
        --success: #3ccf8a;
        --success-soft: #11291e;
        --warning: #f0b44c;
        --warning-soft: #2c2213;
        --danger: #ff6b78;
        --danger-soft: #331519;
        --info: #5b8cff;
        --info-soft: #1a2540;
        --neutral: #98a3b3;
        --neutral-soft: #1d2531;
        --violet: #a38bff;
        --violet-soft: #231d3d;
        --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
        --shadow: 0 1px 3px rgba(0, 0, 0, 0.5), 0 4px 12px rgba(0, 0, 0, 0.3);
        --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.55);
    }
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    height: 100%;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-sans);
    font-size: 14px;
    line-height: 1.45;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
    margin: 0;
    font-weight: 650;
    letter-spacing: -0.01em;
}

h1 {
    font-size: 22px;
}

h2 {
    font-size: 15px;
}

code,
.mono {
    font-family: var(--font-mono);
    font-size: 12.5px;
}

:focus-visible {
    outline: none;
    box-shadow: var(--focus);
}

::selection {
    background: var(--accent-soft);
}

.maplibregl-ctrl-group {
    border-radius: var(--radius) !important;
    box-shadow: var(--shadow) !important;
}

#blazor-error-ui {
    display: none;
}
