body[data-page=agent] #workspace-view .case-head,
[data-feature=agent] > .feature-heading { display:none; }

.agent-workspace {
  --agent-ink:#142a4f;
  --agent-muted:#58708f;
  --agent-line:#d6e3f4;
  --agent-blue:#255ebc;
  color:var(--agent-ink);
}
.agent-workspace [hidden] { display:none; }
.agent-context {
  display:grid; grid-template-columns:1.2fr 1fr auto; align-items:center; gap:12px;
  margin-bottom:12px; padding:12px 16px; border:1px solid var(--agent-line); border-radius:15px;
  background:#f9fcfff0; box-shadow:0 5px 22px #203a6010;
}
.agent-context-pair { display:flex; align-items:center; gap:10px; min-width:0; }
.agent-context-pair > .ui-icon {
  box-sizing:content-box; flex:none; width:18px; height:18px; padding:8px; border-radius:10px;
  background:#e9f1fe; color:var(--agent-blue);
}
.agent-context-pair > div { display:grid; min-width:0; }
.agent-context-pair span { color:var(--agent-muted); font-size:11px; }
.agent-context-pair strong { overflow:hidden; white-space:nowrap; text-overflow:ellipsis; font-size:13px; }
.agent-mode {
  display:inline-flex; align-items:center; gap:5px; width:max-content; max-width:100%;
  padding:5px 9px; border:1px solid #d7e5fa; border-radius:999px; color:#315d94; background:#edf4ff;
  font-size:11px; white-space:nowrap;
}
.agent-mode i { width:6px; height:6px; flex:none; border-radius:50%; background:#4279d3; }
.agent-layout {
  display:grid; grid-template-columns:clamp(150px,17vw,230px) minmax(0,1fr);
  height:max(510px,calc(100dvh - 195px)); overflow:hidden; border:1px solid var(--agent-line);
  border-radius:17px; background:#fff; box-shadow:0 8px 30px #1b345a12;
}
.agent-history { min-width:0; overflow-y:auto; padding:16px 13px; background:linear-gradient(150deg,#eef4fc,#f7faff 68%); border-right:1px solid var(--agent-line); }
.agent-history h2 { margin:0 0 10px; padding-inline:3px; color:#3e5679; font-size:13px; font-weight:700; }
.agent-history button { display:flex; align-items:center; width:100%; min-width:0; min-height:36px; gap:8px; border-radius:8px; font-size:13px; }
.agent-history button .ui-icon { flex:none; width:15px; height:15px; }
.agent-new { justify-content:center; border:1px solid #213e80; color:#fff; background:linear-gradient(112deg,#172d5b,#285dbd); font-weight:700; }
.agent-new:hover { background:#2156ad; }
.agent-conversations { display:grid; gap:4px; margin:10px 0 0; padding:0; list-style:none; }
.agent-conversations li { min-width:0; }
.agent-conversations button { padding:5px 7px; border:1px solid transparent; background:transparent; color:#334f73; text-align:left; }
.agent-conversations button span { min-width:0; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
.agent-conversations button:hover,.agent-conversations button[aria-pressed=true] { border-color:#cadef8; background:#e4efff; color:#2257a0; }
.agent-history-empty { margin:15px 4px 0; font-size:12px; color:#627793; }
.agent-dialogue { display:grid; grid-template-rows:minmax(0,1fr) auto; min-width:0; min-height:0; background:radial-gradient(ellipse at 50% 37%,#eef5ff 0,white 67%); }
.agent-thread { min-height:0; overflow:auto; overscroll-behavior:contain; }
.agent-welcome { display:flex; flex-direction:column; align-items:center; justify-content:center; min-height:100%; padding:12px 20px 16px; text-align:center; }
.agent-portrait {
  position:relative; isolation:isolate; width:min(228px,100%); height:clamp(164px,23dvh,238px); flex:none; overflow:hidden;
  background:radial-gradient(ellipse at center,#d9eaff 0%,#e9f3ff 45%,transparent 70%);
}
.agent-portrait::before,.agent-portrait::after { content:''; position:absolute; inset:8% 9%; border:1px solid #99b9e459; border-radius:50%; }
.agent-portrait::after { inset:14% 15%; border-style:dashed; }
.agent-portrait img {
  position:absolute; z-index:1; height:155%; width:auto; max-width:none; top:0; left:50%; transform:translateX(-50%);
  mask-image:linear-gradient(#000 54%,transparent 64%);
}
.agent-welcome h2 { margin:5px 0 4px; font-size:clamp(20px,2.25vw,34px); line-height:1.3; letter-spacing:.015em; }
.agent-welcome p { margin:3px 0 14px; color:var(--agent-muted); font-size:13px; }
.agent-starters { display:flex; justify-content:center; flex-wrap:wrap; gap:7px; }
.agent-starters button {
  display:inline-flex; align-items:center; gap:6px; min-height:35px; padding:5px 8px; border:1px solid #d8e5f6;
  border-radius:8px; background:#f8fbff; color:#365778; font-size:12px; font-weight:650;
}
.agent-starters button:hover { color:#164990; background:#e9f2ff; border-color:#bfdbfe; }
.agent-starters .ui-icon { width:14px; height:14px; flex:none; color:#4275b9; }
.agent-starters .ui-icon:last-child { width:12px; margin-inline-start:3px; }
.agent-compose-area { padding:0 clamp(12px,2.7vw,35px) 13px; }
.agent-composer {
  display:flex; align-items:flex-end; gap:8px; min-width:0; padding:9px; background:#fff;
  border:1px solid #c9ddf5; border-radius:13px; box-shadow:0 7px 18px #21478210;
}
.agent-composer:focus-within { border-color:#638fd4; }
.agent-workspace .agent-composer textarea {
  display:block; flex:1; width:100%; min-width:0; min-height:42px; max-height:164px; padding:3px 6px;
  border:0; background:transparent; color:var(--agent-ink); box-shadow:none; outline:none; resize:vertical; font-size:14px;
}
.agent-workspace .agent-composer textarea:focus-visible { outline:none; }
.agent-send {
  display:flex; align-items:center; gap:5px; min-height:34px; padding:5px 9px; border:1px solid #1e53ae;
  border-radius:8px; background:#235bb9; color:#fff; font-size:12px; font-weight:700;
}
.agent-send:hover:enabled { background:#17458e; }
.agent-send .ui-icon { width:15px; height:15px; transform:rotate(-90deg); }
.agent-compose-meta { display:flex; justify-content:space-between; flex-wrap:wrap; gap:3px 12px; margin:6px 3px 0; color:#647b98; font-size:11px; }
.agent-compose-meta p { margin:0; }
.agent-messages { display:grid; gap:14px; margin:0; padding:20px clamp(12px,3vw,40px); list-style:none; }
.agent-messages li { justify-self:end; min-width:0; max-width:min(82%,640px); }
.agent-messages small { display:block; margin:0 3px 3px; color:#526d92; text-align:right; }
.agent-messages p { margin:0; padding:9px 14px; border:1px solid #d2e3fa; border-radius:12px 4px 12px 12px; background:#eaf3ff; color:#163862; white-space:pre-wrap; overflow-wrap:anywhere; }

@media (max-width:920px) {
  .agent-layout { grid-template-columns:minmax(0,1fr); grid-template-rows:auto minmax(0,1fr); }
  .agent-history { display:flex; align-items:center; gap:7px; overflow:auto; padding:7px 9px; border-right:0; border-bottom:1px solid var(--agent-line); }
  .agent-history h2,.agent-history-empty { flex:none; margin:0; }
  .agent-history .agent-new { width:auto; padding-inline:7px; flex:none; }
  .agent-conversations { display:flex; margin:0; }
  .agent-conversations li { width:145px; }
}
@media (max-width:700px) {
  .agent-context { grid-template-columns:minmax(0,1fr); gap:6px; padding:9px; }
  .agent-context-pair { gap:7px; }
  .agent-context-pair > .ui-icon { width:14px; height:14px; padding:5px; }
  .agent-layout { height:560px; }
  .agent-welcome { padding-inline:8px; }
  .agent-welcome p { margin-bottom:8px; }
  .agent-portrait { height:145px; }
}
