/* Shared exam workspace. All rules are scoped away from course and study pages. */
body.exam-mode{--exam-blue:#354bd1;--exam-ink:#172033;--exam-band:#e6edf8;margin:0;background:#fff;color:var(--exam-ink);overflow:hidden}
body.exam-mode>main{max-width:none;margin:0;padding:0}
body.exam-mode #crumb,body.exam-mode main>footer{display:none}
body.exam-mode .skip-link{z-index:100}
.exam-shell{height:100dvh;display:grid;grid-template-rows:90px minmax(0,1fr) 70px;font:14px/1.45 Arial,Helvetica,sans-serif;background:white;color:var(--exam-ink)}
.exam-shell *{box-sizing:border-box}
.exam-shell [hidden]{display:none!important}
.exam-shell button,.exam-shell a,.exam-dialog button,.exam-dialog a{color:inherit}
.exam-shell button,.exam-dialog button{font:inherit;cursor:pointer;background:transparent;border:0;border-radius:4px;padding:8px 12px;font-weight:400}
.exam-shell button:hover:enabled,.exam-dialog button:hover:enabled{background:#d9e2f0;filter:none}
.exam-shell button:focus-visible,.exam-shell a:focus-visible,.exam-dialog :focus-visible{outline:3px solid #2865cc;outline-offset:3px}
.exam-shell button:disabled{opacity:.45;cursor:default}
.exam-icon{width:22px;height:22px;display:inline-block;vertical-align:middle;flex:none;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.exam-header{display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-rows:1fr auto;gap:0 20px;padding:18px 16px 8px;background:var(--exam-band);border-bottom:2px dashed #111;position:relative;z-index:3}
.exam-header h1{font:600 20px/1.25 Arial,Helvetica,sans-serif;color:#333;letter-spacing:0;text-wrap:wrap;margin:5px 0 0;align-self:start}
.exam-header .exam-directions{grid-column:1;justify-self:start;margin-left:4px;padding:5px 12px;display:flex;gap:8px;align-items:center}
.exam-directions .exam-icon{width:15px;height:15px}
.exam-tools{grid-column:2;grid-row:1/3;display:flex;align-items:flex-end;gap:4px}
.exam-tools>button{display:flex;flex-direction:column;align-items:center;gap:5px;padding:8px;color:#3a4350;font-size:12px;white-space:nowrap}
.exam-tools .exam-icon{width:22px;height:22px}
.exam-work{min-height:0;overflow-y:auto;overscroll-behavior:contain}
.exam-mcq{width:calc(50% - 20px);max-width:1000px;margin:64px auto 70px}
.exam-question-bar{height:38px;display:flex;align-items:center;background:#f3f4f6;border-bottom:2px dashed #111;gap:16px;font:14px Arial,sans-serif}
.exam-question-number{align-self:stretch;display:grid;place-items:center;min-width:32px;padding:0 10px;color:#fff;background:#202b3b;font-size:18px;font-weight:600}
.exam-question-bar .exam-mark{display:flex;align-items:center;gap:4px;padding:4px 2px;border-radius:0}
.exam-mark .exam-icon{width:20px;height:24px;color:#555}
.exam-mark[aria-pressed=true] .exam-icon{fill:#354bd1;stroke:#354bd1}
.exam-question-bar .exam-eliminate{margin-left:auto;margin-right:12px;border:1px solid #202b3b;border-radius:4px;font-weight:700;font-size:14px;padding:2px 5px;background:#fff}
.exam-eliminate[aria-pressed=true]{color:#fff!important;background:#202b3b!important;text-decoration:line-through}
.exam-question-content{padding:16px 56px 0 16px}
.exam-prose{font:18px/1.6 'Times New Roman',Times,serif;overflow-wrap:anywhere;color:#141c30;min-width:0}
.exam-prose p{margin:0 0 20px}
.exam-prose p:last-child{margin-bottom:0}
.exam-prose h2,.exam-prose h3,.exam-prose h4{font-family:'Times New Roman',Times,serif;letter-spacing:0;line-height:1.4;text-wrap:wrap;color:inherit}
.exam-prose h2{font-size:23px}.exam-prose h3{font-size:21px}
.exam-prose pre{white-space:pre;overflow:auto;background:transparent;border:0;border-radius:0;padding:0;margin:28px 0 0;line-height:1.55;max-width:100%}
.exam-prose pre:last-child{margin-bottom:0}
.exam-prose code{font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-size:1em;color:inherit;background:transparent}
.exam-prose img{max-width:100%;height:auto}
.exam-prose table{border-collapse:collapse;max-width:100%;display:block;overflow:auto;font-size:1em}
.exam-prose th,.exam-prose td{padding:6px 10px;border:1px solid #777}
.exam-prose blockquote{border-left:2px solid #aaa;padding-left:16px;margin:15px 0}
.exam-prose mark{background:#fff39a;color:inherit}
.exam-select-help{font:14px/1.5 Arial,sans-serif;margin:24px 0 0;font-weight:600}
.exam-choices{border:0;margin:42px 0 0;padding:0;display:grid;gap:8px;min-width:0}
.exam-choice-row{position:relative;min-width:0}
.exam-choice{position:relative;display:flex;align-items:center;gap:12px;min-height:54px;border:1px solid #444;border-radius:6px;padding:10px;cursor:pointer;background:white;line-height:1.5}
.exam-choice:hover{background:#f7f9fc}
.exam-choice:has(input:checked){border:2px solid #354bd1;padding:9px;background:#edf1ff}
.exam-choice:has(input:focus-visible){outline:3px solid #2865cc;outline-offset:3px}
.exam-choice input{position:absolute;opacity:0;width:1px;height:1px}
.exam-choice-letter{font:600 16px/1 Arial,sans-serif;width:31px;height:31px;border:2px solid #707070;border-radius:50%;display:grid;place-items:center;flex:none;color:#333}
.exam-choice:has(input:checked) .exam-choice-letter{border-color:#354bd1;background:#354bd1;color:white}
.exam-choice-body{min-width:0;flex:1}
.exam-choice-body p,.exam-choice-body pre{margin:0}
.exam-choice-row.is-eliminated .exam-choice{opacity:.5;text-decoration:line-through}
.exam-choice-row .exam-strike{position:absolute;left:calc(100% + 9px);top:50%;transform:translateY(-50%);width:32px;height:32px;border:1px solid #777;border-radius:50%;padding:2px;font-weight:600;font-size:13px;text-decoration:line-through}
.exam-unsure{margin-top:12px!important;text-decoration:underline}
.exam-footer{position:relative;display:flex;align-items:center;justify-content:flex-end;gap:8px;padding:10px 16px;background:var(--exam-band);border-top:2px dashed #111;margin:0}
.exam-footer .exam-position{position:absolute;left:50%;transform:translateX(-50%);display:flex;align-items:center;gap:12px;border-radius:12px;background:#181818;color:white;padding:10px 16px;min-height:40px;white-space:nowrap}
.exam-position .exam-icon{width:18px;height:18px}
.exam-footer .exam-position:hover{background:#303030}
.exam-footer .exam-next,.exam-footer .exam-back{color:white;background:var(--exam-blue);border-radius:28px;padding:9px 22px;min-width:80px;min-height:40px}
.exam-footer .exam-next:hover,.exam-footer .exam-back:hover{background:#263ebd}
.exam-menu{position:absolute;right:16px;top:82px;width:230px;background:white;box-shadow:0 5px 25px #18263c30;padding:8px;border:1px solid #d5d9df;border-radius:7px;z-index:5}
.exam-menu[hidden]{display:none}
.exam-menu button,.exam-menu a{display:block;text-align:left;width:100%;padding:10px 12px;text-decoration:none;font:14px/1.4 Arial,sans-serif;border-radius:4px}
.exam-menu a:hover{background:#e6edf8}
.exam-split{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);overflow:hidden;min-height:0}
.exam-prompt-pane,.exam-response-pane{position:relative;min-width:0;overflow:auto;overscroll-behavior:contain;padding:64px 24px 40px}
.exam-prompt-pane{border-right:6px solid #e0e0e0;padding-top:92px}
.exam-response-pane{padding:64px 16px 40px 10px}
.exam-response-body{padding:40px 0 0 16px}
.exam-auto-save{font:14px/1.5 Arial,sans-serif;color:#596273;margin:15px 0 18px}
.exam-editor-frame{border:1px solid #bbb;box-shadow:0 1px 2px #0002;background:white}
.exam-editor-tools{display:flex;flex-wrap:wrap;align-items:center;border-bottom:1px solid #aaa;padding:0 4px;min-height:36px;gap:0;color:#5a5a5a}
.exam-editor-tools button{font:600 18px Georgia,serif;padding:4px 10px;min-width:34px;height:34px;border-radius:0}
.exam-editor-tools button[aria-pressed=true]{background:#e6edf8}
.exam-editor-tools .exam-editor-separator{height:34px;border-left:1px solid #ddd;margin:0 3px}
.exam-editor{min-height:240px;height:38vh;overflow:auto;resize:vertical;padding:16px;outline:0;white-space:pre-wrap;font:16px/1.6 ui-monospace,SFMono-Regular,Consolas,monospace;color:#172033;tab-size:4}
.exam-editor:focus{box-shadow:inset 0 0 0 2px #3e66c4}
.exam-editor:empty:before{content:attr(data-placeholder);color:#777;pointer-events:none}
.exam-editor-status{display:flex;justify-content:space-between;padding:6px 10px;font:11px/1.5 Arial,sans-serif;color:#647084;border-top:1px solid #ccc}
.exam-pane-expand{position:absolute;right:12px;top:10px;color:#888!important;padding:0!important}
.exam-response-pane>.exam-pane-expand{right:auto;left:10px}
.exam-split[data-expanded=prompt]{grid-template-columns:1fr}.exam-split[data-expanded=prompt] .exam-response-pane{display:none}
.exam-split[data-expanded=response]{grid-template-columns:1fr}.exam-split[data-expanded=response] .exam-prompt-pane{display:none}
.exam-split[data-expanded=response] .exam-response-pane{max-width:1100px;width:100%;margin:auto}
.exam-source-pages details{margin:20px 0}.exam-source-pages summary{font:14px Arial,sans-serif;cursor:pointer;padding:8px 0}
.exam-source-pages img{display:block;max-width:100%;max-height:none;margin:12px auto}
.exam-source-link{font:14px Arial,sans-serif;display:inline-block;margin:16px 0}
.exam-passage{margin-bottom:32px;padding-bottom:24px;border-bottom:1px solid #ccc}
.exam-dialog{color:#172033;background:white;border:1px solid #bbb;border-radius:9px;padding:24px;width:min(640px,calc(100vw - 32px));max-width:900px;max-height:85dvh;font:14px/1.55 Arial,sans-serif;overflow:auto}
.exam-dialog::backdrop{background:#18263855}
.exam-reference-window{position:fixed;z-index:20;display:grid;grid-template-rows:64px minmax(0,1fr);width:40vw;min-width:320px;max-width:calc(100vw - 16px);height:calc(50dvh + 64px);max-height:calc(100dvh - 16px);border:1px solid #111;background:#fff;color:#111;box-sizing:border-box;border-radius:0;font:16px/1.5 Arial,Helvetica,sans-serif}
.exam-reference-window.is-expanded{width:70vw;height:calc(60dvh + 64px)}
.exam-reference-header{position:relative;display:flex;align-items:center;justify-content:space-between;padding:0 19px 0 23px;background:#000;color:#fff;cursor:move;touch-action:none;user-select:none}
.exam-reference-header h2{margin:0;padding:0;color:#fff;font:600 16px/1.5 Arial,Helvetica,sans-serif;letter-spacing:0;text-wrap:nowrap}
.exam-reference-header button{display:grid;place-items:center;width:28px;height:32px;padding:3px;border:0;border-radius:0;background:transparent;color:#fff;cursor:pointer;font:16px/1 Arial,sans-serif;box-sizing:border-box}
.exam-reference-header button:hover{background:#333;filter:none}
.exam-reference-header button:focus-visible{outline:2px solid #fff;outline-offset:2px}
.exam-reference-header .exam-reference-drag{position:absolute;left:50%;transform:translate(-50%,-4px);cursor:move;width:32px}
.exam-reference-drag .exam-icon{width:26px;height:26px}
.exam-reference-actions{display:flex;align-items:center;gap:8px}
.exam-reference-actions .exam-icon{width:20px;height:20px}
.exam-reference-document{display:block;width:100%;height:100%;min-height:0;border:0;background:#fff}
.exam-reference-window.is-dragging .exam-reference-document{pointer-events:none}
.exam-reference-empty{padding:24px;overflow:auto}
@media(max-width:650px){.exam-reference-window,.exam-reference-window.is-expanded{width:calc(100vw - 16px);min-width:0}.exam-reference-window.is-expanded{height:calc(75dvh + 64px)}.exam-reference-header{padding:0 16px}}
@media print{.exam-reference-window{display:none}}
.exam-dialog h2{font:600 20px/1.3 Arial,sans-serif;letter-spacing:0;color:#172033;margin:0 36px 22px 0;text-wrap:wrap}
.exam-dialog h3{font:600 17px/1.4 Arial,sans-serif;color:inherit}
.exam-dialog>.exam-close{position:absolute;top:10px;right:12px;padding:6px}
.exam-dialog .exam-prose{font-size:17px}
.exam-dialog a{color:#304bc0}
.exam-dialog textarea{width:100%;min-height:180px;resize:vertical;margin:10px 0;font:15px/1.6 Arial,sans-serif;padding:12px;border:1px solid #999;border-radius:4px;color:#172033;background:white}
.exam-dialog .exam-primary{background:#354bd1;color:white;border-radius:25px;padding:10px 18px}
.exam-grid-legend{display:flex;gap:18px;flex-wrap:wrap;font-size:12px;color:#555;margin:0 0 20px}
.exam-grid{display:grid;grid-template-columns:repeat(8,1fr);gap:12px;margin:18px 0 25px}
.exam-grid button{position:relative;aspect-ratio:1;padding:2px;border:1px dashed #555;border-radius:0;font-size:16px}
.exam-grid button.is-answered{background:#354bd1;color:white;border-style:solid;border-color:#354bd1}
.exam-grid button.is-current{outline:2px solid #172033;outline-offset:3px;font-weight:bold}
.exam-grid button .exam-icon{position:absolute;right:-7px;top:-9px;width:15px;height:18px;fill:#f2a51b;stroke:#6c480c}
.exam-grid button.is-answered:hover{background:#263ebd}
.exam-dialog .feedback{margin:0;background:transparent;border:0;padding:0;color:#172033}.exam-dialog .feedback h3{color:inherit}.exam-dialog .feedback dd{margin:4px 0 18px}.exam-dialog .feedback p{margin:10px 0}
.exam-feedback-inline:empty{display:none}.exam-feedback-inline{font:14px Arial,sans-serif;margin-top:24px;color:#3b4350}
.exam-highlight-list{padding-left:20px}.exam-highlight-list li{margin:8px 0}.exam-highlight-list button{font-size:12px;text-decoration:underline}
.exam-save-warning{font:12px/1.4 Arial,sans-serif;color:#8c361c;margin-top:12px}
.exam-sr{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
@media(min-width:1600px){.exam-mcq{width:calc(50% - 20px)}}
@media(max-width:1000px){.exam-mcq{width:min(760px,85%)}.exam-header h1{font-size:18px}.exam-tools>button{font-size:11px}.exam-prompt-pane{padding-left:18px;padding-right:18px}.exam-prose{font-size:17px}}
@media(max-width:650px){.exam-shell{grid-template-rows:auto minmax(0,1fr) 66px}.exam-header{min-height:120px;grid-template-columns:1fr;padding:12px}.exam-header h1{font-size:16px;margin:0 0 8px}.exam-header .exam-directions{grid-row:2;align-self:end;margin-left:-5px;font-size:13px}.exam-tools{grid-column:1;grid-row:2;justify-self:end;gap:0}.exam-tools>button{font-size:10px;padding:4px 6px}.exam-tools .exam-icon{height:20px;width:20px}.exam-mcq{width:auto;margin:28px 16px 40px}.exam-question-content{padding:20px 6px 0}.exam-question-bar{gap:12px}.exam-prose{font-size:17px}.exam-choices{margin-top:28px}.exam-choice{gap:10px;min-height:58px;padding:10px}.exam-choice-letter{height:29px;width:29px;font-size:15px}.exam-choice-row .exam-strike{position:static;transform:none;margin:6px 0 4px auto;display:block}.exam-footer{padding:10px 12px;gap:6px}.exam-footer .exam-position{position:static;transform:none;margin-right:auto;padding:10px;font-size:12px;gap:5px}.exam-footer .exam-position .exam-icon{width:15px}.exam-footer .exam-next,.exam-footer .exam-back{min-width:58px;padding:10px 12px;font-size:13px}.exam-split{display:block;overflow:auto}.exam-prompt-pane,.exam-response-pane{overflow:visible;padding:45px 18px 30px}.exam-prompt-pane{border-right:0;border-bottom:6px solid #e0e0e0}.exam-response-pane{padding-top:40px}.exam-response-body{padding:20px 0 0}.exam-editor{min-height:320px}.exam-menu{top:100%;right:12px}.exam-grid{grid-template-columns:repeat(6,1fr);gap:10px}.exam-dialog{padding:22px 18px}.exam-grid-legend{gap:10px}.exam-question-content .exam-prose pre{font-size:15px}.exam-tools span{max-width:75px;white-space:normal}.exam-pane-expand{display:none}}
@media print{body.exam-mode{overflow:visible}.exam-shell{height:auto;display:block}.exam-header,.exam-footer,.exam-question-bar button,.exam-pane-expand,.exam-editor-tools{display:none}.exam-mcq{width:100%;margin:0}.exam-work,.exam-split,.exam-prompt-pane,.exam-response-pane{overflow:visible}.exam-split{display:block}.exam-prompt-pane,.exam-response-pane{padding:20px 0;border:0}}
