/* Exam workspace: shared by real attempts and teacher preview. */
.has-exam-tools{position:relative;--et-ink:#192b42;--et-panel:#fff;--et-soft:#f0f5fc;--et-line:#dbe5f3;--et-muted:#526b8c;--et-lime:#b7f500}.has-exam-tools>.ld-header{min-height:0!important;height:auto!important;padding:14px 22px!important;margin:12px 0 22px!important;border-radius:18px!important;background:var(--et-panel)!important;box-shadow:0 5px 20px #19355308}.has-exam-tools>.ld-header .ld-title{font-size:20px!important;line-height:1.35!important;margin:0!important}.has-exam-tools>.ld-header .ld-subtitle,.has-exam-tools>.ld-header .ld-badge,.has-exam-tools>.ld-header>:not(.ld-header-text){display:none!important}.has-exam-tools>.ld-header:before,.has-exam-tools>.ld-header:after{display:none!important}.has-exam-tools>.exam-work-layout{grid-template-columns:minmax(0,1fr) 290px;gap:22px;align-items:start}.has-exam-tools .exam-question{position:relative;background:var(--et-panel);border:1px solid var(--et-line);border-radius:24px;padding:26px 28px;min-width:0;box-shadow:0 8px 30px #1935530a}.has-exam-tools .exam-question>.work-block,.has-exam-tools .exam-question .student-card{background:transparent!important;border:0!important;box-shadow:none!important;margin:0!important;padding:12px 0!important;border-radius:0!important}.has-exam-tools .exam-question .lesson-page{padding:0;margin:0}.has-exam-tools .exam-question>h2,.has-exam-tools .page-heading{display:table;margin:0 0 18px!important;padding:6px 12px;border-radius:12px;background:#edf8c5;color:#24354b;font-size:18px!important;line-height:1.4}.has-exam-tools .type-label{display:none}.has-exam-tools .lesson-rich,.has-exam-tools .work-block .rich{font-size:18px;line-height:1.65}.has-exam-tools .lesson-rich p,.has-exam-tools .work-block .rich p{margin:0 0 18px}.has-exam-tools .exam-question h3{font-size:25px;line-height:1.35;margin:8px 0 20px}.has-exam-tools .exam-nav-panel{position:sticky;top:88px;z-index:35;padding:22px;background:var(--et-panel);border-radius:24px;border:1px solid var(--et-line)}.has-exam-tools .exam-nav-panel h3{font-size:21px;margin-bottom:18px}.has-exam-tools .exam-task-button{position:relative;border:1px solid var(--et-line);background:var(--et-soft);color:var(--et-ink);border-radius:12px;font-size:16px}.has-exam-tools .exam-task-button.is-answered{background:#edf7dc;border-color:#d6e9ba;color:#284530}.has-exam-tools .exam-task-button.is-answered:after{content:'✓';position:absolute;right:3px;bottom:2px;font-size:10px}.has-exam-tools .exam-task-button.is-current{background:#b7f500!important;color:#192b42!important;border-color:#9dce00!important}.has-exam-tools .exam-task-button.is-flagged:before{content:'⚑';position:absolute;right:2px;top:1px;font-size:11px;color:#bd741d}.has-exam-tools .exam-finish-button{background:#356675;border-color:#356675;font-size:15px}.exam-nav-legend{display:flex;flex-direction:column;gap:8px;border-top:1px solid var(--et-line);padding-top:14px;margin-top:14px;font-size:13px;color:var(--et-muted)}.exam-return-later{float:right;position:relative;z-index:36;min-height:36px;background:var(--et-soft);color:var(--et-ink);border:1px solid var(--et-line);border-radius:12px;padding:7px 10px;font-family:inherit;font-weight:600;font-size:14px;line-height:1.4;margin:0 0 12px 12px}.exam-return-later[aria-pressed=true]{background:#fff0d4;border-color:#dab574}.has-exam-tools .work-foot{position:relative;z-index:35;margin-top:16px}.exam-tools{position:fixed;left:16px;bottom:22px;z-index:140;color:var(--et-ink);font-family:var(--ui-font,Manrope,system-ui,sans-serif);width:54px}.exam-tools-toggle{width:52px;height:52px!important;min-height:52px;border-radius:50%!important;background:#192b42!important;color:#b7f500!important;font-size:27px!important;box-shadow:0 5px 20px #19355330}.exam-tools-menu{position:absolute;left:0;bottom:64px;display:flex;flex-direction:column;gap:6px;width:168px;padding:9px;background:var(--et-panel);border:1px solid var(--et-line);border-radius:18px;box-shadow:0 10px 32px #19355325}.exam-tools-menu button{text-align:left;white-space:nowrap}.exam-tools-bar{position:absolute;left:0;bottom:235px;width:245px;display:flex;align-items:center;flex-wrap:wrap;gap:8px;padding:14px;background:var(--et-panel);border:1px solid var(--et-line);border-radius:18px;box-shadow:0 10px 32px #19355325}.exam-tools [hidden],.exam-calculator [hidden]{display:none!important}.exam-tools button,.exam-calculator button{font-family:inherit;font-size:14px;font-weight:600;line-height:1.35;color:inherit;background:var(--et-soft,#f0f5fc);border:1px solid var(--et-line,#dbe5f3);border-radius:10px;min-height:34px;padding:6px 9px;cursor:pointer}.exam-tools button[aria-pressed=true]{background:#eaf6bd;color:#192b42;outline:2px solid #9dcd00}.exam-tools .exam-swatch,.exam-tools .exam-swatch[aria-pressed=true]{min-height:24px;width:24px;height:24px;padding:0;background:var(--ink);border:3px solid var(--et-panel);border-radius:50%}.exam-tools input[type=range]{width:110px;accent-color:#8fbd00}.exam-tools-note{flex-basis:100%;font-size:12px;line-height:1.45;color:var(--et-muted)}.exam-ink{position:absolute;left:0;top:0;z-index:30;overflow:hidden}
.exam-calculator{--et-soft:#f0f5fc;--et-line:#dbe5f3;position:fixed;z-index:120;width:280px;box-sizing:border-box;max-width:calc(100vw - 24px);max-height:calc(100dvh - 24px);overflow:auto;color:#192b42;background:#fff;border:1px solid #d7e4f4;border-radius:18px;box-shadow:0 14px 45px #16334b38;padding:12px;font:14px/1.4 var(--ui-font,Manrope,system-ui,sans-serif)}.exam-calc-head{display:flex;align-items:center;gap:5px;cursor:grab;touch-action:none}.exam-calc-head strong{font-size:16px;flex:1}.exam-calc-head button{padding:4px 8px;min-height:28px}.exam-calc-body{display:block;margin-top:10px}.exam-calc-input{box-sizing:border-box;width:100%;background:#edf4fc;color:inherit;border:1px solid #ceddf0;border-radius:11px;padding:12px;font-size:24px;text-align:right}.exam-calc-status{font-size:11px;line-height:1.4;color:#52698a;margin:0 0 7px;min-height:0}.exam-calc-keys{display:grid;grid-template-columns:repeat(4,1fr);gap:5px;margin-top:8px}.exam-calc-keys button{font-size:18px;min-height:34px;padding:4px}.exam-calc-keys .exam-equals{background:#b7f500;color:#192b42;border-color:#a1cf00}.exam-calc-history-box{margin-top:10px;border-top:1px solid #e0e8f3;padding-top:8px}.exam-calc-history-box summary{cursor:pointer;font-weight:650;font-size:13px;padding:5px}.exam-calc-history{max-height:170px;overflow:auto}.exam-calc-record{display:flex;align-items:center;flex-wrap:wrap;gap:5px;padding:9px 0;border-bottom:1px solid #e0e8f3;overflow-wrap:anywhere}.exam-calc-record span{width:100%;color:#52698a}.exam-calc-record button{font-size:12px}.exam-calculator[hidden]{display:none!important}.exam-tools button:focus-visible,.exam-calculator button:focus-visible{outline:3px solid #5189d6;outline-offset:2px}
.exam-tools-active .python-launch{display:none!important}.exam-tools-active .python-window{z-index:119;box-sizing:border-box;width:520px;height:380px;max-width:calc(100vw - 24px);max-height:calc(100dvh - 24px);min-width:min(310px,calc(100vw - 24px));border-radius:18px;box-shadow:0 14px 45px #16334b38}.exam-tools-active .python-titlebar{min-height:40px;padding:8px 12px;font-size:15px}.exam-tools-active .python-titlebar strong{font-size:15px}.exam-tools-active .python-titlebar strong:before{content:'⠿ ';color:#6b819b}.exam-tools-active .python-controls button{min-width:28px;min-height:28px;padding:3px 7px}.exam-tools-active .python-code{font-size:15px}.exam-tools-active .python-output{font-size:14px}.exam-tools-active .python-titlebar{touch-action:none}.exam-tools-active .student-progress-panel{position:sticky;top:0;z-index:50}.exam-tools-active .page-navigation{padding:16px 0}.exam-tools-active header:has(.python-launch){gap:8px}
.exam-setting-switch{display:flex!important;align-items:center;justify-content:space-between;gap:16px;padding:14px 12px;margin:12px 0 18px;background:var(--panel,#f5f8fc);border:1px solid #dbe5f3;border-radius:14px;cursor:pointer}.exam-setting-switch>span{display:flex;flex-direction:column;gap:4px;min-width:0}.exam-setting-switch strong{font-size:15px}.exam-setting-switch small{font-size:12px;line-height:1.45;color:var(--muted,#52698a)}.exam-setting-switch input[type=checkbox]{appearance:none!important;-webkit-appearance:none!important;width:42px!important;height:24px!important;min-width:42px!important;flex:0 0 42px!important;margin:0!important;padding:0!important;border:1px solid #afbdd0!important;border-radius:30px!important;background:#b7c4d6!important;position:relative;cursor:pointer;box-sizing:border-box!important}.exam-setting-switch input:after{content:'';position:absolute;width:18px;height:18px;border-radius:50%;background:white;top:2px;left:2px;box-shadow:0 1px 3px #0002}.exam-setting-switch input:checked{background:#b7f500!important;border-color:#9ac900!important}.exam-setting-switch input:checked:after{left:20px}.exam-setting-switch input:focus-visible{outline:3px solid #5189d6;outline-offset:3px}
[data-theme=dark] .has-exam-tools,body.student-dark .has-exam-tools{--et-ink:#e6eef9;--et-panel:#202b3d;--et-soft:#2c3b52;--et-line:#435370;--et-muted:#b6c9e5}[data-theme=dark] .exam-calculator,body.student-dark .exam-calculator{--et-soft:#2c3b52;--et-line:#435370;background:#202b3d;color:#e6eef9;border-color:#435370}[data-theme=dark] .exam-calc-input,body.student-dark .exam-calc-input{background:#162235;color:#e6eef9;border-color:#435370}[data-theme=dark] .exam-calc-status,[data-theme=dark] .exam-calc-record span,body.student-dark .exam-calc-status,body.student-dark .exam-calc-record span{color:#b6c9e5}[data-theme=dark] .has-exam-tools .exam-task-button.is-answered{background:#294839;color:#d0edcf}[data-theme=dark] .exam-return-later[aria-pressed=true]{background:#56472b;color:#fff1d4}
@media(max-width:1000px){.has-exam-tools>.exam-work-layout{grid-template-columns:minmax(0,1fr) 235px;gap:14px}.has-exam-tools .exam-question{padding:22px 20px}.has-exam-tools .exam-nav-panel{padding:16px}.exam-tools{left:8px;bottom:12px}.exam-tools-toggle{width:44px;height:44px!important;min-height:44px}}
@media(max-width:760px){.has-exam-tools>.exam-work-layout{grid-template-columns:1fr}.has-exam-tools .exam-nav-panel{position:relative;top:0;grid-row:2}.has-exam-tools .exam-question{padding:20px 16px}.has-exam-tools .lesson-rich,.has-exam-tools .work-block .rich{font-size:17px}.has-exam-tools>.ld-header .ld-title{font-size:17px!important}.exam-return-later{float:none;margin:0 0 14px}.exam-tools-bar{width:225px;bottom:224px}.exam-tools-active .python-window{width:calc(100vw - 24px);height:350px}.exam-calculator{width:260px}.has-exam-tools .exam-task-button{aspect-ratio:auto;min-height:42px}}
/* Compact, consistent line icons and a five-colour drawing palette. */
.exam-tools .exam-tools-bar{display:flex;flex-direction:column;align-items:stretch;gap:10px;width:218px;box-sizing:border-box;padding:13px;bottom:230px;border-radius:17px}.exam-tools .exam-tools-note{flex-basis:auto;font-size:11px;line-height:1.4;color:var(--et-muted);margin:0;padding:0 1px}.exam-pen-modes,.exam-pen-actions{display:grid;grid-template-columns:repeat(3,1fr);gap:6px}.exam-tools .exam-pen-modes button,.exam-tools .exam-pen-actions button{display:flex;align-items:center;justify-content:center;min-height:34px;height:34px;padding:6px;background:transparent;border:1px solid transparent;border-radius:10px;box-shadow:none}.exam-tools .exam-pen-modes button:hover,.exam-tools .exam-pen-actions button:hover{background:var(--et-soft);border-color:var(--et-line)}.exam-tools .exam-pen-modes button[aria-pressed=true]{background:#edf8c5;border-color:#c4e36b;outline:none;color:#192b42}.exam-pen-colors{display:flex;justify-content:space-between;align-items:center;padding:4px 2px}.exam-tools .exam-pen-colors .exam-swatch{width:26px;height:26px;min-height:26px;border:1px solid #b8c5d7;box-shadow:inset 0 0 0 2px var(--et-panel);outline:none}.exam-tools .exam-pen-colors .exam-swatch[aria-pressed=true]{outline:2px solid #6386ba;outline-offset:3px;background:var(--ink)}.exam-pen-width{display:flex!important;align-items:center;gap:8px;font-size:12px!important;color:var(--et-muted);margin:2px 0!important}.exam-tools .exam-pen-width input[type=range]{appearance:none;-webkit-appearance:none;height:4px;min-width:0;width:100%;flex:1;border:0;border-radius:10px;background:#d9e3f0;padding:0;accent-color:#91bd00;cursor:pointer}.exam-pen-width input::-webkit-slider-thumb{appearance:none;width:14px;height:14px;border:2px solid white;border-radius:50%;background:#93c400;box-shadow:0 0 0 1px #b6c796}.exam-pen-width input::-moz-range-thumb{width:12px;height:12px;border:2px solid white;border-radius:50%;background:#93c400}.exam-pen-width output{min-width:12px;text-align:right;font-size:12px}.exam-pen-actions{border-top:1px solid var(--et-line);padding-top:8px}.exam-tools svg{display:block;flex-shrink:0;pointer-events:none}.exam-tools .exam-tools-menu{width:160px;gap:3px;padding:7px;border-radius:16px}.exam-tools .exam-tools-menu button{display:flex;align-items:center;gap:10px;min-height:38px;padding:8px 10px;border:0;background:transparent;font-size:14px;line-height:1.3;box-shadow:none}.exam-tools .exam-tools-menu button:hover{background:var(--et-soft)}.exam-tools .exam-tools-toggle{display:flex;align-items:center;justify-content:center;width:46px;height:46px!important;min-height:46px;padding:0;border:0}.exam-tools .exam-tools-toggle svg{width:21px;height:21px}.exam-python-hint{font-size:12px;line-height:1.5;white-space:normal;margin:4px 5px;color:var(--et-muted)}
@media(max-width:600px){.exam-tools .exam-tools-bar{bottom:224px;width:208px}.exam-tools{left:8px;bottom:12px}}

/* Shared Lessync styling for taking an exam, including student preview. */
html:not([data-theme=dark]) body:not(.student-dark):has(.has-exam-tools .exam-work-layout){
 background:radial-gradient(ellipse at 50% 43%,#f4f8ffad 0%,#eff6ff66 50%,transparent 85%),linear-gradient(#edf6ff42,#edf6ff42),url('/workspace-waves.webp?v=6.38.0') center/cover scroll #9bb8d6!important;
}
.has-exam-tools{
 --et-ink:#152337;--et-muted:#4f6685;--et-line:#d7e5f5;--et-soft:#edf5ff;
 --et-panel:#f8fbff;
 --lesson-font:Manrope,Arial,sans-serif!important;
 --ui-font:Manrope,Arial,sans-serif;
 color:var(--et-ink)!important;font-family:Manrope,Arial,sans-serif!important;
}
body:has(.has-exam-tools .exam-work-layout) :is(.work-header,.student-progress-panel){
 font-family:Manrope,Arial,sans-serif!important;color:var(--et-muted);
 background:linear-gradient(125deg,#ffffffed,#eaf4fff0)!important;
 border:1px solid #ffffffa6;border-radius:18px;
 box-shadow:0 8px 22px #24436514,inset 0 1px 0 #ffffffb3;
}
.has-exam-tools :is(.ld-title,.page-heading,.exam-question>h2,.exam-question h3,.exam-nav-panel h3){
 font-family:Manrope,Arial,sans-serif!important;font-weight:700!important;letter-spacing:-.025em;
 color:var(--et-ink);
}
.has-exam-tools :is(button,input,select,textarea,.lesson-rich,.work-block .rich,.lesson-page,.ld-callout){
 font-family:Manrope,Arial,sans-serif;
}
.has-exam-tools>.ld-header{
 background:linear-gradient(125deg,#ffffffbd,#eaf4ffd1 48%,#edf7ffbf)!important;
 border:1px solid #ffffffa6!important;border-radius:22px!important;
 box-shadow:0 8px 22px #24436514,inset 0 1px 0 #ffffffb3!important;padding:18px 24px!important;
}
.has-exam-tools>.ld-header .ld-title{font-size:22px!important;font-weight:700!important}
.has-exam-tools :is(.exam-question,.exam-nav-panel){
 background:var(--et-panel)!important;border:1px solid #ffffffb3!important;
 border-radius:28px!important;box-shadow:0 8px 22px #24436514,0 2px 5px #2c52780b!important;
}
.has-exam-tools .exam-nav-panel{
 background:linear-gradient(125deg,#ffffffde,#eaf4fff0 48%,#edf7ffeb)!important;
}
.has-exam-tools .exam-nav-panel h3{font-size:20px;line-height:1.4}
.has-exam-tools :is(.exam-question>h2,.page-heading){background:#eff9c6;font-weight:700!important}
.has-exam-tools :is(.lesson-rich,.work-block .rich){font-size:18px;line-height:1.7}
.has-exam-tools :is(.lesson-rich,.work-block .rich) :is(code,pre),
.exam-tools-active :is(.python-code,.python-output){font-family:ui-monospace,SFMono-Regular,Consolas,monospace!important}
.has-exam-tools .exam-task-button{font-family:Manrope,Arial,sans-serif!important;font-weight:700;box-shadow:none}
.has-exam-tools .exam-finish-button{
 background:linear-gradient(#343b43,#20262d)!important;border:0!important;
 font-family:Manrope,Arial,sans-serif!important;font-weight:700;border-radius:14px!important;
}
.exam-tools-active :is(.exam-tools,.exam-calculator,.python-titlebar,.python-controls){
 font-family:Manrope,Arial,sans-serif!important;
}
[data-theme=dark] .has-exam-tools,body.student-dark .has-exam-tools{
 --et-ink:#e6eef9;--et-muted:#b6c9e5;--et-soft:#2c3b52;
 --et-panel:#1c2b40;
}
[data-theme=dark] .has-exam-tools :is(.exam-question,.exam-nav-panel,.ld-header),
body.student-dark .has-exam-tools :is(.exam-question,.exam-nav-panel,.ld-header){
 background:var(--et-panel)!important;border-color:#435370!important;
}
[data-theme=dark] body:has(.has-exam-tools) :is(.work-header,.student-progress-panel),
body.student-dark:has(.has-exam-tools) :is(.work-header,.student-progress-panel){
 background:#1c2b40!important;border-color:#435370!important;color:#b6c9e5;
}
[data-theme=dark] .has-exam-tools :is(.page-heading,.exam-question>h2),
body.student-dark .has-exam-tools :is(.page-heading,.exam-question>h2){color:#24354b}
@media(max-width:760px){
 .has-exam-tools>.ld-header{padding:16px 18px!important}
 .has-exam-tools>.ld-header .ld-title{font-size:18px!important}
 .has-exam-tools :is(.lesson-rich,.work-block .rich){font-size:17px}
}
