/* The agent chat (main page + workspace). */
.chat { display: flex; flex-direction: column; min-height: 0; position: relative; }
.chat .thread { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; padding: 2px 2px 10px; scrollbar-width: thin; overscroll-behavior: contain; }
.chat.over { outline: 2px dashed var(--ink); outline-offset: 4px; border-radius: 16px; }
.chat .sugg { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
.chat.started .sugg { display: none; }
.chat .sugg button { border: 1px solid var(--line2); background: rgba(251,250,247,.9); border-radius: 999px; padding: 7px 12px; font-size: 13px; color: var(--ink2); cursor: pointer; text-align: left; transition: border-color .15s, color .15s; }
.chat .sugg button:hover { border-color: var(--ink); color: var(--ink); }
.composer { display: flex; align-items: flex-end; gap: 6px; background: #fff; border: 1px solid var(--line2); border-radius: 18px; padding: 7px 7px 7px 6px; box-shadow: 0 14px 34px -22px rgba(20,22,26,.4); transition: border-color .2s, box-shadow .2s; flex: none; }
.composer:focus-within { border-color: var(--ink); box-shadow: 0 0 0 4px rgba(20,22,26,.06), 0 14px 34px -22px rgba(20,22,26,.4); }
.composer textarea { flex: 1; min-width: 0; border: 0; outline: 0; resize: none; background: transparent; font-size: 15.5px; line-height: 1.45; padding: 8px 4px; max-height: 140px; }
.composer textarea::placeholder { color: var(--ink3); }
.composer .att, .composer .go { width: 38px; height: 38px; border-radius: 12px; border: 0; display: grid; place-items: center; cursor: pointer; flex: none; }
.composer .att { background: transparent; color: var(--ink2); } .composer .att:hover { background: rgba(20,22,26,.06); color: var(--ink); }
.composer .go { background: var(--ink); color: #fff; border-radius: 999px; }
.composer svg { width: 18px; height: 18px; }
.msg.user { align-self: flex-end; max-width: 86%; }
.msg.user .b { background: var(--ink); color: #fff; padding: 9px 14px; border-radius: 18px 18px 5px 18px; font-size: 14.5px; white-space: pre-wrap; word-break: break-word; }
.msg.agent { font-size: 14.5px; line-height: 1.55; }
.msg.agent .txt p { margin: 0 0 8px; } .msg.agent .txt ul { margin: 0 0 8px; padding-left: 18px; }
.msg.agent .txt:empty { display: none; }
.msg.agent .err { color: var(--verified); }
.steps { display: flex; flex-direction: column; gap: 3px; margin-bottom: 8px; }
.steps:empty { display: none; }
.step { font-size: 12.5px; color: var(--ink3); display: flex; align-items: center; gap: 8px; }
.step i { width: 11px; height: 11px; border-radius: 50%; flex: none; }
.step.run i { border: 1.5px solid var(--line2); border-top-color: var(--ink); animation: spin .9s linear infinite; }
.step.done i { background: var(--ink) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M3.2 6.2l1.8 1.8 3.8-4' fill='none' stroke='white' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E") center/11px; }
.step.run { color: var(--ink2); }
@keyframes spin { to { transform: rotate(360deg); } }
.cards { display: flex; flex-direction: column; gap: 10px; }
.cards:empty { display: none; }
.msg.agent .cards + .txt { margin-top: 10px; }
.cards.after { margin-top: 4px; }
.cwrap { animation: cardin .35s ease both; }
@keyframes cardin { from { opacity: 0; transform: scale(.97); } to { opacity: 1; transform: none; } }

.ccard { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; box-shadow: 0 1px 0 rgba(20,22,26,.03); }
.ccard.sup { border-left: 3px solid var(--line2); }
.ccard.sup.verified { border-left-color: var(--verified); } .ccard.sup.allegation { border-left-color: var(--allegation); } .ccard.sup.emerging { border-left-color: var(--emerging); }
.chead { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 4px; }
.cname { font-weight: 600; font-size: 14.5px; line-height: 1.25; }
.cmeta { font-size: 12.5px; color: var(--ink3); margin-top: 1px; }
.cf { border-top: 1px solid var(--line); padding: 8px 0 2px; margin-top: 6px; font-size: 13px; }
.cft { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; } .cft b { font-weight: 550; }
.cfd { color: var(--ink2); margin-top: 2px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.cfs { margin-top: 4px; font-size: 12px; display: flex; gap: 10px; flex-wrap: wrap; } .cfs a { color: var(--ink3); }
.crows { margin-top: 6px; }
.crow { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1px 10px; padding: 7px 0; border-top: 1px solid var(--line); font-size: 13px; text-decoration: none; color: inherit; align-items: center; }
.crow.click, a.crow { cursor: pointer; } .crow.click:hover .cn, a.crow:hover .cn { text-decoration: underline; text-underline-offset: 3px; }
.crow .cn { font-weight: 520; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crow .cd { font-size: 12px; color: var(--ink3); white-space: nowrap; }
.crow .cm { grid-column: 1 / -1; font-size: 12px; color: var(--ink3); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mk { font-size: 10.5px; font-weight: 650; color: var(--ink2); border: 1px solid var(--line2); border-radius: 4px; padding: 0 4px; margin-right: 6px; vertical-align: 1px; }
.chip { font-size: 11px; font-weight: 600; border-radius: 5px; padding: 1px 6px; margin-left: 4px; }
.chip.red { color: var(--verified); background: rgba(224,65,43,.09); } .chip.amber { color: var(--allegation); background: rgba(201,132,25,.11); }
.ctally { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin: 8px 0 2px; }
.ct { background: var(--paper); border-radius: 10px; padding: 7px 8px; display: flex; flex-direction: column; gap: 2px; font-size: 12px; }
.ct .num { font-size: 19px; letter-spacing: -.03em; line-height: 1.1; } .ct .num.red { color: var(--verified); }
.cact { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.cbtn { height: 32px; padding: 0 13px; border-radius: 999px; border: 0; background: var(--ink); color: #fff; font-size: 13px; font-weight: 500; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; white-space: nowrap; }
.cbtn:hover { background: #2a2d33; }
.cbtn.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line2); }
.cbtn.red { background: var(--verified); }
.cbtn[disabled] { opacity: .45; cursor: default; }
.cfoot { margin-top: 8px; font-size: 12px; } .cfoot a { color: var(--ink3); }
.ccard.cta { display: flex; align-items: center; gap: 12px; justify-content: space-between; border-color: var(--ink); font-size: 13.5px; color: var(--ink2); }
.ccard.cta b { color: var(--ink); font-weight: 600; }
.live { width: 9px; height: 9px; border-radius: 50%; background: #2f9e62; box-shadow: 0 0 0 0 rgba(47,158,98,.45); animation: livepulse 2s infinite; flex: none; margin-top: 4px; }
@keyframes livepulse { 0% { box-shadow: 0 0 0 0 rgba(47,158,98,.45); } 70% { box-shadow: 0 0 0 8px rgba(47,158,98,0); } 100% { box-shadow: 0 0 0 0 rgba(47,158,98,0); } }
.sev { font-size: 11px; font-weight: 650; border-radius: 5px; padding: 1px 7px; white-space: nowrap; letter-spacing: .01em; }
.sev.critical { background: var(--verified); color: #fff; } .sev.high { color: var(--verified); box-shadow: inset 0 0 0 1px var(--verified); }
.sev.medium { color: var(--allegation); box-shadow: inset 0 0 0 1px var(--allegation); } .sev.low { color: var(--ink3); box-shadow: inset 0 0 0 1px var(--line2); }
@media (max-width: 860px) {
  .ccard.cta { flex-direction: column; align-items: flex-start; }
  .composer textarea { font-size: 16px; }
}
.crows.clip .crow.more { display: none; }
.ccard.all .crows.clip .crow.more { display: grid; }
.ccard.cta .cbtns { display: flex; flex-direction: column; gap: 6px; flex: none; }
@media (max-width: 860px) { .ccard.cta .cbtns { flex-direction: row; flex-wrap: wrap; } }
