/* Шрифты лежат на нашем сервере: Google с телефона в РФ часто не открывается. */
@font-face {
    font-family: Onest;
    src: url("/static/fonts/onest-cyrillic-400.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
    font-family: Onest;
    src: url("/static/fonts/onest-latin-400.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
    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;
}
@font-face {
    font-family: Onest;
    src: url("/static/fonts/onest-cyrillic-500.woff2") format("woff2");
    font-weight: 500;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
    font-family: Onest;
    src: url("/static/fonts/onest-latin-500.woff2") format("woff2");
    font-weight: 500;
    font-style: normal;
    font-display: swap;
    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;
}
@font-face {
    font-family: Onest;
    src: url("/static/fonts/onest-cyrillic-600.woff2") format("woff2");
    font-weight: 600;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
    font-family: Onest;
    src: url("/static/fonts/onest-latin-600.woff2") format("woff2");
    font-weight: 600;
    font-style: normal;
    font-display: swap;
    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;
}
@font-face {
    font-family: Onest;
    src: url("/static/fonts/onest-cyrillic-700.woff2") format("woff2");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
    font-family: Onest;
    src: url("/static/fonts/onest-latin-700.woff2") format("woff2");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
    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;
}
@font-face {
    font-family: Unbounded;
    src: url("/static/fonts/unbounded-cyrillic-500.woff2") format("woff2");
    font-weight: 500;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
    font-family: Unbounded;
    src: url("/static/fonts/unbounded-latin-500.woff2") format("woff2");
    font-weight: 500;
    font-style: normal;
    font-display: swap;
    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;
}
@font-face {
    font-family: Unbounded;
    src: url("/static/fonts/unbounded-cyrillic-600.woff2") format("woff2");
    font-weight: 600;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
    font-family: Unbounded;
    src: url("/static/fonts/unbounded-latin-600.woff2") format("woff2");
    font-weight: 600;
    font-style: normal;
    font-display: swap;
    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 {
    --font-sans: Onest, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --font-display: Unbounded, Onest, sans-serif;
    --font-mono: ui-monospace, "SF Mono", Menlo, monospace;

    --sidebar-width: 248px;
    --header-height: 64px;
    --radius-xs: 6px;
    --radius-sm: 8px;
    --radius-md: 8px;
    --radius-lg: 10px;
    --radius-xl: 12px;
    --radius-2xl: 12px;
    --space-xs: 8px;
    --space-sm: 12px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 40px;

    /* Light key on night ink. One action color, no gradient. */
    --primary: #f2f1ee;
    --primary-hover: #ffffff;
    --primary-muted: rgba(242, 241, 238, 0.1);
    --gradient-primary: #f2f1ee;
    --accent-subtle: rgba(242, 241, 238, 0.06);

    --success: #8fcead;
    --success-soft: rgba(143, 206, 173, 0.14);
    --danger: #f0a0a0;
    --danger-soft: rgba(240, 160, 160, 0.14);
    --warning: #e4c27a;
    --warning-soft: rgba(228, 194, 122, 0.14);
    --info: #b7c4d6;
    --info-soft: rgba(183, 196, 214, 0.14);

    --bg-canvas: #0e1014;
    --bg-canvas-deep: #0e1014;
    --bg-surface: #171a21;
    --bg-surface-solid: #171a21;
    --bg-surface-soft: #1c2028;
    --bg-elevated: #232833;
    --bg-glass: rgba(255, 255, 255, 0.04);
    --bg-sidebar: #12141a;

    --text-primary: #f2f1ee;
    --text-secondary: #b7b8c0;
    --text-muted: #8b8d97;

    --border: rgba(255, 255, 255, 0.08);
    --border-strong: rgba(255, 255, 255, 0.14);

    --shadow-soft: none;
    --shadow-card: none;
    --shadow-diffusion: none;
    --shadow-inset: none;

    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --transition-fast: 150ms var(--ease-out);
    --transition-base: 220ms var(--ease-out);
    --transition-slow: 300ms var(--ease-out);

    --chart-grid: rgba(161, 161, 170, 0.12);
}

html {
    -webkit-text-size-adjust: 100%;
}

html,
body {
    font-family: var(--font-sans);
    background: var(--bg-canvas-deep);
    -webkit-tap-highlight-color: transparent;
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
}

* {
    scrollbar-width: thin;
    scrollbar-color: var(--border-strong) transparent;
}

*::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

*::-webkit-scrollbar-thumb {
    background: var(--border-strong);
    border-radius: 20px;
}

a {
    color: var(--primary);
    transition: color var(--transition-fast);
    text-decoration: none;
}

a:hover {
    color: var(--primary-hover);
    text-decoration: none;
}

.header-title,
.sidebar-title,
.card-title {
    font-family: var(--font-display);
    letter-spacing: -0.03em;
}

.pipeline {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 18px;
}

.pipeline-step {
    background: var(--bg-surface);
    border: 1px solid var(--border-strong);
    border-radius: 16px;
    padding: 14px 16px;
    min-height: 78px;
    width: 100%;
    appearance: none;
}

.pipeline-step strong {
    display: block;
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 560;
}

.pipeline-step span {
    color: var(--text-muted);
    font-size: 12px;
}

.pipeline-step.active {
    border-color: rgba(242, 241, 238, 0.35);
    background: var(--bg-surface-soft);
    box-shadow: inset 0 -2px 0 var(--primary);
}

@media (max-width: 800px) {
    .pipeline { grid-template-columns: 1fr 1fr; }
}
