/* Chat screen (area A): the #chat-view body, composer, runtime sheet and answer rendering. Loaded after styles.css. */
.prompt-rail-mark::after { content: ''; position: absolute; left: 8px; top: 10px; width: 8px; height: 4px; border-radius: var(--r-pill); background: var(--faint); opacity: .72; }
.prompt-rail-mark:hover::after, .prompt-rail-mark:focus-visible::after, .prompt-rail-mark.active::after { left: 5px; width: 14px; background: var(--accent); opacity: 1; }
.prompt-navigator-search:focus { border-color: var(--text); }
.prompt-navigator-item:hover, .prompt-navigator-item:focus-visible { background: var(--surface); }
.prompt-navigator-item small { color: var(--muted); font-size: var(--fs-12); text-transform: uppercase; }
.prompt-navigator-item strong { overflow: hidden; font-size: var(--fs-12); font-weight: var(--fw-strong); line-height: 1.4; text-overflow: ellipsis; white-space: nowrap; }
.prompt-navigator-empty { padding: 18px 2px; }
.latest-completed-copy strong { font-size: var(--fs-12); }
.latest-completed-copy span { color: var(--muted); font-size: var(--fs-12); line-height: 1.4; }
.latest-completed-jump { min-height: 44px; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--r-8); background: var(--surface-strong); white-space: nowrap; color: var(--text); font-size: var(--fs-12); font-weight: var(--fw-strong); }
.latest-completed-jump:hover, .latest-completed-jump:focus-visible { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); outline: none; }
.imported-payload { border: 1px solid var(--line); border-radius: var(--r-8); background: var(--surface); }
.imported-payload > summary { min-height: 44px; padding: 0 12px; display: flex; align-items: center; gap: 8px; cursor: pointer; list-style: none; }
.imported-payload > summary::-webkit-details-marker { display: none; }
.imported-payload > summary::before { content: '›'; color: var(--muted); font-size: var(--fs-20); transition: transform .15s ease; }
.imported-payload[open] > summary::before { transform: rotate(90deg); }
.imported-payload > .markdown { max-height: 65vh; overflow: auto; padding: 0 12px 12px; border-top: 1px solid var(--line); }
.live-activity-row + .live-activity-row { border-top: 1px solid color-mix(in srgb,var(--line) 65%,transparent); }
.live-activity-row .activity-dot { margin-top: 4px; }
.live-activity-row strong { color: var(--text); font-size: var(--fs-12); }
.live-activity-row.helper .activity-dot, .live-activity-row.conversation .activity-dot { background: var(--success); }
.live-activity-row.provider_limit .activity-dot { background: var(--danger); }
.tool-status { color: var(--faint); font-size: var(--fs-12); text-transform: capitalize; white-space: nowrap; }
.tool-status.failed { color: var(--danger); }
.tool-status.in-progress, .tool-status.running, .tool-status.started { color: var(--warning); }
/* Owner tool rows: icon + one-line summary + status, collapsed by default. */
.live-activity-feed > .tool-activity-row + :is(.tool-activity-row,.live-activity-row), .live-activity-feed > .live-activity-row + .tool-activity-row { border-top: 1px solid color-mix(in srgb,var(--line) 65%,transparent); }
.tool-activity-row { min-width: 0; }
.tool-activity-row > summary { min-width: 0; display: grid; grid-template-columns: 24px minmax(0,1fr) auto; align-items: center; gap: 8px; padding: 8px 0; color: var(--muted); font-size: var(--fs-12); line-height: 1.45; cursor: pointer; list-style: none; }
.tool-activity-row > summary::-webkit-details-marker { display: none; }
.tool-summary { min-width: 0; overflow: hidden; color: var(--text); text-overflow: ellipsis; white-space: nowrap; }
.tool-activity-row[open] .tool-summary { white-space: normal; overflow-wrap: anywhere; }
.tool-icon svg { width: 11px; height: 11px; }
.tool-activity-row.failed .tool-icon { color: var(--danger); }
.tool-status.waiting, .tool-status.stopped { color: var(--faint); }
.tool-pre.tool-diff { white-space: pre; overflow-wrap: normal; }
.tool-detail-full { justify-self: start; color: var(--accent); font-size: var(--fs-12); }
/* Live command output: failing tests first, then the newest output, then the full log. */
.tool-live { min-width: 0; display: grid; gap: 6px; }
.tool-live:empty { display: none; }
.tool-live-output { max-height: min(40vh, 260px); }
.tool-failing { color: var(--danger); }
.tool-status.plain { text-transform: none; }
@media (max-width: 560px) {
.live-activity-row { grid-template-columns: 6px 76px minmax(0,1fr) auto; }
}
.message.failed .message-body { color: var(--danger); }
.message.failed.recoverable .message-body { color: color-mix(in srgb,var(--warning) 78%,var(--text)); }
.message.failed.recoverable .message-status.failed { color: var(--warning); }
.message.failed.continued .message-body { color: var(--text); }
.message.failed.continuing .message-body { color: var(--text); }
.attempt-technical > summary { min-height: 44px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 11px; cursor: pointer; color: var(--muted); font-size: var(--fs-12); list-style: none; }
.attempt-technical > summary::-webkit-details-marker { display: none; }
.work-history-summary > summary { min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 13px; cursor: pointer; list-style: none; }
.work-history-summary > summary::-webkit-details-marker, .work-history-audit > summary::-webkit-details-marker { display: none; }
.work-history-summary > summary::after, .work-history-audit > summary::after { content: '›'; flex: 0 0 auto; color: var(--faint); font-size: var(--fs-20); line-height: 1; transition: transform .15s ease; }
.work-history-summary[open] > summary::after, .work-history-audit[open] > summary::after { transform: rotate(90deg); }
.work-history-explanation { color: var(--muted); }
.work-history-usage ul { display: grid; gap: 5px; margin: 0; padding-left: 19px; }
.work-history-usage li { color: var(--muted); font-size: var(--fs-12); line-height: 1.45; }
.work-history-incident-heading > strong { flex: 0 0 auto; color: var(--text); font-size: var(--fs-14); font-variant-numeric: tabular-nums; }
.work-history-range, .work-history-code { color: var(--faint); }
.work-history-code { font-family: var(--font-mono); }
.work-history-incident-technical > summary, .work-history-summary-technical > summary, .work-history-audit-usage > summary, .work-history-fingerprint > summary { min-height: 44px; display: flex; align-items: center; gap: 8px; color: var(--muted); cursor: pointer; list-style: none; font-size: var(--fs-12); }
.work-history-incident-technical > summary::-webkit-details-marker, .work-history-summary-technical > summary::-webkit-details-marker, .work-history-audit-usage > summary::-webkit-details-marker, .work-history-fingerprint > summary::-webkit-details-marker { display: none; }
.work-history-incident-technical > summary::after, .work-history-summary-technical > summary::after, .work-history-audit-usage > summary::after, .work-history-fingerprint > summary::after { content: '›'; margin-left: auto; color: var(--faint); font-size: var(--fs-16); }
.work-history-incident-technical[open] > summary::after, .work-history-summary-technical[open] > summary::after, .work-history-audit-usage[open] > summary::after, .work-history-fingerprint[open] > summary::after { transform: rotate(90deg); }
.work-history-incident-technical, .work-history-summary-technical { border-top: 1px solid var(--line); }
.work-history-incident-technical .work-history-usage, .work-history-summary-technical .work-history-usage, .work-history-audit-usage .work-history-usage { padding: 0 0 7px; }
.work-history-audit { overflow: hidden; border: 1px solid var(--line); border-radius: var(--r-8); }
.work-history-audit > summary { min-height: 48px; display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 10px; padding: 9px 12px; cursor: pointer; list-style: none; }
.work-history-audit-heading strong { font-size: var(--fs-12); text-transform: capitalize; }
.work-history-audit-heading time { color: var(--faint); font-size: var(--fs-12); }
.work-history-audit-item code, .work-history-fingerprint code { max-width: 100%; overflow-wrap: anywhere; color: var(--faint); font-size: var(--fs-12); }
.work-history-audit-more { min-height: 44px; justify-self: stretch; }
.continuation-detail-body { padding: 11px; border-top: 1px solid var(--line); color: var(--text); }
.message.session-event { margin: 0 0 18px; }
.message.session-event .message-body { display: inline-block; padding: 7px 10px; border: 1px solid var(--line); border-radius: var(--r-8); background: var(--surface); color: var(--muted); font-size: var(--fs-12); }
.markdown p:last-child { margin-bottom: 0; }
.markdown ul, .markdown ol { margin: .4em 0 .85em; padding-left: 1.35em; }
.markdown li { margin: .24em 0; }
.markdown h4, .markdown h5, .markdown h6 { margin: 1em 0 .4em; font-size: 1em; line-height: 1.3; }
.markdown li > ul, .markdown li > ol { margin: .2em 0 .3em; }
/* A Markdown link to a local file shows as path text; long paths wrap. */
.markdown code.md-path { overflow-wrap: anywhere; }
.markdown pre code { padding: 0; background: none; white-space: pre; }
.markdown .code-block { margin: .7em 0; overflow: hidden; border: 1px solid var(--line); border-radius: var(--r-8); background: var(--surface); }
.markdown .code-block pre { margin: 0; border: 0; border-radius: 0; }
.markdown .code-block { position: relative; }
.markdown .code-block pre { background: transparent; box-shadow: none; }
.markdown .code-block.no-bar pre { padding-right: calc(var(--tap) + 12px); }
.markdown .code-copy.floating { position: absolute; top: 6px; right: 6px; border-color: transparent; background: transparent; }

.code-language { min-width: 0; overflow: hidden; color: var(--faint); font: var(--fs-12)/1.4 var(--font-mono); text-overflow: ellipsis; white-space: nowrap; }
.code-copy:hover { color: var(--text); }
.code-copy:focus-visible { outline: 2px solid color-mix(in srgb,var(--accent) 72%,var(--white)); outline-offset: 2px; }
.markdown a { color: var(--accent); text-underline-offset: 3px; }
.markdown blockquote { margin: .7em 0; padding-left: 12px; border-left: 3px solid var(--line); color: var(--muted); }
.markdown-table { width: 100%; border-collapse: collapse; text-align: left; font-size: 1em; }
.markdown-table th, .markdown-table td { min-width: 7em; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.markdown-table tr:last-child td { border-bottom: 0; }
.md-gap { height: .22em; }
.source-prompt-label::-webkit-details-marker { display: none; }
.source-prompt-label::before { content: '›'; margin-right: 6px; color: var(--faint); font-size: var(--fs-14); transition: transform .14s ease; }
.source-prompt[open] > .source-prompt-label::before { transform: rotate(90deg); }
.source-prompt-body { min-width: 0; }
.source-prompt-entry + .source-prompt-entry { margin-top: 8px; padding-top: 7px; border-top: 1px solid var(--line); }
.source-prompt-entry > strong { color: var(--faint); font-size: var(--fs-12); text-transform: uppercase; letter-spacing: .04em; }
.source-prompt blockquote { margin: 3px 0 0; font-size: var(--fs-12); line-height: 1.45; color: var(--muted); white-space: pre-wrap; overflow-wrap: anywhere; }
.attachment { padding: 7px 9px; border: 1px solid var(--line); border-radius: var(--r-8); color: var(--muted); text-decoration: none; font-size: var(--fs-12); }
.message-attachments { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 11px; }
.attachment-preview { width: min(360px,100%); overflow: hidden; border: 1px solid var(--line); border-radius: var(--r-12); background: var(--surface); color: var(--muted); text-decoration: none; }
.attachment-preview img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; background: var(--media-bg); }
.attachment-preview span { display: block; overflow: hidden; padding: 8px 10px; text-overflow: ellipsis; white-space: nowrap; font-size: var(--fs-12); }
.attachment-video { width: min(480px,100%); margin: 0; overflow: hidden; border: 1px solid var(--line); border-radius: var(--r-12); background: var(--surface); }
.attachment-video video { display: block; width: 100%; aspect-ratio: 16 / 9; background: var(--media-bg); }
.attachment-video figcaption { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 10px; color: var(--muted); font-size: var(--fs-12); }
.attachment-video figcaption span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attachment-video figcaption a { min-height: var(--tap); display: inline-flex; align-items: center; color: var(--accent); font-weight: var(--fw-strong); text-decoration: none; }
.still-pick { width: 100%; }
.still-pick-title { margin: 0 0 8px; color: var(--text); font-size: var(--fs-14); font-weight: var(--fw-strong); }
.still-pick-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.still-pick-choice { min-width: 0; padding: 0; overflow: hidden; border: 1px solid var(--line); border-radius: var(--r-12); background: var(--surface); color: var(--accent); text-align: center; }
.still-pick-choice img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--media-bg); }
.still-pick-choice span { display: block; min-height: var(--tap); padding: 10px 8px; font-size: var(--fs-14); font-weight: var(--fw-strong); }
.still-pick-choice:disabled { opacity: .6; }
.video-brief-label { margin: var(--sp-3) 0 6px; color: var(--muted); font-size: var(--fs-14); }
.video-brief .segment { min-width: 0; min-height: var(--tap); padding: 2px 4px; border: 0; border-radius: var(--r-8); background: transparent; color: var(--muted); font-size: var(--fs-14); font-weight: var(--fw-strong); }
.chat-decision { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 10px 10px 10px 13px; border: 1px solid color-mix(in srgb,var(--warning) 38%,var(--line)); border-left: 3px solid var(--warning); border-radius: var(--r-8); background: color-mix(in srgb,var(--warning) 6%,var(--surface)); }
.chat-decision.answering { border-color: color-mix(in srgb,var(--accent) 55%,var(--line)); border-left-color: var(--accent); background: color-mix(in srgb,var(--accent) 6%,var(--surface)); }
.chat-decision > div { flex: 1; min-width: 0; }
.chat-decision span { display: block; margin-bottom: 3px; color: var(--warning); font-size: var(--fs-12); font-weight: var(--fw-strong); letter-spacing: .05em; text-transform: uppercase; }
.chat-decision button { flex: 0 0 auto; min-height: 44px; padding: 7px 12px; }
.chat-decision-controls { display: flex; flex: 0 0 auto; flex-wrap: wrap; gap: 7px; }
.chat-action { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 8px 10px 8px 13px; border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: var(--r-8); background: var(--surface); }
.chat-action > div { flex: 1; min-width: 0; }
.chat-action strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--fs-12); font-weight: var(--fw-strong); }
.chat-action span { display: block; color: var(--muted); font-size: var(--fs-12); text-transform: uppercase; letter-spacing: .04em; }
.chat-action button { flex: 0 0 auto; padding: 5px 9px; font-size: var(--fs-12); }
.chat-action > .chat-action-buttons { flex: 0 0 auto; max-width: 55%; display: flex; flex-direction: column; align-items: stretch; gap: 6px; }
.chat-action > .chat-action-buttons button { white-space: normal; text-align: center; }
.todo-sheet .chat-action > .chat-action-buttons { max-width: none; }
.queue-item { min-height: 31px; display: flex; align-items: center; gap: 8px; font-size: var(--fs-12); }
.queue-item span { min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.queue-item em { color: var(--faint); font-style: normal; }
.queue-item button { border: 0; background: none; color: var(--muted); }
.agent-item { min-height: 28px; display: grid; grid-template-columns: 8px minmax(0,1fr) auto; align-items: center; gap: 8px; border-top: 1px solid var(--line); color: var(--muted); font-size: var(--fs-12); }
.agent-item small { color: var(--faint); }
.agent-state { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); }
.agent-state.running { background: var(--success); box-shadow: 0 0 0 3px color-mix(in srgb, var(--success) 15%, transparent); }
.agent-state.complete { background: var(--success); }
.agent-state.failed, .agent-state.cancelled { background: var(--danger); }
.collaboration-review:hover, .collaboration-review:focus-visible { border-color: var(--line-strong); color: var(--text); outline: none; }
.collaboration-list { display: grid; gap: 9px; margin-top: 16px; }
.collaboration-agent { border: 1px solid var(--line); border-radius: var(--r-8); background: var(--surface); }
.collaboration-agent summary small { color: var(--faint); text-transform: capitalize; }
.collaboration-agent[open] summary { border-bottom: 1px solid var(--line); }
.agent-task { margin: 11px 12px 0; color: var(--muted); font-size: var(--fs-12); }
.workflow-message-list { display: grid; gap: 6px; margin-top: 8px; }
.workflow-message { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 4px 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--r-8); background: var(--surface); font-size: var(--fs-12); }
.workflow-message span, .workflow-message small { color: var(--muted); }
.workflow-message small { grid-column: 1 / -1; }
.agent-usage,.workflow-usage-total { margin: 5px 12px 10px; color: var(--muted); font-size: var(--fs-12); font-variant-numeric: tabular-nums; }
.workflow-usage-total { margin: 7px 0 0; font-weight: var(--fw-strong); }
.workflow-limits { margin: 7px 0 0; color: var(--muted); font-size: var(--fs-12); font-variant-numeric: tabular-nums; }
.workflow-counts { margin: 8px 0 0; color: var(--text); font-size: var(--fs-12); font-variant-numeric: tabular-nums; }
.workflow-adjustment { margin: 6px 0 0; padding: 8px 10px; border-left: 3px solid var(--warning); border-radius: 0 var(--r-8) var(--r-8) 0; background: color-mix(in srgb,var(--warning) 7%,var(--surface)); color: var(--muted); font-size: var(--fs-12); line-height: 1.45; }
.workflow-agent-trail { margin: 0 12px 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.workflow-agent-trail h4 { margin: 0 0 4px; font-size: var(--fs-12); }
.workflow-trail-list { display: grid; gap: 6px; }
.workflow-trail-row { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 3px 9px; padding: 8px 9px; border: 1px solid var(--line); border-radius: var(--r-8); background: var(--surface-strong); font-size: var(--fs-12); }
.workflow-trail-row > span,.workflow-trail-row > small { grid-column: 1 / -1; color: var(--muted); white-space: pre-wrap; overflow-wrap: anywhere; }
.workflow-trail-row time { color: var(--faint); }
.workflow-trail-row.steer { border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }
.workflow-agent-controls { display: grid; gap: 8px; margin: 0 12px 12px; padding: 10px; border: 1px solid var(--line); border-radius: var(--r-8); background: var(--surface-strong); }
.workflow-agent-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.workflow-agent-actions button { min-height: 40px; }
.workflow-load-earlier { justify-self: start; min-height: 38px; }
@media (max-width: 500px) {
.workflow-agent-actions { display: grid; grid-template-columns: 1fr 1fr; }
.workflow-agent-actions button { width: 100%; }
.workflow-trail-row { grid-template-columns: minmax(0,1fr); }
.workflow-trail-row time { grid-column: 1; }
}
.composer-attachments { display: flex; gap: 8px; overflow-x: auto; padding: 10px 12px 0; scrollbar-width: none; }
.composer-attachments::-webkit-scrollbar { display: none; }
/* Chips take their content width and share a narrow tray, so a second file's
   name and size stay in view on a phone instead of starting off-screen. */
.composer-attachment { position: relative; display: grid; grid-template-columns: minmax(0,1fr) 44px; flex: none; min-width: 180px; max-width: min(280px,82vw); align-items: center; gap: 8px; min-height: 44px; padding: 4px 5px; border: 1px solid var(--line); border-radius: var(--r-12); background: var(--surface-strong); }
.composer-attachment-open { display: flex; align-items: center; gap: 8px; min-width: 0; min-height: 44px; text-decoration: none; }
.composer-attachment-open img,.composer-attachment-open .composer-file-icon { flex-shrink: 0; }
.composer-attachment.cleanup-pending { grid-template-columns: 34px minmax(0,1fr) 44px; }
.composer-attachment img,.composer-file-icon { width: 34px; height: 34px; border-radius: var(--r-8); object-fit: cover; background: var(--surface-strong); }
.composer-file-icon { display: grid; place-items: center; color: var(--faint); }
.composer-file-icon svg { width: 18px; height: 18px; }
.composer-attachment.is-uploading .composer-attachment-size { color: var(--muted); }
.composer-attachment-notice { margin: 6px 12px 0; overflow: hidden; color: var(--danger); font-size: var(--fs-12); text-overflow: ellipsis; white-space: nowrap; }
.composer-attachment-notice.hidden { display: none; }
.composer-attachment-text { display: grid; min-width: 0; line-height: 1.3; }
.composer-attachment-name { overflow: hidden; color: var(--muted); font-size: var(--fs-12); text-overflow: ellipsis; white-space: nowrap; }
.composer-attachment-size { color: var(--faint); font-size: var(--fs-12); white-space: nowrap; }
.composer-attachment-remove { width: 44px; height: 44px; border: 0; border-radius: 50%; background: transparent; color: var(--muted); font-size: var(--fs-20); line-height: 1; }
.composer-attachment-remove:hover,.composer-attachment-remove:focus-visible { background: var(--surface-strong); color: var(--text); }
/* Per-turn "Files changed" chip and diff viewer. +/- prefixes stay in the
   text, so colour is a reading aid rather than the only signal. */
.turn-files-slot:empty { display: none; }
.turn-diff-summary { margin: 10px 0 6px; font-size: var(--fs-14); font-weight: var(--fw-strong); }
.turn-diff-notes { margin: 0 0 12px; padding-left: 18px; color: var(--muted); font-size: var(--fs-12); line-height: 1.55; }
.turn-diff-note { margin: 4px 0 10px; color: var(--muted); font: var(--fs-12)/1.5 var(--font-sans); }
.turn-diff-files { border-top: 1px solid var(--line); }
.turn-diff-file summary { grid-template-columns: 22px minmax(0, 1fr) auto; }
.turn-diff-kind { text-align: center; }
.turn-diff-kind.added { color: var(--text); }
.turn-diff-kind.deleted { color: var(--danger); }
.turn-diff-kind.unchanged, .turn-diff-kind.unreadable { color: var(--faint); }
.turn-diff-meta { display: inline-flex; gap: 8px; color: var(--faint); font: var(--fs-12)/1.4 var(--font-sans); }
.turn-diff-meta em { color: var(--warning); font-style: normal; font-weight: var(--fw-strong); }
.diff-line { display: block; min-width: max-content; padding: 0 12px; }
.diff-line.add { background: var(--surface-strong); }
.diff-line.del { background: color-mix(in srgb, var(--danger) 13%, transparent); }
.diff-line.hunk { margin-top: 4px; color: var(--faint); }
.diff-line.meta { color: var(--faint); }
.branch-response-preview { min-height: 190px !important; font: var(--fs-12)/1.55 var(--font-mono); }
.branch-position { display: grid; grid-template-columns: minmax(0, 1fr) 86px; align-items: center; gap: 10px; }
.branch-position input { min-width: 0; margin: 0; }
.branch-position input[type=number] { height: 37px; }
.branch-count { display: block; margin: 7px 0; color: var(--faint); font-size: var(--fs-12); }
.branch-recovery { min-height: 48px; padding: 11px 12px; border: 1px solid var(--line); border-radius: var(--r-8); background: var(--surface); }
.branch-recovery p { margin: 0; line-height: 1.45; }
.branch-recovery-choice { display: grid !important; grid-template-columns: 18px minmax(0,1fr); align-items: start; gap: 10px !important; cursor: pointer; }
.branch-recovery-choice input { width: 17px; height: 17px; margin: 1px 0 0; }
.branch-recovery-choice span { display: grid; gap: 3px; }
.branch-recovery-choice strong { font-size: var(--fs-12); line-height: 1.35; }
.branch-recovery-choice small { color: var(--muted); font-size: var(--fs-12); line-height: 1.45; }
@media (max-width: 800px) {
.work-history-summary > summary { min-height: 52px; align-items: start; }
.work-history-summary > summary span { padding-top: 2px; white-space: normal; text-align: right; line-height: 1.35; }
.work-history-body { gap: 12px; padding: 11px; }
.work-history-incident { padding: 11px; }
.work-history-incident-heading { align-items: start; }
.work-history-audit > summary { min-height: 52px; }
.work-history-audit > summary span { white-space: normal; line-height: 1.35; }
.work-history-incident-technical > summary, .work-history-summary-technical > summary, .work-history-audit-usage > summary,
  .work-history-fingerprint > summary, .work-history-audit-more { min-height: 48px; }
.code-block-bar { min-height: 42px; }
.code-copy { min-height: 36px; min-width: 60px; }
.source-prompt-label { min-height: 44px; }
}
.home-route-results{display:grid;gap:.65rem;margin:.5rem 0 1rem}
.home-route-result{border:1px solid var(--line);border-radius:var(--r-12);padding:.8rem;background:var(--panel)}
.home-route-result-head{display:flex;gap:.55rem;align-items:baseline;justify-content:space-between;margin-bottom:.45rem}
.home-route-result .subtle{margin-top:.65rem}
.home-route-result>details>summary{min-height:28px;display:flex;align-items:center;justify-content:space-between;gap:10px;cursor:pointer;list-style:none;font-weight:500}
.home-route-result>details>summary::-webkit-details-marker{display:none}
.home-route-result>details>summary::after{content:"";flex:none;width:8px;height:8px;border-right:1.6px solid currentColor;border-bottom:1.6px solid currentColor;color:var(--muted);transform:rotate(45deg) translateY(-2px)}
.home-route-result>details[open]>summary::after{transform:rotate(-135deg) translateY(-2px)}
.assistant-answer-body{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.6}
.assistant-answer-body > .markdown > :first-child{margin-top:0}
.assistant-answer-body > .markdown > :last-child{margin-bottom:0}
.assistant-answer-status{margin-top:12px}
.check-problems>p{margin:0 0 8px;line-height:1.45}
.assistant-answer-details{margin-top:10px}.assistant-answer-details>summary{min-height:44px;display:list-item;align-content:center;color:var(--muted);font-family:var(--font-sans);font-size:var(--fs-15);font-weight:400}.assistant-answer-details[open]>summary{margin-bottom:4px}
.answer-shortened-mark{margin-left:10px;color:var(--muted);font-size:var(--fs-13)}.answer-shortened-mark::before{content:'\00b7';margin-right:10px}
.assistant-answer-note{margin-top:10px;font-size:.92em}.assistant-answer-note p{margin:2px 0}.assistant-hub-note summary{cursor:pointer}.assistant-hub-note p{margin:4px 0 0;white-space:pre-wrap}
.assistant-answer-status>summary{min-height:44px;display:list-item;align-content:center;cursor:pointer;color:var(--muted)}
.assistant-public-card{display:grid;gap:0;margin-top:12px;overflow:hidden;border:1px solid var(--line);border-radius:var(--r-12);background:var(--surface)}
.assistant-public-section{display:grid;grid-template-columns:72px minmax(0,1fr);align-items:start;gap:8px;padding:10px 12px;line-height:1.45;overflow-wrap:anywhere}
.assistant-public-section+.assistant-public-section{border-top:1px solid var(--line)}
.assistant-public-section>strong{font-size: var(--fs-12);color:var(--muted)}
.assistant-public-section>p{min-width:0;margin:0;font-size: var(--fs-14);color:var(--text)}
/* "Open Actions" under Next when the next step is an open Action. */
.assistant-public-section>.assistant-open-actions{grid-column:2;justify-self:start;min-height:36px}
.assistant-source-review-quiet{margin:0;padding:8px 12px 10px;border-top:1px solid var(--line);font-size: var(--fs-12);line-height:1.45}
.assistant-public-card-failed{border-color:color-mix(in srgb,var(--danger) 38%,var(--line))}
.assistant-public-card-failed .public-status{grid-template-columns:minmax(0,1fr);gap:3px;border-left:3px solid var(--danger);background:color-mix(in srgb,var(--danger) 7%,var(--surface))}
.assistant-public-card-failed .public-status>strong,.assistant-public-card-failed .public-next>strong{color:var(--danger)}
.assistant-public-card-failed .public-status>p{font-weight: var(--fw-strong)}
.assistant-public-card-failed .public-next{background:color-mix(in srgb,var(--accent) 6%,var(--surface))}
@media(max-width:560px) {
.assistant-public-section{grid-template-columns:60px minmax(0,1fr);gap:7px;padding:9px 10px}
.assistant-public-section>.assistant-open-actions{min-height:44px}
}
/* A deferred goal needs its exact wait even when its single queue is compact. */
.goal-banner.has-scheduled-wait { flex-wrap: wrap; }
.goal-banner > .goal-scheduled-wait { flex: 1 0 100%; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 0; font-size: var(--fs-12); line-height: 1.45; overflow-wrap: anywhere; }
.goal-scheduled-wait strong { font-size: var(--fs-12); color: var(--text); }
.goal-scheduled-wait span { color: var(--muted); }
.cross-chat-delegation-card { display: grid; gap: 6px; padding: 9px 0; border-top: 1px solid var(--line); }
.cross-chat-delegation-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.cross-chat-delegation-heading span { color: var(--muted); font-size: var(--fs-12); text-transform: capitalize; }
.cross-chat-delegation-card p { margin: 0; overflow-wrap: anywhere; }
.cross-chat-delegation-card button { justify-self: start; }
.cross-chat-delegation-result { max-height: 220px; overflow: auto; margin: 0; padding: 9px; border-radius: var(--r-8); background: var(--bg); color: var(--text); font: inherit; font-size: var(--fs-12); white-space: pre-wrap; overflow-wrap: anywhere; }
.cross-chat-delegation-review { display: grid; gap: 5px; padding: 10px; border: 1px solid var(--line); border-radius: var(--r-8); background: var(--surface); }
.cross-chat-delegation-review p { margin: 0; color: var(--muted); font-size: var(--fs-12); line-height: 1.45; overflow-wrap: anywhere; }
.composer-recovery{max-height:220px;overflow:auto;padding:6px 10px}
.composer-recovery details{padding:4px 0}
.composer-recovery summary{cursor:pointer;min-height:44px;display:flex;align-items:center;font-weight: var(--fw-strong)}
.composer-recovery p{margin:4px 0;font-size: var(--fs-14)}
.composer-recovery pre{white-space:pre-wrap;overflow-wrap:anywhere;max-height:120px;overflow:auto;font:inherit}
.composer-recovery button{min-height:44px}
.response-usage-line { margin: 4px 0; overflow-wrap: anywhere; font-size: var(--fs-12); }
/* ==========================================================================
   Chat screen layout (Stage 2A). Rows: header · context line · messages ·
   run strip (only while a turn runs) · composer. The column is at most
   --chat-max wide with a 16px gutter on a phone.
   ========================================================================== */
.chat-view { grid-template-rows: var(--header-h) auto minmax(0, 1fr) auto auto; }
.chat-context { grid-row: 2; }
.messages, .prompt-rail { grid-row: 3; }
.run-area { grid-row: 4; }
.composer-wrap { grid-row: 5; }
.chat-context, .run-area, .composer-wrap { width: min(var(--chat-max), calc(100% - 2 * var(--gutter))); min-width: 0; margin-inline: auto; }

.agent-plan { min-width: 0; margin-bottom: var(--sp-1); font-size: var(--fs-14); }
.agent-plan > summary { min-height: var(--tap); display: flex; align-items: center; gap: var(--sp-2); padding-inline: var(--sp-3); cursor: pointer; list-style: none; }
.agent-plan > summary::-webkit-details-marker { display: none; }
.agent-plan > summary::before { content: '›'; flex: 0 0 auto; color: var(--muted); }
.agent-plan[open] > summary::before { transform: rotate(90deg); }
.agent-plan > summary:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; border-radius: var(--r-8); }
.agent-plan > summary strong { flex: 0 0 auto; font-weight: var(--fw-strong); }
/* Shortened at a word in app.js (shortWords); it wraps instead of cutting a word. */
#agent-plan-progress { min-width: 0; color: var(--muted); line-height: 1.3; overflow-wrap: break-word; }
.agent-plan-body { max-height: min(30dvh, 260px); overflow-y: auto; overscroll-behavior: contain; padding: 0 var(--sp-3) var(--sp-2); overflow-wrap: anywhere; }
.agent-plan-steps { display: grid; gap: var(--sp-2); margin: 0; padding: 0; list-style: none; }
.agent-plan-step { display: grid; grid-template-columns: 16px minmax(0, 1fr); gap: var(--sp-2); line-height: 1.45; }
.agent-plan-icon { color: var(--muted); text-align: center; }
.agent-plan-step.in_progress .agent-plan-icon { color: var(--accent); }
.agent-plan-step.in_progress { font-weight: var(--fw-strong); }
.agent-plan-step.completed .agent-plan-icon { color: var(--success); }
.agent-plan-step.in_progress.stopped { font-weight: var(--fw-regular); }
.agent-plan-step.in_progress.stopped .agent-plan-icon, .agent-plan-step-state { color: var(--muted); }
.agent-plan-explanation { margin: var(--sp-2) 0; color: var(--muted); }
.agent-plan-updated { display: block; margin-top: var(--sp-2); color: var(--faint); }

/* ---------- Context line: goal, to-dos and delegated tasks ---------- */
.chat-context { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); margin-top: var(--sp-2); }
.chat-context:not(:has(> :not(.hidden))) { display: none; }
.goal-banner { grid-row: auto; flex: 1 1 220px; width: auto; min-width: 0; margin: 0; padding: 0; display: block; border: 1px solid var(--line); border-radius: var(--r-12); background: var(--surface); }
.goal-banner.hidden { display: none; }
.goal-line { min-height: var(--tap); display: flex; align-items: center; gap: var(--sp-2); padding: 0 var(--sp-2) 0 var(--sp-3); border-radius: var(--r-12); cursor: pointer; outline: 0; }
.goal-line:focus-visible { box-shadow: 0 0 0 2px var(--focus); }
.goal-line svg { flex: 0 0 auto; width: 18px; height: 18px; color: var(--muted); }
.goal-line strong { flex: 0 0 auto; color: var(--text); font-size: var(--fs-14); font-weight: var(--fw-strong); }
.goal-banner #goal-text { flex: 1 1 auto; min-width: 0; margin: 0; overflow: hidden; color: var(--muted); font-size: var(--fs-14); line-height: 1.4; text-overflow: ellipsis; white-space: nowrap; }
.goal-banner .goal-caret { transition: transform .15s ease; }
.goal-banner.expanded { flex-basis: 100%; }
.goal-banner.expanded .goal-line { align-items: flex-start; padding-block: var(--sp-3); }
.goal-banner.expanded #goal-text { white-space: normal; overflow-wrap: anywhere; color: var(--text); }
.goal-banner.expanded .goal-caret { transform: rotate(180deg); }
.goal-more { display: none; flex-wrap: wrap; gap: var(--sp-2); padding: 0 var(--sp-3) var(--sp-3); }
.goal-banner.expanded .goal-more { display: flex; }
.goal-banner:is([data-status="blocked"],[data-status="paused"],[data-status="usage_limited"],[data-status="budget_limited"]) .goal-line strong,
.goal-banner.has-scheduled-wait .goal-line strong { color: var(--warning); }
.goal-banner > .goal-scheduled-wait { display: none; padding: 0 var(--sp-3) var(--sp-3); flex-direction: column; gap: var(--sp-1); font-size: var(--fs-14); line-height: 1.45; overflow-wrap: anywhere; }
.goal-banner.expanded > .goal-scheduled-wait { display: flex; }
.goal-scheduled-wait strong { font-size: var(--fs-14); }
.chat-actions, .cross-chat-delegations { grid-row: auto; width: auto; margin: 0; padding: 0; display: flex; border: 0; background: transparent; }
.chat-actions.hidden, .cross-chat-delegations.hidden { display: none; }
.sean-notices { flex-basis: 100%; display: grid; gap: var(--sp-1); justify-items: start; }
.sean-notices p { margin: 0; }
.sean-notice { width: 100%; min-height: var(--tap); display: flex; align-items: center; gap: var(--sp-2); padding: 0 var(--sp-1); border: 0; background: none; color: var(--text); font: inherit; font-size: var(--fs-14); font-weight: normal; text-align: left; cursor: pointer; }
.sean-notice:hover, .sean-notice:focus-visible { background: var(--surface-strong); outline: none; border-radius: var(--r-sm, 6px); }
.sean-notice-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: var(--fw-strong); }
.sean-notice-change { flex: none; color: var(--muted); white-space: nowrap; }
.context-chip { min-height: var(--tap); display: inline-flex; align-items: center; gap: var(--sp-2); padding: 0 var(--sp-4) 0 var(--sp-3); border: 1px solid var(--line); border-radius: var(--r-pill); background: var(--surface); color: var(--text); font-size: var(--fs-14); font-weight: var(--fw-strong); white-space: nowrap; }
.context-chip:hover, .context-chip:focus-visible { background: var(--surface-strong); outline: none; }
.context-chip svg { width: 18px; height: 18px; color: var(--muted); }
.todo-chip { border-color: color-mix(in srgb, var(--warning) 45%, var(--line)); }
.todo-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--warning); }

/* ---------- Messages ---------- */
.messages { min-height: 0; overflow-y: auto; padding: var(--sp-5) max(var(--gutter), calc((100% - var(--chat-max)) / 2)) var(--sp-3); scroll-behavior: auto; }
/* More of the chat below: the last line fades into the composer instead of being sliced at the edge (markMoreBelow in app.js). */
.messages.has-more-below { -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 32px), transparent); mask-image: linear-gradient(to bottom, #000 calc(100% - 32px), transparent); }
.message { display: block; width: 100%; margin: 0 0 var(--sp-5); }
.message-content { position: relative; min-width: 0; }
.message-body { overflow-wrap: anywhere; font-size: var(--fs-16); line-height: 1.6; }
/* The one grey line: "Haiku 4.5 · 14:02", and a state word when it matters. */
.message-meta { min-height: 24px; display: flex; flex-wrap: nowrap; align-items: center; gap: 0 6px; margin: 0 0 var(--sp-1); color: var(--muted); font-size: var(--fs-12); line-height: 1.4; }
.message-meta > :is(time, .message-status)::before { content: '·'; margin-right: 6px; color: var(--muted); }
.message-meta > time:empty { display: none; }
/* A reply's state word is read, not glanced at: larger than the grey line, most of all when it failed. */
.message-status { padding: 0; border-radius: 0; background: none; font-size: var(--fs-13); font-weight: var(--fw-strong); }
.message-status:is(.failed, .interrupted) { font-size: var(--fs-14); }
.message-status.streaming { color: var(--muted); }
.message-status.interrupted { color: var(--warning); }
.message-status.failed { color: var(--danger); }
.message-status.continued { color: var(--muted); }
.message-more { width: var(--tap); height: var(--tap); flex: 0 0 var(--tap); margin: -10px 0 -10px auto; padding: 0; border: 0; border-radius: var(--r-8); display: inline-grid; place-items: center; background: transparent; color: var(--muted); opacity: 0; }
.message-more svg { width: 18px; height: 18px; }
.message:hover .message-more, .message-more:focus-visible { opacity: 1; }
.message-more:hover, .message-more:focus-visible { background: var(--surface-strong); color: var(--text); outline: none; }
/* Your prompts are bubbles. Their ⋯ sits beside the bubble on hover. */
.message.user { display: flex; justify-content: flex-end; }
.message.user .message-content { max-width: min(85%, 620px); }
.message.user .message-meta { justify-content: flex-end; }
.message.user .message-body { padding: 10px 14px; border-radius: var(--r-12); background: var(--surface-strong); }
.message.user .message-more { position: absolute; top: 50%; right: calc(100% + 4px); margin: -22px 0 0; }
.message.session-event { margin: 0 0 var(--sp-4); }
.message.session-event .message-body { display: inline-block; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--r-12); background: var(--surface); color: var(--muted); font-size: var(--fs-14); }
.message-attachments { margin-top: var(--sp-2); }
.message .attachment { min-height: var(--tap); display: inline-flex; align-items: center; padding: 0 var(--sp-3); font-size: var(--fs-14); }
.history-loader { margin: 0 0 var(--sp-5); }
.empty-state { margin-top: 18vh; }
.empty-state h2 { font-size: var(--fs-24); font-weight: var(--fw-strong); }
.latest-completed-result { width: 100%; margin: 0 0 var(--sp-5); border-radius: var(--r-12); }
.latest-completed-jump { border-radius: var(--r-8); font-size: var(--fs-14); }
.latest-completed-copy strong, .latest-completed-copy span { font-size: var(--fs-14); }
.work-history-summary { width: 100%; margin: 0 0 var(--sp-5); }
#messages > .native-import-banner { position: static; max-width: none; margin: 0 0 var(--sp-5); padding: 0 var(--sp-3); border-radius: var(--r-12); box-shadow: none; }
#messages > .native-import-banner > details > summary { min-height: var(--tap); padding: 12px 0; font-size: var(--fs-14); }
#messages > .native-import-banner p { font-size: var(--fs-14); line-height: 1.5; }
#messages > .native-import-banner > details[open] { max-height: none; }
.messages:has(> .native-import-banner) { scroll-padding-top: 0; }

/* ---------- Answers ---------- */
.assistant-answer-body { line-height: 1.6; }
.assistant-draft-body { color: var(--text); }
.assistant-public-card { margin-top: 0; border-radius: var(--r-12); }
.assistant-public-section > p { font-size: var(--fs-14); }
.message.failed .message-body { color: var(--text); }
.message.failed .assistant-public-card-failed { border-color: color-mix(in srgb, var(--danger) 38%, var(--line)); }
/* Outcome row under each answer: "Work details · 5 tools", "Files changed (10)". */
.message-outcome { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); margin-top: var(--sp-3); }
.message-outcome:not(:has(button:not([hidden]))) { display: none; }
.outcome-chip { min-height: var(--tap); display: inline-flex; align-items: center; gap: 6px; padding: 0 var(--sp-3); border: 1px solid var(--line); border-radius: var(--r-pill); background: transparent; color: var(--text); font-size: var(--fs-14); font-weight: var(--fw-strong); line-height: 1.2; white-space: nowrap; }
.outcome-chip[hidden] { display: none; }
.outcome-chip:hover, .outcome-chip:focus-visible { background: var(--surface-strong); outline: none; }
.outcome-chip svg { width: 18px; height: 18px; color: var(--muted); }
.work-details-toggle > svg { transition: transform .15s ease; }
/* Work details is a plain text row; "Try again" beside it has the same height and corners. */
.outcome-chip.work-details-toggle { padding: 0 var(--sp-2); border-color: transparent; border-radius: var(--r-8); color: var(--muted); font-weight: var(--fw-regular); }
.outcome-chip.work-details-toggle > span:first-of-type { color: var(--text); }
.message-outcome .turn-next-step { min-height: var(--tap); margin: 0; padding: 0 var(--sp-4); border-radius: var(--r-8); font-size: var(--fs-14); line-height: 1.2; white-space: nowrap; }
.work-details-toggle[aria-expanded="true"] > svg { transform: rotate(180deg); }
.work-details-toggle .activity-pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--success); animation: activity-pulse 1.8s ease-out infinite; box-shadow: 0 0 0 0 color-mix(in srgb, var(--success) 35%, transparent); }
.turn-files-slot:empty { display: none; }
.turn-details > .turn-files-slot { justify-self: start; }
.turn-details { margin-top: var(--sp-2); padding: var(--sp-3); display: grid; gap: var(--sp-3); border: 1px solid var(--line); border-radius: var(--r-12); background: var(--surface); font-size: var(--fs-14); line-height: 1.5; }
.turn-details[hidden] { display: none; }
.work-details-status { display: grid; gap: var(--sp-2); }
.work-details-status:empty { display: none; }
.work-details-label { margin: 0; color: var(--muted); font-size: var(--fs-12); font-weight: var(--fw-strong); }
.turn-details .live-activity-feed { padding: 0; border: 0; }
.turn-details .work-outcome { display: grid; gap: var(--sp-1); }
.turn-details .work-outcome strong { color: var(--muted); font-size: var(--fs-12); }
.turn-details .work-outcome p { margin: 0; font-size: var(--fs-14); overflow-wrap: anywhere; }
.turn-details > .secondary, .turn-details > .collaboration-review { justify-self: start; min-height: var(--tap); margin: 0; padding: var(--sp-2) var(--sp-3); border-radius: var(--r-8); font-size: var(--fs-14); text-align: left; }
.turn-details .response-usage { margin: 0; }
.turn-details .response-usage > summary { min-height: var(--tap); display: flex; align-items: center; gap: var(--sp-2); color: var(--muted); font-size: var(--fs-14); cursor: pointer; list-style: none; }
.turn-details .response-usage > summary::-webkit-details-marker { display: none; }
.turn-details .response-usage > summary::after { content: '›'; color: var(--muted); font-size: var(--fs-20); line-height: 1; transition: transform .15s ease; }
.turn-details .response-usage[open] > summary::after { transform: rotate(90deg); }
.turn-details .response-usage p { margin: var(--sp-1) 0; font-size: var(--fs-14); }
/* One "Technical" fold at the bottom of Work details, hidden while empty. */
.turn-steps { border-top: 1px solid var(--line); }
.turn-steps > summary { min-height: var(--tap); display: flex; align-items: center; color: var(--muted); font-size: var(--fs-14); cursor: pointer; list-style: none; }
.turn-steps > summary::-webkit-details-marker { display: none; }
.turn-steps > summary::after { content: "›"; margin-left: var(--sp-2); }
.turn-steps[open] > summary::after { content: "⌄"; }
.turn-technical { border-top: 1px solid var(--line); padding-top: var(--sp-1); }
.turn-technical:not(:has(.turn-technical-body > *)) { display: none; }
.turn-technical > summary { min-height: var(--tap); display: flex; align-items: center; gap: var(--sp-2); color: var(--muted); font-size: var(--fs-14); cursor: pointer; list-style: none; }
.turn-technical > summary::-webkit-details-marker { display: none; }
.turn-technical > summary::after { content: '›'; color: var(--muted); font-size: var(--fs-20); line-height: 1; transition: transform .15s ease; }
.turn-technical[open] > summary::after { transform: rotate(90deg); }
.turn-technical-body { display: grid; gap: var(--sp-2); padding-bottom: var(--sp-2); }
.turn-technical-body > .secondary { justify-self: start; min-height: var(--tap); margin: 0; border-radius: var(--r-8); font-size: var(--fs-14); }
.turn-technical-line { margin: 0; color: var(--muted); font-size: var(--fs-14); overflow-wrap: anywhere; }
.turn-technical-changes { display: grid; gap: var(--sp-1); }
.turn-timings > summary { min-height: var(--tap); display: flex; align-items: center; color: var(--muted); font-size: var(--fs-14); cursor: pointer; }
.turn-timings table { width: 100%; font-size: var(--fs-14); }
.turn-details .work-history-summary { width: auto; margin: 0; }
.turn-details .work-history-incidents h3 { margin: 0 0 var(--sp-2); font-size: var(--fs-14); }
.turn-details .tool-detail-label { letter-spacing: 0; text-transform: none; }
.workflow-sheet-summary, .workflow-reserved-use { margin: 0 0 var(--sp-3); font-size: var(--fs-14); }
.tool-activity-row > summary { min-height: var(--tap); font-size: var(--fs-14); }
.tool-icon { width: 24px; height: 24px; font-size: var(--fs-12); }
.tool-icon svg { width: 24px; height: 24px; }
.live-activity-row { font-size: var(--fs-14); }
.live-activity-row strong { font-size: var(--fs-14); }
.tool-status { font-size: var(--fs-12); }
.tool-detail-full { min-height: var(--tap); display: inline-flex; align-items: center; font-size: var(--fs-14); }
.activity-load-more { justify-self: start; }

/* ---------- Run strip ---------- */
.run-strip { min-height: var(--tap); display: flex; flex-direction: column; align-items: stretch; margin-bottom: var(--sp-2); border-radius: var(--r-pill); background: var(--surface); font-size: var(--fs-14); }
.run-strip.hidden { display: none; }
.run-strip-row { min-width: 0; min-height: var(--tap); display: flex; align-items: center; gap: var(--sp-2); padding-left: var(--sp-3); }
/* What it is doing now wraps to a second line rather than being cut mid-word. */
.run-now { min-width: 0; margin: 0; padding: 0 var(--sp-3) var(--sp-2) calc(var(--sp-3) + 8px + var(--sp-2)); color: var(--muted); font-size: var(--fs-14); line-height: 1.35; overflow-wrap: anywhere; }
.run-now:empty, .run-now[hidden] { display: none; }
.run-strip:has(.run-now:not([hidden])) { border-radius: var(--r-12); }
.run-pulse { flex: 0 0 auto; width: 8px; height: 8px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 0 color-mix(in srgb, var(--success) 35%, transparent); animation: activity-pulse 1.8s ease-out infinite; }
.run-strip .thread-state { min-width: 0; min-height: var(--tap); padding: 0 var(--sp-1); overflow: hidden; border: 0; border-radius: var(--r-8); background: transparent; color: var(--text); font-size: var(--fs-14); font-weight: var(--fw-strong); text-overflow: ellipsis; white-space: nowrap; }
.run-strip .thread-state:hover, .run-strip .thread-state:focus-visible { background: var(--surface-strong); color: var(--text); }
.run-strip .thread-state.hidden { display: none; }
.run-meta { flex: 0 0 auto; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.run-meta:empty { display: none; }
.run-meta::before { content: '·'; margin-right: var(--sp-2); }
/* Stop is a red outline, so it never looks like the filled Send button. */
.interrupt { flex: 0 0 auto; min-height: var(--tap); margin-left: auto; display: inline-flex; align-items: center; gap: 6px; padding: 0 var(--sp-4) 0 var(--sp-3); border: 1px solid var(--danger); border-radius: var(--r-pill); background: var(--bg); color: var(--danger); font-size: var(--fs-14); font-weight: var(--fw-strong); }
.interrupt:hover { background: color-mix(in srgb, var(--danger) 8%, var(--bg)); }
.interrupt.hidden { display: none; }
.interrupt svg { width: 18px; height: 18px; fill: currentColor; }
.interrupt:disabled { opacity: .6; cursor: progress; }
.interrupt:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

/* A file dragged over the conversation gets the same calm outline whether it
   lands on the messages or the composer; dropping it uploads it like a paste. */
.chat-view.drop-target::after { content: 'Drop to attach'; position: absolute; inset: var(--sp-3); z-index: 25; display: flex; align-items: center; justify-content: center; border: 2px dashed var(--success); border-radius: var(--r-12); background: color-mix(in srgb, var(--success) 6%, transparent); color: var(--text); font-size: var(--fs-16); font-weight: var(--fw-strong); pointer-events: none; }

/* ---------- Composer ---------- */
.composer-wrap { position: relative; z-index: 20; padding: 0 0 calc(var(--sp-3) + var(--safe-bottom)); }
.composer-bar { min-width: 0; flex-wrap: wrap; min-height: var(--tap); display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); }
.runtime-menu { position: relative; min-width: 0; flex: 1 1 auto; }
/* No provider name until the chat's real one is known (it once said Codex first). */
.runtime-menu.is-pending > summary { visibility: hidden; }
.runtime-menu > summary { min-height: var(--tap); max-width: 100%; display: flex; align-items: center; gap: 6px; padding: 0 var(--sp-2); border-radius: var(--r-pill); color: var(--muted); list-style: none; cursor: pointer; font-size: var(--fs-14); }
.runtime-menu > summary::-webkit-details-marker { display: none; }
.runtime-menu > summary:hover, .runtime-menu[open] > summary { background: var(--surface-strong); color: var(--text); }
.runtime-menu > summary:focus-visible { outline: 2px solid var(--focus); outline-offset: 0; }
.runtime-menu > summary svg { flex: 0 0 auto; width: 16px; height: 16px; }
.runtime-menu > summary #runtime-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.runtime-menu.is-locked > summary { opacity: .55; cursor: not-allowed; }
.runtime-menu.is-locked > summary:hover { background: transparent; color: var(--muted); }
.provider-light { flex: 0 0 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.provider-light.claude { background: var(--provider-claude); }
.provider-light.ollama { background: var(--provider-ollama); }
.provider-light.opencode { background: var(--provider-opencode); }
.queue { grid-row: auto; width: auto; margin: 0; flex: 0 0 auto; }
.queue.hidden { display: none; }
.queue-chip { min-height: var(--tap); display: inline-flex; align-items: center; gap: var(--sp-1); padding: 0 var(--sp-1) 0 var(--sp-3); border: 0; border-radius: var(--r-pill); background: transparent; color: var(--muted); font-size: var(--fs-14); white-space: nowrap; }
.queue-chip:hover, .queue-chip:focus-visible { background: var(--surface-strong); color: var(--text); outline: none; }
.queue-chip svg { width: 16px; height: 16px; }
.composer { position: relative; min-width: 0; border: 1px solid var(--line); border-radius: var(--r-12); background: var(--surface); box-shadow: 0 2px 10px var(--shade-5); }
.composer:focus-within { border-color: var(--line-strong); }
.composer-row { min-width: 0; display: flex; align-items: flex-end; gap: var(--sp-1); padding: 4px; }
.composer textarea { flex: 1 1 auto; width: auto; min-width: 0; min-height: var(--tap); max-height: 180px; padding: 11px var(--sp-1); border: 0; outline: 0; background: transparent; color: var(--text); font-size: var(--fs-16); line-height: 1.4; resize: none; }
.composer textarea::placeholder { color: var(--muted); }
.composer .icon-button, .composer .send { flex: 0 0 auto; width: var(--tap); height: var(--tap); min-width: var(--tap); min-height: var(--tap); touch-action: manipulation; }
.composer .icon-button svg { width: 22px; height: 22px; }
.composer #mic-button.recording { background: var(--danger); color: var(--on-danger); }
.send { border: 0; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--on-accent); }
.send:disabled { background: var(--surface-strong); color: var(--muted); cursor: default; }
.send svg { width: 20px; height: 20px; }
/* One round button: the mic while the field is empty, Send once there is text. */
.composer-wrap:not(.has-text) #send-button { display: none; }
.composer-wrap.has-text #mic-button:not(.recording) { display: none; }
.composer-wrap:has(#mic-button.recording) #send-button { display: none; }
.delivery-toggle { flex: 0 0 auto; min-height: var(--tap); display: inline-flex; align-items: center; padding: 0 var(--sp-3); border: 1px solid var(--line); border-radius: var(--r-pill); background: var(--bg); color: var(--text); font-size: var(--fs-14); font-weight: var(--fw-strong); touch-action: manipulation; }
.delivery-toggle.hidden { display: none; }
.delivery-toggle svg { width: 18px; height: 18px; margin-left: var(--sp-1); color: var(--muted); }
.delivery-toggle[data-delivery="message"] { border-color: var(--line-strong); background: var(--surface-strong); }
.delivery-toggle:hover { background: var(--surface-strong); }
.delivery-toggle:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.composer-hint { margin: 0; }
.composer-attachments { padding: var(--sp-2) var(--sp-2) 0; }
.composer-attachment { border-radius: var(--r-8); }

/* ---------- Runtime sheet (a popover on desktop, a bottom sheet on phone) ---------- */
.runtime-scrim { display: none; }
.runtime-popover { position: absolute; left: 0; bottom: calc(100% + 8px); z-index: 30; width: 380px; max-height: min(760px, 75dvh); overflow-y: auto; overscroll-behavior: contain; padding: 0 var(--sp-4) var(--sp-4); display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--sp-4); border: 1px solid var(--line); border-radius: var(--r-12); background: var(--bg); box-shadow: 0 18px 55px var(--shade-25); }
.runtime-popover .runtime-heading { grid-column: 1; position: sticky; top: 0; z-index: 2; margin: 0 calc(-1 * var(--sp-4)); padding: var(--sp-1) var(--sp-1) var(--sp-1) var(--sp-4); display: flex; align-items: center; gap: var(--sp-2); border-bottom: 1px solid var(--line); background: var(--bg); }
.runtime-heading strong { font-size: var(--fs-16); font-weight: var(--fw-strong); }
.runtime-heading span { flex: 1; color: var(--muted); font-size: var(--fs-12); }
.runtime-heading .icon-button { width: var(--tap); height: var(--tap); margin: 0; }
.runtime-heading .icon-button svg { width: 20px; height: 20px; }
#runtime-save-status:empty { display: none; }
#runtime-save-status p { margin: 0; color: var(--muted); font-size: var(--fs-14); }
.runtime-section { min-width: 0; display: grid; gap: var(--sp-2); }
.runtime-section.hidden { display: none; }
.runtime-section-title { margin: 0; color: var(--muted); font-size: var(--fs-12); font-weight: var(--fw-strong); }
.runtime-popover label.runtime-effort-label { display: block; }
.runtime-model-list { display: grid; gap: var(--sp-3); }
.runtime-model-group { display: grid; gap: 2px; }
.runtime-model-provider { margin: 0 0 2px; display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: var(--fs-12); font-weight: var(--fw-strong); }
.runtime-model-provider small { color: var(--muted); font-weight: var(--fw-regular); }
.runtime-model-provider small::before { content: '·'; margin-right: 6px; }
.runtime-popover .runtime-model-row { min-height: var(--tap); width: 100%; display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); padding: 0 var(--sp-3); border: 0; border-radius: var(--r-8); background: transparent; color: var(--text); font-size: var(--fs-16); text-align: left; }
.runtime-model-row:hover:not(:disabled) { background: var(--surface); }
.runtime-model-row[aria-pressed="true"] { background: var(--surface-strong); font-weight: var(--fw-strong); }
.runtime-model-row:disabled { opacity: 1; color: var(--muted); cursor: default; }
.runtime-model-row[aria-pressed="true"]:disabled { color: var(--text); }
.runtime-model-row svg { width: 20px; height: 20px; color: var(--accent); }
.runtime-model-tag { margin-left: var(--sp-2); padding: 1px 8px; border-radius: var(--r-pill); background: var(--surface-strong); color: var(--muted); font-size: var(--fs-12); font-weight: var(--fw-strong); white-space: nowrap; }
.segmented { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 2px; padding: 2px; border-radius: var(--r-8); background: var(--surface-strong); }
.segmented.hidden { display: none; }
.segmented-grid { grid-auto-flow: row; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.runtime-popover .segment { min-width: 0; min-height: var(--tap); padding: 2px 4px; display: grid; place-content: center; border: 0; border-radius: var(--r-8); background: transparent; color: var(--muted); font-size: var(--fs-14); font-weight: var(--fw-strong); line-height: 1.2; }
.segment small { color: var(--muted); font-size: var(--fs-12); font-weight: var(--fw-regular); }
.segment[aria-pressed="true"] { background: var(--bg); color: var(--text); box-shadow: 0 1px 3px var(--shade-20); }
.segment:focus-visible { outline: 2px solid var(--focus); outline-offset: 0; }
.runtime-toggles { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.runtime-popover:focus { outline: none; }
.runtime-popover .runtime-effort > .toggle-button { justify-self: start; }
.runtime-popover .runtime-access-line { border-bottom: 1px solid var(--line); }
.runtime-popover .runtime-access-line > summary span { color: var(--text); font-size: var(--fs-14); }
.runtime-link { justify-self: start; min-height: var(--tap); padding: 0; border: 0; background: transparent; color: var(--accent); font-size: var(--fs-14); text-decoration: underline; text-underline-offset: 3px; }
.runtime-popover .runtime-advanced { border-top: 1px solid var(--line); }
.runtime-popover .runtime-advanced > summary strong { font-size: var(--fs-14); }
.runtime-popover .runtime-advanced-body { grid-template-columns: minmax(0, 1fr); }
.runtime-popover .runtime-advanced-body > .toggle-button { justify-self: start; }
/* Desktop popover with a mouse: denser rows, so with the height above the
   pill (placeRuntimePopover) the limit bar shows without scrolling at
   1366x768. */
@media (min-width: 801px) and (min-height: 481px) and (pointer: fine) {
.runtime-popover { gap: var(--sp-3); }
.runtime-model-list { gap: var(--sp-2); }
.runtime-popover .runtime-model-row { min-height: 36px; }
.runtime-popover .segment { min-height: 38px; }
.runtime-popover .runtime-link { min-height: 32px; }
}
.runtime-more-link { min-height: var(--tap); display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); padding: var(--sp-2) 0 0; border: 0; border-top: 1px solid var(--line); background: transparent; color: var(--text); text-align: left; }
.runtime-more-link > span:first-child { min-width: 0; display: grid; gap: 2px; }
.runtime-more-link strong { font-size: var(--fs-14); }
.runtime-more-link small { color: var(--muted); font-size: var(--fs-12); }
.runtime-more-link > span:last-child { color: var(--muted); font-size: var(--fs-20); }

/* ---------- Sheets opened from the chat ---------- */
.queue-sheet, .todo-sheet, .delegation-sheet { display: grid; gap: var(--sp-2); }
.sheet-section-title { margin: var(--sp-2) 0 0; color: var(--muted); font-size: var(--fs-12); font-weight: var(--fw-strong); }
.queue-sheet .queue-item { min-height: var(--tap); display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-1) 0; border-bottom: 1px solid var(--line); font-size: var(--fs-14); }
.queue-sheet .queue-item > b { width: 24px; color: var(--muted); font-variant-numeric: tabular-nums; }
.queue-item-text { flex: 1; min-width: 0; display: grid; }
.queue-item-text > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.queue-item-text small { color: var(--muted); font-size: var(--fs-12); }
.queue-sheet .agent-item { min-height: var(--tap); font-size: var(--fs-14); }
.todo-sheet .chat-decision, .todo-sheet .chat-action { flex-direction: column; align-items: stretch; gap: var(--sp-2); padding: var(--sp-3); border: 1px solid var(--line); border-left-width: 1px; border-radius: var(--r-12); background: var(--surface); }
.todo-sheet .chat-decision { border-color: color-mix(in srgb, var(--warning) 45%, var(--line)); }
.todo-sheet .chat-decision span, .todo-sheet .chat-action span { color: var(--muted); font-size: var(--fs-12); letter-spacing: 0; text-transform: none; }
.todo-sheet .chat-decision p, .todo-sheet .chat-action strong { font-size: var(--fs-16); white-space: normal; }
.todo-sheet .chat-decision button, .todo-sheet .chat-action button { min-height: var(--tap); padding: var(--sp-2) var(--sp-3); font-size: var(--fs-14); }
.delegation-sheet .cross-chat-delegation-card { padding: var(--sp-3); border: 1px solid var(--line); border-radius: var(--r-12); background: var(--surface); }
.delegation-sheet .cross-chat-delegation-card p { font-size: var(--fs-14); }
.message-menu .nav-row-meta { white-space: normal; }
.turn-diff-intro { margin: 0 0 var(--sp-2); font-size: var(--fs-14); }
.turn-diff .turn-diff-file > summary { min-height: var(--tap); display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; align-items: center; gap: var(--sp-2); padding: 0 var(--sp-1); cursor: pointer; list-style: none; font-size: var(--fs-14); }
.turn-diff .turn-diff-file > summary::-webkit-details-marker { display: none; }
.turn-diff-path { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--font-mono); font-size: var(--fs-12); }
.turn-diff-file + .turn-diff-file { border-top: 1px solid var(--line); }
.turn-diff-patch { max-height: 60vh; margin: 0 0 var(--sp-2); overflow: auto; border: 1px solid var(--line); border-radius: var(--r-8); background: var(--surface); font: var(--fs-12)/1.5 var(--font-mono); }

/* ---------- Desktop prompt rail: quieter ---------- */
.prompt-rail { background: transparent; }

/* ---------- Touch screens: long-press replaces the hover ⋯ ---------- */
@media (hover: none) {
.message-more { position: absolute; width: 1px; height: 1px; margin: 0; overflow: hidden; clip-path: inset(50%); opacity: 1; }
.message-more:focus-visible { position: static; width: var(--tap); height: var(--tap); overflow: visible; clip-path: none; }
.message .message-body, .message .message-meta { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
.message pre, .message code, .message .turn-details { -webkit-user-select: text; user-select: text; }
}

/* ---------- Phone and short landscape ---------- */
@media (max-width: 800px), (max-height: 480px) and (orientation: landscape) {
.chat-view { height: 100%; }
.messages { padding: var(--sp-4) var(--gutter) var(--sp-2); }
.message { margin-bottom: var(--sp-5); }
.composer-wrap { padding-bottom: calc(var(--sp-2) + var(--safe-bottom)); }
.composer textarea { max-height: 130px; }
.runtime-menu > summary #runtime-label { max-width: 100%; }
.runtime-scrim { display: block; position: fixed; inset: 0; z-index: 70; border: 0; border-radius: 0; background: var(--scrim); cursor: default; touch-action: none; }
.runtime-scrim.hidden { display: none; }
.runtime-popover { position: fixed; left: var(--safe-left); right: var(--safe-right); bottom: 0; z-index: 71; width: auto; max-height: min(calc(88dvh - var(--safe-top)), 760px); padding: 0 var(--gutter) calc(var(--sp-4) + var(--safe-bottom)); border-radius: var(--r-12) var(--r-12) 0 0; border-bottom: 0; box-shadow: 0 -8px 40px var(--shade-25); }
.runtime-popover .runtime-heading { margin: 0 calc(-1 * var(--gutter)); padding: var(--sp-3) var(--sp-1) var(--sp-1) var(--gutter); }
.runtime-popover .runtime-heading::before { content: ''; position: absolute; top: 6px; left: 50%; width: 36px; height: 4px; margin-left: -18px; border-radius: var(--r-pill); background: var(--line-strong); }
.run-strip { margin-bottom: var(--sp-1); }
.turn-details { padding: var(--sp-3) var(--sp-2); }
}
@media (max-width: 380px) {
.run-strip .thread-state { max-width: 38vw; }
}

/* ---------- Short landscape: the same rows, tighter ---------- */
@media (max-height: 480px) and (orientation: landscape) {
.chat-view { grid-template-rows: 48px auto minmax(0, 1fr) auto auto; }
.chat-context { margin-top: var(--sp-1); }
.messages { padding-block: var(--sp-2); }
.composer-wrap { padding-bottom: calc(var(--sp-1) + var(--safe-bottom)); }
.composer-bar { min-width: 0; flex-wrap: wrap; min-height: 36px; }
.composer textarea { max-height: 62px; }
.runtime-popover { max-height: calc(var(--app-height, 100dvh) - var(--safe-top)); }
/* When a software keyboard leaves 260px or less, keep only the messages,
   the run strip and the composer row. The rest returns when it closes. */
html.keyboard-compact .chat-view { grid-template-rows: 0 0 minmax(0, 1fr) auto auto; }
html.keyboard-compact .chat-context { display: none; }
html.keyboard-compact .messages { padding-block: 0; }
html.keyboard-compact .composer-wrap { padding-bottom: calc(4px + var(--safe-bottom)); }
html.keyboard-compact .composer-attachments { height: 44px; padding: 0 8px; }
html.keyboard-compact .composer-attachment { height: 44px; min-height: 44px; padding-block: 0; }
html.keyboard-compact .composer textarea { max-height: 44px; overflow-y: auto; }
}
/* The diff sheet is full width on a phone like every other sheet. */
@media (max-width: 800px), (max-height: 480px) and (orientation: landscape) {
#modal:has(.turn-diff) { width: 100%; max-width: 100%; }
}

/* Keep long model names and file paths inside the chat column. */
.message-meta > .message-model, .message-meta > .message-who { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.message-meta > time { flex-shrink: 0; white-space: nowrap; }
.message-meta > .message-status { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.message .attachment { max-width: 100%; overflow-wrap: anywhere; }
.work-details-feed:empty { display: none; }
#chat-view :is(.code-copy, .workflow-agent-actions button, .workflow-load-earlier) { min-height: var(--tap); min-width: var(--tap); }
.branch-recovery-choice { min-height: var(--tap); grid-template-columns: var(--tap) minmax(0, 1fr); }
.branch-recovery-choice input { width: var(--tap); height: var(--tap); }
.runtime-popover { overflow-x: hidden; }
.runtime-model-row > span { min-width: 0; overflow-wrap: anywhere; }
.runtime-model-row svg { flex-shrink: 0; }
/* The state label sits next to its dot and only shrinks (with an ellipsis);
   Stop keeps the far right through its own auto margin. */
.run-strip .thread-state { flex: 0 1 auto; text-align: left; }
.run-meta { font-size: var(--fs-12); }
.run-strip .interrupt { padding-inline: var(--sp-2); }
@media (prefers-reduced-motion: reduce) {
.run-pulse, .work-details-toggle .activity-pulse { animation: none; }
}

.chat-context { max-height: min(50dvh, 360px); overflow-y: auto; }
/* An opened goal shows six lines, then More. Its buttons stay pinned to the
   bottom of the area, so a long goal never cuts them off. */
.goal-banner.expanded:not(.goal-full) #goal-text { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 6; line-clamp: 6; overflow: hidden; }
.goal-banner.expanded:not(.goal-full) > .goal-stop { max-height: calc(6 * 1.45em + 3 * var(--sp-1) + var(--sp-3)); overflow: hidden; -webkit-mask-image: linear-gradient(to bottom, #000 80%, transparent); mask-image: linear-gradient(to bottom, #000 80%, transparent); }
.goal-text-more { display: none; }
/* The steps, each with its proof, show under More. */
.goal-banner.expanded:not(.goal-full) .goal-steps { display: none; }
.goal-banner.expanded.goal-clamped:not(.goal-full) .goal-text-more { display: inline-flex; align-items: center; }
.goal-banner.expanded .goal-more { align-items: center; }
.goal-banner.expanded .goal-more { position: sticky; bottom: 0; z-index: 1; padding-top: var(--sp-2); border-radius: 0 0 var(--r-12) var(--r-12); background: var(--surface); }
.queue { max-width: 100%; }
.queue-chip { max-width: 100%; }
.queue-chip > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.runtime-popover :is(input, select) { font-size: var(--fs-16); }
.branch-position input { min-height: var(--tap); }
.workflow-agent-actions button, .workflow-load-earlier { min-height: var(--tap); }
.context-chip { max-width: 100%; white-space: normal; text-align: left; }
.message-more:focus-visible { outline: 2px solid var(--focus); }

/* Picked project files sit inside the composer like attached files: padded off its
   rounded edge, each with the same 44 px remove control. */
.project-file-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 12px 0; }
.project-file-chip { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; border: 1px solid var(--line); border-radius: 12px; padding: 3px 8px; font-size: var(--fs-12); }
.project-file-chip > span { overflow-wrap: anywhere; min-width: 0; }
.project-file-chips .project-file-chip { min-height: 44px; padding: 0 0 0 10px; border-radius: var(--r-12); background: var(--surface-strong); font-size: var(--fs-14); }
.project-file-chip button { flex-shrink: 0; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--muted, inherit); font-size: var(--fs-20); line-height: 1; }
.project-file-chip button:hover, .project-file-chip button:focus-visible { background: var(--surface-strong); color: var(--text); }
.project-file-picker { border: 1px solid var(--line); border-radius: 12px; padding: 8px; margin-bottom: 6px; }
.project-file-search { display: flex; gap: 6px; }
.project-file-search input { flex: 1; min-width: 0; font-size: var(--fs-16); }
.project-file-search { align-items: center; }
.project-file-search .icon-button { flex: none; }
.project-file-picker p { margin: 6px 0; font-size: var(--fs-14); color: var(--muted); }
.project-file-results { max-height: min(26dvh, 220px); overflow-y: auto; }
/* Plain list rows, like the other pickers: no button chrome. */
.project-file-results button { display: block; width: 100%; min-height: 44px; margin: 0; padding: 10px 8px; border: 0; border-radius: var(--r-8, 8px); background: none; color: var(--text); font: inherit; font-size: var(--fs-16); text-align: left; overflow-wrap: anywhere; cursor: pointer; }
.project-file-results button:hover { background: var(--hover); }
.project-file-results button[aria-selected="true"] { background: var(--surface-strong); }
.project-file-results button:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
/* The list that opens as you type '/': the command, then what it does. */
.slash-suggestions .project-file-results button { display: flex; align-items: baseline; gap: var(--sp-2); overflow-wrap: normal; }
.slash-suggestions .slash-name { flex: none; font-weight: var(--fw-strong); }
.slash-suggestions .slash-text { min-width: 0; color: var(--muted); font-size: var(--fs-14); }
/* /help: the same rows, the whole list in its sheet. */
.slash-help .project-file-results { max-height: none; }
.slash-help h3 { margin: var(--sp-3) 0 var(--sp-1); font-size: var(--fs-14); color: var(--muted); font-weight: var(--fw-strong); }

/* Helpers under the answer that started them: one plain row each. */
.helper-strip { margin: 10px 0 2px; }
.helper-rows { display: grid; }
.helper-row + .helper-row { border-top: 1px solid color-mix(in srgb, var(--line) 65%, transparent); }
.helper-head { width: 100%; min-height: 44px; display: grid; grid-template-columns: 7px minmax(0, 1fr) auto; align-items: start; gap: 10px; padding: 8px 0; border: 0; background: none; color: var(--text); text-align: left; font: inherit; cursor: pointer; }
.helper-head > .agent-state { margin-top: 7px; }
.helper-head:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: var(--r-8); }
.main-ai-head { cursor: default; }
.helper-text { min-width: 0; display: grid; gap: 2px; }
.helper-line { min-width: 0; display: flex; gap: 6px; align-items: baseline; font-size: var(--fs-12); line-height: 1.45; }
.helper-name { flex: none; max-width: 45%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: var(--fw-strong); }
.helper-task { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.helper-now { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); font-size: var(--fs-14); line-height: 1.45; }
.helper-state { color: var(--muted); font-size: var(--fs-14); line-height: 1.45; white-space: nowrap; }
.helper-state.failed { color: var(--danger); }
.helper-row.queued .agent-state { background: var(--faint); }
.helper-detail { display: grid; gap: 8px; padding: 0 0 10px 17px; font-size: var(--fs-14); }
.helper-task-full { margin: 0; color: var(--muted); white-space: pre-wrap; overflow-wrap: anywhere; }
.helper-detail .workflow-agent-trail { display: grid; gap: 4px; }
.helper-fold { min-height: 44px; display: inline-flex; align-items: center; gap: 6px; padding: 0; border: 0; background: none; color: var(--muted); font: inherit; font-size: var(--fs-14); cursor: pointer; }
.helper-fold svg { width: 14px; height: 14px; transition: transform .15s ease; }
.helper-fold[aria-expanded="true"] svg { transform: rotate(180deg); }
.helper-detail .workflow-agent-trail { margin: 0; padding: 0; border: 0; }
.helper-detail .workflow-trail-row { padding: 6px 0; border: 0; border-radius: 0; background: none; font-size: var(--fs-14); }
/* The Checker's own report, at the top of its opened row. */
.checker-report { display: grid; gap: 4px; padding: 0 0 6px; }
.checker-report p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--text); }
.helper-detail .workflow-trail-row + .workflow-trail-row { border-top: 1px solid color-mix(in srgb, var(--line) 65%, transparent); }
.helper-detail .workflow-agent-controls { margin: 0; padding: 0; border: 0; background: none; }
/* One line per step inside an opened helper: what it did, then when. */
.helper-detail .workflow-trail-row { display: flex; align-items: baseline; gap: 8px; }
.helper-detail .workflow-trail-row > strong, .helper-detail .workflow-trail-row > small { display: none; }
.helper-detail .workflow-trail-row.steer > strong { display: inline; flex: none; }
.helper-detail .workflow-trail-row > span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.helper-detail .workflow-trail-row > time { flex: none; color: var(--muted); }
/* A saved answer that is still loading: three quiet grey lines. */
.answer-skeleton { display: grid; gap: 8px; padding: 4px 0; }
.answer-skeleton span { display: block; height: 10px; border-radius: 5px; background: currentColor; opacity: .1; animation: answer-skeleton 1.4s ease-in-out infinite; }
.answer-skeleton span:nth-child(2) { width: 86%; }
.answer-skeleton span:nth-child(3) { width: 58%; }
@keyframes answer-skeleton { 50% { opacity: .18; } }
.legacy-saved { display: grid; gap: var(--sp-1); justify-items: start; }
.legacy-saved-text { overflow-wrap: anywhere; }
.legacy-saved-text > :first-child { margin-top: 0; }
/* Folded: about six lines of the formatted reply. */
.legacy-saved-text.folded { max-height: 9.5em; overflow: hidden; }
.legacy-saved-note { margin: 0; font-size: var(--fs-12, 12px); }
.legacy-saved-more { min-height: var(--tap); padding: 0; border: 0; background: none; color: var(--muted); font: inherit; font-size: var(--fs-14); text-decoration: underline; cursor: pointer; }
@media (prefers-reduced-motion: reduce) { .answer-skeleton span { animation: none; } }
/* Try again reads as a link in the sentence, never a grey system button. */
.answer-load-failed .link-button { min-height: var(--tap); padding: 0; border: 0; background: none; color: var(--accent); font: inherit; font-weight: var(--fw-strong); cursor: pointer; }
/* A very long message shows its start; "Show all" loads the rest. */
.message-cut-note { margin: 6px 0 0; font-size: var(--fs-14); }
.message-cut-note .link-button { min-height: var(--tap); padding: 0; border: 0; background: none; color: var(--accent); font: inherit; font-weight: var(--fw-strong); cursor: pointer; }
/* A chat's open requests: one line each, tap the text to read it all. */
.owes-list { display: grid; }
.owes-item { min-width: 0; display: flex; align-items: center; gap: var(--sp-2); min-height: var(--tap); padding: 6px 0; border-bottom: 1px solid var(--line); }
.owes-item:last-child { border-bottom: 0; }
.owes-main { flex: 1 1 auto; min-width: 0; }
.owes-kind { display: block; color: var(--muted); font-size: var(--fs-12); }
.owes-text { margin: 0; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow-wrap: anywhere; font-size: var(--fs-14); line-height: 1.45; cursor: pointer; }
.owes-text.is-open { display: block; white-space: pre-wrap; }
.owes-item:not(.open) .owes-text { color: var(--muted); }
.owes-action { flex: 0 0 auto; min-height: var(--tap); white-space: nowrap; }
.owes-item .chat-decision-controls { flex: 0 0 auto; display: flex; gap: 6px; }
.owes-empty { margin: var(--sp-2) 0; }
.owes-done { margin-top: var(--sp-3); }

/* ==========================================================================
   The job, pinned at the top of a chat (ui4). The ask, one plain "now" line,
   then one quiet Details row that holds the goal, to-dos, plan, queue and
   delegated tasks. Phone first: everything wraps, nothing scrolls sideways.
   ========================================================================== */
.chat-context:has(> #job-pin:not(.hidden)) { display: block; }
.job-pin { width: 100%; min-width: 0; padding: var(--sp-2) 0 0; border-bottom: 1px solid var(--line); }
.job-pin.hidden { display: none; }
.job-head { display: grid; gap: 2px; }
.job-ask-text { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.job-ask[aria-expanded="true"] .job-ask-text { display: block; -webkit-line-clamp: unset; }
.job-ask { width: 100%; min-height: 48px; display: block; padding: 6px 0; border: 0; background: none; color: var(--text); font: inherit; font-size: var(--fs-16); font-weight: var(--fw-strong); line-height: 1.4; text-align: left; overflow-wrap: anywhere; cursor: pointer; }
.job-ask[aria-expanded="true"] { max-height: 40dvh; overflow-y: auto; font-weight: var(--fw-regular); }
.job-ask[hidden], .job-now[hidden], .job-details[hidden] { display: none; }
.job-now { width: 100%; min-height: 48px; display: flex; align-items: flex-start; gap: 10px; padding: 6px 0; border: 0; background: none; color: var(--text); font: inherit; font-size: var(--fs-14); line-height: 1.45; text-align: left; overflow-wrap: anywhere; cursor: pointer; }
.job-now-dot { flex: none; width: 8px; height: 8px; margin-top: 6px; border-radius: 50%; background: var(--accent); }
.job-now[data-tone="working"] .job-now-dot { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 45%, transparent); animation: activity-pulse 1.6s ease-out infinite; }
.job-now[data-tone="waiting"] .job-now-dot { background: var(--faint); }
.job-now[data-tone="needs"] .job-now-dot, .job-now[data-tone="stopped"] .job-now-dot { background: var(--warning); }
.job-now[data-tone="done"] .job-now-dot { background: var(--success); }
.job-now[data-tone="done"] { color: var(--muted); }
.job-now:focus-visible, .job-ask:focus-visible, .job-details-toggle:focus-visible, .job-detail-row:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: var(--r-8); }
.job-details-toggle { width: 100%; min-height: 48px; display: flex; align-items: center; gap: 8px; padding: 0; border: 0; background: none; color: var(--muted); font: inherit; font-size: var(--fs-14); text-align: left; cursor: pointer; }
.job-pin:not(.is-job) .job-details-toggle { min-height: 44px; }
.job-details-label { flex: none; color: var(--text); }
.job-details-meta { min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.job-details-toggle svg { flex: none; width: 16px; height: 16px; transition: transform .15s ease; }
.job-details-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
.job-details-body { display: grid; gap: var(--sp-2); max-height: min(46dvh, 420px); overflow-y: auto; overscroll-behavior: contain; padding-bottom: var(--sp-3); background: var(--bg); }
/* One scroller only: with the job pinned, the opened Details is the part that
   scrolls, inside its own opaque box. The chat context no longer caps and
   clips it a second time (two nested scrollers cut the goal off mid-line and
   hid its buttons below the fold). */
.chat-context:has(> #job-pin:not(.hidden)) { max-height: none; overflow: visible; position: relative; z-index: 2; background: var(--bg); }
@media (max-width: 800px) { .job-details-body { max-height: min(38dvh, 340px); } }
.job-details-body[hidden] { display: none; }
.job-details-body > .goal-banner { flex: none; width: 100%; }
.job-details-body > .chat-actions, .job-details-body > .cross-chat-delegations, .job-details-body > .queue { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.job-details-body > :is(.chat-actions, .cross-chat-delegations, .queue, .agent-plan).hidden { display: none; }
.job-details-body > .agent-plan { margin: 0; border: 1px solid var(--line); border-radius: var(--r-12); background: var(--surface); }
.job-detail-extras { display: grid; }
.job-detail-extras:empty { display: none; }
.job-detail-row { min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 var(--sp-3); border: 0; border-top: 1px solid var(--line); background: none; color: var(--text); font: inherit; font-size: var(--fs-14); text-align: left; cursor: pointer; }
.job-detail-row small { min-width: 0; overflow: hidden; color: var(--muted); font-size: var(--fs-14); text-overflow: ellipsis; white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { .job-now[data-tone="working"] .job-now-dot { animation: none; } }

/* ---------- Under each answer: one calm fold, helpers live ----------
   A closed fold is one quiet text line ("Details · 6 steps ›"). Opened, it
   is ONE flat panel: plain rows split by hairlines, no boxes, no outlines,
   no label columns; technical bits folded at the very bottom. Helpers that
   are still at work sit under the answer, one line each, with a breathing
   --live dot; finished ones are rows inside the panel. */
.message-outcome { gap: var(--sp-3); margin-top: var(--sp-2); }
.work-details-toggle { min-height: 44px; max-width: 100%; min-width: 0; display: inline-flex; align-items: center; gap: 6px; padding: 0; border: 0; background: none; color: var(--ink3); font: inherit; font-size: var(--fs-14); line-height: 1.4; text-align: left; cursor: pointer; }
.work-details-toggle[hidden] { display: none; }
.work-details-toggle:hover .work-details-word, .work-details-toggle:focus-visible .work-details-word { color: var(--ink2); }
.work-details-toggle:focus-visible { outline: 2px solid var(--focus, var(--ink3)); outline-offset: 3px; border-radius: 4px; }
.work-details-word { flex: none; color: var(--ink3); }
.work-details-meta { min-width: 0; color: var(--ink3); }
.work-details-meta::before { content: '·'; margin-right: 6px; }
.work-details-caret { flex: none; color: var(--ink3); transition: transform .15s ease; }
.work-details-toggle[aria-expanded="true"] .work-details-caret { transform: rotate(90deg); }
.turn-details { margin-top: 2px; padding: 0; display: grid; gap: 0; border: 0; border-radius: 0; background: none; font-size: var(--fs-14); line-height: 1.5; }
.turn-details[hidden] { display: none; }
.turn-details > :not(.turn-technical):not(:empty) + :not(:empty) { border-top: 1px solid var(--hair); }
.turn-details > .turn-technical { border-top: 1px solid var(--hair); padding-top: 0; }
/* Saved status (Progress / Next / Current work): plain rows, the label quiet above its sentence. */
.turn-details .assistant-public-card { margin: 0; border: 0; border-radius: 0; background: none; overflow: visible; }
.turn-details .assistant-public-section { display: block; padding: 10px 0; }
.turn-details .assistant-public-section + .assistant-public-section { border-top: 1px solid var(--hair); }
.turn-details .assistant-public-section > strong { display: block; color: var(--ink3); font-size: var(--fs-13); font-weight: var(--fw-regular); }
.turn-details .assistant-public-section > p { color: var(--ink); font-size: var(--fs-14); }
.turn-details .assistant-public-section > .assistant-open-actions { margin-top: 6px; }
.turn-details .work-details-status > :not(:empty) + :not(:empty) { border-top: 1px solid var(--hair); }
/* A failed status reads as plain words too: no red rule, no tint. */
.turn-details .assistant-public-card .assistant-public-section { border-left: 0; background: none; }
.turn-details .assistant-public-card .assistant-public-section > strong { color: var(--ink3); }
.turn-details .assistant-public-card-failed .public-status > p { font-weight: var(--fw-regular); }
.turn-details .work-outcome { display: block; max-width: none; padding: 10px 0; border: 0; border-radius: 0; background: none; }
.turn-details .work-outcome strong { display: block; color: var(--ink3); font-size: var(--fs-13); font-weight: var(--fw-regular); }
.turn-details .work-outcome p { margin: 0; color: var(--ink); }
/* Plain rows: Files changed, helpers summary, other chats helping. */
.turn-detail-row { width: 100%; min-height: 48px; display: flex; align-items: center; gap: 10px; margin: 0; padding: 8px 0; border: 0; border-radius: 0; background: none; color: var(--ink); font: inherit; font-size: var(--fs-14); text-align: left; cursor: pointer; }
.turn-detail-row:hover .turn-detail-title, .turn-detail-row:focus-visible .turn-detail-title { text-decoration: underline; text-decoration-color: var(--hair2, var(--hair)); text-underline-offset: 3px; }
.turn-detail-row:focus-visible { outline: 2px solid var(--focus, var(--ink3)); outline-offset: 2px; }
.turn-detail-title { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.turn-detail-meta { flex: none; color: var(--ink3); }
.turn-detail-caret { flex: none; color: var(--ink3); }
.turn-files-slot { display: block; }
.turn-details > .self-check-note { margin: 0; padding: 10px 0; color: var(--ink3); }
.turn-details > .turn-files-slot { justify-self: stretch; }
.turn-details > .turn-files-slot:empty { display: none; }
/* Steps: one sentence each, a quiet icon, a status word only when it matters. */
.turn-details .work-details-feed:empty { display: none; }
.turn-details .live-activity-feed { padding: 0; border: 0; gap: 0; }
.turn-details .live-activity-feed > * + *:not(.activity-load-more) { border-top: 1px solid var(--hair) !important; }
.turn-details .live-activity-row { display: flex; align-items: baseline; gap: 10px; padding: 10px 0; color: var(--ink); font-size: var(--fs-14); }
.turn-details .live-activity-row .activity-text { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.turn-details .tool-activity-row > summary { grid-template-columns: 18px minmax(0,1fr) auto; min-height: 44px; padding: 8px 0; color: var(--ink); font-size: var(--fs-14); }
.turn-details .tool-icon { width: 18px; height: 18px; background: none; color: var(--ink3); }
.turn-details .tool-icon svg { width: 14px; height: 14px; }
.turn-details .tool-status, .helper-detail .tool-status { color: var(--ink3); font-size: var(--fs-13); text-transform: none; }
.turn-details .tool-status.failed, .turn-details .tool-status.limited { color: var(--ink2); }
.turn-details .tool-status.running { color: var(--live); }
.turn-details .tool-activity-row.failed .tool-icon { color: var(--ink2); }
.turn-details .live-activity-feed > .activity-load-more { justify-self: start; min-height: 44px; margin: 0; padding: 0; border: 0; background: none; box-shadow: none; color: var(--ink3); font-size: var(--fs-14); }
.turn-details .tool-activity-detail { padding: 0 0 10px 28px; }
/* Technical: last, folded, quiet. */
.turn-details .turn-technical > summary { min-height: 44px; color: var(--ink3); font-size: var(--fs-13); }
.turn-details .turn-technical > summary::after { color: var(--ink3); font-size: var(--fs-16); }
.turn-details .turn-technical-body, .turn-details .turn-technical-line { color: var(--ink3); font-size: var(--fs-13); }
.turn-details .turn-technical .turn-technical-body > .secondary { min-height: 40px; padding: 0; border: 0; background: none; color: var(--ink3); font-size: var(--fs-13); }
.turn-details .response-usage > summary { min-height: 40px; color: var(--ink3); font-size: var(--fs-13); }

/* Helpers: a dot, the name and task, then what it is doing or found. */
.helper-strip { margin: 0; }
.helper-strip.helper-live { margin: var(--sp-3) 0 0; }
.helper-live-head { margin: 0 0 2px; color: var(--ink3); font-size: var(--fs-13); }
.helper-rows { display: grid; }
.helper-row + .helper-row { border-top: 1px solid var(--hair); }
.helper-head { width: 100%; min-height: 48px; display: grid; grid-template-columns: 8px minmax(0, 1fr) auto; align-items: start; gap: 12px; padding: 10px 0; border: 0; background: none; color: var(--ink); text-align: left; font: inherit; cursor: pointer; }
.helper-dot { width: 8px; height: 8px; margin-top: 7px; border-radius: 50%; background: var(--ink3); opacity: .55; }
.helper-dot.running { background: var(--live); opacity: 1; animation: hz-breathe var(--breathe, 2.8s) ease-in-out infinite; }
.helper-dot.queued { background: transparent; box-shadow: inset 0 0 0 1.5px var(--ink3); }
.helper-text { min-width: 0; display: grid; gap: 1px; }
.helper-line { min-width: 0; display: flex; gap: 6px; align-items: baseline; font-size: var(--fs-14); line-height: 1.45; }
.helper-name { flex: none; max-width: 45%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: var(--fw-strong); }
.helper-dept { flex: none; color: var(--ink3); font-size: var(--fs-13); }
.helper-task { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink3); }
/* The reason or current step may take two lines on a phone. Opened, a working
   helper's step shows in full; a finished one's reason moves into the detail. */
.helper-now { min-width: 0; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; white-space: normal; overflow-wrap: anywhere; color: var(--ink2); font-size: var(--fs-14); line-height: 1.45; }
.helper-now[hidden] { display: none; }
.helper-row.running > .helper-head[aria-expanded="true"] .helper-now { display: block; -webkit-line-clamp: unset; }
.helper-row:not(.running):not(.queued) > .helper-head[aria-expanded="true"] .helper-now { display: none; }
.helper-row.running .helper-now { color: var(--ink); }
.helper-state { align-self: start; margin-top: 1px; color: var(--ink3); font-size: var(--fs-13); line-height: 1.45; white-space: nowrap; }
.helper-state.failed, .helper-state.problems, .helper-state.not_checked { color: var(--ink2); }
.helper-row.running .helper-state { display: none; }
.helper-live .helper-row.queued .helper-state { color: var(--ink3); }
.helper-detail { display: grid; gap: 8px; padding: 0 0 12px 20px; font-size: var(--fs-14); }
.helper-note-full { margin: 0; color: var(--ink); white-space: pre-wrap; overflow-wrap: anywhere; }
.helper-task-full { margin: 0; color: var(--ink3); white-space: pre-wrap; overflow-wrap: anywhere; }
.helper-detail .workflow-agent-trail { display: grid; gap: 0; margin: 0; padding: 0; border: 0; }
.helper-detail .workflow-trail-list { gap: 0; }
.helper-detail .workflow-trail-row { display: flex; align-items: baseline; gap: 8px; padding: 8px 0; border: 0; border-radius: 0; background: none; color: var(--ink2); font-size: var(--fs-14); }
.helper-detail .workflow-trail-row + .workflow-trail-row { border-top: 1px solid var(--hair); }
.helper-detail .workflow-trail-row > time { color: var(--ink3); font-size: var(--fs-13); }
.helper-detail .workflow-load-earlier { justify-self: start; min-height: 40px; padding: 0; border: 0; background: none; color: var(--ink3); }
.helper-detail .workflow-agent-controls textarea { border: 0; background: var(--raise); }
/* The Checker opened: its problems as a short plain list, the full report folded. */
.checker-report { display: grid; gap: 6px; padding: 0 0 4px; }
.checker-report[hidden] { display: none; }
.checker-problems { margin: 0; padding-left: 18px; display: grid; gap: 4px; color: var(--ink); }
.checker-problems li { overflow-wrap: anywhere; }
.checker-full-report > summary { min-height: 40px; display: flex; align-items: center; gap: 6px; color: var(--ink3); font-size: var(--fs-14); cursor: pointer; list-style: none; }
.checker-full-report > summary::-webkit-details-marker { display: none; }
.checker-full-report > summary::after { content: '›'; transition: transform .15s ease; }
.checker-full-report[open] > summary::after { transform: rotate(90deg); }
.checker-full-body { color: var(--ink2); font-size: var(--fs-14); overflow-wrap: anywhere; }
.checker-full-body h1, .checker-full-body h2, .checker-full-body h3, .checker-full-body h4 { margin: 10px 0 4px; font-size: var(--fs-14); font-weight: var(--fw-strong); }
.checker-full-body p, .checker-full-body ul, .checker-full-body ol { margin: 4px 0; }
.checker-full-body code { font-size: .92em; }
/* The last finished answer, when it is further up: one quiet line, no box. */
.latest-completed-result { display: flex; flex-wrap: wrap; align-items: center; column-gap: var(--sp-2); padding: 0; border: 0; background: none; box-shadow: none; color: var(--muted); font-size: var(--fs-14); line-height: 1.5; }
.latest-completed-result[hidden] { display: none; }
.latest-completed-jump { min-height: var(--tap); padding: 0; border: 0; border-radius: 0; background: none; color: var(--accent); font-size: var(--fs-14); font-weight: var(--fw-strong); white-space: normal; }
.message.unfinished-run { min-width: 0; max-width: 100%; }
.message.unfinished-run .message-content, .message.unfinished-run .message-body { min-width: 0; max-width: 100%; }
.unfinished-run-line { margin: 0; color: var(--muted); font-size: var(--fs-14); line-height: 1.5; overflow-wrap: anywhere; }
.unfinished-run-reason { overflow-wrap: anywhere; }
.unfinished-run-again { min-height: var(--tap); padding: 0; border: 0; background: none; color: var(--accent); font: inherit; font-size: inherit; font-weight: var(--fw-strong); white-space: nowrap; cursor: pointer; }
.unfinished-run-again[hidden], .unfinished-run-action[hidden] { display: none; }
.unfinished-run-older { min-width: 0; max-width: 100%; margin-top: 2px; }
.unfinished-run-older > summary { min-height: var(--tap); display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: var(--fs-14); cursor: pointer; list-style: none; }
.unfinished-run-older > summary::-webkit-details-marker { display: none; }
.unfinished-run-older > summary::after { content: '›'; flex: none; color: var(--muted); }
.unfinished-run-older[open] > summary::after { content: '⌄'; }
.unfinished-run-older .message { max-width: 100%; min-width: 0; }
@media (prefers-reduced-motion: reduce) { .helper-dot.running { animation: none; } }

/* ---------- Pictures the AI made: phone size first, full screen on tap ---------- */
.message-attachments:has(> .snapshots) { display: flex; flex-direction: column; align-items: stretch; }
.snapshots { width: 100%; display: flex; flex-wrap: wrap; gap: 10px; margin: 6px 0; }
.snapshots.only-note { margin: 2px 0; }
.snapshot { position: relative; flex: 1 1 100%; min-width: 0; padding: 0; overflow: hidden; border: 1px solid var(--line); border-radius: var(--r-12); background: var(--surface); cursor: zoom-in; }
.snapshot[hidden] { display: none; }
.snapshot img { display: block; width: 100%; height: auto; max-height: min(70dvh, 560px); object-fit: cover; object-position: top; background: var(--media-bg); }
.snapshot[data-state="loading"] img { min-height: 120px; }
.snapshot.is-tall { flex: 1 1 100%; max-width: 420px; }
.snapshot.is-wide { flex: 1 1 calc(50% - 5px); max-width: calc(50% - 5px); }
.snapshot.is-wide img { max-height: 200px; }
@media (min-width: 900px) { .snapshot.is-tall { flex: 0 1 300px; } .snapshot.is-wide { flex: 1 1 360px; max-width: 520px; } .snapshot.is-wide img { max-height: 320px; } }
.snapshot-label { position: absolute; left: 8px; bottom: 8px; padding: 2px 8px; border-radius: 999px; background: color-mix(in srgb, var(--bg) 88%, transparent); color: var(--muted); font-size: var(--fs-12); }
.snapshot-label:empty { display: none; }
.snapshot:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.snapshot-more { min-height: 48px; padding: 0 14px; border: 1px solid var(--line); border-radius: var(--r-12); background: none; color: var(--text); font: inherit; font-size: var(--fs-14); cursor: pointer; }
.snapshot-more[hidden] { display: none; }
.snapshot-note { flex: 1 1 100%; margin: 0; color: var(--muted); font-size: var(--fs-14); line-height: 1.45; }
.snapshot-note[hidden] { display: none; }
.image-viewer { position: fixed; inset: 0; z-index: 1000; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; background: var(--bg); color: var(--text); padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }
.image-viewer-head { min-height: 56px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 8px 0 16px; border-bottom: 1px solid var(--line); }
.image-viewer-heading { min-width: 0; display: flex; align-items: baseline; gap: 10px; }
.image-viewer-count { color: var(--muted); font-size: var(--fs-14); }
.image-viewer-close { width: 48px; height: 48px; }
.image-viewer-stage { min-height: 0; overflow: auto; overscroll-behavior: contain; touch-action: pan-x pan-y pinch-zoom; display: grid; place-items: start center; padding: 12px; }
.image-viewer-stage img { display: block; max-width: 100%; height: auto; cursor: zoom-in; }
.image-viewer.actual .image-viewer-stage img { max-width: none; cursor: zoom-out; }
.image-viewer-foot { display: flex; justify-content: space-between; gap: 12px; padding: 8px 16px; border-top: 1px solid var(--line); }
.image-viewer-step { min-height: 48px; min-width: 112px; }

/* ---------- Waiting for you: grouped, and each item opens before any yes ---------- */
.todo-sheet .sheet-section-title { margin: 8px 0 0; color: var(--muted); font-size: var(--fs-12); font-weight: var(--fw-strong); letter-spacing: .02em; }
.todo-sheet .chat-action { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.todo-sheet .chat-action > div { min-width: 0; }
.todo-sheet .chat-action strong { display: block; overflow-wrap: anywhere; }
.chat-action-reason { margin: 2px 0 0; color: var(--muted); font-size: var(--fs-14); display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.chat-action-open { flex: none; min-height: 48px; min-width: 88px; }
.chat-action-review { display: grid; gap: 12px; }
.chat-action-review p { margin: 0; overflow-wrap: anywhere; }
.review-block { display: grid; gap: 4px; padding: 12px; border: 1px solid var(--line); border-radius: var(--r-12); background: var(--surface); }
.review-label { color: var(--muted); font-size: var(--fs-12); font-weight: var(--fw-strong); }

.made-files { flex: 1 1 100%; }
.made-files > summary { min-height: 48px; display: flex; align-items: center; color: var(--muted); font-size: var(--fs-14); cursor: pointer; }
.made-files > .message-attachments { margin-top: 4px; }
.job-pin.details-open { padding-bottom: var(--sp-2); box-shadow: 0 6px 12px -10px color-mix(in srgb, var(--text) 30%, transparent); }
.still-pick-missing { display: block; padding: 16px 12px; color: var(--muted); font-size: var(--fs-14); text-align: left; }

/* The one-time notification offer: one compact row above the message box,
   never in the header over the conversation. */
.push-offer { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: var(--sp-2); margin: var(--sp-1) 0; padding: var(--sp-1) var(--sp-1) var(--sp-1) var(--sp-3); border: 1px solid var(--line); border-radius: var(--r-12); background: var(--surface); }
.push-offer p { min-width: 0; margin: 0; color: var(--text-2); font-size: var(--fs-14); line-height: 1.35; }
.push-offer-actions { display: flex; gap: 4px; }
.push-offer-actions button { min-height: 40px; padding-inline: var(--sp-2); }

/* SEAN's home: something waits for the owner, with its count. */
.sean-waiting { display: inline-flex; align-items: center; gap: var(--sp-2); min-height: var(--tap); padding: 0 var(--sp-3); border: 1px solid var(--need); border-radius: var(--r-pill); background: var(--need-bg); color: var(--text); font: inherit; font-size: var(--fs-14); cursor: pointer; }
.sean-waiting.hidden { display: none; }
.sean-waiting-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--need); }
.sean-waiting-count { font-weight: var(--fw-strong); }
.sean-fresh-earlier { display: flex; flex-direction: column; align-items: stretch; gap: var(--sp-2); }
/* Earlier talk: one quiet row at the top that says when and how many. */
.sean-earlier-fold { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; min-height: var(--tap); padding: 0 var(--sp-3); border: 1px solid var(--line); border-radius: var(--r-pill); color: var(--ink3); font-size: var(--fs-14); }
.sean-earlier-fold svg { width: 16px; height: 16px; fill: none; stroke: currentColor; }
/* A hairline with "Now": where the current conversation starts. */
.sean-now-rule { display: flex; align-items: center; gap: var(--sp-2); color: var(--ink3); font-size: var(--fs-12, 12px); }
.sean-now-rule::before, .sean-now-rule::after { content: ""; flex: 1; border-top: 1px solid var(--line); }

/* SEAN's everyday chips wrap onto a second line rather than run off the screen. */
#sean-everyday { flex-wrap: wrap; max-width: 100%; }
#sean-everyday > * { flex: 0 0 auto; }
/* "Since you last looked": one quiet line with its count, opening on a tap. */
.sean-notices { min-width: 0; max-width: 100%; grid-template-columns: minmax(0, 1fr); justify-items: stretch; }
.sean-notices-fold > summary { min-height: var(--tap); display: flex; align-items: center; gap: var(--sp-2); color: var(--muted); font-size: var(--fs-14); cursor: pointer; }
.sean-notices-count { min-width: 22px; height: 22px; padding: 0 6px; display: inline-grid; place-items: center; border-radius: var(--r-pill); background: var(--surface-strong); color: var(--text); font-size: var(--fs-12); font-weight: var(--fw-strong); }
.sean-notices-fold { min-width: 0; max-width: 100%; }
.sean-notices-fold[open] { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px; }
.sean-notices-fold > .sean-notice { min-width: 0; }
.sean-notices-fold > .subtle { justify-self: start; }
/* The Hub's own notes in a chat: an estate problem kept up to date, a moved
   chat, a task SEAN passed on. One quiet block, no AI reply furniture. */
.message.hub-note { display: flex; align-items: flex-start; gap: var(--sp-3); margin: 0 0 var(--sp-4); padding: 8px 12px; border-left: 3px solid var(--line); color: var(--text); font-size: var(--fs-14); }
.message.hub-note.is-critical { border-left-color: var(--danger); }
.message.hub-note.is-cleared { color: var(--muted); }
.hub-note-body { flex: 1; min-width: 0; }
.hub-note-line { margin: 0; overflow-wrap: anywhere; }
.hub-note-line + .hub-note-line { margin-top: 2px; }
.hub-note-when { color: var(--muted); }
.message.hub-note time { color: var(--muted); font-size: var(--fs-12); white-space: nowrap; }
/* A 44px tap area from padding, cancelled by the margin, so the line stays its normal height. */
.hub-note-open { min-height: 0; padding: 12px 8px; margin: -12px -8px; border: 0; background: none; color: var(--accent); font-size: var(--fs-14); font-weight: var(--fw-strong); line-height: inherit; cursor: pointer; }
.message.hub-note[hidden] { display: none; }
.hub-note-row { display: flex; align-items: baseline; justify-content: space-between; gap: var(--sp-3); margin-top: 2px; }
.hub-note-row .hub-note-open { flex: none; }
.hub-note-detail { color: var(--muted); }
/* The Open link's enlarged tap area reaches 12px above its row: keep it off the detail line. */
.hub-note-line:has(.hub-note-detail) { margin-bottom: 12px; }
.message.hub-note-estate-status { color: var(--muted); }
.message.hub-note-tests { color: var(--muted); border-left-color: transparent; padding-block: 2px; font-size: var(--fs-12, .85em); }
.message.hub-note-tests.is-failed { color: var(--text); }
.hub-note-tests .hub-note-details > summary { cursor: pointer; overflow-wrap: anywhere; }
.hub-note-tests .hub-note-detail { white-space: pre-wrap; margin: 4px 0 0; }
.hub-note-output { margin: 6px 0 0; max-height: 240px; overflow: auto; white-space: pre-wrap; font-size: var(--fs-12, .85em); }
.message.hub-note-estate-status:is(.is-needs-you, .is-unchecked) { color: var(--text); }
.message.hub-note-estate-status .hub-note-row { margin-top: 0; }
.message.hub-note.is-known, .message.hub-note.is-cleared { color: var(--muted); }
.move-offer { margin-top: var(--sp-2); }
.move-group h3 { margin: var(--sp-3) 0 var(--sp-1); color: var(--muted); font-size: var(--fs-14); font-weight: var(--fw-strong); }
.legacy-tool-log p { margin: 2px 0; color: var(--muted); font-size: var(--fs-12); overflow-wrap: anywhere; }
/* Effort and Fast mode: one closed line on the model sheet that names the current choice. */
.runtime-popover .runtime-effort > summary span { color: var(--text); font-size: var(--fs-14); }
.runtime-popover .runtime-effort .runtime-effort-label { display: contents; }
.goal-steps { margin: 2px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; }
.goal-steps li { display: flex; flex-direction: column; }
.goal-steps .goal-step-text { color: var(--text); }
.goal-steps li.is-done .goal-step-text::before { content: "\2713  "; }
.goal-steps li.is-open .goal-step-text::before { content: "\25CB  "; }

/* ==========================================================================
   SEAN (home-chat.js): the place, Can wait, Your chats; and every chat drawn
   the SEAN way inside the zoom shell. Colours, type and space come only from
   tokens.css.
   ========================================================================== */
.sean-view { position: relative; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; scrollbar-width: none; background: var(--sky); }
.sean-view::-webkit-scrollbar { display: none; }
.sean-view.hidden { display: none; }
.sn-level .hz-sky { background: linear-gradient(var(--sky), var(--sky)); padding-bottom: 6px; }
.sn-level .hz-sea { background: none; }
.sn-level .hz-sentence { padding-left: var(--pad); }
.sn-level .hz-fold { padding-left: var(--pad); }
.sn-level .hz-fold .hz-t { width: auto; padding-right: 8px; justify-content: flex-start; }
.sn-place .hz-sky.is-glow { background: none; }
.sn-place .hz-fold { margin-top: 10px; padding-left: calc(var(--pad) - 14px); }
.sn-place .hz-fold .hz-t { width: auto; padding-right: 12px; color: var(--live); }

/* SEAN speaks: a small mark and its name over the sentence. */
.sn-who { display: flex; align-items: center; gap: 10px; padding: 10px var(--pad) 0; font-size: var(--fs-14); color: var(--ink3); }
.sn-mark { width: 22px; height: 22px; flex: none; border-radius: 52% 48% 50% 50% / 46% 53% 47% 54%; background: radial-gradient(circle at 34% 28%, var(--raise), var(--sun-soft) 80%); box-shadow: 0 2px 6px -2px var(--shade); }

/* The one decision sits on top of a small deck; the next one peeks out below it. */
.sn-deck { position: relative; margin: 22px var(--pad) 0; }
.sn-deck.has-more { padding-bottom: 4px; }
.is-sunup .sn-deck::before { content: ""; position: absolute; inset: -40px -20px; background: radial-gradient(55% 50% at 60% 40%, var(--sun-halo), transparent 72%); z-index: 0; pointer-events: none; }
.sn-deckcard { position: relative; z-index: 3; border-radius: 26px; background: var(--surface); box-shadow: var(--shadow); padding: 20px 20px 18px; }
.sn-deckcard .hz-decision { padding: 0; }
.sn-deckcard .hz-decision .hz-buoy, .sn-deckcard .hz-buoy { display: none; }
.sn-deckcard .hz-decision h3 { padding-right: 26px; }
.sn-deckcard .hz-decision p { max-width: none; }
.sn-deckcard .hz-ok { padding: 2px 0 2px 36px; }
.sn-deckcard .hz-ok .hz-okm { left: 0; top: 2px; }
.sn-deckcard .hz-more { margin: 6px 0 0 36px; }
.sn-quiet { margin: 0; color: var(--ink3); font-size: var(--fs-15); }
.sn-peek {
  position: relative; z-index: 2; display: flex; align-items: center; gap: 8px; flex-wrap: nowrap; width: calc(100% - 28px); margin: -18px 14px 0; padding: 30px 14px 14px 18px;
  border: 0; border-radius: 0 0 22px 22px; background: var(--sea); color: var(--ink); text-align: left;
}
.sn-peek .hz-chev { flex: none; align-self: center; margin-left: auto; }
.sn-pk-n { display: block; flex: 1; min-width: 0; overflow: hidden; font-size: var(--fs-14); color: var(--ink2); }
.sn-pk-c { display: flex; align-items: center; gap: 4px; margin-top: 4px; font-size: var(--fs-15); font-weight: var(--fw-strong); }

/* Your chats: kept here, the latest two as the owner's own bubbles. */
.sn-chats { margin: 22px var(--pad) 0; padding: 8px 0 4px; border-top: 0; }
.sn-ch-h { border-bottom: 0; box-shadow: none; }
.sn-ch-h + .sn-bub { border-top: 0; }
.sn-ch-h { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 44px; padding: 0; border: 0; background: none; color: inherit; text-align: left; }
.sn-ch-h h4 { margin: 0; font-size: var(--fs-17); font-weight: var(--fw-strong); }
.sn-ch-h small { flex: 1; font-size: var(--fs-14); color: var(--ink3); }
.sn-ch-h .hz-chev { align-self: center; }
.sn-bub {
  display: flex; align-items: center; gap: 8px; width: 100%; max-width: none; margin: 0; padding: 12px 0; border: 0; border-bottom: 1px solid var(--hair);
  border-radius: 0; background: none; color: var(--ink); font-size: var(--fs-16); line-height: 1.35; text-align: left;
}
.sn-bub-x { flex: 1; min-width: 0; }
.sn-bub .hz-chev { flex: none; align-self: center; width: 16px; height: 16px; color: var(--ink3); }
.sn-bub small { display: block; margin-top: 2px; font-size: var(--fs-12); color: var(--ink3); }
.sn-tools { display: flex; align-items: center; gap: 12px; width: calc(100% - 2 * var(--pad)); min-height: 56px; margin: 16px var(--pad) 0; padding: 12px 14px; border: 0; border-radius: 16px; background: var(--raise); box-shadow: var(--shadow-soft); color: var(--ink); font-size: var(--fs-16); font-weight: var(--fw-strong); text-align: left; }
.sn-tools > svg:first-child { width: 20px; height: 20px; color: var(--ink3); }
.sn-tools span { flex: 1; }
.sn-chats-row small { flex: none; font-size: var(--fs-14); color: var(--ink3); }
.sn-chats .sn-chats-row { width: 100%; margin: 0; }
.sn-push:empty { display: none; }
.sn-push { margin: 14px var(--pad) 0; }
.sn-push .push-offer { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 0; border: 0; background: none; box-shadow: none; }
.sn-push .push-offer p { flex: 1 1 220px; margin: 0; font-size: var(--fs-14); color: var(--ink3); }
.sn-push .push-offer .push-offer-actions { display: flex; gap: 4px; }
.sn-push .push-offer button { min-height: 44px; border: 0; border-radius: var(--r-btn); background: none; color: var(--ink2); font-size: var(--fs-15); }
.sn-ask { margin-top: 0; background: var(--sea2); }

/* Can wait and Your chats: detail levels with no line. */
.sn-wait .hz-sky, .sn-chatlist .hz-sky { padding-top: 14px; }
.sn-wait .sn-deck { margin-top: 4px; }
.sn-level .hz-head-flat .hz-sentence, .sn-level .hz-head-flat .sn-ptitle { padding-left: 0; padding-right: 0; }
.sn-level .hz-head-flat { padding-bottom: 18px; }
.sn-wait .hz-more { margin-left: var(--pad); }
.sn-ptitle { margin: 6px 0 4px; padding: 0 var(--pad); font-size: var(--fs-27); font-weight: var(--fw-light); line-height: 1.2; letter-spacing: var(--track-tight); }
.sn-rows { padding: 4px var(--pad) 0; }
.sn-rows .hz-plain { border-bottom: 1px solid var(--hair2); }
.sn-rows .hz-plain small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sn-rows .hz-more { margin-left: 0; }

/* A chat inside the zoom shell: the top bar says where you are, so the old
   header goes; one quiet line says its project and when (the ⋯ is in the top bar). */
.zoom-shell .chat-view { grid-template-rows: 0 auto minmax(0, 1fr) auto auto; }
.zoom-shell .chat-view > .topbar { display: none; }
.zoom-shell .chat-context { margin-top: 6px; }
.chat-kicker { flex-basis: 100%; display: flex; align-items: center; gap: 8px; min-height: 40px; font-size: var(--fs-14); color: var(--ink3); }
.chat-kicker.is-quiet { min-height: 0; }
.chat-kicker-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-kicker-tools { display: flex; align-items: center; gap: 4px; }
.chat-kicker-tools .icon-button { width: 40px; height: 40px; color: var(--ink3); }
.chat-kicker-tools .usage-chip.hidden { display: none; }
/* The chat's ⋯ lives in the fixed top bar, beside search, so it stays in reach
   at any scroll position; it shows only while a chat is open. */
.hub-where #thread-menu, .hub-top #thread-menu { width: 44px; height: 44px; flex: 0 0 auto; color: var(--ink2); margin-left: 2px; }
.shell:has(#chat-view.hidden) :is(.hub-top, .hub-where) #thread-menu { display: none; }
/* Your words in soft bubbles on the right; SEAN and the AI answer in a light reading weight, no bubble. */
.zoom-shell .message.user .message-body { padding: 11px 15px; border-radius: 20px 20px 6px 20px; background: var(--sea); color: var(--ink); }
.zoom-shell .messages .message.assistant :is(.assistant-answer-body, .assistant-draft-body) { font-family: var(--font-sans); font-size: var(--fs-17); font-weight: var(--fw-light); line-height: 1.55; color: var(--ink); }
.zoom-shell .messages .message.assistant :is(.assistant-answer-body, .assistant-draft-body) :is(strong, b, h1, h2, h3, h4) { font-weight: var(--fw-strong); }
.zoom-shell .message.assistant .message-meta { color: var(--ink3); }
/* SEAN's short answers read larger, as a sentence. */
.zoom-shell #chat-view.is-sean .message.assistant :is(.assistant-answer-body, .assistant-draft-body) { font-size: 20px; line-height: 1.45; }
.zoom-shell #chat-view.is-sean .message.assistant :is(.assistant-answer-body, .assistant-draft-body) :is(ul, ol, pre, table) { font-size: var(--fs-16); }

/* ==========================================================================
   The chat, rebuilt to the approved design (w10, 26 Oct). The chat's head
   (what it is, a job's title, its now line and Details) scrolls with the
   conversation; the ask is pinned as the first bubble; your words sit in soft
   bubbles with at most one small tag; answers are bare text in a light reading
   weight; AI Hub's own lines are quiet and centred, never your bubble.
   ========================================================================== */
/* The head now lives at the top of the message list (its grid row stays empty). */
#messages > .chat-context { width: auto; max-height: none; margin: 0 0 6px; overflow: visible; position: static; z-index: auto; background: none; }
#messages > .chat-context.is-parked { display: none !important; }
#messages > .chat-context:has(> #job-pin:not(.hidden)) { display: block; max-height: none; overflow: visible; position: static; background: none; }
.zoom-shell .chat-kicker { min-height: 32px; margin-top: 2px; font-size: var(--fs-14); color: var(--ink3); justify-content: center; text-align: center; }
#messages > .chat-context .chat-kicker-text { text-align: center; }
/* A job: its plain title, one now line, one quiet Details link. No rule, no box. */
.zoom-shell .job-pin { padding: 0; border: 0; }
.zoom-shell .job-head { gap: 0; }
.zoom-shell .job-ask { min-height: 0; padding: 2px 0 4px; font-size: 18px; font-weight: var(--fw-regular); line-height: 1.4; color: var(--ink); cursor: default; }
.zoom-shell .job-ask-text { -webkit-line-clamp: 3; }
.zoom-shell .job-now { min-height: 40px; padding: 4px 0; align-items: flex-start; gap: 10px; font-size: var(--fs-14); line-height: 1.45; color: var(--ink2); }
.zoom-shell .job-now-dot { width: 8px; height: 8px; margin-top: calc(.725em - 4px); flex: none; background: var(--live); }
.zoom-shell .job-now[data-tone="working"] .job-now-dot { animation: w10-breathe var(--breathe, 2.8s) ease-in-out infinite; box-shadow: none; }
.zoom-shell .job-now[data-tone="waiting"] .job-now-dot { background: none; box-shadow: inset 0 0 0 1.5px var(--ink3); }
.zoom-shell .job-now:is([data-tone="needs"], [data-tone="stopped"]) .job-now-dot { background: var(--sun); }
.zoom-shell .job-now[data-tone="done"] { color: var(--ink3); }
.zoom-shell .job-now[data-tone="done"] .job-now-dot { background: var(--ink3); }
@keyframes w10-breathe { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .45; transform: scale(.8); } }
.zoom-shell .job-details-toggle { min-height: 40px; width: auto; gap: 6px; color: var(--ink3); }
.zoom-shell .job-details-label { color: var(--ink2); }
.zoom-shell .job-details-meta { flex: 0 1 auto; }
.zoom-shell .job-details-toggle svg { width: 14px; height: 14px; color: var(--ink3); }
/* Details opened: flat plain lines with hairlines between, inside the scroll. */
.zoom-shell .job-details-body { max-height: none; overflow: visible; padding: 0 0 var(--sp-3); gap: 0; background: none; }
.zoom-shell .job-details-body > * { border-top: 1px solid var(--hair2); }
.zoom-shell .job-details-body > :is(.goal-banner, .agent-plan) { border: 0; border-top: 1px solid var(--hair2); border-radius: 0; background: none; }
.zoom-shell .job-details-body > :is(.chat-actions, .cross-chat-delegations, .queue) { padding: 8px 0; }
.zoom-shell .job-details-body .goal-line { padding: 0; border-radius: 0; }
.zoom-shell .job-details-body .agent-plan > summary { padding-inline: 0; }
.zoom-shell .job-details-body .agent-plan-body { max-height: none; padding-inline: 0; }
.zoom-shell .job-detail-extras { border-top: 0; }
.zoom-shell .job-detail-row { padding: 0; border-top: 1px solid var(--hair2); color: var(--ink); }
.zoom-shell .job-detail-row small { color: var(--ink3); }
/* On a phone the opened Details is a short box that scrolls inside itself.
   The flat rule above lifts every height limit (and outranks the phone cap
   on .job-details-body), so a goal, plan, queue and rows grew taller than the
   screen and pushed the conversation out of view. Phones only (narrow, or a
   phone on its side): a short desktop window keeps the flat panel. While it is
   open the head sticks to the top of the list with its title scrolled away
   (app.js measures that height), so Details and the box's own sticky Hide stay
   in reach however far the conversation scrolls; the box never drops below
   140 px, even on a phone on its side. */
@media (max-width: 800px), (max-height: 480px) and (orientation: landscape) {
  .zoom-shell .job-details-body { max-height: clamp(140px, 24dvh, 200px); overflow-y: auto; overscroll-behavior: contain; }
  .zoom-shell #messages > .chat-context:has(> #job-pin.details-open) { position: sticky; top: calc(-1 * var(--job-head-h, 0px)); z-index: 3; background: var(--bg); }
}

/* Your words: soft bubbles on the right, one small tag above when it matters. */
.zoom-shell .message.user { margin: 14px 0; }
.zoom-shell .message.user .message-content { max-width: 86%; }
.zoom-shell .message.user .message-body { padding: 11px 15px; border-radius: 20px; background: var(--sea); color: var(--ink); font-size: 15px; line-height: 1.45; }
.zoom-shell .message.user .message-body :is(p, ul, ol) { margin-block: 0 .4em; }
.zoom-shell .message.user .message-body > :last-child { margin-bottom: 0; }
.zoom-shell .message-tag { min-height: 0; justify-content: flex-end; margin: 0 0 4px; font-size: var(--fs-12); color: var(--ink3); }
.zoom-shell .message-tag > :first-child::before { content: none; }
.zoom-shell .message-tag .message-who { color: var(--ink3); font-weight: var(--fw-regular); }
.zoom-shell .pinned-ask-body { overflow-wrap: anywhere; }
.zoom-shell .pinned-ask-text { white-space: pre-line; }
/* The clamp sits on the text itself, inside the bubble's padding, so the fold ends exactly after line 6. */
.zoom-shell .pinned-ask-body.is-folded .pinned-ask-text { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 6; overflow: hidden; cursor: pointer; }
.zoom-shell .pinned-ask-text[role="button"]:focus-visible { outline: 2px solid var(--live); outline-offset: 2px; }
.zoom-shell .pinned-ask-brief { margin-top: 6px; }
.zoom-shell .pinned-ask-brief > summary { cursor: pointer; font-size: var(--fs-13); color: var(--ink3); }
.zoom-shell .pinned-ask-brief-text { margin-top: 6px; white-space: pre-line; font-size: 14px; color: var(--ink2); }

/* Answers: bare text in a light reading weight; a state word only when it matters. */
.zoom-shell .message.assistant { margin: 14px 0 20px; }
.zoom-shell .messages .message.assistant :is(.assistant-answer-body, .assistant-draft-body) { font-size: 18px; line-height: 1.5; font-weight: var(--fw-light); color: var(--ink); }
.zoom-shell .messages .message.assistant :is(.assistant-answer-body, .assistant-draft-body) :is(ul, ol, pre, table, blockquote) { font-size: var(--fs-16); }
.zoom-shell .message.assistant .message-meta { min-height: 0; margin: 0 0 6px; font-size: 13px; color: var(--ink3); }
.zoom-shell .message.assistant .message-meta > :first-child::before { content: none; }
.zoom-shell .message.assistant .message-status { font-weight: var(--fw-regular); color: var(--ink3); }
.zoom-shell .message.assistant .message-status.streaming, .zoom-shell .message.assistant .message-status.assistant-draft-label { color: var(--live); }
.zoom-shell .message.assistant .message-status:is(.failed, .interrupted) { color: var(--ink2); }
.zoom-shell .message.failed .message-body, .zoom-shell .message.failed.recoverable .message-body { color: var(--ink2); }
.zoom-shell .message.unfinished-run .unfinished-run-line { color: var(--ink3); }
@media (hover: hover) {
  .zoom-shell .message.assistant .message-more { position: absolute; top: -10px; right: -12px; margin: 0; }
}

/* AI Hub's own words in a chat: one quiet centred line, never your bubble. */
.message.hub-line { display: flex; justify-content: center; margin: 12px 0 16px; }
.hub-line-text { max-width: 86%; margin: 0; color: var(--ink3, var(--muted)); font-size: 13px; line-height: 1.4; text-align: center; overflow-wrap: anywhere; }
.hub-line-text time { white-space: nowrap; }
.hub-line-text time::before { content: '·'; margin: 0 6px; }
@media (prefers-reduced-motion: reduce) { .zoom-shell .job-now[data-tone="working"] .job-now-dot { animation: none; } }
/* A held message: the same quiet line, with a waiting dot so it reads as live. */
.message.hub-line.is-held .hub-line-text { color: var(--ink2); }
.hub-line-dot { display: inline-block; width: 7px; height: 7px; margin: 0 8px 1px 0; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--ink3); vertical-align: middle; }
.zoom-shell .job-details-meta:not(:empty)::before { content: "· "; }
/* Inside Details: no shadow box, and the job's state word in ink (amber is only the dot). */
.zoom-shell .job-pin.details-open { padding-bottom: 0; box-shadow: none; }
.zoom-shell .job-details-body .goal-line strong { color: var(--ink); font-weight: var(--fw-strong); }
.zoom-shell .job-details-body .goal-line svg { color: var(--ink3); }
.zoom-shell .job-details-body #goal-text { color: var(--ink2); }
/* A chat that no longer exists has nothing to type into. */
#chat-view.is-missing :is(.composer-wrap, .run-area) { display: none; }
/* A folded older reply fades out instead of cutting a line in half. */
.legacy-saved-text.folded { -webkit-mask-image: linear-gradient(#000 calc(100% - 2.2em), transparent); mask-image: linear-gradient(#000 calc(100% - 2.2em), transparent); }
/* Code words inside an answer are quiet: the same ink, a hint of tone, no chip. */
.zoom-shell .message.assistant .markdown :not(pre) > code { padding: 0 3px; border-radius: 4px; background: var(--hair2); color: var(--ink2); font-size: .82em; line-height: inherit; }
.zoom-shell .message.assistant .markdown pre { border: 0; border-radius: var(--r-block, 16px); background: var(--sea); }
/* AI Hub's own notes (a server problem, a moved chat): a soft block of tone,
   no coloured rule; a problem that needs the owner carries the sun dot only. */
.zoom-shell .message.hub-note { position: relative; margin: 12px 0 16px; padding: 12px 16px; border: 0; border-radius: var(--r-block, 16px); background: var(--sea); color: var(--ink); }
.zoom-shell .message.hub-note.is-critical { border: 0; padding-left: 30px; }
.zoom-shell .message.hub-note.is-critical::before { content: ''; position: absolute; left: 14px; top: 19px; width: 8px; height: 8px; border-radius: 50%; background: var(--sun); }
.zoom-shell .message.hub-note :is(.hub-note-detail, .hub-note-when, time) { color: var(--ink3); }
.zoom-shell .message.hub-note .hub-note-open { color: var(--live); }
.zoom-shell .message.hub-note:is(.is-cleared, .is-known), .zoom-shell .message.hub-note-estate-status, .zoom-shell .message.hub-note-tests { background: none; padding-inline: 0; color: var(--ink2); }
/* Updates stopped: one quiet line above the message box. */
.chat-connection { margin: 0 0 6px; color: var(--ink3, var(--muted)); font-size: 13px; text-align: center; }
/* ---------- The composer: one soft field like the ask bar ----------
   A quiet line above it holds the model chip ('Sonnet 5.5 ›'), or while
   work runs, where the next message goes. The field holds a small + on the
   left, the text, and ONE round button: the mic while empty, Send (an up
   arrow on the dark button) once there is text. */
.zoom-shell .composer-wrap { width: min(var(--chat-max), calc(100% - 2 * var(--gutter))); padding-bottom: calc(14px + var(--safe-bottom)); }
.zoom-shell .composer-bar { min-height: 30px; margin: 0 0 8px; flex-wrap: nowrap; justify-content: flex-start; gap: 6px; }
.zoom-shell .runtime-menu { flex: 0 1 auto; min-width: 0; margin-left: 0; }
.zoom-shell .runtime-menu.hidden { display: none; }
.zoom-shell .runtime-menu > summary { min-height: 36px; margin: -7px 0; padding: 0 12px; gap: 4px; border-radius: 18px; background: var(--raise); box-shadow: var(--shadow-soft); color: var(--ink2); font-size: var(--fs-14); font-weight: var(--fw-strong); }
.zoom-shell .runtime-menu > summary:hover, .zoom-shell .runtime-menu[open] > summary { background: none; color: var(--ink2); }
.zoom-shell .runtime-menu > summary .provider-light { display: none; }
.zoom-shell .runtime-menu > summary svg { width: 14px; height: 14px; transform: rotate(90deg); }
.zoom-shell .composer-wrap.run-active .runtime-menu { display: none; }
.composer-model-note { margin: 0 0 0 4px; padding: 6px 0; min-height: 32px; border: 0; background: none; color: var(--ink3); font: inherit; font-size: var(--fs-14); text-align: left; cursor: pointer; }
.composer-model-note::after { content: " ›"; }
.composer-model-note.is-warning { color: var(--need, var(--ink2)); }
/* SEAN's hand-off answers: one fix, one Approve; other options folded. */
.handoff-approve-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2) var(--sp-3); margin-top: var(--sp-3); }
.handoff-approve-row p { margin: 0; font-size: var(--fs-14); }
.handoff-other { margin-top: var(--sp-2); }
.handoff-other > summary { color: var(--ink3); cursor: pointer; min-height: var(--tap); display: flex; align-items: center; }
.handoff-fix-line { font-weight: var(--fw-strong); }
.hub-note-handoff .hub-note-details > summary { color: var(--ink3); font-size: var(--fs-14); cursor: pointer; }
.move-offer-why { margin: 0 0 var(--sp-2); color: var(--ink3); font-size: var(--fs-14); }
.composer-model-note.hidden { display: none; }
.zoom-shell .composer-bar .queue { margin-left: auto; }
.zoom-shell .composer-bar .queue-chip { min-height: 44px; margin-block: -7px; color: var(--ink3); }
/* While work runs: 'Adds to the current work · Send after instead'. */
.zoom-shell .delivery-toggle { flex: 0 1 auto; min-width: 0; min-height: 44px; margin: -7px 0 -7px -6px; padding: 0 10px; border: 0; border-radius: 22px; background: none; color: var(--ink3); font-size: var(--fs-14); font-weight: var(--fw-regular); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.zoom-shell .delivery-toggle.hidden { display: none; }
.zoom-shell .delivery-toggle[data-delivery="message"] { border: 0; background: none; }
.zoom-shell .delivery-toggle:hover { background: none; color: var(--ink2); }
.zoom-shell .delivery-toggle-value { color: var(--ink2); }
.zoom-shell .delivery-toggle-value::before { content: '·'; margin: 0 6px; color: var(--ink3); }
.zoom-shell .delivery-toggle-value.hidden { display: none; }
.zoom-shell .delivery-toggle:disabled { opacity: 1; cursor: default; }
/* The field. */
.zoom-shell .composer { border: 0; border-radius: 27px; background: var(--raise); box-shadow: var(--shadow); }
.zoom-shell .composer:focus-within { border: 0; box-shadow: var(--shadow); }
.zoom-shell .composer-row { min-height: 54px; padding: 5px 7px 5px 5px; gap: 0; align-items: flex-end; }
.zoom-shell #composer { min-height: 44px; padding: 11px 6px; font-size: var(--fs-16); line-height: 22px; color: var(--ink); background: none; }
.zoom-shell #composer::placeholder { color: var(--ink3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Each button keeps a 44px tap area; the dark Send circle drawn inside is 40px. */
.zoom-shell .composer .icon-button, .zoom-shell .composer .send, .zoom-shell .composer #mic-button, .zoom-shell .composer #attach-button { width: 44px; height: 44px; min-width: 44px; min-height: 44px; border-radius: 22px; }
.zoom-shell .composer #attach-button { color: var(--ink3); background: none; }
.zoom-shell .composer #attach-button svg { width: 20px; height: 20px; }
.zoom-shell .composer #mic-button { color: var(--ink2); background: none; }
.zoom-shell .composer #mic-button svg { width: 21px; height: 21px; }
.zoom-shell .composer #mic-button.recording { background: var(--danger); color: var(--on-danger); }
.zoom-shell .send { position: relative; background: none; color: var(--btn-ink); }
.zoom-shell .send::before { content: ''; position: absolute; inset: 2px; border-radius: 50%; background: var(--btn); }
.zoom-shell .send svg { position: relative; width: 19px; height: 19px; stroke-width: 2; }
.zoom-shell .send:disabled { background: none; color: var(--btn-ink); opacity: .35; }
.zoom-shell .composer-wrap:not(.has-text) #send-button { display: none; }
.zoom-shell .composer-wrap.has-text #mic-button:not(.recording) { display: none; }
.zoom-shell .composer-wrap:has(#mic-button.recording) #send-button { display: none; }
.zoom-shell .composer-attachments { padding: 10px 12px 0; }

/* ---------- Model and access: the shared sheet look ----------
   Grab handle, a light 24px heading, full-width rows with hairlines, a tick
   on the chosen model, plain small lines instead of badges. No close box:
   a tap outside, the scrim or Esc closes it. */
.zoom-shell .runtime-popover { gap: 0; padding: 0 20px 20px; border: 0; border-radius: var(--r-sheet); background: var(--surface); color: var(--ink); box-shadow: var(--shadow); width: 400px; }
.zoom-shell .runtime-popover .runtime-heading { position: relative; margin: 0; padding: 18px 0 6px; border: 0; background: none; }
.zoom-shell .runtime-heading strong { font-size: var(--fs-24); font-weight: var(--fw-light); letter-spacing: -.01em; color: var(--ink); }
.zoom-shell .runtime-heading .icon-button[hidden] { display: none; }
.zoom-shell #runtime-save-status p { margin: 4px 0; color: var(--ink3); font-size: var(--fs-14); }
.zoom-shell .runtime-model-list { gap: 0; }
.zoom-shell .runtime-model-group { gap: 0; }
.zoom-shell .runtime-model-provider { margin: 14px 0 0; color: var(--ink3); font-size: var(--fs-14); font-weight: var(--fw-regular); }
.zoom-shell .runtime-model-provider .provider-light { display: none; }
.zoom-shell .runtime-model-provider { display: grid; gap: 2px; margin-bottom: 8px; }
.zoom-shell .runtime-model-provider small { color: var(--ink2); font-size: var(--fs-14); }
.zoom-shell .runtime-model-provider small::before { content: none; }
.runtime-model-basis { margin: 6px 0 0; color: var(--ink3, var(--muted)); font-size: var(--fs-12); line-height: 1.4; }
.zoom-shell .runtime-popover .runtime-model-row { min-height: 56px; padding: 8px 0; gap: 12px; border: 0; border-bottom: 1px solid var(--hair2); border-radius: 0; background: none; color: var(--ink); font-size: var(--fs-16); font-weight: var(--fw-regular); }
.zoom-shell .runtime-popover .runtime-model-row:hover:not(:disabled) { background: none; color: var(--ink); }
.zoom-shell .runtime-model-row[aria-pressed="true"] { background: none; font-weight: var(--fw-regular); }
.zoom-shell .runtime-model-row:disabled { color: var(--ink3); }
.zoom-shell .runtime-model-row[aria-pressed="true"]:disabled { color: var(--ink); }
.zoom-shell .runtime-model-name { flex: 1; min-width: 0; display: grid; gap: 1px; text-align: left; }
.zoom-shell .runtime-model-name small { color: var(--ink3); font-size: var(--fs-13); line-height: 1.35; }
.zoom-shell .runtime-popover .runtime-model-row svg, .zoom-shell .runtime-choice-row svg { width: 20px; height: 20px; flex: none; color: var(--ink); }
/* Effort, Access and Chat memory: plain rows with a quiet value and a chevron. */
.zoom-shell .runtime-popover .runtime-advanced, .zoom-shell .runtime-popover .runtime-context { border: 0; border-bottom: 1px solid var(--hair2); }
.zoom-shell .runtime-popover .runtime-advanced > summary, .zoom-shell .runtime-popover .runtime-context > summary { min-height: 56px; display: flex; align-items: center; gap: 10px; list-style: none; cursor: pointer; color: var(--ink); font-size: var(--fs-16); }
.zoom-shell .runtime-popover .runtime-context > summary::-webkit-details-marker { display: none; }
.zoom-shell .runtime-popover .runtime-context > summary::after { content: '›'; margin-left: auto; color: var(--ink3); font-size: var(--fs-20); transition: transform .15s ease; }
.zoom-shell .runtime-popover .runtime-context[open] > summary::after { transform: rotate(90deg); }
.zoom-shell .runtime-popover .runtime-advanced > summary::after { color: var(--ink3); }
.zoom-shell .runtime-popover .runtime-advanced > summary strong { color: var(--ink); font-size: var(--fs-16); font-weight: var(--fw-regular); }
.zoom-shell .runtime-popover .runtime-advanced > summary span { margin-left: auto; color: var(--ink3); font-size: var(--fs-14); }
.zoom-shell .runtime-popover .runtime-advanced-body { gap: 8px; padding: 0 0 12px; }
.zoom-shell .runtime-popover .runtime-context p { margin: 0 0 12px; color: var(--ink3); font-size: var(--fs-14); line-height: 1.45; }
.zoom-shell .runtime-popover .runtime-context.hidden { display: none; }
.zoom-shell .runtime-popover .segmented { display: flex; gap: 4px; padding: 4px; border-radius: var(--r-btn); background: var(--sea); }
.zoom-shell .runtime-popover .segmented.hidden { display: none; }
.zoom-shell .runtime-popover .segment { flex: 1 1 auto; min-height: 44px; padding: 0 6px; border-radius: 20px; color: var(--ink2); font-size: var(--fs-15); font-weight: var(--fw-regular); white-space: nowrap; }
.zoom-shell .runtime-popover .segment[aria-pressed="true"] { background: var(--raise); color: var(--ink); box-shadow: var(--shadow-soft); }
.zoom-shell .runtime-popover #speed-toggle { justify-self: stretch; width: 100%; min-height: 48px; display: flex; align-items: center; padding: 0; border: 0; border-radius: 0; background: none; color: var(--ink2); font-size: var(--fs-15); font-weight: var(--fw-regular); text-align: left; }
.zoom-shell .runtime-popover #speed-toggle::after { content: 'Off'; margin-left: auto; color: var(--ink3); font-size: var(--fs-14); }
.zoom-shell .runtime-popover #speed-toggle[aria-pressed="true"]::after { content: 'On'; color: var(--ink); }
.zoom-shell .runtime-popover #speed-toggle.hidden { display: none; }
.zoom-shell .runtime-choice-list { display: grid; }
.zoom-shell .runtime-popover .runtime-choice-row { width: 100%; min-height: 52px; display: flex; align-items: center; gap: 12px; padding: 0; border: 0; border-top: 1px solid var(--hair2); border-radius: 0; background: none; color: var(--ink); font-size: var(--fs-16); font-weight: var(--fw-regular); text-align: left; }
.zoom-shell .runtime-choice-row:first-child { border-top: 0; }
.zoom-shell .runtime-choice-row > span { flex: 1; min-width: 0; }
.zoom-shell .runtime-choice-row:disabled { color: var(--ink3); }
.zoom-shell .runtime-popover .choice-detail { margin: 2px 0 0; color: var(--ink3); font-size: var(--fs-13); line-height: 1.45; }
@media (max-width: 800px), (max-height: 480px) and (orientation: landscape) {
  .zoom-shell .runtime-popover { width: auto; padding: 0 var(--gutter) calc(20px + var(--safe-bottom)); border-radius: var(--r-sheet) var(--r-sheet) 0 0; box-shadow: var(--shadow); }
  .zoom-shell .runtime-popover .runtime-heading { padding-top: 26px; }
  .zoom-shell .runtime-popover .runtime-heading::before { top: 9px; width: 38px; height: 5px; margin-left: -19px; border-radius: 3px; background: var(--hair); }
}

/* Attach: the shared sheet with two plain rows. */
.attach-sheet .hz-plain:disabled { color: var(--ink3); }
.checker-summary-meta { margin: 0 0 6px; color: var(--ink3); font-size: 13px; }

/* Sending: a "send after" message says it waits, with Remove beside it. */
.message.user.is-waiting .message-body { border: 1px dashed var(--line); background: var(--surface); }
.message.is-removed { display: none; }
.queued-mark { display: flex; justify-content: flex-end; align-items: center; gap: var(--sp-2); margin: 2px 0 0; color: var(--muted); font-size: var(--fs-14); }
.queued-mark .queued-remove { min-height: 44px; padding: 0 var(--sp-2); }
/* A message on its way, or not sent, sits at the end of its conversation. */
.message.unsent-send .message-meta > .message-status::before { content: none; }
.message.unsent-send .message-status.sending { color: var(--muted); }
.message.unsent-send .unsent-text { margin: 0; white-space: pre-wrap; }
.message.unsent-send .unsent-files { margin: 4px 0 0; color: var(--muted); font-size: var(--fs-14); }
.message.unsent-send.is-unsent .message-body { border: 1px solid color-mix(in srgb, var(--danger) 38%, var(--line)); }
.message.unsent-send .unsent-reason { margin: 4px 0 0; color: var(--muted); font-size: var(--fs-14); text-align: right; }
.message.unsent-send .unsent-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--sp-2); margin-top: var(--sp-1); }
.message.unsent-send .unsent-actions button { min-height: 44px; }
.composer-send .dialog-actions { justify-content: flex-start; margin-top: var(--sp-1); }
/* An archived chat: one line with Restore in place of the box. */
.composer-wrap.is-archived .composer-bar, .composer-wrap.is-archived .composer, .composer-wrap.is-archived .composer-hint { display: none; }
.composer-archived { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); padding: 8px 6px 8px 14px; color: var(--muted); font-size: var(--fs-14); }
.composer-archived button { min-height: 44px; }
#chat-view.is-archived .turn-next-step { display: none; }
/* Voice: listening with the time so far, or a recording kept to try again. */
.voice-status { display: flex; flex-wrap: wrap; align-items: center; gap: 6px var(--sp-2); padding: 6px 10px; color: var(--muted); font-size: var(--fs-14); }
.voice-status .voice-dot { width: 10px; height: 10px; flex: none; border-radius: 50%; background: var(--danger); animation: voice-pulse 1.2s ease-in-out infinite; }
.voice-status .voice-status-actions { display: flex; gap: var(--sp-2); margin-left: auto; }
.voice-status button { min-height: 44px; }
@keyframes voice-pulse { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .voice-status .voice-dot { animation: none; } }

/* A waiting item's facts: plain rows, "Not known" where the Hub has nothing. */
.action-facts-wrap { margin: var(--sp-3) 0; }
.action-facts { margin: 0; display: grid; gap: var(--sp-3); }
.action-fact dt { color: var(--ink3); font-size: var(--fs-14); margin: 0 0 2px; }
.action-fact { margin: 0 0 var(--sp-3); }
.action-fact dd { margin: 0; }
.action-fact-steps { margin: 0 0 var(--sp-2); padding-left: 1.3em; }
.action-fact-links { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-top: var(--sp-2); }
.action-facts-wrap .action-fact-links a { display: inline-flex; align-items: center; min-height: var(--tap); padding: 0 var(--sp-3); border: 1px solid var(--line); border-radius: var(--r-pill); color: inherit; text-decoration: none; }
.sn-dig { display: inline-block; margin: 0 0 var(--sp-2); min-height: var(--tap); }
.sn-still .hz-tbtn { height: 40px; border: 1px solid var(--line); border-radius: var(--r-pill); font-size: var(--fs-14); }
.sn-still { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); margin: var(--sp-2) 0; color: var(--ink3); font-size: var(--fs-14); }
.sean-model-list .hz-plain.is-off { opacity: .55; }
.sean-model-list > .hz-plain { margin-bottom: var(--sp-2); }
.action-row { border-bottom: 1px solid var(--line); }
.action-row .sn-still { margin: 0 0 var(--sp-2); }
.action-row-said { margin: var(--sp-3) 0; }

/* One status line under an answer: the Hub's other marks wait behind "What it did" (app.js applyAnswerStatus). */
.status-behind { display: none !important; }
.turn-details > .answer-status-rest { margin: 0 0 8px; font-size: var(--fs-13, 13px); }
