/* Troubadour web UI - the chat: transcript rows, markdown, tool and
   approval cards, activity groups, the composer, attachments. */

.chat { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.chat__scroll { flex: 1 1 auto; overflow-y: auto; padding: var(--s5) 0 var(--s4); min-height: 0; }
.chat__inner { max-width: var(--chat-w); margin: 0 auto; display: flex;
  flex-direction: column; gap: var(--s4); }

.bubble { max-width: 82%; display: flex; flex-direction: column; gap: 5px; }
.bubble--user { align-self: flex-end; align-items: flex-end; }
.bubble--agent { align-self: flex-start; align-items: flex-start; width: 100%; max-width: 100%; }
.bubble--user .b__body {
  background: var(--primary); color: var(--primary-ink);
  border-radius: 18px 18px 5px 18px; padding: 10px 15px;
  white-space: pre-wrap; box-shadow: var(--shadow-1);
}
.bubble--agent .b__body {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 5px 18px 18px 18px; padding: 13px 16px;
  box-shadow: var(--shadow-1);
}
.bubble--agent .b__body > :first-child { margin-top: 0; }
.bubble--agent .b__body > :last-child { margin-bottom: 0; }
.b__meta { font-size: 11.5px; color: var(--muted-2); padding: 0 6px;
  display: flex; align-items: center; gap: var(--s2); min-height: 20px; }
.copybtn { height: 22px; padding: 0 8px; font-size: 11.5px; font-weight: 600; border-radius: 7px; }
.b__meta .copybtn { padding: 0 6px; height: 20px; border-color: transparent;
  background: transparent; color: var(--muted); }
.b__meta .copybtn:hover { color: var(--text); background: var(--surface-2); }

/* markdown inside a bubble */
.b__body code { background: var(--surface-2); border-radius: 5px; padding: 1px 5px;
  font: 12.5px/1.4 var(--mono); }
.bubble--user .b__body code { background: rgba(255, 255, 255, 0.2); }
.b__body .md__p { margin: 0; }
.b__body .md__p + .md__p { margin-top: 8px; }
.b__body .md__list { margin: 8px 0; padding-left: 22px; }
.b__body .md__list li { margin: 2px 0; }
.b__body .md__h { margin: 12px 0 4px; font-size: var(--fs-base); }
.b__body a { color: var(--primary); text-decoration: underline; text-underline-offset: 2px; }
.bubble--user .b__body a { color: inherit; }

/* fenced code: its own surface, scrolls inside, Copy sits on the wrapper
   (see markdown.js makeCodeBlock) so it never overlaps the code */
.codeblock-wrap { position: relative; margin: 10px 0; max-width: 100%; }
pre.codeblock {
  margin: 0; padding: 12px 14px; max-width: 100%;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); overflow-x: auto; white-space: pre;
  font: 12.5px/1.6 var(--mono);
}
pre.codeblock code { background: none; padding: 0; font: inherit; }
.codeblock__copy {
  position: absolute; top: 7px; right: 7px;
  height: 24px; padding: 0 9px; border: 1px solid var(--border-strong);
  border-radius: 7px; background: var(--bg); color: var(--muted);
  font: 600 11.5px var(--font); cursor: pointer; box-shadow: var(--shadow-1);
  opacity: 0; transition: opacity 0.12s;
}
.codeblock-wrap:hover .codeblock__copy, .codeblock__copy:focus-visible { opacity: 1; }
.codeblock__copy:hover { color: var(--text); }
/* touch: no hover to reveal it, so Copy gets its own slim row above the
   code instead of overlapping the first line */
@media (hover: none) {
  .codeblock-wrap { display: flex; flex-direction: column; }
  .codeblock__copy { position: static; opacity: 1; align-self: flex-end; margin-bottom: 4px;
    box-shadow: none; }
}

/* blockquote: a bar and quiet text - it was unstyled, so a quote read as
   a mis-indented paragraph */
blockquote.md__bq {
  margin: 10px 0; padding: 2px 0 2px 14px;
  border-left: 3px solid var(--border-strong); color: var(--muted);
}
blockquote.md__bq .md__p { margin: 4px 0; }

/* comparison tables: header band, row rules, scrolls on a narrow screen */
table.md__tbl {
  display: block; width: fit-content; max-width: 100%; overflow-x: auto;
  border-collapse: separate; border-spacing: 0; margin: 10px 0;
  font-size: var(--fs-md); border: 1px solid var(--border); border-radius: var(--radius-sm);
}
table.md__tbl th, table.md__tbl td { padding: 8px 14px; text-align: left; white-space: nowrap;
  border-bottom: 1px solid var(--border); }
table.md__tbl th { background: var(--surface); font-weight: 650; font-size: var(--fs-sm);
  color: var(--muted); }
table.md__tbl tr:last-child td { border-bottom: none; }
table.md__tbl tbody tr:hover td { background: var(--surface); }

/* gh #70: per-row copy controls. Hidden at rest on pointer devices and
   revealed by hover or keyboard focus; always visible on touch. */
.copybtn { opacity: 0; transition: opacity 0.12s; }
.copybtn:focus, .copybtn:focus-visible { opacity: 1; }
.bubble:hover .copybtn, .tool:hover .copybtn, .think:hover .copybtn,
.actgroup:hover > summary .copybtn { opacity: 1; }
@media (hover: none), (max-width: 767px) { .copybtn { opacity: 1; } }

/* gh #73 + chat presentation pass: quiet opt-in verbosity bar and refined
   exchange-top activity disclosures. Collapsed activity sits as a compact,
   low-visual-weight pill above user-facing outputs; expanding reveals the
   step log in a slim indented drawer without boxy nested clutter. */
.chatbar { display: flex; align-items: center; justify-content: flex-end; gap: var(--s2);
  padding: 2px 0 0; font-size: var(--fs-xs); color: var(--muted-2);
  opacity: 0.78; transition: opacity 0.15s; }
.chatbar:hover, .chatbar:focus-within { opacity: 1; }
.chatbar__sel { font-size: var(--fs-xs); min-height: 26px; border-radius: var(--pill);
  border: 1px solid var(--border); background: var(--surface); color: var(--muted);
  padding: 2px 10px; cursor: pointer; }
.chatbar__sel:hover { border-color: var(--border-strong); color: var(--text); }
/* gh #37: fixed-height single-line glyph status bar for collapsed activity;
   expanding reveals the drawer (Copy control + failed excerpts + step log). */
.actgroup { align-self: flex-start; width: fit-content; max-width: 100%;
  border: 1px solid var(--border); border-radius: var(--pill);
  background: var(--surface); padding: 0 10px; transition: background 0.14s, border-color 0.14s; }
.actgroup:hover { background: var(--surface-2); border-color: var(--border-strong); }
.actgroup[open] { width: 100%; border-radius: var(--radius-sm);
  padding: 0 12px 10px; background: var(--surface); }
.actgroup[open]:hover { background: var(--surface); }
.actgroup > summary { cursor: pointer; list-style: none; user-select: none;
  height: 32px; min-height: 32px; max-height: 32px;
  font-size: var(--fs-xs); color: var(--muted); display: flex; align-items: center;
  flex-wrap: nowrap; gap: 8px; font-weight: 550; line-height: 1; white-space: nowrap; }
.actgroup > summary::-webkit-details-marker { display: none; }
.actgroup > summary::before { content: ""; width: 5px; height: 5px; flex: 0 0 auto;
  border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  transform: rotate(-45deg); transition: transform 0.15s; opacity: 0.75; }
.actgroup[open] > summary::before { transform: rotate(45deg); }
.actgroup__count { display: inline-flex; align-items: center; gap: 10px;
  min-width: 0; font-variant-numeric: tabular-nums; }
.actgroup__metric { display: inline-flex; align-items: center; gap: 3px;
  color: var(--muted); flex: 0 0 auto; }
.actgroup__metric .icon { flex: 0 0 auto; opacity: 0.85; }
.actgroup__metric--error { color: var(--danger); font-weight: 650; }
.actgroup__metric--error .icon { opacity: 1; }
.actgroup__state { display: inline-flex; align-items: center; justify-content: center;
  margin-left: auto; flex: 0 0 auto; color: var(--muted); }
.actgroup__state--running .icon { animation: act-spin 0.9s linear infinite; color: var(--primary); }
.actgroup__state--done { color: var(--success); }
.actgroup__state--error { color: var(--danger); }
.actgroup__state--cancelled { color: var(--muted); }
@keyframes act-spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .actgroup__state--running .icon { animation: none; }
}
.actgroup__drawer { border-top: 1px solid var(--border); padding-top: 8px; margin-top: 2px; }
.actgroup__bar { display: flex; align-items: center; justify-content: space-between;
  gap: 8px; margin-bottom: 6px; font-size: var(--fs-xs); color: var(--muted); }
.actgroup__bar .copybtn { opacity: 1; height: 24px; padding: 0 8px; font-size: 11px; }
.actgroup__fail { margin-bottom: 6px; }
.actgroup__fail:empty { display: none; margin-bottom: 0; }
.actgroup__fail div { color: var(--danger); font-size: var(--fs-xs); font-weight: 550;
  margin-top: 2px; overflow-wrap: anywhere; }
.actgroup__list { padding-left: 10px; border-left: 2px solid var(--border);
  display: flex; flex-direction: column; gap: 6px; }
@media (max-width: 420px) {
  .actgroup { padding: 0 8px; }
  .actgroup > summary { gap: 6px; }
  .actgroup__count { gap: 7px; }
}
.actgroup__list > :nth-child(n+26) { display: none; }
.actgroup--all .actgroup__list > :nth-child(n+26) { display: block; }
.actgroup__list .tool { background: var(--card); border-color: var(--border); }
.actgroup__list .tool__head { padding: 5px 10px; font-size: var(--fs-xs); }
.actgroup__list .tool__body { padding: 7px 10px; font-size: 12px; max-height: 180px; }
.actgroup__list .think { width: 100%; border-radius: var(--radius-xs); }

.bubble--system { align-self: center; max-width: 92%; }
/* a system row that is bare text (an engine-authored "Nightly review ran",
   an interruption notice) wears the same quiet pill as one with a body */
.bubble--system:not(:has(> .b__body)) { background: var(--surface-2); color: var(--muted);
  border-radius: var(--pill); padding: 5px 14px; font-size: var(--fs-sm); text-align: center; }
.bubble--system .b__body {
  background: var(--surface-2); color: var(--muted); border-radius: var(--pill);
  padding: 5px 14px; font-size: var(--fs-sm); text-align: center; border: none;
  box-shadow: none;
}
/* a notification from background work, in the chat it concerns */
.bubble--notice { align-self: stretch; max-width: 100%; background: var(--surface-2);
  border-left: 3px solid var(--border); border-radius: var(--radius-sm);
  padding: var(--s2) var(--s3); font-size: var(--fs-sm); overflow-wrap: anywhere; }
.bubble--notice-important { border-left-color: var(--accent); }
.entity-ref--resolved { display: inline-block; padding: 0 6px; border-radius: var(--radius-xs);
  background: var(--primary-soft); color: var(--primary); font-weight: 600;
  text-decoration: none; font-size: 0.92em; line-height: 1.45; }
.entity-ref--resolved:hover { text-decoration: underline; }
html.dark .entity-ref--resolved { color: #9db8ff; }
.entity-ref--missing { color: inherit; }
.notice__title { font-weight: 600; color: var(--text); }
.notice__text { color: var(--muted); margin-top: 2px; white-space: pre-wrap; }
/* a compaction summary: collapsed until opened, then an ordinary left-aligned card */
.bubble--summary { align-self: stretch; max-width: 100%; }
.bubble--summary > summary { cursor: pointer; user-select: none; color: var(--muted);
  font-size: var(--fs-sm); padding: 6px 2px; }
.bubble--summary[open] > summary { margin-bottom: var(--s2); }
.bubble--summary .b__body { background: var(--surface-2); color: var(--text);
  border-radius: var(--radius-sm); padding: var(--s3) var(--s4); font-size: var(--fs-sm);
  text-align: left; border: none; box-shadow: none; overflow-wrap: anywhere; }
.bubble--error .b__body {
  background: var(--danger-soft); border: 1px solid color-mix(in srgb, var(--danger) 35%, transparent);
  color: var(--danger); border-radius: var(--radius-sm); text-align: left;
  padding: 10px 14px; box-shadow: none;
}
.bubble--error { align-self: stretch; max-width: 100%; align-items: flex-start; }
.bubble__fix { align-self: flex-start; margin-top: var(--s1); }

/* gh #44: unbreakable tokens (autolinked URLs) must not lock the bubble
   chain open. overflow-wrap:anywhere participates in min-content sizing,
   and min-width:0 clears the flex item's auto minimum. */
.bubble, .b__body, .md__p, .feed-body, .card__body, .tool__body { min-width: 0; overflow-wrap: anywhere; }
.bubble a { word-break: break-all; }
/* gh #54: the body stops at the bubble; the pre's own overflow scrolls */
.bubble > .b__body { max-width: 100%; }

/* tool calls and results */
.tool { margin: 2px 0; border: 1px solid var(--border); border-radius: var(--radius-sm);
  overflow: hidden; width: 100%; background: var(--card); }
.tool__head { display: flex; align-items: center; gap: var(--s2); padding: 7px 12px;
  background: var(--surface); font-size: var(--fs-sm); font-weight: 600; color: var(--text);
  font-family: var(--mono); }
.tool__head > span:first-child { flex: 1 1 auto; min-width: 0; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; }
.tool__head .copybtn { padding: 0 8px; height: 22px; font-family: var(--font); font-size: 11.5px; }
.tool__body { padding: 9px 12px; font: 12.5px/1.55 var(--mono); color: var(--muted);
  white-space: pre-wrap; max-height: 220px; overflow: auto; }
.tool__more { padding: 0 12px 8px; }
.tool__more summary { cursor: pointer; color: var(--muted); font-size: var(--fs-xs);
  user-select: none; font-weight: 600; }
.tool__more pre { max-height: 340px; overflow: auto; margin: 6px 0 0; white-space: pre-wrap;
  word-break: break-word; color: var(--muted); font: 12.5px/1.55 var(--mono); }

/* model thinking (gh #38): a quiet pill disclosure above the reply */
.think { align-self: flex-start; width: fit-content; max-width: 100%;
  margin: 0; padding: 4px 12px; border: 1px solid var(--border);
  border-radius: var(--pill); background: var(--surface); color: var(--muted);
  font-size: var(--fs-xs); transition: background 0.14s, border-color 0.14s; }
.think:hover { background: var(--surface-2); border-color: var(--border-strong); }
.think[open] { width: 100%; border-radius: var(--radius-sm); padding: 7px 12px;
  background: var(--surface); }
.think[open]:hover { background: var(--surface); }
.think > summary { cursor: pointer; list-style: none; user-select: none; display: flex;
  align-items: center; gap: var(--s2); font-weight: 550; line-height: 1.4; }
.think > summary::-webkit-details-marker { display: none; }
.think > summary::before { content: ""; width: 5px; height: 5px; flex: 0 0 auto;
  border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  transform: rotate(-45deg); transition: transform 0.15s; opacity: 0.75; }
.think[open] > summary::before { transform: rotate(45deg); }
.think > summary > span { flex: 1 1 auto; }
.think__body { margin: var(--s2) 0 0; white-space: pre-wrap; word-wrap: break-word;
  font-family: inherit; font-size: var(--fs-sm); line-height: 1.6; }
.bubble--think .b__body { color: var(--muted); font-size: var(--fs-sm); white-space: pre-wrap; }
.tool--stream { align-self: flex-start; width: fit-content; max-width: 100%;
  border-radius: var(--pill); background: var(--surface); border: 1px solid var(--border); }
.tool--stream[open] { width: 100%; border-radius: var(--radius-sm); }
.tool--stream > summary.tool__head { cursor: pointer; list-style: none; font-family: var(--font);
  font-size: var(--fs-xs); font-weight: 550; color: var(--muted); padding: 4px 12px; }
.tool--stream > summary.tool__head::-webkit-details-marker { display: none; }

/* gh #23: provisional token-stream bubble; the caret marks "generating" */
.bubble--stream .b__body { white-space: pre-wrap; }
.bubble--stream .b__body::after { content: '\258D'; margin-left: 1px;
  color: var(--primary); animation: stream-caret 1s steps(2, start) infinite; }
@keyframes stream-caret { 50% { opacity: 0; } }

/* ---------------- Approval cards ---------------- */

.approval {
  width: 100%; background: var(--card);
  border: 1px solid color-mix(in srgb, var(--warn) 45%, var(--border));
  border-left: 4px solid var(--warn);
  border-radius: var(--radius-sm); padding: var(--s3) var(--s4) var(--s3);
  box-shadow: var(--shadow-1);
}
.approval__tool { display: flex; align-items: center; gap: var(--s2); font-weight: 650;
  margin-bottom: 4px; }
.approval__tool::before { content: ""; width: 8px; height: 8px; border-radius: 50%;
  background: var(--warn); flex: 0 0 auto; }
.approval__purpose { color: var(--muted); font-size: var(--fs-md); margin-bottom: var(--s3);
  overflow-wrap: anywhere; }
.approval__secret { flex: 1 0 100%; min-width: 0; max-width: 24rem;
  min-height: 40px; padding: 0 var(--s2); color: var(--text); background: var(--bg);
  border: 1px solid var(--border-strong); border-radius: var(--radius-xs); }
.approval__actions { display: flex; flex-wrap: wrap; gap: var(--s2); align-items: center; }
.approval__select { padding: 7px 9px; border-radius: 9px; border: 1px solid var(--border-strong);
  background: var(--bg); font-size: var(--fs-sm); }
.approval--resolved { opacity: 0.85; border-left-color: var(--border-strong); }
.approval__resolved { display: flex; align-items: center; gap: var(--s2); color: var(--muted);
  font-size: var(--fs-md); }
.list-item .approval__actions { margin-left: auto; }

/* ---------------- Composer ---------------- */

.composer { border-top: 1px solid var(--border); padding: var(--s3) 0 max(var(--s3), env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(8px); }
.composer__inner { max-width: var(--chat-w); margin: 0 auto; }
.composer__box {
  display: flex; align-items: flex-end; gap: var(--s2);
  border: 1px solid var(--border-strong); border-radius: 16px;
  padding: 7px 7px 7px 8px; background: var(--bg); box-shadow: var(--shadow-1);
}
.composer__box:focus-within { border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft); }
.composer__ta { flex: 1 1 auto; border: none; background: transparent; color: var(--text);
  resize: none; max-height: 160px; min-height: 28px; padding: 7px 4px; line-height: 1.45; }
.composer__ta:focus { outline: none; }
.composer__send {
  flex: 0 0 auto; border: none; background: var(--primary); color: var(--primary-ink);
  border-radius: 11px; width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.composer__send:not(:disabled):hover { background: var(--primary-hover); }
/* the button's text stays the glyph the suites and assistive tech read
   (a label sits on aria-label); the picture is a CSS mask so it takes the
   button's colour and stays crisp */
.composer__send { font-size: 0; position: relative; }
.composer__send::before { content: ""; width: 20px; height: 20px; background: currentColor;
  -webkit-mask: var(--ico-send) center / contain no-repeat; mask: var(--ico-send) center / contain no-repeat; }
.composer__send.composer__stop::before {
  -webkit-mask-image: var(--ico-stop); mask-image: var(--ico-stop); width: 16px; height: 16px; }
.composer__send:disabled { opacity: 0.4; cursor: not-allowed; }
.composer__send.composer__stop { background: var(--danger); }
.composer__hint { font-size: var(--fs-xs); color: var(--muted-2); margin: 7px 0 0; text-align: center; }

/* gh #45: paperclip, pending chips, bubble attachment strip */
.composer__clip { flex: 0 0 auto; width: 38px; height: 38px; display: flex;
  align-items: center; justify-content: center; border: none; background: transparent;
  color: var(--muted); cursor: pointer; border-radius: 11px; }
.composer__clip:hover { color: var(--text); background: var(--surface-2); }
.attach-tray { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: var(--s2); }
.attach-chip { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; min-width: 0;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--pill);
  padding: 3px 5px 3px 12px; font-size: var(--fs-sm); }
.attach-chip__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attach-chip__x { display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border: none; border-radius: 50%; background: transparent;
  color: var(--muted); cursor: pointer; }
.attach-chip__x:hover { background: var(--border); color: var(--text); }

.b__attach { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 6px;
  margin-top: 6px; max-width: 100%; }
.b__attach img { max-width: min(220px, 100%); border-radius: var(--radius-sm);
  border: 1px solid var(--border); display: block; }
/* gh #76: a picture whose pixels are no longer sent dims, never hides */
.b__attach--stale img { opacity: .45; }
.b__attach__note { flex-basis: 100%; color: var(--muted); font-size: var(--fs-xs); }
.b__attach__file { background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--pill); padding: 3px 12px; font-size: var(--fs-sm); overflow-wrap: anywhere; }
a.b__attach__file { display: inline-flex; align-items: center; gap: 6px; color: inherit;
  text-decoration: none; }
.b__attach__size { color: var(--muted); font-size: var(--fs-xs); }
a.b__attach__dlbtn { display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; flex: none; background: var(--surface-2);
  border: 1px solid var(--border); border-radius: var(--pill); color: var(--muted);
  text-decoration: none; font-size: var(--fs-sm); }
a.b__attach__dlbtn:hover, a.b__attach__open:hover { color: var(--primary); border-color: var(--primary); }
a.b__attach__open { display: inline-flex; align-items: center; gap: 4px; background: var(--surface-2);
  border: 1px solid var(--border); border-radius: var(--pill); color: var(--muted);
  padding: 2px 8px; font-size: var(--fs-xs); text-decoration: none; }
details.b__attach__text { background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 3px 12px; font-size: var(--fs-sm); max-width: 100%; }
details.b__attach__text summary { cursor: pointer; }
details.b__attach__text pre { max-height: 340px; overflow: auto; margin: 6px 0 2px;
  white-space: pre-wrap; overflow-wrap: anywhere; }
details.b__attach__text summary a.b__attach__dlbtn { margin-left: var(--s2); }
.b__attach audio, .b__attach video { max-width: min(320px, 100%); }
.queued-row__atts { font-size: var(--fs-xs); color: var(--muted); margin-top: 2px; overflow-wrap: anywhere; }

/* gh #24 / #74: a queued message is a dimmed draft awaiting its turn */
.queued-row { display: flex; align-items: center; gap: var(--s2); margin: 4px 0;
  padding: 9px 12px; border: 1px dashed var(--border-strong); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--muted); }
.queued-row__text { flex: 1 1 auto; min-width: 0; font-size: var(--fs-md); white-space: pre-wrap;
  word-wrap: break-word; }
.queued-row__acts { flex: 0 0 auto; display: flex; gap: 6px; }
.queued-row__btn { height: 26px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--border-strong);
  background: var(--bg); color: var(--muted); font-size: var(--fs-xs); font-weight: 600; cursor: pointer; }
.queued-row__btn:hover { color: var(--text); background: var(--surface-2); }
.queued-row--sending { opacity: 0.72; border-style: solid; }
.queued-row--failed { border-color: var(--danger); border-style: solid; }
.queued-row__meta { font-size: var(--fs-xs); color: var(--muted); }
.queued-row--failed .queued-row__meta { color: var(--danger); }
.queued-row--offline { border-style: dashed; opacity: 0.85; }
.queued-row--offline .queued-row__meta { color: var(--warn); }

/* jump-to-latest pill (gh #18 / #41) */
.newmsg { position: fixed; bottom: 112px; left: 50%; transform: translateX(-50%); z-index: 30;
  display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--border-strong);
  background: var(--card); color: var(--text); border-radius: var(--pill); padding: 7px 14px;
  font-size: var(--fs-sm); font-weight: 600; cursor: pointer; box-shadow: var(--shadow-2); }

/* first-run: no model yet */
.setup-banner { display: flex; align-items: center; gap: var(--s3); flex-wrap: wrap;
  margin: var(--s3) 0 0; padding: var(--s3) var(--s4); border-radius: var(--radius-sm);
  background: var(--primary-soft); border: 1px solid color-mix(in srgb, var(--primary) 30%, transparent);
  color: var(--text); font-size: var(--fs-md); }
.setup-banner .icon { color: var(--primary); }
.setup-banner span { flex: 1 1 240px; }
