:root{color:#1d211d;font-synthesis:none;text-rendering:optimizelegibility;background:#f4f3ed;font-family:Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif}*{box-sizing:border-box}body{min-width:320px;min-height:100vh;margin:0}button,input,textarea{font:inherit}button{color:#252821;cursor:pointer;background:#fff;border:1px solid #cbc9bf;border-radius:.65rem;padding:.66rem .9rem}button:hover:not(:disabled){background:#fafaf7;border-color:#8c9183}button:disabled{cursor:not-allowed;opacity:.48}button.primary{color:#fff;background:#263b2b;border-color:#263b2b}button.primary:hover:not(:disabled){background:#192b1d}button.danger{color:#8d2929;border-color:#d8b7b7}.wide{width:100%}.muted{color:#6e7269}.error{color:#a02d2d;background:#fff0ed;border:1px solid #edc8c2;border-radius:.6rem;padding:.8rem}.eyebrow{color:#657362;text-transform:uppercase;letter-spacing:.14em;font-size:.72rem;font-weight:700}.center-message{color:#676b63;place-content:center;gap:1rem;min-height:100vh;display:grid}.login-shell{background:radial-gradient(circle at 20% 10%,#e3e9dd,#0000 38%),#f4f3ed;place-items:center;min-height:100vh;padding:2rem;display:grid}.login-card{background:#fffffcf0;border:1px solid #d8d6ce;border-radius:1rem;width:min(25rem,100%);padding:2.25rem;box-shadow:0 24px 70px #2d30281f}.login-card h1{margin:.5rem 0;font-family:Georgia,serif;font-size:2.35rem;font-weight:500}.login-card .primary{margin-top:1.4rem;padding:.8rem}.library{max-width:72rem;margin:0 auto;padding:4.5rem 2rem}.library-header{border-bottom:1px solid #d6d4cc;justify-content:space-between;align-items:end;gap:2rem;padding-bottom:1.5rem;display:flex}.library-header h1,.settings-page h1{letter-spacing:-.04em;margin:.25rem 0 0;font-family:Georgia,serif;font-size:clamp(2.6rem,6vw,4.3rem);font-weight:500}.header-actions{gap:.65rem;display:flex}.empty-state{text-align:center;place-content:center;justify-items:center;min-height:28rem;display:grid}.empty-state h2{margin:.6rem 0 0;font-family:Georgia,serif;font-size:1.7rem;font-weight:500}.empty-state p{color:#777b72}.empty-glyph{color:#60725f;font-size:2rem}.document-grid,.library-loading{grid-template-columns:repeat(auto-fill,minmax(15rem,1fr));gap:1rem;margin-top:2rem;display:grid}.document-card-placeholder{background:linear-gradient(100deg,#ecebe5 20%,#f6f5f0 38%,#ecebe5 56%) 0 0/220% 100%;border:1px solid #deddd6;border-radius:.65rem;min-height:11rem;animation:1.4s ease-in-out infinite loading-sheen}.document-card{text-align:left;flex-direction:column;align-items:flex-start;gap:.55rem;min-height:11rem;padding:1.2rem;display:flex}.document-card strong{margin-top:auto;font-family:Georgia,serif;font-size:1.3rem;font-weight:500}.document-card>span:last-child{color:#777b72;font-size:.78rem}.format-badge{color:#3e533e;background:#e7eadf;border-radius:.45rem;place-content:center;width:2rem;height:2rem;font-weight:700;display:grid}.format-badge.markdown{color:#4b5257;background:#e6e8ea}.editor-shell{background:#e9e8e2;min-height:100vh}.editor-header{z-index:20;-webkit-backdrop-filter:blur(16px);backdrop-filter:blur(16px);background:#fbfbf8f5;border-bottom:1px solid #d4d2ca;align-items:center;gap:.65rem;height:4.25rem;padding:.65rem 1rem;display:flex;position:sticky;top:0}.icon-button{place-content:center;width:2.65rem;height:2.65rem;padding:0;display:grid}.title-input{background:0 0;border:0;flex:1;min-width:0;padding:.5rem;font-family:Georgia,serif;font-size:1.2rem}.title-input:focus{border-radius:.4rem;outline:1px solid #aeb7a9}.save-state{color:#6a7569;font-size:.75rem}.save-state.local{color:#8b642e}.save-state.offline,.save-state.error,.save-state.conflict{color:#9a3434}.segmented{background:#ebeae4;border-radius:.55rem;padding:.2rem;display:flex}.segmented button{background:0 0;border:0;padding:.38rem .65rem}.segmented button.active{background:#fff;box-shadow:0 1px 4px #0000001a}.editor-error{color:#912d2d;text-align:center;background:#fff0ed;padding:.65rem 1rem}.editor-workspace{grid-template-columns:minmax(0,1fr);min-height:calc(100vh - 4.25rem);display:grid}.with-agent .editor-workspace{grid-template-columns:minmax(0,1fr) 22rem}.agent-launcher{z-index:19;color:#476348;background:#fbfbf8f5;border-top:0;border-bottom:1px solid #cbc9c0;border-left:1px solid #cbc9c0;border-right:0;border-radius:0;align-items:center;gap:.4rem;min-height:2.2rem;padding:.42rem .75rem;font-size:.76rem;display:flex;position:fixed;top:4.25rem;right:0;box-shadow:0 3px 10px #2325201a}.agent-launcher.below-format-toolbar{top:7.5rem}.agent-launcher:hover{background:#fff;border-color:#aeb7a9}.canvas-scroll{padding:2.5rem max(1.5rem,4vw) 5rem;overflow:auto}.page-mode{min-width:0;overflow:hidden}.page-editor-shell{flex-direction:column;min-width:0;height:calc(100vh - 4.25rem);display:flex}.page-canvas-scroll{flex:1;min-height:0;padding:2.5rem max(1.5rem,4vw) 5rem;overflow:auto}.format-toolbar{z-index:10;width:100%;min-height:3.25rem;box-shadow:none;background:#fbfbf8;border:0;border-bottom:1px solid #d4d2ca;border-radius:0;justify-content:center;gap:.2rem;margin:0;padding:.45rem 1rem;display:flex;overflow-x:auto}.format-toolbar button{border:0;padding:.4rem .6rem}.format-toolbar button.active{background:#dfe6db}.toolbar-divider{background:#dedcd4;flex:0 0 1px;align-self:stretch;margin:.2rem}.bubble-toolbar{z-index:30;background:#fff;border:1px solid #c9c7bf;border-radius:.55rem;gap:.15rem;padding:.25rem;display:flex;box-shadow:0 6px 24px #1e201c2b}.bubble-toolbar button{border:0;padding:.35rem .55rem}.bubble-toolbar button.active{background:#dfe6db}.find-toolbar{z-index:9;width:100%;box-shadow:none;background:#f7f7f3;border:0;border-bottom:1px solid #d4d2ca;border-radius:0;justify-content:center;gap:.35rem;margin:0;padding:.4rem 1rem;display:flex}.find-toolbar input{border:1px solid #cfcec7;border-radius:.4rem;width:11rem;min-width:7rem;padding:.42rem .55rem}.find-toolbar button{padding:.4rem .6rem}.slash-menu{z-index:11;background:#fff;border:1px solid #cccac2;border-radius:.65rem;width:min(18rem,100% - 2rem);margin:-1.5rem auto 1rem;padding:.35rem;display:grid;position:sticky;top:1rem;box-shadow:0 10px 28px #23252029}.slash-menu button{text-align:left;border:0;padding:.55rem .65rem}.typst-page{background:#fff;width:min(210mm,100vw - 6rem);min-height:297mm;margin:0 auto;padding:25mm 24mm 28mm;font-family:Libertinus Serif,Linux Libertine,Georgia,serif;font-size:11pt;line-height:1.45;box-shadow:0 8px 28px #2d2d2626}.typst-page .tiptap{outline:none;min-height:240mm}.typst-page h1{margin:0 0 1.4rem;font-size:2.1rem;font-weight:500}.typst-page h2{margin-top:1.8rem;font-size:1.5rem;font-weight:600}.typst-page p{margin:0 0 .9rem}.typst-page blockquote{color:#4c534b;border-left:3px solid #a9b5a5;margin-left:0;padding-left:1rem}.raw-typst-block{color:#3f443e;white-space:pre-wrap;background:#f4f2e9;border:1px solid #c7c4b8;border-radius:.45rem;margin:1rem 0;padding:2rem .85rem .85rem;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:.78rem;line-height:1.45;position:relative;overflow-x:auto}.raw-typst-block:before{content:"Typst · preserved source";color:#74786f;letter-spacing:.03em;text-transform:uppercase;font-family:system-ui,sans-serif;font-size:.67rem;font-weight:600;position:absolute;top:.55rem;left:.85rem}.raw-typst-block.ProseMirror-selectednode{outline-offset:2px;outline:2px solid #6c8268}.prototype-note{text-align:center;color:#777a73;font-size:.75rem}.source-editor-wrap{max-width:70rem;margin:0 auto}.source-editor{background:#fff;border:1px solid #d3d2cc;box-shadow:0 8px 25px #28282314}.source-count{color:#747970;text-align:right;margin:.65rem 0 0;font-size:.75rem}.pdf-preview{background:#fff;border:1px solid #c7c6bf;width:min(70rem,100%);height:calc(100vh - 9.5rem);margin:0 auto;display:block;box-shadow:0 8px 25px #28282314}.preview-loading{min-height:calc(100vh - 10rem)}.preview-error{max-width:45rem;margin:3rem auto}.agent-sidebar{background:#fbfbf8;border-left:1px solid #d2d1ca;flex-direction:column;height:calc(100vh - 4.25rem);display:flex;position:sticky;top:4.25rem}.agent-sidebar>header{border-bottom:1px solid #e0ded8;align-items:center;gap:.6rem;padding:1rem;display:flex}.agent-collapse{background:0 0;border:0;place-content:center;width:2rem;height:2rem;padding:0;display:grid}.agent-mark{color:#476348}.status-dot{background:#b4b4ad;border-radius:50%;width:.5rem;height:.5rem;margin-left:auto}.status-dot.ready{background:#4c8c55}.status-dot.busy{background:#d39736;animation:1.2s infinite pulse}.agent-policy{color:#6b7068;border-bottom:1px solid #e0ded8;justify-content:space-between;align-items:center;gap:.6rem;padding:.65rem .8rem;font-size:.75rem;display:flex}.agent-policy select{color:#2b302a;background:#fff;border:1px solid #d1d0c9;border-radius:.4rem;min-width:0;padding:.35rem}.agent-messages{flex:1;min-height:0;padding:.8rem;overflow-y:auto}.agent-empty{text-align:center;color:#656a62;margin:auto;padding:2rem}.agent-empty small{color:#92948e}.agent-turn{margin-bottom:1rem}.agent-turn p{white-space:pre-wrap}.agent-user{color:#283127;background:#e8ece5;border-radius:.75rem .75rem .15rem;margin:0 0 .45rem 2rem;padding:.65rem .75rem}.agent-response{color:#393d38;margin:0;line-height:1.45}.agent-turn>small{color:#898c85;text-transform:capitalize}.agent-turn details{margin-top:.6rem}.agent-turn summary{cursor:pointer;color:#596a57;font-size:.8rem}.agent-turn pre{white-space:pre-wrap;background:#f3f2ed;border:1px solid #dad8d1;border-radius:.45rem;max-height:14rem;padding:.65rem;font-size:.72rem;overflow:auto}.agent-turn-actions{margin-top:.5rem}.agent-turn-actions button{padding:.4rem .65rem;font-size:.78rem}.agent-compose{border-top:1px solid #e0ded8;grid-template-columns:minmax(0,1fr) auto;gap:.35rem .45rem;padding:.8rem;display:grid}.agent-compose textarea{resize:none;border:1px solid #cfcec7;border-radius:.6rem;grid-column:1/-1;min-height:4.5rem;padding:.7rem}.agent-compose small{color:#858981;align-self:center;font-size:.67rem}.agent-compose button{align-self:end}.modal-backdrop{z-index:50;-webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px);background:#1d1f1b61;place-items:center;padding:1rem;display:grid;position:fixed;inset:0}.history-panel{background:#fbfbf8;border:1px solid #d1cfc7;border-radius:.9rem;width:min(36rem,100%);max-height:min(42rem,90vh);padding:1.2rem;overflow:auto;box-shadow:0 22px 70px #00000038}.history-panel>header,.history-panel article{justify-content:space-between;align-items:center;gap:1rem;display:flex}.history-panel h2{margin:0;font-family:Georgia,serif;font-weight:500}.history-panel article{border-top:1px solid #dedcd5;padding:.85rem 0}.history-panel article:first-of-type{margin-top:1rem}.history-panel article div{flex-direction:column;gap:.25rem;display:flex}.history-panel article span{color:#777b73;font-size:.76rem}.recovery-panel,.conflict-panel{background:#fbfbf8;border:1px solid #d1cfc7;border-radius:.9rem;width:min(42rem,100%);max-height:90vh;padding:1.4rem;overflow:auto;box-shadow:0 22px 70px #00000038}.conflict-panel{width:min(68rem,100%)}.recovery-panel h2,.conflict-panel h2{margin:0 0 .5rem;font-family:Georgia,serif;font-weight:500}.recovery-panel>p,.conflict-panel>p{color:#62675f}.conflict-warning{background:#fff7e8;border:1px solid #e2c78f;border-radius:.5rem;padding:.7rem;color:#785624!important}.recovery-preview,.conflict-comparison article{background:#f4f3ee;border:1px solid #d8d6cf;border-radius:.55rem;min-width:0;padding:.8rem}.recovery-preview pre,.conflict-comparison pre{white-space:pre-wrap;overflow-wrap:anywhere;max-height:16rem;margin:.6rem 0 0;font-size:.75rem;overflow:auto}.conflict-comparison{grid-template-columns:1fr 1fr;gap:.8rem;margin-top:1rem;display:grid}.dialog-actions{justify-content:flex-end;gap:.6rem;margin-top:1rem;display:flex}@keyframes pulse{50%{opacity:.35}}@keyframes loading-sheen{to{background-position-x:-220%}}.settings-page{max-width:48rem;margin:0 auto;padding:3rem 2rem}.settings-page>button:first-child{margin-bottom:3rem}.session-list{border-top:1px solid #d3d1ca;margin:2rem 0}.session-list article{border-bottom:1px solid #d3d1ca;justify-content:space-between;align-items:center;gap:1rem;padding:1rem 0;display:flex}.session-list article div{flex-direction:column;gap:.3rem;display:flex}.session-list article span{color:#787c74;font-size:.8rem}@media (width<=900px){.with-agent .editor-workspace{grid-template-columns:1fr}.agent-sidebar{z-index:30;width:min(22rem,92vw);position:fixed;top:4.25rem;bottom:0;right:0;box-shadow:-10px 0 30px #00000024}.save-state{display:none}.typst-page{width:100%;min-height:calc(100vh - 10rem);padding:10vw 8vw}}@media (width<=620px){.library{padding:2.5rem 1rem}.library-header{flex-direction:column;align-items:flex-start}.header-actions{width:100%}.header-actions button{flex:1}.segmented{display:none}.editor-header{gap:.35rem}.editor-header .primary{padding-inline:.65rem}.canvas-scroll{padding:1rem 0 4rem}.format-toolbar{justify-content:flex-start;width:100%}.find-toolbar{flex-wrap:wrap;width:100%}.find-toolbar input{flex:9rem}.page-canvas-scroll{padding:1rem 0 4rem}.conflict-comparison{grid-template-columns:1fr}.dialog-actions{flex-direction:column;align-items:stretch}}
