:root{font-family:Inter,system-ui,-apple-system,Segoe UI,Arial,sans-serif;color:#17304b;background:#f4f7fa;font-synthesis:none}
*{box-sizing:border-box}body{margin:0;min-height:100vh}button,input{font:inherit}button{cursor:pointer}button:disabled{opacity:.5;cursor:not-allowed}
.topbar{background:#10283f;color:#fff;padding:17px clamp(16px,5vw,72px);display:flex;align-items:center;justify-content:space-between;gap:20px}
.brand{display:flex;align-items:center;gap:13px}.brand-mark{background:#008d80;border-radius:13px;color:#fff;width:42px;height:42px;display:grid;place-items:center;font-size:24px;font-weight:900}.brand-line{font-size:13px;letter-spacing:.11em;font-weight:800;display:block}.brand small{font-size:11px;color:#b6ccda}.topmeta{font-size:12px;letter-spacing:.06em;font-weight:800;white-space:nowrap}
.container{max-width:920px;margin:50px auto 64px;padding:0 18px;min-height:calc(100vh - 210px)}.card{background:#fff;border:1px solid #e7edf1;box-shadow:0 12px 35px rgba(21,44,68,.07);border-radius:22px;padding:clamp(22px,5vw,48px)}
.welcome{max-width:730px;margin:auto}.eyebrow{color:#008f83;font-size:12px;font-weight:800;letter-spacing:.1em;margin:0 0 12px}.welcome h1,.completion h1{font-size:clamp(30px,4.2vw,46px);line-height:1.14;letter-spacing:-.04em;margin:0 0 14px}.intro{color:#5a6f82;line-height:1.65;max-width:600px;font-size:15px}
.summary-list{display:grid;grid-template-columns:repeat(3,1fr);background:#edf7f6;border-radius:16px;margin:30px 0;padding:19px 0;text-align:center}.summary-list>div+div{border-left:1px solid #cfe2df}.summary-list strong{font-size:26px;display:block}.summary-list span{font-size:12px;color:#627b8a}
#register-form{display:grid;gap:10px}label{font-weight:700;font-size:13px;margin-top:7px}input{width:100%;border:1px solid #d3dfe7;padding:13px 15px;border-radius:10px;outline:none;color:#17304b;background:#fff}input:focus{border-color:#009c8b;box-shadow:0 0 0 3px rgba(0,156,139,.09)}.tiny{font-size:12px;line-height:1.6;color:#677b89}.primary{border:0;background:#008f83;color:white;font-weight:800;border-radius:11px;padding:15px 19px;display:flex;align-items:center;justify-content:space-between;gap:20px}.primary:hover{background:#007669}.secondary{border:1px solid #bed6d3;background:#e8f7f4;color:#00766c;font-weight:800;border-radius:10px;padding:12px 16px}.danger{border:0;background:#b53f46;color:#fff;font-weight:800;border-radius:10px;padding:12px 16px}
.error{color:#a93233;background:#fff0ee;border:1px solid #ffd2cd;padding:11px 13px;border-radius:9px;font-size:13px}.demo-flag{margin-top:20px;padding:11px 13px;background:#fff5e7;color:#9b6307;border-radius:9px;font-size:12px}
.statline{display:flex;align-items:center;justify-content:space-between;gap:20px;margin:0 4px 15px;font-weight:800}.muted{font-size:13px;font-weight:400;color:#6c7e8f}.timer{background:#e7f2f2;color:#007f73;padding:10px 14px;border-radius:9px;font-size:17px;font-variant-numeric:tabular-nums}.timer.warning{color:#a54811;background:#fff2e5}.progress-track{height:8px;background:#dce7eb;border-radius:99px;margin-bottom:20px;overflow:hidden}.progress-track span{display:block;height:100%;background:#00a28e;transition:width .3s}
.question-card{min-height:510px}.question-card h2{margin:0 0 26px;font-size:clamp(23px,3.5vw,30px);letter-spacing:-.025em}.passage{background:#f2f8fa;border-left:4px solid #009c8b;padding:20px 22px;line-height:1.75;color:#29445c;margin-bottom:25px;border-radius:0 12px 12px 0}.prompt{font-weight:700;font-size:16px;line-height:1.65;margin:0 0 22px}.options{display:grid;gap:12px}.choice{display:flex;gap:14px;align-items:flex-start;padding:15px 18px;border:1px solid #dce7eb;border-radius:12px;cursor:pointer;transition:background .14s,border .14s}.choice:hover{background:#f3f9fa}.choice.selected{border-color:#008f83;background:#edf9f6}.choice input{width:18px;height:18px;accent-color:#008f83;margin:2px 0 0;flex:0 0 18px}.choice strong{color:#008f83;margin-right:5px}.choice span{line-height:1.5}
.audio-panel{padding:19px 20px;background:#eaf5f4;border-radius:13px;margin:0 0 25px}.audio-heading{display:flex;align-items:center;gap:12px;margin-bottom:13px}.audio-heading strong{display:block}.audio-heading small{display:block;color:#5e7c8d;font-size:12px;margin-top:2px}.speaker-symbol{width:42px;height:42px;border-radius:50%;background:#c8e7e3;color:#007e71;display:grid;place-items:center;font-size:22px}audio{width:100%;height:45px}.speed-control{display:flex;align-items:center;justify-content:flex-start;flex-wrap:wrap;gap:7px;font-size:12px;color:#536e80;margin-top:12px}.speed{background:#fff;border:1px solid #cde0df;color:#536e80;border-radius:7px;padding:5px 9px}.speed.active{background:#007d72;color:#fff}
.speaking-panel{background:#f2f8fa;border-radius:13px;padding:19px}.recorder{display:flex;justify-content:space-between;gap:20px;align-items:center;margin:19px 0 15px}.record-clock{font-weight:800;font-size:19px;font-variant-numeric:tabular-nums}.record-actions{display:flex;gap:8px}.speech-result{border-top:1px solid #d6e3e8;margin-top:18px;padding-top:15px;color:#28495b;font-size:14px;line-height:1.6}
.question-actions{border-top:1px solid #e8edf1;display:flex;align-items:center;justify-content:space-between;gap:15px;margin-top:35px;padding-top:24px}.save-state{color:#788b9a;font-size:12px}.footer-note{text-align:center;font-size:12px;color:#77909d;margin-top:26px}.completion{max-width:720px;margin:auto;text-align:center}.complete-icon{display:grid;place-items:center;width:66px;height:66px;margin:0 auto 23px;border-radius:50%;background:#dbf4eb;color:#008f83;font-size:32px}.score-box{margin:30px auto 20px;background:#edf7f6;padding:25px;border-radius:15px;max-width:320px}.score-box span{display:block;font-size:12px;letter-spacing:.1em;color:#587883;font-weight:800}.score-box strong{display:block;font-size:42px;margin-top:5px}.completion .intro{margin:0 auto}.skill-results{display:grid;grid-template-columns:repeat(2,1fr);gap:10px;margin:25px auto}.skill-results div{background:#f4f7fa;border-radius:10px;padding:14px;text-align:left}.skill-results strong{float:right}.page-footer{text-align:center;color:#90a1ae;font-size:11px;padding:20px}body.exam-active{user-select:none;-webkit-user-select:none}
@media(max-width:550px){.topmeta{display:none}.brand-line{font-size:11px}.container{margin:22px auto 35px;padding:0 12px}.card{border-radius:16px;padding:22px}.question-actions{flex-direction:column;align-items:stretch}.question-actions .primary{width:100%}.summary-list strong{font-size:22px}.statline{font-size:13px}.choice{padding:13px}.skill-results{grid-template-columns:1fr}}
.writing-panel{background:#f2f8fa;border:1px solid #cee4e0;padding:18px;border-radius:13px}
.writing-panel label{display:block;margin:0 0 11px;font-size:14px}
.writing-panel textarea{display:block;width:100%;min-height:106px;padding:14px 15px;resize:vertical;border-radius:10px;border:1px solid #a7c5c4;background:#fff;color:#17304b;font:inherit;font-size:17px;line-height:1.45;letter-spacing:.015em;user-select:text;-webkit-user-select:text}
.writing-panel textarea:focus{outline:3px solid #a8e1d8;outline-offset:1px}
.exam-watermark{position:fixed;top:45%;left:15%;transform:rotate(-22deg);font-size:clamp(16px,3vw,26px);font-weight:800;color:rgba(48,74,88,.11);pointer-events:none;z-index:100;white-space:pre-wrap;max-width:65vw;text-align:center;letter-spacing:.12em}

.cesmag-logo{width:68px;height:58px;object-fit:contain;filter:drop-shadow(0 2px 2px #0003)}
.writing-panel textarea{min-height:155px}
@media print{.topbar,.page-footer,.question-actions{display:none!important}}

.student-response{white-space:pre-wrap;overflow-wrap:anywhere;background:#fff;border:1px solid #cddfe4;border-radius:8px;padding:14px;line-height:1.6;font:inherit;min-height:45px}
.review-card select,.review-card textarea{font:inherit}

/* RA Security V3: deterrent only; do not disable the writing editor's normal selection. */
body.exam-active .passage,body.exam-active .prompt,body.exam-active .options,
body.exam-active .question-card h2,body.exam-active .question-card .eyebrow {
 user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;
}
body.exam-active textarea {user-select:text;-webkit-user-select:text;}
