@layer editor{:root{--editor-font:"Roboto", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;--editor-font-mono:ui-monospace, SFMono-Regular, Menlo, monospace;--editor-text:#202124;--editor-text-muted:#5f6368;--editor-text-subtle:#80868b;--editor-control-fg:#444746;--editor-surface:#fff;--editor-border:#e0e0e0;--editor-border-muted:#dadce0;--editor-border-table:#c7c7c7;--editor-subtle-bg:#f1f3f4;--editor-chrome-bg:#f8f9fa;--editor-accent:#1a73e8;--editor-accent-ink:#0b57d0;--editor-accent-bg:#d3e3fd;--editor-toolbar-bg:#edf2fa;--editor-menu-active-bg:#edf2fa;--editor-control-hover-bg:#e2e7ef;--editor-danger:#d93025;--editor-danger-bg:#fce8e6;--editor-inverse-bg:#1b1b1b;--editor-inverse-fg:#e3e3e3;--editor-inverse-accent:#8ab4f8;--editor-page-width:800px;--editor-page-min-height:calc(100vh - 160px);--editor-page-padding:32px 0 96px;--editor-sticky-offset:0px;--editor-rail-gutter:32px;--editor-z-popup:1000;--editor-z-menu:1100;--editor-shadow-sm:0 1px 3px #3c404326;--editor-shadow-pop:0 6px 24px #0003;--editor-callout-bg:#fef7e0;--editor-callout-border:#feefc3;--editor-callout-accent:#f9ab00;--editor-mergefield-bg:#e8f0fe;--editor-mergefield-border:#c6dafc;--editor-mergefield-fg:#1967d2;--editor-cond-bg:#ece8fd;--editor-cond-fg:#5b3dd4;--editor-comment-bg:#fff3bf;--editor-comment-accent:#f59f00}:where(.document-editor,.document-editor-popup){box-sizing:border-box;font-family:var(--editor-font);color:var(--editor-text);line-height:1.5}:where(.document-editor,.document-editor-popup) *,:where(.document-editor,.document-editor-popup) :before,:where(.document-editor,.document-editor-popup) :after{box-sizing:border-box}.document-editor-popup{z-index:var(--editor-z-popup)}.document-editor{grid-template-columns:minmax(min-content, 1fr) minmax(0, var(--editor-page-width)) minmax(min-content, 1fr);column-gap:16px;display:grid}.document-editor__rail{margin-left:var(--editor-rail-gutter);grid-column:1;justify-self:start}.document-editor__rail--right{margin-left:0;margin-right:var(--editor-rail-gutter);grid-column:3;justify-self:end}.document-editor__column{flex-direction:column;grid-column:2;min-width:0;display:flex}.document-editor__empty-state{pointer-events:none;justify-content:center;align-items:center;display:flex;position:fixed;inset:0}.document-editor__empty-state>*{pointer-events:auto}.document-editor__zoom,.document-editor__scale,.document-editor__surface{flex-direction:column;flex:1 0 auto;display:flex}.document-editor__zoom--scrolls{margin:0 -8px;padding:0 8px;overflow-x:auto}.document-editor__scale{width:var(--editor-page-width);transition:zoom .1s}.document-editor__surface .ProseMirror{min-height:var(--editor-page-min-height);padding:var(--editor-page-padding);outline:none;flex:1 0 auto}.document-editor__surface .ProseMirror>*+*{margin-top:.6em}.insert-rail{top:calc(var(--editor-sticky-offset) + 16px);background:var(--editor-surface);border:1px solid var(--editor-border);box-shadow:var(--editor-shadow-sm);border-radius:12px;flex-direction:column;gap:4px;padding:6px;display:flex;position:sticky}.insert-rail__btn{width:36px;height:36px;color:var(--editor-control-fg);cursor:pointer;background:0 0;border:1px solid #0000;border-radius:8px;font-size:14px;font-weight:600}.insert-rail__btn:hover{background:var(--editor-subtle-bg)}.insert-rail__btn:focus-visible{outline:2px solid var(--editor-accent);outline-offset:1px}.editor-toolbar{top:var(--editor-sticky-offset);z-index:10;background:var(--editor-toolbar-bg);border:1px solid var(--editor-border);border-radius:24px;flex-wrap:wrap;gap:2px;margin-bottom:16px;padding:6px 8px;display:flex;position:sticky}.editor-toolbar__btn{min-width:32px;height:32px;color:var(--editor-control-fg);cursor:pointer;background:0 0;border:1px solid #0000;border-radius:6px;padding:0 8px;font-size:14px;font-weight:600}.editor-toolbar__btn:hover{background:var(--editor-control-hover-bg)}.editor-toolbar__btn:focus-visible{outline:2px solid var(--editor-accent);outline-offset:1px}.editor-toolbar__btn[aria-pressed=true]{background:var(--editor-accent-bg);color:var(--editor-accent-ink)}.editor-toolbar__btn:disabled{opacity:.4;cursor:default}.bubble-toolbar__inner{background:var(--editor-inverse-bg);border-radius:10px;flex-wrap:nowrap;gap:2px;padding:4px;display:inline-flex;box-shadow:0 6px 20px #0000005c}.bubble-toolbar__inner .editor-toolbar__btn{color:var(--editor-inverse-fg)}.bubble-toolbar__inner .editor-toolbar__btn:hover{background:color-mix(in srgb, var(--editor-inverse-fg) 12%, var(--editor-inverse-bg))}.bubble-toolbar__inner .editor-toolbar__btn[aria-pressed=true]{background:var(--editor-inverse-accent);color:var(--editor-inverse-bg)}.document-editor__surface h1{font-size:26px;font-weight:400}.document-editor__surface h2{font-size:22px;font-weight:400}.document-editor__surface h3{font-size:18px;font-weight:500}.document-editor__surface a{color:var(--editor-accent-ink)}.document-editor__surface table{border-collapse:collapse;table-layout:fixed;width:100%;margin:.5em 0;overflow:hidden}.document-editor__surface th,.document-editor__surface td{border:1px solid var(--editor-border-table);vertical-align:top;box-sizing:border-box;padding:6px 10px;position:relative}.document-editor__surface .tableWrapper{overflow-x:auto}.document-editor__surface .column-resize-handle{z-index:20;background:var(--editor-accent);pointer-events:none;width:4px;position:absolute;top:0;bottom:0;right:-2px}.document-editor__surface .resize-cursor{cursor:ew-resize;cursor:col-resize}.document-editor__surface .selectedCell:after{content:"";z-index:2;background:color-mix(in srgb, var(--editor-accent) 18%, transparent);pointer-events:none;position:absolute;inset:0}.document-editor__surface th{background:var(--editor-subtle-bg);text-align:left;font-weight:600}.document-editor__surface blockquote{border-left:4px solid var(--editor-border-muted);color:var(--editor-text-muted);margin:.5em 0;padding-left:16px}.document-editor__surface pre{background:var(--editor-inverse-bg);color:var(--editor-inverse-fg);font-family:var(--editor-font-mono);border-radius:8px;margin:.5em 0;padding:12px 16px;font-size:13px;overflow-x:auto}.document-editor__surface hr{border:none;border-top:1px solid var(--editor-border-muted);margin:1em 0}.document-editor__surface img{max-width:100%;height:auto}.document-editor__surface .image-resizer{width:fit-content;max-width:100%;line-height:0;display:block;position:relative}.document-editor__surface .image-resizer--selected img{outline:2px solid var(--editor-accent);outline-offset:1px}.document-editor__surface .image-resizer__handle{background:var(--editor-surface);border:2px solid var(--editor-accent);z-index:1;border-radius:2px;width:10px;height:10px;display:none;position:absolute}.document-editor__surface .image-resizer--selected .image-resizer__handle{display:block}.document-editor__surface .image-resizer__handle--nw{cursor:nwse-resize;top:-5px;left:-5px}.document-editor__surface .image-resizer__handle--ne{cursor:nesw-resize;top:-5px;right:-5px}.document-editor__surface .image-resizer__handle--sw{cursor:nesw-resize;bottom:-5px;left:-5px}.document-editor__surface .image-resizer__handle--se{cursor:nwse-resize;bottom:-5px;right:-5px}.document-editor__surface .image-resizer__handle--n{cursor:ns-resize;top:-5px;left:calc(50% - 5px)}.document-editor__surface .image-resizer__handle--s{cursor:ns-resize;bottom:-5px;left:calc(50% - 5px)}.document-editor__surface .image-resizer__handle--w{cursor:ew-resize;top:calc(50% - 5px);left:-5px}.document-editor__surface .image-resizer__handle--e{cursor:ew-resize;top:calc(50% - 5px);right:-5px}.document-editor__surface .callout{background:var(--editor-callout-bg);border:1px solid var(--editor-callout-border);border-left:4px solid var(--editor-callout-accent);border-radius:8px;gap:12px;padding:12px 16px;display:flex}.document-editor__surface .callout__emoji{-webkit-user-select:none;user-select:none;font-size:18px;line-height:1.6}.document-editor__surface .callout__content{flex:1}.document-editor__surface .merge-field{background:var(--editor-mergefield-bg);border:1px solid var(--editor-mergefield-border);color:var(--editor-mergefield-fg);white-space:nowrap;-webkit-user-select:none;user-select:none;border-radius:4px;margin:0 1px;padding:0 6px;font-size:.9em;display:inline-block}.document-editor-popup.mf-panel{background:var(--editor-surface);border:1px solid var(--editor-border);width:min(340px,80vw);max-height:calc(100vh - 120px);box-shadow:var(--editor-shadow-pop);z-index:var(--editor-z-popup);border-radius:12px;flex-direction:column;padding:14px;display:flex;position:fixed}.document-editor-popup .mf-panel__search{box-sizing:border-box;border:1px solid var(--editor-border-muted);width:100%;font:inherit;border-radius:8px;margin-bottom:10px;padding:7px 10px;font-size:13px}.document-editor-popup .mf-panel__body{flex-direction:column;gap:12px;display:flex;overflow-y:auto}.document-editor-popup .mf-panel__group-label{text-transform:uppercase;letter-spacing:.4px;color:var(--editor-text-subtle);margin-bottom:6px;font-size:11px;font-weight:600}.document-editor-popup .mf-panel__header{justify-content:space-between;align-items:center;margin-bottom:12px;display:flex}.document-editor-popup .mf-panel__header-actions{align-items:center;gap:6px;display:flex}.document-editor-popup .mf-panel__pin{border:1px solid var(--editor-border-muted);width:24px;height:24px;color:var(--editor-text-muted);cursor:pointer;background:0 0;border-radius:6px;font-size:12px;font-weight:600;line-height:1}.document-editor-popup .mf-panel__pin[aria-pressed=true]{background:var(--editor-accent-bg);border-color:var(--editor-accent);color:var(--editor-accent-ink)}.document-editor-popup .mf-panel__close{color:var(--editor-text-muted);cursor:pointer;background:0 0;border:none;font-size:20px;line-height:1}.document-editor-popup .mf-panel__chips{flex-wrap:wrap;gap:8px;display:flex}.document-editor-popup .mf-chip{border:1px solid var(--editor-mergefield-border);background:var(--editor-mergefield-bg);color:var(--editor-mergefield-fg);cursor:pointer;border-radius:16px;padding:6px 12px;font-size:13px}.document-editor-popup .mf-chip:hover{background:var(--editor-accent-bg)}.document-editor-popup .mf-panel__empty{color:var(--editor-text-subtle);font-size:13px}.document-editor__surface .conditional-block{border:1px solid var(--editor-border);border-radius:10px;margin:.6em 0;overflow:hidden}.document-editor__surface .conditional-block__chrome{background:var(--editor-chrome-bg)}.document-editor__surface .conditional-block__bar{border-bottom:1px solid var(--editor-border);-webkit-user-select:none;user-select:none;align-items:center;gap:8px;padding:8px 12px;display:flex}.document-editor__surface .conditional-block__summary{font:inherit;color:var(--editor-control-fg);cursor:pointer;text-align:left;background:0 0;border:none;flex:1;align-items:center;gap:8px;display:inline-flex}.document-editor__surface .conditional-block__icon{color:var(--editor-text-muted)}.document-editor__surface .conditional-block__cond{background:var(--editor-cond-bg);color:var(--editor-cond-fg);border-radius:6px;padding:2px 8px;font-size:.9em}.document-editor__surface .conditional-block__nest,.document-editor__surface .conditional-block__delete{cursor:pointer;color:var(--editor-control-fg);background:0 0;border:none;font-size:14px}.document-editor__surface .conditional-block__nest:disabled{opacity:.4;cursor:default}.document-editor__surface .conditional-block__content{padding:8px 12px}.document-editor__surface .cond-editor{background:var(--editor-surface);border-bottom:1px solid var(--editor-border);flex-direction:column;gap:10px;padding:12px;display:flex}.document-editor__surface .cond-editor__field{color:var(--editor-text-muted);flex-direction:column;gap:4px;font-size:12px;display:flex}.document-editor__surface .cond-editor__complex{color:var(--editor-text-muted);margin:0;font-size:13px}.document-editor__surface .cond-editor__field select,.document-editor__surface .cond-editor__field input{font:inherit;color:var(--editor-text);border:1px solid var(--editor-border-muted);background:var(--editor-surface);border-radius:8px;padding:8px 10px;font-size:14px}.document-editor__surface .cond-editor__done{background:var(--editor-inverse-bg);color:var(--editor-inverse-fg);cursor:pointer;border:none;border-radius:8px;align-self:flex-end;padding:8px 16px;font-size:13px}.document-editor-popup .slash-menu{background:var(--editor-surface);border:1px solid var(--editor-border);border-radius:8px;flex-direction:column;min-width:220px;max-height:280px;padding:4px;display:flex;overflow-y:auto;box-shadow:0 4px 16px #0000002e}.document-editor-popup .slash-menu__item{font:inherit;color:var(--editor-text);text-align:left;cursor:pointer;background:0 0;border:none;border-radius:6px;align-items:center;gap:10px;padding:8px 10px;font-size:14px;display:flex}.document-editor-popup .slash-menu__item[data-active=true]{background:var(--editor-menu-active-bg)}.document-editor-popup .slash-menu__icon{background:var(--editor-subtle-bg);width:24px;height:24px;color:var(--editor-control-fg);border-radius:4px;justify-content:center;align-items:center;font-size:12px;font-weight:600;display:inline-flex}.document-editor-popup .slash-menu--empty{background:var(--editor-surface);border:1px solid var(--editor-border);color:var(--editor-text-subtle);border-radius:8px;padding:10px 12px;font-size:13px}.document-editor-popup.context-menu{z-index:var(--editor-z-menu);background:var(--editor-surface);border:1px solid var(--editor-border);min-width:240px;max-height:min(80vh,520px);box-shadow:var(--editor-shadow-pop);border-radius:8px;flex-direction:column;padding:6px;display:flex;overflow-y:auto}.document-editor-popup .context-menu__group{flex-direction:column;display:flex}.document-editor-popup .context-menu__heading{color:var(--editor-text-subtle);padding:8px 10px 4px;font-size:12px;font-weight:600}.document-editor-popup .context-menu__sep{background:var(--editor-border);height:1px;margin:6px 8px}.document-editor-popup .context-menu__item{font:inherit;color:var(--editor-text);text-align:left;cursor:pointer;background:0 0;border:none;border-radius:6px;align-items:center;gap:12px;padding:8px 10px;font-size:14px;display:flex}.document-editor-popup .context-menu__item:hover{background:var(--editor-menu-active-bg)}.document-editor-popup .context-menu__item--danger{color:var(--editor-danger)}.document-editor-popup .context-menu__item--danger:hover{background:var(--editor-danger-bg)}.document-editor-popup .context-menu__icon{justify-content:center;align-items:center;width:20px;font-size:14px;display:inline-flex}.document-editor .page-affordance{width:100%;font:inherit;cursor:pointer;opacity:0;background:0 0;border:none;align-items:center;gap:14px;padding:8px 0;transition:opacity .12s;display:flex}.document-editor .page-affordance:hover,.document-editor .page-affordance:focus-visible{opacity:1}.document-editor .page-affordance__line{background:var(--editor-border-table);flex:1;height:1px}.document-editor .page-affordance__label{color:var(--editor-accent);white-space:nowrap;font-size:14px;font-weight:500}.document-editor__surface .ProseMirror:has(>.node-documentFooter){flex-direction:column;padding-bottom:16px;display:flex}.document-editor__surface .ProseMirror>.node-documentFooter{margin-top:auto}.document-editor__surface .doc-region{border:1px dashed var(--editor-border-table);cursor:default;border-radius:6px;padding:8px 12px;position:relative}.document-editor__surface .doc-region--editing{border-style:solid;border-color:var(--editor-accent);cursor:auto}.document-editor__surface .doc-region--header{margin-bottom:18px}.document-editor__surface .doc-region--footer{margin-top:18px}.document-editor__surface .doc-region__bar{justify-content:space-between;align-items:center;margin-bottom:4px;display:flex}.document-editor__surface .doc-region__label{text-transform:uppercase;letter-spacing:.04em;color:var(--editor-text-subtle);font-size:11px}.document-editor__surface .doc-region__remove{color:var(--editor-danger);cursor:pointer;opacity:0;background:0 0;border:none;font-size:12px;transition:opacity .12s}.document-editor__surface .doc-region:hover .doc-region__remove,.document-editor__surface .doc-region:focus-within .doc-region__remove,.document-editor__surface .doc-region__remove:focus-visible{opacity:1}.document-editor__surface .doc-region__content{outline:none}.document-editor__surface .comment{background:var(--editor-comment-bg);border-bottom:2px solid var(--editor-comment-accent)}.comments-panel{background:var(--editor-surface);border:1px solid var(--editor-border);border-radius:10px;width:260px;max-height:70vh;padding:10px 12px;overflow-y:auto;box-shadow:0 1px 4px #00000014}.comments-panel__title{color:var(--editor-text);margin-bottom:8px;font-size:13px;font-weight:600}.comments-panel__empty{color:var(--editor-text-subtle);margin:0;font-size:12px}.comments-panel__list{flex-direction:column;gap:6px;margin:0;padding:0;list-style:none;display:flex}.comments-panel__item{border:1px solid var(--editor-border);background:var(--editor-chrome-bg);width:100%;font:inherit;text-align:left;cursor:pointer;border-radius:8px;flex-direction:column;gap:2px;padding:8px;display:flex}.comments-panel__item:hover{background:color-mix(in srgb, var(--editor-comment-bg) 55%, var(--editor-surface));border-color:var(--editor-comment-accent)}.comments-panel__quote{color:var(--editor-text-subtle);font-size:11px;font-style:italic}.comments-panel__text{color:var(--editor-text);font-size:13px}.color-swatch{cursor:pointer;background:0 0;border:1px solid #0000;border-radius:6px;justify-content:center;align-items:center;width:32px;height:32px;padding:0;display:inline-flex}.color-swatch:hover{background:var(--editor-control-hover-bg)}.color-swatch__dot{border:1px solid #00000040;border-radius:50%;width:16px;height:16px}.document-editor-popup.color-picker{background:var(--editor-surface);border:1px solid var(--editor-border);box-shadow:var(--editor-shadow-pop);border-radius:8px;padding:8px}.document-editor-popup .color-picker__grid{grid-template-columns:repeat(6,1fr);gap:6px;display:grid}.document-editor-popup .color-picker__swatch{cursor:pointer;background:0 0;border:2px solid #0000;border-radius:50%;width:22px;height:22px;padding:0;box-shadow:inset 0 0 0 1px #0000001f}.document-editor-popup .color-picker__swatch:hover{border-color:var(--editor-border-muted)}.document-editor-popup .color-picker__swatch[data-active=true]{border-color:var(--editor-accent-ink)}.document-editor-popup .color-picker__default,.document-editor-popup .color-picker__custom{color:var(--editor-control-fg);background:var(--editor-surface);justify-content:center;align-items:center;font-size:14px;font-weight:600;display:inline-flex}.document-editor-popup .color-picker__input{opacity:0;pointer-events:none;width:1px;height:1px;position:absolute}}.document-editor__surface .ProseMirror-gapcursor{pointer-events:none;display:none;position:absolute}.document-editor__surface .ProseMirror-gapcursor:after{content:"";border-top:1px solid var(--editor-text);width:20px;animation:1.1s steps(2,start) infinite editor-gapcursor-blink;display:block;position:absolute;top:-2px}.document-editor__surface .ProseMirror-gapcursor:not(:last-child):after{top:-9px}.document-editor__surface .ProseMirror-focused .ProseMirror-gapcursor{display:block}@keyframes editor-gapcursor-blink{to{visibility:hidden}}:root{color:#202124;--editor-sticky-offset:56px;--editor-page-min-height:auto;font-family:Roboto,system-ui,-apple-system,Segoe UI,Arial,sans-serif;line-height:1.5}*{box-sizing:border-box}body{background:#fff;margin:0}.app{flex-direction:column;min-height:100vh;display:flex}.app__bar{z-index:20;background:#fff;border-bottom:1px solid #e0e0e0;justify-content:space-between;align-items:center;gap:16px;height:56px;padding:0 24px;display:flex;position:sticky;top:0}.app__title{font-size:18px;font-weight:500}.app__controls{align-items:center;gap:16px;display:flex}.app__preset{color:#5f6368;font-size:13px}.app__preset select{font:inherit;background:#fff;border:1px solid #dadce0;border-radius:6px;padding:4px 8px}.app__hint{color:#5f6368;white-space:nowrap;background:#f1f3f4;border-radius:12px;padding:4px 8px;font-size:12px}.app__canvas{flex-direction:column;flex:1;padding:24px 0;display:flex}.app__canvas>*{flex:1 0 auto}.right-rail{flex-direction:column;align-items:flex-end;gap:12px;display:flex}.empty-state{color:#80868b;text-align:center;flex-direction:column;align-items:center;gap:8px;display:flex}.empty-state__icon{font-size:40px}.empty-state__title{color:#444746;font-size:16px;font-weight:600}.empty-state__hint{font-size:13px}.empty-state__hint kbd{background:#f1f3f4;border:1px solid #dadce0;border-radius:4px;padding:1px 5px;font-family:inherit;font-size:12px}.empty-state__cta{color:#fff;cursor:pointer;background:#1b1b1b;border:none;border-radius:8px;margin-top:8px;padding:8px 16px;font-size:13px}.empty-state__cta:hover{background:#333}.comment-cards{color:#e3e3e3;background:#1b1b1b;border-radius:12px;flex-direction:column;gap:8px;width:260px;max-height:70vh;padding:12px;display:flex;overflow-y:auto}.comment-cards__title{align-items:center;gap:8px;font-size:13px;font-weight:600;display:flex}.comment-cards__badge{color:#1b1b1b;text-align:center;background:#8ab4f8;border-radius:10px;min-width:20px;padding:1px 6px;font-size:11px}.comment-cards__empty{color:#9aa0a6;margin:0;font-size:12px}.comment-cards__card{color:inherit;font:inherit;text-align:left;cursor:pointer;background:#2a2a2a;border:none;border-left:3px solid #8ab4f8;border-radius:6px;gap:8px;padding:8px 10px;display:flex}.comment-cards__card:hover{background:#333}.comment-cards__index{color:#8ab4f8;font-size:11px;font-weight:700}.comment-cards__body{flex-direction:column;gap:2px;display:flex}.comment-cards__text{font-size:13px}.comment-cards__quote{color:#9aa0a6;font-size:11px;font-style:italic}.insert-rail__zoom{color:#5f6368;text-align:center;-webkit-user-select:none;user-select:none;font-size:11px}.pill-toolbar{z-index:10;background:#1b1b1b;border-radius:12px;flex-wrap:wrap;align-items:center;gap:4px;margin-bottom:16px;padding:6px;display:inline-flex;position:sticky;top:56px;box-shadow:0 4px 16px #00000052}.pill-toolbar__btn{color:#e3e3e3;cursor:pointer;background:0 0;border:none;border-radius:8px;min-width:32px;height:30px;padding:0 8px;font-size:14px;font-weight:600}.pill-toolbar__btn:hover{background:#343434}.pill-toolbar__btn[data-on=true]{color:#1b1b1b;background:#8ab4f8}.pill-toolbar__btn:disabled{opacity:.4;cursor:default}.pill-toolbar__custom{display:inline-flex}
