:root{color-scheme:light;--ink:#20211e;--muted:#696b64;--paper:#fffdf3;--edge:#d8d2bd;--accent:#8b3d50;--desk:#d6d3c7}
*{box-sizing:border-box}body{margin:0;background:var(--desk);color:var(--ink);font:14px/1.35 system-ui,sans-serif}.notebook-bar{height:52px;display:flex;align-items:center;gap:10px;padding:0 18px;background:#22231f;color:#fff;position:sticky;top:0;z-index:20}.notebook-bar button,.notebook-bar input,.notebook-export,.notebook-home{border:1px solid #62645d;background:#30312c;color:#fff;border-radius:6px;padding:7px 10px;text-decoration:none}.notebook-bar strong{min-width:210px;text-align:center}.notebook-export{margin-left:auto}.notebook-spread{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;width:min(1500px,calc(100vw - 28px));aspect-ratio:1.42;margin:18px auto 190px}.notebook-page{position:relative;overflow:hidden;background:var(--paper);border:1px solid var(--edge);box-shadow:0 8px 28px #28291f2c;background-image:linear-gradient(#dad5c740 1px,transparent 1px);background-size:100% 28px}.notebook-page::after{content:attr(data-page-label);position:absolute;bottom:10px;left:0;right:0;text-align:center;color:#999488;font-size:11px;pointer-events:none}.notebook-page-heading{position:absolute;top:2%;left:3%;font-size:12px;letter-spacing:.08em;text-transform:uppercase;color:#64665f}.notebook-item{position:absolute;border:1px solid transparent;padding:7px 9px;overflow:auto;min-width:8%;min-height:6%;background:#fffdf3d9;touch-action:none}.notebook-item:hover,.notebook-item.selected{border-color:#a6a18f;box-shadow:0 2px 10px #322f2320}.notebook-item.selected{resize:both}.notebook-item.crossed-out::after{content:"";position:absolute;left:2%;right:2%;top:50%;border-top:3px solid #a22;transform:rotate(-4deg);pointer-events:none}.notebook-item-handle{cursor:grab;font-size:11px;letter-spacing:.04em;text-transform:uppercase;color:var(--muted);border-bottom:1px solid #dfdbc9;margin:-2px 0 5px;padding-bottom:3px}.notebook-item-actions{display:none;position:absolute;right:3px;top:3px;z-index:3}.notebook-item.selected .notebook-item-actions{display:flex}.notebook-item-actions button{border:0;background:#292a26;color:white;border-radius:4px;font-size:11px}.notebook-text{white-space:pre-wrap}.notebook-heading .notebook-text{font-size:1.45em;font-weight:750}.notebook-artifact h3{font-size:13px;margin:0 0 4px}.notebook-artifact p{font-size:11px;color:var(--muted);margin:0 0 5px}.notebook-notation svg{max-width:100%;height:auto}.notebook-artifact .playback-shell{font-size:11px;padding:6px}.notebook-chat{position:fixed;z-index:30;bottom:16px;left:50%;transform:translateX(-50%);width:min(760px,calc(100vw - 28px));background:#22231ff2;color:#fff;border:1px solid #55574f;border-radius:12px;padding:10px 12px;box-shadow:0 10px 35px #0005}.notebook-chat form{display:flex;gap:8px;margin-top:7px}.notebook-chat textarea{flex:1;resize:none;border-radius:7px;border:1px solid #777970;padding:9px}.notebook-chat button{border:0;border-radius:7px;background:#e7bc5c;padding:0 16px;font-weight:700}.notebook-chat small{display:block;color:#bbbdb5;margin-top:5px}.notebook-static .notebook-spread{margin-bottom:20px}.notebook-static .notebook-item{pointer-events:none}.notebook-static .notebook-item-handle,.notebook-static .notebook-chat,.notebook-static .notebook-bar{display:none}@media(max-width:900px){.notebook-spread{display:block;aspect-ratio:auto}.notebook-page{height:130vw;margin-bottom:12px}.notebook-bar strong{min-width:0}.notebook-export{display:none}}@media print{body{background:white}.notebook-bar,.notebook-chat{display:none}.notebook-spread{width:100%;margin:0;gap:0;aspect-ratio:1.42}.notebook-page{box-shadow:none;break-inside:avoid}}

/* Revision-safe editor additions. Kept separately so static exports retain the same paper contract. */
.notebook-bar{height:auto;min-height:52px;padding:8px 18px;flex-wrap:wrap}.notebook-bar button:disabled{opacity:.35}.notebook-page-status{font-size:11px;color:#d0d1c8}.notebook-item.locked{background:#f0eee5}.notebook-item.locked .notebook-item-handle{cursor:not-allowed}.notebook-resize-handle{display:none;position:absolute;right:2px;bottom:2px;width:12px;height:12px;background:#616156;cursor:nwse-resize}.notebook-item.selected:not(.locked){resize:none}.notebook-item.selected:not(.locked) .notebook-resize-handle{display:block}.notebook-item-actions{gap:3px}.notebook-item img{display:block;max-width:100%;max-height:100%;object-fit:contain}.notebook-chat.collapsed{width:auto;padding:7px 12px}.notebook-chat.collapsed>*:not(#drawer-toggle){display:none}.notebook-chat button{padding:7px 16px}.notebook-chat .error{color:#ffb3ad}.notebook-archive{display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding:12px 18px;background:#22231f;color:#fff}.notebook-archive a{color:#e7bc5c}
.carryover-tray{position:fixed;right:18px;bottom:96px;z-index:31;width:min(390px,calc(100vw - 36px));max-height:55vh;overflow:auto;background:#fffdf3;border:1px solid #aaa38f;border-radius:10px;padding:12px;box-shadow:0 12px 35px #0004}.carryover-tray header{display:grid;gap:2px;margin-bottom:8px}.carryover-tray small{color:#696b64}.carryover-list{display:grid;gap:5px}.carryover-list div{display:grid;grid-template-columns:1fr auto auto;gap:7px;align-items:center;border-top:1px solid #ded8c5;padding:7px 0}.carryover-list .suggested{background:#f6eed4}.carryover-list button{border:1px solid #8b3d50;border-radius:5px;background:#fff;color:#8b3d50;padding:4px 7px}
