.quiz-shell {
    max-width: 1250px;
}

.quiz-shell > header strong {
    min-width: 92px;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.quiz-shell > header strong.timer-warning {
    color: #ff8b9e;
}

.quiz-progress {
    height: 4px;
    background: #26364b;
}

.quiz-progress i {
    height: 100%;
    display: block;
    background: linear-gradient(90deg, var(--teal), var(--violet));
    transition: width .25s;
}

.quiz-meta {
    display: flex;
    justify-content: space-between;
    color: #8e9caf;
}

.quiz-stem {
    min-height: 95px;
    margin: 24px 0 28px;
    color: #f3f7fc;
    font-size: 16px;
    line-height: 1.7;
}

.quiz-stem p {
    margin: 0 0 12px;
}

.quiz-stem figure,
.quiz-review-explanation figure {
    margin: 20px 0;
}

.quiz-stem img,
.quiz-review-explanation img,
.option-content img {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    margin: 18px auto;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(0, 0, 0, .22);
}

.option-content {
    min-width: 0;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.55;
}

.option-content p {
    margin: 0 0 7px;
}

.option-content p:last-child {
    margin-bottom: 0;
}

.option-content img {
    max-height: 360px;
    margin: 8px 0;
    object-fit: contain;
}

.quiz-options {
    display: grid;
    gap: 10px;
}

.quiz-option {
    cursor: pointer;
    transition: border-color .16s, background .16s, transform .16s;
}

.quiz-option:hover {
    border-color: #667a98;
    background: #162338;
    transform: translateY(-1px);
}

.quiz-option.selected,
.quiz-option:has(input:checked) {
    border-color: #716bff;
    color: #fff;
    background: #1b2548;
    box-shadow: 0 0 0 2px rgba(112, 100, 255, .17);
}

.quiz-option.selected span,
.quiz-option:has(input:checked) span {
    border-color: #8c86ff;
    color: #fff;
    background: #655fee;
}

.quiz-navigation {
    margin-top: 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.quiz-navigation > div {
    display: flex;
    gap: 10px;
}

.quiz-navigation .primary,
.quiz-navigation .secondary {
    min-height: 44px;
}

.finish-now {
    border-color: #56677f;
    color: #c2cede;
    background: transparent;
}

.quiz-review .quiz-option {
    cursor: default;
}

.quiz-review .quiz-option:hover {
    transform: none;
}

.quiz-option.correct-answer {
    border-color: #42b89e;
    color: #eafffa;
    background: #123a37;
}

.quiz-option.correct-answer span {
    border-color: #42b89e;
    color: #fff;
    background: #12836f;
}

.quiz-option.wrong-answer {
    border-color: #d7667d;
    color: #fff1f4;
    background: #3e1d2b;
}

.quiz-option.wrong-answer span {
    border-color: #d7667d;
    color: #fff;
    background: #a93650;
}

.quiz-review-explanation {
    margin-top: 24px;
    padding: 18px 20px;
    border: 1px solid #314863;
    border-radius: 12px;
    color: #b8c7d8;
    background: #101d2e;
    font-size: 12px;
    line-height: 1.7;
}

.quiz-review-explanation strong {
    display: block;
    margin-bottom: 6px;
    color: var(--mint);
}

.quiz-review-explanation p {
    margin: 0 0 8px;
}

.quiz-result {
    width: min(850px, calc(100% - 40px));
    margin: 65px auto;
    padding: 44px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: #fff;
    text-align: center;
    box-shadow: 0 25px 65px rgba(38, 74, 122, .1);
}

.quiz-result h1 {
    margin: 13px 0 4px;
    font-size: 68px;
    letter-spacing: -.06em;
}

.quiz-result h2 {
    margin: 0;
    color: #52657c;
    font-size: 20px;
}

.result-badge {
    display: inline-block;
    margin-top: 7px;
    padding: 7px 11px;
    border-radius: 8px;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: .1em;
}

.result-badge.passed {
    color: #087967;
    background: #e8f8f4;
}

.result-badge.not-passed {
    color: #a3374d;
    background: #fff0f3;
}

.result-stats {
    margin: 32px 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    border: 1px solid var(--line);
    border-radius: 14px;
}

.result-stats > div {
    padding: 19px 10px;
    border-right: 1px solid var(--line);
}

.result-stats > div:last-child {
    border: 0;
}

.result-stats b,
.result-stats span {
    display: block;
}

.result-stats b {
    font-size: 18px;
}

.result-stats span {
    margin-top: 5px;
    color: #8492a7;
    font-size: 8px;
    text-transform: uppercase;
}

.result-actions {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

.quiz-mode-actions {
    display: grid;
    gap: 7px;
    min-width: 125px;
}

.quiz-mode-actions .primary,
.quiz-mode-actions .secondary {
    width: 100%;
}

.training-feedback {
    margin-bottom: 22px;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    border: 1px solid #42546e;
    border-radius: 11px;
    font-size: 11px;
}

.training-feedback b {
    font-size: 13px;
}

.training-feedback.correct {
    border-color: #36a98f;
    color: #dffbf4;
    background: #123a37;
}

.training-feedback.incorrect {
    border-color: #c95870;
    color: #ffe8ed;
    background: #3e1d2b;
}

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

.training-stats > div:nth-child(2) {
    border-right: 0;
}

@media (max-width: 700px) {
    .quiz-navigation {
        align-items: stretch;
        flex-direction: column;
    }

    .quiz-navigation > div {
        display: grid;
    }

    .quiz-navigation > span {
        display: none;
    }

    .quiz-navigation .primary,
    .quiz-navigation .secondary {
        width: 100%;
    }

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

    .result-stats > div:nth-child(2) {
        border-right: 0;
    }

    .result-stats > div:nth-child(-n+2) {
        border-bottom: 1px solid var(--line);
    }

    .quiz-result {
        padding: 28px 18px;
    }

    .quiz-result h1 {
        font-size: 54px;
    }

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

    .quiz-list article {
        grid-template-columns: 45px 1fr;
    }

    .quiz-mode-actions {
        grid-column: 1 / -1;
        grid-template-columns: 1fr 1fr;
    }

    .training-feedback {
        align-items: flex-start;
        flex-direction: column;
    }
}
