Skip to content

HarnessRouter Community Edition: the self-hosted, Apache-2.0 edition of the unified interface for agent harnesses. Run Codex, Claude Code, Hermes, PI, DSH, and more through one API, with sessions, streaming, files, cancellation, and failure handling. Implements the Unified Harness Protocol (UHP), an open standard. Your keys, your infrastructure.

70.3 KB
Raw Blame
/* Generated by scripts/scope-agent-chat-css.mjs from [email protected] styles/agent-chat.css, file.css, chat.css. Do not edit. */

/* ── agent-chat.css ── */
/* reifyui/agent-chat: the agent conversation (AgentConversation, AgentTurnView, AgentComposer …).

   Token contract. Every colour reads --uac-* first, then the package-wide --uic-* set, then a light
   fallback, so the same file follows themes/light.css, themes/dark.css or a host's own tokens:
     --uac-bg         the page colour behind the conversation (the dock's fade, the text's fade)
     --uac-surface    cards, the composer, the call list            --uic-surface
     --uac-surface-2  code and output wells                         --uic-surface-2
     --uac-ink / --uac-ink-2 / --uac-mute / --uac-faint   text, strongest to quietest
     --uac-line / --uac-line-soft                        hairlines
     --uac-brand      the live mark's aura, links, focus             --uic-brand
     --uac-user-bg    the person's bubble                            --uic-brand-faint
     --uac-add / --uac-del   lines added and removed
     --uac-fail       a failed call or turn                          --uic-fail-ink
     --uac-mono       code                                           --uic-mono
     --uac-font-md    prose size                                     --uic-font-md */

#hrui :where(.uac-convo, .uac-turn, .uac-composer, .uac-working, .uac-group, .uac-step, .uac-todo, .uac-mark, .uac-outcome) {
  --_bg: var(--uac-bg, var(--uic-bg, var(--uic-surface, #fff)));
  --_surface: var(--uac-surface, var(--uic-surface, #fff));
  --_surface-2: var(--uac-surface-2, var(--uic-surface-2, #f6f7f9));
  --_ink: var(--uac-ink, var(--uic-ink, #15171c));
  --_ink-2: var(--uac-ink-2, var(--uic-ink-2, #3a3d45));
  --_mute: var(--uac-mute, var(--uic-mute, #5d6069));
  --_faint: var(--uac-faint, var(--uic-mute-2, #8e9199));
  --_line: var(--uac-line, var(--uic-line, #dfe1e7));
  --_line-soft: var(--uac-line-soft, var(--uic-line-soft, #eff1f4));
  --_brand: var(--uac-brand, var(--uic-brand, #285aff));
  --_user-bg: var(--uac-user-bg, var(--uic-brand-faint, #eff3ff));
  --_add: var(--uac-add, #1a7f37);
  --_del: var(--uac-del, #cf222e);
  --_fail: var(--uac-fail, var(--uic-fail-ink, #b91c1c));
  --_warn: var(--uac-warn, var(--uic-incomplete-ink, #92400e));
  --_mono: var(--uac-mono, var(--uic-mono, ui-monospace, SFMono-Regular, Menlo, monospace));
  --_fs: var(--uac-font-md, var(--uic-font-md, 14.5px));
  --_hover: var(--uic-hover-wash, rgba(0, 0, 0, .04));
}

#hrui .uac-sr { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ── the column ──────────────────────────────────────────────────────────────────────────────── */
#hrui .uac-convo { display: flex; flex-direction: column; min-width: 0; color: var(--_ink); }
#hrui .uac-convo.is-pane { height: 100%; min-height: 0; }
#hrui .uac-convo.is-pane > .uac-scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
/* page mode: the column reaches the bottom of what its scroller shows (measured into --uac-fill),
   so the dock rests at the foot of the screen even when the conversation is short */
#hrui .uac-convo.is-page { min-height: var(--uac-fill, 100dvh); }
#hrui .uac-convo.is-page > .uac-scroll { flex: 1; }
#hrui .uac-thread { display: flex; flex-direction: column; gap: 30px; padding-bottom: 8px; min-width: 0; }
#hrui .uac-dock { position: sticky; bottom: 0; z-index: 5; padding: 18px 0 max(14px, env(safe-area-inset-bottom, 0px));
  background: linear-gradient(to bottom, transparent, var(--_bg) 20px); }
#hrui .uac-notice { margin: 0 0 8px; padding: 8px 12px; border: 1px solid var(--_line); border-radius: 10px; background: var(--_surface-2);
  font-size: 12.5px; color: var(--_ink-2); }
#hrui .uac-jump { position: absolute; left: 50%; top: -26px; transform: translateX(-50%); width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center; background: var(--_surface); color: var(--_ink-2); border: 1px solid var(--_line);
  box-shadow: 0 6px 18px -8px rgba(15, 23, 42, .35); cursor: pointer; }
#hrui .uac-jump:hover { color: var(--_ink); }
#hrui .uac-jump:focus-visible { outline: 2px solid var(--_brand); outline-offset: 2px; }

/* ── a turn ──────────────────────────────────────────────────────────────────────────────────── */
#hrui .uac-turn { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
#hrui .uac-user { display: flex; justify-content: flex-end; min-width: 0; }
#hrui .uac-user-b { max-width: min(82%, 580px); background: var(--_user-bg); color: var(--_ink); border-radius: 18px 18px 6px 18px;
  padding: 10px 15px; font-size: var(--_fs); line-height: 1.55; min-width: 0; }
#hrui .uac-user-t { white-space: pre-wrap; overflow-wrap: anywhere; }
#hrui .uac-user-files { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
#hrui .uac-user-files:last-child { margin-bottom: 0; }
#hrui .uac-user-img { max-width: 220px; max-height: 160px; border-radius: 10px; display: block; object-fit: cover; }
#hrui .uac-chip { display: inline-flex; align-items: center; gap: 5px; max-width: 100%; padding: 3px 8px; border-radius: 7px;
  background: color-mix(in srgb, var(--_surface) 70%, transparent); border: 1px solid var(--_line); font-size: 12.5px; color: var(--_ink-2); }
#hrui .uac-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#hrui .uac-agent { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; min-width: 0; }
#hrui .uac-agent > * { max-width: 100%; }
#hrui .uac-agent > .uac-md, #hrui .uac-agent > .uac-todo, #hrui .uac-agent > .uac-group.is-open, #hrui .uac-agent > .uac-outcome, #hrui .uac-agent > .uac-meta { align-self: stretch; }
#hrui .uac-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 12.5px; color: var(--_faint); }
#hrui .uac-actions { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; font-size: 12.5px; color: var(--_faint); }

/* ── prose ───────────────────────────────────────────────────────────────────────────────────── */
#hrui .uac-md { font-size: var(--_fs); line-height: 1.66; color: var(--_ink); min-width: 0; overflow-wrap: anywhere; }
#hrui .uac-md > :first-child { margin-top: 0; }
#hrui .uac-md > :last-child { margin-bottom: 0; }
#hrui .uac-md p { margin: 0 0 10px; }
#hrui .uac-md h1, #hrui .uac-md h2, #hrui .uac-md h3, #hrui .uac-md h4 { margin: 18px 0 8px; line-height: 1.3; font-weight: 650; }
#hrui .uac-md h1 { font-size: 1.3em; } #hrui .uac-md h2 { font-size: 1.18em; } #hrui .uac-md h3 { font-size: 1.06em; } #hrui .uac-md h4 { font-size: 1em; }
#hrui .uac-md ul, #hrui .uac-md ol { margin: 0 0 10px; padding-left: 1.4em; }
#hrui .uac-md li { margin: 3px 0; }
#hrui .uac-md a { color: var(--_brand); text-decoration: underline; text-underline-offset: 2px; }
#hrui .uac-md code { font-family: var(--_mono); font-size: .88em; padding: 1px 5px; border-radius: 5px; background: var(--_surface-2); border: 1px solid var(--_line-soft); }
#hrui .uac-md pre { margin: 0 0 12px; padding: 12px 14px; border-radius: 10px; overflow-x: auto; background: var(--_surface-2); border: 1px solid var(--_line-soft); font-size: 12.5px; line-height: 1.55; }
#hrui .uac-md pre code { padding: 0; border: 0; background: none; font-size: inherit; }
#hrui .uac-md blockquote { margin: 0 0 10px; padding: 2px 0 2px 12px; border-left: 3px solid var(--_line); color: var(--_ink-2); }
#hrui .uac-md table { border-collapse: collapse; margin: 0 0 12px; font-size: .94em; display: block; max-width: 100%; overflow-x: auto; }
#hrui .uac-md th, #hrui .uac-md td { border: 1px solid var(--_line); padding: 5px 9px; text-align: left; vertical-align: top; }
#hrui .uac-md hr { border: 0; border-top: 1px solid var(--_line); margin: 14px 0; }
#hrui .uac-md img { max-width: 100%; border-radius: 8px; }
#hrui .uac-plain { white-space: pre-wrap; }
/* the newest words of streaming text fade in: a short gradient rides the end of the last line */
#hrui .uac-md.is-streaming > :last-child:not(pre):not(ul):not(ol):not(table):not(div)::after,
#hrui .uac-md.is-streaming > :is(ul, ol):last-child > li:last-child::after,
#hrui .uac-md.is-streaming .uac-plain::after,
#hrui .uac-md.is-streaming > div:last-child > :last-child:not(pre):not(ul):not(ol):not(table)::after {
  content: ''; display: inline-block; width: 3.4em; height: 1.25em; margin-left: -3.4em; vertical-align: text-bottom;
  background: linear-gradient(90deg, color-mix(in srgb, var(--_bg) 0%, transparent), var(--_bg) 92%); pointer-events: none; }

/* ── the live line and the mark ──────────────────────────────────────────────────────────────── */
#hrui .uac-working { display: inline-flex; align-items: center; gap: 7px; min-height: 26px; max-width: 100%; font-size: 13px; color: var(--_mute); }
#hrui .uac-working.is-button { background: none; border: 0; margin: 0; padding: 2px 8px 2px 0; font: inherit; font-size: 13px; color: var(--_mute);
  cursor: pointer; border-radius: 7px; text-align: left; }
#hrui .uac-working.is-button:hover .uac-verb:not(.uac-shimmer) { color: var(--_ink); }
#hrui .uac-working.is-button:focus-visible, #hrui .uac-sum:focus-visible, #hrui .uac-step-h:focus-visible { outline: 2px solid var(--_brand); outline-offset: 1px; }
#hrui .uac-elapsed { flex: none; font-variant-numeric: tabular-nums; color: var(--_faint); }
#hrui .uac-sep { flex: none; color: var(--_faint); }
#hrui .uac-verb { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--_ink-2); }
#hrui .uac-chev { flex: none; display: inline-flex; color: var(--_faint); }
#hrui .uac-shimmer { color: transparent; background: linear-gradient(90deg, var(--_mute) 0%, var(--_mute) 38%, var(--_ink) 50%, var(--_mute) 62%, var(--_mute) 100%);
  background-size: 260% 100%; -webkit-background-clip: text; background-clip: text; animation: uac-shimmer 2.4s linear infinite; }
@keyframes uac-shimmer { from { background-position: 100% 0; } to { background-position: -160% 0; } }

#hrui .uac-mark { position: relative; flex: none; display: inline-grid; place-items: center; width: var(--uac-mark, 18px); height: var(--uac-mark, 18px); perspective: 80px; }
#hrui .uac-mark-in { position: relative; display: grid; place-items: center; width: 100%; height: 100%; border-radius: 5px; overflow: hidden; transform-origin: 50% 50%; will-change: transform; }
#hrui .uac-mark-in > img, #hrui .uac-mark-in > svg { display: block; width: 100%; height: 100%; object-fit: contain; }
#hrui .uac-mark-aura { position: absolute; inset: -4px; border-radius: 50%; pointer-events: none; opacity: 0;
  background: radial-gradient(circle, color-mix(in srgb, var(--_brand) 34%, transparent) 0%, transparent 68%);
  animation: uac-aura 2s ease-out infinite; }
#hrui .uac-mark[data-motion="dots"] .uac-mark-aura { display: none; }
@keyframes uac-aura { 0% { opacity: 0; transform: scale(.55); } 35% { opacity: .55; } 100% { opacity: 0; transform: scale(1.35); } }

#hrui .uac-mark[data-motion="bloom"] .uac-mark-in { overflow: visible; animation: uac-bloom 2.6s cubic-bezier(.45, 0, .55, 1) infinite; }
@keyframes uac-bloom { 0% { transform: rotate(0deg) scale(.8); } 50% { transform: rotate(30deg) scale(1.08); } 100% { transform: rotate(60deg) scale(.8); } }
#hrui .uac-mark[data-motion="sheen"] .uac-mark-in { animation: uac-bob 2.2s ease-in-out infinite; }
#hrui .uac-mark[data-motion="sheen"] .uac-mark-in::after { content: ''; position: absolute; inset: 0; transform: translateX(-130%);
  background: linear-gradient(105deg, transparent 28%, rgba(255, 255, 255, .85) 50%, transparent 72%); animation: uac-sheen 2.2s ease-in-out infinite; }
@keyframes uac-sheen { 0%, 15% { transform: translateX(-130%); } 65%, 100% { transform: translateX(130%); } }
#hrui .uac-mark[data-motion="glint"] .uac-mark-in { animation: uac-glint 1.7s ease-in-out infinite; }
@keyframes uac-glint { 0%, 100% { transform: scale(.86) rotate(0deg); filter: brightness(1); } 50% { transform: scale(1.06) rotate(8deg); filter: brightness(1.25) saturate(1.2); } }
#hrui .uac-mark[data-motion="flutter"] .uac-mark-in { animation: uac-flutter .95s ease-in-out infinite; }
@keyframes uac-flutter { 0%, 100% { transform: translateY(0) rotate(-6deg); } 50% { transform: translateY(-2px) rotate(6deg); } }
#hrui .uac-mark[data-motion="glide"] .uac-mark-in { overflow: visible; animation: uac-glide 2s ease-in-out infinite; }
@keyframes uac-glide { 0%, 100% { transform: translate(0, 1px) rotate(-5deg); } 50% { transform: translate(1px, -2px) rotate(5deg); } }
#hrui .uac-mark[data-motion="blink"] .uac-mark-in { animation: uac-blink 2s ease-in-out infinite; }
@keyframes uac-blink { 0%, 42%, 58%, 100% { transform: scaleY(1); } 50% { transform: scaleY(.12); } }
#hrui .uac-mark[data-motion="flip"] .uac-mark-in { overflow: visible; animation: uac-flip 2.2s cubic-bezier(.6, 0, .4, 1) infinite; }
@keyframes uac-flip { 0% { transform: rotateY(0deg); } 60%, 100% { transform: rotateY(360deg); } }
#hrui .uac-mark[data-motion="swim"] .uac-mark-in { overflow: visible; animation: uac-swim 1.6s ease-in-out infinite; }
@keyframes uac-swim { 0%, 100% { transform: translateX(-1px) rotate(-6deg); } 50% { transform: translateX(1.5px) rotate(5deg); } }
#hrui .uac-mark[data-motion="spin"] .uac-mark-in { animation: uac-spin 2.4s linear infinite; }
#hrui .uac-mark[data-motion="wave"] .uac-mark-in { overflow: visible; transform-origin: 50% 90%; animation: uac-wave 1.1s ease-in-out infinite; }
@keyframes uac-wave { 0%, 100% { transform: rotate(-11deg); } 50% { transform: rotate(11deg); } }
#hrui .uac-mark[data-motion="dash"] .uac-mark-in { overflow: visible; animation: uac-dash 1.1s ease-in-out infinite; }
@keyframes uac-dash { 0%, 100% { transform: translateX(-1.5px) skewX(0deg); } 40% { transform: translateX(2px) skewX(-9deg); } }
#hrui .uac-mark[data-motion="scuttle"] .uac-mark-in { overflow: visible; animation: uac-scuttle .7s ease-in-out infinite; }
@keyframes uac-scuttle { 0%, 100% { transform: translateX(-1.5px); } 50% { transform: translateX(1.5px); } }
#hrui .uac-mark[data-motion="equalize"] .uac-mark-in { transform-origin: 50% 100%; animation: uac-eq 1s ease-in-out infinite; }
@keyframes uac-eq { 0%, 100% { transform: scaleY(.72); } 50% { transform: scaleY(1.06); } }
#hrui .uac-mark[data-motion="bob"] .uac-mark-in { animation: uac-bob 1.4s ease-in-out infinite; }
@keyframes uac-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-2.5px); } }
#hrui .uac-mark[data-motion="pulse"] .uac-mark-in { animation: uac-pulse 1.6s ease-in-out infinite; }
@keyframes uac-pulse { 0%, 100% { transform: scale(.86); opacity: .72; } 50% { transform: scale(1.04); opacity: 1; } }
@keyframes uac-spin { to { transform: rotate(360deg); } }

/* no mark: three dots jostling round a small loop, each at its own size and phase */
#hrui .uac-mark[data-motion="dots"] .uac-mark-in { overflow: visible; border-radius: 0; }
#hrui .uac-mark[data-motion="dots"] i { position: absolute; left: 0; top: 0; border-radius: 50%; background: var(--_brand); animation: uac-dots 1.5s ease-in-out infinite; }
#hrui .uac-mark[data-motion="dots"] i:nth-child(1) { width: 4px; height: 4px; }
#hrui .uac-mark[data-motion="dots"] i:nth-child(2) { width: 5px; height: 5px; animation-delay: -.5s; }
#hrui .uac-mark[data-motion="dots"] i:nth-child(3) { width: 3.5px; height: 3.5px; animation-delay: -1s; }
@keyframes uac-dots {
  0%, 100% { transform: translate(2px, 9px); }
  33% { transform: translate(8px, 3px) scale(1.15); }
  66% { transform: translate(13px, 10px) scale(.85); }
}

/* ── work: the summary line, the calls, one call ─────────────────────────────────────────────── */
#hrui .uac-group { min-width: 0; max-width: 100%; }
#hrui .uac-sum { display: inline-flex; align-items: center; gap: 7px; max-width: 100%; background: none; border: 0; margin: 0; padding: 2px 8px 2px 0;
  font: inherit; font-size: 13px; color: var(--_mute); cursor: pointer; border-radius: 7px; text-align: left; min-height: 26px; }
#hrui .uac-sum:hover { color: var(--_ink); }
#hrui .uac-sum:hover .uac-chev { color: var(--_ink-2); }
#hrui .uac-sum-t { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#hrui .uac-fail-n { flex: none; font-size: 11.5px; color: var(--_fail); }
#hrui .uac-calls { margin-top: 6px; border: 1px solid var(--_line); border-radius: 11px; overflow: hidden; background: var(--_surface); }
#hrui .uac-step { min-width: 0; }
#hrui .uac-step + .uac-step { border-top: 1px solid var(--_line-soft); }
#hrui .uac-step-h { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 36px; margin: 0; padding: 7px 11px; background: none; border: 0;
  font: inherit; font-size: 12.75px; color: var(--_ink-2); text-align: left; cursor: pointer; min-width: 0; }
#hrui .uac-step-h:disabled { cursor: default; }
#hrui .uac-step-h:hover:not(:disabled) { background: var(--_hover); }
#hrui .uac-step-t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#hrui .uac-step-v { color: var(--_mute); }
#hrui .uac-step-o { color: var(--_ink); }
#hrui .uac-step-o.is-mono { font-family: var(--_mono); font-size: 12px; }
#hrui .uac-step-n { flex: none; font-size: 12px; color: var(--_faint); }
#hrui .uac-step-t .uac-step-n { margin-left: 6px; }
#hrui .uac-step-time { flex: none; font-size: 12px; color: var(--_faint); font-variant-numeric: tabular-nums; }
#hrui .uac-step.is-failed .uac-step-o, #hrui .uac-step.is-failed .uac-step-v { color: var(--_fail); }
#hrui .uac-step-err { margin: -2px 0 0; padding: 0 12px 9px 36px; font-family: var(--_mono); font-size: 12px; color: var(--_fail); overflow-wrap: anywhere; }
/* a call the host opens in a place of its own (openStep): the one it is showing now stays marked */
#hrui .uac-step.is-active > .uac-step-h { background: var(--_hover); }
#hrui .uac-step.is-active .uac-step-v { color: var(--_ink-2); }
#hrui .uac-step.is-active .uac-kind { color: var(--_brand); }
#hrui .uac-kind, #hrui .uac-x, #hrui .uac-ring, #hrui .uac-stopped { flex: none; width: 16px; height: 16px; display: grid; place-items: center; }
#hrui .uac-kind { color: var(--_faint); }
#hrui .uac-kind svg { width: 14px; height: 14px; }
#hrui .uac-x { color: var(--_fail); }
#hrui .uac-ring::before { content: ''; width: 11px; height: 11px; border-radius: 50%; border: 1.8px solid var(--_line); border-top-color: var(--_brand); animation: uac-spin .9s linear infinite; }
#hrui .uac-stopped::before { content: ''; width: 8px; height: 8px; border-radius: 2px; background: var(--_faint); }
#hrui .uac-thought { padding: 0 14px 12px 36px; font-size: 12.75px; line-height: 1.6; color: var(--_mute); white-space: pre-wrap; overflow-wrap: anywhere; }
#hrui .uac-group.is-live .uac-calls { margin-top: 4px; }

#hrui .uac-diff { flex: none; display: inline-flex; gap: 3px; font-family: var(--_mono); font-size: 11px; line-height: 1; }
#hrui .uac-add, #hrui .uac-del { padding: 3px 4px; border-radius: 4px; }
#hrui .uac-add { color: var(--_add); background: color-mix(in srgb, var(--_add) 13%, transparent); }
#hrui .uac-del { color: var(--_del); background: color-mix(in srgb, var(--_del) 11%, transparent); }

#hrui .uac-detail { display: flex; flex-direction: column; gap: 10px; padding: 2px 12px 12px 36px; min-width: 0; }
#hrui .uac-sec { min-width: 0; }
#hrui .uac-sec > header { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 4px;
  font-size: 10.5px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--_faint); }
#hrui .uac-sec.is-failed > header > span:first-child { color: var(--_fail); }
#hrui .uac-copy { display: inline-flex; align-items: center; gap: 4px; padding: 3px 6px; margin: -3px -6px -3px 0; background: none; border: 0; border-radius: 6px;
  font: inherit; font-size: 11px; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--_faint); cursor: pointer; }
#hrui .uac-copy:hover { color: var(--_ink); background: var(--_hover); }
#hrui .uac-copy.is-ok { color: var(--_add); }
#hrui .uac-copy:focus-visible { outline: 2px solid var(--_brand); outline-offset: 1px; }
#hrui .uac-lines pre { margin: 0; max-height: 320px; overflow: auto; padding: 8px 0; border-radius: 8px; background: var(--_surface-2); border: 1px solid var(--_line-soft);
  font-family: var(--_mono); font-size: 12px; line-height: 1.55; color: var(--_ink-2); white-space: pre-wrap; overflow-wrap: anywhere; }
#hrui .uac-ln { display: block; padding: 0 11px; min-height: 1.55em; }
#hrui .uac-ln.is-add { color: var(--_add); background: color-mix(in srgb, var(--_add) 11%, transparent); }
#hrui .uac-ln.is-del { color: var(--_del); background: color-mix(in srgb, var(--_del) 9%, transparent); }
#hrui .uac-ln.is-cmd { color: var(--_ink); }
#hrui .uac-ln.is-note, #hrui .uac-ln.is-path { color: var(--_faint); font-family: inherit; }
#hrui .uac-lno { display: inline-block; min-width: 2.4em; margin-right: 8px; color: var(--_faint); text-align: right; user-select: none; }
#hrui .uac-more { margin: 5px 0 0; padding: 2px 0; background: none; border: 0; font: inherit; font-size: 12px; color: var(--_brand); cursor: pointer; }
#hrui .uac-more:hover { text-decoration: underline; }
#hrui .uac-none { margin: 0; font-size: 12px; color: var(--_faint); }

/* ── the plan ────────────────────────────────────────────────────────────────────────────────── */
#hrui .uac-todo { display: flex; flex-direction: column; gap: 5px; padding: 10px 14px; border: 1px solid var(--_line); border-radius: 12px; background: var(--_surface); min-width: 0; }
#hrui .uac-todo-i { display: flex; align-items: flex-start; gap: 9px; font-size: 13.25px; line-height: 1.45; color: var(--_ink); min-width: 0; }
#hrui .uac-todo-t { min-width: 0; overflow-wrap: anywhere; }
#hrui .uac-todo-m { flex: none; width: 14px; height: 14px; margin-top: 2px; border-radius: 50%; border: 1.5px dashed var(--_faint); display: grid; place-items: center; box-sizing: border-box; }
#hrui .uac-todo-i.is-completed .uac-todo-m { border: 0; background: var(--_ink-2); color: var(--_surface); }
#hrui .uac-todo-i.is-completed .uac-todo-t { color: var(--_mute); }
#hrui .uac-todo-i.is-in_progress .uac-todo-m { border: 1.5px solid var(--_line); border-top-color: var(--_brand); animation: uac-spin 1s linear infinite; }
#hrui .uac-todo-i.is-in_progress.is-held .uac-todo-m { animation: none; border-top-color: var(--_faint); }
#hrui .uac-todo-i.is-in_progress .uac-todo-t { font-weight: 550; }
#hrui .uac-todo-i.is-cancelled .uac-todo-t { color: var(--_faint); text-decoration: line-through; }

/* ── how it ended ────────────────────────────────────────────────────────────────────────────── */
#hrui .uac-outcome { font-size: 12.5px; color: var(--_faint); font-variant-numeric: tabular-nums; }
#hrui .uac-outcome.is-failed > span { color: var(--_fail); }
#hrui .uac-outcome.is-incomplete > span { color: var(--_warn); }
#hrui .uac-outcome-why { margin: 6px 0 0; padding: 9px 12px; border-radius: 9px; font-size: 13px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere;
  color: var(--uic-fail-ink, #b91c1c); background: var(--uic-fail-bg, #fef2f2); border: 1px solid var(--uic-fail-line, #fecaca); }
#hrui .uac-outcome.is-incomplete .uac-outcome-why { color: var(--uic-incomplete-ink, #92400e); background: var(--uic-incomplete-bg, #fffbeb); border-color: var(--uic-incomplete-line, #fde68a); }

/* ── the composer ────────────────────────────────────────────────────────────────────────────── */
#hrui .uac-composer { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 10px 10px 9px 14px; border: 1px solid var(--_line); border-radius: 20px;
  background: var(--_surface); box-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 10px 28px -18px rgba(15, 23, 42, .28); transition: border-color .15s, box-shadow .15s; }
#hrui .uac-composer:focus-within { border-color: color-mix(in srgb, var(--_brand) 40%, var(--_line)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--_brand) 12%, transparent), 0 10px 28px -18px rgba(15, 23, 42, .28); }
#hrui .uac-composer.is-dropping { border-color: var(--_brand); background: color-mix(in srgb, var(--_brand) 5%, var(--_surface)); }
#hrui .uac-composer.is-disabled { opacity: .7; }
#hrui .uac-composer textarea { display: block; width: 100%; min-height: 26px; margin: 0; padding: 4px 2px; border: 0; outline: 0; resize: none; background: transparent;
  font: inherit; font-size: 15px; line-height: 1.5; color: var(--_ink); }
#hrui .uac-composer textarea::placeholder { color: var(--_faint); }
#hrui .uac-composer-row { display: flex; align-items: center; gap: 6px; min-width: 0; flex-wrap: nowrap; }
#hrui .uac-composer-sp { flex: 1; min-width: 0; }
#hrui .uac-composer-foot { font-size: 12px; color: var(--_faint); }
#hrui .uac-icon-btn { flex: none; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--_line); background: var(--_surface);
  color: var(--_mute); cursor: pointer; }
#hrui .uac-icon-btn:hover:not(:disabled) { color: var(--_ink); background: var(--_hover); }
#hrui .uac-send { flex: none; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--uac-send-bg, var(--_ink)); color: var(--uac-send-ink, var(--_surface)); transition: opacity .15s, transform .1s; }
#hrui .uac-send:active:not(:disabled) { transform: scale(.94); }
#hrui .uac-send:disabled { opacity: .3; cursor: not-allowed; }
#hrui .uac-send.is-stop:disabled { opacity: .5; cursor: progress; }
#hrui .uac-icon-btn:focus-visible, #hrui .uac-send:focus-visible { outline: 2px solid var(--_brand); outline-offset: 2px; }
#hrui .uac-atts { display: flex; flex-wrap: wrap; gap: 6px; }
#hrui .uac-att { display: inline-flex; align-items: center; gap: 6px; max-width: min(260px, 100%); padding: 4px 4px 4px 8px; border: 1px solid var(--_line); border-radius: 9px;
  background: var(--_surface-2); font-size: 12.5px; color: var(--_ink-2); min-width: 0; }
#hrui .uac-att img { width: 24px; height: 24px; border-radius: 5px; object-fit: cover; flex: none; }
#hrui .uac-att-n { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#hrui .uac-att button { flex: none; width: 22px; height: 22px; display: grid; place-items: center; border: 0; border-radius: 6px; background: none; color: var(--_faint); cursor: pointer; }
#hrui .uac-att button:hover { color: var(--_ink); background: var(--_hover); }
#hrui .uac-att.is-error { border-color: var(--uic-fail-line, #fecaca); color: var(--_fail); }

/* ── the files a turn made, opened beside the conversation (ArtifactPanel; FilePreview's own
      styles are reifyui/styles/file.css) ─────────────────────────────────────────────────── */
#hrui .uac-art { display: flex; flex-direction: column; min-width: 0; min-height: 0; height: 100%; background: var(--_surface); color: var(--_ink); }
#hrui .uac-art > .uic-fp { flex: 1; min-height: 0; height: 100%; display: flex; flex-direction: column; }
#hrui .uac-art .uic-fp-head { position: relative; gap: 8px; }
/* the file name in the header is a switcher: a dropdown of every file of the conversation */
#hrui .uac-fs { position: relative; flex: 1 1 auto; min-width: 0; display: flex; }
#hrui .uac-fs-btn { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; min-width: 0; margin: 0; padding: 4px 6px 4px 4px; border: 0; border-radius: 8px;
  background: none; font: inherit; font-size: 13.5px; font-weight: 600; color: var(--_ink); cursor: pointer; text-align: left; }
#hrui .uac-fs-btn:hover:not(:disabled), #hrui .uac-fs.is-open .uac-fs-btn { background: var(--_hover); }
#hrui .uac-fs-btn:disabled { cursor: default; opacity: 1; }
#hrui .uac-fs-btn:focus-visible { outline: 2px solid var(--_brand); outline-offset: 1px; }
#hrui .uac-mid { display: inline-flex; min-width: 0; max-width: 100%; white-space: nowrap; }
#hrui .uac-mid-h { min-width: 1ch; overflow: hidden; text-overflow: ellipsis; }
#hrui .uac-mid-t { flex: none; }
#hrui .uac-fs-name { min-width: 0; }
#hrui .uac-fs-chev { flex: none; color: var(--_faint); transition: transform .15s; }
#hrui .uac-fs.is-open .uac-fs-chev { transform: rotate(180deg); }
#hrui .uac-fs-scrim { display: none; }
#hrui .uac-fs-pop { position: absolute; top: calc(100% + 6px); left: -32px; z-index: 30; width: min(440px, calc(100vw - 24px)); max-height: min(60vh, 520px);
  display: flex; flex-direction: column; background: var(--_surface); color: var(--_ink); border: 1px solid var(--_line); border-radius: 12px;
  box-shadow: 0 16px 40px -14px rgba(15, 23, 42, .35); overflow: hidden; }
#hrui .uac-fs-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px 6px; font-size: 11px; font-weight: 600;
  letter-spacing: .06em; text-transform: uppercase; color: var(--_faint); }
#hrui .uac-fs-count { font-variant-numeric: tabular-nums; }
#hrui .uac-fs-q { margin: 2px 10px 6px; padding: 7px 10px; border: 1px solid var(--_line); border-radius: 8px; background: var(--_surface-2); font: inherit;
  font-size: 13px; color: var(--_ink); outline: 0; }
#hrui .uac-fs-q:focus { border-color: color-mix(in srgb, var(--_brand) 45%, var(--_line)); }
#hrui .uac-fs-list { flex: 1; min-height: 0; overflow: auto; padding: 2px 6px 8px; outline: 0; }
#hrui .uac-fs-dir { padding: 8px 8px 3px; font-size: 11.5px; color: var(--_faint); font-family: var(--_mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#hrui .uac-fs-opt { display: flex; align-items: center; gap: 9px; padding: 7px 8px; border-radius: 8px; cursor: pointer; font-size: 13px; color: var(--_ink-2); min-width: 0; }
#hrui .uac-fs-opt.is-hi { background: var(--_hover); }
#hrui .uac-fs-opt.is-on { color: var(--_ink); font-weight: 600; }
#hrui .uac-fs-on { flex: 1; min-width: 0; }
#hrui .uac-fs-meta { flex: none; font-size: 11.5px; font-weight: 400; color: var(--_faint); font-variant-numeric: tabular-nums; }
#hrui .uac-fs-ck { flex: none; width: 16px; display: grid; place-items: center; color: var(--_brand); }
#hrui .uac-fs-none { padding: 12px 10px; font-size: 13px; color: var(--_faint); }
/* a phone: the list is a sheet from the bottom of the screen */
@media (max-width: 560px) {
  #hrui .uac-fs-scrim { display: block; position: fixed; inset: 0; z-index: calc(var(--uac-z-overlay, 60) + 1); background: var(--uic-scrim, rgba(17, 24, 39, .42)); }
  #hrui .uac-fs-pop { position: fixed; top: auto; left: 0; right: 0; bottom: 0; width: auto; max-height: 75vh; z-index: calc(var(--uac-z-overlay, 60) + 2);
    border-radius: 16px 16px 0 0; border-bottom: 0; padding-bottom: env(safe-area-inset-bottom, 0px); }
  #hrui .uac-fs-opt { padding: 11px 10px; font-size: 14px; }
}
#hrui .uac-art.is-overlay { position: fixed; top: 0; right: 0; bottom: 0; width: min(680px, 100vw); height: auto; z-index: var(--uac-z-overlay, 60);
  box-shadow: -16px 0 40px rgba(15, 23, 42, .22); padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px);
  animation: uac-art-in .18s ease-out; }
#hrui .uac-art-scrim { position: fixed; inset: 0; z-index: calc(var(--uac-z-overlay, 60) - 1); background: var(--uic-scrim, rgba(17, 24, 39, .42)); }
@keyframes uac-art-in { from { transform: translateX(24px); opacity: .6; } to { transform: none; opacity: 1; } }

/* ── narrow ──────────────────────────────────────────────────────────────────────────────────── */
@media (max-width: 560px) {
  #hrui .uac-thread { gap: 24px; }
  #hrui .uac-user-b { max-width: 90%; }
  #hrui .uac-detail { padding-left: 12px; }
  #hrui .uac-step-err, #hrui .uac-thought { padding-left: 12px; }
  #hrui .uac-step-h { padding: 7px 9px; }
  #hrui .uac-lines pre { max-height: 260px; }
  #hrui .uac-composer { border-radius: 18px; }
  #hrui .uac-composer textarea { font-size: 16px; }   /* 16px keeps a phone from zooming into the field */
}

/* ── motion off ──────────────────────────────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  #hrui .uac-mark-in, #hrui .uac-mark-in::after, #hrui .uac-mark-aura, #hrui .uac-mark i, #hrui .uac-ring::before, #hrui .uac-todo-m, #hrui .uac-shimmer { animation: none !important; }
  #hrui .uac-mark-aura { display: none; }
  #hrui .uac-mark[data-motion="sheen"] .uac-mark-in::after { display: none; }
  #hrui .uac-mark[data-motion="dots"] i:nth-child(1) { transform: translate(1px, 7px); }
  #hrui .uac-mark[data-motion="dots"] i:nth-child(2) { transform: translate(7px, 6.5px); }
  #hrui .uac-mark[data-motion="dots"] i:nth-child(3) { transform: translate(14px, 7.5px); }
  #hrui .uac-shimmer { color: var(--_ink-2); background: none; }
  #hrui .uac-ring::before { border-color: var(--_brand); }
  #hrui .uac-composer, #hrui .uac-send { transition: none; }
  #hrui .uac-art.is-overlay { animation: none; }
  #hrui .uac-fs-chev { transition: none; }
}
#hrui .uac-mark.is-still .uac-mark-in, #hrui .uac-mark.is-still .uac-mark-aura, #hrui .uac-mark.is-still i { animation: none; }


/* ── file.css ── */
/* Files: the card that names one, and the pane that renders it.
   Ported from the HarnessRouter console so a file looks the same wherever it appears — under a
   chat answer, inside a spreadsheet cell, in a preview header. Product-neutral: every colour is
   a --uic-* token. */

/* ── the card ──────────────────────────────────────────────────────────── */
#hrui .uic-filecard {
  display: flex; align-items: center; gap: 10px; min-width: 0;
  padding: 10px 12px; border-radius: 12px;
  border: 1px solid var(--uic-line, #DDDFE6); background: var(--uic-surface, #FFFFFF);
  box-shadow: var(--uic-shadow-1, 0 1px 2px rgba(17, 24, 39, .04));
}
#hrui .uic-filecard.is-clickable { cursor: pointer; }
#hrui .uic-filecard.is-clickable:hover { border-color: var(--uic-brand-soft, #E1E9FF); }
#hrui .uic-filecard:focus-visible { outline: 2px solid var(--uic-brand, #285AFF); outline-offset: 2px; }
/* the file open in a preview beside the conversation */
#hrui .uic-filecard.is-active { border-color: var(--uic-brand, #285AFF); box-shadow: 0 0 0 3px var(--uic-focus-ring, rgba(40, 90, 255, .14)); }
#hrui .uic-filecard-ic { flex: 0 0 auto; display: flex; align-items: center; justify-content: center; }
#hrui .uic-filecard-thumb { flex: 0 0 auto; width: 40px; height: 40px; border-radius: 8px; overflow: hidden; background: var(--uic-surface-2, #F7F8FA); border: 1px solid var(--uic-line, #DDDFE6); }
#hrui .uic-filecard-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
#hrui .uic-filecard-meta { flex: 1 1 auto; min-width: 0; }
#hrui .uic-filecard-name {
  display: block; font-size: 13.5px; font-weight: 600; color: var(--uic-ink, #111317);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
#hrui .uic-filecard-sub {
  display: block; margin-top: 2px; font-size: 12px; color: var(--uic-mute, #5B5D66);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
#hrui .uic-filecard-dl {
  width: 34px; height: 34px; flex: 0 0 auto; border-radius: 9px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid transparent; background: transparent; cursor: pointer;
  color: var(--uic-mute, #5B5D66);
}
#hrui .uic-filecard-dl:hover { background: var(--uic-brand-faint, #EFF3FF); color: var(--uic-brand, #285AFF); }
#hrui .uic-filecard-open {
  flex: 0 0 auto; font-family: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
  white-space: nowrap; padding: 7px 15px; border-radius: 9px;
  color: var(--uic-brand, #285AFF); background: var(--uic-surface, #FFFFFF);
  border: 1px solid var(--uic-line, #DDDFE6);
}
#hrui .uic-filecard-open:hover { border-color: var(--uic-brand-soft, #E1E9FF); background: var(--uic-brand-faint, #EFF3FF); }
#hrui .uic-filecard-dl:focus-visible, #hrui .uic-filecard-open:focus-visible {
  outline: 2px solid var(--uic-brand, #285AFF); outline-offset: 2px;
}


/* The fallback glyph, for a build without react-file-icon. A file with no icon still has to be
   identifiable, so the extension itself is the icon. */
#hrui .uic-fileglyph {
  border-radius: 4px; background: var(--uic-surface-2, #F7F8FA);
  border: 1px solid var(--uic-line, #DDDFE6);
  display: inline-flex !important; align-items: flex-end; justify-content: center; padding-bottom: 2px;
}
#hrui .uic-fileglyph-ext {
  font-size: 8px; font-weight: 700; text-transform: uppercase; letter-spacing: .02em;
  color: var(--uic-mute, #5B5D66);
}

/* ── the preview pane ──────────────────────────────────────────────────── */
#hrui .uic-fp {
  display: flex; flex-direction: column; min-width: 0; min-height: 0; height: 100%;
  background: var(--uic-surface, #FFFFFF);
}
#hrui .uic-fp-head {
  flex: 0 0 auto; display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-bottom: 1px solid var(--uic-line, #DDDFE6);
}
#hrui .uic-fp-ic { flex: 0 0 auto; display: flex; }
#hrui .uic-fp-name {
  flex: 1 1 auto; min-width: 0; font-size: 13.5px; font-weight: 600; color: var(--uic-ink, #111317);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
#hrui .uic-fp-btn {
  width: 30px; height: 30px; flex: 0 0 auto; border: none; background: transparent;
  border-radius: 8px; cursor: pointer; color: var(--uic-mute, #5B5D66);
  display: inline-flex; align-items: center; justify-content: center;
}
#hrui .uic-fp-btn:hover { background: var(--uic-brand-faint, #EFF3FF); color: var(--uic-ink, #111317); }
/* the Preview | Source switch of an HTML file, a segmented control in the header */
#hrui .uic-fp-seg { flex: 0 0 auto; display: inline-flex; gap: 2px; padding: 2px; border-radius: 8px; background: var(--uic-surface-2, #F7F8FA); border: 1px solid var(--uic-line, #DDDFE6); }
#hrui .uic-fp-seg-btn { height: 24px; padding: 0 10px; border: 0; border-radius: 6px; background: transparent; color: var(--uic-mute, #5B5D66); font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; }
#hrui .uic-fp-seg-btn.is-on { background: var(--uic-surface, #FFFFFF); color: var(--uic-ink, #111317); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08); }

#hrui .uic-fp-body { flex: 1; min-height: 0; overflow: auto; }
#hrui .uic-fp-pad { padding: 18px; }
#hrui .uic-fp-skel { display: block; width: 100%; height: 220px; border-radius: 10px; }
#hrui .uic-fp-center { min-height: 100%; display: flex; align-items: center; justify-content: center; padding: 18px; }
#hrui .uic-fp-img, #hrui .uic-fp-media { max-width: 100%; max-height: 100%; border-radius: 8px; }
#hrui .uic-fp-frame { width: 100%; height: 100%; min-height: 480px; border: 0; display: block; }
#hrui .uic-fp-doc {
  padding: 22px 26px; max-width: 820px; margin: 0 auto;
  font-size: 14px; line-height: 1.65; color: var(--uic-ink, #111317);
}
#hrui .uic-fp-doc table { border-collapse: collapse; margin: 0 0 1em; }
#hrui .uic-fp-doc td, #hrui .uic-fp-doc th { border: 1px solid var(--uic-line, #DDDFE6); padding: 5px 9px; }
#hrui .uic-fp-doc img { max-width: 100%; }
#hrui .uic-fp-pre { margin: 0; white-space: pre-wrap; font-family: var(--uic-mono, ui-monospace, Menlo, monospace); font-size: 12.5px; }

#hrui .uic-fp-sheet { padding: 14px; overflow: auto; }
#hrui .uic-fp-sheet table { border-collapse: collapse; font-size: 12.5px; width: max-content; }
#hrui .uic-fp-sheet td, #hrui .uic-fp-sheet th {
  border: 1px solid var(--uic-line, #DDDFE6); padding: 4px 10px; white-space: nowrap;
  min-width: 56px; color: var(--uic-ink-2, #3A3D45);
}
#hrui .uic-fp-sheet th { background: var(--uic-surface-2, #F7F8FA); font-weight: 600; text-align: left; }
#hrui .uic-fp-xlsx { display: flex; flex-direction: column; height: 100%; min-height: 0; }
#hrui .uic-fp-xlsx .uic-fp-sheet { flex: 1; min-height: 0; }
#hrui .uic-fp-tabs {
  flex: 0 0 auto; display: flex; gap: 2px; padding: 6px 8px; overflow-x: auto;
  border-top: 1px solid var(--uic-line, #DDDFE6); background: var(--uic-surface-2, #F7F8FA);
}
#hrui .uic-fp-tab {
  flex: 0 0 auto; max-width: 180px; padding: 5px 12px; cursor: pointer;
  font-size: 12px; font-weight: 600; font-family: inherit; color: var(--uic-mute, #5B5D66);
  background: transparent; border: 1px solid transparent; border-radius: 7px 7px 0 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
#hrui .uic-fp-tab.is-on {
  color: var(--uic-brand, #285AFF); background: var(--uic-surface, #FFFFFF);
  border-color: var(--uic-line, #DDDFE6); border-bottom-color: var(--uic-surface, #FFFFFF);
}
#hrui .uic-fp-tab.is-empty { opacity: .55; font-weight: 500; }
#hrui .uic-fp-empty {
  display: flex; align-items: center; justify-content: center; padding: 32px;
  color: var(--uic-mute, #5B5D66); font-size: 13px;
}
#hrui .uic-fp-fallback { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px; }
#hrui .uic-fp-fallback p { margin: 0; font-size: 13px; color: var(--uic-mute, #5B5D66); }
#hrui .uic-fp-dl {
  font-family: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
  padding: 7px 14px; border-radius: 9px;
  color: var(--uic-brand, #285AFF); background: var(--uic-brand-faint, #EFF3FF);
  border: 1px solid var(--uic-brand-soft, #E1E9FF);
}


/* ── chat.css ── */
/* UI Core — Conversational Agent surface styles.
   Extracted from HarnessRouter's workbench chat (hr.css wbx-*); class names kept so the
   extraction is drop-in. Every color / font / key spacing reads a --uic-* custom property with
   the HarnessRouter light value as fallback, so an unthemed consumer looks exactly like HR.

   Token contract (define on :root or any ancestor of the chat surface):
     --uic-surface        panel / composer background            #FFFFFF
     --uic-line           hairline borders                       #DDDFE6
     --uic-ink            primary text                           #111317
     --uic-ink-2          secondary text                         #3A3D45
     --uic-mute           tertiary / quiet text                  #5B5D66
     --uic-brand          accent (icons, links, live dots)       #285AFF
     --uic-brand-ink      accent pressed / dark                  #1641D8
     --uic-brand-soft     accent border tint                     #E1E9FF
     --uic-brand-faint    accent background tint                 #EFF3FF
     --uic-ok             success (Done check)                   #16a34a
     --uic-mono           monospace stack                        ui-monospace, SFMono-Regular, Menlo, monospace
     --uic-shadow-1       card shadow                            (see below)
     --uic-code-block-bg / --uic-code-block-ink                  #0f1117 / #e6e8ee
     --uic-code-keyword / -string / -comment / -number / -function
                          syntax-highlight palette (CodeBlock)   tuned for the dark block, see below
     --uic-code-lang-ink  language label top-right of the block  #59627288
     --uic-fail-ink/-line/-bg, --uic-cancel-ink/-line/-bg,
     --uic-incomplete-ink/-line/-bg                              terminal badge palettes
     --uic-font-md        message / prose base size              14px
     --uic-turn-pad-x     horizontal padding of a message row    28px
     --uic-bubble-max-w   user bubble max width                  80%
     --uic-working-ink    Working… indicator text color          inherit
   Presets: themes/light.css (.uic-light) and themes/dark.css (.uic-dark) set all of these. */

/* ── message rows ─────────────────────────────────────────────────────────── */
/* A turn fills the column; user right-aligned, assistant stacks timeline above prose. */
#hrui .wbx-turn { display: flex; min-width: 0; padding: 0 var(--uic-turn-pad-x, 28px); }
#hrui .wbx-turn.user { justify-content: flex-end; }
/* The optional caption above a turn: who said it. In the user turn it shares a column with the
   bubble (`.wbx-turn-body`) so both start at the same left edge; in the assistant turn it is simply
   the first line. Never a percentage flex-basis here: in a column that is 100% of the HEIGHT. */
#hrui .wbx-role { flex: none; width: 100%; font-family: var(--uic-mono, ui-monospace, monospace); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--uic-cap, #a8a29e); margin-bottom: 7px; }
#hrui .wbx-turn-body { display: flex; flex-direction: column; min-width: 0; max-width: var(--uic-bubble-max-w, 80%); }
#hrui .wbx-turn-body > .wbx-bubble-user { max-width: none; }
/* assistant turn stacks vertically: activity timeline ABOVE the answer (never side by side) */
#hrui .wbx-turn.asst { flex-direction: column; gap: 10px; align-items: stretch; }
#hrui .wbx-bubble-user { max-width: var(--uic-bubble-max-w, 80%); background: var(--uic-brand-faint, #EFF3FF);
  border: 1px solid var(--uic-brand-soft, #E1E9FF);
  color: var(--uic-ink, #111317); border-radius: 16px 16px 5px 16px; padding: 10px 14px;
  font-size: var(--uic-font-md, 14px); white-space: pre-wrap; line-height: 1.55; }
/* A pasted URL, hash or base64 blob has no break opportunity, so without this it runs straight
   out of its bubble and gets clipped by whatever encloses it. */
#hrui .wbx-bubble-text { white-space: pre-wrap; overflow-wrap: anywhere; }

/* ── rendered markdown — proper typography, not raw text ─────────────────── */
/* overflow-wrap: anywhere, not normal: agents answer with hashes, URLs, file paths and base64,
   and an unbreakable 200-character token overflows its own box while the box stays the width of
   the pane. Nothing widens, nothing scrolls, the text is simply clipped away and unreachable.
   It bit hardest in a 340px arena column but the same text is lost in any narrow pane. */
#hrui .wbx-md { color: var(--uic-ink, #111317); font-size: var(--uic-font-md, 14px); line-height: 1.62;
  min-width: 0; overflow-wrap: anywhere; }
#hrui .wbx-md > :first-child { margin-top: 0; }
#hrui .wbx-md > :last-child { margin-bottom: 0; }
#hrui .wbx-md p { margin: 0 0 10px; }
#hrui .wbx-md ul, #hrui .wbx-md ol { margin: 0 0 10px; padding-left: 22px; }
#hrui .wbx-md li { margin: 3px 0; }
#hrui .wbx-md h1, #hrui .wbx-md h2, #hrui .wbx-md h3 { margin: 14px 0 8px; font-weight: 700; line-height: 1.3; }
#hrui .wbx-md h1 { font-size: 18px; } #hrui .wbx-md h2 { font-size: 16px; } #hrui .wbx-md h3 { font-size: 14.5px; }
#hrui .wbx-md code { font-family: var(--uic-mono, ui-monospace, SFMono-Regular, Menlo, monospace); font-size: 12.5px;
  background: var(--uic-brand-faint, #EFF3FF); border: 1px solid var(--uic-line, #DDDFE6); border-radius: 5px; padding: 1px 5px; }
#hrui .wbx-md pre { background: var(--uic-code-block-bg, #0f1117); color: var(--uic-code-block-ink, #e6e8ee);
  border-radius: 10px; padding: 12px 14px; overflow: auto; margin: 0 0 10px; }
#hrui .wbx-md pre code { background: none; border: none; color: inherit; padding: 0; font-size: 12.5px; line-height: 1.5;
  overflow-wrap: normal; }
/* ── CodeBlock: language-aware syntax highlighting (components/CodeBlock.jsx) ──
   The block itself carries the same geometry as .wbx-md pre (same padding/radius/font), fully
   styled here so it also works outside .wbx-md. hljs token classes map onto five --uic-code-*
   colors; defaults are tuned to read on the dark --uic-code-block-bg. Light-theme consumers that
   restyle the block re-point these five tokens alongside --uic-code-block-bg/-ink. */
#hrui .wbx-code { position: relative; background: var(--uic-code-block-bg, #0f1117); color: var(--uic-code-block-ink, #e6e8ee);
  border-radius: 10px; padding: 12px 14px; overflow: auto; margin: 0 0 10px;
  font-family: var(--uic-mono, ui-monospace, SFMono-Regular, Menlo, monospace); }
#hrui .wbx-code code { background: none; border: none; color: inherit; padding: 0; font-size: 12.5px; line-height: 1.5; }
#hrui .wbx-code-lang { position: absolute; top: 8px; right: 12px; font-size: 10px; line-height: 1; letter-spacing: .5px;
  text-transform: uppercase; color: var(--uic-code-lang-ink, rgba(140, 149, 165, .75));
  pointer-events: none; user-select: none; }
#hrui .wbx-code .hljs-comment, #hrui .wbx-code .hljs-quote, #hrui .wbx-code .hljs-meta { color: var(--uic-code-comment, #8b949e); }
#hrui .wbx-code .hljs-keyword, #hrui .wbx-code .hljs-selector-tag, #hrui .wbx-code .hljs-literal, #hrui .wbx-code .hljs-doctag, #hrui .wbx-code .hljs-built_in, #hrui .wbx-code .hljs-operator { color: var(--uic-code-keyword, #c678dd); }
#hrui .wbx-code .hljs-string, #hrui .wbx-code .hljs-regexp, #hrui .wbx-code .hljs-addition, #hrui .wbx-code .hljs-char.escape_ { color: var(--uic-code-string, #98c379); }
#hrui .wbx-code .hljs-number, #hrui .wbx-code .hljs-symbol, #hrui .wbx-code .hljs-bullet, #hrui .wbx-code .hljs-link, #hrui .wbx-code .hljs-template-variable, #hrui .wbx-code .hljs-variable.language_ { color: var(--uic-code-number, #d19a66); }
#hrui .wbx-code .hljs-title, #hrui .wbx-code .hljs-section, #hrui .wbx-code .hljs-name, #hrui .wbx-code .hljs-selector-id, #hrui .wbx-code .hljs-selector-class, #hrui .wbx-code .hljs-attr, #hrui .wbx-code .hljs-attribute, #hrui .wbx-code .hljs-type { color: var(--uic-code-function, #61afef); }

/* Mermaid diagram: light card, centered, horizontal-scroll for wide graphs (rendered by <Mermaid>). */
#hrui .wbx-mermaid { display: block; margin: 0 0 10px; padding: 12px; overflow-x: auto; text-align: center;
  background: var(--uic-surface, #fff); border: 1px solid var(--uic-line, #DDDFE6); border-radius: 10px; }
#hrui .wbx-mermaid svg { max-width: 100%; height: auto; }
#hrui .wbx-mermaid-fallback { margin: 0 0 10px; }
#hrui .wbx-md a { color: var(--uic-brand, #285AFF); text-decoration: underline; }
#hrui .wbx-md blockquote { margin: 0 0 10px; padding: 2px 0 2px 12px; border-left: 3px solid var(--uic-line, #DDDFE6); color: var(--uic-mute, #5B5D66); }
/* Code and tables cannot wrap without changing their meaning, so a wide one scrolls inside
   itself rather than being squeezed into unreadable columns or clipped at the pane edge. */
#hrui .wbx-md table { border-collapse: collapse; margin: 0 0 10px; font-size: 13px;
  display: block; width: max-content; max-width: 100%; overflow-x: auto; }
#hrui .wbx-md th, #hrui .wbx-md td { border: 1px solid var(--uic-line, #DDDFE6); padding: 5px 9px; text-align: left; }

/* ── loading skeleton (ChatMessagesSkeleton) ─────────────────────────────────
   Reuses the .wbx-turn / .wbx-bubble-user / .wbx-md geometry above so streamed
   history lands with no layout shift. display:contents hoists the skeleton turns
   into the consumer's message column, so they inherit its inter-turn spacing
   exactly. Bars pulse on a themeable tint (--uic-skel, falls back to the hairline
   --uic-line) — legible on both the white assistant column and the tinted user
   bubble, in light and dark. */
#hrui .wbx-skel { display: contents; }
#hrui .wbx-skel-turn { cursor: default; }
#hrui .wbx-skel-lines { display: flex; flex-direction: column; gap: 11px; }
#hrui .wbx-bubble-user.wbx-skel-lines { gap: 8px; }
#hrui .wbx-skel-bar { display: block; height: 10px; border-radius: 5px;
  background: var(--uic-skel, var(--uic-line, #DDDFE6));
  animation: wbx-skel-pulse 1.6s ease-in-out infinite; }
@keyframes wbx-skel-pulse { 0%, 100% { opacity: .55; } 50% { opacity: .9; } }
@media (prefers-reduced-motion: reduce) { #hrui .wbx-skel-bar { animation: none; } }

/* ── agent activity timeline: natural-language summary, typed-icon rows, Request/Result ── */
#hrui .wbx-acts { margin: 4px 0 6px; }
#hrui .wbx-acts-sum { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font-size: 13px; font-weight: 600;
  color: var(--uic-mute, #5B5D66); background: transparent; border: none; padding: 2px 0; }
#hrui .wbx-acts-sum:hover { color: var(--uic-ink, #111317); }
#hrui .wbx-acts-body { margin: 10px 0 6px; display: flex; flex-direction: column; }
/* Each row owns the connector segment: a vertical line centered on the icon column, drawn from
   below this icon down to the next icon — so the thread runs through the icon centers. */
#hrui .wbx-act { display: flex; gap: 11px; align-items: flex-start; position: relative; padding-bottom: 16px; }
#hrui .wbx-act:last-child { padding-bottom: 0; }
#hrui .wbx-act:not(:last-child)::before { content: ''; position: absolute; left: 10px; top: 22px; bottom: 0;
  width: 1.5px; background: var(--uic-line, #DDDFE6); transform: translateX(-50%); }
#hrui .wbx-act-ic-t { flex: 0 0 auto; width: 20px; height: 22px; display: inline-flex; align-items: center; justify-content: center; color: var(--uic-brand, #285AFF); }
#hrui .wbx-act-ic-t.thinking { color: var(--uic-mute, #5B5D66); }
#hrui .wbx-act-ic-t.done { color: var(--uic-ok, #16a34a); }
#hrui .wbx-act-main { min-width: 0; flex: 1; }
#hrui .wbx-act-row { display: flex; align-items: center; gap: 8px; min-height: 22px; width: 100%; text-align: left; background: transparent; border: none; cursor: pointer; padding: 0; }
#hrui .wbx-act-row:disabled { cursor: default; }
/* a call the tool reported as failed: said in words, not only in colour */
#hrui .wbx-act-failed { font-size: 11.5px; font-weight: 600; color: var(--uic-fail-ink, #b91c1c); }
#hrui .wbx-act.is-failed .wbx-act-ic-t { color: var(--uic-fail-ink, #b91c1c); }
#hrui .wbx-act-k { font-size: 13.5px; font-weight: 600; color: var(--uic-ink, #111317); }
#hrui .wbx-act-chip { font-size: 11.5px; font-family: var(--uic-mono, ui-monospace, Menlo, monospace); color: var(--uic-ink-2, #3A3D45);
  background: var(--uic-brand-faint, #EFF3FF); border-radius: 6px; padding: 1px 7px; }
#hrui .wbx-act-exp { color: var(--uic-mute, #5B5D66); display: inline-flex; }
#hrui .wbx-act-v { font-size: 12.5px; color: var(--uic-mute, #5B5D66); white-space: pre-wrap; margin-top: 3px; line-height: 1.55; }
#hrui .wbx-act-detail { margin-top: 8px; display: flex; flex-direction: column; gap: 8px; }
#hrui .wbx-act-block { border: 1px solid var(--uic-line, #DDDFE6); border-radius: 10px; overflow: hidden; }
#hrui .wbx-act-block-h { font-size: 11.5px; font-weight: 700; color: var(--uic-ink-2, #3A3D45); padding: 7px 12px 0; }
#hrui .wbx-act-pre { margin: 0; padding: 6px 12px 12px; font-family: var(--uic-mono, ui-monospace, SFMono-Regular, Menlo, monospace); font-size: 11.5px;
  line-height: 1.5; color: var(--uic-ink, #111317); white-space: pre-wrap; word-break: break-word; max-height: 320px; overflow: auto; }

/* ── live "working" indicator: shown below the last row for the WHOLE running turn ── */
#hrui .wbx-working { display: inline-flex; align-items: center; gap: 8px; margin-top: 6px; color: var(--uic-working-ink, inherit); font-size: 13px; }
#hrui .wbx-working-dots { display: inline-flex; gap: 4px; }
#hrui .wbx-working-dots span { width: 6px; height: 6px; border-radius: 50%; background: var(--uic-brand, #285AFF); opacity: .4;
  animation: wbxblink 1.4s infinite ease-in-out; }
#hrui .wbx-working-dots span:nth-child(2) { animation-delay: .2s; } #hrui .wbx-working-dots span:nth-child(3) { animation-delay: .4s; }
#hrui .wbx-working-txt { animation: wbxbreath 1.8s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) {
  #hrui .wbx-working-dots span { animation: none; opacity: .6; }
  #hrui .wbx-working-txt { animation: none; opacity: .8; }
}
@keyframes wbxblink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: .9; } }
@keyframes wbxbreath { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }

/* ── terminal-state badges on a turn (never color-only: glyph + text) ── */
#hrui .wbx-turnbadge { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; padding: 4px 10px;
  border-radius: 999px; font-size: 12px; font-weight: 600; border: 1px solid; }
#hrui .wbx-turnbadge.failed { color: var(--uic-fail-ink, #b91c1c); border-color: var(--uic-fail-line, #fecaca); background: var(--uic-fail-bg, #fef2f2); }
#hrui .wbx-turnbadge.cancelled { color: var(--uic-cancel-ink, #52525b); border-color: var(--uic-cancel-line, #e4e4e7); background: var(--uic-cancel-bg, #fafafa); }
#hrui .wbx-turnbadge.incomplete { color: var(--uic-incomplete-ink, #92400e); border-color: var(--uic-incomplete-line, #fde68a); background: var(--uic-incomplete-bg, #fffbeb); }

/* ── composer: textarea + bottom action row (attach … accessories … send) ── */
#hrui .wbx-composer { flex-shrink: 0; margin: 0 22px 18px; border: 1px solid var(--uic-line, #DDDFE6); border-radius: 16px;
  background: var(--uic-surface, #FFFFFF);
  box-shadow: var(--uic-shadow-1, 0 1px 2px rgba(17,24,39,.04), 0 1px 1px rgba(17,24,39,.03)); padding: 12px 14px 10px; }
#hrui .wbx-composer-input { width: 100%; border: none; outline: none; resize: none; font-size: var(--uic-font-md, 14px); font-family: inherit;
  background: transparent; color: var(--uic-ink, #111317); line-height: 1.5; overflow-y: auto;
  /* auto-grows in JS up to ~15 rows, then scrolls */
  max-height: calc(var(--uic-font-md, 14px) * 1.5 * 15); }
#hrui .wbx-composer-row { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
/* files held over the composer (or over the wider target a product names): the composer says so */
#hrui .wbx-composer.is-dropping { outline: 2px solid var(--uic-brand, #285AFF); outline-offset: -2px; }
/* ── pane resizer (useResizablePane + PaneResizer) ── */
#hrui .uic-vresize { flex: 0 0 7px; align-self: stretch; cursor: col-resize; background: transparent; touch-action: none; }
/* Stacked split (useResizablePane axis 'y'): the bar is horizontal, the drag is vertical. */
#hrui .uic-hresize { flex: 0 0 7px; align-self: stretch; width: 100%; cursor: row-resize; background: transparent; touch-action: none; }
#hrui .uic-hresize:hover { background: var(--uic-brand-soft); }
#hrui body.uic-resizing-y { user-select: none; cursor: row-resize; }
#hrui body.uic-resizing-y iframe { pointer-events: none; }
#hrui .uic-vresize:hover { background: var(--uic-brand-soft, #E1E9FF); }
#hrui .uic-vresize:focus-visible { outline: none; background: var(--uic-brand, #285AFF); opacity: .5; }
/* While dragging, neutralize embedded iframes + selection so mouseup always lands. */
#hrui body.uic-resizing { user-select: none; cursor: col-resize; }
#hrui body.uic-resizing iframe { pointer-events: none; }

/* default send button (products usually replace via renderSend) */
#hrui .uic-send { width: 32px; height: 32px; flex-shrink: 0; border-radius: 999px; border: none;
  background: var(--uic-brand, #285AFF); color: var(--uic-on-brand, #fff); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; }
#hrui .uic-send:hover:not(:disabled) { background: var(--uic-brand-ink, #1641D8); }
#hrui .uic-send:disabled { opacity: .5; cursor: not-allowed; }

/* ══ ChatPanel — the conversation column beside a document ═══════════════════
   Four products shipped this chrome under product-owned class names (.gp-chat, a
   ContextualGraph noun; .cmp; .pane-empty), 139 selectors of it, byte-identical in all four.
   It lives here now under uic-* names.

   The composer skin below is deliberately a SEPARATE class from .wbx-composer rather than a
   rewrite of it: HarnessRouter renders .wbx-composer today and did not ask for a 14px radius and
   a 10px margin. ChatPanel opts in by passing these class names to Composer's classNames — which
   is exactly the escape hatch that prop exists for. */

/* The panel is dense by design (13px, no turn gutter, wider bubbles) — the same three overrides
   all four apps wrote into their :root, where they also changed every OTHER chat surface in the
   app. Scoped to the panel, they stop leaking. */
/* `min-width: 0` is what makes the drag-to-resize actually resize.
 *
 * A flex item defaults to `min-width: auto`, which means it can never be narrower than its
 * content's min-content width. One unbreakable string in the transcript — an agent reporting
 * `/data/workspaces/hsess<32 hex chars>/dashboard.json` is 60 monospace characters with no break
 * opportunity — sets a floor of ~550px on the whole pane. The width the drag computes is applied
 * to flex-basis, the basis is then ignored, and the pane stops moving at that floor while the
 * handle keeps following the pointer. It reads as "the drag broke", and it appears only in
 * conversations that happen to contain a long path. */
#hrui .uic-chat { --uic-font-md: 13px; --uic-turn-pad-x: 0px; --uic-bubble-max-w: 88%;
  flex: 0 0 340px; height: 100vh; display: flex; flex-direction: column;
  min-height: 0; min-width: 0;
  background: var(--uic-surface, #FFFFFF); border-left: 1px solid var(--uic-line, #DDDFE6); }
@media (max-width: 1180px) { #hrui .uic-chat { flex: 0 0 300px; } }
#hrui .uic-chat.is-collapsed { flex: 0 0 44px; }

#hrui .uic-chat-h { height: 52px; flex-shrink: 0; display: flex; align-items: center; gap: 8px;
  padding: 0 10px; border-bottom: 1px solid var(--uic-line-soft, #EFF1F4); }
/* Shrinks with ellipsis but does NOT stretch, so a status mark sits beside the title rather than
   at the far edge of the panel. */
#hrui .uic-chat-title { flex: 0 1 auto; min-width: 0; font-size: 13px; font-weight: 600;
  color: var(--uic-ink, #111317); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#hrui .uic-chat-conn { font-size: 12px; color: var(--uic-mute, #5B5D66); }
#hrui .uic-panel-toggle { display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 7px; flex-shrink: 0;
  border: none; background: none; cursor: pointer; color: var(--uic-mute, #5B5D66); }
#hrui .uic-panel-toggle:hover { background: var(--uic-hover-wash, rgba(0, 0, 0, .05)); color: var(--uic-ink, #111317); }

#hrui .uic-chat-body { flex: 1; min-height: 0; overflow-y: auto; padding: 14px;
  display: flex; flex-direction: column; gap: 10px; }
#hrui .uic-chat-body::-webkit-scrollbar { width: 8px; height: 8px; }
#hrui .uic-chat-body::-webkit-scrollbar-thumb { background: var(--uic-line, #DDDFE6); border-radius: 999px; }
#hrui .uic-chat-body::-webkit-scrollbar-track { background: transparent; }

/* "Still connecting" — a notice, not an error: the message is held, not lost. */
#hrui .uic-chat-note { align-self: center; display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; color: var(--uic-mute, #5B5D66);
  background: var(--uic-brand-faint, #EFF3FF); border: 1px solid var(--uic-brand-soft, #E1E9FF);
  border-radius: var(--uic-r-pill, 999px); padding: 5px 12px; }
#hrui .uic-chat-dot { width: 8px; height: 8px; border-radius: 999px;
  background: var(--uic-warn, #F59E0B); animation: uic-chat-blink 1.4s ease-in-out infinite; }
@keyframes uic-chat-blink { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }

#hrui .uic-chat-empty { flex: 1; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 10px; padding: 32px; text-align: center;
  font-size: 13px; color: var(--uic-mute, #5B5D66); }
#hrui .uic-chat-empty-t { font-size: 14px; font-weight: 600; color: var(--uic-ink-2, #3A3D45); }
#hrui .uic-chat-empty svg { color: var(--uic-mute-2, #8E9199); }
/* The turn is running somewhere else: a live mark, never the blank "describe what you want"
   prompt — that reads as a dead end while the agent is visibly working. */
#hrui .uic-chat-pulse { width: 14px; height: 14px; border-radius: 50%;
  background: var(--uic-brand, #285AFF); animation: uic-chat-blink 1.1s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) {
  #hrui .uic-chat-dot, #hrui .uic-chat-pulse { animation: none; }
}

/* ── the panel's composer ── */
#hrui .uic-chat-cmp { flex-shrink: 0; margin: 10px; padding: 10px 10px 8px;
  border: 1.5px solid var(--uic-line, #DDDFE6); border-radius: 14px;
  background: var(--uic-surface, #FFFFFF); display: flex; flex-direction: column; gap: 6px; }
#hrui .uic-chat-cmp:focus-within { border-color: var(--uic-brand, #285AFF);
  box-shadow: 0 0 0 3px var(--uic-focus-ring, rgba(40, 90, 255, .14)); }
#hrui .uic-chat-cmp-input { border: none; outline: none; resize: none; font-family: inherit;
  font-size: 13px; line-height: 1.5; max-height: 120px;
  color: var(--uic-ink, #111317); background: transparent; }
#hrui .uic-chat-cmp-input::placeholder { color: var(--uic-mute-2, #8E9199); }
#hrui .uic-chat-cmp-row { display: flex; align-items: center; gap: 6px; }

#hrui .uic-chat-icon { width: 28px; height: 28px; border-radius: 8px; flex-shrink: 0;
  border: 1px solid var(--uic-line, #DDDFE6); background: var(--uic-surface, #FFFFFF);
  color: var(--uic-mute, #5B5D66); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; }
#hrui .uic-chat-icon:hover { color: var(--uic-ink, #111317); border-color: var(--uic-line-strong, #CBD0DA); }
#hrui .uic-chat-icon:disabled { opacity: .45; cursor: not-allowed; pointer-events: none; }
/* Listening is a state the person has to be able to SEE, because they cannot hear it. */
#hrui .uic-chat-icon.is-on { color: var(--uic-brand, #285AFF); border-color: var(--uic-brand, #285AFF);
  background: var(--uic-brand-faint, #EFF3FF); animation: uic-chat-mic 1.4s ease-in-out infinite; }
@keyframes uic-chat-mic { 50% { box-shadow: 0 0 0 4px var(--uic-focus-ring, rgba(40, 90, 255, .14)); } }
@media (prefers-reduced-motion: reduce) { #hrui .uic-chat-icon.is-on { animation: none; } }

#hrui .uic-chat-send { width: 30px; height: 30px; flex-shrink: 0; border-radius: 999px; border: none;
  background: var(--uic-brand, #285AFF); color: var(--uic-on-brand, #fff); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; }
#hrui .uic-chat-send:hover:not(:disabled) { background: var(--uic-brand-ink, #1641D8); }
#hrui .uic-chat-send:disabled { opacity: .5; cursor: not-allowed; pointer-events: none; }

/* Staged files above the textarea, and the names echoed inside the sent bubble. */
#hrui .uic-chat-files { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 2px 8px; align-items: center; }
#hrui .uic-chat-file-err { font-size: 11.5px; color: var(--uic-fail-ink, #b91c1c); }
#hrui .uic-chat-msg-files { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 6px; }

/* ── density inside the panel: the 13px conversation ── */
/* `anywhere`, not `break-word`, and the difference is the whole bug above.
 *
 * Both let an unbreakable word break rather than overflow, so both LOOK like they fixed it. Only
 * `anywhere` also reduces the element's min-content width — `break-word` leaves it reporting the
 * full width of the longest word. That reported width is what a flex item's `min-width: auto`
 * floors the pane at, so with `break-word` the text wrapped and the pane still would not shrink.
 * Which is exactly what shipped: the rule was here, and the drag was stuck anyway. */
#hrui .uic-chat .wbx-md { overflow-wrap: anywhere; }
#hrui .uic-chat .wbx-md h1 { font-size: 16px; }
#hrui .uic-chat .wbx-md h2 { font-size: 14.5px; }
#hrui .uic-chat .wbx-md h3 { font-size: 13.5px; }
#hrui .uic-chat .wbx-md code { background: var(--uic-line-soft, #EFF1F4); border: none; font-size: 12px; }
#hrui .uic-chat .wbx-md pre code { font-size: 12px; }
#hrui .uic-chat .wbx-md table { font-size: 12.5px; }
#hrui .uic-chat .wbx-acts-sum { font-size: 12.5px; font-family: inherit; }
#hrui .uic-chat .wbx-act-row { font-family: inherit; }
#hrui .uic-chat .wbx-act-k { font-size: 12.5px; }
#hrui .uic-chat .wbx-act-chip { font-size: 11px; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#hrui .uic-chat .wbx-act-v { font-size: 12px; }
#hrui .uic-chat .wbx-act-block-h { font-size: 11px; }
#hrui .uic-chat .wbx-act-pre { font-size: 11px; max-height: 280px; }
#hrui .uic-chat .wbx-working { font-size: 12.5px; }
#hrui .uic-chat .wbx-turnbadge { align-self: flex-start; }

/* ── narrow: the column becomes a drawer over the document ──
   Below this width a 340px column and a document cannot both be usable, and squeezing the
   document is the worse trade — the conversation is the thing you can dismiss. */
@media (max-width: 900px) {
  /* It starts BELOW the host's app bar, not over it. At top:0 the drawer covered the banner's
     right-hand side, so at 768 the sheet's Run button, Export and the account menu all hit-tested
     to the conversation instead — unreachable unless you happened to know the collapse toggle was
     the way out. The host declares its own bar height once; 0 is correct for a host that has none. */
  #hrui .uic-chat:not(.is-collapsed) {
    position: fixed; top: var(--uic-chat-drawer-top, 0); right: 0; bottom: 0; z-index: 90;
    width: min(86vw, 380px);
    flex: none !important;   /* beats the inline drag-width basis */
    box-shadow: var(--uic-shadow-3, -16px 0 40px rgba(15, 23, 42, .22));
  }
  /* Dragging the divider is meaningless once the panel floats over the page. */
  #hrui body:has(.uic-chat:not(.is-collapsed)) .uic-vresize { display: none; }
}

/* ── Composer tray (Composer.jsx `tray`) ──
   Inside the card, under the action row, on the SAME surface — no divider band, no tinted
   strip: the wireframe's "one box" reading. Wraps on narrow widths. */
#hrui .uic-composer-tray { display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
  padding: 2px 2px 4px; }

/* ── Composer inline line (Composer.jsx `inline`) ── one row: accessories, textarea, send.
   Centered, not flex-end: a single-line textarea's text must sit on the buttons' axis, and
   bottom-pinning left the text visibly below them (measured). Multiline drafts keep the
   buttons centered on the grown box, which is the common chat-input behavior. */
#hrui .uic-composer-line { display: flex; align-items: center; gap: 8px; }
#hrui .uic-composer-line textarea { flex: 1; min-width: 0; }

/* ChatPanel view="agent": the turns of reifyui/agent-chat (its own styles: agent-chat.css) */
#hrui .uic-chat-turns { display: flex; flex-direction: column; gap: 22px; }
#hrui .uic-chat .uac-user-b { font-size: 13.5px; }
#hrui .uic-chat .uac-md { font-size: 13.5px; }