/* Study puts questions beside the field, with a separate record of evidence. */
body:not(.lab-immersive){overflow:auto;background:#f1f3f4;color:#203545;--panel:#fff;--ink:#203545;--muted:#617281;--line:#d6dfe2;--purple:#63508d;--purple-light:#eeeaf5}
body:not(.lab-immersive)>main{padding:12px;max-width:none}
body:not(.lab-immersive) #workspace{position:relative;display:block;height:max(580px,calc(100dvh - 24px));max-height:none;margin:0;border:1px solid #cbd5d9;border-radius:10px;overflow:hidden;background:#0c1d2d}
body:not(.lab-immersive) #scene-panel{position:relative;inset:auto;width:100%;height:100%;border:0;border-radius:0;min-width:0}
body:not(.lab-immersive) #scene-panel>.canvas-wrap{min-height:0}
body:not(.lab-immersive) #sources-panel{position:absolute;z-index:35;top:calc(var(--drawer-top) - 9px);left:12px;bottom:var(--drawer-bottom);width:300px;max-width:calc(100% - 24px);height:auto;max-height:none;background:#fff;border:1px solid #beced4;border-radius:9px;box-shadow:0 8px 28px #081a2b33;color:#203545}
body:not(.lab-immersive).sources-closed #sources-panel{display:none}
body:not(.lab-immersive) #investigation-panel{position:absolute;z-index:25;top:calc(var(--drawer-top) - 9px);right:0;bottom:0;width:340px;height:auto;max-height:none;border:0;border-left:1px solid #c5d3d9;border-radius:0;background:#fff;box-shadow:none;backdrop-filter:none;color:#203545;overflow-y:auto;overscroll-behavior:contain}
body:not(.lab-immersive).inspector-closed #investigation-panel{display:none}
body:not(.lab-immersive) #investigation-panel .panel-heading{background:#f7f8f8;border-bottom-color:#d6e0e3}
body:not(.lab-immersive) #investigation-panel .tabs{background:#f1f4f5}
body:not(.lab-immersive) #investigation-panel .student-context{background:#eef4f1;color:#365b4a}
body:not(.lab-immersive) #scene-panel .scene-footer{color:#bfd0dd}
body:not(.lab-immersive) #scene-panel .scene-footer a{color:#d7e8f2}
body:not(.lab-immersive) .lab-footer{max-width:1400px;margin:auto;color:#5b6e7c}
body:not(.lab-immersive) .lab-footer a{color:#485f75}
body.lab-immersive #study-notebook,body.lab-immersive #study-notes-jump{display:none!important}
#scene-panel .workspace-header #study-notes-jump{background:#54472d;border-color:#9b8553;color:#ffedb4}
@media(min-width:1000px){
  body:not(.lab-immersive):not(.inspector-closed) #scene-panel>.canvas-wrap,
  body:not(.lab-immersive):not(.inspector-closed) #scene-panel>.scene-tool-dock,
  body:not(.lab-immersive):not(.inspector-closed) #scene-panel>.scene-footer{margin-right:340px}
}
@media(max-width:999px){
  body:not(.lab-immersive) #workspace{height:auto;overflow:visible;background:transparent;border:0}
  body:not(.lab-immersive) #scene-panel{height:max(560px,80dvh);border:1px solid #354e65;border-radius:10px;overflow:hidden}
  body:not(.lab-immersive) #investigation-panel{position:relative;inset:auto;width:100%;height:auto;max-height:650px;margin-top:12px;border:1px solid #ccd8dd;border-radius:10px;box-shadow:none}
  body:not(.lab-immersive) #sources-panel{top:calc(var(--drawer-top) - 9px);bottom:auto;max-height:min(650px,calc(80dvh - var(--drawer-top)));width:320px}
}
@media(max-width:760px){
  body:not(.lab-immersive)>main{padding:8px}
  body:not(.lab-immersive) #sources-panel{top:142px;left:8px;max-width:calc(100% - 16px);max-height:480px}
  #scene-panel .workspace-header #study-notes-jump{display:none}
}
.study-notebook[hidden]{display:none!important}
.study-notebook{box-sizing:border-box;max-width:1400px;margin:18px auto 0;padding:24px;border:1px solid #c9d5d9;border-top:4px solid #b99a49;border-radius:10px;background:#fffdf8;color:#263c4b;font:14px/1.65 'Segoe UI',sans-serif;box-shadow:0 3px 16px #19324507;scroll-margin-top:14px}
.study-notebook *{box-sizing:border-box}
.study-header{display:flex;justify-content:space-between;align-items:flex-start;gap:28px;border-bottom:1px solid #e0e3dd;padding-bottom:16px;margin-bottom:15px}
.study-eyebrow{display:block;color:#80632b;font:700 10px/1.6 'Segoe UI',sans-serif;letter-spacing:1.3px;margin-bottom:5px}
.study-header h2{font:650 25px/1.3 'Segoe UI',sans-serif;letter-spacing:-.4px;margin:0 0 5px;color:#203847}
.study-scene{margin:0;color:#536c7c;font-size:13px;font-weight:600}
.study-mode-note{max-width:360px;margin:4px 0 0;color:#677b82;font-size:12px;line-height:1.75}
.study-prompt{max-width:900px;margin:0 0 16px;color:#365b54;font-size:14px;font-weight:600}
.study-modified{padding:9px 12px;margin:0 0 14px;border-left:3px solid #bca052;background:#f8f2df;color:#6f5a2c;font-size:12px}
.study-note-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}
.study-note-field{min-width:0;display:flex;flex-direction:column;gap:6px;color:#345063}
.study-note-field>strong{font-size:14px;color:#203f53}.study-note-field>span{font-size:12px;line-height:1.65;min-height:40px;color:#607682}
.study-note-field>textarea,.study-copy textarea{display:block;resize:vertical;min-height:145px;width:100%;padding:11px 12px;border:1px solid #becdd4;border-radius:7px;background:#fff;color:#243c4d;font:14px/1.75 'Segoe UI',sans-serif;box-shadow:inset 0 1px 2px #26445908}
.study-note-field>textarea:focus,.study-copy textarea:focus{border-color:#8e712c;outline:3px solid #ecdba9;outline-offset:2px}
.study-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:17px 0 8px}
.study-notebook button{min-height:40px;padding:9px 13px;border:1px solid #8da49e;border-radius:6px;background:#2f5c50;color:#fff9df;font:600 12px/1.45 'Segoe UI',sans-serif;cursor:pointer}
.study-notebook button:hover{background:#3e6b5d;border-color:#557b6c}.study-notebook button:focus-visible{outline:3px solid #c6a85a;outline-offset:3px}.study-notebook button:disabled{cursor:default;opacity:.45}
.study-notebook #study-export{background:#f4e8c4;color:#604a21;border-color:#bea56b}.study-notebook #study-clear{background:transparent;color:#5a6c77;border-color:#c5d1d6}
.study-reading-help,.study-empty,.study-draft-note{margin:6px 0 0;color:#677d88;font-size:12px;line-height:1.75}
/* Keep absolute MathJax source spans inside the locally scrolling evidence table. */
.study-reading-wrap{position:relative;min-width:0;max-width:100%;contain:layout paint;overflow:auto;margin:18px 0 5px;border:1px solid #d0dadd;border-radius:7px;overscroll-behavior:contain}
.study-reading-table{border-collapse:collapse;min-width:820px;width:100%;font-size:12px;color:#365162;text-align:left}
.study-reading-table caption{text-align:left;padding:10px 12px;color:#315244;background:#f2f5ef;font-size:13px;font-weight:650}
.study-reading-table th{padding:9px 11px;background:#f4f6f6;color:#58717e;font-size:11px;border-block:1px solid #dae2e5}
.study-reading-table td{padding:10px 11px;border-bottom:1px solid #e3e8e8;vertical-align:top;font-variant-numeric:tabular-nums}
.study-reading-table tr:last-child td{border-bottom:0}.study-reading-table details{min-width:180px;max-width:360px}.study-reading-table summary{cursor:pointer;font-size:11px;color:#557566}.study-reading-table details p{white-space:pre-wrap;font-size:11px;line-height:1.7;color:#61777f;margin:8px 0 0;overflow-wrap:anywhere}
.study-status{margin:10px 0 0;color:#42674b;font-size:12px}.study-status:empty{display:none}
.study-copy{margin:14px 0 0}.study-copy summary{padding:9px 0;cursor:pointer;color:#6d5c34;font-size:12px}.study-copy label{display:block;font-size:12px;color:#5a727c}.study-copy textarea{margin-top:6px;min-height:180px;font:12px/1.7 Consolas,monospace}
.study-draft-note{border-top:1px solid #e2e6df;padding-top:11px;margin-top:17px;font-size:11px}
@media(max-width:800px){.study-notebook{padding:18px}.study-note-grid{grid-template-columns:1fr;gap:16px}.study-note-field>span{min-height:0}.study-note-field>textarea{min-height:125px}.study-header{display:block}.study-mode-note{max-width:none;margin-top:11px}.study-header h2{font-size:23px}}
@media(prefers-reduced-motion:reduce){.study-notebook{scroll-behavior:auto}}

/* The dock already reserves canvas space; overlay offsets would count it twice. */
@media(min-width:1000px){body:not(.lab-immersive) #scene-panel .camera-views,body:not(.lab-immersive) #scene-panel .zoom-buttons{right:15px}body:not(.lab-immersive) #scene-panel .scene-scale-strip{left:205px;right:65px;max-width:620px}body:not(.lab-immersive) #probe-placement-banner{left:190px;right:16px}}

.study-return{min-height:38px;margin:0 0 14px;padding:7px 11px;background:#f1ebd8;color:#67542a;border:1px solid #c8b47a;border-radius:6px;font:12px/1.5 'Segoe UI',sans-serif}

.study-question-meta{margin:0 0 4px;color:#685321;font-size:12px;font-weight:650}
.study-shared-help{margin:0 0 12px;color:#61737a;font-size:12px;line-height:1.7}
.study-note-field .study-shared-label{min-height:0;margin:0;color:#775a20;font-size:10px;line-height:1.5;font-weight:650}
.study-note-field[data-shared-answer=true]>strong{color:#73571f}.study-note-field[data-shared-answer=true]>textarea{border-color:#b49a57;background:#fffdf3}
