:root {
    color-scheme: light;
    font-family: "DM Sans", "Segoe UI", Arial, sans-serif;
    color: #2d3d54;
    background: #f4f7fb;
    font-synthesis: none;
    text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
body { min-width: 320px; min-height: 100vh; margin: 0; }
button, input { font: inherit; }
.quiz-take-body { padding: 30px 20px 60px; background: radial-gradient(ellipse at top, #eaf1fd 0, #f4f7fb 430px); }
.quiz-take-shell { width: min(820px, 100%); margin: 0 auto; }
.quiz-back-link { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 24px; color: #66778d; font-size: 13px; font-weight: 600; text-decoration: none; }
.quiz-back-link:hover { color: #3474e6; }
.quiz-take-header { margin-bottom: 20px; }
.quiz-take-eyebrow { display: flex; align-items: center; gap: 7px; margin: 0 0 9px; color: #4779cf; font-size: 11px; font-weight: 800; letter-spacing: 1px; }
.quiz-take-header h1 { margin: 0; color: #26364c; font-size: clamp(25px, 5vw, 36px); line-height: 1.18; letter-spacing: -.7px; }
.quiz-take-header > p:last-child { margin: 9px 0 0; color: #7b899b; font-size: 13px; line-height: 1.6; }
.quiz-take-card { min-height: 280px; padding: clamp(20px, 4vw, 32px); border: 1px solid #e3e9f1; border-radius: 17px; background: #fff; box-shadow: 0 14px 45px #293b5510; }
.quiz-take-loading { min-height: 220px; display: flex; align-items: center; justify-content: center; gap: 10px; color: #718096; font-size: 13px; }
.quiz-take-spinner { width: 18px; height: 18px; border: 2px solid #dfe8f7; border-top-color: #3474e6; border-radius: 50%; animation: quiz-spin .8s linear infinite; }
@keyframes quiz-spin { to { transform: rotate(360deg); } }
.quiz-take-error { margin: 0 0 14px; padding: 12px 14px; border: 1px solid #f0c6c2; border-radius: 9px; background: #fff5f4; color: #a43a32; font-size: 12px; line-height: 1.5; }
.quiz-take-error[hidden] { display: none; }
.quiz-take-progress { display: flex; align-items: center; gap: 14px; margin-bottom: 25px; color: #748399; font-size: 11px; font-weight: 700; }
.quiz-take-progress-track { height: 6px; flex: 1; overflow: hidden; border-radius: 99px; background: #edf1f7; }
.quiz-take-progress-track span { height: 100%; display: block; border-radius: inherit; background: #3474e6; transition: width .2s ease; }
.quiz-take-question { margin: 0 0 22px; color: #2b3a50; font-size: clamp(18px, 3vw, 22px); line-height: 1.48; white-space: pre-wrap; }
.quiz-take-options { display: grid; gap: 10px; margin: 0; padding: 0; border: 0; }
.quiz-take-option { min-height: 56px; display: flex; align-items: center; gap: 13px; padding: 12px 15px; border: 1px solid #e1e7ef; border-radius: 11px; color: #526176; cursor: pointer; font-size: 13px; line-height: 1.55; transition: border-color .15s ease, background .15s ease; }
.quiz-take-option:hover, .quiz-take-option.is-selected { border-color: #9bb8eb; background: #f5f8fe; }
.quiz-take-option input { width: 17px; height: 17px; flex: 0 0 17px; accent-color: #3474e6; }
.quiz-take-letter { width: 27px; height: 27px; flex: 0 0 27px; display: grid; place-items: center; border-radius: 8px; background: #edf3fc; color: #5476ae; font-size: 11px; font-weight: 800; }
.quiz-take-option-text { flex: 1; }
.quiz-take-actions, .quiz-review-actions { display: flex; justify-content: space-between; gap: 11px; margin-top: 26px; }
.quiz-take-primary, .quiz-take-secondary { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; padding: 0 17px; border: 1px solid transparent; border-radius: 9px; cursor: pointer; font-size: 12px; font-weight: 700; text-decoration: none; }
.quiz-take-primary { background: #3474e6; color: #fff; }
.quiz-take-primary:hover { background: #2863ca; color: #fff; }
.quiz-take-primary:disabled { cursor: wait; opacity: .65; }
.quiz-take-secondary { border-color: #e1e7ef; background: #fff; color: #63738a; }
.quiz-take-secondary:hover { border-color: #c8d7ef; color: #3474e6; }
.quiz-take-secondary:disabled { cursor: default; opacity: .45; }
.quiz-take-result-summary { margin: 0 0 24px; padding: 21px; border: 1px solid #dce8fa; border-radius: 13px; background: linear-gradient(135deg, #f0f6ff, #f8faff); }
.quiz-take-score { display: block; color: #2e64c3; font-size: 33px; font-weight: 800; letter-spacing: -.5px; }
.quiz-take-percent { display: block; margin-top: 2px; color: #5e718c; font-size: 13px; font-weight: 700; }
.quiz-take-missed { margin: 10px 0 0; color: #6c7b90; font-size: 12px; line-height: 1.6; }
.quiz-review-heading { margin: 0 0 13px; color: #2f4057; font-size: 16px; }
.quiz-review-list { display: grid; gap: 11px; }
.quiz-review-item { padding: 15px; border: 1px solid #e4eaf1; border-left: 4px solid #43a078; border-radius: 10px; background: #fff; }
.quiz-review-item.is-missed { border-left-color: #df876f; background: #fffdfc; }
.quiz-review-status { display: inline-flex; padding: 4px 8px; border-radius: 99px; background: #edf7f1; color: #39856a; font-size: 9px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; }
.quiz-review-item.is-missed .quiz-review-status { background: #fff0ec; color: #b55845; }
.quiz-review-question { margin: 9px 0 12px; color: #374960; font-size: 13px; line-height: 1.55; white-space: pre-wrap; }
.quiz-review-your-answer, .quiz-review-correct-answer { margin: 5px 0 0; color: #708096; font-size: 11px; line-height: 1.6; }
.quiz-review-item.is-missed .quiz-review-your-answer { color: #a85043; }
.quiz-review-correct-answer { color: #38805f; font-weight: 700; }
.quiz-review-explanation { margin-top: 11px; padding: 11px 12px; border-radius: 8px; background: #f3f6fb; color: #5e6f85; font-size: 11px; line-height: 1.65; }
.quiz-review-explanation strong { display: block; margin-bottom: 3px; color: #40536b; font-size: 10px; }
.quiz-review-explanation p { margin: 0; }
.quiz-review-no-explanation { margin: 10px 0 0; color: #8a96a6; font-size: 11px; font-style: italic; }
.quiz-review-actions { justify-content: flex-start; }

@media (max-width: 520px) {
    .quiz-take-body { padding: 20px 13px 36px; }
    .quiz-back-link { margin-bottom: 19px; }
    .quiz-take-card { min-height: 250px; border-radius: 13px; }
    .quiz-take-option { align-items: flex-start; padding: 11px; font-size: 12px; }
    .quiz-take-option input { margin-top: 5px; }
    .quiz-take-actions { margin-top: 21px; }
    .quiz-take-primary, .quiz-take-secondary { padding: 0 13px; }
}
