:root {
    --primary: #5362e8;
    --primary-dark: #414fd0;
    --primary-light: #eef0ff;

    --navy: #111b55;
    --navy-soft: #293268;

    --text: #30354c;
    --muted: #6f7488;

    --white: #ffffff;
    --border: rgba(17, 27, 85, 0.10);

    --peach: #fff1dc;
    --pink: #ffe9eb;
    --yellow: #fffbd6;
    --lavender: #e9ebff;
    --mint: #eafaf1;

    --shadow:
        0 18px 50px rgba(17, 27, 85, 0.10);

    --small-shadow:
        0 10px 25px rgba(17, 27, 85, 0.08);

    --radius-large: 30px;
    --radius-medium: 20px;
    --radius-small: 12px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-width: 320px;

    font-family:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Arial,
        sans-serif;

    color: var(--text);
    background: var(--white);
    line-height: 1.55;
}

button,
input,
select,
textarea {
    font: inherit;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    display: block;
    max-width: 100%;
}

.container {
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
}

/* ------------------------------
   Шапка
------------------------------ */

.site-header {
    position: relative;
    z-index: 30;

    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid var(--border);
}

.header-inner {
    min-height: 72px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.brand-icon {
    width: 38px;
    height: 38px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    font-size: 21px;

    background: var(--primary-light);
    border-radius: 12px;
}

.brand-text {
    display: flex;
    flex-direction: column;

    color: var(--navy);
    font-size: 15px;
    line-height: 1;
}

.brand-text strong {
    font-size: 18px;
}

.brand-text span {
    margin-top: 2px;
    font-weight: 700;
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 34px;

    color: var(--navy);
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
}

.header-nav a,
.header-link {
    transition:
        color 0.2s ease,
        opacity 0.2s ease;
}

.header-nav a:hover,
.header-link:hover {
    color: var(--primary);
}

.header-link {
    padding: 11px 18px;

    color: var(--white);
    background: var(--primary);
    border-radius: 7px;

    font-size: 13px;
    font-weight: 800;
}

/* ------------------------------
   Главный экран
------------------------------ */

.hero {
    position: relative;
    overflow: hidden;

    background:
        radial-gradient(
            circle at 16% 85%,
            rgba(255, 196, 205, 0.55),
            transparent 28%
        ),
        radial-gradient(
            circle at 50% 15%,
            rgba(255, 248, 177, 0.56),
            transparent 30%
        ),
        radial-gradient(
            circle at 90% 55%,
            rgba(194, 202, 255, 0.70),
            transparent 35%
        ),
        linear-gradient(
            110deg,
            #fff4df 0%,
            #fffce6 43%,
            #eef0ff 100%
        );
}

.hero::after {
    content: "";

    position: absolute;
    right: -180px;
    bottom: -240px;

    width: 620px;
    height: 620px;

    border-radius: 50%;

    background:
        rgba(255, 255, 255, 0.27);
}

.hero-grid {
    position: relative;
    z-index: 2;

    min-height: 610px;

    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    align-items: center;
    gap: 50px;

    padding-top: 55px;
}

.hero-content {
    max-width: 660px;
    padding: 40px 0 110px;
}

.hero-badge {
    display: inline-flex;

    margin-bottom: 22px;
    padding: 8px 14px;

    color: var(--primary-dark);
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(83, 98, 232, 0.15);
    border-radius: 999px;

    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.hero h1 {
    max-width: 710px;
    margin: 0;

    color: var(--navy);

    font-size: clamp(42px, 5vw, 70px);
    line-height: 1.05;
    letter-spacing: -0.035em;
}

.hero h1 span {
    display: block;
    color: var(--primary);
}

.hero-lead {
    max-width: 610px;
    margin: 27px 0 0;

    color: var(--navy-soft);
    font-size: 20px;
    line-height: 1.55;
}

.hero-time {
    max-width: 570px;
    margin: 15px 0 0;

    color: var(--muted);
    font-size: 16px;
}

.start-form {
    margin-top: 32px;
}

.primary-button {
    min-height: 58px;
    padding: 0 28px;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 14px;

    color: var(--white);
    background: var(--primary);

    border: 0;
    border-radius: 10px;

    box-shadow:
        0 16px 30px rgba(83, 98, 232, 0.30);

    cursor: pointer;

    font-weight: 800;

    transition:
        transform 0.2s ease,
        background 0.2s ease,
        box-shadow 0.2s ease;
}

.primary-button:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);

    box-shadow:
        0 20px 35px rgba(83, 98, 232, 0.34);
}

.primary-button:active {
    transform: translateY(0);
}

.primary-button span {
    font-size: 20px;
}

.hero-note {
    margin-top: 13px;

    color: var(--muted);
    font-size: 13px;
}

.hero-note::before {
    content: "✓";

    margin-right: 7px;

    color: var(--primary);
    font-weight: 900;
}

/* ------------------------------
   Изображение Ирины
------------------------------ */

.hero-image-wrap {
    position: relative;

    min-height: 550px;

    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.image-glow {
    position: absolute;
    left: 50%;
    bottom: 40px;

    width: 440px;
    height: 440px;

    transform: translateX(-50%);
    border-radius: 50%;

    background:
        radial-gradient(
            circle,
            rgba(255, 255, 255, 0.95) 0%,
            rgba(255, 255, 255, 0.32) 60%,
            transparent 72%
        );
}

.hero-image {
    position: relative;
    z-index: 2;

    max-height: 540px;
    width: auto;

    object-fit: contain;

    filter:
        drop-shadow(
            0 30px 28px rgba(17, 27, 85, 0.16)
        );
}

.teacher-card {
    position: absolute;
    z-index: 4;
    right: 0;
    bottom: 84px;

    min-width: 235px;
    padding: 17px 19px;

    display: flex;
    flex-direction: column;

    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.80);
    border-radius: 16px;

    box-shadow: var(--small-shadow);
    backdrop-filter: blur(12px);
}

.teacher-card strong {
    color: var(--navy);
    font-size: 15px;
}

.teacher-card span {
    margin-top: 3px;

    color: var(--muted);
    font-size: 12px;
}

/* ------------------------------
   Декоративные элементы
------------------------------ */

.hero-decoration {
    position: absolute;
    z-index: 1;
}

.hero-dot {
    top: 165px;
    left: 4.5%;

    width: 17px;
    height: 17px;

    border-radius: 50%;
    background: #ff6969;
}

.hero-line {
    top: 80px;
    left: 58%;

    width: 75px;
    height: 75px;

    border-top: 4px solid #f1c400;
    border-right: 4px solid #f1c400;
    border-radius: 50%;

    transform: rotate(35deg);
}

/* ------------------------------
   Карточки преимуществ
------------------------------ */

.features-section {
    position: relative;
    z-index: 10;

    margin-top: -65px;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}

.feature-card {
    min-height: 110px;
    padding: 22px;

    display: flex;
    align-items: flex-start;
    gap: 15px;

    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 18px;

    box-shadow: var(--small-shadow);
}

.feature-icon {
    flex: 0 0 46px;

    width: 46px;
    height: 46px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    font-weight: 900;
    font-size: 15px;
}

.feature-icon-red {
    color: #e35a5a;
    background: #fff0f0;
}

.feature-icon-purple {
    color: var(--primary);
    background: #eff0ff;
}

.feature-icon-pink {
    color: #c04c91;
    background: #fff0fa;
}

.feature-icon-blue {
    color: #2889ae;
    background: #edfaff;
}

.feature-card strong {
    display: block;

    margin-bottom: 5px;

    color: var(--navy);
    font-size: 17px;
}

.feature-card span {
    display: block;

    color: var(--muted);
    font-size: 13px;
    line-height: 1.45;
}

/* ------------------------------
   Инструкция
------------------------------ */

.explanation-section {
    margin-top: 70px;
    padding: 85px 0;

    background:
        linear-gradient(
            105deg,
            rgba(233, 250, 241, 0.72),
            rgba(242, 239, 255, 0.75),
            rgba(255, 240, 226, 0.75)
        );
}

.explanation-inner {
    max-width: 1050px;
}

.explanation-heading {
    text-align: center;
}

.small-label {
    color: var(--primary);

    font-size: 13px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.explanation-heading h2 {
    margin: 12px 0 0;

    color: var(--navy);

    font-size: clamp(30px, 4vw, 43px);
    line-height: 1.15;
}

.rules-grid {
    margin-top: 45px;

    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.rule-item {
    padding: 28px;

    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.86);
    border-radius: var(--radius-medium);

    box-shadow: var(--small-shadow);
}

.rule-number {
    width: 39px;
    height: 39px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    color: var(--white);
    background: var(--primary);
    border-radius: 50%;

    font-weight: 900;
}

.rule-item p {
    margin: 18px 0 0;

    color: var(--navy-soft);
    font-size: 15px;
}

.test-disclaimer {
    max-width: 780px;
    margin: 35px auto 0;

    color: var(--muted);
    text-align: center;
    font-size: 13px;
}

/* ------------------------------
   Подвал
------------------------------ */

.site-footer {
    padding: 28px 0;

    color: var(--muted);
    background: var(--white);
    border-top: 1px solid var(--border);

    font-size: 13px;
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 25px;
}

.footer-inner a:hover {
    color: var(--primary);
}

/* ------------------------------
   Адаптация
------------------------------ */

@media (max-width: 1050px) {
    .header-nav {
        display: none;
    }

    .hero-grid {
        grid-template-columns: 1fr 0.80fr;
        gap: 15px;
    }

    .feature-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .teacher-card {
        right: 10px;
    }
}

@media (max-width: 820px) {
    .hero-grid {
        min-height: auto;
        grid-template-columns: 1fr;
    }

    .hero-content {
        padding: 70px 0 20px;
        text-align: center;
    }

    .hero-lead,
    .hero-time {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-image-wrap {
        min-height: 430px;
    }

    .hero-image {
        max-height: 420px;
    }

    .teacher-card {
        right: 10%;
        bottom: 45px;
    }

    .features-section {
        margin-top: 0;
        padding-top: 25px;
    }

    .rules-grid {
        grid-template-columns: 1fr;
    }

    .footer-inner {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 560px) {
    .container {
        width: min(100% - 28px, 1180px);
    }

    .site-header {
        position: static;
    }

    .header-inner {
        min-height: 64px;
    }

    .header-link {
        padding: 9px 12px;
        font-size: 11px;
    }

    .brand-icon {
        width: 34px;
        height: 34px;
    }

    .brand-text strong {
        font-size: 15px;
    }

    .hero-content {
        padding-top: 48px;
    }

    .hero h1 {
        font-size: 40px;
    }

    .hero-lead {
        font-size: 17px;
    }

    .primary-button {
        width: 100%;
    }

    .hero-image-wrap {
        min-height: 350px;
    }

    .hero-image {
        max-height: 350px;
    }

    .teacher-card {
        right: 0;
        bottom: 25px;

        min-width: 210px;
    }

    .feature-grid {
        grid-template-columns: 1fr;
    }

    .feature-card {
        min-height: auto;
    }

    .explanation-section {
        margin-top: 45px;
        padding: 60px 0;
    }

    .rule-item {
        padding: 23px;
    }
}
/* ==========================================================
   Страница прохождения теста
========================================================== */

.visually-hidden {
    position: absolute;

    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;

    overflow: hidden;
    clip: rect(0, 0, 0, 0);

    white-space: nowrap;
    border: 0;
}

.test-page {
    min-height: 100vh;

    color: var(--navy);

    background:
        radial-gradient(
            circle at 9% 86%,
            rgba(255, 205, 211, 0.72),
            transparent 28%
        ),
        radial-gradient(
            circle at 53% 12%,
            rgba(255, 249, 190, 0.68),
            transparent 31%
        ),
        radial-gradient(
            circle at 96% 62%,
            rgba(208, 212, 255, 0.75),
            transparent 35%
        ),
        linear-gradient(
            120deg,
            #fff6e6 0%,
            #fffde9 45%,
            #eff1ff 100%
        );
}

.test-header {
    position: relative;
    z-index: 50;

    background: rgba(255, 255, 255, 0.91);
    border-bottom: 1px solid var(--border);

    backdrop-filter: blur(14px);
}

.test-header-inner {
    min-height: 72px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 25px;
}

.test-header-status {
    color: var(--navy-soft);

    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.test-exit-link {
    padding: 9px 15px;

    color: var(--muted);

    border: 1px solid var(--border);
    border-radius: 9px;

    font-size: 13px;
    font-weight: 700;

    transition:
        color 0.2s ease,
        background 0.2s ease,
        border-color 0.2s ease;
}

.test-exit-link:hover {
    color: var(--primary);
    background: var(--white);
    border-color: rgba(83, 98, 232, 0.30);
}

.test-main {
    position: relative;
    overflow: hidden;

    min-height: calc(100vh - 72px);
    padding: 55px 0 60px;
}

.test-container {
    position: relative;
    z-index: 5;

    max-width: 1100px;
}

.test-background-shape {
    position: absolute;

    border-radius: 50%;

    pointer-events: none;
}

.test-shape-one {
    top: 85px;
    left: 5%;

    width: 18px;
    height: 18px;

    background: #ff7373;
}

.test-shape-two {
    top: 55px;
    right: 8%;

    width: 80px;
    height: 80px;

    border: 4px solid rgba(242, 190, 0, 0.78);
    border-left-color: transparent;
    border-bottom-color: transparent;

    transform: rotate(20deg);
}

.test-shape-three {
    right: -150px;
    bottom: -190px;

    width: 460px;
    height: 460px;

    background: rgba(255, 255, 255, 0.23);
}

/* Прогресс */

.test-progress-section {
    margin-bottom: 28px;
    padding: 20px 24px;

    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.86);
    border-radius: 18px;

    box-shadow: var(--small-shadow);
    backdrop-filter: blur(12px);
}

.progress-info {
    margin-bottom: 13px;

    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
}

.progress-info > div:first-child {
    display: flex;
    flex-direction: column;
}

.progress-label {
    margin-bottom: 2px;

    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.progress-info strong {
    color: var(--navy);
    font-size: 16px;
}

.progress-percent {
    color: var(--primary);
    font-size: 18px;
    font-weight: 900;
}

.progress-track {
    height: 9px;

    overflow: hidden;

    background: rgba(83, 98, 232, 0.11);
    border-radius: 999px;
}

.progress-bar {
    height: 100%;

    background:
        linear-gradient(
            90deg,
            var(--primary),
            #767ff1
        );

    border-radius: inherit;

    transition: width 0.35s ease;
}

/* Основная сетка */

.question-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 260px;
    align-items: start;
    gap: 25px;
}

.question-card {
    min-height: 510px;
    padding: 38px;

    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(255, 255, 255, 0.90);
    border-radius: 28px;

    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
}

.question-card-top {
    display: flex;
    align-items: center;
    gap: 15px;
}

.question-number-badge {
    flex: 0 0 48px;

    width: 48px;
    height: 48px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    color: var(--white);

    background:
        linear-gradient(
            145deg,
            var(--primary),
            #7982ef
        );

    border-radius: 15px;

    box-shadow:
        0 12px 24px rgba(83, 98, 232, 0.25);

    font-size: 17px;
    font-weight: 900;
}

.question-heading {
    display: flex;
    flex-direction: column;
}

.question-category {
    color: var(--primary);

    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.question-instruction {
    margin: 3px 0 0;

    color: var(--muted);
    font-size: 14px;
}

.question-text {
    margin: 30px 0 29px;

    color: var(--navy);

    font-size: clamp(25px, 3vw, 35px);
    line-height: 1.27;
    letter-spacing: -0.02em;
}

.answer-fieldset {
    padding: 0;
    margin: 0;

    border: 0;
}

.answer-options {
    display: grid;
    gap: 13px;
}

.answer-option {
    position: relative;

    min-height: 70px;
    padding: 13px 54px 13px 14px;

    display: grid;
    grid-template-columns: 45px minmax(0, 1fr);
    align-items: center;
    gap: 14px;

    color: var(--navy-soft);
    background: #fafaff;

    border: 2px solid rgba(17, 27, 85, 0.08);
    border-radius: 16px;

    cursor: pointer;

    transition:
        transform 0.18s ease,
        border-color 0.18s ease,
        background 0.18s ease,
        box-shadow 0.18s ease;
}

.answer-option:hover {
    transform: translateY(-1px);

    background: var(--white);
    border-color: rgba(83, 98, 232, 0.28);

    box-shadow:
        0 10px 24px rgba(17, 27, 85, 0.07);
}

.answer-radio {
    position: absolute;

    width: 1px;
    height: 1px;

    opacity: 0;
    pointer-events: none;
}

.answer-letter {
    width: 43px;
    height: 43px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    color: var(--primary);
    background: var(--primary-light);

    border-radius: 12px;

    font-size: 14px;
    font-weight: 900;

    transition:
        color 0.18s ease,
        background 0.18s ease;
}

.answer-text {
    font-size: 16px;
    font-weight: 650;
    line-height: 1.4;
}

.answer-check {
    position: absolute;
    top: 50%;
    right: 20px;

    width: 27px;
    height: 27px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    color: var(--white);
    background: var(--primary);

    border-radius: 50%;

    opacity: 0;
    transform:
        translateY(-50%)
        scale(0.55);

    transition:
        opacity 0.18s ease,
        transform 0.18s ease;
}

.answer-option.is-selected {
    color: var(--navy);

    background: #f4f5ff;
    border-color: var(--primary);

    box-shadow:
        0 12px 28px rgba(83, 98, 232, 0.12);
}

.answer-option.is-selected .answer-letter {
    color: var(--white);
    background: var(--primary);
}

.answer-option.is-selected .answer-check {
    opacity: 1;

    transform:
        translateY(-50%)
        scale(1);
}

.answer-radio:focus-visible + .answer-letter {
    outline: 3px solid rgba(83, 98, 232, 0.23);
    outline-offset: 3px;
}

/* Кнопка */

.question-actions {
    margin-top: 29px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.answer-message {
    color: var(--muted);
    font-size: 13px;
}

.answer-message.is-ready {
    color: var(--primary);
    font-weight: 700;
}

.question-submit {
    min-width: 205px;
}

.question-submit:disabled {
    color: rgba(255, 255, 255, 0.72);
    background: #aeb4e9;

    box-shadow: none;

    cursor: not-allowed;
    transform: none;
}

/* Правая колонка */

.test-sidebar {
    display: grid;
    gap: 16px;
}

.sidebar-card {
    padding: 21px;

    background: rgba(255, 255, 255, 0.83);
    border: 1px solid rgba(255, 255, 255, 0.90);
    border-radius: 19px;

    box-shadow: var(--small-shadow);
    backdrop-filter: blur(13px);
}

.sidebar-icon {
    width: 42px;
    height: 42px;

    margin-bottom: 14px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    background: #fff8d7;
    border-radius: 13px;

    font-size: 20px;
}

.sidebar-main-card strong {
    display: block;

    color: var(--navy);
    font-size: 15px;
}

.sidebar-main-card p {
    margin: 9px 0 0;

    color: var(--muted);
    font-size: 13px;
    line-height: 1.55;
}

.sidebar-stat-card {
    text-align: center;
}

.sidebar-small-label {
    display: block;

    color: var(--muted);
    font-size: 12px;
}

.remaining-number {
    display: block;

    margin: 3px 0 -2px;

    color: var(--primary);
    font-size: 42px;
    line-height: 1;
}

.sidebar-stat-card > span:last-child {
    color: var(--navy-soft);
    font-size: 13px;
    font-weight: 700;
}

.sidebar-teacher-card {
    display: flex;
    align-items: center;
    gap: 12px;
}

.teacher-mini-avatar {
    flex: 0 0 43px;

    width: 43px;
    height: 43px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    color: var(--white);

    background:
        linear-gradient(
            145deg,
            var(--primary),
            #7780ef
        );

    border-radius: 50%;

    font-size: 12px;
    font-weight: 900;
}

.sidebar-teacher-card strong {
    display: block;

    color: var(--navy);
    font-size: 13px;
}

.sidebar-teacher-card span {
    display: block;

    margin-top: 2px;

    color: var(--muted);
    font-size: 10px;
    line-height: 1.35;
}

.test-bottom-note {
    max-width: 720px;
    margin: 29px auto 0;

    color: var(--muted);
    text-align: center;
    font-size: 12px;
}

/* Адаптация страницы теста */

@media (max-width: 900px) {
    .question-layout {
        grid-template-columns: 1fr;
    }

    .test-sidebar {
        grid-template-columns: repeat(3, 1fr);
    }

    .sidebar-card {
        min-height: 160px;
    }
}

@media (max-width: 650px) {
    .test-header-status {
        display: none;
    }

    .test-main {
        padding-top: 25px;
    }

    .test-progress-section {
        padding: 17px;
    }

    .question-card {
        min-height: 0;
        padding: 25px 18px;

        border-radius: 22px;
    }

    .question-number-badge {
        flex-basis: 43px;

        width: 43px;
        height: 43px;
    }

    .question-text {
        margin-top: 25px;
        font-size: 25px;
    }

    .answer-option {
        min-height: 65px;

        grid-template-columns: 40px minmax(0, 1fr);

        padding-left: 11px;
        padding-right: 46px;
    }

    .answer-letter {
        width: 39px;
        height: 39px;
    }

    .answer-text {
        font-size: 15px;
    }

    .answer-check {
        right: 13px;
    }

    .question-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .answer-message {
        text-align: center;
    }

    .question-submit {
        width: 100%;
    }

    .test-sidebar {
        grid-template-columns: 1fr;
    }

    .sidebar-card {
        min-height: auto;
    }
}

/* ==========================================================
   Страница результата
========================================================== */

.result-page {
    min-height: 100vh;

    color: var(--navy);

    background:
        radial-gradient(
            circle at 8% 30%,
            rgba(255, 205, 211, 0.58),
            transparent 27%
        ),
        radial-gradient(
            circle at 52% 5%,
            rgba(255, 249, 190, 0.70),
            transparent 30%
        ),
        radial-gradient(
            circle at 96% 40%,
            rgba(208, 212, 255, 0.72),
            transparent 34%
        ),
        linear-gradient(
            120deg,
            #fff6e6 0%,
            #fffde9 45%,
            #eff1ff 100%
        );
}

.result-main {
    position: relative;
    overflow: hidden;

    padding: 60px 0 70px;
}

.result-container {
    position: relative;
    z-index: 3;

    max-width: 1100px;
}

.result-decoration {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.result-decoration-one {
    top: 100px;
    left: 4%;

    width: 18px;
    height: 18px;

    background: #ff7373;
}

.result-decoration-two {
    right: -170px;
    bottom: 120px;

    width: 480px;
    height: 480px;

    background: rgba(255, 255, 255, 0.24);
}

/* Главный блок результата */

.result-hero {
    padding: 50px;

    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    align-items: center;
    gap: 55px;

    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.95);
    border-radius: 30px;

    box-shadow: var(--shadow);
    backdrop-filter: blur(15px);
}

.result-badge {
    display: inline-flex;

    padding: 8px 14px;
    margin-bottom: 18px;

    color: var(--primary);
    background: var(--primary-light);
    border-radius: 999px;

    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.07em;
}

.result-pretitle {
    margin: 0 0 7px;

    color: var(--muted);
    font-size: 15px;
}

.result-content h1 {
    margin: 0;

    color: var(--navy);

    font-size: clamp(36px, 5vw, 58px);
    line-height: 1.08;
    letter-spacing: -0.035em;
}

.result-description {
    max-width: 650px;
    margin: 23px 0 0;

    color: var(--navy-soft);
    font-size: 18px;
    line-height: 1.6;
}

.result-recommendation {
    margin-top: 28px;
    padding: 21px;

    display: flex;
    align-items: flex-start;
    gap: 15px;

    background:
        linear-gradient(
            115deg,
            #fff9df,
            #f3f4ff
        );

    border: 1px solid rgba(83, 98, 232, 0.10);
    border-radius: 18px;
}

.recommendation-icon {
    flex: 0 0 43px;

    width: 43px;
    height: 43px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    background: #ffffff;
    border-radius: 13px;

    font-size: 20px;
}

.result-recommendation strong {
    color: var(--navy);
    font-size: 15px;
}

.result-recommendation p {
    margin: 5px 0 0;

    color: var(--muted);
    font-size: 14px;
}

/* Круг баллов */

.result-score-column {
    text-align: center;
}

.result-score-ring {
    --score-angle: 0deg;

    width: 220px;
    height: 220px;
    margin: 0 auto;

    display: flex;
    align-items: center;
    justify-content: center;

    background:
        conic-gradient(
            var(--primary) var(--score-angle),
            rgba(83, 98, 232, 0.12) 0
        );

    border-radius: 50%;

    box-shadow:
        0 20px 45px rgba(83, 98, 232, 0.18);
}

.result-score-inner {
    width: 172px;
    height: 172px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    background: #ffffff;
    border-radius: 50%;

    box-shadow:
        inset 0 0 0 1px rgba(17, 27, 85, 0.05);
}

.result-score-inner strong {
    color: var(--navy);

    font-size: 39px;
    line-height: 1;
}

.result-score-inner span {
    max-width: 110px;
    margin-top: 8px;

    color: var(--muted);
    font-size: 12px;
    line-height: 1.3;
}

.result-percentage {
    margin-top: 16px;

    color: var(--primary);
    font-size: 21px;
    font-weight: 900;
}

.result-duration {
    margin-top: 6px;

    color: var(--muted);
    font-size: 12px;
}

.result-duration strong {
    color: var(--navy-soft);
}

/* Шкала уровней */

.level-scale-section {
    margin-top: 28px;
    padding: 38px;

    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.94);
    border-radius: 25px;

    box-shadow: var(--small-shadow);
    backdrop-filter: blur(12px);
}

.level-scale-heading {
    text-align: center;
}

.level-scale-heading > span {
    color: var(--primary);

    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.level-scale-heading h2 {
    margin: 8px 0 0;

    color: var(--navy);
    font-size: 27px;
}

.level-scale {
    position: relative;

    margin-top: 35px;

    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 15px;
}

.level-scale::before {
    content: "";

    position: absolute;
    top: 31px;
    left: 10%;
    right: 10%;

    height: 3px;

    background: rgba(83, 98, 232, 0.12);
}

.level-item {
    position: relative;
    z-index: 2;

    display: flex;
    flex-direction: column;
    align-items: center;

    text-align: center;
}

.level-circle {
    width: 64px;
    height: 64px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    color: var(--primary);
    background: #f0f1ff;

    border: 4px solid #ffffff;
    border-radius: 50%;

    box-shadow:
        0 7px 17px rgba(17, 27, 85, 0.09);

    font-size: 15px;
    font-weight: 900;
}

.level-item > span {
    margin-top: 10px;

    color: var(--muted);
    font-size: 12px;
}

.level-item > strong {
    margin-top: 4px;

    color: var(--primary);
    font-size: 11px;
}

.level-item.is-current .level-circle {
    color: #ffffff;
    background: var(--primary);

    transform: scale(1.12);

    box-shadow:
        0 13px 28px rgba(83, 98, 232, 0.30);
}

/* Контактный блок */

.result-contact-section {
    margin-top: 28px;

    display: grid;
    grid-template-columns: 0.85fr 1.15fr;
    overflow: hidden;

    background: rgba(255, 255, 255, 0.91);
    border: 1px solid rgba(255, 255, 255, 0.95);
    border-radius: 28px;

    box-shadow: var(--shadow);
}

.contact-teacher-column {
    position: relative;
    overflow: hidden;

    min-height: 520px;
    padding: 30px 30px 0;

    display: flex;
    flex-direction: column;
    justify-content: flex-end;

    background:
        radial-gradient(
            circle at 50% 42%,
            rgba(255, 255, 255, 0.85),
            transparent 45%
        ),
        linear-gradient(
            150deg,
            #fff6db,
            #e6e9ff
        );
}

.contact-image-wrap {
    position: relative;

    flex: 1;

    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.contact-image-wrap img {
    position: relative;
    z-index: 2;

    max-height: 390px;
    width: auto;

    object-fit: contain;

    filter:
        drop-shadow(
            0 24px 24px rgba(17, 27, 85, 0.16)
        );
}

.contact-image-glow {
    position: absolute;
    left: 50%;
    bottom: 0;

    width: 320px;
    height: 320px;

    transform: translateX(-50%);
    border-radius: 50%;

    background:
        radial-gradient(
            circle,
            rgba(255, 255, 255, 0.92),
            transparent 69%
        );
}

.contact-teacher-text {
    position: relative;
    z-index: 4;

    margin: -15px 0 25px;
    padding: 19px;

    background: rgba(255, 255, 255, 0.91);
    border-radius: 16px;

    box-shadow: var(--small-shadow);
    backdrop-filter: blur(12px);
}

.contact-teacher-text > span {
    color: var(--primary);

    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.07em;
}

.contact-teacher-text strong {
    display: block;

    margin-top: 3px;

    color: var(--navy);
    font-size: 18px;
}

.contact-teacher-text p {
    margin: 7px 0 0;

    color: var(--muted);
    font-size: 13px;
}

.contact-form-card {
    padding: 50px;
}

.contact-small-label {
    color: var(--primary);

    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.contact-form-card h2 {
    margin: 9px 0 0;

    color: var(--navy);

    font-size: 34px;
    line-height: 1.15;
}

.contact-form-intro {
    margin: 14px 0 0;

    color: var(--muted);
    font-size: 14px;
}

.lead-form {
    margin-top: 27px;

    display: grid;
    gap: 17px;
}

.form-group {
    display: grid;
    gap: 7px;
}

.form-group label {
    color: var(--navy-soft);

    font-size: 12px;
    font-weight: 800;
}

.form-group input,
.form-group select {
    width: 100%;
    min-height: 52px;
    padding: 0 15px;

    color: var(--navy);
    background: #fafaff;

    border: 1px solid rgba(17, 27, 85, 0.12);
    border-radius: 11px;

    outline: none;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;
}

.form-group input:focus,
.form-group select:focus {
    background: #ffffff;
    border-color: var(--primary);

    box-shadow:
        0 0 0 4px rgba(83, 98, 232, 0.11);
}

.consent-row {
    display: grid;
    grid-template-columns: 19px 1fr;
    align-items: start;
    gap: 10px;

    color: var(--muted);
    font-size: 12px;
    line-height: 1.45;

    cursor: pointer;
}

.consent-row input {
    width: 17px;
    height: 17px;
    margin-top: 1px;

    accent-color: var(--primary);
}

.lead-submit {
    width: 100%;
}

.contact-privacy-note {
    margin: 13px 0 0;

    color: var(--muted);
    text-align: center;
    font-size: 10px;
}

.form-alert {
    margin-top: 18px;
    padding: 13px 15px;

    border-radius: 11px;

    font-size: 13px;
}

.form-alert-error {
    color: #a93434;
    background: #fff0f0;
    border: 1px solid #ffd4d4;
}

.form-alert-success {
    color: #267046;
    background: #eefaf3;
    border: 1px solid #ccebd8;
}

/* Успешно сохранённый контакт */

.lead-success-card {
    min-height: 360px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    text-align: center;
}

.lead-success-icon {
    width: 72px;
    height: 72px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    color: #ffffff;
    background: #51b57a;
    border-radius: 50%;

    box-shadow:
        0 16px 32px rgba(81, 181, 122, 0.25);

    font-size: 30px;
    font-weight: 900;
}

.lead-success-card h2 {
    margin-top: 20px;
}

.lead-success-card p {
    max-width: 420px;

    color: var(--muted);
    font-size: 14px;
}

.saved-contact {
    margin-top: 15px;
    padding: 13px 17px;

    display: flex;
    flex-direction: column;

    background: #f5f6ff;
    border-radius: 12px;
}

.saved-contact span {
    color: var(--muted);
    font-size: 10px;
}

.saved-contact strong {
    color: var(--navy);
    font-size: 15px;
}

/* Нижние кнопки */

.result-footer-actions {
    margin-top: 30px;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.secondary-button {
    min-height: 58px;
    padding: 0 27px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    color: var(--primary);
    background: rgba(255, 255, 255, 0.84);

    border: 1px solid rgba(83, 98, 232, 0.20);
    border-radius: 10px;

    font-weight: 800;

    transition:
        background 0.2s ease,
        transform 0.2s ease;
}

.secondary-button:hover {
    background: #ffffff;
    transform: translateY(-2px);
}

.result-disclaimer {
    max-width: 760px;
    margin: 25px auto 0;

    color: var(--muted);
    text-align: center;
    font-size: 11px;
}

/* Адаптация результата */

@media (max-width: 900px) {
    .result-hero {
        grid-template-columns: 1fr;
    }

    .result-score-column {
        grid-row: 1;
    }

    .result-contact-section {
        grid-template-columns: 1fr;
    }

    .contact-teacher-column {
        min-height: 450px;
    }
}

@media (max-width: 650px) {
    .result-main {
        padding-top: 25px;
    }

    .result-hero {
        padding: 28px 20px;
        gap: 35px;

        border-radius: 23px;
    }

    .result-score-ring {
        width: 185px;
        height: 185px;
    }

    .result-score-inner {
        width: 143px;
        height: 143px;
    }

    .result-score-inner strong {
        font-size: 31px;
    }

    .level-scale-section {
        padding: 27px 16px;
    }

    .level-scale {
        grid-template-columns: repeat(5, minmax(60px, 1fr));
        overflow-x: auto;

        padding: 10px 0 15px;
    }

    .level-scale::before {
        display: none;
    }

    .level-circle {
        width: 55px;
        height: 55px;
    }

    .contact-teacher-column {
        min-height: 400px;
    }

    .contact-image-wrap img {
        max-height: 320px;
    }

    .contact-form-card {
        padding: 32px 20px;
    }

    .contact-form-card h2 {
        font-size: 29px;
    }

    .result-footer-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .result-footer-actions a {
        width: 100%;
    }
}

.restart-form {
    margin: 0;
}

.restart-form .secondary-button {
    cursor: pointer;
    font: inherit;
}

@media (max-width: 650px) {
    .restart-form,
    .restart-form .secondary-button {
        width: 100%;
    }
}