/* The Agent usage workspace shares the established chat and file-viewer components. */
.shell > main:has(> #platform-content > .agent-chat-workspace) {height:100dvh; min-height:0; overflow:hidden}
.shell #platform-content:has(> .agent-chat-workspace) {padding:0; margin:0; width:100%; max-width:none; flex:1; min-height:0; overflow:hidden}
.shell .agent-chat-workspace {--agent-inbox-width:220px; --agent-preview-width:clamp(320px,24vw,440px); position:relative; display:grid; grid-template-columns:var(--agent-inbox-width) minmax(0,1fr); gap:0; width:100%; max-width:2400px; height:100%; min-height:0; margin-inline:auto; align-items:stretch}
.shell .agent-chat-workspace:has(> .studio-artifacts:not([hidden])) {grid-template-columns:var(--agent-inbox-width) minmax(0,1fr) var(--agent-preview-width)}
.shell .agent-chat-workspace > .agent-workspace-resizer {display:block; left:var(--agent-inbox-width)}
.shell .agent-chat-workspace > .agent-workspace-resizer-preview {left:calc(100% - var(--agent-preview-width))}
.shell .agent-chat-workspace > .agent-workspace-resizer[hidden] {display:none}
.shell .agent-chat-workspace :is(.agent-inbox-threads,.agent-chat-conversation,.studio-artifact-content) {overscroll-behavior:contain; scrollbar-width:thin; scrollbar-color:var(--subtle) transparent}
.shell .agent-chat-workspace > :is(.agent-inbox,.agent-chat-builder,.studio-artifacts) {min-width:0; min-height:0; border:0; border-radius:0; background:var(--surface)}
.shell .agent-chat-workspace > .agent-inbox {padding:20px 12px; gap:12px; border-inline-end:1px solid var(--border)}
.agent-chat-workspace .sidebar-agents-heading h2 {color:var(--ink); font-size:14px; font-weight:600}
.agent-chat-workspace .agent-inbox > .button {justify-content:center}
.agent-chat-workspace .agent-inbox-thread {display:grid; width:100%; height:auto; padding:12px 8px; margin:0; text-align:start; border:0; border-radius:4px; background:transparent; color:var(--ink)}
.agent-chat-workspace .agent-inbox-thread > span {white-space:normal; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; overflow-wrap:anywhere; line-height:1.6}
.agent-chat-workspace .agent-inbox-thread small {color:var(--muted); font-size:11px; line-height:1.6}
.shell .agent-chat-workspace .agent-inbox-thread[aria-current="true"] {background:var(--accent-soft); color:var(--accent-dark)}
.shell .agent-chat-workspace > .agent-chat-builder {display:flex; flex-direction:column; width:100%; min-height:0; padding:20px; overflow:hidden}
.agent-chat-workspace .agent-workspace-heading,.agent-chat-workspace .task-column {width:100%; max-width:none; margin-inline:0}
.shell .agent-chat-workspace .agent-workspace-heading {flex:none; align-items:flex-start; gap:12px; padding:0 0 16px; margin-bottom:16px; border-bottom:1px solid var(--border)}
.agent-workspace-heading .task-identity {min-width:0; display:flex; flex-wrap:wrap; align-items:center; gap:6px 10px}
.agent-workspace-heading .task-identity h1 {margin:0; max-width:100%; font-size:17px; line-height:1.5; font-weight:600; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; overflow-wrap:anywhere}
.agent-workspace-environment {max-width:100%; min-width:0}
.agent-workspace-environment .select-control {max-width:min(240px,100%)}
.shell .agent-chat-workspace .agent-workspace-environment .select-trigger {flex-direction:row; justify-content:flex-start; width:auto; max-width:100%; min-height:32px; padding:4px 8px; gap:6px; border-color:transparent; background:transparent; font-size:12px}
.agent-workspace-environment .select-trigger::before {content:""; flex:none; width:6px; height:6px; border-radius:50%; background:#2b6b50}
.agent-workspace-environment[data-state="draft"] .select-trigger::before {background:var(--subtle)}
.agent-workspace-environment .select-trigger > span {order:1}
.agent-workspace-environment .select-trigger > .ui-icon {order:2; width:12px; height:12px}
.agent-workspace-heading .agent-chat-actions {flex:none; flex-wrap:wrap; gap:4px}
.agent-workspace-heading .agent-chat-actions > .button {font-size:12px; min-height:32px; padding:5px 8px}
.agent-workspace-heading .agent-workspace-preview-toggle .ui-icon {transform:scaleX(-1)}
.shell .agent-chat-workspace .task-column {display:flex; flex:1; flex-direction:column; min-height:0; gap:16px}
.shell .agent-chat-workspace .agent-chat-conversation {display:flex; flex-direction:column; align-items:stretch; min-height:0; flex:1; gap:20px; padding:0 4px 12px 0}
.shell .agent-chat-workspace .agent-chat-conversation:empty {display:none}
.agent-chat-workspace .agent-chat-user {align-self:flex-end; max-width:88%; margin:0; padding:10px 14px}
.agent-chat-workspace .agent-chat-reply {width:100%}
.shell .agent-chat-workspace .studio-conversation-empty {flex:1; min-height:160px; justify-content:center; padding:24px 0}
.shell .agent-chat-workspace .studio-conversation-empty h2 {font-size:20px}
.shell .agent-chat-workspace .agent-chat-composer {width:100%; flex:none; margin:0; padding:12px; background:var(--rail); border-color:var(--border); box-shadow:none}
.shell .agent-chat-workspace .agent-chat-composer:focus-within {border-color:var(--accent); box-shadow:none}
.shell .agent-chat-workspace .agent-chat-composer > textarea {min-height:66px; font-size:14px; line-height:1.7; background:transparent}
.shell .agent-chat-workspace .agent-chat-send {width:36px; height:36px; min-height:36px; background:var(--action); color:var(--surface)}
.shell .agent-chat-workspace .agent-chat-send:disabled {background:#e9e7df; color:#74786f}
.agent-chat-workspace .agent-workspace-earlier {align-self:center}
.agent-workspace-history-notice {font-size:12px; color:var(--muted)}
.shell .agent-chat-workspace > .studio-artifacts {display:flex; flex-direction:column; padding:0; overflow:hidden; border-inline-start:1px solid var(--border)}
.agent-chat-workspace .studio-artifact-panel-header {position:static; flex:none; margin:0}
.agent-chat-workspace .studio-artifact-content {flex:1; min-height:0; max-width:none; width:100%; margin-inline:0; overflow:hidden}
.agent-chat-workspace .studio-artifact-toolbar {--artifact-action-size:32px; display:grid; grid-template-columns:minmax(0,1fr) var(--artifact-action-size); align-items:center; gap:8px; width:100%; max-width:320px}
.agent-chat-workspace .studio-artifact-source {display:flex; align-items:center; gap:8px; max-width:none}
.agent-chat-workspace .studio-artifact-source > span:first-child {flex:none; color:var(--muted); font-size:11px; white-space:nowrap}
.agent-chat-workspace .studio-artifact-source > .select-control {flex:1; min-width:0}
.shell .agent-chat-workspace .studio-artifact-source .select-trigger {min-height:32px; padding:5px 8px; font-size:12px}
.shell .agent-chat-workspace .studio-artifact-toolbar > .button {width:var(--artifact-action-size); min-height:32px; padding:0}
.agent-chat-workspace .studio-artifact-toolbar > .button > span {display:none}
.agent-chat-workspace .studio-artifact-scope {margin:6px 0 12px; font-size:11px; line-height:1.5; white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
.agent-chat-workspace .studio-artifact-viewer img {max-height:55dvh}
.shell .agent-workspace-conversations-toggle {display:none}
@media (max-width:1279px) and (min-width:901px) {
  .shell > main:has(> #platform-content > .agent-chat-workspace) {height:auto; min-height:100dvh; overflow:visible}
  .shell #platform-content:has(> .agent-chat-workspace) {flex:none; overflow:visible}
  .shell .agent-chat-workspace {height:auto; min-height:calc(100dvh - 56px)}
  .shell .agent-chat-workspace,.shell .agent-chat-workspace:has(> .studio-artifacts:not([hidden])) {grid-template-columns:var(--agent-inbox-width,200px) minmax(0,1fr)}
  .shell .agent-chat-workspace:has(> .studio-artifacts:not([hidden])) {grid-template-rows:minmax(560px,70dvh) auto}
  .shell .agent-chat-workspace > .agent-workspace-resizer-preview {display:none}
  .shell .agent-chat-workspace > .agent-inbox {grid-column:1; grid-row:1 / -1; position:sticky; top:0; align-self:start; max-height:100dvh}
  .shell .agent-chat-workspace > .agent-chat-builder {grid-column:2; grid-row:1; padding:16px; min-height:560px}
  .shell .agent-chat-workspace .studio-conversation-empty {min-height:0; padding:12px 0}
  .shell .agent-chat-workspace > .studio-artifacts {grid-column:2; grid-row:2; border-inline-start:0; border-top:1px solid var(--border); max-height:75dvh}
}
@media (max-width:900px) {
  .shell > main:has(> #platform-content > .agent-chat-workspace) {height:auto; min-height:100dvh; overflow:visible}
  .shell #platform-content:has(> .agent-chat-workspace) {overflow:visible; flex:none}
  .shell .agent-chat-workspace,.shell .agent-chat-workspace:has(> .studio-artifacts:not([hidden])) {display:flex; flex-direction:column; height:auto; min-height:calc(100dvh - 120px)}
  .shell .agent-chat-workspace > .agent-inbox {display:none; border-inline-end:0; border-bottom:1px solid var(--border); padding:16px; max-height:320px}
  .shell .agent-chat-workspace.is-conversations-open > .agent-inbox {display:flex}
  .shell .agent-chat-workspace > .agent-chat-builder {padding:20px 16px; min-height:600px}
  .shell .agent-chat-workspace > .agent-workspace-resizer {display:none}
  .shell .agent-chat-workspace .task-column {min-height:340px}
  .shell .agent-chat-workspace .agent-chat-conversation {min-height:220px; max-height:65dvh; overflow:auto; flex:none}
  .shell .agent-chat-workspace .studio-conversation-empty {min-height:200px}
  .agent-chat-workspace .agent-workspace-heading {flex-direction:column}
  .shell .agent-workspace-conversations-toggle {display:inline-flex}
  .shell .agent-chat-workspace > .studio-artifacts {border-inline-start:0; border-top:1px solid var(--border); max-height:75dvh}
  .shell .agent-chat-workspace .agent-chat-composer > textarea {font-size:16px}
}
@media (pointer:coarse) {
  .agent-chat-workspace .studio-artifact-toolbar {--artifact-action-size:44px}
  .shell .agent-chat-workspace .studio-artifact-toolbar :is(.button,.select-trigger) {min-height:44px}
  .shell .agent-chat-workspace :is(.button,.select-trigger) {min-height:44px}
  .shell .agent-chat-workspace .agent-workspace-environment .select-trigger {min-height:44px}
  .shell .agent-chat-workspace .agent-workspace-preview-toggle {width:44px}
  .shell .agent-chat-workspace .agent-chat-send {width:44px; height:44px; min-height:44px}
}

@media (max-width:1279px) {
  .shell .agent-chat-workspace > .studio-artifacts[data-artifact-view="preview"] {height:75dvh; min-height:320px}
}
/* A starter is a quiet invitation to fill the composer. */
.agent-chat-workspace .studio-conversation-empty {gap:12px}
.agent-chat-workspace .studio-conversation-empty h2 {margin:0; font-size:20px; font-weight:600; line-height:1.4}
.agent-chat-workspace .studio-conversation-empty .studio-starter-question {
  width:fit-content;
  max-width:min(100%,420px);
  min-height:48px;
  margin-top:12px;
  padding:12px 16px;
  gap:24px;
  border:1px solid var(--border);
  border-radius:12px;
  background:var(--surface);
  color:var(--ink);
  font-size:14px;
  font-weight:450;
  line-height:1.6;
  text-align:start;
  white-space:pre-wrap;
  box-shadow:none;
}
.agent-chat-workspace .studio-conversation-empty .studio-starter-question > span {min-width:0; overflow-wrap:anywhere; display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:3; overflow:hidden}
.agent-chat-workspace .studio-conversation-empty .studio-starter-question .ui-icon {width:16px; height:16px; padding:0; border-radius:0; color:var(--muted); background:transparent}
.agent-chat-workspace .studio-conversation-empty .studio-starter-question:hover:not(:disabled) {border-color:var(--muted); background:var(--canvas)}
.agent-chat-workspace .studio-conversation-empty .studio-starter-question:is(:hover,:focus-visible) .ui-icon {color:var(--accent-dark)}
.agent-chat-workspace .studio-conversation-empty .studio-starter-question:focus-visible {outline:2px solid var(--accent); outline-offset:3px}
.agent-chat-workspace .studio-conversation-empty .studio-starter-question:active:not(:disabled) {background:var(--accent-soft)}
