/* A dedicated conversation pane: only the log scrolls; composition stays in view. */
.chat-panel{min-width:0;min-height:0;height:100%;display:flex;flex-direction:column;background:#fff;border-right:1px solid #e6e8e4;color:#303530;overflow:hidden}
.chat-panel[hidden]{display:none!important}.chat-panel .chat-header{display:flex;align-items:center;justify-content:space-between;gap:12px;height:55px;min-height:55px;padding:0 22px;border-bottom:1px solid #eef0eb;flex-shrink:0}.chat-panel h2{font-size:13px;font-weight:550;margin:0;white-space:nowrap}.chat-heading-actions{display:flex;align-items:center;gap:13px}.chat-heading-actions>button{border:0;background:transparent;color:#79836f;font-size:11px;padding:5px 0;white-space:nowrap}.chat-heading-actions>button:hover:not(:disabled){color:#424e3b}.chat-heading-actions>button:disabled{opacity:.4;cursor:default}.chat-heading-actions>.chat-close{font-size:22px;padding:0 2px;line-height:1;color:#a4ab9a}
.chat-panel .chat-messages{display:flex;flex-direction:column;gap:26px;flex:1;min-height:0;max-height:none;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;padding:26px 22px 24px;scroll-padding:24px}.chat-panel .chat-message{font-size:14px;line-height:1.85;white-space:pre-wrap;overflow-wrap:anywhere;color:#444c3f;max-width:100%;width:100%;align-self:flex-start;padding:0;background:none;border:0;border-radius:0;flex-shrink:0}.chat-panel .chat-message.user{background:#f1f3ef;padding:11px 14px;border-radius:11px;color:#343d2f;width:auto;max-width:92%;align-self:flex-end}.chat-panel .chat-message.assistant::before{content:'PictoSheets';display:block;color:#849276;font-size:11px;line-height:1;margin:1px 0 12px;letter-spacing:.1px}.chat-panel .chat-message strong{font-weight:600;color:#364a32}.chat-panel .chat-message code{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:.9em;padding:2px 4px;background:#f1f4ed;border-radius:3px}.chat-panel .chat-message.error{border-left:2px solid #c7b68a;padding-left:12px}.chat-panel[data-empty=true] .chat-messages{justify-content:center}.chat-panel[data-empty=true] .chat-message{color:#939d88;font-size:14px;max-width:30ch;margin:0 auto}.chat-panel[data-empty=true] .chat-message.assistant::before{font-size:12px;color:#5e7151;margin-bottom:16px}
.chat-operations{font-size:10px;color:#a1a98f;margin-top:12px;white-space:normal}.chat-operations summary{cursor:pointer}.chat-operations p{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:10px;line-height:1.8;margin:8px 0;padding:6px 9px;border-left:1px solid #dce3d2;color:#859373;overflow-wrap:anywhere}
.chat-bottom{flex-shrink:0;padding:0 18px 15px;background:#fff}.chat-suggestions{display:flex;gap:6px;flex-wrap:wrap;margin:0 0 11px}.chat-suggestions:empty{display:none}.chat-suggestions button{background:#fff;border:1px solid #e7ebdf;color:#77846a;border-radius:6px;padding:6px 9px;font:inherit;font-size:11px;line-height:1.5;text-align:left}.chat-suggestions button:hover:not(:disabled){background:#f6f8f1;color:#5a6e49}.chat-composer{border:1px solid #e0e5d8;border-radius:13px;background:#fbfcf9;padding:2px;box-shadow:0 2px 5px #253c2304;transition:border-color .15s}.chat-composer:focus-within{border-color:#b5c5a9;box-shadow:0 0 0 2px #dde7d131}.chat-panel #chatInput{display:block;width:100%;resize:none;min-height:82px;height:82px;max-height:160px;padding:12px 12px 6px;border:0;border-radius:11px;font:inherit;font-size:13px;line-height:1.75;color:#4b5940;background:transparent;outline:none;scrollbar-width:thin}.chat-panel #chatInput::placeholder{color:#a2ab94}.chat-compose-actions{display:flex;align-items:center;justify-content:space-between;gap:9px;padding:4px 8px 8px}.chat-compose-actions small{font-size:9px;color:#9aa88a;margin-right:auto}.chat-panel #chatSend{height:30px;min-width:30px;width:30px;padding:0;background:#40553a;color:#fff;border:0;border-radius:50%;font-size:0;display:grid;place-items:center;flex-shrink:0}.chat-panel #chatSend::after{content:'↑';font-size:20px;line-height:1;font-family:-apple-system,BlinkMacSystemFont,sans-serif}.chat-panel #chatSend:hover:not(:disabled){background:#2c4126}.chat-panel #chatSend:disabled{opacity:.3;cursor:default}.chat-panel #chatStop{height:29px;border:1px solid #dce3d2;border-radius:6px;background:#fff;color:#75865e;padding:0 9px;font:inherit;font-size:10px}.chat-panel #chatStop[hidden]{display:none}.chat-progress{font-size:10px;line-height:1.6;color:#93a17f;padding:0 12px;margin:3px 0 6px}.chat-progress:empty{display:none}.chat-scope{font-size:10px;color:#889578;line-height:1.5;margin:9px 3px 0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.chat-panel .sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}.chat-messages[aria-busy=true]::after{content:'•••';letter-spacing:3px;color:#9aa78b;animation:chat-pulse 1.5s ease-in-out infinite;padding:0 3px;align-self:flex-start;font-size:11px}@keyframes chat-pulse{50%{opacity:.35}}@media(prefers-reduced-motion:reduce){.chat-messages[aria-busy=true]::after{animation:none}}
/* The existing workbench uses the same split pane when the assistant opens. */
body.conversation-workbench{height:100dvh;overflow:hidden;display:flex;flex-direction:column}.conversation-workbench>.topbar{height:58px;min-height:58px;padding:0 22px;flex-shrink:0}.conversation-workbench>main.page{max-width:none;width:100%;padding:0;margin:0;flex:1;min-height:0;display:flex;flex-direction:column;overflow:hidden}.conversation-workbench #workspace{display:grid;grid-template-columns:clamp(350px,32vw,460px) minmax(0,1fr);grid-template-rows:auto auto auto minmax(0,1fr) auto auto;grid-template-areas:"chat title" "chat files" "chat relations" "chat review" "chat checks" "chat save";flex:1;min-height:0;overflow:hidden}.conversation-workbench #workspace>.chat-panel{grid-area:chat}.conversation-workbench .workspace-heading{grid-area:title}.conversation-workbench #fileList{grid-area:files}.conversation-workbench #relationNotice{grid-area:relations}.conversation-workbench .review-grid{grid-area:review}.conversation-workbench #checkPanel{grid-area:checks}.conversation-workbench .workspace-end{grid-area:save}.conversation-workbench .workspace-heading{padding:14px 22px;margin:0;border-bottom:1px solid #e6eae1;gap:16px;flex-shrink:0;background:#fff}.conversation-workbench .file-heading h2{font-size:14px;letter-spacing:0;margin-bottom:2px}.conversation-workbench .file-heading>span{font-size:10px}.conversation-workbench .actions{gap:8px}.conversation-workbench .actions>.secondary,.conversation-workbench .actions>.primary{padding:7px 11px;font-size:11px}.conversation-workbench .filelist{margin:0;padding:9px 20px;border-bottom:1px solid #e7ecdf;flex-shrink:0;background:#fff}.conversation-workbench #relationNotice{margin:0;padding:7px 22px;border:0;border-bottom:1px solid #e7eddf;border-radius:0;background:#fafcf6;font-size:10px;flex-shrink:0}.conversation-workbench #relationNotice button{font-size:10px}.conversation-workbench .review-grid.conversation-open{flex:1;min-height:0;gap:0;align-items:stretch;grid-template-columns:minmax(0,1fr);overflow:hidden}.conversation-workbench .review-grid>.image-panel{display:none}.conversation-workbench #workspace>.chat-panel{padding:0;border:0;border-right:1px solid #e6e8e4;border-radius:0;align-self:stretch;min-height:0;box-shadow:none}.conversation-workbench .table-panel{border:0;border-radius:0;display:flex;flex-direction:column;min-height:0;background:#fafcf7}.conversation-workbench .table-panel>.panel-header{height:55px;min-height:55px;background:#fff;padding:0 22px;flex-shrink:0}.conversation-workbench .table-panel>.table-scroll{flex:1;height:auto;max-height:none;min-height:0;margin:20px;border:1px solid #dce4d4;border-radius:7px;background:#fff;scrollbar-width:thin}.conversation-workbench .table-toolbar{background:#fff;padding:10px 22px;border-top:1px solid #e4eadc;flex-shrink:0}.conversation-workbench .sum-strip{background:#fff;padding:10px 22px;margin:0;flex-shrink:0}.conversation-workbench .check-panel{padding:8px 22px;margin:0;border-radius:0;border-left:0;border-right:0;flex-shrink:0;font-size:10px;max-height:90px;overflow:auto}.conversation-workbench .check-panel h2{font-size:10px}.conversation-workbench .workspace-end{margin:0;padding:8px 22px;border-top:1px solid #e7ecdf;flex-shrink:0;background:#fff}.conversation-workbench .workspace-end button,.conversation-workbench .save-info{font-size:10px}.conversation-workbench>.legal-footer{padding:8px 22px;margin:0;background:#fff;border-top:1px solid #edf0e8;flex-shrink:0;font-size:10px}.conversation-workbench #status:not(.hidden){margin:0;border-radius:0;padding:8px 22px;font-size:11px;flex-shrink:0}.conversation-workbench #uploadQueue{margin:0;border-radius:0;max-height:120px;overflow:auto;flex-shrink:0}#dataTable [data-agent-edited=true]{background:#f0f7e9}
@media(max-width:760px){.chat-panel .chat-header{padding:0 18px}.chat-panel .chat-messages{padding:22px 18px}.chat-bottom{padding:0 14px 12px}.conversation-workbench>.topbar{padding:0 16px}.conversation-workbench .workspace-heading{padding:10px 16px;flex-wrap:wrap}.conversation-workbench .file-heading h2{max-width:65vw}.conversation-workbench #workspace{grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr);grid-template-areas:"chat"}.conversation-workbench #workspace>:not(.chat-panel){display:none!important}.conversation-workbench .check-panel,.conversation-workbench .workspace-end,.conversation-workbench>.legal-footer{display:none}.conversation-workbench .filelist{padding:7px 16px}.conversation-workbench .engine-status{display:none}}

#conversationSourceBtn{display:none}.conversation-workbench #conversationSourceBtn{display:inline-block;padding:5px 8px;font-size:11px;border:1px solid #dfe6d6;border-radius:5px;color:#82936e}.conversation-workbench #conversationSourceBtn[aria-expanded=true]{background:#edf4e5;color:#5a7445}.conversation-workbench .table-panel>.panel-header>span{margin-left:auto}.conversation-workbench .review-grid.conversation-sources{grid-template-columns:minmax(0,1fr) 300px}.conversation-workbench .review-grid.conversation-sources>.table-panel{grid-column:1;grid-row:1}.conversation-workbench .review-grid.conversation-sources>.image-panel{grid-column:2;grid-row:1;display:flex;flex-direction:column;border:0;border-left:1px solid #e2e9da;border-radius:0;min-height:0}.conversation-workbench .review-grid.conversation-sources .image-scroll{flex:1;min-height:0;height:auto;max-height:none}.conversation-workbench .review-grid.conversation-sources .image-panel .panel-header{flex-shrink:0}.conversation-workbench .review-grid.conversation-sources .source-note{font-size:10px;flex-shrink:0}.conversation-workbench .review-grid.conversation-sources .image-controls{flex-wrap:wrap;gap:6px}.conversation-workbench .review-grid.conversation-sources .image-controls>span{display:none}@media(max-width:1100px){.conversation-workbench .review-grid.conversation-sources{grid-template-columns:minmax(0,1fr) 240px}}
/* Keep table controls compact so the preview retains useful height. */
.conversation-workbench .workspace-heading{padding:10px 20px}.conversation-workbench .filelist{padding:4px 20px}.conversation-workbench #relationNotice{padding:2px 20px}.conversation-workbench .table-panel>.panel-header{height:43px;min-height:43px;padding:0 20px}.conversation-workbench .table-panel>.table-scroll{margin:14px 20px}.conversation-workbench .table-toolbar{padding:6px 20px}.conversation-workbench .sum-strip{padding:7px 20px;font-size:11px;gap:10px;align-items:center}.conversation-workbench .sum-scope{width:auto;margin-left:auto;font-size:9px}.conversation-workbench .check-panel{padding:6px 20px;max-height:72px}.conversation-workbench .check-panel h2{margin-bottom:2px}.conversation-workbench .check-panel .issue{padding:0;margin:3px 0;font-size:10px}.conversation-workbench .workspace-end{padding:4px 20px}.conversation-workbench>.legal-footer{padding:5px 20px}

/* Uncommitted Agent proposals use the existing right pane, without a settings panel. */
.agent-result-preview[hidden]{display:none!important}.agent-proposal #dataTable,.agent-proposal>.table-toolbar,.agent-proposal>.sum-strip{display:none!important}.agent-result-preview{padding:14px;min-width:max-content}.agent-result-preview h3{font-size:13px;margin:10px 0}.agent-proposal-note{font-size:12px;color:#7d6b36;line-height:1.6;margin:0 0 12px}.agent-result-preview .agent-conflict{background:#fff3d5}.agent-result-preview .plain-preview td,.agent-result-preview .plain-preview th{white-space:pre-wrap;max-width:320px}
