@font-face {
    font-family: 'Jost';
    src: url('../fonts/Jost/Jost-VariableFont_wght.ttf');
}

/* Цвета */
:root {
    --brand: #533588;
    --brand-soft: #a186d1;
    --brand-dark: #3f2768;
    --brand-fg: var(--brand);
    --brand-tint: #f3eefb;

    --bg: #ffffff;
    --surface: #ffffff;
    --surface-2: #f5f5f7;
    --text: #333333;
    --text-muted: #6b6b6b;
    --border: #e6e6e6;
    --header-bg: rgba(255, 255, 255, 0.82);

    --white: #fff;
    --brand-mid: #6d4aa6;
    --tint-light: #f3eefb;
    --scrim: #000000bd;

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 10px 30px rgba(83, 53, 136, 0.12);
    --shadow-lg: 0 18px 44px rgba(83, 53, 136, 0.2);

    --programm-pk-bg: rgba(25, 135, 84, 0.12);
    --programm-pk-fg: #198754;
    --programm-pp-bg: rgba(13, 110, 253, 0.12);
    --programm-pp-fg: #0d6efd;

    --radius: 16px;
    --radius-sm: 10px;
    --section-pad: clamp(3rem, 6vw, 5.5rem);
    --header-h: 81px;

    --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* Темная тема - системные настройки */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme='light']) {
        --brand-tint: #241b33;
        --brand-fg: #c4a3f0;
        --bg: #0f1117;
        --surface: #171a21;
        --surface-2: #1f232c;
        --text: #e8e8ea;
        --text-muted: #a0a0a8;
        --border: #2a2f3a;
        --header-bg: rgba(15, 17, 23, 0.82);
        --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.45);
        --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.55);
        --shadow-lg: 0 18px 44px rgba(0, 0, 0, 0.65);

        --programm-pk-bg: rgba(25, 135, 84, 0.22);
        --programm-pk-fg: #75b798;
        --programm-pp-bg: rgba(13, 110, 253, 0.22);
        --programm-pp-fg: #6ea8fe;
    }
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme='light']) .checkbox label,
    :root:not([data-theme='light']) .checkbox__label {
        color: var(--text-muted);
    }
}

/* Темная тема - явный выбор */
[data-theme='dark'] {
    --brand-tint: #241b33;
    --brand-fg: #c4a3f0;
    --bg: #0f1117;
    --surface: #171a21;
    --surface-2: #1f232c;
    --text: #e8e8ea;
    --text-muted: #a0a0a8;
    --border: #2a2f3a;
    --header-bg: rgba(15, 17, 23, 0.82);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.45);
    --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.55);
    --shadow-lg: 0 18px 44px rgba(0, 0, 0, 0.65);

    --programm-pk-bg: rgba(25, 135, 84, 0.22);
    --programm-pk-fg: #75b798;
    --programm-pp-bg: rgba(13, 110, 253, 0.22);
    --programm-pp-fg: #6ea8fe;
}

:root[data-theme='dark'] ::-webkit-scrollbar-track {
    background: #171a21;
}

:root[data-theme='dark'] ::-webkit-scrollbar-thumb {
    background: #4a5165;
    border-radius: 5px;
}

:root[data-theme='dark'] ::-webkit-scrollbar-thumb:hover {
    background: #5a6275;
}

:root[data-theme='dark'] {
    scrollbar-color: #4a5165 #171a21;
}

[data-theme='dark'] .checkbox label,
[data-theme='dark'] .checkbox__label {
    color: var(--text-muted);
}

/* Светлая тема - явный выбор */
[data-theme='light'] {
    --brand-tint: #f3eefb;
    --bg: #ffffff;
    --surface: #ffffff;
    --surface-2: #f5f5f7;
    --text: #333333;
    --text-muted: #6b6b6b;
    --border: #e6e6e6;
    --header-bg: rgba(255, 255, 255, 0.82);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 10px 30px rgba(83, 53, 136, 0.12);
    --shadow-lg: 0 18px 44px rgba(83, 53, 136, 0.2);
}

/* Базовые стили */
* {
    box-sizing: border-box;
}

html {
    scroll-padding-top: var(--header-h);
}

body {
    position: relative;
    background: var(--bg);
    color: var(--text);
    transition:
        background 0.3s var(--ease),
        color 0.3s var(--ease);
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

body.no-scroll {
    overflow: hidden;
}

h1,
.h1 {
    font-family: 'Jost', sans-serif;
    font-size: clamp(1.9rem, 4vw, 2.2rem);
    line-height: 1.12;
    color: var(--brand-fg);
    font-style: normal;
    text-transform: uppercase;
    letter-spacing: 0.01em;
}

h2,
.h2 {
    font-family: 'Jost', sans-serif;
    font-size: clamp(1.6rem, 3vw, 1.85rem);
    line-height: 1.2;
    color: var(--text);
    font-style: normal;
}

h3,
.h3 {
    font-family: 'Jost', sans-serif;
    font-size: 1.5em;
    color: var(--brand-fg);
}

h4,
.h4 {
    font-family: 'Jost', sans-serif;
    font-size: 1.35em;
    color: var(--text);
}

h5,
.h5 {
    font-family: 'Jost', sans-serif;
    font-size: 1.2em;
    color: var(--brand-fg);
}

h6,
.h6 {
    font-family: 'Jost', sans-serif;
    font-size: 1.125em;
    color: var(--brand-fg);
}

p {
    line-height: 1.65;
}

a {
    transition: color 0.15s var(--ease);
}

:focus-visible {
    outline: 2px solid var(--brand-fg);
    outline-offset: 2px;
    border-radius: 4px;
}

/* Кнопки */
.btn {
    --bs-btn-border-radius: var(--radius-sm);
    transition:
        transform 0.15s var(--ease),
        box-shadow 0.15s var(--ease),
        background-color 0.15s var(--ease),
        color 0.15s var(--ease),
        border-color 0.15s var(--ease);
}

.btn-primary,
.btn-secondary,
.btn-danger {
    background-color: var(--brand);
    border-color: var(--brand);
    color: var(--white);
}

.btn-primary:hover,
.btn-secondary:hover {
    background-color: var(--brand-soft);
    border-color: var(--brand);
    color: var(--white);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn.btn-primary:hover,
.btn.btn-primary:focus,
.btn.btn-primary:active {
    background-color: var(--brand-dark);
    border-color: var(--brand-dark);
    color: var(--white);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-outline-primary {
    color: var(--brand-fg);
    border-color: var(--brand);
    background: transparent;
}

.btn-outline-primary:hover {
    color: var(--white);
    background-color: var(--brand);
    border-color: var(--brand);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn.btn-outline-primary:hover {
    color: var(--white);
    background-color: var(--brand-dark);
    border-color: var(--brand-dark);
}

.text-lilac {
    color: var(--brand-fg) !important;
}

.text-bg-lilac {
    color: var(--white);
    background-color: var(--brand);
}

/* Карточки и общие стили */
.card {
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition:
        transform 0.25s var(--ease),
        box-shadow 0.25s var(--ease),
        border-color 0.25s var(--ease);
}

.card-hover:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.section {
    padding-block: var(--section-pad);
}

.reveal {
    opacity: 0;
    transition: opacity 0.7s var(--ease);
    will-change: opacity;
}

.reveal.is-visible {
    opacity: 1;
}

.chip {
    border-radius: 999px;
    padding: 0.5rem 1.1rem;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    transition: all 0.15s var(--ease);
}

.chip.active,
.chip:hover {
    background: var(--brand);
    border-color: var(--brand);
    color: var(--white);
}

/* Хедер */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1030;
    background: var(--header-bg);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid transparent;
    transition:
        background 0.3s var(--ease),
        box-shadow 0.3s var(--ease),
        border-color 0.3s var(--ease);
}

.site-header.scrolled {
    box-shadow: var(--shadow-sm);
    border-bottom-color: var(--border);
}

.site-header .nav-link {
    color: var(--text);
    border-radius: var(--radius-sm);
    transition:
        background 0.15s var(--ease),
        color 0.15s var(--ease);
}

.site-header .nav-link:hover {
    color: var(--brand-fg);
    background: var(--brand-tint);
}

.theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 31px;
    height: 31px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--brand-fg);
    cursor: pointer;
    transition:
        transform 0.2s var(--ease),
        background 0.2s var(--ease),
        color 0.2s var(--ease);
}

.theme-toggle:hover {
    transform: rotate(-12deg) scale(1.05);
    background: var(--brand-tint);
}

.mobile-menu {
    background-color: var(--brand-tint);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40'%3E%3Cpath d='M0 39h40M39 0v40' stroke='rgba(83,53,136,.18)'/%3E%3C/svg%3E");
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
}

.mobile-menu .nav-link,
.mobile-menu a:not(.btn) {
    color: var(--text);
    padding: 0.65rem 1rem;
    border-radius: var(--radius-sm);
}

.mobile-menu a:not(.btn):hover {
    background: var(--brand-tint);
    color: var(--brand-fg);
}

#mobileMenu {
    position: fixed;
    inset: 0;
    z-index: 1045;
    background: var(--surface);
    overflow-y: auto;
    height: 100vh !important;
    max-height: 100vh !important;
}

#mobileMenu.collapsing {
    position: fixed !important;
    height: 100vh !important;
    overflow: visible !important;
    transition: none !important;
    visibility: visible !important;
}

.lanLogo {
    max-width: 100%;
    width: 200px;
    object-fit: contain;
}

/* Инвертированный лого для темной темы */
.logo-dark {
    display: none;
}

[data-theme='dark'] .logo-normal {
    display: none;
}

[data-theme='dark'] .logo-dark {
    display: inline-block;
}

[data-theme='light'] .logo-normal {
    display: inline-block;
}

[data-theme='light'] .logo-dark {
    display: none;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme='light']) .logo-normal {
        display: none;
    }

    :root:not([data-theme='light']) .logo-dark {
        display: inline-block;
    }
}

.header-phone {
    font-family: 'Jost', sans-serif;
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--brand-fg);
    text-decoration: none;
    transition: color 0.15s var(--ease);
}

.header-phone:hover {
    color: var(--brand-soft);
}

.theme-toggle--sm {
    width: 31px;
    height: 31px;
    font-size: 0.9rem;
}

.site-header [data-bs-toggle='collapse'] {
    min-width: 42px;
    min-height: 40px;
    font-size: 1.15rem;
}

/* Hero главная */
.hero {
    position: relative;
    overflow: hidden;
    color: var(--white);
    background:
        radial-gradient(
            1200px 500px at 80% -10%,
            rgba(255, 255, 255, 0.18),
            transparent 60%
        ),
        linear-gradient(
            135deg,
            var(--brand) 0%,
            var(--brand-mid) 55%,
            var(--brand-soft) 100%
        );
    border-radius: 28px;
    border-top-left-radius: 0;
    border-top-right-radius: 0;
    padding: clamp(2.5rem, 7vw, 5rem) 0;
    min-height: calc(100vh - var(--header-h) - 1.05rem);
    display: flex;
    align-items: center;
}

.hero > .container {
    width: 100%;
}

.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40'%3E%3Cpath d='M0 39h40M39 0v40' stroke='rgba(255,255,255,.06)'/%3E%3C/svg%3E");
    pointer-events: none;
}

.hero h1 {
    color: var(--white);
}

.sign-hero {
    min-height: calc(100vh - var(--header-h));
    display: flex;
    align-items: center;
}

.sign-note {
    background: var(--surface-2);
}

.sign-duration {
    background: #212529;
    color: #fff;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme='light']) .sign-duration {
        background: var(--surface-2);
        color: var(--text);
    }
}

[data-theme='dark'] .sign-duration {
    background: var(--surface-2);
    color: var(--text);
}

.auth-hero {
    position: relative;
    min-height: calc(100vh - var(--header-h));
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    overflow: hidden;
    background-color: var(--brand);
    background-image:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40'%3E%3Cpath d='M0 39h40M39 0v40' stroke='rgba(255,255,255,.06)'/%3E%3C/svg%3E"),
        linear-gradient(
            135deg,
            var(--brand) 0%,
            var(--brand-mid) 55%,
            var(--brand-soft) 100%
        );
    background-repeat: repeat, no-repeat;
    background-size:
        40px 40px,
        cover;
}

.auth-card {
    max-width: 480px;
    width: 100%;
}

/* .auth-card .modal-body {
    padding: 2rem 2.25rem;
} */

.auth-card a:not(.btn) {
    color: var(--brand-fg);
    text-decoration: none;
    text-underline-offset: 2px;
}

.auth-card a:not(.btn):hover {
    text-decoration: underline;
}

/* Модалки без .auth-card: ссылки согласия + название курса в тёмной теме */
.modal-content a:not(.btn):not(.btn-close) {
    color: var(--brand-fg);
    text-decoration: none;
    text-underline-offset: 2px;
}

.modal-content a:not(.btn):not(.btn-close):hover {
    text-decoration: underline;
}

.modal-content .text-primary {
    color: var(--brand-fg) !important;
}

.hero .lead {
    color: rgba(255, 255, 255, 0.92);
    font-size: clamp(1.05rem, 2vw, 1.25rem);
}

.hero .btn-light {
    background: var(--white);
    color: var(--brand);
    border: 0;
    font-weight: 600;
}

.hero .btn-light:hover {
    background: var(--tint-light);
    transform: translateY(-1px);
}

.hero .btn-outline-light {
    color: var(--white);
    border-color: rgba(255, 255, 255, 0.7);
}

.hero .btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.15);
    color: var(--white);
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.35);
    color: var(--white);
    padding: 0.35rem 0.9rem;
    border-radius: 999px;
    font-size: 0.9rem;
}

.hero-video {
    position: relative;
    transition:
        transform 0.4s var(--ease),
        box-shadow 0.4s var(--ease);
}
.hero-video:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}
.hero-video img {
    transition: transform 0.4s var(--ease);
}
.hero-video:hover img {
    transform: scale(1.05);
}
.hero-video__play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}
.hero-video__play::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(83, 53, 136, 0.35);
    opacity: 0;
    transition: opacity 0s;
}
.hero-video:hover .hero-video__play::before {
    opacity: 1;
    transition: opacity 0.4s var(--ease);
}
.hero-video__play i {
    position: relative;
    z-index: 1;
    width: 72px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: #fff;
    background: var(--brand);
    border-radius: 50%;
    box-shadow: var(--shadow-lg);
}

/* Почему выбирают нас */
.feature-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.75rem;
    height: 100%;
    transition:
        transform 0.25s var(--ease),
        box-shadow 0.25s var(--ease),
        border-color 0.25s var(--ease);
}

.feature-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-md);
    border-color: var(--brand-soft);
}

.feature-icon {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--brand-tint);
    color: var(--brand-fg);
    font-size: 1.8rem;
    flex-shrink: 0;
}

/* Карточки курсов */
.course-list {
    transition: opacity 0.35s var(--ease);
}

.course-card {
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    transition:
        transform 0.25s var(--ease),
        border-color 0.25s var(--ease);
}

.course-card:hover {
    transform: translateY(-3px);
    border-color: var(--brand-soft);
}

.course-card__variant {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
}

.course-card__top {
    padding-top: 1.8rem;
}

.course-card__discount {
    position: absolute;
    top: 0;
    right: 0;
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    gap: 0.35em;
    white-space: nowrap;
    padding: 0.35em 0.8em;
    background: #c60000;
    color: var(--white);
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.1;
    border-radius: 0;
    border-bottom-left-radius: var(--radius-sm);
}

.course-card__discount small {
    font-size: 0.75em;
    font-weight: 500;
    opacity: 0.85;
}

.course-card__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding-top: 1rem;
}

.course-card__type {
    background: var(--brand-tint);
    color: var(--brand-fg);
    padding: 0.45em 1em;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 50rem;
}

.course-card__type--pk {
    background: var(--programm-pk-bg);
    color: var(--programm-pk-fg);
}

.course-card__type--pp {
    background: var(--programm-pp-bg);
    color: var(--programm-pp-fg);
}

.course-card__title {
    margin-bottom: 0.5rem;
}

.course-card .course-title-link {
    color: var(--brand-fg);
    text-decoration: none;
}

.course-card__desc {
    margin-bottom: 0;
    font-size: 0.9rem;
    color: var(--text-muted);
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
    line-clamp: 4;
    overflow: hidden;
    min-height: calc(4 * 1.5em);
}

.course-card__duration {
    margin-bottom: 1rem;
    position: relative;
    z-index: 2;
}

.course-card__actions {
    position: relative;
    z-index: 2;
}

.course-card__thumb {
    width: 150px;
    height: 200px;
    flex: 0 0 auto;
    object-fit: cover;
    object-position: center;
    border-radius: var(--radius);
    background: var(--surface);
}

@media (max-width: 575.98px) {
    .course-card__thumb {
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 9;
        object-fit: cover;
    }
}

.course-card__duration .nav-link {
    background: var(--surface-2);
    color: var(--text-muted);
    border: 1px solid var(--border);
    border-radius: 50rem;
    padding: 0.3rem 0.85rem;
    font-size: 0.85rem;
    font-weight: 600;
}

.course-card__duration .nav-link:hover {
    color: var(--brand-fg);
    border-color: var(--brand-soft);
}

.course-card__duration .nav-link.active,
.course-card__duration .nav-link.active:hover {
    background: var(--brand);
    border-color: var(--brand);
    color: var(--white);
}

.course-card__price {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 5.4rem;
    padding: 0.35rem 0.9rem;
    margin-bottom: 1rem;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}

.course-card__price-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.35rem 0;
}

.course-card__price-row + .course-card__price-row {
    border-top: 1px solid var(--border);
}

.course-card__price-row--old {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.course-price {
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--brand-fg);
    white-space: nowrap;
}

.course-card__result {
    padding: 0.6rem 0.8rem;
    margin-bottom: 1rem;
    background: var(--brand-tint);
    border-left: 4px solid var(--brand);
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    color: var(--text-muted);
}

@media (max-width: 991px) {
    :root {
        --header-h: 74px;
    }
}

/* Блок Контакты */
.contact-card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

.contact-list li {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--border);
}

.contact-list li:last-child {
    border-bottom: 0;
}

.contact-list i {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--brand-tint);
    color: var(--brand-fg);
    font-size: 1.15rem;
}

.contact-list a {
    color: var(--brand-fg);
    text-decoration: none;
}

.contact-list a:hover {
    text-decoration: underline;
}

.footer-title {
    font-family: 'Jost', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: 0.8rem;
}

.site-footer .footer-title {
    color: var(--brand-fg) !important;
}

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

.site-footer a:hover {
    text-decoration: underline;
    color: var(--brand-fg) !important;
}

.site-footer .footer-license {
    font-size: 0.8rem;
    line-height: 1.3;
}

@media (min-width: 992px) {
    .contact-divider {
        border-left: 1px solid var(--border);
        padding-left: 1.5rem;
    }
}

/* Об организации */
.about-nav {
    position: sticky;
    top: calc(var(--header-h) + 1rem);
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.75rem;
    box-shadow: var(--shadow-sm);
}

.about-nav a {
    padding: 0.6rem 0.9rem;
    border-radius: var(--radius-sm);
    color: var(--text);
    text-decoration: none;
    transition:
        background 0.15s var(--ease),
        color 0.15s var(--ease);
}

.about-nav a:hover {
    background: var(--brand-tint);
    color: var(--brand-fg);
}

.about-nav a.active {
    background: var(--brand);
    color: var(--white);
}

.prose {
    line-height: 1.75;
}

.prose h1 {
    margin-bottom: 1.5rem;
}

.prose h2 {
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

.prose h3 {
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--brand-fg);
    font-weight: 600;
}

.prose p {
    margin-bottom: 0.4rem;
    color: var(--text);
}

.prose ul:not(.list-unstyled),
.prose ol {
    margin: 0 0 1rem;
    padding-left: 1.25rem;
    line-height: 1.7;
}

.prose ul:not(.list-unstyled) li,
.prose ol li {
    margin-bottom: 0.4rem;
}

.prose a:not(.doc-card) {
    color: var(--brand-fg);
    text-decoration: none;
    text-underline-offset: 2px;
}

.prose a:not(.doc-card):hover {
    text-decoration: underline;
}

.prose strong {
    color: var(--text);
    font-weight: 700;
}

.prose table {
    margin: 1.5rem 0;
    color: var(--text);
    border-color: var(--border);
}

.prose table th,
.prose table td,
.prose .table th,
.prose .table td {
    color: var(--text);
    border-color: var(--border);
}

.doc-card {
    height: 100%;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.25rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    transition:
        transform 0.2s var(--ease),
        box-shadow 0.2s var(--ease);
}

.doc-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.doc-card i {
    font-size: 2rem;
    color: var(--brand-fg);
}

/* Политика конфиденциальности и согласие */
.policy__text {
    line-height: 1.8;
}

.policy__text h1 {
    margin: 1.5rem 0 1rem;
    font-family: 'Jost', sans-serif;
    font-weight: 700;
    font-size: clamp(1.9rem, 4vw, 2.2rem);
    line-height: 1.12;
    color: var(--brand-fg);
    text-transform: uppercase;
    letter-spacing: 0.01em;
}

.policy__text h2 {
    margin-top: 2.2rem;
    margin-bottom: 0.6rem;
    font-family: 'Jost', sans-serif;
    font-weight: 700;
    font-size: 1.45em;
    line-height: 1.2;
    color: var(--brand-fg);
}

.policy__text h3 {
    margin: 1.5rem 0 0.5rem;
    font-family: 'Jost', sans-serif;
    font-weight: 600;
    font-size: 1.2em;
    line-height: 1.4;
    color: var(--brand-fg);
    text-align: left;
}

.policy__text p,
.policy__text li {
    margin-top: 1rem;
    font-size: 1rem;
    line-height: 1.65;
    color: var(--text);
}

.policy__text ul {
    padding-left: 0;
    color: var(--text);
}

/* Детали курсов */
.step-card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    height: 100%;
    transition:
        transform 0.2s var(--ease),
        box-shadow 0.2s var(--ease),
        border-color 0.25s var(--ease);
}

.step-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--brand-soft);
}

.step-num {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--brand);
    color: var(--white);
    font-weight: 700;
    font-family: 'Jost', sans-serif;
}

.price-card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface-2);
}

/* Модалки */
.modal-content {
    border: 0;
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--text);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.modal-header {
    border-bottom: 1px solid var(--border);
    padding: 1.25rem 1.5rem;
}

.modal-body {
    padding: 1.75rem;
}

.modal-accent {
    height: 6px;
    background: linear-gradient(90deg, var(--brand), var(--brand-soft));
}

.form-control {
    background: var(--surface-2);
    color: var(--text);
    border-color: var(--border);
    border-radius: var(--radius-sm);
    transition:
        border-color 0.15s var(--ease),
        box-shadow 0.15s var(--ease),
        background 0.15s var(--ease);
}

.form-control:focus {
    background: var(--surface-2);
    color: var(--text);
    border-color: var(--brand);
    box-shadow: 0 0 0 0.2rem rgba(83, 53, 136, 0.25);
}

.form-control::placeholder {
    color: var(--text-muted);
}

.form-check-input:checked {
    background-color: var(--brand);
    border-color: var(--brand);
}

:root[data-theme='dark'] .form-switch .form-check-input:not(:checked) {
    filter: brightness(2);
}

:root[data-theme='dark'] .pagination .page-link {
    background-color: var(--surface);
    border-color: var(--border);
    color: var(--text);
}

:root[data-theme='dark'] .pagination .page-link:hover {
    background-color: var(--surface-2);
    border-color: var(--border);
    color: var(--text);
}

:root[data-theme='dark'] .pagination .page-item.active .page-link {
    background-color: var(--brand);
    border-color: var(--brand);
    color: #ffffff;
}

:root[data-theme='dark'] .pagination .page-item.disabled .page-link {
    background-color: var(--surface);
    border-color: var(--border);
    color: var(--text-muted);
}

[data-theme='dark'] .btn-close,
:root:not([data-theme='light']) .btn-close {
    filter: invert(1) grayscale(100%) brightness(1.4);
}

[data-theme='dark'] .toast,
:root:not([data-theme='light']) .toast {
    --bs-toast-bg: var(--surface);
    --bs-toast-color: var(--text);
    --bs-toast-header-bg: var(--surface-2);
    --bs-toast-header-color: var(--text-muted);
    border: 1px solid var(--border);
    color: var(--text);
}

.modal-aside {
    background: var(--brand-tint);
    border-radius: var(--radius-sm);
    padding: 1.25rem;
}

.checkbox {
    display: flex;
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
}

.checkbox__wrap {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.checkbox__input {
    margin-top: 1px;
    cursor: pointer;
}

.checkbox__label {
    font-size: 14px;
    color: #787878;
    cursor: pointer;
}

/* Ошибка 404 */
.error-container {
    height: 45vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* Стары�x;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* Старые стили */
.top {
    position: fixed;
    overflow: hidden;
    top: calc(100vh - 60px);
    right: 15px;
    font-size: 2.5em;
    color: var(--brand-fg);
    background: transparent;
    border-radius: 50%;
    height: 44px;
    width: 44px;
    display: none;
    justify-content: center;
    align-items: center;
    transition:
        transform 0.3s var(--ease),
        opacity 0.4s var(--ease),
        box-shadow 0.3s var(--ease);
    opacity: 0;
    z-index: 1040;
}

.top:hover {
    transform: translateY(-3px);
    opacity: 1 !important;
}

.top a,
.top .bi {
    color: var(--brand-fg);
}

.old-price {
    position: relative;
}

.old-price div {
    position: absolute;
    background: var(--scrim);
    width: 111%;
    height: 2px;
    left: -3px;
    top: 50%;
    transform: rotate(-10deg);
}

.sing-img {
    background-repeat: no-repeat;
    background-size: cover;
    background-position: top center;
}

.lending-bock-title-link {
    text-decoration: none;
}

.lending-bock-title-link:hover {
    text-decoration: underline;
}

@media (max-width: 576px) {
    h1,
    .h1 {
        font-size: calc(6vw) !important;
    }

    h2,
    .h2 {
        font-size: calc(6vw) !important;
    }
}

/* Карусель курсов на странице курса */
.courses-carousel__btn {
    width: 38px;
    height: 38px;
    font-size: 16px;
}

.courses-carousel__track {
    will-change: transform;
}

@media (max-width: 767.98px) {
    .courses-carousel__inner {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.75rem 1rem;
    }

    .courses-carousel__viewport {
        order: -1;
        flex: 0 0 100%;
        max-width: 100%;
    }
}

/* Плавное отображение блоков */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
}
