/* Chat-led wrapper around each distinct, editable workflow app. */
@media (min-width:761px) {
  .solution-item .solution-panel-inner {
    grid-template-columns:minmax(205px,.4fr) minmax(0,1.6fr);
    gap:26px;
  }
}

.agent-window { font-family:var(--font-sans); }
.agent-layout { display:grid;grid-template-columns:minmax(0,1.2fr) minmax(0,.8fr);flex:1;min-height:0;overflow:hidden;background:#fff; }
.agent-chat,.agent-app-pane { min-width:0;min-height:0;display:flex;flex-direction:column;overflow:hidden; }
.agent-chat { border-right:1px solid #e9eaee;background:#fff; }
.agent-chat-head { flex:none;min-height:64px;display:flex;align-items:center;gap:10px;padding:11px 15px;border-bottom:1px solid #edeef1; }
.agent-head-icon,.agent-avatar { display:grid;place-items:center;flex:none;background:var(--solution-accent,#1d1d1f);color:#fff; }
.agent-head-icon { width:31px;height:31px;border-radius:10px;font-size:19px; }
.agent-chat-head>div { min-width:0;display:flex;flex-direction:column;gap:2px; }
.agent-chat-head strong { color:#1d1d1f;font-size:14px;line-height:1.1;font-weight:700;letter-spacing:-.025em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis; }
.agent-chat-head small { color:#858992;font-size:10px;line-height:1.2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis; }
.agent-live { margin-left:auto;display:flex;align-items:center;gap:5px;color:#747982;font-size:10px;white-space:nowrap; }
.agent-live i,.agent-app-head i { display:block;width:6px;height:6px;border-radius:50%;background:#34c759; }
.agent-mobile-open { display:none; }
.agent-messages { flex:1;min-height:0;overflow-y:auto;scrollbar-width:thin;scrollbar-color:#d8d9df transparent;padding:15px 16px 14px;display:flex;flex-direction:column;gap:15px; }
.agent-message { min-width:0; }
.agent-message.is-user { max-width:88%;align-self:flex-end;background:#f1f2f4;border:1px solid #eceef0;border-radius:15px 15px 4px 15px;padding:10px 12px;color:#25262a; }
.agent-message.is-user p { margin:0;font-size:12px;font-weight:550;line-height:1.42;letter-spacing:-.01em; }
.agent-message.is-assistant { display:grid;grid-template-columns:23px minmax(0,1fr);align-items:start;gap:9px; }
.agent-avatar { width:23px;height:23px;border-radius:7px;font-size:14px; }
.agent-answer { min-width:0;padding-top:2px;color:#33363c; }
.agent-answer-lead { margin:0 0 9px;font-size:12px;line-height:1.47; }
.agent-finding { padding:10px 11px;border:1px solid #e8ebee;border-radius:12px;background:#f8f9fa; }
.agent-finding.is-held { background:#fdfaf5;border-color:#f3e9d9; }
.agent-finding-top { display:flex;align-items:center;justify-content:space-between;gap:8px; }
.agent-finding-top span { color:#6c717a;font-size:10px;font-weight:650; }
.agent-finding.is-held .agent-finding-top span { color:#9b672a; }
.agent-finding-top strong { font-size:19px;line-height:1.1;font-weight:750;letter-spacing:-.055em;color:#1d1d1f;font-variant-numeric:tabular-nums;white-space:nowrap; }
.agent-finding h5 { margin:5px 0 3px;font-size:12px;line-height:1.25;font-weight:700;color:#24262a; }
.agent-finding p { margin:0;color:#6d7178;font-size:11px;line-height:1.4; }
.agent-evidence { margin-top:9px;padding:0 2px; }
.agent-evidence>span { display:block;margin-bottom:3px;color:#8c9098;font-size:9px;line-height:1.3;white-space:nowrap;overflow:hidden;text-overflow:ellipsis; }
.agent-evidence>div { display:flex;justify-content:space-between;gap:8px;padding:3px 0;color:#777c84;font-size:10px;line-height:1.3; }
.agent-evidence b { color:#2f3339;font-weight:650;text-align:right; }
.agent-next { margin:8px 1px 0;color:#565c65;font-size:11px;line-height:1.43; }
.agent-next strong { color:var(--solution-accent,#1d1d1f);margin-right:3px;font-weight:700; }
.agent-chat-bottom { flex:none;padding:10px 11px 11px;border-top:1px solid #eceef0;background:#fff; }
.agent-suggestions { display:flex;gap:6px;overflow-x:auto;scrollbar-width:none;margin:0 0 8px; }
.agent-suggestions::-webkit-scrollbar { display:none; }
.agent-suggestions button { flex:none;border:1px solid #e2e5e9;border-radius:20px;background:#fff;color:#525861;padding:6px 9px;max-width:82%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font:500 10px/1.2 var(--font-sans);cursor:pointer;transition:background .18s,border-color .18s; }
.agent-suggestions button:hover { background:#f4f6f8;border-color:#cbd0d7; }
.agent-composer { display:flex;align-items:center;gap:7px;margin:0;border:1px solid #dedfe4;border-radius:15px;padding:5px 5px 5px 11px;background:#fff;box-shadow:0 1px 4px #10182008; }
.agent-composer:focus-within { border-color:#8e9aa5;box-shadow:0 0 0 3px #007aff15; }
.agent-composer textarea { flex:1;min-width:0;min-height:28px;max-height:60px;resize:none;overflow-y:auto;border:0;outline:0;padding:6px 0;background:none;color:#202227;font:400 12px/1.45 var(--font-sans); }
.agent-composer textarea::placeholder { color:#989da5; }
.agent-composer button { display:grid;place-items:center;flex:none;width:30px;height:30px;border:0;border-radius:10px;background:#1d1d1f;color:#fff;cursor:pointer;transition:background .18s,transform .18s; }
.agent-composer button:hover { background:#3b3b3f; }
.agent-composer button:active { transform:scale(.94); }
.agent-composer button svg { width:17px;height:17px; }
.agent-chat button:focus-visible,.agent-app-head button:focus-visible { outline:2px solid #007aff;outline-offset:2px; }
.agent-typing { padding-bottom:8px; }
.agent-typing-dots { display:flex;gap:4px;align-items:center;padding:7px 2px; }
.agent-typing-dots i { width:5px;height:5px;border-radius:50%;background:#9298a0;animation:agent-dot 1s infinite alternate; }
.agent-typing-dots i:nth-child(2) { animation-delay:.18s; }
.agent-typing-dots i:nth-child(3) { animation-delay:.36s; }
.agent-message.is-new { animation:agent-in .28s ease-out both; }
@keyframes agent-dot { to { opacity:.27;transform:translateY(-2px); } }
@keyframes agent-in { from { opacity:0;transform:translateY(6px); } to { opacity:1;transform:translateY(0); } }

.agent-app-pane { background:#f7f8fa; }
.agent-app-head { flex:none;height:42px;display:flex;align-items:center;justify-content:space-between;gap:8px;padding:0 11px 0 13px;border-bottom:1px solid #e8eaf0;background:#f8f9fb;color:#646973; }
.agent-app-head>span { display:flex;align-items:center;gap:6px;font-size:9px;font-weight:650;white-space:nowrap; }
.agent-app-head button { border:0;background:transparent;color:#4a5059;display:flex;align-items:center;gap:5px;padding:5px;border-radius:6px;font:600 9px/1.2 var(--font-sans);cursor:pointer;white-space:nowrap; }
.agent-app-head button:hover { background:#e9edf1; }
.agent-app-head button svg { width:12px;height:12px; }
.agent-app-pane .solution-app-content { flex:1;min-height:0;overflow:hidden;container-type:size; }
.agent-window.is-workspace-expanded .agent-layout { grid-template-columns:1fr; }
.agent-window.is-workspace-expanded .agent-chat { display:none; }
.agent-window.is-workspace-expanded .agent-app-pane { display:flex; }

@media (max-width:600px) {
  .agent-window { aspect-ratio:auto;min-height:530px; }
  .agent-layout { display:block; }
  .agent-chat { height:530px;border-right:0; }
  .agent-chat-head { min-height:58px; }
  .agent-chat-head strong { font-size:14px; }
  .agent-chat-head small { max-width:200px; }
  .agent-live { display:none; }
  .agent-mobile-open { display:block;margin-left:auto;border:0;border-radius:8px;background:#f1f2f5;color:#2c3138;padding:7px 9px;font:600 10px/1.1 var(--font-sans);white-space:nowrap;cursor:pointer; }
  .agent-app-pane { display:none;height:530px; }
  .agent-window.is-workspace-expanded .agent-app-pane { display:flex; }
  .agent-message.is-user p,.agent-answer-lead { font-size:12px; }
  .agent-finding p,.agent-next { font-size:11px; }
  .agent-composer textarea { font-size:13px; }
  .agent-suggestions button { font-size:10px; }
}

@media (prefers-reduced-motion:reduce) {
  .agent-message.is-new,.agent-typing-dots i { animation:none; }
  .agent-composer button,.agent-suggestions button { transition:none; }
}
