/* Valnivo Agent Console 0.6.0 "Trace": near-black ground, hairlines, one ember orange for working, unread and mentions.
   Amber only for "needs you", red only for errors. Hex only in the token blocks. */
@font-face { font-family: "Onest"; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/onest-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Onest"; font-style: normal; font-weight: 500; font-display: swap; src: url(fonts/onest-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: "Onest"; font-style: normal; font-weight: 600; font-display: swap; src: url(fonts/onest-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "Martian Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/martian-mono-latin-400-normal.woff2) format("woff2"); }
html.cx-app, html.cx-app body {
  margin: 0;
  height: 100%;
  overflow: hidden;              /* an app shell: the panes scroll, never the page (no second scrollbar) */
  background: #0a0b0d;
  color-scheme: dark;
}
html.cx-app[data-theme=light], html.cx-app[data-theme=light] body { background: #ffffff; color-scheme: light; }
.cx, .cx-toast, .cx-key, .cx-viewer {
  --cx-bg: #0a0b0d;
  --cx-side: #0d0e11;
  --cx-aside: #0a0b0d;
  --cx-panel: #121317;
  --cx-card-bg: #0d0e11;
  --cx-field: #121317;
  --cx-raised: #17181c;
  --cx-bubble: #1a1b20;
  --cx-line: #1b1c20;
  --cx-line-2: #1f2025;
  --cx-line-btn: #26272c;
  --cx-line-soft: #16171b;
  --cx-line-strong: #2a2b31;
  --cx-text: #e9e9ea;
  --cx-text-2: #c9c9ce;
  --cx-text-muted: #9a9ba2;
  --cx-text-faint: #8b8c93;
  --cx-white: #ffffff;
  /* the one primary fill is light on dark (the send button), never coloured */
  --cx-accent: #e9e9ea;
  --cx-accent-hi: #ffffff;
  --cx-accent-ink: #0a0b0d;
  --cx-ember: #ff6a3d;
  --cx-ember-text: #ff8c66;
  --cx-ember-ink: #0a0b0d;
  --cx-ok-bg: #17181c;
  --cx-ok-fg: #e9e9ea;
  --cx-user-bubble: #1a1b20;
  --cx-success: #ff6a3d;
  --cx-warning: #f0b54a;
  --cx-warn-text: #f0b54a;
  --cx-warn-bg: #1f1a10;
  --cx-warn-line: #3d3220;
  --cx-warn-card: #0a0b0d;
  --cx-warn-strip: #0d0e11;
  --cx-warn-btn: #2f2a20;
  --cx-danger: #f2645a;
  --cx-danger-line: #4a2523;
  --cx-info: #9a9ba2;
  --cx-off: #5d5e65;
  --cx-focus: #e9e9ea;
  --cx-desk: #000000;
  --cx-active-bg: #17181c;
  --cx-active-fg: #ffffff;
  --cx-av-bg: #1d1e23; --cx-av-fg: #c9c9ce;
  --cx-lead-bg: #e9e9ea; --cx-lead-fg: #0a0b0d;
  --cx-tag-bg: #c9c9ce; --cx-tag-fg: #0a0b0d;
  --cx-sel: #5a2a1b;
  --cx-font: "Onest", ui-sans-serif, system-ui, sans-serif;
  --cx-display: "Onest", ui-sans-serif, system-ui, sans-serif;
  --cx-mono: "Martian Mono", ui-monospace, monospace;
}
[data-theme=light] .cx, [data-theme=light] .cx-toast, [data-theme=light] .cx-key, [data-theme=light] .cx-viewer {
  --cx-bg: #ffffff;
  --cx-side: #f6f6f7;
  --cx-aside: #ffffff;
  --cx-panel: #f6f6f7;
  --cx-card-bg: #f6f6f7;
  --cx-field: #f6f6f7;
  --cx-raised: #ececee;
  --cx-bubble: #ececee;
  --cx-line: #e7e7ea;
  --cx-line-2: #e2e2e6;
  --cx-line-btn: #d4d4d8;
  --cx-line-soft: #efeff1;
  --cx-line-strong: #c9c9ce;
  --cx-text: #0a0b0d;
  --cx-text-2: #2e2f33;
  --cx-text-muted: #5c5d64;
  --cx-text-faint: #5c5d64;
  --cx-accent: #0a0b0d;
  --cx-accent-hi: #2e2f33;
  --cx-accent-ink: #ffffff;
  --cx-ember: #c2410c;
  --cx-ember-text: #c2410c;
  --cx-ember-ink: #ffffff;
  --cx-ok-bg: #ececee;
  --cx-ok-fg: #0a0b0d;
  --cx-user-bubble: #ececee;
  --cx-success: #c2410c;
  --cx-warning: #b07800;
  --cx-warn-text: #8a5a00;
  --cx-warn-bg: #fbf1dc;
  --cx-warn-line: #e6cf9c;
  --cx-warn-card: #ffffff;
  --cx-warn-strip: #fbf8f1;
  --cx-warn-btn: #e6cf9c;
  --cx-danger: #b42318;
  --cx-danger-line: #f0c4bf;
  --cx-info: #5c5d64;
  --cx-off: #a1a2a8;
  --cx-focus: #0a0b0d;
  --cx-active-bg: #ececee;
  --cx-active-fg: #0a0b0d;
  --cx-av-bg: #ececee; --cx-av-fg: #2e2f33;
  --cx-lead-bg: #0a0b0d; --cx-lead-fg: #ffffff;
  --cx-tag-bg: #2e2f33; --cx-tag-fg: #ffffff;
  --cx-sel: #ffd8c9;
}
.cx {
  --cx-pv-dark-bg: #0a0b0d; --cx-pv-dark-side: #0d0e11; --cx-pv-dark-line: #26272c;
  --cx-pv-light-bg: #ffffff; --cx-pv-light-side: #f6f6f7; --cx-pv-light-line: #e2e2e6;
  --cx-white-knob: #ffffff;
}
.cx-shell {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
}
.cx {
  font-family: var(--cx-font);
  font-feature-settings: "tnum" 1;
  font-variant-numeric: tabular-nums;
  color: var(--cx-text);
  background: var(--cx-bg);
  min-height: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  font-size: 14.5px;
  line-height: 1.55;
  overflow: hidden;
  caret-color: var(--cx-ember);
  -webkit-font-smoothing: antialiased;
}
/* browser surfaces follow the theme: selection, caret, scroll bars and focus rings */
.cx ::selection, .cx-key ::selection { background: var(--cx-sel); color: var(--cx-text); }
.cx, .cx-key { color-scheme: dark; }
[data-theme=light] .cx, [data-theme=light] .cx-key { color-scheme: light; }
.cx * { scrollbar-width: thin; scrollbar-color: var(--cx-line-btn) transparent; }
.cx *::-webkit-scrollbar { width: 10px; height: 10px; }
.cx *::-webkit-scrollbar-track { background: transparent; }
.cx *::-webkit-scrollbar-thumb { background: var(--cx-line-btn); border-radius: 10px; border: 2px solid transparent; background-clip: padding-box; }
.cx *::-webkit-scrollbar-thumb:hover { background: var(--cx-text-faint); background-clip: padding-box; }
.cx button:focus-visible, .cx a:focus-visible, .cx input:focus-visible, .cx textarea:focus-visible { outline: 2px solid var(--cx-focus); outline-offset: 2px; }
.cx-i { flex: none; }

/* sidebar: brand, the jump box, compact links, then the lead over all teams, one block per team (its room, then its
   members under a thin line), agents on their own, and today's spend at the foot */
.cx-side {
  background: var(--cx-side);
  border-right: 1px solid var(--cx-line);
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px 12px 12px;
  overflow: hidden;
  min-height: 0;
}
.cx-side-scroll { flex: 1 1 auto; min-height: 0; overflow: auto; display: flex; flex-direction: column; gap: 2px; margin: 0 -6px; padding: 0 6px 8px; }
.cx-side-ag, .cx-side-ch { white-space: nowrap; }
.cx-side-st { flex: none; white-space: nowrap; }
.cx-count { min-width: 20px; height: 20px; padding: 0 7px; box-sizing: border-box; border-radius: 999px; background: var(--cx-ember); color: var(--cx-ember-ink); font-size: 12px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.cx-logo { width: 24px; height: 24px; flex: none; border-radius: 6px; background: url(/ui/icon.svg?v=crew3) center / cover no-repeat; }   /* card 752: the Night shift icon */
.cx-rail { display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 6px; }
/* card 770: the screens are quiet text links under the search, as in the concept; the Crew drawing and the agents carry the sidebar */
.cx-rail button {
  display: inline-flex; align-items: center; gap: 6px; min-height: 28px; padding: 0 8px;
  border: 0; border-radius: 8px; background: transparent; color: var(--cx-text-muted);
  font: 500 13px/1.2 var(--cx-font); cursor: pointer;
}
.cx-rail button:hover { color: var(--cx-text); background: var(--cx-raised); }
.cx-rail button.on { background: var(--cx-raised); color: var(--cx-text); }
.cx-rail .cx-i { display: none; }
.cx-nav-l { flex: none; }
.cx-phone-only { display: none !important; }
.cx-badge { color: var(--cx-warn-text); font-weight: 600; font-size: 13px; }
.cx-rail button.on .cx-badge { color: inherit; }
.cx-side-sec { display: flex; flex-direction: column; gap: 2px; }
.cx-side-h, .cx-cap { font-size: 12px; font-weight: 500; color: var(--cx-text-faint); }
.cx-side-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 10px 4px; }
.cx-side-h:first-child { padding-top: 4px; }
.cx-side-h .cx-icon-btn { width: 28px; height: 28px; margin: -6px -6px -6px 0; }
.cx-side-ag, .cx-side-ch {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 38px; padding: 0 10px; box-sizing: border-box;
  border: 0; border-radius: 10px; background: transparent; color: var(--cx-text-2);
  font: 400 14px/1.2 var(--cx-font); text-align: left; cursor: pointer;
}
.cx-side-ag:hover, .cx-side-ch:hover { background: var(--cx-raised); color: var(--cx-text); }
.cx-side-ag.on, .cx-side-ch.on { background: var(--cx-raised); color: var(--cx-white); }
[data-theme=light] .cx-side-ag.on, [data-theme=light] .cx-side-ch.on { color: var(--cx-text); }
.cx-side-ch { color: var(--cx-text); font-weight: 500; }
.cx-side-n { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cx-side-st { font-size: 12px; color: var(--cx-text-faint); }
.cx-side-team { margin: 0 0 0 13px; padding-left: 6px; border-left: 1px solid var(--cx-line-2); display: flex; flex-direction: column; gap: 2px; }
.cx-side-empty { margin: 0; padding: 4px 10px; font-size: 13px; color: var(--cx-text-muted); }
.cx-side-note { font-size: 12px; font-weight: 400; color: var(--cx-text-faint); padding-right: 6px; }
.cx-jump-btn {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 42px; padding: 0 12px; box-sizing: border-box;
  border: 1px solid var(--cx-line-btn); border-radius: 12px; background: transparent; color: var(--cx-text-muted);
  font: 400 14px/1.2 var(--cx-font); text-align: left; cursor: pointer;
}
.cx-jump-btn span { flex: 1; }
.cx-jump-btn .cx-i { display: none; }
.cx-jump-btn kbd { display: none; }
.cx-jump-btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cx-jump-btn:hover { border-color: var(--cx-line-strong); color: var(--cx-text); }
.cx-hash { width: 26px; height: 26px; flex: none; box-sizing: border-box; border: 1px solid var(--cx-line-strong); border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; color: var(--cx-text-muted); font-size: 13px; font-weight: 500; }
.cx-new { width: 8px; height: 8px; border-radius: 50%; background: var(--cx-ember); flex: none; }
.cx-jump { position: fixed; inset: 0; z-index: 50; display: flex; justify-content: center; align-items: flex-start; padding: 12vh 16px 16px; }
.cx-jump-back { position: absolute; inset: 0; background: var(--cx-bg); opacity: 0.7; }
.cx-jump-box {
  position: relative; width: min(560px, 100%); background: var(--cx-panel); border: 1px solid var(--cx-line-btn); border-radius: 14px;
  padding: 10px; display: flex; flex-direction: column; gap: 6px;
}
.cx-jump-box input { min-height: 44px; padding: 0 12px; border: 1px solid var(--cx-line); border-radius: 10px; background: var(--cx-bg); color: var(--cx-text); font: inherit; }
.cx-jump-l { list-style: none; margin: 0; padding: 0; max-height: 50vh; overflow: auto; }
.cx-jump-l button {
  display: flex; justify-content: space-between; gap: 12px; width: 100%; min-height: 40px; padding: 0 12px; border: 0; border-radius: 8px;
  background: transparent; color: var(--cx-text); font: inherit; text-align: left; cursor: pointer;
}
.cx-jump-l button:hover, .cx-jump-l button.on { background: var(--cx-raised); }
.cx-jump-none { padding: 10px 12px; }
/* memory (card 645, design Memory) */
.cx-mem2 { display: grid; grid-template-columns: 280px minmax(0, 1fr); min-height: 100%; }
.cx-mem-nav { background: var(--cx-aside); border-right: 1px solid var(--cx-line); padding: 24px 12px; display: flex; flex-direction: column; gap: 4px; }
.cx-mem-nav h1 { margin: 0 10px 4px; font: 600 22px/1.2 var(--cx-display); }
.cx-mem-nav > p { margin: 0 10px 12px; font-size: 13px; }
.cx-mem-nav input { margin: 0 4px 12px; min-height: 40px; padding: 0 12px; border: 1px solid var(--cx-line-btn); border-radius: 10px; background: var(--cx-bg); color: var(--cx-text); font: inherit; }
.cx-mem-cap { margin: 14px 10px 4px; }
.cx-main .cx-mem-row2 { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 0 10px; border: 0; border-radius: 10px; background: transparent; color: var(--cx-text-2); font: inherit; text-align: left; cursor: pointer; white-space: nowrap; }
.cx-main .cx-mem-row2:hover { background: var(--cx-raised); }
.cx-main .cx-mem-row2.on { background: var(--cx-active-bg); color: var(--cx-active-fg); }
.cx-mem-row2 .cx-muted { font-size: 12px; flex: none; }
.cx-star { width: 28px; height: 28px; flex: none; border-radius: 7px; background: var(--cx-ok-bg); color: var(--cx-accent-hi); display: inline-flex; align-items: center; justify-content: center; }
.cx-mem-main { min-width: 0; padding: 28px 32px; display: flex; flex-direction: column; gap: 20px; }
.cx-mem-main h2 { margin: 0; font-size: 20px; font-weight: 600; }
.cx-mem-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.cx-mem-head > div { flex: 1 1 240px; display: flex; flex-direction: column; }
.cx-mem-head .cx-avatar { width: 44px; height: 44px; border-radius: 11px; font-size: 15px; }
.cx-main .cx-mem-head button { min-height: 44px; }
.cx-mem-sec2 { display: flex; flex-direction: column; gap: 10px; }
.cx-mem-sec2 .cx-cap { margin: 0; }
.cx-mem-sec2 > div > p { margin: 2px 0 0; font-size: 13px; }
.cx-mem-empty { padding: 20px; border: 1px dashed var(--cx-line-btn); border-radius: 12px; color: var(--cx-text-muted); }
.cx-lesson { padding: 14px 16px; border: 1px solid var(--cx-line-2); border-radius: 12px; background: var(--cx-card-bg); display: flex; flex-direction: column; gap: 6px; }
.cx-lesson-t { font-weight: 500; }
.cx-lesson .cx-muted { font-size: 12px; }
.cx-lesson-sh { border-color: var(--cx-accent); background: var(--cx-ok-bg); }
.cx-lesson-a { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.cx-main .cx-lesson-a button { min-height: 40px; }
.cx-main .cx-hit { display: flex; flex-direction: column; gap: 2px; width: 100%; padding: 10px 12px; border: 1px solid var(--cx-line-2); border-radius: 10px; background: var(--cx-card-bg); color: var(--cx-text); font: inherit; text-align: left; cursor: pointer; }
.cx-hit .cx-muted { font-size: 12.5px; overflow-wrap: anywhere; }
.cx-wsbox { border: 1px solid var(--cx-line-2); border-radius: 12px; overflow: hidden; font-size: 12.5px; }
.cx-ws-h { padding: 10px 14px; background: var(--cx-card-bg); color: var(--cx-text-muted); }
.cx-ws-r { display: flex; gap: 10px; padding: 10px 14px; border-top: 1px solid var(--cx-line-soft); }
.cx-ws-r > span:nth-child(2) { flex: 1; overflow-wrap: anywhere; }
@media (max-width: 900px) { .cx-mem2 { grid-template-columns: minmax(0, 1fr); } .cx-mem-nav { border-right: 0; border-bottom: 1px solid var(--cx-line); } }
@media (max-width: 767px) { .cx-mem-main { padding: 16px; } }
/* approvals (card 645, design Approvals) */
.cx-apvs { display: grid; grid-template-columns: minmax(0, 1fr) 340px; min-height: 100%; }
.cx-apvs-main { min-width: 0; padding: 28px 32px; display: flex; flex-direction: column; gap: 20px; border-right: 1px solid var(--cx-line); }
.cx-apvs-main .cx-hero { margin: 0; }
.cx-apv2 { border: 1px solid var(--cx-warn-line); border-radius: 16px; background: var(--cx-warn-card); overflow: hidden; }
.cx-apv2-done { border-color: var(--cx-line-2); background: var(--cx-card-bg); }
.cx-apv2-h { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 18px 20px; border-bottom: 1px solid var(--cx-warn-btn); }
.cx-apv2-done .cx-apv2-h { border-color: var(--cx-line-soft); }
.cx-apv2-t { flex: 1 1 260px; min-width: 0; display: flex; flex-direction: column; }
.cx-apv2-t h2 { margin: 0; font-size: 17px; font-weight: 600; }
.cx-apv2-t .cx-muted { font-size: 13px; }
.cx-catpill { padding: 3px 10px; border-radius: 999px; background: var(--cx-warn-bg); color: var(--cx-warn-text); font-size: 12px; font-weight: 500; }
.cx-apv2-b { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; padding: 20px; }
.cx-apv2-b p { margin: 0; color: var(--cx-text-2); }
.cx-apv2-b .cx-cap { margin: 0 0 6px; }
.cx-apv2-wide { grid-column: 1 / -1; }
.cx-cmd { margin: 0; padding: 12px 14px; background: var(--cx-bg); border: 1px solid var(--cx-warn-btn); border-radius: 10px; font: 13px/1.5 var(--cx-mono); overflow-x: auto; white-space: pre; }
.cx-apv2-a { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 16px 20px; background: var(--cx-warn-strip); border-top: 1px solid var(--cx-warn-btn); }
.cx-apv2-done .cx-apv2-a { background: transparent; border-color: var(--cx-line-soft); }
.cx-main .cx-apv2-a button { min-height: 44px; }
.cx-main .cx-apv2-a button:not(.cx-primary) { border-color: var(--cx-warn-btn); }
.cx-apv2-a a { font-weight: 500; color: var(--cx-accent); }
.cx-grow { flex: 1; }
.cx-apv2-deny { display: flex; gap: 8px; padding: 0 20px 16px; background: var(--cx-warn-strip); }
.cx-apv2-deny input { flex: 1; min-height: 44px; padding: 0 12px; border: 1px solid var(--cx-warn-btn); border-radius: 10px; background: var(--cx-bg); color: var(--cx-text); font: inherit; }
.cx-apv-side { background: var(--cx-aside); padding: 20px; display: flex; flex-direction: column; gap: 4px; }
.cx-apv-side-h .cx-cap { margin: 0 0 8px; }
.cx-rule { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 12px 0; border-bottom: 1px solid var(--cx-line-soft); }
.cx-rule > div:first-child { flex: 1 1 140px; min-width: 0; display: flex; flex-direction: column; }
.cx-rule .cx-muted { font-size: 12px; }
.cx-main .cx-rule-seg button { padding: 0 10px; font-size: 12px; }
.cx-main .cx-rule-seg button.on.ok { background: var(--cx-ok-bg); color: var(--cx-accent-hi); }
.cx-main .cx-rule-seg button.on.ask { background: var(--cx-warn-bg); color: var(--cx-warn-text); }
.cx-apv-side > p { margin: 12px 0 0; font-size: 12px; }
@media (max-width: 1100px) { .cx-apvs { grid-template-columns: minmax(0, 1fr); } .cx-apvs-main { border-right: 0; } .cx-apv-side { border-top: 1px solid var(--cx-line); } }
@media (max-width: 767px) { .cx-apvs-main { padding: 16px; } }
/* shared desktop (card 645, design Shared desktop) */
.cx-desk2 { display: grid; grid-template-columns: minmax(0, 1fr) 320px; min-height: 100%; }
.cx-desk2-main { min-width: 0; padding: 20px 24px; display: flex; flex-direction: column; gap: 16px; border-right: 1px solid var(--cx-line); }
.cx-desk2-main .cx-hero { margin: 0; }
.cx-desk2-main .cx-hero p { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cx-follow-box { display: flex; flex-direction: column; gap: 10px; padding: 12px 14px; border: 1px solid var(--cx-line-2); border-radius: 12px; background: var(--cx-card-bg); }
.cx-follow-h { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 12px; }
.cx-follow-h .cx-cap { margin: 0; }
.cx-follow { display: flex; flex-wrap: wrap; gap: 6px; }
.cx-main .cx-follow button { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 12px 0 6px; border: 1px solid var(--cx-line-2); border-radius: 10px; background: var(--cx-bg); color: var(--cx-text-2); font: inherit; font-size: 13px; cursor: pointer; }
.cx-main .cx-follow button.on { border-color: var(--cx-accent); background: var(--cx-ok-bg); color: var(--cx-text); }
.cx-live-wrap { position: relative; aspect-ratio: 16 / 9; width: 100%; margin: 0; border-radius: 12px; overflow: hidden; border: 1px solid var(--cx-line-2); background: var(--cx-panel); }
.cx-live-wrap .cx-frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.cx-live-wrap img.cx-frame { object-fit: contain; background: var(--cx-surface, transparent); }
.cx-live-wrap:fullscreen { border-radius: 0; }
.cx-desk-idle { display: grid; place-items: center; background: var(--cx-desk, var(--cx-panel)); filter: saturate(0.6); }
.cx-idle-card { display: grid; justify-items: center; gap: 8px; max-width: 360px; padding: 24px; text-align: center; color: var(--cx-text-muted); }
.cx-idle-card b { color: var(--cx-text); font-size: 15px; }
.cx-idle-card p { margin: 0 0 4px; }
.cx-idle-moon { width: 28px; height: 28px; border-radius: 50%; box-shadow: inset -7px -3px 0 0 var(--cx-text-muted); opacity: 0.8; }
.cx-cursor { position: absolute; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; pointer-events: none; transition: left 0.25s linear, top 0.25s linear; }
.cx-cursor svg path { fill: var(--cx-av1-fg); stroke: var(--cx-bg); stroke-width: 1.5; stroke-linejoin: round; }
.cx-cursor span { padding: 2px 8px; border-radius: 6px; background: var(--cx-ok-bg); color: var(--cx-accent-hi); font-size: 11px; font-weight: 600; white-space: nowrap; }
.cx-ctrl-tag { position: absolute; left: 12px; top: 12px; padding: 4px 10px; border-radius: 8px; background: var(--cx-warn-bg); color: var(--cx-warn-text); font-size: 12px; font-weight: 600; }
.cx-desk-warn { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 14px 16px; border: 1px solid var(--cx-warn-line); border-radius: 12px; background: var(--cx-warn-card); }
.cx-desk-warn > div { flex: 1 1 280px; }
.cx-desk-warn h2 { margin: 0; font-size: 15px; }
.cx-desk-warn p { margin: 0; font-size: 13px; }
.cx-main .cx-warnbtn { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 10px; border: 1px solid var(--cx-warn-line); background: var(--cx-warn-strip); color: var(--cx-warn-text); text-decoration: none; font-weight: 500; cursor: pointer; }
.cx-desk2-side { background: var(--cx-aside); padding: 20px; display: flex; flex-direction: column; gap: 24px; overflow: auto; }
.cx-desk2-side .cx-cap { margin: 0 0 8px; }
.cx-drole { display: flex; align-items: center; gap: 10px; min-height: 40px; }
.cx-drole > span:last-child { font-size: 12px; color: var(--cx-text-muted); }
.cx-dact { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--cx-line-soft); }
.cx-dact > .cx-mono { width: 44px; flex: none; color: var(--cx-text-faint); font-size: 12px; }
.cx-dact > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; font-size: 13px; overflow-wrap: anywhere; }
.cx-ok { color: var(--cx-accent-hi); font-size: 12px; } .cx-bad { color: var(--cx-danger); font-size: 12px; }
@media (max-width: 1100px) { .cx-desk2 { grid-template-columns: minmax(0, 1fr); } .cx-desk2-main { border-right: 0; } .cx-desk2-side { border-top: 1px solid var(--cx-line); } }
@media (max-width: 767px) { .cx-desk2-main { padding: 16px; } }
/* runs (card 645, design Runs) */
.cx-main-runs { padding: 0; }
.cx-runs { display: grid; grid-template-columns: minmax(0, 1fr) 340px; min-height: 100%; }
.cx-runs-main { min-width: 0; padding: 28px 32px; display: flex; flex-direction: column; gap: 20px; border-right: 1px solid var(--cx-line); }
.cx-runs-main .cx-hero { margin: 0; }
.cx-run-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.cx-tile { padding: 14px 16px; border: 1px solid var(--cx-line-2); border-radius: 12px; background: var(--cx-card-bg); display: flex; flex-direction: column; gap: 2px; }
.cx-tile span { font-size: 12px; color: var(--cx-text-muted); }
.cx-tile b { font: 600 26px/1.2 var(--cx-display); }
.cx-tile small { font-size: 12px; color: var(--cx-text-muted); }
.cx-tile-bad { border-color: var(--cx-danger); }
.cx-tile-bad b { color: var(--cx-danger); }
.cx-tile .cx-link { align-self: flex-start; color: var(--cx-danger); }
.cx-run-table { border: 1px solid var(--cx-line-2); border-radius: 12px; overflow: hidden; }
.cx-run-head, .cx-run-row { display: grid; grid-template-columns: 84px minmax(0, 1fr) 64px 92px 76px; gap: 12px; align-items: center; padding: 10px 16px; }
.cx-run-head { background: var(--cx-card-bg); font-size: 12px; font-weight: 600; color: var(--cx-text-muted); }
.cx-main .cx-run-row { width: 100%; min-height: 56px; border: 0; border-top: 1px solid var(--cx-line-soft); border-radius: 0; background: transparent; color: var(--cx-text); font: inherit; text-align: left; cursor: pointer; }
.cx-main .cx-run-row:hover { background: var(--cx-raised); }
.cx-mono { font-family: var(--cx-mono); font-size: 12.5px; }
.cx-run-what { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.cx-run-meta { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--cx-text-muted); }
.cx-run-card { color: var(--cx-accent-hi); }
.cx-run-sum { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cx-run-st { display: inline-block; font-size: 11px; font-weight: 600; padding: 0 6px; border-radius: 4px; background: var(--cx-raised); color: var(--cx-text-2); }
.cx-run-st.st-ok { background: var(--cx-ok-bg); color: var(--cx-accent-hi); }
.cx-run-st.st-failed { color: var(--cx-danger); }
.cx-run-st.st-running { color: var(--cx-success); }
.cx-run-stall { font-size: 11px; font-weight: 600; padding: 0 6px; border-radius: 4px; background: var(--cx-warn-bg); color: var(--cx-warn-text); }   /* card 847 */
p.cx-run-st { font-size: 13px; padding: 2px 8px; margin: 4px 0 0; }
.cx-run-empty { margin: 0; padding: 24px 16px; color: var(--cx-text-muted); border-top: 1px solid var(--cx-line-soft); }
.cx-run-side { background: var(--cx-aside); padding: 24px 20px; display: flex; flex-direction: column; gap: 20px; }
.cx-run-side h2 { margin: 2px 0 0; font-size: 17px; }
.cx-run-side .cx-cap { margin: 0 0 6px; }
.cx-run-report { margin: 0; padding: 12px 14px; border-radius: 10px; background: var(--cx-card-bg); border: 1px solid var(--cx-line-soft); overflow-wrap: anywhere; }
.cx-tokbar { display: flex; flex-direction: column; gap: 4px; margin-bottom: 8px; }
.cx-tokbar > div { display: flex; justify-content: space-between; font-size: 13px; color: var(--cx-text-2); }
.cx-bar { display: block; height: 6px; border-radius: 3px; background: var(--cx-raised); overflow: hidden; }
.cx-bar > span { display: block; height: 100%; }
.cx-bar-in { background: var(--cx-accent); } .cx-bar-out { background: var(--cx-info); } .cx-bar-cache { background: var(--cx-off); }
.cx-kv2 { display: flex; justify-content: space-between; padding-top: 8px; color: var(--cx-text-2); }
.cx-kv2 + .cx-kv2 { padding-top: 4px; }
.cx-run-acts { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.cx-run-acts button { min-height: 44px; }
.cx-w0 { width: 0%; }
.cx-w2 { width: 2%; }
.cx-w4 { width: 4%; }
.cx-w6 { width: 6%; }
.cx-w8 { width: 8%; }
.cx-w10 { width: 10%; }
.cx-w12 { width: 12%; }
.cx-w14 { width: 14%; }
.cx-w16 { width: 16%; }
.cx-w18 { width: 18%; }
.cx-w20 { width: 20%; }
.cx-w22 { width: 22%; }
.cx-w24 { width: 24%; }
.cx-w26 { width: 26%; }
.cx-w28 { width: 28%; }
.cx-w30 { width: 30%; }
.cx-w32 { width: 32%; }
.cx-w34 { width: 34%; }
.cx-w36 { width: 36%; }
.cx-w38 { width: 38%; }
.cx-w40 { width: 40%; }
.cx-w42 { width: 42%; }
.cx-w44 { width: 44%; }
.cx-w46 { width: 46%; }
.cx-w48 { width: 48%; }
.cx-w50 { width: 50%; }
.cx-w52 { width: 52%; }
.cx-w54 { width: 54%; }
.cx-w56 { width: 56%; }
.cx-w58 { width: 58%; }
.cx-w60 { width: 60%; }
.cx-w62 { width: 62%; }
.cx-w64 { width: 64%; }
.cx-w66 { width: 66%; }
.cx-w68 { width: 68%; }
.cx-w70 { width: 70%; }
.cx-w72 { width: 72%; }
.cx-w74 { width: 74%; }
.cx-w76 { width: 76%; }
.cx-w78 { width: 78%; }
.cx-w80 { width: 80%; }
.cx-w82 { width: 82%; }
.cx-w84 { width: 84%; }
.cx-w86 { width: 86%; }
.cx-w88 { width: 88%; }
.cx-w90 { width: 90%; }
.cx-w92 { width: 92%; }
.cx-w94 { width: 94%; }
.cx-w96 { width: 96%; }
.cx-w98 { width: 98%; }
.cx-w100 { width: 100%; }
@media (max-width: 1100px) { .cx-runs { grid-template-columns: minmax(0, 1fr); } .cx-run-side { border-top: 1px solid var(--cx-line); } .cx-runs-main { border-right: 0; } }
@media (max-width: 767px) { .cx-runs-main { padding: 16px; } .cx-run-head { display: none; } .cx-run-head, .cx-main .cx-run-row { grid-template-columns: 64px minmax(0, 1fr) 64px; } .cx-run-row > span:nth-child(4), .cx-run-row > span:nth-child(3) { display: none; } }
.cx-mem-sec { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.cx-mem-sec h2 { margin: 0; font-size: 16px; }
.cx-mem-sec p { margin: 0; }
.cx-mem-sec textarea, .cx-mem-add input, .cx-mem-add select { width: 100%; box-sizing: border-box; padding: 10px 12px; border: 1px solid var(--cx-line-btn); border-radius: 10px; background: var(--cx-field); color: var(--cx-text); font: 14px/1.5 var(--cx-mono); }
.cx-mem-add input { font-family: inherit; }
.cx-mem-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; padding: 8px 0; border-bottom: 1px solid var(--cx-line-soft); }
.cx-mem-p { flex: 1 1 200px; font-weight: 500; overflow-wrap: anywhere; }
.cx-mem-acts { display: flex; gap: 8px; }
.cx-mem-edit, .cx-mem-add { display: flex; flex-direction: column; gap: 8px; }
.cx-upload { display: inline-flex; align-items: center; min-height: 36px; padding: 0 12px; margin-left: 8px; border: 1px solid var(--cx-line-btn); border-radius: 8px; cursor: pointer; }
.cx-upload input { position: absolute; width: 1px; height: 1px; opacity: 0; }
/* card 739: one state vocabulary, one word and one colour everywhere: working (ember), needs you (amber, the only amber state),
   error (red), ready (grey), off (dim grey, a ring) */
.cx { --cx-st-working: var(--cx-ember); --cx-st-ready: var(--cx-text-faint); --cx-st-needs: var(--cx-warning); --cx-st-off: var(--cx-off); --cx-st-error: var(--cx-danger); }
.cx-side-st.st-working, .cx-pill.st-working { color: var(--cx-ember-text); }
.cx-side-st.st-ready, .cx-pill.st-ready { color: var(--cx-text-faint); }
.cx-side-st.st-needs, .cx-pill.st-needs { color: var(--cx-warn-text); }
.cx-side-st.st-off, .cx-pill.st-off { color: var(--cx-text-faint); }
.cx-side-st.st-error, .cx-pill.st-error { color: var(--cx-danger); }
/* card 765: paused by the runner after failed runs in a row (not turned off): the reason, when it starts again, Resume */
.cx-side-st.st-paused, .cx-pill.st-paused { color: var(--cx-danger); }
.cx-ag-hold { margin: 6px 0 0; padding: 8px 10px; border: 1px solid var(--cx-line-2); border-radius: 8px; font-size: 13px; color: var(--cx-text-muted); overflow-wrap: anywhere; }
.cx-ag-hold b { color: var(--cx-danger); }
.cx-ag-hold button { margin-left: 6px; }
.cx-side-st.st-note { color: var(--cx-text-faint); }
.cx-icon-btn {
  width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; padding: 0;
  border: 0; border-radius: 999px; background: transparent; color: var(--cx-text-muted); cursor: pointer;
}
.cx-icon-btn:hover, .cx-icon-btn.on { background: var(--cx-raised); color: var(--cx-text); }
.cx-side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 6px; padding: 10px 10px 0; border-top: 1px solid var(--cx-line); }
.cx-spend { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px; color: var(--cx-text-faint); }
.cx-spend b { color: var(--cx-text); font-weight: 500; }
.cx-spend-f { min-height: 28px; padding: 0 2px; border: 0; background: transparent; color: var(--cx-danger); font: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.cx-spend-ok { color: var(--cx-text-faint); }
.cx-live { display: flex; align-items: center; gap: 8px; margin-left: auto; font-size: 12px; color: var(--cx-text-faint); }
.cx-ver { font-size: 12px; color: var(--cx-text-faint); }

/* avatars: small rounded squares with initials; a lead's avatar is inverted */
.cx-avatar {
  width: 32px; height: 32px; flex: none; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center;
  font: 600 12px/1 var(--cx-font); letter-spacing: 0.02em; background: var(--cx-av-bg); color: var(--cx-av-fg);
}
.cx-av-lead { background: var(--cx-lead-bg); color: var(--cx-lead-fg); }
.cx-av-xs { width: 24px; height: 24px; border-radius: 8px; font-size: 12px; }
.cx-av-sm { width: 26px; height: 26px; border-radius: 8px; font-size: 12px; }
.cx-av-md { width: 32px; height: 32px; border-radius: 10px; font-size: 12px; }
.cx-av-lg { width: 44px; height: 44px; border-radius: 10px; font-size: 15px; }
.cx-av-wrap { position: relative; flex: none; display: inline-flex; }
.cx-av-dot {
  position: absolute; right: -2px; bottom: -2px; width: 10px; height: 10px; border-radius: 50%;
  border: 2px solid var(--cx-bg); background: var(--cx-st-working);
}
.cx-av-dot.ready { background: var(--cx-st-ready); }
.cx-av-dot.wait { background: var(--cx-st-needs); }
.cx-av-dot.off { background: var(--cx-bg); box-shadow: inset 0 0 0 2px var(--cx-st-off); }
.cx-av-dot.err { background: var(--cx-st-error); }
.cx-av-dot.work { background: var(--cx-st-working); animation: cx-pulse 1.8s ease-in-out infinite; }
.cx-dot { display: inline-block; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--cx-text-2); }   /* up, ok */
.cx-dot.ready { background: var(--cx-st-ready); }
.cx-dot.off { background: transparent; box-shadow: inset 0 0 0 2px var(--cx-st-off); }
.cx-dot.wait { background: var(--cx-st-needs); }
.cx-dot.err { background: var(--cx-st-error); }
.cx-dot.work { background: var(--cx-st-working); animation: cx-pulse 1.8s ease-in-out infinite; }
@keyframes cx-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
@media (prefers-reduced-motion: reduce) { .cx-dot.work, .cx-av-dot.work { animation: none; } }
.cx-pill {
  display: inline-flex; align-items: center; padding: 1px 10px; border-radius: 999px; font-size: 12px; font-weight: 500;
  border: 1px solid var(--cx-line-btn); color: var(--cx-text-muted);
}
.cx-tag { display: inline-flex; align-items: center; padding: 0 5px; border-radius: 5px; background: var(--cx-tag-bg); color: var(--cx-tag-fg); font-size: 12px; font-weight: 600; letter-spacing: 0.02em; line-height: 1.35; }
.cx-mention { color: var(--cx-ember-text); font-weight: 500; }

/* main */
.cx-main { min-width: 0; min-height: 0; padding: 28px 32px 40px; overflow: auto; }
.cx-main-chat, .cx-main-desk, .cx-main-chan { padding: 0; display: flex; flex-direction: column; overflow: hidden; }
/* team room: "# app-team" with who leads it, posts with avatar, name, lead tag and time, your own posts as bubbles on the right,
   the big rounded composer, and About, Lead, Members and Other rooms on the right */
.cx-chan { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 280px; }
.cx-chan-main { min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.cx-chan-head { display: flex; align-items: center; gap: 16px; min-height: 58px; box-sizing: border-box; padding: 8px 32px; border-bottom: 1px solid var(--cx-line-soft); }
.cx-chan-ht { flex: 1 1 260px; min-width: 0; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.cx-chan-ht h1 { margin: 0; font: 600 15px/1.3 var(--cx-font); }
.cx-chan-ht p { margin: 0; color: var(--cx-text-faint); font-size: 13px; }
.cx-chan-feed { flex: 1; min-height: 0; overflow: auto; padding: 24px 32px 12px; }
.cx-chan-col { max-width: 700px; margin: 0 auto; display: flex; flex-direction: column; gap: 18px; }
.cx-day { display: flex; justify-content: center; color: var(--cx-text-faint); font-size: 12px; }
.cx-chan-ev { display: flex; align-items: center; gap: 10px; padding: 6px 0 6px 16px; margin-left: 44px; border-left: 1px solid var(--cx-line-strong); color: var(--cx-text-faint); font-size: 13.5px; }
.cx-chan-ev span:nth-child(2) { flex: 1; }
.cx-chan-ev time, .cx-chan-h time { font-size: 13px; color: var(--cx-text-faint); }
.cx-chan-msg { display: flex; gap: 12px; }
.cx-chan-b { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.cx-chan-h { margin: 0; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; font-size: 13.5px; color: var(--cx-text-faint); }
.cx-chan-h b { color: var(--cx-text); font-weight: 600; }
.cx-role { font-size: 12px; padding: 0 6px; border-radius: 5px; border: 1px solid var(--cx-line-btn); color: var(--cx-text-muted); }
.cx-chan-t { margin: 0; overflow-wrap: anywhere; }
.cx-chan-t b, .cx-chan-t strong { font-weight: 600; }
.cx-chan-me { justify-content: flex-end; }
.cx-chan-me .cx-chan-t { max-width: min(520px, 80%); padding: 10px 16px; border-radius: 20px; background: var(--cx-bubble); }
.cx-chan-empty { padding: 48px 0; text-align: center; }
.cx-chan-empty b { display: block; margin-bottom: 4px; }
.cx-to { font-size: 13px; color: var(--cx-text-2); }
.cx-to span:first-child { color: var(--cx-ember-text); }
.cx-cardchip { display: inline-flex; align-items: center; padding: 0 8px; border-radius: 999px; border: 1px solid var(--cx-line-strong); color: var(--cx-text); font-family: var(--cx-mono); font-size: 12px; text-decoration: none; }
.cx-btnl { display: inline-flex; align-items: center; min-height: 34px; padding: 0 14px; border: 1px solid var(--cx-line-btn); border-radius: 999px; color: var(--cx-text-2); text-decoration: none; font-size: 13px; font-weight: 500; box-sizing: border-box; }
.cx-btnl:hover { color: var(--cx-text); border-color: var(--cx-line-strong); }
.cx-chan-comp { padding: 8px 32px 24px; }
.cx-chan-comp .cx-chan-col { gap: 8px; }
.cx-chan-box { display: flex; align-items: center; gap: 6px; min-height: 66px; box-sizing: border-box; border: 1px solid var(--cx-line-btn); border-radius: 26px; background: var(--cx-panel); padding: 8px 14px 8px 20px; }
.cx-chan-box:focus-within { border-color: var(--cx-line-strong); }
.cx-chan-box input { flex: 1; min-width: 0; min-height: 44px; border: 0; background: transparent; color: var(--cx-text); font: inherit; outline: none; }
.cx-chan-box input::placeholder { color: var(--cx-text-faint); }
.cx-chan-box .cx-icon-btn { width: 40px; height: 40px; font-size: 16px; }
.cx-main .cx-send { width: 40px; height: 40px; min-height: 40px; padding: 0; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; }
.cx-main .cx-send:disabled { background: var(--cx-raised); color: var(--cx-text-faint); opacity: 1; }
.cx-chan-hint { margin: 0; font-size: 12px; color: var(--cx-danger); min-height: 0; }
.cx-at { display: flex; flex-wrap: wrap; gap: 6px; }
.cx-at button { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px 0 4px; border: 1px solid var(--cx-line-btn); border-radius: 999px; background: transparent; color: var(--cx-text); font: inherit; cursor: pointer; }
.cx-chan-side { background: var(--cx-aside); border-left: 1px solid var(--cx-line-soft); padding: 22px; display: flex; flex-direction: column; gap: 20px; overflow: auto; }
.cx-chan-side h2 { margin: 0 0 8px; font-size: 13px; font-weight: 500; color: var(--cx-text-muted); }
.cx-chan-side p { margin: 0 0 6px; font-size: 13px; color: var(--cx-text-faint); }
.cx-chan-m { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 38px; padding: 0; border: 0; background: transparent; color: var(--cx-text-2); font: inherit; font-size: 14px; text-align: left; cursor: pointer; }
.cx-chan-m:hover { color: var(--cx-text); }
.cx-chan-m span:nth-child(2) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cx-chan-m .cx-side-st { font-size: 12px; }
.cx-chan-card { display: flex; align-items: center; gap: 4px; margin: 0 -10px; }
.cx-main .cx-chan-card .cx-side-ch { flex: 1; min-width: 0; min-height: 38px; padding: 0 10px; border: 0; border-radius: 10px; color: var(--cx-text); font-weight: 500; }
.cx-main .cx-chan-card .cx-side-ch:hover { background: var(--cx-raised); }
.cx-main .cx-chan-m { min-height: 38px; padding: 0; border: 0; border-radius: 0; background: transparent; color: var(--cx-text-2); font-weight: 400; }
.cx-main .cx-chan-box input[type=text] { min-height: 44px; margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent; }
.cx-main .cx-chan-box .cx-icon-btn { border: 0; padding: 0; color: var(--cx-text-muted); font-size: 16px; }
.cx-main .cx-chan-box .cx-icon-btn:hover { background: var(--cx-raised); color: var(--cx-text); }
.cx-main .cx-chan-box .cx-send { border: 0; }
.cx-chan-trace { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 6px 0 0 6px; padding-left: 16px; border-left: 1px solid var(--cx-line-strong); color: var(--cx-text-faint); font-size: 13.5px; }
.cx-chan-trace b { color: var(--cx-text-2); font-weight: 400; }
.cx-chan-trace .cx-dot { width: 8px; height: 8px; animation: none; }
.cx-main .cx-chan-trace a, .cx-main .cx-chan-trace button.cx-link { color: var(--cx-text-faint); }
.cx-chan-card .cx-confirm { margin: 4px 10px; }
.cx-chan-acts { display: flex; gap: 8px; margin-top: 6px; }
@media (max-width: 1100px) { .cx-chan { grid-template-columns: minmax(0, 1fr); } .cx-chan-side { display: none; } }
.cx-muted { color: var(--cx-text-muted); }
.cx-warn { color: var(--cx-warn-text); }
.cx-grow { flex: 1; }
.cx .sr, .cx-talk .sr {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
.cx-hero { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 16px; margin: 0 0 24px; }
.cx-hero-t { flex: 1 1 320px; min-width: 0; }
.cx-hero h1 { margin: 0; font: 600 26px/1.2 var(--cx-display); letter-spacing: -0.01em; }
.cx-hero p { margin: 4px 0 0; color: var(--cx-text-muted); max-width: 620px; }
.cx-hero p .cx-dot { margin-right: 6px; vertical-align: 1px; }
.cx-hero p b { color: var(--cx-text); }
.cx-hero-act { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.cx-seg {
  display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; margin: 0 0 16px;
  border: 1px solid var(--cx-line-2); border-radius: 12px; background: var(--cx-panel);
}
.cx-hero .cx-seg { margin: 0; }
.cx-main .cx-seg button {
  min-height: 36px; padding: 0 14px; border: 0; border-radius: 8px; background: transparent;
  color: var(--cx-text-2); font-weight: 500; display: inline-flex; align-items: center; gap: 8px;
}
.cx-main .cx-seg button.on { background: var(--cx-raised); color: var(--cx-text); }
.cx-main button {
  min-height: 44px; padding: 0 14px; border: 1px solid var(--cx-line-btn); border-radius: 10px;
  background: transparent; color: var(--cx-text); font: inherit; font-weight: 500; cursor: pointer; margin: 0;
}
.cx-main button:hover { background: var(--cx-raised); }
.cx-main button.on { background: var(--cx-raised); font-weight: 600; }
.cx-main .cx-primary, .cx-key button { background: var(--cx-accent); color: var(--cx-accent-ink); border-color: transparent; font-weight: 600; }
.cx-main .cx-primary:hover { background: var(--cx-accent-hi); }
.cx-main .cx-link { min-height: 36px; border: 0; padding: 0; color: var(--cx-accent); background: transparent; }
.cx-main a { color: var(--cx-accent); }
.cx-main a:hover { color: var(--cx-accent-hi); }
.cx-main input[type=search], .cx-main input[type=text], .cx-main input[type=number], .cx-main textarea {
  min-height: 44px; padding: 0 12px; margin-right: 6px; border-radius: 10px; box-sizing: border-box;
  border: 1px solid var(--cx-line-btn); background: var(--cx-bg); color: inherit; font: inherit;
}
.cx-main textarea { padding: 10px 12px; width: 100%; }
.cx-card, .cx-add {
  background: var(--cx-card-bg); border: 1px solid var(--cx-line-2); border-radius: 14px; padding: 18px;
}
.cx-card h2, .cx-add h2 { margin: 0 0 6px; font-size: 16px; font-weight: 600; }
.cx-card p { margin: 6px 0; }
.cx-card.cx-calm { background: transparent; }
.cx-stack { display: flex; flex-direction: column; gap: 12px; max-width: 760px; }
.cx-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; margin-bottom: 16px; }
.cx-table { display: flex; flex-direction: column; gap: 12px; }
.cx-tabs, .cx-chips { text-transform: capitalize; }
.cx-num { font-family: var(--cx-mono); text-align: right; }
.cx-chart { width: 100%; border-collapse: collapse; }
.cx-chart th, .cx-chart td { text-align: left; padding: 8px; border-bottom: 1px solid var(--cx-line-soft); }
.cx-err, .cx-empty { padding: 20px 0; color: var(--cx-text-muted); }
.cx-empty b { display: block; color: var(--cx-text); margin-bottom: 4px; }
.cx-sk { height: 72px; border-radius: 14px; background: var(--cx-card-bg); }
.cx-pad { padding: 28px 32px; overflow: auto; }

/* agents */
.cx-ag-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.cx-agcard { display: flex; flex-direction: column; gap: 14px; background: var(--cx-card-bg); border: 1px solid var(--cx-line-2); border-radius: 14px; padding: 18px; }
.cx-agcard .cx-av-dot, .cx-prof .cx-av-dot { width: 12px; height: 12px; border-color: var(--cx-card-bg); }
.cx-ag-top { display: flex; align-items: center; gap: 12px; }
.cx-ag-id { flex: 1; min-width: 0; }
.cx-ag-id h2 { margin: 0; font-size: 16px; font-weight: 600; }
.cx-main .cx-ag-id h2 button { min-height: 0; padding: 0; border: 0; background: transparent; font-weight: 600; text-align: left; }
.cx-main .cx-ag-id h2 button:hover { background: transparent; color: var(--cx-accent-hi); }
.cx-main .cx-bot-rm { min-height: 36px; padding: 0 10px; border-color: transparent; color: var(--cx-text-muted); font-size: 13px; }
.cx-main .cx-bot-rm:hover { color: var(--cx-danger); border-color: var(--cx-danger); background: transparent; }
.cx-ag-doing { margin: 0; color: var(--cx-text-2); font-size: 13px; }
.cx-dl { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 16px; font-size: 13px; }
.cx-dl dt { color: var(--cx-text-faint); font-size: 12px; }
.cx-dl dd { margin: 0; overflow-wrap: anywhere; }
.cx-ag-act { display: flex; gap: 8px; padding-top: 14px; border-top: 1px solid var(--cx-line-soft); }
.cx-ag-act button { flex: 1; }
.cx-main .cx-ag-act .cx-fill { background: var(--cx-raised); border-color: transparent; }
.cx-add { display: flex; flex-direction: column; gap: 8px; background: transparent; border-style: dashed; border-color: var(--cx-line-btn); }
.cx-add p { margin: 0; font-size: 13px; }
.cx-create { display: flex; flex-direction: column; gap: 8px; }
.cx-create label { font-size: 12px; font-weight: 500; color: var(--cx-text-2); }
.cx-main .cx-create input[type=text] { width: 100%; margin: 0; }
.cx-bot-hint { margin-top: 20px; font-size: 13px; max-width: 760px; }
.cx-prof { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-bottom: 20px; }
.cx-prof-id { flex: 1 1 260px; min-width: 0; }
.cx-prof-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cx-prof h1 { margin: 0; font: 600 22px/1.2 var(--cx-display); }
.cx-prof p { margin: 2px 0 0; font-size: 13px; }

/* approvals */
.cx-apv { border: 1px solid var(--cx-warn-line); border-radius: 16px; background: var(--cx-warn-card); overflow: hidden; }
.cx-apv-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 18px 20px; border-bottom: 1px solid var(--cx-warn-btn); }
.cx-apv-t { flex: 1 1 260px; min-width: 0; display: flex; flex-direction: column; }
.cx-apv-t h2 { margin: 0; font-size: 17px; font-weight: 600; }
.cx-apv-t span { font-size: 13px; }
.cx-apv-body { padding: 16px 20px 0; }
.cx-apv-body h3 { margin: 0 0 6px; font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--cx-text-muted); }
.cx-apv-body p { margin: 0; color: var(--cx-text-2); }
.cx-apv-act { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 16px 20px; margin-top: 16px; background: var(--cx-warn-strip); border-top: 1px solid var(--cx-warn-btn); }
.cx-apv-act p { flex: 1 0 100%; margin: 0; font-size: 12px; }
.cx-main .cx-apv-act input[type=text] { flex: 1 1 220px; }
.cx-main .cx-apv-act button:not(.cx-primary) { border-color: var(--cx-warn-btn); }
.cx-apv-open { margin-left: auto; font-weight: 500; }

/* desktop */
.cx-desk-top { padding: 20px 24px 12px; flex: 0 0 auto; }
.cx-desk-top .cx-hero { margin-bottom: 14px; }
.cx-desk-head {
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 8px 14px;
  border: 1px solid var(--cx-line-2); border-radius: 12px; background: var(--cx-panel);
}
.cx-desk-head .cx-seg { margin: 0; padding: 2px; }
.cx-main .cx-desk-head .cx-seg button { min-height: 32px; padding: 0 10px; font-size: 13px; }
.cx-desk-pick { margin-top: 12px; }
.cx-frame-wrap { flex: 1; min-height: 0; display: flex; margin: 0 24px 20px; border: 1px solid var(--cx-line-2); border-radius: 12px; overflow: hidden; }
.cx-frame { width: 100%; flex: 1; min-height: 0; border: 0; background: var(--cx-desk); }
.cx-main-desk .cx-empty { padding: 20px 0; }

/* key prompt and toast */
.cx-key { position: fixed; inset: 0; background: var(--cx-bg); color: var(--cx-text); display: flex; align-items: center; justify-content: center; font-family: var(--cx-font); }
.cx-key form { width: min(24rem, 92vw); display: flex; flex-direction: column; gap: 12px; }
.cx-key b { font: 600 22px/1.2 var(--cx-display); }
.cx-key p { margin: 0; color: var(--cx-text-muted); }
.cx-key input[type=password] {
  min-height: 48px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--cx-line-btn); background: var(--cx-field); color: inherit; font: inherit;
}
.cx-key button { min-height: 48px; border: 0; border-radius: 10px; font: 600 15px/1 var(--cx-font); cursor: pointer; }
.cx-toast {
  position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 40;
  max-width: min(28rem, 92vw); background: var(--cx-raised); color: var(--cx-text);
  border: 1px solid var(--cx-line-btn); padding: 12px 16px; border-radius: 12px;
  font: 500 14px/1.4 var(--cx-font);
}

/* chat (TalkView, look "console"): a 760 px column, your messages as bubbles on the right, an agent's reply with no bubble under its
   trace line, and a large rounded composer at the bottom */
.cx-talk { flex: 1; min-height: 0; display: flex; width: 100%; }
.cx-talk.tkv {
  --surface: var(--cx-bg);
  --subtle: var(--cx-panel);
  --tint: var(--cx-user-bubble);
  --bd2: var(--cx-line);
  --bd: var(--cx-line);
  --bd-input: var(--cx-line-btn);
  --fg: var(--cx-text);
  --mut: var(--cx-text-muted);
  --pri: var(--cx-ember);
  --ring: var(--cx-focus);
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 24px;
  --fs-xs: 12px; --fs-sm: 13px; --fs-md: 14.5px; --fs-lg: 16px;
  --r: 14px;
  --warn: var(--cx-warning);
  --warn-bg: var(--cx-warn-strip);
  --info: var(--cx-ember);
  --bad: var(--cx-danger);
  --ok-bg: var(--cx-ok-bg);
  --mono: var(--cx-mono);
  --tk-agent-bg: transparent;
  --tk-human-bg: var(--cx-user-bubble);
  --tk-q-bg: var(--cx-warn-strip);
  --tk-q-edge: var(--cx-warn-line);
  --tk-sys-fg: var(--cx-text-muted);
  flex: 1;
  min-height: 0;
  height: 100%;
  width: 100%;
  display: grid;
  grid-template-columns: minmax(240px, 300px) minmax(0, 1fr);
  gap: 0;
}
/* the sidebar already lists the agents: an open conversation takes the whole width, Conversations goes back to the list */
.cx-talk.tkv.tk-conv-on { grid-template-columns: minmax(0, 1fr); }
.cx-talk.tkv.tk-conv-on .tk-list { display: none; }
/* card 645: the sidebar is the agent list; the separate conversation column shows only on phones */
@media (min-width: 768px) { .cx-talk.tkv { grid-template-columns: minmax(0, 1fr); } .cx-talk.tkv .tk-list { display: none; } .cx-talk.tkv .tk-head .tk-back { display: none; } }
.cx-talk .tk-list { background: var(--cx-aside); border: 0; border-radius: 0; max-height: none; height: 100%; overflow: auto; padding: 16px 12px; box-sizing: border-box; }
.cx-talk .tk-lh { font-size: 13px; font-weight: 500; color: var(--cx-text-muted); margin: 0 0 10px 4px; }
.cx-talk.tkv .tk-item { border-radius: 12px; padding: 10px 12px; gap: 2px; }
.cx-talk.tkv .tk-item:hover { background: var(--cx-raised); }
.cx-talk.tkv .tk-item.on { background: var(--cx-raised); border-color: transparent; }
.cx-talk .tk-ag { font-weight: 600; }
.cx-talk .tk-ttl { color: var(--cx-text-2); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cx-talk .tk-when { margin-left: auto; flex: 0 0 auto; font-size: 12px; color: var(--cx-text-faint); }
.cx-talk .tk-top { display: flex; align-items: center; gap: 8px; width: 100%; }
.cx-talk .tk-st { font-size: 12px; color: var(--cx-text-muted); }
.cx-talk .tk-unread { background: var(--cx-ember); }
.cx-talk .tk-new { display: flex; flex-direction: column; align-items: stretch; gap: 8px; padding: 12px 0; border: 0; border-bottom: 1px solid var(--cx-line); border-radius: 0; margin-bottom: 12px; }
.cx-talk .tk-new select { background: var(--cx-bg); border-color: var(--cx-line-btn); color: var(--cx-text); border-radius: 12px; }
.cx-talk .tk-pane { background: var(--cx-bg); border: 0; border-radius: 0; min-height: 0; height: 100%; }
.cx-talk #tk-panein { max-height: none; height: 100%; min-height: 0; flex-direction: row; }
.cx-talk .tk-pick { margin: auto; text-align: center; }
.tk-cx-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; min-height: 0; }

/* header: the agent's name, its place in the team and its state, then pill buttons */
.cx-talk .tk-head { display: flex; align-items: center; gap: 14px; min-height: 58px; box-sizing: border-box; padding: 8px 32px; border-bottom: 1px solid var(--cx-line-soft); }
.cx-talk .tk-back { display: inline-flex; align-items: center; min-height: 36px; padding: 0 12px; border: 1px solid var(--cx-line-btn); border-radius: 999px; background: transparent; color: var(--cx-text-2); font: inherit; font-size: 13px; cursor: pointer; }
.cx-talk .tk-hl { flex: 1 1 220px; min-width: 0; }
.tk-hrow { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.cx-talk .tk-h { margin: 0; font: 600 15px/1.3 var(--cx-font); }
.cx-talk .tk-sub { margin: 0; color: var(--cx-text-faint); font-size: 13px; white-space: normal; }
.cx-talk .tk-sub .tk-stw { display: inline-flex; align-items: center; gap: 6px; }
.cx-talk .tk-sub .tk-dot { width: 7px; height: 7px; }
.tk-hact { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.cx-talk .tk-btn {
  display: inline-flex; align-items: center; gap: 8px; min-height: 34px; padding: 0 14px; box-sizing: border-box;
  border: 1px solid var(--cx-line-btn); border-radius: 999px; background: transparent; color: var(--cx-text-2); text-decoration: none; font: 500 13px/1.2 var(--cx-font); cursor: pointer;
}
.cx-talk .tk-btn:hover { color: var(--cx-text); border-color: var(--cx-line-strong); }
.cx-talk .tk-btn[aria-expanded=true] { background: var(--cx-raised); color: var(--cx-text); }
.tk-pill { display: inline-flex; align-items: center; padding: 1px 10px; border-radius: 999px; font-size: 12px; font-weight: 500; border: 1px solid var(--cx-line-btn); color: var(--cx-text-muted); }
span.tk-pill-waiting:not(.tk-pill), .tk-pill.tk-pill-waiting { color: var(--cx-warn-text); }
span.tk-pill-error:not(.tk-pill), .tk-pill.tk-pill-error { color: var(--cx-danger); }
span.tk-pill-working:not(.tk-pill), .tk-pill.tk-pill-working { color: var(--cx-ember-text); }
span.tk-pill-idle:not(.tk-pill), .tk-pill.tk-pill-idle { color: var(--cx-text-faint); }
span.tk-pill-off:not(.tk-pill), .tk-pill.tk-pill-off { color: var(--cx-text-faint); }

/* avatars (a team room's posts and the empty state) */
.tk-av {
  width: 32px; height: 32px; flex: none; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center;
  font: 600 12px/1 var(--cx-font); background: var(--cx-av-bg); color: var(--cx-av-fg);
}
.tk-av-wrap { position: relative; display: inline-flex; flex: none; }
.cx-talk .tk-dot { border: 0; width: 8px; height: 8px; }
.cx-talk .tk-dot.tk-idle { background: var(--cx-st-ready); }
.cx-talk .tk-dot.tk-working { background: var(--cx-st-working); }
.cx-talk .tk-dot.tk-waiting { background: var(--cx-st-needs); }
.cx-talk .tk-dot.tk-error { background: var(--cx-st-error); }
.cx-talk .tk-dot.tk-off { background: transparent; box-shadow: inset 0 0 0 2px var(--cx-st-off); }

/* header menu, approval card, composer tools, side panel */
.tk-more-w { position: relative; display: inline-flex; }
.cx-talk .tk-ib { width: 34px; padding: 0; justify-content: center; }
.tk-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; min-width: 220px; display: flex; flex-direction: column; padding: 6px; border: 1px solid var(--cx-line-btn); border-radius: 14px; background: var(--cx-panel); box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35); }
.tk-menu a, .tk-menu button { display: flex; align-items: center; min-height: 40px; padding: 0 12px; border: 0; border-radius: 10px; background: transparent; color: var(--cx-text); font: inherit; text-decoration: none; text-align: left; cursor: pointer; }
.tk-menu a:hover, .tk-menu button:hover { background: var(--cx-raised); }

/* the trace line above a reply: a hairline on the left, a dot, what the run took, and Show steps */
.cx-talk .tk-trace, .cx-talk .tk-steps.tk-trace { display: block; margin: 0 0 10px 6px; padding: 0 0 0 16px; border: 0; border-left: 1px solid var(--cx-line-strong); border-radius: 0; background: transparent; color: var(--cx-text-faint); font: 13.5px/1.55 var(--cx-font); overflow: visible; }
.cx-talk div.tk-trace { display: flex; align-items: center; gap: 8px; min-height: 28px; }
.cx-talk .tk-trace summary, .cx-talk .tk-steps.tk-trace summary { display: flex; align-items: center; gap: 8px; min-height: 28px; padding: 0; border: 0; color: var(--cx-text-faint); cursor: pointer; list-style: none; }
.cx-talk details.tk-trace summary::before { display: none; }
.cx-talk details.tk-trace[open] summary { border: 0; margin-bottom: 4px; }
.tk-tdot { width: 8px; height: 8px; flex: none; border-radius: 50%; background: var(--cx-st-working); }
.tk-tdot-err { background: var(--cx-st-error); }
.tk-tdot-wait { background: var(--cx-st-needs); }
.tk-tdot-idle { background: var(--cx-st-ready); }
/* Kabil 17 Nov: the reply status under the person's newest message: one calm line, one line tall (no jump as its words change) */
.tk-reply { display: flex; align-items: center; gap: 8px; min-height: 28px; margin: 2px 0 10px 6px; padding: 0 0 0 16px; border-left: 1px solid var(--cx-line-strong, rgba(128, 128, 128, 0.35)); color: var(--cx-text-faint, #777); font: 13.5px/1.55 var(--cx-font, inherit); white-space: nowrap; overflow: hidden; }
.tk-reply-t { min-width: 0; overflow: hidden; text-overflow: ellipsis; color: var(--cx-text-2, inherit); }
.tk-reply-s { flex: none; margin-left: -4px; font-variant-numeric: tabular-nums; }
.tk-tdot-work { background: var(--cx-st-working); }
.tk-tt { color: var(--cx-text-2); }
.tk-tm { color: var(--cx-text-faint); margin-left: -4px; }
.tk-show { margin-left: 6px; color: var(--cx-text-faint); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.tk-show-o, details[open] > summary .tk-show-c { display: none; }
details[open] > summary .tk-show-o { display: inline; }
.cx-talk .tk-trace summary:hover .tk-show { color: var(--cx-text); }
.tk-trace-b { padding: 2px 0 4px; }
.cx-talk .tk-trace .tk-step { display: block; padding: 0; border: 0; font: 12px/1.9 var(--cx-mono); color: var(--cx-text-faint); overflow-wrap: anywhere; }
.cx-talk .tk-trace .tk-step b { color: var(--cx-text-2); font-weight: 400; }
.cx-talk .tk-trace .tk-step.bad, .cx-talk .tk-trace .tk-step-x { color: var(--cx-danger); }
.cx-talk .tk-trace .tk-step time { color: var(--cx-text-faint); }
.tk-trace-r { margin: 0; color: var(--cx-text-2); }
.cx-talk .tk-steps { border: 1px solid var(--cx-line-2); border-radius: 12px; background: transparent; font: 12px/1.6 var(--cx-mono); overflow: hidden; }
.cx-talk .tk-steps summary { display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 12px; cursor: pointer; color: var(--cx-text-2); }
.cx-talk .tk-step { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-top: 1px solid var(--cx-line-soft); }
.cx-talk .tk-step.bad .tk-step-d { color: var(--cx-danger); }
.cx-talk .tk-step-t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cx-talk .tk-step-d { color: var(--cx-text-faint); flex: none; }
.cx-talk .tk-ok { color: var(--cx-text-2); }
.cx-talk .tk-bad { color: var(--cx-danger); }

/* an approval inside the chat: "Waiting for your approval" in amber, then what and why, and the pill buttons */
.tk-apv { border: 1px solid var(--cx-warn-line); background: transparent; border-radius: 16px; overflow: hidden; margin-top: 8px; }
.tk-apv-old { border-color: var(--cx-line-2); }
.tk-apv-h { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 14px 16px 0; }
.tk-apv-h h3 { margin: 0; flex: 1 1 260px; font-size: 15px; font-weight: 600; order: 2; }
.tk-apv-h h3 p { margin: 0; }
.tk-apv-w { display: inline-flex; align-items: center; gap: 8px; flex: 1 1 100%; font-size: 13px; color: var(--cx-warn-text); order: 1; }
.tk-apv-old .tk-apv-w { color: var(--cx-text-faint); }
.tk-apv-g { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; padding: 12px 16px 0; }
.tk-apv-g > div, .tk-apv-p > div:first-child { display: flex; flex-direction: column; gap: 2px; }
.tk-apv-g span:first-child, .tk-apv-p span:first-child { font-size: 12px; color: var(--cx-text-muted); }
.tk-apv-cmd { margin: 12px 16px 0; padding: 10px 12px; background: var(--cx-panel); border: 1px solid var(--cx-line-2); border-radius: 10px; font: 12px/1.6 var(--cx-mono); color: var(--cx-text); overflow-x: auto; white-space: pre; }
.tk-apv-p { padding: 12px 16px 0; display: flex; flex-direction: column; gap: 6px; }
.tk-apv-p > div:first-child { flex-direction: row; justify-content: space-between; }
.tk-bar { display: block; height: 4px; border-radius: 2px; background: var(--cx-line-btn); overflow: hidden; }
.tk-bar > span { display: block; height: 100%; background: var(--cx-warning); }
.tk-apv-a { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding: 12px 16px 14px; margin-top: 4px; }
.cx-talk .tk-apv-a button { min-height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--cx-line-btn); background: transparent; color: var(--cx-text); font: inherit; font-weight: 500; cursor: pointer; }
.cx-talk .tk-apv-a button.primary { border: 0; background: var(--cx-accent); color: var(--cx-accent-ink); font-weight: 600; }
.cx-talk .tk-apv-a .tk-link { border: 0; color: var(--cx-text-2); }
.cx-talk .tk-apv-a input { flex: 1 1 220px; min-height: 40px; padding: 0 14px; border: 1px solid var(--cx-line-btn); border-radius: 999px; background: transparent; color: var(--cx-text); font: inherit; }
.tk-apv-old .tk-apv-a { display: none; }
.tk-apv-done { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 8px; padding: 8px 0 8px 16px; border-left: 1px solid var(--cx-line-strong); color: var(--cx-text-2); }
.tk-apv-done > span:nth-child(2) { flex: 1; min-width: 200px; }
.tk-grow { flex: 1; }
.tk-mono { font-family: var(--cx-mono); }
.cx-talk .tk-tool { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; border: 0; border-radius: 999px; background: transparent; color: var(--cx-text-faint); font: inherit; font-size: 13px; cursor: pointer; }
.cx-talk .tk-tool:hover, .cx-talk .tk-tool[aria-pressed=true], .cx-talk .tk-tool[aria-expanded=true] { background: var(--cx-raised); color: var(--cx-text); }
.cx-talk label.tk-tool { position: relative; width: 40px; justify-content: center; padding: 0; }
.cx-talk label.tk-tool input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.tk-cmds { display: flex; flex-direction: column; padding: 6px; border: 1px solid var(--cx-line-btn); border-radius: 16px; background: var(--cx-panel); }
.cx-talk .tk-cmds button { display: flex; gap: 12px; align-items: center; min-height: 40px; padding: 0 10px; border: 0; border-radius: 10px; background: transparent; color: var(--cx-text); font: inherit; text-align: left; cursor: pointer; }
.cx-talk .tk-cmds button:hover { background: var(--cx-raised); }
.cx-talk .tk-cmds .tk-mono { min-width: 108px; color: var(--cx-text-2); font-size: 12px; }
.tk-att { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 14px; }
.tk-attc { display: inline-flex; align-items: center; gap: 4px; padding: 2px 4px 2px 12px; border-radius: 999px; background: var(--cx-raised); font-size: 12px; }
.tk-sharing { display: flex; align-items: center; gap: 8px; width: fit-content; margin: 0 0 8px; padding: 4px 4px 4px 12px; border-radius: 999px; background: var(--cx-raised); font-size: 13px; }
.tk-sharing.ctl { background: color-mix(in srgb, #e23b4a 16%, var(--cx-raised)); }
.tk-sharing .tk-ctl-back { font-weight: 600; }
.tk-sharing { flex-wrap: wrap; max-width: 100%; }
.tk-ctlmin { min-height: 32px; padding: 0 8px; border-radius: 8px; border: 1px solid var(--cx-line-btn); background: transparent; color: inherit; font: inherit; font-size: 13px; }
.tk-handsoff { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; font-size: 13px; cursor: pointer; }
.tk-handsoff input { width: 16px; height: 16px; margin: 0; accent-color: #e23b4a; }
.tk-live .tk-live-v + .tk-live-v { border-top: 1px solid rgba(255, 255, 255, .25); }
.tk-sharing-dot { width: 8px; height: 8px; border-radius: 50%; background: #e23b4a; }
/* Kabil 16 Nov: the live screen share's own preview (only the person sees it; the agent gets the newest frame on its desktop) */
.tk-live { position: fixed; right: 16px; bottom: 112px; z-index: 30; width: 240px; border-radius: 12px; overflow: hidden; border: 1px solid var(--cx-line-btn); background: #000; box-shadow: 0 8px 24px rgba(0, 0, 0, .35); pointer-events: none; }
.tk-live-v { display: block; width: 100%; height: auto; max-height: 180px; object-fit: contain; }
.tk-live-tag { position: absolute; left: 8px; top: 8px; display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px; border-radius: 999px; background: rgba(0, 0, 0, .66); color: #fff; font-size: 11px; }
.tk-live-tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #e23b4a; }
@media (max-width: 640px) { .tk-live { width: 132px; right: 12px; bottom: 124px; } .tk-live-tag { font-size: 10px; } }
.cx-talk .tk-x { width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 50%; background: transparent; color: var(--cx-text-muted); cursor: pointer; }
.tk-thumb { aspect-ratio: 16 / 10; border-radius: 12px; overflow: hidden; border: 1px solid var(--cx-line-2); background: var(--cx-panel); position: relative; }
.tk-thumb iframe { position: absolute; top: 0; left: 0; width: 400%; height: 400%; border: 0; transform: scale(0.25); transform-origin: 0 0; pointer-events: none; }
.tk-perm { font-size: 12px; padding: 1px 10px; border-radius: 999px; border: 1px solid var(--cx-line-btn); color: var(--cx-text-2); white-space: nowrap; }
.tk-room { display: flex; align-items: center; gap: 8px; min-height: 40px; color: var(--cx-text); text-decoration: none; }
.tk-room > span:first-child { color: var(--cx-text-faint); }
.tk-room .tk-sub { margin-left: auto; }
.tk-w0 { width: 0%; }
.tk-w2 { width: 2%; }
.tk-w4 { width: 4%; }
.tk-w6 { width: 6%; }
.tk-w8 { width: 8%; }
.tk-w10 { width: 10%; }
.tk-w12 { width: 12%; }
.tk-w14 { width: 14%; }
.tk-w16 { width: 16%; }
.tk-w18 { width: 18%; }
.tk-w20 { width: 20%; }
.tk-w22 { width: 22%; }
.tk-w24 { width: 24%; }
.tk-w26 { width: 26%; }
.tk-w28 { width: 28%; }
.tk-w30 { width: 30%; }
.tk-w32 { width: 32%; }
.tk-w34 { width: 34%; }
.tk-w36 { width: 36%; }
.tk-w38 { width: 38%; }
.tk-w40 { width: 40%; }
.tk-w42 { width: 42%; }
.tk-w44 { width: 44%; }
.tk-w46 { width: 46%; }
.tk-w48 { width: 48%; }
.tk-w50 { width: 50%; }
.tk-w52 { width: 52%; }
.tk-w54 { width: 54%; }
.tk-w56 { width: 56%; }
.tk-w58 { width: 58%; }
.tk-w60 { width: 60%; }
.tk-w62 { width: 62%; }
.tk-w64 { width: 64%; }
.tk-w66 { width: 66%; }
.tk-w68 { width: 68%; }
.tk-w70 { width: 70%; }
.tk-w72 { width: 72%; }
.tk-w74 { width: 74%; }
.tk-w76 { width: 76%; }
.tk-w78 { width: 78%; }
.tk-w80 { width: 80%; }
.tk-w82 { width: 82%; }
.tk-w84 { width: 84%; }
.tk-w86 { width: 86%; }
.tk-w88 { width: 88%; }
.tk-w90 { width: 90%; }
.tk-w92 { width: 92%; }
.tk-w94 { width: 94%; }
.tk-w96 { width: 96%; }
.tk-w98 { width: 98%; }
.tk-w100 { width: 100%; }

/* messages */
.cx-talk .tk-log { flex: 1; overflow: auto; padding: 28px 32px 16px; display: block; }
.tk-cx-col { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 22px; }
.cx-talk .tk-g { max-width: none; display: flex; flex-direction: column; gap: 4px; }
.cx-talk .tk-g.tk-human { align-items: flex-end; }
.cx-talk .tk-human .tk-by { font-size: 12px; font-weight: 400; color: var(--cx-text-faint); margin: 0 4px 0 0; }
.cx-talk .tk-human .tk-msg { max-width: min(560px, 80%); background: var(--cx-bubble); border: 0; border-radius: 20px; padding: 10px 16px; }
.cx-talk .tk-g.tk-cx { flex-direction: row; gap: 12px; align-items: flex-start; }
.cx-talk .tk-g.tk-plain { flex-direction: column; gap: 0; }
.tk-cx-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.cx-talk .tk-cx .tk-by { margin: 0; font-size: 13.5px; color: var(--cx-text-faint); display: flex; gap: 8px; align-items: baseline; }
.cx-talk .tk-cx .tk-by b { color: var(--cx-text); font-weight: 600; }
.cx-talk .tk-cx .tk-by time { font-size: 13px; font-weight: 400; color: var(--cx-text-faint); }
.cx-talk .tk-agent .tk-msg { background: transparent; border: 0; border-radius: 0; padding: 0; }
.cx-talk .tk-plain .tk-msg + .tk-msg { margin-top: 8px; }
.cx-talk .tk-msg .tk-ts { display: none; }
.cx-talk .tk-body p { margin: 0 0 8px; }
.cx-talk .tk-body p:last-child { margin-bottom: 0; }
.cx-talk .tk-body code { font: 12.5px/1.5 var(--cx-mono); padding: 1px 5px; border-radius: 6px; background: var(--cx-raised); }
.cx-talk .tk-body a { color: var(--cx-text); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--cx-text-faint); }
.cx-talk .tk-q { border: 1px solid var(--cx-warn-line); border-radius: 16px; background: transparent; padding: 16px; margin-top: 8px; }
.cx-talk .tk-ql { margin: 0 0 6px; font-size: 13px; font-weight: 500; color: var(--cx-warn-text); }
.cx-talk .tk-qa { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.cx-talk .tk-qa button { min-height: 40px; padding: 0 16px; border: 1px solid var(--cx-line-btn); border-radius: 999px; background: transparent; color: var(--cx-text); font: inherit; font-weight: 500; cursor: pointer; }
.cx-talk .tk-qa button:first-child { background: var(--cx-accent); color: var(--cx-accent-ink); border-color: transparent; font-weight: 600; }
.cx-talk .tk-qa button:disabled { opacity: 0.5; cursor: default; }
.tk-step { display: flex; align-items: flex-start; gap: 10px; padding: 8px 12px; }
.tk-step-t { flex: 1; min-width: 0; overflow-wrap: anywhere; color: var(--cx-text-2); }
.tk-step time { flex: none; color: var(--cx-text-faint); }

/* composer: a large rounded box with the tools and a round light send button */
.cx-talk .tk-comp { border: 0; padding: 8px 32px 24px; display: flex; flex-direction: column; gap: 8px; }
.cx-talk .tk-comp > * { width: 100%; max-width: 760px; margin: 0 auto; }
.tk-box { border: 1px solid var(--cx-line-btn); border-radius: 26px; background: var(--cx-panel); display: flex; flex-direction: column; box-sizing: border-box; }
.tk-box:focus-within { border-color: var(--cx-line-strong); }
.cx-talk .tk-box #tk-in { width: 100%; min-height: 0; resize: none; border: 0; background: transparent; color: var(--cx-text); font: inherit; padding: 16px 20px 4px; outline: none; box-sizing: border-box; }
.cx-talk .tk-box #tk-in::placeholder { color: var(--cx-text-faint); }
.cx-talk .tk-box .tk-cbar { display: flex; align-items: center; gap: 2px; padding: 4px 12px 12px 10px; }
.cx-talk .tk-cnt { margin: 0 8px 0 0; font-size: 12px; color: var(--cx-text-faint); }
.cx-talk #tk-send.tk-sendi {
  width: 36px; height: 36px; min-height: 36px; padding: 0 !important; display: inline-flex; align-items: center; justify-content: center;
  background: var(--cx-accent) !important; color: var(--cx-accent-ink) !important; border: 0 !important; border-radius: 50% !important; cursor: pointer;
}
.cx-talk #tk-send.tk-sendi:disabled { background: var(--cx-raised) !important; color: var(--cx-text-faint) !important; opacity: 1; cursor: default; }
.tk-foot { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding: 0 20px; box-sizing: border-box; }
.cx-talk .tk-hint { margin: 0; font-size: 12px; color: var(--cx-text-faint); }
.cx-talk .tk-serr { margin: 0; color: var(--cx-danger); font-size: 13px; }
.cx-talk .primary, .cx-talk [data-tk="new"] {
  background: var(--cx-accent) !important; color: var(--cx-accent-ink) !important; border: 0 !important;
  border-radius: 999px !important; font-weight: 600; min-height: 40px; padding: 0 18px;
}
.cx-talk .tk-note { padding: 6px 32px; font-size: 12px; color: var(--cx-text-muted); border-bottom: 1px solid var(--cx-line-soft); }

/* Details: the agent's desktop, status, permissions, rooms and reminders, opened from the header */
.tk-aside { flex: 0 0 300px; box-sizing: border-box; padding: 22px; display: flex; flex-direction: column; gap: 22px; background: var(--cx-aside); border-left: 1px solid var(--cx-line-soft); overflow: auto; }
.tk-aside section { display: flex; flex-direction: column; gap: 4px; }
.tk-aside h3 { margin: 0 0 6px; font-size: 13px; font-weight: 500; color: var(--cx-text-muted); }
.tk-kv { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--cx-line-soft); font-size: 13.5px; }
.tk-kv:last-child { border-bottom: 0; }
.tk-kv > span:first-child { color: var(--cx-text-muted); }
.tk-kv a, .tk-aside-h a { color: var(--cx-text); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--cx-text-faint); }
.tk-rem { align-items: center; }
.tk-rem > span:first-child { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tk-rem-n { color: var(--cx-text); overflow-wrap: anywhere; }
.tk-rem-add { display: grid; grid-template-columns: 1fr auto; gap: 6px; margin-top: 8px; }
.tk-rem-add input { grid-column: 1 / -1; }
.tk-rem-add input, .tk-rem-add select { min-width: 0; padding: 6px 12px; border: 1px solid var(--cx-line-btn); border-radius: 12px; background: var(--cx-bg); color: var(--cx-text); font: inherit; }
.tk-runl { margin: 0; font-family: var(--cx-mono); font-size: 12px; color: var(--cx-text-2); overflow-wrap: anywhere; }
.tk-aside .tk-btn { align-self: flex-start; margin-top: 8px; }
@media (max-width: 1100px) { .tk-aside { display: none; } }

/* 0.4.2: agents "Now" box, search, settings, chat states */
.cx-search { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px; box-sizing: border-box; border: 1px solid var(--cx-line-2); border-radius: 12px; background: var(--cx-panel); color: var(--cx-text-muted); }
.cx-main .cx-search input[type=search] { width: 160px; min-height: 0; padding: 0; margin: 0; border: 0; background: transparent; color: var(--cx-text); outline: none; }
.cx-agcard { padding: 0; gap: 0; }
.cx-agcard .cx-ag-top { padding: 18px 18px 0; }
.cx-agcard.st-needs { border-color: var(--cx-warn-line); }
.cx-agcard[hidden] { display: none; }
.cx-now { margin: 14px 18px 0; padding: 12px; border-radius: 10px; background: var(--cx-bg); border: 1px solid var(--cx-line-soft); display: flex; flex-direction: column; gap: 8px; font-size: 13px; }
.cx-now-h { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--cx-text-muted); }
.cx-now-h span:first-child { text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; }
.cx-main .cx-now-go { align-self: flex-start; min-height: 36px; padding: 0 12px; border-color: var(--cx-warn-line); background: var(--cx-warn-strip); color: var(--cx-warn-text); font-size: 13px; }
.cx-agcard .cx-dl { padding: 14px 18px; }
.cx-dl-wide { grid-column: 1 / -1; }
.cx-agcard .cx-ag-act { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 14px 18px 18px; }
.cx-okpill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: var(--cx-ok-bg); color: var(--cx-ok-fg); font-size: 12px; font-weight: 500; }
.cx-mono { font-family: var(--cx-mono); font-size: 12.5px; }
.cx-set { display: flex; flex-direction: column; gap: 8px; padding: 22px; border-radius: 16px; }
.cx-set h2 { margin: 0; font-size: 17px; }
.cx-set > .cx-muted { margin: 0 0 6px; font-size: 13px; }
.cx-set fieldset { margin: 0; padding: 0; border: 0; }
.cx-set legend { padding: 0; margin-bottom: 10px; font-weight: 600; }
.cx-set label { font-size: 13px; font-weight: 500; }
.cx-set-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); gap: 20px; align-items: start; margin-top: 20px; }
.cx-app-row { display: flex; flex-wrap: wrap; gap: 28px; margin-top: 8px; }
.cx-themes { flex: 2 1 440px; }
.cx-app-side { flex: 1 1 240px; display: flex; flex-direction: column; gap: 18px; }
.cx-theme-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.cx-main .cx-theme-card { padding: 0; min-height: 0; display: flex; flex-direction: column; overflow: hidden; border: 2px solid var(--cx-line-2); border-radius: 12px; background: var(--cx-card-bg); text-align: left; }
.cx-main .cx-theme-card:hover { background: var(--cx-card-bg); border-color: var(--cx-line-btn); }
.cx-main .cx-theme-card.on { border-color: var(--cx-accent); background: var(--cx-card-bg); }
.cx-theme-pv { display: flex; height: 84px; border-bottom: 1px solid var(--cx-line-2); }
.cx-pv-dark { background: var(--cx-pv-dark-bg); }
.cx-pv-light { background: var(--cx-pv-light-bg); }
.cx-pv-system { background: linear-gradient(90deg, var(--cx-pv-light-bg) 50%, var(--cx-pv-dark-bg) 50%); }
.cx-pv-side { width: 26%; }
.cx-pv-dark .cx-pv-side { background: var(--cx-pv-dark-side); border-right: 1px solid var(--cx-pv-dark-line); }
.cx-pv-light .cx-pv-side { background: var(--cx-pv-light-side); border-right: 1px solid var(--cx-pv-light-line); }
.cx-pv-body { flex: 1; display: flex; flex-direction: column; gap: 5px; padding: 8px; }
.cx-pv-body span { height: 8px; width: 70%; border-radius: 4px; background: var(--cx-pv-dark-line); }
.cx-pv-light .cx-pv-body span, .cx-pv-system .cx-pv-body span { background: var(--cx-off); }
.cx-pv-body span:nth-child(2) { width: 50%; }
.cx-pv-body .cx-pv-btn { height: 14px; width: 40%; margin-top: auto; background: var(--cx-accent) !important; }
.cx-theme-l { display: flex; align-items: center; gap: 8px; padding: 10px 12px; }
.cx-theme-l > span:last-child { display: flex; flex-direction: column; }
.cx-theme-l .cx-muted { font-size: 12px; font-weight: 400; }
.cx-radio { width: 18px; height: 18px; flex: none; box-sizing: border-box; border-radius: 50%; border: 2px solid var(--cx-line-btn); display: inline-flex; align-items: center; justify-content: center; }
.cx-theme-card.on .cx-radio { border-color: var(--cx-accent); }
.cx-theme-card.on .cx-radio::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--cx-accent); }
.cx-kv { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--cx-line-soft); }
.cx-kv:last-of-type { border-bottom: 0; }
.cx-kv > span:first-child { display: flex; flex-direction: column; color: var(--cx-text-muted); }
.cx-kv > span:first-child b { color: var(--cx-text); font-weight: 500; }
.cx-kv > span:first-child .cx-muted { font-size: 12px; }
.cx-set-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-top: 10px; flex-wrap: wrap; font-size: 13px; }
.cx-main .cx-danger { border-color: var(--cx-danger-line); color: var(--cx-danger); }
.cx-boardrow { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; background: var(--cx-bg); border: 1px solid var(--cx-line-soft); }
.cx-boardrow .cx-logo { width: 28px; height: 28px; font-size: 14px; }
.cx-boardrow span:nth-child(2) { flex: 1; }
.cx-inrow { display: flex; gap: 8px; }
.cx-main .cx-inrow input { flex: 1; min-width: 0; margin: 0; font-family: var(--cx-mono); }
.cx-team { border: 1px solid var(--cx-line-soft); border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 10px; background: var(--cx-bg); }
.cx-team-h { display: flex; justify-content: space-between; font-size: 13px; }
.cx-team-m { display: flex; flex-wrap: wrap; gap: 8px; }
.cx-chip-n { display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 999px; background: var(--cx-raised); font-size: 13px; }
.cx-json summary { cursor: pointer; color: var(--cx-text-muted); font-size: 13px; min-height: 32px; display: flex; align-items: center; }
.cx-json textarea { margin: 6px 0 8px; font-family: var(--cx-mono); font-size: 12.5px; }

/* density */
[data-cx-density=compact] .cx { font-size: 13px; }
[data-cx-density=compact] .cx-main:not(.cx-main-chat):not(.cx-main-desk) { padding: 20px 24px 32px; }
[data-cx-density=compact] .cx-rail button, [data-cx-density=compact] .cx-side-ag { min-height: 34px; }
[data-cx-density=compact] .cx-side { gap: 14px; }
[data-cx-density=compact] .cx-main button { min-height: 38px; }
[data-cx-density=compact] .cx-card, [data-cx-density=compact] .cx-add { padding: 14px; }
[data-cx-density=compact] .tk-cx-col { gap: 14px; }
[data-cx-density=compact] .cx-talk .tk-log { padding: 16px 24px; }

/* chat states (Talk look "console") */
.tk-day { display: flex; justify-content: center; color: var(--cx-text-faint); font-size: 12px; }
details.tk-steps summary { display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 12px; cursor: pointer; color: var(--cx-text-2); list-style: none; }
details.tk-steps summary::-webkit-details-marker { display: none; }
details.tk-steps:not(.tk-trace) summary::before { content: ""; width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(-45deg); transition: transform 0.15s; }
details.tk-steps:not(.tk-trace)[open] summary::before { transform: rotate(45deg); }
details.tk-steps:not(.tk-trace)[open] summary { border-bottom: 1px solid var(--cx-line); }
.tk-step-n { flex: 1; }
.tk-ok { color: var(--cx-accent); }
.tk-bad { color: var(--cx-danger); }
.tk-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.cx-talk .tk-chip { min-height: 36px; padding: 0 12px; border: 1px solid var(--cx-line-btn); border-radius: 999px; background: var(--cx-panel); color: var(--cx-text-2); font: inherit; font-size: 13px; cursor: pointer; }
.cx-talk .tk-chip:hover { background: var(--cx-raised); color: var(--cx-text); }
.tk-state { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 48px 24px; border: 1px dashed var(--cx-line-btn); border-radius: 16px; }
.tk-state .tk-av { width: 48px; height: 48px; border-radius: 12px; font-size: 16px; }
.tk-state h2 { margin: 0; font-size: 17px; font-weight: 600; }
.tk-state p { margin: 0; max-width: 420px; color: var(--cx-text-muted); }
.tk-state-off { border-style: solid; border-color: var(--cx-line-2); background: var(--cx-panel); }
.tk-box-off { opacity: 0.6; }
.cx-talk #tk-send.tk-sendi:disabled { background: var(--cx-raised) !important; color: var(--cx-text-faint) !important; opacity: 1; }
.tk-aside-h { display: flex; justify-content: space-between; align-items: center; }
.tk-live { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--cx-accent); }
.tk-live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.tk-live.off { color: var(--cx-text-faint); }

/* phone, and the Console inside the board (the board has its own sidebar) */
@media (max-width: 767px) {
  .cx-shell { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
  .cx-side { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 12px; border-right: 0; border-bottom: 1px solid var(--cx-line); overflow: visible; }
  .cx-side-sec, .cx-side-foot .cx-me, .cx-side-scroll { display: none; }
  .cx-jump-btn { flex: 1; width: auto; min-width: 0; min-height: 44px; }
  .cx-jump-btn kbd { display: none; }
  .cx-chan-feed, .cx-chan-comp { padding-left: 16px; padding-right: 16px; }
  .cx-side-foot { margin: 0; padding: 0; border: 0; }
  .cx-ver { display: none; }
  .cx-rail { flex-direction: row; width: 100%; min-width: 0; overflow-x: auto; flex-wrap: nowrap; }
  .cx-rail button { width: auto; flex: none; min-height: 44px; }
  .cx-phone-only { display: flex !important; }
  .cx-main { padding: 16px; }
  .cx-pad, .cx-desk-top { padding: 16px; }
  .cx-frame-wrap { margin: 0 16px 16px; }
  .cx-ag-grid { grid-template-columns: minmax(0, 1fr); }
  .cx-set-grid { grid-template-columns: minmax(0, 1fr); }
  .cx-theme-grid { grid-template-columns: minmax(0, 1fr); }
  .cx-main .cx-search input[type=search] { width: 100%; }
  .cx-hero-act { width: 100%; }
  .cx-talk.tkv { grid-template-columns: minmax(0, 1fr) !important; }
  .cx-talk .tk-list { width: 100%; max-width: none; }
  .cx-talk .tk-pane { display: none; }
  .cx-talk.tkv.tk-conv-on .tk-list { display: none; }
  .cx-talk.tkv.tk-conv-on .tk-pane { display: flex; }
  .cx-talk .tk-head, .cx-talk .tk-comp, .cx-talk .tk-log { padding-left: 16px; padding-right: 16px; }
  .tk-hact, .tk-foot > span { display: none; }
  .tk-steps { margin-left: 0; }
  .cx-talk .tk-human .tk-msg { max-width: 85%; }
}
.cx-embed .cx-shell { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
.cx-embed .cx-side { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 12px; border-right: 0; border-bottom: 1px solid var(--cx-line); overflow: visible; }
.cx-embed .cx-rail { flex-direction: row; flex: 1; overflow-x: auto; flex-wrap: nowrap; }
.cx-embed .cx-rail button { width: auto; flex: none; }
.cx-embed .cx-side-sec, .cx-embed .cx-side-foot .cx-me { display: none; }
.cx-embed .cx-side-foot { margin: 0; padding: 0; border: 0; }
.cx-embed .cx-phone-only { display: flex !important; }
#v-console.cx {
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

/* card 645: Autonomy tab (per agent) */
.cx-au { display: flex; flex-direction: column; gap: 20px; margin-top: 16px; }
.cx-au-box { border: 1px solid var(--cx-line-2); border-radius: 16px; background: var(--cx-card-bg); padding: 20px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.cx-au-box h2 { margin: 0; font-size: 17px; font-weight: 600; }
.cx-au-box > .cx-muted { margin: 0; font-size: 13px; }
.cx-au-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.cx-main .cx-au-head button { min-height: 36px; font-size: 13px; padding: 0 12px; }
.cx-au-lvs { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.cx-main .cx-au-lv { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 14px; min-height: 0; border: 2px solid var(--cx-line-2); border-radius: 12px; background: var(--cx-bg); text-align: left; font-weight: 400; }
.cx-main .cx-au-lv.on { border-color: var(--cx-accent); background: var(--cx-ok-bg); font-weight: 400; }
.cx-au-lv-h { display: flex; align-items: center; gap: 8px; }
.cx-au-lv-d { font-size: 13px; color: var(--cx-text-2); }
.cx-au-radio { width: 18px; height: 18px; box-sizing: border-box; border-radius: 50%; border: 2px solid var(--cx-off); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.cx-au-lv.on .cx-au-radio { border-color: var(--cx-accent); }
.cx-au-lv.on .cx-au-radio::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--cx-accent); }
.cx-au-fxs { display: flex; flex-wrap: wrap; gap: 8px 20px; padding-top: 12px; border-top: 1px solid var(--cx-line-soft); font-size: 13px; }
.cx-au-fx { display: inline-flex; align-items: center; gap: 6px; }
.cx-au-ok { color: var(--cx-accent); font-weight: 700; }
.cx-au-ask { color: var(--cx-warning); font-weight: 700; }
.cx-au-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(380px, 100%), 1fr)); gap: 20px; align-items: start; }
.cx-au-item { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 12px; border-radius: 10px; background: var(--cx-bg); border: 1px solid var(--cx-line-soft); }
.cx-au-item-h { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; padding-right: 64px; }
.cx-au-item-h .cx-muted { font-size: 12px; }
.cx-au-next { font-size: 13px; color: var(--cx-text-2); }
.cx-main .cx-au-rm { position: absolute; top: 6px; right: 10px; min-height: 32px; font-size: 12px; }
.cx-au-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.cx-au-form input[type=text] { flex: 1 1 200px; min-width: 0; }
.cx-au-rtform { flex-direction: column; align-items: stretch; padding: 12px; border-radius: 10px; background: var(--cx-bg); border: 1px solid var(--cx-line-soft); }
.cx-au-rtform label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--cx-text-2); }
.cx-au-rtform select, .cx-au-rtform input[type=time] { min-height: 44px; padding: 0 10px; border-radius: 10px; border: 1px solid var(--cx-line-btn); background: var(--cx-bg); color: var(--cx-text); font: inherit; }
.cx-au-form-a { display: flex; gap: 8px; align-items: center; }
.cx-au-rt { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--cx-line-soft); }
.cx-au-rt:last-child { border-bottom: 0; }
.cx-au-rt-t { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 13px; color: var(--cx-text-2); }
.cx-au-rt-t b { font-size: 14px; color: var(--cx-text); font-weight: 500; }
.cx-au-rt-t .cx-muted { font-size: 12px; }
.cx-au-kind { flex: none; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 6px; }
.cx-au-kind.sched { background: var(--cx-raised); color: var(--cx-info); }
.cx-au-kind.trig { background: var(--cx-warn-bg); color: var(--cx-warn-text); }
.cx-au-kind.ev { background: var(--cx-raised); color: var(--cx-ok, var(--cx-info)); }
.cx-au-box h3 { margin: 14px 0 4px; font-size: 14px; font-weight: 600; }
.cx-au-hook { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 8px 0; font-size: 12px; }
.cx-au-hook code { word-break: break-all; }
.cx-au-rtform input[type=number] { min-height: 44px; padding: 0 10px; border-radius: 10px; border: 1px solid var(--cx-line-btn); background: var(--cx-bg); color: var(--cx-text); font: inherit; max-width: 120px; }
.cx-main .cx-sw { position: relative; width: 44px; height: 26px; min-height: 26px; flex: none; padding: 0; border: 0; border-radius: 13px; background: var(--cx-line-btn); }
.cx-main .cx-sw:hover { background: var(--cx-off); }
.cx-main .cx-sw.on, .cx-main .cx-sw.on:hover { background: var(--cx-accent); }
.cx-sw span { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--cx-white); transition: left 0.15s; }
.cx-sw.on span { left: 21px; }
.cx-au-ideas { border-color: var(--cx-warn-line); background: var(--cx-warn-card); }
.cx-au-idea { display: flex; flex-direction: column; gap: 6px; padding: 12px; border-radius: 10px; background: var(--cx-bg); border: 1px solid var(--cx-warn-line); font-size: 13px; color: var(--cx-text-2); }
.cx-au-idea b { font-size: 14px; color: var(--cx-text); font-weight: 500; }
.cx-au-idea .cx-muted { font-size: 12px; }
.cx-au-idea-a { display: flex; gap: 8px; align-items: center; }
.cx-au-res { color: var(--cx-accent-hi); }
.cx-au-cap { display: inline-flex; align-items: center; gap: 0; }
.cx-main .cx-au-cap input[type=text] { width: 90px; }
.cx-rule > div:first-child label b { font-weight: 600; }

/* card 645: phone (design Mobile): bottom tab bar, compact chat header, pill composer, compact approval card */
.cx-tabbar, .tk-phone, .tk-narrow, .cx-talk .tk-phone { display: none; }
@media (max-width: 767px) {
  .cx-shell { grid-template-rows: auto minmax(0, 1fr) auto; }
  .cx-shell:has(.tk-conv-on) { grid-template-rows: minmax(0, 1fr) auto; }
  .cx-shell:has(.tk-conv-on) > .cx-side { display: none; }
  .cx-rail [data-cx=approvals], .cx-rail [data-cx=desktop], .cx-rail [data-cx=agents], .cx-rail [data-cx=talk] { display: none !important; }
  .cx-tabbar { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border-top: 1px solid var(--cx-line); background: var(--cx-side); padding: 4px 4px max(14px, env(safe-area-inset-bottom)); }
  .cx-tab { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 52px; padding: 0; border: 0; background: transparent; color: var(--cx-text-2); font: inherit; font-size: 11px; font-weight: 500; cursor: pointer; }
  .cx-tab.on { color: var(--cx-text); }
  .cx-tab.on .cx-i { color: var(--cx-accent); }
  .cx-tab-n { position: absolute; top: 4px; left: 54%; min-width: 16px; height: 16px; padding: 0 4px; box-sizing: border-box; border-radius: 8px; background: var(--cx-warning); color: var(--cx-accent-ink); font-size: 10px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
  .tk-wide { display: none; }
  .tk-narrow { display: inline; }
  .tk-phone, .cx-talk .tk-phone { display: inline-flex; }
  .cx-talk .tk-cx-head { gap: 10px; padding: 12px 12px 12px 4px; }
  .cx-talk .tk-back { width: 44px; height: 44px; min-height: 44px; padding: 0; border: 0; justify-content: center; color: var(--cx-text); }
  .cx-talk .tk-cx-head .tk-hl { flex: 1; min-width: 0; }
  .cx-talk .tk-cx-head .tk-hrow { flex-direction: column; align-items: flex-start; gap: 0; }
  .cx-talk .tk-cx-head .tk-h { font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
  .cx-talk .tk-cx-head .tk-pill { padding: 0; background: transparent; font-size: 13px; }
  .cx-talk .tk-cx-head .tk-sub { display: none; }
  .cx-talk .tk-cx-head .tk-phone { width: 44px; height: 44px; align-items: center; justify-content: center; border: 1px solid var(--cx-line-btn); border-radius: 10px; color: var(--cx-text); flex: none; }
  .cx-talk .tk-comp { padding: 8px 12px 10px; gap: 8px; }
  .tk-chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .tk-chips .tk-chip { flex: none; }
  .tk-box { flex-direction: row; align-items: flex-end; border-radius: 22px; padding: 4px 4px 4px 14px; }
  .cx-talk .tk-box #tk-in, .cx-talk .tk-box textarea { min-height: 40px; height: 40px; max-height: 120px; padding: 9px 0; }
  .cx-talk .tk-box .tk-cbar { padding: 0; flex: none; }
  .cx-talk .tk-box .tk-cbar > :not(.tk-sendi) { display: none; }
  .cx-talk #tk-send.tk-sendi { border-radius: 50% !important; }
  .cx-talk .tk-foot { display: none; }
  .tk-apv-a { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .tk-apv-a .tk-grow { display: none; }
  .cx-talk .tk-apv-a button { min-height: 48px; justify-content: center; }
  .cx-talk .tk-apv-a .primary { order: 1; }
  .cx-talk .tk-apv-a .tk-apv-other { order: 2; border: 1px solid var(--cx-warn-btn); border-radius: 10px; color: var(--cx-text); text-decoration: none; }
  .cx-talk .tk-apv-a .tk-apv-always { order: 3; grid-column: 1 / -1; display: none; }
  .cx-talk .tk-apv-more .tk-apv-a .tk-apv-always { display: inline-flex; align-items: center; }
  .cx-talk .tk-apv-a .tk-apv-mb { order: 4; grid-column: 1 / -1; min-height: 44px; color: var(--cx-text-2); text-decoration: none; }
  .tk-apv:not(.tk-apv-more) .tk-apv-g, .tk-apv:not(.tk-apv-more) .tk-apv-p { display: none; }
}
.cx-embed .cx-tabbar { display: none !important; }
.cx-talk .tk-cx, .cx-talk .tk-cx .tk-msg, .cx-talk .tk-apv { max-width: 100%; min-width: 0; box-sizing: border-box; }   /* a long command scrolls in its box, the message never widens the log */

/* card 645: side panel rows, screenshot preview, board-embedded Console */
.tk-kv { align-items: flex-start; }
.tk-kv > span:first-child { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.tk-kv > :last-child:not(:first-child) { flex: none; white-space: nowrap; }
.tk-kv.tk-rem > :last-child { white-space: normal; }
.tk-perm { align-self: flex-start; }
a.tk-thumb { display: block; }
.tk-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: var(--cx-desk); }
.tk-thumb:hover { border-color: var(--cx-accent); }
.tk-pick-list { width: min(420px, 100%); margin: 16px auto 0; text-align: left; }
.cx-embed .cx-rail { flex-wrap: wrap; overflow: visible; }      /* inside the board every screen button stays visible (it scrolled, Memory and Settings cut off) */
/* every scrolling pane holds its absolutely placed children (screen-reader labels): they never stretch the page (the second scrollbar) */
.tk-aside, .tk-log, .cx-side-scroll, .cx-main, .tk-list, .cx-chan-feed { position: relative; }
/* card 645: images and videos an agent shares in its chat */
.tk-media { margin: 8px 0 0; display: flex; flex-direction: column; gap: 4px; max-width: min(560px, 100%); }
.tk-media img, .tk-media video { display: block; max-width: 100%; max-height: 420px; width: auto; height: auto; border-radius: 10px; border: 1px solid var(--cx-line-2); background: var(--cx-desk); }
.tk-media video { width: 100%; }
.tk-priv { display: grid; grid-template-columns: auto 1fr; gap: 6px 10px; align-items: center; padding: 8px 10px; margin-bottom: 6px; border: 1px solid var(--cx-line-2); border-radius: 10px; font-size: 13px; }
.tk-priv input { min-width: 0; padding: 6px 8px; border: 1px solid var(--cx-line-btn); border-radius: 8px; background: transparent; color: inherit; font: inherit; }
.tk-priv span { grid-column: 1 / -1; color: var(--cx-text-muted); font-size: 12px; }
.tk-box-priv textarea { -webkit-text-security: disc; text-security: disc; }
.tk-page { max-width: min(760px, 100%); width: 100%; }
.tk-page iframe { display: block; width: 100%; height: 440px; min-height: 160px; resize: vertical; overflow: auto; border-radius: 10px; border: 1px solid var(--cx-line-2); background: #fff; }
.tk-media-cap { font-size: 12px; color: var(--cx-text-muted); }
.tk-media-cap a { color: var(--cx-accent); }
.tk-doc { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 12px; align-items: center; padding: 10px 14px; border: 1px solid var(--cx-line-2); border-radius: 10px; background: var(--cx-desk); color: inherit; text-decoration: none; }
.tk-doc:hover, .tk-doc:focus-visible { border-color: var(--cx-accent); }
.tk-doc-ic { grid-row: 1 / 3; padding: 8px 6px; border-radius: 6px; background: var(--cx-accent); color: var(--cx-accent-ink); font-size: 11px; font-weight: 700; letter-spacing: .04em; }
.tk-doc-nm { font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.tk-doc-sz { font-size: 12px; color: var(--cx-accent); }
.tk-media-wait, .tk-media-err { padding: 12px 14px; border: 1px dashed var(--cx-line-btn); border-radius: 10px; font-size: 13px; color: var(--cx-text-muted); }
/* card 645: the live view keeps the desktop's shape and fits the window; the activity list scrolls on its own (it stretched the row to
   3000 px and the view with it: a black frame with the desktop far below) */
.cx-main .cx-live-wrap { flex: none; align-self: center; width: min(100%, calc((100vh - 260px) * var(--cx-ar, 1.6))); min-height: 0; }
@media (min-width: 1101px) {
  .cx-desk2 { height: 100%; min-height: 0; }
  .cx-desk2-main, .cx-desk2-side { min-height: 0; overflow: auto; }
}
/* card 645: copy a chat message (shows on hover or focus; always on touch screens) */
.tk-msg { position: relative; }
.tk-copy { position: absolute; top: -6px; right: 0; display: inline-flex; align-items: center; gap: 4px; min-height: 28px; padding: 0 8px; border: 1px solid var(--cx-line-btn); border-radius: 8px; background: var(--cx-panel); color: var(--cx-text-2); font: inherit; font-size: 12px; cursor: pointer; opacity: 0; transition: opacity 0.12s; z-index: 1; }
.tk-copy:focus-visible, .tk-copy.done { opacity: 1; }
@media (hover: hover) { .tk-msg:hover > .tk-copy { opacity: 1; } }
.tk-copy.done { color: var(--cx-accent-hi); border-color: var(--cx-accent); }
.cx-talk .tk-human .tk-copy { right: auto; left: -6px; top: -10px; }
@media (hover: none) { .tk-copy { opacity: 0.85; position: static; margin: 0 0 4px auto; } .tk-msg { display: flex; flex-direction: column; } }
/* card 645: the team lead sits on top with a Lead badge (sidebar, Agents, its page) */
.cx-lead-tag { display: inline-flex; align-items: center; margin-left: 6px; padding: 0 6px; border-radius: 5px; background: var(--cx-tag-bg); color: var(--cx-tag-fg); font-size: 12px; font-weight: 600; letter-spacing: 0.02em; vertical-align: middle; white-space: nowrap; }
.cx-agcard-lead { grid-column: auto; }

.cx-wake { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; }

#cx-own img { width: 100%; height: 100%; object-fit: contain; }
/* card 765: the live frame's wait note: covers the frame until it loads, then a short hint at the bottom while the stream starts */
.cx-desk-wait { position: absolute; inset: 0; z-index: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 16px; text-align: center; background: var(--cx-panel); color: var(--cx-text-muted); }
.cx-desk-wait b { color: var(--cx-text); font-size: 15px; }
.cx-desk-wait:empty { display: none; }
.cx-desk-on .cx-desk-wait { inset: auto 12px 12px; padding: 6px 12px; border: 1px solid var(--cx-line-2); border-radius: 8px; font-size: 12px; pointer-events: none; }

/* card 739 (ui spec, harden): one in-app confirmation for turning off, taking over and removing. It names the effect;
   Cancel and the action are the same size and weight, Cancel comes first and gets focus. */
.cx-confirm { display: flex; flex-direction: column; gap: 10px; width: 100%; padding: 12px 14px; box-sizing: border-box; border: 1px solid var(--cx-line-btn); border-radius: 12px; background: var(--cx-raised); color: var(--cx-text); }
.cx-confirm p { margin: 0; max-width: 60ch; font-size: 14px; line-height: 1.45; }
.cx-confirm-a { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.cx .cx-confirm-a button { min-height: 44px; padding: 0 14px; border: 1px solid var(--cx-line-btn); border-radius: 10px; background: var(--cx-panel); color: var(--cx-text); font: inherit; font-weight: 600; cursor: pointer; }
.cx .cx-confirm-a button:hover { background: var(--cx-bg); }
.cx .cx-confirm-a .cx-confirm-yes { color: var(--cx-danger); border-color: var(--cx-danger-line); }
.cx-hero-act .cx-confirm, .cx-desk-acts .cx-confirm { max-width: 520px; }
.cx-mem-acts .cx-confirm, .cx-chan-acts .cx-confirm { flex: 1 1 100%; }
.cx-mem-acts:has(.cx-confirm) { flex: 1 1 100%; }
.cx-talk .tk-confirm { margin: 12px 24px 0; width: auto; }
.cx-main .cx-danger-l { color: var(--cx-text-muted); }
.cx-main .cx-danger-l:hover { color: var(--cx-danger); border-color: var(--cx-danger-line); background: transparent; }
.cx-desk-acts { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.cx-desk-why { display: none; font-size: 13px; color: var(--cx-text-muted); }
@media (max-width: 767px) {
  .cx-main .cx-desk-ctrl { display: none; }
  .cx-desk-why { display: block; flex: 1 1 100%; }
  .cx-talk .tk-confirm { margin: 8px 12px 0; }
}

/* card 739 (ui spec, clarify): honest numbers on Runs. What today cost leads; what is not measured is said quietly, never as 0. */
.cx-run-tiles { grid-template-columns: minmax(260px, 2fr) repeat(auto-fit, minmax(150px, 1fr)); }
.cx-tile-main { border-color: var(--cx-line-btn); }
.cx-tile-main b { font-size: 34px; }
.cx-tile-main small { max-width: 48ch; line-height: 1.4; }
.cx-nm { color: var(--cx-text-faint); font-family: inherit; font-size: 12px; }
.cx-run-note { margin: -8px 0 0; font-size: 13px; }
.cx-run-head, .cx-run-row { grid-template-columns: 84px minmax(0, 1fr) 64px 96px 96px; }
@media (max-width: 600px) { .cx-run-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } .cx-tile-main { grid-column: 1 / -1; } }

/* card 739 (ui spec, layout): Chat leads the rail; Health and Settings carry labels; slim agent cards with a More menu;
   Runs filters as an agent menu plus three status choices. */
.cx-foot-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; }
.cx-foot-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 10px; box-sizing: border-box;
  border: 0; border-radius: 10px; background: transparent; color: var(--cx-text-2); font: 500 13px/1.2 var(--cx-font); cursor: pointer;
}
.cx-foot-btn:hover { background: var(--cx-raised); color: var(--cx-text); }
.cx-foot-btn.on { background: var(--cx-active-bg); color: var(--cx-active-fg); }
.cx-foot-btn:focus-visible { outline: 2px solid var(--cx-focus); outline-offset: 2px; }
.cx-agcard { gap: 10px; }
.cx-ag-more { position: relative; flex: none; }
.cx-ag-menu {
  position: absolute; right: 0; top: calc(100% + 4px); z-index: 5; display: flex; flex-direction: column; gap: 2px; min-width: 180px; padding: 6px;
  border: 1px solid var(--cx-line-btn); border-radius: 12px; background: var(--cx-panel); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
}
.cx-main .cx-ag-menu button { border: 0; justify-content: flex-start; text-align: left; width: 100%; }
.cx-ag-now { margin: 0; color: var(--cx-text-2); font-size: 14px; line-height: 1.45; }
.cx-ag-meta { margin: 0; color: var(--cx-text-muted); font-size: 13px; }
.cx-ag-act { flex-wrap: wrap; padding-top: 12px; }
.cx-ag-act .cx-confirm { flex: 1 1 100%; grid-column: 1 / -1; }
.cx-agcard .cx-ag-now, .cx-agcard .cx-ag-meta { padding: 0 18px; }
.cx-agcard .cx-ag-now { padding-top: 12px; }
.cx-agcard .cx-ag-act { margin-top: 12px; border-top: 1px solid var(--cx-line-soft); }
.cx-run-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.cx-run-filters .cx-seg { margin: 0; }
.cx-select { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--cx-text-muted); max-width: 100%; min-width: 0; }
.cx-select select { min-width: 0; max-width: 100%; text-overflow: ellipsis; }
.cx-select select, .cx-main .cx-rule select, .cx-main select {
  min-height: 44px; padding: 0 12px; border: 1px solid var(--cx-line-btn); border-radius: 10px; background: var(--cx-bg); color: var(--cx-text); font: inherit;
}

/* card 739 (layout): every control is at least 44 px tall on every screen (PRODUCT.md), compact density included */
.cx-rail button, .cx-side-ag, .cx-side-ch, .cx-jump-btn, .cx-jump-l button,
.cx-main .cx-seg button, .cx-main .cx-link, .cx-main .cx-rule-seg button, .cx-main .cx-desk-head .cx-seg button,
.cx-main .cx-now-go, .cx-main .cx-au-head button, .cx-main .cx-bot-rm, .cx-main .cx-follow button, .cx-main .cx-lesson-a button,
.cx-upload, .cx-at button, .cx-json summary, .cx-drole,
[data-cx-density=compact] .cx-rail button, [data-cx-density=compact] .cx-side-ag, [data-cx-density=compact] .cx-main button,
.cx-talk .tk-back, .cx-talk .tk-btn, .cx-talk .tk-tool, .tk-menu a, .tk-menu button, .cx-talk .tk-chip, .cx-talk .tk-qa button,
.cx-talk .tk-steps summary, details.tk-steps summary, .cx-talk .tk-cmds button, .tk-room, .cx-talk .tk-new select, .cx-talk .tk-new button,
.cx-talk .tk-rem-add input, .cx-talk .tk-rem-add select, .cx-talk .tk-rem-add button, .cx-talk .tk-rem button { min-height: 44px; }
.cx-main .cx-au-rm { min-height: 44px; top: 0; }
.cx-icon-btn { width: 44px; height: 44px; }
.cx-main .cx-send, .cx-talk #tk-send.tk-sendi, .cx .cx-talk .tk-sendi { width: 44px; min-width: 44px; height: 44px; min-height: 44px; }
.cx-talk .tk-x { width: 44px; height: 44px; }
.tk-copy { min-height: 44px; }
.cx-talk .tk-btn.tk-ib { width: 44px; justify-content: center; padding: 0; }
.cx-main .cx-sw { position: relative; }
.cx-main .cx-sw::after { content: ""; position: absolute; left: 0; right: 0; top: -9px; bottom: -9px; }   /* a 44 px tall hit area around the 26 px switch */
.cx-main .cx-apv2-a a, .cx-apvs .cx-apv2-a a { display: inline-flex; align-items: center; min-height: 44px; }
.cx-mem-nav input { min-height: 44px; }
.cx-chan-box input { min-height: 44px; }
.cx-main .cx-run-acts button { flex: 1 1 auto; }

/* card 739 (ui spec, distill): Health tiles (status, plain meaning, one action), grouped failed runs, Settings disclosure,
   the Chat list drawn once */
.cx-hgrid { align-items: stretch; }
.cx-htile { display: flex; flex-direction: column; gap: 6px; }
.cx-htile h2 { margin: 0; font-size: 15px; }
.cx-hst { display: flex; align-items: center; gap: 8px; margin: 0; }
.cx-htile .cx-muted { margin: 0; font-size: 13px; line-height: 1.45; }
.cx-hact { margin: auto 0 0; padding-top: 6px; }
.cx-incs h2 { margin: 0 0 8px; font-size: 15px; }
.cx-inc { list-style: none; margin: 0; padding: 0; }
.cx-inc li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding: 12px 0; border-top: 1px solid var(--cx-line-soft); }
.cx-inc li:first-child { border-top: 0; }
.cx-inc li > div { flex: 1 1 280px; min-width: 0; }
.cx-inc p { margin: 2px 0 0; font-size: 13px; }
.cx-set-more { margin-top: 20px; }
.cx-set-more > summary { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border: 1px solid var(--cx-line-2); border-radius: 12px; background: var(--cx-panel); color: var(--cx-text-2); font-weight: 600; cursor: pointer; list-style: none; }
.cx-set-more > summary::-webkit-details-marker { display: none; }
.cx-set-more > summary::before { content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); transition: transform 0.15s; }
.cx-set-more[open] > summary::before { transform: rotate(45deg); }
.cx-set-more > summary:focus-visible { outline: 2px solid var(--cx-focus); outline-offset: 2px; }
.cx-talk.tkv .tk-list { display: none !important; }
.cx-talk .tk-pick-h { margin: 0 0 4px; font: 600 18px/1.2 var(--cx-display); }
.cx-talk .tk-pick-list { text-align: left; margin-top: 12px; }
@media (max-width: 767px) {
  .cx-talk.tkv .tk-pane { display: flex !important; }
  .cx-foot-nav { display: none; }
  .cx-talk .tk-pick { margin: 0; width: 100%; padding: 16px; box-sizing: border-box; }
}
.cx-embed .cx-foot-nav { display: none; }

/* card 739 (ui spec, polish): labels at 12 px or more (status labels, avatars, tabs, tags), visible focus on every
   control, motion only when the person allows it, the chosen rule marked by more than a fill */
.cx-run-st, .cx-role, .cx-au-kind, .cx-cursor span, .tk-doc-ic, .cx-lead-tag, .cx-av-sm, .cx-av-xs { font-size: 12px; }
.cx-av-xs { width: 24px; height: 24px; }
.cx-jump-btn kbd { font: 12px/1.4 inherit; }
@media (max-width: 767px) { .cx-tab { font-size: 12px; } .cx-tab-n { font-size: 12px; min-width: 18px; height: 18px; border-radius: 9px; } }
.cx select:focus-visible, .cx summary:focus-visible, .cx [tabindex]:focus-visible, .cx label:focus-within > input[type=file] + *,
.cx .cx-upload:focus-within { outline: 2px solid var(--cx-focus); outline-offset: 2px; }
.cx-cur { display: inline-flex; align-items: center; gap: 4px; }
.cx-cur .cx-i { flex: none; }
@media (prefers-reduced-motion: reduce) {
  .cx *, .cx *::before, .cx *::after, .cx-toast { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
.cx-main .cx-ag-id h2 button { padding: 10px 0; margin: -10px 0; }   /* card 739: a 44 px hit area without growing the card header */

/* card 739 (second pass): Agents summary line, Driving as a role tag, Approvals Undo, Chat identity groups */
.cx-ag-sum { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; margin: -8px 0 20px; color: var(--cx-text-muted); font-size: 14px; }
.cx-main .cx-sum-p { min-height: 44px; padding: 0 8px; border: 0; border-radius: 8px; background: transparent; color: var(--cx-text-2); font-weight: 400; }
.cx-main .cx-sum-p:hover { background: var(--cx-raised); color: var(--cx-text); }
.cx-sum-p b { color: var(--cx-text); font-weight: 600; }
.cx-sum-p b.cx-warn-t { color: var(--cx-warn-text); }
.cx-drive { display: inline-flex; align-items: center; padding: 1px 8px; border-radius: 999px; border: 1px solid var(--cx-line-btn); color: var(--cx-text-2); font-size: 12px; font-weight: 600; }
.cx-follow .cx-dot { margin-left: 2px; }
.cx-drole { gap: 8px; }
.cx-apv2-pend { align-items: center; gap: 10px; color: var(--cx-text-2); }
.cx-apv2-pend .cx-i { color: var(--cx-success); }
.cx-apv2:focus-visible { outline: 2px solid var(--cx-focus); outline-offset: 2px; }
.cx-rule .cx-confirm { flex: 1 1 100%; margin-top: 8px; }
.cx-rule:has(.cx-confirm) { flex-wrap: wrap; }
.cx-talk .tk-grp { margin: 16px 4px 6px; font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--cx-text-muted); }
.cx-run-sum.cx-nm { font-size: 13px; }

/* ==== card 739 (0.6.0 Trace): every other screen in the same world. Hairline rows instead of cards, pill buttons and chips,
   the same state colours, Onest for everything and Martian Mono only for code, steps and IDs. ==== */
.cx-main { padding: 32px 40px 48px; }
.cx-main-chat, .cx-main-desk, .cx-main-chan, .cx-main-runs { padding: 0; }
.cx-hero { align-items: center; margin: 0 0 24px; }
.cx-hero h1 { font: 600 22px/1.25 var(--cx-font); letter-spacing: -0.01em; }
.cx-hero p { color: var(--cx-text-faint); font-size: 14px; }
.cx-main a { color: var(--cx-text); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; text-decoration-color: var(--cx-text-faint); }
.cx-main a:hover { color: var(--cx-text); text-decoration-color: var(--cx-text); }
.cx-main a.cx-btnl, .cx-main a.cx-cardchip, .cx-main a.cx-warnbtn { text-decoration: none; }
.cx-muted { color: var(--cx-text-muted); }

/* pill buttons; the one primary is light on dark */
.cx-main button { min-height: 44px; padding: 0 16px; border: 1px solid var(--cx-line-btn); border-radius: 999px; background: transparent; color: var(--cx-text-2); font: 500 14px/1.2 var(--cx-font); }
.cx-main button:hover { background: transparent; color: var(--cx-text); border-color: var(--cx-line-strong); }
.cx-main button.on { background: var(--cx-raised); color: var(--cx-text); font-weight: 500; }
.cx-main button:disabled { opacity: 0.5; cursor: default; }
.cx-main .cx-primary, .cx-key button { background: var(--cx-accent); color: var(--cx-accent-ink); border-color: transparent; font-weight: 600; }
.cx-main .cx-primary:hover { background: var(--cx-accent-hi); color: var(--cx-accent-ink); border-color: transparent; }
.cx-main .cx-link { min-height: 32px; padding: 0; border: 0; border-radius: 0; color: var(--cx-text-2); background: transparent; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; text-decoration-color: var(--cx-text-faint); }
.cx-main .cx-link:hover { color: var(--cx-text); background: transparent; }
.cx-main .cx-danger { border-color: var(--cx-danger-line); color: var(--cx-danger); }
.cx-main input[type=search], .cx-main input[type=text], .cx-main input[type=number], .cx-main textarea, .cx-select select, .cx-main select {
  border-radius: 12px; border-color: var(--cx-line-btn); background: transparent; color: var(--cx-text);
}
.cx-main input::placeholder, .cx-main textarea::placeholder { color: var(--cx-text-faint); }
.cx-main input:focus-visible, .cx-main textarea:focus-visible, .cx-main select:focus-visible { border-color: var(--cx-line-strong); }
.cx-search { border-radius: 999px; border-color: var(--cx-line-btn); background: transparent; }
.cx-seg { gap: 2px; padding: 3px; border: 1px solid var(--cx-line-btn); border-radius: 999px; background: transparent; }
.cx-main .cx-seg button { min-height: 32px; padding: 0 14px; border: 0; border-radius: 999px; color: var(--cx-text-muted); }
.cx-main .cx-seg button:hover { color: var(--cx-text); }
.cx-main .cx-seg button.on { background: var(--cx-raised); color: var(--cx-text); }
.cx-main .cx-rule-seg button.on.ok { background: var(--cx-raised); color: var(--cx-text); }
.cx-main .cx-rule-seg button.on.ask { background: var(--cx-warn-bg); color: var(--cx-warn-text); }
.cx-okpill { padding: 1px 10px; border: 1px solid var(--cx-line-btn); background: transparent; color: var(--cx-text-2); }
.cx-catpill { padding: 1px 10px; border: 1px solid var(--cx-warn-line); background: transparent; color: var(--cx-warn-text); }
.cx-chip-n { background: transparent; border: 1px solid var(--cx-line-btn); color: var(--cx-text-2); }
.cx-run-st { background: transparent; border: 1px solid var(--cx-line-btn); border-radius: 999px; padding: 0 8px; color: var(--cx-text-2); font-weight: 500; }
.cx-run-st.st-ok { background: transparent; color: var(--cx-text-2); }
.cx-run-st.st-running { color: var(--cx-ember-text); border-color: var(--cx-ember); }
.cx-run-st.st-failed { color: var(--cx-danger); border-color: var(--cx-danger-line); }
p.cx-run-st { display: inline-block; }
.cx-role, .cx-au-kind { background: transparent; border: 1px solid var(--cx-line-btn); border-radius: 999px; }
.cx-au-kind.sched, .cx-au-kind.ev { color: var(--cx-text-2); background: transparent; }
.cx-au-kind.trig { color: var(--cx-warn-text); background: transparent; border-color: var(--cx-warn-line); }
.cx-cap { font-size: 13px; font-weight: 500; color: var(--cx-text-muted); letter-spacing: 0; text-transform: none; }

/* cards become hairline rows */
.cx-card, .cx-add, .cx-set, .cx-au-box, .cx-incs { background: transparent; border: 0; border-top: 1px solid var(--cx-line); border-radius: 0; padding: 20px 0; }
.cx-card.cx-calm { border-top: 1px solid var(--cx-line); }
.cx-card h2, .cx-add h2, .cx-set h2, .cx-au-box h2 { font-size: 15px; font-weight: 600; }
.cx-table { gap: 0; }
.cx-table > .cx-card { padding: 14px 0; }
.cx-sk { border-radius: 12px; background: var(--cx-side); }
.cx-err b, .cx-empty b { color: var(--cx-text); }
.cx-err { color: var(--cx-text-muted); }
.cx-set-grid { gap: 0 40px; margin-top: 0; }
.cx-stack { max-width: 760px; }

/* Agents: one hairline row per agent: who and its state, what it is doing, and Chat, Desktop and Turn off on the right */
.cx-ag-grid { display: flex; flex-direction: column; gap: 0; border-bottom: 1px solid var(--cx-line); }
.cx-main .cx-agcard, .cx-agcard { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 24px; row-gap: 2px; align-items: center; padding: 14px 0; background: transparent; border: 0; border-top: 1px solid var(--cx-line); border-radius: 0; }
.cx-agcard[hidden] { display: none; }
.cx-agcard .cx-ag-top { grid-column: 1; grid-row: 1; padding: 0; gap: 12px; }
.cx-agcard .cx-ag-now, .cx-agcard .cx-ag-meta { grid-column: 1; padding: 0 0 0 56px; margin: 0; }
.cx-agcard .cx-ag-now { padding-top: 0; font-size: 14px; color: var(--cx-text-muted); }
.cx-agcard .cx-ag-meta { font-size: 13px; color: var(--cx-text-faint); }
.cx-agcard .cx-ag-act { grid-column: 2; grid-row: 1 / span 3; display: flex; flex-wrap: nowrap; gap: 8px; margin: 0; padding: 0; border: 0; }
.cx-agcard .cx-ag-act button { flex: none; }
.cx-agcard .cx-ag-act .cx-confirm { min-width: 320px; }
.cx-ag-id { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cx-ag-id h2 { font-size: 15px; font-weight: 600; }
.cx-main .cx-ag-id h2 button { color: var(--cx-text); font-weight: 600; font-size: 15px; }
.cx-main .cx-ag-id h2 button:hover { color: var(--cx-text); text-decoration: underline; text-underline-offset: 3px; }
.cx-agcard .cx-pill { border: 0; padding: 0; font-size: 13px; }
.cx-agcard .cx-av-dot, .cx-prof .cx-av-dot { border-color: var(--cx-bg); }
.cx-add { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; border-style: solid; margin-top: 0; }
.cx-ag-grid > .cx-add { border-top: 1px solid var(--cx-line); padding: 18px 0; }
.cx-create { flex-direction: row; align-items: center; flex-wrap: wrap; gap: 8px; }
.cx-create label { flex: 1 0 100%; }
.cx-main .cx-create input[type=text] { flex: 1 1 260px; width: auto; }
.cx-ag-sum { margin: -6px 0 20px; color: var(--cx-text-faint); }
.cx-main .cx-sum-p { min-height: 36px; padding: 0 8px; border: 0; border-radius: 999px; color: var(--cx-text-muted); }
.cx-sum-p b.cx-warn-t { color: var(--cx-warn-text); }
.cx-ag-menu { border-radius: 14px; background: var(--cx-panel); }
.cx-main .cx-ag-menu button { border-radius: 10px; }
.cx-prof { padding-bottom: 20px; border-bottom: 1px solid var(--cx-line); }
.cx-prof h1 { font: 600 22px/1.25 var(--cx-font); }
.cx-tabs { margin-top: 0; }

/* Runs: today's numbers as one hairline strip, then the runs as rows */
.cx-runs-main { padding: 32px 40px; border-right: 1px solid var(--cx-line-soft); }
.cx-run-tiles { gap: 0; padding: 4px 0; border-top: 1px solid var(--cx-line); border-bottom: 1px solid var(--cx-line); }
.cx-tile { padding: 14px 20px 14px 0; border: 0; border-radius: 0; background: transparent; }
.cx-tile + .cx-tile { padding-left: 20px; border-left: 1px solid var(--cx-line); }
.cx-tile b { font: 600 24px/1.25 var(--cx-font); }
.cx-tile-main b { font-size: 30px; }
.cx-tile span, .cx-tile small { color: var(--cx-text-faint); font-size: 13px; }
.cx-tile-bad { border-color: var(--cx-line); }
.cx-main .cx-tile .cx-link { color: var(--cx-danger); }
.cx-run-table { border: 0; border-radius: 0; border-bottom: 1px solid var(--cx-line); }
.cx-run-head { background: transparent; color: var(--cx-text-faint); font-weight: 500; font-size: 12px; border-bottom: 1px solid var(--cx-line); }
.cx-main .cx-run-row { border-radius: 0; border: 0; border-top: 1px solid var(--cx-line-soft); padding: 10px 16px; font-weight: 400; color: var(--cx-text); }
.cx-main .cx-run-row:hover { background: var(--cx-side); border-color: var(--cx-line-soft); }
.cx-main .cx-run-row.on { background: var(--cx-raised); box-shadow: none; }
.cx-run-card { color: var(--cx-text-faint); }
.cx-run-side { padding: 32px 24px; background: var(--cx-aside); }
.cx-run-side h2 { font-size: 17px; font-weight: 600; }
.cx-run-report { background: transparent; border: 0; border-left: 1px solid var(--cx-line-strong); border-radius: 0; padding: 2px 0 2px 16px; color: var(--cx-text-2); }
.cx-bar { height: 4px; border-radius: 2px; background: var(--cx-raised); }
.cx-bar-in { background: var(--cx-text-2); } .cx-bar-out { background: var(--cx-ember); } .cx-bar-cache { background: var(--cx-off); }
.cx-mono, .cx-run-row .cx-mono { font-family: var(--cx-mono); font-size: 12px; }
.cx-run-row > .cx-mono:first-child { color: var(--cx-text-faint); }

/* Approvals: each request a hairline block marked "needs you" in amber, the rules on the right */
.cx-apvs-main { padding: 32px 40px; border-right: 1px solid var(--cx-line-soft); gap: 0; }
.cx-apvs-main .cx-hero { margin-bottom: 24px; }
.cx-apv2 { border: 0; border-top: 1px solid var(--cx-line); border-radius: 0; background: transparent; overflow: visible; }
.cx-apv2:last-child { border-bottom: 1px solid var(--cx-line); }
.cx-apv2-h { padding: 20px 0 6px; border: 0; }
.cx-apv2-w { display: flex; align-items: center; gap: 8px; flex: 1 0 100%; margin: 0; font-size: 13px; color: var(--cx-warn-text); }
.cx-apv2-done .cx-apv2-w { color: var(--cx-text-faint); }
.cx-apv2-t h2 { font-size: 16px; }
.cx-apv2-b { padding: 8px 0 8px 44px; gap: 16px; }
.cx-cmd { background: var(--cx-side); border: 1px solid var(--cx-line-2); border-radius: 12px; font: 12px/1.6 var(--cx-mono); }
.cx-apv2-a { padding: 8px 0 20px 44px; background: transparent; border: 0; }
.cx-main .cx-apv2-a button:not(.cx-primary) { border-color: var(--cx-line-btn); }
.cx-apv2-a a { color: var(--cx-text-2); }
.cx-apv2-deny { padding: 0 0 20px 44px; background: transparent; }
.cx-apv2-deny input { border-radius: 999px; border-color: var(--cx-line-btn); background: transparent; padding: 0 16px; }
.cx-apv2-pend .cx-i { color: var(--cx-text-2); }
.cx-apv-side, .cx-desk2-side, .cx-mem-nav { background: var(--cx-aside); }
.cx-apv-side { padding: 32px 24px; }
.cx-rule { border-bottom: 1px solid var(--cx-line); }

/* Desktop: the live view framed by a hairline, follow-an-agent as pills */
.cx-desk2-main { padding: 24px 32px; border-right: 1px solid var(--cx-line-soft); }
.cx-follow-box { padding: 0; border: 0; border-radius: 0; background: transparent; }
.cx-main .cx-follow button { min-height: 36px; padding: 0 14px 0 6px; border: 1px solid var(--cx-line-btn); border-radius: 999px; background: transparent; color: var(--cx-text-2); }
.cx-main .cx-follow button.on { border-color: var(--cx-text); background: var(--cx-raised); color: var(--cx-text); }
.cx-main .cx-follow button > span:first-child:not(.cx-avatar) { padding-left: 8px; }
.cx-live-wrap { border-radius: 14px; border-color: var(--cx-line-2); }
.cx-cursor svg path { fill: var(--cx-ember); stroke: var(--cx-bg); }
.cx-cursor span { background: var(--cx-ember); color: var(--cx-ember-ink); border-radius: 999px; }
.cx-ctrl-tag { background: var(--cx-warn-bg); color: var(--cx-warn-text); border-radius: 999px; }
.cx-desk-warn { border: 0; border-top: 1px solid var(--cx-warn-line); border-bottom: 1px solid var(--cx-warn-line); border-radius: 0; background: transparent; padding: 14px 0; }
.cx-main .cx-warnbtn { border-radius: 999px; background: transparent; }
.cx-drive { border-radius: 999px; color: var(--cx-ember-text); border-color: var(--cx-ember); }
.cx-dact { border-bottom: 1px solid var(--cx-line-soft); }
.cx-ok { color: var(--cx-text-2); }

/* Memory: the agents on the left as rows, notes and lessons as hairline rows */
.cx-mem-nav { padding: 32px 12px; border-right: 1px solid var(--cx-line-soft); }
.cx-mem-nav h1 { font: 600 22px/1.25 var(--cx-font); }
.cx-mem-nav input { border-radius: 999px; background: transparent; border-color: var(--cx-line-btn); padding: 0 16px; }
.cx-main .cx-mem-row2 { min-height: 40px; border-radius: 10px; }
.cx-main .cx-mem-row2:hover { background: var(--cx-raised); }
.cx-main .cx-mem-row2.on { background: var(--cx-raised); color: var(--cx-text); }
.cx-star { background: transparent; border: 1px solid var(--cx-line-strong); color: var(--cx-text-2); border-radius: 8px; width: 26px; height: 26px; }
.cx-mem-main { padding: 32px 40px; }
.cx-mem-main h2 { font-size: 20px; }
.cx-lesson { padding: 14px 0; border: 0; border-top: 1px solid var(--cx-line); border-radius: 0; background: transparent; }
.cx-lesson-sh { border-color: var(--cx-line); background: transparent; }
.cx-main .cx-hit { border: 0; border-top: 1px solid var(--cx-line); border-radius: 0; background: transparent; padding: 12px 0; }
.cx-mem-empty { border: 1px dashed var(--cx-line-btn); border-radius: 14px; }
.cx-wsbox { border-color: var(--cx-line-2); border-radius: 14px; }
.cx-ws-h { background: transparent; }
.cx-upload { border-radius: 999px; }

/* Settings and Health: sections separated by hairlines */
.cx-set { padding: 22px 0; }
.cx-main .cx-theme-card { border: 1px solid var(--cx-line-btn); border-radius: 14px; background: transparent; }
.cx-main .cx-theme-card:hover { background: transparent; border-color: var(--cx-line-strong); }
.cx-main .cx-theme-card.on { border-color: var(--cx-text); background: transparent; box-shadow: inset 0 0 0 1px var(--cx-text); }
.cx-theme-card.on .cx-radio { border-color: var(--cx-text); }
.cx-theme-card.on .cx-radio::after { background: var(--cx-text); }
.cx-pv-body .cx-pv-btn { border-radius: 999px; background: var(--cx-ember) !important; width: 30%; }
.cx-team { border: 0; border-top: 1px solid var(--cx-line-soft); border-radius: 0; padding: 12px 0; background: transparent; }
.cx-boardrow { border-radius: 12px; background: transparent; }
.cx-set-more > summary { border-radius: 999px; background: transparent; border-color: var(--cx-line-btn); }
.cx-hgrid { display: flex; flex-direction: column; gap: 0; margin-bottom: 0; border-bottom: 1px solid var(--cx-line); }
.cx-htile { display: grid; grid-template-columns: 200px minmax(0, 1fr) auto; column-gap: 24px; align-items: center; padding: 14px 0; }
.cx-htile h2 { font-size: 14px; font-weight: 600; }
.cx-htile .cx-hst { grid-column: 1; grid-row: 2; font-size: 13px; }
.cx-htile h2 { grid-column: 1; grid-row: 1; }
.cx-htile > .cx-muted { grid-column: 2; grid-row: 1 / span 2; }
.cx-hact { grid-column: 3; grid-row: 1 / span 2; margin: 0; padding: 0; }
.cx-incs { margin-top: 28px; }

/* Autonomy: hairline sections and pill choices */
.cx-main .cx-au-lv { border: 1px solid var(--cx-line-btn); border-radius: 14px; background: transparent; }
.cx-main .cx-au-lv.on { border-color: var(--cx-text); background: transparent; box-shadow: inset 0 0 0 1px var(--cx-text); }
.cx-au-lv.on .cx-au-radio { border-color: var(--cx-text); }
.cx-au-lv.on .cx-au-radio::after { background: var(--cx-text); }
.cx-au-ok { color: var(--cx-text); }
.cx-au-ask { color: var(--cx-warn-text); }
.cx-au-item, .cx-au-rtform, .cx-au-idea { background: transparent; border-radius: 12px; border-color: var(--cx-line-2); }
.cx-au-ideas { border-color: var(--cx-line); background: transparent; }
.cx-au-res { color: var(--cx-text-2); }
.cx-main .cx-sw.on, .cx-main .cx-sw.on:hover { background: var(--cx-text); }
.cx-sw span { background: var(--cx-bg); }
.cx-main .cx-sw:not(.on) span { background: var(--cx-text-2); }

/* the jump palette, toasts, confirmations */
.cx-jump-back { background: var(--cx-bg); opacity: 0.8; }
.cx-jump-box { border-radius: 20px; background: var(--cx-panel); border-color: var(--cx-line-btn); padding: 8px; box-shadow: 0 24px 48px rgba(0, 0, 0, 0.4); }
.cx-jump-box input { border-radius: 14px; background: transparent; border-color: var(--cx-line-btn); padding: 0 16px; }
.cx-jump-l button { border-radius: 12px; }
.cx-toast { border-radius: 999px; background: var(--cx-panel); padding: 10px 20px; font: 500 14px/1.4 var(--cx-font); box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35); }
.cx-confirm { border-radius: 16px; background: var(--cx-panel); }
.cx .cx-confirm-a button { border-radius: 999px; background: transparent; font-weight: 500; }
.cx .cx-confirm-a button:hover { background: var(--cx-raised); }
.cx-key form { gap: 14px; }
.cx-key input[type=password] { border-radius: 14px; }
.cx-key button { border-radius: 999px; }

/* chat leftovers: the empty and off states, chips, media */
.tk-state { border: 0; border-radius: 0; padding: 64px 24px; }
.tk-state .tk-av { width: 44px; height: 44px; border-radius: 10px; }
.tk-state-off { border: 1px solid var(--cx-line-2); border-radius: 20px; background: transparent; }
.cx-talk .tk-chip { min-height: 34px; padding: 0 14px; background: transparent; color: var(--cx-text-muted); }
.tk-media img, .tk-media video { border-radius: 14px; }
.tk-media-cap a, .tk-doc-sz { color: var(--cx-text-2); }
.tk-doc { border-radius: 14px; background: var(--cx-side); }
.tk-doc:hover, .tk-doc:focus-visible { border-color: var(--cx-line-strong); }
.tk-doc-ic { background: var(--cx-raised); color: var(--cx-text); font-family: var(--cx-mono); font-weight: 400; letter-spacing: 0; }
.tk-copy { border-radius: 999px; background: var(--cx-panel); }
.tk-copy.done { color: var(--cx-text); border-color: var(--cx-line-strong); }
.tk-thumb:hover { border-color: var(--cx-line-strong); }
.cx-talk .tk-pick-h { font: 600 18px/1.25 var(--cx-font); }

/* with a mouse the rows can be as compact as the sketches; touch screens keep 44 px targets */
@media (pointer: fine) and (min-width: 768px) {
  .cx-side-ag, .cx-side-ch { min-height: 38px; }
  .cx-rail button { min-height: 30px; }
  .cx-jump-btn { min-height: 42px; }
  .cx-foot-btn { min-height: 32px; }
  .cx-talk details.tk-trace summary, .cx-talk .tk-trace summary { min-height: 28px; }
  .cx-talk .tk-btn { min-height: 34px; }
  .cx-talk .tk-btn.tk-ib { width: 34px; }
  .cx-talk .tk-tool { min-height: 36px; }
  .cx-talk label.tk-tool { width: 36px; }
  .cx-talk #tk-send.tk-sendi, .cx .cx-talk .tk-sendi { width: 36px; min-width: 36px; height: 36px; min-height: 36px; }
  .cx-main .cx-send { width: 40px; min-width: 40px; height: 40px; min-height: 40px; }
  .cx-chan-box .cx-icon-btn, .cx-side-h .cx-icon-btn { width: 32px; height: 32px; }
  .cx-chan-m { min-height: 36px; }
  .cx-main .cx-seg button, .cx-main .cx-rule-seg button { min-height: 32px; }
  .cx-main button, [data-cx-density=compact] .cx-main button { min-height: 38px; }
  .cx-main .cx-link { min-height: 28px; }
  .cx-main .cx-sum-p { min-height: 34px; }
  .cx-main .cx-follow button { min-height: 36px; }
  .cx-talk .tk-chip { min-height: 34px; }
  .cx-talk .tk-apv-a button { min-height: 38px; }
  .tk-copy { min-height: 30px; }
}
.cx-foot-nav { display: flex; align-items: center; gap: 2px; margin: 0 -10px; }
.cx-foot-btn { justify-content: flex-start; gap: 8px; padding: 0 10px; border-radius: 999px; font: 400 13px/1.2 var(--cx-font); color: var(--cx-text-faint); }
.cx-foot-btn:hover { color: var(--cx-text); background: var(--cx-raised); }
.cx-foot-btn.on { background: var(--cx-raised); color: var(--cx-text); }
.cx-foot-nav .cx-live { padding-right: 10px; }

/* density: compact tightens rows, never below the sizes above */
[data-cx-density=compact] .tk-cx-col { gap: 14px; }
[data-cx-density=compact] .cx-agcard { padding: 10px 0; }
[data-cx-density=compact] .cx-side-ag, [data-cx-density=compact] .cx-side-ch { min-height: 34px; }

/* phone (â‰¤767 px): the sidebar becomes the top bar (brand, search, links), the tab bar at the bottom; 44 px targets */
@media (max-width: 767px) {
  .cx-side { gap: 8px; padding: 8px 12px; border-bottom: 1px solid var(--cx-line); }
  .cx-jump-btn { min-height: 44px; padding: 0 14px; border-radius: 999px; }      /* card 768: no title beside it, so the search field is the top bar */
  .cx-jump-btn .cx-i { display: inline; }
  .cx-rail { order: 3; margin: 0; gap: 6px; }
  .cx-rail button { min-height: 36px; }
  .cx-side-foot, .cx-spend { display: none; }
  .cx-main { padding: 20px 16px 32px; }
  .cx-runs-main, .cx-apvs-main, .cx-mem-main, .cx-desk2-main { padding: 20px 16px; }
  .cx-chan-head, .cx-talk .tk-head { padding: 8px 12px; }
  .cx-chan-feed { padding: 16px; }
  .cx-chan-comp { padding: 8px 12px 12px; }
  .cx-chan-box { min-height: 56px; padding: 6px 6px 6px 16px; }
  .cx-chan-ev { margin-left: 0; }
  .cx-talk .tk-log { padding: 16px; }
  .cx-talk .tk-comp { padding: 8px 12px 10px; }
  .cx-talk .tk-cx-head .tk-sub { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
  .cx-talk .tk-cx-head .tk-sub .tk-role { display: none; }
  .cx-talk .tk-cx-head .tk-phone { border-radius: 999px; }
  .tk-box { border-radius: 26px; padding: 4px 4px 4px 16px; }
  .cx-talk .tk-human .tk-msg { max-width: 85%; }
  .cx-tabbar { background: var(--cx-side); border-top: 1px solid var(--cx-line); }
  .cx-tab.on { color: var(--cx-text); }
  .cx-tab.on .cx-i { color: var(--cx-text); }
  .cx-tab-n { background: var(--cx-warn-text); color: var(--cx-bg); }
  .cx-main .cx-agcard, .cx-agcard { grid-template-columns: minmax(0, 1fr); }
  .cx-agcard .cx-ag-act { grid-column: 1; grid-row: auto; padding: 10px 0 0 56px; flex-wrap: wrap; }
  .cx-agcard .cx-ag-act .cx-confirm { min-width: 0; }
  .cx-agcard .cx-ag-now, .cx-agcard .cx-ag-meta { padding-left: 56px; }
  .cx-run-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cx-tile, .cx-tile + .cx-tile { border-left: 0; padding: 12px 12px 12px 0; }
  .cx-tile-main { grid-column: 1 / -1; border-bottom: 1px solid var(--cx-line); }
  .cx-htile { grid-template-columns: minmax(0, 1fr); row-gap: 4px; }
  .cx-htile > *, .cx-htile .cx-hst, .cx-htile h2, .cx-htile > .cx-muted, .cx-hact { grid-column: 1; grid-row: auto; }
  .cx-apv2-b, .cx-apv2-a, .cx-apv2-deny { padding-left: 0; }
}

/* numbers are Onest with tabular figures; Martian Mono stays for steps, code and IDs */
.cx-run-row .cx-mono, .cx-kv2 .cx-mono, .cx-tokbar .cx-mono, .cx-dact > .cx-mono, .cx-dact .cx-mono, .cx-talk .tk-cnt, .cx-num { font-family: var(--cx-font); font-size: 13px; }
.cx-run-row .cx-mono.cx-run-card { font-family: var(--cx-mono); font-size: 12px; }
/* the trace line flows as text, so it wraps cleanly on a phone */
.cx-talk .tk-trace summary, .cx-talk .tk-steps.tk-trace summary, .cx-talk div.tk-trace { display: block; line-height: 1.55; padding: 3px 0; }
.cx-talk .tk-trace .tk-tdot { display: inline-block; margin: 0 8px 1px 0; vertical-align: middle; }
.cx-talk .tk-trace .tk-tm { margin-left: 0; }
.cx-main .cx-chan-trace { display: block; }
.cx-chan-trace .cx-dot { display: inline-block; margin: 0 8px 1px 0; vertical-align: middle; }
.cx-chan-trace > span:not(.cx-dot) { margin-left: 4px; }
.cx-main .cx-chan-trace .cx-link { display: inline; min-height: 0; padding: 10px 0; margin: -10px 0 -10px 8px; font-size: 13.5px; }

/* card 739: an agent's own look. Tones stay clear of the state colours (ember = working, amber = needs you, red = error).
   A lead keeps its tone and gets a ring in the lead colour; a picture fills the square. */
.cx-avatar.cx-tone-blue, .tk-av.cx-tone-blue, .cx-look-sw.cx-tone-blue { background: #1b2638; color: #9cc3ff; }
.cx-avatar.cx-tone-teal, .tk-av.cx-tone-teal, .cx-look-sw.cx-tone-teal { background: #132c2a; color: #7fd6cc; }
.cx-avatar.cx-tone-green, .tk-av.cx-tone-green, .cx-look-sw.cx-tone-green { background: #1a2b1d; color: #95d69c; }
.cx-avatar.cx-tone-violet, .tk-av.cx-tone-violet, .cx-look-sw.cx-tone-violet { background: #25203a; color: #c4b2ff; }
.cx-avatar.cx-tone-rose, .tk-av.cx-tone-rose, .cx-look-sw.cx-tone-rose { background: #321f29; color: #f2a7c3; }
.cx-avatar.cx-tone-sand, .tk-av.cx-tone-sand, .cx-look-sw.cx-tone-sand { background: #2d2920; color: #e0cfa3; }
.cx-avatar.cx-tone-slate, .tk-av.cx-tone-slate, .cx-look-sw.cx-tone-slate { background: #22262d; color: #b4bfcc; }
.cx-avatar.cx-tone-ember, .tk-av.cx-tone-ember, .cx-look-sw.cx-tone-ember { background: #36190f; color: #ff8a63; }
[data-theme="light"] .cx-avatar.cx-tone-blue, [data-theme="light"] .tk-av.cx-tone-blue, [data-theme="light"] .cx-look-sw.cx-tone-blue { background: #dfeaff; color: #1f4f9a; }
[data-theme="light"] .cx-avatar.cx-tone-teal, [data-theme="light"] .tk-av.cx-tone-teal, [data-theme="light"] .cx-look-sw.cx-tone-teal { background: #d7f1ed; color: #14635b; }
[data-theme="light"] .cx-avatar.cx-tone-green, [data-theme="light"] .tk-av.cx-tone-green, [data-theme="light"] .cx-look-sw.cx-tone-green { background: #dff2e1; color: #24692e; }
[data-theme="light"] .cx-avatar.cx-tone-violet, [data-theme="light"] .tk-av.cx-tone-violet, [data-theme="light"] .cx-look-sw.cx-tone-violet { background: #ebe5ff; color: #5a3fb0; }
[data-theme="light"] .cx-avatar.cx-tone-rose, [data-theme="light"] .tk-av.cx-tone-rose, [data-theme="light"] .cx-look-sw.cx-tone-rose { background: #fbe3ec; color: #9b2c58; }
[data-theme="light"] .cx-avatar.cx-tone-sand, [data-theme="light"] .tk-av.cx-tone-sand, [data-theme="light"] .cx-look-sw.cx-tone-sand { background: #f3ebd6; color: #6e5a24; }
[data-theme="light"] .cx-avatar.cx-tone-slate, [data-theme="light"] .tk-av.cx-tone-slate, [data-theme="light"] .cx-look-sw.cx-tone-slate { background: #e6e9ee; color: #3b4552; }
[data-theme="light"] .cx-avatar.cx-tone-ember, [data-theme="light"] .tk-av.cx-tone-ember, [data-theme="light"] .cx-look-sw.cx-tone-ember { background: #ffe3d8; color: #a8370f; }
/* card 770: a colour swatch shows the colour the character is drawn in */
.cx .cx-look-sw[class*="cr-c-"] .cx-look-dot { width: 20px; height: 20px; background: var(--cr-c); }
.cx-avatar.cx-av-lead[class*="cx-tone-"], .cx-avatar.cx-av-lead.cx-av-pic { box-shadow: 0 0 0 1.5px var(--cx-bg), 0 0 0 3px var(--cx-lead-bg); }
.cx-av-pic { overflow: hidden; background: var(--cx-av-bg); padding: 0; }
.cx-av-pic img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: inherit; }
.cx-av-xl { width: 64px; height: 64px; border-radius: 14px; font-size: 22px; }

/* the avatar on an agent's page opens its Appearance panel */
.cx .cx-av-edit { padding: 0; min-height: 0; min-width: 0; border: 0; background: none; box-shadow: none; border-radius: 12px; cursor: pointer; }
.cx-av-edit:hover .cx-avatar { filter: brightness(1.12); }

.cx-look { display: grid; gap: 16px; margin: 0 0 20px; padding: 18px 20px; border: 1px solid var(--cx-line); border-radius: 14px; background: var(--cx-card-bg); }
.cx-look-prev { display: flex; align-items: center; gap: 14px; }
.cx-look-prev .cx-muted { max-width: 34ch; }
.cx-look-row { display: grid; grid-template-columns: 88px 1fr; gap: 12px; align-items: start; }
.cx-look-l { font-weight: 500; padding-top: 8px; }
.cx-look-f { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.cx-look-f .cx-muted { flex-basis: 100%; font-size: 12px; }
.cx-look-f input[data-look-s] { width: 10ch; min-height: 40px; box-sizing: border-box; padding: 0 12px; border: 1px solid var(--cx-line-btn); border-radius: 10px; background: var(--cx-bg); color: var(--cx-text); font: inherit; text-align: center; }
.cx-look-sws { display: flex; flex-wrap: wrap; gap: 8px; }
.cx-look-sw { width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--cx-line); cursor: pointer; padding: 0; }
.cx-look-sw.cx-tone-none { background: var(--cx-av-bg); color: var(--cx-av-fg); }
.cx-look-sw { display: inline-flex; align-items: center; justify-content: center; }
.cx .cx-look-sw { display: inline-flex; align-items: center; justify-content: center; }
.cx .cx-look-sw .cx-look-dot { display: block; flex: none; width: 14px; height: 14px; border-radius: 50%; color: inherit; background: currentColor; pointer-events: none; }
.cx-look-sw.on { box-shadow: 0 0 0 2px var(--cx-bg), 0 0 0 4px var(--cx-text); }
.cx-look-sw:disabled { cursor: progress; opacity: 0.6; }
.cx-look-end { margin: 0; }
@media (max-width: 560px) {
  .cx-look { padding: 16px; }
  .cx-look-row { grid-template-columns: 1fr; gap: 6px; }
  .cx-look-l { padding-top: 0; }
}
.cx-look-f input[data-look-d] { width: min(100%, 28ch); min-height: 40px; box-sizing: border-box; padding: 0 12px; border: 1px solid var(--cx-line-btn); border-radius: 10px; background: var(--cx-bg); color: var(--cx-text); font: inherit; }
.cx-realname { font-size: 13px; }
/* the chosen swatch keeps its tone's dot (a selected button's colour would win otherwise) */
.cx .cx-look-sw.on.cx-tone-blue { color: #9cc3ff; } .cx .cx-look-sw.on.cx-tone-teal { color: #7fd6cc; } .cx .cx-look-sw.on.cx-tone-green { color: #95d69c; }
.cx .cx-look-sw.on.cx-tone-violet { color: #c4b2ff; } .cx .cx-look-sw.on.cx-tone-rose { color: #f2a7c3; } .cx .cx-look-sw.on.cx-tone-sand { color: #e0cfa3; }
.cx .cx-look-sw.on.cx-tone-slate { color: #b4bfcc; } .cx .cx-look-sw.on.cx-tone-none { color: var(--cx-av-fg); }
[data-theme="light"] .cx .cx-look-sw.on.cx-tone-blue { color: #1f4f9a; } [data-theme="light"] .cx .cx-look-sw.on.cx-tone-teal { color: #14635b; }
[data-theme="light"] .cx .cx-look-sw.on.cx-tone-green { color: #24692e; } [data-theme="light"] .cx .cx-look-sw.on.cx-tone-violet { color: #5a3fb0; }
[data-theme="light"] .cx .cx-look-sw.on.cx-tone-rose { color: #9b2c58; } [data-theme="light"] .cx .cx-look-sw.on.cx-tone-sand { color: #6e5a24; }
[data-theme="light"] .cx .cx-look-sw.on.cx-tone-slate { color: #3b4552; }

/* card 740: the agents' Taskboard cards, read only; each opens on the Taskboard in a new tab */
.cx-tb { margin: 28px 0 8px; display: grid; gap: 14px; }
.cx-tb-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; }
.cx-tb-head h2 { margin: 0; font-size: 16px; font-weight: 600; }
.cx-tb-head .cx-link { margin-left: auto; }
.cx-tb-g h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; font-size: 14px; font-weight: 500; }
.cx-tb-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--cx-line); border-radius: 12px; overflow: hidden; }
.cx-tb-list li + li { border-top: 1px solid var(--cx-line-soft); }
.cx-tb-card { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto 14px; align-items: center; gap: 12px; padding: 10px 14px;
  color: var(--cx-text); text-decoration: none; min-height: 44px; box-sizing: border-box; }
.cx-tb-card:hover { background: var(--cx-active-bg); }
.cx-tb-card:focus-visible { outline: 2px solid var(--cx-focus); outline-offset: -2px; }
.cx-tb-id { font: 500 12px/1 var(--cx-mono); color: var(--cx-text-faint); }
.cx-tb-t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cx-tb-st { font-size: 12px; padding: 3px 8px; border-radius: 999px; border: 1px solid var(--cx-line-btn); color: var(--cx-text-faint); white-space: nowrap; }
.cx-tb-st[data-st="blocked"] { color: var(--cx-danger); border-color: var(--cx-danger-line); }
.cx-tb-st[data-st="review"] { color: var(--cx-text); }
.cx-tb-m { font-size: 12px; color: var(--cx-text-faint); white-space: nowrap; }
.cx-tb-card .cx-i { color: var(--cx-text-faint); }
@media (max-width: 640px) {
  .cx-tb-card { grid-template-columns: auto minmax(0, 1fr) 14px; }
  .cx-tb-st, .cx-tb-m { grid-column: 2; justify-self: start; }
  .cx-tb-head .cx-link { margin-left: 0; }
}

/* card 739: dot characters. The avatar is the character's own near-black tile in both themes; its motion follows the agent's state. */
.cx-av-char { background: #0a0b0d; color: transparent; padding: 0; overflow: hidden; --k: 1; }
.cx-av-char .cx-ch { width: 100%; height: 100%; display: block; }
.cx-ch .cx-ch-w * { transform-box: view-box; transform-origin: 50px 50px; }
.cx-ch .cx-ch-f * { transform-box: fill-box; transform-origin: center; }
.cx-ch-a { animation-duration: calc(var(--d) * var(--k)); animation-iteration-count: infinite; animation-timing-function: ease-in-out; }
.cx-av-s-working { --k: 0.4; }
.cx-av-s-needs { --k: 1.6; box-shadow: 0 0 0 2px var(--cx-bg), 0 0 0 3.5px var(--cx-st-needs); animation: cx-ch-ring 1.6s ease-in-out infinite; }
.cx-av-s-off .cx-ch-a, .cx-av-s-error .cx-ch-a { animation-play-state: paused; }
.cx-av-s-off .cx-ch { opacity: 0.45; }
@keyframes cx-ch-ring { 50% { box-shadow: 0 0 0 2px var(--cx-bg), 0 0 0 3.5px transparent; } }
@keyframes cx-ch-br { 50% { transform: scale(1.12); } }
@keyframes cx-ch-rot { to { transform: rotate(360deg); } }
@keyframes cx-ch-op { 50% { opacity: 0.25; } }
@keyframes cx-ch-bl { 0%, 88%, 100% { transform: scaleY(1); } 93% { transform: scaleY(0.1); } }
@keyframes cx-ch-gl { 0%, 40% { transform: translateX(0); } 50%, 80% { transform: translateX(5px); } 90%, 100% { transform: translateX(0); } }
@keyframes cx-ch-dr { 50% { transform: translate(4px, -5px); } }
@keyframes cx-ch-ec { 0% { transform: scale(0.35); opacity: 1; } 100% { transform: scale(1.25); opacity: 0; } }
@keyframes cx-ch-sp { 0%, 30%, 100% { transform: translate(0, 0); opacity: 1; } 15% { transform: translate(var(--x), var(--y)); opacity: 0.4; } }
@media (prefers-reduced-motion: reduce) { .cx-ch-a, .cx-av-s-needs { animation: none !important; } }
.cx-av-lead.cx-av-char { box-shadow: 0 0 0 1.5px var(--cx-bg), 0 0 0 3px var(--cx-lead-bg); }

/* the Character picker in the Appearance panel */
.cx-look-chars { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; width: 100%; }
.cx .cx-look-ch { display: grid; justify-items: start; gap: 4px; padding: 10px; min-height: 0; border: 1px solid var(--cx-line); border-radius: 12px;
  background: var(--cx-bg); color: var(--cx-text); text-align: left; cursor: pointer; font: inherit; }
.cx .cx-look-ch b { font-weight: 500; font-size: 13px; }
.cx .cx-look-ch > span:last-child { font-size: 12px; color: var(--cx-text-faint); line-height: 1.3; }
.cx .cx-look-ch > b + span { font-size: 12px; color: var(--cx-text-faint); line-height: 1.3; }
.cx .cx-look-ch > span.cx-look-best { font-size: 11px; color: var(--cx-text-muted); }
.cx .cx-look-ch.on { border-color: var(--cx-text); box-shadow: 0 0 0 1px var(--cx-text); }
.cx .cx-look-ch:disabled { cursor: progress; opacity: 0.6; }
.cx-look-ch-none { width: 44px; height: 44px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center;
  background: var(--cx-av-bg); color: var(--cx-av-fg); font: 600 15px/1 var(--cx-font); }
.cx-look-pv { display: flex; align-items: center; gap: 8px; font-size: 13px; margin-top: 4px; flex-basis: 100%; }

/* ---- card 766: Crew Studio (slice 1). The eight characters as drawn creatures with feelings, the Crew home, the profile panel and
   the Studio. Colours are tokens (this block and its light twin); the drawings use classes, never hex. ---- */
.cx {
  --cr-ink: #0a0b0d; --cr-eye: #ffffff; --cr-flame: #ff6a3d; --cr-glow: #ffd27a; --cr-leaf: #6fd3a8; --cr-gold: #f0b54a; --cr-drop: #9cc3ff; --cr-zz: #9a9ba2;
  /* card 770: the concept's colours (strong, not pastel): ember, gold, mint, sky, lilac, pink, chalk */
  --cr-blue: #7aa7ff; --cr-teal: #4fd1c5; --cr-green: #6fd3a8; --cr-violet: #c59bff; --cr-rose: #ff8fb1; --cr-sand: #f0b54a; --cr-slate: #e9e9ea;
  --cr-ember: #ff6a3d; --cr-wick: #ff6a3d; --cr-comet: #ff8fb1; --cr-halo: #f0b54a;
  --cr-ok-text: #6fd3a8;
}
[data-theme=light] .cx {
  --cr-leaf: #2f9e74; --cr-gold: #c98a12; --cr-drop: #4f86d9; --cr-zz: #5c5d64; --cr-glow: #f0b54a;
  --cr-blue: #5b8ef0; --cr-teal: #2fb3a6; --cr-green: #3fbf8a; --cr-violet: #a77ef0; --cr-rose: #f06f98; --cr-sand: #e0a02e; --cr-slate: #c9cbd2;
  --cr-ember: #f25a2c; --cr-wick: #f25a2c; --cr-comet: #f06f98; --cr-halo: #e0a02e;
  --cr-ok-text: #17794a;
}
.cr { --cr-c: var(--cr-sand); }
.cr-d-wick { --cr-c: var(--cr-wick); } .cr-d-tally { --cr-c: var(--cr-blue); } .cr-d-comet { --cr-c: var(--cr-comet); } .cr-d-moss { --cr-c: var(--cr-green); }
.cr-d-pip { --cr-c: var(--cr-violet); } .cr-d-halo { --cr-c: var(--cr-halo); } .cr-d-echo { --cr-c: var(--cr-teal); } .cr-d-flint { --cr-c: var(--cr-rose); }
/* card 835: six more characters, their accessories and their small motions */
.cr-d-nimbus { --cr-c: var(--cr-slate); } .cr-d-ripple { --cr-c: var(--cr-blue); } .cr-d-cog { --cr-c: var(--cr-teal); } .cr-d-nova { --cr-c: var(--cr-sand); }
.cr-d-sage { --cr-c: var(--cr-violet); } .cr-d-scout { --cr-c: var(--cr-ember); }
.cr-round { stroke: var(--cr-c); stroke-width: 8; stroke-linejoin: round; }
.cr-hat { fill: var(--cr-violet); } .cr-hat2 { fill: var(--cr-eye); } .cr-scarf { fill: var(--cr-ember); }
@keyframes cr-twinkle { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }
@keyframes cr-blinkon { 0%, 80%, 100% { opacity: 1; } 90% { opacity: .35; } }
.cr-twinkle { animation: cr-twinkle 2.6s ease-in-out infinite; } .cr-tw2 { animation-delay: -1.3s; }
.cr-blink { animation: cr-blinkon 3.2s ease-in-out infinite; }
.cr-s .cr-twinkle, .cr-s .cr-blink { animation: none; }
@media (prefers-reduced-motion: reduce) { .cr-twinkle, .cr-blink { animation: none; } }
.cr-c-blue { --cr-c: var(--cr-blue); } .cr-c-teal { --cr-c: var(--cr-teal); } .cr-c-green { --cr-c: var(--cr-green); } .cr-c-violet { --cr-c: var(--cr-violet); }
.cr-c-rose { --cr-c: var(--cr-rose); } .cr-c-sand { --cr-c: var(--cr-sand); } .cr-c-slate { --cr-c: var(--cr-slate); } .cr-c-ember { --cr-c: var(--cr-ember); }
.cr-svg { display: block; width: 100%; height: 100%; overflow: visible; }
.cr-b { fill: var(--cr-c); } .cr-bs { fill: none; stroke: var(--cr-c); stroke-linecap: round; } .cr-b-soft { stroke-opacity: 0.5; }
.cr-k { fill: none; stroke: var(--cr-ink); stroke-linecap: round; stroke-linejoin: round; } .cr-k-soft { stroke-opacity: 0.5; }
.cr-w { fill: var(--cr-eye); } .cr-p { fill: var(--cr-ink); }
.cr-fl1 { fill: var(--cr-flame); } .cr-fl2 { fill: var(--cr-glow); } .cr-spark { fill: var(--cr-glow); }
.cr-leaf { fill: var(--cr-leaf); } .cr-leaf-s { fill: none; stroke: var(--cr-leaf); stroke-linecap: round; }
.cr-gold-s { fill: none; stroke: var(--cr-gold); } .cr-warn { fill: var(--cr-gold); } .cr-shine { fill: var(--cr-eye); fill-opacity: 0.14; }
.cr-drop { fill: var(--cr-drop); } .cr-dot { fill: var(--cr-zz); }
.cr-glass { fill: var(--cr-eye); fill-opacity: 0.1; stroke: var(--cr-ink); stroke-width: 2; }
.cr-z, .cr-q { font: 700 13px var(--cx-font); fill: var(--cr-zz); } .cr-z2 { font-size: 9px; }
.cr-qc { fill: var(--cx-text); } .cr-q { fill: var(--cx-bg); font-size: 12px; }      /* the "?" mark: the page's own ink and ground, in both themes */
.cr-key { fill: var(--cr-zz); } .cr-bag { stroke-opacity: 0.45; }
/* an avatar that is a character: no tile behind it */
.cx-avatar.cx-av-cr, .tk-av.cx-av-cr { background: transparent; border-radius: 0; overflow: visible; padding: 0; }
.tk-av.cx-av-cr { width: 32px; height: 32px; }
.cr-stage { position: relative; display: inline-grid; place-items: center; flex: none; }
.cr-stage-plain .cx-avatar { width: 64%; height: 64%; border-radius: 22%; font-size: 150%; }
/* life: breathing, blinking, and what the feeling adds. --cr-t keeps every loop where the clock says it is across repaints. */
.cr-bob { transform-origin: 50% 90%; transform-box: view-box; animation: cr-bob 3.8s ease-in-out var(--cr-t, 0s) infinite; }
.cr-pose { transform-origin: 50% 92%; transform-box: view-box; }
.cr-eyes { transform-box: fill-box; transform-origin: center; animation: cr-blink 5.2s var(--cr-t, 0s) infinite; }
.cr-pu { transform: translate(calc(var(--px, 0) * 1px), calc(var(--py, 0) * 1px)); }
.cr-flame { transform-box: fill-box; transform-origin: 50% 100%; animation: cr-flick 1.3s ease-in-out var(--cr-t, 0s) infinite; }
.cr-spark { transform-box: fill-box; transform-origin: center; animation: cr-tw 1.8s ease-in-out var(--cr-t, 0s) infinite; }
.cr-float { animation: cr-fl 2.6s ease-in-out var(--cr-t, 0s) infinite; }
.cr-arm { transform-box: fill-box; transform-origin: 100% 100%; }      /* it turns round its shoulder (the lower right corner of its own box) */
.cr-m-busy .cr-bob { animation-duration: 0.9s; }
.cr-v-typing .cr-bob { animation: cr-type 0.42s ease-in-out var(--cr-t, 0s) infinite; }
.cr-glance { animation: cr-glance 2.8s ease-in-out var(--cr-t, 0s) infinite; }
.cr-dots .cr-dot { animation: cr-dot 1.4s ease-in-out var(--cr-t, 0s) infinite; }
.cr-dots .cr-dot:nth-child(2) { animation-delay: calc(var(--cr-t, 0s) + 0.2s); } .cr-dots .cr-dot:nth-child(3) { animation-delay: calc(var(--cr-t, 0s) + 0.4s); }
.cr-m-asleep { opacity: 0.6; filter: saturate(0.35); }
.cr-m-asleep .cr-bob { animation: cr-breathe 5.5s ease-in-out var(--cr-t, 0s) infinite; }
.cr-m-asleep .cr-flame { animation: none; opacity: 0.35; }
.cr-z { animation: cr-zz 3.2s ease-in-out var(--cr-t, 0s) infinite; }
.cr-m-needs { filter: drop-shadow(0 0 6px var(--cx-warning)); }
.cr-pulse { transform-box: fill-box; transform-origin: center; animation: cr-pulse 1.6s ease-in-out var(--cr-t, 0s) infinite; }      /* the amber mark, the "?" mark */
.cr-m-worried .cr-pose { transform: translateY(3px) scale(1.04, 0.93); }
.cr-m-worried .cr-bob { animation-duration: 6s; }
.cr-m-worried .cr-drop { transform-box: fill-box; animation: cr-drip 2.6s ease-in var(--cr-t, 0s) infinite; }
.cr-m-tired .cr-pose { transform: translateY(2px) scale(1.02, 0.96); }
.cr-m-tired .cr-bob { animation-duration: 6.5s; }
.cr-m-tired .cr-eyes { animation: cr-droop 4.2s var(--cr-t, 0s) infinite; }
.cr-yawn { transform-box: fill-box; transform-origin: center; animation: cr-yawn 4.5s ease-in-out var(--cr-t, 0s) infinite; }
.cr-key { animation: cr-key 0.5s ease-in-out var(--cr-t, 0s) infinite; }
.cr-key2 { animation-delay: calc(var(--cr-t, 0s) + 0.12s); } .cr-key3 { animation-delay: calc(var(--cr-t, 0s) + 0.24s); }
.cr-z2 { animation-delay: calc(var(--cr-t, 0s) + 1.4s); }
.cr-hop .cr-pose { animation: cr-hop 0.8s ease-out var(--cr-hop, 0s) 1; }
.cr-wave .cr-arm { animation: cr-wave 0.5s ease-in-out 4; }
/* small sizes (under about 40 px): only blink and bob */
.cr-s .cr-pu, .cr-s .cr-yawn, .cr-s .cr-z, .cr-s .cr-q, .cr-s .cr-dot, .cr-s .cr-flame, .cr-s .cr-spark, .cr-s .cr-float, .cr-s .cr-drop, .cr-s .cr-bang, .cr-s .cr-arm,
.cr-s .cr-key, .cr-s .cr-pulse, .cr-s .cr-glance { animation: none; }
.cr-s .cr-bob { animation: cr-bob 3.8s ease-in-out var(--cr-t, 0s) infinite; }
.cr-s .cr-eyes { animation: cr-blink 5.2s var(--cr-t, 0s) infinite; }
.cr-s.cr-m-asleep .cr-bob { animation: cr-breathe 5.5s ease-in-out var(--cr-t, 0s) infinite; }
/* off screen: rest */
.cr-out, .cr-out * { animation-play-state: paused !important; }
@keyframes cr-bob { 0%, 100% { transform: translateY(0) scale(1, 1); } 50% { transform: translateY(-2.5%) scale(1.02, 0.98); } }
@keyframes cr-breathe { 0%, 100% { transform: scale(1, 1); } 50% { transform: scale(1.025, 0.975); } }
@keyframes cr-type { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4%); } }
@keyframes cr-blink { 0%, 93%, 100% { transform: scaleY(1); } 96% { transform: scaleY(0.1); } }
@keyframes cr-droop { 0%, 60%, 100% { transform: scaleY(1); } 72%, 90% { transform: scaleY(0.25); } }
@keyframes cr-flick { 0%, 100% { transform: scale(1, 1) rotate(-2deg); } 50% { transform: scale(0.92, 1.08) rotate(3deg); } }
@keyframes cr-tw { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(0.7); opacity: 0.6; } }
@keyframes cr-fl { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
@keyframes cr-glance { 0%, 100% { transform: translateX(-2.6px); } 50% { transform: translateX(2.6px); } }
@keyframes cr-yawn { 0%, 68%, 100% { transform: scale(1, 0.4); } 78%, 90% { transform: scale(1.3, 1.5); } }
@keyframes cr-dot { 0%, 100% { opacity: 0.25; } 50% { opacity: 1; } }
@keyframes cr-zz { 0% { transform: translate(0, 0); opacity: 0; } 30% { opacity: 1; } 100% { transform: translate(5px, -9px); opacity: 0; } }
@keyframes cr-key { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(2.5px); } }
@keyframes cr-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.16); } }
@keyframes cr-drip { 0%, 60% { transform: translateY(0); opacity: 1; } 100% { transform: translateY(8px); opacity: 0; } }
@keyframes cr-hop { 0% { transform: translateY(0) scale(1, 1); } 30% { transform: translateY(-14%) scale(0.96, 1.05); } 60% { transform: translateY(0) scale(1.05, 0.94); } 100% { transform: translateY(0) scale(1, 1); } }
@keyframes cr-wave { 0%, 100% { transform: rotate(-12deg); } 50% { transform: rotate(18deg); } }

/* the feeling: a word, never colour alone; its reason on hover, focus and tap */
.cr-feelw { position: relative; display: inline-flex; align-items: center; }
.cx .cr-feel { min-height: 24px; padding: 0 2px; margin-left: 8px; border: 0; border-radius: 6px; background: transparent; font: 500 13px/1.2 var(--cx-font); color: var(--cx-text-2);
  text-decoration: underline dotted; text-underline-offset: 3px; cursor: help; }
.cx .cr-feel:hover { background: transparent; color: var(--cx-text); }
.cx .cr-feel:focus-visible { outline: 2px solid var(--cx-focus); outline-offset: 2px; }
.cr-feel-t { margin-left: 8px; font-size: 13px; font-weight: 500; color: var(--cx-text-2); }
.cr-feel-t::before, .cx .cr-feel::before { content: "Â· "; color: var(--cx-text-faint); text-decoration: none; display: inline-block; white-space: pre; }
.cr-feel-t.cr-solo::before, .cx .cr-feel.cr-solo::before { content: ""; }
.cx .cr-feel.cr-solo, .cr-feel-t.cr-solo { margin-left: 0; }
.cr-f-needs { color: var(--cx-warn-text) !important; } .cr-f-worried { color: var(--cx-danger) !important; } .cr-f-busy { color: var(--cx-ember-text) !important; }
.cr-f-happy { color: var(--cr-ok-text) !important; }
.cr-why { display: none; position: absolute; left: 0; top: calc(100% + 6px); z-index: 7; width: max-content; max-width: min(300px, 76vw); padding: 8px 10px; border: 1px solid var(--cx-line-btn);
  border-radius: 10px; background: var(--cx-panel); color: var(--cx-text); font: 400 13px/1.45 var(--cx-font); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28); overflow-wrap: anywhere; text-align: left; }
.cr-feel:hover + .cr-why, .cr-feel:focus-visible + .cr-why, .cr-feel[aria-expanded="true"] + .cr-why { display: block; }
/* card 768: what is written next to a character. Energy (a labelled bar with the percent), today's numbers, its last 12 hours */
.cr-info { display: grid; gap: 8px; margin: 0; min-width: 0; font-size: 12.5px; color: var(--cx-text-faint); text-align: left; }
.cr-info p { margin: 0; }
.cr-nums { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 12px; }
.cr-en { display: grid; gap: 3px; min-width: 0; }
.cr-en-l { display: flex; align-items: baseline; gap: 6px; }
.cr-en-l b { color: var(--cx-text-2); font-weight: 600; }
.cr-en-bar { display: block; height: 6px; border-radius: 3px; background: var(--cx-raised); overflow: hidden; }
.cr-en-bar > span { display: block; height: 100%; min-width: 2px; border-radius: 3px; background: var(--cr-ok-text); }
.cr-en-of { font-size: 12px; }
.cr-en-low .cr-en-l b, .cr-en-w { color: var(--cx-danger); }
.cr-en-w { font-weight: 600; }
.cr-en-low .cr-en-bar > span { background: var(--cx-danger); }
.cr-day { display: grid; gap: 3px; min-width: 0; }
.cr-day-l, .cr-day-w { font-size: 12px; }
.cr-day-w { color: var(--cx-text-muted); }
/* one cell per hour, oldest first. The kind is a shape as well as a colour: a tall block = working, a hollow block = worried,
   a low line = calm, a dotted line = asleep, a dashed outline = not loaded; each cell has its title and the line in words follows */
.cr-hours { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 2px; align-items: end; height: 16px; }
.cr-h { display: block; box-sizing: border-box; height: 4px; border-radius: 2px; background: var(--cx-line-strong); }
.cr-h-working { height: 16px; border-radius: 3px; background: var(--cx-ember); }
.cr-h-worried { height: 16px; border-radius: 3px; background: transparent; border: 2px solid var(--cx-danger); }
.cr-h-asleep { height: 0; background: transparent; border-bottom: 3px dotted var(--cx-off); border-radius: 0; }
.cr-h-none { height: 10px; background: transparent; border: 1px dashed var(--cx-line-strong); }

/* the Crew: teams as sections, an agent as a card. Card 835: the teams flow side by side, each as wide as its cards need */
.cx-crew-teams { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 0 28px; }
.cx-crew-team { margin: 0 0 28px; flex: var(--cx-crew-n, 1) 1 calc(var(--cx-crew-n, 1) * 232px); min-width: min(100%, 232px); }
.cx-crew-team .cx-ag-grid.cx-crew-cards { grid-template-columns: repeat(auto-fill, minmax(min(100%, 216px), 1fr)); }
.cx-crewb-trouble, .cx-err-t { color: var(--cx-danger); }
.cx-sum-link { color: var(--cx-text-2); text-underline-offset: 3px; }
.cx-crew-teams .cx-crew-th p { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cx-crew-th { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; padding-bottom: 10px; border-bottom: 1px solid var(--cx-line); }
.cx-crew-th h2 { margin: 0; font: 600 15px/1.3 var(--cx-font); } .cx-crew-th p { margin: 2px 0 0; font-size: 13px; }
.cx-main .cx-crew-th button { min-height: 36px; font-size: 13px; }
.cx-ag-grid.cx-crew-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 12px; margin-top: 12px; border: 0; }
.cx-ag-grid.cx-crew-add { border: 0; margin-top: 4px; }
.cx-crew-none { margin: 0; }
.cx-main .cx-agcard.cx-crew-card { position: relative; display: flex; flex-direction: column; gap: 8px; align-items: stretch; padding: 14px; border: 1px solid var(--cx-line); border-radius: 16px;
  background: var(--cx-card-bg); min-width: 0; }
.cx-main .cx-agcard.cx-crew-card[hidden] { display: none; }
.cx-main .cx-agcard.cx-crew-card:hover { border-color: var(--cx-line-strong); }
.cx-main .cx-agcard.cx-crew-card.st-needs { border-color: var(--cx-warn-line); }
.cx-crew-card .cx-ag-more { position: absolute; top: 8px; right: 8px; z-index: 2; }
.cx-main .cx-crew-card .cx-ag-more .cx-icon-btn { width: 36px; height: 36px; min-height: 36px; padding: 0; border: 1px solid var(--cx-line-btn); background: var(--cx-bg); }
.cx-crew-stage { height: 104px; border-radius: 12px; display: grid; place-items: center; background: radial-gradient(circle at 50% 62%, var(--cx-raised), transparent 68%); }
.cx-crew-card .cx-ag-id { flex: none; padding-right: 0; }
.cx-crew-card .cx-ag-id h2 { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cx-crew-st { display: flex; flex-wrap: wrap; align-items: center; margin: 0; font-size: 13px; }
.cx-crew-st .cx-pill { border: 0; padding: 0; font-size: 13px; }
.cx-crew-now { margin: 0; font-size: 13px; line-height: 1.45; color: var(--cx-text-muted); overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.cx-crew-card .cx-ag-meta { padding: 0; }
.cx-main .cx-agcard.cx-crew-card .cx-ag-act { display: flex; flex-wrap: wrap; gap: 8px; margin: auto 0 0; padding: 6px 0 0; border: 0; }
.cx-main .cx-crew-card .cx-ag-act button { min-height: 38px; }
.cx-main .cx-crew-card .cx-ag-act .cx-confirm { min-width: 0; }

/* the Studio: the stage on the left, the sections on the right */
.cx-studio-back { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 0 0 8px; }
.cx-studio { display: grid; grid-template-columns: minmax(0, 320px) minmax(0, 1fr); gap: 24px; align-items: start; margin-top: 20px; }
.cx-stagebox { display: grid; gap: 10px; align-content: start; padding: 16px; border: 1px solid var(--cx-line); border-radius: 20px; background: var(--cx-card-bg); min-width: 0; }
.cx-bigstage { height: 220px; border-radius: 16px; display: grid; place-items: center; background: radial-gradient(circle at 50% 62%, var(--cx-raised), transparent 68%); }
.cx-plate { text-align: center; } .cx-plate h2 { margin: 0; font: 600 18px/1.3 var(--cx-font); overflow-wrap: anywhere; } .cx-plate p { margin: 2px 0 0; font-size: 13px; }
.cx-stagebox .cx-crew-st { justify-content: center; }
.cx-stage-why { margin: 0; font-size: 13px; line-height: 1.45; color: var(--cx-text-2); text-align: center; overflow-wrap: anywhere; }
.cx-stagebox .cx-crew-now { text-align: center; } .cx-stagebox .cr-info { padding-top: 10px; border-top: 1px solid var(--cx-line); }
.cx-stage-moods { display: grid; gap: 6px; padding-top: 10px; border-top: 1px solid var(--cx-line); }
.cx-stage-moods .cx-cap { margin: 0; }
.cx-studio-main { min-width: 0; display: grid; gap: 14px; align-content: start; }
.cx-studio .cx-tabs { text-transform: none; display: inline-flex; flex-wrap: wrap; width: fit-content; max-width: 100%; border-radius: 22px; }
.cx-studio-sec { min-width: 0; display: grid; gap: 20px; align-content: start; }
.cx-studio-sec .cx-look { margin: 0; }
.cx-opts { display: flex; flex-wrap: wrap; gap: 8px; }
.cx-main .cx-opt { min-height: 36px; padding: 0 14px; font-size: 13px; color: var(--cx-text-muted); }
.cx-main .cx-opt.on, .cx-main .cx-opt[aria-pressed="true"] { border-color: var(--cx-text); color: var(--cx-text); background: var(--cx-raised); }
.cx-look-ch .cx-av-xl { width: 56px; height: 56px; }
.cx-per h2, .cx-per h3 { margin: 0; font: 600 15px/1.3 var(--cx-font); } .cx-per h3 { font-size: 13px; }
.cx-sl { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; align-items: baseline; }
.cx-sl label { font-weight: 500; } .cx-sl output { font-size: 13px; color: var(--cx-text-2); }
.cx-sl input[type=range] { grid-column: 1 / -1; width: 100%; min-height: 32px; margin: 0; accent-color: var(--cx-ember); }
.cx-sl-ends { grid-column: 1 / -1; display: flex; justify-content: space-between; font-size: 12px; color: var(--cx-text-faint); }
.cx-look-f input[data-per-pc] { width: min(100%, 24ch); min-height: 40px; box-sizing: border-box; padding: 0 12px; border: 1px solid var(--cx-line-btn); border-radius: 10px; background: var(--cx-bg); color: var(--cx-text); font: inherit; }
.cx-per-a { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.cx-per-told { display: grid; gap: 6px; padding-top: 12px; border-top: 1px solid var(--cx-line); }
.cx-per-told p { margin: 0; } .cx-per-text { font-size: 14px; line-height: 1.5; color: var(--cx-text); overflow-wrap: anywhere; }
@media (max-width: 980px) { .cx-studio { grid-template-columns: minmax(0, 1fr); } .cx-bigstage { height: 200px; } }

/* a room: its details open on demand, over the conversation */
.cx-chan { grid-template-columns: minmax(0, 1fr); position: relative; }
.cx .cx-chan-idb { min-height: 44px; padding: 0 10px; margin-left: -10px; border: 0; border-radius: 12px; background: transparent; color: var(--cx-text); font: inherit; cursor: pointer; }
.cx .cx-chan-idb:hover, .cx .cx-chan-idb[aria-expanded="true"] { background: var(--cx-raised); }
.cx-chan-faces { display: inline-flex; align-items: center; gap: 2px; margin-right: 4px; }
.cx-chan .cx-chan-side.cx-peek { display: flex; position: absolute; top: 0; right: 0; bottom: 0; z-index: 6; width: min(340px, 100%); box-sizing: border-box; border-left: 1px solid var(--cx-line);
  background: var(--cx-side); box-shadow: -18px 0 40px rgba(0, 0, 0, 0.3); padding-top: 56px; }
.cx-main .cx-peek-x { position: absolute; top: 10px; right: 10px; width: 40px; height: 40px; min-height: 40px; padding: 0; border: 1px solid var(--cx-line-btn); }

/* a conversation: alone on the page; the name and the character open the profile panel */
.cx-talk #tk-panein { position: relative; }
.cx-talk .tk-h { display: flex; }
.cx-talk .tk-idb { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 10px 0 2px; margin: -4px 0 -4px -6px; border: 0; border-radius: 12px; background: transparent; color: var(--cx-text);
  font: inherit; cursor: pointer; min-width: 0; text-align: left; }
.cx-talk .tk-idb:hover, .cx-talk .tk-idb[aria-expanded=true] { background: var(--cx-raised); }
.cx-talk .tk-idb:focus-visible { outline: 2px solid var(--cx-focus); outline-offset: 2px; }
.cx-talk .tk-idn { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cx-talk .tk-idf .tk-av { width: 40px; height: 40px; }
.cx-talk .tk-sub .cr-feelw { margin-left: 2px; }
.cx-talk .tk-aside.tk-peek { display: flex; position: absolute; top: 0; right: 0; bottom: 0; z-index: 6; width: min(360px, 100%); flex: none; border-left: 1px solid var(--cx-line);
  background: var(--cx-side); box-shadow: -18px 0 40px rgba(0, 0, 0, 0.3); }
.cx-talk .tk-peek-x { position: absolute; top: 10px; right: 10px; width: 40px; height: 40px; min-height: 40px; padding: 0; border: 1px solid var(--cx-line-btn); z-index: 1; }
.tk-peek-top { align-items: center; text-align: center; gap: 4px; }
.cx-talk .tk-peek-n { margin: 4px 0 0; font: 600 18px/1.3 var(--cx-font); color: var(--cx-text); overflow-wrap: anywhere; }
.tk-peek-feel { margin: 4px 0 0; font-size: 13px; } .tk-peek-feel .cr-feel-t { margin-left: 0; } .tk-peek-feel .cr-feel-t::before { content: ""; }
.tk-peek-why, .tk-peek-now { margin: 0; font-size: 13px; line-height: 1.45; color: var(--cx-text-2); overflow-wrap: anywhere; }
.tk-peek-now { color: var(--cx-text-muted); }
.cx-talk .tk-aside .tk-peek-cust { align-self: center; margin-top: 10px; }
.tk-aside.tk-peek .tk-kv a, .tk-aside.tk-peek .tk-aside-h a { display: inline-flex; align-items: center; min-height: 24px; }
.tk-fact { align-items: flex-start; } .tk-fact > span:first-child { flex: 0 0 92px; color: var(--cx-text-faint); font-size: 12px; } .tk-fact > span:last-child { min-width: 0; text-align: right; overflow-wrap: anywhere; }
.tk-aside .tk-fact-col { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.tk-fact-col .cr-info { align-self: stretch; }
@media (max-width: 767px) {
  .cx-crew-stage { height: 92px; }
  .cx-main .cx-crew-card .cx-ag-act button, .cx-main .cx-crew-th button, .cx-main .cx-opt { min-height: 44px; }
  .cx-main .cx-crew-card .cx-ag-more .cx-icon-btn { width: 44px; height: 44px; min-height: 44px; }
  .cx .cr-feel { min-height: 44px; min-width: 44px; }
  .cx-main .cx-studio .cx-tabs button, .cx-main .cx-studio-back .cx-link { min-height: 44px; }
  .cx-main .cx-crew-card .cx-ag-id h2 button { min-height: 44px; padding: 0; margin: -6px 0; }
  .cx .cx-look-sw { width: 44px; height: 44px; }
  .cx-talk .tk-peek-x, .cx-main .cx-peek-x { width: 44px; height: 44px; min-height: 44px; }
  .tk-aside.tk-peek .tk-kv a, .tk-aside.tk-peek .tk-aside-h a { min-height: 44px; }
  .cx-talk .tk-cx-head .tk-hrow { min-width: 0; max-width: 100%; }
  .cx-talk .tk-sub .cr-feelw { display: none; }
  .cx-talk .tk-sub .tk-sep { display: none; }      /* the phone header has no room: the feeling and its reason are in the profile panel */
  .cx-chan-faces { display: none; }
}
@media (pointer: fine) and (min-width: 768px) { .cx-main .cx-crew-card .cx-ag-act button { min-height: 36px; } .cx .cr-feel { min-height: 28px; } }

/* ---- card 768: the Crew as one drawing (the huddle), richer feelings, more to read next to a character ---- */
/* the Crew entry: a small card at the top of the sidebar, the real agents huddled round an ember, its state in words under it */
.cx .cx-crewb { display: grid; gap: 6px; flex: none; width: 100%; min-width: 0; box-sizing: border-box; padding: 10px 10px 9px; border: 1px solid var(--cx-line); border-radius: 14px;
  background: var(--cx-bg); color: var(--cx-text); font: 400 13px/1.3 var(--cx-font); text-align: left; cursor: pointer; }
.cx .cx-crewb:hover, .cx .cx-crewb.on { border-color: var(--cx-line-strong); background: var(--cx-raised); }
.cx .cx-crewb:focus-visible { outline: 2px solid var(--cx-focus); outline-offset: 2px; }
.cx-crewb-t { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; min-width: 0; }
.cx-crewb-t b { font-weight: 600; font-size: 14px; }
.cx-crewb-t span, .cx-crewb-l, .cx-crewb-more { font-size: 12px; color: var(--cx-text-faint); overflow-wrap: anywhere; }
.cx-crewb-needs { color: var(--cx-warn-text); } .cx-crewb-work { color: var(--cx-ember-text); }
.cx-rail .cx-embed-only { display: none !important; }
.cx-embed .cx-rail .cx-embed-only { display: inline-flex !important; }
.cx-embed .cx-crewb { display: none; }
/* the drawing: one svg, each agent a group standing on the arc */
.cr-huddle { display: block; width: 100%; line-height: 0; }
.cr-huddle-svg { display: block; width: 100%; height: auto; overflow: visible; }
.cr-huddle .cr-bob, .cr-huddle .cr-pose { transform-box: fill-box; transform-origin: 50% 100%; }
.cr-huddle .cr-hm .cr-bob { animation-name: cr-bobs; }
.cr-huddle .cr-hm[data-st="working"] .cr-bob { animation-duration: 1.4s; }                       /* who is working moves faster */
.cr-huddle .cr-hm[data-st="off"] .cr-bob { animation: cr-breathe 6.5s ease-in-out var(--cr-t, 0s) infinite; }   /* who is off dozes */
.cr-huddle .cr-hm.cr-m-asleep { opacity: 0.55; }
.cr-huddle .cr-hm.cr-m-needs { filter: drop-shadow(0 0 3px var(--cx-warning)); }
.cr-hm-plain { --cr-c: var(--cr-halo); }
.cr-hl { font: 700 26px var(--cx-font); fill: var(--cr-ink); }
.cr-gnd { fill: var(--cx-raised); }
.cx-crewb:hover .cr-gnd, .cx-crewb.on .cr-gnd { fill: var(--cx-line-btn); }
.cr-ember-glow { fill: var(--cr-flame); opacity: 0.14; }
@keyframes cr-bobs { 0%, 100% { transform: translateY(0) scale(1, 1); } 50% { transform: translateY(-4%) scale(1.03, 0.97); } }
/* each feeling moves in its own way: on the large characters and in the large huddle (small sizes only blink and bob) */
.cr.cr-v-looking:not(.cr-s) .cr-bob, .cr.cr-v-thinking:not(.cr-s) .cr-bob,
.cr-huddle-lg .cr-hm.cr-v-looking .cr-bob, .cr-huddle-lg .cr-hm.cr-v-thinking .cr-bob { animation-duration: 1.7s; }
.cr.cr-m-happy:not(.cr-s) .cr-bob, .cr-huddle-lg .cr-hm.cr-m-happy .cr-bob { animation: cr-hops 1.1s ease-in-out var(--cr-t, 0s) infinite; }
.cr.cr-m-worried:not(.cr-s) .cr-bob, .cr-huddle-lg .cr-hm.cr-m-worried .cr-bob { animation: cr-shake 2.4s linear var(--cr-t, 0s) infinite; }      /* a short tremble now and then */
.cr.cr-m-tired:not(.cr-s) .cr-bob, .cr-huddle-lg .cr-hm.cr-m-tired .cr-bob { animation: cr-slump 5s ease-in-out var(--cr-t, 0s) infinite; }
.cr.cr-m-bored:not(.cr-s) .cr-bob, .cr-huddle-lg .cr-hm.cr-m-bored .cr-bob { animation: cr-sway 4.2s ease-in-out var(--cr-t, 0s) infinite; }
.cr.cr-m-curious:not(.cr-s) .cr-bob, .cr-huddle-lg .cr-hm.cr-m-curious .cr-bob { animation: cr-tilt 3.2s ease-in-out var(--cr-t, 0s) infinite; }
.cr.cr-m-needs:not(.cr-s) .cr-arm, .cr-huddle-lg .cr-hm.cr-m-needs .cr-arm { animation: cr-wave 1s ease-in-out var(--cr-t, 0s) infinite; }
.cr-poked .cr-pose { animation: cr-hop 0.7s ease-out 1; }      /* a click or a tap on a large character: one hop */
@keyframes cr-hops { 0%, 100% { transform: translateY(0) scale(1.04, 0.96); } 40% { transform: translateY(-9%) scale(0.97, 1.04); } 70% { transform: translateY(0) scale(1.05, 0.95); } }
@keyframes cr-shake { 0%, 58%, 88%, 100% { transform: translateX(0); } 64%, 76% { transform: translateX(-1.6%); } 70%, 82% { transform: translateX(1.6%); } }
@keyframes cr-slump { 0%, 100% { transform: rotate(0) translateY(0); } 50% { transform: rotate(4deg) translateY(2%); } }
@keyframes cr-sway { 0%, 100% { transform: rotate(-4deg); } 50% { transform: rotate(4deg); } }
@keyframes cr-tilt { 0%, 100% { transform: rotate(0); } 40%, 60% { transform: rotate(-8deg); } }
/* the same drawing, larger, at the top of the Crew screen beside the summary numbers */
.cx-crew-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; margin: 0 0 24px; padding: 16px 20px; border: 1px solid var(--cx-line); border-radius: 18px; background: var(--cx-card-bg); }
.cx-crew-top .cr-huddle-lg { flex: 0 1 360px; width: auto; min-width: min(100%, 220px); max-width: 100%; }
.cx-crew-top-t { flex: 1 1 280px; min-width: 0; }
.cx-crew-tog { display: flex; flex-wrap: wrap; gap: 2px 8px; margin: 0 0 2px; padding: 0 8px; font-size: 14px; color: var(--cx-text-muted); }
.cx-crew-tog b { color: var(--cx-text); font-weight: 600; }
.cx-crew-top .cx-ag-sum { margin: 0; }
/* the counts wrap on narrow screens: spacing instead of a dot, so no line ends on a dangling separator */
.cx-crew-top .cx-ag-sum { gap: 4px 16px; }
.cx-crew-top .cx-ag-sum > span[aria-hidden] { display: none; }
.cx-crew-tog { gap: 2px 16px; }
@media (max-width: 767px) {
  .cx-crewb { display: none !important; }      /* the phone keeps Crew in the bottom bar; the huddle is the top of the Crew screen */
  .cx-crew-top { margin-top: 0; }
  .cx-crew-top .cr-huddle-lg { flex: 1 1 100%; max-width: 420px; margin: 0 auto; }
}

/* ---- card 767 (Crew Studio slice 2): earned trust, hand-off, the room huddle, the morning card ---- */
/* the verdict under an agent's finished work: two pills; the chosen one is pressed (a filled ground, a strong border and bold: not colour alone) */
.cx-talk .tk-verdict { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 8px 0 2px; }
.cx-talk .tk-vb { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 12px; border: 1px solid var(--cx-line-btn); border-radius: 999px; background: transparent;
  color: var(--cx-text-muted); font: 500 13px/1.2 var(--cx-font); cursor: pointer; }
.cx-talk .tk-vb:hover { color: var(--cx-text); border-color: var(--cx-line-strong); }
.cx-talk .tk-vb.on, .cx-talk .tk-vb[aria-pressed="true"] { color: var(--cx-text); border-color: var(--cx-text); background: var(--cx-raised); font-weight: 600; }
.cx-talk .tk-vb:focus-visible, .cx-talk .tk-notlike input:focus-visible, .cx-talk .tk-notlike button:focus-visible { outline: 2px solid var(--cx-focus); outline-offset: 2px; }
.cx-talk .tk-notlike { flex: 1 1 100%; display: grid; gap: 6px; margin: 2px 0 0; padding: 10px 12px; border: 1px solid var(--cx-line-btn); border-radius: 14px; background: var(--cx-card-bg); max-width: 560px; }
.cx-talk .tk-notlike label { font-size: 13px; font-weight: 500; color: var(--cx-text); }
.cx-talk .tk-nl-row { display: flex; flex-wrap: wrap; gap: 8px; }
.cx-talk .tk-nl-row input { flex: 1 1 200px; min-width: 0; min-height: 40px; box-sizing: border-box; padding: 0 14px; border: 1px solid var(--cx-line-btn); border-radius: 999px; background: var(--cx-field); color: var(--cx-text); font: inherit; }
.cx-talk .tk-nl-row button { min-height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--cx-line-btn); background: transparent; color: var(--cx-text); font: 500 13px/1.2 var(--cx-font); cursor: pointer; }
.cx-talk .tk-nl-row button.primary { border: 0; background: var(--cx-accent); color: var(--cx-accent-ink); font-weight: 600; }
/* trust next to a character: the same labelled bar as Energy; "no verdicts yet" is words, never a number */
.cr-tr { display: grid; gap: 3px; min-width: 0; }
.cr-tr-bar > span { background: var(--cx-text-2); }
.cr-tr-none { color: var(--cx-text-muted); }
.cr-tr-s .cr-en-bar { height: 4px; }
.cx-au-trust { display: grid; gap: 8px; align-content: start; }
.cx-au-trust p { margin: 0; } .cx-au-trust .cr-tr { font-size: 13px; color: var(--cx-text-faint); max-width: 360px; }
/* "Hand this to someone": a panel above the composer (who, what is done, what is next), and the hand-off's card in both conversations */
.cx-talk .tk-hand { margin: 0 auto 8px; width: 100%; max-width: 760px; box-sizing: border-box; padding: 14px 16px; border: 1px solid var(--cx-line-btn); border-radius: 16px; background: var(--cx-card-bg); }
.cx-talk .tk-hand h3, .cx-talk .tk-baton h3 { margin: 0; font: 600 14px/1.3 var(--cx-font); color: var(--cx-text); }
.cx-talk .tk-hand form { display: grid; gap: 10px; margin-top: 10px; }
.cx-talk .tk-hand-g { display: grid; grid-template-columns: minmax(0, 160px) minmax(0, 1fr); gap: 8px 12px; align-items: start; }
.cx-talk .tk-hand-g label { padding-top: 10px; font-size: 13px; color: var(--cx-text-2); }
.cx-talk .tk-hand-g select, .cx-talk .tk-hand-g textarea { width: 100%; min-height: 40px; box-sizing: border-box; padding: 8px 12px; border: 1px solid var(--cx-line-btn); border-radius: 12px; background: var(--cx-field);
  color: var(--cx-text); font: inherit; resize: vertical; }
.cx-talk .tk-hand-why { margin: 8px 0 0; font-size: 13px; color: var(--cx-text-2); }
.cx-talk .tk-hand-a { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 2px; }
.cx-talk .tk-hand-a button { min-height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--cx-line-btn); background: transparent; color: var(--cx-text); font: 500 13px/1.2 var(--cx-font); cursor: pointer; }
.cx-talk .tk-hand-a button.primary { border: 0; background: var(--cx-accent); color: var(--cx-accent-ink); font-weight: 600; }
.cx-talk .tk-hand-a button:disabled { opacity: 0.6; cursor: default; }
.cx-talk .tk-hand select:focus-visible, .cx-talk .tk-hand textarea:focus-visible, .cx-talk .tk-hand button:focus-visible { outline: 2px solid var(--cx-focus); outline-offset: 2px; }
.cx-talk .tk-baton { display: grid; gap: 8px; margin: 10px 0; padding: 12px 14px; border: 1px solid var(--cx-line-btn); border-radius: 16px; background: var(--cx-card-bg); max-width: 560px; }
.cx-talk .tk-baton-h { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; }
.cx-talk .tk-baton-st { font-size: 13px; color: var(--cx-text-2); overflow-wrap: anywhere; }
.cx-talk .tk-baton-offered { border-color: var(--cx-warn-line); } .cx-talk .tk-baton-offered .tk-baton-st { color: var(--cx-warn-text); }
.cx-talk .tk-baton-declined .tk-baton-st, .cx-talk .tk-baton-expired .tk-baton-st { color: var(--cx-danger); }
.cx-talk .tk-baton-g { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 4px 10px; margin: 0; font-size: 13px; }
.cx-talk .tk-baton-g dt { color: var(--cx-text-faint); } .cx-talk .tk-baton-g dd { margin: 0; color: var(--cx-text); overflow-wrap: anywhere; white-space: pre-wrap; }
/* the morning card on top of the Crew: a few lines in words, each with a link to its source */
.cx-morning { margin: 0 0 24px; padding: 14px 16px; border: 1px solid var(--cx-line); border-radius: 16px; background: var(--cx-card-bg); max-width: 760px; }
.cx-morning h2 { margin: 0 0 6px; font: 600 15px/1.3 var(--cx-font); color: var(--cx-text); }
.cx-morning ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.cx-morning li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; font-size: 14px; color: var(--cx-text-2); }
.cx-morning-k { flex: 0 0 auto; min-width: 190px; color: var(--cx-text-muted); }
.cx-morning-v { flex: 1 1 200px; min-width: 0; overflow-wrap: anywhere; }
.cx-main .cx-morning .cx-link { display: inline-flex; align-items: center; min-height: 28px; padding: 0; color: var(--cx-text); text-decoration: underline; text-underline-offset: 3px; font: inherit; }
.cx-main .cx-morning a.cx-link:focus-visible, .cx-main .cx-morning button.cx-link:focus-visible { outline: 2px solid var(--cx-focus); outline-offset: 2px; border-radius: 4px; }
/* card 767 part B: "Make a copy": a small form in the Crew card or under the agent's page header */
.cx-copy { display: grid; gap: 6px; padding: 12px; border: 1px solid var(--cx-line-btn); border-radius: 14px; background: var(--cx-bg); min-width: 0; }
.cx-prof + .cx-copy { max-width: 560px; margin: 0 0 16px; }
.cx-copy h3 { margin: 0; font: 600 14px/1.3 var(--cx-font); color: var(--cx-text); overflow-wrap: anywhere; }
.cx-copy label { font-size: 13px; font-weight: 500; color: var(--cx-text-2); }
.cx-copy input { width: 100%; min-height: 40px; box-sizing: border-box; padding: 0 12px; border: 1px solid var(--cx-line-btn); border-radius: 10px; background: var(--cx-field); color: var(--cx-text); font: inherit; }
.cx-copy input[aria-invalid="true"] { border-color: var(--cx-danger); }
.cx-copy p { margin: 0; font-size: 12.5px; line-height: 1.45; }
.cx-copy-err { color: var(--cx-danger); }
.cx-copy-a { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 2px; }
.cx-copy input:focus-visible { outline: 2px solid var(--cx-focus); outline-offset: 2px; }
/* card 767 part B: templates in the Studio's Personality section */
.cx-tpl { display: grid; gap: 10px; align-content: start; }
.cx-tpl h2, .cx-tpl h3 { margin: 0; font: 600 15px/1.3 var(--cx-font); } .cx-tpl h3 { font-size: 13px; margin-top: 4px; }
.cx-tpl p { margin: 0; }
.cx-tpl-new, .cx-tpl-i { display: grid; gap: 6px; min-width: 0; }
.cx-tpl-new label, .cx-tpl-i label { font-size: 13px; font-weight: 500; color: var(--cx-text-2); }
.cx-tpl-row { display: flex; flex-wrap: wrap; gap: 8px; }
.cx-tpl-row input { flex: 1 1 200px; min-width: 0; min-height: 40px; box-sizing: border-box; padding: 0 12px; border: 1px solid var(--cx-line-btn); border-radius: 10px; background: var(--cx-bg); color: var(--cx-text); font: inherit; }
.cx-tpl-row input:focus-visible { outline: 2px solid var(--cx-focus); outline-offset: 2px; }
.cx-tpl-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.cx-tpl-i { padding: 10px 12px; border: 1px solid var(--cx-line); border-radius: 12px; }
.cx-tpl-t { display: grid; gap: 2px; min-width: 0; } .cx-tpl-t b { font-weight: 600; overflow-wrap: anywhere; } .cx-tpl-t span { font-size: 12.5px; overflow-wrap: anywhere; }
.cx-tpl-a { display: flex; flex-wrap: wrap; gap: 8px; }
.cx-per-pre { margin: 6px 0 0; font-size: 12.5px; }
/* card 767 part B: "Hear it": a small pill under an agent's message and on the Studio stage; while it reads it says Stop */
.cx-talk .tk-hear, .cx-main .cx-hear { display: inline-flex; align-items: center; gap: 6px; min-height: 28px; padding: 0 10px; margin: 4px 0 0; border: 1px solid var(--cx-line-btn); border-radius: 999px;
  background: transparent; color: var(--cx-text-muted); font: 500 12.5px/1.2 var(--cx-font); cursor: pointer; width: fit-content; }
.cx-main .cx-hear { justify-self: center; margin: 0; }
.cx-talk .tk-hear:hover, .cx-main .cx-hear:hover { color: var(--cx-text); border-color: var(--cx-line-strong); }
.cx-talk .tk-hear[aria-pressed="true"], .cx-main .cx-hear[aria-pressed="true"] { color: var(--cx-text); border-color: var(--cx-text); background: var(--cx-raised); font-weight: 600; }
.cx-talk .tk-hear:focus-visible, .cx-main .cx-hear:focus-visible { outline: 2px solid var(--cx-focus); outline-offset: 2px; }
/* the Huddle button of a team room: it says how many agents it will wake, or why it cannot be pressed now */
.cx-main .cx-huddle-b { display: inline-flex; align-items: center; gap: 4px; flex: none; min-height: 38px; padding: 0 14px; border: 1px solid var(--cx-line-btn); border-radius: 999px; background: transparent;
  color: var(--cx-text); font: 400 13px/1.2 var(--cx-font); cursor: pointer; white-space: nowrap; }
.cx-main .cx-huddle-b b { font-weight: 600; } .cx-huddle-n { color: var(--cx-text-2); }
.cx-main .cx-huddle-b:hover:not(:disabled) { border-color: var(--cx-line-strong); background: var(--cx-raised); }
.cx-main .cx-huddle-b:disabled { cursor: default; color: var(--cx-text-muted); border-style: dashed; }
.cx-main .cx-huddle-b:disabled .cx-huddle-n { color: var(--cx-text-muted); }
.cx-main .cx-huddle-b:focus-visible { outline: 2px solid var(--cx-focus); outline-offset: 2px; }
@media (max-width: 767px) {
  .cx-main .cx-huddle-b { min-height: 44px; } .cx-chan-head { flex-wrap: wrap; row-gap: 6px; }
  .cx-copy input, .cx-main .cx-copy-a button { min-height: 44px; }
  .cx-talk .tk-hear, .cx-main .cx-hear, .cx-tpl-row input { min-height: 44px; }
  .cx-main .cx-morning .cx-link { min-height: 44px; } .cx-morning-k { min-width: 0; flex: 1 1 100%; }
  .cx-talk .tk-vb, .cx-talk .tk-nl-row button, .cx-talk .tk-nl-row input, .cx-talk .tk-hand-a button, .cx-talk .tk-hand-g select { min-height: 44px; }
  .cx-talk .tk-hand { margin: 0 12px 8px; width: auto; }
  .cx-talk .tk-hand-g { grid-template-columns: minmax(0, 1fr); gap: 4px; } .cx-talk .tk-hand-g label { padding-top: 6px; }
}

/* ---- card 770: the screens as the Crew Studio concept draws them ---- */
/* the morning card sits inside the Crew panel, beside the huddle */
.cx-crew-top .cx-morning { margin: 12px 0 0; padding: 0 8px; border: 0; background: none; max-width: none; }
.cx-crew-top .cx-morning li { font-size: 13.5px; }
.cx-crew-top .cx-morning-k { min-width: 170px; }
/* the light behind a large character, in its colour */
/* card 777: the default only where no colour class is set (:where has no weight, so .cr-c-* and .cr-d-* win); a soft round light */
:where(.cr-glow) { --cr-c: var(--cr-sand); }
.cx-crew-stage.cr-glow, .cx-bigstage.cr-glow, .tk-peek-stage.cr-glow { background: radial-gradient(closest-side circle at 50% 56%, color-mix(in srgb, var(--cr-c) 24%, transparent), transparent); }
.cx-crew-stage.cr-glow { height: 112px; }
/* what it is thinking, as a speech bubble under the character */
.cx-bubble { position: relative; margin: 2px 0 4px; padding: 8px 12px; border-radius: 12px; background: var(--cx-raised); color: var(--cx-text-2); font-size: 13px; line-height: 1.45; }
.cx-bubble::before { content: ""; position: absolute; top: -6px; left: 50%; width: 12px; height: 12px; margin-left: -6px; background: inherit; transform: rotate(45deg); border-radius: 2px; }
.cx-bubble .cx-crew-now { color: inherit; }
.cx-charline { margin: -4px 0 0; font-size: 12.5px; color: var(--cx-text-muted); }
/* the Studio: one row of sections; the agent's other pages as quiet links under it */
.cx-studio-more { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 12px; margin-top: -6px; font-size: 13px; }
.cx-main .cx-studio-more .cx-link { min-height: 28px; padding: 0; color: var(--cx-text-muted); font: inherit; }
.cx-main .cx-studio-more .cx-link.on, .cx-main .cx-studio-more .cx-link:hover { color: var(--cx-text); text-decoration: underline; text-underline-offset: 3px; }
/* Studio sections: the label above its field, no box around the form, large character choices */
.cx-studio-sec > .cx-look.cx-au-box { border: 0; padding: 0; background: none; display: grid; gap: 18px; }
.cx-studio-sec .cx-look-row { grid-template-columns: 1fr; gap: 6px; }
.cx-studio-sec .cx-look-l { padding-top: 0; font-size: 13px; font-weight: 500; color: var(--cx-text-muted); }
.cx-studio-sec .cx-look-chars { grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); gap: 10px; }
.cx-studio-sec .cx .cx-look-ch, .cx-studio-sec .cx-look-ch { justify-items: center; text-align: center; padding: 12px 8px; }
.cx-studio-sec .cx-look-ch .cx-av-xl { width: 64px; height: 64px; }
.cx-studio-sec .cx-look-ch.on { border-color: var(--cx-text); background: var(--cx-raised); }
/* the conversation header: the feeling (its reason on hover or tap) and what it is doing, on one line */
.tk-cx-head .tk-sub:has(.tk-feel-l) { display: flex; align-items: baseline; min-width: 0; }
.tk-feel-l { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* the profile panel: a large character in its light, the thought as a bubble, the numbers under it, the facts as rows */
.tk-peek-stage { display: grid; place-items: center; padding: 8px 26px; border-radius: 16px; }
.tk-peek-bubble { align-self: stretch; margin-top: 8px; text-align: left; }
.tk-peek-bubble .tk-peek-now { margin: 0; color: inherit; }
.tk-peek-info { align-self: stretch; text-align: left; margin-top: 8px; }
.tk-peek-acts { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 0; }
.tk-peek .tk-fact > span:last-child:not(:first-child) { flex: 1 1 auto; white-space: normal; }
/* card 767 part B: the Studio try-out: the situations, the agent's real reply as a bubble, then when and "Hear it" */
.cx-try { display: grid; gap: 8px; margin-top: 14px; }
.cx-try-say p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.cx-try-meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px; margin: 0; font-size: 12.5px; }
.cx-try-wait { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 13px; color: var(--cx-text-muted); }
.cx-dots { display: inline-flex; gap: 3px; } .cx-dots i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: .4; animation: cx-dot 1.2s ease-in-out infinite; }
.cx-dots i:nth-child(2) { animation-delay: .2s; } .cx-dots i:nth-child(3) { animation-delay: .4s; }
@keyframes cx-dot { 0%, 100% { opacity: .3; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .cx-dots i { animation: none; opacity: .7; } }
/* card 772: New team on the Crew */
.cx-nt { margin: 0 0 20px; padding: 16px 20px; border: 1px solid var(--cx-line); border-radius: 18px; background: var(--cx-card-bg); display: grid; gap: 12px; }
.cx-nt h2 { margin: 0; font: 600 16px/1.3 var(--cx-font); }
.cx-nt p { margin: 0; }
.cx-nt-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.cx-nt .cx-field { display: grid; gap: 6px; font-size: 13px; }
.cx-nt .cx-field label { color: var(--cx-text-muted); font-weight: 500; }
.cx-nt-m { margin: 0; padding: 0; border: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.cx-nt-m legend { padding: 0; margin-bottom: 6px; font-size: 13px; font-weight: 500; color: var(--cx-text-muted); }
.cx-nt-ag { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 12px 0 8px; border: 1px solid var(--cx-line); border-radius: 999px; font-size: 13px; cursor: pointer; }
.cx-nt-ag:has(input:checked) { border-color: var(--cx-text); background: var(--cx-raised); font-weight: 600; }
.cx-nt-lead { max-width: 360px; }
.cx-nt-a { display: flex; flex-wrap: wrap; gap: 8px; }
.cx-na-note { margin: 8px 0 0; font-size: 12.5px; text-align: center; }
@media (pointer: coarse) { .cx-nt-ag { min-height: 44px; } }
.cx-look-f input[data-na-name] { width: min(100%, 32ch); }
/* card 773: the help tiles (What it does) */
.cx-help { display: grid; gap: 8px; margin-bottom: 18px; }
.cx-help h2 { margin: 0; font: 600 15px/1.3 var(--cx-font); }
.cx-help p { margin: 0; }
.cx-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; }
.cx .cx-tile { display: grid; gap: 2px; justify-items: start; text-align: left; min-height: 64px; padding: 10px 12px; border: 1px solid var(--cx-line); border-radius: 12px;
  background: transparent; color: var(--cx-text); font: inherit; cursor: pointer; }
.cx .cx-tile span { font-size: 12.5px; color: var(--cx-text-muted); }
.cx .cx-tile b { font: 600 14px/1.3 var(--cx-font); }       /* card 777: not the large heading size it picked up */
.cx .cx-tile:hover { border-color: var(--cx-line-strong); }
.cx .cx-tile.on { border-color: var(--cx-text); background: var(--cx-raised); box-shadow: inset 0 0 0 1px var(--cx-text); }
.cx .cx-tile.on b::after { content: " Â· picked"; font-weight: 500; color: var(--cx-text-muted); }
/* card 774: per-agent permission switches (Freedom, One by one) */
.cx-perms { margin-top: 14px; }
.cx-perm-now { display: block; margin-top: 2px; font-size: 12.5px; color: var(--cx-text-2); }
.cx-perms .cx-rule-seg button { white-space: nowrap; }
@media (max-width: 767px) { .cx-perm { flex-wrap: wrap; } .cx-perms .cx-rule-seg { width: 100%; } }
/* card 777: with the profile panel open on a wide screen, the header's buttons stop at the panel instead of sliding under it */
@media (min-width: 1101px) { .cx-talk:has(.tk-aside.tk-peek) .tk-cx-head { padding-right: min(372px, 40%); } }
/* card 786: the charter an agent keeps itself (What it does) */
.cx-charter { display: grid; gap: 8px; margin-bottom: 18px; }
.cx-charter h2 { margin: 0; font: 600 15px/1.3 var(--cx-font); }
.cx-ch-text { white-space: pre-wrap; overflow-wrap: anywhere; padding: 12px 14px; border: 1px solid var(--cx-line); border-radius: 12px; background: var(--cx-card-bg); font-size: 14px; line-height: 1.5; }
.cx-ch-meta, .cx-charter p { margin: 0; }
.cx-charter textarea { width: 100%; box-sizing: border-box; min-height: 160px; font: inherit; }
.cx-ch-a { display: flex; gap: 8px; }

/* card 795: the Vault, on the Runs layout (a working column and a side panel for phone calls) */
.cx-vx .cx-runs-main { gap: 28px; }
.cx-vx-sec { display: flex; flex-direction: column; gap: 12px; }
.cx-vx-sec > h2, .cx-vx-form h2 { margin: 0; font-size: 15px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.cx-vx-sec > h2 .cx-muted { font-weight: 500; }
.cx-vx-needs ul, .cx-vx-rows, .cx-vx-log { list-style: none; margin: 0; padding: 0; }
.cx-vx-needs ul { border: 1px solid var(--cx-line); border-left: 3px solid var(--cx-st-needs); border-radius: 12px; }
.cx-vx-need { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 14px 16px; }
.cx-vx-need + .cx-vx-need { border-top: 1px solid var(--cx-line); }
.cx-vx-need-t { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cx-vx-need-t span { color: var(--cx-text-muted); font-size: 13px; }
.cx-vx-acts { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.cx-vx-acts button { min-height: 36px; }
.cx-vx-rows { border-top: 1px solid var(--cx-line); }
.cx-vx-row { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 14px; align-items: start; padding: 16px 0; border-bottom: 1px solid var(--cx-line); }
.cx-vx-ic { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--cx-raised); color: var(--cx-text-2); }
.cx-vx-main { min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.cx-vx-name { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.cx-vx-name b { font-size: 15px; }
.cx-vx-name .cx-mono { font-size: 12px; }
.cx-vx-vals { display: flex; flex-wrap: wrap; gap: 6px 22px; margin: 0; }
.cx-vx-vals div { display: flex; flex-direction: column; gap: 1px; }
.cx-vx-vals dt { font-size: 12px; color: var(--cx-text-muted); }
.cx-vx-vals dd { margin: 0; font-size: 13px; color: var(--cx-text); }
.cx-vx-meta { margin: 0; font-size: 12px; color: var(--cx-text-muted); }
.cx-vx-empty { border: 1px dashed var(--cx-line-btn); border-radius: 12px; padding: 22px; display: flex; flex-direction: column; gap: 14px; }
.cx-vx-empty p { margin: 0; color: var(--cx-text-2); }
.cx-vx-quick, .cx-vx-kinds { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.cx-main .cx-vx-quick button, .cx-main .cx-vx-kinds button { min-height: 64px; border-radius: 12px; display: flex; align-items: center; justify-content: flex-start; gap: 10px; padding: 0 14px; text-align: left; }
.cx-main .cx-vx-kinds button[aria-checked="true"] { border-color: var(--cx-accent); color: var(--cx-text); box-shadow: inset 0 0 0 1px var(--cx-accent); }
.cx-vx-form form { display: flex; flex-direction: column; gap: 16px; border: 1px solid var(--cx-line); border-radius: 14px; padding: 20px; max-width: 980px; }
.cx-vx-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.cx-vx-grid .cx-vx-wide { grid-column: 1 / -1; }
.cx-vx-grid label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--cx-text-2); }
.cx-vx-grid small { font-size: 12px; color: var(--cx-text-muted); }
.cx-vx-grid input { min-height: 40px; padding: 0 12px; border: 1px solid var(--cx-line-btn); border-radius: 10px; background: transparent; color: var(--cx-text); font: 14px var(--cx-font); min-width: 0; }
.cx-vx-grid input:focus-visible { outline: 2px solid var(--cx-accent); outline-offset: 1px; }
.cx-vx-pol { border: 0; margin: 0; padding: 0; display: flex; gap: 8px 22px; flex-wrap: wrap; font-size: 14px; }
.cx-vx-pol legend { font-size: 13px; color: var(--cx-text-2); margin-bottom: 8px; padding: 0; }
.cx-vx-pol label { display: flex; align-items: center; gap: 8px; }
.cx-vx-note { margin: 0; font-size: 13px; color: var(--cx-text-2); display: flex; gap: 8px; align-items: center; }
.cx-vx-fa { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.cx-vx-log li { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 0; font-size: 13px; border-bottom: 1px solid var(--cx-line); }
.cx-vx-log li .cx-muted { margin-left: auto; font-size: 12px; }
.cx-vx.cx-runs { grid-template-columns: 1fr; }
.cx-vx .cx-runs-main { border-right: 0; }
.cx-vx-phone { margin: 0; font-size: 13px; }
@media (max-width: 640px) { .cx-vx-grid { grid-template-columns: 1fr; } .cx-vx-need, .cx-vx-row { grid-template-columns: auto minmax(0, 1fr); } .cx-vx-need .cx-vx-acts, .cx-vx-row .cx-vx-acts { grid-column: 1 / -1; justify-content: flex-start; } }

/* card 802: background updates fold into one line */
.tk-bg { margin: 6px 0; font-size: 13px; color: var(--cx-text-muted); }
.tk-bg summary { cursor: pointer; display: inline-flex; align-items: center; gap: 8px; list-style: none; padding: 4px 10px; border: 1px solid var(--cx-line); border-radius: 999px; }
.tk-bg summary::-webkit-details-marker { display: none; }
.tk-bg summary time { font-size: 12px; }
.tk-bg ul { margin: 8px 0 0; padding: 0 0 0 4px; list-style: none; display: flex; flex-direction: column; gap: 8px; border-left: 2px solid var(--cx-line); }
.tk-bg li { padding-left: 10px; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--cx-text-2); }
.tk-bg li b { color: var(--cx-text); font-weight: 600; }

/* card 808: nobody looking (hidden tab, or 45 s without a touch): every animation rests, so the GPU and the battery do too */
html.cx-still *, html.cx-still *::before, html.cx-still *::after { animation-play-state: paused !important; }

/* card 815: phone fixes. iOS Safari zooms in on any field under 16px and stays zoomed (the page then slides sideways), the address bar and
   the keyboard hide the composer under 100vh, taps waited for a double-tap check, Copy boxes sat over every message, a chat lost a
   strip of screen to page padding and the tab bar */
html.cx-app, html.cx-app body { -webkit-tap-highlight-color: transparent; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
.cx button, .cx a, .cx summary, .cx [role=button], .cx label, .cx input, .cx select, .cx textarea, .tkv button { touch-action: manipulation; }
@media (max-width: 767px) {
  html.cx-app, html.cx-app body { height: var(--cx-vvh, 100dvh); overflow: hidden; overscroll-behavior: none; }
  /* the page itself never moves: on iOS Safari a hidden-overflow page still drags and bounces when a touch starts on the header or the
     tab bar (the whole app "floats"); a fixed body cannot be dragged, only the screen's own content scrolls */
  html.cx-app body { position: fixed; top: var(--cx-vvt, 0px); left: 0; width: 100%; }
  .cx { height: 100%; min-height: 0; }
  .cx-shell { height: 100%; padding-top: env(safe-area-inset-top); padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right); box-sizing: border-box; }
  .cx-main { -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
  .cx input:not([type=checkbox]):not([type=radio]):not([type=range]), .cx select, .cx textarea, .tkv input, .tkv textarea, .tkv select { font-size: 16px !important; }
  /* the screen buttons scroll sideways without a scrollbar; the fading edge says there is more */
  .cx-rail { scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); scroll-snap-type: x proximity; }
  .cx-rail::-webkit-scrollbar { display: none; }
  .cx-rail button { scroll-snap-align: start; }
  /* an open chat is a full screen: Back leads out, so the tab bar and the page padding give their room to the messages */
  .cx-shell:has(.tk-conv-on) { grid-template-rows: minmax(0, 1fr); }
  .cx-shell:has(.tk-conv-on) > .cx-tabbar { display: none; }
  .cx-main:has(.tk-conv-on) { padding: 0; overflow: hidden; }
  .cx-talk.tkv.tk-conv-on, .cx-talk.tkv.tk-conv-on .tk-pane, .cx-talk.tkv.tk-conv-on #tk-panein { height: 100%; min-height: 0; max-height: none; }
  .cx-talk.tkv.tk-conv-on .tk-pane { border: 0; border-radius: 0; }
  .cx-talk .tk-comp { padding-bottom: max(10px, env(safe-area-inset-bottom)); }
  .tk-log { overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
  /* a room keeps the tab bar; its feed and composer use the whole height without the page's bottom padding */
  .cx-main:has(.cx-chan) { padding-bottom: 0; }
  .cx-studio-more .cx-link { min-height: 44px; padding: 0 10px; }
  .cx-tab { min-height: 48px; }
}
/* a touch screen has no hover: Copy shows on the message just tapped, as a small button in the message's corner */
@media (hover: none) {
  .tk-copy { position: absolute; top: -10px; right: 0; opacity: 0; pointer-events: none; min-height: 32px; }
  .tk-msg { display: block; }
  .tk-msg.tk-sel > .tk-copy, .tk-copy.done { opacity: 1; pointer-events: auto; position: static; display: flex; width: max-content; margin: 0 0 6px auto; }
  .tk-msg.tk-sel { background: color-mix(in srgb, var(--cx-accent) 8%, transparent); border-radius: 10px; }
}

/* card 823: an agent's own proposals, each a full-width button that reads as an answer (not a yes/no) */
.tk-apv-ops, .cx-apv2-ops { display: flex; flex-direction: column; gap: 8px; padding: 12px 16px 0; }
.cx-apv2-ops { padding: 16px 20px 0; }
.tk-apv-op, .cx-apv2-ops button { display: block; width: 100%; text-align: left; min-height: 44px; padding: 10px 14px; border: 1px solid var(--cx-line-btn);
  border-radius: 12px; background: var(--cx-panel); color: var(--cx-text); font: inherit; line-height: 1.4; cursor: pointer; overflow-wrap: anywhere; }
.tk-apv-op:hover, .cx-apv2-ops button:hover, .tk-apv-op:focus-visible, .cx-apv2-ops button:focus-visible { border-color: var(--cx-accent); }
.cx-talk .tk-apv-a .tk-apv-own { border: 0; padding: 0 4px; color: var(--cx-accent); }
.tk-apv-opl { margin: 10px 16px 0; padding-left: 20px; color: var(--cx-text-2); }
.tk-apv-old .tk-apv-ops { display: none; }

/* card 835: shared files open in a viewer over the chat; a window by default, the whole screen when maximised (remembered) */
.tk-mtile, .cx-main .tk-mtile { position: relative; display: block; min-height: 0; padding: 0; border: 0; background: none; cursor: zoom-in; border-radius: 14px; max-width: 100%; width: fit-content; }
.tk-mtile:focus-visible { outline: 2px solid var(--cx-text); outline-offset: 2px; }
.tk-mvid, .cx-main .tk-mvid { cursor: pointer; }
.tk-mvid video { pointer-events: none; }
.tk-mplay { position: absolute; inset: 0; margin: auto; width: 52px; height: 52px; display: grid; place-items: center; border-radius: 50%; background: rgba(10, 11, 13, .72); color: #fff; transition: transform .15s ease-out; }
.tk-mvid:hover .tk-mplay, .tk-mvid:focus-visible .tk-mplay { transform: scale(1.08); }
button.tk-doc, .cx-main button.tk-doc { font: inherit; text-align: left; cursor: pointer; width: 100%; min-height: 0; padding: 10px 14px; border: 1px solid var(--cx-line-2); border-radius: 14px; background: var(--cx-side); color: inherit; }
.tk-media-cap .tk-link, .cx-main .tk-media-cap .tk-link { min-height: 0; border-radius: 0; font: inherit; padding: 0; border: 0; background: none; color: var(--cx-text-2); text-decoration: underline; cursor: pointer; }
.cx-viewer { width: min(1100px, 92vw); height: min(780px, 88dvh); max-width: none; max-height: none; padding: 0; border: 1px solid var(--cx-line-strong); border-radius: 14px;
  background: var(--cx-bg); color: var(--cx-text); font-family: var(--cx-font); display: none; flex-direction: column; overflow: hidden; color-scheme: dark; }
[data-theme=light] .cx-viewer { color-scheme: light; }
.cx-viewer[open] { display: flex; }
.cx-viewer.max { width: 100vw; height: 100dvh; border: 0; border-radius: 0; }
.cx-viewer::backdrop { background: rgba(0, 0, 0, .66); }
.cx-viewer-h { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 16px; border-bottom: 1px solid var(--cx-line); flex: none; user-select: none; }
.cx-viewer-n { font-size: 14px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.cx-viewer-s { font-size: 12px; color: var(--cx-text-muted); flex: none; }
.cx-viewer-a { margin-left: auto; display: flex; gap: 4px; flex: none; }
.cx-viewer-b { width: 40px; height: 40px; display: grid; place-items: center; border: 0; border-radius: 10px; background: none; color: var(--cx-text-2); cursor: pointer; }
.cx-viewer-b:hover, .cx-viewer-b:focus-visible { background: var(--cx-raised); color: var(--cx-text); }
.cx-viewer-b:focus-visible { outline: 2px solid var(--cx-text); outline-offset: -2px; }
.cx-viewer-body { position: relative; flex: 1; min-height: 0; background: #000; overflow: auto; }
.cx-viewer-body video, .cx-viewer-body img, .cx-viewer-body iframe { position: absolute; inset: 0; display: block; }
.cx-viewer-body video { width: 100%; height: 100%; object-fit: contain; }
.cx-viewer-body img { margin: auto; max-width: 100%; max-height: 100%; object-fit: contain; cursor: zoom-in; }
.cx-viewer.zoom .cx-viewer-body img { position: static; margin: 0; max-width: none; max-height: none; cursor: zoom-out; }
.cx-viewer-body iframe { width: 100%; height: 100%; border: 0; background: #fff; }
.cx-viewer-body > p { position: absolute; inset: 0; margin: auto; height: fit-content; text-align: center; }
.cx-viewer-wait { color: #c9c9ce; font-size: 14px; }
@media (max-width: 640px) { .cx-viewer { width: 100vw; height: 100dvh; border: 0; border-radius: 0; } }
@media (prefers-reduced-motion: reduce) { .tk-mplay { transition: none; } }

/* card 835: the message toolbar and reactions. One solid toolbar over the message's top edge on hover or keyboard focus (a tap on a
   touch screen): four reactions, More (a popover of all ten: nothing in the chat moves), Copy. Every state sets its own background and
   colour: the generic .cx-main button rules (transparent, or a light hover) never apply here. */
.tk-tools { position: absolute; top: -18px; right: 8px; z-index: 2; display: flex; align-items: center; gap: 2px; padding: 3px;
  border: 1px solid var(--cx-line-btn); border-radius: 10px; background: var(--cx-raised); box-shadow: 0 4px 14px rgb(0 0 0 / 0.28);
  opacity: 0; pointer-events: none; transition: opacity 0.12s; }
.tk-tools:focus-within, .tk-tools.open, .tk-msg.tk-sel > .tk-tools { opacity: 1; pointer-events: auto; }
/* Kabil 15 Nov: on a touch screen :hover fires as a finger lands, so the bar popped over the text at the start of every scroll; there a
   deliberate tap on the message opens it (card 815), and hover only opens it where there is a real pointer */
@media (hover: hover) { .tk-msg:hover > .tk-tools { opacity: 1; pointer-events: auto; } }
/* your own messages sit on the right: their tools open toward the middle, never past the screen's edge (they take room even while hidden) */
.cx-talk .tk-human .tk-tools { left: auto; right: 8px; }
.cx-main .tk-tools button, .cx-main .tk-rx-pick button { display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-width: 32px; min-height: 30px;
  padding: 0 6px; margin: 0; border: 0; border-radius: 7px; background: transparent; color: var(--cx-text-2); font: inherit; font-size: 16px; line-height: 1;
  cursor: pointer; box-shadow: none; position: static; opacity: 1; pointer-events: auto; }
.cx-main .tk-tools .tk-copy { font-size: 12px; padding: 0 8px; }
.cx-main .tk-tools button:hover, .cx-main .tk-rx-pick button:hover { background: color-mix(in srgb, var(--cx-text) 12%, var(--cx-raised)); color: var(--cx-text); }
.cx-main .tk-tools button.on, .cx-main .tk-rx-pick button.on { background: color-mix(in srgb, var(--cx-accent) 26%, var(--cx-raised)); color: var(--cx-text); }
.cx-main .tk-tools .tk-copy.done { color: var(--cx-accent-hi); }
.cx-main .tk-tools button:focus-visible, .cx-main .tk-rx-pick button:focus-visible { outline: 2px solid var(--cx-focus); outline-offset: 1px; }
.tk-sep { width: 1px; align-self: stretch; margin: 4px 2px; background: var(--cx-line-btn); }
.tk-rx-pick { position: absolute; top: 18px; right: 8px; z-index: 3; display: grid; grid-template-columns: repeat(5, auto); gap: 2px; padding: 6px;
  border: 1px solid var(--cx-line-btn); border-radius: 12px; background: var(--cx-raised); box-shadow: 0 8px 24px rgb(0 0 0 / 0.32); }
.cx-main .tk-rx-pick button { min-width: 38px; min-height: 36px; font-size: 19px; }
.cx-talk .tk-human .tk-rx-pick { right: auto; left: 8px; }
/* the reactions a message has: chips under it */
.tk-rx { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.cx-main .tk-rx-chip { display: inline-flex; align-items: center; gap: 5px; min-height: 28px; padding: 0 9px; border: 1px solid var(--cx-line-btn); border-radius: 999px;
  background: var(--cx-raised); color: var(--cx-text-2); font: inherit; font-size: 14px; line-height: 1; cursor: pointer; animation: tk-rx-pop 0.18s ease-out; }
.cx-main .tk-rx-chip .tk-rx-n { font-size: 12px; font-variant-numeric: tabular-nums; }
.cx-main .tk-rx-chip:hover { background: color-mix(in srgb, var(--cx-text) 12%, var(--cx-raised)); border-color: var(--cx-line-strong); color: var(--cx-text); }
.cx-main .tk-rx-chip.on { background: color-mix(in srgb, var(--cx-accent) 20%, var(--cx-raised)); border-color: var(--cx-accent); color: var(--cx-text); }
.cx-main .tk-rx-chip.on:hover { background: color-mix(in srgb, var(--cx-accent) 30%, var(--cx-raised)); }
.cx-main .tk-rx-chip:focus-visible { outline: 2px solid var(--cx-focus); outline-offset: 2px; }
@keyframes tk-rx-pop { from { transform: scale(0.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@media (hover: none) {
  .tk-tools { top: -22px; }
  .cx-main .tk-tools button, .cx-main .tk-rx-chip { min-height: 40px; min-width: 40px; }
  .cx-main .tk-rx-pick button { min-height: 44px; min-width: 44px; }
}
@media (max-width: 640px) { .tk-rx-pick { grid-template-columns: repeat(5, 44px); } }
@media (prefers-reduced-motion: reduce) { .tk-tools { transition: none; } .cx-main .tk-rx-chip { animation: none; } }

/* card 835: the team's quiet hours are changed in place (change, turn off, back to the default) */
.cx-pill.cx-pill-on { border-color: color-mix(in srgb, var(--cx-accent) 45%, transparent); color: var(--cx-accent-hi); background: color-mix(in srgb, var(--cx-accent) 12%, transparent); }
.cx-rule-qh > div:first-child { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cx-au-qh-acts { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 6px; }
.cx-au-qh-acts .cx-link { min-height: 32px; }
.cx-au-qh { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.cx-au-qh label { font-size: 13px; font-weight: 500; color: var(--cx-text); }
.cx-main .cx-au-qh .cx-au-cap { width: 100%; }
.cx-main .cx-au-qh .cx-au-cap input[type=text] { flex: 1; min-width: 0; width: auto; }

/* card 835: roles and rules (Settings) */
.cx-roleln { display: flex; align-items: center; gap: 8px 16px; padding: 12px 0; border-bottom: 1px solid var(--cx-line); }
.cx-roleln > span:first-child { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.cx-roleln b { font-weight: 600; font-size: 13px; }
.cx-roleln .cx-muted { font-size: 12px; }
.cx-roleln > select { flex: 0 0 180px; width: 180px; }
.cx-roleln > .cx-muted:last-child { flex: 0 1 auto; max-width: 45%; text-align: right; }
@media (max-width: 767px) { .cx-roleln { flex-wrap: wrap; } .cx-roleln > select, .cx-roleln > .cx-muted:last-child { flex: 1 1 100%; width: 100%; text-align: left; } }
.cx-role-add { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 4px; }
.cx-role-add input { flex: 1 1 140px; min-width: 0; }
.cx-role-add select { flex: 0 1 150px; min-width: 0; }
.cx-role-add button { flex: 0 0 auto; }
.cx-rules-h { margin: 16px 0 6px; font: 600 13px/1.3 var(--cx-font); }
.cx-rules { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.cx-rules li { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 13px; padding: 6px 0; border-bottom: 1px solid var(--cx-line); }

/* card 835: the chat header. The face on the left; the name and one status line stacked beside it, both starting at the same edge;
   the actions centred on the right. The face and the name open the profile panel (the face is a pointer target only, one tab stop). */
.cx-talk .tk-cx-head .tk-id { display: flex; align-items: center; gap: 12px; min-width: 0; }
.cx-talk .tk-idf { flex: none; display: inline-flex; align-items: center; justify-content: center; padding: 0; margin: 0; min-height: 0; border: 0; border-radius: 14px;
  background: transparent; cursor: pointer; line-height: 0; }
.cx-talk .tk-idf:hover, .cx-talk .tk-id:has(.tk-idb[aria-expanded=true]) .tk-idf { background: var(--cx-raised); }
.cx-talk .tk-cx-head .tk-idt { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 0; flex: 1 1 auto; }
.cx-talk .tk-cx-head .tk-h { margin: 0; font: 600 16px/1.3 var(--cx-font); min-width: 0; max-width: 100%; }
.cx-talk .tk-idb { min-height: 0; padding: 0; margin: 0; border-radius: 6px; font: inherit; max-width: 100%; }
.cx-talk .tk-idb:hover, .cx-talk .tk-idb[aria-expanded=true] { background: transparent; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--cx-line-strong); }
.cx-talk .tk-cx-head .tk-sub { display: flex; align-items: baseline; min-width: 0; max-width: 100%; white-space: nowrap; }
.cx-talk .tk-cx-head .tk-sub .cr-feel { margin-left: 0; padding: 0; min-height: 0; }
.cx-talk .tk-cx-head .tk-sub .cr-feel::before { content: none; }
.cx-talk .tk-cx-head .tk-sub .cr-feelw { margin-left: 0; flex: none; }
.cx-talk .tk-cx-head .tk-hact { flex: none; flex-wrap: nowrap; }

/* the conversation never drags sideways on a phone: wide content (code, tables, long links) scrolls inside its own message */
.cx-talk .tk-log, .cx-chan-feed { overflow-x: hidden; }
.cx-talk .tk-msg pre, .cx-talk .tk-msg table, .cx-chan .tk-msg pre, .cx-chan .tk-msg table { display: block; max-width: 100%; overflow-x: auto; }
.cx-talk .tk-msg, .cx-chan .tk-msg { min-width: 0; max-width: 100%; }

/* Approvals on a phone: every choice full width, the decision first, the link on its own line */
@media (max-width: 640px) {
  .cx-apv2-a { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .cx-apv2-a > button { width: 100%; min-width: 0; justify-content: center; text-align: center; }
  .cx-apv2-a > .cx-grow { display: none; }
  .cx-apv2-a > a { justify-self: start; padding: 6px 0; }
}

/* card 835 (Kabil: "the sidebar has too many informations, simplify it and the way to use it"): the crew drawing with one line, the
   screens as an even two-column list with their icons, each team headed by its own room and folded away on demand, a word beside an
   agent only when it asks for a look, and one quiet footer line. Wide screens only: the phone keeps its top strip and tab bar. */
@media (min-width: 768px) {
  .cx-rail { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 4px; margin: 0; }
  .cx-rail button { width: 100%; justify-content: flex-start; gap: 8px; min-height: 32px; padding: 0 8px; }
  .cx-rail .cx-i { display: inline-block; flex: none; width: 16px; height: 16px; color: var(--cx-text-faint); }
  .cx-rail button:hover .cx-i, .cx-rail button.on .cx-i { color: var(--cx-text); }
  .cx-rail .cx-nav-l { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; }
  .cx-rail .cx-badge { margin-left: auto; }
  .cx-crewb-t { align-items: center; }
  .cx-crewb-t .cx-crewb-l { font-size: 12px; text-align: right; }
}
.cx-side-th { display: flex; align-items: center; gap: 0; }
.cx-side-tm + .cx-side-tm, .cx-side-sec + .cx-side-tm { margin-top: 6px; }
.cx-side-th > .cx-side-ch { flex: 1 1 auto; min-width: 0; padding-left: 4px; }
.cx-side-fold { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 32px; min-height: 0; padding: 0; margin: 0;
  border: 0; border-radius: 8px; background: transparent; color: var(--cx-text-faint); cursor: pointer; }
.cx-side-fold:hover { color: var(--cx-text); background: var(--cx-raised); }
.cx-side-fold:focus-visible { outline: 2px solid var(--cx-focus); outline-offset: 1px; }
.cx-side-fold .cx-i { transition: transform 0.15s ease; }
.cx-side-fold[aria-expanded="true"] .cx-i { transform: rotate(90deg); }
.cx-side-tn { flex: 1 1 auto; min-width: 0; padding: 0 4px; font: 500 14px/1.2 var(--cx-font); color: var(--cx-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cx-side-alert { flex: none; display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 5px; margin: 0 8px 0 4px;
  border-radius: 9px; background: var(--cx-warn-bg); color: var(--cx-warn-text); font: 600 11px/1 var(--cx-font); box-sizing: border-box; }
.cx-side-tm .cx-side-team { margin-left: 23px; }
.cx-spend-t { padding: 0; min-height: 28px; border: 0; background: transparent; color: var(--cx-text-faint); font: inherit; cursor: pointer; }
.cx-spend-t:hover { color: var(--cx-text); text-decoration: underline; text-underline-offset: 3px; }
.cx-spend-t:focus-visible { outline: 2px solid var(--cx-focus); outline-offset: 2px; border-radius: 4px; }
.cx-foot-btn .cx-i { flex: none; }
.cx-foot-health:not(.bad):not(.on) { color: var(--cx-text-faint); }
@media (prefers-reduced-motion: reduce) { .cx-side-fold .cx-i { transition: none; } }
.cx-foot-nav .cx-foot-btn { white-space: nowrap; min-width: 0; }
.cx-foot-health { flex: 1 1 auto; min-width: 0; }
.cx-foot-health span:last-child { overflow: hidden; text-overflow: ellipsis; }
.cx-foot-nav .cx-live { flex: none; font-size: 11px; }
@media (min-width: 768px) { .cx-rail .cx-narrow-only { display: none !important; } }
.cx-side-rest { flex: none; min-height: 0; height: 24px; padding: 0 8px; margin: 0 4px 0 2px; border: 0; border-radius: 999px; background: transparent;
  color: var(--cx-text-faint); font: 500 12px/1 var(--cx-font); cursor: pointer; }
.cx-side-rest:hover { background: var(--cx-raised); color: var(--cx-text); }
.cx-side-rest:focus-visible { outline: 2px solid var(--cx-focus); outline-offset: 1px; }
.cx-side-foot { gap: 0; padding-top: 8px; }
.cx-foot-nav { display: flex; align-items: center; gap: 0; margin: 0 -8px; }
.cx-foot-nav .cx-foot-btn { flex: none; min-height: 32px; padding: 0 8px; }
.cx-foot-nav .cx-foot-health { flex: none; margin-left: auto; }
.cx-foot-nav .cx-foot-health.bad { flex: 0 1 auto; color: var(--cx-danger); }
.cx-foot-nav .cx-live:empty { display: none; }
/* something is wrong: the health note takes its own line above the footer links, in full */
.cx-foot-nav { flex-wrap: wrap; }
.cx-foot-nav .cx-foot-health.bad { order: -1; flex: 1 1 100%; justify-content: flex-start; margin-left: 0; }

/* Settings > Notifications: this device first (its state and one clear action), then what to hear about as switches */
.cx-nf-here { display: flex; align-items: center; gap: 12px; padding: 14px; margin: 12px 0 4px; border: 1px solid var(--cx-line-2); border-radius: 14px; background: var(--cx-card-bg, transparent); }
.cx-nf-ic { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 10px; background: var(--cx-raised); color: var(--cx-text-faint); }
.cx-nf-ic.on { background: color-mix(in srgb, var(--cx-ember) 18%, transparent); color: var(--cx-ember); }
.cx-nf-t { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.cx-nf-t b { font-weight: 600; font-size: 14px; }
.cx-nf-t .cx-muted { font-size: 13px; }
.cx-nf-act { flex: none; display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.cx-nf-note { margin: 8px 2px 0; font-size: 13px; color: var(--cx-text-muted); }
.cx-nf-list { display: flex; flex-direction: column; }
.cx-nf-row { display: flex; align-items: center; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--cx-line); cursor: pointer; }
.cx-nf-row:last-child { border-bottom: 0; }
.cx-nf-rt { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.cx-nf-rt b { font-weight: 500; font-size: 14px; }
.cx-nf-rt .cx-muted { font-size: 12px; }
.cx-nf-q { flex: none; display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--cx-text-muted); }
.cx-main .cx-nf-q input[type=time] { width: auto; min-height: 32px; padding: 0 8px; }
.cx-nf-devs { margin: 10px 0 0; font-size: 12px; }
/* a switch: the native checkbox, drawn as a track and a knob (keyboard and screen readers keep the checkbox) */
.cx .cx-sw { appearance: none; -webkit-appearance: none; flex: none; position: relative; width: 40px; height: 24px; margin: 0; border-radius: 999px;
  background: var(--cx-line-strong); cursor: pointer; transition: background 0.15s ease; }
.cx .cx-sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--cx-white, #fff);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3); transition: transform 0.15s ease; }
.cx .cx-sw:checked { background: var(--cx-ember); }
.cx .cx-sw:checked::after { transform: translateX(16px); }
.cx .cx-sw:focus-visible { outline: 2px solid var(--cx-focus); outline-offset: 2px; }
.cx .cx-sw:disabled { opacity: 0.5; cursor: default; }
@media (max-width: 640px) { .cx-nf-here { flex-wrap: wrap; } .cx-nf-act { flex: 1 1 100%; justify-content: stretch; } .cx-nf-act button { flex: 1 1 0; } .cx-nf-q input[type=time] { max-width: 96px; } }
@media (prefers-reduced-motion: reduce) { .cx .cx-sw, .cx .cx-sw::after { transition: none; } }

/* ---------------------------------------------------------------- the phone, like an app (Kabil: "the phone ux still feel basic and limited")
   A title bar per screen with a search button; five tabs (Chat, Approvals, Crew, Desktop, More); the chat inbox with faces and every
   agent one tap away; the crew as compact rows; More lists the rest with what each is for. Wide screens are unchanged. */
.cx-ptitle { display: none; }
@media (max-width: 767px) {
  .cx-side { flex-wrap: nowrap; gap: 8px; padding: 6px 12px 6px 16px; min-height: 52px; box-sizing: border-box; }
  .cx-ptitle { display: flex; align-items: center; gap: 2px; flex: 1 1 auto; min-width: 0; font: 650 20px/1.2 var(--cx-font); letter-spacing: -0.01em; color: var(--cx-text); }
  .cx-ptitle span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .cx-pback { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 40px; margin-left: -10px; padding: 0; border: 0; background: transparent; color: var(--cx-text-muted); cursor: pointer; }
  .cx-pback .cx-i { transform: rotate(180deg); }
  .cx-jump-btn { flex: none; width: 40px; min-width: 40px; min-height: 40px; height: 40px; padding: 0; justify-content: center; border-radius: 50%; }
  .cx-jump-btn .cx-i { display: inline-block; }
  .cx-jump-btn span, .cx-jump-btn kbd { display: none; }
  .cx-side .cx-rail { display: none; }
  /* the title is in the bar: the page's own big heading and its line would say it twice */
  .cx-hero .cx-hero-t { display: none; }
  .cx-hero { margin-bottom: 12px; }
  .tk-pick-h, .tk-pick > p { display: none; }
  .cx-tab { min-width: 0; }
  .cx-tab span { white-space: nowrap; }
}

/* More: a calm list, one line of purpose each */
.cx-more { max-width: 640px; margin: 0 auto; }
.cx-more-sum { margin: 4px 2px 14px; font-size: 14px; color: var(--cx-text-muted); }
.cx-more-l { list-style: none; margin: 0; padding: 0; border: 1px solid var(--cx-line-2); border-radius: 16px; overflow: hidden; }
.cx-more-l li + li { border-top: 1px solid var(--cx-line); }
.cx-main .cx-more-i { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 64px; padding: 10px 14px; border: 0; border-radius: 0; background: transparent; color: var(--cx-text); text-align: left; font: inherit; cursor: pointer; }
.cx-main .cx-more-i:hover, .cx-main .cx-more-i:active { background: var(--cx-raised); }
.cx-more-ic { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 10px; background: var(--cx-raised); color: var(--cx-text-2); }
.cx-more-i.bad .cx-more-ic { color: var(--cx-danger); }
.cx-more-t { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.cx-more-t b { font-weight: 600; font-size: 15px; }
.cx-more-t span { font-size: 13px; color: var(--cx-text-faint); }
.cx-more-i > .cx-i:last-child { flex: none; color: var(--cx-text-faint); }
.cx-more-v { margin: 16px 2px 0; font-size: 12px; }

/* the chat inbox: a face, the name and time, the last line, the state */
.cx-talk .tk-item { display: flex; align-items: flex-start; gap: 12px; text-align: left; }
.cx-talk .tk-item-av { flex: none; display: inline-flex; width: 40px; height: 40px; align-items: center; justify-content: center; }
.cx-talk .tk-item-av .tk-av, .cx-talk .tk-item-av svg { width: 40px; height: 40px; }
.cx-talk .tk-av-room { display: inline-flex; align-items: center; justify-content: center; border-radius: 12px; background: var(--cx-raised); color: var(--cx-text-muted); font: 600 18px/1 var(--cx-font); }
.cx-talk .tk-item-b { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.cx-talk .tk-item-new .tk-ttl { color: var(--cx-text-faint); }
@media (max-width: 767px) {
  .cx-talk form.tk-new { display: none; }
  .cx-talk .tk-item { min-height: 64px; padding: 10px 4px; }
  .cx-talk .tk-pick { padding: 4px 0 0; text-align: left; }
  .cx-talk .tk-pick-list { max-width: none; }
}

/* the crew on a phone: one compact row per agent (face, name, what it is doing, Talk); its page has the rest */
@media (max-width: 640px) {
  .cx-main .cx-agcard.cx-crew-card { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; grid-template-areas: "stage id act" "stage st act" "stage now act"; align-items: center;
    gap: 0 12px; padding: 10px 12px; min-height: 0; position: relative; }
  .cx-crew-card .cx-crew-stage { grid-area: stage; width: 52px; height: 52px; border-radius: 14px; }
  .cx-crew-card .cx-crew-stage svg { width: 52px; height: 52px; }
  .cx-crew-card .cx-ag-id { grid-area: id; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
  .cx-crew-card .cx-ag-id h2 { font-size: 15px; margin: 0; }
  .cx-crew-card .cx-bubble { grid-area: now; margin: 0; padding: 0; border: 0; background: transparent; box-shadow: none; }
  .cx-crew-card .cx-bubble::before, .cx-crew-card .cx-bubble::after { display: none; }
  .cx-crew-card .cx-crew-now { margin: 0; font-size: 12px; color: var(--cx-text-faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .cx-crew-card .cx-charline, .cx-crew-card .cr-info, .cx-crew-card .cx-ag-meta, .cx-crew-card .cx-lead-tag { display: none; }
  .cx-crew-card .cx-crew-st { grid-area: st; margin: 0; padding: 0; font-size: 12px; text-align: left; justify-content: flex-start; }
  .cx-crew-card .cx-crew-st .cx-pill { padding: 0; background: transparent; font-size: 12px; }
  .cx-crew-card .cx-ag-id h2 button { text-align: left; padding: 0; }
  .cx-crew-card .cx-ag-id { justify-content: flex-start; text-align: left; align-items: flex-start; }
  .cx-main .cx-agcard.cx-crew-card .cx-ag-act { grid-area: act; margin: 0; padding: 0; }
  .cx-main .cx-crew-card .cx-ag-act button:not(.cx-primary) { display: none; }
  .cx-main .cx-crew-card .cx-ag-act .cx-primary { min-height: 36px; padding: 0 14px; }
  .cx-crew-card .cx-ag-more { position: static; grid-area: act; justify-self: end; align-self: start; margin: -6px -6px 0 0; display: none; }
  .cx-crew-cards { gap: 8px; }
}

@media (max-width: 767px) {
  .cx-more-v .cx-ver { display: inline; }
  /* the Crew page's top on a phone: search and filter on one line, New agent as a small button; New team lives on the desktop */
  .cx-main .cx-hero-act { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
  .cx-main .cx-hero-act .cx-search { flex: 1 1 100%; }
  .cx-main .cx-hero-act [data-cx="new-team"] { display: none; }
  .cx-main .cx-hero-act .cx-primary[data-cx="new-agent"] { margin-left: auto; }
  .cx-crew-top .cx-ag-sum { display: none; }
}
@media (max-width: 640px) {
  .cx-crew-card .cx-crew-stage { display: flex; align-items: center; justify-content: center; overflow: hidden; align-self: center; }
  .cx-crew-card .cx-crew-stage .cr-stage { display: flex; width: 52px; height: 52px; align-items: center; justify-content: center; }
  .cx-crew-card .cx-crew-stage .cr-stage svg { width: 50px; height: 50px; }
  /* a team's header: its name and a small Open room on one line (the description is in the room) */
  .cx-crew-teams .cx-crew-th { flex-wrap: nowrap; align-items: center; justify-content: space-between; gap: 12px; }
  .cx-crew-teams .cx-crew-th p { display: none; }
  .cx-crew-th h2 { margin: 0; font-size: 15px; }
  .cx-main .cx-crew-th button { min-height: 32px; padding: 0 12px; font-size: 13px; }
}
/* Settings > Connected apps: the connector address, then each connected app with Revoke */
.cx-mcp-url { overflow-wrap: anywhere; }
.cx-mcp-row { cursor: default; }
.cx-mcp-row .cx-danger { flex: none; }
.cx-mcp-none { margin: 10px 0 0; font-size: 13px; }

/* Kabil 15 Nov ("the text overflow and i can't scroll", main chat screen on the phone):
   the chat list is a grid whose one column grew to the longest preview line (827 px on a 375 px phone), so every row ran off the
   screen; and on a phone nothing above the list could scroll (the body is fixed, the main area clips), so a crew longer than one
   screen was stuck. The column now fits the screen and previews end in an ellipsis; the list scrolls on its own. */
.cx-talk .tk-items { grid-template-columns: minmax(0, 1fr); }
.cx-talk .tk-items > li, .cx-talk .tk-item { min-width: 0; max-width: 100%; }
.cx-talk .tk-item-b > *, .cx-talk .tk-st { min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 767px) {
  .cx-talk .tk-pick { flex: 1 1 auto; align-self: stretch; min-height: 0; max-height: 100%; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
}

/* Kabil 15 Nov: navigation on the phone.
   - The tab you are on is plain to see: its icon sits in an ember pill, its label is bright and bold.
   - A tap answers at once (a press state, no double-tap-zoom wait), even while the next screen is still drawing.
   - A screen comes in the way it was reached: deeper from the right, back from the left, another tab rises and fades in. */
@media (max-width: 767px) {
  html { -webkit-tap-highlight-color: transparent; }
  .cx button, .cx a, .cx [role="button"], .cx-tab { touch-action: manipulation; }
  .cx-tabbar { padding-top: 6px; }
  .cx-tab { gap: 3px; transition: color .15s ease; }
  .cx-tab > .cx-i { box-sizing: content-box; padding: 4px 14px; border-radius: 999px; transition: background-color .2s ease, transform .12s ease; }
  .cx-tab.on > .cx-i { background: color-mix(in srgb, var(--cx-ember) 20%, transparent); color: var(--cx-ember); }
  .cx-tab.on > span { color: var(--cx-text); font-weight: 650; }
  .cx-tab:active > .cx-i { transform: scale(.88); }
  .cx-tab-n { top: 0; left: calc(50% + 6px); }
  .cx-talk .tk-item:active, .cx-more-i:active { background: var(--cx-raised); }
  .cx-pback:active, .tk-back:active { transform: scale(.9); }

  .cx-main.cx-in-push { animation: cx-in-push .26s cubic-bezier(.2, .8, .2, 1) both; }
  .cx-main.cx-in-pop  { animation: cx-in-pop .24s cubic-bezier(.2, .8, .2, 1) both; }
  .cx-main.cx-in-tab  { animation: cx-in-tab .2s ease-out both; }
}
@keyframes cx-in-push { from { transform: translateX(28%); opacity: .2; } to { transform: none; opacity: 1; } }
@keyframes cx-in-pop  { from { transform: translateX(-18%); opacity: .3; } to { transform: none; opacity: 1; } }
@keyframes cx-in-tab  { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .cx-main.cx-in-push, .cx-main.cx-in-pop, .cx-main.cx-in-tab { animation: none; } }

/* Kabil 15 Nov: phone setup (Home Screen, install, notifications): one quiet card at the top of the main screens until done or dismissed */
.cx-setup { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: start; margin: 0 0 16px; padding: 14px; border: 1px solid color-mix(in srgb, var(--cx-ember) 35%, var(--cx-line));
  border-radius: 14px; background: color-mix(in srgb, var(--cx-ember) 8%, var(--cx-raised)); }
.cx-setup-ic { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: color-mix(in srgb, var(--cx-ember) 22%, transparent); color: var(--cx-ember); }
.cx-setup-t { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cx-setup-t b { font-size: 15px; }
.cx-setup-t span { color: var(--cx-text-2); font-size: 13px; line-height: 1.45; }
.cx-setup-a { margin-top: 8px; }
.cx-main .cx-setup-x { width: 36px; height: 36px; margin: -6px -6px 0 0; }

/* Kabil 15 Nov (the phone felt slow between screens): a drop-shadow or saturate filter on an SVG that also animates makes Safari
   repaint the filter every frame. On touch phones the crew drawings keep their motion but lose the filters: "needs you" still shows
   by its badge, asleep by its fade. */
@media (hover: none) and (max-width: 767px) {
  .cr-m-needs, .cr-huddle .cr-hm.cr-m-needs, .cr-m-asleep { filter: none; }
  .cr-m-asleep { opacity: 0.5; }
}

/* Voice chat in the composer: the talk-mode switch and hold to talk (44 px targets everywhere; a pulsing ring while listening,
   a still ring with reduced motion). On a phone the composer row keeps them next to Send. */
.cx-talk .tk-mic, .cx-talk .tk-tmode { min-width: 44px; min-height: 44px; justify-content: center; position: relative; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.cx-talk .tk-mic { width: 44px; height: 44px; padding: 0; border-radius: 50%; touch-action: none; }
.cx-talk .tk-tmode { touch-action: manipulation; }
.cx-talk .tk-mic:disabled { opacity: .5; cursor: default; }
.cx-talk .tk-mic.on { background: color-mix(in srgb, var(--cx-ember) 24%, var(--cx-raised)); color: var(--cx-text); }
.cx-talk .tk-mic.on::after { content: ""; position: absolute; inset: -3px; border-radius: 50%; border: 2px solid var(--cx-ember); pointer-events: none; animation: tk-mic-ring 1.2s ease-out infinite; }
.cx-talk .tk-mic.away { background: var(--cx-raised); color: var(--cx-text-muted); }
.cx-talk .tk-mic.away::after { border-color: var(--cx-text-faint); animation: none; }
.cx-talk .tk-mic:focus-visible, .cx-talk .tk-tmode:focus-visible { outline: 2px solid var(--cx-focus); outline-offset: 2px; }
.tk-mic-st { display: flex; align-items: center; gap: 8px; margin: 6px 8px 0; font-size: 13px; color: var(--cx-text-muted); }
.tk-mic-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--cx-ember); flex: none; }
.tk-mic-st.tk-mic-err { color: var(--cx-danger); }
@keyframes tk-mic-ring { from { transform: scale(.92); opacity: .9; } to { transform: scale(1.35); opacity: 0; } }
@media (max-width: 767px) {
  .cx-talk .tk-box .tk-cbar > .tk-mic, .cx-talk .tk-box .tk-cbar > .tk-tmode { display: inline-flex; }
  .cx-talk .tk-tmode { width: 44px; padding: 0; border-radius: 50%; }
  .cx-talk .tk-tm-l { display: none; }
}
@media (prefers-reduced-motion: reduce) { .cx-talk .tk-mic.on::after { animation: none; transform: none; opacity: 1; } }

/* Kabil 15 Nov: the chat composer, calm. One rounded line: + (attach, private value, desktop view, commands, hand off), the message,
   and one button on the right: Talk (a hands-free voice conversation) while the box is empty, Send once there is something to send.
   A voice conversation takes the composer's place: an orb that listens, thinks and speaks, your words as you say them, Mute and End. */
.cx-talk .tk-comp { gap: 6px; }
.cx-talk .tk-comp .tk-box { position: relative; flex-direction: row; align-items: flex-end; gap: 4px; padding: 6px; border-radius: 26px; }
.cx-talk .tk-comp .tk-boxin { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.cx-talk .tk-comp .tk-box #tk-in { min-height: 24px; height: auto; max-height: 168px; padding: 9px 6px 9px 4px; line-height: 1.45; overflow-y: auto; font-size: 16px; }
.cx-talk .tk-plus, .cx-talk .tk-vstart, .cx-talk .tk-comp #tk-send.tk-sendi { flex: none; width: 40px; height: 40px; min-height: 40px; padding: 0; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.cx-talk .tk-plus { border: 0; background: transparent; color: var(--cx-text-2); }
.cx-talk .tk-plus:hover, .cx-talk .tk-plus[aria-expanded="true"] { background: var(--cx-raised); color: var(--cx-text); }
.cx-talk .tk-plus[aria-expanded="true"] .cx-i, .cx-talk .tk-plus[aria-expanded="true"] svg { transform: rotate(45deg); }
.cx-talk .tk-plus svg { transition: transform .15s ease; }
.cx-talk .tk-vstart { border: 0; background: var(--cx-accent); color: var(--cx-accent-ink); }
.cx-talk .tk-vstart:hover { filter: brightness(1.08); }
.cx-talk .tk-read { flex: none; width: 36px; height: 36px; min-height: 36px; padding: 0; border: 0; border-radius: 50%; display: inline-flex;
  align-items: center; justify-content: center; cursor: pointer; background: transparent; color: var(--cx-text-2); }
.cx-talk .tk-read:hover { background: var(--cx-raised); color: var(--cx-text); }
.cx-talk .tk-read[aria-pressed="true"] { background: var(--cx-accent); color: var(--cx-accent-ink); }
.cx-talk .tk-read[aria-pressed="true"]:hover { background: var(--cx-accent); filter: brightness(1.08); }
.cx-talk .tk-read.reading .rd-w1 { animation: rd-wave 1s ease-in-out infinite; }
.cx-talk .tk-read.reading .rd-w2 { animation: rd-wave 1s ease-in-out .25s infinite; }
@keyframes rd-wave { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .cx-talk .tk-read.reading .rd-w1, .cx-talk .tk-read.reading .rd-w2 { animation: none; } }
.cx-talk .tk-box.can-voice:not(.has-text) #tk-send { display: none; }
.cx-talk .tk-box.has-text .tk-vstart { display: none; }
.cx-talk .tk-comp .tk-cnt { align-self: center; margin: 0 4px; }
.cx-talk .tk-comp .tk-cnt:empty { display: none; }
.cx-talk .tk-comp-hint { text-align: center; font-size: 12px; min-height: 0; }
.cx-talk .tk-comp-hint:empty { display: none; }
.cx-talk .tk-comp:focus-within .tk-chips { display: none; }
.cx-talk .tk-chips { gap: 6px; }
.cx-talk .tk-chips .tk-chip { min-height: 32px; font-size: 13px; padding: 0 12px; }

/* the + menu: a small card above the box */
.cx-talk .tk-plusm { display: flex; flex-direction: column; padding: 6px; border: 1px solid var(--cx-line-btn); border-radius: 18px; background: var(--cx-raised);
  box-shadow: 0 10px 30px rgb(0 0 0 / .28); }
.cx-talk .tk-pm { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 48px; padding: 8px 12px; border: 0; border-radius: 12px; background: transparent;
  color: var(--cx-text); font: inherit; text-align: left; cursor: pointer; box-sizing: border-box; }
.cx-talk .tk-pm:hover, .cx-talk .tk-pm:focus-visible, .cx-talk .tk-pm[aria-pressed="true"], .cx-talk .tk-pm[aria-expanded="true"] { background: color-mix(in srgb, var(--cx-text) 8%, transparent); }
.cx-talk .tk-pm > span:last-child { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.cx-talk .tk-pm b { font-weight: 600; font-size: 14px; }
.cx-talk .tk-pm small { color: var(--cx-text-muted); font-size: 12px; }
.cx-talk .tk-pm svg, .cx-talk .tk-pm-ic { flex: none; width: 20px; color: var(--cx-text-2); text-align: center; font-size: 17px; }
.cx-talk .tk-pm input[type="file"] { position: absolute; width: 1px; height: 1px; opacity: 0; }
.cx-talk .tk-pm:disabled { opacity: .45; cursor: default; }

/* the voice conversation */
.cx-talk .tk-voice { display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 12px; padding: 10px 10px 10px 12px;
  border: 1px solid color-mix(in srgb, var(--cx-ember) 35%, var(--cx-line-btn)); border-radius: 28px; background: color-mix(in srgb, var(--cx-ember) 6%, var(--cx-panel)); }
.cx-talk .tk-orb { position: relative; width: 52px; height: 52px; min-height: 52px; padding: 0; border: 0; border-radius: 50%; background: transparent; cursor: pointer; }
.cx-talk .tk-orb-c { position: absolute; inset: 6px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #ffb38a, var(--cx-ember) 60%, #b8401c); }
.cx-talk .tk-orb::before { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid color-mix(in srgb, var(--cx-ember) 55%, transparent); opacity: 0; }
.cx-talk .tk-voice.listening .tk-orb-c { animation: tk-breathe 2.4s ease-in-out infinite; }
.cx-talk .tk-voice.listening .tk-orb::before { animation: tk-ring 1.8s ease-out infinite; }
.cx-talk .tk-voice.waiting .tk-orb-c { animation: tk-breathe 1.2s ease-in-out infinite; opacity: .75; }
.cx-talk .tk-voice.speaking .tk-orb-c { animation: tk-speak .5s ease-in-out infinite alternate; }
.cx-talk .tk-voice.speaking .tk-orb::before { animation: tk-ring 1s ease-out infinite; }
.cx-talk .tk-voice.muted .tk-orb-c { background: var(--cx-raised); box-shadow: inset 0 0 0 2px var(--cx-line-strong); }
.cx-talk .tk-vtx { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.cx-talk .tk-vtx b { font-size: 14px; font-weight: 600; }
.cx-talk .tk-vsaid { margin: 0; color: var(--cx-text-2); font-size: 14px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cx-talk .tk-vbtn { width: 44px; height: 44px; min-height: 44px; padding: 0; border: 0; border-radius: 50%; background: var(--cx-raised); color: var(--cx-text); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.cx-talk .tk-vbtn[aria-pressed="true"] { background: color-mix(in srgb, var(--cx-danger) 22%, var(--cx-raised)); }
.cx-talk .tk-vend { min-height: 44px; padding: 0 18px; border: 0; border-radius: 999px; background: var(--cx-text); color: var(--cx-bg); font: inherit; font-weight: 600; cursor: pointer; }
.cx-talk .tk-orb:focus-visible, .cx-talk .tk-vbtn:focus-visible, .cx-talk .tk-vend:focus-visible, .cx-talk .tk-plus:focus-visible, .cx-talk .tk-vstart:focus-visible { outline: 2px solid var(--cx-focus); outline-offset: 2px; }
@keyframes tk-breathe { 0%, 100% { transform: scale(.92); } 50% { transform: scale(1); } }
@keyframes tk-speak { from { transform: scale(.9); } to { transform: scale(1.04); } }
@keyframes tk-ring { from { transform: scale(.85); opacity: .8; } to { transform: scale(1.25); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .cx-talk .tk-orb-c, .cx-talk .tk-orb::before { animation: none !important; } }
@media (max-width: 767px) {
  .cx-talk .tk-comp { padding: 6px 10px max(8px, env(safe-area-inset-bottom)); }
  .cx-talk .tk-comp .tk-box { padding: 4px; border-radius: 24px; }
  .cx-talk .tk-comp .tk-box > .tk-plus, .cx-talk .tk-comp .tk-box > .tk-vstart, .cx-talk .tk-comp .tk-box > #tk-send, .cx-talk .tk-comp .tk-box > .tk-cnt { display: inline-flex; }
  .cx-talk .tk-box.can-voice:not(.has-text) > #tk-send { display: none; }
  .cx-talk .tk-box.has-text > .tk-vstart { display: none; }
  .cx-talk .tk-comp .tk-cnt:empty { display: none; }
  .cx-talk .tk-comp-hint { display: none; }
  .cx-talk .tk-voice { grid-template-columns: auto 1fr auto; grid-template-areas: "orb tx tx" "orb mute end"; row-gap: 8px; }
  .cx-talk .tk-orb { grid-area: orb; } .cx-talk .tk-vtx { grid-area: tx; } .cx-talk .tk-vbtn { grid-area: mute; justify-self: end; } .cx-talk .tk-vend { grid-area: end; }
}
.cx-talk .tk-privchip { flex: none; align-self: center; display: inline-flex; align-items: center; gap: 4px; min-height: 28px; padding: 0 10px; border: 0; border-radius: 999px;
  background: color-mix(in srgb, var(--cx-ember) 20%, transparent); color: var(--cx-text); font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; }
/* Settings > Connected tools (connections.ts): other apps' MCP servers for the crew */
.cx-set.cx-conn { grid-column: 1 / -1; }
.cx-conn-list { display: flex; flex-direction: column; gap: 12px; margin: 12px 0 4px; }
.cx-conn-row { display: flex; flex-direction: column; gap: 10px; padding: 14px; border: 1px solid var(--cx-line-2); border-radius: 12px; background: var(--cx-panel); min-width: 0; }
.cx-conn-disabled { opacity: .72; }
.cx-conn-top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; min-width: 0; }
.cx-conn-t { display: flex; flex-direction: column; min-width: 0; flex: 1 1 200px; }
.cx-conn-url { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cx-conn-badge { flex: none; display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--cx-raised); border: 1px solid var(--cx-line-btn); font-weight: 600; color: var(--cx-text); }
.cx-conn-err { margin: 0; color: var(--cx-danger); font-size: 13px; overflow-wrap: anywhere; }
.cx-conn-whos { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.cx-conn-whos .cx-cap { flex-basis: 100%; }
.cx-conn-who { gap: 6px; }
.cx-conn-who .cx-link { padding: 0 2px; min-height: 0; }
.cx-conn-act { display: flex; flex-wrap: wrap; gap: 8px; }
.cx-conn-tools { display: flex; flex-direction: column; gap: 8px; border-top: 1px solid var(--cx-line); padding-top: 10px; }
.cx-conn-tl { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.cx-conn-tl li code { font-family: var(--cx-mono); font-size: 12px; padding: 3px 8px; border-radius: 6px; background: var(--cx-raised); }
.cx-conn-tl li.cx-conn-off { opacity: .45; text-decoration: line-through; }
.cx-conn-line { display: flex; gap: 8px; }
.cx-conn-line input { flex: 1; min-width: 0; }
.cx-conn-cat { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; margin: 8px 0 16px; }
.cx-conn-card { display: flex; flex-direction: column; gap: 10px; padding: 14px; border: 1px solid var(--cx-line-2); border-radius: 12px; background: var(--cx-card-bg); min-width: 0; }
.cx-conn-ct { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1; }
.cx-conn-ct .cx-muted { font-size: 13px; }
.cx-conn-check { font-size: 12px; color: var(--cx-warn-text); overflow-wrap: anywhere; }
.cx-conn-note { font-size: 12px; }
.cx-conn-links { display: flex; gap: 10px; align-items: center; font-size: 12px; }
.cx-conn-links a { color: var(--cx-text-2); }
.cx-conn-card > button { align-self: flex-start; }
.cx-conn-tok { display: flex; flex-direction: column; gap: 6px; }
.cx-conn-dev summary { cursor: pointer; font-weight: 500; padding: 6px 0; }
.cx-conn-form { display: flex; flex-direction: column; gap: 6px; max-width: 640px; padding-top: 8px; }
.cx-conn-form input, .cx-conn-form select, .cx-conn-form textarea { width: 100%; box-sizing: border-box; }
.cx-conn-form > button { align-self: flex-start; margin-top: 6px; }
.cx-conn-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.cx-conn-2 > span { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.cx-canuse { color: var(--cx-text-2); }
@media (max-width: 767px) {
  .cx-conn-cat { grid-template-columns: minmax(0, 1fr); }
  .cx-conn-2 { grid-template-columns: minmax(0, 1fr); }
  .cx-conn-act > button, .cx-conn-card > button { min-height: 44px; flex: 1 1 auto; }
  .cx-conn-row { padding: 12px; }
}
/* Settings â€º Webhooks (per-source keys, delivery log) and the event-rule filters */
.cx-hook-a { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.cx-hook-log { list-style: none; margin: 0; padding: 0; max-height: 420px; overflow-y: auto; }
.cx-hook-log .cx-kv > span:first-child { min-width: 0; overflow-wrap: anywhere; }
.cx-hooks .cx-kv input[type=text] { flex: 1; min-width: 0; }
.cx-au-filt { display: grid; gap: 8px; }
.cx-au-filt summary { cursor: pointer; color: var(--cx-text-muted); }
@media (max-width: 560px) { .cx-hook-src { flex-direction: column; align-items: stretch; } .cx-hook-a { justify-content: flex-start; } }
/* card 844: the webhook pipeline's health (Settings â€º Webhooks) */
.cx-hk-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 8px 16px; margin: 0 0 12px; }
.cx-hk-stat { display: flex; flex-direction: column; gap: 2px; padding: 8px 0; border-bottom: 1px solid var(--cx-line-soft); min-width: 0; }
.cx-hk-stat dt { font-size: 12px; color: var(--cx-text-faint); }
.cx-hk-stat dd { margin: 0; color: var(--cx-text); overflow-wrap: anywhere; }
.cx-hk-24 { font-size: 12.5px; color: var(--cx-text-2); text-align: right; }
.cx-hk-h { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.cx-hk-steps { margin: 8px 0; padding-left: 20px; max-height: 320px; overflow-y: auto; overflow-wrap: anywhere; }
.cx-hk-steps li { margin: 4px 0; }
.cx-hk-list { list-style: none; margin: 0; padding: 0; max-height: 420px; overflow-y: auto; }
.cx-hk-list .cx-kv > span:first-child { min-width: 0; overflow-wrap: anywhere; }
.cx-hooks .cx-hook-a > button, .cx-hk-h > button { min-height: 32px; }
@media (max-width: 560px) { .cx-hk-src { flex-direction: column; align-items: stretch; } .cx-hk-24 { text-align: left; } .cx-hooks .cx-hook-a > button, .cx-hk-h > button { min-height: 44px; } }

/* phone v2: the Phone screen (web/src/phone.ts). Tokens only: light and dark come from the theme. */
.ph { max-width: 1040px; }
.ph-msg:empty { display: none; }
.ph-msg { margin: 0 0 12px; color: var(--cx-text-2); }
.ph-card { border-top: 1px solid var(--cx-line); padding: 16px 0; }
.ph-card > h2 { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; }
.ph-card ul, .ph-calls, .ph-threads, .ph-tl, .ph-lines { list-style: none; margin: 0; padding: 0; }
.ph-need { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--cx-line-soft); flex-wrap: wrap; }
.ph-need-t { flex: 1 1 280px; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ph-need-t b { font-weight: 500; overflow-wrap: anywhere; }
.ph-need-a { display: flex; gap: 8px; }
.ph-live-c { border: 1px solid var(--cx-line-2); border-radius: 12px; padding: 12px 14px; margin: 0 0 10px; background: var(--cx-card-bg); }
.ph-live-c p { margin: 0 0 8px; }
.ph-lines li { padding: 3px 0; font-size: 13.5px; overflow-wrap: anywhere; }
.ph-lines .cx-muted { font-family: var(--cx-mono); font-size: 11.5px; margin-right: 6px; }
.ph-note, .ph-reply { display: flex; gap: 8px; margin-top: 10px; }
.ph-note input, .ph-reply textarea { flex: 1; min-width: 0; background: var(--cx-field); color: var(--cx-text); border: 1px solid var(--cx-line-btn); border-radius: 10px; padding: 8px 10px; font: inherit; }
.ph-filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; padding: 0 0 14px; }
.ph-f { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--cx-text-muted); }
.ph-f select, .ph-setup input, .ph-setup select { background: var(--cx-field); color: var(--cx-text); border: 1px solid var(--cx-line-btn); border-radius: 10px; padding: 7px 10px; font: inherit; min-width: 0; }
.ph-cost { margin: 0 0 0 auto; font-size: 13px; }
.ph-calls > li { border-top: 1px solid var(--cx-line-soft); }
.ph-call, .ph-th { display: flex; gap: 10px; align-items: flex-start; width: 100%; text-align: left; background: none; border: 0; color: inherit; font: inherit; padding: 12px 4px; cursor: pointer; border-radius: 8px; }
.ph-call:hover, .ph-th:hover, .ph-call.on, .ph-th.on { background: var(--cx-raised); }
.ph-call .cx-dot { margin-top: 6px; }
.ph-call-t { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ph-call-t b, .ph-th b { font-weight: 500; }
.ph-out { color: var(--cx-text-2); font-size: 13.5px; overflow-wrap: anywhere; display: block; }
.ph-detail { padding: 4px 4px 16px 22px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.ph-detail h3 { margin: 6px 0 0; }
.ph-detail p { margin: 0; }
.ph-detail audio { width: min(420px, 100%); }
.ph-facts { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; margin: 0; font-size: 13.5px; }
.ph-facts dt { color: var(--cx-text-muted); }
.ph-facts dd { margin: 0; overflow-wrap: anywhere; }
.ph-tx { width: 100%; }
.ph-tx summary { cursor: pointer; color: var(--cx-text-2); }
.ph-tx pre { white-space: pre-wrap; overflow-wrap: anywhere; font: 12.5px/1.55 var(--cx-mono); background: var(--cx-panel); border-radius: 10px; padding: 10px 12px; max-height: 360px; overflow: auto; }
.ph-pager { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 14px 0; }
.ph-texts { display: grid; grid-template-columns: minmax(220px, 300px) 1fr; gap: 20px; align-items: start; }
.ph-threads > li { border-top: 1px solid var(--cx-line-soft); }
.ph-th { flex-direction: column; gap: 2px; min-width: 0; }
.ph-thread h2 { margin: 0 0 12px; font-size: 16px; font-weight: 600; }
.ph-tl { display: flex; flex-direction: column; gap: 10px; }
.ph-tl-call { font-size: 13.5px; color: var(--cx-text-2); display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ph-tl-call .ph-out { flex-basis: 100%; }
.ph-tl-sms { max-width: 80%; padding: 8px 12px; border-radius: 14px; background: var(--cx-bubble); }
.ph-tl-sms.out { align-self: flex-end; background: var(--cx-user-bubble); border: 1px solid var(--cx-line-2); }
.ph-tl-sms p { margin: 0 0 2px; white-space: pre-wrap; overflow-wrap: anywhere; }
.ph-tl-sms .cx-muted { font-size: 12px; }
.ph-setup { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px 20px; max-width: 860px; }
.ph-setup h2 { grid-column: 1 / -1; margin: 10px 0 0; }
.ph-setup label { display: flex; flex-direction: column; gap: 4px; font-size: 13.5px; }
.ph-setup small { font-size: 12px; }
.ph-setup-a { grid-column: 1 / -1; }
@media (max-width: 767px) {
  .ph-texts { grid-template-columns: 1fr; }
  .ph-tl-sms { max-width: 92%; }
  .ph-detail { padding-left: 4px; }
  .ph-cost { margin: 0; flex-basis: 100%; }
}

/* Kabil 15 Nov: Settings review. On a wide screen the sections flow in balanced columns (no tall gaps beside the long ones); Connected
   tools spans the width; quiet Revoke buttons; whole web addresses; the add rows wrap instead of squeezing; bot messages two lines each;
   the developer form's address, token and secret fields look like every other field. */
@media (min-width: 1100px) {
  .cx-set-grid { display: block; columns: 2 460px; column-gap: 32px; }
  .cx-set-grid > .cx-card { break-inside: avoid; margin: 0 0 20px; display: block; width: 100%; box-sizing: border-box; }
  .cx-set-grid > .cx-conn, .cx-set-grid > [aria-labelledby="h-conn-tools"], .cx-set-grid > .cx-conns { column-span: all; }
}
.cx-main .cx-quiet-danger { border: 1px solid var(--cx-line-btn); background: transparent; color: var(--cx-text-2); }
.cx-main .cx-quiet-danger:hover { border-color: var(--cx-danger); color: var(--cx-danger); background: transparent; }
.cx-mcp-url { overflow-wrap: normal; word-break: keep-all; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; max-width: 100%; }
.cx-nf-here .cx-nf-t { min-width: 0; }
.cx-addrow { flex-wrap: wrap; gap: 8px; }
.cx-addrow > input { flex: 1 1 200px; min-width: 0; }
.cx-hook-add > select { flex: 1 1 140px; }
.cx-bot-msg > span:first-child { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cx-bot-q, .cx-bot-a { font-size: 13px; color: var(--cx-text-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cx-bot-a b { font-weight: 600; color: var(--cx-text-muted); margin-right: 4px; }
.cx-bot-more summary { cursor: pointer; color: var(--cx-text-2); font-size: 13px; padding: 8px 0; }
.cx-main input[type="url"], .cx-main input[type="password"], .cx-main input[type="email"], .cx-main input[type="number"] {
  box-sizing: border-box; width: 100%; min-height: 40px; padding: 8px 12px; border: 1px solid var(--cx-line-btn); border-radius: 10px;
  background: var(--cx-bg); color: var(--cx-text); font: inherit; font-size: 14px; }
.cx-main input[type="url"]:focus, .cx-main input[type="password"]:focus { outline: none; border-color: var(--cx-line-strong); }
.cx-conn-check { color: var(--cx-warning); font-size: 12px; }
/* Kabil 15 Nov: the voice agent's open question during a live call, right above the answer box */
.ph-q { margin: 8px 0; padding: 10px 12px; border-radius: 12px; border: 1px solid color-mix(in srgb, var(--cx-warning) 45%, var(--cx-line)); background: color-mix(in srgb, var(--cx-warning) 10%, transparent); }
.ph-tx pre { white-space: pre-wrap; font: 14px/1.6 var(--cx-font); }
.ph-over { color: var(--cx-warning); }

/* Kabil 15 Nov: the Phone screen, properly. Call rows are cards (no app pill buttons): a direction icon coloured by state, the contact
   and a badge, who / when / how long / cost, a two-line summary; the opened call: what came of it, facts, the player, the transcript as
   a conversation; the live call as a running conversation with a timer, the voice agent's question and the answer box. */
.cx-main .ph-calls { display: flex; flex-direction: column; gap: 10px; }
.ph-callc { border: 1px solid var(--cx-line); border-radius: 16px; background: var(--cx-panel); overflow: hidden; }
.ph-callc.on { border-color: var(--cx-line-strong); }
.cx-main .ph-callc .ph-call { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: start; width: 100%; min-height: 0; padding: 14px 16px;
  border: 0; border-radius: 0; background: transparent; color: var(--cx-text); text-align: left; font: inherit; cursor: pointer; }
.cx-main .ph-callc .ph-call:hover { background: color-mix(in srgb, var(--cx-text) 4%, transparent); }
.ph-ic { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--cx-raised); color: var(--cx-text-2); }
.ph-ic.st-ended { background: color-mix(in srgb, var(--cx-success, #3fb37f) 18%, transparent); color: var(--cx-success, #3fb37f); }
.ph-ic.st-missed, .ph-ic.st-failed { background: color-mix(in srgb, var(--cx-danger) 18%, transparent); color: var(--cx-danger); }
.ph-ic.st-queued { background: color-mix(in srgb, var(--cx-ember) 22%, transparent); color: var(--cx-ember); }
.ph-ic.st-pending { background: color-mix(in srgb, var(--cx-warning) 20%, transparent); color: var(--cx-warning); }
.ph-call-t { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ph-call-h { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ph-call-h b { font-size: 15px; font-weight: 600; }
.ph-badge { display: inline-flex; align-items: center; min-height: 22px; padding: 0 9px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--cx-raised); color: var(--cx-text-2); }
.ph-badge.st-ended { background: color-mix(in srgb, var(--cx-success, #3fb37f) 16%, transparent); color: var(--cx-text); }
.ph-badge.st-missed, .ph-badge.st-failed { background: color-mix(in srgb, var(--cx-danger) 18%, transparent); color: var(--cx-text); }
.ph-badge.st-queued { background: color-mix(in srgb, var(--cx-ember) 22%, transparent); color: var(--cx-text); }
.ph-badge.st-pending { background: color-mix(in srgb, var(--cx-warning) 22%, transparent); color: var(--cx-text); }
.ph-badge.st-planned { background: color-mix(in srgb, var(--cx-ember) 12%, transparent); color: var(--cx-text); }   /* Kabil 16 Nov: planned calls */
.ph-meta { font-size: 13px; color: var(--cx-text-muted); }
.ph-callc .ph-out { font-size: 14px; color: var(--cx-text-2); line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ph-chev { color: var(--cx-text-muted); margin-top: 10px; transition: transform .15s ease; }
.ph-callc.on .ph-chev { transform: rotate(180deg); }
.ph-callc .ph-detail { padding: 4px 16px 18px 68px; display: flex; flex-direction: column; gap: 14px; }
.ph-sum { padding: 12px 14px; border-radius: 12px; background: var(--cx-bg); border: 1px solid var(--cx-line); }
.ph-sum h3 { margin: 0 0 4px; }
.ph-sum p { margin: 0; line-height: 1.5; }
.cx-main .ph-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px 18px; margin: 0; }
.ph-facts dt { font-size: 12px; color: var(--cx-text-muted); }
.ph-facts dd { margin: 2px 0 0; font-size: 14px; }
.ph-facts div:first-child { grid-column: 1 / -1; }
.ph-detail audio { width: 100%; max-width: 560px; }
.cx-main .ph-detail > button[data-ph] { align-self: flex-start; }
/* the transcript as a conversation */
.ph-conv { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.ph-say { max-width: 78%; display: flex; flex-direction: column; gap: 2px; }
.ph-say p { margin: 0; padding: 8px 12px; border-radius: 14px; font-size: 14px; line-height: 1.45; }
.ph-say.us { align-self: flex-start; }
.ph-say.us p { background: var(--cx-raised); border-top-left-radius: 4px; }
.ph-say.them { align-self: flex-end; text-align: right; }
.ph-say.them p { background: color-mix(in srgb, var(--cx-ember) 16%, var(--cx-panel)); border-top-right-radius: 4px; text-align: left; }
.ph-who { font-size: 11px; color: var(--cx-text-muted); padding: 0 4px; }
.ph-note-l { align-self: center; font-size: 12px; color: var(--cx-text-muted); font-style: italic; }
.ph-tx summary { cursor: pointer; color: var(--cx-text-2); font-size: 14px; }
/* the live call */
.ph-live { border: 1px solid color-mix(in srgb, var(--cx-ember) 45%, var(--cx-line)); border-radius: 18px; padding: 16px; background: color-mix(in srgb, var(--cx-ember) 6%, var(--cx-panel)); margin-bottom: 16px; }
.ph-live-c + .ph-live-c { border-top: 1px solid var(--cx-line); margin-top: 14px; padding-top: 14px; }
.ph-live-h { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ph-live-h b { font-size: 16px; }
.ph-timer { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--cx-ember); }
.ph-wave { display: inline-flex; gap: 2px; align-items: center; height: 14px; }
.ph-wave i { width: 3px; border-radius: 2px; background: var(--cx-ember); animation: ph-wave 1s ease-in-out infinite; }
.ph-wave i:nth-child(1) { height: 6px; } .ph-wave i:nth-child(2) { height: 12px; animation-delay: .15s; } .ph-wave i:nth-child(3) { height: 8px; animation-delay: .3s; } .ph-wave i:nth-child(4) { height: 11px; animation-delay: .45s; }
@keyframes ph-wave { 50% { transform: scaleY(.4); } }
.ph-live .ph-lines { list-style: none; margin: 12px 0; padding: 0; display: flex; flex-direction: column; gap: 6px; max-height: 300px; overflow-y: auto; }
.ph-live .ph-lines li { padding: 8px 12px; border-radius: 12px; background: var(--cx-panel); font-size: 14px; line-height: 1.45; }
.ph-live .ph-lines li .cx-muted { font-size: 12px; margin-right: 6px; font-variant-numeric: tabular-nums; }
.ph-live .ph-q { font-size: 15px; }
.cx-main .ph-live .ph-note { display: flex; gap: 8px; }
.cx-main .ph-live .ph-note input { flex: 1; min-height: 44px; padding: 0 14px; border: 1px solid var(--cx-line-btn); border-radius: 12px; background: var(--cx-bg); color: var(--cx-text); font: inherit; }
.cx-main .ph-live .ph-note button { min-height: 44px; padding: 0 18px; border-radius: 12px; border: 0; background: var(--cx-ember); color: #fff; font-weight: 600; }
@media (prefers-reduced-motion: reduce) { .ph-wave i { animation: none; } }
@media (max-width: 767px) {
  .ph-callc .ph-detail { padding: 4px 14px 16px; }
  .cx-main .ph-callc .ph-call { grid-template-columns: auto 1fr; padding: 12px 14px; }
  .ph-chev { display: none; }
  .ph-say { max-width: 90%; }
}
/* the app's success colour is its ember accent: an ended call is neutral, a call that went wrong is red, ember means live */
.ph-ic.st-ended { background: var(--cx-raised); color: var(--cx-text-2); }
.ph-badge.st-ended { background: var(--cx-raised); color: var(--cx-text-2); }
.ph-ic.st-noanswer { background: color-mix(in srgb, var(--cx-danger) 16%, transparent); color: var(--cx-danger); }
.ph-badge.st-noanswer { background: color-mix(in srgb, var(--cx-danger) 16%, transparent); color: var(--cx-text); }

/* an open call shows its summary in the call view, not twice */
.ph-callc.on .ph-call .ph-out { display: none; }

/* Kabil 15 Nov ("the other phone screens still have issue"): Texts threads as cards like the calls; a thread's conversation; Setup in
   three cards with every field styled the same (phone and number fields too). */
.cx-main .ph-threads { display: flex; flex-direction: column; gap: 8px; }
.cx-main .ph-threads .ph-th { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: start; width: 100%; min-height: 0; padding: 12px 14px;
  border: 1px solid var(--cx-line); border-radius: 14px; background: var(--cx-panel); color: var(--cx-text); text-align: left; font: inherit; cursor: pointer; }
.cx-main .ph-threads .ph-th:hover { border-color: var(--cx-line-strong); }
.cx-main .ph-threads .ph-th.on { border-color: var(--cx-ember); background: color-mix(in srgb, var(--cx-ember) 6%, var(--cx-panel)); }
.ph-th .ph-call-h { justify-content: space-between; }
.ph-th .ph-out { font-size: 13px; color: var(--cx-text-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ph-thread { border: 1px solid var(--cx-line); border-radius: 16px; background: var(--cx-panel); padding: 16px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.ph-thread h2 { margin: 0; font-size: 16px; }
.cx-main .ph-tl { display: flex; flex-direction: column; gap: 8px; }
.ph-tl-call { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; padding: 10px 12px; border-radius: 12px; background: var(--cx-bg); border: 1px solid var(--cx-line); font-size: 13px; }
.ph-tl-call .ph-out { flex-basis: 100%; color: var(--cx-text-2); font-size: 13px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.ph-tl-sms { padding: 8px 12px; border-radius: 14px; }
.ph-tl-sms.out { align-self: flex-end; background: color-mix(in srgb, var(--cx-ember) 16%, var(--cx-panel)); }
.ph-tl-sms.in { align-self: flex-start; background: var(--cx-raised); }
.ph-tl-sms p { margin: 0 0 2px; }
.cx-main .ph-reply { display: flex; gap: 8px; align-items: flex-end; }
.cx-main .ph-reply textarea { flex: 1; min-height: 44px; padding: 10px 14px; border: 1px solid var(--cx-line-btn); border-radius: 14px; background: var(--cx-bg); color: var(--cx-text); font: inherit; resize: vertical; }
/* Setup */
.cx-main .ph-setup { display: flex; flex-direction: column; gap: 16px; max-width: 900px; grid-template-columns: none; }
.ph-sc { border: 1px solid var(--cx-line); border-radius: 16px; background: var(--cx-panel); padding: 18px; }
.ph-sc h2 { margin: 0 0 2px; font-size: 15px; }
.ph-sc-p { margin: 0 0 14px; font-size: 13px; }
.ph-sg { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px 18px; }
.ph-sg label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--cx-text-2); }
.ph-sg label small { font-size: 12px; line-height: 1.4; }
.cx-main .ph-sg input, .cx-main .ph-sg select { box-sizing: border-box; width: 100%; min-height: 42px; padding: 8px 12px; border: 1px solid var(--cx-line-btn); border-radius: 10px;
  background: var(--cx-bg); color: var(--cx-text); font: inherit; font-size: 14px; }
.cx-main .ph-sg input:focus, .cx-main .ph-sg select:focus { outline: none; border-color: var(--cx-line-strong); }
.cx-main .ph-sg input::placeholder { color: var(--cx-text-faint); }
.ph-setup-a { display: flex; justify-content: flex-end; }
@media (max-width: 767px) { .ph-sc { padding: 14px; } .ph-setup-a .cx-primary { width: 100%; } }

/* the Workshop (web/src/workshop.ts): the crew's bugs, fixes and features. Tokens only: light and dark come from the theme. */
.ws { max-width: 1040px; margin: 0 auto; }
.ws-top { display: flex; flex-direction: column; gap: 8px; margin: 0 0 12px; }
.ws-top h1 { margin: 0; }
.ws-top p { margin: 0; max-width: 72ch; }
.ws-new { display: flex; gap: 8px; flex-wrap: wrap; }
.ws-msg:empty { display: none; }
.ws-msg { margin: 0 0 12px; color: var(--cx-text-2); }
.ws-card { border: 1px solid var(--cx-line); border-radius: 14px; background: var(--cx-panel); padding: 16px 18px; margin: 0 0 14px; }
.ws-card > h2 { margin: 0 0 10px; }
.ws-filters { margin: 8px 0 4px; }
.ws-list { list-style: none; margin: 0; padding: 0; }
.ws-item { border: 1px solid var(--cx-line); border-radius: 12px; background: var(--cx-panel); padding: 4px 6px 10px; margin: 0 0 8px; }
.ws-card .ws-item { background: var(--cx-bg); }
.cx-main .ws-head, .ws-head { display: flex; min-height: 0; box-shadow: none; gap: 12px; align-items: flex-start; width: 100%; text-align: left; background: none; border: 0; color: inherit; font: inherit; padding: 12px 4px 6px; cursor: pointer; border-radius: 8px; }
.cx-main .ws-head { border: 0; border-radius: 8px; background: none; padding: 12px 4px 6px; min-height: 0; text-align: left; font-weight: 400; }
.cx-main .ws-head:hover, .cx-main .ws-item.open > .ws-head { background: var(--cx-raised); }
.ws-kind { flex: none; font-size: 11.5px; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--cx-line-2); color: var(--cx-text-2); margin-top: 2px; }
.ws-kind.bug { color: var(--cx-warn-text); border-color: var(--cx-warn-line); background: var(--cx-warn-bg); }
.ws-title { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ws-title b { font-weight: 500; overflow-wrap: anywhere; }
.ws-title .cx-muted { font-size: 13px; overflow-wrap: anywhere; }
.ws-st { flex: none; display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--cx-text-2); white-space: nowrap; margin-top: 2px; }
.ws-why, .ws-rv { margin: 2px 4px 6px; font-size: 13.5px; overflow-wrap: anywhere; }
.ws-why { color: var(--cx-warn-text); }
.ws-rv.fail b { color: var(--cx-warn-text); }
.ws-det { padding: 4px 4px 4px 4px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.ws-det p { margin: 0; overflow-wrap: anywhere; }
.ws-text { white-space: pre-wrap; }
.ws-files code, .ws-det code { font: 12.5px var(--cx-mono); }
.ws-log { list-style: none; margin: 4px 0 0; padding: 8px 10px; background: var(--cx-panel); border-radius: 10px; font-size: 12.5px; max-height: 220px; overflow: auto; }
.ws-log li { padding: 2px 0; overflow-wrap: anywhere; }
.ws-acts { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding: 4px 4px 0; }
.ws-form { display: flex; flex-direction: column; gap: 10px; max-width: 640px; }
.ws-form label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--cx-text-muted); }
.ws-form input, .ws-form textarea, .ws-keyf input { background: var(--cx-field); color: var(--cx-text); border: 1px solid var(--cx-line-btn); border-radius: 10px; padding: 8px 10px; font: inherit; min-width: 0; }
.ws-keyf { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.ws-keyf input { flex: 1 1 260px; }
.ws-empty { padding: 16px 0; }
@media (max-width: 767px) {
  .ws-head { flex-wrap: wrap; }
  .ws-st { width: 100%; padding-left: 0; }
  .ws-acts > button { min-height: 44px; flex: 1 1 auto; }
}
.ws-checks { list-style: none; margin: 10px 0 0; padding: 0; font-size: 13.5px; }
.ws-checks li { padding: 3px 0; overflow-wrap: anywhere; }
.ws-checks li.bad b { color: var(--cx-warn-text); }

/* Settings, Desktop app (Kabil 15 Nov: download the desktop apps from inside the web app) */
.cx-dl-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 8px; }
.cx-dl-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--cx-line-btn);
  color: var(--cx-text); text-decoration: none; font: 500 14px/1 var(--cx-font); }
.cx-dl-btn:hover { background: var(--cx-raised); border-color: var(--cx-line-strong); }
.cx-dl-btn.pri { background: var(--cx-ember); border-color: var(--cx-ember); color: #fff; }
.cx-dl-btn.pri:hover { background: color-mix(in srgb, var(--cx-ember) 88%, #fff); }
.cx-dl-btn:focus-visible { outline: 2px solid var(--cx-focus); outline-offset: 2px; }
.cx-deskapp .cx-small { font-size: 12px; }
button.cx-dl-btn { cursor: pointer; background: transparent; }
button.cx-dl-btn:disabled, .cx-deskapp button:disabled { opacity: 0.55; cursor: default; }
.cx-desk-notes { margin: 8px 0; white-space: pre-wrap; overflow-wrap: anywhere; }

/* Workshop (Kabil 15 Nov: "the workshop page needs enhancements", "why do I see the GitHub key always as requested") */
.ws-toprow { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; }
.ws-sum { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; margin-top: 6px; }
.ws-tile { display: flex; align-items: baseline; gap: 8px; padding: 10px 14px; border: 1px solid var(--cx-line); border-radius: 12px; background: var(--cx-panel); }
.ws-tile b { font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; }
.ws-tile span { font-size: 13px; color: var(--cx-text-2); }
.ws-tile.hot { border-color: var(--cx-ember); background: color-mix(in srgb, var(--cx-ember) 10%, var(--cx-panel)); }
/* Daily report: a tile is a button that jumps to its section. */
.rep-go { font: inherit; color: inherit; text-align: left; cursor: pointer; }
.rep-go:hover { border-color: var(--cx-text-2); }
.rep-go.hot:hover { border-color: var(--cx-ember); }
.rep-go:focus-visible { outline: 2px solid var(--cx-ember); outline-offset: 2px; }
.rep-sec h2:focus { outline: none; }
.ws-tkey b { font-size: 16px; }
.ws-keyst { display: flex; flex-direction: column; gap: 6px; }
.ws-keyst p { margin: 0; color: var(--cx-text-2); }
.ws-keyok { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 13px; font-weight: 600;
  color: #4fbf8a; background: color-mix(in srgb, #4fbf8a 14%, transparent); }
.ws-keyst .ws-acts { padding: 4px 0 0; }
.ws-filters { margin: 4px 0 10px; }
@media (max-width: 767px) { .ws-sum { grid-template-columns: repeat(2, minmax(0, 1fr)); } .ws-card { padding: 14px; } }
/* the Workshop: related earlier fixes and who knows the area, from the crew graph (Kabil 15 Nov) */
.ws-rel { margin: 4px 0 0; padding: 8px 10px; border-radius: 10px; background: var(--cx-raised); font-size: 13.5px; }
.ws-rel p { margin: 0 0 4px; }
.ws-rel ul { margin: 0 0 6px; padding-left: 18px; }
.ws-who { display: inline-block; margin: 2px 4px 0 0; padding: 1px 8px; border-radius: 999px; border: 1px solid var(--cx-line-2); font-size: 12.5px; }

/* the crew's scorecard on the Runs screen (scorecard.ts) */
.cx-sc { margin-bottom: 16px; }
.cx-sc h2 { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin: 0 0 10px; }
.cx-sc h2 .cx-muted { font-size: 13px; font-weight: 400; }
.cx-sc-wrap { overflow-x: auto; }
.cx-sc-t { width: 100%; border-collapse: collapse; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.cx-sc-t th, .cx-sc-t td { padding: 8px 10px; border-top: 1px solid var(--cx-line); text-align: left; white-space: nowrap; }
.cx-sc-t thead th { border-top: 0; font-size: 12px; font-weight: 600; color: var(--cx-text-2); }
.cx-sc-t tbody th { font-weight: 600; }
.cx-sc-t a { color: var(--cx-text); text-decoration: none; }
.cx-sc-t a:hover { text-decoration: underline; }
.cx-sc-tr { margin-left: 4px; font-size: 11px; }
.cx-sc-tr.up, .cx-sc-g { color: #4fbf8a; }
.cx-sc-tr.down, .cx-sc-b { color: var(--cx-danger); }
/* the daily report (web/src/report.ts, src/ops_report.ts) */
.rep-head { margin: 4px 0 0; }
.rep-sum { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); margin: 0 0 14px; }
.rep-l { margin: 0; padding: 0 0 0 18px; display: flex; flex-direction: column; gap: 6px; }
.rep-l li { line-height: 1.45; overflow-wrap: anywhere; }
.rep-empty { margin: 0; }
.rep-text summary { cursor: pointer; font-weight: 600; }
.rep-text pre { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13px; line-height: 1.5; margin: 10px 0 0; max-height: 60vh; overflow: auto; }
.rep-set .cx-nf-q { display: inline-flex; align-items: center; gap: 10px; }
.rep-days { margin: 12px 0 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
/* agent value (web/src/value.ts, src/value.ts): spend next to outcomes */
.val-days { display: flex; gap: 6px; flex-wrap: wrap; }
.val-days button[aria-pressed="true"] { font-weight: 600; }
.val-asof { margin: 4px 0 0; }
.val-nm { color: var(--cx-text-2); font-style: italic; font-weight: 500; }
.ws-tile b .val-nm { font-size: 14px; font-style: normal; }
.val-sort { background: none; border: 0; padding: 0; font: inherit; font-weight: 600; color: inherit; cursor: pointer; text-align: left; }
.val-sort[aria-sort="descending"] { text-decoration: underline; }
.val-defs { margin-top: 14px; }
.val-defs summary { cursor: pointer; font-weight: 600; }
.val-defs dl { margin: 10px 0 0; }
.val-defs dt { font-weight: 600; margin-top: 8px; }
.val-defs dd { margin: 2px 0 0; }
/* the outside final check (web/src/final.ts) */
.fin-badge { align-self: flex-start; display: inline-block; margin-left: 6px; font-size: 11px; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; padding: 1px 7px; border-radius: 999px; border: 1px solid var(--cx-line-2); color: var(--cx-text-2); vertical-align: 1px; }
.ws-title .fin-badge { margin-left: 0; }
.fin-badge.wait { color: var(--cx-warn-text); border-color: var(--cx-warn-line); background: var(--cx-warn-bg); }
.fin-line { margin: 2px 4px 6px; font-size: 13.5px; overflow-wrap: anywhere; color: var(--cx-text-2); }
.fin-line.wait b, .fin-line.fail b { color: var(--cx-warn-text); }
.fin-note { display: block; margin-top: 4px; white-space: pre-wrap; font-size: 13px; }
.cx-card .cx-acts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.ws-gap { margin-right: 8px; padding: 1px 7px; border-radius: 999px; font-size: 11.5px; font-weight: 600; color: var(--cx-warn-text); background: var(--cx-warn-bg); border: 1px solid var(--cx-warn-line); }
.ws-self { padding: 8px 10px; border-radius: 10px; background: var(--cx-panel); }

/* ===== Finishing pass (2026-11-16): spacing, alignment and small graphic bugs, found by walking every screen at 1440 px and 375 px.
   Layout only: no colours, words or behaviour change. Kept in one place so it can be read and removed as a whole. ===== */

/* One page frame for every screen: 32px from the top, 40px from the side (16px on a phone). The Daily report, Value, Workshop and
   Phone pages had no frame (their title touched the top edge), the Desktop page used 20/24 and the Coach doubled it. */
.cx-main > .cx-ws-scr, .cx-main > .cx-phone-scr { padding: 32px 40px 48px; }
.cx-ws-scr .ws { margin: 0; }
.ws-top h1 { font: 600 22px/1.25 var(--cx-font); letter-spacing: -0.01em; }
.cx-main > .cx-coach { padding: 0 0 48px; }
@media (min-width: 768px) { .cx-desk2-main { padding: 32px 40px; } }
@media (max-width: 767px) { .cx-main > .cx-ws-scr, .cx-main > .cx-phone-scr { padding: 16px 16px 24px; } }

/* Chat header: the dot between the feeling and its reason took the look of the toolbar divider (a grey box). */
.cx-talk .tk-sub .tk-sep { width: auto; align-self: auto; margin: 0 4px; background: none; }

/* Chat composer: its "every child is full width" rule also widened the hidden label, so the chat scrolled sideways on a phone. */
.cx-talk .tk-comp > .sr { width: 1px; margin: 0; }

/* Question card: the other answers were bare text, one pushed to the far right and one alone on a row below. Now one row of
   answers of the same shape, the main one first. */
.cx-talk .tk-apv-a .tk-grow { display: none; }
.cx-talk .tk-apv-a .tk-link { border: 1px solid var(--cx-line-btn); color: var(--cx-text-2); }
.cx-talk .tk-apv-a .tk-link:hover { color: var(--cx-text); border-color: var(--cx-line-strong); }
.tk-apv-a + .tk-apv-a { margin-top: 0; padding-top: 0; }
.tk-apv-a > :only-child { grid-column: 1 / -1; }

/* Crew cards: the trust, runs and "last 12 hours" block sits at the bottom of every card, so these lines and the Talk/Customize
   buttons line up across a row whatever the text above says. */
.cx-main .cx-agcard.cx-crew-card > .cr-info { margin-top: auto; }
.cx-main .cx-agcard.cx-crew-card > .cr-info ~ .cx-ag-act { margin-top: 0; }

/* Team heading: "Open room" stays on the heading's line instead of dropping under a long description. */
.cx-crew-th { flex-wrap: nowrap; align-items: flex-start; }
.cx-crew-th > :first-child { flex: 1 1 auto; min-width: 0; }
.cx-crew-th > button, .cx-crew-th > a { flex: none; }

/* Crew card on a phone: "Last run failed â€¦ Retry" fell into the 52px picture column and broke one letter per line. */
@media (max-width: 640px) {
  .cx-crew-card .cx-ag-hold { grid-column: 1 / -1; margin: 8px 0 0; }
}
/* the title of the Report, Value and Workshop pages starts on the same line as every other page title (it was centred on a taller button) */
.cx-ws-scr .ws-toprow { align-items: flex-start; }
/* the Coach page starts at the same left edge as the other pages instead of centring itself in the wide area */
.cx-main > .cx-coach .co { margin-left: 0; margin-right: 0; }

/* ===== Voice player (2026-11-16): a recording shows its own waveform, the heard part in ember, and moves with the real loudness while it
   plays (web/src/voice_player.ts). ===== */
.vp { --vp-on: var(--cx-ember); --vp-off: var(--cx-line-strong); --vp-lv: 0; display: flex; align-items: center; gap: 14px; width: min(560px, 100%);
  padding: 10px 14px 10px 10px; border: 1px solid var(--cx-line); border-radius: 18px; background: var(--cx-bg); box-sizing: border-box; }
.vp .vp-play, .cx-main .vp .vp-play { position: relative; flex: none; display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; min-height: 48px; padding: 0;
  border: 0; border-radius: 50%; background: var(--cx-accent); color: var(--cx-accent-ink); cursor: pointer; transition: transform .12s ease; }
.vp-play svg { margin-left: 2px; }
.vp.vp-on .vp-play svg { margin-left: 0; }
.cx-main .vp .vp-play:hover { transform: scale(1.04); }
.cx-main .vp .vp-play:active { transform: scale(0.96); }
.vp-play:focus-visible, .vp-wave:focus-visible, .vp-rate:focus-visible { outline: 2px solid var(--cx-focus); outline-offset: 2px; }
/* the ring breathes with what is being said: it grows with the live loudness and is still in silence */
.vp-play::before { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--vp-on); opacity: 0; pointer-events: none;
  transform: scale(calc(1 + var(--vp-lv) * 0.28)); transition: opacity .2s ease; }
.vp.vp-on .vp-play::before { opacity: calc(0.25 + var(--vp-lv) * 0.75); }
.cx-main .vp.vp-on .vp-play { box-shadow: 0 0 calc(var(--vp-lv) * 22px) color-mix(in srgb, var(--vp-on) 55%, transparent); }
.vp-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.vp-wave { position: relative; height: 40px; cursor: pointer; border-radius: 8px; touch-action: none; }
.vp-wave canvas { display: block; width: 100%; height: 100%; }
.vp-meta { display: flex; align-items: center; gap: 8px; font: 500 12px/1 var(--cx-mono); color: var(--cx-text-faint); font-variant-numeric: tabular-nums; }
.vp-t { color: var(--cx-text-2); }
.vp-d { margin-left: auto; }
.vp .vp-rate, .cx-main .vp .vp-rate { min-height: 26px; height: 26px; padding: 0 9px; border: 1px solid var(--cx-line-btn); border-radius: 999px; background: transparent; color: var(--cx-text-2);
  font: 600 11.5px/1 var(--cx-font); cursor: pointer; }
.cx-main .vp .vp-rate:hover { color: var(--cx-text); border-color: var(--cx-line-strong); }
/* "speaking": three small bars that only move while there is sound */
.vp-live { display: inline-flex; align-items: flex-end; gap: 2px; height: 12px; opacity: 0; transition: opacity .2s ease; }
.vp-live i { width: 3px; height: 4px; border-radius: 2px; background: var(--vp-on); }
.vp.vp-talk .vp-live { opacity: 1; }
.vp.vp-talk .vp-live i { animation: vp-eq .7s ease-in-out infinite; }
.vp.vp-talk .vp-live i:nth-child(2) { animation-delay: -.25s; }
.vp.vp-talk .vp-live i:nth-child(3) { animation-delay: -.5s; }
@keyframes vp-eq { 0%, 100% { height: 3px; } 50% { height: 12px; } }
@media (prefers-reduced-motion: reduce) {
  .vp-play, .vp-play::before { transition: none; }
  .vp.vp-on .vp-play { box-shadow: none; }
  .vp.vp-talk .vp-live i { animation: none; height: 8px; }
}
@media (max-width: 640px) { .vp { gap: 10px; padding: 8px 10px 8px 8px; } .vp-wave { height: 34px; } }
.ph-detail .vp { width: min(560px, 100%); }

/* ===== Speech made visible (2026-11-16): a reply read aloud in the chat shows its words as bars; the part already read fills in and the
   word being said pops (web/src/speech_viz.ts). With a voice that reports no words: a calm shimmer, no fake progress. ===== */
.cx-talk .tk-hear[aria-pressed="true"] { border-color: color-mix(in srgb, var(--cx-ember) 60%, var(--cx-line-btn)); }
.sv { display: inline-flex; align-items: center; gap: 2px; height: 18px; margin-left: 4px; }
.sv-b { display: block; width: 3px; height: calc(4px + var(--h, .4) * 14px); border-radius: 2px; background: var(--cx-line-strong); transform-origin: center;
  transition: background .15s ease, transform .15s ease; }
.sv .sv-b.sv-done { background: var(--cx-ember); }
.sv .sv-b.sv-cur { background: var(--cx-ember); transform: scaleY(1.45); }
.sv.sv-free .sv-b { animation: sv-free 1.6s ease-in-out infinite; animation-delay: calc(var(--h, .4) * -1.6s); }
@keyframes sv-free { 0%, 100% { opacity: .45; transform: scaleY(.8); } 50% { opacity: 1; transform: scaleY(1.15); background: var(--cx-ember); } }
/* the voice conversation's orb beats on each word the agent says */
.cx-talk .tk-voice.speaking.sv-on .tk-orb-c { animation: none; transition: transform .12s ease-out; }
.cx-talk .tk-voice.speaking.sv-beat .tk-orb-c { animation: sv-orb .28s ease-out; }
.cx-talk .tk-voice.speaking.sv-beat .tk-orb::before { opacity: .9; animation: sv-ring .5s ease-out; }
@keyframes sv-orb { 0% { transform: scale(1); } 35% { transform: scale(1.12); } 100% { transform: scale(1); } }
@keyframes sv-ring { 0% { transform: scale(1); opacity: .9; } 100% { transform: scale(1.35); opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .sv-b, .sv .sv-b.sv-cur { transition: none; transform: none; }
  .sv.sv-free .sv-b { animation: none; }
  .cx-talk .tk-voice.speaking.sv-beat .tk-orb-c, .cx-talk .tk-voice.speaking.sv-beat .tk-orb::before { animation: none; }
}
/* the message tools bar: "Copy" broke into "Co / py" when the bar was squeezed */
.cx-talk .tk-tools { flex-wrap: nowrap; }
.cx-talk .tk-tools .tk-copy { white-space: nowrap; flex: none; }

/* 2026-11-16 fewer repeats + phone finish: the value sits under its label (not pushed down a stretched row); a count in a
   sentence uses normal digits ("11 together", not "1 1"); on the phone the note of the day keeps label and value on one line */
.cx .cx-tile, .cx-tile { align-content: start; }
.cx-crew-tog b, .cx-ag-sum b, .cx-morning { font-variant-numeric: normal; font-feature-settings: normal; }
@media (max-width: 767px) {
  .cx-crew-top .cx-morning li { display: grid; grid-template-columns: minmax(7.5em, auto) minmax(0, 1fr); align-items: center; gap: 0 12px; }
  .cx-crew-top .cx-morning-k { min-width: 0; }
  .cx-main .cx-crew-top .cx-morning .cx-link { min-height: 36px; }
}
/* the Runs table without its Tokens column when no run measured tokens */
.cx-run-notok .cx-run-head, .cx-main .cx-run-notok .cx-run-row { grid-template-columns: 84px minmax(0, 1fr) 64px 96px; }
.cx-run-notok .cx-run-head > span:nth-child(4), .cx-run-notok .cx-run-row > span:nth-child(4) { display: none; }
@media (max-width: 767px) { .cx-run-notok .cx-run-head, .cx-main .cx-run-notok .cx-run-row { grid-template-columns: 64px minmax(0, 1fr) 64px; } }

/* Observability Phase 6: what started a run, the runs an event caused, the slowest routes (same quiet type as the lines around them) */
.cx-run-from { margin: 6px 0 0; font-size: 13px; overflow-wrap: anywhere; }
.cx-hk-runs { list-style: none; margin: 0 0 8px; padding: 0; }
.cx-hk-runs li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: 4px 0; }
.cx-rt-l { list-style: none; margin: 0; padding: 0; }
.cx-rt-l li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 16px; padding: 8px 0; border-top: 1px solid var(--cx-line-soft); font-size: 13px; }
.cx-rt-l li:first-child { border-top: 0; }
.cx-rt-l .cx-mono { min-width: 0; overflow-wrap: anywhere; }

/* Observability Phase 8: the context a run saw (folded by default) and the run preparation line on Health; same quiet type as above */
.cx-run-ctx > summary { cursor: pointer; list-style-position: outside; font-size: 13px; overflow-wrap: anywhere; min-height: 24px; }
.cx-run-ctx > summary .cx-cap { display: inline; }
.cx-run-ctx[open] > summary { margin-bottom: 8px; }
.cx-ctx-t { width: 100%; border-collapse: collapse; font-size: 12px; table-layout: fixed; }
.cx-ctx-t th { text-align: left; font-weight: 500; color: var(--cx-text-muted); padding: 4px 6px 4px 0; }
.cx-ctx-t td { padding: 6px 6px 6px 0; border-top: 1px solid var(--cx-line-soft); overflow-wrap: anywhere; vertical-align: top; }
.cx-ctx-tm { margin: 8px 0 0; font-size: 12px; }
.cx-rprep { margin: 8px 0 0; padding-top: 8px; border-top: 1px solid var(--cx-line-soft); font-size: 13px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 16px; }

/* Company Crew mode (web/src/company.ts): Settings › Crew Operating Mode, the agent's company objectives, a company run's badge */
.cx-main .cx-co { grid-column: 1 / -1; }
.cx-co-now { margin: 0 0 10px; }
.cx-co-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 0 0 10px; }
.cx-main .cx-co-card { display: flex; gap: 10px; align-items: flex-start; text-align: left; padding: 12px 14px; min-height: 0; border: 2px solid var(--cx-line-2); border-radius: 12px; background: var(--cx-card-bg); }
.cx-main .cx-co-card:hover { background: var(--cx-card-bg); border-color: var(--cx-line-btn); }
.cx-main .cx-co-card.on { border-color: var(--cx-accent); }
.cx-co-card b { display: inline; }
.cx-co-card .cx-muted { display: block; margin-top: 4px; font-weight: 400; }
.cx-co-stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin: 10px 0; }
.cx-co-stats > div { border: 1px solid var(--cx-line-2); border-radius: 10px; padding: 8px 10px; }
.cx-co-stats b { display: block; font-size: 1.25em; }
.cx-co-mission textarea, .cx-co-mission input { width: 100%; margin: 4px 0 8px; }
.cx-co-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.cx-co-list li { border-top: 1px solid var(--cx-line-2); padding-top: 8px; }
.cx-co-list li:first-child { border-top: 0; padding-top: 0; }
.cx-co-ag { grid-column: 1 / -1; }
.cx-run-co { display: inline-block; margin-right: 6px; padding: 0 6px; border-radius: 6px; border: 1px solid var(--cx-accent); color: var(--cx-accent); font-size: .85em; }
@media (max-width: 720px) {
  .cx-co-cards { grid-template-columns: 1fr; }
  .cx-co-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.cx-co-card.on .cx-radio { border-color: var(--cx-accent); }
.cx-co-card.on .cx-radio::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--cx-accent); }

/* Company Crew: an objective's detail and decision trace (company.ts objectiveDetailHtml), beside the screen it was opened from */
.cx-co-det { position: fixed; top: 0; right: 0; bottom: 0; z-index: 40; width: min(440px, 100vw); box-sizing: border-box; display: flex; flex-direction: column;
  background: var(--cx-panel); color: var(--cx-text); border-left: 1px solid var(--cx-line-btn); box-shadow: -8px 0 24px rgba(0, 0, 0, .25); }
.cx-co-det-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 14px 16px 10px; border-bottom: 1px solid var(--cx-line-2); }
.cx-co-det-top h2 { margin: 0; font-size: 1.05em; line-height: 1.35; overflow-wrap: anywhere; }
.cx-co-det-top h2:focus { outline: none; }
.cx-co-det-body { overflow-y: auto; padding: 12px 16px 24px; }
.cx-co-det-body h3 { margin: 16px 0 6px; }
.cx-co-det-body p { margin: 4px 0; overflow-wrap: anywhere; }
.cx-co-dec.on { border-left: 3px solid var(--cx-accent); padding-left: 8px; }
.cx-main .cx-co-open { padding: 0; min-height: 0; text-align: left; }
@media (max-width: 720px) { .cx-co-det { width: 100vw; border-left: 0; } }

/* Company Crew: Settings › Crew Operating Mode › Waiting for you (spec item 2) */
.cx-co-wait { margin: 14px 0 6px; }
.cx-co-wait h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font-size: 1em; }
.cx-co-wa { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 6px; }
.cx-co-no { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; width: 100%; }
.cx-co-no input { flex: 1 1 220px; min-height: 40px; padding: 0 10px; border: 1px solid var(--cx-line-btn); border-radius: 10px; background: var(--cx-bg); color: var(--cx-text); font: inherit; }
.cx-co-using { margin: 0 0 8px; padding: 8px 10px; border-left: 3px solid var(--cx-accent); }
/* spec item 4: Memory › Company and the Value screen's company panel (company.ts) */
.cx-co-mem h2 { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 4px; }
.cx-co-mem-q { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 10px 0 14px; }
.cx-co-mem-q input { flex: 1 1 220px; min-height: 40px; padding: 0 10px; border: 1px solid var(--cx-line-btn); border-radius: 10px; background: var(--cx-bg); color: var(--cx-text); font: inherit; }
.cx-co-mem-o p { margin: 4px 0; }
.val-co { margin-top: 14px; }
.val-co h2 { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 4px; font-size: 1.05em; }
.val-co .val-sum { margin: 10px 0; }

/* Company Crew: the agent's Company participation (Job tab) and Ask-first wakes in Waiting for you */
.cx-co-pol .cx-seg { margin: 0; }
.cx-co-pol p { margin: 0; }

/* Crew Continuity Layer: an objective's supporting work items, and a work item's origin and Company objectives (company.ts) */
.cx-co-work li { margin: 4px 0; }
.cx-co-wi { margin: 6px 0 0; overflow-wrap: anywhere; }
.cx-card.cx-wi-on { border-left: 3px solid var(--cx-accent); }
.cx-card.cx-wi-on:focus { outline: 2px solid var(--cx-accent); outline-offset: 2px; }
/* GAP 3: link an existing work item / unlink one, inside the objective panel */
.cx-co-wl { margin: 10px 0 4px; padding: 10px 12px; border: 1px solid var(--cx-line-2); border-radius: 10px; }
.cx-co-wl h4 { margin: 0 0 8px; }
.cx-co-wl-f { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.cx-co-wl-f input { flex: 1 1 100%; min-height: 40px; padding: 0 10px; border: 1px solid var(--cx-line-btn); border-radius: 10px; background: var(--cx-bg); color: var(--cx-text); font: inherit; box-sizing: border-box; }
.cx-co-wl-f select { flex: 1 1 120px; min-height: 40px; min-width: 0; }
.cx-co-wl-res li.on { border-left: 3px solid var(--cx-accent); padding-left: 6px; }
.cx-co-wl-msg { margin: 8px 0 0; }
.cx-co-wl .cx-co-err { margin-top: 8px; }
.cx-co-unl, .cx-co-wl-ok { margin: 6px 0; }
/* Crew Continuity Layer: the switch's live preview, its error, and Recent switches */
.cx-co-prev { margin: 0; padding: 0 0 0 18px; display: grid; gap: 4px; font-size: 14px; line-height: 1.45; max-width: 70ch; }
.cx-co-err { margin: 0; color: var(--cx-danger); }
.cx-co-hist { margin: 14px 0 6px; }
.cx-co-hist h3 { margin: 0 0 8px; font-size: 1em; }
.cx-co-pend, .cx-co-fail { display: inline-flex; padding: 1px 10px; border-radius: 999px; border: 1px solid var(--cx-warn-line); color: var(--cx-warn-text); font-size: 12px; }
.cx-co-fail { border-color: var(--cx-danger-line); color: var(--cx-danger); }

/* Settings, one topic at a time (Kabil 17 Nov; Claude Design canvas "Valnivo Crew Settings redesign"): a topic list beside one topic's
   sections; the search shows matching sections from every topic. Sections keep their own styles; they stack in one readable column. */
.cx-st-find { display: flex; align-items: center; gap: 8px; min-height: 44px; min-width: 260px; padding: 0 14px; box-sizing: border-box; border: 1px solid var(--cx-line-btn); border-radius: 10px; background: var(--cx-panel); color: var(--cx-text-muted); }
.cx-st-find input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--cx-text); font: inherit; outline: none; }
.cx-st-find:focus-within { border-color: var(--cx-text-muted); }
.cx-st-row { display: flex; flex-wrap: wrap; gap: 32px; align-items: flex-start; margin-top: 8px; }
.cx-st-nav { flex: 1 1 220px; max-width: 260px; display: flex; flex-direction: column; gap: 4px; position: sticky; top: 16px; }
.cx-main .cx-st-t { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 52px; padding: 8px 12px; border: 0; border-radius: 10px; background: transparent; color: var(--cx-text); text-align: left; cursor: pointer; font-weight: 400; }
.cx-main .cx-st-t:hover { background: var(--cx-raised); }
.cx-main .cx-st-t.on { background: var(--cx-raised); }
.cx-st-tl { display: flex; flex-direction: column; min-width: 0; }
.cx-st-tl b { font-weight: 500; }
.cx-st-tl .cx-muted { font-size: 12px; }
.cx-st-t .cx-count { margin-left: auto; }
.cx-st-main { flex: 999 1 560px; min-width: 0; max-width: 880px; display: flex; flex-direction: column; gap: 20px; }
.cx-st-h h2 { margin: 0; font-size: 20px; font-weight: 600; }
.cx-st-h h2:focus { outline: none; }
.cx-st-h p { margin: 4px 0 0; }
.cx-st-main .cx-st-s { display: none; }
.cx-st-main[data-cur="general"]:not(.cx-st-q) .cx-st-s[data-topic="general"],
.cx-st-main[data-cur="members"]:not(.cx-st-q) .cx-st-s[data-topic="members"],
.cx-st-main[data-cur="crew"]:not(.cx-st-q) .cx-st-s[data-topic="crew"],
.cx-st-main[data-cur="company"]:not(.cx-st-q) .cx-st-s[data-topic="company"],
.cx-st-main[data-cur="notify"]:not(.cx-st-q) .cx-st-s[data-topic="notify"],
.cx-st-main[data-cur="integrations"]:not(.cx-st-q) .cx-st-s[data-topic="integrations"],
.cx-st-main[data-cur="advanced"]:not(.cx-st-q) .cx-st-s[data-topic="advanced"],
.cx-st-main.cx-st-q .cx-st-s.cx-st-hit { display: block; }
.cx-st-main .cx-st-s > .cx-card { margin: 0; }
.cx-st-main .cx-card.cx-set { border-radius: 14px; }
.cx-st-none { margin: 0; }
@media (max-width: 720px) {
  .cx-st-find { min-width: 0; width: 100%; }
  .cx-st-row { gap: 16px; }
  .cx-st-nav { position: static; max-width: none; flex-basis: 100%; flex-direction: row; flex-wrap: wrap; gap: 6px; }
  .cx-main .cx-st-t { width: auto; min-height: 44px; padding: 6px 12px; border: 1px solid var(--cx-line-btn); border-radius: 999px; }
  .cx-st-tl .cx-muted { display: none; }
}
/* Crew Continuity Layer: the switch's real effects, and the Operating mode history (switches, their side effects, recommendations) */
.cx-co-done { margin: 6px 0 10px; max-width: 70ch; line-height: 1.45; }
.cx-co-htog { font-weight: 600; font-size: 1em; }
.cx-co-hsw, .cx-co-hrec { margin: 6px 0; line-height: 1.45; overflow-wrap: anywhere; }
.cx-co-hrec { padding-left: 10px; border-left: 2px dashed var(--cx-line, currentColor); }
.cx-co-hist .cx-co-pend, .cx-co-hist .cx-co-fail { display: inline; padding: 0; border: 0; border-radius: 0; font-size: inherit; }
.cx-co-rec { color: var(--cx-warn-text); }
/* Settings redesign, pass 2: each section is a card of its own; in Crew and Integrations each folds to its title and first line */
.cx-st-main .cx-st-s > .cx-card, .cx-st-main .cx-st-s > .cx-set, .cx-st-main .cx-st-s > section { margin: 0; padding: 20px 22px; border: 1px solid var(--cx-line-2); border-radius: 14px; background: var(--cx-card-bg); }
.cx-st-d { border: 1px solid var(--cx-line-2); border-radius: 14px; background: var(--cx-card-bg); }
.cx-st-d > summary { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 10px 22px; cursor: pointer; list-style: none; }
.cx-st-d > summary::-webkit-details-marker { display: none; }
.cx-st-d > summary:focus-visible { outline: 2px solid var(--cx-focus, #e9e9ea); outline-offset: 2px; border-radius: 14px; }
.cx-st-d > summary svg { margin-left: auto; flex: none; transform: rotate(90deg); transition: transform 0.15s; color: var(--cx-text-muted); }
.cx-st-d[open] > summary svg { transform: rotate(-90deg); }
.cx-st-dt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cx-st-dt b { font-weight: 600; }
.cx-st-dt .cx-muted { font-size: 13px; }
.cx-st-d > .cx-card, .cx-st-d > .cx-set, .cx-st-d > section { margin: 0; padding: 4px 22px 20px; border: 0; border-top: 1px solid var(--cx-line-2); border-radius: 0; background: transparent; }
.cx-st-d > section > h2:first-child, .cx-st-d > .cx-set > h2:first-child { display: none; }
.cx-st-d > section > h2:first-child + p.cx-muted { display: none; }
.cx-main .cx-st-h h2:focus, .cx-main .cx-st-h h2:focus-visible { outline: none; box-shadow: none; }   /* the topic title takes focus after a topic click (for screen readers); no ring */
/* Collaborations (#/console/collabs, collabs.ts): Workshop and Value classes; only what differs */
.clb .ws-head { cursor: default; align-items: center; }
.clb .ws-head:hover { background: none; }
.clb .ws-head .cx-opt { flex: none; }
.clb .ws-filters { display: flex; gap: 6px; flex-wrap: wrap; }
.clb .ws-log { max-height: 420px; }
@media (max-width: 767px) { .clb .ws-head { flex-wrap: wrap; } }

/* Kabil 17 Nov: while the crew controls this computer, every Console screen shows it (talk.ts ctlWarn) */
.crew-ctl-banner{position:fixed;top:0;left:0;right:0;z-index:2147483000;display:flex;align-items:center;justify-content:center;gap:12px;
  flex-wrap:wrap;padding:8px 16px;background:#b3261e;color:#fff;font-weight:600;font-size:14px;line-height:1.35;box-shadow:0 2px 10px rgba(0,0,0,.35)}
.crew-ctl-banner .crew-ctl-back{background:#fff;color:#b3261e;border:0;min-height:32px;padding:0 12px;border-radius:8px;font-weight:700;cursor:pointer}
.crew-ctl-banner .crew-ctl-back:focus-visible{outline:2px solid #fff;outline-offset:2px}
/* Settings > Members (members.ts) */
.cx-mem-row .cx-mem-a { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.cx-mem-inv { margin-top: 18px; display: grid; gap: 10px; }
.cx-mem-inv h3 { margin: 6px 0 0; font-size: 14px; }
.cx-mem-inv .cx-conn-line { flex-wrap: wrap; }
.cx-mem-inv .cx-conn-line input[type=email] { min-width: 200px; }
.cx-mem-link { display: grid; gap: 6px; }
.cx-set .cx-err[role=alert] { padding: 6px 0; color: var(--cx-danger); }
