:root{font-family:Arial,sans-serif;color:#202b36;background:#f2f4f5;font-size:18px;line-height:1.6;color-scheme:light}*{box-sizing:border-box}body{margin:0}main{max-width:1040px;margin:36px auto;padding:32px 48px;background:white;border:1px solid #dbe1e5;border-radius:8px}h1{font-size:1.7rem;line-height:1.3}h2{font-size:1.2rem}p{white-space:pre-wrap}button{font:inherit;cursor:pointer;border:1px solid #aebbc5;border-radius:5px;padding:10px 20px;background:#fff;color:#20394b;min-height:46px}button.primary{background:#285775;color:white;border-color:#285775}button:disabled{opacity:.42;cursor:not-allowed}button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:3px solid #d89e32;outline-offset:3px}label{display:block;margin:12px 0}input,select,textarea{font:inherit;padding:9px;max-width:100%;border:1px solid #aebbc5;border-radius:4px}input[type=text],input[type=number],select,textarea{width:100%}input[type=radio],input[type=checkbox]{accent-color:#285775;min-width:18px;min-height:18px}fieldset{border:0;padding:0;margin:20px 0}legend{font-weight:bold}form .field{margin-bottom:20px}.actions{display:flex;gap:14px;margin-top:28px;flex-wrap:wrap}.muted,.progress{color:#586571;font-size:.88rem}.progress{margin-bottom:20px}.stimulus{border-top:2px solid #b8cbd7;padding-top:16px}.story{margin:0 0 14px}.question{font-weight:600;margin:0 0 22px}.options{display:grid;grid-template-columns:1fr;gap:10px;margin:20px 0}.option{display:flex;align-items:flex-start;gap:12px;border:1px solid #bac7d1;padding:14px 18px;border-radius:5px;margin:0;cursor:pointer;font-weight:400}.option:has(input:checked){background:#edf4f8;border-color:#285775}.option span{white-space:pre-wrap;overflow-wrap:break-word}.rating{margin:24px 0}.scale{position:relative;height:42px;margin:16px 10px;touch-action:none;cursor:pointer}.scale:before{content:'';position:absolute;left:0;right:0;top:20px;height:3px;background:#aabcc8}.scale .thumb{position:absolute;top:11px;width:20px;height:20px;border-radius:50%;background:#285775;transform:translateX(-50%)}.anchors{display:flex;justify-content:space-between;gap:24px;font-size:.82rem}.anchors span{max-width:46%}.anchors span:last-child{text-align:right}.scale-value{text-align:center;min-height:30px}.likert{display:flex;justify-content:space-between;gap:8px}.likert label{display:grid;justify-items:center;border:1px solid #bbc8d0;border-radius:4px;padding:10px 18px;margin:8px 0;cursor:pointer}.likert label:has(input:checked){background:#edf4f8}.error{color:#9b3030}.notice{background:#fff4d9;padding:12px}.break-image{display:block;width:100%;max-height:360px;object-fit:cover;border-radius:6px}.qa-controls{display:flex;gap:12px;flex-wrap:wrap}.qa-meta{font-size:.8rem;padding:15px;background:#f1f4f7;white-space:pre-wrap}a{color:#285775}#researcher{border-top:2px solid #b68f40;margin-top:35px;padding-top:20px} @media(max-width:1000px){main{margin:15px;padding:24px}.likert label{padding:10px 12px}}
:is(.options[disabled]) .option{cursor:default;color:#202b36;background:white;border-color:#bac7d1}
.options[disabled] input{opacity:1}

/* UX 3: quiet academic layout; task scaffold remains mounted across stages. */
:root{font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;background:#f5f6f7;color:#27333e;font-size:17px;line-height:1.65}
main{max-width:1040px;margin:28px auto;padding:32px 48px;border-radius:10px;overflow-anchor:none}
h1{font-size:1.8rem;font-weight:650;margin:0 0 16px;letter-spacing:-.025em}h2{font-weight:600}
.page-heading{margin-bottom:28px}.eyebrow{text-transform:uppercase;font-size:.73rem;letter-spacing:.12em;color:#62788a;margin:0 0 8px}.subtitle{font-size:1.12rem;color:#536574}
.info-section{padding:14px 0;border-top:1px solid #e4e9ed}.info-section h2{margin:0 0 8px}.info-section p{margin:0}
dl{margin:12px 0}dl div{display:grid;grid-template-columns:190px 1fr;gap:16px;margin:12px 0}dt{font-size:.9rem;font-weight:600}dd{margin:0;overflow-wrap:anywhere}
.check-row{display:flex;align-items:flex-start;gap:14px;padding:12px 0;margin:0}.check-row input{flex:0 0 20px;margin-top:5px}
.consent-actions{border-top:1px solid #dce3e9;padding-top:16px}.notice{border:1px solid #e5d6b0;border-radius:8px;font-size:.9rem}
#main-platform-preview{max-width:1180px;margin:12px auto;padding:14px 20px;border:1px solid #b9d2e7;border-radius:8px;background:#eef6fc;color:#203f59;font-size:.9rem}
#main-platform-preview>strong,#main-platform-preview>span{display:block;margin-bottom:6px}
#main-platform-preview nav{display:flex;flex-wrap:wrap;align-items:center;gap:8px 16px}
#main-platform-preview nav a{padding:5px 0}#main-platform-preview nav button{width:auto;margin:0;padding:7px 12px;font-size:inherit}
#main-preview-dialog{width:min(1100px,94vw);max-height:90vh;box-sizing:border-box;padding:24px;border:1px solid #b7c6d2;border-radius:10px;overflow:auto}
#main-preview-dialog::backdrop{background:rgba(15,30,45,.48)}#main-preview-dialog>header{display:flex;justify-content:space-between;align-items:flex-start;gap:20px}
#main-preview-dialog>header h2{margin-top:0}#main-preview-dialog>header button{width:auto;margin:0}
.main-preview-comparison{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:22px}.main-preview-comparison>article{min-width:0;padding:18px;border:1px solid #dce3e9;border-radius:8px}
.main-preview-comparison>article>h2{margin-top:0;color:#1b527d}#app #main-preview-dialog .main-preview-comparison h1{font-size:1.4rem}
@media(max-width:760px){.main-preview-comparison{grid-template-columns:1fr}#main-platform-preview{margin:8px}#main-preview-dialog{padding:16px}}
.steps{list-style:none;padding:0;display:grid;gap:20px}.steps li{display:flex;gap:18px}.step-number{width:36px;height:36px;border-radius:50%;background:#eaf0f5;color:#345c79;display:grid;place-items:center;flex-shrink:0;font-weight:600}.steps h2,.steps p{margin:0}
.quiet-card,.reassurance{background:#f5f7f9;border:1px solid #e3e9ee;border-radius:9px;padding:18px 22px;margin:20px 0}.quiet-card h2,.reassurance h2{margin:0}.quiet-card p:last-child,.reassurance p:last-child{margin-bottom:0}
.task-card .stimulus{padding-top:18px}.task-card .story{line-height:1.75}.task-card .question{margin-bottom:24px}
.example-steps{display:flex;gap:14px;font-size:.9rem;color:#73818e;margin:0 0 20px;min-height:30px}.example-steps [aria-current]{color:#285775;font-weight:650}
#stage-controls{border-top:1px solid #e6ebef;padding-top:12px;min-height:300px}.recorded-answer{color:#647482;font-size:.95rem;background:#f5f7f9;padding:12px 16px;border-radius:8px}.example-feedback{color:#38586c}
button{border-radius:8px}button.primary:hover:not(:disabled){background:#224963}.option{border-radius:8px;padding:12px 16px}.option:hover{border-color:#648399}.rating h2{font-size:1.16rem;line-height:1.5}
.scale:focus-visible{outline:3px solid #9ab6cb;outline-offset:5px}.likert label{padding:10px 15px;flex:1}.break-image{max-height:390px;object-fit:contain;border-radius:9px;background:#edf1f2}
[hidden]{display:none!important}#break-visual+.actions{min-height:50px}#cancel{margin-top:14px}.qa-meta{overflow-wrap:anywhere}
@media(max-width:1100px){main{margin:20px 24px;padding:28px 38px}}@media(max-width:950px){main{margin:12px;padding:24px}.likert label{padding:10px 8px}dl div{grid-template-columns:155px 1fr}}

/* Experience 4: one deliberate effort selection, stable story/question geometry. */
.effort-grid{display:grid;grid-template-columns:repeat(9,minmax(0,1fr));gap:8px;margin:24px 0 10px}
.effort-grid button{padding:14px 4px;min-height:56px}
.effort-grid button[aria-pressed=true]{background:#e8f0f6;border-color:#285775;color:#20394b;opacity:1}
.effort-stage .stimulus{color:#596975}
#effort-status{min-height:28px}

/* UI 5: shared modules, task-appropriate facts, no item-dependent font scaling. */
.task-card .module-label{font-size:.76rem;text-transform:uppercase;letter-spacing:.1em;color:#506779;margin:0 0 10px;font-weight:650}
.task-card .stimulus{padding-top:14px}
.task-card .story{line-height:1.5;margin-bottom:14px}
.task-context{color:#596975;margin:0 0 10px}
.task-facts{width:100%;border-collapse:collapse;table-layout:fixed;font-size:1rem}
.task-facts th,.task-facts td{text-align:left;vertical-align:top;padding:7px 12px;border-bottom:1px solid #e3e9ed;overflow-wrap:break-word}
.task-facts thead th{font-size:.9rem;background:#f5f7f9;font-weight:600}
.task-facts tbody th{font-weight:500}
.task-facts-list{padding:0;margin:0;list-style:none;display:grid;gap:7px}
.task-facts-list li{padding:3px 0 3px 14px;border-left:2px solid #dbe4ea}
.task-sequence{display:flex;gap:30px;list-style:none;padding:0;margin:14px 0;flex-wrap:wrap}
.task-sequence li{position:relative;flex:1;min-width:140px;padding:7px 0}
.task-sequence li+li:before{content:'→';position:absolute;left:-24px;color:#647482}
.task-card .question{line-height:1.5;margin-bottom:16px}
#stage-controls{padding-top:0;min-height:350px}
.task-module{padding:14px 0;border-bottom:1px solid #e6ebef}
.task-module:last-child{border-bottom:0}
.task-module .rating{margin:0}
.task-module .rating h2,.task-module>h2:not(.module-label){font-size:1.05rem;margin:0 0 10px;line-height:1.4}
.task-module .scale{margin:8px 10px}
.task-module .actions{margin-top:12px}
.task-module .options{grid-template-columns:repeat(2,minmax(0,1fr));margin:0;gap:10px}
.task-module .options legend{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
.task-module .effort-grid{margin-top:15px}
.effort-stage .stimulus{color:inherit}
@media(max-width:950px){.task-facts th,.task-facts td{padding:7px}.task-sequence{gap:24px}}

/* Round 2: transient rating event; prior ratings and answers never carry forward. */
.rating-panel{margin:24px 0 0;padding:22px 26px;background:#f0f5f8;border:1px solid #afc4d3;border-left:4px solid #567b96;border-radius:8px;animation:rating-entrance 160ms ease-out}
.rating-panel .rating{margin:0}
.rating-panel h2{font-size:1.2rem;line-height:1.45;margin:0 0 18px;font-weight:650}
.rating-panel .actions{margin-top:14px}
.rating-panel .scale{margin:12px 10px}
.rating-panel .effort-grid{margin:18px 0 12px}
.rating-panel #effort-status{margin:8px 0 0}
.effort-stage .stimulus{color:#526270}
@keyframes rating-entrance{from{background-color:#e4edf4;border-color:#829eb4}to{background-color:#f0f5f8;border-color:#afc4d3}}
@media(prefers-reduced-motion:reduce){.rating-panel{animation:none}}
@media(max-width:950px){.rating-panel{padding:18px 20px}.rating-panel h2{font-size:1.13rem}}

/* Rest scene uses the available viewport; the continuation area stays visible. */
main.break-screen{width:calc(100% - 32px);max-width:none;height:calc(100dvh - 32px);margin:16px;padding:20px 28px;display:flex;flex-direction:column}
.break-screen h1{margin:0 0 8px;flex-shrink:0}
.break-screen>p{margin:0 0 12px;flex-shrink:0}
.break-screen #break-visual{flex:1;min-height:0;display:flex;align-items:center;justify-content:center}
.break-screen .break-image{width:100%;height:100%;max-height:none;object-fit:contain}
.break-screen .actions{flex-shrink:0;margin-top:12px;min-height:50px;justify-content:center}

#attention-notice{position:fixed;inset:0;z-index:1000;background:#f5f6f7ed;display:grid;place-items:center;padding:24px}
#attention-notice>div{max-width:600px;padding:28px;background:white;border:1px solid #afc4d3;border-radius:10px}
#attention-notice h2{margin-top:0}

#camera-recording-indicator{position:fixed;bottom:6px;right:12px;max-width:calc(100vw - 24px);margin:0;padding:6px 12px;background:#fff;border:2px solid #267048;border-radius:6px;font-size:.72rem;color:#244b36;pointer-events:none;z-index:20}
#camera-recording-indicator strong,#camera-recording-indicator span{display:block}
#camera-recording-indicator[data-state="paused"]{border-color:#657482;color:#394955;background:#f1f4f6}
#save-warning{position:fixed;top:0;left:0;right:0;padding:8px;background:#fff0cc;color:#633e00;z-index:100;text-align:center;margin:0}

.confidence-ticks{display:flex;justify-content:space-between;gap:2px;font-size:12px;margin-top:8px;color:#475569}

/* Optional digital notes, scoped to the formal problem-solving screen. */
.working-space{padding:4px 0;border-bottom:1px solid #e6ebef}
.working-space label{font-weight:600;margin:0;font-size:.95rem}
.working-space p{font-size:.8rem;line-height:1.35;margin:4px 0 6px;color:#586571}
.working-space textarea{display:block;resize:vertical;min-height:78px;padding:6px 10px;font-size:.9rem;line-height:1.35;background:#fafbf9}

/* Readable orientation and a larger scrollable digital working area. */
.instruction-rules,.setup-points{padding-left:24px;display:grid;gap:12px;line-height:1.5}
.steps{gap:14px}.steps li p{line-height:1.5}
.working-space{padding:14px;background:#f4f7fa;border:1px solid #afc1ce;border-radius:8px;margin:10px 0}
.working-space label{font-size:1.12rem}
.working-space textarea{min-height:84px;background:white}
.drawing-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:10px 0 6px;font-size:.82rem}
.drawing-toolbar button{font-size:.82rem;padding:4px 12px;min-height:36px}
#attention-notice ul{text-align:left;line-height:1.5;padding-left:22px}

/* The live HTML problem stays underneath a single translucent markup layer. */
#annotation-scroll{overflow-y:auto;scrollbar-gutter:stable}
#annotation-surface{position:relative;isolation:isolate}
.annotation-active{max-height:650px;overflow-y:auto;scrollbar-gutter:stable}
.annotation-blank{height:850px;background:repeating-linear-gradient(white 0px,white 29px,#edf1f5 30px)}
#annotation-canvas{position:absolute;inset:0;z-index:1;pointer-events:auto;width:100%;height:100%;opacity:.28;touch-action:none;cursor:crosshair}
.resource-layout{display:grid;grid-template-columns:minmax(0,1fr);gap:14px;align-items:start}
.calculator{border:1px solid #b8c7d1;border-radius:6px;padding:10px;margin:10px 0}
#calculator-toggle{width:100%}
#calculator-panel{margin-top:8px;max-width:240px}
#calculator-display{display:block;min-height:48px;padding:8px;background:#f1f4f6;text-align:right;overflow-wrap:anywhere;font-variant-numeric:tabular-nums}
.calculator-keys{display:grid;grid-template-columns:repeat(4,1fr);gap:4px;margin-top:6px}
.calculator-keys button{padding:6px;min-height:40px}
@media(min-width:1250px){.resource-layout{grid-template-columns:minmax(0,1fr) 230px}}

/* v9.5: no typed workspace or hidden scratch extension; calculator always alongside. */
.answer-stage{display:grid;grid-template-columns:minmax(0,1fr) 210px;column-gap:18px;align-items:start}
#answer-calculator:empty{display:none}
.answer-stage #answer-calculator{grid-column:2;grid-row:1 / span 2;position:sticky;top:12px}
.answer-stage #annotation-scroll{grid-column:1;grid-row:1;overflow:visible;max-height:none}
.answer-stage #annotation-surface{min-height:550px;display:flex;flex-direction:column}
.answer-stage .annotation-blank{height:auto;min-height:120px;flex:1}
.answer-stage #stage-controls{grid-column:1;grid-row:2}
.calculator{margin:0;padding:8px}
.calculator h2{font-size:1rem;margin:0 0 8px}
#calculator-expression{min-height:40px;padding:6px;background:#f1f4f6;overflow-wrap:anywhere;font-size:.9rem}
#calculator-display{font-weight:600}
@media(max-width:1000px){.answer-stage{grid-template-columns:minmax(0,1fr) 185px;gap:12px}.calculator-keys button{min-width:0}}

#idle-dialog{position:fixed;inset:0;z-index:1000;display:grid;place-items:center;background:rgba(238,242,246,.93);padding:20px}
#idle-dialog>div{max-width:520px;background:white;border:1px solid #afc4d3;border-radius:10px;padding:28px}
#idle-dialog h2{margin-top:0}#idle-dialog button{display:flex;align-items:center;gap:14px}
.idle-ring{display:grid;place-items:center;width:48px;height:48px;border-radius:50%;background:conic-gradient(#426580 calc(var(--remaining,1)*1turn),#e5e9ed 0)}
.idle-seconds{display:grid;place-items:center;width:38px;height:38px;border-radius:50%;background:white;font-size:14px;font-variant-numeric:tabular-nums}
.answer-stage #workspace-hint{grid-column:1 / -1;grid-row:1;margin:0 0 12px}
.answer-stage:has(#workspace-hint) #annotation-scroll{grid-row:2}
.answer-stage:has(#workspace-hint) #answer-calculator{grid-row:2 / span 2}
.answer-stage:has(#workspace-hint) #stage-controls{grid-row:3}
/* Numeric Pilot A: one stable, wider desktop workspace. */
main{max-width:1200px}
.answer-stage{display:block}
.answer-stage #annotation-scroll{overflow:visible;max-height:none}
.answer-stage #annotation-surface{min-height:360px;display:flex;flex-direction:column}
.answer-stage .annotation-blank{min-height:90px}
.task-card .stimulus{max-width:100%;line-height:1.5}
.numeric-resources{display:grid;grid-template-columns:minmax(0,1fr) 230px;gap:24px;align-items:start;margin:16px 0}
.scratchpad{padding:14px;border:1px solid #bdcbd5;border-radius:8px;background:#f5f8fa}
.scratchpad label{font-weight:600;margin:0}.scratchpad p{font-size:.85rem;line-height:1.5}
.scratchpad textarea{width:100%;min-height:140px;background:white}
.answer-sentence{display:flex;flex-wrap:wrap;align-items:center;gap:8px;font-size:1.05rem}
.answer-sentence #numeric-answer{width:160px;min-width:100px;text-align:center;border:2px solid #7895aa}
#numeric-error{min-height:24px;margin:4px 0}
/* Keep prose readable while the annotation surface spans the full workspace. */
.task-card .stimulus>p{max-width:90ch}
.ai-resource{margin:18px 0;padding:18px;border:1px solid #bdcbd5;border-radius:8px}.ai-resource #chat{max-height:330px;overflow:auto;white-space:pre-wrap}.ai-resource textarea{width:100%;min-height:80px}

/* Pilot A reference layout: broad annotated paper, visible calculator, answer footer. */
main:has(.task-card.answer-stage:not(.b-task)){max-width:1600px;width:calc(100% - 32px);box-sizing:border-box;margin:16px auto;padding:12px}
.task-card.answer-stage:not(.b-task){display:grid;grid-template-columns:minmax(0,1fr) 280px;gap:14px;padding:16px;border:2px solid #accce6;border-radius:18px;background:#f8fbfe}
.task-card.answer-stage:not(.b-task) #annotation-scroll{grid-column:1;grid-row:1;border:1px solid #cfdfec;border-radius:12px;background:white;overflow:hidden}
.task-card.answer-stage:not(.b-task) #annotation-surface{min-height:480px;padding:24px;box-sizing:border-box}
.task-card.answer-stage:not(.b-task) .annotation-blank{background:white;min-height:130px}
.task-card.answer-stage:not(.b-task) #annotation-hint{font-size:.8rem;margin:0 0 12px}
.task-card.answer-stage:not(.b-task) .stimulus .module-label{display:none}
.task-card.answer-stage:not(.b-task) .stimulus{padding:0;margin:0;line-height:1.5}
.task-card.answer-stage:not(.b-task) .stimulus p{margin:0 0 10px}
.task-card.answer-stage:not(.b-task) #answer-calculator{grid-column:2;grid-row:1;position:static;min-width:0}
.task-card.answer-stage:not(.b-task) .calculator{height:100%;box-sizing:border-box;padding:18px;border:1px solid #cfdfec;border-radius:12px;background:white}
.task-card.answer-stage:not(.b-task) .calculator h2{color:#245da8;font-size:1.15rem;padding-bottom:12px;border-bottom:3px solid #397bd0}
.task-card.answer-stage:not(.b-task) #calculator-panel{max-width:none}
.task-card.answer-stage:not(.b-task) .calculator-keys{gap:7px}
.task-card.answer-stage:not(.b-task) .calculator-keys button{min-height:55px;background:#edf1f5;border:0;border-radius:9px;font-size:1.25rem;color:#23344a}
.task-card.answer-stage:not(.b-task) #calculator-expression,.task-card.answer-stage:not(.b-task) #calculator-display{background:#f4f7fa}
#a-annotation-tools{border-top:1px solid #e0e9f0;padding:10px 18px;background:#fbfdff}
#a-annotation-tools .drawing-toolbar{margin:0;display:flex;flex-wrap:wrap;align-items:center;gap:12px}
.task-card.answer-stage:not(.b-task) #stage-controls{grid-column:1 / -1;grid-row:2;border-top:1px solid #dce7f0;padding:10px 12px 0}
.task-card.answer-stage:not(.b-task) #stage-controls .task-module{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:4px 22px;margin:0;padding:0;border:0;background:transparent}
.task-card.answer-stage:not(.b-task) #stage-controls h2{grid-column:1;font-size:1rem;margin:0 0 6px}
.task-card.answer-stage:not(.b-task) .answer-sentence{grid-column:1;grid-row:2;margin:0}
.task-card.answer-stage:not(.b-task) #stage-controls .actions{grid-column:2;grid-row:2;margin:0;align-self:center}
.task-card.answer-stage:not(.b-task) #stage-controls .primary{min-width:190px;background:#367bd3;border-radius:8px}
.task-card.answer-stage:not(.b-task) #numeric-help{grid-column:1 / -1;font-size:.8rem;margin:10px 0 0}
.task-card.answer-stage:not(.b-task) #numeric-error{grid-column:1 / -1;min-height:0}
@media(max-width:900px){.task-card.answer-stage:not(.b-task){grid-template-columns:minmax(0,1fr) 205px;gap:10px;padding:10px}.task-card.answer-stage:not(.b-task) .calculator{padding:10px}.task-card.answer-stage:not(.b-task) #annotation-surface{padding:16px}}
@media(max-width:600px){.task-card.answer-stage:not(.b-task){grid-template-columns:minmax(0,1fr)}.task-card.answer-stage:not(.b-task) #answer-calculator{grid-column:1;grid-row:2}.task-card.answer-stage:not(.b-task) #stage-controls{grid-row:3}.task-card.answer-stage:not(.b-task) #stage-controls .task-module{display:block}.task-card.answer-stage:not(.b-task) #stage-controls .actions{margin-top:12px}}
/* Versioned Pilot B: same problem/answer layout as A, tabbed on-demand support. */
.task-card.answer-stage.b-tabbed{grid-template-columns:minmax(0,1fr) 360px;align-items:start}
.b-tabbed .b-support{background:white;border:1px solid #cfdfec;border-radius:12px;padding:12px;box-sizing:border-box}
.b-support [role=tablist]{display:flex;border-bottom:1px solid #dce7f0;margin-bottom:14px}
.b-support [role=tab]{flex:1;background:transparent;border:0;border-radius:0;padding:12px 6px;color:#566477;font-size:1rem}
.b-support [role=tab][aria-selected=true]{color:#245da8;border-bottom:3px solid #397bd0;font-weight:600}
.b-support [role=tabpanel][hidden]{display:none}
.b-support details{border:1px solid #d5e6f6;border-radius:8px;background:#f7fbff;margin:10px 0;overflow:hidden}
.b-support summary{cursor:pointer;color:#235fad;font-weight:600;padding:14px;line-height:1.4}
.b-support .support-content{padding:4px 14px 16px;white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.55;font-size:.93rem}
.b-support textarea{width:100%;min-height:85px;box-sizing:border-box;resize:vertical}
.b-support label,.b-support #ai-status,.support-disclosure{font-size:.85rem}
.b-support #chat:empty{display:none}
.b-support #chat{max-height:260px;overflow:auto}
.b-support .support-disclosure{background:#f1f7ff;border-radius:8px;padding:10px;line-height:1.45}
.task-card.answer-stage.b-tabbed .calculator{padding:0;border:0}
.b-tabbed #calculator-panel{max-width:none}
@media(max-width:1000px){.task-card.answer-stage.b-tabbed{grid-template-columns:minmax(0,1fr) 300px}}
@media(max-width:680px){.task-card.answer-stage.b-tabbed{grid-template-columns:minmax(0,1fr)}.task-card.answer-stage.b-tabbed #answer-calculator{grid-column:1;grid-row:2}.task-card.answer-stage.b-tabbed #stage-controls{grid-row:3}}
.b-tabbed .b-support [role=tabpanel]{max-height:520px;overflow-y:auto;padding:0 6px 6px;scrollbar-gutter:stable}

/* Short AI steps retain model line breaks without interpreting HTML. */
.b-support .support-content p{margin:8px 0 16px;white-space:pre-wrap}
.b-support .support-content p:last-child{margin-bottom:0}

/* Context, numeric givens, and answer within the drawing workspace. */
.stimulus:has(.answer-cue) .task-context{background:#edf4fb;border-left:4px solid #477ba6;padding:14px 16px;font-size:1.1rem;font-weight:600}
.stimulus .given-number{background:#eef2f6;border:1px solid #cbd6e0;border-radius:4px;padding:0 3px;color:inherit;box-decoration-break:clone;-webkit-box-decoration-break:clone}
.task-card.answer-stage .answer-cue{display:none}
.task-card.answer-stage:not(.b-task) #annotation-scroll>#stage-controls{padding:16px;background:#f8fbfe}
.task-card.answer-stage:not(.b-task) #annotation-scroll #stage-controls .task-module{display:block}
.task-card.answer-stage:not(.b-task) #annotation-scroll #stage-controls .actions{margin-top:12px}
@media(max-width:900px){.task-card.answer-stage.b-tabbed{grid-template-columns:minmax(0,1fr) 270px}}
@media(max-width:760px){.task-card.answer-stage.b-tabbed{grid-template-columns:minmax(0,1fr)}.task-card.answer-stage.b-tabbed #answer-calculator{grid-column:1;grid-row:2}}
/* Numeric entry is a small live-HTML island inside the annotation surface. */
.task-card.answer-stage:not(.b-task) #annotation-surface>#stage-controls{position:relative;z-index:3;pointer-events:none;background:transparent;padding:10px 0 0;border:0;min-height:0}
.task-card.answer-stage:not(.b-task) #annotation-surface #stage-controls .task-module{display:block}
.task-card.answer-stage:not(.b-task) #annotation-surface #stage-controls h2{display:none}
.task-card.answer-stage:not(.b-task) #annotation-surface .answer-sentence{font-size:1.1rem;line-height:1.7;font-weight:600;display:flex;flex-wrap:wrap;align-items:center;gap:6px}
.task-card.answer-stage:not(.b-task) #annotation-surface #numeric-answer,.task-card.answer-stage:not(.b-task) #annotation-surface #training-answer,.task-card.answer-stage:not(.b-task) #annotation-surface #practice-number,.task-card.answer-stage:not(.b-task) #annotation-surface #next{position:relative;pointer-events:auto;background:white;z-index:4}
.task-card.answer-stage:not(.b-task) #annotation-surface #next{background:#367bd3;min-width:120px}
.task-card.answer-stage:not(.b-task) #annotation-surface #stage-controls .actions{margin:8px 0;display:inline-flex;pointer-events:none}
.task-card.answer-stage:not(.b-task) #annotation-surface #numeric-help{font-weight:400;font-size:.78rem;line-height:1.4;margin:6px 0}
.task-card.answer-stage:not(.b-task) #annotation-surface .annotation-blank{flex:1;min-height:220px}
.confidence-reading{padding:18px;border:1px solid #cfdfec;border-radius:10px;background:#f8fbfe;transition:opacity .2s}
.confidence-reading.confidence-dimmed{opacity:.5}
.reading-label{font-size:1.05rem;color:#245da8;margin:0 0 14px}
.rating-panel.modern-confidence{border:2px solid #b9d2ec;border-radius:10px;padding:20px;margin-top:18px;background:white}
.confidence-reminder{padding:12px;background:#e8f2ff;border-left:4px solid #367bd3;font-weight:600}
.scale{touch-action:none}
/* Pilot B/demo persistent tools: fixed columns and independent tool scrolling. */
.task-card.answer-stage.b-tool-rail{grid-template-columns:minmax(0,72fr) minmax(250px,28fr);align-items:stretch}
.task-card.answer-stage.b-tool-rail #answer-calculator{display:grid;grid-template-rows:minmax(0,38fr) minmax(0,62fr);gap:12px;padding:0;border:0;background:transparent;height:max(720px,calc(100dvh - 160px));min-width:0}
.b-tool-rail .rail-tool{min-height:0;min-width:0;border:1px solid #cfdfec;border-radius:10px;background:white;padding:10px;overflow:auto}
.b-tool-rail #panel-genai{display:flex;flex-direction:column;overflow:hidden}
.b-tool-rail #panel-genai>h2{font-size:1rem;margin:0 0 8px;color:#245da8;flex:none}
.b-tool-rail .rail-ai-content{overflow-y:auto;min-height:0;scrollbar-gutter:stable}
.task-card.answer-stage.b-tool-rail .calculator{padding:0;border:0}
.task-card.answer-stage.b-tool-rail .calculator h2{font-size:1rem;margin:0 0 6px;padding:0 0 6px}
.task-card.answer-stage.b-tool-rail .calculator-keys{gap:4px}
.task-card.answer-stage.b-tool-rail .calculator-keys button{min-height:42px;padding:4px;font-size:1rem}
.task-card.answer-stage.b-tool-rail #calculator-expression,.task-card.answer-stage.b-tool-rail #calculator-display{font-size:.9rem;padding:3px 8px;min-height:25px}
.task-card.answer-stage.b-tool-rail #annotation-scroll{display:flex;flex-direction:column;min-width:0}
.task-card.answer-stage.b-tool-rail #annotation-surface{flex:1;min-height:640px}
.b-tool-rail .b-support summary{padding:10px;font-size:.88rem}
.b-tool-rail .b-support .support-content{font-size:.85rem}
@media(max-width:900px){.task-card.answer-stage.b-tool-rail{grid-template-columns:minmax(0,72fr) minmax(230px,28fr);gap:10px}.task-card.answer-stage.b-tool-rail #annotation-surface{padding:16px}}
@media(max-width:600px){.task-card.answer-stage.b-tool-rail{min-width:700px}}

.task-card.answer-stage.b-tool-rail #answer-calculator[data-tool-order="ai_top_calculator_bottom"]{grid-template-rows:minmax(0,62fr) minmax(0,38fr)}
/* Fit the complete keypad; allocate all remaining rail space to AI. */
.task-card.answer-stage.b-tool-rail #answer-calculator{grid-template-rows:280px minmax(0,1fr)}
.task-card.answer-stage.b-tool-rail #answer-calculator[data-tool-order="ai_top_calculator_bottom"]{grid-template-rows:minmax(0,1fr) 280px}
.b-tool-rail #panel-calculator{overflow:hidden}
.task-card.answer-stage.b-tool-rail .calculator{position:relative}
.task-card.answer-stage.b-tool-rail .calculator h2{padding-right:55px;height:30px;margin:0}
.task-card.answer-stage.b-tool-rail .calculator-keys button{min-height:40px;height:40px}
.task-card.answer-stage.b-tool-rail .calculator-keys [data-calc="C"]{position:absolute;right:0;top:0;width:44px;min-height:28px;height:28px}
.task-card.answer-stage.b-tool-rail #calculator-expression,.task-card.answer-stage.b-tool-rail #calculator-display{height:25px;min-height:25px;line-height:19px;margin:0}

/* Dictation control sits inside the follow-up field without hiding its text. */
.voice-input{position:relative}
.b-support .voice-input textarea{display:block;padding-right:48px;padding-bottom:42px}
.b-support .voice-input .voice-icon{position:absolute;right:6px;bottom:6px;width:36px;height:36px;min-height:36px;padding:7px;display:grid;place-items:center;border:0;border-radius:7px;background:#edf4fb;color:#245da8}
.voice-icon svg{width:22px;height:22px}
.b-support .voice-input .voice-icon[aria-pressed=true]{background:#fbe9e9;color:#a33333}
.voice-status:empty{display:none}
.voice-status{font-size:.75rem;margin:4px 0;line-height:1.35}
#app[data-main-study="true"] :is(.b-support,.main-payment-reflection) .voice-input textarea{display:block;padding-right:16px;padding-bottom:66px;min-height:124px}
#app[data-main-study="true"] :is(.b-support,.main-payment-reflection) .voice-input .voice-icon{position:absolute;right:10px;bottom:10px;width:114px;height:46px;min-height:46px;padding:9px 13px;display:inline-flex;justify-content:center;align-items:center;gap:9px;border:1px solid #b9cfe2;border-radius:10px;background:#eaf3fb;color:#24557c;box-shadow:0 2px 5px #173c5c12;transition:background .15s,border-color .15s}
#app[data-main-study="true"] .voice-icon::after{content:"Speak";font-size:.94rem;font-weight:650;line-height:1}
#app[data-main-study="true"] .voice-icon svg{width:24px;height:24px;flex-shrink:0}
#app[data-main-study="true"] :is(.b-support,.main-payment-reflection) .voice-icon:hover{background:#deedf9;border-color:#8cacc8}
#app[data-main-study="true"] :is(.b-support,.main-payment-reflection) .voice-icon:focus-visible{outline:3px solid #83b5db;outline-offset:3px}
#app[data-main-study="true"] :is(.b-support,.main-payment-reflection) .voice-icon[aria-pressed="true"]{background:#a53748;border-color:#a53748;color:#fff}
#app[data-main-study="true"] .voice-icon[aria-pressed="true"]::after{content:"Stop"}
#app[data-main-study="true"] .voice-status{font-size:.83rem;line-height:1.45;margin:6px 0;color:#526575}

/* Minimal visual theme. Keep timing, visibility, hit areas and task geometry intact. */
@media screen {
  :root{--ui-ink:#26323b;--ui-muted:#606c76;--ui-line:#dce2e6;--ui-paper:#fff;--ui-soft:#f5f7f8;--ui-accent:#285f87;background:#f6f7f8;color:var(--ui-ink)}
  body main{border-color:var(--ui-line);border-radius:12px;box-shadow:none}
  body h1{letter-spacing:-.035em;font-weight:600}
  body h2{letter-spacing:-.015em}
  body a{color:var(--ui-accent);text-underline-offset:4px}
  body .muted,body .progress,body .eyebrow{color:var(--ui-muted)}
  body button{border-color:#c8d1d8;border-radius:7px;background:white;color:var(--ui-ink);box-shadow:none}
  body button:hover:not(:disabled){background:#edf2f5;border-color:#879dab}
  body button:active:not(:disabled){background:#e1e9ef}
  body button.primary{background:var(--ui-accent);border-color:var(--ui-accent);color:white}
  body button.primary:hover:not(:disabled){background:#204e70;border-color:#204e70}
  body input,body select,body textarea{border-color:#b7c3cc;border-radius:6px;background:white;color:var(--ui-ink)}
  body .quiet-card,body .reassurance,body .recorded-answer,body .qa-meta{background:var(--ui-soft);border-color:var(--ui-line);border-radius:8px}
  body .step-number{background:#edf2f5;color:var(--ui-accent)}
  body .option,body .likert label{border-color:var(--ui-line)}
  body .option:has(input:checked),body .likert label:has(input:checked),body .effort-grid button[aria-pressed=true]{background:#eaf2f8;border-color:var(--ui-accent);color:var(--ui-ink)}
  body .rating-panel,body .rating-panel.modern-confidence{background:white;border-color:#b7cbd9;border-left-color:var(--ui-accent);border-radius:8px}
  body .confidence-reading{background:#fafbfc;border-color:var(--ui-line);border-radius:8px}
  body .reading-label{color:var(--ui-accent)}
  body .confidence-reminder{background:#eaf2f8;border-left-color:var(--ui-accent)}
  body .stimulus:has(.answer-cue) .task-context{background:#edf3f7;border-left-color:var(--ui-accent);border-radius:0 6px 6px 0}
  body .stimulus .given-number{background:#f0f3f5;border-color:#cbd5dd;border-radius:3px}
  body .task-card.answer-stage:not(.b-task){background:transparent;border-color:transparent;border-radius:12px}
  body .task-card.answer-stage:not(.b-task) #annotation-scroll,
  body .task-card.answer-stage:not(.b-task) .calculator,
  body .b-tool-rail .rail-tool{background:white;border-color:var(--ui-line);border-radius:8px}
  body .task-card.answer-stage:not(.b-task) .calculator h2{color:var(--ui-accent);border-bottom-color:var(--ui-line)}
  body .task-card.answer-stage:not(.b-task) .calculator-keys button{background:#f1f4f6;color:var(--ui-ink);border-radius:6px}
  body .task-card.answer-stage:not(.b-task) .calculator-keys button:hover:not(:disabled){background:#e3ebf1}
  body .task-card.answer-stage:not(.b-task) .calculator-keys button:active:not(:disabled){background:#d3e0e9}
  body #calculator-expression,body #calculator-display,
  body .task-card.answer-stage:not(.b-task) #calculator-expression,
  body .task-card.answer-stage:not(.b-task) #calculator-display{background:#f5f7f8;color:var(--ui-ink)}
  body #a-annotation-tools{background:#fafbfc;border-color:var(--ui-line)}
  body .task-card.answer-stage:not(.b-task) #annotation-surface #next,
  body .task-card.answer-stage:not(.b-task) #stage-controls .primary{background:var(--ui-accent);color:white}
  body .task-card.answer-stage:not(.b-task) #annotation-surface #next:hover:not(:disabled){background:#204e70}
  body .answer-sentence #numeric-answer{border-color:#64849a;border-radius:6px}
  body .b-tabbed .b-support{border-color:transparent;border-radius:8px}
  body .b-support details{background:white;border-color:transparent;border-bottom-color:var(--ui-line);border-radius:0}
  body .b-support summary{color:var(--ui-accent);background:white}
  body .b-support summary:hover{background:#edf2f5}
  body .b-support details[open] summary{background:#edf3f7}
  body .b-support .support-disclosure{background:var(--ui-soft);border-radius:6px}
  body .b-tool-rail #panel-genai>h2{color:var(--ui-accent)}
  body .b-task .ai-resource{border-color:#b7cbd9;background:#fafbfc;box-shadow:none}
  body .b-message{border-color:var(--ui-line);background:#f3f6f8;border-radius:6px}
  body .b-message.b-user{background:white}
  body #idle-dialog>div,body #attention-notice>div{border-color:#b7cbd9;border-radius:12px;box-shadow:0 12px 48px #26323b14}
  body main>section:not([class]):not([id]){padding:20px 0;border-top:1px solid var(--ui-line)}
  body main>details{border-top:1px solid var(--ui-line);padding:16px 0}
  body main>details>summary{cursor:pointer;font-weight:600;color:var(--ui-accent)}
  /* Keep border widths and controls intact while removing redundant framing. */
  body main:has(.task-card.answer-stage){background:transparent;border-color:transparent}
  body .task-card .stimulus{border-top-color:transparent}
  body .task-card .story{line-height:1.6}
  body .task-card .stimulus .task-context{margin-bottom:16px}
  body .task-card.answer-stage:not(.b-task) .calculator h2{border-bottom-color:transparent}
  body #a-annotation-tools{background:white}
  body .b-support .support-content p{margin:12px 0;line-height:1.6}
  body .b-support .support-content p:first-child{margin-top:8px}
  body .b-support .support-content p:last-child{margin-bottom:0}
  body .page-heading{margin-bottom:24px}
  body .quiet-card,body .reassurance{padding:20px 24px}
  body .info-section{padding:16px 0}
  body .steps{gap:16px}

}

/* Readable answer requirements and AI prose; no hidden text or extra controls. */
@media screen {
  #numeric-help .answer-format-row{display:grid;grid-template-columns:4.5em minmax(0,1fr);column-gap:10px;margin:5px 0;line-height:1.45}
  #numeric-help .answer-format-row strong{font-weight:600;color:#465662}
  body .b-support .support-content{line-height:1.65;white-space:normal}
  body .b-support .support-content p{line-height:1.65;margin:14px 0;overflow-wrap:anywhere}
  body .b-support [data-support="final_answer"] .support-content{font-weight:600}
}

/* Secondary endpoint: neutral entry, explicit modal confirmation. */
body .surrender-control{position:relative;z-index:4;pointer-events:auto;background:transparent;border-color:transparent;color:#606c76;font-size:.8rem;text-decoration:underline;text-underline-offset:3px;padding:8px;min-height:40px}
#surrender-dialog{width:min(640px,calc(100vw - 32px));max-height:calc(100dvh - 40px);overflow:auto;border:1px solid #dce2e6;border-radius:12px;padding:24px;color:#26323b;background:white}
#surrender-dialog::backdrop{background:rgb(38 50 59 / .32)}
#surrender-dialog h2{margin-top:0;font-size:1.15rem;line-height:1.5}
#surrender-dialog .rating-panel{margin:0;padding:0;border:0;animation:none}
#surrender-dialog .effort-grid{gap:5px}
#surrender-dialog .effort-grid button{padding:10px 0;min-width:0}
#surrender-reasons label{display:flex;align-items:baseline;gap:10px;font-size:.9rem;line-height:1.45;margin:14px 0}
#surrender-reasons #surrender-other-row{display:block}
#surrender-reasons textarea{display:block;min-height:70px}

#repeat-answer-dialog{width:min(520px,calc(100vw - 40px));max-height:85vh;overflow:auto;border:1px solid #d8dee5;border-radius:12px;padding:24px;color:#243342;background:#fff;box-shadow:0 16px 48px #172b4d26}
#repeat-answer-dialog::backdrop{background:#172b4d55}
#repeat-answer-dialog h2{margin-top:0;font-size:1.25rem}
#repeat-answer-dialog p{line-height:1.6}
#repeat-answer-dialog .actions{display:flex;flex-wrap:wrap;gap:12px}

#practice-spotlight{position:fixed;inset:0;z-index:10000;pointer-events:none}
#practice-spotlight .spotlight-shade{position:fixed;background:rgb(18 28 40 / 66%);pointer-events:auto;touch-action:none}
#practice-spotlight .spotlight-outline{position:fixed;border:2px solid #91b9e6;border-radius:9px;box-shadow:0 0 0 2px #ffffff90;pointer-events:none}
#practice-spotlight .spotlight-card{position:fixed;box-sizing:border-box;padding:18px;border:1px solid #dce4ec;border-radius:12px;background:#fff;color:#243342;box-shadow:0 12px 36px #0003;pointer-events:auto;max-height:calc(100dvh - 24px);overflow:auto;font-size:15px;line-height:1.5}
#practice-spotlight .spotlight-count{margin:0 0 6px;font-size:13px;font-weight:650;color:#245da8}
#practice-spotlight h2{font-size:19px;line-height:1.3;margin:0 0 8px}
#practice-spotlight .spotlight-description{margin:0 0 10px}
#practice-spotlight .spotlight-status{font-size:13px;color:#647080;margin:0 0 12px}
#practice-spotlight button{width:100%;min-height:44px}

/* Inspection overlays blank paper without changing the final task geometry. */
.task-card {position:relative;}
.inspection-rating{position:fixed;z-index:20;bottom:12px;left:12px;width:calc(72% - 24px);box-sizing:border-box;padding:16px 20px;background:#fff;border:1px solid #9ab3c2;border-radius:12px;box-shadow:0 4px 20px #24384418;}
.inspection-rating .rating h2{font-size:18px;margin:0 0 12px;}
.inspection-rating .anchors{font-size:13px;}
.inspection-rating .scale{margin:18px 6px 8px;}
.inspection-rating .scale-value{font-size:14px;min-height:20px;margin:4px 0;}
.inspection-rating button{padding:9px 18px;}
.inspection-error:empty{display:none;}
.inspect-and-rate #answer-calculator{opacity:.45;}
.inspect-and-rate canvas{pointer-events:none!important;}
@media(max-height:700px){.inspection-rating{padding:10px 16px;}.inspection-rating .rating h2{font-size:16px;}}

.inspection-rating .rating{margin:0;padding:0;}
.inspection-rating .scale{height:32px;}

/* Native modal: viewport-centred, without changing workspace geometry. */
.prospective-rating-modal{margin:auto;width:min(660px,calc(100vw - 32px));max-height:calc(100dvh - 32px);padding:24px;border:1px solid #a4b7c3;border-radius:12px;background:#fff;color:#202b36;box-shadow:0 12px 50px #15293635;overflow:hidden;}
.prospective-rating-modal::backdrop{background:rgba(32,43,54,.5);}
.prospective-rating-modal .rating{margin:0;}
.prospective-rating-modal .rating h2{font-size:clamp(17px,2.2vw,22px);line-height:1.4;margin:0 0 18px;}
.prospective-rating-modal .anchors{font-size:14px;}
.prospective-rating-modal .scale{height:44px;margin:16px 12px 6px;}
.prospective-rating-modal .thumb[hidden]{display:none!important;}
.prospective-rating-modal .scale-value{font-size:15px;margin-bottom:12px;}
.prospective-rating-modal button{min-height:46px;}
.prospective-rating-modal .inspection-error:empty{display:none;}
.rating-practice-instruction,#rating-reminder{font-size:14px;line-height:1.4;color:#586571;margin:0 0 12px;}
@media(max-height:500px){.prospective-rating-modal{padding:16px;}.prospective-rating-modal .rating h2{margin-bottom:10px;}.prospective-rating-modal .scale{margin-top:8px;}}

/* A full-width, bright rating band; problem text remains lightly shaded. */
.prospective-rating-modal{max-width:none;border-left:0;border-right:0;border-radius:0;padding:20px 24px;text-align:center;box-shadow:0 8px 30px #15293625;}
.prospective-rating-modal .rating{max-width:1000px;margin:0 auto;}
.prospective-rating-modal .rating h2{text-align:center;}
.prospective-rating-modal>button{display:block;margin:0 auto;}
.prospective-rating-modal .inspection-error{max-width:1000px;margin:8px auto 0;}

/* Calm paper-toned occlusion; only the printed problem fades, not the rating. */
@property --rating-problem-alpha{syntax:"<number>";inherits:false;initial-value:.18;}
@keyframes rating-problem-fade{from{--rating-problem-alpha:.18;}to{--rating-problem-alpha:1;}}
.prospective-rating-modal{border-color:#dce4e9;background:#fff;box-shadow:0 8px 28px #20334016;padding:22px 28px;}
.prospective-rating-modal .rating h2{font-weight:600;letter-spacing:-.02em;}
.prospective-rating-modal .anchors{color:#64717c;}
.prospective-rating-modal .scale-value{color:#365669;font-variant-numeric:tabular-nums;}
.prospective-rating-modal>button{min-width:128px;border-radius:8px;}
@media(max-height:600px){.prospective-rating-modal{padding:14px 24px;}}

/* Explicit development provenance; production never shows this banner. */
#main-dev-badge{background:#fff6d9;color:#57471d;text-align:center;padding:6px 12px;font-size:13px}
.main-dev-preview #app{margin-top:16px}
.b-tool-rail #panel-genai[hidden]{display:none!important}
.b-tool-rail #answer-calculator:has(#panel-genai[hidden]){grid-template-rows:auto}

/* Matched informational feedback: identical emphasis for both outcomes. */
main:has(>.main-feedback){min-height:calc(100svh - 48px);margin:24px auto;display:flex;flex-direction:column;justify-content:center;}
.main-feedback{width:100%;max-width:880px;margin:0 auto;text-align:center;}
main:has(>.main-feedback)>#error:empty{display:none;}
.main-feedback .feedback-result{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:24px;min-height:168px;padding:28px 32px;margin-bottom:28px;border:1px solid #d5e0e6;border-radius:14px;background:#f7fafb;}
.main-feedback .feedback-result-icon{display:grid;place-items:center;flex:0 0 76px;width:76px;height:76px;border:1px solid #b9ccd8;border-radius:50%;background:#fff;color:#2b607b;}
.main-feedback .feedback-result-icon svg{width:48px;height:48px;}
.main-feedback .feedback-result h1{margin:0;color:#263740;font-size:clamp(24px,3vw,34px);font-weight:650;line-height:1.3;letter-spacing:-.025em;}
.main-feedback>#next{min-width:144px;margin-top:8px;}
.main-feedback #inline-probe{margin:0 0 24px;text-align:left;}
@media(max-width:600px){main:has(>.main-feedback){margin:12px;min-height:calc(100svh - 24px);}.main-feedback .feedback-result{gap:16px;padding:24px 18px;min-height:168px;}.main-feedback .feedback-result-icon{flex-basis:60px;width:60px;height:60px;}.main-feedback .feedback-result-icon svg{width:40px;height:40px;}}

/* A continuous cool-gray veil; the rating band stays bright and quiet. */
.prospective-rating-modal{background:#fdfefe;border-color:#d5dee4;box-shadow:0 -8px 28px #243d4d0a,0 12px 32px #243d4d14;}
.prospective-rating-modal .anchors{color:#5b6c78;}
.prospective-rating-modal .scale:before{background:#b2c3ce;border-radius:2px;}

/* Brief, non-obscuring instruction at the rating-band edge. */
.rating-reading-cue{margin:0 0 14px;font-size:14px;font-weight:500;letter-spacing:.01em;color:#526875;animation:reading-cue-pulse 1.6s ease-in-out 2;}
@keyframes reading-cue-pulse{0%,100%{opacity:1}50%{opacity:.48}}
@media(prefers-reduced-motion:reduce){.rating-reading-cue{animation:none}}

/* Self-paced pre-solving inspection; no fading timer. */
.hold-reading-modal{overflow:visible;}
.hold-reading-area{position:fixed;box-sizing:border-box;background:#fff;border:1px solid #c9d6df;border-radius:12px;touch-action:none;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;cursor:pointer;text-align:left;overflow:hidden;color:#26353e;}
.hold-reading-content{padding:8px;visibility:hidden;pointer-events:none;}
.hold-reading-cover{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;background:#e6edf1;color:#294f65;text-align:center;padding:16px;}
.hold-reading-cover strong{font-size:1.2rem;}.hold-reading-cover span{font-size:.95rem;}
.hold-reading-area.revealed .hold-reading-content{visibility:visible;}.hold-reading-area.revealed .hold-reading-cover{visibility:hidden;}
.hold-awaiting-read>.rating,.hold-awaiting-read>#start-problem,.hold-awaiting-read>.inspection-error{visibility:hidden;}
.hold-reading-area:focus-visible{outline:3px solid #2c6688;outline-offset:2px;}

.hold-reading-area:not(.revealed) .hold-reading-content *{visibility:hidden!important;}
.practice-target{outline:2px solid #648ba4;outline-offset:4px;}

/* Guided-practice spotlight: advance the visual focus with the completed action. */

/* Recovery dialogs must take precedence over practice spotlights and rating modals. */
#attention-notice{width:100vw;height:100dvh;max-width:none;max-height:none;margin:0;border:0;overflow:auto;box-sizing:border-box;}
body:has(#attention-notice[open]) #practice-spotlight{visibility:hidden;}

/* Pilot A post-problem appraisals share one compact page. */
.combined-ratings .rating-panel{margin:0 0 18px;padding:20px 24px;}
.combined-ratings .rating-panel h2{font-size:1.25rem;margin:0 0 16px;}
.combined-ratings .anchors{margin:12px 0;}
.combined-ratings .effort-grid button{min-height:48px;padding:12px;}
.combined-ratings #effort-status{display:none;}
.combined-ratings [aria-pressed="true"]{background:#285f80;color:#fff;border-color:#285f80;}

.ambiguity-picker{border:1px solid #cbd6df;border-radius:8px;padding:12px;margin:12px 0;}
.ambiguity-picker[open]{max-height:340px;overflow:auto;}
.ambiguity-picker label{display:block;padding:12px 0;border-bottom:1px solid #e3e8eb;}
.ambiguity-picker .review-stem{display:block;white-space:pre-wrap;margin:6px 0 0 26px;font-weight:normal;}

#experience .voice-input{padding-bottom:8px}#experience .feedback-voice{width:auto;height:38px;display:flex;align-items:center;gap:7px;padding:6px 12px;background:#e7eff4;color:#285c7a;border:1px solid #b9cedc;border-radius:6px}#experience .feedback-voice svg{width:20px;height:20px}
body.pilot-a .surrender-control{font-size:13px;color:#61747c}

#experience .feedback-voice::after{content:'Speak your feedback';font-size:13px;font-weight:600}#experience .feedback-voice[aria-pressed=true]::after{content:'Stop recording'}

/* Decorative Pilot A orientation banner stays inside the study card. */
.orientation-banner-wrap{width:100%;max-width:100%;aspect-ratio:6/1;max-height:150px;overflow:hidden;border-radius:10px;margin:20px 0 24px}
.orientation-banner{width:100%;height:100%;display:block;object-fit:cover;object-position:center}
@media(max-width:900px){.orientation-banner-wrap{aspect-ratio:6/1;margin:16px 0 20px}}

/* Pilot A: use the visible viewport for paper; keep drawing controls reachable. */
.task-card.answer-stage:not(.b-task):not(.b-tool-rail) #annotation-scroll{height:var(--paper-height,calc(100dvh - 140px));display:flex;flex-direction:column;min-height:0}
.task-card.answer-stage:not(.b-task):not(.b-tool-rail) #annotation-surface{flex:1;min-height:0;overflow-y:auto}
.task-card.answer-stage:not(.b-task):not(.b-tool-rail) #annotation-surface .annotation-blank{min-height:100px}
.task-card.answer-stage:not(.b-tool-rail) #a-annotation-tools{flex:0 0 auto}

.orientation-intro{font-size:clamp(1.2rem,1.05rem + .65vw,1.5rem);line-height:1.55;font-weight:700}

/* Main Study only: keep the problem workspace and its toolbar inside the viewport. */
#app[data-main-study="true"] .main-viewport-workspace{height:var(--main-workspace-height);min-height:240px}
#app[data-main-study="true"] .main-viewport-workspace #annotation-scroll{min-height:0;height:100%;overflow:auto}
#app[data-main-study="true"] .main-viewport-workspace #annotation-surface{min-height:0;flex:1 0 auto}
#app[data-main-study="true"] .main-viewport-workspace #a-annotation-tools{flex:none;position:sticky;bottom:0;background:white;z-index:2}
#app[data-main-study="true"] .main-viewport-workspace #answer-calculator{height:100%;min-height:0}

/* Main Study instruction pages only; task and rating screens are unchanged. */
#app[data-main-study="true"] .main-instruction-points { padding-left: 1.4rem; margin: 1rem 0 1.5rem; }
#app[data-main-study="true"] .main-instruction-points li { margin: .65rem 0; padding-left: .2rem; }
#app[data-main-study="true"] .main-instructions { max-width: 52rem; }
#app[data-main-study="true"] .main-reward-instruction { max-width: 52rem; }
#app[data-main-study="true"] .main-instruction-section { margin: 1.4rem 0; padding-top: 1rem; border-top: 1px solid #dce2e6; }
#app[data-main-study="true"] .main-instruction-section h2 { margin: 0 0 .5rem; font-size: 1.15rem; }
#app[data-main-study="true"] .main-instruction-section p { margin: .5rem 0; }
#app[data-main-study="true"] .main-bonus-table { width: min(100%,28rem); margin: .75rem 0; border-collapse: collapse; }
#app[data-main-study="true"] .main-bonus-table th, #app[data-main-study="true"] .main-bonus-table td { text-align: left; padding: .35rem .75rem; border-bottom: 1px solid #e3e9ed; }
#app[data-main-study="true"] .main-study-rules { border-left: 4px solid #b53b32; background: #fff7f5; padding: 1rem; }
#app[data-main-study="true"] .main-study-rules h2 { color: #9c302a; }
#app[data-main-study="true"] .main-learning-purpose { border: 1px solid #d1e3ef; border-left: 4px solid #2d678a; border-radius: 6px; padding: 1rem 1.2rem; background: linear-gradient(110deg,#edf6fc,#f7fafc); }
#app[data-main-study="true"] .main-learning-purpose h2 { color: #24536e; }
#app[data-main-study="true"] .main-learning-purpose .main-instruction-points { margin-bottom: .75rem; }
#app[data-main-study="true"] .main-learning-story { position: relative; list-style: none; margin: 1.5rem 0; padding: 0 0 0 1.6rem; }
#app[data-main-study="true"] .main-learning-story::before { content: ""; position: absolute; left: .4rem; top: 1.6rem; bottom: 1.6rem; width: 2px; background: #d5e1e9; }
#app[data-main-study="true"] .main-learning-story > li { position: relative; margin: 0 0 1rem; padding: 1rem 1.2rem; }
#app[data-main-study="true"] .main-learning-story > li:not(.main-learning-purpose) { border: 1px solid #dce5eb; border-radius: 6px; background: #fafcfd; }
#app[data-main-study="true"] .main-learning-story > li::before { content: ""; position: absolute; left: -1.6rem; top: 1.4rem; width: .75rem; height: .75rem; border: 3px solid white; border-radius: 50%; background: #a6b9c6; box-shadow: 0 0 0 1px #c5d3dc; }
#app[data-main-study="true"] .main-learning-story > .main-story-current::before { background: #2d678a; box-shadow: 0 0 0 1px #2d678a; }
#app[data-main-study="true"] .main-learning-story h2 { margin: 0 0 .55rem; font-size: 1.15rem; }
#app[data-main-study="true"] .main-learning-story p { margin: .55rem 0; }
#app[data-main-study="true"] .main-story-detail { font-size: .85rem; line-height: 1.5; }
#app[data-main-study="true"] .main-return-window { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,16rem),1fr)); gap: .75rem; margin-top: 1rem; }
#app[data-main-study="true"] .main-return-window p { margin: 0; padding: .7rem .9rem; background: #fff; border: 1px solid #d1e3ef; border-radius: 5px; }
#app[data-main-study="true"] .main-return-window strong, #app[data-main-study="true"] .main-return-window span { display: block; }
#app[data-main-study="true"] .main-followup-return .option { align-items: baseline; }
#app[data-main-study="true"] .main-followup-return textarea { width: 100%; }
#app[data-main-study="true"] .main-followup-return input[type="datetime-local"] { width: 100%; }
#app[data-main-study="true"] .calculator h2 { padding-right: 76px; }
#app[data-main-study="true"] .calculator-keys [data-calc="C"] { width: 64px; height: 30px; min-height: 30px; font-size: .85rem; }

/* Progress is informational only and appears exclusively in Main Study. */
#app[data-main-study="true"] .main-progress { margin: 0 0 1.2rem; padding-bottom: .65rem; border-bottom: 1px solid #dce2e6; }
#app[data-main-study="true"] .main-progress p { display: flex; flex-wrap: wrap; align-items: baseline; gap: .35rem 1rem; margin: 0 0 .4rem; font-size: .9rem; }
#app[data-main-study="true"] .main-progress p span { color: #52616b; }
#app[data-main-study="true"] .main-progress ol { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); padding: .6rem 0 .2rem; margin: 0; list-style: none; }
#app[data-main-study="true"] .main-progress li { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: .2rem; font-size: .8rem; line-height: 1.3; color: #677680; }
#app[data-main-study="true"] .main-progress li:not(:last-child)::after { content: ''; position: absolute; top: .9rem; left: calc(50% + 1.2rem); width: calc(100% - 2.4rem); height: 2px; background: #dce2e6; }
#app[data-main-study="true"] .main-step-number { display: grid; place-items: center; width: 1.8rem; height: 1.8rem; border: 1px solid #b9c5cc; border-radius: 50%; background: white; }
#app[data-main-study="true"] .main-progress .is-current { color: #234f6c; font-weight: 700; }
#app[data-main-study="true"] .main-progress .is-current .main-step-number { color: white; background: #2b6284; border-color: #2b6284; }
#app[data-main-study="true"] .main-progress .is-complete .main-step-number { background: #edf2f5; }
#app[data-main-study="true"] .main-progress li small { font-size: .65rem; font-weight: 400; }
#app[data-main-study="true"] .main-break { position: relative; isolation: isolate; min-height: clamp(420px,calc(100svh - 280px),600px); margin: 1.2rem auto 0; border-radius: 16px; overflow: hidden; background: #37565b; color: white; }
#app[data-main-study="true"] .main-break-photo-frame { position: absolute; inset: 0; display: grid; place-items: center; }
#app[data-main-study="true"] .main-break-illustration { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; object-position: center 60%; }
#app[data-main-study="true"] .main-break::after { content: ''; position: absolute; inset: 0; z-index: 0; pointer-events: none; background: linear-gradient(180deg,rgba(12,31,34,.12) 0%,rgba(12,31,34,0) 32%,rgba(12,31,34,.55) 58%,rgba(12,31,34,.9) 100%); }
#app[data-main-study="true"] .main-break-content { position: relative; z-index: 1; display: flex; flex-direction: column; justify-content: space-between; min-height: inherit; gap: 5rem; padding: 24px 32px 30px; }
#app[data-main-study="true"] .main-break-flow { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); list-style: none; padding: 12px 8px; margin: 0; border: 1px solid rgba(255,255,255,.7); border-radius: 10px; background: rgba(255,255,255,.88); backdrop-filter: blur(6px); text-align: center; }
#app[data-main-study="true"] .main-break-flow li { position: relative; display: flex; flex-direction: column; font-size: .85rem; color: #304d52; }
#app[data-main-study="true"] .main-break-flow li:not(:last-child)::after { content: '→'; position: absolute; right: -.4rem; top: 1rem; color: #607e82; }
#app[data-main-study="true"] .main-break-flow li[aria-current="step"] strong { color: #173f45; text-decoration: underline; text-underline-offset: .3rem; }
#app[data-main-study="true"] .main-break-flow small { font-size: .75rem; }
#app[data-main-study="true"] .main-break-message { max-width: 640px; }
#app[data-main-study="true"] .main-break-message h1 { font-size: clamp(1.6rem,2.8vw,2.2rem); margin: 0 0 10px; color: white; }
#app[data-main-study="true"] .main-break-message>p { margin: 0; color: #f0f5f4; }
#app[data-main-study="true"] .main-break-photo-placeholder { margin: 0 1rem; color: white; }
#app[data-main-study="true"] .main-break #break-status { display: table; margin: 20px 0 0; padding: 8px 16px; border: 1px solid rgba(255,255,255,.45); border-radius: 8px; background: rgba(12,31,34,.48); color: white; font-size: 1.1rem; font-weight: 650; font-variant-numeric: tabular-nums; }
#app[data-main-study="true"] .main-break #break-retry { margin-top: 12px; }
@media(max-width:600px){#app[data-main-study="true"] .main-break-content { padding: 16px 18px 24px; gap: 4rem; }#app[data-main-study="true"] .main-break-flow li { font-size: .7rem; }}


#app[data-main-study="true"] .main-progress-compact { margin: 0 0 .65rem; font-size: .85rem; color: #52616b; }
/* A local setup-form trap, excluded from visual and assistive navigation. */
.study-entry-reference{position:absolute!important;left:-10000px!important;top:auto!important;width:1px!important;height:1px!important;overflow:hidden!important;pointer-events:none!important}
