:root {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #202020;
    background: #fff;
    font-synthesis: none
}

* {
    box-sizing: border-box
}

body {
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    display: grid;
    place-items: center;
    padding: 16px
}

.quiz {
    width: 100%;
    max-width: 500px;
    min-height: 500px;
    border: 1px solid #dedede;
    border-radius: 18px;
    padding: 13px;
    background: #fff
}

.quiz-title {
    font-size: 24px;
    line-height: 1.25;
    margin: 2px 0 15px;
    font-weight: 750;
    letter-spacing: -.5px
}

.panel {
    background: #fafafa;
    border-radius: 13px;
    padding: 13px;
    margin-bottom: 12px
}

.section-title {
    font-size: 16px;
    font-weight: 750;
    margin: 0 0 10px
}

.choices {
    display: grid;
    gap: 10px
}

.choice {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 25px;
    font-size: 16px;
    font-weight: 550;
    cursor: pointer
}

.choice input {
    appearance: none;
    width: 19px;
    height: 19px;
    flex: none;
    margin: 0;
    border: 1.5px solid #d1d5db;
    border-radius: 5px;
    background: #fff;
    display: grid;
    place-items: center;
    cursor: pointer
}

.choice input:checked {
    background: #202020;
    border-color: #202020
}

.choice input:checked::after {
    content: "";
    width: 9px;
    height: 5px;
    border-left: 2px solid #fff;
    border-bottom: 2px solid #fff;
    transform: translateY(-1px) rotate(-45deg)
}

.choice input:focus-visible,
.button:focus-visible,
.segment button:focus-visible {
    outline: 3px solid #83b9ff;
    outline-offset: 3px
}

.question-count {
    margin: 15px 0 17px
}

.segment {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2px;
    margin-top: 9px
}

.segment button {
    border: 0;
    background: transparent;
    color: #777;
    border-radius: 24px;
    padding: 8px;
    font: inherit;
    cursor: pointer
}

.segment button.active {
    background: #f3f3f5;
    color: #202020;
    font-weight: 650
}

.button {
    border: 1px solid transparent;
    border-radius: 28px;
    padding: 10px 14px;
    min-height: 39px;
    font: inherit;
    font-weight: 650;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px
}

.button:disabled {
    opacity: .45;
    cursor: not-allowed
}

.button-primary {
    background: #202020;
    color: #fff
}

.button-outline {
    background: #fff;
    color: #5b5b5b;
    border-color: #d9d9d9
}

.button-yes {
    background: #009d40;
    color: #fff
}

.button-no {
    background: #e72d2d;
    color: #fff
}

.button-full {
    width: 100%
}

.button-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 11px
}

.arrow {
    font-size: 20px;
    font-weight: 400;
    line-height: 1
}

.score-panel {
    margin-bottom: 12px
}

.score-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 700
}

.timer {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-weight: 400;
    font-variant-numeric: tabular-nums
}

.clock-icon {
    width: 15px;
    height: 15px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.8
}

.progress {
    display: flex;
    gap: 4px;
    margin-top: 10px
}

.progress-step {
    height: 10px;
    min-width: 0;
    flex: 1;
    border-radius: 10px;
    background: #f0f0f2
}

.progress-step.correct {
    background: #16a34a
}

.progress-step.incorrect {
    background: #ce565a
}

.question-panel {
    text-align: center;
    padding: 17px 12px;
    margin-bottom: 12px
}

.question-index {
    color: #777;
    font-size: 14px;
    margin: 0 0 10px
}

.question-prompt {
    font-size: 17px;
    font-weight: 750;
    margin: 0 0 10px
}

.question-number {
    font-size: 30px;
    line-height: 1.2;
    font-weight: 750;
    margin: 0;
    font-variant-numeric: tabular-nums
}

.explanation {
    font-size: 14px;
    line-height: 1.55;
    margin-bottom: 12px
}

.explanation p {
    margin: 0 0 5px
}

.explanation p:last-child {
    margin-bottom: 0
}

.worked {
    font-weight: 650
}

.feedback {
    font-size: 15px;
    font-weight: 700;
    color: #a83238;
    margin-bottom: 8px
}

.results {
    text-align: center;
    padding: 17px 13px
}

.trophy {
    width: 32px;
    height: 32px;
    fill: none;
    stroke: #202020;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round
}

.percentage {
    font-size: 32px;
    font-weight: 750;
    margin: 9px 0 7px
}

.result-count {
    font-weight: 700;
    margin: 0 0 19px
}

.result-stats {
    text-align: left;
    padding: 0;
    margin-bottom: 20px
}

.stat {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 0
}

.stat+.stat {
    border-top: 1px solid #e5e5e5
}

.stat-label {
    display: flex;
    align-items: center;
    gap: 7px
}

.stat-value {
    font-weight: 700;
    font-variant-numeric: tabular-nums
}

.result-message {
    font-size: 19px;
    font-weight: 750;
    margin: 0 0 16px
}

.results .button+.button {
    margin-top: 9px
}

.hint-button {
    margin-bottom: 0
}

.muted {
    color: #777
}

@media(max-width:420px) {
    body {
        padding: 12px
    }

    .quiz {
        padding: 12px
    }

    .quiz-title {
        font-size: 23px
    }
}

@media(max-height:650px) {
    body {
        place-items: start center
    }
}

@media(prefers-reduced-motion:no-preference) {
    .button {
        transition: filter .12s
    }

    .button:hover:not(:disabled) {
        filter: brightness(.95)
    }
}

.hint-spacer {
    height: 11px
}