:root{--ink:#20203e;--muted:#676b84;--purple:#6547b8;--purple-dark:#422b89;--violet:#eee8ff;--mint:#d8f7e8;--green:#18734e;--red:#b83e4d;--paper:#fffefa;--line:#e0dcee;--shadow:0 18px 55px rgba(47,33,95,.13)}
*{box-sizing:border-box}html{min-height:100%;background:#eee9ff}body{min-height:100vh;margin:0;color:var(--ink);font-family:ui-rounded,"SF Pro Rounded",Nunito,system-ui,-apple-system,sans-serif;background:radial-gradient(circle at 10% 12%,rgba(255,255,255,.92) 0 5px,transparent 6px),linear-gradient(150deg,#f4f0ff 0%,#e9e1ff 58%,#fff2b9 150%);background-size:125px 125px,auto}button{font:inherit}.practice-shell{width:min(100%,980px);min-height:100vh;margin:auto;padding:max(24px,env(safe-area-inset-top)) 18px max(36px,env(safe-area-inset-bottom))}.crumb{display:inline-flex;color:var(--purple);font-weight:900;text-decoration:none}.page-head{max-width:790px;margin:32px 0 25px}.eyebrow{margin:0 0 8px;color:var(--purple);font-size:.78rem;font-weight:950;letter-spacing:.1em;text-transform:uppercase}h1{margin:0;color:var(--purple-dark);font-size:clamp(2.1rem,7vw,4rem);line-height:1;letter-spacing:-.05em}.page-head>p:not(.eyebrow){color:var(--muted);font-weight:700}.topic-list{padding:10px 13px;border-radius:13px;color:var(--purple-dark);background:#fff9;font-size:.8rem;font-weight:800;line-height:1.6}.quiz-head,.question-card,.result-card,.history{border:3px solid #fff;border-radius:24px;background:var(--paper);box-shadow:var(--shadow)}.quiz-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px;padding:13px 17px}.progress-copy{color:var(--muted);font-size:.86rem;font-weight:900}.progress-track{height:10px;margin-top:7px;border-radius:20px;background:#ebe7f4;overflow:hidden}.progress-fill{height:100%;border-radius:inherit;background:linear-gradient(90deg,#8d73df,#6547b8);transition:width .2s}.score-mini{white-space:nowrap;color:var(--purple-dark);font-weight:950}.question-card,.result-card{padding:clamp(19px,4vw,32px)}.question-meta{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-bottom:14px}.tag{padding:6px 10px;border-radius:99px;background:var(--violet);color:var(--purple);font-size:.72rem;font-weight:950;text-transform:uppercase;letter-spacing:.04em}.difficulty{color:var(--muted);font-size:.76rem;font-weight:850}.prompt{margin:0 0 17px;font-size:clamp(1.25rem,4vw,1.8rem);line-height:1.3;letter-spacing:-.025em}.chart-wrap{width:100%;margin:14px 0 18px;padding:10px;border:1px solid var(--line);border-radius:15px;background:#fff;overflow-x:auto}.chart-wrap svg{display:block;width:100%;min-width:470px;height:auto}.chart-wrap figcaption{margin:5px 4px 0;color:var(--muted);font-size:.76rem;font-weight:700}.data-table-wrap{overflow-x:auto;margin:14px 0}.data-table{width:100%;border-collapse:collapse;background:#fff}.data-table th,.data-table td{padding:10px 12px;border:1px solid var(--line);text-align:center}.data-table th{background:#f2edff;color:var(--purple-dark);font-size:.86rem}.data-table td{font-weight:800}.choices{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.choice{display:flex;align-items:center;gap:10px;min-height:54px;padding:10px 13px;border:2px solid var(--line);border-radius:15px;background:white;text-align:left;color:var(--ink);font-weight:850;cursor:pointer}.choice:hover,.choice.selected{border-color:var(--purple);background:#f5f1ff}.choice:disabled{cursor:default}.choice-letter{display:grid;flex:0 0 28px;width:28px;height:28px;place-items:center;border-radius:9px;background:#f0ecfa;color:var(--purple);font-weight:950}.choice.correct{border-color:var(--green);background:#edfbf4;color:var(--green)}.choice.wrong{border-color:var(--red);background:#fff0f2;color:var(--red)}.feedback{margin:16px 0;padding:14px 15px;border-radius:14px;background:#f2f0f7;color:var(--muted);line-height:1.55;font-weight:700}.feedback.correct{background:#edfbf4;color:#155c3e}.feedback.wrong{background:#fff0f2;color:#912c3a}.actions,.result-actions{display:flex;justify-content:flex-end;gap:10px;flex-wrap:wrap;margin-top:16px}.btn{min-height:48px;padding:0 19px;border:0;border-radius:14px;font-weight:950;cursor:pointer}.btn-primary{background:var(--purple);color:white;box-shadow:0 5px 0 var(--purple-dark)}.btn-secondary{border:2px solid var(--line);background:#fff;color:var(--purple);text-decoration:none;display:inline-grid;place-items:center}.btn:disabled{opacity:.55;cursor:default}.result-card h2,.history h2{color:var(--purple-dark)}.result-score{margin:6px 0 18px;font-size:1.2rem;color:var(--muted);font-weight:850}.review-item{padding:16px 0;border-top:1px solid var(--line)}.review-item h3{margin:0 0 7px;font-size:1.04rem}.review-item p{margin:6px 0;line-height:1.5}.review-answer{font-weight:850}.review-ok{color:var(--green)}.review-no{color:var(--red)}.history{margin-top:16px;padding:16px 20px}.history summary{color:var(--purple-dark);font-weight:950;cursor:pointer}.history ol{margin:12px 0 0;padding-left:21px;color:var(--muted)}.history li{padding:4px 0;font-weight:750}.empty-history{color:var(--muted);font-size:.88rem}.chart-legend{display:flex;gap:14px;flex-wrap:wrap;margin:3px 0 8px;color:var(--muted);font-size:.74rem;font-weight:800}.legend-key{display:inline-flex;align-items:center;gap:5px}.legend-swatch{width:11px;height:11px;border-radius:3px;background:#6b57c6}.legend-swatch.alt{background:#28a879}
.chart-title{font:800 14px system-ui,sans-serif;fill:#422b89}.grid{stroke:#e9e5f1;stroke-width:1}.axis{stroke:#5b5970;stroke-width:1.6}.tick{font:700 12px system-ui,sans-serif;fill:#54566b}.value-label{font:800 12px system-ui,sans-serif;fill:#33334c}.axis-label{font:800 12px system-ui,sans-serif;fill:#42435a}.legend{font:700 12px system-ui,sans-serif;fill:#4c4d62}.pie-label{font:900 12px system-ui,sans-serif;fill:#fff;text-shadow:0 1px 2px #333}
@media(max-width:620px){.practice-shell{padding-left:12px;padding-right:12px}.quiz-head{align-items:flex-start}.choices{grid-template-columns:1fr}.question-card,.result-card{padding:18px 14px}.topic-list{font-size:.74rem}.chart-wrap svg{min-width:500px}.actions .btn{flex:1}.review-item{font-size:.92rem}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important}}
