Files
pipelines/web/chat.css
T
alan d130615fae web: put the work first and the audit evidence behind a door
- Turn files (input/memory/output/session) are system artifacts now: they are
  never tiles in the run or stage galleries. Shared public files are attributed
  to the visit that first recorded them, so a run counts 3 stage artifacts, not
  one copy of each per later stage.
- Audit & debug opens a dialog with vertical Input / Output / Memory / Session /
  Definition tabs, for a visit from the stage pane or the run Summary.
- Run tabs are Summary / Graph / Timeline; Input and Output are Summary sections
  with Artifacts, Files changed and Audit. Each stage pane gains Files changed.
- Artifacts gain a gallery/list switch (remembered) and full-name wrapping; the
  copy/share actions are hover-or-focus icon buttons.
- Status badge above the run title; no live badges on the run surfaces. The runs
  list leads with the pipeline name and the stored task title beneath it.
- Chat rows: title + coloured status word only, then directory, then model; no
  operator or closed chips, no dot. The more/star cluster is a hover/focus
  overlay so the title uses the row's width, and an open menu stacks above rows.
  Closed chats collapse behind a chevron. Sessions can be starred locally and
  sort in a Starred group. The chat header no longer repeats status/dir/model.
- A visible rail divider separates Search from the destinations; the page has a
  real favicon/apple-touch icon and the rail brand wears it.
- Smoke updated: no live badges, 3 detail tabs, field hits open Summary sections,
  closed chats expand for checks, the fixture viewer uses shot.png/missing.txt
  and the audit for markdown.
2026-10-20 01:00:01 +01:00

742 lines
26 KiB
CSS
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/* ---------------------------------------------------------------------------
Chat (C1/C3/C4/C7/C14): the session list, the conversation and its rendered
markdown transcript. Hand-written, on the app's dark palette; the transcript
is untrusted model output, so every node is built with textContent.
--------------------------------------------------------------------------- */
.chat-list { display: flex; flex-direction: column; min-height: 0; }
.chat-rows { flex: 1 1 auto; min-height: 0; align-content: start; padding-bottom: 180px; }
/* A row's Chat actions menu hangs below the button. `.list` clips its children
for the rounded corners, which cut the panel off at the list's bottom edge and
made the final rows' Hide/Rename items unclickable. Unclip only while a menu is
open, mirroring `.list.runs`' filter-menu treatment. */
.chat-list.menu-open { overflow: visible; }
.chat-search { flex: 1 1 auto; min-width: 0; }
.chat-toolbar .chat-new { white-space: nowrap; }
/* C2: the create pane — the directory picker, the model note and the footer that
names the value chat_create will send. */
.chat-create { gap: 12px; }
.chat-bar.chat-create-bar { align-items: center; justify-content: flex-start; gap: 10px; }
.chat-create-back {
display: inline-flex;
align-items: center;
justify-content: center;
width: 32px;
height: 32px;
padding: 0;
flex: none;
}
.chat-create-back-glyph { font-size: 16px; line-height: 1; }
.detail .chat-create-title { margin: 0; }
.chat-create-loading { padding: 18px 4px; }
.chat-create-prompt { padding: 2px 2px 0; font-size: 13px; }
.chat-create-choices {
display: flex;
flex-direction: column;
border: 1px solid var(--border);
border-radius: var(--radius-card);
overflow: hidden;
}
.chat-create-choice { cursor: pointer; }
.chat-create-choice-path {
font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
font-size: 11px;
}
.chat-create-directories-error { color: var(--bad); }
.chat-create-error { color: var(--bad); font-size: 13px; }
.chat-create-model-note { margin: 0; font-size: 12px; line-height: 1.5; max-width: 64ch; }
.chat-create-footer {
display: flex;
gap: 10px;
align-items: center;
margin-top: auto;
padding: 12px;
background: var(--surface-2);
border: 1px solid var(--border);
border-radius: var(--radius-card);
}
.chat-create-start {
flex: 1 1 auto;
min-width: 0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
font-size: 13px;
}
.chat-create-confirm {
min-width: 88px;
display: inline-flex;
align-items: center;
justify-content: center;
border-color: var(--accent);
color: var(--accent);
font-weight: 600;
}
.chat-create-confirm:disabled,
.chat-create-cancel:disabled { opacity: 0.55; }
.chat-create-spinner { width: 14px; height: 14px; border-width: 2px; }
.chat-group-header {
padding: 8px 12px 4px;
font-size: 11px;
letter-spacing: 0.04em;
text-transform: uppercase;
color: var(--muted);
}
/* The CLOSED group's own expand/collapse control; the chevron sits at its end. */
.chat-group-toggle {
display: flex;
align-items: center;
justify-content: space-between;
width: 100%;
padding: 8px 12px 4px;
border: 0;
background: transparent;
color: var(--muted);
font: inherit;
font-size: 11px;
letter-spacing: 0.04em;
text-transform: uppercase;
text-align: left;
cursor: pointer;
}
.chat-group-toggle:hover { color: var(--color-text); }
.chat-group-toggle .chevron { font-size: 12px; text-transform: none; }
.chat-row {
position: relative;
display: grid;
grid-template-columns: minmax(0, 1fr);
gap: 2px;
align-items: start;
cursor: pointer;
}
/* M6: the session title/meta area is the button; the row is a plain container
and the Chat actions menu is a sibling of this button. */
.chat-session-button {
grid-column: 1;
grid-row: 1 / span 3;
display: grid;
gap: 2px;
width: 100%;
min-width: 0;
margin: 0;
padding: 0;
border: 0;
background: none;
color: inherit;
font: inherit;
text-align: left;
cursor: pointer;
}
.chat-session-button:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
/* The inner session button must never take the generic button hover fill: on a
selected row it read as a darker rectangle inside the row's own padding. */
.chat-session-button:hover { background: none; }
.chat-row .row-head { grid-column: 1; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.chat-row .row-title { min-width: 0; }
.chat-row .row-meta { grid-column: 1; }
.chat-row-model { font-size: 11px; }
/* Star + actions live in a hover/focus overlay, so the title uses the row's full
width instead of losing a permanent column on the right. */
.chat-row-actions {
position: absolute;
top: 50%;
right: 8px;
transform: translateY(-50%);
display: flex;
align-items: center;
gap: 2px;
padding: 2px;
border-radius: var(--radius-control);
background: var(--color-surface);
box-shadow: 0 0 0 1px var(--color-divider);
opacity: 0;
pointer-events: none;
transition: opacity 100ms ease-out;
}
.chat-row:hover .chat-row-actions,
.chat-row:focus-within .chat-row-actions,
.chat-row.menu-open .chat-row-actions {
opacity: 1;
pointer-events: auto;
}
/* An open menu paints above the rows below it, not under their content. */
.chat-row.menu-open { z-index: 30; }
@media (hover: none) {
.chat-row-actions { position: static; transform: none; opacity: 1; pointer-events: auto; background: transparent; box-shadow: none; margin-top: 4px; }
}
.chat-row-actions button { padding: 3px 10px; font-size: 12px; }
/* The local star: outline when unstarred, filled and accented when starred. */
.chat-star { min-width: 28px; padding: 3px 6px; color: var(--muted); font-size: 15px; line-height: 1; }
.chat-star:hover { color: var(--color-text); }
.chat-star.starred { color: var(--color-accent); }
.chat-menu-wrap { position: relative; }
.chat-menu-button { min-width: 30px; font-size: 15px; line-height: 1; }
.chat-menu-panel {
position: absolute;
top: calc(100% + 4px);
right: 0;
z-index: 25;
display: grid;
min-width: 190px;
padding: 4px;
background: var(--surface-2);
border: 1px solid var(--border);
border-radius: var(--radius-card);
box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
}
.chat-menu-item {
justify-content: flex-start;
padding: 7px 10px;
text-align: left;
font-size: 13px;
border: none;
white-space: nowrap;
}
.chat-menu-item:hover { background: var(--surface); }
.chat-menu-close { color: var(--warn); }
.chat-menu-reopen { color: var(--accent); }
.chat-closed-chip { opacity: 0.8; }
/* The Rename chat dialog (C13): a name kept on this device only. */
.chat-rename-field { display: grid; gap: 4px; }
.chat-rename-label { font-size: 12px; color: var(--muted); }
.chat-rename-helper { margin: 0; line-height: 1.5; font-size: 13px; color: var(--muted); }
.chat-rename-save:disabled { opacity: 0.5; }
/* The one hide report (C13): fixed above the pane, replaced rather than queued. */
.chat-snackbar {
position: fixed;
left: 50%;
bottom: 20px;
z-index: 35;
transform: translateX(-50%);
display: flex;
gap: 16px;
align-items: center;
max-width: min(560px, calc(100vw - 32px));
padding: 12px 16px;
background: var(--surface-2);
border: 1px solid var(--border);
border-radius: var(--radius-card);
box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55);
font-size: 13px;
}
.chat-snackbar-message { line-height: 1.4; }
.chat-snackbar-undo {
flex: none;
border-color: var(--accent);
color: var(--accent);
font-weight: 600;
font-size: 13px;
}
.chat-activity { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; color: var(--muted); }
.chat-activity-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.chat-activity-streaming { color: var(--accent); }
.chat-activity-new { color: #7fb2f0; }
.chat-activity-closed { color: var(--muted); }
.chat-detail {
flex: 1 1 auto;
min-height: 0;
display: flex;
flex-direction: column;
gap: var(--space-xs);
padding: var(--space-s);
overflow: hidden;
}
.chat-create { overflow-y: auto; overscroll-behavior: contain; }
.chat-bar { flex: 0 0 auto; display: flex; gap: var(--space-s); align-items: flex-start; justify-content: space-between; }
.chat-bar-titles { display: grid; gap: 2px; min-width: 0; }
.chat-bar-title { margin: 0; font-size: 16px; }
.chat-bar-meta { font-size: 12px; }
.chat-context { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.chat-load-older { white-space: nowrap; font-size: 12px; }
.chat-transcript-empty { padding: 24px 12px; }
.chat-transcript-wrap { position: relative; flex: 1 1 auto; min-height: 0; overflow: hidden; }
.chat-transcript {
position: relative;
height: 100%;
display: flex;
flex-direction: column;
gap: var(--space-xs);
overflow-y: auto;
overscroll-behavior: contain;
padding: var(--space-xs);
background: var(--color-bg);
border: 1px solid var(--color-divider);
border-radius: var(--radius-card);
}
.chat-turn { display: flex; }
.chat-turn-user { justify-content: flex-end; }
.chat-turn-agent { justify-content: flex-start; }
.chat-bubble { max-width: min(560px, 100%); padding: 8px 12px; border-radius: var(--radius-card); }
.user-bubble { background: var(--surface-2); border: 1px solid var(--border); }
.agent-bubble { background: var(--surface); border: 1px solid var(--border); }
.chat-client { font-size: 11px; color: var(--muted); margin-bottom: 4px; }
.chat-user-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.chat-tools { margin: 4px 0 8px; }
.chat-reasoning { margin-bottom: 8px; padding-bottom: 6px; border-bottom: 1px dashed var(--border); }
.chat-reasoning-toggle {
display: flex;
gap: 6px;
align-items: center;
padding: 2px 0;
background: transparent;
border: 0;
color: var(--muted);
font-size: 12px;
}
.chat-reasoning-toggle:hover { color: var(--text); }
.chat-reasoning-body {
margin: 6px 0 2px;
white-space: pre-wrap;
overflow-wrap: anywhere;
color: var(--muted);
font-size: 12px;
}
.chat-jump { position: absolute; right: 14px; bottom: 14px; border-color: var(--accent); color: var(--accent); }
/* The tool-call chip and its panel (C6). The panel is a fixed overlay, so it
never joins the transcript's flow and opening it cannot re-flow or scroll it. */
.chat-tool-chip {
display: inline-flex;
align-items: center;
gap: 6px;
padding: 3px 10px;
background: var(--surface-2);
font-size: 12px;
cursor: pointer;
}
.chat-tool-chip-failed { border-color: var(--bad); color: var(--bad); }
.chat-tool-icon { font-size: 12px; line-height: 1; }
.chat-tool-icon-failed { color: var(--bad); }
.chat-tool-long { color: var(--bad); }
.chat-tool-chevron { color: var(--muted); }
.chat-tool-spinner { width: 11px; height: 11px; border-width: 2px; }
/* C5: the in-flight turn's indicator, under the transcript after the last agent
turn — a spinner, the phase headline, the turn's elapsed and one line per
running tool. A call over the long threshold is tinted and marked `.chat-tool-long`. */
.chat-running { display: flex; flex-direction: column; gap: 4px; padding: 6px 2px 2px; color: var(--muted); font-size: 12px; }
.chat-running-head { display: flex; align-items: center; gap: 8px; }
.chat-running-spinner { width: 12px; height: 12px; border-width: 2px; }
.chat-running-label { color: var(--text); }
.chat-running-elapsed { color: var(--muted); }
.chat-running-tool { display: flex; align-items: center; gap: 8px; padding-left: 20px; min-width: 0; }
.chat-running-tool-text {
font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
max-width: 420px;
}
.chat-running-tool-elapsed { font-size: 11px; }
.chat-running-tool-long { color: var(--bad); }
/* C10: the permission/approval card — the transcript's last item. A pending card
wears an amber hairline border, echoing ChatApprovalCard.kt's 50%-alpha amber
border; the amber RISK REVIEW box is the app's 12%-alpha amber panel. */
.chat-approval {
display: flex;
flex-direction: column;
gap: 10px;
padding: 12px;
background: var(--surface-2);
border: 1px solid var(--border);
border-radius: var(--radius-card);
}
/* Background tasks (C11): running shells only, three visible rows then scroll. */
.chat-bg-tasks { display: grid; gap: 6px; }
.chat-bg-tasks-head { display: flex; align-items: baseline; gap: 8px; }
.chat-bg-tasks-title { font-size: 13px; font-weight: 600; }
.chat-bg-tasks-count { font-size: 12px; }
.chat-bg-tasks-list {
display: grid;
gap: 4px;
/* Exactly BACKGROUND_TASK_VISIBLE_ROWS (3) rows of 40px + their 2 gaps of 4px
(the Android derivation `(minTouch + SPACING_XS) * 3`); past that it scrolls. */
max-height: 128px;
overflow-y: auto;
padding-right: 2px;
}
.chat-bg-task {
display: flex;
align-items: center;
gap: 8px;
width: 100%;
min-height: 40px;
padding: 4px 10px;
text-align: left;
border: 1px solid var(--border);
border-radius: var(--radius-control);
background: var(--surface);
color: var(--text);
font-size: 12px;
cursor: pointer;
}
.chat-bg-task:hover { background: var(--surface-2); }
.chat-bg-task.selected { border-color: var(--accent); }
.chat-bg-task:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.chat-bg-task-glyph {
flex: 0 0 auto;
width: 0;
height: 0;
border-left: 7px solid var(--accent);
border-top: 5px solid transparent;
border-bottom: 5px solid transparent;
}
.chat-bg-task-status { flex: 0 0 auto; color: var(--accent); }
.chat-bg-task-command {
flex: 1 1 auto;
min-width: 0;
font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
color: var(--muted);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.chat-bg-task-details { flex: 0 0 auto; font-size: 11px; }
.chat-bg-task-detail {
display: grid;
gap: 4px;
margin-top: 4px;
padding: 10px;
background: var(--surface-2);
border: 1px solid var(--border);
border-radius: var(--radius-card);
}
.chat-approval-pending { border-color: color-mix(in srgb, var(--warn) 50%, var(--border)); }
.chat-approval-head { display: flex; gap: 10px; align-items: center; }
.chat-approval-shield { flex: 0 0 auto; width: 16px; height: 16px; color: var(--warn); }
.chat-approval-titles { display: grid; gap: 2px; min-width: 0; }
.chat-approval-headline { font-weight: 600; }
.chat-approval-status { font-size: 12px; }
/* The resources box is a padded frame around a padding-free clamp block. The
clamp must sit on an element with no bottom padding: `overflow:hidden` clips at
the padding box, so clamping the padded element itself still paints the top of
the seventh line into that 8px strip. The inner block clips at its own content
edge, so no seventh glyph is visible. */
.chat-approval-resources {
padding: 8px 10px;
background: var(--bg);
border: 1px solid var(--border);
border-radius: var(--radius-control);
font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
font-size: 12px;
line-height: 18px;
}
.chat-approval-resources-text {
margin: 0;
font: inherit;
white-space: pre-wrap;
overflow-wrap: anywhere;
/* The six-visible-line cap (ChatApprovalCard.kt maxLines = 6, Ellipsis): -webkit
-line-clamp counts *rendered* lines, so a long resource that wraps is elided
on the sixth line instead of spilling past it, exactly like the app. */
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 6;
overflow: hidden;
}
.chat-approval-risk {
display: flex;
flex-direction: column;
gap: 4px;
padding: 8px 10px;
border-radius: var(--radius-control);
background: color-mix(in srgb, var(--warn) 12%, transparent);
}
.chat-approval-risk-head { display: flex; gap: 4px; align-items: center; }
.chat-approval-risk-shield { flex: 0 0 auto; width: 12px; height: 12px; color: var(--warn); }
.chat-approval-risk-label { color: var(--warn); font-size: 11px; letter-spacing: 0.06em; }
.chat-approval-risk-text { font-size: 12px; }
.chat-approval-controls { display: flex; gap: 10px; }
.chat-approval-control { padding: 6px 12px; }
/* The app renders Allow once as a filled Button and the other two as
TextButtons (ChatApprovalCard.kt:98-100); the browser matches that hierarchy
with the filled accent treatment on the primary control. */
.chat-approval-control.primary {
background: var(--accent);
border-color: var(--accent);
color: var(--bg);
font-weight: 600;
}
.chat-approval-control.primary:hover {
background: color-mix(in srgb, var(--accent) 88%, white);
border-color: color-mix(in srgb, var(--accent) 88%, white);
}
.chat-approval-jump { white-space: nowrap; font-size: 12px; border-color: var(--warn); color: var(--warn); }
.chat-bg-task-label { font-size: 11px; }
.chat-bg-task-command-full { font-size: 12px; overflow-wrap: anywhere; }
.chat-bg-task-id { font-size: 12px; }
.chat-bg-task-status-line { font-size: 12px; }
.chat-bg-task-output {
margin: 0;
max-height: 220px;
overflow: auto;
padding: 8px;
font: 12px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace;
white-space: pre-wrap;
overflow-wrap: anywhere;
background: var(--bg);
border: 1px solid var(--border);
border-radius: var(--radius-control);
}
.chat-bg-task-note { font-size: 11px; }
.chat-bg-task-spinner { width: 12px; height: 12px; border-width: 2px; }
.chat-bg-task-error-row { display: flex; align-items: center; gap: 8px; }
.chat-bg-task-error { font-size: 12px; color: var(--bad); }
.chat-bg-task-retry,
.chat-bg-task-refresh { align-self: flex-start; padding: 2px 10px; font-size: 12px; }
.chat-tool-panel {
position: fixed;
z-index: 40;
display: flex;
flex-direction: column;
width: min(420px, calc(100vw - 16px));
max-height: 440px;
background: var(--surface-2);
border: 1px solid var(--border);
border-radius: var(--radius-card);
box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
overflow: hidden;
}
.chat-tool-panel[hidden] { display: none; }
.chat-tool-panel-head {
display: flex;
align-items: center;
gap: 8px;
padding: 8px 8px 8px 12px;
border-bottom: 1px solid var(--border);
}
.chat-tool-panel-count { flex: 1 1 auto; font-size: 13px; font-weight: 600; }
.chat-tool-close { padding: 2px 8px; font-size: 14px; line-height: 1; }
.chat-tool-list { flex: 1 1 auto; min-height: 0; overflow-y: auto; }
.chat-tool-row { border-bottom: 1px solid var(--border); }
.chat-tool-row:last-child { border-bottom: 0; }
.chat-tool-row-head {
display: flex;
align-items: center;
gap: 8px;
width: 100%;
padding: 7px 12px;
background: transparent;
border: 0;
border-radius: 0;
text-align: left;
cursor: pointer;
}
.chat-tool-row-head:hover { background: var(--surface); }
.chat-tool-row-titles { display: flex; flex-direction: column; flex: 1 1 auto; min-width: 0; gap: 1px; }
.chat-tool-name { font-size: 12px; }
.chat-tool-detail {
font-size: 11px;
color: var(--muted);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
max-width: 100%;
}
.chat-tool-stat { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; }
.chat-tool-duration { font-size: 11px; color: var(--muted); }
.chat-tool-row-chevron { color: var(--muted); font-size: 11px; }
.chat-tool-body { display: grid; gap: 8px; padding: 0 12px 10px 32px; }
.chat-tool-section { background: var(--bg); border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.chat-tool-section-label {
padding: 3px 10px;
font-size: 10px;
letter-spacing: 0.06em;
text-transform: uppercase;
color: var(--muted);
background: var(--surface);
border-bottom: 1px solid var(--border);
}
.chat-tool-section-body {
margin: 0;
padding: 8px 10px;
font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
font-size: 12px;
white-space: pre-wrap;
overflow-wrap: anywhere;
max-height: 220px;
overflow: auto;
}
.chat-tool-diff {
padding: 6px 10px;
background: var(--bg);
border: 1px solid var(--border);
border-radius: var(--radius-control);
font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
font-size: 12px;
max-height: 220px;
overflow: auto;
}
.chat-tool-diff-note { font-size: 11px; color: var(--muted); margin-bottom: 4px; }
.chat-tool-diff-line { white-space: pre-wrap; overflow-wrap: anywhere; }
/* A clearly-labelled overlay for the UI smoke's page-rendered tool-row samples
(a failed row and an edit diff the live history does not carry). */
.chat-tool-sample {
position: fixed;
top: 70px;
left: 24px;
right: 24px;
z-index: 60;
max-height: calc(100vh - 140px);
overflow: auto;
padding: 10px 12px;
background: var(--surface);
border: 1px solid var(--accent);
border-radius: var(--radius-card);
box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
}
.chat-tool-sample-note {
margin-bottom: 8px;
padding-bottom: 6px;
border-bottom: 1px dashed var(--border);
font-size: 11px;
color: var(--accent);
}
/* The composer at the foot of a conversation (C8/C9). The field grows 1–6 rows;
the primary control turns from Send to Stop while a turn is in flight. */
.chat-composer { flex: 0 0 auto; display: grid; gap: var(--space-xs); padding-top: var(--space-xs); border-top: 1px solid var(--color-divider); }
.chat-queued { font-size: 12px; color: var(--muted); }
.chat-attachment-strip { display: flex; flex-wrap: wrap; gap: 8px; }
.chat-attachment-chip {
display: inline-flex;
align-items: center;
gap: 8px;
padding: 4px 6px 4px 8px;
border: 1px solid var(--border);
border-radius: var(--radius-control);
background: var(--surface-2);
}
.chat-attachment-chip-failed {
border-color: var(--bad);
background: color-mix(in srgb, var(--bad) 18%, var(--surface-2));
}
.chat-attachment-thumb { width: 28px; height: 28px; border-radius: 4px; object-fit: cover; }
.chat-attachment-glyph { width: 28px; text-align: center; font-size: 18px; line-height: 1; }
.chat-attachment-body { display: grid; gap: 1px; min-width: 0; max-width: 220px; }
.chat-attachment-name { font-size: 12px; }
.chat-attachment-meta { font-size: 11px; color: var(--muted); }
.chat-attachment-error { color: var(--bad); }
.chat-attachment-remove { padding: 1px 6px; font-size: 12px; line-height: 1; }
.chat-command-palette {
max-height: 176px;
overflow-y: auto;
border: 1px solid var(--border);
border-radius: var(--radius-control);
background: var(--surface-2);
}
.chat-command-palette[hidden] { display: none; }
.chat-command-row {
display: flex;
gap: 10px;
align-items: baseline;
padding: 6px 10px;
cursor: pointer;
}
.chat-command-row.selected { background: color-mix(in srgb, var(--accent) 18%, var(--surface-2)); }
.chat-command-name { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
.chat-command-summary { flex: 1 1 auto; font-size: 12px; color: var(--muted); }
.chat-command-notice {
display: grid;
gap: 4px;
padding: 8px 10px;
border: 1px solid var(--border);
border-radius: var(--radius-control);
background: var(--surface-2);
}
.chat-command-notice-failed {
border-color: var(--bad);
background: color-mix(in srgb, var(--bad) 16%, var(--surface-2));
}
.chat-command-notice-head { display: flex; gap: 6px; align-items: center; }
.chat-command-notice-glyph {
font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
font-size: 12px;
line-height: 1;
color: var(--muted);
}
.chat-command-notice-failed .chat-command-notice-glyph { color: var(--bad); }
.chat-command-notice-label { font-size: 11px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.chat-command-notice-failed .chat-command-notice-label { color: var(--bad); }
.chat-command-notice-text { font-size: 12px; white-space: pre-wrap; overflow-wrap: anywhere; }
.chat-command-notice-actions { display: flex; gap: 8px; }
.chat-command-notice-actions button { padding: 3px 10px; font-size: 12px; }
.chat-composer-row { display: flex; gap: 8px; align-items: flex-end; }
.chat-file-input { display: none; }
.chat-attach { padding: 6px 10px; font-size: 16px; line-height: 1; }
.chat-composer-input {
flex: 1 1 auto;
min-width: 0;
resize: none;
padding: 8px 12px;
background: var(--bg);
color: var(--text);
border: 1px solid var(--border);
border-radius: var(--radius-control);
font: inherit;
line-height: 20px;
max-height: 132px;
overflow-y: hidden;
}
.chat-composer-input:focus-visible { outline: 2px solid var(--accent); outline-offset: -1px; }
.chat-composer-primary { display: inline-flex; align-items: flex-end; }
.chat-send, .chat-stop {
padding: 8px 12px;
font-size: 16px;
line-height: 1;
border: 1px solid var(--border);
border-radius: var(--radius-control);
background: var(--surface-2);
color: var(--text);
cursor: pointer;
}
.chat-send:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.chat-send:disabled { opacity: 0.5; cursor: not-allowed; }
.chat-stop { border-color: var(--bad); color: var(--bad); }
/* The rendered markdown subset. Every node is created, never parsed from HTML. */
.markdown { display: grid; gap: 8px; min-width: 0; }
.markdown > * { margin: 0; }
.md-heading { font-size: 15px; }
.md-paragraph { line-height: 1.55; overflow-wrap: anywhere; }
.md-code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; background: var(--surface-2); padding: 1px 4px; border-radius: 4px; }
.md-code-block { border: 1px solid var(--border); border-radius: 8px; overflow: hidden; background: var(--bg); }
.md-code-label {
padding: 4px 10px;
font-size: 11px;
letter-spacing: 0.04em;
text-transform: uppercase;
color: var(--muted);
background: var(--surface-2);
border-bottom: 1px solid var(--border);
}
.md-pre { margin: 0; padding: 10px; overflow-x: auto; }
.md-pre code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
.md-quote { display: grid; gap: 6px; padding-left: 10px; border-left: 3px solid var(--border); color: var(--muted); }
.md-list { display: grid; gap: 4px; margin: 0; padding-left: 20px; }
.md-table { border-collapse: collapse; width: 100%; font-size: 13px; }
.md-table th, .md-table td { border: 1px solid var(--border); padding: 4px 8px; text-align: left; }
.md-table th { background: var(--surface-2); }
.md-rule { border: 0; border-top: 1px solid var(--border); }
.md-link { color: var(--accent); }
.md-link-plain { color: var(--muted); }