/* Shared conversation surface for the central workspace and contextual side panel. */
.agent-chat-drawer .drawer-body,.agent-workspace .agent-workspace-body{display:flex;flex-direction:column;gap:14px;min-height:0;overflow:hidden}
.agent-workspace.agent-chat-drawer{display:flex;flex-direction:column;width:100%;max-width:none;height:100%;min-height:0;position:relative;inset:auto;box-shadow:none;border:0;background:transparent}
.agent-workspace .agent-workspace-body{flex:1;height:auto;min-height:0;width:100%;box-sizing:border-box;max-width:960px;margin:0 auto;padding:20px 32px}
.agent-chat-project{margin-right:auto;font-weight:600;color:var(--text)}
.agent-chat-controls{gap:8px}.agent-chat-controls select{max-width:200px;min-width:100px}
.agent-chat-menu{position:relative}.agent-chat-menu>summary{cursor:pointer;padding:8px;border-radius:8px;font-size:13px;list-style:none}
.agent-chat-menu[open]{display:flex;flex-direction:column;gap:5px}.agent-chat-menu[open]>.button{display:block;margin:4px 0}
.agent-chat-work:empty,.agent-chat-sources:empty,.agent-chat-recovery:empty,.agent-chat-status:empty{display:none}
.agent-chat-work{font-size:14px;padding:10px 12px;border:1px solid var(--line);border-radius:10px;background:var(--surface-2,var(--panel))}
.agent-chat-work a,.agent-chat-delegation a{color:var(--accent,var(--blue));text-decoration:none}
.agent-chat-messages{flex:1;min-height:180px;padding:4px 4px 24px;scrollbar-gutter:stable}
.agent-chat-message{padding:18px 16px;border:0;background:transparent;margin:12px 0;border-radius:14px}
.agent-chat-message.user{margin-left:12%;background:var(--surface-2,var(--panel));border:1px solid var(--line)}
.agent-chat-message.assistant{margin-right:0}.agent-chat-message>b{font-size:13px;line-height:1.5}.agent-chat-text{font-size:15px;line-height:1.85}
.agent-chat-empty{display:flex;min-height:200px;flex-direction:column;justify-content:center;align-items:flex-start;padding:32px 10px}
.agent-chat-empty h3{font-size:clamp(20px,2.1vw,28px);font-weight:500;letter-spacing:-.02em;margin:0 0 12px}
.agent-chat-starters{gap:8px}.agent-chat-starters .button{white-space:normal;text-align:left}
.agent-chat-run{margin-top:12px;color:var(--muted);font-size:13px}.agent-chat-run summary{cursor:pointer}.agent-chat-run p{overflow-wrap:anywhere}
.agent-chat-sources{max-height:35vh;overflow:auto}.agent-chat-source{font-size:14px}.agent-chat-source code{overflow-wrap:anywhere}
/* Conversation and contextual evidence share the workbench's readable surfaces. */
.agent-workspace .agent-workspace-body{max-width:1020px;padding:24px 34px;gap:18px}
.agent-chat-project{color:var(--atlas-fg,var(--ink));font-size:13px}
.agent-chat-controls{display:flex;align-items:center;flex-wrap:wrap;gap:9px}
.agent-chat-controls select{height:35px;background:var(--atlas-panel);border-color:var(--atlas-edge);border-radius:var(--atlas-control-radius,9px)}
.agent-chat-messages{overflow:auto;min-height:150px;padding:0 0 20px;scroll-behavior:smooth}
.agent-chat-message{padding:17px 19px;margin:14px 0;border-radius:var(--atlas-card-radius,14px)}
.agent-chat-message.user{max-width:85%;margin-left:auto;background:var(--atlas-selection);border-color:var(--atlas-edge)}
.agent-chat-message.assistant{padding-left:5px;padding-right:5px}
.agent-chat-message>b{display:block;margin-bottom:8px;color:var(--atlas-text-secondary);font-size:12px;font-weight:500}
.agent-chat-text{font-size:14px;line-height:1.95;overflow-wrap:anywhere;max-width:75ch}
.agent-chat-empty{min-height:190px;padding:27px 6px;gap:12px}
.agent-chat-empty h3{font-size:25px;line-height:1.5;margin:0;font-weight:550}
.agent-chat-starters{display:flex;flex-wrap:wrap;gap:9px}
.agent-chat-starters .button{font-size:12px;line-height:1.65;padding:10px 13px;border-color:var(--atlas-edge);border-radius:var(--atlas-control-radius,9px);background:var(--atlas-panel)}
.agent-chat-work,.agent-chat-delegation{border-color:var(--atlas-edge);border-radius:var(--atlas-card-radius,14px);background:var(--atlas-panel)}
.agent-chat-citations,.agent-chat-run{font-size:12px;line-height:1.8;color:var(--atlas-text-secondary)}
.agent-chat-citations summary,.agent-chat-run summary{padding:9px 0;cursor:pointer}
.agent-chat-composer{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:end;gap:8px;flex:none;padding:7px 8px 7px 12px;border:1px solid var(--atlas-edge);border-radius:11px;background:var(--atlas-well);box-shadow:none}
.agent-chat-composer:focus-within{border-color:color-mix(in srgb,var(--atlas-accent) 65%,var(--atlas-edge))}
.agent-chat-composer textarea{width:100%;min-width:0;min-height:42px;max-height:160px;field-sizing:content;resize:none;border:0;border-radius:0;background:transparent;box-shadow:none;padding:6px 0;color:var(--atlas-fg);font:inherit;font-size:14px;line-height:1.55}
.agent-chat-composer textarea:focus-visible{outline:none}
.agent-chat-composer textarea::placeholder{color:var(--atlas-text-secondary)}
.agent-chat-composer:has(.agent-chat-delegate-action:not([hidden])){grid-template-columns:minmax(0,1fr)}
.agent-chat-send-actions{display:flex;justify-content:flex-end;align-items:center;gap:8px;flex-wrap:wrap}
.agent-chat-send-actions>.primary{order:2}
:root[data-atlas-prd=true] .agent-chat-send-actions>.primary,.agent-chat-send-actions>.primary{min-height:34px;padding:5px 10px;border:1px solid var(--atlas-edge);border-radius:7px;background:var(--atlas-selection);color:var(--atlas-fg);font-size:12px;white-space:nowrap}
.agent-chat-send-actions>.primary:disabled{opacity:.55}
.agent-chat-status,.agent-chat-recovery{font-size:12px;line-height:1.8}
@media(max-width:1280px){.agent-workspace .agent-workspace-body{padding:20px 25px}.agent-chat-empty h3{font-size:23px}}
@media(prefers-reduced-motion:reduce){.agent-chat-messages{scroll-behavior:auto}.agent-chat-message,.agent-chat-composer{transition:none!important;animation:none!important}}
.agent-chat-delegate-action{display:flex;align-items:center;gap:7px;margin-right:auto}.agent-chat-delegate-action[hidden]{display:none}
.agent-chat-delegate-action select{max-width:130px;font-size:13px}.agent-chat-delegate-action .button{font-size:13px}
.agent-chat-status{font-size:14px;min-height:0;line-height:1.6;color:var(--muted)}
.agent-chat-recovery{display:flex;align-items:center;gap:8px}
.agent-chat-delegations{max-height:190px;overflow:auto;border-top:1px solid var(--line);padding-top:10px}.agent-chat-delegations h3{font-size:14px;margin:0 0 8px;font-weight:600}
.agent-chat-delegation{display:flex;align-items:center;gap:10px;flex-wrap:wrap;font-size:13px;line-height:1.7;padding:7px 0}.agent-chat-delegation strong{font-weight:500}.agent-chat-delegation a{margin-left:auto}
.agent-chat-delegation>details,.agent-chat-delegation>code{flex-basis:100%;min-width:0;max-width:100%;overflow-wrap:anywhere;white-space:normal}.agent-chat-delegation>details .button{max-width:100%;white-space:normal;overflow-wrap:anywhere;text-align:left}
@media(max-width:800px){.agent-workspace .agent-workspace-body{padding:16px}.agent-chat-controls{flex-wrap:wrap}.agent-chat-controls select{max-width:180px}.agent-chat-delegate-action{width:100%;order:3}.agent-chat-message.user{margin-left:6%}}
@media(prefers-reduced-motion:reduce){.agent-chat-messages{scroll-behavior:auto}}
