/* A conversation beside the thing it is about (a scan): messages in a column, newest at the bottom. */
.chat { display: flex; flex-direction: column; min-height: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; }
.chat h2 { padding: 10px 14px; font-family: var(--mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--border); }
/* Few messages sit at the bottom, above the place to write; more of them scroll away upwards. */
.chat-log { display: flex; flex: 1 1 auto; flex-direction: column; min-height: 0; margin: 0; padding: 12px 14px; list-style: none; overflow-y: auto; }
.chat-log > :first-child { margin-top: auto; }
.chat-msg { margin: 0 0 12px; font-size: 14px; line-height: 1.45; }
.chat-msg:last-child { margin-bottom: 0; }
.chat-who { display: block; margin-bottom: 2px; font-family: var(--mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent3); }
.chat-model .chat-who { color: var(--accent2); }
.chat-user .chat-who { color: var(--accent); }
.chat-user { padding: 8px 10px; background: var(--surface2); border-radius: 8px; }
.chat-text { display: block; color: var(--text); overflow-wrap: anywhere; white-space: pre-line; }
.chat-working { color: var(--warn); font-family: var(--mono); font-size: 12px; }
.chat-foot { padding: 10px 14px 12px; border-top: 1px solid var(--border); }
.chat-note { margin: 0 0 8px; font-size: 12px; line-height: 1.45; color: var(--muted); }
.chat-note.warn { color: var(--warn); }
.chat-say { display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }
.chat-say textarea { width: 100%; padding: 8px 10px; font: inherit; font-size: 14px; color: var(--text); background: var(--bg); border: 1px solid var(--border); border-radius: 8px; resize: vertical; }
.chat-say textarea:focus { outline: none; border-color: var(--accent); }
.chat-say textarea:disabled { opacity: 0.5; }
.chat-upload { display: flex; flex-direction: column; gap: 10px; align-items: stretch; }
.chat-upload .btn { align-self: flex-end; }
.chat-upload .file-pick-button { flex: none; padding: 6px 14px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; color: var(--text); background: var(--surface); border: 1px solid var(--muted); border-radius: 99px; cursor: pointer; }
.chat-upload .file-pick-button:hover { color: var(--accent); border-color: var(--accent); }
.chat-upload .check { display: flex; gap: 8px; align-items: flex-start; font-size: 12px; line-height: 1.45; color: var(--dim); }
.chat-upload .check input { flex: none; width: 16px; height: 16px; margin-top: 1px; accent-color: var(--accent); }
.chat-upload .chat-note { margin: 0; }
.chat-cost { font-family: var(--mono); font-size: 11px; }
.chat-add { margin-bottom: 10px; }
/* A message that arrived with others waits its turn (js/live-update.js shows them one after another). */
.chat-msg[data-late] { display: none; }
.chat-asks .chat-text { font-weight: 700; }
.deck-live h2 { margin: 16px 0 8px; font-family: var(--mono); font-size: 15px; }
.deck-live .deck-line { margin: 0 0 6px; }
.deck-live .hint { font-size: 13px; color: var(--muted); }
.deck-dash { margin: 0 0 18px; }
/* The steps of a model's work, for whoever looks into them: folded, in small print. */
.chat-step { font-size: 12px; color: var(--muted); }
.chat-step summary { font-family: var(--mono); font-size: 11px; cursor: pointer; }
.chat-step summary b { color: var(--accent2); font-weight: 700; }
.chat-step-label { margin: 6px 0 2px; font-family: var(--mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; }
.chat-step pre { margin: 0; padding: 6px 8px; max-height: 240px; overflow: auto; font-family: var(--mono); font-size: 11px; line-height: 1.4; color: var(--dim); white-space: pre-wrap; overflow-wrap: anywhere; background: var(--bg); border: 1px solid var(--border); border-radius: 6px; }
.chat-foot .post-action { margin-bottom: 8px; }
/* Cards a model put forward in a conversation about cards: the picture, why, and what to do with it. */
.chat-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.chat-card { display: flex; gap: 12px; padding: 12px; background: var(--surface-glass); border: 1px solid var(--border); border-left: 3px solid var(--accent2); border-radius: 10px; }
.chat-card-img { flex: none; width: 110px; }
.chat-card-img img { display: block; width: 100%; height: auto; border-radius: 6px; }
.chat-card-body { display: flex; flex: 1 1 0; flex-direction: column; gap: 6px; min-width: 0; }
.chat-card-name { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: space-between; font-family: var(--mono); font-size: 14px; font-weight: 700; }
.chat-card-type { font-size: 12px; color: var(--dim); }
.chat-card-why { font-size: 13px; line-height: 1.45; color: var(--text); overflow-wrap: anywhere; }
.chat-card-have { display: flex; flex-wrap: wrap; gap: 8px; font-family: var(--mono); font-size: 11px; color: var(--dim); }
.chat-card-acts { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: auto; }
.chat-card-deck { display: flex; flex: 1 1 160px; gap: 6px; align-items: center; min-width: 0; }
.chat-card-deck select { flex: 1 1 0; min-width: 0; padding: 4px 8px; font: inherit; font-size: 12px; color: var(--text); background: var(--bg); border: 1px solid var(--border); border-radius: 8px; }
.scan-panel > .danger-zone { flex: none; margin: 12px 0 0; }
.scan-panel .notice { margin-bottom: 12px; }
.scan-panel .notice.ok { border-left-color: var(--accent3); }
