/* Base exam UI */
body.lesson-exam-open{overflow:hidden}.lesson-exam-modal{position:fixed;inset:0;z-index:11000;background:rgba(4,24,18,.82);display:grid;place-items:center;padding:22px}.lesson-exam-dialog{width:min(1100px,96vw);height:min(900px,92vh);background:#fff;border-radius:14px;overflow:hidden;display:grid;grid-template-rows:auto 1fr;box-shadow:0 30px 90px rgba(0,0,0,.35)}.lesson-exam-toolbar{display:flex;justify-content:space-between;align-items:flex-start;gap:18px;padding:18px 22px;border-bottom:1px solid #dce5e1}.lesson-exam-toolbar>div{display:grid;gap:4px}.lesson-exam-toolbar span{font-size:11px;font-weight:900;letter-spacing:.14em;color:#56746a}.lesson-exam-toolbar b{font-size:18px;color:#173b30}.lesson-exam-toolbar small{color:#71817b}.lesson-exam-close{width:42px;height:42px;border:0;border-radius:9px;background:#eef3f0;color:#173b30;font-size:28px;cursor:pointer}.lesson-exam-form{min-height:0;display:grid;grid-template-rows:1fr auto}.lesson-exam-scroll{overflow:auto;padding:20px 22px 26px;background:#f7faf8}.lesson-exam-question{border:1px solid #d9e4de;border-radius:12px;background:#fff;padding:18px;margin:0 0 14px}.lesson-exam-question legend{display:flex;gap:10px;align-items:flex-start;font-weight:800;color:#173b30;padding:0 6px}.lesson-exam-question legend>span{flex:0 0 28px;width:28px;height:28px;border-radius:50%;background:#e4f1eb;display:grid;place-items:center;color:#17684f;font-size:13px}.lesson-exam-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:14px}.lesson-exam-options label{border:1px solid #d9e4de;border-radius:10px;padding:12px 13px;display:flex;align-items:center;gap:10px;cursor:pointer;transition:.15s;background:#fff}.lesson-exam-options label:has(input:checked){border-color:#2d7a60;background:#edf7f2}.lesson-exam-options input{accent-color:#26775b}.exam-letter{width:28px;height:28px;border-radius:7px;background:#e7f0eb;display:grid;place-items:center;font-weight:900;color:#276f57}.lesson-exam-footer{display:flex;justify-content:space-between;align-items:center;gap:18px;padding:14px 22px;border-top:1px solid #dce5e1;background:#fff}.lesson-exam-footer #lessonExamError,.lesson-exam-footer #integrityExamError{color:#b33535;font-weight:700}.lesson-exam-loading{height:100%;display:grid;place-items:center;font-size:18px;color:#526c63}.lesson-exam-result{width:min(720px,94vw);background:#fff;border-radius:16px;padding:44px;text-align:center;box-shadow:0 30px 90px rgba(0,0,0,.35)}.exam-result-icon{width:78px;height:78px;border-radius:50%;display:grid;place-items:center;margin:0 auto 14px;font-size:38px;font-weight:900}.lesson-exam-result.passed .exam-result-icon{background:#e0f2e9;color:#197052}.lesson-exam-result.failed .exam-result-icon{background:#f8e8e8;color:#b13c3c}.lesson-exam-result h2{font-size:36px;margin:8px 0 10px;color:#143b30}.exam-result-score{font-size:28px;font-weight:900;color:#1d6d53;margin-bottom:12px}.lesson-exam-result p{color:#6d7d77;font-size:17px;line-height:1.55}.exam-result-actions{display:flex;justify-content:center;gap:10px;flex-wrap:wrap;margin-top:24px}
/* Integrity mode */
.lesson-exam-modal.integrity-owned{z-index:14500;background:rgba(3,28,21,.88);padding:14px}.integrity-dialog{width:min(1180px,96vw);height:min(930px,96dvh);background:#fff;border-radius:18px;overflow:hidden;display:grid;grid-template-rows:auto auto 1fr;position:relative;box-shadow:0 30px 90px rgba(0,0,0,.42)}.integrity-dialog:fullscreen,.integrity-diagnostic-dialog:fullscreen{width:100vw!important;height:100vh!important;max-width:none!important;max-height:none!important;border-radius:0!important;margin:0!important}.integrity-preflight{margin:auto;max-width:760px;padding:44px 52px;text-align:center;display:grid;gap:18px}.integrity-preflight h2{font-size:34px;margin:0;color:#153c30}.integrity-preflight p{font-size:17px;color:#61756e;margin:0}.integrity-shield{width:72px;height:72px;margin:0 auto;border-radius:50%;display:grid;place-items:center;background:#e4f3eb;color:#167a58;font-size:34px;font-weight:900}.integrity-rules{display:grid;gap:10px;text-align:left;margin:10px 0}.integrity-rules>div{display:grid;grid-template-columns:34px 1fr;gap:12px;align-items:start;padding:13px 14px;border:1px solid #dbe6e1;border-radius:12px;background:#f8fbf9}.integrity-rules b{width:28px;height:28px;border-radius:50%;display:grid;place-items:center;background:#e6f2ec;color:#176b50}.integrity-rules span{line-height:1.45;color:#314b42}.integrity-rules strong{color:#a33027}.integrity-preflight-actions{display:flex;gap:10px;justify-content:center}.integrity-start-error{min-height:20px;color:#b43b30;font-weight:700}.exam-integrity-bar{display:flex;justify-content:space-between;gap:18px;align-items:center;padding:9px 18px;background:#eef7f2;border-bottom:1px solid #d3e6dc;color:#34584b;font-size:13px}.exam-integrity-bar b{color:#0c6a4c}.exam-integrity-bar span:last-child{white-space:nowrap}.exam-integrity-lock{position:absolute;inset:0;z-index:30;background:rgba(5,30,22,.86);display:grid;place-items:center;padding:22px}.exam-integrity-lock-card{width:min(560px,92%);background:#fff;border-radius:18px;padding:34px;text-align:center;display:grid;gap:14px;box-shadow:0 24px 70px rgba(0,0,0,.35)}.exam-integrity-lock-card h2{margin:0;font-size:28px;color:#7d241e}.exam-integrity-lock-card p{margin:0;color:#60736c;line-height:1.5}.integrity-warning{width:64px;height:64px;margin:auto;border-radius:50%;display:grid;place-items:center;background:#fde9e6;color:#c53a2f;font-size:34px;font-weight:900}.integrity-result{display:flex;justify-content:center;gap:12px;flex-wrap:wrap;margin:14px 0}.integrity-result span{padding:8px 12px;border-radius:999px;background:#eef5f1;color:#36574c}.integrity-result b{color:#a43128}.diagnostic-integrity-gate{position:absolute;inset:0;z-index:20;background:#fff;display:grid;overflow:auto}.integrity-diagnostic-dialog{position:relative!important}.diag-integrity-result{margin-top:12px}.integrity-owned .lesson-exam-toolbar{flex:0 0 auto}.integrity-owned .lesson-exam-form{min-height:0;display:grid;grid-template-rows:1fr auto;overflow:hidden}.integrity-owned .lesson-exam-scroll{min-height:0;overflow:auto}.integrity-owned .lesson-exam-footer{position:relative;background:#fff}.integrity-dialog:fullscreen .lesson-exam-scroll{max-height:none}.mobile-exam-timer{display:none}
@media(max-width:900px){.lesson-exam-modal{padding:8px}.lesson-exam-dialog{width:100%;height:96vh}.lesson-exam-options{grid-template-columns:1fr}}
@media(max-width:800px){.lesson-exam-modal.integrity-owned{padding:0}.integrity-dialog{width:100vw;height:100dvh;border-radius:0}.integrity-preflight{padding:28px 18px}.integrity-preflight h2{font-size:26px}.integrity-preflight-actions{flex-direction:column}.exam-integrity-bar{align-items:flex-start;flex-direction:column;gap:4px;padding:8px 12px;font-size:11px}.exam-integrity-bar span:last-child{white-space:normal}.exam-integrity-lock{padding:12px}.exam-integrity-lock-card{padding:24px 18px}.integrity-rules>div{grid-template-columns:30px 1fr;padding:11px}.integrity-result{gap:7px}.integrity-result span{font-size:12px}.diagnostic-integrity-gate .integrity-preflight{min-height:100%}}
@media(max-width:520px){.lesson-exam-toolbar{padding:14px}.lesson-exam-toolbar b{font-size:15px}.lesson-exam-scroll{padding:14px}.lesson-exam-question{padding:14px}.lesson-exam-footer{align-items:stretch;flex-direction:column;padding:12px 14px}.lesson-exam-footer .green-btn{width:100%}.lesson-exam-result{padding:30px 20px}.lesson-exam-result h2{font-size:28px}}
@media (max-width:800px), (pointer:coarse){.mobile-exam-timer{position:fixed;top:calc(8px + env(safe-area-inset-top));right:calc(58px + env(safe-area-inset-right));z-index:2147482500;display:flex;align-items:center;gap:6px;min-width:92px;justify-content:center;padding:9px 12px;border-radius:999px;background:#0c3c2f;color:#fff;border:1px solid rgba(255,255,255,.22);box-shadow:0 8px 24px rgba(0,0,0,.2);font-variant-numeric:tabular-nums;pointer-events:none}.mobile-exam-timer span{font-size:14px;line-height:1}.mobile-exam-timer b{font-size:15px;line-height:1;letter-spacing:.03em}.mobile-exam-timer.warning{background:#8a5a0a}.mobile-exam-timer.danger{background:#9d2f26;animation:mobileTimerPulse 1s ease-in-out infinite}.mobile-exam-timer.expired{background:#741f1a}}@keyframes mobileTimerPulse{50%{transform:scale(1.04)}}
