.header-actions{display:flex;align-items:center;gap:10px}.doc-launch,.section-toggle{border:1px solid currentColor;background:transparent;color:inherit;padding:8px 10px;font:700 9px Syne;letter-spacing:.08em;cursor:pointer}.results-hidden #results{display:none}.results-hidden .source-stream{min-height:86px}.ai-panel{align-self:start;top:0;height:100dvh;overflow-y:auto}.ai-answer p{white-space:normal}.ai-answer ul,.message-text ul{padding-left:20px}.ai-answer li,.message-text li{margin:8px 0}.ai-answer strong,.message-text strong{font-weight:900}.ai-answer code,.message-text code{background:rgba(215,255,67,.15);padding:2px 5px}.ai-answer blockquote,.message-text blockquote{margin:14px 0;padding-left:14px;border-left:3px solid var(--coral)}body.dark .ai-panel{background:#0d0f0b;color:#f4f1e8}body.dark .ai-panel .ai-answer{color:#e7e6dc}body.dark .ai-panel .lead,body.dark .ai-panel .citation{color:#d7ff43}body.dark .deep-switch input:checked+.deep-track i{background:#d7ff43}body.dark .deep-switch input:checked+.deep-track{background:#111;color:#fff}.document-layer{position:fixed;inset:0;z-index:120;background:#d8d3c8;display:grid;grid-template-rows:58px minmax(0,1fr);animation:document-in .22s ease-out both}.document-layer[hidden]{display:none}body.document-open{overflow:hidden}.document-head{height:58px;padding:0 18px;background:#171912;color:#eee9df;display:flex;align-items:center;justify-content:space-between}.document-head div{display:flex;gap:18px;align-items:center}.document-head b{font:700 10px Syne;letter-spacing:.16em;color:#d7ff43}.document-head span{font-size:11px;color:#aaa}.document-head button{border:1px solid #62645d;background:transparent;color:#eee9df;padding:8px 12px;cursor:pointer}.document-layout{min-height:0;display:grid;grid-template-columns:minmax(0,1fr) 360px;overflow:hidden}.paper{overflow-y:auto;padding:48px clamp(20px,6vw,90px)}.document-editor{width:min(820px,100%);min-height:calc(100vh - 154px);margin:auto;padding:70px clamp(28px,7vw,82px);background:#fff;color:#20231d;box-shadow:0 12px 45px rgba(23,25,18,.16);outline:0;line-height:1.85}.document-editor h1{font-size:32px;border-bottom:5px solid #d7ff43;padding-bottom:15px}.document-editor h2{margin-top:35px}.document-editor a{color:#21645b}.document-tools{min-width:0;overflow-y:auto;padding:24px;background:#f3efe6;border-left:1px solid #aaa59b;color:#171912}.tool-title{display:grid;gap:7px;margin-bottom:22px}.tool-title span{font:700 8px Syne;letter-spacing:.18em;color:#db4f37}.tool-title strong{font-size:18px}.document-tools>label{display:grid;gap:6px;margin:14px 0;font-size:10px;font-weight:700}.document-tools input,.document-tools select,.document-tools textarea{width:100%;border:1px solid #8f8c84;background:#fff;padding:10px;font:12px 'Noto Sans SC';outline:0}.document-tools .check-row{display:flex;grid-template-columns:none;align-items:center}.check-row input{width:auto}.document-tools fieldset{border:1px solid #aaa59b;padding:10px}.document-tools legend{font:700 9px Syne}.report-sources{display:grid;gap:5px;max-height:230px;overflow:auto}.report-sources label{display:grid;grid-template-columns:auto 1fr;gap:8px;padding:7px;background:#fff;cursor:pointer}.report-sources input{width:auto}.report-sources span{display:grid;gap:3px;min-width:0}.report-sources b{font-size:10px;overflow-wrap:anywhere}.report-sources small{font-size:8px;color:#777}.document-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:16px}.document-actions button{border:1px solid #171912;padding:12px 8px;background:#171912;color:#d7ff43;font-weight:700;cursor:pointer}.document-actions button+button{background:#d7ff43;color:#171912}.document-actions button:disabled{opacity:.5}.document-tools>p{font-size:9px;line-height:1.5;color:#666}@keyframes document-in{from{opacity:0;transform:translateY(14px)}}@media(max-width:760px){.doc-launch{font-size:7px;padding:7px}.document-layout{display:block;overflow-y:auto}.paper{padding:16px}.document-editor{min-height:70vh;padding:34px 24px}.document-tools{border-left:0;border-top:1px solid #aaa59b}.document-head span{display:none}.ai-panel{height:auto;overflow:visible}}
@media(prefers-reduced-motion:reduce){.document-layer{animation:none}}

/* Drawer overrides: keep the research page visible while writing. */
.doc-launch{background:var(--acid);color:#171912;border-color:#171912;box-shadow:3px 3px 0 var(--ink)}
.document-layer{inset:14px 14px 14px auto;width:min(1120px,calc(100vw - 28px));height:auto;border:1px solid #171912;border-radius:24px;overflow:hidden;box-shadow:-18px 18px 60px rgba(0,0,0,.24);animation:drawer-in .28s cubic-bezier(.2,.8,.2,1) both}
.document-layer.closing{animation:drawer-out .18s ease-in both}
.document-layer.assist-mode{width:min(720px,calc(100vw - 28px))}
.document-layer.assist-mode .document-layout{grid-template-columns:1fr}
.document-layer.assist-mode .document-tools{display:none}
.document-head{border-radius:23px 23px 0 0}
.paper{padding:26px;background:#d8d3c8}
.document-editor{min-height:calc(100vh - 126px);padding:56px clamp(30px,6vw,70px);border-radius:4px}
.document-editor>p:first-of-type{font-size:17px;color:#50564d}.document-editor h2{padding-left:14px;border-left:5px solid #ff694d}.document-editor h3{margin-top:26px;color:#3d514a}.document-editor blockquote{margin:24px 0;padding:14px 18px;background:#f0f5df;border-left:4px solid #9ec41f}.document-editor ul{padding:16px 22px;background:#f7f7f3;border-radius:8px}.document-editor li{margin:8px 0}.document-editor p{margin:12px 0}.document-editor .citation{color:#ae3e2d;font-weight:800}
.report-loading{min-height:55vh;display:grid;place-items:center;align-content:center;gap:14px;color:#5d6259}.report-loading i{width:44px;height:44px;border:3px solid #d9d9d2;border-top-color:#171912;border-radius:50%;animation:report-spin .8s linear infinite}.report-loading b{font:700 12px Syne;letter-spacing:.12em}
@keyframes drawer-in{from{opacity:0;transform:translateX(105%) scale(.98)}}@keyframes drawer-out{to{opacity:0;transform:translateX(105%) scale(.98)}}@keyframes report-spin{to{transform:rotate(360deg)}}
@media(min-width:761px){.workspace:not(.quick-results) .ai-panel{position:sticky!important;top:0!important;align-self:start!important;height:100dvh!important;overflow-y:auto!important}}
.workspace:not(.quick-results) .ai-panel.viewport-pinned{position:fixed!important;z-index:30;top:var(--pin-top)!important;right:var(--pin-right);width:var(--pin-width);height:100dvh!important;margin:0}
.workspace:not(.quick-results){background:#171912}.workspace:not(.quick-results) .source-stream{background:var(--paper)}
@media(max-width:760px){.document-layer,.document-layer.assist-mode{inset:8px;width:calc(100vw - 16px);border-radius:18px}.document-layout{height:calc(100dvh - 74px)}.document-head{border-radius:17px 17px 0 0}.document-editor{min-height:72vh}.document-layer:not(.assist-mode) .document-layout{display:block;overflow-y:auto}.document-layer:not(.assist-mode) .paper{overflow:visible}.document-layer:not(.assist-mode) .document-tools{overflow:visible}}

@media(min-width:900px){.document-layer.assist-mode{width:560px;inset:28px 24px 28px auto}.document-layer.assist-mode .document-editor{padding:42px 38px;min-height:calc(100vh - 142px)}body.chat-open.document-open .chat-layer{padding-right:608px}body.chat-open.document-open .chat-shell{max-width:none}}
