/* comms-view.css — wave257 (2026-10-30): the Communications page, conversation-first
 * (comms-view.js) + the shared trade-lane select mode (trade-lanes.js).
 * Dressed in the portal's own navy: the --ds-* tokens first (design-system.css),
 * the older --navy / --line / --muted / --card second, a literal last. Gold is
 * left to the ONE main action (.btn — Send text / Send to N companies); every
 * filter is a <select>. The record view (em-*) and the tray keep emails.css. */

/* ---- wave378: the wave355 door bar, page doors and tray mode are gone (one frame — see the foot) ---- */

/* ---- three panes: list | thread | person ---- */
.cv-layout { display: grid; grid-template-columns: 300px minmax(0, 1fr) 290px; gap: 16px; align-items: start; }
.cv-layout.cv-trades { grid-template-columns: 300px minmax(0, 1fr); }
.cv-pane-list, .cv-pane-thread { background: var(--ds-card, var(--card, #fff)); border: 1px solid var(--ds-line, var(--line, #dde3ea)); border-radius: var(--ds-r, 12px); padding: 12px; min-width: 0; }
.cv-pane-thread { display: flex; flex-direction: column; min-height: 520px; }
.cv-pane-side { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; min-width: 0; }
.cv-pane-list #cv-search, .cv-pane-list #cv-tq { width: 100%; box-sizing: border-box; margin-bottom: 8px; }
.cv-filters { display: flex; gap: 8px; margin-bottom: 6px; }
.cv-filters label { flex: 1; display: grid; gap: 2px; min-width: 0; }
.cv-filters select, .cv-tproj select { font: inherit; padding: 5px 6px; border: 1px solid var(--ds-line, var(--line, #dde3ea)); border-radius: var(--ds-r-ctl, 8px); background: var(--ds-card, #fff); color: inherit; min-width: 0; max-width: 100%; }
.cv-flabel { font-size: var(--ds-fs-xs, 11.5px); color: var(--ds-muted, var(--muted, #5b6472)); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.cv-filterline { font-size: var(--ds-fs-sm, 12.5px); margin: 4px 2px 8px; }
#cv-traydoors { border-bottom: 1px solid var(--ds-line, var(--line, #dde3ea)); padding-bottom: 6px; margin-bottom: 6px; }

/* ---- a conversation row ---- */
.cv-row { display: flex; gap: 10px; align-items: flex-start; width: 100%; text-align: left; background: none; border: 0; border-radius: var(--ds-r-sm, 10px); padding: 9px 8px; cursor: pointer; font: inherit; color: inherit; }
.cv-row:hover { background: #f2f5f9; }
.cv-row.active { background: var(--ds-tint, #e8edf3); }
.cv-row:focus-visible { outline: 2px solid var(--ds-focus, #6b8cc7); outline-offset: 1px; }
.cv-row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.cv-row-top { display: flex; align-items: baseline; gap: 8px; }
.cv-row-name { font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cv-row.unread .cv-row-name { font-weight: 700; color: var(--ds-ink, var(--ink, #14202e)); }
.cv-row-time { margin-left: auto; flex: none; color: var(--ds-muted, var(--muted, #5b6472)); font-size: 12px; }
.cv-row-prev { color: var(--ds-muted, var(--muted, #5b6472)); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cv-row-meta { display: flex; gap: 6px; align-items: center; }
.cv-row-meta:empty { display: none; }
.cv-row-door .cv-row-name { font-weight: 600; }
.cv-maybe { font-style: italic; }
.cv-tag-unfiled { font-size: 11px; font-weight: 600; border: 1px dashed var(--ds-line-strong, #b8c2cf); color: var(--ds-muted, #5b6472); border-radius: 999px; padding: 1px 7px; }
.cv-ava { flex: none; width: 34px; height: 34px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--ds-navy, var(--navy, #1d2b4a)); color: #fff; font-size: 12.5px; font-weight: 700; letter-spacing: .02em; }
.cv-ava-num, .cv-ava-door { background: var(--ds-tint, #e8edf3); color: var(--ds-navy, var(--navy, #1d2b4a)); }
.cv-ava-lg { width: 44px; height: 44px; font-size: 15px; }
.cv-ava .ico { width: 16px; height: 16px; }

/* ---- the thread ---- */
.cv-back { display: none; align-self: flex-start; margin-bottom: 6px; }
.cv-head { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; padding-bottom: 10px; border-bottom: 1px solid var(--ds-line, var(--line, #dde3ea)); }
.cv-head h2 { margin: 0; font-size: var(--ds-fs-lg, 18px); }
.cv-head p { margin: 2px 0 0; }
.cv-head-acts { display: flex; gap: 6px; flex-wrap: wrap; }
.cv-threadsearch { display: flex; gap: 8px; align-items: center; margin: 10px 0 4px; }
.cv-threadsearch input { flex: 1; min-width: 0; }
.cv-note { font-size: var(--ds-fs-sm, 12.5px); margin: 4px 0; }
.cv-stream { flex: 1; overflow-y: auto; max-height: 64vh; padding: 4px 2px 8px; display: flex; flex-direction: column; gap: 10px; }
.cv-day { text-align: center; margin: 8px 0 2px; font-size: 12px; color: var(--ds-muted, var(--muted, #5b6472)); font-weight: 600; }
.cv-day span { background: var(--ds-card, #fff); padding: 0 10px; }
.cv-day { background: linear-gradient(var(--ds-line, #dde3ea), var(--ds-line, #dde3ea)) center / 100% 1px no-repeat; }
.cv-item { display: flex; flex-direction: column; max-width: 82%; }
.cv-in { align-self: flex-start; align-items: flex-start; }
.cv-out { align-self: flex-end; align-items: flex-end; }
.cv-bubble { background: #eef1f5; border-radius: 4px 14px 14px 14px; padding: 8px 12px; }
.cv-out .cv-bubble { background: #e9e2fb; color: #2c1d4e; border: 1px solid #cdc0f2; border-radius: 14px 4px 14px 14px; }
.cv-out .cv-bubble a { color: #2c1d4e; }
.cv-body { margin: 0; white-space: pre-wrap; line-height: 1.5; overflow-wrap: anywhere; }
.cv-att { display: inline-block; margin-top: 4px; font-size: 13px; }
.cv-meta { margin: 3px 4px 0; font-size: 11.5px; color: var(--ds-muted, var(--muted, #5b6472)); display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.cv-send-failed { color: var(--ds-danger, #a3261a); font-weight: 600; }
.cv-proj { background: none; border: 1px solid var(--ds-line, #dde3ea); border-radius: 999px; padding: 0 8px; font: inherit; font-size: 11.5px; color: var(--ds-navy, var(--navy, #1d2b4a)); cursor: pointer; line-height: 1.6; }
.cv-proj:hover { background: var(--ds-tint, #e8edf3); }
.cv-proj-unfiled { border-style: dashed; color: var(--ds-muted, #5b6472); }

/* call / voicemail cards */
.cv-call { max-width: 92%; width: 460px; }
.cv-card { width: 100%; box-sizing: border-box; background: var(--ds-card, #fff); border: 1px solid var(--ds-line, var(--line, #dde3ea)); border-radius: 12px; padding: 10px 12px; display: grid; gap: 8px; }
.cv-call.em-needs .cv-card { border-color: var(--ds-warn-line, #e8c47a); }
.cv-card-head { margin: 0; display: flex; gap: 8px; align-items: center; }
.cv-card-time { margin-left: auto; font-size: 12px; color: var(--ds-muted, var(--muted, #5b6472)); }
.cv-audio { display: grid; gap: 2px; }
.cv-audio audio { width: 100%; height: 36px; }
.cv-reclink { font-size: 12px; justify-self: start; }
.cv-summary { background: var(--ds-bg, #f6f8fb); border: 1px solid var(--ds-hair, #e6ebf1); border-radius: 10px; padding: 8px 10px; }
.cv-summary-h { margin: 0 0 4px; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.cv-by { font-size: 11.5px; color: var(--ds-muted, var(--muted, #5b6472)); }
.cv-summary-body { white-space: pre-wrap; line-height: 1.5; font-size: 14px; }
.cv-summary-acts { margin: 6px 0 0; font-size: 13px; }
.cv-vm .cv-body { font-size: 14px; }
.cv-txslot:empty { display: none; }
.cv-card .em-comms-flagrow, .cv-card .em-comms-handled { margin: 0; }

/* tags under the card */
.cv-tags { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.cv-tagchip { display: inline-flex; align-items: center; gap: 2px; background: var(--ds-tint, #e8edf3); color: var(--ds-navy, var(--navy, #1d2b4a)); border-radius: 999px; padding: 1px 4px 1px 9px; font-size: 12px; font-weight: 600; }
.cv-tagx { background: none; border: 0; cursor: pointer; color: inherit; font-size: 14px; line-height: 1; padding: 0 4px; border-radius: 50%; }
.cv-tagx:hover { background: rgba(29, 43, 74, .12); }
.cv-tagadd { display: inline-flex; gap: 4px; align-items: center; }
.cv-tagadd select, .cv-tagadd input { font: inherit; font-size: 12px; padding: 2px 6px; border: 1px dashed var(--ds-line-strong, #b8c2cf); border-radius: 999px; background: transparent; color: inherit; }
.cv-tagadd input { border-style: solid; border-radius: 6px; width: 120px; }

/* the inline file door (the tray's doors, presented where the item is) */
.cv-filedoor { margin-top: 6px; }
.cv-file { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; background: var(--ds-bg, #f6f8fb); border: 1px solid var(--ds-hair, #e6ebf1); border-radius: 10px; padding: 8px; }
.cv-file select { font: inherit; max-width: 100%; }
.cv-file-or { color: var(--ds-muted, #5b6472); font-size: 12px; }
.cv-composer { margin-top: 10px; }

/* ---- the person panel ---- */
.cv-who-top { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; }
.cv-who-top h3 { margin: 0; }
.cv-who-top p { margin: 2px 0 0; font-size: 12.5px; }
.cv-dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; margin: 0; font-size: 13.5px; }
.cv-dl dt { color: var(--ds-muted, var(--muted, #5b6472)); }
.cv-dl dd { margin: 0; overflow-wrap: anywhere; }
.cv-suggest { border-color: var(--ds-navy, var(--navy, #1d2b4a)); }
.cv-projlist { margin: 0 0 6px; padding-left: 18px; }
.cv-filing { font-size: 12.5px; margin: 0; }

/* ---- the transcript (right panel; an expanding block on narrow screens) ---- */
.cv-tx { min-width: 0; background: var(--ds-card, #fff); border: 1px solid var(--ds-line, var(--line, #dde3ea)); border-radius: var(--ds-r, 12px); padding: 10px 12px; display: grid; gap: 8px; }
.cv-txslot .cv-tx { border-radius: 10px; }
.cv-tx-head { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.cv-tx-head .muted { font-size: 12px; flex-basis: 100%; order: 3; }
.cv-tx-head .btn { margin-left: auto; }
.cv-tx-tools { display: flex; gap: 4px; align-items: center; }
.cv-tx-tools input { flex: 1; min-width: 0; width: 0; }
.cv-tx-count { min-width: 38px; text-align: center; font-size: 12.5px; font-variant-numeric: tabular-nums; color: var(--ds-muted, #5b6472); }
.cv-tx-body { min-width: 0; max-height: 52vh; overflow-y: auto; display: grid; gap: 8px; padding-right: 4px; }
.cv-txline { display: grid; gap: 1px; }
.cv-txwho { margin: 0; font-size: 12px; font-weight: 700; color: var(--ds-navy, var(--navy, #1d2b4a)); }
.cv-tx-them .cv-txwho { color: var(--ds-ink, #14202e); }
.cv-txtext { margin: 0; overflow-wrap: anywhere; white-space: pre-wrap; line-height: 1.5; font-size: 14px; }
.cv-hit { background: #fff1b8; color: inherit; border-radius: 2px; padding: 0 1px; }
.cv-hit-on { background: #ffd55c; outline: 1px solid #c79a00; }
.cv-tx-foot { margin: 0; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.cv-tx-foot .muted { font-size: 11.5px; }

.cv-empty { display: grid; place-items: center; min-height: 300px; }
.cv-loading { padding: 20px; }
.cv-tproj { margin: 10px 0; }
.cv-tproj label { display: grid; gap: 2px; max-width: 420px; }

/* ---- the tray as a mode: emails.js's own painter, the list column widened ---- */

/* ---- trade lanes: the select-mode broadcast (both hosts) ---- */
.tl-cohead { display: flex; gap: 10px; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; }
.tl-cohead > span { flex: 1; min-width: 0; }
.tl-select { display: grid; gap: 10px; }
.tl-select textarea { width: 100%; box-sizing: border-box; font: inherit; padding: 8px; }
.tl-pick-all { font-weight: 600; }
.tl-pick { display: grid; gap: 2px; border: 1px solid var(--ds-line, var(--line, #dde3ea)); border-radius: 10px; padding: 6px; max-height: 260px; overflow-y: auto; }
.tl-pick-row { display: flex; gap: 8px; align-items: center; padding: 6px; border-radius: 8px; cursor: pointer; }
.tl-pick-row:hover { background: #f2f5f9; }
.tl-confirm { margin: 0; padding: 8px 10px; background: var(--ds-warn-bg, #fdf4dc); border: 1px solid var(--ds-warn-line, #e8c47a); border-radius: 8px; font-weight: 600; }
.tl-actions { margin: 0; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.tl-results { margin: 0; padding-left: 18px; display: grid; gap: 2px; }
.tl-ok { color: #1f5a3c; }
.tl-bad { color: var(--ds-danger, #a3261a); }

/* ---- narrow screens: list OR thread; the person panel under the thread ---- */
@media (max-width: 1100px) {
  .cv-layout { grid-template-columns: 280px minmax(0, 1fr); }
  .cv-pane-side { grid-column: 2; }
}
@media (max-width: 760px) {
  .cv-layout, .cv-layout.cv-trades { grid-template-columns: 1fr; }
  .cv-pane-side { grid-column: auto; }
  .cv-layout.show-thread .cv-pane-list { display: none; }
  .cv-layout:not(.show-thread) .cv-pane-thread, .cv-layout:not(.show-thread) .cv-pane-side { display: none; }
  .cv-layout.show-thread .cv-back { display: inline-flex; }
  .cv-item { max-width: 94%; }
  .cv-call { width: 100%; }
}

/* ---- wave330: the Records view — one row per text, call or voicemail
 * (a value of the View select, not the Project records mode) ---- */
#cv-list.cv-reclist { max-height: 72vh; overflow-y: auto; }
.cv-rec { display: grid; gap: 3px; padding: 8px 8px 9px 7px; border-left: 3px solid transparent; border-radius: var(--ds-r-sm, 10px); cursor: pointer; }
.cv-rec:hover { background: #f2f5f9; }
.cv-rec.active { background: var(--ds-tint, #e8edf3); }
.cv-rec.em-needs { border-left-color: var(--ds-warn-line, #e8c47a); }
.cv-rec p { margin: 0; }
.cv-rec-top { display: flex; align-items: center; gap: 8px; min-width: 0; }
.cv-rec-open { background: none; border: 0; padding: 0; font: inherit; font-weight: 600; color: inherit; cursor: pointer; text-align: left; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cv-rec-open:focus-visible { outline: 2px solid var(--ds-focus, #6b8cc7); outline-offset: 1px; border-radius: 4px; }
.cv-rec-line { font-size: 12.5px; color: var(--ds-muted, var(--muted, #5b6472)); }
.cv-rec-words { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cv-rec .em-comms-flagrow, .cv-rec .em-comms-handled, .cv-rec .em-tray-genny { margin: 2px 0 0; }
.cv-rec .cv-filedoor { margin-top: 4px; }
.cv-rec-day { margin: 10px 0 4px; }
.cv-rec-more { text-align: center; font-size: 12.5px; margin: 10px 0 4px; }
@media (max-width: 760px) {
  #cv-list.cv-reclist { max-height: none; }
}

/* ---- wave355: the job's conversation list, every audience together ---- */
.pcs-sect { display: flex; flex-direction: column; gap: 1px; margin: 10px 4px 4px; padding-top: 8px; border-top: 1px solid var(--ds-line, var(--line, #dde3ea)); }
.pcs-sect:first-child { margin-top: 2px; padding-top: 0; border-top: 0; }
.pcs-sect-title { font-size: var(--ds-fs-xs, 11.5px); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--ds-navy, var(--navy, #1d2b4a)); }
.pcs-sect-line { font-size: 12px; color: var(--ds-muted, var(--muted, #5b6472)); line-height: 1.35; }
.pcs-dmdoor select, .tr-add select { font: inherit; padding: 5px 6px; border: 1px solid var(--ds-line, var(--line, #dde3ea)); border-radius: var(--ds-r-ctl, 8px); background: var(--ds-card, #fff); color: inherit; max-width: 100%; }
.pcs-dmdoor { display: inline-block; margin-top: 6px; }

/* ---- wave355: the trade group's membership panel + a DM's line ---- */
.tr-members { border: 1px solid var(--ds-line, var(--line, #dde3ea)); border-radius: var(--ds-r-sm, 10px); padding: 10px 12px; margin: 0 0 10px; background: var(--ds-card, var(--card, #fff)); display: grid; gap: 8px; }
.tr-mem-sect { display: grid; gap: 4px; }
.tr-mem-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.tr-mem { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 4px 0; border-bottom: 1px dashed var(--ds-line, var(--line, #dde3ea)); }
.tr-mem:last-child { border-bottom: 0; }
.tr-mem-name { font-weight: 600; margin-right: auto; }
.tr-remove { color: var(--ds-bad, #a33a2b); }
.tr-team, .tr-none { margin: 0; }
.tr-add { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-start; }
.tr-notinvitable { margin: 6px 0 0 16px; font-size: 12.5px; }
.tr-start { display: grid; gap: 6px; max-width: 640px; }
.tr-start p { margin: 0; }

/* wave376: Trade partners, conversation-first (trade-hub.js) — job
 * sections in the lane list and the gold new-chat door. */
.cv-newtrade { width: 100%; margin-bottom: 10px; }
.cv-jobsect { margin-bottom: 14px; }
.cv-jobsect-h { font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--ds-muted, var(--muted, #5b6472)); margin: 10px 8px 4px; }

/* wave377 (2026-11-05): Project records gets its own clean column, as
 * designed — the Unfiled / Screened-out tray block belongs to the tray
 * mode only, not stacked above the project list in records mode.
 * (emRenderTray inserts #em-tray before #em-rows on every records paint;
 * the tray mode carries .cv-traymode on the same layout.) */
.em-layout:not(.cv-traymode) #em-tray { display: none; }

/* ================= wave378 (2026-11-05): Communications is ONE screen =================
 * The frame (comms-view.js cxBuildShell): list column | pane | side. The
 * switcher at the top of the list column changes only that column; a pick
 * paints the pane beside it. Nothing here ever hides the frame on a wide
 * screen — the pane's back buttons are for phones only. */
#view-emails.cx-on #em-count { display: none; }
.cx-shell { display: grid; grid-template-columns: 340px minmax(0, 1fr) 290px; gap: 16px; align-items: start; }
.cx-shell.cx-noside { grid-template-columns: 340px minmax(0, 1fr); }
.cx-shell.cx-noside .cx-side { display: none; }
.cx-list { background: var(--ds-card, var(--card, #fff)); border: 1px solid var(--ds-line, var(--line, #dde3ea)); border-radius: var(--ds-r, 12px); padding: 10px 12px 12px; min-width: 0; position: sticky; top: 8px; max-height: calc(100vh - 24px); display: flex; flex-direction: column; }
.cx-body { min-height: 0; overflow-y: auto; flex: 1; }
.cx-body.hidden, .cx-panebox.hidden, .cx-side > .hidden { display: none; }
/* wave384: 2x2 at every width — the list column is ~340px on desktop too,
   where 4-across wrapped "Project records" exactly like the phone did. */
.cx-switch { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px; background: var(--ds-bg, #f2f5f9); border-radius: 10px; padding: 3px; margin-bottom: 10px; }
.cx-tab { display: flex; flex-direction: row; align-items: center; justify-content: center; gap: 6px; border: 0; background: none; font: inherit; font-size: 12.5px; font-weight: 600; color: var(--ds-muted, var(--muted, #5b6472)); padding: 6px 4px; border-radius: 8px; cursor: pointer; line-height: 1.2; text-align: center; }
.cx-tab:hover { color: var(--ds-navy, var(--navy, #1d2b4a)); }
.cx-tab[aria-selected="true"] { background: var(--ds-card, #fff); color: var(--ds-navy, var(--navy, #1d2b4a)); box-shadow: 0 1px 2px rgba(20, 32, 46, .12); }
.cx-tab:focus-visible { outline: 2px solid var(--ds-focus, #6b8cc7); outline-offset: 1px; }
.cx-tab-n { font-size: 11px; font-weight: 700; min-height: 13px; color: var(--ds-navy, var(--navy, #1d2b4a)); }
.cx-tab-n:empty::after { content: "\00a0"; }
/* wave384: Scope and Sort stack one above the other at EVERY width — in the
   340px list column side by side left the Sort select truncating its value
   ("Newest firs") on desktop too, not just on phones. */
.cx-controls { display: flex; flex-direction: column; gap: 8px; margin-bottom: 8px; padding-bottom: 8px; border-bottom: 1px solid var(--ds-line, var(--line, #dde3ea)); }
.cx-controls label { flex: 1; display: grid; gap: 2px; min-width: 0; }
.cx-controls label:first-child { flex: 1.6; }
.cx-controls select, .conv-sort select { font: inherit; padding: 5px 6px; border: 1px solid var(--ds-line, var(--line, #dde3ea)); border-radius: var(--ds-r-ctl, 8px); background: var(--ds-card, #fff); color: inherit; min-width: 0; max-width: 100%; }
.cx-hint { font-size: 12.5px; margin: 6px 4px; }
.cx-pane { min-width: 0; }
.cx-pane .cv-pane-thread { min-height: 560px; }
.cx-side { display: grid; gap: 12px; min-width: 0; }
#cx-feed #cf-q, #cx-trades #cv-tq { width: 100%; box-sizing: border-box; margin-bottom: 8px; }
/* the feed rows: one per email, call, text — with their triage doors */
.cf-list { display: grid; gap: 2px; }
.cf-row { display: grid; gap: 3px; padding: 8px 8px 9px 7px; border-left: 3px solid transparent; border-radius: var(--ds-r-sm, 10px); cursor: pointer; }
.cf-row:hover { background: #f2f5f9; }
.cf-row.active { background: var(--ds-tint, #e8edf3); }
.cf-row.em-needs { border-left-color: var(--ds-warn-line, #e8c47a); }
.cf-row p { margin: 0; }
.cf-top { display: flex; align-items: center; gap: 8px; min-width: 0; }
.cf-open { background: none; border: 0; padding: 0; font: inherit; font-weight: 600; color: inherit; cursor: pointer; text-align: left; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cf-row.unread .cf-open { font-weight: 800; color: var(--ds-ink, var(--ink, #14202e)); }
.cf-open:focus-visible { outline: 2px solid var(--ds-focus, #6b8cc7); outline-offset: 1px; border-radius: 4px; }
.cf-prev { font-size: 13px; color: var(--ds-muted, var(--muted, #5b6472)); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cf-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 12px; }
.cf-meta:empty { display: none; }
.cf-badge { font-size: 11px; font-weight: 700; border-radius: 999px; padding: 1px 8px; }
.cf-badge-lead { background: #e6f2ea; color: #1f5a3c; }
.cf-badge-spam { background: #f4e4e2; color: var(--ds-danger, #a3261a); }
/* wave432: the auto lead flag + the Quo-style quick chips */
.cf-badge-possible { background: #fdf3d7; color: #7a5410; }
.cf-row.possible { border-left-color: #e3b94e; }
.cf-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.cf-chip { font: inherit; font-size: 12.5px; font-weight: 600; padding: 3px 11px; border: 1px solid var(--ds-line, var(--line, #dde3ea)); border-radius: 999px; background: var(--ds-card, #fff); color: var(--ds-navy, var(--navy, #1d2b4a)); cursor: pointer; line-height: 1.6; }
.cf-chip:hover { background: var(--ds-tint, #e8edf3); }
.cf-chip.on { background: var(--ds-navy, var(--navy, #1d2b4a)); border-color: var(--ds-navy, var(--navy, #1d2b4a)); color: #fff; }
.cf-chip-n { font-weight: 800; }
/* wave433: My trades — section heads inside a trade's conversation.
   wave438: the bulk Assign bar is gone (Micheal: the pane is the chat);
   filing is per message — a ••• menu with a searchable job picker. */
.th-typepick { margin: 2px 0 8px; }
.th-typepick label { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--ds-muted, var(--muted, #5b6472)); }
.th-typepick select { font: inherit; font-weight: 400; padding: 6px 8px; border: 1px solid var(--ds-line, var(--line, #dde3ea)); border-radius: 8px; background: var(--ds-card, #fff); color: inherit; max-width: 100%; }
.th-sub { margin: 14px 0 6px; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--ds-muted, var(--muted, #5b6472)); }
.th-hint { text-transform: none; letter-spacing: 0; font-weight: 400; }
[data-thtradeitems] .cf-row { position: relative; }
.th-dots { font-weight: 700; letter-spacing: 1px; }
.th-menu { position: absolute; right: 10px; top: 36px; z-index: 40; width: 280px; max-width: calc(100% - 20px); background: var(--ds-card, #fff); border: 1px solid var(--ds-line, var(--line, #dde3ea)); border-radius: 10px; box-shadow: 0 12px 32px rgba(20, 16, 43, .20); padding: 6px; }
.th-menu-it { display: block; width: 100%; text-align: left; background: none; border: 0; font: inherit; padding: 8px 10px; border-radius: 7px; cursor: pointer; color: inherit; }
.th-menu-it:hover { background: var(--ds-tint, #e8edf3); }
.th-pick-q { width: 100%; box-sizing: border-box; font: inherit; padding: 7px 9px; border: 1px solid var(--ds-line, var(--line, #dde3ea)); border-radius: 8px; margin-bottom: 6px; background: var(--ds-card, #fff); color: inherit; }
.th-pick-list { max-height: 240px; overflow: auto; display: flex; flex-direction: column; gap: 2px; }
.th-pick-it { display: block; width: 100%; text-align: left; background: none; border: 0; font: inherit; padding: 7px 10px; border-radius: 7px; cursor: pointer; color: inherit; }
.th-pick-it:hover { background: var(--ds-tint, #e8edf3); }
.th-pick-load { margin: 6px 10px; }
/* wave434: the same project toggle under the Conversations page thread head */
.conv-toggle { margin: 8px 0 2px; }
.cf-acts { display: flex; flex-wrap: wrap; gap: 4px; }
.cf-foot { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; justify-content: space-between; }
.cf-foot .cf-acts { margin-left: auto; }
.cf-act { font: inherit; font-size: 12px; font-weight: 600; padding: 2px 9px; border: 1px solid var(--ds-line, var(--line, #dde3ea)); border-radius: 999px; background: var(--ds-card, #fff); color: var(--ds-navy, var(--navy, #1d2b4a)); cursor: pointer; line-height: 1.6; }
.cf-act:hover { background: var(--ds-tint, #e8edf3); }
.cf-act.on { background: var(--ds-navy, var(--navy, #1d2b4a)); border-color: var(--ds-navy, var(--navy, #1d2b4a)); color: #fff; }
.cf-act-del { color: var(--ds-danger, #a3261a); }
.cf-act:disabled { opacity: .55; cursor: default; }
.cf-filebar { margin-top: 4px; cursor: default; }
.cf-filebar.hidden { display: none; }
.cf-file select { max-width: 100%; }
/* the open item's triage bar, above its conversation */
.cf-triage { background: var(--ds-card, #fff); border: 1px solid var(--ds-line, var(--line, #dde3ea)); border-radius: var(--ds-r, 12px); padding: 10px 12px; margin-bottom: 10px; display: grid; gap: 6px; }
.cf-triage p { margin: 0; }
.cf-triage-h { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
#cx-triage:empty { display: none; }
.cf-focus .cv-bubble, .cf-focus .msg-bubble, .cf-focus .cv-card, .cf-focus.cf-mailitem > .em-card, .cf-focus .em-card { box-shadow: 0 0 0 2px var(--ds-focus, #6b8cc7); }
.cf-mailstream .cf-mailitem { max-width: 100%; }
/* the Trades spot */
.cx-tradefeed { padding-bottom: 8px; border-bottom: 1px solid var(--ds-line, var(--line, #dde3ea)); }
.cx-reclink { font-size: 11px; text-transform: none; letter-spacing: 0; font-weight: 600; margin-left: 4px; }
.cx-grouptop { margin: 10px 0; }
/* emails.js's record nodes, now inside the frame (they keep their ids) */
#cx-records .em-pane-list { display: flex; flex-direction: column; gap: 6px; border: 0; padding: 0; background: none; box-shadow: none; }
#cx-records #em-search { width: 100%; box-sizing: border-box; }
#cx-record .em-pane-thread { background: var(--ds-card, var(--card, #fff)); border: 1px solid var(--ds-line, var(--line, #dde3ea)); border-radius: var(--ds-r, 12px); padding: 12px; min-width: 0; }
#cx-record .em-back, .cx-shell .cv-back { display: none; }
#cx-rail .em-rail { display: grid; gap: 12px; }
#cx-rail .em-rail.hidden { display: none; }
#cx-meet > * { min-width: 0; }
/* the Conversations list's Sort control (trade-rooms.js) */
.conv-sort { display: inline-grid; gap: 2px; margin-left: 8px; vertical-align: bottom; }
@media (max-width: 1100px) {
  .cx-shell, .cx-shell.cx-noside { grid-template-columns: 300px minmax(0, 1fr); }
  .cx-side { grid-column: 2; }
}
@media (max-width: 760px) {
  .cx-shell, .cx-shell.cx-noside { grid-template-columns: 1fr; }
  .cx-list { position: static; max-height: none; }
  .cx-side { grid-column: auto; }
  .cx-shell.show-thread .cx-list { display: none; }
  .cx-shell:not(.show-thread) .cx-pane, .cx-shell:not(.show-thread) .cx-side { display: none; }
  .cx-shell.show-thread .cv-back, .cx-shell.show-thread #cx-record .em-back { display: inline-flex; }
  /* wave384: Scope and Sort stack full-width (side by side the Sort select
     truncated to "Newest firs"), and the view never pushes wider than the
     phone — his landing was clipped at the right edge, subtitle included. */
  .cx-controls label, .cx-controls label:first-child { flex: none; }
  #view-emails { overflow-x: clip; }
  #view-emails .page-head .muted { max-width: 100%; }
}

/* wave440: the trades-in-chat switch bar on the client thread */
.cm-tradebar { display:flex; align-items:center; gap:10px; flex-wrap:wrap; border:1px solid var(--line, #e3e0ee); border-radius:10px; padding:8px 12px; margin:0 0 10px; }
.cm-trade-sw { display:inline-flex; align-items:center; gap:7px; cursor:pointer; }
.cm-trade-sw input { width:17px; height:17px; accent-color:#6d28d9; }

/* ---- wave514: the threads ARE the portal chat ----
 * cvItemHtml and the trade thread emit chat.css's structure (.comment.msg
 * rows, .msg-bubble, .msg-day); chat.css scopes its own rules to
 * .comments-list, so the same values are painted here, scoped to the
 * comms thread containers (#cv-thread also serves the project tab's
 * thread, which shares the painter). */
#cv-thread .comment.msg, .cv-trade-thread .comment.msg { display: flex; gap: 10px; align-items: flex-start; width: 100%; max-width: none; padding: 8px 0; border-bottom: 0; }
#cv-thread .comment.msg .msg-av, .cv-trade-thread .comment.msg .msg-av { flex: none; margin-top: 1px; }
.cv-ava-sm { width: 28px; height: 28px; font-size: 11px; }
#cv-thread .comment.msg .msg-main, .cv-trade-thread .comment.msg .msg-main { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; }
#cv-thread .comment.msg.mine .msg-main, .cv-trade-thread .comment.msg.mine .msg-main { align-items: flex-end; }
#cv-thread .comment.msg .c-head, .cv-trade-thread .comment.msg .c-head { margin: 0 0 4px; font-size: 12.5px; color: var(--muted); }
#cv-thread .comment.msg .c-head b, .cv-trade-thread .comment.msg .c-head b { color: var(--ink); font-size: 13px; font-weight: 600; }
#cv-thread .comment.msg .c-time, .cv-trade-thread .comment.msg .c-time { font-size: 11.5px; font-weight: 400; }
#cv-thread .msg-bubble, .cv-trade-thread .msg-bubble { background: #eef1f5; border-radius: 4px 14px 14px 14px; padding: 9px 13px; max-width: 78%; width: fit-content; }
#cv-thread .comment.msg.mine .msg-bubble, .cv-trade-thread .comment.msg.mine .msg-bubble { background: #e9e2fb; color: #2c1d4e; border: 1px solid #cdc0f2; border-radius: 14px 4px 14px 14px; }
#cv-thread .msg-bubble .c-body, .cv-trade-thread .msg-bubble .c-body { font-size: 14px; line-height: 1.5; margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
#cv-thread .comment.msg.mine .c-body, .cv-trade-thread .comment.msg.mine .c-body { color: #2c1d4e; }
#cv-thread .msg-bubble .cv-att, .cv-trade-thread .msg-bubble .cv-att { color: inherit; font-size: 12.5px; }
#cv-thread .comment.msg .cv-meta, .cv-trade-thread .comment.msg .cv-meta { margin: 4px 2px 0; }
#cv-thread .msg-day, .cv-trade-thread .msg-day { display: flex; align-items: center; gap: 10px; margin: 14px 0 8px; }
#cv-thread .msg-day::before, #cv-thread .msg-day::after, .cv-trade-thread .msg-day::before, .cv-trade-thread .msg-day::after { content: ''; flex: 1; height: 1px; background: var(--line); }
#cv-thread .msg-day span, .cv-trade-thread .msg-day span { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
#cv-thread .cv-call .cv-card, .cv-trade-thread .cv-call .cv-card { width: 460px; max-width: 100%; margin: 0; }
#cv-thread .cv-stream, .cv-trade-thread .cv-stream { gap: 2px; }
/* emails in a thread: the subject + body card, bubble-shaped */
.cv-trade-thread .cv-mail .em-card { border-radius: 4px 14px 14px 14px; width: 100%; }
.cv-trade-thread .cv-mail.mine .em-card { border-radius: 14px 4px 14px 14px; }
#cv-thread .cf-mailstream .cf-mailitem > .em-card, #cv-thread .cv-stream > .em-card { border-radius: 4px 14px 14px 14px; }
#cv-thread .cf-mailstream .cf-mailitem > .em-card.em-out, #cv-thread .cv-stream > .em-card.em-out { border-radius: 14px 4px 14px 14px; }
/* the composer sits at the thread's foot, flush like the chat's own */
#cv-layout #cv-thread .em-notebox.em-logbox.cv-composer, #cv-layout #cv-tlane .em-notebox.em-logbox.cv-composer { background: transparent; border: 0; border-top: 1px solid var(--line); border-radius: 0; box-shadow: none; padding: 10px 2px 2px; margin: 0; }
#cv-thread .cv-composer .em-note-input, .cv-trade-thread .cv-composer .em-note-input { border-radius: 12px; }
@media (max-width: 760px) { #cv-thread .msg-bubble, .cv-trade-thread .msg-bubble { max-width: 88%; } }

/* ---- wave537: Project records paints the same bubbles ----
 * emails.js's stream renders its phone-channel comms rows through
 * cvItemHtml too (emails-cards.js's emCommsBubble), so the wave514
 * values are mirrored here, scoped to the record stream — the same
 * thread, the same bubbles, on the record as in the Feed. */
#em-stream .comment.msg.cv-item { display: flex; gap: 10px; align-items: flex-start; width: 100%; max-width: none; padding: 8px 0; border-bottom: 0; }
#em-stream .comment.msg.cv-item .msg-av { flex: none; margin-top: 1px; }
#em-stream .comment.msg.cv-item .msg-main { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; }
#em-stream .comment.msg.cv-item.mine .msg-main { align-items: flex-end; }
#em-stream .comment.msg.cv-item .c-head { margin: 0 0 4px; font-size: 12.5px; color: var(--muted); }
#em-stream .comment.msg.cv-item .c-head b { color: var(--ink); font-size: 13px; font-weight: 600; }
#em-stream .comment.msg.cv-item .c-time { font-size: 11.5px; font-weight: 400; }
#em-stream .cv-item .msg-bubble { background: #eef1f5; border-radius: 4px 14px 14px 14px; padding: 9px 13px; max-width: 78%; width: fit-content; }
#em-stream .cv-item.mine .msg-bubble { background: #e9e2fb; color: #2c1d4e; border: 1px solid #cdc0f2; border-radius: 14px 4px 14px 14px; }
#em-stream .cv-item .msg-bubble .c-body { font-size: 14px; line-height: 1.5; margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
#em-stream .cv-item.mine .msg-bubble .c-body { color: #2c1d4e; }
#em-stream .cv-item .msg-bubble .cv-att { color: inherit; font-size: 12.5px; }
#em-stream .cv-item .cv-meta { margin: 4px 2px 0; }
#em-stream .cv-call .cv-card { width: 460px; max-width: 100%; margin: 0; }
@media (max-width: 760px) { #em-stream .cv-item .msg-bubble { max-width: 88%; } }
/* the Trades spot's people rows: a long email wraps instead of running wide */
.th-people li { overflow-wrap: anywhere; }

/* ---- wave668: the Quo look — playable bars, file cards, inline media ----
 * Unscoped on purpose: the Feed thread, the project tab, the Trades thread
 * and the record stream all render cvItemHtml, so they all wear these. */
.cv-abar { display: flex; align-items: center; gap: 10px; padding: 4px 0; min-width: 220px; }
.cv-abar audio { display: none; }
.cv-abar-play { flex: none; width: 34px; height: 34px; border: 0; border-radius: 50%; background: #6d28d9; color: #fff; font-size: 13px; line-height: 1; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.cv-abar-play:hover { background: #5b21b6; }
.cv-abar-track { position: relative; flex: 1; height: 6px; border-radius: 3px; background: rgba(23, 16, 45, .16); cursor: pointer; }
.cv-abar-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 3px; background: #6d28d9; }
.cv-abar-time { flex: none; font-size: 12px; font-variant-numeric: tabular-nums; opacity: .85; }
.cv-abar-speed { flex: none; border: 1px solid rgba(23, 16, 45, .25); background: transparent; color: inherit; border-radius: 999px; padding: 2px 9px; font-size: 12px; cursor: pointer; }
.cv-audio .cv-abar { margin-bottom: 4px; }
.msg-bubble .cv-filecard, .msg-bubble .cv-abar, .msg-bubble .cv-attlink, .msg-bubble .cv-attvid { margin-top: 6px; }
.msg-bubble > .cv-filecard:first-child, .msg-bubble > .cv-abar:first-child, .msg-bubble > .cv-attlink:first-child, .msg-bubble > .cv-attvid:first-child { margin-top: 0; }
.cv-attimg { display: block; max-width: 320px; width: 100%; height: auto; border-radius: 10px; }
.cv-attvid { display: block; max-width: 360px; width: 100%; border-radius: 10px; }
.cv-filecard { display: flex; align-items: center; gap: 6px; background: #fff; border: 1px solid var(--line, #dde3ea); border-radius: 10px; padding: 8px 10px; max-width: 340px; }
.cv-filecard-main { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; color: inherit; text-decoration: none; }
.cv-filecard-ico { flex: none; width: 34px; height: 34px; border-radius: 8px; background: #efe9fd; color: #5b21b6; display: inline-flex; align-items: center; justify-content: center; }
.cv-filecard-tx { min-width: 0; display: flex; flex-direction: column; }
.cv-filecard-tx b { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cv-filecard-tx small { font-size: 11.5px; color: var(--muted); }
.cv-att-wrap { position: relative; flex: none; }
.cv-att-btn { border: 0; background: transparent; color: inherit; font-size: 14px; letter-spacing: 1px; padding: 4px 6px; border-radius: 6px; cursor: pointer; opacity: .7; }
.cv-att-btn:hover { opacity: 1; background: rgba(23, 16, 45, .06); }
.cv-att-menu { position: absolute; right: 0; top: calc(100% + 4px); z-index: 40; min-width: 150px; background: #fff; border: 1px solid var(--line, #dde3ea); border-radius: 10px; box-shadow: 0 10px 28px rgba(16, 24, 40, .16); padding: 4px; display: flex; flex-direction: column; }
.cv-att-menu a, .cv-att-menu button { padding: 8px 10px; font-size: 13px; color: var(--ink); text-decoration: none; background: none; border: 0; text-align: left; border-radius: 6px; cursor: pointer; font: inherit; }
.cv-att-menu a:hover, .cv-att-menu button:hover { background: #f2f0fa; }
.cv-summary-list { margin: 4px 0 0; padding-left: 18px; }
.cv-summary-list li { margin: 2px 0; line-height: 1.45; }

/* ---- wave670: the Quo look, second pass — Sona, voicemail, pictures ----
 * Outbound rows mirror on EVERY comms surface: the sender's picture sits
 * beside their bubble on the right, Quo-style (row-reverse over the same
 * flex row the wave514 values built) — one rule for the thread, the
 * trade thread and the record stream, so outbound can never sit left in
 * one thread and right in another again. */
#cv-thread .comment.msg.mine, .cv-trade-thread .comment.msg.mine, #em-stream .comment.msg.cv-item.mine { flex-direction: row-reverse; }
#cv-thread .comment.msg.mine .c-head, .cv-trade-thread .comment.msg.mine .c-head, #em-stream .comment.msg.cv-item.mine .c-head { text-align: right; }
/* a grouped run of texts: no repeated name or picture, tighter stack */
.cv-avspacer { width: 28px; height: 28px; }
#cv-thread .comment.msg.cv-grouped, .cv-trade-thread .comment.msg.cv-grouped, #em-stream .comment.msg.cv-item.cv-grouped { padding-top: 1px; }
/* the thread head: the counterparty's picture beside their name */
.cv-head-id { display: flex; gap: 10px; align-items: center; min-width: 0; }
/* Sona + voicemail card dressing */
.cv-card-sub { font-size: 12.5px; font-weight: 400; color: var(--ds-muted, var(--muted, #5b6472)); }
.em-chip-sona, .cv-chip-sona { background: #ede9fe; color: #5b21b6; }
.cv-card-sona { border-color: #cdc0f2; box-shadow: inset 3px 0 0 #6d28d9; }
/* the transcript panel, Quo's shape: Back leads, the call card repeats,
 * the speaker's name leads each line */
.cv-tx-head .btn { margin-left: 0; }
.cv-tx-card { background: var(--ds-bg, #f6f8fb); border: 1px solid var(--ds-hair, #e6ebf1); border-radius: 10px; padding: 8px 10px; display: grid; gap: 6px; }
.cv-tx-card .cv-card-head { margin: 0; }
.cv-txline { display: block; margin: 0; line-height: 1.5; }
.cv-txwho { font-size: 13px; }
.cv-tx-tags { margin: 0; display: flex; gap: 6px; flex-wrap: wrap; }
/* the side rail's contact picture at the card's size, photo or glyph */
.cv-who-top .cv-ava-sm { width: 40px; height: 40px; font-size: 13px; }
.cf-top .avatar-chip { flex: none; }

/* ---- wave671: the Quo look, third pass — the summary card, the
 * transcript's turn rows, the audio bar's clock ---- */
/* The summary is its own white card now, Quo's shape: the sparkle
 * heading with its reader named the same small way, View transcript
 * at the top right, the points, a Next steps section when the
 * summary's own words carry one, and Copy at the foot under a
 * hairline. It sits inside the call card exactly where the pale box
 * sat; the Sona card inherits the same shared card. */
.cv-summary.cv-sumcard { background: var(--ds-card, #fff); border: 1px solid var(--ds-line, var(--line, #dde3ea)); border-radius: 12px; padding: 10px 12px; }
.cv-sum-top { display: flex; align-items: baseline; gap: 10px; }
.cv-sum-top .cv-summary-h { margin: 0; flex: 1; min-width: 0; }
.cv-sum-tx { flex: none; font-size: 13px; white-space: nowrap; }
.cv-sum-next-h { margin: 9px 0 1px; font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--ds-navy, var(--navy, #1d2b4a)); }
.cv-sumcard .cv-summary-acts { border-top: 1px solid var(--ds-hair, #e6ebf1); padding-top: 6px; margin-top: 8px; }
/* Transcript turns: a gutter column like Quo's — hers carries the
 * per-line times; the stored transcript has none, so the gutter
 * stays honestly empty and the turn's text edge lines up under it. */
.cv-tx-body { gap: 10px; }
.cv-txline { display: grid; grid-template-columns: 2.75em minmax(0, 1fr); gap: 10px; }
.cv-txgutter { display: block; }
.cv-txmain { min-width: 0; }
/* The audio clock holds its width while a total is still landing. */
.cv-abar-time { min-width: 88px; text-align: right; }

/* wave671c: a voice-note bar whose length the browser cannot report
 * (MediaRecorder WebMs with no Duration element) is unseekable by
 * construction — cvWireAudio marks it inert and every seek toward it is
 * refused, so the clock can never read a pending seek target again. The
 * bar reads as a plain progress strip: no thumb to grab. */
.cv-audio.unseekable .cv-aseek { pointer-events: none; }
.cv-audio.unseekable .cv-aseek::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; }
.cv-audio.unseekable .cv-aseek::-moz-range-thumb { visibility: hidden; }

/* ————— wave672: the conversation list — Quo's tabs, not a chip wall —————
 * The quick-filter chips and the Show / Kind selects are gone. The list
 * filters by text tabs across the top of the feed column: plain words,
 * the active one in house navy with a 2px violet underline, counts in
 * violet. Same register as the rest of the program — no new colours. */
.cf-tabs { display: flex; flex-wrap: wrap; gap: 2px 18px; padding: 2px 2px 0; margin-bottom: 6px; border-bottom: 1px solid var(--border, #ddd); }
.cf-tab { position: relative; appearance: none; border: 0; background: none; font: inherit; font-size: 13px; font-weight: 600; color: var(--muted, #5A6577); padding: 8px 1px 9px; cursor: pointer; white-space: nowrap; }
.cf-tab:hover { color: var(--text, #14213D); }
.cf-tab.on { color: var(--text, #14213D); }
.cf-tab.on::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--violet, #4A1D8F); border-radius: 2px; }
.cf-tab-n { color: var(--violet, #4A1D8F); font-weight: 700; font-variant-numeric: tabular-nums; }
/* wave707-quo: the list head's doors + filter row, Quo's shape. */
.cf-actions { display: flex; gap: 8px; margin: 4px 0 10px; }
.cf-actbtn { appearance: none; border: 1px solid var(--border, #d8d4cc); background: var(--card, #fff); color: var(--text, #14213D); font: inherit; font-size: 12.5px; font-weight: 600; padding: 6px 12px; border-radius: 999px; cursor: pointer; }
.cf-actbtn:hover { border-color: var(--violet, #4A1D8F); color: var(--violet, #4A1D8F); }
.cf-filters { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 8px; }
.cf-chip { appearance: none; border: 1px solid var(--border, #d8d4cc); background: transparent; color: var(--muted, #5A6577); font: inherit; font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; cursor: pointer; white-space: nowrap; }
.cf-chip:hover { color: var(--text, #14213D); border-color: var(--muted, #5A6577); }
.cf-chip.on { background: #e9e2fb; border-color: var(--violet, #4A1D8F); color: var(--violet, #4A1D8F); }
.cf-numdlg-back { position: fixed; inset: 0; background: rgba(16, 10, 34, .45); display: flex; align-items: flex-start; justify-content: center; padding: 12vh 16px 16px; z-index: 220; }
.cf-numdlg { background: var(--card, #fff); color: var(--text, #14213D); border-radius: 12px; padding: 18px 20px; width: 340px; max-width: 100%; box-shadow: 0 18px 50px rgba(10, 6, 24, .35); }
.cf-numdlg h3 { margin: 0 0 12px; font-size: 16px; }
.cf-numdlg-l { display: block; font-size: 12.5px; font-weight: 600; color: var(--muted, #5A6577); }
.cf-numdlg-l input { display: block; width: 100%; margin-top: 5px; font: inherit; font-size: 15px; color: var(--text, #14213D); padding: 8px 10px; border: 1px solid var(--border, #d8d4cc); border-radius: 8px; background: var(--card, #fff); }
.cf-numdlg-note { font-size: 12px; margin: 8px 0 0; }
.cf-numdlg-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.cf-row.cf-conv { cursor: pointer; }
.cf-row.cf-conv:hover { border-color: var(--violet, #4A1D8F); }
.cf-conv .cf-open { font-size: 14.5px; }

/* ————— wave672: the conversation header —————
 * The job is named once, under the counterparty's name, and the •••
 * menu on the right carries filing / lead / handled / spam / delete.
 * Quo's register: a calmer head than the old fs-h3 (20px) — 17px,
 * with the conversation's timestamps staying tabular. */
#cv-thread .cv-head h2 { font-size: 17px; }
.cf-cjob { margin: 2px 0 0; font-size: 12.5px; color: var(--muted, #5A6577); }
.cf-cjoblink { appearance: none; border: 0; background: none; font: inherit; font-weight: 600; color: var(--text, #14213D); padding: 0; cursor: pointer; }
.cf-cjoblink:hover { text-decoration: underline; }
.cf-cjob-none { font-style: italic; }
.cf-menu-wrap { position: relative; }
.cf-menu-btn { font-weight: 700; letter-spacing: 1px; }
.cf-menu { min-width: 216px; }
.cf-menu button[data-cfmenlead] { white-space: nowrap; }
#cv-thread .cv-filedoor:not(.hidden) { margin: 10px 0 2px; }

/* ————— wave695: Quo-compact density + the missed-call card —————
 * Micheal (2026-11-14): "the layout like Quo… the font is still big."
 * The wave514/537 thread values carried the portal chat's 14px / 1.5
 * register; Quo runs tighter. Everything below is the same surfaces at
 * ~13.5px body, 1.42 leading, slimmer bubbles and rows — the Sona card,
 * the own-bubble violet and the wave672 grouping are untouched. The
 * missed-call card finally wears Quo's dressing (audit #16): a warm
 * amber card with the red phone chip; its reason line is the stored
 * fact only — not answered — never Quo's per-call wording, which the
 * payloads don't carry. */
.cv-body { line-height: 1.42; }
#cv-thread .msg-bubble .c-body, .cv-trade-thread .msg-bubble .c-body, #em-stream .cv-item .msg-bubble .c-body { font-size: 13.5px; line-height: 1.42; }
#cv-thread .msg-bubble, .cv-trade-thread .msg-bubble, #em-stream .cv-item .msg-bubble { padding: 7px 11px; }
.cv-bubble { padding: 7px 11px; }
#cv-thread .comment.msg, .cv-trade-thread .comment.msg, #em-stream .comment.msg.cv-item { padding: 5px 0; }
#cv-thread .comment.msg .c-head, .cv-trade-thread .comment.msg .c-head, #em-stream .comment.msg.cv-item .c-head { font-size: 12px; margin: 0 0 3px; }
#cv-thread .comment.msg .c-head b, .cv-trade-thread .comment.msg .c-head b, #em-stream .comment.msg.cv-item .c-head b { font-size: 12.5px; }
#cv-thread .comment.msg .c-time, .cv-trade-thread .comment.msg .c-time, #em-stream .comment.msg.cv-item .c-time { font-size: 11px; }
.cv-meta { font-size: 11px; }
#cv-thread .msg-bubble .cv-att, .cv-trade-thread .msg-bubble .cv-att, #em-stream .cv-item .msg-bubble .cv-att { font-size: 12px; }
.cv-att { font-size: 12.5px; }
/* the summary + voicemail + transcript text, one register down */
.cv-summary-body { font-size: 13.5px; line-height: 1.45; }
.cv-summary-list { font-size: 13.5px; }
.cv-summary-list li { margin: 1px 0; line-height: 1.4; }
.cv-summary-acts { font-size: 12.5px; }
.cv-sum-tx { font-size: 12.5px; }
.cv-vm .cv-body { font-size: 13.5px; }
.cv-txtext { font-size: 13.5px; line-height: 1.45; }
.cv-txwho { font-size: 12.5px; }
/* cards + player chrome */
.cv-card { padding: 9px 11px; gap: 7px; }
.cv-card-time { font-size: 11.5px; }
.cv-abar-time { font-size: 11.5px; }
.cv-reclink { font-size: 11.5px; }
.cv-filecard { padding: 7px 9px; }
.cv-filecard-tx b { font-size: 12.5px; }
.cv-filecard-tx small { font-size: 11px; }
.cv-tagchip { font-size: 11.5px; }
/* list rows + feed rows */
.cv-row { padding: 7px 8px; }
.cv-row-name { font-size: 13.5px; }
.cv-row-prev { font-size: 12.5px; }
.cv-row-time { font-size: 11.5px; }
.cf-row { padding: 7px 8px 8px 7px; }
.cf-prev { font-size: 12.5px; }
.cf-meta { font-size: 11.5px; }
.cf-conv .cf-open { font-size: 14px; }
.cf-chip { font-size: 12px; padding: 2px 10px; }
.cv-rec { padding: 7px 8px 8px 7px; }
.cv-rec-words { font-size: 12.5px; }
.cv-rec-line { font-size: 12px; }
.cv-day { font-size: 11.5px; }
.cf-tab { font-size: 12.5px; padding: 7px 1px 8px; }
.cx-tab { font-size: 12px; }
.cv-filterline { font-size: 12px; }
/* the person rail */
.cv-dl { font-size: 13px; gap: 3px 10px; }
.cv-who-top p { font-size: 12px; }
.cv-filing { font-size: 12px; }
/* audit #16: the missed-call card — amber, with the red phone chip */
.cv-card-missed { background: #fff8ec; border-color: var(--ds-warn-line, #e8c47a); box-shadow: inset 3px 0 0 #d97706; }
.cv-card-missed .em-chip-call { background: #fbeae8; color: #a3261a; }

/* ————— wave701-comms: the Quo remainder —————
 * The fixable legs of the 2026-11-15 recheck, presentation side.
 * House rules untouched: the own bubble stays #e9e2fb / #2c1d4e, the
 * "Genny's read" by-line stays, the Sona card's shape stays. */
/* #2: a failed auto-reply's list snippet, in the failed red */
.cv-prev-failed { color: var(--ds-danger, #a3261a); font-weight: 600; }
/* #7: the run leader keeps its name; the clock shows on hover only */
#cv-thread .comment.msg .c-head .c-time, .cv-trade-thread .comment.msg .c-head .c-time, #em-stream .comment.msg.cv-item .c-head .c-time { opacity: 0; transition: opacity .12s ease-in-out; }
#cv-thread .comment.msg:hover .c-head .c-time, #cv-thread .comment.msg:focus-within .c-head .c-time, .cv-trade-thread .comment.msg:hover .c-head .c-time, .cv-trade-thread .comment.msg:focus-within .c-head .c-time, #em-stream .comment.msg.cv-item:hover .c-head .c-time, #em-stream .comment.msg.cv-item:focus-within .c-head .c-time { opacity: 1; }
/* #9: an auto-reply's own tint — a lighter lavender, dashed edge, so
 * it never reads as a human's house-violet bubble */
#cv-thread .comment.msg.mine .msg-bubble.cv-bubble-auto, .cv-trade-thread .comment.msg.mine .msg-bubble.cv-bubble-auto, #em-stream .comment.msg.cv-item.mine .msg-bubble.cv-bubble-auto { background: #f3efff; border: 1px dashed #a78bda; }
.cv-auto-label { color: #5b21b6; font-weight: 600; }
/* #10: the hover ••• pill on a message (the button fades in; an open
 * menu keeps it lit) + the per-item file door at the row's full width */
#cv-thread .comment.msg, .cv-trade-thread .comment.msg, #em-stream .comment.msg.cv-item { position: relative; }
.cv-msg-menu { position: absolute; top: 2px; right: 2px; z-index: 6; }
#cv-thread .comment.msg.mine .cv-msg-menu, .cv-trade-thread .comment.msg.mine .cv-msg-menu, #em-stream .comment.msg.cv-item.mine .cv-msg-menu { right: 42px; }
.cv-msg-dots { opacity: 0; }
.cv-item:hover .cv-msg-dots, .cv-item:focus-within .cv-msg-dots, .cv-msg-dots[aria-expanded="true"] { opacity: .85; }
.cv-item .cv-filedoor { align-self: stretch; }
/* #11: the day divider in Quo's shape — centred plain text, the full
 * date + time; the caps and the rules are gone */
#cv-thread .msg-day, .cv-trade-thread .msg-day { display: block; text-align: center; margin: 16px 0 10px; }
#cv-thread .msg-day::before, #cv-thread .msg-day::after, .cv-trade-thread .msg-day::before, .cv-trade-thread .msg-day::after { content: none; }
#cv-thread .msg-day span, .cv-trade-thread .msg-day span { font-size: 12px; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--muted); white-space: nowrap; }
/* #13: the call bar's mute + the card head's ••• */
.cv-abar-mute { flex: none; border: 0; background: transparent; color: inherit; font-size: 14px; line-height: 1; padding: 2px 4px; border-radius: 6px; cursor: pointer; opacity: .75; }
.cv-abar-mute:hover { opacity: 1; background: rgba(23, 16, 45, .06); }
.cv-card-menu { margin-left: 2px; }
/* #19: tag chips on a list row (no × — the editor lives in the thread) */
.cv-tagchip-list { padding: 1px 8px; }
/* #22: an image's caption row — filename + Download under the picture;
 * the wave668 bubble margins move to the figure / audio wrappers */
.cv-attfig { margin: 0; }
.msg-bubble .cv-attfig { margin-top: 6px; }
.msg-bubble > .cv-attfig:first-child { margin-top: 0; }
.msg-bubble .cv-attfig .cv-attlink { margin-top: 0; }
.cv-attcap { display: flex; align-items: center; gap: 8px; margin-top: 4px; font-size: 11.5px; }
.cv-attname { min-width: 0; max-width: 230px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; opacity: .85; }
.msg-bubble .cv-audio { margin-top: 6px; }
.msg-bubble > .cv-audio:first-child { margin-top: 0; }
.msg-bubble .cv-audio .cv-abar { margin-top: 0; }
/* #26: the in-thread Potential spam banner (Quo's shape; its Not spam
 * button rides the existing comms_unscreen door) */
.cf-spam-banner { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: #fbf0ef; border: 1px solid #ecc9c5; color: #7c241a; border-radius: 10px; padding: 8px 12px; margin: 10px 0 2px; font-size: 13px; }

/* wave713-comms: the auto-reply's Reply + the rail action row */
.cv-replybtn { font-size: 11.5px; padding: 0 2px; }
.cv-rail-acts { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 12px; }
.cv-rail-acts .btn { flex: 1 1 auto; text-align: center; text-decoration: none; }
