/**
 * Общая оболочка сайта: шапка, навигация, подвал.
 * Класс .site-no-print скрыт при печати (gramatyka).
 */
:root {
    --site-accent: #4361ee;
    --site-header-bg: #ffffff;
    --site-header-border: #e8eaef;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 100000;
    background: var(--site-header-bg);
    border-bottom: 1px solid var(--site-header-border);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
}

.site-header__inner {
    max-width: 960px;
    margin: 0 auto;
    padding: 10px 18px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 16px;
}

.site-brand {
    font-family: 'Inter', system-ui, sans-serif;
    font-weight: 700;
    font-size: 1rem;
    color: #1a1a2e;
    text-decoration: none;
    letter-spacing: -0.02em;
}

.site-brand:hover {
    color: var(--site-accent);
}

.site-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 8px;
    align-items: center;
}

.site-nav a {
    font-family: 'Inter', system-ui, sans-serif;
    color: #444;
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: 8px;
    transition: background 0.15s, color 0.15s;
}

.site-nav a:hover {
    background: #eef1ff;
    color: var(--site-accent);
}

.site-nav a[aria-current="page"] {
    background: #eef1ff;
    color: var(--site-accent);
}

.site-footer {
    margin-top: auto;
    padding: 0;
    text-align: center;
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 0.82rem;
    color: #888;
    border-top: 1px solid #eee;
    background: #fafbfc;
    width: 100%;
    box-sizing: border-box;
}

/* Как .site-header__inner: та же колонка и отступы */
.site-footer__inner {
    max-width: 960px;
    margin: 0 auto;
    padding: 20px 18px 28px;
    box-sizing: border-box;
}

.site-footer--split {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 16px;
    text-align: left;
}

.site-footer__credit {
    margin-left: auto;
    text-align: right;
}

.site-lang-select {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 0.88rem;
    padding: 6px 10px;
    border-radius: 8px;
    border: 1px solid #ddd;
    background: #fff;
    color: #333;
    cursor: pointer;
    min-width: 8.5em;
}

.site-lang-select:focus {
    outline: none;
    border-color: var(--site-accent);
    box-shadow: 0 0 0 2px rgba(67, 97, 238, 0.2);
}

.site-footer a {
    color: #666;
    text-decoration: none;
}

.site-footer a:hover {
    color: var(--site-accent);
}

/* Gramatyka / test: фон страницы как у теста (#f5f6fa) */
body.has-site-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: #f5f6fa;
    color: #1a1a2e;
}

body.has-site-shell > .container {
    flex: 1;
}

body.has-site-shell > .site-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

body.has-site-shell > .site-main > #app {
    flex: 1;
}

/* Мобильная шапка: бренд и меню по центру, линия между ними */
@media (max-width: 640px) {
    .site-header__inner {
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 0;
        padding-top: 12px;
        padding-bottom: 14px;
    }

    .site-brand {
        width: 100%;
        text-align: center;
        padding-bottom: 12px;
        border-bottom: 1px solid var(--site-header-border);
    }

    .site-nav {
        justify-content: center;
        width: 100%;
        padding-top: 12px;
    }
}

@media print {
    .site-no-print {
        display: none !important;
    }

    html,
    body.has-site-shell {
        background: #fff !important;
    }
}
