/* ==========================================================================
   Медиа уроки — дизайн-система портала.
   Bootstrap 5 используется только как сетка и базовые утилиты; всё
   визуальное оформление переопределено здесь.
   ========================================================================== */

:root {
    --ink-900: #0b1020;
    --ink-700: #1e2749;
    --ink-500: #4a5578;
    --ink-400: #6b7699;
    --ink-300: #9aa4c4;
    --line: #e6e8f2;
    --surface: #ffffff;
    --canvas: #f5f6fc;

    --brand-700: #4a3fd0;
    --brand-600: #5b4ee6;
    --brand-500: #6c5ce7;
    --brand-100: #ece9ff;
    --brand-50:  #f6f4ff;

    --amber-600: #f59f00;
    --amber-100: #fff4dd;
    --mint-600: #12b76a;
    --mint-100: #e6f8ef;
    --rose-600: #e5484d;
    --rose-100: #ffeaea;
    --sky-600: #0ba5ec;
    --sky-100: #e4f6fe;

    --r-sm: 10px;
    --r-md: 16px;
    --r-lg: 22px;
    --r-xl: 30px;

    --sh-1: 0 1px 2px rgba(16, 24, 64, .06), 0 1px 3px rgba(16, 24, 64, .04);
    --sh-2: 0 8px 24px -12px rgba(16, 24, 64, .18), 0 2px 6px rgba(16, 24, 64, .05);
    --sh-3: 0 28px 60px -28px rgba(16, 24, 64, .34), 0 6px 18px -8px rgba(16, 24, 64, .12);
    --sh-brand: 0 18px 40px -16px rgba(92, 78, 230, .55);

    --ff-display: "Unbounded", "Manrope", system-ui, sans-serif;
    --ff-body: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
}

/* ---------------------------------------------------------------- база ---- */

* { -webkit-tap-highlight-color: transparent; }

html { scroll-behavior: smooth; }

body {
    font-family: var(--ff-body);
    color: var(--ink-700);
    background: var(--canvas);
    font-size: 1rem;
    line-height: 1.65;
    letter-spacing: .01em;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

h1, h2, h3, h4, .display-1, .display-2, .display-3, .display-4 {
    font-family: var(--ff-display);
    font-weight: 600;
    letter-spacing: -.02em;
    color: var(--ink-900);
    line-height: 1.18;
}

a { color: var(--brand-600); text-decoration: none; transition: color .18s ease; }
a:hover { color: var(--brand-700); }

.text-muted { color: var(--ink-400) !important; }
.fw-semibold { font-weight: 600 !important; }
main { flex: 1 0 auto; }

::selection { background: var(--brand-100); color: var(--brand-700); }

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

.container, .container-fluid { max-width: 1180px; }

/* ------------------------------------------------------------- кнопки ---- */

.btn {
    font-family: var(--ff-body);
    font-weight: 700;
    font-size: .95rem;
    letter-spacing: .01em;
    border-radius: 999px;
    padding: .68rem 1.4rem;
    border: 1.5px solid transparent;
    transition: transform .16s ease, box-shadow .2s ease, background-color .2s ease,
                color .2s ease, border-color .2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
}

.btn:active { transform: translateY(1px) scale(.99); }
.btn-lg { padding: .92rem 1.9rem; font-size: 1.03rem; }
.btn-sm { padding: .44rem 1rem; font-size: .86rem; }

.btn-primary, .btn-success {
    background: linear-gradient(135deg, var(--brand-500), var(--brand-700));
    border: none;
    color: #fff;
    box-shadow: var(--sh-brand);
}
.btn-primary:hover, .btn-success:hover {
    background: linear-gradient(135deg, var(--brand-600), var(--brand-700));
    color: #fff;
    transform: translateY(-2px);
}

.btn-ghost {
    background: var(--surface);
    border-color: var(--line);
    color: var(--ink-700);
    box-shadow: var(--sh-1);
}
.btn-ghost:hover { border-color: var(--brand-100); color: var(--brand-700); background: var(--brand-50); }

.btn-outline-primary { border-color: var(--brand-100); color: var(--brand-700); background: var(--surface); }
.btn-outline-primary:hover { background: var(--brand-600); border-color: var(--brand-600); color: #fff; }

.btn-outline-secondary, .btn-secondary {
    border-color: var(--line);
    color: var(--ink-500);
    background: var(--surface);
}
.btn-outline-secondary:hover, .btn-secondary:hover {
    background: var(--ink-900);
    border-color: var(--ink-900);
    color: #fff;
}

.btn-light-brand { background: var(--brand-100); color: var(--brand-700); }
.btn-light-brand:hover { background: #ded9ff; color: var(--brand-700); }

/* -------------------------------------------------------------- карточки - */

.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    box-shadow: var(--sh-1);
    transition: box-shadow .24s ease, transform .24s ease, border-color .24s ease;
}
.card > .card-header {
    background: transparent;
    border-bottom: 1px solid var(--line);
    font-family: var(--ff-display);
    font-size: .96rem;
    font-weight: 500;
    padding: 1.05rem 1.35rem;
    color: var(--ink-900);
}
.card > .card-body { padding: 1.35rem; }
.shadow-sm { box-shadow: var(--sh-1) !important; }

/* --------------------------------------------------------------- чипы ---- */

.chip {
    display: inline-flex;
    align-items: center;
    gap: .38rem;
    padding: .28rem .72rem;
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .02em;
    background: var(--canvas);
    color: var(--ink-500);
    white-space: nowrap;
}
.chip-brand  { background: var(--brand-100); color: var(--brand-700); }
.chip-mint   { background: var(--mint-100);  color: #0a8a4f; }
.chip-amber  { background: var(--amber-100); color: #a86b00; }
.chip-sky    { background: var(--sky-100);   color: #0673a8; }
.chip-rose   { background: var(--rose-100);  color: #b3282c; }
.chip-ink    { background: var(--ink-900);   color: #fff; }

.badge {
    border-radius: 999px;
    font-weight: 700;
    font-size: .76rem;
    padding: .34rem .74rem;
    letter-spacing: .02em;
}
.bg-success-subtle { background: var(--mint-100) !important; color: #0a8a4f !important; }
.bg-primary-subtle { background: var(--brand-100) !important; color: var(--brand-700) !important; }

/* ------------------------------------------------------------- формы ---- */

.form-label {
    font-size: .84rem;
    font-weight: 700;
    color: var(--ink-500);
    letter-spacing: .04em;
    text-transform: uppercase;
    margin-bottom: .42rem;
}

.form-control, .form-select {
    border: 1.5px solid var(--line);
    border-radius: var(--r-sm);
    padding: .74rem .95rem;
    background: var(--surface);
    color: var(--ink-900);
    font-size: .98rem;
    transition: border-color .18s ease, box-shadow .18s ease;
}
.form-control::placeholder { color: var(--ink-300); }
.form-control:hover, .form-select:hover { border-color: #d5d9ea; }
.form-control:focus, .form-select:focus {
    border-color: var(--brand-500);
    box-shadow: 0 0 0 4px var(--brand-100);
    outline: none;
}

.input-search {
    border-radius: 999px;
    padding-left: 2.9rem;
    height: 3.15rem;
    font-size: 1rem;
    border-color: var(--line);
    box-shadow: var(--sh-2);
}
.input-wrap { position: relative; }
.input-wrap > .bi {
    position: absolute;
    left: 1.15rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--ink-300);
    font-size: 1.05rem;
    pointer-events: none;
}

.form-check-input {
    width: 1.25em;
    height: 1.25em;
    border: 1.5px solid #cfd5ea;
    margin-top: .12em;
}
.form-check-input:checked {
    background-color: var(--brand-600);
    border-color: var(--brand-600);
}
.form-check-input:focus { box-shadow: 0 0 0 4px var(--brand-100); border-color: var(--brand-500); }

/* ------------------------------------------------------ прогресс бары ---- */

.progress {
    background: #eceef8;
    border-radius: 999px;
    overflow: hidden;
}
.progress, .progress-thick { height: 10px; }
.progress-bar {
    background: linear-gradient(90deg, var(--mint-600), #4ad991);
    border-radius: 999px;
    transition: width .6s cubic-bezier(.22, 1, .36, 1);
}
.progress-bar-brand { background: linear-gradient(90deg, var(--brand-500), #a78bfa); }

/* ------------------------------------------------------------ навбар ---- */

.site-nav {
    position: sticky;
    top: 0;
    z-index: 1030;
    background: rgba(255, 255, 255, .82);
    backdrop-filter: saturate(180%) blur(16px);
    -webkit-backdrop-filter: saturate(180%) blur(16px);
    border-bottom: 1px solid rgba(230, 232, 242, .9);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: .7rem;
    font-family: var(--ff-display);
    font-weight: 600;
    font-size: 1.02rem;
    color: var(--ink-900);
    letter-spacing: -.03em;
}
.brand:hover { color: var(--ink-900); }
.brand-mark {
    width: 40px;
    height: 40px;
    border-radius: 13px;
    background: linear-gradient(140deg, var(--brand-500), var(--brand-700) 55%, #9b6bff);
    display: grid;
    place-items: center;
    color: #fff;
    font-size: 1.15rem;
    box-shadow: var(--sh-brand);
    flex: none;
}
.brand-sub {
    display: block;
    font-family: var(--ff-body);
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--ink-300);
    line-height: 1;
    margin-top: 3px;
}

.site-nav .nav-link {
    color: var(--ink-500);
    font-weight: 700;
    font-size: .93rem;
    padding: .5rem .95rem !important;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    transition: background-color .18s ease, color .18s ease;
}
.site-nav .nav-link:hover,
.site-nav .nav-link.is-active { background: var(--brand-50); color: var(--brand-700); }
.site-nav .nav-link.btn-logout { background: transparent; }
.site-nav .nav-link.btn-logout:hover { background: var(--rose-100); color: var(--rose-600); }

.avatar {
    width: 34px;
    height: 34px;
    border-radius: 11px;
    background: linear-gradient(140deg, #ffd79a, var(--amber-600));
    color: #5c3a00;
    display: grid;
    place-items: center;
    font-weight: 800;
    font-size: .86rem;
    flex: none;
}

/* --------------------------------------------------------------- hero ---- */

.hero {
    position: relative;
    overflow: hidden;
    border-radius: var(--r-xl);
    background:
        radial-gradient(1000px 420px at 88% -10%, rgba(154, 107, 255, .55), transparent 60%),
        radial-gradient(700px 360px at 8% 110%, rgba(11, 165, 236, .38), transparent 60%),
        linear-gradient(140deg, #17123f, var(--brand-700) 55%, #5b3fb0);
    color: #fff;
    padding: clamp(2rem, 5vw, 3.6rem);
    box-shadow: var(--sh-3);
}
.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, .06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .06) 1px, transparent 1px);
    background-size: 46px 46px;
    mask-image: radial-gradient(600px 300px at 75% 15%, #000, transparent 75%);
    -webkit-mask-image: radial-gradient(600px 300px at 75% 15%, #000, transparent 75%);
    pointer-events: none;
}
.hero > * { position: relative; z-index: 1; }
.hero h1 {
    color: #fff;
    font-size: clamp(1.75rem, 4.2vw, 2.85rem);
    margin-bottom: .85rem;
}
.hero p { color: rgba(255, 255, 255, .8); font-size: 1.06rem; max-width: 46ch; }
.hero .eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    background: rgba(255, 255, 255, .14);
    border: 1px solid rgba(255, 255, 255, .22);
    color: #fff;
    border-radius: 999px;
    padding: .35rem .9rem;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    margin-bottom: 1.15rem;
}
.hero-stats { display: flex; flex-wrap: wrap; gap: 2.2rem; margin-top: 2rem; }
.hero-stats b {
    display: block;
    font-family: var(--ff-display);
    font-size: 1.6rem;
    color: #fff;
    line-height: 1.1;
}
.hero-stats span { font-size: .84rem; color: rgba(255, 255, 255, .68); }

/* ----------------------------------------------------- карточка курса --- */

.course-card {
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: var(--r-lg);
}
.course-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--sh-3);
    border-color: var(--brand-100);
}

.cover {
    position: relative;
    height: 152px;
    display: grid;
    place-items: center;
    overflow: hidden;
    background: linear-gradient(140deg, var(--brand-500), var(--brand-700));
}
.cover::before {
    content: "";
    position: absolute;
    width: 190px;
    height: 190px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .13);
    top: -95px;
    right: -55px;
}
.cover::after {
    content: "";
    position: absolute;
    width: 130px;
    height: 130px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .09);
    bottom: -70px;
    left: -35px;
}
.cover > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cover-icon {
    position: relative;
    z-index: 1;
    font-size: 2.6rem;
    color: rgba(255, 255, 255, .92);
    filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .25));
}
.cover-c1 { background: linear-gradient(140deg, #6c5ce7, #4a3fd0); }
.cover-c2 { background: linear-gradient(140deg, #0ba5ec, #4a3fd0); }
.cover-c3 { background: linear-gradient(140deg, #f59f00, #e5484d); }
.cover-c4 { background: linear-gradient(140deg, #12b76a, #0ba5ec); }
.cover-c5 { background: linear-gradient(140deg, #a855f7, #6c5ce7); }
.cover-c6 { background: linear-gradient(140deg, #e5484d, #a855f7); }
.cover-tag {
    position: absolute;
    z-index: 2;
    top: .8rem;
    left: .8rem;
    background: rgba(11, 16, 32, .55);
    border: 1px solid rgba(255, 255, 255, .2);
    color: #fff;
    backdrop-filter: blur(6px);
    border-radius: 999px;
    padding: .22rem .7rem;
    font-size: .74rem;
    font-weight: 700;
    letter-spacing: .04em;
}

.course-card h3, .course-card .card-title {
    font-size: 1.08rem;
    font-weight: 600;
    margin-bottom: .5rem;
}
.course-card .excerpt {
    color: var(--ink-400);
    font-size: .92rem;
    flex-grow: 1;
}
.meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: .9rem;
    color: var(--ink-400);
    font-size: .84rem;
    font-weight: 600;
}
.meta-row i { color: var(--ink-300); margin-right: .28rem; }

.card-link-arrow {
    font-weight: 800;
    font-size: .9rem;
    color: var(--brand-700);
    display: inline-flex;
    align-items: center;
    gap: .4rem;
}
.card-link-arrow i { transition: transform .2s ease; }
.course-card:hover .card-link-arrow i { transform: translateX(4px); }

/* ---------------------------------------------------------- пустое поле -- */

.empty {
    text-align: center;
    padding: clamp(2.5rem, 6vw, 4.5rem) 1.5rem;
    background: var(--surface);
    border: 1px dashed #d8dcee;
    border-radius: var(--r-lg);
}
.empty-icon {
    width: 76px;
    height: 76px;
    border-radius: 24px;
    display: grid;
    place-items: center;
    margin: 0 auto 1.15rem;
    font-size: 2rem;
    background: var(--brand-50);
    color: var(--brand-600);
}

/* ------------------------------------------------------------- хлебные -*/

.breadcrumb {
    font-size: .86rem;
    font-weight: 600;
    margin-bottom: 1.1rem;
}
.breadcrumb-item + .breadcrumb-item::before { color: var(--ink-300); }
.breadcrumb-item a { color: var(--ink-400); }
.breadcrumb-item a:hover { color: var(--brand-700); }
.breadcrumb-item.active { color: var(--ink-900); }

/* ------------------------------------------------------ страница курса -- */

.page-hero {
    position: relative;
    border-radius: var(--r-xl);
    overflow: hidden;
    background: linear-gradient(140deg, #17123f, var(--brand-700));
    color: #fff;
    padding: clamp(1.8rem, 4vw, 3rem);
    margin-bottom: 1.75rem;
}
.page-hero h1 { color: #fff; font-size: clamp(1.5rem, 3.4vw, 2.2rem); }
.page-hero .meta-row { color: rgba(255, 255, 255, .78); margin-top: .9rem; }
.page-hero .meta-row i { color: rgba(255, 255, 255, .6); }

.sticky-side { position: sticky; top: 92px; }

/* программа курса */
.syllabus { overflow: hidden; }
.syllabus .module-head {
    display: flex;
    align-items: center;
    gap: .9rem;
    padding: 1.1rem 1.35rem;
    background: linear-gradient(90deg, var(--brand-50), transparent);
    border-bottom: 1px solid var(--line);
}
.module-index {
    width: 34px;
    height: 34px;
    flex: none;
    border-radius: 11px;
    background: var(--brand-600);
    color: #fff;
    display: grid;
    place-items: center;
    font-family: var(--ff-display);
    font-size: .86rem;
}
.syllabus .list-group-item {
    border: 0;
    border-bottom: 1px solid var(--line);
    padding: .95rem 1.35rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: background-color .16s ease;
}
.syllabus .list-group-item:last-child { border-bottom: 0; }
.syllabus .list-group-item:hover { background: var(--brand-50); }

.state-dot {
    width: 26px;
    height: 26px;
    flex: none;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: .82rem;
    background: #eceef8;
    color: var(--ink-300);
}
.state-dot.is-done { background: var(--mint-100); color: var(--mint-600); }

/* -------------------------------------------------------------- урок ---- */

.reader { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 1.75rem; align-items: start; }
@media (max-width: 991.98px) { .reader { grid-template-columns: minmax(0, 1fr); } }

.toc { padding: .5rem; }
.toc-title {
    font-family: var(--ff-display);
    font-size: .8rem;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--ink-300);
    padding: .8rem .85rem .5rem;
}
.toc a {
    display: flex;
    align-items: center;
    gap: .7rem;
    padding: .62rem .7rem;
    border-radius: var(--r-sm);
    color: var(--ink-500);
    font-size: .9rem;
    font-weight: 600;
    line-height: 1.35;
    transition: background-color .16s ease, color .16s ease;
}
.toc a:hover { background: var(--brand-50); color: var(--brand-700); }
.toc a.is-current { background: var(--brand-600); color: #fff; box-shadow: var(--sh-brand); }
.toc a.is-current .toc-num { background: rgba(255, 255, 255, .22); color: #fff; }
.toc-num {
    width: 22px;
    height: 22px;
    flex: none;
    border-radius: 7px;
    background: #eceef8;
    color: var(--ink-400);
    display: grid;
    place-items: center;
    font-size: .72rem;
    font-weight: 800;
}
.toc a.is-done .toc-num { background: var(--mint-100); color: var(--mint-600); }

.lesson-body {
    font-size: 1.06rem;
    line-height: 1.8;
    color: var(--ink-700);
}
.lesson-body h1, .lesson-body h2, .lesson-body h3, .lesson-body h4 {
    margin: 1.9rem 0 .7rem;
    font-size: 1.28rem;
}
.lesson-body h2::after {
    content: "";
    display: block;
    width: 42px;
    height: 3px;
    border-radius: 2px;
    background: var(--brand-100);
    margin-top: .55rem;
}
.lesson-body p { margin-bottom: 1.05rem; }
.lesson-body ul, .lesson-body ol { margin-bottom: 1.15rem; padding-left: 1.35rem; }
.lesson-body li { margin-bottom: .45rem; }
.lesson-body img { border-radius: var(--r-md); margin: 1rem 0; }
.lesson-body blockquote {
    margin: 1.3rem 0;
    padding: 1rem 1.2rem;
    border-left: 4px solid var(--brand-500);
    background: var(--brand-50);
    border-radius: 0 var(--r-md) var(--r-md) 0;
    color: var(--ink-700);
}
.lesson-body pre {
    background: var(--ink-900);
    color: #e7e9ff;
    padding: 1.1rem 1.25rem;
    border-radius: var(--r-md);
    overflow-x: auto;
    font-size: .9rem;
}
.lesson-body code { color: var(--brand-700); background: var(--brand-50); padding: .12rem .38rem; border-radius: 6px; }
.lesson-body pre code { background: transparent; color: inherit; padding: 0; }
.lesson-body table { width: 100%; margin: 1.2rem 0; border-collapse: collapse; font-size: .95rem; }
.lesson-body th, .lesson-body td { border: 1px solid var(--line); padding: .6rem .75rem; text-align: left; }
.lesson-body th { background: var(--canvas); font-weight: 800; }

.video-frame {
    border-radius: var(--r-lg);
    overflow: hidden;
    box-shadow: var(--sh-3);
    border: 1px solid var(--line);
    background: var(--ink-900);
}

.lesson-nav-card {
    display: flex;
    align-items: center;
    gap: .9rem;
    padding: 1rem 1.15rem;
    border-radius: var(--r-md);
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--ink-700);
    flex: 1;
    min-width: 0;
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.lesson-nav-card:hover { border-color: var(--brand-100); box-shadow: var(--sh-2); transform: translateY(-2px); color: var(--ink-900); }
.lesson-nav-card .lbl { font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-300); font-weight: 800; }
.lesson-nav-card .ttl { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lesson-nav-card.is-next { text-align: right; }

.done-banner {
    display: flex;
    align-items: center;
    gap: .85rem;
    padding: 1.05rem 1.3rem;
    border-radius: var(--r-md);
    background: var(--mint-100);
    color: #0a8a4f;
    font-weight: 800;
}

/* -------------------------------------------------------------- тест ---- */

.quiz-head {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 1.4rem;
    border-bottom: 1px solid var(--line);
}
.quiz-head-icon {
    width: 46px;
    height: 46px;
    flex: none;
    border-radius: 15px;
    display: grid;
    place-items: center;
    font-size: 1.35rem;
    background: var(--brand-100);
    color: var(--brand-700);
}
.question-card { margin-bottom: 1rem; overflow: hidden; }
.question-card .q-head {
    display: flex;
    gap: .9rem;
    align-items: flex-start;
    padding: 1.15rem 1.3rem;
    background: var(--canvas);
    border-bottom: 1px solid var(--line);
}
.q-num {
    width: 30px;
    height: 30px;
    flex: none;
    border-radius: 10px;
    background: var(--ink-900);
    color: #fff;
    display: grid;
    place-items: center;
    font-family: var(--ff-display);
    font-size: .8rem;
}
.q-text { font-weight: 700; color: var(--ink-900); font-size: 1.02rem; }

.answer {
    display: flex;
    align-items: center;
    gap: .85rem;
    padding: .85rem 1rem;
    margin-bottom: .55rem;
    border: 1.5px solid var(--line);
    border-radius: var(--r-sm);
    cursor: pointer;
    transition: border-color .16s ease, background-color .16s ease;
    font-weight: 600;
}
.answer:hover { border-color: var(--brand-100); background: var(--brand-50); }
.answer:has(input:checked) { border-color: var(--brand-600); background: var(--brand-50); }
.answer:has(input:checked) .answer-key { background: var(--brand-600); color: #fff; border-color: var(--brand-600); }
.answer-key {
    width: 26px;
    height: 26px;
    flex: none;
    border-radius: 8px;
    border: 1.5px solid #d5d9ea;
    display: grid;
    place-items: center;
    font-size: .76rem;
    font-weight: 800;
    color: var(--ink-400);
    background: #fff;
    transition: all .16s ease;
}
.answer input { position: absolute; opacity: 0; pointer-events: none; }
.answer.is-correct { border-color: var(--mint-600); background: var(--mint-100); }
.answer.is-correct .answer-key { background: var(--mint-600); border-color: var(--mint-600); color: #fff; }
.answer.is-wrong { border-color: var(--rose-600); background: var(--rose-100); }
.answer.is-wrong .answer-key { background: var(--rose-600); border-color: var(--rose-600); color: #fff; }

/* круговой индикатор результата */
.score-ring { position: relative; width: 176px; height: 176px; margin: 0 auto; }
.score-ring svg { transform: rotate(-90deg); display: block; }
.score-ring .ring-bg { fill: none; stroke: #eceef8; stroke-width: 13; }
.score-ring .ring-fg { fill: none; stroke-width: 13; stroke-linecap: round; transition: stroke-dashoffset 1s cubic-bezier(.22, 1, .36, 1); }
.score-ring .ring-val {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    font-family: var(--ff-display);
    font-size: 2.1rem;
    font-weight: 600;
    color: var(--ink-900);
}

/* ---------------------------------------------------------- авторизация */

.auth-shell {
    display: grid;
    place-items: center;
    padding: clamp(1.5rem, 5vw, 4rem) 0;
}
.auth-card {
    width: 100%;
    max-width: 440px;
    border-radius: var(--r-xl);
    box-shadow: var(--sh-3);
    border: 1px solid var(--line);
    overflow: hidden;
}
.auth-card .card-body { padding: clamp(1.6rem, 4vw, 2.4rem); }
.auth-top { text-align: center; margin-bottom: 1.6rem; }
.auth-top h1 { font-size: 1.45rem; margin-bottom: .3rem; }
.auth-top p { color: var(--ink-400); font-size: .95rem; margin: 0; }
.auth-foot {
    text-align: center;
    padding: 1rem 1.4rem;
    background: var(--canvas);
    border-top: 1px solid var(--line);
    font-size: .92rem;
    color: var(--ink-400);
    font-weight: 600;
}

/* ------------------------------------------------------------ статистика */

.stat {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.15rem 1.25rem;
    border-radius: var(--r-md);
    background: var(--surface);
    border: 1px solid var(--line);
    box-shadow: var(--sh-1);
    height: 100%;
}
.stat-icon {
    width: 44px;
    height: 44px;
    flex: none;
    border-radius: 14px;
    display: grid;
    place-items: center;
    font-size: 1.2rem;
    background: var(--brand-50);
    color: var(--brand-600);
}
.stat-icon.mint { background: var(--mint-100); color: var(--mint-600); }
.stat-icon.amber { background: var(--amber-100); color: #a86b00; }
.stat-icon.sky { background: var(--sky-100); color: var(--sky-600); }
.stat b { display: block; font-family: var(--ff-display); font-size: 1.5rem; line-height: 1.1; color: var(--ink-900); }
.stat span { font-size: .84rem; color: var(--ink-400); font-weight: 600; }

/* --------------------------------------------------------------- флэши -- */

.flash-stack { position: fixed; top: 84px; left: 50%; transform: translateX(-50%); z-index: 1080; width: min(560px, calc(100% - 2rem)); }
.flash {
    display: flex;
    align-items: center;
    gap: .8rem;
    padding: .9rem 1.1rem;
    border-radius: var(--r-md);
    background: var(--surface);
    box-shadow: var(--sh-3);
    border: 1px solid var(--line);
    border-left-width: 4px;
    font-weight: 600;
    margin-bottom: .6rem;
    animation: flash-in .35s cubic-bezier(.22, 1, .36, 1);
}
.flash.success, .flash.info { border-left-color: var(--brand-500); }
.flash.success { border-left-color: var(--mint-600); }
.flash.danger { border-left-color: var(--rose-600); }
.flash.warning { border-left-color: var(--amber-600); }
.flash > i { font-size: 1.15rem; }
.flash.success > i { color: var(--mint-600); }
.flash.info > i { color: var(--brand-600); }
.flash.danger > i { color: var(--rose-600); }
.flash.warning > i { color: var(--amber-600); }
@keyframes flash-in { from { opacity: 0; transform: translateY(-14px); } to { opacity: 1; transform: none; } }

/* -------------------------------------------------------------- футер --- */

.site-footer {
    background: var(--ink-900);
    color: rgba(255, 255, 255, .66);
    padding: 3rem 0 1.6rem;
    margin-top: 4rem;
}
.site-footer h4 {
    color: #fff;
    font-size: .78rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    font-family: var(--ff-body);
    font-weight: 800;
    margin-bottom: 1rem;
}
.site-footer a { color: rgba(255, 255, 255, .66); font-size: .92rem; }
.site-footer a:hover { color: #fff; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: .5rem; }
.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, .1);
    margin-top: 2.2rem;
    padding-top: 1.4rem;
    font-size: .84rem;
    color: rgba(255, 255, 255, .45);
}

/* ------------------------------------------------------------ пагинация */

.pagination { gap: .3rem; justify-content: center; }
.page-link {
    border: 1px solid var(--line);
    border-radius: 12px !important;
    color: var(--ink-500);
    font-weight: 700;
    min-width: 42px;
    text-align: center;
    background: var(--surface);
    transition: all .16s ease;
}
.page-link:hover { background: var(--brand-50); border-color: var(--brand-100); color: var(--brand-700); }
.page-item.active .page-link {
    background: linear-gradient(135deg, var(--brand-500), var(--brand-700));
    border-color: transparent;
    color: #fff;
    box-shadow: var(--sh-brand);
}
.page-item.disabled .page-link { opacity: .45; }

/* --------------------------------------------------------- утилиты ------ */

.divider { height: 1px; background: var(--line); border: 0; opacity: 1; margin: 1.6rem 0; }
.section-title { font-size: 1.22rem; margin-bottom: 1rem; }
.eyebrow-label {
    font-size: .74rem;
    font-weight: 800;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--ink-300);
    margin-bottom: .5rem;
}
.rise { animation: rise .5s cubic-bezier(.22, 1, .36, 1) both; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.rise-2 { animation-delay: .06s; }
.rise-3 { animation-delay: .12s; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
