.ProseMirror{position:relative}.ProseMirror{word-wrap:break-word;white-space:pre-wrap;white-space:break-spaces;-webkit-font-variant-ligatures:none;font-variant-ligatures:none;font-feature-settings:"liga" 0}.ProseMirror pre{white-space:pre-wrap}.ProseMirror li{position:relative}.ProseMirror-hideselection *::selection{background:transparent}.ProseMirror-hideselection *::-moz-selection{background:transparent}.ProseMirror-hideselection{caret-color:transparent}.ProseMirror [draggable][contenteditable=false]{-webkit-user-select:text;user-select:text}.ProseMirror-selectednode{outline:2px solid #8cf}li.ProseMirror-selectednode{outline:none}li.ProseMirror-selectednode:after{content:"";position:absolute;inset:-2px -2px -2px -32px;border:2px solid #8cf;pointer-events:none}img.ProseMirror-separator{display:inline!important;border:none!important;margin:0!important}:root{--bg: #f5f5f4;--surface: #ffffff;--surface-hover: #f9f9f8;--border: #e5e4e2;--border-strong: #c8c5c2;--text: #1c1917;--text-muted: #78716c;--text-subtle: #a8a29e;--accent: #2563eb;--accent-hover: #1d4ed8;--accent-fg: #ffffff;--success: #16a34a;--danger: #dc2626;--toolbar-height: 44px;--statusbar-height: 26px;--radius: 4px;--radius-sm: 3px}*{box-sizing:border-box}html,body{height:100%;margin:0;overflow:hidden;font-family:system-ui,-apple-system,Segoe UI,Roboto,sans-serif;font-size:14px;line-height:1.5;color:var(--text);background:var(--bg)}#app{height:100%;overflow:hidden}a{color:inherit}button,input,textarea{font:inherit}.landing-page{min-height:100vh;display:grid;place-items:center;padding:2rem}.landing-stack{width:min(100%,480px);display:flex;flex-direction:column;gap:.75rem}.landing-card{background:var(--surface);border:1px solid var(--border);border-radius:6px;box-shadow:0 2px 8px #0000000f;padding:1.75rem 2rem}.landing-kicker{margin:0 0 .5rem;color:var(--accent);font-size:.6875rem;font-weight:600;letter-spacing:.1em;text-transform:uppercase}.page-title{font-size:1.25rem;font-weight:600;margin:0;letter-spacing:-.01em}.page-lead{margin:.375rem 0 0;color:var(--text-muted);font-size:.8125rem}.landing-overview{padding:1rem 1.25rem;border:1px solid var(--border);border-radius:6px;background:#0f172a05}.landing-overview__text{margin:0;color:var(--text);font-size:.8125rem;line-height:1.55}.landing-overview__text+.landing-overview__text{margin-top:.5rem}.landing-overview__link{color:var(--accent);text-decoration:underline;text-underline-offset:2px}.landing-overview__link:hover{color:var(--accent-hover)}.landing-links{display:flex;gap:.5rem;flex-wrap:wrap;margin-top:.75rem}.landing-link{display:inline-flex;align-items:center;padding:.35rem .55rem;border:1px solid var(--border);border-radius:999px;color:var(--accent);text-decoration:none;font-size:.75rem;font-weight:500;background:var(--surface)}.landing-link:hover{background:#2563eb0f}.doc-picker{display:flex;gap:.375rem;align-items:center}.landing-form{display:flex;flex-direction:column;gap:.875rem;margin-top:1.25rem}.field-stack{display:flex;flex-direction:column;gap:.25rem;width:100%}.field-label{display:inline-block;font-size:.75rem;font-weight:500;color:var(--text-muted)}.doc-picker-input{display:block;appearance:none;-webkit-appearance:none;flex:1;width:100%;min-width:0;height:34px;line-height:normal;border:1px solid var(--border);border-radius:var(--radius);padding:0 .625rem;background:var(--surface);color:var(--text);outline:none;transition:border-color .1s}.doc-picker-input:focus{border-color:var(--accent);box-shadow:0 0 0 2px #2563eb1f}.doc-picker-input--landing{height:34px;min-height:34px}.doc-picker-button{height:34px;padding:0 .875rem;border:1px solid var(--accent);border-radius:var(--radius);background:var(--accent);color:var(--accent-fg);font-weight:500;font-size:.875rem;cursor:pointer;white-space:nowrap;transition:background .1s}.doc-picker-button:hover:not(:disabled){background:var(--accent-hover);border-color:var(--accent-hover)}.doc-picker-button:disabled{opacity:.4;cursor:not-allowed}.doc-picker-button--landing{width:100%;border-radius:var(--radius)}.doc-shell{height:100vh;overflow:hidden;padding-top:var(--toolbar-height);padding-bottom:var(--statusbar-height)}.doc-toolbar{position:fixed;top:0;left:0;right:0;z-index:20;height:var(--toolbar-height);display:flex;align-items:center;gap:0;padding:0 .5rem;background:var(--surface);border-bottom:1px solid var(--border)}.doc-toolbar__crumbs{display:flex;align-items:center;gap:.125rem;min-width:0;color:var(--text-muted);font-size:.8125rem;padding:0 .25rem;flex-shrink:0}.crumb-button{border:none;background:transparent;color:var(--text-muted);padding:.25rem .375rem;border-radius:var(--radius-sm);cursor:pointer;font-size:.8125rem;line-height:1;transition:background .1s,color .1s}.crumb-button:hover{color:var(--text);background:#0000000d}.crumb-current{display:inline-flex;align-items:center;gap:.3rem;min-width:0;font-weight:500;font-size:.8125rem;color:var(--text);padding:0 .25rem}.doc-toolbar__presence{display:flex;align-items:center;justify-content:flex-end;padding:0 .375rem;height:100%;min-width:0;flex:1}.share-toggle-btn{width:32px;height:32px;display:inline-flex;align-items:center;justify-content:center;border:1px solid var(--border);border-radius:var(--radius);background:var(--surface);color:var(--text-muted);cursor:pointer;flex-shrink:0;font-size:1rem;transition:background .1s,color .1s}.share-toggle-btn:hover{background:var(--surface-hover);color:var(--text)}.chat-toggle-btn{display:none;width:32px;height:32px;align-items:center;justify-content:center;border:1px solid var(--border);border-radius:var(--radius);background:var(--surface);color:var(--text-muted);cursor:pointer;flex-shrink:0;font-size:1rem;transition:background .1s,color .1s}.chat-toggle-btn:hover{background:var(--surface-hover);color:var(--text)}.presence-bar{display:flex;flex-wrap:nowrap;gap:.3rem;align-items:center;overflow:hidden}.presence-pill{font-size:.6875rem;padding:.15rem .425rem;border-radius:var(--radius-sm);border:1px solid var(--border);background:var(--surface);color:var(--text-muted);white-space:nowrap;flex-shrink:0}.presence-pill--local{cursor:pointer;font-weight:500;color:var(--text);display:inline-flex;align-items:center;gap:.25rem;transition:background .1s}.presence-pill--local:hover{background:var(--surface-hover)}.presence-pill__edit-icon{width:11px;height:11px;opacity:.45;flex-shrink:0}.presence-pill--local:hover .presence-pill__edit-icon{opacity:.7}.doc-shell__body{display:grid;grid-template-columns:minmax(0,1fr) 1px minmax(280px,340px);height:100%;overflow:hidden}.doc-pane{min-height:0;overflow:hidden}.doc-pane--editor{position:relative;background:var(--surface)}.doc-pane--chat{background:var(--bg)}.pane-separator{background:var(--border);width:1px}.editor-scroll{height:100%;overflow-y:auto}.chat-messages{flex:1;min-height:0;overflow-y:auto;padding:.5rem}.doc-pane__content{min-height:100%;display:flex;flex-direction:column;gap:0;padding:2.75rem 2.5rem 2rem;margin:0 auto;max-width:780px}.editor-float-toolbar{position:absolute;top:6px;left:0;right:0;z-index:10;display:flex;justify-content:center;align-items:center;pointer-events:none}.editor-float-toolbar__group{display:inline-flex;align-items:center;pointer-events:auto;background:var(--surface);border:1px solid var(--border);border-radius:6px;padding:2px;box-shadow:0 1px 3px #00000014}.editor-float-toolbar__segment{display:inline-flex;align-items:center}.editor-float-toolbar__sep{display:inline-block;width:1px;height:16px;background:var(--border);margin:0 2px;flex-shrink:0}.toolbar-dropdown{position:relative}.toolbar-dropdown__summary{list-style:none;gap:3px;width:auto;min-width:34px;padding:0 6px}.toolbar-dropdown__summary::-webkit-details-marker{display:none}.toolbar-dropdown__chevron{font-size:.72rem;opacity:.8}.toolbar-dropdown__menu{position:absolute;top:calc(100% + 6px);left:0;min-width:156px;display:flex;flex-direction:column;gap:2px;padding:6px;border:1px solid var(--border);border-radius:8px;background:var(--surface);box-shadow:0 8px 24px #0f172a24;z-index:20}.toolbar-dropdown__item{display:flex;align-items:center;gap:8px;width:100%;padding:7px 8px;border:none;border-radius:6px;background:transparent;color:var(--text);cursor:pointer;font-size:.8125rem;text-align:left}.toolbar-dropdown__item:hover{background:#0000000d}.toolbar-dropdown__item--active{background:#2563eb1f;color:var(--accent)}.editor-wrap{flex:1;display:flex;flex-direction:column}.editor-surface-wrap{position:relative;min-height:0;flex:1}.editor-surface{min-height:calc(100vh - 220px);outline:none}.editor-surface.ProseMirror{color:var(--text);font-size:.9375rem;line-height:1.65}.editor-surface h1,.editor-surface h2,.editor-surface h3{line-height:1.25;letter-spacing:-.01em}.editor-surface blockquote{margin:.75rem 0;padding-left:.875rem;border-left:2px solid var(--border-strong);color:var(--text-muted)}.editor-surface ul,.editor-surface ol{padding-left:1.5rem}.editor-surface:focus{outline:none}.toolbar-button{width:28px;height:28px;display:inline-flex;align-items:center;justify-content:center;border:none;border-radius:var(--radius-sm);background:transparent;color:var(--text-muted);cursor:pointer;font-size:.9rem;transition:background .1s,color .1s}.toolbar-button:hover:not(:disabled){background:#0000000f;color:var(--text)}.toolbar-button--active{background:#2563eb1f;color:var(--accent)}.toolbar-button--active:hover:not(:disabled){background:#2563eb2e;color:var(--accent)}.toolbar-button:disabled{opacity:.35;cursor:not-allowed}.status-line{font-size:.8125rem;color:var(--text-muted)}.ProseMirror-yjs-cursor--agent{border-color:#7c3aed!important}.ProseMirror-yjs-cursor--agent>div{background-color:#7c3aed!important}.ProseMirror-yjs-selection--agent{background-color:#7c3aed2e!important}.chat-target-selection{background:#2563eb29;border-radius:2px;padding-top:2px;padding-bottom:2px;box-shadow:inset 0 0 0 1px #2563eb24}.chat-target-cursor{display:inline-block;width:2px;height:1.15em;margin-left:-1px;margin-right:-1px;vertical-align:text-bottom;background:var(--accent);border-radius:999px;opacity:.9;pointer-events:none;animation:chat-target-caret-pulse 1.1s ease-in-out infinite}@keyframes chat-target-caret-pulse{0%,to{opacity:.4}50%{opacity:.95}}.ProseMirror-yjs-cursor{position:relative;margin-left:-1px;margin-right:-1px;border-left:1px solid black;border-right:1px solid black;border-color:#e07020;word-break:normal;pointer-events:none}.ProseMirror-yjs-cursor>div{position:absolute;top:-1.05em;left:-1px;font-size:11px;background-color:#e07020;font-family:sans-serif;font-weight:500;line-height:normal;-webkit-user-select:none;user-select:none;color:#fff;padding:0 3px;white-space:nowrap;border-radius:2px}.chat-sidebar{height:100%;display:flex;flex-direction:column}.chat-header{flex-shrink:0;height:36px;display:flex;align-items:center;justify-content:space-between;gap:.75rem;padding:0 .75rem;border-bottom:1px solid var(--border)}.chat-header-actions{display:inline-flex;align-items:center;gap:.45rem;min-width:0}.chat-heading{font-size:.6875rem;font-weight:600;text-transform:uppercase;letter-spacing:.08em;color:var(--text-subtle);margin:0}.chat-tools-toggle{display:inline-flex;align-items:center;gap:.35rem;font-size:.6875rem;color:var(--text-muted);-webkit-user-select:none;user-select:none}.chat-tools-toggle input{margin:0;accent-color:var(--accent)}.chat-copy-json-btn{height:22px;padding:0 .45rem;border:1px solid var(--border);border-radius:var(--radius-sm);background:var(--surface);color:var(--text-muted);font-size:.6875rem;font-weight:500;cursor:pointer;white-space:nowrap;transition:background .1s,color .1s,border-color .1s}.chat-copy-json-btn:hover{background:var(--surface-hover);color:var(--text)}.chat-copy-json-btn-failed{color:var(--danger);border-color:#dc262659}.chat-loading{padding:.75rem;font-size:.8125rem;color:var(--text-subtle);margin:0}.chat-empty{margin:0;padding:2rem .5rem;font-size:.8rem;color:var(--text-subtle);text-align:center}.chat-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:.25rem}.chat-msg{font-size:.8125rem;padding:.5rem .625rem;border-radius:var(--radius)}.chat-msg-user{background:#eff6ff;border:1px solid #bfdbfe;margin-left:1.5rem}.chat-msg-assistant{background:var(--surface);border:1px solid var(--border);margin-right:1.5rem}.chat-msg-assistant-meta{background:transparent;border:none;margin-right:1.5rem;padding:.25rem 0}.chat-role{display:block;font-size:.625rem;text-transform:uppercase;letter-spacing:.07em;color:var(--text-subtle);margin-bottom:.2rem;font-weight:600}.chat-text{white-space:pre-wrap;word-break:break-word;line-height:1.55;color:var(--text)}.chat-typing{display:inline-flex;align-items:center;gap:.28rem;min-height:1rem;padding:.15rem 0}.chat-typing-row{display:flex;align-items:center;justify-content:space-between;gap:.75rem;padding:.15rem .625rem .5rem;margin-top:.5rem}.chat-typing__dot{width:.4rem;height:.4rem;border-radius:999px;background:var(--text-subtle);animation:chat-bob 1s ease-in-out infinite}.chat-typing__dot:nth-child(2){animation-delay:.14s}.chat-typing__dot:nth-child(3){animation-delay:.28s}@keyframes chat-bob{0%,80%,to{transform:translateY(0);opacity:.45}40%{transform:translateY(-.18rem);opacity:1}}.chat-part-list{display:flex;flex-direction:column;gap:.4rem}.chat-disclosure{border:1px solid rgba(0,0,0,.08);border-radius:8px;background:#00000005}.chat-disclosure__summary{display:flex;align-items:center;gap:.4rem;list-style:none;cursor:pointer;padding:.45rem .55rem;color:var(--text);font-size:.75rem;font-weight:600}.chat-disclosure__summary::-webkit-details-marker{display:none}.chat-disclosure__icon{display:inline-flex;align-items:center;justify-content:center;width:1rem;height:1rem;border-radius:999px;border:1px solid rgba(0,0,0,.12);font-size:.7rem;line-height:1;flex-shrink:0}.chat-disclosure[open] .chat-disclosure__icon{font-size:0}.chat-disclosure[open] .chat-disclosure__icon:before{content:"-";font-size:.9rem;line-height:1}.chat-disclosure__meta{margin-left:auto;color:var(--text-subtle);font-size:.6875rem;font-weight:500;text-align:right}.chat-disclosure__body{margin:0;padding:0 .55rem .55rem;display:flex;flex-direction:column;gap:.45rem;white-space:pre-wrap;word-break:break-word;color:var(--text);font-size:.75rem;line-height:1.5}.chat-disclosure__body pre{margin:0;padding:.45rem .5rem;border-radius:6px;background:#0f172a0a;overflow-x:auto;font-size:.72rem}.chat-insert__preview{padding:0 .55rem .45rem;color:var(--text);white-space:pre-wrap;word-break:break-word;font-size:.78rem;line-height:1.5}.chat-msg-assistant-meta .chat-role{margin-bottom:.15rem}.chat-msg-assistant-meta .chat-disclosure{background:transparent;border-color:#0000000d}.chat-error{margin:0;padding:.5rem .75rem;font-size:.8rem;color:var(--danger);border-top:1px solid var(--border);flex-shrink:0}.chat-stop-btn{height:24px;padding:0 .5rem;border:1px solid var(--border);border-radius:var(--radius);background:var(--surface);color:var(--text-muted);font-size:.6875rem;font-weight:500;cursor:pointer;transition:background .1s,color .1s}.chat-stop-btn:hover{background:var(--surface-hover);color:var(--text)}.chat-stop-btn-inline{flex-shrink:0}.chat-input-wrap{flex-shrink:0;position:relative;padding:.5rem;border-top:1px solid var(--border)}.chat-input{display:block;width:100%;min-height:62px;max-height:200px;padding:.5rem .625rem 2.25rem;border:1px solid var(--border);border-radius:var(--radius);background:var(--surface);color:var(--text);font-size:.8125rem;line-height:1.5;outline:none;resize:none;overflow-y:auto;transition:border-color .1s}.chat-input:focus{border-color:var(--accent);box-shadow:0 0 0 2px #2563eb1a}.chat-input:disabled{opacity:.6;cursor:not-allowed}.chat-send-inline{position:absolute;right:13px;bottom:13px;height:24px;padding:0 .5rem;border:none;border-radius:var(--radius-sm);background:var(--accent);color:var(--accent-fg);font-weight:500;font-size:.75rem;cursor:pointer;transition:background .1s}.chat-send-inline:hover:not(:disabled){background:var(--accent-hover)}.chat-send-inline:disabled{opacity:.35;cursor:not-allowed}.name-modal-overlay{position:fixed;inset:0;z-index:100;background:#00000040;display:flex;align-items:center;justify-content:center}.name-modal{background:var(--surface);border:1px solid var(--border);border-radius:6px;box-shadow:0 8px 24px #0000001f;padding:1.25rem 1.5rem;width:min(320px,90vw);display:flex;flex-direction:column;gap:.625rem}.name-modal__label{margin:0;font-size:.8125rem;font-weight:500;color:var(--text-muted)}.name-modal__input{display:block;width:100%;height:34px;padding:0 .625rem;border:1px solid var(--border);border-radius:var(--radius);background:var(--bg);color:var(--text);font-size:.9375rem;outline:none;transition:border-color .1s}.name-modal__input:focus{border-color:var(--accent);box-shadow:0 0 0 2px #2563eb1f;background:var(--surface)}.name-modal__actions{display:flex;justify-content:flex-end;gap:.375rem;margin-top:.25rem}.name-modal__btn{height:30px;padding:0 .75rem;border-radius:var(--radius);font-size:.8125rem;font-weight:500;cursor:pointer;transition:background .1s}.name-modal__btn--cancel{border:1px solid var(--border);background:var(--surface);color:var(--text-muted)}.name-modal__btn--cancel:hover{background:var(--surface-hover);color:var(--text)}.name-modal__btn--save{border:1px solid var(--accent);background:var(--accent);color:var(--accent-fg)}.name-modal__btn--save:hover{background:var(--accent-hover);border-color:var(--accent-hover)}.share-modal{width:min(480px,calc(100vw - 2rem))}.share-modal__hint{margin-top:.6rem;font-size:.75rem;color:var(--text-subtle)}.share-modal__btn{border:1px solid var(--border);background:var(--surface);color:var(--text)}.share-modal__btn:hover{background:var(--surface-hover)}.editor-scroll,.chat-messages{scrollbar-width:thin;scrollbar-color:rgba(0,0,0,.15) transparent}.editor-scroll::-webkit-scrollbar,.chat-messages::-webkit-scrollbar{width:6px}.editor-scroll::-webkit-scrollbar-track,.chat-messages::-webkit-scrollbar-track{background:transparent}.editor-scroll::-webkit-scrollbar-thumb,.chat-messages::-webkit-scrollbar-thumb{background:#00000026;border-radius:999px}.editor-scroll::-webkit-scrollbar-thumb:hover,.chat-messages::-webkit-scrollbar-thumb:hover{background:#00000040}.status-bar{position:fixed;left:0;right:0;bottom:0;height:var(--statusbar-height);display:flex;align-items:stretch;padding:0;border-top:1px solid var(--border);background:var(--surface);color:var(--text-subtle);font-size:.6875rem;overflow-x:auto}.status-bar__item{white-space:nowrap;padding:0 .625rem;border-right:1px solid var(--border);display:flex;align-items:center}.status-bar__link{color:var(--text-subtle);text-decoration:none}.status-bar__link:hover{color:var(--text);background:#0000000a}.chat-overlay-backdrop{display:none}@media(max-width:860px){.chat-toggle-btn{display:inline-flex}.doc-shell__body{grid-template-columns:1fr;height:100%;position:relative}.pane-separator{display:none}.doc-pane--editor{grid-column:1}.doc-pane--chat{position:fixed;top:var(--toolbar-height);right:0;bottom:var(--statusbar-height);width:min(360px,85vw);z-index:30;border-left:1px solid var(--border);background:var(--bg);box-shadow:-4px 0 16px #0000001a;transform:translate(100%);transition:transform .2s ease}.doc-pane--chat-open{transform:translate(0)}.chat-overlay-backdrop{display:block;position:fixed;inset:0;z-index:29;background:#0003}.doc-pane__content{padding:1.25rem 1rem}.editor-surface{min-height:360px}.status-bar{height:auto;min-height:var(--statusbar-height);flex-wrap:wrap}}
