/* Docs keeps its established palette and geometry in this app-local stylesheet. */
:root { color-scheme:light; --works-page:#fff; --works-sidebar:#f7f8fa; --works-control:#f5f6f8; --works-text:#20242b; --works-muted:#697689; --works-line:#e2e5ea; --works-hover:#edf0f4; --works-selected:#e6eaf0; --works-link:#4267a5; --works-accent:#008d69; --works-warning:#946715; --works-primary:#4267a5; --works-primary-text:#fff; --works-sidebar-width:280px; --space-1:4px; --space-2:8px; --space-3:12px; --space-4:16px; --space-5:24px; --font-ui:system-ui,-apple-system,"Segoe UI",sans-serif; --font-xs:12px; --font-sm:13px; --font-base:14px; --radius-control:5px; }
html.dark-mode { color-scheme:dark; --works-page:#111319; --works-sidebar:#08090c; --works-control:#171b23; --works-text:#e6e6e6; --works-muted:#66778f; --works-line:#2a303b; --works-hover:#171b24; --works-selected:#1a1e28; --works-link:#98b7e9; --works-accent:#00c990; --works-warning:#dcc18d; --works-primary:#98b7e9; --works-primary-text:#111319; }
* { box-sizing:border-box; }
html,body { width:100%; height:100%; margin:0; }
body.docs-page { font-family:var(--font-ui); font-size:var(--font-base); line-height:1.5; }
button,input,select,textarea { font:inherit; color:inherit; color-scheme:inherit; }
.employee-action,.button { display:inline-flex; align-items:center; justify-content:center; gap:8px; min-height:32px; padding:0 10px; border:1px solid var(--works-line); border-radius:var(--radius-control); background:var(--works-control); color:var(--works-text); font-size:var(--font-xs); text-decoration:none; cursor:pointer; }
.button.primary { background:var(--works-primary); border-color:var(--works-primary); color:var(--works-primary-text); }
button:disabled { opacity:.55; cursor:not-allowed; }

body.docs-page {
 --docs-bg:var(--works-page); --docs-sidebar:var(--works-sidebar); --docs-text:var(--works-text); --docs-muted:var(--works-muted);
 --docs-line:var(--works-line); --docs-hover:var(--works-hover); --docs-selected:var(--works-selected); --docs-control:var(--works-control);
 --docs-accent:var(--works-accent); --docs-link:var(--works-link); --docs-sidebar-width:var(--works-sidebar-width); --docs-reading-width:900px;
 --docs-space-1:var(--space-1); --docs-space-2:var(--space-2); --docs-space-3:var(--space-3); --docs-space-4:var(--space-4); --docs-space-5:var(--space-5);
 height:100dvh; min-height:0; overflow:hidden; background:var(--docs-bg); color:var(--docs-text);
}
html.dark-mode body.docs-page ::selection { background:#4169a1; color:#fff; }

body.docs-page #docs-root { height:100dvh; min-height:0; overflow:hidden; }
.docs-shell { height:100%; display:grid; grid-template-columns:var(--docs-sidebar-width) minmax(0,1fr); grid-template-rows:64px minmax(0,1fr); font-size:14px; line-height:1.5; }
.docs-shell *, .docs-dialog * { box-sizing:border-box; }
.docs-shell [hidden] { display:none !important; }
.docs-icon { width:20px; height:20px; flex:none; fill:none; stroke:currentColor; stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round; }
.docs-icon-button { display:inline-flex; align-items:center; justify-content:center; flex:none; width:32px; height:32px; border:0; border-radius:5px; padding:0; background:transparent; color:var(--docs-muted); font:inherit; cursor:pointer; }
.docs-icon-button:hover,.docs-nav-link:hover { background:var(--docs-hover); color:var(--docs-text); }
.docs-shell :focus-visible,.docs-dialog :focus-visible { outline:2px solid var(--docs-link); outline-offset:2px; }
.docs-header { grid-column:2; grid-row:1; display:flex; align-items:center; gap:var(--docs-space-3); position:relative; z-index:5; min-width:0; padding:var(--docs-space-3) var(--docs-space-4); background:var(--docs-bg); }
.docs-header-actions { display:flex; gap:var(--docs-space-2); margin-left:auto; }
#docs-search-form { display:flex; align-items:center; gap:var(--docs-space-2); width:min(360px,100%); min-width:0; padding:0 var(--docs-space-3); border:1px solid var(--docs-line); border-radius:22px; color:var(--docs-muted); }
body.docs-page #docs-search { width:100%; min-width:0; height:34px; padding:0; background:transparent; border:0; border-radius:0; color:var(--docs-text); font:inherit; font-size:14px; box-shadow:none; outline-offset:4px; }
#docs-search::placeholder { color:var(--docs-muted); opacity:1; }
#docs-search-form .docs-icon { width:17px; height:17px; }
#docs-search-form kbd { font:inherit; font-size:12px; color:var(--docs-muted); }
#docs-search-results { position:absolute; top:58px; left:var(--docs-space-4); width:min(540px,calc(100% - 32px)); max-height:65dvh; overflow:auto; padding:var(--docs-space-2); background:var(--docs-control); border:1px solid var(--docs-line); border-radius:8px; }
.docs-search-item { display:block; width:100%; padding:var(--docs-space-3); text-align:left; font:inherit; color:var(--docs-text); background:transparent; border:0; border-radius:4px; overflow-wrap:anywhere; cursor:pointer; }
.docs-search-item:hover { background:var(--docs-selected); }
.docs-navigation { grid-column:1; grid-row:1/-1; display:flex; flex-direction:column; min-width:0; min-height:0; background:var(--docs-sidebar); color:var(--docs-muted); }
.docs-brand { display:flex; align-items:center; gap:var(--docs-space-3); height:64px; flex:none; padding:0 var(--docs-space-4); color:var(--docs-text); font-size:16px; font-weight:600; }
.docs-brand > .docs-icon { color:var(--docs-accent); }
.docs-brand .docs-icon-button { margin-left:auto; }
.docs-shortcuts { padding:var(--docs-space-3) var(--docs-space-2) var(--docs-space-2); }
.docs-nav-link { display:flex; align-items:center; gap:var(--docs-space-2); width:100%; min-width:0; height:34px; padding:0 var(--docs-space-3); border:0; border-radius:4px; background:transparent; color:inherit; font:inherit; text-align:left; cursor:pointer; }
.docs-nav-link.selected { background:var(--docs-selected); color:var(--docs-text); }
.docs-nav-link .docs-icon { width:17px; height:17px; }
.docs-collections-label { display:flex; align-items:center; justify-content:space-between; flex:none; height:36px; padding:0 var(--docs-space-4) 0 20px; font-weight:500; font-size:12px; letter-spacing:.02em; }
.docs-create-actions { display:flex; }
.docs-create-actions .docs-icon-button { width:26px; height:26px; }
.docs-create-actions .docs-icon { width:16px; height:16px; }
#docs-tree { flex:1; min-height:0; overflow:auto; overscroll-behavior:contain; padding:var(--docs-space-1) var(--docs-space-2) var(--docs-space-3); scrollbar-width:thin; scrollbar-color:var(--docs-line) transparent; }
.docs-tree-row { display:flex; align-items:center; min-width:0; padding-left:calc(var(--depth,0)*16px); border-radius:4px; }
.docs-tree-row:hover { background:var(--docs-hover); }
.docs-tree-row.selected { background:var(--docs-selected); color:var(--docs-text); }
.docs-tree-menu { flex:0 0 26px; margin:0; opacity:0; }
.docs-tree-row:hover .docs-tree-menu,.docs-tree-row:focus-within .docs-tree-menu,.docs-tree-row.selected .docs-tree-menu { opacity:1; }
.docs-tree-menu > summary { display:flex; align-items:center; justify-content:center; width:26px; height:26px; padding:0; }
.docs-tree-menu .docs-node-menu-items { top:30px; }
@media (hover:none) { .docs-tree-menu { opacity:1; } }
.docs-tree-add { display:flex; align-items:center; justify-content:center; flex:0 0 26px; width:26px; height:26px; margin-right:3px; padding:0; border:0; border-radius:4px; background:transparent; color:var(--docs-muted); cursor:pointer; opacity:0; }
.docs-tree-add .docs-icon { width:15px; height:15px; }
.docs-tree-row:hover .docs-tree-add,.docs-tree-row:focus-within .docs-tree-add,.docs-tree-row.selected .docs-tree-add { opacity:1; }
.docs-tree-add:hover { background:var(--docs-hover); color:var(--docs-text); }
.docs-tree-add:focus-visible { opacity:1; outline:2px solid var(--docs-accent); outline-offset:1px; }
@media (hover:none) { .docs-tree-add { opacity:1; } }
.docs-tree-toggle,.docs-tree-item { border:0; background:transparent; color:inherit; font:inherit; text-align:left; cursor:pointer; }
.docs-tree-toggle { display:flex; align-items:center; justify-content:center; flex:0 0 18px; width:18px; height:32px; padding:0; }
.docs-tree-toggle .docs-icon { width:11px; height:11px; transition:transform 120ms; }
.docs-tree-toggle[aria-expanded=true] .docs-icon { transform:rotate(90deg); }
.docs-tree-toggle:disabled { cursor:default; }
.docs-tree-item { display:flex; align-items:center; gap:var(--docs-space-2); flex:1; min-width:0; height:32px; padding:0 var(--docs-space-2) 0 0; font-size:13px; }
.docs-tree-item .docs-icon { width:15px; height:15px; }
.docs-tree-label { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.docs-navigation-footer { flex:none; margin:0 var(--docs-space-2); padding:var(--docs-space-3) 0; border-top:1px solid var(--docs-line); font-size:12px; }
.docs-navigation-footer .docs-nav-link { padding-inline:var(--docs-space-3); }
.docs-layout { grid-column:2; grid-row:2; display:grid; grid-template-columns:minmax(0,1fr); min-height:0; min-width:0; }
.docs-shell.has-document .docs-layout { grid-template-columns:minmax(0,1fr) 168px; }
.docs-workspace { --docs-workspace-top:32px; min-width:0; min-height:0; overflow:auto; overscroll-behavior:contain; padding:var(--docs-workspace-top) 48px 80px; scrollbar-width:thin; scrollbar-color:var(--docs-line) transparent; }
.docs-workspace > * { max-width:var(--docs-reading-width); margin-inline:auto; }
.docs-workspace > #docs-message:empty { display:none; }
#docs-message,.docs-warning,.docs-dialog-error { color:var(--works-warning); overflow-wrap:anywhere; }
#docs-breadcrumb { margin-bottom:var(--docs-space-3); max-height:56px; overflow:auto; font-size:12px; color:var(--docs-muted); overflow-wrap:anywhere; }
.docs-selection-heading { display:flex; align-items:center; gap:var(--docs-space-3); min-width:0; }
#docs-selection-icon { display:flex; color:var(--docs-accent); }
#docs-selection-icon .docs-icon { width:30px; height:30px; }
body.docs-page #docs-title { flex:1; width:100%; min-width:0; height:48px; margin:0; padding:0; background:transparent; border:0; border-radius:0; color:var(--docs-text); font:inherit; font-size:32px; line-height:1.35; font-weight:600; box-shadow:none; }
.docs-document-meta { display:flex; align-items:center; justify-content:space-between; gap:var(--docs-space-3); margin:var(--docs-space-2) 0 20px 42px; }
#docs-selection-meta { margin:0; font-size:12px; color:var(--docs-muted); }
.docs-document-actions { display:flex; align-items:center; justify-content:flex-end; flex-wrap:wrap; gap:var(--docs-space-2); }
#docs-save-status { font-size:12px; color:var(--docs-muted); white-space:nowrap; }
.docs-node-menu { position:relative; }
.docs-node-menu summary,.docs-table-menu summary { list-style:none; cursor:pointer; }
.docs-node-menu summary::-webkit-details-marker,.docs-table-menu summary::-webkit-details-marker { display:none; }
.docs-node-menu-items { position:absolute; top:36px; right:0; z-index:4; display:grid; min-width:150px; padding:var(--docs-space-1); border:1px solid var(--docs-line); border-radius:6px; background:var(--docs-control); }
.docs-node-menu-items .employee-action { justify-content:flex-start; white-space:nowrap; }
.docs-empty h1 { margin:0 0 var(--docs-space-2); font-size:32px; font-weight:600; }
.docs-empty p { margin:0; color:var(--docs-muted); }
.docs-collection { margin-top:28px; }
.docs-collection h2 { margin:0; padding-bottom:var(--docs-space-3); border-bottom:1px solid var(--docs-line); font-size:14px; font-weight:500; color:var(--docs-muted); }
#docs-collection-count { margin-left:var(--docs-space-2); font-size:12px; }
.docs-collection-row { display:flex; align-items:flex-start; gap:var(--docs-space-3); padding:var(--docs-space-3) var(--docs-space-1); border-radius:4px; color:var(--docs-text); cursor:pointer; }
.docs-collection-row:hover { background:var(--docs-hover); }
.docs-collection-row > .docs-icon { width:20px; height:20px; margin-top:3px; color:var(--docs-muted); }
.docs-collection-info { display:grid; gap:var(--docs-space-1); min-width:0; }
.docs-collection-title { font-size:17px; font-weight:500; overflow-wrap:anywhere; }
.docs-collection-meta,.docs-empty-list { font-size:13px; color:var(--docs-muted); }
.docs-toc { display:none; min-width:0; min-height:0; overflow:auto; padding:64px var(--docs-space-4) var(--docs-space-5) 0; color:var(--docs-muted); font-size:12px; }
.has-document .docs-toc { display:block; }
.docs-toc h2 { margin:0 0 var(--docs-space-3); font-size:12px; font-weight:500; }
.docs-toc button { display:block; width:100%; padding:var(--docs-space-2) 0 var(--docs-space-2) calc(var(--level,0)*12px); border:0; background:transparent; color:inherit; font:inherit; text-align:left; overflow-wrap:anywhere; cursor:pointer; }
.docs-toc button:hover { color:var(--docs-text); }
.docs-actions,.docs-toolbar { display:flex; align-items:center; gap:var(--docs-space-1); flex-wrap:wrap; margin:var(--docs-space-3) 0; }
body.docs-page .docs-shell .employee-action,body.docs-page .docs-dialog .employee-action { min-height:28px; padding:0 var(--docs-space-2); border:0; border-radius:4px; background:transparent; color:var(--docs-muted); font-size:12px; }
body.docs-page .docs-shell .employee-action:hover,body.docs-page .docs-dialog .employee-action:hover { background:var(--docs-hover); color:var(--docs-text); }
.docs-shell input:not([type=checkbox]),.docs-shell select,.docs-shell textarea { min-width:0; }
/* Toolbar and editor are sibling stacking contexts inside the workspace scroll. */
.docs-toolbar { position:sticky; top:calc(-1 * var(--docs-workspace-top)); z-index:1; isolation:isolate; margin:0; padding:var(--docs-space-2) 0; background:var(--docs-bg); border-bottom:1px solid var(--docs-line); }
.docs-toolbar::before { content:""; position:absolute; inset:0 -12px; z-index:-1; background:var(--docs-bg); }
#docs-editor { position:relative; z-index:0; isolation:isolate; }
.docs-toolbar select { min-height:28px; height:28px; width:auto; padding:0 var(--docs-space-2); font-size:12px; }
.docs-shell .docs-toolbar button[aria-pressed=true],.docs-pdf-tools button[aria-pressed=true] { color:var(--docs-text); background:var(--docs-selected); }
.docs-table-menu > div { display:flex; flex-wrap:wrap; gap:var(--docs-space-1); margin-top:var(--docs-space-2); }
#docs-editor .tiptap { min-height:300px; padding:var(--docs-space-4) 0 40px; outline:0; line-height:1.75; font-size:13px; caret-color:var(--docs-text); overflow-wrap:anywhere; }
#docs-editor .tiptap h1 { font-size:28px; } #docs-editor .tiptap h2 { font-size:23px; } #docs-editor .tiptap h3 { font-size:19px; }
#docs-editor .tiptap h1,#docs-editor .tiptap h2,#docs-editor .tiptap h3 { line-height:1.4; font-weight:600; scroll-margin-top:130px; }
#docs-editor .tiptap li:has(> h1)::marker { font-size:28px; font-weight:600; }
#docs-editor .tiptap li:has(> h2)::marker { font-size:23px; font-weight:600; }
#docs-editor .tiptap li:has(> h3)::marker { font-size:19px; font-weight:600; }
#docs-editor .tiptap ol { list-style-type:decimal; }
#docs-editor .tiptap ol ol { list-style-type:lower-alpha; }
#docs-editor .tiptap ol ol ol { list-style-type:lower-roman; }
#docs-editor .tiptap p { margin:0 0 1em; }
#docs-editor .tiptap ::selection { background:var(--docs-selected); }
#docs-editor .tiptap a { color:inherit; text-decoration:underline; }
#docs-editor .tiptap blockquote { margin:var(--docs-space-4) 0; padding-left:var(--docs-space-4); border-left:3px solid var(--docs-line); color:var(--docs-muted); }
#docs-editor .tiptap pre { padding:var(--docs-space-4); border-radius:4px; background:var(--docs-control); overflow:auto; white-space:pre; }
#docs-editor .tiptap code { font-family:monospace; }
#docs-editor .tiptap img { max-width:100%; height:auto; }
#docs-editor .tiptap table { border-collapse:collapse; table-layout:fixed; width:100%; margin:var(--docs-space-4) 0; }
#docs-editor .tiptap td,#docs-editor .tiptap th { border:1px solid var(--docs-line); padding:var(--docs-space-2); vertical-align:top; text-align:left; }
#docs-editor .tiptap .selectedCell { background:var(--docs-selected); }
#docs-editor .tiptap ul[data-type=taskList] { list-style:none; padding-left:0; }
#docs-editor .tiptap li[data-checked] { display:flex; gap:var(--docs-space-2); }
#docs-editor .tiptap li[data-checked] > div { flex:1; min-width:0; }
#docs-editor .tiptap li[data-checked] > label { flex:0 0 18px; padding-top:5px; }
#docs-editor .tiptap input[type=checkbox] { width:16px; height:16px; margin:0; padding:0; }
#docs-editor .tiptap li[data-checked] p { margin:0 0 var(--docs-space-2); }
#docs-source { display:block; width:100%; min-height:50vh; padding:var(--docs-space-4); border:1px solid var(--docs-line); background:var(--docs-control); color:var(--docs-text); font-family:monospace; line-height:1.6; resize:vertical; }
.docs-shell:not(.has-document) #docs-toc-toggle,.docs-toc-toggle,.docs-mobile-menu { display:none; }
.docs-sidebar-backdrop { display:none; }
.docs-dialog { color:var(--docs-text); background:var(--docs-bg); border:1px solid var(--docs-line); border-radius:8px; width:min(600px,90vw); max-height:85dvh; padding:var(--docs-space-5); overflow:auto; font-size:14px; }
.docs-dialog::backdrop { background:rgb(0 0 0 / 65%); }
.docs-link-context-menu { position:fixed; z-index:30; display:grid; min-width:180px; padding:var(--docs-space-1); border:1px solid var(--docs-line); border-radius:6px; background:var(--docs-control); box-shadow:0 4px 16px rgb(0 0 0 / 20%); }
.docs-link-context-menu[hidden] { display:none; }
.docs-link-context-menu button { border:0; border-radius:4px; padding:8px 10px; background:transparent; color:var(--docs-text); font:inherit; text-align:left; cursor:pointer; }
.docs-link-context-menu button:hover,.docs-link-context-menu button:focus-visible { background:var(--docs-hover); }
.docs-dialog h2 { font-size:20px; font-weight:600; margin:0; }
.docs-node-parent-picker { display:grid; gap:var(--docs-space-2); min-width:0; }
.docs-node-parent-picker[hidden] { display:none; }
.docs-node-parent-picker h3 { margin:0; color:var(--docs-muted); font-size:12px; font-weight:600; }
.docs-node-move-root { width:100%; border:1px solid var(--docs-line); border-radius:4px; }
.docs-node-move-root[aria-pressed=true] { background:var(--docs-selected); color:var(--docs-text); }
#docs-node-move-tree { max-height:min(42dvh,360px); min-height:96px; overflow:auto; border:1px solid var(--docs-line); border-radius:4px; padding:var(--docs-space-1); scrollbar-width:thin; scrollbar-color:var(--docs-line) transparent; }
.docs-link-picker-label { display:block; margin-bottom:var(--docs-space-2); color:var(--docs-muted); font-size:12px; }
.docs-link-tree { max-height:min(35dvh,300px); min-height:72px; overflow:auto; border:1px solid var(--docs-line); border-radius:4px; padding:var(--docs-space-1); scrollbar-width:thin; scrollbar-color:var(--docs-line) transparent; }
.docs-link-search-results { display:grid; max-height:min(35dvh,300px); min-height:72px; overflow:auto; border:1px solid var(--docs-line); border-radius:4px; padding:var(--docs-space-1); scrollbar-width:thin; scrollbar-color:var(--docs-line) transparent; }
.docs-link-search-results[hidden] { display:none; }
.docs-link-search-results p { margin:var(--docs-space-2); color:var(--docs-muted); }
.docs-link-search-result { display:grid; gap:2px; width:100%; padding:var(--docs-space-2); border:0; border-radius:4px; background:transparent; color:var(--docs-text); text-align:left; cursor:pointer; }
.docs-link-search-result:hover,.docs-link-search-result:focus-visible { background:var(--docs-hover); }
.docs-link-search-result strong { font-weight:500; }
.docs-link-search-result span { color:var(--docs-muted); font-size:11px; overflow-wrap:anywhere; }
.docs-dialog-header { display:flex; align-items:center; justify-content:space-between; gap:var(--docs-space-3); padding-bottom:var(--docs-space-4); }
.docs-form { display:grid; gap:var(--docs-space-4); margin:var(--docs-space-4) 0; }
.docs-form label { display:grid; gap:var(--docs-space-2); color:var(--docs-muted); font-size:12px; }
.docs-form input:not([type=checkbox]),.docs-form select { width:100%; min-width:0; }
.docs-files-dialog { width:min(1000px,94vw); }
.docs-file-list { max-height:42vh; overflow:auto; }
.docs-file-row { padding:var(--docs-space-4) 0; border-bottom:1px solid var(--docs-line); overflow-wrap:anywhere; }
.docs-file-heading { display:flex; align-items:center; gap:var(--docs-space-3); }
.docs-file-heading > .docs-icon { color:var(--docs-muted); }
.docs-file-heading strong { font-weight:500; }
.docs-file-meta { margin:var(--docs-space-1) 0 0 32px; color:var(--docs-muted); font-size:12px; }
.docs-file-row .docs-actions { margin:var(--docs-space-2) 0 0 24px; }
#docs-file-preview img,#docs-file-preview iframe { display:block; width:100%; max-height:55vh; object-fit:contain; border:1px solid var(--docs-line); }
#docs-file-preview iframe { height:55vh; }
#docs-upload-progress { width:100%; accent-color:var(--docs-accent); }
#docs-upload-status { white-space:pre-line; }
@media(max-width:1100px) {
 .docs-workspace { padding:var(--docs-workspace-top) 32px 64px; }
 .docs-shell.has-document .docs-layout { grid-template-columns:minmax(0,1fr); }
 .has-document .docs-toc { display:none; }
 .docs-toc-toggle { display:inline-flex; }
 .docs-shell.has-document .docs-toc.open { display:block; position:fixed; z-index:6; right:var(--docs-space-4); top:64px; width:220px; max-height:60dvh; padding:var(--docs-space-4); background:var(--docs-control); border:1px solid var(--docs-line); border-radius:6px; }
}
@media(max-width:760px) {
 .docs-shell { grid-template-columns:minmax(0,1fr); grid-template-rows:56px minmax(0,1fr); }
 .docs-header { grid-column:1; padding:var(--docs-space-2) var(--docs-space-3); gap:var(--docs-space-2); }
 .docs-header-actions { gap:var(--docs-space-1); }
 .docs-mobile-menu { display:inline-flex; }
 #docs-search-form { width:100%; padding:0 var(--docs-space-2); }
 #docs-search-form kbd { display:none; }
 body.docs-page #docs-search { font-size:13px; }
 #docs-search-results { top:52px; left:var(--docs-space-3); width:calc(100% - 24px); }
 .docs-navigation { position:fixed; top:0; bottom:0; left:0; z-index:8; width:min(var(--docs-sidebar-width),calc(100vw - 48px)); transform:translateX(-100%); visibility:hidden; transition:transform 160ms ease,visibility 160ms; }
 .navigation-open .docs-navigation { transform:none; visibility:visible; }
 .navigation-open .docs-sidebar-backdrop { display:block; position:fixed; inset:0; z-index:7; border:0; background:rgb(0 0 0 / 55%); }
 .docs-layout { grid-column:1; }
 .docs-workspace { --docs-workspace-top:var(--docs-space-5); padding:var(--docs-workspace-top) 20px 48px; }
 body.docs-page #docs-title { font-size:26px; }
 .docs-document-meta { margin-left:0; flex-wrap:wrap; }
 #docs-selection-icon .docs-icon { width:24px; height:24px; }
 .docs-selection-heading { gap:var(--docs-space-2); }
 .docs-collection-title { font-size:16px; }
 .docs-toolbar { position:relative; top:0; }
 .docs-dialog { padding:var(--docs-space-4); }
 .docs-file-meta { margin-left:0; }
 .docs-file-row .docs-actions { margin-left:0; }
 .docs-shell.has-document .docs-toc.open { top:56px; }
}
@media(prefers-reduced-motion:reduce) { .docs-navigation,.docs-tree-toggle .docs-icon { transition:none; } }

/* Tiptap image node views: original pixels stay in storage; only display width changes. */
#docs-editor .docs-image { max-width:100%; margin:0 0 1em; }
#docs-editor .docs-image[data-image-align=center] { justify-content:center; }
#docs-editor .docs-image[data-image-align=right] { justify-content:flex-end; }
#docs-editor .docs-image-content { display:block; max-width:100%; width:fit-content; margin:0; }
#docs-editor .docs-image [data-resize-wrapper] { max-width:100%; width:fit-content; }
#docs-editor .docs-image img { display:block; max-width:100%; height:auto !important; }
#docs-editor .docs-image-caption { box-sizing:border-box; width:100%; max-width:100%; margin-top:4px; color:var(--docs-muted); font-size:11px; line-height:1.4; text-align:center; overflow-wrap:anywhere; }
#docs-editor .docs-image-caption[hidden] { display:none; }
#docs-editor .docs-image.ProseMirror-selectednode [data-resize-wrapper] { outline:2px solid var(--docs-link); }
#docs-editor .docs-image [data-resize-handle] { width:10px; height:10px; background:var(--docs-link); border:1px solid var(--docs-bg); visibility:hidden; z-index:2; }
#docs-editor .docs-image.ProseMirror-selectednode [data-resize-handle],
#docs-editor .docs-image[data-resize-state=true] [data-resize-handle] { visibility:visible; }
#docs-editor [data-resize-handle=top-left],#docs-editor [data-resize-handle=bottom-right] { cursor:nwse-resize; }
#docs-editor [data-resize-handle=top-right],#docs-editor [data-resize-handle=bottom-left] { cursor:nesw-resize; }
#docs-editor .tiptap[contenteditable=true] .docs-image img { cursor:grab; }
#docs-editor .docs-image[data-resize-state=true] img { cursor:nwse-resize; }
/* Place handles outside the image so even an 8px image retains a draggable center. */
#docs-editor [data-resize-handle=top-left] { transform:translate(-100%,-100%); }
#docs-editor [data-resize-handle=top-right] { transform:translate(100%,-100%); }
#docs-editor [data-resize-handle=bottom-left] { transform:translate(-100%,100%); }
#docs-editor [data-resize-handle=bottom-right] { transform:translate(100%,100%); }

#docs-editor .docs-image-panel { position:fixed; z-index:3; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); overflow:auto; gap:var(--docs-space-2); padding:var(--docs-space-3); border:1px solid var(--docs-line); border-radius:4px; background:var(--docs-control); color:var(--docs-text); font-size:12px; line-height:1.5; cursor:default; }
#docs-editor .docs-image-panel > label { display:grid; gap:var(--docs-space-1); min-width:0; }
#docs-editor .docs-image-panel > .docs-image-caption-field { grid-column:1/-1; }
#docs-editor .docs-image-panel input[type=number] { width:100%; height:28px; padding:0 var(--docs-space-2); font-size:12px; }
#docs-editor .docs-image-panel input[type=text] { width:100%; height:28px; padding:0 var(--docs-space-2); font-size:12px; }
#docs-editor .docs-image-size-actions { grid-column:1/-1; display:flex; align-items:center; flex-wrap:wrap; gap:var(--docs-space-2); }
#docs-editor .docs-image-size-actions label { display:flex; align-items:center; gap:var(--docs-space-1); margin:0; }
#docs-editor .docs-image-size-error { grid-column:1/-1; color:var(--works-warning); }
#docs-editor .docs-image-size-error:empty { display:none; }

/* PDF nodes share image selection/handles; only the first-page area is resized. */
#docs-editor .docs-pdf { flex-direction:column; align-items:flex-start; gap:var(--docs-space-2); }
#docs-editor .docs-pdf-thumbnail { background:white; color:#333; border:1px solid var(--docs-line); object-fit:fill; }
#docs-editor .docs-pdf-info { display:flex; flex-wrap:wrap; align-items:center; gap:var(--docs-space-2); max-width:100%; font-size:12px; line-height:1.5; }
#docs-editor .docs-pdf-info strong { font-weight:500; overflow-wrap:anywhere; }
.docs-pdf-badge { border:1px solid var(--docs-line); border-radius:4px; padding:0 var(--docs-space-1); color:var(--docs-muted); font-size:11px; }
.docs-pdf-info-status { color:var(--docs-muted); }
.docs-pdf-error .docs-pdf-info-status { color:var(--works-warning); }
.docs-pdf-dialog { width:min(1200px,96vw); height:92dvh; max-height:92dvh; padding:var(--docs-space-4); overflow:hidden; }
.docs-pdf-dialog[open] { display:flex; flex-direction:column; gap:var(--docs-space-2); }
.docs-pdf-dialog .docs-dialog-header { padding:0; flex:none; }
.docs-pdf-dialog h2 { min-width:0; font-size:16px; overflow-wrap:anywhere; max-height:4em; overflow:auto; }
.docs-pdf-tools { display:flex; flex-wrap:wrap; align-items:center; gap:var(--docs-space-2); flex:none; }
.docs-pdf-tools form { margin:0; }
.docs-pdf-tools label { display:flex; align-items:center; gap:var(--docs-space-1); margin:0; font-size:12px; }
.docs-pdf-tools input { width:68px; height:28px; padding:0 var(--docs-space-2); }
.docs-pdf-status { margin:0; font-size:12px; color:var(--docs-muted); flex:none; }
.docs-pdf-stage { min-height:0; min-width:0; flex:1; overflow:auto; overscroll-behavior:contain; background:var(--docs-sidebar); padding:var(--docs-space-4); }
.docs-pdf-stage canvas { display:block; margin-inline:auto; max-width:none; background:white; }

body.docs-page { --docs-warning:var(--works-warning); }
.docs-shell { background:var(--docs-bg); color:var(--docs-text); }
.docs-dialog { color:var(--docs-text); background:var(--docs-bg); border:1px solid var(--docs-line); border-radius:8px; max-width:min(760px,calc(100vw - 24px)); max-height:calc(100dvh - 24px); }
.docs-dialog::backdrop { background:rgb(0 0 0 / 55%); }
.docs-form { display:grid; gap:16px; padding:20px; }
.docs-form label,.docs-login-form label { display:grid; gap:6px; }
.docs-form :is(input,select),.docs-login-form input { min-width:0; min-height:36px; padding:7px 10px; border:1px solid var(--works-line); border-radius:var(--radius-control); background:var(--works-control); color:var(--works-text); }
.docs-login-page { display:grid; place-items:center; padding:24px; background:var(--docs-bg); color:var(--docs-text); }
.docs-login-card { width:min(360px,100%); padding:24px; }
.docs-login-card h1 { margin:0 0 4px; font-size:28px; }
.docs-login-card > p { color:var(--docs-muted); }
.docs-login-form { display:grid; gap:14px; margin:22px 0; }
.docs-login-form p { min-height:1.5em; color:var(--docs-warning); }
#docs-toast { position:fixed; z-index:20; right:16px; bottom:16px; max-width:min(420px,calc(100vw - 32px)); padding:12px 16px; border:1px solid var(--docs-line); border-radius:6px; background:var(--docs-control); color:var(--docs-text); }
#docs-toast[hidden] { display:none; }
.docs-settings { max-width:680px; margin:0 auto; padding:48px 24px; color:var(--docs-text); }
.docs-settings h1 { font-size:28px; }
.docs-settings a { color:var(--docs-link); }
.docs-login-form .button { justify-self:start; }
