:root{font-family:Arial,sans-serif;color:#20332f;background:#f5f7f5;font-size:16.8px}*{box-sizing:border-box}body{margin:0}button,input,textarea,select{font:inherit}button{cursor:pointer;border:1px solid #d5dfda;background:white;border-radius:7px;padding:10px 14px;color:inherit}button:hover{background:var(--dox-accent-soft-tint)}button:disabled{opacity:.5;cursor:wait}button.primary{background:var(--dox-accent);color:#fff;border-color:var(--dox-accent)}button.primary:hover{background:#184737}button.subtle{background:transparent;border:0}input,textarea,select{width:100%;border:1px solid #cdd8d0;border-radius:7px;padding:11px;background:#fff;color:#20332f}input:focus,textarea:focus,select:focus{outline:2px solid #83b4a1;outline-offset:2px}label{display:block;font-size:14px;font-weight:bold;margin:16px 0 7px}h1,h2,h3,p{margin-top:0}h1{font-size:35px;letter-spacing:-1px}h2{font-size:25px}small,.muted{color:#6c7e74}small{font-size:14px}.brand{font-size:31px;font-weight:700;letter-spacing:-1.5px;display:flex;align-items:center;gap:9px}.mark{display:inline-grid;place-items:center;width:29px;height:32px;background:#2d6b56;color:white;border-radius:4px 12px 4px 4px;font-size:23px}.shell{display:grid;grid-template-columns:224px 1fr;min-height:100vh}.sidebar{background:#fff;border-right:1px solid #dfe6e0;padding:30px 20px;display:flex;flex-direction:column;gap:26px}.sidebar nav{display:grid;gap:6px}.sidebar nav button{text-align:left;border:0}.sidebar nav button.active{background:var(--dox-accent-tint);color:var(--dox-accent);font-weight:bold}.sidebar footer{margin-top:auto;border-top:1px solid #e5eae5;padding-top:20px}.eyebrow{font-size:12px;letter-spacing:1.7px;font-weight:bold;color:#708576;margin-bottom:13px;text-transform:uppercase}.sidebar .eyebrow{margin-left:12px}.side-note{background:#f5f7f2;padding:15px;font-size:14px;line-height:1.7;border-radius:9px;color:#5b7160}.avatar{width:30px;height:30px;display:inline-grid;place-items:center;background:var(--dox-accent-tint);border-radius:50%;margin-right:7px;font-size:14px;font-weight:bold}main{min-width:0}.topbar{height:71px;border-bottom:1px solid #dfe6e0;background:#fff;display:flex;align-items:center;justify-content:space-between;padding:0 35px;font-size:14px;color:#6c7e74}.badge{border:1px solid #d2dfd6;border-radius:20px;font-size:13px;padding:6px 10px;background:var(--dox-accent-soft-tint);color:var(--accent-ink,#48705b)}.page{padding:37px;max-width:1500px;margin:auto}.heading{display:flex;justify-content:space-between;align-items:center;gap:20px;margin-bottom:30px}.heading p{margin-bottom:0;line-height:1.7}.cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:18px}.project-card{background:#fff;border:1px solid #dbe4dc;border-radius:12px;padding:24px;min-height:210px;text-align:left;display:flex;flex-direction:column;align-items:start;gap:14px}.project-card h2{margin:0}.project-card p{line-height:1.7;font-size:16px;color:#6c7e74}.project-card footer{margin-top:auto;font-size:14px;color:#65766a;display:flex;justify-content:space-between;width:100%}.icon{font-size:28px;padding:10px 13px;border-radius:8px;background:var(--dox-accent-tint);color:#4c704c}.empty{padding:65px 30px;background:white;border:1px dashed #ccd9cd;border-radius:10px;text-align:center;line-height:1.8}.workspace{display:grid;grid-template-columns:260px minmax(280px,1fr) minmax(300px,1fr);border:1px solid #d9e2d9;border-radius:10px;overflow:hidden;background:white;min-height:610px}.toc{background:#fafbf8;border-right:1px solid #dfe6dc;padding:20px 14px}.toc button.section{display:block;width:100%;text-align:left;border:0;background:transparent;padding:13px 10px;margin-bottom:4px;font-size:14px}.toc button.section.active{background:var(--dox-accent-tint);color:var(--accent-ink,#285a44)}.section small{display:block;font-size:12px;margin-top:6px}.panel{padding:23px;min-width:0}.editor{border-right:1px solid #dfe6dc}.panel-header{display:flex;justify-content:space-between;align-items:start;gap:12px}.panel h2{font-size:20px;margin-bottom:7px}.panel p{line-height:1.65;font-size:14px}.editor textarea{min-height:330px;resize:vertical;line-height:1.8;font-family:Georgia,serif;background:#fefefd}.actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:15px}.notice{font-size:13px;background:#f5f4e9;color:#77704a;padding:12px;border-radius:6px;line-height:1.6;margin:18px 0}.preview{background:#edf0eb}.paper{background:#fff;padding:28px;box-shadow:0 3px 12px #2233190b;min-height:470px;margin-top:20px;overflow-wrap:anywhere}.paper .document-title{font-size:31px;font-weight:normal;line-height:1.25;border-bottom:2px solid var(--accent);padding-bottom:20px;color:var(--accent)}.paper h3{font-size:18px;margin-top:22px;margin-bottom:10px;color:var(--accent)}.paper p{white-space:pre-wrap;font-size:14px;line-height:1.8}.paper ol{padding-left:20px;font-size:13px;line-height:1.9}.paper .pending{color:#99a59b;font-style:italic}.auth{min-height:100vh;display:grid;grid-template-columns:1fr 1fr}.auth-story{background:var(--dox-accent-tint);padding:10vw 7vw;display:flex;flex-direction:column;justify-content:center}.auth-story h1{font-family:Georgia,serif;font-size:62px;font-weight:normal;line-height:1.15;margin-top:60px}.auth-story p{line-height:1.9;color:#5a705d;max-width:390px}.auth-form{display:grid;place-items:center;padding:35px;background:#fff}.auth-form form{width:100%;max-width:350px}.auth-form h2{font-size:32px}.auth-form button.primary{width:100%;margin-top:22px}.error{color:#a73636;line-height:1.6;font-size:14px;min-height:20px;margin-top:12px}.tabs{display:flex;gap:10px;margin:20px 0}.tabs button.active{background:var(--dox-accent-tint);border-color:#adc1a9}.auth-foot{font-size:13px;line-height:1.8;margin-top:25px;color:#7a857b}dialog{border:1px solid #d5e0d3;border-radius:13px;padding:28px;width:min(500px,95vw);box-shadow:0 15px 80px #19332130}dialog::backdrop{background:#1e30295c}dialog h2{margin-bottom:7px}.form-actions{display:flex;justify-content:flex-end;gap:9px;margin-top:23px}#toast{position:fixed;bottom:24px;left:50%;transform:translateX(-50%);background:#203b30;color:white;border-radius:8px;padding:13px 22px;box-shadow:0 5px 20px #0002;display:none;max-width:90vw;z-index:5}.back{margin-bottom:20px;padding-left:0}.row{display:flex;gap:12px}.row>*{flex:1}.format-notes{font-size:13px;color:#6c7e74;margin-top:10px;white-space:pre-wrap}.doc-list{display:grid;gap:12px}.doc-row{padding:0;border:1px solid #dbe4dc;border-radius:9px;background:#fff;display:flex;align-items:center;justify-content:space-between;text-align:left;gap:12px;overflow:hidden}.doc-row .doc-open{flex:1;min-width:0;border:0;background:transparent;padding:22px;text-align:left;display:flex;align-items:center;justify-content:space-between;gap:12px;border-radius:0}.doc-row .doc-open:hover{background:var(--dox-accent-soft-tint)}.doc-archive,.doc-restore{align-self:stretch;border:0;border-left:1px solid #dbe4dc;border-radius:0;padding:0 20px;background:transparent;font-size:14px;color:#6c7e74;white-space:nowrap}.doc-archive:hover{background:#fdf2f2;color:#a73636}.doc-restore:hover{background:var(--dox-accent-soft-tint);color:var(--dox-accent)}.doc-row.archived{background:#fafbf8;border-style:dashed}.doc-row.archived h3{color:#6c7e74;font-weight:400}.doc-row.archived>div{padding:18px 22px}.doc-row h3{margin:0 0 7px}.redacted{border:1px dashed #b8b8b8;background:#f4f4f4;color:#555;padding:12px 14px;font-style:italic;border-radius:6px}
:root[data-theme="midnight"] .redacted{background:var(--dox-raised);border-color:var(--dox-line-warm);color:var(--dox-muted)}
.redacted-block{border:1px dashed #b8b8b8;background:#f4f4f4;color:#555;padding:12px 14px;font-style:italic}.redacted-block strong{font-style:normal}:root[data-theme="midnight"] .redacted-block{background:var(--dox-raised);border-color:var(--dox-line-warm);color:var(--dox-muted)}.grant-toolbar{display:flex;gap:8px;flex-wrap:wrap;margin:0 0 14px}.grant-toolbar button{font-size:14px;padding:7px 12px}.grant-rows{max-height:46vh;overflow:auto;border-top:1px solid #eef2ee}.grant-name{flex:1;min-width:0}.grant-name small{display:block;margin-top:2px}.grant-choices{display:flex;gap:12px;flex-wrap:wrap}.grant-option{display:inline-flex;align-items:center;gap:5px;margin:0;font-size:14px;font-weight:400;cursor:pointer}.grant-option input{width:auto;margin:0}.grant-row{padding:10px 0}.grant-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:6px 0;border-bottom:1px solid #eef2ee}.grant-row:last-child{border-bottom:0}.grant-row>span{flex:1;min-width:0}.grant-row select{width:auto;min-width:150px;padding:7px 9px;font-size:14px}@media(max-width:520px){.grant-row{flex-wrap:wrap}.grant-row select{width:100%}}@media(min-width:1600px){.workspace{grid-template-columns:270px 1fr 1fr}}@media(max-width:1200px){.workspace{grid-template-columns:220px 1fr}.preview{grid-column:1/-1;border-top:1px solid #dfe6dc}.editor{border:0}}@media(max-width:750px){.shell{grid-template-columns:1fr}.sidebar{padding:15px 20px;flex-direction:row;align-items:center;gap:15px;border-bottom:1px solid #dfe6e0}.sidebar nav,.sidebar .side-note,.sidebar footer,.sidebar .eyebrow{display:none}.page{padding:23px 16px}.topbar{height:50px;padding:0 17px}.heading{align-items:start}.heading h1{font-size:28px}.workspace{display:block}.toc{border-bottom:1px solid #dfe6dc}.toc button.section{display:inline-block;width:auto;vertical-align:top}.panel{padding:18px}.auth{grid-template-columns:1fr}.auth-story{padding:35px}.auth-story h1{font-size:42px;margin-top:30px}.auth-story p{display:none}.auth-form{padding:35px 25px}.paper{padding:20px}}
.paper ol{list-style:none;padding-left:0}@media(max-width:750px){.sidebar{flex-wrap:wrap;justify-content:space-between}.sidebar footer{display:block;margin:0;padding:0;border:0}.sidebar footer .avatar{display:none}.sidebar nav{display:block}.sidebar nav button{padding:7px}.sidebar footer{font-size:0}.sidebar footer button{font-size:14px}}
.assignment{border-top:1px solid #dfe6dc;margin-top:24px;padding-top:4px}.assignment p{font-size:14px}.readonly-content{white-space:pre-wrap;overflow-wrap:anywhere;min-height:230px}.member-options{border:1px solid #dfe6dc;border-radius:7px;margin-top:22px}.member-options label{display:flex;align-items:center;gap:12px;margin:14px 0}.member-options input{width:auto}.member-options small{display:block;font-weight:normal;margin-top:5px}.member-list{max-height:180px;overflow:auto;border-bottom:1px solid #dfe6dc;padding:8px 0}.member-list p{font-size:16px;line-height:1.7}
.document-controls{display:flex;gap:8px;align-items:center;justify-content:flex-end;flex-wrap:wrap}.rich-editor{border:1px solid #cdd8d0;border-radius:8px;overflow:hidden;background:white}.format-toolbar{background:var(--dox-accent-soft-tint);border-bottom:1px solid #dce3da;padding:8px}.toolbar-row{display:flex;align-items:center;gap:5px;flex-wrap:wrap;margin:3px 0}.toolbar-row select{width:auto;max-width:170px;padding:6px 7px;font-size:13px}.toolbar-row button{padding:6px 8px;font-size:13px;border-radius:4px;min-height:29px}.toolbar-row button[aria-pressed=true]{background:var(--dox-accent-strong);border-color:#76a38a;color:#1b5235}.toolbar-row button[data-command=bold]{font-weight:bold}.toolbar-row button[data-command=italic]{font-style:italic}.toolbar-row button[data-command=underline]{text-decoration:underline}.toolbar-row select:disabled,.color-control:has(input:disabled){opacity:.45}.color-control{margin:0;display:flex;align-items:center;gap:3px;border:1px solid var(--line,#d5dfda);border-radius:4px;background:var(--tint,#ffffff);color:var(--ink,#22322c);padding:3px 5px;font-size:13px}.color-control input{width:20px;height:22px;padding:1px;border:0}.editor-canvas{max-width:1100px;margin:0 auto;width:100%;}

.editor-canvas{max-width:1100px;margin:0 auto;width:100%}
.tiptap p{font-size:inherit;line-height:inherit;margin:0 0 .85em}.tiptap h1,.tiptap h2,.tiptap h3{color:var(--accent);line-height:1.3;margin:1em 0 .5em}.tiptap h1{font-size:2em}.tiptap h2{font-size:1.5em}.tiptap h3{font-size:1.2em}.tiptap blockquote,.rich-content blockquote{border-left:3px solid #aac3b0;margin:1em 0;padding-left:16px}.tiptap pre,.rich-content pre{background:#eef2ec;border-radius:5px;padding:12px;white-space:pre-wrap}.tiptap img,.rich-content img{max-width:100%;height:auto;display:block;margin:12px 0}.tiptap img.ProseMirror-selectednode{outline:3px solid #84ac90}.tiptap table,.rich-content table{border-collapse:collapse;width:100%;table-layout:fixed;margin:14px 0}.tiptap td,.tiptap th,.rich-content td,.rich-content th{border:1px solid #bacabf;padding:8px;min-width:35px;vertical-align:top;position:relative}.tiptap th,.rich-content th{background:#eaf0e7}.tiptap .selectedCell{background:#d8e9da}.editor-footer{border-top:1px solid #e2e8df;padding:9px 11px;font-size:12px;color:#6c7e74;display:flex;justify-content:space-between;gap:12px;background:#fafbf8}.rich-content{font-family:var(--document-font,Georgia);font-size:var(--document-size,14px);line-height:var(--document-line,1.5);overflow-wrap:anywhere;white-space:normal}.paper .rich-content p,.rich-content p{font-size:inherit;line-height:inherit;white-space:pre-wrap;margin:0 0 .85em}.paper .rich-content ol{list-style:decimal;padding-left:25px;font-size:inherit;line-height:inherit}.rich-content ul{list-style:disc;padding-left:25px}.rich-content h1{font-size:1.8em}.rich-content h2{font-size:1.5em}.paper .rich-content h3{font-size:1.2em}.rich-content h1,.rich-content h2,.rich-content h3{line-height:1.3;color:var(--accent)}.rich-content a,.tiptap a{color:#226c9b;text-decoration:underline}.style-locked .tiptap [style]{font-family:inherit!important;font-size:inherit!important;color:inherit!important;background-color:transparent!important;line-height:inherit!important;text-align:inherit!important}.format-toolbar [hidden],.rich-editor [hidden]{display:none!important}.editor .notice{margin:14px 0}.workspace{grid-template-columns:230px minmax(350px,1.15fr) minmax(270px,1fr)}@media(max-width:1350px){.workspace{grid-template-columns:220px minmax(300px,1fr)}.workspace .preview{grid-column:1/-1;border-top:1px solid #dfe6dc}.workspace .editor{border-right:0}}@media(max-width:750px){.workspace{display:block}.document-controls{justify-content:flex-start}.heading:has(.document-controls){flex-wrap:wrap}.toolbar-row select{max-width:140px}.editor-canvas .tiptap{padding:16px}.rich-content{overflow-x:auto}}
.format-toolbar .toolbar-icon{min-width:36px;display:inline-flex;align-items:center;justify-content:center;height:36px;font-size:22px}
.format-toolbar .toolbar-icon svg{width:20px;height:20px}.toolbar-icon[data-command=strike]{text-decoration:line-through}.toolbar-icon[data-command=clear]{font-size:17px}.toolbar-icon[data-command=undo],.toolbar-icon[data-command=redo]{font-size:29px}.format-toolbar .toolbar-row button[data-command=underline]{text-decoration:underline}
/* Document focus workspace: navigation rail, TOC, contribution and optional preview. */
.nav-icon{display:inline-block;margin-right:7px}.logout-icon{display:none}.nav-toggle{padding:8px;font-size:22px;min-height:36px}.toc-dismiss,#contents-toggle{display:none}.document-focus{height:100dvh;min-height:0;overflow:hidden;grid-template-columns:64px minmax(0,1fr);transition:grid-template-columns .2s ease}.document-focus.nav-expanded{grid-template-columns:224px minmax(0,1fr)}.document-focus>.sidebar{height:100dvh;position:relative;z-index:20;padding:18px 12px;gap:22px;overflow-y:auto;flex-direction:column;flex-wrap:nowrap;align-items:stretch;justify-content:flex-start}.document-focus .sidebar .brand{min-height:32px;flex-shrink:0}.document-focus .sidebar footer{display:block;margin-top:auto;padding-top:16px;border-top:1px solid #e5eae5;font-size:14px}.document-focus .sidebar nav{display:grid}.document-focus .sidebar footer button{font-size:14px}.document-focus .sidebar footer .avatar{display:inline-grid}.document-focus.nav-collapsed .sidebar .brand-name,.document-focus.nav-collapsed .sidebar .eyebrow,.document-focus.nav-collapsed .sidebar .nav-label,.document-focus.nav-collapsed .sidebar .side-note,.document-focus.nav-collapsed .sidebar .user-name,.document-focus.nav-collapsed .sidebar .avatar{display:none}.document-focus.nav-collapsed .sidebar .brand{justify-content:center}.document-focus.nav-collapsed .sidebar nav button,.document-focus.nav-collapsed .sidebar footer button{width:38px;height:38px;padding:8px;text-align:center}.document-focus.nav-collapsed .sidebar .nav-icon{display:inline-block;margin:0;font-size:24px}.document-focus.nav-collapsed .sidebar footer{border:0;padding:0}.document-focus>main{height:100dvh;display:flex;flex-direction:column;overflow:hidden}.document-focus .topbar{height:46px;min-height:46px;padding:0 20px;gap:15px}.document-focus .topbar>span:first-child{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.document-focus .topbar .badge{flex-shrink:0}.document-focus .page{width:100%;max-width:none;margin:0;padding:0;flex:1;min-height:0;display:flex;flex-direction:column}.document-focus .page>.back{padding:9px 20px;margin:0;align-self:flex-start;font-size:13px}.document-focus .page>.heading{padding:11px 20px;margin:0;gap:15px;border-bottom:1px solid #dfe6dc;flex-shrink:0}.document-focus .heading h1{font-size:25px;letter-spacing:-.5px;margin:0}.document-focus .heading .eyebrow,.document-focus .heading p{display:none}.document-focus .document-controls{gap:7px}.document-focus .document-controls button{padding:8px 10px;font-size:14px}.document-focus .document-controls .badge{font-size:12px}.document-focus .workspace{position:relative;display:grid;grid-template-columns:275px minmax(0,1fr) 0;flex:1;min-height:0;border:0;border-radius:0;overflow:hidden}.document-focus.preview-open .workspace{grid-template-columns:275px minmax(0,1fr) min(440px,38vw)}.document-focus .workspace>.toc{grid-column:1;grid-row:1;min-height:0;overflow-y:auto;padding:24px 13px 24px 13px;padding-right:5px}
.document-focus.chat-open .workspace>.toc-dismiss{display:none}.document-focus .toc button.section{display:block;width:100%;font-size:14px;line-height:1.5;border-radius:6px}.document-focus .workspace>.editor{grid-column:2;grid-row:1;min-height:0;overflow-y:auto;border:0;padding:16px 0;margin-left:2%;margin-right:2%}.document-focus .editor-canvas .tiptap{min-height:max(320px,calc(100dvh - 450px));padding:26px}.document-focus .editor .assignment{margin-top:24px}.document-focus .document-preview{position:fixed;inset:var(--preview-top,140px) 0 0 auto;max-width:none;max-height:none;width:min(440px,38vw);height:calc(100dvh - var(--preview-top,140px));margin:0;padding:24px;border:0;border-left:1px solid #d1dcd0;border-radius:0;background:#edf0eb;overflow-y:auto;box-shadow:-10px 0 30px #213c2414}.document-focus .document-preview[open]{display:block;animation:preview-enter .2s ease-out}.document-preview .panel-header{align-items:center;margin-bottom:12px}.document-preview .panel-header h2{margin-bottom:0}.document-preview .panel-header button{padding:6px 10px;font-size:22px}.document-preview .paper{margin-top:18px}.document-preview::backdrop{background:#1e30295c}@keyframes preview-enter{from{transform:translateX(100%);opacity:.5}to{transform:translateX(0);opacity:1}}@media(max-width:1100px){.document-focus.preview-open .workspace{grid-template-columns:275px minmax(0,1fr) 0}.document-focus .document-preview{inset:0 0 0 auto;width:min(580px,calc(100vw - 64px));height:100dvh}.document-focus .heading{flex-wrap:wrap}.document-focus .document-controls{justify-content:flex-start}}@media(max-width:800px){.document-focus,.document-focus.nav-expanded{grid-template-columns:23px minmax(0,1fr)}.document-focus>.sidebar{padding:15px 8px;gap:20px}.document-focus.nav-expanded>.sidebar{position:fixed;inset:0 auto 0 0;width:224px;box-shadow:8px 0 24px #203b3029}.document-focus #contents-toggle{display:inline-block}.document-focus .topbar{padding:0 12px;height:42px;min-height:42px}.document-focus .topbar .badge{display:none}.document-focus .page>.back{padding:8px 12px}.document-focus .page>.heading{padding:9px 12px;gap:10px;align-items:flex-start;flex-direction:column}.document-focus .heading h1{font-size:23px}.document-focus .document-controls{gap:5px;justify-content:flex-start}.document-focus .document-controls button{padding:7px 8px;font-size:13px}.document-focus .document-controls .badge{display:none}.document-focus .workspace,.document-focus.preview-open .workspace{grid-template-columns:minmax(0,1fr)}.document-focus .workspace>.editor{grid-column:1;padding:20px 14px}.document-focus .workspace>.toc{position:absolute;inset:0 auto 0 0;width:240px;z-index:16;background:#fafbf8;transform:translateX(-100%);visibility:hidden;transition:transform .2s ease,visibility .2s;box-shadow:6px 0 18px #203b3020}.document-focus.toc-open .workspace>.toc{transform:translateX(0);visibility:visible}.document-focus .toc-dismiss{position:absolute;inset:0;background:#203b304a;border:0;border-radius:0;z-index:15}.document-focus.toc-open .toc-dismiss{display:block}.document-focus .toc-dismiss[hidden]{display:none}.document-focus .editor-canvas .tiptap{padding:18px;min-height:350px}.document-focus .document-preview{width:calc(100vw - 56px);padding:18px}.document-focus .preview .paper{padding:20px}.document-focus .sidebar .side-note{display:block}.document-focus.nav-collapsed .sidebar .side-note{display:none}}@media(prefers-reduced-motion:reduce){.document-focus,.document-focus .workspace,.document-focus .workspace>.toc{transition:none.document-focus.chat-open .workspace>.chat-panel{animation:none}}.document-focus .document-preview[open]{animation:none}}
/* A single toolbar flow: controls use available width before wrapping. */
.format-toolbar{display:flex;flex-wrap:wrap;align-items:center;align-content:flex-start;gap:6px}.format-toolbar .toolbar-row{display:contents}.format-toolbar .toolbar-row[hidden]{display:none!important}.format-toolbar select,.format-toolbar button,.format-toolbar .color-control{flex:0 0 auto}.format-toolbar .color-control{height:30px}
.preview-window-controls{display:flex;align-items:center;gap:8px}.document-preview .panel-header .preview-window-controls button{font-size:14px;min-height:34px}.preview-window-controls #preview-close{font-size:22px}.document-focus .document-preview.preview-fullsize{inset:24px;width:calc(100vw - 48px);height:calc(100dvh - 48px);border:1px solid #cdd9ce;border-radius:10px;box-shadow:0 16px 80px #17332640}.document-preview.preview-fullsize>.panel-header{position:sticky;top:-24px;background:#edf0eb;padding:10px 0;z-index:2}.document-preview.preview-fullsize .paper{max-width:900px;min-height:calc(100dvh - 210px);margin:20px auto;padding:44px 55px}.document-preview .paper a{color:var(--accent,#245e4f);text-decoration:none}.document-preview .paper a:hover{text-decoration:underline}.document-preview .paper h3[id]{scroll-margin-top:80px}@media(max-width:800px){.document-focus .document-preview.preview-fullsize{inset:8px;width:calc(100vw - 16px);height:calc(100dvh - 16px);padding:18px}.document-preview.preview-fullsize .paper{padding:26px 22px}.document-preview.preview-fullsize>.panel-header{top:-18px}.preview-window-controls{gap:5px}.document-preview .panel-header .preview-window-controls button{padding:6px}}

.settings-dialog{width:min(960px,calc(100vw - 32px));max-width:none;height:calc(100dvh - 48px);overflow:auto}.settings-grid{display:grid;grid-template-columns:1fr 1fr;gap:0 16px}.settings-dialog .settings-grid label{grid-column:1}.settings-dialog .settings-grid select{grid-column:2}.history-dialog{width:calc(100vw - 48px);max-width:1300px;height:calc(100dvh - 48px);overflow:auto}.history-layout{display:grid;grid-template-columns:300px minmax(0,1fr);gap:24px;margin-top:22px}.history-entry{display:block;width:100%;text-align:left;margin-bottom:8px}.history-entry small{display:block;line-height:1.6;margin-top:7px}.history-page .actions{flex-wrap:wrap}.history-page .actions input{width:180px}.history-page .actions label{margin:0}.history-page article{padding:24px;border:1px solid #d5dfda;border-radius:8px;overflow:auto}.paper,.readonly-content,.editor-canvas .tiptap{color:var(--document-color,#20332f);background:var(--document-background,#fff)}.rich-content h1,.tiptap h1{font-size:calc(1em * var(--heading-scale,1.5) * 1.3)}.rich-content h2,.tiptap h2{font-size:calc(1em * var(--heading-scale,1.5))}.rich-content h3,.tiptap h3{font-size:calc(1em * var(--heading-scale,1.5) * .85)}@media(max-width:700px){.history-layout{grid-template-columns:1fr}.settings-dialog,.history-dialog{width:calc(100vw - 16px);height:calc(100dvh - 16px);padding:18px}.settings-grid{display:block}}

.settings-sample{padding:24px;border:1px solid #d5dfda;border-radius:8px;margin-top:22px}.history-page .rich-content h1,.history-page .rich-content h2,.history-page .rich-content h3{color:var(--accent,#245e4f)}

.settings-dialog input[type=color]{height:42px;padding:5px}.settings-dialog #settings-title{margin-bottom:14px}

.history-dialog{inset:16px;width:calc(100vw - 32px);max-width:none;height:calc(100dvh - 32px);max-height:none;margin:0;padding:24px;overflow:hidden}.history-page{height:100%;display:flex;flex-direction:column;min-height:0}.history-header{display:flex;justify-content:space-between;gap:20px;align-items:flex-start}.history-header h2{margin-bottom:8px}.history-header p{margin-bottom:12px}.history-header>button{flex-shrink:0}.history-actions{align-items:flex-end}.history-actions label{font-size:14px}.history-layout{flex:1;min-height:0;grid-template-columns:280px minmax(0,1fr);gap:20px;margin-top:18px;overflow:hidden}#history-list{overflow:auto;padding-right:6px}.history-entry.selected{background:var(--dox-accent-tint);border-color:var(--dox-accent);box-shadow:inset 3px 0 var(--dox-accent)}.history-detail{min-width:0;overflow:auto;padding-right:6px}.history-detail .tabs{position:sticky;top:0;background:white;z-index:1;padding-bottom:8px}.history-page article{min-height:calc(100% - 60px)}.snapshot-meta{font:12px Arial,sans-serif;color:#62736a}.snapshot-actions{margin-top:24px}.plain-snapshot,.text-diff{white-space:pre-wrap;overflow-wrap:anywhere}.comparison-selectors{display:grid;grid-template-columns:1fr 1fr;gap:16px}.comparison-selectors label{margin:8px 0 16px}.text-diff{border:1px solid #cdd8d0;border-radius:8px;padding:24px;line-height:1.8}.text-diff ins{background:#dcf3e2;color:#14552b;text-decoration:underline}.text-diff del{background:#fce2e2;color:#922525;text-decoration:line-through}[hidden]{display:none!important}@media(max-width:800px){.history-dialog{inset:8px;width:calc(100vw - 16px);height:calc(100dvh - 16px);padding:16px}.history-layout{grid-template-columns:220px minmax(0,1fr);gap:12px}.history-page article{padding:16px}.history-header h2{font-size:23px}}@media(max-width:600px){.history-layout{display:flex;flex-direction:column;overflow:auto}#history-list{max-height:190px;flex-shrink:0}.history-detail{overflow:visible}.history-header{gap:10px}.comparison-selectors{grid-template-columns:1fr}.history-actions input{width:150px}.history-page .actions{gap:8px}.history-page article{min-height:240px}}
.document-focus .page>.heading>div>p,.document-focus .page>.heading .eyebrow{display:none}.document-focus .page>.heading{padding:9px 24px}.document-focus .page>.back{margin:0;padding:8px 24px 0}.document-tabs{display:flex;flex-wrap:wrap;gap:4px;padding:0 24px 10px;border-bottom:1px solid #dce4dd;background:white}.document-tabs button{border:0;border-bottom:3px solid transparent;border-radius:4px 4px 0 0;padding:10px 18px;background:transparent}.document-tabs button[aria-selected=true]{color:var(--dox-accent);background:var(--dox-accent-tint);border-bottom-color:var(--dox-accent);font-weight:bold}.document-views{flex:1;min-height:0;display:flex;flex-direction:column;overflow:hidden}.document-views>section{flex:1;min-height:0;overflow:auto;background:white}.document-views #view-write{display:flex;flex-direction:column;overflow:hidden}.document-views #view-write>.workspace{flex:1;min-height:0}.document-views #view-write>#contents-toggle{align-self:flex-start;margin:8px 14px}.document-focus .editor .section-actions{margin:12px 0 18px;align-items:center}.document-focus .editor .notice{margin:8px 0}.document-focus .editor #draft-label{display:none}.document-focus .editor .panel-header{align-items:center}.document-focus .editor #draft-state{margin:14px 0 0}.tab-page-heading{display:flex;gap:18px;align-items:flex-start;justify-content:space-between;flex-wrap:wrap;margin-bottom:18px}.tab-page-heading h2{margin-bottom:8px}.tab-page-heading .actions{margin-top:0}#view-preview,#view-people,#view-settings{padding:24px clamp(18px,4vw,64px)}.tab-master-paper{max-width:900px;margin:20px auto}.tab-master-paper .paper{padding:42px;min-height:700px}.tab-master-paper h3[id]{scroll-margin-top:18px}.history-scope{display:flex;gap:12px;align-items:center;padding:16px 24px;border-bottom:1px solid #dce4dd}.history-scope label{margin:0}.history-scope select{width:auto;min-width:200px}#view-history{display:flex;flex-direction:column;overflow:hidden}.history-inline{flex:1;min-height:0;padding:20px 24px;display:flex;flex-direction:column}.history-inline>.history-page{flex:1;min-height:0}.history-inline .history-header #history-close{display:none}.history-pull{padding-top:12px;display:flex;gap:12px;align-items:center;flex-wrap:wrap}.settings-inline{max-width:1050px;margin:0 auto}.settings-inline .settings-grid label{grid-column:1}.settings-inline .settings-grid select{grid-column:2}.settings-inline input[type=color]{height:42px;padding:5px}.people-groups{display:grid;grid-template-columns:repeat(auto-fit,minmax(250px,1fr));gap:16px;margin:16px 0 28px}.people-group{border:1px solid #d5dfda;border-radius:8px;padding:20px}.people-group button{margin-right:6px}.people-group h3{margin-bottom:12px}.member-directory{display:flex;flex-wrap:wrap;gap:20px;margin:16px 0 28px}.member-directory>div{padding:12px 16px;background:var(--dox-accent-soft-tint);border-radius:6px;min-width:180px}.member-directory small{display:block;margin-top:6px}.access-row{display:flex;align-items:center;justify-content:space-between;gap:18px;border-bottom:1px solid #dce4dd;padding:16px 0}.access-row p{margin:8px 0;font-size:14px}.access-row button{flex-shrink:0}.document-focus .document-views .editor-canvas .tiptap{min-height:max(340px,calc(100dvh - 430px))}@media(max-width:800px){.document-tabs{padding:0 12px 8px;gap:2px}.document-tabs button{padding:9px 12px;font-size:14px}.document-focus .page>.heading{padding:8px 14px}.document-focus .page>.back{padding-left:14px}.history-inline{padding:14px;overflow:auto}.history-scope{padding:12px 14px}.tab-master-paper .paper{padding:24px}#view-preview,#view-people,#view-settings{padding:18px}.access-row{align-items:flex-start}.document-focus .document-views .editor-canvas .tiptap{min-height:360px}}@media(max-width:600px){.history-inline>.history-page{min-height:560px}.history-inline .history-layout{overflow:auto}.access-row{flex-direction:column}.document-tabs button{padding:9px 10px}.people-groups{grid-template-columns:1fr}}
.document-focus .page>.heading{padding:15px 24px;flex-shrink:0}.document-focus .page>.heading h1{margin-bottom:7px}.document-breadcrumb{display:flex;align-items:center;gap:8px;flex-wrap:wrap;color:#6c7e74;font-size:14px;line-height:1.5}.document-breadcrumb button{padding:0;font-size:14px;color:var(--accent-ink,#426b57)}.document-breadcrumb [aria-current=page]{overflow-wrap:anywhere}.document-focus main>.topbar[hidden]{display:none}@media(max-width:800px){.document-focus .page>.heading{padding:12px 14px}.document-breadcrumb{font-size:13px}.document-breadcrumb button{font-size:13px}}
.document-focus .page>.heading{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:12px 24px;border-bottom:1px solid #dce4dd;background:white;margin:0}.document-focus .page>.heading>div:first-child{min-width:0;flex:1 1 300px}.document-focus .page>.heading h1{font-size:26px;line-height:1.25;overflow-wrap:anywhere}.document-focus .heading>.document-tabs{padding:0;border:0;flex:0 1 auto;justify-content:flex-end;gap:2px;background:transparent}.document-focus .heading>.document-tabs button{padding:10px 12px}.document-focus .heading>.document-tabs button[aria-selected=true]{border-bottom-color:var(--dox-accent)}@media(max-width:600px){.document-focus .page>.heading{flex-direction:row;align-items:center;gap:8px}.document-focus .page>.heading>div:first-child{flex-basis:100%}.document-focus .heading>.document-tabs{justify-content:flex-start;flex-wrap:wrap;width:100%}.document-focus .page>.heading h1{font-size:23px}.document-focus .heading>.document-tabs button{padding:8px 10px}}

@media(min-width:601px) and (max-width:1000px){.document-focus .page>.heading{flex-direction:row;flex-wrap:nowrap;gap:16px;padding:14px}.document-focus .page>.heading>div:first-child{flex:1 1 200px}.document-focus .heading>.document-tabs{flex:0 0 300px;justify-content:flex-end}.document-focus .heading>.document-tabs button{padding:9px 8px;font-size:14px}.document-focus .page>.heading h1{font-size:23px}}

.publication-options{border:1px solid #d5dfda;border-radius:8px;padding:18px;margin:24px 0}.publication-options label:has(input[type=checkbox]){display:flex;align-items:center;gap:8px;font-weight:normal}.publication-options input[type=checkbox]{width:auto}.publication-preview{font-family:var(--document-font,Georgia);font-size:var(--document-size,14px);line-height:var(--document-line,1.5)}.publication-preview p{font-size:inherit;line-height:inherit}.publication-preview .cover{padding:36px 0 60px}.publication-preview .cover h1{color:#000;border:0;font-size:36px;line-height:1.25}.publication-preview .cover-kicker{font:12px Arial,sans-serif}.publication-preview .cover-subtitle{font-size:23px}.publication-preview .front-matter{padding:24px 0}.publication-preview .after-cover,.publication-preview .dedicated-toc{border-bottom:1px solid #d5dfda;margin-bottom:24px;padding-bottom:24px}.publication-preview .toc{border:0;background:transparent;padding:0}.publication-preview .toc p{margin:4px 0}.publication-preview .document-control{margin-top:24px;font-size:14px}.publication-preview .manifest{margin-top:32px;font-size:14px}

.timeline-date{font-size:14px;color:#61766a;margin:16px 0 10px}.timeline-event{position:relative;padding-left:16px;border-left:2px solid #d8e4dc;margin-left:5px}.timeline-event:before{content:"";position:absolute;left:-5px;top:16px;width:8px;height:8px;border-radius:50%;background:#708b7a}.timeline-event.named:before{background:var(--dox-accent)}.timeline-event.restored:before{background:#a36b25}.timeline-category{display:block;font-size:12px;letter-spacing:.4px;text-transform:uppercase;color:#526e5d;margin-bottom:5px}.history-inline .history-detail article{min-height:260px}.history-actions label select{margin-top:6px}.timeline-event .history-entry{overflow-wrap:anywhere}.history-actions #history-label-field{max-width:260px}

.publication-preview .control-page{padding:24px 0 36px;border-bottom:1px solid #d5dfda;margin-bottom:24px}
.settings-subnav{display:flex;gap:8px;margin-bottom:20px}.settings-subnav .active,.designer-palette .active{background:var(--dox-accent-tint);border-color:#48816a}.settings-inline.design-active{max-width:none}.designer-top{display:flex;justify-content:space-between;gap:16px;align-items:center}.designer-top h2{margin:0}.designer-message{font-size:16px;color:#386451;margin:10px 0}.designer-overflow:empty{display:none}.designer-workspace{display:grid;grid-template-columns:170px minmax(240px,1fr) 240px;gap:16px;align-items:start}.designer-palette,.designer-inspector{padding:14px;background:#fff;border:1px solid #dce4df;border-radius:10px}.designer-palette button{display:block;width:100%;margin:6px 0;text-align:left}.designer-inspector input,.designer-inspector select,.designer-palette select{width:100%;min-width:0}.designer-inspector input[type=checkbox]{width:auto}.designer-inspector input[type=color]{height:36px;padding:3px}.designer-inspector fieldset{padding:8px;margin:12px 0;border:1px solid #d6dfd8}.designer-position{display:grid;grid-template-columns:1fr 1fr;gap:8px}.designer-stage{padding:24px;background:var(--dox-accent-tint);border-radius:10px;overflow:auto}.designer-sheet{position:relative;width:100%;max-width:750px;margin:auto;box-shadow:0 3px 18px #142e2928;overflow:hidden;isolation:isolate;--design-point:1px}.designer-element{position:absolute;white-space:pre-wrap;overflow:hidden;overflow-wrap:anywhere;line-height:1.15;cursor:move;touch-action:none;box-sizing:border-box;outline:1px dashed #6a93895c}.designer-element.selected{outline:2px solid #2d8e75;background:#6dad9610}.designer-element img{width:100%;height:100%;object-fit:contain;pointer-events:none}.designer-element table{width:100%;table-layout:fixed;border-collapse:collapse;font:inherit}.designer-element th,.designer-element td{padding:.4em;border:1px solid #b8c6c2;overflow-wrap:anywhere}.designer-element th{background:#edf1f0;color:#172c29}.designer-element p{margin:.6em 0}.cover-designer button{font-size:14px}.designer-inspector h3,.designer-palette h3{font-size:16px;margin:16px 0 10px}.designer-inspector h3:first-child,.designer-palette h3:first-child{margin-top:0}.design-page{background:#fff;margin:18px 0!important;box-shadow:0 2px 12px #172c2920}.design-page svg{width:100%;height:auto}.design-page table{font:inherit!important;margin:0!important}.design-page p{font:inherit!important}.design-page h2{color:inherit!important}.settings-inline:has(.cover-designer:not([hidden])){max-width:none}.designer-inspector label{font-size:14px}.designer-inspector .actions{margin-top:12px}@media(max-width:1100px){.designer-workspace{grid-template-columns:140px minmax(200px,1fr)}.designer-inspector{grid-column:1/-1;display:block}.designer-top{flex-direction:column;align-items:stretch}.designer-inspector .designer-position{grid-template-columns:repeat(4,1fr)}}@media(max-width:600px){.designer-workspace{grid-template-columns:minmax(0,1fr)}.designer-palette{display:flex;flex-wrap:wrap;gap:6px}.designer-palette h3,.designer-palette p{width:100%}.designer-palette button{width:auto}.designer-palette select{width:auto}.designer-stage{padding:10px}.designer-inspector{grid-column:auto}.designer-inspector .designer-position{grid-template-columns:1fr 1fr}}
.design-history-icon{font-family:Arial,sans-serif;font-size:26px;line-height:1;vertical-align:-2px;margin-right:4px}
.section-header-controls{display:flex;gap:10px;align-items:center;justify-content:flex-end;flex-wrap:wrap;max-width:55%}.section-assignment-control{max-width:100%;overflow-wrap:anywhere;font-size:14px;padding:7px 10px;border:1px solid #c9dcd2;border-radius:7px;background:var(--dox-accent-tint);color:#225b47}#assignment-removal input{width:auto}@media(max-width:600px){.section-header-controls{max-width:100%;justify-content:flex-start}}
.designer-element-content{width:100%;min-height:0}.designer-resize-handle{position:absolute;width:11px;height:11px;background:#fff;border:2px solid #246454;z-index:4;box-sizing:border-box;touch-action:none}.designer-resize-handle[data-resize=nw]{left:0;top:0;cursor:nwse-resize}.designer-resize-handle[data-resize=ne]{right:0;top:0;cursor:nesw-resize}.designer-resize-handle[data-resize=sw]{left:0;bottom:0;cursor:nesw-resize}.designer-resize-handle[data-resize=se]{right:0;bottom:0;cursor:nwse-resize}.designer-resize-handle[data-resize=n]{left:calc(50% - 5px);top:0;cursor:ns-resize}.designer-resize-handle[data-resize=s]{left:calc(50% - 5px);bottom:0;cursor:ns-resize}.designer-resize-handle[data-resize=w]{left:0;top:calc(50% - 5px);cursor:ew-resize}.designer-resize-handle[data-resize=e]{right:0;top:calc(50% - 5px);cursor:ew-resize}
.paged-toolbar{display:flex;gap:10px;align-items:end;flex-wrap:wrap;padding:12px;background:var(--dox-accent-soft-tint);border-radius:8px;margin:12px 0}.paged-toolbar label{margin:0;font-size:14px}.paged-toolbar select{min-width:130px}.paged-toolbar .page-jump{width:70px}.paged-toolbar input,.paged-toolbar select{margin:4px 0 0;padding:8px}.paged-note{font-size:14px;color:var(--dox-accent-soft)}.pdf-page-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;align-items:start}.pdf-page-grid.mode-single{grid-template-columns:minmax(0,850px);justify-content:center}.pdf-page-grid.mode-all{grid-template-columns:repeat(auto-fit,minmax(240px,1fr))}.pdf-page{margin:0;min-width:0}.pdf-page figcaption{font-size:14px;color:var(--dox-accent-soft);margin:8px 0}.pdf-page-surface{background:white;box-shadow:0 2px 12px #17352b22;min-height:240px}.pdf-page-surface canvas{display:block}.pdf-page-status,.paged-message{padding:18px;color:var(--dox-accent-soft)}.paged-preview-dialog{width:96vw;max-width:none;height:94vh;max-height:none;padding:22px;border:1px solid #d1dfd6;border-radius:12px;background:var(--dox-accent-soft-tint);overflow:auto}.paged-preview-dialog::backdrop{background:#10291fcc}#preview-text-view{margin:10px 0}@media(max-width:600px){.pdf-page-grid{gap:8px}.pdf-page-grid.mode-all{grid-template-columns:minmax(0,1fr)}.paged-toolbar{gap:6px}.paged-toolbar button{padding:8px;font-size:14px}.paged-preview-dialog{padding:10px}}
.cover-designer,.designer-workspace,.designer-stage{overflow-anchor:none}
.pdf-canvas-scroller{max-width:100%;overflow:auto;padding:6px 4px 14px;overscroll-behavior:contain}.paged-toolbar .page-zoom{min-width:105px}
.pdf-canvas-scroller,#paged-preview,.tab-master-paper{border:0;box-shadow:none;background:transparent}.paged-preview-dialog{border:0}.document-preview{border:0}.paper img{max-width:100%;height:auto;object-fit:contain}.pdf-page-surface{overflow:hidden;border:0}
#paged-preview:focus,#paged-preview:focus-visible{outline:none}
.settings-inline:not(.design-active){max-width:1150px}.settings-category-layout{display:grid;grid-template-columns:215px minmax(0,1fr);gap:28px;align-items:start}.settings-category-nav{display:grid;gap:7px;position:sticky;top:166px;align-self:start}.settings-category-nav button{text-align:left;border:0}.settings-category-nav button.active{background:var(--dox-accent-tint);color:var(--dox-accent);font-weight:bold}.settings-category-nav input{padding:9px;font-size:14px;margin-bottom:8px}.settings-category-content{min-width:0;max-width:760px}.settings-category-content>section{background:#fff;border:1px solid #dbe5de;border-radius:10px;padding:22px}.settings-category-content fieldset{margin-top:0}/* Was sticky to the TOP (top:84px) with a bottom rule, which put the save actions
   above the settings and made them a full-width band. Now it terminates the form:
   sticky to the bottom, top hairline, no full-width look (#57). */
.settings-savebar{position:sticky;bottom:0;z-index:5;background:#fff;padding:12px 0 4px;margin:18px 0 0;border-top:1px solid #dce5df;border-bottom:0;display:flex;justify-content:flex-start;gap:10px}.settings-search-results{display:grid;gap:4px;padding:8px;background:var(--dox-accent-soft-tint);border-radius:8px;font-size:14px}.settings-search-results[hidden]{display:none}.settings-search-results button{font-size:14px;padding:7px}@media(max-width:700px){.settings-category-layout{grid-template-columns:minmax(0,1fr);gap:16px}.settings-category-nav{position:static;display:flex;flex-wrap:wrap;gap:5px}.settings-category-nav input,.settings-search-results{width:100%}.settings-category-nav button{font-size:14px;padding:8px}.settings-category-content>section{padding:16px}.settings-savebar{bottom:0}}
.paged-toolbar{align-items:center}.paged-toolbar label{display:flex;align-items:center;gap:6px}.paged-toolbar label input,.paged-toolbar label select{margin:0}.paged-toolbar button,#preview-text-view{margin:0;white-space:nowrap}.paged-toolbar{flex-wrap:wrap}.paged-toolbar select{width:auto}.text-view .pdf-canvas-scroller,.text-view .paged-note{display:none}.tab-page-heading .actions:empty{display:none}
.preview-scope-note{margin:0 0 0 auto;text-align:right;font-size:14px}.tab-page-heading:has(.preview-scope-note){align-items:center;gap:16px}.tab-page-heading:has(.preview-scope-note) h2{margin:0}@media(max-width:600px){.preview-scope-note{font-size:13px;max-width:55%}}
.paged-preview-dialog{inset:0;width:100vw;height:100dvh;max-width:100vw;max-height:100dvh;margin:0;padding:16px;border:0;border-radius:0}.paged-preview-dialog .paged-toolbar{position:sticky;top:0;z-index:10}.paged-preview-dialog:fullscreen{width:100vw;height:100vh;background:var(--dox-accent-soft-tint)}
.paged-note{margin:0}.paged-note:empty{display:none}.paged-toolbar{margin:8px 0}.paged-preview-dialog .paged-toolbar{margin-top:0}
.paged-toolbar .page-previous,.paged-toolbar .page-next{font-size:25px;line-height:1;min-width:38px;padding:7px}
.pdf-canvas-scroller{overscroll-behavior:auto}.paged-preview-dialog{overscroll-behavior:auto}

:root{--app-zoom:1}.app-zoom-controls{display:flex;align-items:center;gap:2px;flex:0 0 auto;margin-left:auto;white-space:nowrap}.app-zoom-controls button{display:inline-flex;align-items:center;justify-content:center;min-width:36px;height:36px;padding:5px;border-color:transparent;background:transparent}.app-zoom-controls button:hover{background:var(--dox-accent-tint)}.app-zoom-controls [data-app-zoom=reset]{font-size:17px;min-width:52px}.topbar{gap:12px}.document-focus,.document-focus>.sidebar{height:calc(100dvh / var(--app-zoom))}.paged-preview-dialog{width:calc(100vw / var(--app-zoom));height:calc(100dvh / var(--app-zoom))}.history-dialog{width:calc(100vw / var(--app-zoom) - 32px);height:calc(100dvh / var(--app-zoom) - 32px)}

/* ---------- invitation notice on the sign-in screen (#50) ---------- */

/* Shown when /invite redirects a registered invitee to sign in. It must explain WHY they
   were sent here and what will happen after signing in, otherwise the redirect looks like
   an error to someone who just clicked a join link. */
.auth-invite {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin: 0 0 14px;
  padding: 11px 13px;
  border: 1px solid #c7d7f5;
  border-left: 3px solid #1d4ed8;
  border-radius: 8px;
  background: #f2f6ff;
  color: #1b2632;
  font-size: 13px;
  line-height: 1.5;
}

.auth-invite strong { font-weight: 650; }
.auth-invite span { color: #5b6b7f; font-size: 12.5px; }

/* The invite screens reuse .auth, so the primary action needs anchor styling rather than
   the button styling it would otherwise inherit. */
.invite-action {
  display: inline-block;
  margin-top: 6px;
  padding: 10px 18px;
  border-radius: 9px;
  background: #1d4ed8;
  color: #fff;
  font-weight: 650;
  text-decoration: none;
}
.invite-action:hover { background: #1a45be; }

/* ---------- zoom-aware main ----------
   `.document-focus` and its sidebar are sized calc(100dvh / var(--app-zoom)) so the whole
   shell fits the viewport at any zoom. `main` was left at a raw 100dvh, so at 130% it was
   900px tall inside a 692px shell; `.document-focus` has overflow:hidden, so the bottom of
   the editor was clipped and unreachable — the page could not be scrolled down.
   main has to divide by the same zoom the shell does. */
.document-focus > main {
  height: calc(100dvh / var(--app-zoom, 1));
}

/* ---------- dialog actions stay reachable ----------
   A dialog's action row sat at the bottom of a scrolling dialog. The invitation dialog grows
   with every pending invitation, and with ~9 rows its Create button measured y=944 in a 900px
   viewport — the primary action scrolled out of sight with no cue that it existed. Pinning the
   row to the bottom of the dialog keeps it visible at any content length. */
#modal dialog[open] > form > .form-actions,
dialog[open] > .form-actions {
  position: sticky;
  bottom: 0;
  background: inherit;
  padding-top: 12px;
  margin-top: 12px;
  border-top: 1px solid var(--dox-line-warm, #dfe6dc);
  z-index: 2;
}

/* The modal itself must scroll, not the page behind it. */
#modal[open] {
  overflow-y: auto;
  max-height: calc(100vh - 34px);
}
/* --- Section lock (#43) ---------------------------------------------------------
   A locked section is not an error state, so it does not get the danger palette. The badge
   is quiet and informational; the audit list is deliberately plain, because it is a record
   to read, not a control to operate. */
.section-lock{display:flex;flex-wrap:wrap;gap:8px 12px;align-items:center;margin:14px 0 4px}
.section-lock small{flex-basis:100%;margin:0}
.locked-badge{background:var(--tint,#edf0eb);border:1px solid var(--line,#dfe6dc);color:var(--muted,#5c6b62)}
.lock-audit{flex-basis:100%;font-size:.85em}
.lock-audit summary{cursor:pointer;color:var(--muted,#5c6b62)}
.lock-audit ul{margin:8px 0 0;padding-left:18px}
.lock-audit li{margin:4px 0;line-height:1.45}

/* --- Notification inbox (#43) --------------------------------------------------- */
.notification-bell{position:relative}
.notification-bell .count{position:absolute;top:-6px;right:-6px;min-width:18px;height:18px;
  border-radius:9px;background:var(--danger,#b3261e);color:#fff;font-size:13px;line-height:18px;
  text-align:center;padding:0 5px}
.notification-list{display:flex;flex-direction:column;gap:2px;max-height:60vh;overflow:auto}
.notification-row{padding:12px 10px;border-bottom:1px solid var(--line,#e6e6e6)}
.notification-row:last-child{border-bottom:0}
.notification-row.unread{background:var(--tint-soft,#f5f7f4)}
.notification-row p{margin:4px 0 0;font-size:.92em;color:var(--muted,#5c6b62)}

/* Notifications drop down under the bell. Rows are list items, not cards: square corners and a
   hairline separator, so a long list reads as one column instead of a stack of boxes. */
.notification-drop{position:absolute;top:calc(100% + 8px);right:0;z-index:60;width:min(380px,calc(100vw - 32px));
  background:var(--dox-card,#fff);color:var(--dox-ink,#22322c);border:1px solid var(--line,#e6e6e6);
  border-radius:10px;box-shadow:0 16px 40px rgba(12,24,20,.18);overflow:hidden}
.notification-head{display:flex;align-items:center;justify-content:space-between;gap:10px;
  padding:11px 14px;border-bottom:1px solid var(--line,#e6e6e6)}
.notification-head strong{font-size:16px;letter-spacing:.02em;text-transform:uppercase;color:var(--dox-muted,#5c6b62)}
.notification-clear{background:transparent;border:0;border-radius:0;padding:2px 0;font-size:14px;
  font-weight:600;color:var(--accent,#25665b);cursor:pointer}
.notification-clear:disabled{color:var(--dox-faint,#98a49c);cursor:default}
.notification-drop .notification-list{max-height:min(420px,60vh);overflow:auto;gap:0}
.notification-drop .notification-row{display:block;width:100%;text-align:left;background:transparent;
  border:0;border-bottom:1px solid var(--line,#e6e6e6);border-radius:0;padding:12px 14px;
  font:inherit;color:inherit;cursor:default}
.notification-drop .notification-row:last-child{border-bottom:0}
.notification-drop .notification-action{cursor:pointer}
.notification-drop .notification-action:hover{background:var(--tint-soft,#f5f7f4)}
.notification-drop .notification-row.unread{background:var(--tint-soft,#f5f7f4)}
.notification-drop .notification-row.unread strong{color:var(--accent,#25665b)}
.notification-empty{padding:18px 14px;margin:0;font-size:.92em}
.notification-why{margin:4px 0 0;font-size:.88em;color:var(--dox-muted,#5c6b62)}
.notification-meta{margin:6px 0 0;font-size:.8em;color:var(--dox-faint,#98a49c)}
/* frozen / release / merge states (#43, #76) */
.frozen-badge{background:#fdf3e0;border:1px solid #e8cf9a;color:#6b5322}
#section-release{border-color:#b8d0c4;background:#eef5f0}
#merge,#push{font-weight:600}
#merge{background:var(--accent,#25665b);border-color:var(--accent,#25665b);color:#fff}
#merge:hover{filter:brightness(1.08)}
.danger{color:#b3261e;border-color:#e3b4b0}
.danger:hover{background:#fdf2f1}
/* These two carried a filled chip and a tinted border each, so they read as boxed while every
   other icon in the same row is borderless -- two treatments side by side. Same quiet icon now;
   Merge is the row's one weighted control. */
#save-draft,#save-labeled-draft{background:transparent;border-color:transparent;color:var(--dox-ink)}
#save-draft:hover,#save-labeled-draft:hover{background:var(--dox-accent-tint);border-color:var(--dox-line-warm)}
.timeline-category.automatic{opacity:.72;font-style:italic}
.timeline-category.named{font-weight:700}
/* ---- Focus mode (#78) -------------------------------------------------------
   Distraction-free writing. The shell's chrome is hidden outright rather than shrunk: a
   one-pixel sidebar is still a sidebar, and the point is to stop seeing it. */
.rich-editor.focus-mode{padding:0}
.rich-editor.focus-mode .format-toolbar{position:sticky;top:0;z-index:5;border-radius:0;
  background:var(--surface,#fff);border-left:0;border-right:0;border-top:0}
.rich-editor.focus-mode .editor-canvas{max-width:1080px;margin:0 auto;padding:40px 10px 50vh}
.rich-editor.focus-mode .editor-footer{max-width:1080px;margin:0 auto}
.rich-editor.focus-mode:fullscreen{background:var(--surface,#fff)}
.rich-editor.focus-mode:fullscreen .editor-canvas{padding-top:72px}
/* When the editor is fullscreen the rest of the app must not scroll behind it. */
body.editor-focus{overflow:hidden}
body.editor-focus .sidebar,body.editor-focus .topbar,body.editor-focus .document-tabs,
body.editor-focus .toc,body.editor-focus .section-actions,body.editor-focus .document-controls,
body.editor-focus .heading,body.editor-focus .eyebrow{display:none!important}
body.editor-focus #document-workspace{display:grid!important}
.focus-toggle[aria-pressed='true']{background:var(--accent,#25665b);border-color:var(--accent,#25665b);color:#fff}

/* Preview fullscreen (#78). The paged dialog already fills the viewport; give the READING
   surface a quiet measure instead of stretching text edge to edge. */
.paged-preview-dialog .paged-pages{max-width:1000px;margin:0 auto}
.paged-preview-dialog .paged-toolbar{position:sticky;top:0;z-index:6;background:var(--surface,#fff)}
/* ---- Project settings (#79) ------------------------------------------------- */
.settings-section{border:1px solid var(--line,#e4e9e3);border-radius:10px;padding:16px;margin:14px 0}
.settings-section-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;
  flex-wrap:wrap;margin-bottom:12px}
.settings-section-head p{margin:2px 0 0;font-size:.88em}
.settings-groups{display:flex;flex-direction:column}
.settings-group-row{display:flex;align-items:center;justify-content:space-between;gap:14px;
  padding:10px 2px;border-top:1px solid var(--line,#eef1ee)}
.settings-group-row:first-child{border-top:0}
.settings-group-row strong{display:block}
.settings-group-row small{display:block;color:var(--muted,#5c6b62);font-size:.84em;margin-top:2px}
.settings-group-actions{display:flex;gap:6px;flex-shrink:0}
/* ---- Account cluster in the header (#78) ------------------------------------
   Top-right, after the breadcrumb. The account used to live in the sidebar footer, where
   collapsing the nav hid it entirely. */
.topbar{display:flex;align-items:center;gap:16px}
.topbar-crumb{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.account-cluster{display:flex;align-items:center;gap:10px;flex-shrink:0;position:relative}
.account-id{display:flex;align-items:center;gap:8px;background:transparent;border:0;padding:4px 6px;
  border-radius:8px;cursor:pointer;color:inherit;font:inherit}
.account-id:hover{background:var(--tint,#eef2ec)}
.account-avatar{width:28px;height:28px;border-radius:50%;display:inline-flex;align-items:center;
  justify-content:center;background:var(--accent,#25665b);color:#fff;font-size:.78em;font-weight:600;
  overflow:hidden;flex-shrink:0}
.account-avatar img{width:100%;height:100%;object-fit:cover}
.account-avatar.large{width:56px;height:56px;font-size:1.1em}
.account-name{max-width:14ch;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

/* ---- Profile page (#78) ---------------------------------------------------- */
.profile-page{max-width:820px}
.profile-tabs{display:flex;gap:4px;border-bottom:1px solid var(--line,#e4e9e3);margin:18px 0 22px}
.profile-tabs button{background:transparent;border:0;border-bottom:2px solid transparent;
  padding:10px 14px;cursor:pointer;color:var(--muted,#5c6b62);font:inherit;border-radius:0}
.profile-tabs button[aria-selected='true']{color:var(--ink,#22322c);border-bottom-color:var(--accent,#25665b);font-weight:600}
.stat-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:12px;margin-bottom:24px}
.stat{border:1px solid var(--line,#e4e9e3);border-radius:10px;padding:16px}
.stat strong{display:block;font-size:1.7em;line-height:1.1}
.stat span{color:var(--muted,#5c6b62);font-size:.86em}
.profile-list{display:flex;flex-direction:column}
.profile-row{display:flex;justify-content:space-between;gap:12px;padding:10px 2px;
  border-top:1px solid var(--line,#eef1ee)}
.profile-row:first-child{border-top:0}
.profile-row small{color:var(--muted,#5c6b62)}
.profile-form{max-width:440px}
.profile-form h3{margin-top:0}
.avatar-row{display:flex;align-items:center;gap:12px;margin:8px 0}
.avatar-row input[type=file]{max-width:220px}
.profile-page hr{border:0;border-top:1px solid var(--line,#e4e9e3);margin:28px 0}

/* ---- Theme tabs in document settings (#78) --------------------------------- */
.theme-tabs{display:flex;gap:6px;flex-wrap:wrap;margin-top:8px}
.theme-tab{padding:8px 14px;border-radius:999px;border:1px solid var(--line,#d9e0d8);
  background:transparent;cursor:pointer;font:inherit;color:var(--muted,#5c6b62)}
.theme-tab.active{background:var(--accent,#25665b);border-color:var(--accent,#25665b);color:#fff;font-weight:600}
/* ---- Archived documents (#80) ---------------------------------------------- */
.archived-disclosure{margin-top:26px;border:1px solid var(--line,#e4e9e3);border-radius:10px;padding:12px 14px}
.archived-disclosure>summary{cursor:pointer;font-weight:600;display:flex;align-items:center;gap:10px;
  list-style:none}
.archived-disclosure>summary::-webkit-details-marker{display:none}
.archived-disclosure>summary::before{content:'\25B8';display:inline-block;transition:transform .15s;color:var(--muted,#5c6b62)}
.archived-disclosure[open]>summary::before{transform:rotate(90deg)}
.archived-disclosure>p{margin:10px 0 6px;display:flex;align-items:center;gap:10px;flex-wrap:wrap}

/* ---- Archived search page (#80) -------------------------------------------- */
.archived-search{max-width:760px}
.archived-search-field{display:flex;gap:10px;margin:26px 0 14px}
.archived-search-field input{flex:1;font-size:1.05em;padding:12px 16px;border-radius:999px;
  border:1px solid var(--line-strong,#c9d5cb);background:var(--surface,#fff)}
.archived-search-field input:focus{outline:2px solid var(--accent,#25665b);outline-offset:1px}
.archived-search-field button{border-radius:999px;padding:0 22px}
.archived-search .doc-list{border:1px solid var(--line,#e4e9e3);border-radius:10px;overflow:hidden}
/* Sign out is an icon on the heading row (#78). Square hit area so it reads as a control, not
   as a link, and it keeps the row short now that it is the last item. */
.account-exit{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;
  padding:0;border-radius:8px;color:var(--muted,#5c6b62)}
.account-exit:hover{background:var(--tint,#eef2ec);color:var(--ink,#22322c)}
.account-exit svg{display:block}
/* Bell on the heading row (#78). Transparent at rest: a permanently coloured bell is decoration,
   so colour is reserved for "you have unread notifications". */
.account-cluster .notification-bell{display:inline-flex;align-items:center;justify-content:center;
  position:relative;width:32px;height:32px;padding:0;border:0;border-radius:8px;
  background:transparent;color:var(--muted,#5c6b62);cursor:pointer}
.account-cluster .notification-bell:hover{background:var(--tint,#eef2ec);color:var(--ink,#22322c)}
.account-cluster .notification-bell .nav-icon{margin:0;font-size:18px;line-height:1}
/* Unread: the control itself takes the accent, so the change is visible without reading the badge. */
.account-cluster .notification-bell.has-unread{background:var(--accent,#25665b);color:#fff}
.account-cluster .notification-bell.has-unread:hover{filter:brightness(1.08);background:var(--accent,#25665b)}
.account-cluster .notification-bell .count{position:absolute;top:-4px;right:-4px;min-width:17px;height:17px;
  border-radius:9px;background:#c2410c;color:#fff;font-size:13px;font-weight:700;line-height:17px;
  text-align:center;padding:0 4px;border:2px solid var(--surface,#fff)}
.account-cluster .notification-bell .count[hidden]{display:none}
/* ---- Lock indicators (#43) --------------------------------------------------
   Two states, deliberately distinct: LOCKED means the section belongs to a team; FROZEN means the
   document owner has taken it. A reader should know which before clicking in. */
.lock-mark{display:inline-flex;align-items:center;vertical-align:-2px;width:12px;height:12px;
  margin-right:3px;opacity:.75}
.lock-mark svg{width:12px;height:12px;display:block}
/* Any SVG inside a TOC row is a hint glyph, never a hero element. */
.toc-row svg{width:12px;height:12px;flex-shrink:0}
.state-badge{white-space:nowrap}
.state-badge.locked{background:var(--tint,#eef2ec);border:1px solid var(--line,#dde5dc);color:var(--muted,#5c6b62)}
.state-badge.frozen{background:#fdf3e0;border:1px solid #e8cf9a;color:#6b5322}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;
  clip:rect(0,0,0,0);white-space:nowrap;border:0}

/* ---- TOC reordering (#43) ---------------------------------------------------
   The row is the drag handle. Arrows stay small and appear on hover/focus so they do not compete
   with the title, but they remain reachable by keyboard. */
.toc-row{display:flex;align-items:stretch;gap:2px;border-radius:8px}
.toc-row .section{flex:1;min-width:0}
.toc-row.dragging{opacity:.45}
.toc-row.drop-target{outline:2px dashed var(--accent,#25665b);outline-offset:-2px}
.toc-arrow{font-size:11px;line-height:1;padding:3px 4px;min-height:0;background:transparent;
  border:1px solid transparent;border-radius:4px;color:var(--muted,#5c6b62);cursor:pointer;opacity:.5}
.toc-row:hover 
/* ---- Locked editor: toolbar stays, input does not (#43) ---------------------- */
.rich-editor.is-locked .editor-canvas{cursor:default;opacity:.92}
.rich-editor.is-locked .editor-canvas .ProseMirror{caret-color:transparent}
/* The formatting controls look present but cannot act; the reason is in the section notice. */
.rich-editor.is-locked .format-toolbar button,
.rich-editor.is-locked .format-toolbar select{opacity:.5;pointer-events:none}
/* ---- Compact ownership bar (#43) --------------------------------------------
   One thin row. All prose moved to hover titles -- a sentence under every control pushed the
   editor down the pane, which is the thing being fixed here. */
.own-bar{display:flex;align-items:center;gap:4px;margin:2px 0 8px;min-height:28px}
.own-btn{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;
  padding:0;font-size:16px;line-height:1;border-radius:6px;background:transparent;
  border:1px solid transparent;color:var(--muted,#5c6b62);cursor:pointer}
.own-btn:hover{background:var(--tint,#eef2ec);border-color:var(--line,#dde5dc);color:var(--ink,#22322c)}
.own-btn.danger:hover{background:#fdf2f1;border-color:#e3b4b0;color:#b3261e}
.own-state{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;
  font-size:16px;border-radius:6px;cursor:help}
.own-state.locked{background:var(--tint,#eef2ec);border:1px solid var(--line,#dde5dc)}
.own-state.frozen{background:#fdf3e0;border:1px solid #e8cf9a}
/* The audit count is a number, not a paragraph. */
.own-bar .lock-audit{position:relative}
.own-bar .lock-audit summary{cursor:pointer;list-style:none;font-size:13px;color:var(--muted,#5c6b62);
  padding:2px 6px;border-radius:999px;background:var(--tint,#eef2ec)}
.own-bar .lock-audit summary::-webkit-details-marker{display:none}
.own-bar .lock-audit ul{position:absolute;z-index:20;top:130%;left:0;min-width:260px;max-width:340px;
  margin:0;padding:10px 10px 10px 22px;list-style:disc;background:var(--surface,#fff);
  border:1px solid var(--line,#dde5dc);border-radius:10px;box-shadow:0 8px 24px rgba(0,0,0,.12);
  font-size:.84em;line-height:1.5}
/* Tighten the editor block above the canvas so the writing surface starts higher. */
.panel.editor>.panel-header{margin-bottom:2px}
.panel.editor .notice{margin:6px 0 8px;padding:7px 10px;font-size:.86em}
/* ---- Outline icons, larger (#78) --------------------------------------------
   Emoji cannot be outlined, so every control glyph is now a stroked SVG sized here. Bumping a
   number in this block scales the whole set. */
.account-cluster svg,.notification-bell svg{width:24px;height:24px;stroke-width:1.7}
.account-exit{width:36px;height:36px}
.account-exit svg{width:20px;height:20px}
.account-avatar{width:32px;height:32px;font-size:.82em}
.own-btn{width:34px;height:34px}
.own-btn svg{width:18px;height:18px;stroke-width:1.8}
.own-state{width:30px;height:30px}
.own-state svg{width:17px;height:17px}
.notification-bell{width:36px;height:36px}
.notification-bell .count{min-width:19px;height:19px;line-height:19px;font-size:13px}
/* The notification bell keeps its transparent-at-rest rule from the earlier block. */
.account-cluster .notification-bell.has-unread{background:var(--accent,#25665b)}
/* Tabs and zoom controls take the same treatment so the row reads as one set. */
[data-account-bell] svg{width:24px;height:24px}
.app-zoom-controls svg{width:24px;height:24px}
/* Ownership controls sit IN the actions row, vertically centred with the save buttons (#43).
   They are grouped tightly so they read as a secondary cluster rather than five more primaries. */
.actions-own{display:inline-flex;align-items:center;gap:3px;margin-left:auto;
  padding-left:10px;border-left:1px solid var(--line,#e4e9e3)}
.actions-own .own-btn{width:38px;height:38px}
.actions-own .own-btn svg{width:21px;height:21px;stroke-width:1.75}
.actions-own .lock-audit{position:relative}
.actions-own .lock-audit summary{font-size:13px;padding:2px 6px;border-radius:999px;
  background:var(--tint,#eef2ec);color:var(--muted,#5c6b62);cursor:pointer;list-style:none}
.actions-own .lock-audit summary::-webkit-details-marker{display:none}
.actions-own .lock-audit ul{position:absolute;z-index:20;bottom:130%;left:0;min-width:260px;
  max-width:340px;margin:0;padding:10px 10px 10px 22px;list-style:disc;background:var(--surface,#fff);
  border:1px solid var(--line,#dde5dc);border-radius:10px;box-shadow:0 8px 24px rgba(0,0,0,.12);
  font-size:.84em;line-height:1.5}
/* The actions row wraps gracefully when the pane is narrow instead of overflowing. */
.panel.editor .actions{display:flex;flex-wrap:wrap;align-items:center;gap:6px}
/* ---- In-place section title (#43) -------------------------------------------
   The heading is the control. A pencil on hover says so without adding a button to the toolbar. */
.editable-title{cursor:text;display:flex;align-items:center;gap:8px;border-radius:6px;
  padding:2px 6px;margin-left:-6px}
.editable-title:hover{background:var(--tint,#eef2ec)}
.title-text{min-width:0;overflow:hidden;text-overflow:ellipsis}
.title-pencil{display:inline-flex;opacity:0;transition:opacity .12s;color:var(--muted,#5c6b62)}
.title-pencil svg{width:15px;height:15px}
.editable-title:hover .title-pencil,.editable-title:focus-within .title-pencil{opacity:.9}
.title-input{font:inherit;font-weight:inherit;color:inherit;width:100%;min-width:180px;
  padding:2px 6px;border:1px solid var(--accent,#25665b);border-radius:6px;background:var(--surface,#fff)}
.title-input:focus{outline:2px solid var(--accent,#25665b);outline-offset:1px}
/* ---- Account dropdown (#78) -------------------------------------------------
   The heading row is down to a single avatar. Identity and the two destinations live here. */
.account-cluster{position:relative}
.account-avatar-only{padding:3px;border-radius:50%}
.account-avatar-only:hover{background:var(--tint,#eef2ec)}
.account-menu{position:absolute;top:calc(100% + 8px);right:0;z-index:60;min-width:230px;
  background:var(--surface,#fff);border:1px solid var(--line,#dde5dc);border-radius:12px;
  box-shadow:0 12px 32px rgba(0,0,0,.14);padding:6px;overflow:hidden}
.account-menu[hidden]{display:none}
.account-menu-id{padding:10px 12px 12px;border-bottom:1px solid var(--line,#eef1ee);margin-bottom:4px}
.account-menu-id strong{display:block;font-size:.98em}
.account-menu-id small{display:block;color:var(--muted,#5c6b62);font-size:.82em;margin-top:2px;
  overflow:hidden;text-overflow:ellipsis}
.account-role{display:inline-block;margin-top:6px;font-size:.72em;letter-spacing:.02em;
  text-transform:uppercase;color:var(--accent,#25665b);background:var(--tint,#eef2ec);
  border-radius:999px;padding:2px 8px}
.account-menu-item{display:flex;align-items:center;gap:10px;width:100%;padding:10px 12px;
  background:transparent;border:0;border-radius:8px;font:inherit;color:inherit;cursor:pointer;
  text-align:left}
.account-menu-item:hover{background:var(--tint,#eef2ec)}
.account-menu-item svg{width:17px;height:17px;flex-shrink:0;color:var(--muted,#5c6b62)}
/* ---- Section header (#43) ----------------------------------------------------
   Facts about the section (who it is assigned to, whether it is locked) sit beside the title they
   describe; the master version is metadata about the whole section, so it pins right. */
.panel.editor>.panel-header{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-bottom:0}
/* The action cluster must sit on the title's baseline, so it loses the generic row margin. */
.panel.editor>.panel-header>.actions{margin-top:0;align-items:center}
.section-head-main{min-width:0;flex:1 1 auto}
.title-line{display:flex;align-items:center;gap:8px;flex-wrap:wrap;min-width:0}
.title-line h2{margin:0;min-width:0}
.assigned-slot{display:inline-flex;align-items:center;flex-shrink:0}
.assigned-chip{display:inline-flex;align-items:center;gap:5px;font:inherit;font-size:.72em;
  line-height:1.5;letter-spacing:.01em;text-transform:none;padding:3px 10px;border-radius:999px;
  border:1px solid var(--line,#dde5dc);background:var(--tint,#eef2ec);color:var(--ink,#2e3a33);
  cursor:pointer;white-space:nowrap;max-width:220px;overflow:hidden;text-overflow:ellipsis}
button.assigned-chip:hover{border-color:var(--accent,#25665b);background:var(--surface,#fff)}
.assigned-chip.unassigned{color:var(--muted,#5c6b62);border-style:dashed;background:transparent}
span.assigned-chip{cursor:default}
.master-badge{margin-left:0;flex-shrink:0;align-self:center}
/* Lock and read-only are hints at badge scale, not toolbar buttons. */
.state-badge{display:inline-flex;align-items:center;gap:4px;font-size:.7em;text-transform:uppercase;
  letter-spacing:.03em;padding:2px 8px}
.state-badge svg{width:11px;height:11px;flex-shrink:0}
.state-badge .state-text{line-height:1}
@media (max-width:900px){
  .title-line{row-gap:4px}
  .master-badge{margin-left:0}
}
/* Page-break checkbox sits inside the actions row (#43). It is a property of how this section
   starts, so it belongs with the save actions rather than on a prose row of its own. */
.inline-check{display:inline-flex;align-items:center;gap:6px;font-size:.86em;
  color:var(--muted,#5c6b62);cursor:pointer;white-space:nowrap;user-select:none}
.inline-check input{margin:0;cursor:pointer}
.inline-check input:disabled{cursor:not-allowed}
.readonly-pbreak{margin:10px 0 4px;padding-top:8px;border-top:1px solid var(--line,#eef1ee)}

/* ---- Let the editor fill the height it has (#43) ----------------------------
   The editor was capped part-way down the page, so a long section scrolled inside a short box and
   left dead space below. The workspace column owns the height; the editor grows into it and only
   scrolls when the content genuinely exceeds the viewport. */
.workspace{align-items:stretch}
.panel.editor{display:flex;flex-direction:column;min-height:0;height:100%}
.panel.editor>#content,.panel.editor>.rich-content{flex:1 1 auto;min-height:0;overflow:auto}
/* The reading pane in read-only mode gets the same treatment. */
.panel.editor>.readonly-content{flex:1 1 auto;min-height:0;overflow:auto}
/* ---- Dark-theme controls (themes) ------------------------------------------
   The save buttons used literals, which the remap layer in theme-dark.css cannot see. They read
   from variables now so both themes can reach them.

   The colour pickers are native <input type="color">: the browser paints them from the SYSTEM
   palette unless color-scheme is declared, which is why they rendered as light chips on a dark
   toolbar and opened a light picker. */
:root[data-theme="midnight"]{color-scheme:dark;
  --save-bg:var(--dox-raised,#243046);
  --save-line:var(--dox-line,#3a4a63);
  --save-ink:var(--dox-ink,#dfe7f2);
  --save2-bg:var(--dox-raised,#2b3a52);
  --save2-line:var(--dox-line,#43536d);
  --save2-ink:var(--dox-ink,#dfe7f2);
}
/* The swatch itself, so the chip belongs to the toolbar rather than glowing white. */
.format-toolbar input[type="color"]{width:30px;height:30px;padding:2px;border-radius:6px;
  background:var(--tint,#eef2ec);border:1px solid var(--line,#dde5dc);cursor:pointer}
.format-toolbar input[type="color"]::-webkit-color-swatch-wrapper{padding:0}
.format-toolbar input[type="color"]::-webkit-color-swatch{border:0;border-radius:4px}
.format-toolbar input[type="color"]::-moz-color-swatch{border:0;border-radius:4px}
:root[data-theme="midnight"] .format-toolbar input[type="color"]{
  background:var(--dox-raised,#243046);border-color:var(--dox-line,#3a4a63)}
/* ---- Theme tokens the toolbar controls need (themes) ------------------------
   --tint/--line/--ink were referenced throughout style.css but never defined anywhere, so every
   use silently fell back to its light literal. Defined here for the dark theme so the save
   buttons and the colour chips follow the theme instead of glowing white on it.

   Scoped to midnight only: the light themes already look correct through the fallbacks, and
   defining these globally would change them, which is not what this is fixing. */
:root[data-theme="midnight"]{
  --tint:var(--dox-accent-tint,#2a3344);
  --line:var(--dox-line-warm,#3a4557);
  --line-strong:var(--dox-line-stronger,#4a5669);
  --ink:var(--dox-ink,#e8edf7);
  --muted:var(--dox-muted,#9aa7ba);
}
/* The chip itself: border, fill and the A/label glyph all follow the theme. */
.color-control{background:var(--tint,#ffffff);border-color:var(--line,#d5dfda);
  color:var(--ink,#22322c)}
.color-control input[type="color"]{border:0;background:transparent}
/* Keep the swatch's own colour — that IS the value — but not its frame. */
.color-control input[type="color"]::-webkit-color-swatch-wrapper{padding:0}
.color-control input[type="color"]::-webkit-color-swatch{border:0;border-radius:3px}
.color-control input[type="color"]::-moz-color-swatch{border:0;border-radius:3px}
/* ---- Section settings panel (#84) -------------------------------------------
   Slides in from the right edge of the EDITOR column, not the viewport: it is about this section,
   and anchoring it to the window would put it over the table of contents. Transform-based, so it
   never intercepts clicks outside itself the way an open <dialog> does. */
.section-settings-panel{position:absolute;top:0;right:0;bottom:0;width:544px;max-width:100%;z-index:30;
  /* clip-path keeps the closed panel out of layout overflow: translateX(101%) moved it
     off-screen but the editor's overflow-x:auto still counted its width, which produced a
     horizontal scrollbar with no visible content to scroll to. */
  clip-path:inset(0 0 0 0);
  display:flex;flex-direction:column;
  background:var(--card,#fff);border-left:1px solid var(--line,#dde5dc);
  box-shadow:-8px 0 28px rgba(0,0,0,.10);
  transform:translateX(101%);visibility:hidden;
  transition:transform .22s ease,visibility .22s;
  overflow:hidden}
.section-settings-panel.open{transform:translateX(0);visibility:visible}
.panel.editor{position:relative;overflow-x:clip}

.ssp-head{display:flex;align-items:flex-start;justify-content:space-between;gap:8px;
  padding:14px 16px;border-bottom:1px solid var(--line,#eef1ee)}
.ssp-head h3{margin:2px 0 0;font-size:1.02em}
.ssp-close{background:transparent;border:0;color:var(--muted,#5c6b62);cursor:pointer;
  padding:4px;border-radius:6px;display:inline-flex}
.ssp-close:hover{background:var(--tint,#eef2ec);color:var(--ink,#22322c)}
.ssp-close svg{width:18px;height:18px}
.ssp-body{flex:1 1 auto;overflow:auto;padding:6px 0 16px}

.ssp-group{padding:10px 16px 4px}
.ssp-group+.ssp-group{border-top:1px solid var(--line,#eef1ee);margin-top:6px;padding-top:12px}
.ssp-title{font-size:.68em;letter-spacing:.06em;text-transform:uppercase;
  color:var(--muted,#5c6b62);margin-bottom:8px}

/* One row per control: icon, label + description, control at the trailing edge. */
.ssp-row{display:flex;align-items:center;gap:10px;width:100%;padding:9px 6px;border-radius:8px;
  background:transparent;border:0;font:inherit;color:inherit;text-align:left;cursor:pointer}
.ssp-row:hover{background:var(--tint,#eef2ec)}
.ssp-icon{display:inline-flex;flex:0 0 auto;color:var(--muted,#5c6b62)}
.ssp-icon svg{width:17px;height:17px}
.ssp-text{flex:1 1 auto;min-width:0}
.ssp-text strong{display:block;font-size:.9em;font-weight:600;line-height:1.35}
.ssp-text small{display:block;color:var(--muted,#5c6b62);font-size:.74em;line-height:1.4;
  margin-top:1px}
.ssp-row input[type="checkbox"]{flex:0 0 auto;margin:0;cursor:pointer}
.ssp-row input[type="checkbox"]:disabled{cursor:not-allowed}
.ssp-empty{font-size:.82em;padding:2px 0 8px}

/* The relocated ownership buttons become full-width labelled rows. */
.ssp-group .own-btn{display:flex;align-items:center;gap:10px;width:100%;justify-content:flex-start;
  min-height:0;padding:9px 6px;border:0;border-radius:8px;background:transparent;
  font:inherit;color:inherit;text-align:left}
.ssp-group .own-btn:hover{background:var(--tint,#eef2ec)}
.ssp-group .own-btn svg{width:17px;height:17px;color:var(--muted,#5c6b62);flex:0 0 auto}
.ssp-group .own-btn span{font-size:.9em}
.ssp-group .own-btn.danger{color:#b3261e}
.ssp-group .own-btn.danger svg{color:#b3261e}
.ssp-group .own-btn.danger:hover{background:#fdf2f1}
/* Audit trail reads as a disclosure, not a button. */
.ssp-group .lock-audit summary{font-size:.78em;color:var(--muted,#5c6b62);cursor:pointer;
  padding:4px 0;list-style:none}
.ssp-group .lock-audit summary::-webkit-details-marker{display:none}
.ssp-group .lock-audit ul{margin:4px 0 0;padding-left:18px;font-size:.76em;line-height:1.5;
  color:var(--muted,#5c6b62)}

/* Dark theme: the panel is chrome, so it follows the surface tokens midnight defines. */
:root[data-theme="midnight"] .section-settings-panel{background:var(--dox-card,#1f2534);
  border-left-color:var(--dox-line-warm,#3a4557)}
:root[data-theme="midnight"] .ssp-row:hover,
:root[data-theme="midnight"] .ssp-group .own-btn:hover{background:var(--dox-accent-tint,#2a3344)}
:root[data-theme="midnight"] .ssp-group .own-btn.danger{color:#ff9d97}
:root[data-theme="midnight"] .ssp-group .own-btn.danger svg{color:#ff9d97}
:root[data-theme="midnight"] .ssp-group .own-btn.danger:hover{background:#3a2530}

@media (max-width:1100px){
  .section-settings-panel{width:min(544px,92vw)}
}
/* The primary action is pinned to the right edge of the row in its own right (#84). It used to
   inherit that position from the ownership cluster's margin-left:auto, so moving the cluster into
   the panel would have left Push sitting next to the save buttons. */
.panel.editor .actions #merge,
.panel.editor .actions #push{margin-left:auto}

/* ---- Panel tabs (#84) ------------------------------------------------------ */
.ssp-tabs{display:flex;gap:2px;padding:0 12px;border-bottom:1px solid var(--line,#eef1ee)}
.ssp-tab{background:transparent;border:0;border-radius:0;border-bottom:2px solid transparent;font:inherit;
  font-size:.86em;color:var(--muted,#5c6b62);padding:9px 10px;cursor:pointer;margin-bottom:-1px}
.ssp-tab:hover{color:var(--ink,#22322c)}
.ssp-tab.active{color:var(--accent,#25665b);border-bottom-color:var(--accent,#25665b);font-weight:600}
.ssp-pane{padding-top:2px}
.ssp-pane[hidden]{display:none}

/* Ownership trail as a proper list, newest first. */
.ssp-history{list-style:none;margin:0;padding:4px 0}
.ssp-history li{padding:9px 6px;border-bottom:1px solid var(--line,#eef1ee)}
.ssp-history li:last-child{border-bottom:0}
.ssp-hist-action{font-size:.86em;font-weight:600;line-height:1.35}
.ssp-hist-meta{font-size:.74em;color:var(--muted,#5c6b62);margin-top:2px}
.ssp-hist-reason{font-size:.78em;color:var(--ink,#22322c);margin-top:4px;font-style:italic;
  opacity:.85}
:root[data-theme="midnight"] .ssp-tab.active{color:var(--dox-accent,#7fb2ff);
  border-bottom-color:var(--dox-accent,#7fb2ff)}
:root[data-theme="midnight"] .ssp-tab:hover{color:var(--dox-ink,#e8edf7)}
:root[data-theme="midnight"] .ssp-history li{border-bottom-color:var(--dox-line-warm,#3a4557)}
:root[data-theme="midnight"] .ssp-hist-reason{color:var(--dox-ink,#e8edf7)}

/* ---- TOC rows answer the pointer (#84) -------------------------------------
   Only the move arrows had any hover state, so the rail -- the main navigation on this screen --
   felt inert. The tint is deliberately faint: a hover here must not compete with the active row. */
.toc-row{border-radius:8px;transition:background-color .12s ease}
.toc-row:hover{background:var(--row-hover,#eaefe9)}
.toc-row .section{transition:color .12s ease}
.toc-row:hover .section:not(.active){color:var(--ink,#22322c)}
.toc-row:hover .section small{opacity:1}
.toc-row .section small{opacity:.82;transition:opacity .12s ease}
/* The active row keeps its own treatment; hover must not overwrite it. */
.toc-row.active:hover{background:var(--row-hover-active,#dceee9)}
:root[data-theme="midnight"] 
:root[data-theme="midnight"] 
/* ---- Panel containment (#84, #85) -----------------------------------------
   The editor column must clip the panel, or a 320px panel anchored to `right:0` inside a narrower
   column escapes the viewport and produces a horizontal scrollbar. `overflow:hidden` on the editor
   would clip the editor's own toolbar menus, so the panel is clamped instead: it can never be wider
   than its column and never reach past its right edge. */
.panel.editor{overflow-x:clip}
.section-settings-panel{max-width:100%;box-sizing:border-box}

/* Rows size to their content. `align-items:center` plus a flex child with no basis let the
   page-break row grow to the panel's full height (measured 278px for one line of text). */
.ssp-row,.ssp-group .own-btn{align-items:flex-start;height:auto;min-height:0}
.ssp-row{align-self:flex-start}
.ssp-row .ssp-text strong{display:block}
.ssp-row input[type="checkbox"]{align-self:center;margin-top:1px}

/* The panel body scrolls, not each row. */
.ssp-body{overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain}
/* ---- People page tabs (#86) -------------------------------------------------
   Groups, members and access are three questions, not one list. Each tab carries a count so an
   empty group is visible without opening it. */
.people-tabs{display:flex;gap:4px;margin:14px 0 16px;border-bottom:1px solid var(--line,#eef1ee)}
.people-tab{background:transparent;border:0;border-bottom:2px solid transparent;font:inherit;
  font-size:.9em;color:var(--muted,#5c6b62);padding:9px 12px;cursor:pointer;margin-bottom:-1px;
  display:inline-flex;align-items:center;gap:7px}
.people-tab:hover{color:var(--ink,#22322c);background:var(--tint,#eef2ec)}
.people-tab.active{color:var(--accent,#25665b);border-bottom-color:var(--accent,#25665b);font-weight:600}
.people-tab-count{font-size:.78em;font-weight:600;min-width:18px;height:18px;line-height:18px;
  text-align:center;border-radius:999px;background:var(--tint,#eef2ec);color:var(--muted,#5c6b62);
  padding:0 5px}
.people-tab.active .people-tab-count{background:var(--accent,#25665b);color:#fff}
.people-pane[hidden]{display:none}
/* Panes replace the headings those blocks used to carry, so drop the doubled top margin. */
.people-pane>h3:first-child,.people-pane>div:first-child>h3:first-child{margin-top:0}

:root[data-theme="midnight"] .people-tab.active{color:var(--dox-accent,#7fb2ff);
  border-bottom-color:var(--dox-accent,#7fb2ff)}
:root[data-theme="midnight"] .people-tab:hover{color:var(--dox-ink,#e8edf7);
  background:var(--dox-accent-tint,#2a3344)}
:root[data-theme="midnight"] .people-tab.active .people-tab-count{background:var(--dox-accent,#7fb2ff);
  color:#11161f}
:root[data-theme="midnight"] .people-tab-count{background:var(--dox-accent-tint,#2a3344);
  color:var(--dox-muted,#9aa7ba)}
/* ---- Settings button glyph and checkbox sizing (#84, #85) -------------------
   The button's SVG had no size rule, so it rendered at its viewBox size (99px) inside a 38px row
   and the button measured 138px tall against 38px neighbours.

   Checkboxes inherit `width:100%` from the global `input,textarea,select` rule, so each one
   claimed 275px of a 320px panel and squeezed its own label to zero width -- the "narrow column of
   wrapping words" was the label being crushed by its own checkbox. */
#section-settings svg{width:16px;height:16px;flex:0 0 auto}
#section-settings{display:inline-flex;align-items:center;gap:7px}
#section-settings span{white-space:nowrap}

.ssp-row input[type="checkbox"],
.ssp-group input[type="checkbox"],
.section-settings-panel input[type="checkbox"]{
  width:auto;min-width:0;flex:0 0 auto;padding:0;border-radius:3px;
  margin:0;accent-color:var(--accent,#25665b)}

/* The label takes the room; the checkbox only takes what it needs. */
.ssp-row .ssp-text{flex:1 1 auto;min-width:0}
.ssp-row{flex-wrap:nowrap}
/* ---- TOC row hover, per theme (#85) ----------------------------------------
   A hover tint means "slightly raised", which on a light surface is a touch darker and on a dark
   surface a touch lighter. That is the opposite direction in each theme, so it cannot come from a
   single accent token -- and midnight's --dox-accent-tint is #1b2436, effectively the surface
   itself, which is why hovering a TOC row looked like nothing happened.

   Defaults are the light direction; midnight overrides with a lift. */
/* #eaefe9 and #dceee9 are green-greys: they were correct for teal and stayed green under
   cobalt, which is why the TOC row hover looked teal. Each theme now derives the hover from
   its own accent over its own ground. midnight keeps its lift. */
:root{--row-hover:#eef2fb;--row-hover-active:#dfe7f8}
:root[data-theme="teal"]{--row-hover:#eaefe9;--row-hover-active:#dceee9}
:root[data-theme="citrus"]{--row-hover:#fbf0e6;--row-hover-active:#f7e2cf}
:root[data-theme="midnight"]{--row-hover:#232c3d;--row-hover-active:#2b3648}
/* Keep the hover readable against the rail rather than the page. */
.toc-row:hover{background:var(--row-hover)}
.toc-row.active:hover{background:var(--row-hover-active)}
/* ---- Action row glyphs (#84) -----------------------------------------------
   Every icon in this row was a bare <svg>, which renders at its viewBox size (77px for Focus mode,
   99px for the settings gear) inside a 38px row. Applying the size as a blanket rule rather than
   per-button is deliberate: patching them one at a time is how the settings gear and then Focus
   mode were each missed in turn. */
.panel.editor .actions svg{width:16px;height:16px;flex:0 0 auto}
.panel.editor .actions button{display:inline-flex;align-items:center;gap:7px;
  min-height:36px;height:auto;max-height:40px}
.panel.editor .actions button>span{white-space:nowrap}

/* ---- Actions ride on the title line (#84) ----------------------------------
   The row sat below the header, so it pushed the editor down a whole band for two buttons. It now
   sits on the same line as the section title, floated right: facts left, actions right. */
.panel.editor>.panel-header{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.panel.editor>.panel-header>.actions{margin-left:auto;flex:0 1 auto;align-self:center;
  padding:0;border:0;background:transparent}
.panel.editor>.panel-header>.actions-wrap{margin-left:auto}
@media (max-width:1200px){
  /* Below this width the two groups cannot share a line without colliding, so actions wrap
     beneath the title rather than compressing the title into a sliver. */
  .panel.editor>.panel-header>.actions{margin-left:0;width:100%}
}
/* ---- Header breathing room (#84) -------------------------------------------
   Measured: header ended at y=223 and the editor host started immediately below, so the action row
   was flush against the first line of text. The row itself also wrapped to a second line at 1600px,
   which is why the buttons sat BELOW the title rather than beside it -- the facts and the actions
   together are simply wider than the column.

   The header now keeps the row on one line where it fits and, where it must wrap, keeps a clear
   gap so the buttons never touch the editor. */
.panel.editor>.panel-header{padding-bottom:12px;border-bottom:1px solid var(--line,#eef1ee);
  margin-bottom:14px;row-gap:10px}
.panel.editor>.panel-header>.actions{margin-left:auto;gap:9px}
/* The action row must not stretch the header taller than it needs. */
.panel.editor>.panel-header>.actions button{white-space:nowrap}
@media (max-width:1500px){
  /* Actions wrap under the title here rather than compressing the title into a sliver. */
  .panel.editor>.panel-header>.actions{margin-left:0;width:100%;justify-content:flex-end}
}
/* Gear-only settings control (#84). The cog is understood without a label, and the word cost 88px
   of a row that also has to fit five other buttons beside a title. */
#section-settings{width:47px;min-width:47px;padding:0;justify-content:center;gap:0}
#section-settings svg{width:27px;height:27px}
/* The chat toggle is a peer of the four buttons either side of it, but had no rule of its own
   and fell back to the generic subtle-button box (38x36, 16px glyph) -- visibly smaller than
   the row it sits in. */
#chat-toggle{width:50px;min-width:50px;padding:0;justify-content:center;gap:0}
#chat-toggle svg{width:27px;height:27px}
#chat-toggle{color:var(--dox-muted)}
#chat-toggle[data-unread="1"]{color:var(--dox-accent)}
#section-settings:hover{background:var(--tint,#eef2ec)}
/* Save actions as icons (#84). Two verbs on one noun; the floppy is understood and the tag on it
   says "with a label". Titles and aria-labels carry the words. */
#save-draft,#save-labeled-draft{width:50px;min-width:50px;padding:0;justify-content:center;gap:0}
#save-draft svg,#save-labeled-draft svg{width:27px;height:27px}
/* Focus mode matches the save actions: square icon button, word in the title (#84). */
#section-focus{width:50px;min-width:50px;padding:0;justify-content:center;gap:0}
#section-focus svg{width:27px;height:27px}
/* ---- Ownership history: newest first, latest badged (#84) -------------------
   On a contested section "who has it now" is the entire question, and it should not require
   reading timestamps to answer. */
.ssp-history li.ssp-latest{background:var(--tint,#eef2ec);border-radius:8px;
  padding-left:10px;margin-bottom:2px}
.ssp-badge-latest{display:inline-block;margin-left:8px;font-size:.66em;letter-spacing:.05em;
  text-transform:uppercase;font-weight:700;color:#fff;background:var(--accent,#25665b);
  border-radius:999px;padding:1px 7px;vertical-align:1px}
.ssp-hist-action{display:flex;align-items:center;flex-wrap:wrap}
:root[data-theme="midnight"] .ssp-history li.ssp-latest{background:var(--dox-accent-tint,#243046)}
:root[data-theme="midnight"] .ssp-badge-latest{background:var(--dox-accent,#7fb2ff);color:#11161f}
/* ---- Project-level pages (#88) --------------------------------------------- */
#page>.heading{gap:16px}
#page>.page-body{display:flex;flex-direction:column;gap:16px;padding:0 24px 40px}
#page>.page-body>section.panel{padding:18px 20px}
/* Tabs are square, like the document tab control (#88). No rounded corners on the strip or the
   buttons -- a radius made the project settings tabs read as pills rather than tabs. */
.people-tab,.people-tabs{border-radius:0}
.people-tab{border-radius:0}
/* ---- Settings sub-navigation reads as tabs (themes, #88) --------------------
   Document settings and Cover design switch like tabs but were rendered as bordered pills with a
   7px radius, so the same idea wore two shapes across the app. Now they match the tab control used
   everywhere else: no border, no radius, an underline on the active item.

   Scoped to .settings-subnav so the designer palette's own buttons keep their pill styling. */
.settings-subnav{display:flex;gap:2px;margin:0 0 18px;border-bottom:1px solid var(--line,#eef1ee);
  padding:0;background:transparent}
.settings-subnav button{background:transparent;border:0;border-bottom:2px solid transparent;
  border-radius:0;font:inherit;font-size:.9em;color:var(--muted,#5c6b62);padding:9px 14px;
  margin-bottom:-1px;cursor:pointer;box-shadow:none}
.settings-subnav button:hover{color:var(--ink,#22322c);background:var(--tint,#eef2ec)}
.settings-subnav button.active{background:transparent;border-bottom-color:var(--accent,#25665b);
  color:var(--accent,#25665b);font-weight:600}
:root[data-theme="midnight"] .settings-subnav button.active{
  color:var(--dox-accent,#7fb2ff);border-bottom-color:var(--dox-accent,#7fb2ff)}
:root[data-theme="midnight"] .settings-subnav button:hover{
  color:var(--dox-ink,#e8edf7);background:var(--dox-accent-tint,#2a3344)}
:root[data-theme="midnight"] .settings-subnav{border-bottom-color:var(--dox-line-warm,#3a4557)}
/* ---- Topbar breadcrumb (#90) -----------------------------------------------
   Was flat text; now each segment navigates. Quiet by default so it does not compete with the
   document title, but obviously interactive on hover. */
.topbar-crumb{display:flex;align-items:center;gap:7px;min-width:0;font-size:16px;
  color:var(--muted,#5c6b62)}
.topbar-crumb .crumb{background:transparent;border:0;padding:3px 6px;margin:0;border-radius:5px;
  font:inherit;color:inherit;cursor:pointer;white-space:nowrap;max-width:240px;overflow:hidden;
  text-overflow:ellipsis}
.topbar-crumb .crumb:hover{background:var(--tint,#eef2ec);color:var(--ink,#22332f);text-decoration:underline}
.topbar-crumb .crumb:focus-visible{outline:2px solid var(--accent,#25665b);outline-offset:2px}
.topbar-crumb .crumb-sep{color:var(--muted,#8b9a92);user-select:none}
.topbar-crumb .crumb-current{font-weight:600;color:var(--ink,#22332f);white-space:nowrap;
  overflow:hidden;text-overflow:ellipsis}
:root[data-theme="midnight"] .topbar-crumb .crumb:hover{
  background:var(--dox-accent-tint,#2a3344);color:var(--dox-ink,#e8edf7)}
:root[data-theme="midnight"] .topbar-crumb .crumb-current{color:var(--dox-ink,#e8edf7)}
/* ---- Invite tab (#91) ------------------------------------------------------ */
.invite-tab{display:flex;flex-direction:column;gap:20px;max-width:640px}
.invite-form-wrap h3{margin:0 0 4px}
.invite-form-wrap .muted{margin:0 0 14px;font-size:.88em}
.invite-form-wrap label{display:block;margin-top:12px;font-size:.84em;color:var(--muted,#5c6b62)}
.invite-form-wrap input,.invite-form-wrap select,.invite-form-wrap textarea{margin-top:4px}
.invite-tab .invite-result{border:1px solid var(--line,#dde5dc);border-radius:10px;
  padding:14px 16px;background:var(--tint,#f4f7f4)}
.invite-tab .invite-result p:first-child{margin-top:0}
.invite-tab .invite-qr{margin-top:12px}
.invite-tab .invite-qr img{display:block;border-radius:8px;background:#fff;padding:8px}
.invite-row{display:flex;align-items:center;justify-content:space-between;gap:12px;
  padding:10px 2px;border-bottom:1px solid var(--line,#eef1ee)}
.invite-row:last-child{border-bottom:0}
:root[data-theme="midnight"] .invite-tab .invite-result{
  background:var(--dox-accent-tint,#243046);border-color:var(--dox-line-warm,#3a4557)}
:root[data-theme="midnight"] .invite-row{border-bottom-color:var(--dox-line-warm,#3a4557)}
/* ---- Organisations tab and member profiles (#93) --------------------------- */
.orgs-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:14px}
.orgs-head h3{margin:0 0 4px}
.orgs-head .muted{margin:0;font-size:.88em;max-width:46ch}
.org-row{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;
  padding:12px 2px;border-bottom:1px solid var(--line,#eef1ee)}
.org-row:last-child{border-bottom:0}
.org-row small{color:var(--muted,#5c6b62)}
.org-actions{display:flex;gap:6px;flex-shrink:0}
.org-form,.member-profile{border:1px solid var(--line,#dde5dc);border-radius:10px;
  padding:16px 18px;margin-top:16px;background:var(--tint,#f4f7f4)}
.org-form h3,.member-profile h3{margin:0 0 4px}
.org-form label,.member-profile label{display:block;margin-top:10px;font-size:.84em;color:var(--muted,#5c6b62)}
.org-form input,.org-form select,.org-form textarea,
.member-profile input,.member-profile select{margin-top:4px;width:100%}
.member-row{display:block;width:100%;text-align:left;padding:10px 2px;border:0;
  border-bottom:1px solid var(--line,#eef1ee);background:none;cursor:pointer}
.member-row:hover{background:var(--row-hover,#f2f5f2)}
.member-row small{color:var(--muted,#5c6b62)}
:root[data-theme="midnight"] .org-row,:root[data-theme="midnight"] .member-row{
  border-bottom-color:var(--dox-line-warm,#3a4557)}
:root[data-theme="midnight"] .org-form, :root[data-theme="midnight"] .member-profile{
  background:var(--dox-accent-tint,#243046);border-color:var(--dox-line-warm,#3a4557)}
:root[data-theme="midnight"] .member-row:hover{background:var(--row-hover,#232c3d)}
/* ---- Project settings: left rail + card (frontend#95) ------------------------------- */
.ps-card{background:var(--card,#fff);border:1px solid var(--line,#e3e8ec);border-radius:10px;
  padding:26px 28px 30px;box-shadow:0 1px 2px rgba(16,24,40,.05)}
.ps-card-plain{padding:20px 22px}
.ps-card-intro{margin:0 0 20px;font-size:16px}
.ps-field{margin-bottom:20px}
.ps-field label{display:block;font-size:17px;font-weight:600;margin-bottom:6px;color:var(--ink-strong,#1f2d3d)}
.ps-field input,.ps-field textarea{width:100%}
.ps-hint{margin:0 0 8px;font-size:15px;color:var(--muted,#6b7a88);line-height:1.45}
.ps-row{display:flex;align-items:flex-start;gap:14px;padding:16px 0;border-top:1px solid var(--line,#e8edf1)}
.ps-switch{flex:0 0 auto;padding-top:2px}
.ps-row-text label{display:block;font-size:17px;font-weight:600;margin:0 0 4px;color:var(--ink-strong,#1f2d3d)}
.ps-row-text .ps-hint{margin:0}
.ps-actions{display:flex;align-items:center;gap:12px;margin-top:24px;padding-top:20px;
  border-top:1px solid var(--line,#e8edf1)}
.ps-readonly{margin-top:20px;padding-top:16px;border-top:1px solid var(--line,#e8edf1);font-size:16px}

/* The switch itself: a checkbox drawn as a pill so it needs no JS. */
#project-allow-external{appearance:none;-webkit-appearance:none;position:relative;width:46px;height:24px;
  border-radius:999px;background:var(--switch-off,#c8cdd3);cursor:pointer;transition:background .15s;
  border:0;flex-shrink:0;margin:0}
#project-allow-external::after{content:"";position:absolute;top:2px;left:2px;width:20px;height:20px;
  border-radius:50%;background:#fff;box-shadow:0 1px 3px rgba(16,24,40,.3);transition:transform .15s}
#project-allow-external:checked{background:var(--switch-on,#2f7fd1)}
#project-allow-external:checked::after{transform:translateX(22px)}
/* The textarea's own corner grip fought the card's rounded edge; vertical resize only. */
.ps-field textarea{resize:vertical;min-height:76px}
#project-allow-external:disabled{opacity:.45;cursor:not-allowed}
#project-allow-external:focus-visible{outline:none;box-shadow:0 0 0 4px rgba(47,127,209,.25)}
/* ---- Project detail page (frontend#96) ---------------------------------------------- */
/* Jumbotron: no imagery by request -- the name and description carry it. */
.pd-jumbo{display:flex;align-items:flex-start;justify-content:space-between;gap:28px;
  padding:26px 24px 18px;border-bottom:1px solid var(--line,#e3e8ec)}
.pd-jumbo-main{min-width:0;max-width:78ch}
.pd-jumbo h1{margin:2px 0 10px;font-size:36px;line-height:1.2}
.pd-jumbo-desc{margin:0;font-size:17px;line-height:1.65;color:var(--muted,#54626f)}
.pd-jumbo-actions{flex:0 0 auto;display:flex;gap:10px;padding-top:4px}

.pd-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px 24px;
  padding:18px 24px;border-bottom:1px solid var(--line,#e3e8ec)}
.pd-stat{min-width:0}
.pd-stat-value{font-size:28px;font-weight:650;color:var(--ink-strong,#1f2d3d);line-height:1.1}
.pd-of{font-size:18px;font-weight:500;color:var(--muted,#7a8896)}
.pd-stat-label{font-size:15px;font-weight:600;color:var(--ink,#354154);margin-top:3px}
.pd-stat-hint{font-size:14px;color:var(--muted,#8b98a5);margin-top:1px}

.pd-tabs{display:flex;gap:4px;padding:0 24px;border-bottom:1px solid var(--line,#e3e8ec)}
.pd-tab{position:relative;padding:12px 14px;border:0;background:none;cursor:pointer;
  font-size:17px;color:var(--muted,#6b7a88);border-radius:0}
.pd-tab:hover{color:var(--ink-strong,#1f2d3d)}
.pd-tab.active{color:var(--accent-ink,#1e6ba8);font-weight:600}
.pd-tab.active::after{content:"";position:absolute;left:10px;right:10px;bottom:-1px;height:2px;
  background:var(--accent-ink,#1e6ba8);border-radius:2px 2px 0 0}

.pd-body{display:flex;align-items:flex-start;gap:24px;padding:20px 24px 40px}
.pd-main{flex:1 1 auto;min-width:0}
.pd-aside{flex:0 0 288px;display:flex;flex-direction:column;gap:14px;position:sticky;top:16px}

.pd-section-head{padding:2px 0 12px}
.pd-section-head h2{margin:0 0 3px;font-size:22px}
.pd-section-head .muted{margin:0;font-size:16px}

.pd-card{background:var(--card,#fff);border:1px solid var(--line,#dbe4ef);border-radius:10px;
  padding:16px 18px}
.pd-card-head{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:10px}
.pd-card-head h3{margin:0;font-size:16px;font-weight:700;letter-spacing:.03em;
  text-transform:uppercase;color:var(--muted,#6b7a88)}
.pd-empty{margin:0;font-size:16px;line-height:1.5}

.pd-owner-role{font-size:14px;font-weight:600;text-transform:uppercase;letter-spacing:.04em;
  color:var(--muted,#8b98a5);margin-bottom:3px}
.pd-owner-name{font-size:18px;font-weight:600;color:var(--ink-strong,#1f2d3d);margin-bottom:14px}
.pd-owner-list{list-style:none;margin:0 0 14px;padding:0;display:flex;flex-direction:column;gap:6px}
.pd-owner-list li{display:flex;justify-content:space-between;gap:10px;font-size:16px;
  color:var(--ink,#354154);padding-bottom:6px;border-bottom:1px solid var(--line,#eef2f6)}
.pd-owner-list li:last-child{border-bottom:0;padding-bottom:0}
.pd-tag{font-size:13px;font-weight:700;text-transform:uppercase;letter-spacing:.04em;
  color:var(--accent-ink,#1e6ba8);background:var(--accent-tint,#e8f1fb);
  border-radius:999px;padding:1px 7px}
.pd-doc-owner{flex-direction:column;align-items:flex-start;gap:1px}
.pd-doc-name{font-weight:600;white-space:normal;overflow-wrap:anywhere}
.pd-doc-owners{color:var(--muted,#7a8896);font-size:14px;white-space:normal}

.pd-schedule-row{display:flex;align-items:baseline;justify-content:space-between;gap:10px;
  padding:7px 0;border-bottom:1px solid var(--line,#eef2f6);font-size:16px}
.pd-schedule-row:last-child{border-bottom:0;padding-bottom:0}
.pd-schedule-label{color:var(--muted,#7a8896)}
.pd-schedule-value{font-weight:600;color:var(--ink-strong,#1f2d3d)}

.pd-org-list,.pd-team-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:10px}
.pd-org-list li{font-size:16px;color:var(--ink,#354154)}
.pd-org-meta{font-size:14px;color:var(--muted,#8b98a5);margin-top:1px}
.pd-team-list li{display:flex;align-items:center;justify-content:space-between;gap:10px;font-size:16px;
  color:var(--ink,#354154)}
.pd-team-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pd-team-count{font-size:14px;color:var(--muted,#8b98a5);background:var(--tint,#f1f4f7);
  border-radius:999px;padding:1px 8px;flex-shrink:0}

.ps-field-row{display:flex;gap:16px}
.ps-field-row .ps-field{flex:1 1 0;min-width:0}

:root[data-theme="midnight"] .pd-jumbo,:root[data-theme="midnight"] .pd-stats,
:root[data-theme="midnight"] .pd-tabs{border-color:#2c3648}
:root[data-theme="midnight"] .pd-body{--card:#1c2534;--line:#2c3648;--muted:#93a1b5;
  --ink:#d5dde8;--ink-strong:#eef2f7;--accent-ink:#7fb4e8;--accent-tint:#22314a;--tint:#243044}
:root[data-theme="midnight"] .pd-owner-list li,:root[data-theme="midnight"] .pd-schedule-row{
  border-bottom-color:#2c3648}

@media(max-width:1000px){
  .pd-body{flex-direction:column;gap:18px}
  .pd-aside{position:static;flex:1 1 auto;width:100%}
  .pd-jumbo{flex-direction:column;gap:14px}
}
@media(max-width:760px){
  .pd-stats{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:600px){
  .pd-stats{gap:12px 24px}
  .ps-field-row{flex-direction:column;gap:0}
}
/* ---- Push history (#101) ------------------------------------------------------------ */
.push-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:8px}
.push-row{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;
  padding:10px 12px;border:1px solid var(--line,#e3e8ec);border-radius:9px;
  background:var(--card,#fff);transition:box-shadow .18s,border-color .18s}
.push-main{min-width:0}
.push-main strong{display:block;font-size:16px;color:var(--ink-strong,#1f2d3d);
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.push-main small{display:block;font-size:14px;color:var(--muted,#7a8896);margin-top:2px}
.push-status{flex-shrink:0;font-size:13px;font-weight:700;text-transform:uppercase;
  letter-spacing:.04em;border-radius:999px;padding:2px 9px}
.push-pending{background:var(--accent-tint,#e8f1fb);color:var(--accent-ink,#1e6ba8)}
.push-merged{background:var(--tint,#eef2ec);color:var(--muted,#6b7a88)}
/* The row a notification points at. Ring plus a left bar so it is findable at a glance after the
   scroll settles, not only by colour. */
.push-row.is-target{border-color:var(--accent-ink,#1e6ba8);
  box-shadow:0 0 0 2px var(--accent-tint,#e8f1fb),inset 3px 0 0 var(--accent-ink,#1e6ba8)}

/* Notification rows that DO something, as opposed to the informational ones. */
.notification-row.notification-action{display:block;width:100%;text-align:left;cursor:pointer;
  border:0;border-bottom:1px solid var(--line,#e3e8ec);background:transparent;border-radius:0;
  padding:12px 14px;margin-bottom:0;font:inherit;color:inherit}
.notification-row.notification-action:hover{background:var(--tint-soft,#f5f7f4)}
.notification-row.notification-action.unread{box-shadow:inset 3px 0 0 var(--accent-ink,#1e6ba8)}

:root[data-theme="midnight"] .push-row{background:#1c2534;border-color:#2c3648}
:root[data-theme="midnight"] .push-merged{background:#26303f;color:#93a1b5}
:root[data-theme="midnight"] .push-pending{background:#22314a;color:#8fc0f0}
:root[data-theme="midnight"] .notification-drop .notification-row{background:transparent;border-color:#2c3648}

/* ---- anchored conversation, docked in the section panel (#101) ----------------
   Lives beside the content so scope is visible rather than remembered: the reader never
   has to context-switch to know what a message is about. */
.ssp-badge{display:inline-block;margin-left:5px;min-width:15px;padding:0 4px;border-radius:8px;
  background:var(--accent);color:#fff;font-size:.72em;font-weight:700;line-height:15px;text-align:center}
.chat-group{display:flex;flex-direction:column;min-height:0}

/* Scope tabs: one conversation per scope, so scope is a place rather than a filter over one
   stream (#117). Underlined tabs match the section-settings panel, and the radius is 0 because a
   tab is defined by its indicator line, not by a filled rounded shape. */
.chat-scope-tabs{display:flex;align-items:center;gap:2px;padding:0 12px;overflow-x:auto;
  border-bottom:1px solid var(--dox-line-warm);flex:0 0 auto;scrollbar-width:none}
.chat-scope-tabs::-webkit-scrollbar{display:none}
.chat-tab{background:transparent;border:0;border-radius:0;border-bottom:2px solid transparent;
  font:inherit;font-size:.92em;font-weight:600;letter-spacing:.01em;color:var(--dox-muted);
  padding:9px 10px 8px;cursor:pointer;display:inline-flex;align-items:center;gap:6px;
  white-space:nowrap;margin-bottom:-1px}
.chat-tab:hover{color:var(--dox-ink)}
.chat-tab.active{color:var(--dox-accent-deep);border-bottom-color:var(--dox-accent)}
.chat-tab .chat-n{font-weight:600;opacity:.75;font-size:.88em}
.chat-tab:focus-visible{outline:2px solid var(--dox-accent);outline-offset:-2px}
.chat-chip{background:transparent;border:1px solid var(--dox-line-warm);border-radius:13px;
  font:inherit;font-size:.78em;color:var(--dox-muted);padding:3px 9px;cursor:pointer;
  display:inline-flex;align-items:center;gap:5px;white-space:nowrap;max-width:100%;overflow:hidden;text-overflow:ellipsis}
.chat-chip:hover{border-color:var(--dox-accent);color:var(--dox-ink)}
.chat-chip.on{background:var(--dox-accent);border-color:var(--dox-accent);color:var(--dox-paper)}
.chat-chip .chat-n{font-size:.86em;opacity:.75;font-variant-numeric:tabular-nums}
.chat-list{overflow:auto;flex:1 1 auto;min-height:0;padding-right:2px}
.chat-sep{display:flex;align-items:center;gap:8px;margin:12px 0 7px}
.chat-sep span{font-size:.7em;font-weight:700;letter-spacing:.06em;text-transform:uppercase;
  color:var(--dox-muted);white-space:nowrap}
.chat-sep i{flex:1;height:1px;background:var(--dox-line-warm)}
.chat-topic{font-size:.82em;font-weight:650;color:var(--dox-ink);margin:8px 0 5px}
/* ---- conversation bubbles (#104) -------------------------------------------
   Who wrote a message is the most useful thing to read at a glance, so it decides the
   side: other people left, you right. An agent is a participant but not a person, so it
   stays left with its own accent instead of mimicking your own messages.
   Every surface comes from a theme token -- a hardcoded colour here renders a light-island
   inside a dark app (#107). */
.chat-msg{display:flex;align-items:flex-end;gap:10px;padding:0;margin:0 0 18px}
.chat-msg.is-agent .chat-av{background:var(--dox-accent-strong);color:var(--dox-paper)}
.chat-b{min-width:0;max-width:76%;display:flex;flex-direction:column;align-items:flex-start}
/* A sender name must never be the smallest type in the row it identifies. At .76em against the
   message's .86em the name read as fine print, so the panel looked like it had no attribution. */
.chat-nm{font-size:.95em;font-weight:700;color:var(--dox-ink);margin:0 0 6px 2px;
  line-height:1.25;letter-spacing:.005em}
.chat-nm-link{background:transparent;border:0;border-radius:0;padding:0;font:inherit;font-weight:700;
  color:var(--dox-ink);cursor:pointer;text-align:left}
.chat-nm-link:hover{color:var(--dox-accent-deep);text-decoration:underline}
.chat-nm-link:focus-visible{outline:2px solid var(--dox-accent);outline-offset:2px}
/* A flat mark for the agent: it is a participant but not a person, so it gets a label rather
   than an identity disc that would read as somebody's face. */
.chat-agent-mark{width:30px;height:30px;flex:0 0 auto;display:grid;place-items:center;
  border:1px solid var(--dox-line-warm);border-radius:6px;font-size:.62em;font-weight:800;
  letter-spacing:.04em;color:var(--dox-accent-deep);background:var(--dox-accent-tint);margin-bottom:2px}
.chat-status{font-size:.62em;font-weight:700;text-transform:uppercase;letter-spacing:.04em;
  color:var(--dox-accent);border:1px solid var(--dox-accent);border-radius:4px;padding:0 4px;margin-left:5px}

.chat-bubble{background:var(--dox-raised);color:var(--dox-ink);
  border-radius:16px 16px 16px 5px;padding:11px 14px 8px;
  display:flex;flex-direction:column;gap:5px;min-width:0;max-width:100%}
.chat-tx{font-size:.94em;line-height:1.55;overflow-wrap:anywhere;white-space:pre-wrap}
.chat-tx.muted{color:var(--dox-muted);font-style:italic}
.chat-tm{font-size:.68em;color:var(--dox-muted);opacity:.85;white-space:nowrap;
  align-self:flex-end;font-variant-numeric:tabular-nums}

.chat-msg.is-mine{flex-direction:row-reverse}
.chat-msg.is-mine .chat-b{align-items:flex-end}
.chat-msg.is-mine .chat-nm{margin:0 2px 5px 0}
.chat-msg.is-mine .chat-bubble{background:var(--dox-accent);color:var(--dox-paper);
  border-radius:16px 16px 5px 16px}
.chat-msg.is-mine .chat-tm{color:var(--dox-paper);opacity:.75;align-self:flex-start}

.chat-resolved{align-self:flex-start;margin:2px 0 18px 40px;font-size:.72em;font-weight:650;
  color:var(--dox-accent-deep);background:var(--dox-accent-tint);border-radius:5px;padding:3px 8px}
.chat-compose{border-top:1px solid var(--dox-line-warm);padding-top:9px;margin-top:9px;flex:0 0 auto}
.chat-box{border:1px solid var(--dox-line-warm);border-radius:8px;background:var(--dox-raised);
  display:flex;align-items:stretch;gap:4px}
.chat-box:focus-within{border-color:var(--dox-accent);box-shadow:0 0 0 3px var(--dox-accent-tint)}
/* Send occupies the composer's full height so the two read as one control. That needs the box to
   be a row: as a block with the textarea stacked above the bar, the button could never be taller
   than the bar itself (41px against an 88px box). */
.chat-box textarea{flex:1 1 auto;min-width:0;border:0;outline:0;resize:none;font:inherit;
  font-size:.84em;padding:9px 4px 9px 12px;background:transparent;color:var(--dox-ink);max-height:120px}
.chat-bar{display:flex;align-items:stretch;gap:7px;padding:0;flex:0 0 auto}
.chat-pin{font-size:.74em;font-weight:600;color:var(--dox-accent-deep);background:var(--dox-accent-tint);
  border-radius:5px;padding:2px 7px;max-width:65%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.chat-send{margin-left:auto;align-self:stretch;background:var(--dox-accent);color:var(--dox-paper);
  border:0;border-radius:0 7px 7px 0;font:inherit;font-size:.82em;font-weight:650;padding:0 16px;
  cursor:pointer;display:inline-flex;align-items:center;justify-content:center;min-height:34px}
.chat-send:hover{filter:brightness(1.08)}
.chat-send:disabled{opacity:.55;cursor:default}

/* The writer's page is a paper surface in every theme, so the composer keeps light
   ink on a light field even under midnight. */

/* ---- the chat panel, separate from settings (#102) ---------------------------
   Chat is not configuration, so it does not share the Settings drawer. Narrower than
   settings because it is a reading column, not a form. Same edge, one at a time. */
/* ---- the chat panel, docked in reserved space (#103) -------------------------
   The panel is a grid item, not a floating overlay: the workspace reserves a third track
   and the panel occupies it. That is what makes the content narrow instead of covered --
   an absolutely positioned panel ignores the track and sits on top of the editor. */
:root{--chat-w:clamp(441px,35.7vw,630px)}
.document-focus .workspace>.chat-panel{grid-column:3;grid-row:1;position:relative;inset:auto;
  width:auto;max-width:none;min-height:0;overflow:hidden;
  display:none;flex-direction:column;
  background:var(--dox-card);border-left:1px solid var(--dox-line-warm);
  box-shadow:none}
/* Reserving the track and showing the panel happen together, so there is never a strip of
   empty gutter or a panel with nothing under it. */
/* Two explicit tracks when open: the editor takes what is left and the panel takes its own.
   The TOC track is dropped entirely (not just hidden) so its width returns to the editor --
   hiding the TOC while keeping its track left the document squeezed to a strip. */
.document-focus.chat-open .workspace{grid-template-columns:23px minmax(0,1fr) var(--chat-w);
  grid-template-rows:minmax(0,1fr)}
/* Explicit placement: with five children and three tracks, auto-placement wrapped the editor to
   a second row and pushed the panel out of the grid entirely. */
.document-focus.chat-open .workspace>.toc-dismiss{display:none}
.document-focus.chat-open .workspace>.section-scrubber{grid-column:1;grid-row:1}
.document-focus.chat-open .workspace>.editor{grid-column:2;grid-row:1}
.document-focus.chat-open .workspace>.chat-panel{grid-column:3;grid-row:1}
/* The TOC is replaced by a narrow scrubber, not simply removed: losing all section
   navigation the moment you open a conversation is the wrong trade (#105). */
.document-focus.chat-open .workspace>.toc{display:none}
.document-focus.chat-open .workspace>.section-scrubber{display:flex}
.document-focus.chat-open .workspace>.editor{grid-column:2;grid-row:1;border-right:0}
.document-focus.chat-open .workspace>.chat-panel{grid-column:3;grid-row:1}
/* Slide in from the right edge, matching the preview panel. display:none -> flex cannot be
   transitioned, so this animates from the moment the panel becomes visible. */
.document-focus.chat-open .workspace>.chat-panel{display:flex;animation:chat-enter .18s ease-out}
@keyframes chat-enter{from{opacity:0;transform:translateX(14px)}to{opacity:1;transform:translateX(0)}}

.chat-head{display:flex;align-items:center;justify-content:flex-end;gap:10px;padding:8px 10px 8px 14px;
  border-bottom:1px solid var(--dox-line-warm);flex:0 0 auto}
.chat-head .eyebrow{font-size:.64em;letter-spacing:.08em;text-transform:uppercase;
  color:var(--dox-muted);margin-bottom:2px}
.chat-head h3{font-size:.98em;font-weight:650;color:var(--dox-ink);margin:0;
  max-width:270px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.chat-head .ssp-close{margin-left:auto}

/* The list takes every spare pixel and scrolls internally; the composer is pinned, so a
   short thread fills the panel instead of leaving a tall blank column. */
.chat-body{flex:1 1 auto;min-height:0;display:flex;flex-direction:column;padding:10px 16px 12px}
.chat-body .chat-group{flex:1 1 auto;min-height:0;display:flex;flex-direction:column;padding:0}
.chat-body .chat-list{flex:1 1 auto;min-height:0;display:flex;flex-direction:column}

@media(max-width:1100px){
  /* Side by side stops being honest here; the panel takes the whole work area. */
  .document-focus.chat-open .workspace{grid-template-columns:minmax(0,1fr)}
  .document-focus.chat-open .workspace>.editor{grid-column:1}
  .document-focus.chat-open .workspace>.chat-panel{grid-column:1;grid-row:1;z-index:5}
}

/* ---- vertical section scrubber (#105, #107) ---------------------------------
   A quiet position indicator, not a toolbar: a hairline rail, one small tick per section,
   and a compact handle as the only strongly visible element. Everything is themed. */
.section-scrubber{display:none;flex-direction:column;align-items:center;justify-content:center;
  grid-column:1;grid-row:1;min-height:0;overflow:hidden;
  padding:18px 0;border-right:1px solid var(--dox-line-warm);background:var(--dox-card);
  position:relative;cursor:ns-resize;touch-action:none;outline:none}
.section-scrubber:focus-visible{box-shadow:inset 0 0 0 2px var(--dox-accent)}
.scrub-track{position:relative;display:flex;flex-direction:column;align-items:center;
  gap:9px;overflow-y:auto;overflow-x:hidden;width:100%;scrollbar-width:none;padding:2px 0}
.scrub-track::-webkit-scrollbar{width:0}

/* A tick is a mark, not a button: no border, no fill, no hover box. */
.scrub{position:relative;display:grid;place-items:center;width:100%;height:12px;padding:0;
  border:0;background:transparent;cursor:pointer;flex:0 0 auto}
/* Ticks are the only navigation the panel offers, so they must be findable at a glance. The old
   9x1.5px mark in a hairline colour was barely a pixel of contrast on this background. */
.scrub::before{content:"";width:9px;height:3px;border-radius:2px;
  background:var(--dox-muted);opacity:.6;transition:width .12s,background .12s,opacity .12s}
.scrub:hover::before{width:12px;background:var(--dox-ink);opacity:.9}
/* The active marker is the one that must never be mistaken: full width, full accent, full opacity. */
.scrub.active::before{width:14px;height:4px;background:var(--dox-accent);opacity:1}
.scrub:focus-visible::before{outline:2px solid var(--dox-accent);outline-offset:2px}
/* Numbers and padlocks stay out of the way; the handle carries the position. */
.scrub-n,.scrub-lock{position:absolute;width:1px;height:1px;overflow:hidden;
  clip-path:inset(50%);white-space:nowrap}

/* The handle: the one solid element, riding the rail. */
/* No transition on `top`. The handle is a fresh element after every render, so its first painted
   position is the CSS default (top:auto = static start); animating from there made the pill "jump
   up" and then slide down to the marker on every click. Landing directly is one state change
   instead of two. */
.scrub-handle{position:absolute;left:50%;transform:translateX(-50%);width:18px;height:7px;
  margin-top:-4px;border-radius:4px;background:var(--dox-accent);opacity:.9;
  box-shadow:0 0 0 3px var(--dox-accent-tint);pointer-events:none}
.section-scrubber.dragging .scrub-handle{opacity:1}

@media(max-width:1100px){
  /* The overlay fallback keeps the scrubber available too. */
  .document-focus.chat-open .workspace>.section-scrubber{display:none}
}

/* ---- one consistent icon treatment in the section action row ------------------
   save-draft and save-labeled-draft had no class, so they inherited the base button
   border and background while every sibling icon was .subtle. Measured before the fix:
   two buttons with border+fill, four without, in the same row. Only Merge carries weight now. */
.actions>button.subtle{position:relative;display:inline-flex;align-items:center;justify-content:center;
  width:38px;height:38px;padding:0;border:1px solid transparent;border-radius:7px;
  background:transparent;color:var(--dox-ink);transition:background .12s,border-color .12s}
.actions>button.subtle:hover{background:var(--dox-accent-tint);border-color:var(--dox-line-warm)}
.actions>button.subtle:focus-visible{outline:2px solid var(--dox-accent);outline-offset:1px}
.actions>button.subtle[aria-expanded="true"]{background:var(--dox-accent-tint);
  border-color:var(--dox-accent);color:var(--dox-accent)}
/* The unread count sits inside the 38px box rather than spilling past its edge. */
.actions>button.subtle .count{position:absolute;top:1px;right:1px;margin:0}
/* A count is not a label: a small red circle, white text, equal on both axes. min-width is 16px so a
   two-digit number widens the pill into an ellipse rather than clipping; the shape stays circular for
   one digit, which is the common case. */
#chat-toggle .count{min-width:16px;height:16px;line-height:16px;padding:0 4px;border-radius:999px;
  background:#d92d20;color:#fff;font-size:10.5px;font-weight:700;text-align:center;
  box-shadow:0 0 0 2px var(--dox-card)}
#chat-toggle .count[hidden]{display:none}

/* ---- "Team members only" affordance on content you cannot edit ---------------
   The lock chip is drawn by JS and follows the pointer. It is aria-hidden: the section
   badge and the TOC already state the lock for assistive tech, so announcing it twice
   would just be noise. pointer-events:none so it never steals a click. */
.locked-hint{position:fixed;z-index:60;display:none;align-items:center;gap:6px;
  padding:5px 10px 5px 8px;border-radius:7px;
  background:var(--dox-card);color:var(--dox-ink);
  border:1px solid var(--dox-line-warm);box-shadow:0 4px 14px var(--dox-shadow);
  font-size:14px;font-weight:600;white-space:nowrap;pointer-events:none}
.locked-hint.on{display:inline-flex}
.locked-hint svg{width:13px;height:13px;flex:0 0 auto;color:var(--dox-muted)}
/* While the hint is showing, the content says "locked" with the cursor too. */
/* The label carries the padlock; a padlock cursor too was saying it twice. */

/* ---- Fluid Thread page (#131, #132, #133, #134) -----------------------------------------
   Faithful to the supplied reference design, which reads as a stack of SURFACES rather than a
   stack of outlines: a warm canvas, white cards floating on it, tinted bands for grouped regions,
   and inset blocks inside those bands. That layering is load-bearing -- with only hairline borders
   every region has the same weight and a long discussion reads as a wall.

   Three rules keep this themeable:
     1. Colour comes from tokens only. A hardcoded hex here is the #107 bug (a bubble lost its
        background because --dox-raised was undefined in light themes).
     2. The accent is an ACCENT: tinted bands and 1px edges, never a filled paragraph.
     3. The document is never recoloured. Only chrome around it.
   `--ft-*` are local aliases so the surface intent is readable at each rule, and they resolve per
   theme because they point at theme tokens. */

.chat-page {
  height: 100%; min-height: 0; display: flex; flex-direction: column;
  /* The editorial canvas. Distinct from the app ground, so cards read as raised. */
  background: var(--dox-ground);
}
/* The generic tab rule paints every panel white. This page owns its background. */
.document-views>section#view-chat { background: var(--dox-ground); }

.fluid-shell {
  display: flex; gap: 20px; align-items: stretch; flex: 1 1 auto; min-height: 0;
  padding: 18px 24px 0; max-width: 1500px; width: 100%; margin: 0 auto;
}
.fluid-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; min-height: 0; }

/* -- header ------------------------------------------------------------------------------ */
.fluid-head {
  flex: 0 0 auto; display: flex; align-items: flex-start; justify-content: space-between;
  gap: 14px; padding-bottom: 12px;
}
.fluid-head h2 { margin: 0 0 2px; font-size: 1.3em; letter-spacing: -.01em; }
.fluid-head-actions { display: flex; align-items: center; gap: 9px; }

/* Segmented control: a sunken track with the active segment raised out of it. */
.fluid-switch {
  display: inline-flex; padding: 3px; border-radius: 9px;
  background: var(--dox-raised); border: 1px solid var(--dox-line-warm);
}
.fluid-switch button {
  background: transparent; border: 0; border-radius: 6px; padding: 5px 12px;
  font-size: .8em; cursor: pointer; color: var(--dox-muted); transition: background .12s, color .12s;
}
.fluid-switch button:hover { color: var(--dox-ink); }
.fluid-switch button.active {
  background: var(--dox-card); color: var(--dox-ink); font-weight: 650;
  box-shadow: 0 1px 2px var(--dox-shadow);
}

/* -- living consensus: accent-tinted band, the one place the accent leads ------------------ */
.fluid-consensus {
  flex: 0 0 auto; margin-bottom: 12px; border-radius: 11px; overflow: hidden;
  background: var(--dox-card); border: 1px solid var(--dox-line-warm);
  box-shadow: 0 1px 3px var(--dox-shadow);
}
.fluid-consensus.is-open { border-color: var(--dox-accent-strong); }
.fluid-consensus-head {
  display: flex; align-items: center; gap: 9px; width: 100%; padding: 9px 13px;
  background: transparent; border: 0; border-radius: 0; cursor: pointer; text-align: left;
}
.fluid-consensus.is-open .fluid-consensus-head { background: var(--dox-accent-tint); }
.fluid-consensus-label {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: .77em; font-weight: 700; text-transform: uppercase; letter-spacing: .075em;
  color: var(--dox-accent-deep);
}
/* The spark glyph from the reference, drawn rather than imported. */
.fluid-consensus-label::before {
  content: "\2726"; font-size: 1.05em; color: var(--dox-accent);
}
.fluid-consensus-head .fluid-n { font-size: .76em; color: var(--dox-accent-soft); }
.fluid-consensus-caret { margin-left: auto; color: var(--dox-accent-soft); font-size: .95em; }

/* The body sits on the tint, with each pinned line inset on the card surface. */
.fluid-consensus-body {
  padding: 9px 13px 11px; background: var(--dox-accent-soft-tint);
  border-top: 1px solid var(--dox-accent-strong);
}
.fluid-consensus-list { list-style: none; margin: 0; padding: 0; }
.fluid-consensus-list li {
  display: flex; align-items: baseline; gap: 8px; padding: 7px 9px; margin-bottom: 6px;
  font-size: .85em; border-radius: 7px;
  background: var(--dox-card); border: 1px solid var(--dox-line-warm);
}
.fluid-consensus-list li:last-child { margin-bottom: 0; }
.fluid-consensus-text { color: var(--dox-ink); flex: 1 1 auto; line-height: 1.45; font-weight: 550; }
.fluid-unpin {
  background: transparent; border: 0; border-radius: 0; cursor: pointer;
  color: var(--dox-faint); padding: 0 3px; font-size: 1.1em; line-height: 1;
}
.fluid-unpin:hover { color: var(--dox-accent-deep); }

/* -- scope + stance filters --------------------------------------------------------------- */
.fluid-subhead {
  flex: 0 0 auto; display: flex; flex-direction: column; gap: 7px; padding: 9px 12px 10px;
  margin-bottom: 11px; border-radius: 9px;
  background: var(--dox-raised); border: 1px solid var(--dox-line-warm);
}
.fluid-filters { display: flex; gap: 5px; flex-wrap: wrap; align-items: center; }
.fluid-blabel {
  font-size: .7em; font-weight: 700; text-transform: uppercase; letter-spacing: .075em;
  color: var(--dox-faint); margin-right: 4px; min-width: 48px;
}
.fluid-filter {
  background: var(--dox-card); border: 1px solid var(--dox-line-warm); border-radius: 999px;
  padding: 3px 11px; font-size: .78em; cursor: pointer; color: var(--dox-muted);
  transition: background .12s, color .12s, border-color .12s;
}
.fluid-filter:hover { border-color: var(--dox-accent-strong); color: var(--dox-ink); }
.fluid-filter.on {
  background: var(--dox-accent); border-color: var(--dox-accent);
  color: #fff; font-weight: 600;
}
/* Scope pills are a second, quieter row: where you are reading, not what you are filtering. */
.fluid-scopes { display: flex; gap: 5px; flex-wrap: wrap; align-items: center; }
.fluid-scope { min-width: 0; }
.fluid-scope {
  display: inline-flex; align-items: center; gap: 6px;
  background: transparent; border: 1px solid transparent; border-radius: 6px;
  padding: 3px 9px; font-size: .78em; cursor: pointer; color: var(--dox-muted);
}
.fluid-scope:hover { background: var(--dox-raised); color: var(--dox-ink); }
.fluid-scope.on {
  background: var(--dox-raised); border-color: var(--dox-line-warm);
  color: var(--dox-accent-deep); font-weight: 650;
}

/* -- the card: white on the warm canvas, with a real shadow ------------------------------- */
.fluid-list { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 2px 5px 4px 1px; }
.fluid-card {
  background: var(--dox-card); border: 1px solid var(--dox-line-warm); border-radius: 12px;
  padding: 13px 16px 11px; margin-bottom: 16px;
  box-shadow: 0 1px 3px var(--dox-shadow);
  transition: border-color .12s, box-shadow .12s;
}
.fluid-card:hover { box-shadow: 0 2px 8px var(--dox-shadow); }
.fluid-card.is-mine { border-color: var(--dox-accent-strong); }
.fluid-card.is-pinned { border-color: var(--dox-accent-strong); box-shadow: inset 3px 0 0 var(--dox-accent), 0 1px 3px var(--dox-shadow); }

.fluid-card-head { display: flex; align-items: center; gap: 7px; }
.fluid-ref {
  font-family: ui-monospace, monospace; font-size: .74em; font-weight: 600;
  color: var(--dox-muted); background: var(--dox-raised);
  border-radius: 4px; padding: 1px 5px;
}
.fluid-who { display: inline-flex; align-items: center; gap: 6px; background: transparent; border: 0; border-radius: 0; padding: 0; cursor: pointer; }
.fluid-who:hover .fluid-nm { color: var(--dox-accent-deep); }
.fluid-av {
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--dox-accent-tint); color: #fff;
  font-size: .66em; font-weight: 700; display: inline-flex; align-items: center;
  justify-content: center; flex: 0 0 auto;
  /* Identity, not decoration: the fill is set inline per person (#135). A hairline ring keeps a light
     hue from dissolving into a white card. */
  box-shadow: 0 0 0 1px rgba(0,0,0,.10) inset;
}
.fluid-av.sm { width: 17px; height: 17px; font-size: .6em; }
.fluid-nm { font-size: .85em; font-weight: 650; color: var(--dox-ink); }

/* Stance as a tinted pill, matching the reference's semantic colours. */
.fluid-stance {
  font-size: .68em; font-weight: 700; text-transform: uppercase; letter-spacing: .055em;
  padding: 2px 8px; border-radius: 999px;
  background: var(--dox-raised); color: var(--dox-muted); border: 1px solid transparent;
}
.fluid-stance.sm { font-size: .66em; padding: 1px 7px; }
.fluid-card.stance-proposal .fluid-stance { background: var(--dox-accent-tint); color: var(--dox-accent-deep); border-color: var(--dox-accent-strong); }
.fluid-card.stance-counterpoint .fluid-stance { background: var(--dox-accent-soft-tint); color: var(--dox-ink); border-color: var(--dox-line-warm); }
.fluid-card.stance-question .fluid-stance { background: transparent; border: 1px dashed var(--dox-accent-strong); color: var(--dox-accent-soft); }
.fluid-card.stance-evidence .fluid-stance { background: var(--dox-raised); color: var(--dox-ink); border-color: var(--dox-line-warm); }
.fluid-card.stance-synthesis .fluid-stance { background: var(--dox-accent-tint); color: var(--dox-accent-deep); border-color: var(--dox-accent-strong); font-style: italic; }

.fluid-time { font-size: .72em; color: var(--dox-faint); margin-left: auto; }
.fluid-pin { background: transparent; border: 0; border-radius: 0; cursor: pointer; padding: 0 2px; font-size: .95em; color: var(--dox-faint); }
.fluid-pin[aria-pressed="true"] { color: var(--dox-accent); }
.fluid-title { margin: 7px 0 4px; font-size: 1em; line-height: 1.4; color: var(--dox-ink); letter-spacing: -.005em; }
.fluid-body { font-size: .9em; line-height: 1.62; color: var(--dox-ink); overflow-wrap: anywhere; }

/* An anchored phrase is a highlighter mark, not a link: the reference uses a warm wash. */
.fluid-highlight {
  background: var(--dox-accent-strong); color: inherit;
  border: 0; border-bottom: 2px solid var(--dox-accent); border-radius: 3px;
  padding: 0 2px; margin: 0 1px; font: inherit; cursor: pointer;
}
.fluid-highlight:hover { background: var(--dox-accent-tint); }
.fluid-highlight.is-open { background: var(--dox-accent-tint); }
.fluid-highlight-n {
  font-size: .7em; font-family: ui-monospace, monospace; margin-left: 3px;
  color: var(--dox-accent-deep); font-weight: 700;
}

/* Footer on a faint sunken strip, so actions do not compete with the argument. */
.fluid-card-foot {
  display: flex; align-items: center; gap: 7px; margin: 9px -15px -10px; padding: 7px 15px;
  background: var(--dox-raised); border-top: 1px solid var(--dox-line-warm);
  border-radius: 0 0 11px 11px; flex-wrap: wrap;
}
.fluid-endorse, .fluid-quick, .fluid-notepill {
  background: var(--dox-card); border: 1px solid var(--dox-line-warm); border-radius: 999px;
  padding: 2px 10px; font-size: .76em; cursor: pointer; color: var(--dox-muted);
  transition: background .12s, color .12s, border-color .12s;
}
.fluid-endorse:hover, .fluid-quick:hover, .fluid-notepill:hover { color: var(--dox-ink); border-color: var(--dox-accent-strong); }
.fluid-endorse.has { color: var(--dox-accent-deep); border-color: var(--dox-accent); background: var(--dox-accent-tint); font-weight: 600; }
.fluid-notepill { color: var(--dox-accent-deep); background: var(--dox-accent-soft-tint); border-color: var(--dox-accent-strong); }
.fluid-notepill.is-open { background: var(--dox-accent-tint); border-color: var(--dox-accent); }
.fluid-foot-right { margin-left: auto; display: inline-flex; gap: 5px; flex-wrap: wrap; }
.fluid-n { font-family: ui-monospace, monospace; font-size: .92em; opacity: .75; }

/* Quick replies: an inset well inside the card, indented by a rule. */
.fluid-micros {
  margin: 8px -15px -10px; padding: 8px 15px 10px 15px;
  background: var(--dox-raised); border-top: 1px solid var(--dox-line-warm);
  border-radius: 0 0 11px 11px;
}
.fluid-micro { display: flex; gap: 6px; padding: 3px 0 3px 9px; font-size: .81em; color: var(--dox-ink); border-left: 2px solid var(--dox-accent-strong); margin-bottom: 3px; }
.fluid-micro-body b { font-weight: 650; }
.fluid-micro time { font-size: .86em; color: var(--dox-faint); margin-left: 4px; }
.fluid-reply { display: flex; gap: 6px; padding: 5px 0 1px; }
.fluid-reply-input, .fluid-rail-form input {
  flex: 1 1 auto; background: var(--dox-card); border: 1px solid var(--dox-line-warm);
  border-radius: 7px; padding: 5px 9px; font-size: .8em; color: var(--dox-ink);
}
.fluid-reply-input:focus, .fluid-rail-form input:focus { outline: 2px solid var(--dox-accent-strong); outline-offset: 1px; }

/* -- clustered + outline ------------------------------------------------------------------ */
.fluid-group { margin-bottom: 18px; }
.fluid-group-title {
  display: flex; align-items: center; gap: 8px; margin: 0 0 9px;
  font-size: .78em; font-weight: 700; text-transform: uppercase; letter-spacing: .075em;
  color: var(--dox-muted);
}
/* A rule that runs to the edge, as in the reference's grouped view. */
.fluid-group-title::after { content: ""; flex: 1 1 auto; height: 1px; background: var(--dox-line-warm); }
.fluid-outline { margin: 0; padding-left: 20px; }
.fluid-outline li {
  display: flex; align-items: baseline; gap: 9px; padding: 8px 10px; font-size: .86em;
  margin-bottom: 5px; border-radius: 7px;
  background: var(--dox-card); border: 1px solid var(--dox-line-warm);
}
.fluid-outline-text { color: var(--dox-ink); flex: 1 1 auto; }

/* -- composer: raised off the canvas, with a tinted intent band --------------------------- */
.fluid-composer { flex: 0 0 auto; padding: 10px 0 14px; }
.fluid-write {
  border: 1px solid var(--dox-line-warm); border-radius: 13px; background: var(--dox-card);
  box-shadow: 0 3px 14px var(--dox-shadow); overflow: hidden;
}
.fluid-write:focus-within { border-color: var(--dox-accent-strong); }
.fluid-intent {
  display: flex; align-items: center; gap: 5px; flex-wrap: wrap; padding: 9px 11px;
  background: var(--dox-accent-soft-tint); border-bottom: 1px solid var(--dox-line-warm);
}
.fluid-intent-label { font-size: .72em; text-transform: uppercase; letter-spacing: .075em; color: var(--dox-faint); margin-right: 4px; }
.fluid-intent-pill {
  background: var(--dox-card); border: 1px solid var(--dox-line-warm); border-radius: 6px;
  padding: 3px 9px; font-size: .77em; cursor: pointer; color: var(--dox-muted);
  transition: background .12s, color .12s, border-color .12s;
}
.fluid-intent-pill:hover { color: var(--dox-ink); border-color: var(--dox-accent-strong); }
.fluid-intent-pill.on { background: var(--dox-accent-tint); border-color: var(--dox-accent); color: var(--dox-accent-deep); font-weight: 650; }
.fluid-compact { margin-left: auto; background: transparent; border: 0; border-radius: 0; font-size: .74em; color: var(--dox-faint); cursor: pointer; padding: 0 3px; }
.fluid-compact:hover { color: var(--dox-ink); }
.fluid-headline {
  width: 100%; border: 0; border-radius: 0; background: transparent; padding: 9px 13px 1px;
  font-size: .93em; font-weight: 650; color: var(--dox-ink);
}
.fluid-headline::placeholder { font-weight: 400; color: var(--dox-faint); }
.fluid-write-row { display: flex; align-items: flex-end; gap: 8px; padding: 9px 11px; }
.fluid-write-row textarea {
  flex: 1 1 auto; background: transparent; border: 0; border-radius: 0; resize: none;
  font-size: .9em; line-height: 1.55; color: var(--dox-ink); max-height: 200px;
}
.fluid-write-row .chat-send { align-self: stretch; }
.fluid-write-row .subtle { align-self: stretch; }

/* -- the margin rail: a raised panel with a tinted anchor band ---------------------------- */
.fluid-rail {
  width: 340px; flex: 0 0 340px; align-self: flex-start; max-height: 100%;
  display: flex; flex-direction: column; border-radius: 13px; overflow: hidden;
  background: var(--dox-card); border: 1px solid var(--dox-line-warm);
  box-shadow: 0 2px 10px var(--dox-shadow);
}
.fluid-rail.is-hint { background: var(--dox-raised); border-style: dashed; box-shadow: none; }
.fluid-rail-head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 12px;
  background: var(--dox-raised); border-bottom: 1px solid var(--dox-line-warm);
  font-size: .75em; font-weight: 700; text-transform: uppercase; letter-spacing: .065em;
  color: var(--dox-muted);
}
.fluid-rail-close { background: transparent; border: 0; border-radius: 0; cursor: pointer; color: var(--dox-faint); font-size: 1.15em; padding: 0 2px; line-height: 1; }
.fluid-rail-close:hover { color: var(--dox-ink); }
/* The quoted anchor carries the accent wash, tying it to the highlight in the card. */
.fluid-rail-quote { padding: 9px 12px; background: var(--dox-accent-soft-tint); border-bottom: 1px solid var(--dox-accent-strong); }
.fluid-rail-quote .muted { font-size: .74em; color: var(--dox-accent-soft); }
.fluid-rail-quote blockquote {
  margin: 4px 0 0; padding-left: 9px; border-left: 3px solid var(--dox-accent);
  font-style: italic; font-size: .85em; line-height: 1.5; color: var(--dox-ink);
}
.fluid-rail-thread { flex: 1 1 auto; overflow-y: auto; padding: 10px 12px; }
.fluid-note { margin-bottom: 11px; }
.fluid-note-head { display: flex; align-items: center; gap: 7px; font-size: .78em; color: var(--dox-ink); }
.fluid-note-head time { margin-left: auto; font-size: .9em; color: var(--dox-faint); }
.fluid-note p {
  margin: 4px 0 0; padding: 6px 9px; border-radius: 8px;
  background: var(--dox-raised); font-size: .83em; line-height: 1.5; color: var(--dox-ink);
}
.fluid-rail-form { display: flex; gap: 7px; padding: 9px 12px; background: var(--dox-raised); border-top: 1px solid var(--dox-line-warm); }
/* Each hint entry is a white chip on the sunken dashed panel. */
.fluid-railitem {
  display: block; width: 100%; text-align: left; background: var(--dox-card);
  border: 1px solid var(--dox-line-warm); border-radius: 8px; padding: 7px 9px; margin-bottom: 6px;
  cursor: pointer; transition: border-color .12s, background .12s;
}
.fluid-railitem:hover { border-color: var(--dox-accent-strong); background: var(--dox-accent-soft-tint); }
.fluid-railitem-meta { font-size: .72em; color: var(--dox-faint); font-family: ui-monospace, monospace; }
.fluid-railitem-q { display: block; font-size: .81em; color: var(--dox-ink); margin-top: 2px; }
.fluid-rail.is-hint > p { padding: 0 12px 12px; font-size: .8em; line-height: 1.55; color: var(--dox-muted); }

/* The floating "margin note" action after a text selection. */
.fluid-selpop {
  position: fixed; z-index: 60; background: var(--dox-ink); color: var(--dox-card);
  border: 0; border-radius: 999px; padding: 6px 13px; font-size: .78em; font-weight: 600;
  cursor: pointer; box-shadow: 0 4px 16px var(--dox-shadow-strong);
}
.fluid-selpop:hover { background: var(--dox-accent); color: #fff; }

@media (max-width: 1100px) {
  .fluid-rail { display: none; }
  .fluid-shell { padding: 12px 12px 0; }
}

/* ---- Panel card density (#137) ----------------------------------------------------------
   The panel is 420-600px wide and read while writing beside it, so it renders the SAME card as the
   page with less of everything: no section reference (you are already scoped to it), tighter
   padding, and margin threads inline under their card instead of a right-hand rail. */
.fluid-card.is-panel { padding: 11px 12px 9px; margin-bottom: 16px; border-radius: 10px; }
.fluid-card.is-panel .fluid-card-head { gap: 6px; }
.fluid-card.is-panel .fluid-nm { font-size: .81em; }
.fluid-card.is-panel .fluid-time { font-size: .68em; }
.fluid-card.is-panel .fluid-title { font-size: .93em; margin: 5px 0 3px; }
.fluid-card.is-panel .fluid-body { font-size: .86em; line-height: 1.55; }
.fluid-card.is-panel .fluid-card-foot { margin: 9px -12px -9px; padding: 6px 12px; gap: 5px; border-radius: 0 0 9px 9px; }
.fluid-card.is-panel .fluid-endorse,
.fluid-card.is-panel .fluid-quick,
.fluid-card.is-panel .fluid-notepill { padding: 1px 7px; font-size: .72em; }
.fluid-card.is-panel .fluid-micros { margin: 8px -12px -9px; padding: 7px 12px 9px; border-radius: 0 0 9px 9px; }
.fluid-card.is-panel.is-agent { border-style: dashed; }
.fluid-card.is-panel .fluid-agent-mark {
  font-size: .6em; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  color: var(--dox-muted); border: 1px solid var(--dox-line-warm);
  border-radius: 3px; padding: 0 3px;
}

/* The panel's consensus strip: one line per pinned point, never a paragraph. */
.fluid-consensus.is-panel { margin-bottom: 8px; border-radius: 9px; }
.fluid-consensus.is-panel .fluid-consensus-head { padding: 6px 10px; }
.fluid-consensus.is-panel .fluid-consensus-body { padding: 6px 10px 8px; }
.fluid-consensus.is-panel .fluid-consensus-list li {
  font-size: .78em; padding: 4px 7px; margin-bottom: 4px; gap: 6px;
}
.fluid-consensus.is-panel .fluid-consensus-list li:first-child { margin-top: 0; }

/* Inline margin thread: the page's rail, folded under its card. */
.fluid-inline-margin {
  margin-top: 7px; padding: 7px 9px; border-radius: 8px;
  background: var(--dox-accent-soft-tint); border: 1px solid var(--dox-accent-strong);
}
.fluid-inline-head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  font-size: .75em; font-style: italic; color: var(--dox-accent-deep);
  padding-bottom: 5px; margin-bottom: 6px; border-bottom: 1px solid var(--dox-accent-strong);
}
.fluid-inline-close {
  background: transparent; border: 0; border-radius: 0; cursor: pointer;
  color: var(--dox-accent-soft); font-size: 1.2em; line-height: 1; padding: 0 2px;
}
.fluid-inline-margin .fluid-note { margin-bottom: 7px; }
.fluid-inline-margin .fluid-note p { font-size: .79em; padding: 4px 7px; }
.fluid-inline-margin .fluid-reply { padding-top: 4px; }
.fluid-margin-input {
  flex: 1 1 auto; background: var(--dox-card); border: 1px solid var(--dox-line-warm);
  border-radius: 6px; padding: 4px 8px; font-size: .78em; color: var(--dox-ink);
}

/* The panel composer's optional headline row (#137). */
.chat-structure { padding: 2px 2px 0; }
.chat-structure input {
  width: 100%; border: 0; border-bottom: 1px solid var(--dox-line-warm); border-radius: 0;
  background: transparent; padding: 5px 2px; font-size: .86em; font-weight: 650;
  color: var(--dox-ink);
}
.chat-structure input::placeholder { font-weight: 400; color: var(--dox-faint); }
.chat-structure-btn {
  background: transparent; border: 1px solid var(--dox-line-warm); border-radius: 6px;
  padding: 2px 8px; font-size: .74em; color: var(--dox-muted); cursor: pointer; margin-right: auto;
}
.chat-structure-btn:hover { color: var(--dox-ink); border-color: var(--dox-accent-strong); }

/* ---- Conversation type scale +20% (#138) --------------------------------------------------
   Everything BELOW the page title and subtitle grows 20%: tabs, consensus, cards, the rail and the
   composer. The title (.fluid-head h2) and subtitle (.fluid-head p) are deliberately excluded -- they
   are the page's anchor and the brief was explicit that they stay as they are.

   Panel cards are `.is-panel` overrides of the same rules, so they need their own bump or the panel
   stays at the old size while the page grows. */
.fluid-scope-tabs .chat-tab { font-size: 15.6px; }            /* was 13px */
.fluid-scope-tabs .chat-tab .chat-n { font-size: .88em; }

.fluid-consensus-label { font-size: .92em; }                  /* was .77em */
.fluid-consensus-head .fluid-n { font-size: .91em; }
.fluid-consensus-text { font-size: 1.02em; }
.fluid-consensus-list li { font-size: 1.02em; }
.fluid-consensus.is-panel .fluid-consensus-list li { font-size: .94em; }
.fluid-consensus.is-panel .fluid-consensus-label { font-size: .9em; }

.fluid-card .fluid-nm { font-size: 1.02em; }                  /* was .85em */
.fluid-card .fluid-time { font-size: .86em; }
.fluid-card .fluid-title { font-size: 1.2em; }                /* was 1em */
.fluid-card .fluid-body { font-size: 1.08em; }                /* was .9em */
.fluid-card .fluid-ref { font-size: .89em; }
.fluid-card .fluid-endorse,
.fluid-card .fluid-quick,
.fluid-card .fluid-notepill { font-size: .91em; }
.fluid-card .fluid-micro { font-size: .97em; }
.fluid-card .fluid-micro time { font-size: .86em; }
.fluid-card .fluid-reply-input { font-size: .96em; }
.fluid-card .fluid-av { width: 26px; height: 26px; font-size: .7em; }
.fluid-card .fluid-av.sm { width: 20px; height: 20px; font-size: .66em; }

/* Panel keeps its density, just 20% larger throughout. */
.fluid-card.is-panel .fluid-nm { font-size: .97em; }
.fluid-card.is-panel .fluid-time { font-size: .82em; }
.fluid-card.is-panel .fluid-title { font-size: 1.12em; }
.fluid-card.is-panel .fluid-body { font-size: 1.03em; }
.fluid-card.is-panel .fluid-endorse,
.fluid-card.is-panel .fluid-quick,
.fluid-card.is-panel .fluid-notepill { font-size: .86em; }
.fluid-card.is-panel .fluid-micro { font-size: .92em; }
.fluid-card.is-panel .fluid-av { width: 25px; height: 25px; }

.fluid-rail-head { font-size: .9em; }
.fluid-rail-quote blockquote { font-size: 1.02em; }
.fluid-rail-quote .muted { font-size: .89em; }
.fluid-note-head { font-size: .94em; }
.fluid-note p,
.fluid-inline-margin .fluid-note p { font-size: .98em; }
.fluid-railitem-q { font-size: .97em; }
.fluid-railitem-meta { font-size: .86em; }
.fluid-inline-head { font-size: .9em; }
.fluid-margin-input { font-size: .94em; }

/* Composer: input and buttons, not the "+ Structure" affordance label. */
.fluid-write-row textarea { font-size: 1.08em; }
.fluid-headline { font-size: 1.12em; }
#chat-structure-row input { font-size: 1.03em; }
#chat-input { font-size: 1.02em; }

/* The chat page's own controls come from the reference component, so only its filter strip needed
   breathing room: six pills in a cramped grey band read as an afterthought (#140). */
#chat-page-root .max-w-7xl > div:nth-child(2) { padding-top: 10px; padding-bottom: 10px; }
#chat-page-root [aria-label="Filter by stance"],
#chat-page-root .overflow-x-auto { gap: 6px; }
#chat-page-root .overflow-x-auto > button { margin: 0; }

/* ---- Discussions (#144) ----------------------------------------------------------------
   A discussion is a topic: title, description, replies. No stance, no type, no outcome.

   The only structure is scope, and scope is a place you choose -- Project / Document / Section --
   so the list is short and answers "where am I" instead of asking the reader to decode badges.
   All colour is theme tokens, so every theme works unchanged. */
.document-views > section#view-chat { background: var(--dox-ground); }

.disc { flex: 1 1 auto; min-height: 0; display: grid; margin-top: 13px;
  grid-template-columns: 348px minmax(0, 1fr); }

/* ---------- list ---------- */
.disc-side { background: var(--dox-surface); border-right: 1px solid var(--dox-line-warm);
  display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.disc-side-head { display: flex; align-items: center; gap: 8px; padding: 14px 14px 9px; }
.disc-title { font-size: 14px; font-weight: 700; letter-spacing: -.01em; color: var(--dox-ink); }
.disc-newbtn { margin-left: auto; width: 26px; height: 26px; flex: 0 0 auto; display: grid;
  place-items: center; border-radius: 7px; border: 1px solid var(--dox-line-warm);
  background: var(--dox-card); color: var(--dox-muted); cursor: pointer; transition: .13s; }
.disc-newbtn:hover { border-color: var(--dox-accent); color: var(--dox-accent); }

/* The three places. Segmented, because choosing a place is one decision, not three checkboxes. */
.disc-levels { display: flex; gap: 2px; margin: 0 10px 8px; padding: 2px;
  background: var(--dox-raised); border-radius: 8px; }
/* The switcher decides which conversations you are reading, so it sits at the same size as the text it
   switches between rather than below it. 15.3px is the panel's measured average text size. */
.disc-levels button { flex: 1; border: 0; background: transparent; border-radius: 6px;
  padding: 6px 4px; font: inherit; font-size: 16.8px; font-weight: 400; color: var(--dox-faint);
  cursor: pointer; transition: .12s; }
.disc-levels button:hover { color: var(--dox-ink); }
.disc-levels button.on { background: var(--dox-card); color: var(--dox-ink);
  box-shadow: 0 1px 2px var(--dox-shadow); }
.disc-side-where { font-size: 11px; color: var(--dox-faint); padding: 0 14px 9px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.disc-secpick { font-size: 17.6px; color: var(--dox-ink); }
.disc-secpick { display: block; width: calc(100% - 20px); margin: 0 10px 9px; font-family: inherit;
  background: var(--dox-card); border: 1px solid var(--dox-line-warm); border-radius: 7px;
  padding: 5px 8px; }

.disc-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 0 6px 12px; }
.disc-row { display: block; width: 100%; text-align: left; background: transparent; border: 0;
  border-radius: 7px; padding: 8px 9px; cursor: pointer; transition: .12s; }
.disc-row + .disc-row { border-top: 1px solid var(--dox-line-warm); border-radius: 0; }
.disc-row:hover { background: var(--dox-raised); }
.disc-row.on { background: var(--dox-accent-tint); }
.disc-row.on .disc-row-t { color: var(--dox-accent-deep); }
.disc-row-t { display: block; font-size: 18.75px; font-weight: 550; line-height: 1.35;
  color: var(--dox-ink); }
.disc-row-w { display: block; font-size: 10.5px; color: var(--dox-faint); margin-top: 2px; }
.disc-blank { padding: 22px 14px; font-size: 12px; color: var(--dox-faint); text-align: center;
  line-height: 1.6; }
.disc-blank.tall { padding: 54px 24px; }
.disc-blank span { font-size: 11.5px; }

/* ---------- reading ---------- */
.disc-read { min-height: 0; overflow-y: auto; background: var(--dox-ground); }
.disc-read-in { max-width: 1008px; margin: 0 auto; padding: 24px 30px 32px; }
.disc-detail h2 { font-size: 25px; line-height: 1.22; letter-spacing: -.026em; font-weight: 700;
  margin: 0 0 12px; color: var(--dox-ink); }

/* The description is the statement that makes this a topic rather than a chat line. */
.disc-desc { border-radius: 9px; background: var(--dox-accent-tint); padding: 14px 17px; }
.disc-desc p { font-size: 16.2px; line-height: 1.62; color: var(--dox-ink); margin: 0; }

.disc-reply-count { font-size: 10.5px; font-weight: 700; letter-spacing: .07em;
  text-transform: uppercase; color: var(--dox-faint); margin: 20px 0 2px;
  padding-bottom: 7px; border-bottom: 1px solid var(--dox-line-warm); }

.disc-reply { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 11px;
  padding: 13px 0; border-bottom: 1px solid var(--dox-line-warm); }
.disc-av { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  color: #fff; font-size: 9.5px; font-weight: 800; }
.disc-reply-main { min-width: 0; }
.disc-reply-top { display: flex; align-items: baseline; gap: 8px; margin-bottom: 3px; }
.disc-reply-top b { font-size: 12.5px; font-weight: 650; color: var(--dox-ink); }
.disc-reply-top time { font-size: 10.5px; color: var(--dox-faint); }
.disc-reply p { font-size: 15.6px; line-height: 1.62; color: var(--dox-ink); margin: 0; }

/* Composer: a text box and a button. Nothing to categorise. */
.disc-composer { display: flex; align-items: flex-end; gap: 9px; margin-top: 18px; }
.disc-composer textarea { flex: 1 1 auto; font: inherit; font-size: 15.6px; line-height: 1.55;
  color: var(--dox-ink); background: var(--dox-card); border: 1px solid var(--dox-line-warm);
  border-radius: 10px; padding: 10px 12px; resize: none; max-height: 180px;
  box-shadow: 0 1px 2px var(--dox-shadow); }
.disc-composer textarea:focus { outline: 2px solid var(--dox-accent-strong); outline-offset: 1px; }
.disc-composer textarea::placeholder { color: var(--dox-faint); }
.disc-send { background: var(--dox-accent); color: #fff; border: 0; border-radius: 9px;
  padding: 10px 17px; font: inherit; font-size: 12.5px; font-weight: 650; cursor: pointer;
  white-space: nowrap; transition: .13s; }
.disc-send:hover { background: var(--dox-accent-deep); }
.disc-send:disabled { opacity: .4; cursor: default; }
.disc-ghost { background: transparent; border: 1px solid var(--dox-line-warm); border-radius: 9px;
  padding: 9px 15px; font: inherit; font-size: 12.5px; color: var(--dox-muted); cursor: pointer; }
.disc-ghost:hover { border-color: var(--dox-accent-strong); color: var(--dox-ink); }

/* New discussion: title, description, where. Two of those are required. */
.disc-newcard { background: var(--dox-card); border: 1px solid var(--dox-line-warm);
  border-radius: 12px; padding: 20px 22px; box-shadow: 0 2px 10px var(--dox-shadow); }
.disc-newcard h3 { font-size: 15px; font-weight: 700; margin: 0 0 14px; color: var(--dox-ink); }
.disc-field { display: grid; gap: 5px; margin-bottom: 13px; }
.disc-field.hide { display: none; }
.disc-field label { font-size: 10.5px; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: var(--dox-faint); }
.disc-field input, .disc-field textarea, .disc-field select { font: inherit; font-size: 13px;
  color: var(--dox-ink); background: var(--dox-card); border: 1px solid var(--dox-line-warm);
  border-radius: 9px; padding: 9px 11px; width: 100%; }
.disc-field input:focus, .disc-field textarea:focus, .disc-field select:focus {
  outline: 2px solid var(--dox-accent-strong); outline-offset: 1px; }
.disc-field textarea { resize: vertical; min-height: 84px; line-height: 1.55; }
.disc-newfoot { display: flex; align-items: center; gap: 9px; }
.disc-newfoot .disc-send { margin-left: auto; }

/* ---------- panel ---------- */
/* A 490px column cannot hold list and topic side by side, so the panel stacks them and gives the topic
   most of the height. */
.disc--panel { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); }
.disc--panel .disc-side { border-right: 0; border-bottom: 1px solid var(--dox-line-warm); }
.disc--panel .disc-side-head { padding: 11px 12px 7px; }
.disc--panel .disc-levels { margin: 0 8px 7px; }
.disc--panel .disc-side-where, .disc--panel .disc-secpick { padding-bottom: 7px; }
.disc--panel .disc-secpick { margin-bottom: 7px; }
/* The list is the way in, not the thing being read: bound it so the topic keeps the height. */
.disc--panel .disc-scroll { max-height: 148px; }
.disc--panel .disc-read-in { padding: 15px 14px 24px; }
.disc--panel .disc-detail h2 { font-size: 19px; }

@media (max-width: 900px) {
  .disc { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); }
  .disc-side { border-right: 0; border-bottom: 1px solid var(--dox-line-warm); }
  .disc-scroll { max-height: 148px; }
  .disc-read-in { padding: 16px 15px 28px; }
  .disc-detail h2 { font-size: 20px; }
}

/* ---- chat page type scale (#148) ------------------------------------------------------
   The dedicated page is a reading surface with a whole window of room; the panel's scale exists to fit a
   narrow column. Every size here is the base value x1.20, scoped to the page, and it covers the list as
   well as the conversation so the two are at one ratio. */
.disc--page .disc-title { font-size: 16.8px; }
.disc--page .disc-levels button { font-size: 14.28px; font-weight: 400; }
.disc--page .disc-levels button.on { font-weight: 400; }
.disc--page .disc-side-where { font-size: 13.2px; }
.disc--page .disc-secpick { font-size: 16.8px; }
.disc--page .disc-row-t { font-size: 16.8px; }
.disc--page .disc-row-w { font-size: 12.6px; }
.disc--page .disc-blank { font-size: 14.4px; }
.disc--page .disc-blank span { font-size: 13.8px; }
.disc--page .disc-detail h2 { font-size: 25.5px; }
.disc--page .disc-desc p { font-size: 16.524px; }
.disc--page .disc-reply-count { font-size: 10.71px; }
.disc--page .disc-reply-top b { font-size: 12.75px; }
.disc--page .disc-reply-top time { font-size: 10.71px; }
.disc--page .disc-reply p { font-size: 15.912px; }
.disc--page .disc-composer textarea { font-size: 15.912px; }
.disc--page .disc-send, .disc--page .disc-ghost { font-size: 15px; }
.disc--page .disc-newcard h3 { font-size: 18px; }
.disc--page .disc-field label { font-size: 12.6px; }
.disc--page .disc-field input, .disc--page .disc-field textarea,
.disc--page .disc-field select { font-size: 15.6px; }
/* Larger initials need a larger circle, or they touch the edge. */
.disc--page .disc-reply { grid-template-columns: 27px minmax(0, 1fr); gap: 11px; }
.disc--page .disc-av { width: 27px; height: 27px; font-size: 9.69px; }

@media (max-width: 900px) {
  .disc--page .disc-detail h2 { font-size: 24px; }
}

/* ---- panel: two screens (#151) ---------------------------------------------------------
   The panel is 514px wide: enough for a real list OR a real conversation, not both. Splitting its
   height turned the list into a postbox that showed two titles at a time, which stops scaling as soon
   as a project has a dozen discussions. So the panel shows one screen at a time and the page, which
   has the width, keeps the side-by-side layout. */
.disc-backbtn { flex: 0 0 auto; width: 26px; height: 26px; display: grid; place-items: center;
  border-radius: 7px; border: 1px solid var(--dox-line-warm); background: var(--dox-card);
  color: var(--dox-muted); cursor: pointer; padding: 0; transition: .13s; }
.disc-backbtn:hover { border-color: var(--dox-accent); color: var(--dox-accent); }

.disc--panel { display: flex; flex-direction: column; }
/* The list takes the whole panel: every title visible at once, which is the point of the list. */
.disc--panel .disc-side { border: 0; flex: 1 1 auto; min-height: 0; }
/* With a thread open the side collapses to its header strip, so the conversation gets the height. */
.disc--panel .disc-side.on-thread { flex: 0 0 auto; border-bottom: 1px solid var(--dox-line-warm); }
.disc--panel .disc-side.on-thread .disc-side-head { padding-bottom: 9px; }
/* No bounded window: the list scrolls only when the panel cannot hold it, not at a fixed 148px. */
.disc--panel .disc-scroll { max-height: none; flex: 1 1 auto; min-height: 0; }
.disc--panel .disc-read { flex: 1 1 auto; min-height: 0; }

.disc-thread-head { display: flex; align-items: center; gap: 9px; padding: 11px 14px 6px;
  font-size: 12.5px; font-weight: 650; color: var(--dox-faint); }

/* The section gate: choosing a section is a step, so until it is taken the pane says so rather than
   listing every section's discussions as if they were one scope. */
.disc-gate { flex: 1 1 auto; display: grid; place-items: center; padding: 28px 20px;
  font-size: 15.3px; color: var(--dox-faint); text-align: center; }
.disc--page .disc-gate { font-size: 18.4px; }
/* The section picker is a real control now, so it needs a control's padding. */
.disc-secpick { padding: 8px 10px; margin: 0 10px 9px; width: calc(100% - 20px); }

/* ---- new-discussion button + chat tab rule (#153) -----------------------------------------------
   The plus is the primary action on the list screen, so it takes the accent colour with a white icon.
   Block-centring the SVG matters: as an inline glyph it sat low and right, because line-height pushed it
   below the baseline and the button's padding was asymmetric around it. */
.disc-newbtn { width: 30px; height: 30px; display: grid; place-items: center; padding: 0;
  border: 0; border-radius: 8px; background: var(--dox-accent); color: #fff;
  box-shadow: 0 1px 2px var(--dox-shadow); transition: .13s; }
.disc-newbtn:hover { background: var(--dox-accent-deep); color: #fff; }
.disc-newbtn svg { display: block; margin: 0; flex: 0 0 auto; }

/* The dedicated page already rules everything; a hard line under the open Chat tab is noise on top of it. */
#tab-chat[aria-selected="true"] { border-bottom-color: transparent; }

/* ---- panel: align with the document tab row (#159) -----------------------------------------------
   The tab row (Write / Preview / History) is the same kind of control as the scope switcher, and it is the
   established size, so both the switcher and the list titles in the panel match it. The page keeps its larger
   list titles: it has a 1092px conversation pane beside the list, where the panel is 514px and wraps. */
.disc--panel .disc-levels button { font-size: 16.8px; }
.disc--panel .disc-row-t { font-size: 16.8px; }

/* The section dropdown sits directly under the scope switcher in the same column (#163). Two controls selecting
   scope and section respectively, 0.8px apart, read as a mistake rather than a hierarchy -- so both are 16.8px. */
.disc--panel .disc-secpick { font-size: 16.8px; }

/* ---- section content was unscrollable (#166) ------------------------------------------------
   .rich-editor is the editor's frame -- a bordered, rounded box. Its `overflow: hidden` was there to clip the
   toolbar to the rounded corners, but it also clipped the document body: measured 2487px of content inside a
   633px box, so the content was not merely unscrolled, it was unreachable, and every ancestor was exactly
   viewport height with nothing to scroll. Reveal the vertical axis and let the pane scroll. */
.rich-editor { overflow: visible; }
.document-focus .workspace > .editor { overflow-y: auto; }
/* The toolbar keeps its own clipping so its rounded top corners still hold. */
.rich-editor .format-toolbar { border-radius: 8px 8px 0 0; }

/* ---- notifications tab in the settings panel (#168) ----------------------------------------- */
.notif-row { padding: 9px 0; border-bottom: 1px solid var(--dox-line-warm, #dfe6dc); }
.notif-row:last-child { border-bottom: 0; }
.notif-row.unread { border-left: 2px solid var(--dox-accent); padding-left: 9px; margin-left: -11px; }
.notif-what { font-size: 13px; line-height: 1.45; color: var(--dox-ink, #20332f); }
.notif-when { font-size: 11px; color: var(--dox-faint, #6c7e74); margin-top: 2px; }

/* ---- conversation panel reachable in focus mode (#170) ------------------------------------------
   Focus mode hides chrome, not capability. Two things had to change:

   1. The fullscreen target. Fullscreening the editor host put the document in a separate top layer where the
      conversation panel -- a sibling outside the host -- could not render at all. The workspace goes fullscreen
      instead, and it contains both.
   2. The selectors. `.document-workspace` was never a class; the workspace has id="document-workspace", so the
      original rule was dead and focus mode leaned entirely on the fullscreen element.

   The workspace is already the full width of main, so it is NOT forced to block (that collapsed the grid and
   squeezed everything into the sidebar track). It stays the grid it already is: one column closed, two open. */
body.editor-focus #document-workspace{height:100dvh;min-height:0}
body.editor-focus #document-workspace > .editor{height:100dvh;overflow-y:auto;border:0!important}
/* .chat-open is on the shell, not on body -- so scope through it. */
body.editor-focus .shell.chat-open #document-workspace{grid-template-columns:minmax(0,1fr) var(--chat-w)!important}
body.editor-focus .shell.chat-open #document-workspace > .editor{grid-column:1;grid-row:1;margin:0;padding:16px 0}
body.editor-focus .shell.chat-open #document-workspace > .chat-panel{grid-column:2;grid-row:1}
/* The toggle must stay reachable in focus mode: it is now the way in. */
body.editor-focus .rich-editor.focus-mode .format-toolbar{position:sticky;top:0}

/* In focus mode the sidebar is display:none, so it holds no grid track and `main` auto-places into the
   FIRST (64px) column instead of the second -- every ancestor then measures 64px and the document renders as a
   sliver. Pin main to the full width explicitly. This was the real cause of the broken focus layout, which the
   dead .document-workspace selector had been masking. */
body.editor-focus .shell.document-focus{grid-template-columns:minmax(0,1fr)!important}
body.editor-focus .shell.document-focus > main{grid-column:1/-1;width:100%}

/* In focus mode with the panel open, the scrubber still declares grid-column:1 and, being 1440 wide, forces
   column 1 to full width so the editor and panel both stretch across it. The scrubber has no place here: focus
   mode plus an open conversation already replaces the TOC. */
body.editor-focus .shell.chat-open #document-workspace > .section-scrubber{display:none!important}
body.editor-focus .shell.chat-open #document-workspace{grid-template-columns:minmax(0,1fr) var(--chat-w)!important}
body.editor-focus .shell.chat-open #document-workspace > .panel.editor{grid-column:1;min-width:0}
body.editor-focus .shell.chat-open #document-workspace > .chat-panel{grid-column:2;min-width:0}

/* ---- heading-row bell vertical centring (#172) ---------------------------------------------------
   The bell sat high against the zoom control and account cluster beside it. 7px of margin-bottom is the amount
   that puts its optical box on the row's centre line; the badge (top:-4px) adds height above the icon but not
   below, which is what made the existing offset read as a tilt rather than an offset.
   Scoped to the heading row: the shell topbar bell has different neighbours and is untouched. */
/* The heading-row bell already centres: measured bellMid 45 against siblings at 45 on a rowMid of 46. A
   margin-bottom here moves it DOWN in flow terms but its centre rose to 42, so it was misalignment introduced by
   the fix rather than cured by it. Left unset deliberately. */

/* ---- publishing page (#169) --------------------------------------------------------------------
   A profile is one version per section: the artefact that says what an issue will contain. List on the left,
   the chosen profile's sections on the right, each with promote/demote. */
.publishing-inline { padding: 20px clamp(16px,3vw,40px); }
.pub { display: grid; grid-template-columns: 300px minmax(0,1fr); gap: 22px; align-items: start; }
.pub-head { grid-column: 1 / -1; }
.pub-head h2 { margin: 0 0 4px; font-size: 22px; }
.pub-head p { margin: 0; font-size: 13px; }
.pub-bar { grid-column: 1 / -1; display: flex; gap: 8px; }
.pub-list { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.pub-row { text-align: left; padding: 10px 12px; border: 1px solid var(--dox-line-warm,#dfe6dc);
  border-radius: 8px; background: var(--dox-card,#fff); cursor: pointer; display: block; width: 100%; }
.pub-row.on { border-color: var(--dox-accent,#1d4ed8); box-shadow: inset 3px 0 var(--dox-accent,#1d4ed8); }
.pub-row-t { display: block; font-size: 14px; font-weight: 600; color: var(--dox-ink,#20332f); }
.pub-row-m { display: block; font-size: 11.5px; color: var(--dox-faint,#6c7e74); margin-top: 2px; }
.pub-detail { min-width: 0; }
.pub-detail-head { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.pub-detail-head input { flex: 1 1 220px; font-size: 14px; padding: 8px 11px; }
.pub-actions { display: flex; gap: 8px; }
.pub-note { background: var(--dox-raised,#f4f6fa); border-radius: 8px; padding: 10px 13px;
  font-size: 12.5px; margin-bottom: 14px; }
.pub-note ul { margin: 6px 0 0; padding-left: 18px; }
.pub-sections { border-top: 1px solid var(--dox-line-warm,#dfe6dc); }
.pub-sec { display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 10px 0; border-bottom: 1px solid var(--dox-line-warm,#dfe6dc); }
.pub-sec-name { min-width: 0; font-size: 13.5px; }
.pub-sec-redacted { font-size: 11px; color: var(--dox-faint,#6c7e74); margin-left: 8px; }
.pub-sec-ver { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.pub-ver-label { font-size: 12.5px; min-width: 84px; text-align: center; font-variant-numeric: tabular-nums; }
@media (max-width: 900px) { .pub { grid-template-columns: minmax(0,1fr); } }

/* ---- review queue (#173) -------------------------------------------------------------------------
   A push is an offer and a merge is the acceptance, so this surface shows the offer, what it replaces,
   and one way to decide. Queue on the left because several sections can be waiting at once. */
.tab-count { display: inline-grid; place-items: center; min-width: 17px; height: 17px; margin-left: 6px;
  padding: 0 4px; border-radius: 9px; background: var(--danger, #b3261e); color: #fff;
  font-size: 11px; font-weight: 600; line-height: 1; vertical-align: middle; }
.rq { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 20px; align-items: start; }
.rq-head { grid-column: 1 / -1; }
.rq-head h3 { margin: 0 0 4px; font-size: 19px; }
.rq-head p { margin: 0; font-size: 13px; }
.rq-list { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.rq-row { position: relative; text-align: left; padding: 10px 12px; border: 1px solid var(--dox-line-warm, #dfe6dc);
  border-radius: 8px; background: var(--dox-card, #fff); cursor: pointer; display: block; width: 100%; }
.rq-row.on { border-color: var(--dox-accent, #1d4ed8); box-shadow: inset 3px 0 var(--dox-accent, #1d4ed8); }
.rq-row-t { display: block; font-size: 13.5px; font-weight: 600; }
.rq-row-m { display: block; font-size: 11.5px; color: var(--dox-faint, #6c7e74); margin-top: 2px; }
.rq-dot { position: absolute; top: 11px; right: 11px; width: 7px; height: 7px; border-radius: 50%;
  background: var(--danger, #b3261e); }
.rq-detail { min-width: 0; }
.rq-detail-head { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between;
  flex-wrap: wrap; margin-bottom: 12px; }
.rq-detail-head h4 { margin: 0 0 3px; font-size: 16px; }
.rq-detail-head p { margin: 0; font-size: 12.5px; }
.rq-actions { display: flex; gap: 8px; flex: 0 0 auto; }
.rq-cmp { border-top: 1px solid var(--dox-line-warm, #dfe6dc); padding-top: 12px; }
.rq-picks { display: flex; gap: 9px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; font-size: 13px; }
.rq-picks label { margin: 0; font-weight: 400; font-size: 13px; }
.rq-ver { width: auto; min-width: 96px; padding: 6px 9px; font-size: 13px; }
.rq-body .text-diff { font-size: 13px; padding: 16px; }
/* Read-only conversation transcript on the History tab (#185). Collapsed by default: a transcript is bulky and
   most visits to History are about versions, so the panel costs nothing until it is opened, and the fetch happens
   on first expand rather than on tab entry. */
/* People page member search (#185). Matches the document repository's search so the two pages behave alike. */
.member-search { position: relative; display: flex; align-items: center; gap: 8px; margin: 0 0 12px;
  padding: 7px 11px; border: 1px solid var(--dox-line-warm, #dfe6dc); border-radius: 7px; background: #fff; }
.member-search span { color: var(--dox-faint, #93a29a); font-size: 14px; line-height: 1; }
.member-search input { border: 0; outline: 0; background: transparent; font: inherit; font-size: 13px;
  color: var(--dox-ink, #20332f); width: 100%; padding: 0; }
.member-row[hidden] { display: none; }
.history-convo { margin-top: 18px; border: 1px solid var(--dox-line-warm, #dfe6dc); border-radius: 8px;
  background: var(--dox-panel, #fff); }
.history-convo > summary { cursor: pointer; padding: 11px 14px; font-size: 13px; font-weight: 600;
  color: var(--dox-ink, #20332f); list-style: none; display: flex; align-items: baseline; gap: 9px; }
.history-convo > summary::-webkit-details-marker { display: none; }
.history-convo > summary::before { content: "▸"; color: var(--dox-faint, #93a29a); font-size: 11px;
  transition: transform .12s ease; }
.history-convo[open] > summary::before { transform: rotate(90deg); }
.history-convo > summary small { font-weight: 400; font-size: 11.5px; color: var(--dox-faint, #93a29a); }
.history-convo-body { border-top: 1px solid var(--dox-line-warm, #dfe6dc); padding: 4px 14px 14px;
  max-height: 420px; overflow: auto; }
.convo-thread { padding-top: 12px; }
.convo-thread h4 { margin: 0 0 8px; font-size: 12.5px; font-weight: 650; color: var(--dox-ink, #20332f); }
.convo-msg { padding: 7px 0; border-top: 1px solid #f0eee9; }
.convo-msg:first-of-type { border-top: 0; }
.convo-meta { font-size: 11px; color: var(--dox-faint, #93a29a); margin-bottom: 2px; }
.convo-msg p { margin: 0; font-size: 13px; line-height: 1.55; color: #3c4c47; white-space: pre-wrap; }
/* Approval is a DECISION surface (#185). History answers "what happened"; this answers "should this become
   master?" -- so it carries an amber accent, future-tense verbs, one fixed version pair and a decision bar that
   stays in reach. The shared diff keeps the two reading consistently. */
.rq { --rq-amber: #b4791f; --rq-amber-bg: #fcf4e4; --rq-amber-line: #ebd9ae; }
.rq-group-h { font-size: 10.5px; letter-spacing: .11em; text-transform: uppercase; font-weight: 700;
  color: var(--dox-faint, #93a29a); padding: 10px 2px 5px; }
.rq-group-h:first-child { padding-top: 2px; }
.rq-row.decided { opacity: .72; }
.rq-row.waiting.on { border-color: var(--rq-amber); box-shadow: inset 3px 0 var(--rq-amber); }
.rq-row-outcome { position: absolute; top: 10px; right: 10px; font-size: 10px; font-weight: 700;
  letter-spacing: .03em; padding: 1px 6px; border-radius: 20px; background: #ece9e3; color: #6d6459; }
.rq-detail { display: flex; flex-direction: column; }
.rq-pair { display: flex; align-items: center; gap: 7px; flex: 0 0 auto; }
.rq-v { font-size: 11.5px; font-weight: 700; padding: 3px 9px; border-radius: 5px; white-space: nowrap; }
.rq-v-from { background: #f0eee9; color: #7c6f5f; }
.rq-v-to { background: var(--rq-amber); color: #fff; }
.rq-v-to.settled { background: #5a6b64; }
.rq-pair-arrow { color: var(--dox-faint, #93a29a); font-size: 12px; }
.rq-reason { margin: 12px 0 0; padding: 10px 13px; background: #fbfaf7; border: 1px solid #efede8;
  border-left: 2px solid var(--rq-amber); border-radius: 0 6px 6px 0; font-size: 13px; color: #3c4c47; }
.rq-summary { display: flex; gap: 7px; flex-wrap: wrap; margin: 14px 0 9px; }
.rq-chip { font-size: 11.5px; padding: 3px 9px; border-radius: 20px; border: 1px solid #dfe6dc;
  background: #fff; color: #41544f; }
.rq-chip.add { background: #dcefe1; border-color: #c6e2ce; color: #1f5b33; font-weight: 600; }
.rq-chip.rem { background: #fbe7e7; border-color: #f3d2d2; color: #8c2f2f; font-weight: 600; }
.rq-body { flex: 1 1 auto; min-height: 0; }
.rq-decide { margin-top: 16px; padding-top: 13px; border-top: 1px solid #dfe6dc; display: flex;
  align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.rq-decide-hint { margin: 0; font-size: 12.5px; color: #6c7e74; max-width: 52ch; }
.rq-decide.live { position: sticky; bottom: 0; background: var(--dox-panel, #fff); padding-bottom: 6px;
  box-shadow: 0 -6px 14px rgba(32,51,47,.04); z-index: 2; }
.rq-badge { font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 20px;
  background: var(--rq-amber-bg); color: var(--rq-amber); border: 1px solid var(--rq-amber-line); }
.rq-badge.settled { background: #ece9e3; color: #6d6459; border-color: #dcd7cd; }
.rq-frozen { flex: 1 0 100%; margin: 6px 0 0; font-size: 12px; }
@media (max-width: 900px) { .rq { grid-template-columns: minmax(0, 1fr); } }

/* ---- published version picker (#63) ---------------------------------------------------------------
   Only merged versions are listed: a push is the team offering a completed section and a merge is the
   privs accepting it, so a draft is work in progress and never publishable. */
.toc-row { position: relative; }
.toc-vers { position: absolute; top: 8px; right: 6px; padding: 1px 6px; font-size: 11px; line-height: 1.5;
  border: 1px solid var(--dox-line-warm, #dfe6dc); border-radius: 10px; background: var(--dox-card, #fff);
  color: var(--dox-faint, #6c7e74); cursor: pointer; opacity: 0; transition: opacity .12s ease; }
.toc-row:hover .toc-vers, .toc-row.active .toc-vers { opacity: 1; }
.toc-vers:hover { color: var(--dox-accent, #1d4ed8); border-color: var(--dox-accent, #1d4ed8); }
.vp-pop { position: fixed; z-index: 60; width: 320px; max-height: 70vh; overflow: auto; padding: 14px;
  border: 1px solid var(--dox-line-warm, #dfe6dc); border-radius: 10px; background: var(--dox-card, #fff);
  box-shadow: 0 12px 40px #1b263226; }
.vp-title { font-size: 13.5px; font-weight: 600; margin-bottom: 2px; }
.vp-hint { font-size: 11.5px; margin: 0 0 10px; line-height: 1.5; }
.vp-list { display: flex; flex-direction: column; gap: 4px; }
.vp-row { text-align: left; width: 100%; padding: 8px 10px; border: 1px solid transparent; border-radius: 7px;
  background: transparent; cursor: pointer; display: block; }
.vp-row:hover { background: var(--dox-accent-soft-tint, #f2f6f9); }
.vp-row.on { border-color: var(--dox-accent, #1d4ed8); }
.vp-row.current .vp-row-t { color: var(--dox-accent, #1d4ed8); }
.vp-row-t { display: block; font-size: 13px; font-weight: 600; }
.vp-row-m { display: block; font-size: 11.5px; color: var(--dox-faint, #6c7e74); margin-top: 1px; }
.vp-empty { font-size: 12px; line-height: 1.6; }
.vp-actions { display: flex; gap: 8px; margin-top: 10px; padding-top: 10px;
  border-top: 1px solid var(--dox-line-warm, #dfe6dc); }
.vp-body { display: flex; flex-direction: column; gap: 10px; }
.vp-banner { font-size: 12.5px; padding: 8px 11px; border-radius: 7px;
  background: var(--dox-raised, #f4f6fa); color: var(--dox-ink, #20332f); }
.vp-banner span { color: var(--dox-faint, #6c7e74); }
.vp-content { border: 1px solid var(--dox-line-warm, #dfe6dc); border-radius: 8px; padding: 20px; }
#content.is-previewing { cursor: default; }

/* Publish view: the editor's toolbar and draft chrome do not belong over a read-only version. */
.panel.editor.is-previewing .format-toolbar,
.panel.editor.is-previewing #draft-label,
.panel.editor.is-previewing #draft-state { display: none !important; }
.vp-body .vp-actions { border-top: 0; padding-top: 0; margin-top: 0; justify-content: flex-end; }

/* ---- review tab (#175) --------------------------------------------------------------------------
   Review answers "what needs my decision"; History answers "what happened". Separate tabs, because a
   reviewer should not scroll past a growing pile of history to reach a decision. */
.approval-view { padding: 20px clamp(16px,3vw,40px); }

/* ---- Group page (#179) --------------------------------------------------------------------------------------- */
.grp-head { padding: 4px 0 18px; border-bottom: 1px solid var(--dox-line-warm); margin-bottom: 20px; }
.grp-head h1 { font-size: 24px; font-weight: 700; letter-spacing: -0.02em; margin: 4px 0 8px; color: var(--dox-ink); }
.grp-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.grp-chip { padding: 2px 9px; border-radius: 8px; font-size: 12px; color: var(--dox-muted);
  background: var(--dox-card); border: 1px solid var(--dox-line-warm); }
.grp-cols { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.4fr); gap: 20px; align-items: start; }
.grp-card { background: var(--dox-card); border: 1px solid var(--dox-line-warm); border-radius: 14px; padding: 18px; }
.grp-cardhead { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.grp-cardhead h2 { font-size: 14px; font-weight: 700; margin: 0; color: var(--dox-ink); }
.grp-cardhead p { margin: 2px 0 0; font-size: 11px; }
.grp-members { list-style: none; margin: 0; padding: 0; }
.grp-members li { display: flex; align-items: center; gap: 9px; padding: 7px 0;
  border-bottom: 1px solid color-mix(in srgb, var(--dox-line-warm) 60%, transparent); font-size: 13px; }
.grp-members li:last-child { border-bottom: 0; }
.grp-av { width: 27px; height: 27px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0;
  font-size: 10px; font-weight: 600; color: #fff; background: var(--dox-accent); }
.grp-name { font-weight: 600; color: var(--dox-ink); }
.grp-mail { margin-left: auto; font-size: 11px; }
.grp-editor { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--dox-line-warm); }
.grp-picker { display: grid; grid-template-columns: repeat(auto-fill,minmax(160px,1fr)); gap: 6px; margin: 10px 0; }
.grp-pick { display: flex; align-items: center; gap: 7px; font-size: 12px; padding: 5px 7px; border-radius: 8px;
  border: 1px solid var(--dox-line-warm); background: var(--dox-ground); cursor: pointer; }
.grp-actions { display: flex; gap: 8px; margin-top: 10px; }
.grp-thread { display: flex; flex-direction: column; gap: 12px; }
.grp-post { border: 1px solid var(--dox-line-warm); border-radius: 10px; padding: 12px; background: var(--dox-ground); }
.grp-post h3 { font-size: 13px; font-weight: 700; margin: 0 0 8px; color: var(--dox-ink); }
.grp-msg { font-size: 13px; padding: 6px 0; border-top: 1px solid color-mix(in srgb, var(--dox-line-warm) 60%, transparent); }
.grp-msg strong { color: var(--dox-ink); font-size: 12px; }
.grp-msg p { margin: 2px 0 0; color: var(--dox-muted); line-height: 1.55; }
.pdr-group { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%;
  border: 0; background: none; padding: 0; font: inherit; font-size: 12px; color: var(--dox-ink);
  cursor: pointer; text-align: left; }
.pdr-group:hover .pdr-groupname { color: var(--dox-accent); text-decoration: underline; }
.pdr-row-busy { opacity: .55; cursor: progress; }
.pdr-teamlist li { padding: 0; }
.pdr-teamlist .pdr-group { padding: 5px 0; }
@media (max-width: 900px) { .grp-cols { grid-template-columns: minmax(0,1fr); } }

/* ---- People page group cards open the group page (#179) ------------------------------------------------------ */
.people-group { position: relative; cursor: pointer; transition: border-color .12s ease, background .12s ease; }
.people-group:hover { border-color: var(--dox-line-stronger); background: var(--dox-ground); }
.people-group:focus-visible { outline: 2px solid var(--dox-accent); outline-offset: 2px; }
.people-group-open { position: absolute; top: 14px; right: 16px; font-size: 11px; font-weight: 500;
  color: var(--dox-accent); opacity: 0; transition: opacity .12s ease; }
.people-group:hover .people-group-open { opacity: 1; }
.grp-desc { font-size: 13px; line-height: 1.6; color: var(--dox-muted); max-width: 70ch; margin: 0 0 10px; }
.grp-desc--empty { font-style: italic; opacity: .8; }
.grp-lab { display: block; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em;
  color: var(--dox-muted); margin: 10px 0 4px; }
.grp-editor input[type="text"], .grp-editor textarea { width: 100%; padding: 8px 10px; border-radius: 10px;
  border: 1px solid var(--dox-line-warm); background: var(--dox-ground); color: var(--dox-ink);
  font-family: inherit; font-size: 13px; }
.grp-editor input[type="text"]:focus, .grp-editor textarea:focus { outline: none; border-color: var(--dox-accent);
  background: var(--dox-card); }
.grp-editor textarea { resize: vertical; line-height: 1.55; }

/* ---- Person profile: identity + memberships (#181) ----------------------------------------------------------- */
.mp-card { border: 1px solid var(--dox-line-warm); border-radius: 12px; padding: 16px; background: var(--dox-card);
  margin-bottom: 16px; }
.mp-identity { display: flex; align-items: center; gap: 12px; padding-bottom: 12px;
  border-bottom: 1px solid var(--dox-line-warm); }
.mp-avatar { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0;
  background: var(--dox-accent); color: #fff; font-size: 15px; font-weight: 700; }
.mp-identity h3 { margin: 0; font-size: 15px; font-weight: 700; color: var(--dox-ink); }
.mp-email { margin: 2px 0 0; font-size: 12px; }
.mp-email a { color: var(--dox-accent); text-decoration: none; }
.mp-email a:hover { text-decoration: underline; }
.mp-stats { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 6px; margin: 14px 0; }
.mp-stat { text-align: center; padding: 8px 4px; border-radius: 8px; background: var(--dox-ground); }
.mp-stat strong { display: block; font-size: 16px; color: var(--dox-ink); font-variant-numeric: tabular-nums; }
.mp-stat span { font-size: 10px; text-transform: uppercase; letter-spacing: .05em; color: var(--dox-muted); }
.mp-block { margin-top: 14px; }
.mp-block h4 { margin: 0 0 8px; font-size: 12px; text-transform: uppercase; letter-spacing: .05em;
  color: var(--dox-muted); display: flex; align-items: center; gap: 8px; }
.mp-count { font-size: 10px; text-transform: none; letter-spacing: 0; color: var(--dox-faint); }
.mp-list { list-style: none; margin: 0; padding: 0; }
.mp-list li { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px;
  padding: 5px 0; border-bottom: 1px solid color-mix(in srgb, var(--dox-line-warm) 60%, transparent); }
.mp-list li:last-child { border-bottom: 0; }
.mp-tag { padding: 1px 7px; border-radius: 6px; font-size: 10px; font-weight: 600; text-transform: uppercase;
  letter-spacing: .04em; background: var(--dox-accent-tint); color: var(--dox-accent-deep); white-space: nowrap; }
.mp-project { border: 1px solid var(--dox-line-warm); border-radius: 10px; padding: 10px 12px; margin-bottom: 10px; }
.mp-project-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.mp-project-head strong { font-size: 13px; color: var(--dox-ink); }
.mp-sub { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.mp-sub-label { font-size: 10px; text-transform: uppercase; letter-spacing: .05em; color: var(--dox-muted); }
.mp-pill { padding: 1px 8px; border-radius: 99px; font-size: 11px; background: var(--dox-raised);
  color: var(--dox-ink); border: 1px solid var(--dox-line-warm); }
.mp-doc { margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--dox-line-warm); }
.mp-doc-title { font-size: 12px; font-weight: 600; color: var(--dox-ink); margin-bottom: 4px; }
.mp-sec { display: flex; align-items: center; gap: 8px; font-size: 12px; padding: 3px 0; color: var(--dox-muted); }
.mp-sec > span:first-child { flex: 1; color: var(--dox-ink); }
.mp-level { padding: 0 6px; border-radius: 5px; font-size: 10px; font-weight: 600; text-transform: uppercase; }
.mp-level--edit { background: color-mix(in srgb, #10b981 14%, transparent); color: #0f766e; }
.mp-level--read { background: var(--dox-raised); color: var(--dox-muted); }
.mp-via { font-size: 10px; color: var(--dox-faint); font-style: italic; }
.mp-none { font-size: 12px; margin: 4px 0; }
@media (max-width: 560px) { .mp-stats { grid-template-columns: repeat(3, minmax(0,1fr)); } }

/* @mention in a conversation (api#68). Only names the server resolved are marked, so this never appears on a typo. */
.disc-mention { padding: 0 3px; border-radius: 4px; font-weight: 600;
  background: var(--dox-accent-tint); color: var(--dox-accent-deep); }

/* Cover designer: free text is a textarea, so it needs to look like the field it replaced (#184). */
.designer-inspector textarea { width: 100%; padding: 7px 9px; border: 1px solid var(--dox-line-warm);
  border-radius: 8px; background: var(--dox-ground); color: var(--dox-ink); font-family: inherit;
  font-size: 13px; line-height: 1.45; resize: vertical; min-height: 44px; }
.designer-inspector textarea:focus { outline: none; border-color: var(--dox-accent); background: var(--dox-card); }
/* The sheet keeps a stored newline as a line, matching what the PDF and DOCX exports already do. */
.designer-element-content { white-space: pre-wrap; overflow-wrap: anywhere; }
