:root{--mp-primary:#2563eb;--mp-primary-dark:#1d4ed8;--mp-primary-light:#eff6ff;--mp-success:#16a34a;--mp-success-bg:#f0fdf4;--mp-error:#dc2626;--mp-error-bg:#fef2f2;--mp-warning:#d97706;--mp-warning-bg:#fffbeb;--mp-neutral:#6b7280;--mp-border:#e5e7eb;--mp-bg:#fff;--mp-surface:#f9fafb;--mp-text:#111827;--mp-text-muted:#6b7280;--mp-radius:10px;--mp-radius-sm:6px;--mp-shadow:0 1px 3px rgba(0,0,0,.08),0 1px 2px rgba(0,0,0,.06);--mp-shadow-md:0 4px 12px rgba(0,0,0,.1);--mp-font:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif;--mp-transition:.18s ease}.mathprep-quiz,.mathprep-browse{font-family:var(--mp-font);color:var(--mp-text);max-width:820px;margin:0 auto 2rem}.mathprep-toolbar{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:.5rem;padding:.75rem 1rem;background:var(--mp-surface);border:1px solid var(--mp-border);border-radius:var(--mp-radius);margin-bottom:1rem}.mathprep-toolbar-left,.mathprep-toolbar-right{display:flex;align-items:center;gap:.5rem;flex-wrap:wrap}.mathprep-toggle-group{display:inline-flex;border:1px solid var(--mp-border);border-radius:var(--mp-radius-sm);overflow:hidden}.mathprep-toggle{background:var(--mp-bg);border:none;padding:.35rem .75rem;font-size:.82rem;cursor:pointer;color:var(--mp-text-muted);transition:background var(--mp-transition),color var(--mp-transition);white-space:nowrap}.mathprep-toggle+.mathprep-toggle{border-left:1px solid var(--mp-border)}.mathprep-toggle.active,.mathprep-toggle:hover{background:var(--mp-primary);color:#fff}.mathprep-timer-bar{background:var(--mp-warning-bg);border:1px solid #fde68a;border-radius:var(--mp-radius);padding:.5rem 1rem;margin-bottom:1rem}.mathprep-timer-inner{display:flex;align-items:center;gap:.75rem}.mathprep-timer-display{font-size:1.4rem;font-weight:700;font-variant-numeric:tabular-nums;color:var(--mp-warning);letter-spacing:.05em}.mathprep-timer-display.mathprep-timer-warning{color:var(--mp-error);animation:mp-pulse .6s infinite alternate}@keyframes mp-pulse{from{opacity:1}to{opacity:.5}}.mathprep-progress-wrap{display:flex;align-items:center;gap:.75rem;margin-bottom:1rem}.mathprep-progress-bar{flex:1;height:6px;background:var(--mp-border);border-radius:99px;overflow:hidden}.mathprep-progress-fill{height:100%;background:var(--mp-primary);border-radius:99px;transition:width .3s ease}.mathprep-progress-label{font-size:.82rem;color:var(--mp-text-muted);white-space:nowrap}.mathprep-question{background:var(--mp-bg);border:1px solid var(--mp-border);border-radius:var(--mp-radius);padding:1.5rem;margin-bottom:1.25rem;box-shadow:var(--mp-shadow);transition:box-shadow var(--mp-transition)}.mathprep-question:hover{box-shadow:var(--mp-shadow-md)}.mathprep-q-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:.875rem;flex-wrap:wrap;gap:.4rem}.mathprep-q-meta{display:flex;gap:.375rem;flex-wrap:wrap}.mathprep-q-number{font-size:.78rem;font-weight:600;color:var(--mp-text-muted);background:var(--mp-surface);padding:.2rem .55rem;border-radius:99px;border:1px solid var(--mp-border)}.mathprep-q-text{font-size:1.05rem;line-height:1.7;margin-bottom:1.25rem}.mathprep-choices{display:flex;flex-direction:column;gap:.5rem;margin-bottom:1rem}.mathprep-choice{display:flex;align-items:flex-start;gap:.75rem;padding:.75rem 1rem;border:2px solid var(--mp-border);border-radius:var(--mp-radius-sm);cursor:pointer;transition:border-color var(--mp-transition),background var(--mp-transition);position:relative}.mathprep-choice input[type=radio]{position:absolute;opacity:0;width:0;height:0}.mathprep-choice-letter{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;min-width:28px;border-radius:50%;background:var(--mp-surface);border:1px solid var(--mp-border);font-size:.8rem;font-weight:700;color:var(--mp-text-muted);transition:background var(--mp-transition),color var(--mp-transition),border-color var(--mp-transition)}.mathprep-choice-content{flex:1;font-size:.97rem;line-height:1.55}.mathprep-choice:hover{border-color:var(--mp-primary);background:var(--mp-primary-light)}.mathprep-choice:hover .mathprep-choice-letter{background:var(--mp-primary);color:#fff;border-color:var(--mp-primary)}.mathprep-choice.selected{border-color:var(--mp-primary);background:var(--mp-primary-light)}.mathprep-choice.selected .mathprep-choice-letter{background:var(--mp-primary);color:#fff;border-color:var(--mp-primary)}.mathprep-choice.correct{border-color:var(--mp-success);background:var(--mp-success-bg)}.mathprep-choice.correct .mathprep-choice-letter{background:var(--mp-success);color:#fff;border-color:var(--mp-success)}.mathprep-choice.incorrect{border-color:var(--mp-error);background:var(--mp-error-bg)}.mathprep-choice.incorrect .mathprep-choice-letter{background:var(--mp-error);color:#fff;border-color:var(--mp-error)}.mathprep-choice.locked{pointer-events:none;opacity:.7}.mathprep-study-actions{margin-top:.75rem}.mathprep-test-mode .mathprep-study-actions{display:none !important}.mathprep-feedback{margin-top:1rem;border-top:1px solid var(--mp-border);padding-top:1rem}.mathprep-feedback-verdict{font-weight:700;font-size:1rem;margin-bottom:.5rem}.mathprep-feedback-verdict.correct{color:var(--mp-success)}.mathprep-feedback-verdict.incorrect{color:var(--mp-error)}.mathprep-explanation{background:var(--mp-surface);border:1px solid var(--mp-border);border-radius:var(--mp-radius-sm);padding:.875rem 1rem;font-size:.95rem;line-height:1.65}.mathprep-explanation strong{display:block;margin-bottom:.4rem;font-size:.8rem;text-transform:uppercase;letter-spacing:.04em;color:var(--mp-text-muted)}.mathprep-nav{display:flex;align-items:center;gap:.75rem;margin-top:1.25rem}.mathprep-btn{display:inline-flex;align-items:center;justify-content:center;gap:.375rem;padding:.5rem 1.125rem;font-size:.9rem;font-weight:600;border-radius:var(--mp-radius-sm);border:2px solid transparent;cursor:pointer;text-decoration:none;transition:background var(--mp-transition),border-color var(--mp-transition),color var(--mp-transition),transform var(--mp-transition);white-space:nowrap;font-family:var(--mp-font)}.mathprep-btn:hover{transform:translateY(-1px);text-decoration:none}.mathprep-btn:active{transform:none}.mathprep-btn-primary{background:var(--mp-primary);color:#fff;border-color:var(--mp-primary)}.mathprep-btn-primary:hover{background:var(--mp-primary-dark);border-color:var(--mp-primary-dark);color:#fff}.mathprep-btn-ghost{background:0 0;color:var(--mp-text-muted);border-color:var(--mp-border)}.mathprep-btn-ghost:hover{background:var(--mp-surface);color:var(--mp-text);border-color:var(--mp-primary)}.mathprep-btn-check{background:var(--mp-primary-light);color:var(--mp-primary);border-color:var(--mp-primary)}.mathprep-btn-check:hover{background:var(--mp-primary);color:#fff}.mathprep-btn-submit{background:var(--mp-success);color:#fff;border-color:var(--mp-success)}.mathprep-btn-submit:hover{background:#15803d;color:#fff}.mathprep-btn-upgrade{background:#7c3aed;color:#fff !important;border-color:#7c3aed;text-decoration:none}.mathprep-btn-upgrade:hover{background:#6d28d9;color:#fff !important}.mathprep-btn-large{padding:.7rem 1.5rem;font-size:1rem}.mathprep-btn:disabled{opacity:.45;cursor:not-allowed;transform:none}.mathprep-results{text-align:center;padding:2.5rem 1.5rem;background:var(--mp-bg);border:1px solid var(--mp-border);border-radius:var(--mp-radius);box-shadow:var(--mp-shadow-md);margin-top:1.5rem}.mathprep-results-inner{display:flex;flex-direction:column;align-items:center;gap:1.5rem}.mathprep-score-ring{position:relative;width:140px;height:140px}.mathprep-score-ring svg{width:140px;height:140px;transform:rotate(-90deg)}.mathprep-ring-bg{fill:none;stroke:var(--mp-border);stroke-width:10}.mathprep-ring-fill{fill:none;stroke:var(--mp-primary);stroke-width:10;stroke-linecap:round;stroke-dasharray:326.56;stroke-dashoffset:326.56;transition:stroke-dashoffset 1s ease}.mathprep-score-text{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center}.mathprep-score-num{font-size:2.2rem;font-weight:800;line-height:1;color:var(--mp-text)}.mathprep-score-denom{font-size:.8rem;color:var(--mp-text-muted)}.mathprep-results-detail{width:100%;max-width:460px;text-align:left}.mathprep-result-row{display:flex;align-items:center;gap:.5rem;padding:.45rem 0;border-bottom:1px solid var(--mp-border);font-size:.9rem}.mathprep-result-icon{font-size:1rem}.mathprep-badge{display:inline-flex;align-items:center;padding:.2rem .55rem;border-radius:99px;font-size:.72rem;font-weight:600;letter-spacing:.02em;text-transform:uppercase}.mathprep-badge-exam{background:#dbeafe;color:#1d4ed8}.mathprep-badge-topic{background:#f3e8ff;color:#7e22ce}.mathprep-badge-easy{background:#dcfce7;color:#15803d}.mathprep-badge-medium{background:#fef9c3;color:#a16207}.mathprep-badge-hard{background:#fee2e2;color:#b91c1c}.mathprep-badge-free{background:#dcfce7;color:#15803d}.mathprep-badge-paid{background:#f3e8ff;color:#7e22ce}.mathprep-locked-notice,.mathprep-browse-locked-notice{display:flex;align-items:center;gap:.75rem;flex-wrap:wrap;background:#faf5ff;border:1px dashed #c084fc;border-radius:var(--mp-radius);padding:.875rem 1.25rem;margin-top:1.25rem;font-size:.92rem;color:#6d28d9}.mathprep-lock-icon{font-size:1.1rem}.mathprep-upgrade-banner{background:linear-gradient(135deg,#4f46e5,#7c3aed);border-radius:var(--mp-radius);padding:1.5rem;margin:1.5rem 0;color:#fff}.mathprep-upgrade-inner{display:flex;align-items:center;gap:1rem;flex-wrap:wrap}.mathprep-upgrade-icon{font-size:2rem}.mathprep-upgrade-content{flex:1}.mathprep-upgrade-content strong{display:block;font-size:1.1rem;margin-bottom:.25rem}.mathprep-upgrade-content p{margin:0;opacity:.9;font-size:.92rem}.mathprep-upgrade-banner .mathprep-btn-upgrade{background:#fff;color:#6d28d9 !important;border-color:#fff}.mathprep-upgrade-banner .mathprep-btn-upgrade:hover{background:#f3e8ff}.mathprep-browse-filters{display:flex;align-items:center;gap:.5rem;flex-wrap:wrap;margin-bottom:1.25rem;padding:.875rem 1rem;background:var(--mp-surface);border:1px solid var(--mp-border);border-radius:var(--mp-radius)}.mathprep-browse-filters select,.mathprep-browse-filters input[type=text]{padding:.375rem .625rem;border:1px solid var(--mp-border);border-radius:var(--mp-radius-sm);font-size:.875rem;color:var(--mp-text);background:var(--mp-bg)}.mathprep-random-label{display:flex;align-items:center;gap:.3rem;font-size:.875rem;cursor:pointer}.mathprep-browse-hint{color:var(--mp-text-muted);font-style:italic;text-align:center;padding:2rem 0}.mathprep-browse-item{border:1px solid var(--mp-border);border-radius:var(--mp-radius);margin-bottom:.75rem;overflow:hidden;box-shadow:var(--mp-shadow)}.mathprep-browse-item-header{display:flex;align-items:center;gap:.625rem;padding:.875rem 1rem;cursor:pointer;background:var(--mp-bg);transition:background var(--mp-transition);user-select:none}.mathprep-browse-item-header:hover{background:var(--mp-surface)}.mathprep-browse-item-title{flex:1;font-size:.95rem;font-weight:500}.mathprep-browse-chevron{color:var(--mp-text-muted);font-size:.85rem;transition:transform var(--mp-transition)}.mathprep-browse-item.open .mathprep-browse-chevron{transform:rotate(90deg)}.mathprep-browse-item-body{display:none;padding:0 1rem 1rem;background:var(--mp-bg);border-top:1px solid var(--mp-border)}.mathprep-browse-item.open .mathprep-browse-item-body{display:block}.mathprep-browse-item.locked .mathprep-browse-item-header{opacity:.55;cursor:default}.mathprep-browse-item.locked .mathprep-browse-item-header:hover{background:var(--mp-bg)}.mathprep-spinner{display:inline-block;width:22px;height:22px;border:3px solid var(--mp-border);border-top-color:var(--mp-primary);border-radius:50%;animation:mp-spin .7s linear infinite}@keyframes mp-spin{to{transform:rotate(360deg)}}.mathprep-loading{display:flex;align-items:center;justify-content:center;gap:.75rem;padding:2rem;color:var(--mp-text-muted)}.mathprep-empty-state{text-align:center;padding:2.5rem;color:var(--mp-text-muted);border:2px dashed var(--mp-border);border-radius:var(--mp-radius)}.mathprep-math .katex-display{overflow-x:auto;overflow-y:hidden;padding:.25rem 0}.mathprep-math .katex{font-size:1.05em}@media (max-width:640px){.mathprep-toolbar{flex-direction:column;align-items:stretch}.mathprep-toolbar-left,.mathprep-toolbar-right{justify-content:center}.mathprep-question{padding:1rem}.mathprep-upgrade-inner{flex-direction:column;text-align:center}.mathprep-nav{flex-wrap:wrap;justify-content:center}.mathprep-browse-filters{flex-direction:column;align-items:stretch}.mathprep-browse-filters select{width:100%}}.mathprep-quiz.mode-one .mathprep-all-only{display:none !important}.mathprep-quiz.mode-all .mathprep-one-only{display:none !important}.mathprep-quiz.mode-all.quiz-test .mathprep-submit-all{display:flex !important;justify-content:center;margin-top:1.5rem}