@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;800&display=swap');

/* Курсы нового движка (academy). Все классы с префиксом ac-, чтобы не
 * задевать общий style.css. Цвета — от фирменного фиолетового сайта. */

.ac-page {
    --ac-ink: #0f172a;
    --ac-text: #334155;
    --ac-muted: #64748b;
    --ac-line: #e2e8f0;
    --ac-soft: #f1f5f9;
    --ac-card: #ffffff;
    --ac-accent: #6a44ff;
    --ac-accent-dark: #5532e6;
    --ac-accent-soft: #efeaff;
    --ac-ok: #15803d;
    --ac-ok-soft: #dcfce7;
    --ac-bad: #b91c1c;
    --ac-bad-soft: #fee2e2;
    --ac-warn: #b45309;
    --ac-warn-soft: #fef3c7;
    --ac-radius: 16px;
    --ac-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 24px rgba(15, 23, 42, .06);
    --ac-focus: 0 0 0 3px rgba(106, 68, 255, .35);
    /* Poppins сайта без кириллицы, а системный шрифт без ә ө ү ұ қ ғ ң і:
       казахские буквы рисовались третьим шрифтом и выглядели чужими. */
    --ac-font: 'Montserrat', 'Segoe UI', 'Noto Sans', Arial, sans-serif;

    color: var(--ac-text);
    padding: 24px 0 64px;
    font-size: 16px;
    line-height: 1.6;
    overflow-wrap: anywhere;
}

.ac-page *, .ac-page *::before, .ac-page *::after { box-sizing: border-box; }
.ac-page, .ac-page *:not(i):not(.fa):not([class*="fa-"]) { font-family: var(--ac-font); }

.ac-wrap {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 16px;
}
.ac-narrow { max-width: 920px; }

.ac-sr {
    position: absolute !important;
    width: 1px; height: 1px;
    margin: -1px; padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

/* ── Типографика ─────────────────────────────────────────────── */
.ac-title {
    font-size: clamp(2rem, 4.5vw, 3.1rem);
    line-height: 1.15;
    font-weight: 700;
    color: var(--ac-ink);
    margin: 0 0 12px;
    letter-spacing: -.01em;
}
.ac-title-md { font-size: clamp(1.5rem, 3.2vw, 2.1rem); }
.ac-subtitle { font-size: 1.15rem; color: var(--ac-text); margin: 0 0 12px; }
.ac-lead { font-size: 1.05rem; color: var(--ac-text); max-width: 62ch; margin: 0 0 20px; }
.ac-text { max-width: 72ch; margin: 0 0 16px; }
.ac-h2 { font-size: 1.45rem; font-weight: 700; color: var(--ac-ink); margin: 0 0 16px; }
.ac-h3 { font-size: 1.1rem; font-weight: 600; color: var(--ac-ink); margin: 0 0 8px; }
.ac-kicker {
    font-size: .78rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
    color: var(--ac-muted); margin: 0 0 6px;
}
.ac-dim { color: var(--ac-muted); }
.ac-small { font-size: .85rem; margin-top: 10px; }
.ac-big {
    font-size: 2.2rem; font-weight: 700; color: var(--ac-ink); line-height: 1.1; margin: 0;
    font-variant-numeric: tabular-nums;
}
.ac-big span { font-size: 1rem; font-weight: 500; color: var(--ac-muted); }
.ac-mid { font-size: 1.25rem; font-weight: 600; color: var(--ac-ink); margin: 0; }
.ac-num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

.ac-section { margin-top: 48px; }

/* ── Кнопки и ссылки ─────────────────────────────────────────── */
.ac-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 44px; padding: 10px 20px;
    border-radius: 12px; border: 1px solid var(--ac-accent);
    background: var(--ac-accent); color: #fff;
    font: inherit; font-weight: 600; font-size: .95rem; line-height: 1.2;
    text-decoration: none; cursor: pointer;
    transition: background-color .2s, border-color .2s, color .2s, box-shadow .2s;
}
.ac-btn:hover { background: var(--ac-accent-dark); border-color: var(--ac-accent-dark); color: #fff; }
.ac-btn:focus-visible, .ac-link:focus-visible, .ac-page a:focus-visible,
.ac-page summary:focus-visible, .ac-option:focus-within {
    outline: none; box-shadow: var(--ac-focus);
}
.ac-btn[disabled] {
    background: var(--ac-soft); border-color: var(--ac-line); color: var(--ac-muted); cursor: not-allowed;
}
.ac-btn-done[disabled] { background: var(--ac-ok-soft); border-color: #86efac; color: var(--ac-ok); }
.ac-btn-ghost { background: transparent; color: var(--ac-accent); }
.ac-btn-ghost:hover { background: var(--ac-accent-soft); color: var(--ac-accent-dark); }
.ac-btn-sm { min-height: 38px; padding: 7px 14px; font-size: .88rem; border-radius: 10px; }
.ac-btn-lg { min-height: 50px; padding: 12px 26px; font-size: 1rem; }
.ac-btn-note { font-weight: 400; opacity: .85; }
.ac-link { color: var(--ac-accent); font-weight: 500; text-decoration: underline; text-underline-offset: 3px; }
.ac-link:hover { color: var(--ac-accent-dark); }

/* ── Метки ───────────────────────────────────────────────────── */
.ac-badge {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 2px 9px; border-radius: 999px;
    font-size: .76rem; font-weight: 600; line-height: 1.6; white-space: nowrap;
    background: var(--ac-soft); color: var(--ac-muted);
}
.ac-badge-ok { background: var(--ac-ok-soft); color: var(--ac-ok); }
.ac-badge-bad { background: var(--ac-bad-soft); color: var(--ac-bad); }
.ac-badge-warn { background: var(--ac-warn-soft); color: var(--ac-warn); }
.ac-badge-accent { background: var(--ac-accent-soft); color: var(--ac-accent-dark); }
.ac-badge-muted { background: var(--ac-soft); color: var(--ac-muted); }

.ac-kind {
    display: inline-block; padding: 2px 10px; border-radius: 999px;
    font-size: .78rem; font-weight: 600; background: var(--ac-accent-soft); color: var(--ac-accent-dark);
}
.ac-kind-practice { background: #e0f2fe; color: #0369a1; }
.ac-kind-control { background: var(--ac-warn-soft); color: var(--ac-warn); }

.ac-chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0 0 20px; }
.ac-chips li {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 6px 12px; border-radius: 999px;
    background: var(--ac-card); border: 1px solid var(--ac-line);
    font-size: .88rem; color: var(--ac-text);
}
.ac-chips i { color: var(--ac-accent); }

/* ── Сообщения ───────────────────────────────────────────────── */
.ac-messages { margin: 0 0 16px; }
.ac-message {
    margin: 0 0 10px; padding: 12px 16px; border-radius: 12px;
    background: var(--ac-accent-soft); color: var(--ac-accent-dark); border: 1px solid #ddd2ff;
}
.ac-message-success { background: var(--ac-ok-soft); color: var(--ac-ok); border-color: #bbf7d0; }
.ac-message-error { background: var(--ac-bad-soft); color: var(--ac-bad); border-color: #fecaca; }
.ac-message-warning { background: var(--ac-warn-soft); color: var(--ac-warn); border-color: #fde68a; }
.ac-note {
    margin: 8px 0 0; padding: 10px 12px; border-radius: 10px;
    background: var(--ac-soft); color: var(--ac-text); font-size: .9rem;
}
.ac-note-lock i { color: var(--ac-muted); margin-right: 4px; }
.ac-hint { margin: 0; font-size: .85rem; color: var(--ac-muted); }
.ac-status { margin: 0; font-size: .9rem; }
.ac-status:empty { display: none; }
.ac-status.is-ok { color: var(--ac-ok); }
.ac-status.is-error { color: var(--ac-bad); }
.ac-status .ac-btn { margin-left: 8px; }

/* ── Таблицы ─────────────────────────────────────────────────── */
.ac-table-wrap { max-width: 100%; }
.ac-table-scroll { overflow-x: auto; border-radius: var(--ac-radius); }
.ac-table-scroll:focus-visible { outline: none; box-shadow: var(--ac-focus); }
.ac-table {
    width: 100%; border-collapse: separate; border-spacing: 0;
    background: var(--ac-card); border: 1px solid var(--ac-line); border-radius: var(--ac-radius);
    overflow: hidden; font-size: .93rem;
}
.ac-table caption {
    caption-side: top; text-align: left; font-weight: 600; color: var(--ac-ink); padding: 0 0 10px;
}
.ac-table th, .ac-table td { padding: 11px 14px; border-bottom: 1px solid var(--ac-line); text-align: left; vertical-align: top; }
.ac-table thead th {
    background: var(--ac-soft); color: var(--ac-muted); font-weight: 600; font-size: .8rem;
    text-transform: uppercase; letter-spacing: .03em;
}
.ac-table tbody th { font-weight: 500; color: var(--ac-ink); }
.ac-table tbody tr:last-child th, .ac-table tbody tr:last-child td { border-bottom: 0; }
.ac-table tfoot th, .ac-table tfoot td { border-top: 1px solid var(--ac-line); border-bottom: 0; font-weight: 600; color: var(--ac-ink); }
.ac-table .ac-num { text-align: right; }
.ac-table-compact th, .ac-table-compact td { padding: 7px 12px; }
.ac-table .ac-badge { margin-left: 6px; }

/* ── Страница курса ──────────────────────────────────────────── */
.ac-hero { padding: 16px 0 8px; }
.ac-hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 40px; align-items: start; }
.ac-teacher { display: flex; align-items: center; gap: 8px; margin: 0 0 14px; color: var(--ac-text); }
.ac-teacher i { color: var(--ac-accent); }
.ac-teacher strong { color: var(--ac-ink); }
.ac-cta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.ac-cta form { margin: 0; }
.ac-hero-card {
    background: var(--ac-card); border: 1px solid var(--ac-line); border-radius: 20px;
    padding: 24px; box-shadow: var(--ac-shadow);
}
.ac-hero-card .ac-big { margin-bottom: 6px; }
.ac-rules { margin: 16px 0 0; padding: 0 0 0 18px; font-size: .92rem; color: var(--ac-text); }
.ac-rules li { margin-bottom: 6px; }
.ac-rules-plain { color: var(--ac-muted); }

.ac-module-list {
    list-style: none; padding: 0; margin: 0;
    display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px;
}
.ac-module-card {
    background: var(--ac-card); border: 1px solid var(--ac-line); border-radius: var(--ac-radius);
    padding: 20px; display: flex; flex-direction: column; gap: 10px; box-shadow: var(--ac-shadow);
}
.ac-module-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: .88rem; }
.ac-module-num { font-weight: 700; color: var(--ac-accent); }
.ac-kinds { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 0; }
.ac-disclosure summary { cursor: pointer; color: var(--ac-accent); font-weight: 500; font-size: .9rem; border-radius: 6px; }
.ac-plain-list { margin: 8px 0 0; padding-left: 20px; font-size: .9rem; }
.ac-plain-list li { margin-bottom: 4px; }
.ac-module-test { margin: auto 0 0; padding-top: 10px; border-top: 1px dashed var(--ac-line); font-size: .9rem; color: var(--ac-ink); }
.ac-module-test i { color: var(--ac-accent); margin-right: 4px; }
.ac-two-col { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 24px; align-items: start; }

/* ── Плеер ───────────────────────────────────────────────────── */
.ac-topbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; }
.ac-topbar-stats { display: flex; flex-wrap: wrap; gap: 8px; }
.ac-pill {
    display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px;
    background: var(--ac-card); border: 1px solid var(--ac-line); font-size: .86rem; color: var(--ac-text);
    text-decoration: none;
}
.ac-pill i { color: var(--ac-accent); }
.ac-pill strong { color: var(--ac-ink); }
.ac-pill-link:hover { border-color: var(--ac-accent); color: var(--ac-accent-dark); }
.ac-crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: .9rem; color: var(--ac-muted); margin-bottom: 14px; }
.ac-topbar .ac-crumbs { margin-bottom: 0; }
.ac-crumbs a { color: var(--ac-accent); text-decoration: none; font-weight: 500; }
.ac-crumbs a:hover { text-decoration: underline; }

.ac-learn-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 28px; align-items: start; }
.ac-main { min-width: 0; }
.ac-lesson-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 6px; font-size: .88rem; }
.ac-lesson-title { font-size: clamp(1.35rem, 2.6vw, 1.8rem); font-weight: 700; color: var(--ac-ink); margin: 0 0 16px; line-height: 1.25; }
.ac-video {
    position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: var(--ac-radius);
    overflow: hidden; background: #0f172a; box-shadow: var(--ac-shadow);
}
.ac-video iframe, .ac-video #ac-player { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.ac-video-actions {
    display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px;
    margin: 16px 0; padding: 14px 16px; border-radius: var(--ac-radius);
    background: var(--ac-card); border: 1px solid var(--ac-line);
}
.ac-video-actions form { margin: 0; }
.ac-video-help { flex: 1 1 220px; min-width: 0; }
.ac-yt-link { font-size: .9rem; white-space: nowrap; }
.ac-pager { display: flex; justify-content: space-between; gap: 12px; margin: 0 0 24px; }
.ac-main-tests { display: grid; gap: 14px; }

.ac-sidebar {
    position: sticky; top: 120px;
    max-height: calc(100vh - 140px); overflow-y: auto;
    padding: 4px 4px 4px 0; scrollbar-width: thin;
}
.ac-sidebar-title { font-size: .8rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ac-muted); margin: 0 0 10px; }
.ac-acc {
    background: var(--ac-card); border: 1px solid var(--ac-line); border-radius: 14px;
    margin-bottom: 10px; overflow: hidden;
}
.ac-acc > summary {
    display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px;
    cursor: pointer; list-style: none;
}
.ac-acc > summary::-webkit-details-marker { display: none; }
.ac-acc > summary:hover { background: var(--ac-soft); }
.ac-acc[open] > summary { border-bottom: 1px solid var(--ac-line); }
.ac-acc-icon { color: var(--ac-accent); padding-top: 2px; width: 18px; text-align: center; }
.ac-acc.is-locked .ac-acc-icon { color: var(--ac-muted); }
.ac-acc.is-passed .ac-acc-icon { color: var(--ac-ok); }
.ac-acc-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ac-acc-num { font-size: .76rem; font-weight: 600; color: var(--ac-muted); text-transform: uppercase; letter-spacing: .04em; }
.ac-acc-title { font-weight: 600; color: var(--ac-ink); font-size: .95rem; line-height: 1.35; }
.ac-acc-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.ac-acc-count { font-size: .8rem; color: var(--ac-muted); font-variant-numeric: tabular-nums; }
.ac-acc-body { padding: 8px 10px 12px; }

.ac-lessons { list-style: none; margin: 0; padding: 0; }
.ac-lesson a, .ac-lesson-locked {
    display: flex; align-items: flex-start; gap: 10px; padding: 8px 8px; border-radius: 10px;
    text-decoration: none; color: var(--ac-text);
}
.ac-lesson a:hover { background: var(--ac-soft); }
.ac-lesson.is-current a { background: var(--ac-accent-soft); color: var(--ac-ink); }
.ac-lesson-locked { color: var(--ac-muted); cursor: not-allowed; }
.ac-lesson-icon { width: 18px; text-align: center; color: var(--ac-muted); padding-top: 1px; }
.ac-lesson.is-watched .ac-lesson-icon { color: var(--ac-ok); }
.ac-lesson.is-current .ac-lesson-icon { color: var(--ac-accent); }
.ac-lesson-text { display: flex; flex-direction: column; min-width: 0; }
.ac-lesson-kind { font-size: .72rem; color: var(--ac-muted); text-transform: uppercase; letter-spacing: .04em; }
.ac-lesson-name { font-size: .9rem; line-height: 1.35; }

/* ── Карточка теста ──────────────────────────────────────────── */
.ac-test-card {
    border: 1px solid var(--ac-line); border-radius: 14px; padding: 14px 16px;
    background: var(--ac-card); margin-top: 10px;
}
.ac-main-tests .ac-test-card { margin-top: 0; box-shadow: var(--ac-shadow); }
.ac-test-card.is-passed { border-color: #bbf7d0; background: linear-gradient(0deg, #f7fef9, #fff); }
.ac-test-card.is-locked { background: #fbfcfe; }
.ac-test-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ac-test-icon { color: var(--ac-accent); }
.ac-test-card.is-passed .ac-test-icon { color: var(--ac-ok); }
.ac-test-card.is-locked .ac-test-icon { color: var(--ac-muted); }
.ac-test-title { font-weight: 600; color: var(--ac-ink); flex: 1; min-width: 0; }
.ac-facts { display: flex; flex-wrap: wrap; gap: 6px 20px; margin: 10px 0; font-size: .86rem; }
.ac-facts div { display: flex; flex-direction: column; }
.ac-facts dt { color: var(--ac-muted); font-size: .76rem; }
.ac-facts dd { margin: 0; color: var(--ac-ink); font-weight: 500; font-variant-numeric: tabular-nums; }
.ac-test-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.ac-test-actions .ac-note { margin: 0; flex: 1 1 100%; }
.ac-test-actions .ac-link { font-size: .88rem; }
.ac-test-card.is-compact .ac-facts { margin: 8px 0; }

/* ── Тест ────────────────────────────────────────────────────── */
.ac-test-header { margin-bottom: 20px; }
.ac-question {
    border: 1px solid var(--ac-line); border-radius: var(--ac-radius); background: var(--ac-card);
    padding: 20px; margin: 0 0 16px; min-width: 0; box-shadow: var(--ac-shadow);
}
.ac-question.is-answered { border-color: #cfc2ff; }
.ac-q-head { display: flex; justify-content: space-between; gap: 12px; width: 100%; padding: 0; margin-bottom: 10px; }
.ac-q-num { font-weight: 700; color: var(--ac-accent); }
.ac-q-points { font-size: .85rem; color: var(--ac-muted); font-variant-numeric: tabular-nums; }
.ac-q-text { color: var(--ac-ink); font-size: 1.02rem; margin-bottom: 12px; }
.ac-figure { margin: 0 0 14px; text-align: center; }
.ac-figure img {
    max-width: 100%; height: auto; max-height: 420px; border-radius: 10px;
    border: 1px solid var(--ac-line); background: #fff;
}
.ac-figure-sm img { max-height: 220px; }
.ac-options { display: grid; gap: 8px; }
.ac-option {
    position: relative;
    display: flex; align-items: flex-start; gap: 12px; padding: 10px 12px;
    border: 1px solid var(--ac-line); border-radius: 12px; cursor: pointer; background: #fff;
    transition: border-color .15s, background-color .15s;
}
.ac-option:hover { border-color: #cfc2ff; background: #fbfaff; }
.ac-option input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ac-letter {
    flex: 0 0 32px; height: 32px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    border: 2px solid var(--ac-line); font-weight: 700; color: var(--ac-muted); font-size: .9rem;
}
.ac-option-body { display: flex; flex-direction: column; gap: 6px; min-width: 0; padding-top: 4px; }
.ac-option-body img {
    /* Варианты-картинки здесь — формулы: держим их соразмерными тексту */
    max-width: 100%; width: auto; height: auto; max-height: 64px; align-self: flex-start; border-radius: 6px;
}
.ac-option:has(input:checked) { border-color: var(--ac-accent); background: var(--ac-accent-soft); }
.ac-option input:checked + .ac-letter { background: var(--ac-accent); border-color: var(--ac-accent); color: #fff; }
.ac-submit-bar {
    position: sticky; bottom: 12px; z-index: 5;
    display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px;
    padding: 12px 16px; border-radius: var(--ac-radius);
    background: rgba(255, 255, 255, .92); border: 1px solid var(--ac-line);
    box-shadow: 0 10px 30px rgba(15, 23, 42, .12);
    -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}

/* ── Результат и оценка ──────────────────────────────────────── */
.ac-score-card {
    display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px; align-items: center;
    background: var(--ac-card); border: 1px solid var(--ac-line); border-radius: 20px;
    padding: 24px; box-shadow: var(--ac-shadow); margin-bottom: 16px;
}
.ac-score-card.is-passed { border-color: #bbf7d0; }
.ac-score-card.is-failed { border-color: #fde68a; }
.ac-verdict { display: flex; align-items: center; gap: 8px; margin: 0; font-weight: 600; }
.is-passed .ac-verdict { color: var(--ac-ok); }
.is-failed .ac-verdict { color: var(--ac-warn); }
.ac-score-grid { display: flex; flex-wrap: wrap; gap: 20px 28px; margin: 0; }
.ac-score-grid dt, .ac-summary dt { font-size: .8rem; color: var(--ac-muted); }
.ac-score-grid dd, .ac-summary dd { margin: 0; }
.ac-result-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 12px; }

.ac-review { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.ac-review-item {
    border: 1px solid var(--ac-line); border-left-width: 4px; border-radius: 14px;
    padding: 14px 16px; background: var(--ac-card);
}
.ac-review-item.is-correct { border-left-color: var(--ac-ok); }
.ac-review-item.is-wrong { border-left-color: var(--ac-bad); }
.ac-review-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 8px; }
.ac-review-points { margin-left: auto; font-weight: 600; color: var(--ac-ink); font-variant-numeric: tabular-nums; }
.ac-answer { margin: 6px 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.ac-answer-img { max-height: 80px; max-width: 100%; border-radius: 6px; border: 1px solid var(--ac-line); }
.ac-key { color: var(--ac-ok); }

.ac-summary {
    display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin: 0 0 20px;
}
.ac-summary > div {
    background: var(--ac-card); border: 1px solid var(--ac-line); border-radius: var(--ac-radius);
    padding: 18px; box-shadow: var(--ac-shadow);
}
.ac-summary-main { background: linear-gradient(135deg, #f4f0ff, #fff) !important; border-color: #ddd2ff !important; }
/* Зачёт без баллов: в сводке две карточки, а не четыре */
.ac-summary.ac-summary-two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ac-cert-box {
    border: 1px dashed var(--ac-line); border-radius: var(--ac-radius); padding: 18px 20px;
    margin: 0 0 28px; background: var(--ac-card);
}
.ac-cert-box.is-ready { border-style: solid; border-color: #bbf7d0; background: linear-gradient(0deg, #f7fef9, #fff); }
.ac-cert-box p { margin: 0 0 8px; }
.ac-cert-box .ac-btn { margin-top: 6px; }
.ac-cert-box .ac-h3 i { color: var(--ac-accent); }

/* ── Проверка сертификата ────────────────────────────────────── */
.ac-verify {
    max-width: 620px; margin: 24px auto; padding: 28px; border-radius: 20px;
    background: var(--ac-card); border: 1px solid var(--ac-line); box-shadow: var(--ac-shadow);
}
.ac-verify.is-valid .ac-title i { color: var(--ac-ok); }
.ac-verify.is-invalid .ac-title i { color: var(--ac-bad); }
.ac-verify-list { margin: 16px 0 0; display: grid; gap: 10px; }
.ac-verify-list div { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--ac-line); }
.ac-verify-list dt { color: var(--ac-muted); }
.ac-verify-list dd { margin: 0; color: var(--ac-ink); font-weight: 500; }

/* ── Журнал ──────────────────────────────────────────────────── */
.ac-gradebook-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 12px; margin-bottom: 16px; }
.ac-gradebook { min-width: 720px; }
.ac-gradebook .ac-sticky { position: sticky; left: 0; background: var(--ac-card); z-index: 1; min-width: 200px; }
.ac-gradebook thead .ac-sticky { background: var(--ac-soft); }
.ac-gradebook thead th { text-transform: none; letter-spacing: 0; font-size: .82rem; }

/* ── Адаптивность ────────────────────────────────────────────── */
@media (max-width: 1024px) {
    .ac-hero-grid, .ac-learn-grid, .ac-two-col { grid-template-columns: minmax(0, 1fr); }
    .ac-sidebar { position: static; max-height: none; overflow: visible; padding: 0; }
    .ac-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
    .ac-page { padding-top: 16px; }
    .ac-section { margin-top: 32px; }
    .ac-question { padding: 16px 14px; }
    .ac-score-card { grid-template-columns: minmax(0, 1fr); padding: 18px; }
    .ac-big { font-size: 1.8rem; }
    .ac-cta .ac-btn, .ac-cta form, .ac-cta form .ac-btn { width: 100%; }
    .ac-pager .ac-btn { padding: 10px 14px; }
    .ac-verify { padding: 20px; }
    .ac-verify-list div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
    .ac-table th, .ac-table td { padding: 9px 10px; }
    .ac-table-wrap:not(.ac-table-scroll) { overflow-x: auto; }
}

@media (prefers-reduced-motion: reduce) {
    .ac-page * { transition: none !important; }
}

/* ── Описание и материалы урока ──────────────────────────────── */
.ac-lesson-extra { margin: 16px 0 0; display: grid; gap: 12px; justify-items: start; }
.ac-lesson-desc { margin: 0; max-width: 72ch; }
.ac-attachment { overflow-wrap: anywhere; }
