:root {
    /* МАТРИЧНЫЕ ЦВЕТА (не меняем) */
    --bg: #000000;
    --bg-accent: #00170d;
    --panel: rgba(0, 7, 3, 0.92);
    --panel-strong: rgba(0, 0, 0, 0.96);
    --panel-border: rgba(0, 255, 136, 0.36);
    --text: #8dffbf;
    --muted: #33bb72;
    --accent: #00ff88;
    --accent-dark: #00d96d;
    --accent-soft: rgba(0, 255, 136, 0.1);
    --ok: #00ff88;
    --bad: #ff4c7d;
    --current: #00ffff;
    --shadow: 0 0 28px rgba(0, 255, 136, 0.18);
    
    /* РАЗМЕРЫ ИЗ СВЕТЛОЙ ТЕМЫ (clamp) */
    --radius: clamp(12px, 1.5vw, 18px);
    --radius-sm: clamp(8px, 1vw, 12px);
    
    --mono: "Courier New", "Fira Code", "Consolas", monospace;
    --sans: "Courier New", "Segoe UI", Tahoma, sans-serif;
}

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

html {
    scroll-behavior: smooth;
    height: 100%;
}

body {
    margin: 0;
    min-width: 320px;
    font-family: var(--mono);
    color: var(--text);
    background:
        radial-gradient(circle at top, rgba(0, 255, 136, 0.08), transparent 28%),
        linear-gradient(180deg, #000000, #000804 52%, #000000);
    overflow-x: hidden;
    min-height: 100vh;
    overflow-y: auto;           /* Ваша структура скролла */
    display: flex;
    flex-direction: column;
}

a {
    color: var(--accent);
    text-decoration: none;
    text-shadow: 0 0 8px rgba(0, 255, 136, 0.4);
}

a:hover {
    color: #ffffff;
}

button,
input,
textarea {
    font: inherit;
    font-family: var(--mono);
}

img,
canvas,
iframe {
    max-width: 100%;
}

#bg-matrix {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

.site-header,
.page,
.site-footer,
.status-toast {
    position: relative;
    z-index: 2;
}

/* ===== КОНТЕЙНЕР (ширина из светлой темы) ===== */
.container {
    width: min(100% - 2vw, 88rem);
    margin: 0 auto;
}

/* ===== ШАПКА (компактная, адаптивная) ===== */
.site-header {
    position: relative;
    z-index: 30;
    backdrop-filter: blur(12px);
    background: rgba(0, 0, 0, 0.88);
    border-bottom: 1px solid rgba(0, 255, 136, 0.2);
    box-shadow: 0 10px 22px rgba(0, 255, 136, 0.08);
    padding: 0;
}

.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: clamp(8px, 1.5vw, 16px);
    padding: clamp(6px, 1.2vh, 10px) 0;
    flex-wrap: wrap;
}

.logo {
    font-size: clamp(1rem, 1.8vw, 1.4rem);
    font-weight: 800;
    color: var(--accent);
    text-shadow: 0 0 12px rgba(0, 255, 136, 0.45);
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.nav-links,
.auth-buttons,
.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: clamp(8px, 1.2vw, 14px);
    align-items: center;
}

.nav-links a {
    color: var(--text);
    font-weight: 700;
    font-size: clamp(0.75rem, 1vw, 0.9rem);
    white-space: nowrap;
}

.nav-links a:hover {
    color: #ffffff;
}

/* ===== КНОПКИ (размеры из светлой темы) ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: clamp(28px, 4vh, 36px);
    padding: clamp(4px, 0.8vh, 8px) clamp(10px, 1.5vw, 16px);
    border: 1px solid var(--accent);
    border-radius: 999px;
    cursor: pointer;
    font-weight: 700;
    font-size: clamp(0.7rem, 0.9vw, 0.85rem);
    white-space: nowrap;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    background: rgba(0, 0, 0, 0.9);
    color: var(--accent);
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 0 18px rgba(0, 255, 136, 0.24);
    background: rgba(0, 40, 20, 0.92);
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    color: #00140a;
    text-shadow: none;
    box-shadow: 0 8px 20px rgba(0, 255, 136, 0.24);
}

.btn-secondary {
    background: rgba(0, 0, 0, 0.9);
}

/* ===== ОСНОВНОЙ КОНТЕНТ ===== */
.page {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    padding: clamp(6px, 1vh, 12px) 0;
}

/* ===== СЕТКА (из светлой темы) ===== */
.layout {
    display: grid;
    grid-template-columns: minmax(160px, 18vw) minmax(0, 1fr) minmax(140px, 20vw);
    gap: clamp(6px, 1vw, 16px);
    align-items: start;
    flex: 1;
    min-height: 0;
}

.left-sidebar,
.trainer-column,
.right-sidebar {
    min-width: 0;
    max-height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
}

/* ===== ПАНЕЛИ ===== */
.panel {
    min-width: 0;
    background: var(--panel);
    border: 1px solid var(--panel-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.left-sidebar .panel,
.right-sidebar .panel,
.trainer-panel {
    padding: clamp(8px, 1.2vw, 14px);
}

.panel-heading h2,
.trainer-topbar h2 {
    margin: 0;
    font-size: clamp(0.9rem, 1.3vw, 1.2rem);
    line-height: 1.2;
    color: #b9ffd7;
}

.panel-heading p,
.sidebar-label,
.hint,
.lesson-item small {
    color: var(--muted);
    font-size: clamp(0.65rem, 0.8vw, 0.8rem);
}

/* ===== БОКОВАЯ ПАНЕЛЬ ===== */
.sidebar-controls {
    margin: clamp(6px, 1vh, 10px) 0;
}

.sidebar-label {
    display: block;
    margin-bottom: 4px;
    font-size: 0.8rem; /* оставлен фиксированным, но можно сделать clamp */
    color: var(--muted);
}

.sidebar-search,
textarea {
    width: 100%;
    border: 1px solid rgba(0, 255, 136, 0.24);
    background: rgba(0, 0, 0, 0.94);
    border-radius: clamp(8px, 1vw, 12px);
    padding: clamp(6px, 0.8vh, 10px) clamp(8px, 1vw, 12px);
    outline: none;
    color: var(--text);
    font-size: clamp(0.7rem, 0.8vw, 0.85rem);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.sidebar-search:focus,
textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(0, 255, 136, 0.12);
}

.sidebar-tree {
    display: flex;
    flex-direction: column;
    gap: clamp(4px, 0.8vh, 8px);
    max-height: calc(100vh - 380px);
    overflow-y: auto;
    padding-right: 4px;
}

/* ===== ДЕРЕВО УРОКОВ ===== */
.tree-group {
    border: 1px solid rgba(0, 255, 136, 0.16);
    border-radius: clamp(8px, 1vw, 12px);
    background: rgba(0, 0, 0, 0.7);
}

.tree-group-title,
.tree-child-title {
    width: 100%;
    border: 0;
    background: transparent;
    text-align: left;
    cursor: pointer;
    color: var(--text);
    font-size: clamp(0.7rem, 0.9vw, 0.85rem);
}

.tree-group-title {
    padding: clamp(6px, 0.8vh, 10px) clamp(8px, 1vw, 12px);
    font-weight: 800;
}

.tree-child-title {
    padding: clamp(4px, 0.6vh, 8px) clamp(6px, 0.8vw, 10px);
    font-weight: 700;
}

.tree-group-title:hover,
.tree-child-title:hover {
    background: var(--accent-soft);
}

.tree-lessons,
.tree-child-lessons {
    display: none;
    padding: 0 clamp(4px, 0.6vw, 8px) clamp(4px, 0.6vh, 8px);
}

.tree-group.open .tree-lessons,
.tree-child.open .tree-child-lessons {
    display: block;
}

.tree-child {
    margin-top: clamp(2px, 0.4vh, 6px);
    border: 1px solid rgba(0, 255, 136, 0.1);
    border-radius: clamp(6px, 0.8vw, 10px);
    background: rgba(0, 10, 5, 0.74);
}

.lesson-item {
    width: 100%;
    margin-top: clamp(2px, 0.4vh, 6px);
    padding: clamp(4px, 0.6vh, 8px) clamp(6px, 0.8vw, 10px);
    border: 1px solid transparent;
    border-radius: clamp(6px, 0.8vw, 10px);
    background: transparent;
    text-align: left;
    cursor: pointer;
    color: var(--text);
    font-size: clamp(0.7rem, 0.8vw, 0.85rem);
    transition: 0.2s ease;
}

.lesson-item:hover,
.lesson-item.active {
    background: rgba(0, 255, 136, 0.06);
    border-color: rgba(0, 255, 136, 0.24);
    box-shadow: 0 6px 14px rgba(0, 255, 136, 0.08);
}

.lesson-item small {
    font-size: clamp(0.6rem, 0.7vw, 0.7rem);
    margin-top: 2px;
    color: var(--muted);
}

/* ===== ТРЕНАЖЁР ===== */
.trainer-topbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: clamp(6px, 1vw, 12px);
    margin-bottom: clamp(6px, 1vh, 10px);
    flex-wrap: wrap;
}

.lesson-badge {
    padding: clamp(3px, 0.5vh, 6px) clamp(6px, 0.8vw, 10px);
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent-dark);
    font-size: clamp(0.65rem, 0.8vw, 0.8rem);
    font-weight: 700;
    white-space: nowrap;
    border: 1px solid rgba(0, 255, 136, 0.18);
}

.meta-label,
.block-label,
.ad-caption {
    margin: 0 0 4px;
    font-size: clamp(0.6rem, 0.7vw, 0.7rem);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #55ffa9;
}

/* ===== СТАТИСТИКА (размеры из светлой темы) ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: clamp(4px, 0.6vw, 8px);
    margin-bottom: clamp(6px, 1vh, 10px);
}

.stat-card {
    padding: clamp(6px, 0.8vh, 10px) clamp(4px, 0.6vw, 8px);
    border-radius: clamp(8px, 1vw, 14px);
    background: rgba(0, 0, 0, 0.84);
    border: 1px solid rgba(0, 255, 136, 0.14);
    text-align: center;
}

.stat-title {
    display: block;
    margin-bottom: 3px;
    color: #63d892;
    font-size: clamp(0.55rem, 0.7vw, 0.7rem);
    font-weight: 700;
}

.stat-card strong {
    display: block;
    font-size: clamp(0.9rem, 1.3vw, 1.3rem);
    color: var(--accent);
    line-height: 1.1;
    text-shadow: 0 0 10px rgba(0, 255, 136, 0.24);
}

.stat-card small {
    font-size: clamp(0.5rem, 0.6vw, 0.65rem);
    color: var(--muted);
}

/* ===== ОБЛАСТЬ ПЕЧАТИ (размеры из светлой темы — точные clamp) ===== */
.typing-area {
    display: grid;
    gap: clamp(4px, 0.8vh, 10px);
}

.text-panel,
.input-panel {
    padding: clamp(8px, 1vw, 12px);
    border-radius: clamp(10px, 1.5vw, 16px);
    background: var(--panel-strong);
    border: 1px solid rgba(0, 255, 136, 0.14);
    box-shadow: inset 0 1px 0 rgba(0, 255, 136, 0.03);
}

.keyboard-panel {
    padding: clamp(6px, 0.8vw, 10px);
    border-radius: clamp(10px, 1.5vw, 16px);
    background: var(--panel-strong);
    border: 1px solid rgba(0, 255, 136, 0.14);
    overflow-x: auto;
}

.text-display,
textarea {
    font-family: var(--mono);
    line-height: 1.5;
}

/* ВЫСОТА ТЕКСТА — точно из светлой темы */
.text-display {
    min-height: clamp(60px, 10vh, 100px);
    max-height: clamp(80px, 14vh, 130px);
    overflow-y: auto;
    white-space: pre-wrap;
    word-break: break-word;
    font-size: clamp(0.75rem, 0.9vw, 1rem);
    color: #8dffbf;
}

/* ВЫСОТА TEXTAREA — точно из светлой темы */
textarea {
    resize: none;
    min-height: clamp(50px, 8vh, 80px);
    max-height: clamp(70px, 12vh, 110px);
    font-size: clamp(0.75rem, 0.85vw, 0.95rem);
}

.control-row {
    display: flex;
    flex-wrap: wrap;
    gap: clamp(4px, 0.8vw, 8px);
    margin-top: clamp(6px, 1vh, 10px);
}

.hint {
    margin: clamp(4px, 0.6vh, 8px) 0 0;
    font-size: clamp(0.6rem, 0.7vw, 0.75rem);
}

/* ===== КЛАВИАТУРА (размеры клавиш из светлой темы) ===== */
.keyboard-hint {
    display: flex;
    flex-direction: column;
    gap: clamp(2px, 0.3vh, 4px);
    width: 100%;
}

.keyboard-row {
    display: flex;
    flex-wrap: nowrap;
    gap: clamp(1px, 0.3vw, 4px);
    width: 100%;
    justify-content: center;
}

.keyboard-key {
    flex: 1 1 0;
    min-width: clamp(18px, 2vw, 28px);
    min-height: clamp(30px, 4vh, 42px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(1px, 0.2vh, 4px) clamp(1px, 0.2vw, 3px);
    border-radius: clamp(4px, 0.6vw, 8px);
    background: rgba(0, 22, 11, 0.88);
    border: 1px solid rgba(0, 255, 136, 0.18);
    color: #7ef7b4;
    font-size: clamp(0.45rem, 0.7vw, 0.65rem);
    font-family: var(--mono);
    text-align: center;
    line-height: 1;
    overflow: hidden;
    white-space: nowrap;
    transition: all 0.15s ease;
    text-shadow: 0 0 4px rgba(0, 255, 136, 0.3);
}

.keyboard-key.active {
    background: linear-gradient(135deg, #00ffff, #6fffd6);
    border-color: #00ffff;
    color: #00140a;
    box-shadow: 0 0 0 2px rgba(0, 255, 255, 0.18);
    transform: translateY(-1px);
    z-index: 2;
}

.keyboard-key-tab,
.keyboard-key-caps,
.keyboard-key-enter,
.keyboard-key-shift {
    flex: 2 2 0;
}

.keyboard-key-wide {
    flex: 2.2 2.2 0;
}

.keyboard-key-space {
    flex: 6 6 0;
    min-width: clamp(60px, 8vw, 100px);
}

/* ===== РЕЗУЛЬТАТЫ ===== */
.result-summary {
    margin-top: clamp(8px, 1.5vh, 14px);
    padding: clamp(10px, 1.5vw, 16px);
    border-radius: clamp(14px, 2vw, 20px);
    background: rgba(0, 0, 0, 0.84);
    border: 1px solid rgba(0, 255, 136, 0.12);
}

.result-summary h3 {
    margin: 0 0 clamp(6px, 1vh, 12px);
    font-size: clamp(0.9rem, 1.2vw, 1.1rem);
}

.result-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(6px, 0.8vw, 10px);
    margin-bottom: clamp(6px, 1vh, 12px);
}

.result-summary-card {
    padding: clamp(8px, 1vw, 12px);
    border-radius: clamp(10px, 1.5vw, 16px);
    background: rgba(0, 255, 136, 0.06);
    border: 1px solid rgba(0, 255, 136, 0.08);
    text-align: center;
}

.result-summary-card span {
    display: block;
    margin-bottom: 4px;
    color: var(--muted);
    font-size: clamp(0.65rem, 0.8vw, 0.8rem);
}

.result-summary-card strong {
    display: block;
    font-size: clamp(0.9rem, 1.2vw, 1.2rem);
    color: var(--accent);
}

.result-progress-text {
    margin: 0 0 clamp(6px, 1vh, 12px);
    color: var(--muted);
    font-size: clamp(0.7rem, 0.8vw, 0.85rem);
}

/* ===== ПОДСВЕТКА (стиль матричный, но размеры из светлой) ===== */
.char-correct {
    color: var(--ok);
    background: rgba(0, 255, 136, 0.1);
    border-radius: 3px;
}

.char-wrong {
    color: var(--bad);
    background: rgba(255, 76, 125, 0.1);
    text-decoration: underline wavy var(--bad);
    border-radius: 3px;
}

.char-current {
    color: #00140a;
    background: rgba(0, 255, 255, 0.92);
    border-radius: 6px;
    padding: 0 2px;
    box-shadow: 0 0 0 2px rgba(0, 255, 255, 0.35);
    animation: pulseSoft 0.7s infinite;
    font-weight: 700;
}

.char-future {
    color: #268a54;
}

.char-newline {
    display: inline-block;
    min-width: 12px;
}

@keyframes pulseSoft {
    0% {
        opacity: 0.82;
        box-shadow: 0 0 0 0 rgba(0, 255, 255, 0.45);
    }
    100% {
        opacity: 1;
        box-shadow: 0 0 0 3px rgba(0, 255, 255, 0.14);
    }
}

/* ===== ПРАВАЯ КОЛОНКА ===== */
.ad-panel {
    position: sticky;
    top: clamp(50px, 7vh, 80px);
    display: flex;
    flex-direction: column;
    gap: clamp(8px, 1vh, 14px);
}

.ad-slot {
    padding: clamp(6px, 0.8vw, 10px);
    border-radius: clamp(8px, 1vw, 12px);
    background: rgba(0, 0, 0, 0.92);
    border: 1px solid rgba(0, 255, 136, 0.16);
}

.ad-placeholder {
    display: grid;
    place-items: center;
    min-height: clamp(150px, 20vh, 280px);
    margin-top: clamp(4px, 0.6vh, 8px);
    border-radius: clamp(6px, 0.8vw, 10px);
    color: var(--muted);
    background: rgba(0, 10, 5, 0.76);
    border: 1px dashed rgba(0, 255, 136, 0.16);
    text-align: center;
}

/* ===== ПОДВАЛ ===== */
.site-footer {
    flex-shrink: 0;
    border-top: 1px solid rgba(0, 255, 136, 0.14);
    background: rgba(0, 0, 0, 0.94);
    color: var(--text);
}

.footer-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: clamp(8px, 1.2vw, 14px);
    padding: clamp(6px, 1.2vh, 10px) 0;
    flex-wrap: wrap;
}

.footer-links a {
    color: #6de4a3;
}

/* ===== ПЕРЕКЛЮЧАТЕЛЬ ТЕМ (оставлен матричный) ===== */
.theme-switcher {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    flex-wrap: wrap;
}

/* ===== СКРОЛЛБАР ===== */
::-webkit-scrollbar {
    width: 4px;
    height: 4px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(0, 255, 136, 0.28);
    border-radius: 999px;
}

/* ===== АДАПТИВНОСТЬ (МЕДИА-ЗАПРОСЫ ИЗ СВЕТЛОЙ ТЕМЫ) ===== */
@media (max-width: 1200px) {
    .layout {
        grid-template-columns: minmax(150px, 16vw) minmax(0, 1fr) minmax(130px, 18vw);
    }
    
    .stats-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}

@media (max-width: 992px) {
    .layout {
        grid-template-columns: minmax(150px, 18vw) minmax(0, 1fr);
    }

    .right-sidebar {
        grid-column: 1 / -1;
    }

    .ad-panel {
        position: static;
    }

    .ad-placeholder {
        min-height: clamp(120px, 15vh, 200px);
        max-height: clamp(120px, 15vh, 200px);
    }
    
    .stats-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    body {
        overflow-y: auto;
    }
    
    .layout {
        grid-template-columns: 1fr;
        overflow: visible;
    }

    .left-sidebar,
    .trainer-column,
    .right-sidebar {
        max-height: none;
        overflow-y: visible;
    }

    .navbar,
    .trainer-topbar,
    .footer-content {
        flex-direction: column;
        align-items: flex-start;
    }

    .site-header {
        position: relative;
        top: auto;
    }

    .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    
    .sidebar-tree {
        max-height: 40vh;
    }
}

@media (max-width: 480px) {
    .container {
        width: min(100% - 10px, 88rem);
    }
    
    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 3px;
    }
    
    .stat-card {
        padding: 6px 3px;
    }

    .text-display {
        min-height: 50px;
        max-height: 70px;
    }

    textarea {
        min-height: 40px;
        max-height: 60px;
    }

    .keyboard-key {
        min-width: 16px;
        min-height: 18px;
        font-size: 0.4rem;
    }

    .control-row {
        flex-direction: column;
    }

    .control-row .btn {
        width: 100%;
    }
    
    .result-summary-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== РЕЖИМЫ ТРЕНАЖЕРА ===== */
.trainer-mode-panel,
.custom-text-panel {
    display: grid;
    gap: clamp(6px, 0.8vh, 10px);
    margin-bottom: clamp(6px, 1vh, 10px);
    padding: clamp(8px, 1vw, 12px);
    border: 1px solid rgba(0, 255, 136, 0.16);
    border-radius: clamp(10px, 1.4vw, 16px);
    background: rgba(0, 10, 5, 0.74);
}

.mode-buttons,
.progress-strip {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: clamp(4px, 0.7vw, 8px);
}

.mode-btn {
    min-height: 30px;
    padding: 5px 10px;
    border: 1px solid rgba(0, 255, 136, 0.22);
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.9);
    color: var(--muted);
    cursor: pointer;
    font-size: clamp(0.66rem, 0.8vw, 0.78rem);
    font-weight: 700;
    white-space: nowrap;
}

.mode-btn.active,
.mode-btn:hover {
    color: #00140a;
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    border-color: transparent;
    text-shadow: none;
}

.level-control {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: clamp(0.66rem, 0.8vw, 0.78rem);
    font-weight: 700;
}

.level-control select {
    min-height: 30px;
    border: 1px solid rgba(0, 255, 136, 0.22);
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.94);
    color: var(--text);
    padding: 4px 10px;
    outline: none;
}

.progress-strip span {
    color: var(--muted);
    font-size: clamp(0.62rem, 0.75vw, 0.74rem);
    font-weight: 700;
}

.custom-text-panel[hidden] {
    display: none;
}

.custom-text-panel textarea {
    min-height: 64px;
    max-height: 110px;
}

.result-advice {
    color: var(--accent);
    font-weight: 700;
}

@media (max-width: 768px) {
    .trainer-mode-panel,
    .custom-text-panel {
        padding: 8px;
    }

    .level-control,
    .level-control select,
    .custom-text-panel .btn {
        width: 100%;
    }

    .mode-btn {
        flex: 1 1 calc(50% - 6px);
    }
}
/* ===== SEO-БЛОК ГЛАВНОЙ ===== */
.trainer-seo-section { margin-top: clamp(10px, 2vh, 18px); }
.trainer-seo-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(8px, 1vw, 14px); }
.trainer-seo-grid article { min-width: 0; padding: clamp(10px, 1.4vw, 16px); border: 1px solid rgba(0, 255, 136, 0.16); border-radius: var(--radius-sm); background: rgba(0, 10, 5, 0.74); }
.trainer-seo-grid h2 { margin: 0 0 8px; font-size: clamp(0.95rem, 1.3vw, 1.18rem); line-height: 1.25; }
.trainer-seo-grid p { margin: 0 0 8px; color: var(--muted); font-size: clamp(0.72rem, 0.85vw, 0.86rem); line-height: 1.55; }
@media (max-width: 992px) { .trainer-seo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .trainer-seo-grid { grid-template-columns: 1fr; } }
