.window--agent .win-body { padding: 22px 26px; }
.window--agent .win-body h2 { font-size: 29px; margin-bottom: 7px; }
.agent-intro { max-width: 72ch; margin-bottom: 13px; font-size: 15px; }
.agent-metrics { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; margin-bottom: 14px; }
.agent-metrics>div { border-left: 2px solid #aaa2d5; padding: 2px 12px; }
.agent-metrics strong { display: block; font-size: 21px; letter-spacing: -.025em; color: #292440; }
.agent-metrics span { display: block; margin-top: 3px; font-size: 12px; color: #555366; }
.agent-view-picker { display: flex; gap: 20px; border-bottom: 1px solid #dcdce4; margin-bottom: 12px; }
.agent-view-picker button { font: inherit; font-size: 14px; font-weight: 600; color: #72717d; background: none; border: 0; padding: 0 0 10px; cursor: pointer; border-bottom: 2px solid transparent; }
.agent-view-picker button[aria-pressed=true] { color: #524398; border-color: #7566b5; }
.agent-workspace { display: flex; flex-direction: column; box-sizing: border-box; height: clamp(410px, calc(100dvh - 420px), 520px); border: 1px solid #dbd9e6; border-radius: 14px; background: #f5f4f9; overflow: clip; }
.agent-workspace-head { flex: none; display: flex; gap: 10px; align-items: center; background: #eeecf5; padding: 12px 16px; border-bottom: 1px solid #dfdce9; }
.agent-mark { display: grid; place-items: center; width: 33px; height: 33px; border-radius: 10px; font-size: 23px; color: white; background: linear-gradient(135deg,#998bd4,#605098); }
.agent-workspace-head strong { display: block; color: #353044; font-size: 14px; }
.agent-workspace-head div>span { display: block; font-size: 11px; color: #747083; margin-top: 3px; }
.agent-demo-label { margin-left: auto; text-align: right; font-size: 10px; color: #716b80; max-width: 120px; line-height: 1.4; }
/* The transcript scrolls independently so suggested replies stay within reach. */
.agent-conversation { position: relative; flex: 1; min-height: 0; padding: 18px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #c9c2da transparent; }
.agent-turn + .agent-turn { margin-top: 20px; }
.agent-speaker { display: flex; align-items: center; gap: 6px; margin-bottom: 7px; font-size: 11px; font-weight: 600; color: #777083; }
.agent-speaker>span { color: #8975b0; font-size: 14px; }
.agent-turn--practitioner .agent-speaker { justify-content: flex-end; }
.agent-question { margin-left: auto; width: fit-content; max-width: 88%; padding: 10px 14px; border: 1px solid #d9d0eb; border-radius: 14px 14px 3px 14px; background: #e9e2f4; color: #43315f; font-size: 14px; line-height: 1.5; }
.agent-answer { max-width: 95%; padding: 15px; border: 1px solid #e5e2ec; border-radius: 3px 14px 14px; background: #fff; box-shadow: 0 3px 8px #38295705; }
.agent-answer p { font-size: 15px; line-height: 1.55; margin: 0; color: #51495c; }
.agent-documents { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 13px; }
.agent-document { min-width: 0; border: 1px solid #e2dbe9; border-radius: 7px; background: #faf8fc; }
.agent-document summary { display: flex; align-items: center; gap: 6px; padding: 7px 9px; list-style: none; color: #655484; font-size: 12px; line-height: 1.4; cursor: pointer; }
.agent-document summary::-webkit-details-marker { display: none; }
.agent-document summary>span { display: inline-grid; place-items: center; flex: none; width: 18px; height: 18px; border-radius: 4px; background: #e8e0f0; font-size: 10px; }
.agent-document[open] { flex-basis: 100%; background: #fffdf8; border-color: #ddcfb5; }
.agent-document[open] summary { color: #7e633e; }
.agent-document[open] summary>span { background: #f1e5ce; }
.agent-document-body { padding: 4px 14px 15px; }
.agent-document-body>span { font-size: 11px; color: #977b54; }
.agent-document-body blockquote { margin: 9px 0 0; padding-left: 12px; border-left: 2px solid #c7ad80; font-size: 14px; line-height: 1.6; color: #665640; }
.agent-draft { margin-top: 14px; padding: 14px; background: #f8f7fa; border-left: 2px solid #b0a0c8; border-radius: 0 8px 8px 0; }
.agent-draft>span { color: #766587; font-size: 11px; font-weight: 600; }
.agent-draft blockquote { margin: 7px 0 0; font-size: 14px; line-height: 1.6; color: #51495c; }
.agent-draft dl { margin: 9px 0 0; font-size: 13px; line-height: 1.5; }
.agent-draft dl>div + div { margin-top: 8px; }
.agent-draft dt { font-weight: 600; color: #51495c; }
.agent-draft dd { margin: 1px 0 0; color: #817789; }
.agent-checklist { display: grid; gap: 10px; margin-top: 14px; }
.agent-checklist label { display: flex; align-items: flex-start; gap: 9px; font-size: 14px; line-height: 1.5; color: #51495c; cursor: pointer; }
.agent-checklist input { flex: none; width: 16px; height: 16px; margin: 2px 0 0; accent-color: #7d649e; cursor: pointer; }
.agent-feedback { display: flex; gap: 5px; margin-top: 12px; min-height: 23px; }
.agent-feedback button { font-size: 12px; background: #f5f3f8; border: 1px solid #eae6ef; border-radius: 5px; padding: 3px 5px; cursor: pointer; }
.agent-feedback span { font-size: 11px; color: #686175; }
.agent-typing { display: flex; align-items: center; gap: 10px; margin-top: 20px; padding: 12px 15px; width: fit-content; border: 1px solid #e5e2ec; border-radius: 3px 14px 14px; background: #fff; color: #9582b3; }
.agent-typing-dots { letter-spacing: 4px; }
.agent-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.agent-composer { position: sticky; bottom: 0; z-index: 1; flex: none; padding: 12px 16px 16px; border-top: 1px solid #e1ddea; background: #fbfafd; }
.agent-composer-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 9px; }
.agent-reply-label { font-size: 11px; font-weight: 600; color: #7b6c8e; }
.agent-chat-restart { padding: 2px 0; background: none; border: 0; font: inherit; font-size: 11px; color: #7b6c8e; cursor: pointer; }
.agent-chat-restart:hover { color: #493269; }
.agent-replies { display: flex; flex-wrap: wrap; gap: 7px; }
.agent-replies button { display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 1px solid #d8cde7; border-radius: 12px 12px 3px 12px; background: #fff; padding: 10px 12px; font: inherit; font-size: 13px; line-height: 1.4; text-align: left; color: #624d80; cursor: pointer; transition: background .15s, border-color .15s; }
.agent-replies button>span { color: #a28bbd; }
.agent-replies button:hover { background: #eee8f6; border-color: #a994c4; }
.agent-replies button:disabled { cursor: wait; opacity: .45; }
.agent-workspace :is(button, summary, input, [tabindex]):focus-visible { outline: 2px solid #8e72b5; outline-offset: 3px; }
.agent-build-flow { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 20px; border-radius: 12px; background: #eeebf5; color: #665184; font-size: 13px; }
.agent-build-flow b { font-weight: 400; opacity: .4; }
.agent-build-panel details { border-bottom: 1px solid #dfdce6; padding: 18px 2px; font-size: 15px; }
.agent-build-panel summary { cursor: pointer; font-weight: 600; color: #42384f; }
.agent-build-panel p { color: #5f566b; line-height: 1.65; margin: 12px 0 0; }
.agent-demo-panel[hidden],.agent-build-panel[hidden],.agent-replies[hidden] { display: none; }
@media (max-width: 479px) {
  .window--agent .win-body { padding: 16px; }
  .window--agent .win-body h2 { font-size: 21px; }
  .agent-intro { font-size: 13px; line-height: 1.5; margin-bottom: 12px; }
  .agent-metrics { gap: 3px; }
  .agent-metrics>div { padding: 2px 7px; }
  .agent-metrics strong { font-size: 17px; }
  .agent-metrics span { font-size: 10px; line-height: 1.4; }
  .agent-workspace-head { padding: 10px; }
  .agent-demo-label { font-size: 9px; max-width: 82px; }
  .agent-workspace { height: 440px; }
  .agent-conversation { padding: 15px 10px; }
  .agent-question { max-width: 94%; }
  .agent-answer { max-width: 100%; padding: 13px; }
  .agent-answer p { font-size: 14px; }
  .agent-composer { flex: none; padding: 12px 10px; }
  .agent-replies { flex-direction: column; }
  .agent-build-flow { padding: 16px 10px; font-size: 11px; }
}
