* {
    box-sizing: border-box;
}

:root {
    --navy: #102a56;
    --blue: #245ba7;
    --bg: #f4f6f9;
    --text: #172033;
    --muted: #6d7787;
    --border: #e0e5ec;
    --green: #237a46;
    --green-bg: #eaf7ef;
    --red: #b53b3b;
    --red-bg: #fff0f0;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI",
                 Roboto, Arial, sans-serif;
}

button {
    font-family: inherit;
}

.app {
    width: 100%;
    max-width: 760px;
    margin: auto;
    padding: 20px 16px 60px;
}

.hidden {
    display: none !important;
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 15px 2px 24px;
}

.flag {
    font-size: 38px;
}

.brand h1 {
    margin: 0;
    font-size: 29px;
}

.brand p {
    margin: 3px 0 0;
    color: var(--muted);
}

.progress-card,
.question-card,
.result-card {
    background: white;
    border-radius: 18px;
    box-shadow: 0 4px 20px rgba(0,0,0,.06);
}

.progress-card {
    padding: 20px;
    margin-bottom: 14px;
}

.progress-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.small-label {
    font-size: 11px;
    font-weight: 800;
    color: var(--muted);
    letter-spacing: 1px;
}

.coverage-number {
    font-size: 27px;
    font-weight: 800;
    margin-top: 3px;
}

.coverage-total {
    font-size: 16px;
    color: var(--muted);
    font-weight: 500;
}

.percentage {
    font-size: 28px;
    font-weight: 800;
    color: var(--navy);
}

.progress-track {
    height: 6px;
    background: #e2e6ec;
    border-radius: 20px;
    overflow: hidden;
}

.progress-track.big {
    margin: 17px 0 14px;
    height: 8px;
}

.progress-bar {
    height: 100%;
    width: 0;
    background: var(--navy);
    border-radius: inherit;
    transition: width .25s ease;
}

.stats-row {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    color: var(--muted);
    font-size: 13px;
}

.primary {
    border: 0;
    width: 100%;
    border-radius: 13px;
    background: var(--navy);
    color: white;
    padding: 16px;
    font-size: 16px;
    font-weight: 750;
    cursor: pointer;
}

.primary:disabled {
    opacity: .4;
}

.continue-btn {
    margin: 12px 0 25px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.continue-btn small {
    opacity: .75;
    font-weight: 500;
}

.section-heading {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin: 27px 2px 12px;
}

.section-heading h2 {
    margin: 0;
    font-size: 19px;
}

.section-heading span {
    color: var(--muted);
    font-size: 13px;
}

.blocks {
    display: grid;
    gap: 9px;
}

.block-card {
    width: 100%;
    background: white;
    border: 1px solid var(--border);
    border-radius: 13px;
    padding: 13px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-align: left;
    color: var(--text);
    cursor: pointer;
}

.block-card.active {
    border-color: #8ba8cf;
}

.block-card.complete {
    background: #fbfdfb;
}

.block-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.block-number {
    width: 35px;
    height: 35px;
    flex: 0 0 35px;
    border-radius: 50%;
    background: #eef1f5;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 13px;
}

.complete .block-number {
    background: var(--green-bg);
    color: var(--green);
}

.block-left strong {
    display: block;
    font-size: 15px;
}

.block-left small {
    display: block;
    color: var(--muted);
    margin-top: 3px;
}

.block-right {
    text-align: right;
    margin-left: 8px;
}

.block-score {
    display: block;
    font-weight: 800;
    font-size: 14px;
}

.block-status {
    display: block;
    color: var(--muted);
    font-size: 12px;
    margin-top: 2px;
}

.block-status.done {
    color: var(--green);
}

.block-status.continue {
    color: var(--blue);
}

.practice-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.secondary {
    border: 1px solid var(--border);
    background: white;
    border-radius: 13px;
    padding: 15px;
    color: var(--text);
    cursor: pointer;
}

.secondary strong,
.secondary span {
    display: block;
}

.secondary span {
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
}

.secondary:disabled {
    opacity: .5;
}

.secondary.single {
    width: 100%;
    font-size: 15px;
    font-weight: 700;
}

.reset-btn {
    display: block;
    margin: 30px auto 0;
    border: 0;
    background: transparent;
    color: #8b4650;
    padding: 10px;
    cursor: pointer;
}

.credit {
    text-align: center;
    color: #9299a5;
    font-size: 12px;
    margin-top: 25px;
}

.quiz-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 8px 0 12px;
}

.text-btn {
    border: 0;
    background: transparent;
    color: var(--navy);
    font-size: 15px;
    padding: 8px 0;
    cursor: pointer;
}

.quiz-status {
    text-align: right;
    font-size: 13px;
}

.quiz-status span {
    display: block;
}

#scoreText {
    color: var(--muted);
    margin-top: 2px;
}

.question-card {
    margin-top: 18px;
    padding: 22px;
}

.question-meta {
    display: flex;
    justify-content: space-between;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .4px;
}

.question-card h2 {
    font-size: 23px;
    line-height: 1.38;
    margin: 15px 0 20px;
}

.multi-hint {
    padding: 10px 12px;
    background: #eef4fc;
    border-radius: 9px;
    margin-bottom: 12px;
    color: #315d91;
    font-size: 13px;
}

.answers {
    display: grid;
    gap: 10px;
    margin-bottom: 20px;
}

.answer {
    width: 100%;
    min-height: 59px;
    border: 2px solid var(--border);
    border-radius: 12px;
    background: white;
    color: var(--text);
    padding: 11px 13px;
    display: flex;
    align-items: center;
    gap: 12px;
    text-align: left;
    font-size: 16px;
    cursor: pointer;
}

.answer .letter {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #eef1f5;
    font-weight: 800;
}

.answer.selected {
    border-color: var(--blue);
    background: #f3f7fd;
}

.answer.correct {
    border-color: var(--green);
    background: var(--green-bg);
}

.answer.correct .letter {
    background: var(--green);
    color: white;
}

.answer.wrong {
    border-color: var(--red);
    background: var(--red-bg);
}

.answer.wrong .letter {
    background: var(--red);
    color: white;
}

.feedback {
    margin-top: 19px;
    padding: 17px;
    background: #f7f8fa;
    border-radius: 12px;
    line-height: 1.55;
}

.result-title {
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 13px;
}

.good {
    color: var(--green);
}

.bad {
    color: var(--red);
}

.correct-answer {
    margin-bottom: 13px;
}

.explanation {
    border-top: 1px solid var(--border);
    padding-top: 13px;
}

.navigation {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 10px;
    margin-top: 18px;
}

.nav-btn {
    border: 1px solid var(--border);
    background: white;
    border-radius: 13px;
    font-weight: 700;
    cursor: pointer;
}

.nav-btn:disabled {
    opacity: .35;
}

.nav-next {
    width: 100%;
}

.result-card {
    text-align: center;
    padding: 30px 22px;
    margin-top: 60px;
}

.finish-icon {
    margin: auto;
    width: 55px;
    height: 55px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--green-bg);
    color: var(--green);
    font-size: 28px;
    font-weight: 800;
}

.result-card h1 {
    margin-bottom: 5px;
}

.big-score {
    font-size: 61px;
    font-weight: 850;
    margin: 15px 0 3px;
}

.result-actions {
    display: grid;
    gap: 10px;
    margin-top: 24px;
}

@media (max-width: 520px) {
    .app {
        padding: 10px 11px 45px;
    }

    .brand {
        margin-top: 9px;
    }

    .brand h1 {
        font-size: 25px;
    }

    .progress-card,
    .question-card {
        border-radius: 15px;
    }

    .question-card {
        padding: 17px;
    }

    .question-card h2 {
        font-size: 20px;
    }

    .answer {
        font-size: 15px;
    }

    .stats-row {
        font-size: 12px;
    }

    .block-card {
        padding: 12px;
    }
}
