/* Faces and glimpses (faces.js, docs/CONSOLE-REDESIGN.md §3.4, §4.2; step 10). The strip of faces across the top of
   Conversations on a phone, and the glimpse a long press opens: a bottom sheet on a phone, a card beside the face on a
   wide screen (the messaging rail's, step 11). Flat: hairlines; the glimpse is the only shadowed thing, being a floating
   one (--pop-bg, --elev-2). Tokens only (docs/THEMES.md). */

/* ---------- the strip ---------- */
.cv-faces { display: none; }
@media (max-width: 780px) {
  .cv-faces { display: block; flex: none; border-bottom: var(--hair, 1px solid var(--line)); }
  .cv-faces:empty { display: none; }
}
.fc-strip { display: flex; gap: 6px; overflow-x: auto; overflow-y: hidden; padding: 6px 14px 2px; scrollbar-width: none; overscroll-behavior-x: contain; touch-action: pan-x; }
.fc-strip::-webkit-scrollbar { display: none; }
.fc { flex: none; width: 58px; display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 4px 0 2px; border: 0; background: none;
  color: var(--text-2); font: inherit; cursor: pointer; -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent; }
.fc-av { position: relative; flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font: 600 13px/1 var(--sans); letter-spacing: .02em;
  background: var(--ink-3); color: var(--text); }
.fc-av.k-agent { border-radius: 10px; font-family: var(--mono); font-weight: 500; }
.fc-av.k-group { font-size: 17px; }
/* a ring: this one needs you (a question, an owed reply, unread words) */
.fc.needs .fc-av { box-shadow: 0 0 0 2px var(--content-bg), 0 0 0 4px var(--canopy); }
.fc-n { position: absolute; top: -5px; right: -7px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; display: grid; place-items: center;
  font: 700 10px/1 var(--sans); font-style: normal; font-variant-numeric: tabular-nums; background: var(--canopy); color: var(--canopy-ink); }
.fc-dot { position: absolute; right: -2px; bottom: -2px; width: 11px; height: 11px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 2px var(--content-bg); }
.fc-ch { position: absolute; right: -5px; bottom: -4px; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; font-style: normal;
  background: var(--content-bg); color: var(--text-2); box-shadow: inset 0 0 0 1px var(--line-2); }
.fc-ch svg { width: 10px; height: 10px; display: block; }
.fc-l { max-width: 58px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11.5px; line-height: 1.2; }
.fc:focus-visible { outline: 0; }
.fc:focus-visible .fc-av { outline: var(--focus-w, 2px) solid var(--focus); outline-offset: 5px; }
.fc-hint { margin: 0; padding: 0 14px 8px; font-size: 11.5px; }

/* ---------- the glimpse ---------- */
.fc-scrim { position: fixed; inset: 0; z-index: var(--z-glimpse); background: var(--scrim); }
.fc-glimpse { position: fixed; z-index: calc(var(--z-glimpse) + 1); display: flex; flex-direction: column; overflow: hidden; background: var(--pop-bg); color: var(--text); box-shadow: var(--elev-2); }
.fc-glimpse.sheet { left: 0; right: 0; bottom: 0; max-height: 84dvh; border-radius: 14px 14px 0 0; padding: 0 env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); }
.fc-glimpse.card { width: min(360px, calc(100vw - 16px)); max-height: min(580px, calc(100vh - 16px)); max-height: min(580px, calc(100dvh - 16px)); border-radius: var(--content-radius); }
.fc-grip { width: 36px; height: 4px; border-radius: 2px; margin: 8px auto 0; flex: none; background: var(--line-2); }
.fc-glimpse.card .fc-grip { display: none; }
.fc-gh { display: flex; align-items: center; gap: 10px; padding: 8px 8px 10px 14px; border-bottom: var(--hair, 1px solid var(--line)); flex: none; }
.fc-gh .fc-av { width: 36px; height: 36px; font-size: 12px; }
.fc-gt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.fc-gt b, .fc-gt span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fc-gt span { font-size: 12px; }
.fc-x { flex: none; width: 40px; height: 40px; display: grid; place-items: center; border: 0; background: none; color: var(--text-2); }
.fc-x svg { width: 17px; height: 17px; }
/* Pin the face (§2.2), and taking over an agent (§4.6): a hairline note, no box. */
.fc-pin { flex: none; width: 36px; height: 36px; display: grid; place-items: center; border: 0; background: none; color: var(--text-2); border-radius: 8px; }
.fc-pin svg { width: 16px; height: 16px; }
.fc-pin.on { color: var(--accent); }
.fc-hold { font-size: 12px; margin: 8px 0 0 !important; padding: 6px 0; border-top: var(--hair, 1px solid var(--line)); color: var(--text-2); }
.fc-hold.mine { color: var(--text); }
.fc-take { margin-top: 0; }
/* The foot: actions that must stay reachable (an agent's Take over / Hand back), pinned under the scrolling body. */
.fc-gf { flex: none; padding: 8px 14px 10px; border-top: var(--hair, 1px solid var(--line)); }
.fc-gf[hidden] { display: none; }
.fc-gb { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 10px 14px 14px; }
.fc-gb p { margin: 0; }
.fc-task { font-size: 14.5px; overflow-wrap: anywhere; }
.fc-step { font-size: 12.5px; margin-top: 2px !important; }
.fc-screen { display: flex; gap: 6px; align-items: flex-start; font-size: 12px; margin: 8px 0 !important; }
.fc-screen svg { width: 14px; height: 14px; flex: none; margin-top: 1px; }
.fc-lines { margin: 0; padding: 8px 10px; border-radius: 6px; background: var(--sunk); font: 12px/1.45 var(--mono); max-height: 10em; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; }
.fc-who { font-size: 12.5px; margin-bottom: 8px !important; }
.fc-owed { color: var(--warn); }
.fc-msgs { display: flex; flex-direction: column; gap: 10px; margin: 2px 0 8px; }
.fc-msg { font-size: 14px; line-height: 1.4; overflow-wrap: anywhere; }
.fc-msg > span { display: block; font-size: 11.5px; margin-bottom: 1px; }
.fc-msg.ours { padding-left: 10px; border-left: 2px solid var(--line-2); }
.fc-note { font-size: 12px; margin: 4px 0 !important; }
.fc-held { border-left: 2px solid var(--warn); padding-left: 10px; margin: 10px 0; }
.fc-held blockquote { margin: 6px 0; overflow-wrap: anywhere; }
.fc-reply { border-top: var(--hair, 1px solid var(--line)); margin-top: 10px; padding-top: 10px; }
.fc-reply textarea { display: block; width: 100%; box-sizing: border-box; resize: vertical; min-height: 44px; padding: 8px 10px; border: 1px solid var(--control); border-radius: 6px;
  background: var(--ink-2); font: 15px/1.4 var(--sans); }
.fc-reply textarea:disabled, .fc-acts .btn:disabled { opacity: .5; cursor: not-allowed; }
.fc-ghost { margin: 6px 0 0 !important; font-size: 12.5px; color: var(--text-2); overflow-wrap: anywhere; }
.fc-ghost kbd { font-size: 10.5px; }
.fc-sug { color: var(--canopy-2); font-weight: 600; }
.fc-acts { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.fc-acts .sp, .fc-why { flex: 1; min-width: 0; }
.fc-why { font-size: 12px; }
@media (max-width: 780px) {
  .fc-reply textarea { font-size: 16px; } /* iOS doesn't zoom into a 16 px field */
  .fc-acts .btn, .fc-gh .btn { min-height: 40px; }
  .fc-x, .fc-pin { width: 44px; height: 44px; }
}

/* ---------- Settings: a page's own pages as tabs under its heading (Channels, Billing & usage) ---------- */
.set-tabs { margin: 0 0 18px; }
.fc-still { margin: 8px 0; border-radius: 6px; overflow: hidden; font-size: 12px; }
.fc-still img { border-radius: 6px; }
/* In a short window the picture gives way first, so the lines and Instruct need less scrolling (its shape is kept). */
.fc-still .gl-still-img { width: auto; max-height: 34vh; }
/* glimpse-still.js draws its <img> with an inline display; until a picture arrives it is [hidden] and must not show its alt text */
.fc-still .gl-still-img[hidden] { display: none !important; }

/* The live screen (stream-player.js, docs/STREAMS.md §4a–4c): full screen over the page. The picture first; everything
   else shows itself when it's needed (the owner, 26 Nov 2026): the header's tools when you reach for them, the dock once
   there are two apps, the chat as a pill until you talk or it asks you something. Flat, hairlines, quiet motion. */
.fc-live { margin: 0 0 8px; }
.sp-scrim { position: fixed; inset: 0; z-index: var(--z-preview); background: var(--scrim); display: flex; animation: sp-in .18s ease-out; }
@keyframes sp-in { from { opacity: 0; } }
.sp { position: relative; flex: 1; display: flex; flex-direction: column; background: #07090c; color: var(--text); margin: 12px; border-radius: 14px; overflow: hidden; min-height: 0; min-width: 0; box-shadow: 0 24px 80px rgba(0, 0, 0, .5); }
/* The header: who and which app, a status dot; the tools fade in when the pointer comes near or a key moves into them. */
.sp-head { display: flex; align-items: center; gap: 10px; height: 52px; padding: 0 10px 0 14px; min-width: 0; color: #e9e6df; }
.sp-who { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 14px; }
.sp-who b { font-weight: 600; white-space: nowrap; }
.sp-av { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: #1a2029; color: #a7adb6; font-size: 10px; font-weight: 700; }
.sp-av.st { color: var(--accent); } .sp-av svg { width: 14px; height: 14px; }
.sp-sep { color: #5d6570; }
.sp-app { display: inline-flex; align-items: center; gap: 6px; min-width: 0; color: #a7adb6; }
.sp-app svg { width: 14px; height: 14px; flex: none; }
.sp-app span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* A computer's own screen (§2b): the name is the picker, the whole screen or one window. Flat: text and a chevron. */
.sp-src { height: 32px; max-width: min(420px, 46vw); padding: 0 6px; margin: 0 -6px; font: inherit; font-size: 14px; background: none; border: 0; border-radius: 8px; cursor: pointer; transition: background .15s, color .15s; }
.sp-src:hover, .sp-src:focus-visible { background: #161b22; color: #fff; }
.sp-src .sp-src-c { display: inline-flex; flex: none; } .sp-src .sp-src-c svg { width: 12px; height: 12px; }
.sp-pal-why { margin: 0 20px 6px; font-size: 13px; }
.sp-pill { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 999px; background: #12161c; font-size: 12px; color: #a7adb6; }
.sp-pill i { width: 7px; height: 7px; border-radius: 50%; background: #8d949e; }
.sp-pill[data-s="live"] i { background: #3ddc97; box-shadow: 0 0 0 0 rgba(61, 220, 151, .6); animation: sp-pulse 2s infinite; }
.sp-pill[data-s="off"] i { background: #ff4d6a; }
.sp-pill[data-s="wait"] i { background: #ffb020; animation: sp-blink 1s infinite; }
@keyframes sp-pulse { 70% { box-shadow: 0 0 0 6px rgba(61, 220, 151, 0); } 100% { box-shadow: 0 0 0 0 rgba(61, 220, 151, 0); } }
.sp-rate { color: #6c737d; font-variant-numeric: tabular-nums; }
.sp-rate:empty { display: none; }
.sp-many { color: #a7adb6; font-variant-numeric: tabular-nums; }
.sp-many:empty { display: none; }
.sp-grow { flex: 1; }
.sp-tools { display: flex; gap: 2px; opacity: 0; transition: opacity .2s; }
.sp-head:hover .sp-tools, .sp-head:focus-within .sp-tools, .sp-tools:has([aria-pressed="true"]) { opacity: 1; }
@media (hover: none) { .sp-tools { opacity: 1; } }
.sp-ib { display: inline-flex; align-items: center; gap: 6px; height: 32px; min-width: 32px; justify-content: center; padding: 0 8px; font: inherit; font-size: 13px; background: none; border: 0; border-radius: 8px; color: #a7adb6; cursor: pointer; transition: background .15s, color .15s; }
.sp-ib svg { width: 16px; height: 16px; }
.sp-ib:hover, .sp-ib:focus-visible { background: #161b22; color: #fff; }
.sp-ib[aria-pressed="true"] { background: color-mix(in srgb, var(--accent) 18%, transparent); color: #fff; }
.sp-commentbtn span { display: none; }
.sp-commentbtn[aria-pressed="true"] span { display: inline; }
.sp-cmd { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 8px 0 10px; font: inherit; font-size: 13px; background: #12161c; border: 1px solid #1d232c; border-radius: 9px; color: #8d949e; cursor: pointer; transition: border-color .15s, color .15s; }
.sp-cmd:hover { color: #e9e6df; border-color: #2c3846; }
.sp-cmd svg { width: 14px; height: 14px; }
.sp-cmd kbd, .sp-pal-it kbd, .sp-dt-pic kbd { font: 600 11px/18px var(--mono); padding: 0 5px; border-radius: 4px; background: #1d232c; color: #a7adb6; }
/* The picture: centred, rounded, never covered by words; a thin line runs at the top while it connects. */
.sp-body { flex: 1; display: flex; min-height: 0; }
.sp-main { flex: 1; display: flex; flex-direction: column; min-width: 0; min-height: 0; position: relative; }
.sp-stage { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 4px 16px 16px; position: relative; overflow: hidden; touch-action: none; }
.sp-stage::before { content: ''; position: absolute; top: 0; left: 0; height: 2px; width: 30%; background: linear-gradient(90deg, transparent, var(--accent), transparent); opacity: 0; }
.sp-stage.loading::before { opacity: 1; animation: sp-load 1.1s ease-in-out infinite; }
@keyframes sp-load { from { transform: translateX(-100%); } to { transform: translateX(400%); } }
.sp-canvas { max-width: 100%; max-height: 100%; object-fit: contain; display: block; border-radius: 10px; box-shadow: 0 0 0 1px #1d232c, 0 12px 40px rgba(0, 0, 0, .45); transition: filter .25s, opacity .25s, transform .25s; }
.sp-canvas.sp-stale { opacity: .45; filter: blur(2px) saturate(.6); transform: scale(.995); }
.sp-canvas[hidden], .sp-words[hidden] { display: none; }
.sp-words { position: absolute; max-width: 460px; margin: 0; padding: 0 16px; text-align: center; color: #c8c8c8; font-size: 14px; pointer-events: none; }
/* Over a picture, words are a small note in its corner, never across its middle. */
.sp-stage:has(.sp-canvas:not([hidden])) .sp-words { top: 14px; left: 28px; max-width: min(420px, 60%); padding: 8px 12px; text-align: left; font-size: 13px; background: rgba(7, 9, 12, .82); border: 1px solid #1d232c; border-radius: 10px; backdrop-filter: blur(6px); }
.sp-fix { position: absolute; top: calc(50% + 36px); margin: 0; padding: 0 16px; display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; justify-content: center; color: #c8c8c8; font-size: 13px; }
.sp-stage:has(.sp-canvas:not([hidden])) .sp-fix { top: auto; bottom: 28px; }
.sp-fix .dim { color: #9a9a9a; }
/* The chat, closed: one quiet pill on the picture. */
.sp-talk { position: absolute; right: 28px; bottom: 28px; display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px 0 12px; font: inherit; font-size: 14px; color: #e9e6df; background: rgba(18, 22, 28, .86); border: 1px solid #2c3846; border-radius: 999px; backdrop-filter: blur(8px); cursor: pointer; box-shadow: 0 8px 24px rgba(0, 0, 0, .35); transition: transform .15s, border-color .15s; }
.sp-talk:hover { transform: translateY(-1px); border-color: #4a5563; }
.sp-talk svg { width: 16px; height: 16px; }
.sp-talk-n { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--warn); color: #000; font-size: 11px; line-height: 20px; text-align: center; }
.sp-talk[hidden], .sp-talk-n[hidden] { display: none; }
/* Comment mode: a crosshair, a hint that fades, pins and boxes over the picture, and the note next to them. */
.sp-stage[data-mode="comment"] .sp-canvas { cursor: crosshair; box-shadow: 0 0 0 2px var(--accent), 0 12px 40px rgba(0, 0, 0, .45); }
.sp-hint { position: absolute; top: 14px; left: 50%; transform: translateX(-50%); margin: 0; padding: 6px 14px; border-radius: 999px; background: rgba(7, 9, 12, .82); color: #fff; font-size: 12px; pointer-events: none; opacity: 0; transition: opacity .25s; white-space: nowrap; }
.sp-stage.hinting .sp-hint { opacity: 1; }
.sp-layer { position: absolute; inset: 0; pointer-events: none; }
.sp-pin { position: absolute; width: 0; height: 0; }
.sp-pin span { position: absolute; left: -12px; top: -12px; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; box-shadow: 0 2px 8px rgba(0, 0, 0, .5); animation: sp-pop .2s ease-out; }
@keyframes sp-pop { from { transform: scale(.4); opacity: 0; } }
.sp-box { position: absolute; border: 2px solid var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); border-radius: 4px; }
.sp-box span { position: absolute; left: -2px; top: -22px; padding: 1px 7px; border-radius: 4px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; }
.sp-draft.sp-box { border-style: dashed; }
.sp-draft.sp-pin span { background: #fff; border: 2px solid var(--accent); }
.sp-sent { pointer-events: auto; cursor: help; }
.sp-pop { position: absolute; z-index: var(--z-raise); display: grid; gap: 8px; padding: 10px; background: #12161c; color: #e9e6df; border: 1px solid #2c3846; border-radius: 12px; box-shadow: 0 12px 32px rgba(0, 0, 0, .5); animation: sp-in .12s ease-out; }
.sp-pop textarea { width: 100%; font: inherit; font-size: 14px; resize: none; background: transparent; color: inherit; border: 0; outline: none; }
.sp-pop-acts { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.sp-pop-acts .dim { margin-right: auto; }
/* The dock: there once there are two apps. Live mini-screens, the one shown marked, number keys on hover. */
.sp-dock { display: flex; align-items: flex-end; gap: 10px; padding: 0 16px; max-height: 0; opacity: 0; overflow-x: auto; overflow-y: hidden; transition: max-height .25s ease, opacity .2s, padding .25s; }
.sp.many .sp-dock { max-height: 132px; opacity: 1; padding: 8px 16px 14px; }
.sp-dt { flex: none; width: 128px; display: grid; gap: 5px; padding: 0; font: inherit; background: none; border: 0; color: #8d949e; cursor: pointer; text-align: left; }
.sp-dt-pic { position: relative; display: block; aspect-ratio: 16 / 10; background: #0d1117; border-radius: 8px; overflow: hidden; box-shadow: 0 0 0 1px #1d232c; transition: transform .18s, box-shadow .18s; }
.sp-dt-pic img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.sp-dt-pic kbd { position: absolute; right: 5px; top: 5px; opacity: 0; transition: opacity .15s; }
.sp-dock:hover kbd, .sp-dock:focus-within kbd { opacity: 1; }
.sp-dt-name { display: flex; align-items: center; gap: 5px; font-size: 12px; min-width: 0; }
.sp-dt-name svg { width: 12px; height: 12px; flex: none; }
.sp-dt-name span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-dt:hover .sp-dt-pic { transform: translateY(-3px); box-shadow: 0 0 0 1px #4a5563, 0 8px 20px rgba(0, 0, 0, .4); }
.sp-dt.on { color: #e9e6df; }
.sp-dt.on .sp-dt-pic { box-shadow: 0 0 0 1.5px rgba(233, 230, 223, .85); }
.sp-dt.on .sp-dt-name { position: relative; }
.sp-dt.on .sp-dt-name::before { content: ''; position: absolute; left: 0; top: -4px; width: 16px; height: 2px; border-radius: 2px; background: var(--accent); }
.sp-dt.moved .sp-dt-name::after { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--info); flex: none; }
.sp-dock-add { flex: none; align-self: center; width: 36px; height: 36px; margin-bottom: 18px; display: grid; place-items: center; background: #12161c; border: 1px dashed #2c3846; border-radius: 50%; color: #a7adb6; cursor: pointer; transition: color .15s, border-color .15s, transform .15s; }
.sp-dock-add:hover { color: #fff; border-color: #4a5563; transform: rotate(90deg); }
.sp-dock-add svg { width: 16px; height: 16px; }
/* The command palette: its apps, opening one, everything you can do, or a message. */
.sp-pal-scrim { position: absolute; inset: 0; z-index: var(--z-popover); display: flex; justify-content: center; align-items: flex-start; padding-top: min(14vh, 120px); background: rgba(0, 0, 0, .45); animation: sp-in .12s ease-out; }
.sp-pal { width: min(620px, calc(100% - 24px)); max-height: min(70vh, 560px); display: flex; flex-direction: column; background: #0f1318; border: 1px solid #2c3846; border-radius: 14px; box-shadow: 0 24px 64px rgba(0, 0, 0, .6); overflow: hidden; animation: sp-rise .16s ease-out; }
@keyframes sp-rise { from { transform: translateY(8px) scale(.98); opacity: 0; } }
.sp-pal-in { display: flex; align-items: center; gap: 10px; margin: 10px; padding: 0 12px; height: 46px; background: #161b22; border-radius: 10px; color: #8d949e; }
.sp-pal-in svg { width: 18px; height: 18px; flex: none; }
.sp-pal-in input { flex: 1; min-width: 0; height: 100%; padding: 0; font: inherit; font-size: 16px; background: transparent; border: 0; box-shadow: none; color: #e9e6df; }
.sp-pal-list { overflow-y: auto; padding: 6px; }
.sp-pal-g { margin: 8px 10px 4px; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: #6c737d; }
.sp-pal-it { width: 100%; display: flex; align-items: center; gap: 12px; padding: 8px 10px; font: inherit; font-size: 14px; text-align: left; background: none; border: 0; border-radius: 8px; color: #c9ced6; cursor: pointer; }
.sp-pal-it.on { background: #1d242e; color: #fff; }
.sp-pal-it.on .sp-pal-ic { background: color-mix(in srgb, var(--accent) 20%, #161b22); color: #fff; }
.sp-pal-it img { width: 48px; height: 30px; object-fit: cover; object-position: top; border-radius: 4px; box-shadow: 0 0 0 1px #2c3846; flex: none; }
.sp-pal-ic { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px; background: #161b22; color: #a7adb6; flex: none; }
.sp-pal-ic svg { width: 15px; height: 15px; }
.sp-pal-l { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-pal-none { margin: 16px; text-align: center; }
/* The chat: the agent's words as text, yours in a soft bubble; its questions as slim cards; one rounded composer. */
.sp-chat { width: 380px; flex: none; display: flex; flex-direction: column; min-height: 0; background: #0b0e12; border-left: 1px solid #161b22; animation: sp-slide .2s ease-out; }
@keyframes sp-slide { from { transform: translateX(16px); opacity: 0; } }
.sp-chat[hidden] { display: none; }
.sp-chathead { display: flex; align-items: center; gap: 6px; height: 44px; padding: 0 6px 0 16px; font-size: 13px; border-bottom: 1px solid #161b22; }
.sp-scroll { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; }
.sp-msgs { flex: 1; padding: 16px; display: flex; flex-direction: column; gap: 14px; }
.sp-m { display: flex; animation: sp-in .2s ease-out; }
.sp-m.me { justify-content: flex-end; }
.sp-b { max-width: 88%; font-size: 14px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; color: #d7dbe0; }
.sp-m.me .sp-b { padding: 8px 12px; border-radius: 16px 16px 4px 16px; background: #1a2029; color: #eef0f2; }
.sp-crop { display: block; max-width: 100%; margin-bottom: 6px; border-radius: 8px; }
.sp-ctxline { display: flex; align-items: center; gap: 5px; margin-bottom: 4px; font-size: 11px; color: #8d949e; }
.sp-ctxline svg { width: 12px; height: 12px; }
.sp-working { display: grid; gap: 8px; width: 100%; }
.sp-workhead { display: inline-flex; align-items: center; gap: 8px; color: #a7adb6; font-size: 13px; }
.sp-spin { width: 12px; height: 12px; border-radius: 50%; border: 2px solid #2c3846; border-top-color: var(--accent); animation: sp-rot .8s linear infinite; }
@keyframes sp-rot { to { transform: rotate(360deg); } }
@keyframes sp-blink { 50% { opacity: .35; } }
.sp-tail { margin: 0; padding: 8px 10px; background: #0f1318; border-radius: 8px; max-height: 150px; overflow: hidden; font: 12px/1.5 var(--mono); color: #8d949e; white-space: pre-wrap; overflow-wrap: anywhere; }
.sp-none { margin: auto; display: grid; justify-items: center; gap: 6px; text-align: center; font-size: 13px; max-width: 260px; }
.sp-none-ic { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; background: #12161c; color: var(--accent); }
.sp-none-ic svg { width: 18px; height: 18px; }
.sp-asks { display: grid; gap: 8px; padding: 0 12px 4px; }
.sp-asks:empty { display: none; }
.sp-ask { display: grid; gap: 6px; padding: 12px; background: color-mix(in srgb, var(--warn) 6%, #101419); border: 1px solid color-mix(in srgb, var(--warn) 24%, transparent); border-radius: 12px; font-size: 13px; animation: sp-rise .2s ease-out; }
.sp-ask-k { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--warn); }
.sp-ask-k svg { width: 12px; height: 12px; }
.sp-ask b { overflow-wrap: anywhere; }
.sp-ask-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.sp-bk { display: flex; align-items: center; gap: 8px; padding-top: 6px; border-top: 1px solid #1d232c; }
.sp-bk:first-of-type { border-top: 0; padding-top: 0; }
.sp-bk-m { flex: 1; min-width: 0; display: grid; }
.sp-bk-m b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-bk-m .dim { font-size: 12px; }
.sp-ask-more { margin: 0; font-size: 12px; }
.sp-say { position: relative; display: grid; grid-template-columns: 1fr auto auto; align-items: end; gap: 4px; margin: 8px 12px 12px; padding: 8px 8px 8px 12px; background: #12161c; border: 1px solid #1d232c; border-radius: 14px; transition: border-color .15s; }
.sp-say:focus-within { border-color: #2c3846; }
.sp-say textarea { grid-column: 1; font: inherit; font-size: 14px; line-height: 1.45; padding: 6px 0; resize: none; background: transparent; color: #eef0f2; border: 0; outline: none; max-height: 160px; }
.sp-say-tip { grid-column: 1 / -1; grid-row: 3; font-size: 11px; display: none; }
.sp-say:focus-within .sp-say-tip { display: block; }
.sp-send { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; border: 0; background: var(--accent); color: #fff; cursor: pointer; transition: opacity .15s, transform .15s; }
.sp-send:disabled { opacity: .3; cursor: default; }
.sp-send:not(:disabled):hover { transform: scale(1.06); }
.sp-send svg { width: 16px; height: 16px; }
.sp-say .vm-mic { width: 34px; height: 34px; border-radius: 50%; }
.sp-say .vm-rec:empty { display: none; }
.sp-say .vm-rec { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; font-size: 13px; }
.sp-say.vm-on textarea, .sp-say.vm-on .sp-send, .sp-say.vm-on .vm-mic { display: none; }
.sp-ctx { grid-column: 1 / -1; display: inline-flex; align-items: center; gap: 6px; justify-self: start; max-width: 100%; height: 24px; padding: 0 4px 0 8px; border-radius: 999px; background: #1a2029; font-size: 12px; color: #a7adb6; }
.sp-ctx[hidden] { display: none; }
.sp-ctx svg { width: 12px; height: 12px; flex: none; }
.sp-ctx span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-ctx-x { display: inline-flex; padding: 3px; background: none; border: 0; color: #6c737d; cursor: pointer; border-radius: 50%; }
.sp-ctx-x:hover, .sp-ctx-x:focus-visible { color: #fff; }
.sp-ctx-x svg { width: 11px; height: 11px; }
/* Focus chat: the picture becomes a narrow live column, the chat takes the room (F). */
.sp.chatfocus .sp-main { flex: 0 0 min(400px, 36%); }
.sp.chatfocus .sp-chat { flex: 1; width: auto; }
.sp.chatfocus .sp-dt { width: 96px; }
.sp.chatfocus .sp-msgs { padding: 24px max(24px, calc(50% - 360px)); }
.sp.chatfocus .sp-say { margin-left: max(12px, calc(50% - 360px)); margin-right: max(12px, calc(50% - 360px)); }
@media (max-width: 899px) {
  .sp-body { flex-direction: column; }
  .sp-chat { width: auto; height: 46vh; border-left: 0; border-top: 1px solid #161b22; animation-name: sp-up; }
  @keyframes sp-up { from { transform: translateY(16px); opacity: 0; } }
  .sp.chatfocus .sp-main { flex: 0 0 auto; height: 30vh; }
  .sp.chatfocus .sp-chat { height: auto; flex: 1; }
  .sp.chatfocus .sp-dock { display: none; }
}
@media (max-width: 640px) {
  .sp { margin: 0; border-radius: 0; }
  .sp-head { height: 48px; gap: 6px; padding: 0 4px 0 10px; }
  .sp-sep, .sp-who b { display: none; }
  .sp-cmd span, .sp-cmd kbd { display: none; }
  .sp-cmd { width: 36px; padding: 0; justify-content: center; }
  .sp-rate { display: none; }
  .sp-stage { padding: 0 8px 8px; }
  .sp-dt { width: 104px; }
  .sp-talk { right: 16px; bottom: 16px; }
  .sp-stage:has(.sp-canvas:not([hidden])) .sp-words { left: 16px; max-width: calc(100% - 32px); }
  .sp-pal-scrim { padding-top: 8px; align-items: flex-start; }
}

/* Its apps (apps-row.js, docs/STREAMS.md §4a): a row of live thumbnails, one per app, and "Open an app". Flat: each
   picture has a hairline, no card around it. On a phone the row scrolls sideways and a tile is most of the width. */
.ap-count { margin-left: 6px; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--text-3); }
.ap-row { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x proximity; padding-bottom: 6px; -webkit-overflow-scrolling: touch; }
.ap-tile { flex: 0 0 220px; scroll-snap-align: start; min-width: 0; }
.ap-thumb { position: relative; display: flex; align-items: center; justify-content: center; width: 100%; aspect-ratio: 16 / 10; padding: 0; overflow: hidden;
  background: #000; border: 1px solid var(--line); border-radius: var(--radius-s); cursor: pointer; color: var(--text-2); }
.ap-thumb img { width: 100%; height: 100%; object-fit: contain; display: block; }
.ap-thumb:hover, .ap-thumb:focus-visible { border-color: var(--text-3); }
.ap-wait { width: 40%; height: 2px; background: var(--line); border-radius: 1px; }
.ap-live { position: absolute; left: 8px; bottom: 8px; display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px 2px 6px; border-radius: 999px;
  background: rgba(0, 0, 0, .62); color: #fff; font-size: 11px; opacity: 0; transition: opacity .15s; }
.ap-live svg { width: 12px; height: 12px; }
.ap-thumb:hover .ap-live, .ap-thumb:focus-visible .ap-live { opacity: 1; }
@media (hover: none) { .ap-live { opacity: 1; } }
.ap-add { flex-direction: column; gap: 6px; background: transparent; border-style: dashed; font-size: 13px; }
.ap-add svg { width: 20px; height: 20px; }
.ap-add[disabled] { opacity: .45; cursor: not-allowed; }
.ap-meta { display: grid; grid-template-columns: 1fr auto; align-items: center; column-gap: 6px; margin-top: 6px; font-size: 13px; }
.ap-name { font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ap-by { grid-column: 1 / -1; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ap-x { display: inline-flex; padding: 4px; margin: -4px -4px -4px 0; background: none; border: 0; color: var(--text-3); cursor: pointer; border-radius: var(--radius-s); }
.ap-x:hover, .ap-x:focus-visible { color: var(--text); }
.ap-x svg { width: 14px; height: 14px; }
.ap-none { margin: 8px 0 0; }
.ap-menu { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); display: grid; gap: 10px; max-width: 460px; }
.ap-kinds { display: flex; flex-wrap: wrap; gap: 8px; }
.ap-kind input { position: absolute; opacity: 0; pointer-events: none; }
.ap-kind span { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; font-size: 13px; cursor: pointer; }
.ap-kind span svg { width: 14px; height: 14px; }
.ap-kind input:checked + span { border-color: var(--text-2); color: var(--text); }
.ap-kind input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }
.ap-url { display: grid; gap: 4px; font-size: 12px; }
.ap-url input { width: 100%; font: inherit; font-size: 14px; }
.ap-note { margin: 0; font-size: 12px; }
.ap-acts { display: flex; gap: 8px; }
@media (max-width: 640px) { .ap-tile { flex-basis: 72%; } }

/* Blocked by the Gate (gate-blocked.js): one line per website the agent's computer was refused. Flat, hairlines. */
.bk-list { list-style: none; margin: 0; padding: 0; }
.bk-row { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 4px 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.bk-row:first-child { border-top: 0; padding-top: 4px; }
.bk-ic { display: inline-flex; color: var(--text-3); } .bk-ic svg { width: 16px; height: 16px; }
.bk-m { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; min-width: 0; }
.bk-host { font-weight: 600; overflow-wrap: anywhere; }
.bk-when { font-size: 12px; }
.bk-why { flex-basis: 100%; font-size: 12px; }
.bk-acts { display: flex; align-items: center; gap: 4px; }
.bk-x { display: inline-flex; padding: 6px; background: none; border: 0; color: var(--text-3); cursor: pointer; border-radius: var(--radius-s); }
.bk-x:hover, .bk-x:focus-visible { color: var(--text); } .bk-x svg { width: 14px; height: 14px; }
.bk-confirm { grid-column: 1 / -1; padding: 8px 0 2px 26px; }
.bk-confirm p { margin: 0 0 8px; font-size: 13px; color: var(--text-2); max-width: 60ch; }
.bk-cacts { display: flex; flex-wrap: wrap; gap: 8px; }
.bk-done { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 6px 8px; margin: 0 0 8px; font-size: 13px; color: var(--text-2); }
@media (max-width: 640px) { .bk-done { grid-template-columns: auto 1fr; } .bk-done .btn { grid-column: 2; justify-self: start; } }
.bk-done svg { width: 16px; height: 16px; color: var(--ok); flex: none; }
@media (max-width: 640px) { .bk-confirm { padding-left: 0; } }
.bk-n { margin-left: 4px; letter-spacing: 0; font-weight: 400; font-variant-numeric: tabular-nums; }
.bk-more { display: inline-flex; align-items: center; min-height: 36px; margin: 2px 0 0 26px; padding: 0; font-size: 13px; color: var(--text-2); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-2, var(--line)); }
.bk-more:hover, .bk-more:focus-visible { color: var(--text); }

/* Agents › Screens (screens-wall.js, docs/STREAMS.md §4c): every agent's screens. A tile is its picture (what it's
   working in), who it is and what it's doing, and its open apps as chips. Flat: hairlines, the accent edge only when
   it needs you. */
.sw-host { padding: 16px; }
.sw-hint { margin: 0 0 12px; font-size: 13px; }
.sw-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px 16px; margin: 0; padding: 0; list-style: none; }
.sw-cell { min-width: 0; }
.sw-tile { display: grid; gap: 8px; }
.sw-picwrap { position: relative; }
.sw-pic { position: relative; display: grid; place-items: center; width: 100%; aspect-ratio: 16 / 10; padding: 0; overflow: hidden; background: #000; border: 1px solid var(--line); border-radius: var(--radius-s); cursor: pointer; color: var(--text-3); }
.sw-pic img { width: 100%; height: 100%; object-fit: contain; display: block; }
.sw-pic:hover, .sw-pic:focus-visible { border-color: var(--text-3); }
.sw-pic:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.sw-tile.need .sw-pic { border-color: var(--warn); box-shadow: 0 0 0 1px var(--warn); }
.sw-rest { display: inline-flex; flex-direction: column; align-items: center; gap: 6px; font-size: 13px; padding: 0 16px; text-align: center; }
.sw-rest svg { width: 18px; height: 18px; }
.sw-wake { position: absolute; left: 50%; top: calc(50% + 34px); transform: translateX(-50%); }
.sw-on { position: absolute; left: 8px; bottom: 8px; display: inline-flex; align-items: center; gap: 5px; max-width: calc(100% - 16px); padding: 2px 8px 2px 6px; border-radius: 999px; background: rgba(0, 0, 0, .66); color: #fff; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sw-on svg { width: 12px; height: 12px; flex: none; }
.sw-info { display: flex; align-items: flex-start; gap: 10px; min-width: 0; }
.sw-av { position: relative; flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--raised); color: var(--text-2); font-size: 11px; font-weight: 700; }
.sw-av.st { color: var(--accent); } .sw-av svg { width: 15px; height: 15px; }
.sw-av .ag-dot { position: absolute; right: -1px; bottom: -1px; }
.sw-text { display: grid; gap: 2px; min-width: 0; }
.sw-row { display: flex; align-items: center; gap: 8px; min-width: 0; }
.sw-row b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sw-need { flex: none; font-size: 12px; font-weight: 600; color: var(--warn); text-decoration: none; }
.sw-need:hover { text-decoration: underline; }
.sw-doing { font-size: 13px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sw-apps { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; }
.sw-chip { flex: none; display: inline-flex; align-items: center; gap: 5px; max-width: 180px; padding: 3px 10px 3px 8px; font: inherit; font-size: 12px; background: none; color: var(--text-2); border: 1px solid var(--line); border-radius: 999px; cursor: pointer; }
.sw-chip svg { width: 12px; height: 12px; flex: none; }
.sw-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sw-chip.on { color: var(--text); border-color: var(--text-3); }
.sw-chip:hover, .sw-chip:focus-visible { color: var(--text); border-color: var(--text-3); }
@media (max-width: 640px) { .sw-host { padding: 12px; } .sw-grid { grid-template-columns: 1fr; } }
.bk-own { margin-top: 6px; }
.bk-own summary { cursor: pointer; font-size: 13px; color: var(--text-3); padding: 6px 0; }

/* Buttons in the live view: soft and dark; the one main answer is filled. Focus is the console's own ring (tokens.css),
   on the box for the palette's search, the composer and the comment box. */
.sp .btn { height: 30px; padding: 0 12px; font-size: 13px; background: #1a2029; border: 1px solid #232a34; border-radius: 8px; color: #e9e6df; transition: background .15s, border-color .15s; }
.sp .btn:hover { background: #222a35; border-color: #2f3946; }
.sp .btn.ghost { background: transparent; border-color: transparent; color: #a7adb6; }
.sp .btn.ghost:hover { background: #161b22; color: #fff; }
.sp .sp-ask-acts .btn:first-child, .sp .sp-fix .btn, .sp .sp-pop [type="submit"] { background: var(--accent); border-color: transparent; color: #fff; }
.sp .sp-ask-acts .btn:first-child:hover, .sp .sp-fix .btn:hover, .sp .sp-pop [type="submit"]:hover { background: color-mix(in srgb, var(--accent) 88%, white); }
.sp-pop .vm-mic { width: 30px; height: 30px; min-width: 30px; border-radius: 50%; }
.sp-pop .vm-rec:empty { display: none; }
.sp-pop .vm-rec { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.sp-pop.vm-on textarea, .sp-pop.vm-on .sp-pop-acts { display: none; }
/* The live view's dialog takes focus when it opens (so no ring lands on a button nobody chose); it's not a control,
   so it shows no ring itself. Every control inside keeps the console's ring. */
.sp-scrim .sp:focus-visible, .sp-scrim .sp:focus { outline: none !important; }
/* Talk mode (talk-mode.js): a bar over the composer while it's on. The orb grows with your voice; its colour says
   what's happening: listening (quiet green), hearing you (bright), sending and waiting (amber), speaking (the accent). */
.sp-talkbar { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; padding: 2px 2px 6px; font-size: 13px; color: #c9ced6; }
.sp-talkbar[hidden] { display: none; }
.sp-orb { position: relative; width: 22px; height: 22px; flex: none; display: grid; place-items: center; }
.sp-orb::before { content: ''; position: absolute; inset: 0; border-radius: 50%; background: color-mix(in srgb, #3ddc97 22%, transparent); }
.sp-orb i { width: 10px; height: 10px; border-radius: 50%; background: #3ddc97; transition: transform .08s linear, background .2s; }
.sp-talkbar[data-s="hearing"] .sp-orb i { background: #6ff0b5; }
.sp-talkbar[data-s="sending"] .sp-orb i, .sp-talkbar[data-s="waiting"] .sp-orb i { background: var(--warn); animation: sp-blink 1s infinite; }
.sp-talkbar[data-s="sending"] .sp-orb::before, .sp-talkbar[data-s="waiting"] .sp-orb::before { background: color-mix(in srgb, var(--warn) 18%, transparent); }
.sp-talkbar[data-s="speaking"] .sp-orb i { background: var(--accent); animation: sp-talkpulse .9s ease-in-out infinite; }
.sp-talkbar[data-s="speaking"] .sp-orb::before { background: color-mix(in srgb, var(--accent) 22%, transparent); }
.sp-talkbar[data-s="pointing"] .sp-orb i { background: var(--info); }
@keyframes sp-talkpulse { 50% { transform: scale(1.5); } }
.sp-talkw { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-talkoff { height: 26px; font-size: 12px; }
.sp-say .sp-talkbtn { width: 34px; height: 34px; border-radius: 50%; }
.sp-say .sp-talkbtn[aria-pressed="true"] { background: color-mix(in srgb, #3ddc97 22%, transparent); color: #fff; }
.sp-say .sp-talkbtn:disabled { opacity: .35; cursor: not-allowed; }
.sp-say { grid-template-columns: 1fr auto auto auto; }
.sp.talking .sp-say { border-color: color-mix(in srgb, #3ddc97 35%, transparent); }

/* For you's Live strip (the UX audit, §1): the Screens wall's tiles, smaller, awake agents only. */
.sw-compact .sw-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px 12px; }
.sw-compact .sw-apps { display: none; }
@media (max-width: 640px) { .sw-compact .sw-grid { grid-template-columns: 1fr 1fr; } }
#fy-live[hidden] { display: none; }
#fyLive { margin-top: 10px; }
