.result-card { max-width: 760px; margin: 24px auto; background: #fff; border: 1px solid #dbe4ef; border-radius: 22px; overflow: hidden; box-shadow: 0 14px 40px #15345714; text-align: center; }
.result-card .result-hero { background: linear-gradient(120deg, #102f50, #225582); color: #fff; padding: 28px 24px; }
.result-card .result-eyebrow { margin: 0 0 10px; color: #b9daf7; font-size: 11px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; }
.result-card .result-hero h1 { margin: 0 0 12px; font-size: clamp(24px, 4vw, 32px); color: #fff; }
.result-card .result-score { font-size: clamp(48px, 8vw, 64px); font-weight: 800; line-height: 1.1; margin: 12px 0; color: #fff; font-variant-numeric: tabular-nums; }
.result-card .result-status { display: inline-block; background: #d7f8e8; color: #146b35; border: 2px solid #45b875; padding: 10px 28px; border-radius: 32px; font-size: 18px; line-height: 1.2; font-weight: 900; letter-spacing: 1px; }
.result-card .result-status.fail { background: #ffe0de; color: #b91c1c; border-color: #ef7777; }
.result-card .result-encouragement { margin: 16px 0 0; color: #e0edfa; font-size: 15px; }
.result-card .result-body { padding: 24px; }
.result-card .result-table { width: 100%; border-collapse: separate; border-spacing: 0; text-align: left; border: 1px solid #dce5ee; border-radius: 12px; overflow: hidden; }
.result-table caption { text-align: left; color: #223c58; font-weight: 700; padding: 0 0 12px; }
.result-table thead { background: #eaf0f7; color: #52657b; font-size: 11px; text-transform: uppercase; letter-spacing: 1px; }
.result-table th, .result-table td { padding: 13px 18px; border-bottom: 1px solid #fff; }
.result-table tbody th { font-size: 14px; font-weight: 600; }
.result-table td, .result-table thead th:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.result-table tbody td { font-size: 18px; font-weight: 750; }
.result-card .result-table tbody > .result-correct { background: #e9f7ef; color: #1b6140; }
.result-card .result-table tbody > .result-incorrect { background: #fff0ed; color: #933e36; }
.result-card .result-table tbody > .result-unanswered { background: #fff8e4; color: #7c5a16; }
.result-table tfoot { background: #edf2fa; color: #223c58; font-weight: 700; }
.result-card .result-note { font-size: 13px; color: #62738a; margin: 18px 0; line-height: 1.6; }
.result-card .result-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.result-actions .button { margin: 0; }
.result-review { max-width: 960px; margin: 16px auto; border: 1px solid #dbe4ef; border-radius: 12px; background: white; color: #243b53; padding: 16px 20px; text-align: left; scroll-margin-top: 90px; }
.result-navigation { max-width: 960px; margin: 10px auto 0; }
.result-review > summary { cursor: pointer; font-weight: 700; color: #17456d; }
.review-question { margin-top: 14px; padding: 14px; background: #f6f8fb; border: 1px solid #dce5ee; border-radius: 8px; }
.review-question > summary { cursor: pointer; font-weight: 600; }
.review-status { display: inline-block; padding: 3px 9px; border-radius: 12px; background: #eaf0f7; color: #334e68; font-size: 12px; font-weight: 700; }
.review-status[data-outcome="correct"] { background: #e9f7ef; color: #1b6140; }
.review-status[data-outcome="incorrect"] { background: #fff0ed; color: #933e36; }
.review-status[data-outcome="unanswered"] { background: #fff8e4; color: #7c5a16; }
.review-question p { margin: 10px 0; line-height: 1.5; }
.review-stem { font-weight: 600; }
.review-stem, .review-explanation { white-space: pre-wrap; }
.review-question { background: #f6f7fa; border: 1px solid #cdd2e4; border-radius: 0; padding: 16px; }
.review-question > summary { font-size: 14px; }
.review-question .review-stem { font-weight: 400; margin: 16px 0 22px; }
.review-answer-card { border: 1px solid #cdd2e4; background: white; padding: 18px 20px; margin: 12px 0; color: #536580; }
.review-answer-card.is-correct { background: #ecfaf4; border-color: #28774e; color: #173e35; }
.review-answer-card.is-incorrect { background: #fff0ef; border-color: #e14a4a; color: #722929; }
.review-answer-tag { display: inline-block; padding: 4px 8px; font-size: 11px; font-weight: 750; background: #a9dfc8; color: #164a37; margin-bottom: 12px; }
.is-incorrect .review-answer-tag { background: #ffc4bf; color: #8e2020; }
.review-answer-tag[hidden] { display: none; }
.review-question [hidden] { display: none !important; }
.review-answer-content { display: flex; align-items: flex-start; gap: 16px; line-height: 1.5; font-size: 14px; }
.review-answer-mark { flex: 0 0 18px; text-align: center; }
.review-feedback { border: 2px solid #f44336; border-radius: 9px; background: #ffebee; padding: 16px; margin-top: 24px; }
.review-feedback[data-outcome="correct"] { background: #e8f5e9; border-color: #4caf50; }
.review-feedback[data-outcome="unanswered"] { background: #fff8e4; border-color: #d8a743; }
.review-feedback-status { display: inline-block; padding: 6px 12px; border-radius: 4px; background: #f44336; color: white; font-size: 12px; }
[data-outcome="correct"] > .review-feedback-status { background: #4caf50; }
[data-outcome="unanswered"] > .review-feedback-status { background: #936a17; }
.review-explanation-panel { background: #f5f5f5; border: 1px solid #ddd; padding: 20px; border-radius: 9px; margin-top: 24px; }
.review-explanation-panel h4 { color: #1976d2; font-size: 14px; margin: 0 0 12px; }
.review-correct-explanation { background: white; border-left: 4px solid #4caf50; border-radius: 4px; padding: 10px 14px; }
.review-explanation-panel .review-other-heading { color: #a33c38; margin-top: 20px; }
[data-review="other-options"] { background: white; border-left: 4px solid #f44336; border-radius: 4px; padding: 10px 14px; }
.review-other-option { padding: 0; margin: 0 0 16px; }
.review-other-option:last-child { margin-bottom: 0; }
.result-card .result-donut { --correct-pct: 0; --incorrect-pct: 0; width: clamp(142px, 18vw, 190px); aspect-ratio: 1; border-radius: 50%; margin: 12px auto; padding: 16px; box-sizing: border-box; background: conic-gradient(#45d59a 0% calc(var(--correct-pct) * 1%), #ff8e89 calc(var(--correct-pct) * 1%) calc((var(--correct-pct) + var(--incorrect-pct)) * 1%), #a9b8cd calc((var(--correct-pct) + var(--incorrect-pct)) * 1%) 100%); }
.result-donut-center { width: 100%; height: 100%; background: #163d61; border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.result-card .result-donut .result-score { font-size: 42px; margin: 0; }
.result-donut-center > span { font-size: 12px; color: #d4e4f4; }
.result-legend { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin: 0 0 14px; font-size: 10px; color: #e0edfa; }
.result-legend span { display: inline-flex; align-items: center; gap: 4px; }
.result-legend i { width: 8px; height: 8px; border-radius: 2px; }
.legend-correct { background: #45d59a; } .legend-incorrect { background: #ff8e89; } .legend-unanswered { background: #a9b8cd; }
@media (min-width: 700px) {
    .result-card { display: grid; grid-template-columns: minmax(220px, .85fr) minmax(320px, 1.4fr); max-width: 960px; margin: 12px auto; }
    .result-card .result-hero { display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 24px 20px; }
    .result-card .result-body { padding: 20px; }
    .result-card .result-score { font-size: 56px; margin: 10px 0; }
    .result-card .result-hero h1 { font-size: 26px; }
    .result-card .result-encouragement { font-size: 14px; line-height: 1.45; }
    .result-card .result-actions { margin-top: 16px; gap: 8px; }
    .result-card .result-actions .button { padding: 10px 14px; font-size: 14px; }
    main:has(> .result-card) { margin: 10px auto; padding: 12px; }
    .result-card .result-note { margin: 10px 0; }
}
@media (max-height: 800px) {
    .result-card .result-hero { padding: 16px; }
    .result-card .result-body { padding: 16px; }
    .result-table th, .result-table td { padding: 9px 14px; }
    .result-card .result-score { font-size: 46px; }
    .result-card .result-donut { width: 142px; margin: 8px auto; padding: 12px; }
    .result-card .result-donut .result-score { font-size: 36px; }
    .result-card .result-eyebrow { margin-bottom: 6px; }
    .result-card .result-encouragement { margin-top: 10px; }
}
.quiz-celebration { position: fixed; inset: 0; z-index: 3000; pointer-events: none; display: grid; place-items: center; overflow: hidden; }
.quiz-celebration strong { position: relative; z-index: 1; padding: 16px 26px; border-radius: 16px; color: #fff; background: #124e3eef; font: 800 clamp(24px, 5vw, 44px) system-ui, sans-serif; box-shadow: 0 8px 35px #0003; animation: quiz-badge 9.8s both; }
.quiz-spark { position: absolute; left: 50%; top: 45%; width: 8px; height: 12px; border-radius: 2px; animation: quiz-spark 4.5s ease-out both; }
@keyframes quiz-spark { from { transform: translate(0, 0) rotate(0); opacity: 1; } to { transform: translate(var(--x), var(--y)) rotate(540deg); opacity: 0; } }
@keyframes quiz-badge { 0%, 100% { opacity: 0; transform: scale(.9); } 15%, 80% { opacity: 1; transform: scale(1); } }
.result-animated .result-status { animation: result-pill-pop 1.4s ease-out, result-pill-glow 3s ease-in-out 1.4s 2; }
.result-animated .result-status.fail { animation: result-pill-pop 1.4s ease-out, result-pill-red 3s ease-in-out 1.4s 1; }
.result-screen-pass { background: radial-gradient(ellipse at center, transparent 45%, #2aae701a); }
.result-screen-fail { background: radial-gradient(ellipse at center, transparent 35%, #bd363624); animation: result-screen-glow 7s ease-out both; }
.result-screen-fail strong { background: #fff1f2f5; color: #b91c1c; font-size: clamp(20px, 4vw, 32px); font-weight: 900; border: 0; border-radius: 0; padding: 24px 36px; filter: drop-shadow(0 5px 6px #772f3533); clip-path: polygon(0 0, 42% 0, 45% 13%, 48% 0, 100% 0, 100% 38%, 96% 46%, 100% 52%, 100% 100%, 61% 100%, 58% 86%, 55% 100%, 0 100%, 0 64%, 4% 57%, 0 49%); animation-duration: 7s; }
.result-screen-fail strong::after { content: ''; position: absolute; inset: 8px; border: 2px dashed #d4777f; pointer-events: none; clip-path: polygon(0 0, 40% 0, 40% 15%, 51% 15%, 51% 0, 100% 0, 100% 100%, 63% 100%, 63% 85%, 52% 85%, 52% 100%, 0 100%); }
.result-card:has(.result-status.fail) .result-encouragement { color: #ffb4b4; font-weight: 800; }
.quiz-sorry-particle { position: absolute; top: -12px; width: 5px; height: 9px; border-radius: 50%; opacity: 0; animation: result-sorry-fall 5.5s ease-in both; }
@keyframes result-sorry-fall { 0% { opacity: 0; transform: translate(0, 0) rotate(-15deg); } 20% { opacity: .7; } 100% { opacity: 0; transform: translate(var(--drift), 65vh) rotate(30deg); } }
@keyframes result-pill-pop { from { transform: scale(.8); opacity: .4; } 65% { transform: scale(1.08); } to { transform: scale(1); opacity: 1; } }
@keyframes result-pill-glow { 50% { box-shadow: 0 0 0 8px #45b87522, 0 0 28px #45b87577; } }
@keyframes result-pill-red { 50% { box-shadow: 0 0 0 7px #ef777722, 0 0 24px #ef777766; } }
@keyframes result-screen-glow { 0%, 100% { opacity: 0; } 30%, 70% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .quiz-celebration { display: none; } .result-animated .result-status { animation: none !important; } }
@media(max-width: 480px) { .result-card { margin: 12px auto; border-radius: 16px; } .result-card .result-body { padding: 16px; } .result-table th, .result-table td { padding: 12px; } .result-actions .button { width: 100%; } }
