/* Envoy workspace (Desktop view) + app-wide motion polish. Palette from Troy's
   v0.0.1/v0.0.2 demo videos: ~#1A202C background, #2D3748 panels. */
html[data-theme="midnight"] { --bg:#1A202C; --panel:#1F2733; --panel-2:#2D3748; --border:#364152; --muted:#A0AEC0; --faint:#718096; }
:root { --ease:cubic-bezier(.2,.8,.2,1); --dur:.24s; --ew-channels:232px; --ew-bench:420px; --ew-guard:300px; }
@media (prefers-reduced-motion: reduce) { :root { --dur:0s; } }

/* Sidebar widths live HERE only (app.css carries none): the rail track, the
   rail element and the peek/pinned widths all read these two variables, so
   they can never drift into a dead strip or a peek/pin reflow again. */
:root { --rail-w:60px; --side-full-w:228px; }
.shell { --side-w:var(--side-full-w); }
.shell.sidebar-rail { --side-w:var(--rail-w); }
/* F2: the sidebar itself never transitions width or padding — the .shell
   grid track (app.css) is the only animated width, so pin/unpin moves one
   thing at one rate and the right edge can't wobble. */
.sidebar { width:auto; }
.sidebar.rail { width:auto; }
.sidebar .label, .sidebar .logo strong, .sidebar .logo span, .sidebar .side-head { transition:opacity var(--dur) var(--ease); }
.sidebar.rail .nav-item { font-size:17px; }

/* The Desktop view is the chat: no floating chat drawer on top of it. */
@media (min-width: 901px) { #shell { grid-template-columns:var(--side-w) minmax(0,1fr) 0; } #shell > #guard, #guard-toggle { display:none !important; } }
#shell[data-view="desktop"] > #guard, #shell[data-view="desktop"] #guard-toggle { display:none !important; }
#chat-panel, #chat-panel-toggle { display:none !important; } /* one CLI: the Workspace */
#shell[data-view="desktop"] .topbar { border-bottom:1px solid var(--border); }
.view.desktop { position:relative; height:calc(100dvh - 52px); padding:0; overflow:hidden; }

/* Panes in a row; collapsing animates the width to zero. */
.ew { display:flex; height:100%; width:100%; overflow:hidden; background:var(--bg); }
.ew-pane { display:flex; flex-direction:column; min-width:0; background:var(--panel); overflow:hidden;
  transition:flex-basis var(--dur) var(--ease), opacity var(--dur) var(--ease), transform var(--dur) var(--ease); }
/* Min-widths match PANE_MIN in envoy-workspace.js exactly; when the CSS
   floor sat above the JS drag clamp the splitter had dead travel. */
.ew-channels { flex:0 1 var(--ew-channels); min-width:132px; }
.ew-bench { flex:0 1 var(--ew-bench); min-width:200px; }
.ew-guard { flex:0 1 var(--ew-guard); min-width:150px; }
/* Side panes give up width before the conversation does. */
.ew-chat { flex:1 1 0; min-width:380px; background:var(--bg); }
.ew-pane.collapsed { flex-basis:0 !important; min-width:0 !important; opacity:0; pointer-events:none; }
.ew-pane.will-collapse { opacity:.45; box-shadow:inset 3px 0 0 var(--accent); }
/* While a splitter drags, widths are frozen (envoy-workspace.js freeze()):
   shrink off, so the dragged pane tracks the pointer 1:1. */
.ew.dragging .ew-pane { transition:none; flex-shrink:0; }
.ew.bench-max .ew-chat, .ew.bench-max .ew-channels { flex:0 0 0 !important; opacity:0; pointer-events:none; }
.ew.bench-max .ew-split { display:none; }
.ew.bench-max .ew-chat, .ew.bench-max .ew-channels { min-width:0 !important; }
.ew.bench-max .ew-bench { flex:1 1 auto !important; }
.ew.no-channels .ew-reveal { display:inline-grid; }
.ew-split { flex:0 0 5px; cursor:col-resize; background:var(--border); position:relative; transition:background .15s, flex-basis var(--dur) var(--ease); }
.ew-split::after { content:""; position:absolute; inset:0 -4px; }
.ew-split:hover, .ew-split:focus-visible, .ew-split.dragging { background:var(--accent); outline:none; }
.ew-split.hidden { flex-basis:0; pointer-events:none; }

/* Shelf splitters (shelves bite, 2026-11-08): horizontal separators
   inside the channels and Guard panes. The vertical .ew-split strips
   resize pane widths; these resize the SECTIONS stacked inside a pane —
   the crew shelf in the channels pane, the approvals shelf in the Guard
   pane — so a long crew list or a pile of approvals can no longer
   squeeze the flexible sibling (channel list / Guard feed) away. The
   elements are inserted by envoy-workspace.js (wireShelves); heights are
   the user vars --ew-crew-h / --ew-appr-h on :root and only take effect
   while the pane carries its *-sized class — unset, the sections keep
   their natural heights and nothing moves. */
.ew-hsplit { flex:0 0 7px; cursor:row-resize; position:relative; z-index:2; touch-action:none; }
.ew-hsplit::before { content:""; position:absolute; left:10px; right:10px; top:3px; height:1px; border-radius:2px; background:transparent; transition:background .15s, height .15s, top .15s; }
.ew-hsplit:hover::before, .ew-hsplit:focus-visible::before, .ew-hsplit.dragging::before { background:var(--accent); height:3px; top:2px; }
.ew-hsplit:focus-visible { outline:none; }
.ew.shelf-dragging { cursor:row-resize; }
.ew.shelf-dragging * { user-select:none !important; }
/* Crew shelf sized: the section takes the var height and its list
   scrolls inside it (the 38vh cap below is the DEFAULT state only). */
.ew-channels.crew-sized .ew-crew { height:var(--ew-crew-h); display:flex; flex-direction:column; overflow:hidden; }
.ew-channels.crew-sized .ew-crew-head { flex:none; }
.ew-channels.crew-sized .ew-crew-list { flex:1 1 auto; min-height:0; max-height:none; }
/* The crew section also carries FIXED content below its list — the
   ADD TO THIS CHANNEL subhead and the #ew-crew-add pill block (ported
   into the section by the panes-removal bite). Both are pinned, and
   the pill block is capped at six pill rows (24px pills + 6px gap +
   6px bottom padding = 180px) with any further pills scrolling inside
   the block itself — so at the shelf floor the fixed share always
   fits (see SHELF_MIN in envoy-workspace.js for the arithmetic) and
   nothing can spill over the footer below. The section's own
   overflow:hidden is the belt-and-braces clip behind that. */
.ew-channels.crew-sized .ew-crew .ew-subhead { flex:none; }
.ew-channels.crew-sized #ew-crew-add { flex:none; max-height:180px; overflow:auto; }
/* Approvals shelf sized: the same shape — the approvals list scrolls
   inside the var height instead of pushing the Guard feed down. */
.ew-guard.appr-sized .ew-approvals { height:var(--ew-appr-h); display:flex; flex-direction:column; overflow:hidden; }
.ew-guard.appr-sized .ew-approvals .ew-subhead { flex:none; }
.ew-guard.appr-sized .ew-approvals-list { flex:1 1 auto; min-height:0; overflow:auto; }
.ew-guard.appr-sized .ew-approvals-open { flex:none; align-self:flex-start; }

.ew-head { display:flex; align-items:center; gap:8px; min-height:46px; padding:8px 12px; border-bottom:1px solid var(--border); white-space:nowrap; }
.ew-head strong { font-weight:600; overflow:hidden; text-overflow:ellipsis; }
.ew-spacer { flex:1 1 auto; }
.ew-subhead { color:var(--muted); font-size:11px; font-weight:700; letter-spacing:.08em; padding:10px 12px 6px; }
.ew-note { color:var(--faint); font-size:12px; padding:8px 12px 14px; margin:0; line-height:1.5; }
.ew-row { display:flex; gap:6px; align-items:center; }
.ew-row input { flex:1 1 auto; min-width:0; }
.ew-scroll { overflow:auto; flex:1 1 auto; padding:4px 10px 10px; }
.ew-chips { display:flex; flex-wrap:wrap; gap:6px; padding:0 12px 6px; }
.ew-actions { padding:8px 12px; border-top:1px solid var(--border); }

.ew-btn { border:1px solid var(--border); background:var(--panel-2); color:var(--text); border-radius:8px; padding:7px 14px; cursor:pointer; font-weight:600; transition:background .15s, border-color .15s, transform .1s; }
.ew-btn:hover { border-color:var(--accent); }
.ew-btn:active { transform:translateY(1px); }
.ew-btn.sm { padding:4px 10px; font-size:12px; }
.ew-btn.primary { background:var(--accent); border-color:var(--accent); color:#04121c; }
.ew-btn.primary:hover { background:var(--accent-hover); }
.ew-btn.ghost { background:transparent; }
.ew-btn.full { margin:6px 12px; width:calc(100% - 24px); }
/* New channel is a compact plus now (nav-build sleek pass): the .ew-icon
   30px grid carries the glyph; this only places it in the pane. */
.ew-add-channel { margin:6px 12px; font-size:19px; line-height:1; }
.ew-btn[aria-pressed="true"] { border-color:var(--accent); color:var(--accent); }
.ew-btn:disabled { opacity:.5; cursor:default; }
/* Chat-head control pill (header bite 2): Free-Willy, Workbench, Guard and
   Full screen ride in one rounded cluster. The frame and the glow live on
   the pill; the buttons inside keep their own .ew-btn behaviour with
   quiet borders until hover or press. */
.ew-head-pill { display:inline-flex; align-items:center; gap:2px; flex:none; padding:3px; border:1px solid var(--border); border-radius:999px; background:var(--panel-2);
  box-shadow:0 0 0 1px color-mix(in srgb, var(--accent) 40%, transparent), 0 0 30px color-mix(in srgb, var(--accent) 52%, transparent); }
.ew-head-pill .ew-btn { border-color:transparent; background:transparent; border-radius:999px; }
.ew-head-pill .ew-btn:hover { border-color:var(--accent); }
.ew-head-pill .ew-btn[aria-pressed="true"] { border-color:var(--accent); color:var(--accent); }
/* Light theme (glow bite 2): a blurred halo alone washes out on the
   light ground — burst 2's 34% ring / 44% halo composite to only
   1.64:1 / ~1.3:1 against the #F4F6F8 chat surface, so no halo read.
   The light glow is therefore layered: a near-solid deep-accent ring
   (85%, 3.98:1 on the surface) carries the neon edge, a solid 4px
   accent band steps it down, then two blurred layers (accent, then
   the deeper accent-hover) give the soft falloff. The border deepens
   toward the accent so the pill's own frame reads as part of the glow.
   Dark themes keep the burst-2 base rule above, untouched. */
html[data-theme="light"] .ew-head-pill { border-color:color-mix(in srgb, var(--accent) 60%, var(--border));
  box-shadow:0 0 0 1px color-mix(in srgb, var(--accent) 85%, transparent), 0 0 0 4px color-mix(in srgb, var(--accent) 42%, transparent), 0 0 22px 3px color-mix(in srgb, var(--accent) 52%, transparent), 0 0 48px 8px color-mix(in srgb, var(--accent-hover) 30%, transparent); }
.ew-icon { width:30px; height:30px; display:inline-grid; place-items:center; border:0; border-radius:7px; background:transparent; color:var(--muted); cursor:pointer; flex:none; transition:background .15s, color .15s; }
.ew-icon:hover:not(:disabled) { background:var(--panel-2); color:var(--text); }
.ew-icon:disabled { opacity:.35; cursor:default; }
.ew-icon.recording { color:var(--red); }
/* Mic held (voice-hardening bite): voice on, mic between turns — dimmed, see app.css. */
.ew-icon.recording.held { opacity:.55; }
.ew-reveal { display:none; }
.ew-check { display:flex; gap:6px; align-items:center; color:var(--muted); font-size:12px; }
input, textarea { background:var(--bg); border:1px solid var(--border); border-radius:8px; padding:7px 10px; color:var(--text); outline:none; }

/* Channels */
.ew-channel-list { flex:1 1 auto; overflow:auto; overflow-x:hidden; padding:8px 6px; display:flex; flex-direction:column; gap:2px; }
.ew-channel { display:flex; align-items:center; gap:8px; width:100%; min-width:0; border:0; background:transparent; color:var(--muted); padding:7px 10px; border-radius:7px; cursor:pointer; text-align:left; transition:background .15s, color .15s; }
.ew-channel:hover { background:var(--panel-2); color:var(--text); }
.ew-channel.active { background:var(--panel-2); color:var(--text); box-shadow:inset 3px 0 0 var(--accent); }
.ew-channel .hash { color:var(--faint); font-weight:700; }
.ew-channel .name { flex:1 1 auto; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.ew-channel .tags { display:flex; gap:4px; align-items:center; }
.ew-channel .unread { width:8px; height:8px; border-radius:50%; background:var(--accent); }
.ew-new-channel { display:flex; flex-direction:column; gap:8px; padding:8px 12px; border-top:1px solid var(--border); }
.ew-foot { border-top:1px solid var(--border); padding:10px 12px; display:flex; flex-direction:column; gap:6px; font-size:12px; color:var(--muted); }
.ew-me-face { display:flex; align-items:center; gap:8px; padding-bottom:2px; }
.ew-me-face .ew-avatar { width:30px; height:30px; margin-top:0; font-size:13px; }
.ew-me-face .name { font-weight:600; font-size:13px; color:var(--text); }
.ew-me-face .ew-btn { margin-left:auto; }
/* Channels foot collapsed (rail-bottom bite): the source lines and
   the action buttons fold away; the identity row above (.ew-me-face —
   avatar, name, Change face, and the collapse toggle itself) stays
   as the slim bar, so the foot never loses the member's corner or
   the control that reopens it. */
.ew-foot.foot-collapsed .ew-source, .ew-foot.foot-collapsed .ew-foot-actions { display:none; }
.ew-source { display:flex; gap:6px; align-items:center; }
.ew-source img { border-radius:50%; }
/* Brand marks are real glyphs, not color blocks: currentColor mask
   silhouettes, same pattern as .ew-gh-mark below. */
.ew-discord-mark { width:14px; height:14px; display:inline-block; background:currentColor;
  -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M20.317 4.3698a19.7913 19.7913 0 00-4.8851-1.5152.0741.0741 0 00-.0785.0371c-.211.3753-.4447.8648-.6083 1.2495-1.8447-.2762-3.68-.2762-5.4868 0-.1636-.3933-.4058-.8742-.6177-1.2495a.077.077 0 00-.0785-.037 19.7363 19.7363 0 00-4.8852 1.515.0699.0699 0 00-.0321.0277C.5334 9.0458-.319 13.5799.0992 18.0578a.0824.0824 0 00.0312.0561c2.0528 1.5076 4.0413 2.4228 5.9929 3.0294a.0777.0777 0 00.0842-.0276c.4616-.6304.8731-1.2952 1.226-1.9942a.076.076 0 00-.0416-.1057c-.6528-.2476-1.2743-.5495-1.8722-.8923a.077.077 0 01-.0076-.1277c.1258-.0943.2517-.1923.3718-.2914a.0743.0743 0 01.0776-.0105c3.9278 1.7933 8.18 1.7933 12.0614 0a.0739.0739 0 01.0785.0095c.1202.099.246.1981.3728.2924a.077.077 0 01-.0066.1276 12.2986 12.2986 0 01-1.873.8914.0766.0766 0 00-.0407.1067c.3604.698.7719 1.3628 1.225 1.9932a.076.076 0 00.0842.0286c1.961-.6067 3.9495-1.5219 6.0023-3.0294a.077.077 0 00.0313-.0552c.5004-5.177-.8382-9.6739-3.5485-13.6604a.061.061 0 00-.0312-.0286zM8.02 15.3312c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9555-2.4189 2.157-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.9555 2.4189-2.1569 2.4189zm7.9748 0c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9554-2.4189 2.1569-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.946 2.4189-2.1568 2.4189Z'/%3E%3C/svg%3E") center/contain no-repeat;
          mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M20.317 4.3698a19.7913 19.7913 0 00-4.8851-1.5152.0741.0741 0 00-.0785.0371c-.211.3753-.4447.8648-.6083 1.2495-1.8447-.2762-3.68-.2762-5.4868 0-.1636-.3933-.4058-.8742-.6177-1.2495a.077.077 0 00-.0785-.037 19.7363 19.7363 0 00-4.8852 1.515.0699.0699 0 00-.0321.0277C.5334 9.0458-.319 13.5799.0992 18.0578a.0824.0824 0 00.0312.0561c2.0528 1.5076 4.0413 2.4228 5.9929 3.0294a.0777.0777 0 00.0842-.0276c.4616-.6304.8731-1.2952 1.226-1.9942a.076.076 0 00-.0416-.1057c-.6528-.2476-1.2743-.5495-1.8722-.8923a.077.077 0 01-.0076-.1277c.1258-.0943.2517-.1923.3718-.2914a.0743.0743 0 01.0776-.0105c3.9278 1.7933 8.18 1.7933 12.0614 0a.0739.0739 0 01.0785.0095c.1202.099.246.1981.3728.2924a.077.077 0 01-.0066.1276 12.2986 12.2986 0 01-1.873.8914.0766.0766 0 00-.0407.1067c.3604.698.7719 1.3628 1.225 1.9932a.076.076 0 00.0842.0286c1.961-.6067 3.9495-1.5219 6.0023-3.0294a.077.077 0 00.0313-.0552c.5004-5.177-.8382-9.6739-3.5485-13.6604a.061.061 0 00-.0312-.0286zM8.02 15.3312c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9555-2.4189 2.157-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.9555 2.4189-2.1569 2.4189zm7.9748 0c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9554-2.4189 2.1569-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.946 2.4189-2.1568 2.4189Z'/%3E%3C/svg%3E") center/contain no-repeat; }
.ew-mini { width:12px; height:12px; display:inline-block; background:currentColor; }
.ew-mini.discord { color:#8B95FF;
  -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M20.317 4.3698a19.7913 19.7913 0 00-4.8851-1.5152.0741.0741 0 00-.0785.0371c-.211.3753-.4447.8648-.6083 1.2495-1.8447-.2762-3.68-.2762-5.4868 0-.1636-.3933-.4058-.8742-.6177-1.2495a.077.077 0 00-.0785-.037 19.7363 19.7363 0 00-4.8852 1.515.0699.0699 0 00-.0321.0277C.5334 9.0458-.319 13.5799.0992 18.0578a.0824.0824 0 00.0312.0561c2.0528 1.5076 4.0413 2.4228 5.9929 3.0294a.0777.0777 0 00.0842-.0276c.4616-.6304.8731-1.2952 1.226-1.9942a.076.076 0 00-.0416-.1057c-.6528-.2476-1.2743-.5495-1.8722-.8923a.077.077 0 01-.0076-.1277c.1258-.0943.2517-.1923.3718-.2914a.0743.0743 0 01.0776-.0105c3.9278 1.7933 8.18 1.7933 12.0614 0a.0739.0739 0 01.0785.0095c.1202.099.246.1981.3728.2924a.077.077 0 01-.0066.1276 12.2986 12.2986 0 01-1.873.8914.0766.0766 0 00-.0407.1067c.3604.698.7719 1.3628 1.225 1.9932a.076.076 0 00.0842.0286c1.961-.6067 3.9495-1.5219 6.0023-3.0294a.077.077 0 00.0313-.0552c.5004-5.177-.8382-9.6739-3.5485-13.6604a.061.061 0 00-.0312-.0286zM8.02 15.3312c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9555-2.4189 2.157-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.9555 2.4189-2.1569 2.4189zm7.9748 0c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9554-2.4189 2.1569-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.946 2.4189-2.1568 2.4189Z'/%3E%3C/svg%3E") center/contain no-repeat;
          mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M20.317 4.3698a19.7913 19.7913 0 00-4.8851-1.5152.0741.0741 0 00-.0785.0371c-.211.3753-.4447.8648-.6083 1.2495-1.8447-.2762-3.68-.2762-5.4868 0-.1636-.3933-.4058-.8742-.6177-1.2495a.077.077 0 00-.0785-.037 19.7363 19.7363 0 00-4.8852 1.515.0699.0699 0 00-.0321.0277C.5334 9.0458-.319 13.5799.0992 18.0578a.0824.0824 0 00.0312.0561c2.0528 1.5076 4.0413 2.4228 5.9929 3.0294a.0777.0777 0 00.0842-.0276c.4616-.6304.8731-1.2952 1.226-1.9942a.076.076 0 00-.0416-.1057c-.6528-.2476-1.2743-.5495-1.8722-.8923a.077.077 0 01-.0076-.1277c.1258-.0943.2517-.1923.3718-.2914a.0743.0743 0 01.0776-.0105c3.9278 1.7933 8.18 1.7933 12.0614 0a.0739.0739 0 01.0785.0095c.1202.099.246.1981.3728.2924a.077.077 0 01-.0066.1276 12.2986 12.2986 0 01-1.873.8914.0766.0766 0 00-.0407.1067c.3604.698.7719 1.3628 1.225 1.9932a.076.076 0 00.0842.0286c1.961-.6067 3.9495-1.5219 6.0023-3.0294a.077.077 0 00.0313-.0552c.5004-5.177-.8382-9.6739-3.5485-13.6604a.061.061 0 00-.0312-.0286zM8.02 15.3312c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9555-2.4189 2.157-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.9555 2.4189-2.1569 2.4189zm7.9748 0c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9554-2.4189 2.1569-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.946 2.4189-2.1568 2.4189Z'/%3E%3C/svg%3E") center/contain no-repeat; }
.ew-mini.slack { color:#E3B7E8;
  -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5.042 15.165a2.528 2.528 0 0 1-2.52 2.523A2.528 2.528 0 0 1 0 15.165a2.527 2.527 0 0 1 2.522-2.52h2.52v2.52zM6.313 15.165a2.527 2.527 0 0 1 2.521-2.52 2.527 2.527 0 0 1 2.521 2.52v6.313A2.528 2.528 0 0 1 8.834 24a2.528 2.528 0 0 1-2.521-2.522v-6.313zM8.834 5.042a2.528 2.528 0 0 1-2.521-2.52A2.528 2.528 0 0 1 8.834 0a2.528 2.528 0 0 1 2.521 2.522v2.52H8.834zM8.834 6.313a2.528 2.528 0 0 1 2.521 2.521 2.528 2.528 0 0 1-2.521 2.521H2.522A2.528 2.528 0 0 1 0 8.834a2.528 2.528 0 0 1 2.522-2.521h6.312zM18.956 8.834a2.528 2.528 0 0 1 2.522-2.521A2.528 2.528 0 0 1 24 8.834a2.528 2.528 0 0 1-2.522 2.521h-2.522V8.834zM17.688 8.834a2.528 2.528 0 0 1-2.523 2.521 2.527 2.527 0 0 1-2.52-2.521V2.522A2.527 2.527 0 0 1 15.165 0a2.528 2.528 0 0 1 2.523 2.522v6.312zM15.165 18.956a2.528 2.528 0 0 1 2.523 2.522A2.528 2.528 0 0 1 15.165 24a2.527 2.527 0 0 1-2.52-2.522v-2.522h2.52zM15.165 17.688a2.527 2.527 0 0 1-2.52-2.523 2.526 2.526 0 0 1 2.52-2.52h6.313A2.527 2.527 0 0 1 24 15.165a2.528 2.528 0 0 1-2.522 2.523h-6.313z'/%3E%3C/svg%3E") center/contain no-repeat;
          mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5.042 15.165a2.528 2.528 0 0 1-2.52 2.523A2.528 2.528 0 0 1 0 15.165a2.527 2.527 0 0 1 2.522-2.52h2.52v2.52zM6.313 15.165a2.527 2.527 0 0 1 2.521-2.52 2.527 2.527 0 0 1 2.521 2.52v6.313A2.528 2.528 0 0 1 8.834 24a2.528 2.528 0 0 1-2.521-2.522v-6.313zM8.834 5.042a2.528 2.528 0 0 1-2.521-2.52A2.528 2.528 0 0 1 8.834 0a2.528 2.528 0 0 1 2.521 2.522v2.52H8.834zM8.834 6.313a2.528 2.528 0 0 1 2.521 2.521 2.528 2.528 0 0 1-2.521 2.521H2.522A2.528 2.528 0 0 1 0 8.834a2.528 2.528 0 0 1 2.522-2.521h6.312zM18.956 8.834a2.528 2.528 0 0 1 2.522-2.521A2.528 2.528 0 0 1 24 8.834a2.528 2.528 0 0 1-2.522 2.521h-2.522V8.834zM17.688 8.834a2.528 2.528 0 0 1-2.523 2.521 2.527 2.527 0 0 1-2.52-2.521V2.522A2.527 2.527 0 0 1 15.165 0a2.528 2.528 0 0 1 2.523 2.522v6.312zM15.165 18.956a2.528 2.528 0 0 1 2.523 2.522A2.528 2.528 0 0 1 15.165 24a2.527 2.527 0 0 1-2.52-2.522v-2.522h2.52zM15.165 17.688a2.527 2.527 0 0 1-2.52-2.523 2.526 2.526 0 0 1 2.52-2.52h6.313A2.527 2.527 0 0 1 24 15.165a2.528 2.528 0 0 1-2.522 2.523h-6.313z'/%3E%3C/svg%3E") center/contain no-repeat; }
.ew-mini.agents { color:var(--green);
  -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 11a4 4 0 1 0 0-8 4 4 0 0 0 0 8Zm7 0a3 3 0 1 0 0-6 3 3 0 0 0 0 6ZM9 13c-3.3 0-7 1.6-7 4.5V20h14v-2.5C16 14.6 12.3 13 9 13Zm7.5.2c1.6.8 2.5 2.1 2.5 4.3V20h3v-2.4c0-2.3-2.6-3.9-5.5-4.4Z'/%3E%3C/svg%3E") center/contain no-repeat;
          mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 11a4 4 0 1 0 0-8 4 4 0 0 0 0 8Zm7 0a3 3 0 1 0 0-6 3 3 0 0 0 0 6ZM9 13c-3.3 0-7 1.6-7 4.5V20h14v-2.5C16 14.6 12.3 13 9 13Zm7.5.2c1.6.8 2.5 2.1 2.5 4.3V20h3v-2.4c0-2.3-2.6-3.9-5.5-4.4Z'/%3E%3C/svg%3E") center/contain no-repeat; }

.ew-mini.room { color:var(--amber);
  -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a5 5 0 0 0-5 5v3H6a2 2 0 0 0-2 2v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8a2 2 0 0 0-2-2h-1V7a5 5 0 0 0-5-5Zm-3 8V7a3 3 0 1 1 6 0v3H9Z'/%3E%3C/svg%3E") center/contain no-repeat;
          mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a5 5 0 0 0-5 5v3H6a2 2 0 0 0-2 2v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8a2 2 0 0 0-2-2h-1V7a5 5 0 0 0-5-5Zm-3 8V7a3 3 0 1 1 6 0v3H9Z'/%3E%3C/svg%3E") center/contain no-repeat; }
.ew-room-mark { width:13px; height:13px; display:inline-block; background:currentColor; color:var(--amber);
  -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a5 5 0 0 0-5 5v3H6a2 2 0 0 0-2 2v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8a2 2 0 0 0-2-2h-1V7a5 5 0 0 0-5-5Zm-3 8V7a3 3 0 1 1 6 0v3H9Z'/%3E%3C/svg%3E") center/contain no-repeat;
          mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a5 5 0 0 0-5 5v3H6a2 2 0 0 0-2 2v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8a2 2 0 0 0-2-2h-1V7a5 5 0 0 0-5-5Zm-3 8V7a3 3 0 1 1 6 0v3H9Z'/%3E%3C/svg%3E") center/contain no-repeat; }

/* Chat */
.ew-hash { color:var(--faint); font-size:18px; font-weight:700; }
.ew-badge { font-size:11px; font-weight:700; border-radius:999px; padding:2px 8px; }
.ew-badge.discord { background:rgba(88,101,242,.18); color:#AAB4FF; border:1px solid rgba(88,101,242,.5); }
.ew-badge.slack { background:rgba(74,21,75,.35); color:#E3B7E8; border:1px solid rgba(227,183,232,.4); }
.ew-badge.pending { background:rgba(245,158,11,.12); color:var(--amber); border:1px solid rgba(245,158,11,.4); }
.ew-messages { flex:1 1 auto; overflow-y:auto; padding:14px 18px 8px; scroll-behavior:smooth; }
.ew-msg { position:relative; display:grid; grid-template-columns:36px minmax(0,1fr); gap:10px; padding:4px 6px; border-radius:8px; animation:ew-in .22s var(--ease); }
.ew-msg:hover { background:rgba(255,255,255,.025); }
.ew-msg.cont { padding-top:0; }
.ew-msg.cont .ew-avatar, .ew-msg.cont .ew-meta { display:none; }
.ew-msg.cont > div { grid-column:2; }
.ew-avatar { width:36px; height:36px; border-radius:50%; background:var(--panel-2); display:grid; place-items:center; font-weight:700; color:var(--text); overflow:hidden; margin-top:2px; }
.ew-avatar img { width:100%; height:100%; }
.ew-avatar.discord { background:#5865F2; }
.ew-avatar.slack { background:#4A154B; }
/* Message faces match the crew rail: 36px, boxless for character
   faces (library stills, clips, emoji, library tokens). No tile,
   no 8px radius box, no ring. Letter-only and Discord/Slack chips
   keep a simple circular chip so a lone initial still has a surface. */
.ew-msg .ew-avatar { width:36px; height:36px; font-size:16px; }
.ew-msg .ew-avatar.face-ava,
.ew-msg .ew-avatar.emoji-ava,
.ew-msg .ew-avatar.lib-ava {
  background:transparent; border-radius:0; overflow:visible; box-shadow:none;
}
.ew-msg .ew-avatar.face-ava img,
.ew-msg .ew-avatar.face-ava video,
.ew-msg .ew-avatar.lib-ava img { border-radius:0; box-shadow:none; object-fit:contain; }
.ew-msg .ew-avatar.emoji-ava .hx-emoji { width:32px; height:32px; }
.ew-msg .ew-avatar:not(.face-ava):not(.emoji-ava):not(.lib-ava):not(.discord):not(.slack) {
  background:var(--panel-2); border-radius:50%; overflow:hidden;
}
.ew-meta { display:flex; gap:8px; align-items:baseline; flex-wrap:wrap; }
.ew-meta strong { font-weight:650; }
.ew-meta .agent { color:var(--accent); }
.ew-meta time { color:var(--faint); font-size:11px; }
/* Speaking proof (speaker-proof bite): the speaker icon on the one
   message being spoken right now — present and pulsing only while
   that seat's audio actually plays (the voice controller reports
   playback start/end per engine; envoy-workspace.js draws it, in the
   meta line or, for a grouped follow-up, right after the meta). */
.ew-speaking { display:inline-flex; align-items:center; font-size:12px; line-height:1; animation:ew-pulse .9s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .ew-speaking { animation:none; } }
/* Role tag (bite 2): plain muted text — no fill, no border, no chip. */
/* Bite 2b: app.css carries a generic .agent rule (background, padding,
   radius, flex) meant for agent list rows; the message header's name
   (strong.agent) and tag (span.ew-src.agent) both carry that bare class
   and picked the fill up from it. Out-specify it inside .ew-meta only,
   and keep the tag muted (the name keeps the accent colour). */
.ew-meta strong.agent, .ew-meta .ew-src.agent { background:none; padding:0; border-radius:0; display:inline; }
.ew-meta .ew-src.agent { color:var(--muted); }
.ew-src { font-size:12px; font-weight:500; color:var(--muted); }
.ew-src.discord { color:#AAB4FF; }
.ew-src.slack { color:#E3B7E8; }
.ew-body { white-space:pre-wrap; word-wrap:break-word; overflow-wrap:anywhere; line-height:1.5; }
.ew-body .mention { color:var(--accent); background:rgba(14,165,233,.12); border-radius:4px; padding:0 3px; font-weight:600; }
.ew-body .claim { color:var(--amber); font-weight:700; }
.ew-body a, .ew-body .link { color:var(--accent); cursor:pointer; text-decoration:underline; text-underline-offset:2px; background:none; border:0; padding:0; font:inherit; }
.ew-body pre { background:#0F141C; color:#DCE7EE; border:1px solid var(--border); border-radius:8px; padding:10px; overflow:auto; white-space:pre; font:12px/1.5 var(--mono); margin:6px 0; }
.ew-code-actions { display:flex; gap:6px; margin-top:-2px; }
.ew-notice { text-align:center; color:var(--faint); font-size:12px; padding:6px 0; animation:ew-in .22s var(--ease); }
.ew-notice span { background:var(--panel); border:1px solid var(--border); border-radius:999px; padding:3px 10px; }
.ew-empty { margin:auto; text-align:center; color:var(--muted); padding:40px 10px; }
.ew-day { display:flex; align-items:center; gap:10px; color:var(--faint); font-size:11px; font-weight:700; margin:10px 0 6px; }
.ew-day::before, .ew-day::after { content:""; flex:1; height:1px; background:var(--border); }
/* Grouped follow-up time (bite 2): sits in the row's gutter where
   the avatar would be, right-aligned against the body, and only
   surfaces while the row is hovered (always faintly on touch). */
.ew-gutter-time { font-size:11px; color:var(--faint); text-align:right; align-self:start; padding-top:5px; white-space:nowrap; opacity:0; transition:opacity .15s; }
.ew-msg:hover .ew-gutter-time, .ew-msg:focus-within .ew-gutter-time { opacity:1; }
@media (pointer:coarse) { .ew-gutter-time { opacity:.55; } }
/* The unread divider (bite 2): the day divider's pattern in red. */
.ew-new-divider { display:flex; align-items:center; gap:10px; color:var(--red); font-size:11px; font-weight:700; margin:10px 0 6px; }
.ew-new-divider::before, .ew-new-divider::after { content:""; flex:1; height:1px; background:var(--red); opacity:.5; }
@keyframes ew-in { from { opacity:0; transform:translateY(4px); } to { opacity:1; transform:none; } }

.ew-composer { margin:0 14px 14px; border:1px solid var(--border); border-radius:12px; background:var(--panel); padding:8px 10px; display:flex; flex-direction:column; gap:6px; transition:border-color .15s; }
.ew-composer:focus-within { border-color:var(--accent); }
.ew-composer textarea { border:0; background:transparent; resize:none; padding:4px 2px; max-height:200px; min-height:24px; }
.ew-composer-row { display:flex; align-items:center; gap:6px; }
.ew-hint { color:var(--faint); font-size:11px; }
/* Composer "+" picker + attachment chips */
.ew-attach-chips { display:flex; gap:6px; flex-wrap:wrap; }
.ew-attach-chips[hidden] { display:none; }
.ew-chip { display:inline-flex; gap:6px; align-items:center; border:1px solid var(--accent); background:var(--panel-2); color:var(--text); border-radius:999px; padding:2px 4px 2px 10px; font-size:12px; font-weight:600; }
/* The Helmian skills a sent message carried, as a chip row under its
   body (slash-skills S3): records, not controls — no ×, symmetric
   padding. An empty row is never rendered (the workspace omits it). */
.ew-msg-skills { display:flex; flex-wrap:wrap; gap:6px; margin-top:6px; }
.ew-chip.skill-ref { padding:2px 10px; }
.ew-chip-x { border:0; background:transparent; color:var(--muted); cursor:pointer; font-size:14px; line-height:1; padding:0 4px; }
.ew-chip-x:hover { color:var(--text); }
.ew-picker { border:1px solid var(--border); border-radius:10px; background:var(--panel-2); padding:10px; display:flex; flex-direction:column; gap:10px; max-height:340px; overflow:auto; }
.ew-picker[hidden] { display:none; }
.ew-picker-head { display:flex; align-items:center; gap:6px; }
.ew-picker-group { display:flex; flex-direction:column; gap:6px; }
.ew-picker-input { flex:1; min-width:0; border:1px solid var(--border); border-radius:8px; background:var(--panel); color:var(--text); padding:6px 8px; }
.ew-file-input { max-width: 100%; color: var(--text); font-size: 13px; }
.ew-picker-row { display:flex; align-items:center; gap:8px; border:1px solid var(--border); background:var(--panel); color:var(--text); border-radius:8px; padding:7px 10px; cursor:pointer; text-align:left; font-size:13px; transition:border-color .15s; }
.ew-picker-row:hover:not(:disabled) { border-color:var(--accent); }
.ew-picker-row.on { border-color:var(--accent); }
.ew-picker-row:disabled { opacity:.55; cursor:default; }
.ew-picker-kind { color:var(--muted); font-size:12px; }
.ew-picker-state { margin-left:auto; font-size:11px; font-weight:700; }
.ew-picker-state.on { color:var(--green); }
.ew-picker-state.off { color:var(--muted); }
/* Connector library (Surface A, bite 3): seat faces ride the crew
   tile (#10151F in every theme, like .ew-crew-face); library rows
   carry a two-line text block and, for toggleable rows, a switch. */
.ew-lib-face { flex:none; width:28px; height:28px; border-radius:8px; background:#10151F; display:grid; place-items:center; overflow:hidden; }
.ew-lib-face > img { width:28px; height:28px; border-radius:8px; object-fit:cover; display:block; }
.ew-lib-icon { flex:none; width:28px; height:28px; border-radius:8px; background:var(--panel-2); border:1px solid var(--border); color:var(--muted); display:grid; place-items:center; font-weight:700; font-size:13px; }
.ew-lib-text { display:flex; flex-direction:column; min-width:0; }
.ew-lib-name { font-weight:600; }
/* The byline WRAPS (panel bite, 2026-11-08): forced onto one line it
   was clipped mid-word inside the 340px "+" popup ("Connector by
   Google · Verifi…"). A wrapped second line costs a little height and
   never cuts a word in half. */
.ew-lib-line { color:var(--muted); font-size:12px; white-space:normal; overflow-wrap:break-word; }
.ew-lib-row { cursor:default; }
.ew-lib-row:hover { border-color:var(--border); }
.ew-lib-back { align-self:flex-start; }
.ew-lib-row.mirror .ew-picker-state { margin-left:0; }
.ew-lib-switch { flex:none; width:34px; height:20px; border-radius:999px; border:1px solid var(--border); background:var(--panel-2); position:relative; }
.ew-lib-switch::after { content:''; position:absolute; top:2px; left:2px; width:14px; height:14px; border-radius:50%; background:var(--muted); transition:left .15s, background .15s; }
.ew-picker-row.on .ew-lib-switch { background:var(--accent); border-color:var(--accent); }
.ew-picker-row.on .ew-lib-switch::after { left:16px; background:#fff; }
/* The panel Connect button (owner order, 2026-11-10): a real button
   on the not-connected row, sized to the row, never a bare label. */
.ew-lib-connect { flex:none; margin-left:auto; padding:4px 10px; border-radius:8px; border:1px solid var(--accent); background:var(--accent); color:#fff; font:inherit; font-size:12px; font-weight:600; cursor:pointer; }
.ew-lib-connect:hover { filter:brightness(1.1); }
.ew-slash-menu { gap:6px; }
.ew-slash-row .ew-slash-name { font-weight:700; white-space:nowrap; }
.ew-slash-row .ew-picker-kind { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
/* The "+" menu (bite 3R-b): the room composer's seat menu is one
   small popup anchored above the "+" button — a fixed narrow width,
   never the old full-width panel block. The composer becomes the
   positioning context; the menu keeps .ew-picker's chrome, column
   and scroll, and caps its own height. Only #ew-picker wears this
   class (added at wire time); the console's picker is untouched. */
.ew-composer { position:relative; }
.ew-picker.ew-plus-menu { position:absolute; left:10px; bottom:calc(100% + 6px); width:340px; max-width:calc(100vw - 24px); max-height:min(560px, 70vh); z-index:60; gap:6px; box-shadow:0 12px 32px rgba(0,0,0,.35); }
.ew-plus-head { display:flex; align-items:center; gap:6px; }
.ew-plus-sub { display:flex; flex-direction:column; gap:6px; margin-left:12px; padding-left:8px; border-left:1px solid var(--border); }
.ew-plus-file { display:none; }
/* Mirror rows are state, not controls: dashed and unfilled, so a
   vendor-brokered row never reads as something Helmian can arm. */
.ew-lib-row.mirror { border-style:dashed; background:transparent; }
.ew-plus-manage { text-decoration:none; }
/* Bite M2 rows: the needs-reconnect badge on a submenu head, the
   starter/prompt draft rows indented under their connector, and the
   GitHub file source's path bar + entries. */
.ew-picker-badge { margin-left:auto; font-size:11px; font-weight:700; color:var(--warn, #F59E0B); }
.ew-picker-badge + .ew-picker-state { margin-left:8px; }
.ew-plus-starter { padding-left:22px; }
.ew-gh-bar { display:flex; gap:6px; align-items:center; }
.ew-gh-path { flex:1; min-width:0; border:1px solid var(--border); border-radius:8px; background:var(--panel); color:var(--text); padding:6px 8px; font:inherit; font-size:13px; }
.ew-gh-entry { padding-left:22px; }
.ew-pills { display:flex; gap:6px; flex-wrap:wrap; }
.ew-pill { display:inline-flex; gap:6px; align-items:center; border:1px solid var(--border); background:var(--panel-2); color:var(--text); border-radius:999px; padding:2px 10px 2px 3px; font-size:12px; cursor:pointer; transition:border-color .15s, transform .1s; }
.ew-pill:hover { border-color:var(--accent); }
.ew-pill img { width:18px; height:18px; border-radius:50%; }
.ew-pill.all { padding-left:10px; }

/* CREW rail (UI polish bite 1): the sidebar presence list that
   replaces the composer pill strip and the Agents pane cards. One
   row per seat: a 36px boxless face, a status dot pinned at the
   face's bottom-right over a surface ring, the seat's name, and
   one plain line of current
   work. Every colour reads a theme token, so the light and black
   themes (and slate/midnight) style it in the identical shape. */
.ew-crew { flex:none; border-top:1px solid var(--border); padding:8px 6px 6px; }
.ew-crew-head { padding:2px 6px 6px; }
.ew-crew-title { color:var(--muted); font-size:11px; font-weight:700; letter-spacing:.08em; }
.ew-crew-list { display:flex; flex-direction:column; gap:2px; max-height:38vh; overflow:auto; }
.ew-crew-list .ew-note { padding:4px 6px 6px; }
.ew-crew-row { display:flex; align-items:center; gap:9px; width:100%; border:1px solid transparent; background:transparent; color:var(--text); padding:5px 6px; border-radius:8px; cursor:pointer; text-align:left; font:inherit; transition:background .15s, border-color .15s; }
.ew-crew-row:hover { background:var(--panel-2); }
.ew-crew-row:focus-visible { outline:2px solid var(--accent); outline-offset:-2px; }
.ew-crew-row.selected { background:var(--panel-2); border-color:var(--accent); box-shadow:inset 3px 0 0 var(--accent); }
.ew-crew-face { position:relative; flex:none; width:36px; height:36px; border-radius:0; background:transparent; display:grid; place-items:center; font-weight:700; color:var(--text); overflow:visible; }
.ew-crew-face > img { width:36px; height:36px; border-radius:0; object-fit:contain; display:block; }
.ew-crew-face > video.ew-crew-face-video,
.ew-msg .ew-avatar.face-ava > video.ew-crew-face-video { width:36px; height:36px; border-radius:0; object-fit:contain; display:block; }
/* Clips are opaque black-stage VP9. The matching still is real RGBA.
   Mask the video with that still so a boxless slot does not become
   a black square. Motion outside the still silhouette is clipped,
   except the animated fourteen (owner, grok, openrouter, claude, muse,
   qwen, gemini, maestro, helm, chatgpt, groq, cloudflare, mistral,
   nvidia), whose masks
   are the union silhouettes of all their poses (<slug>-mask.png,
   wired in faceMaskStyle), so a head tilt or a face turn is not
   clipped by the neutral still's outline. */
.ew-crew-face > video.ew-crew-face-video,
.ew-msg .ew-avatar.face-ava > video.ew-crew-face-video {
  -webkit-mask-image:var(--face-mask);
  mask-image:var(--face-mask);
  -webkit-mask-size:contain;
  mask-size:contain;
  -webkit-mask-repeat:no-repeat;
  mask-repeat:no-repeat;
  -webkit-mask-position:center;
  mask-position:center;
  background:transparent;
}
.ew-crew-face > .hx-emoji { width:30px; height:30px; object-fit:contain; }
.ew-crew-initial { font-size:16px; }
.ew-crew-dot { position:absolute; right:-3px; bottom:-3px; width:10px; height:10px; border-radius:50%; background:var(--faint); box-shadow:0 0 0 2px var(--panel); z-index:1; }
.ew-crew-dot.live { background:var(--green); }
.ew-crew-dot.working { background:var(--accent); animation:ew-pulse 1.1s ease-in-out infinite; }
.ew-crew-dot.limit { background:var(--amber); box-shadow:0 0 0 2px var(--panel), 0 0 0 4px var(--red); }
.ew-crew-dot.offline { background:transparent; border:2px solid var(--faint); width:6px; height:6px; }
@media (prefers-reduced-motion: reduce) { .ew-crew-dot.working { animation:none; } }
/* Face motion (emoji bite 4 + the boxless fix): the activity motion
   classes ride the face shell — crew rail and message rows alike —
   but the animation lands on the PICTURE inside it (img / video /
   .hx-emoji), never on the shell, so the shell and the crew status
   dot stay put and a still-mode emoji never double-moves with its
   wrapper. Reduced motion never animates.
   Roll (2026-11-10): while a seat works, its face picture tumbles —
   one smooth turn with a slight shrink at the halfway point. The
   roll/talk selectors outrank the bite-4c idle sway on the same
   picture, so a working face rolls instead of breathing: the crew
   selectors keep their .ew-crew-list scope (higher specificity),
   and the message selectors are scoped to .ew-messages and stand
   after the idle rule. */
/* Faces bite 4c — still-mode idle life: a standing-by face whose
   slot holds the pack still (plain mode, reduced motion's still,
   or a clip that failed and fell back) breathes — a slow, small
   swell on the picture itself, transform-only so nothing reflows.
   Message rows included. Roll/talk outrank this. Reduced motion
   turns it off like every other face animation here. */
.ew-crew-face > img.ew-crew-face-img,
.ew-msg .ew-avatar > img.ew-crew-face-img { animation:ew-ava-idle 3.4s ease-in-out infinite; }
@keyframes ew-ava-idle { 0%, 100% { transform:scale(1) translateY(0); } 50% { transform:scale(1.05) translateY(-.5px); } }
@media (prefers-reduced-motion: reduce) {
  .ew-crew-face > img.ew-crew-face-img,
  .ew-msg .ew-avatar > img.ew-crew-face-img { animation:none; }
}
.ew-crew-list .ew-crew-face.ew-ava-roll > img,
.ew-crew-list .ew-crew-face.ew-ava-roll > video,
.ew-messages .ew-avatar.ew-ava-roll > img,
.ew-messages .ew-avatar.ew-ava-roll > video,
.ew-messages .ew-avatar.ew-ava-roll > .hx-emoji { animation:ew-ava-roll 1.6s ease-in-out infinite; }
.ew-crew-list .ew-crew-face.ew-ava-talk > img,
.ew-crew-list .ew-crew-face.ew-ava-talk > video,
.ew-messages .ew-avatar.ew-ava-talk > img,
.ew-messages .ew-avatar.ew-ava-talk > video,
.ew-messages .ew-avatar.ew-ava-talk > .hx-emoji { animation:ew-ava-talk .5s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) {
  .ew-crew-list .ew-crew-face.ew-ava-roll > img, .ew-crew-list .ew-crew-face.ew-ava-roll > video,
  .ew-crew-list .ew-crew-face.ew-ava-talk > img, .ew-crew-list .ew-crew-face.ew-ava-talk > video,
  .ew-messages .ew-avatar.ew-ava-roll > img, .ew-messages .ew-avatar.ew-ava-roll > video, .ew-messages .ew-avatar.ew-ava-roll > .hx-emoji,
  .ew-messages .ew-avatar.ew-ava-talk > img, .ew-messages .ew-avatar.ew-ava-talk > video, .ew-messages .ew-avatar.ew-ava-talk > .hx-emoji { animation:none; }
}
.ew-crew-text { flex:1 1 auto; min-width:0; display:flex; flex-direction:column; gap:1px; }
.ew-crew-name { font-size:13.5px; font-weight:600; display:flex; align-items:center; gap:5px; min-width:0; }
.ew-crew-name-text { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
/* The crew screen icon (live view icon bite): a fixed 14px box,
   so a row's geometry never moves when it appears or changes
   state. Idle is a dimmed outline; live fills the screen with
   the accent color. Both states are doors and take the pointer:
   idle opens the browser tab, live opens the seat's screen. */
.ew-crew-watch { flex:none; display:inline-flex; align-items:center; justify-content:center; width:14px; height:14px; color:var(--muted); opacity:.45; cursor:pointer; }
.ew-crew-watch svg { display:block; }
.ew-crew-watch-screen { fill:none; stroke:currentColor; stroke-width:1.8; }
.ew-crew-watch-stand { fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; }
.ew-crew-watch.live { color:var(--accent); opacity:1; }
.ew-crew-watch.live .ew-crew-watch-screen { fill:currentColor; }
.ew-crew-watch:focus-visible { outline:2px solid var(--accent); outline-offset:1px; border-radius:3px; }
.ew-crew-line { font-size:12px; color:var(--muted); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.ew-activity-body { display:flex; align-items:center; gap:8px; color:var(--muted); }
.ew-working-dot { width:8px; height:8px; border-radius:50%; background:var(--amber); flex:none; animation:ew-pulse 1.1s ease-in-out infinite; }
@keyframes ew-pulse { 0%, 100% { opacity:.35; } 50% { opacity:1; } }
@media (prefers-reduced-motion: reduce) { .ew-working-dot { animation:none; } }
/* Seat avatar motion keyframes (emoji bite 4): the classes are
   added by activityMotionClass in envoy-workspace.js only while
   the seat's real activity stage is live, and the animation rules
   above (with the crew rail's) land them on the picture inside the
   shell — working seats roll (Troy's Grok-companion ask,
   2026-11-10), a seat whose reply is publishing gets the talking
   bobble, and reduced motion never animates (the JS gate already
   withholds the class — the CSS lock above is the second lock).
   Faces only — no other element uses these keyframes. */
@keyframes ew-ava-roll { 0% { transform:rotate(0deg) scale(1); } 50% { transform:rotate(180deg) scale(.88); } 100% { transform:rotate(360deg) scale(1); } }
@keyframes ew-ava-talk { 0%, 100% { transform:translateY(0) rotate(0deg) scale(1); } 25% { transform:translateY(-2px) rotate(-7deg) scale(1.05); } 75% { transform:translateY(-2px) rotate(7deg) scale(1.05); } }
.ew-agent-add { display:flex; flex-wrap:wrap; gap:6px; padding:0 12px 6px; }

/* Workbench */
.ew-tabs { display:flex; align-items:center; gap:2px; padding:6px 8px; border-bottom:1px solid var(--border); min-height:46px; overflow-x:auto; }
.ew-tab { border:0; background:transparent; color:var(--muted); padding:6px 10px; border-radius:7px; cursor:pointer; font-weight:600; font-size:13px; position:relative; transition:color .15s, background .15s; }
.ew-tab:hover { color:var(--text); background:var(--panel-2); }
.ew-tab.active { color:var(--text); }
.ew-tab.active::after { content:""; position:absolute; left:10px; right:10px; bottom:-7px; height:2px; background:var(--accent); border-radius:2px; }
.ew-tabpane { display:flex; flex-direction:column; flex:1 1 auto; min-height:0; animation:ew-fade .18s var(--ease); }
@keyframes ew-fade { from { opacity:0; } to { opacity:1; } }
.guard-card { border:1px solid var(--border); border-left:3px solid var(--faint); border-radius:8px; padding:8px 10px; margin:6px 0; background:var(--panel-2); }
.guard-card.critical { border-left-color:var(--red); } .guard-card.warning { border-left-color:var(--amber); } .guard-card.info { border-left-color:var(--green); }
.guard-card-head { display:flex; gap:8px; align-items:center; font-size:11px; }
.guard-card-title { font-weight:600; margin-top:3px; }
.severity { font-weight:800; letter-spacing:.04em; }
.severity.critical { color:var(--red); } .severity.warning { color:var(--amber); } .severity.info { color:var(--green); }

.ew-browser { display:flex; flex-direction:column; flex:1 1 auto; min-height:0; }
.ew-browser-bar { display:flex; align-items:center; gap:4px; padding:8px; border-bottom:1px solid var(--border); }
.ew-browser-bar input { flex:1 1 auto; min-width:60px; border-radius:999px; padding:6px 12px; }
.ew-browser-status { color:var(--faint); font-size:11px; padding:4px 12px; min-height:22px; }
.ew-browser-view { position:relative; flex:1 1 auto; min-height:0; background:#fff; }
.ew-browser-view iframe { position:absolute; inset:0; width:100%; height:100%; border:0; background:#fff; }
.ew-browser-view canvas { position:absolute; inset:0; width:100%; height:100%; border:0; background:#fff; }
.ew-browser-watchbar { border-bottom:1px solid var(--border); padding:2px 12px; }
.ew-browser-watchbar:empty { display:none; }
.ew-watch-row { display:flex; align-items:center; gap:8px; min-height:30px; font-size:12px; }
.ew-watch-live { font-weight:600; }
.ew-watch-driving-label { font-weight:600; color:var(--accent); }
.ew-browser-view canvas.ew-watch-driving { outline:2px solid var(--accent); outline-offset:-2px; cursor:crosshair; }
/* Browser tab faces (live view stage bite, 2026-11-15): the tab's
   face is the agent screens — the watch bar over the stage — and
   the public-sites browser (address bar, start page, frame) sits
   one click behind the face switch at the top of the tab. Each
   face is a column of the same .ew-browser stack and the hidden
   face is out of layout entirely, so the shown face holds the
   tab's full height; the watch canvas keeps filling its view
   exactly as it did when the view was shared. */
.ew-browser-faces { display:flex; align-items:center; padding:8px 8px 4px; }
.ew-bface { display:flex; flex-direction:column; flex:1 1 auto; min-height:0; }
.ew-bface[hidden] { display:none; }
.ew-bface-dot { display:inline-block; width:7px; height:7px; border-radius:50%; background:var(--accent); margin-left:6px; }
.ew-bface-dot[hidden] { display:none; }
.ew-browser-idle { position:absolute; inset:0; display:flex; align-items:center; justify-content:center; padding:24px; text-align:center; background:var(--panel); color:var(--muted); font-size:13px; line-height:1.55; }
.ew-browser-idle[hidden] { display:none; }
.ew-browser-start { position:absolute; inset:0; background:var(--panel); padding:18px; overflow:auto; }
.ew-quick { display:grid; grid-template-columns:repeat(auto-fill, minmax(130px, 1fr)); gap:8px; margin-top:10px; }
.ew-quick button { text-align:left; border:1px solid var(--border); background:var(--panel-2); color:var(--text); border-radius:10px; padding:10px; cursor:pointer; font-size:12px; }
.ew-quick button:hover { border-color:var(--accent); }
.ew-quick button span { display:block; color:var(--faint); font-size:11px; margin-top:2px; overflow:hidden; text-overflow:ellipsis; }

.ew-canvas { display:flex; flex-direction:column; flex:1 1 auto; min-height:0; }
.ew-canvas-bar { display:flex; align-items:center; gap:8px; padding:8px; border-bottom:1px solid var(--border); }
.ew-seg { display:inline-flex; border:1px solid var(--border); border-radius:8px; overflow:hidden; }
.ew-seg button { border:0; background:transparent; color:var(--muted); padding:4px 10px; cursor:pointer; font-size:12px; font-weight:600; }
.ew-seg button.active { background:var(--panel-2); color:var(--text); }
.ew-canvas-body { flex:1 1 auto; display:grid; min-height:0; }
.ew-canvas-body.split { grid-template-columns:1fr 1fr; }
.ew-canvas-body.code { grid-template-columns:1fr 0; }
.ew-canvas-body.live { grid-template-columns:0 1fr; }
.ew-canvas-body textarea { border:0; border-right:1px solid var(--border); border-radius:0; resize:none; font:12px/1.55 var(--mono); padding:10px; background:#0F141C; color:#DCE7EE; min-width:0; }
.ew-canvas-body iframe { border:0; width:100%; height:100%; background:#fff; min-width:0; }

/* Modal */
.ew-modal { position:fixed; inset:0; display:grid; place-items:center; z-index:60; visibility:hidden; opacity:0; background:rgba(5,8,14,.6); transition:opacity var(--dur) var(--ease), visibility 0s linear var(--dur); }
.ew-modal.open { visibility:visible; opacity:1; transition:opacity var(--dur) var(--ease); }
.ew-modal-card { width:min(480px, calc(100vw - 24px)); background:var(--panel); border:1px solid var(--border); border-radius:14px; box-shadow:0 20px 60px rgba(0,0,0,.5); transform:translateY(10px) scale(.98); transition:transform var(--dur) var(--ease); }
.ew-modal.open .ew-modal-card { transform:none; }
.ew-modal-body { padding:14px 16px 18px; display:flex; flex-direction:column; gap:12px; line-height:1.5; }
.ew-code { font:700 22px/1 var(--mono); letter-spacing:.12em; background:var(--bg); border:1px dashed var(--accent); border-radius:10px; padding:12px; text-align:center; user-select:all; }
.ew-steps { margin:0; padding-left:20px; display:flex; flex-direction:column; gap:6px; }
.ew-scrim { position:fixed; inset:0; background:rgba(5,8,14,.55); z-index:40; opacity:0; visibility:hidden; transition:opacity var(--dur) var(--ease), visibility 0s linear var(--dur); }
.ew-scrim.open { opacity:1; visibility:visible; transition:opacity var(--dur) var(--ease); }

/* Medium screens: workbench starts narrower. */
@media (max-width: 1280px) { :root { --ew-bench:360px; --ew-channels:210px; --ew-guard:270px; } }

/* Phones and small tablets: chat full width; the other panes slide in as sheets. */
@media (max-width: 900px) {
  #ew-bench-max { display:none; }
  .ew-tabs .ew-tab { padding-left:8px; padding-right:8px; }
  .ew-tabs [data-collapse="bench"] { font-size:20px; }
  .ew-chat, .ew-channels, .ew-bench, .ew-guard { min-width:0; }
  .view.desktop { height:calc(100dvh - 52px); }
  .ew-split { display:none; }
  .ew-hsplit { display:none; }
  .ew-reveal { display:inline-grid; }
  .ew-pane.ew-channels, .ew-pane.ew-bench, .ew-pane.ew-guard { position:fixed; top:0; bottom:0; z-index:50; width:min(86vw, 360px); flex:none; opacity:1; pointer-events:auto; box-shadow:0 0 40px rgba(0,0,0,.5); }
  .ew-pane.ew-bench { width:100vw; }
  .ew-pane.ew-channels { left:0; transform:translateX(-100%); }
  .ew-pane.ew-bench, .ew-pane.ew-guard { right:0; transform:translateX(100%); }
  .ew-pane.sheet-open { transform:none; }
  .ew-pane.collapsed { flex-basis:auto !important; opacity:1; pointer-events:auto; }
  .ew-chat-head { gap:4px; padding:6px 8px; }
  .ew-chat-head .ew-btn.sm { padding:4px 8px; }
  .ew-hint { display:none; }
  .ew-messages { padding:10px 8px 6px; }
  .ew-composer { margin:0 8px 8px; }
  /* Phone tap targets (mobile pass 2026-10-24): the chat-head toggles and
     both composers are the primary phone controls — measured 24–36px tall,
     under the ~40px touch minimum. Grow them inside this block only. */
  .ew-btn.sm { min-height:38px; padding:8px 12px; }
  .ew-composer .ew-btn, .ew-btn.full { min-height:38px; }
  .ew-chat-head .ew-btn.sm { padding:8px 10px; }
  .ew-icon { width:38px; height:38px; }
  .ew-composer textarea { min-height:38px; }
  .voice-orb.sm { width:40px; height:40px; }
  .ew-channel { min-height:40px; }
  .ew-net-switch .ew-net-seg { padding-top:10px; padding-bottom:10px; }
  .ew-tab { padding-top:10px; padding-bottom:10px; }
  .ew-ava-btn { min-width:32px; min-height:32px; }
  .ew-canvas-body.split { grid-template-columns:1fr; grid-template-rows:1fr 1fr; }
  .ew-canvas-body textarea { border-right:0; border-bottom:1px solid var(--border); }
}

/* Icon rail: only the logo mark, primary nav icons and the service dot stay. */
.sidebar.rail #project-filter, .sidebar.rail #project-shelf, .sidebar.rail #project-shelf-empty, .sidebar.rail #new-project-form,
.sidebar.rail #sessions, .sidebar.rail #svc-text, .sidebar.rail #account, .sidebar.rail .foot-links { display:none !important; }
.sidebar.rail .side-group { gap:4px; }
.sidebar.rail .side-foot .svc { justify-content:center; }
.sidebar.rail .nav-item { font-size:17px; position:relative; }
.sidebar.rail .nav-item .badge { position:absolute; top:2px; right:2px; }
.sidebar { overflow-x:hidden; }

/* ---- Shell consistency on every /app page ---- */
/* Nav is its own section, not a child of Sessions. */
.side-nav #nav.submenu { margin:0; border-left:0; padding-left:0; gap:1px; }
.side-nav .advanced-nav { margin-top:6px; }
.side-nav .advanced-nav .submenu { margin-left:0; border-left:0; padding-left:0; }
.nav-item { width:100%; gap:8px; padding:7px 10px; font-size:13.5px; transition:background .15s, color .15s; }
.nav-item .label { flex:1 1 auto; overflow:hidden; text-overflow:ellipsis; }
.nav-item:focus-visible, .ew-btn:focus-visible, .ew-icon:focus-visible, .ew-tab:focus-visible, .gbtn:focus-visible, .ew-pill:focus-visible { outline:2px solid var(--accent); outline-offset:1px; }
.sessions li .name { flex:1 1 auto; min-width:0; overflow:hidden; text-overflow:ellipsis; }
.sessions li .x { opacity:0; transition:opacity .15s; } .sessions li:hover .x, .sessions li.active .x, .sessions li .x:focus-visible { opacity:1; }
.sessions-more { display:block; margin:4px 10px 0; font-size:12px; }
#project-shelf-empty { white-space:normal; }
.side-head .link-btn { font-size:11px; }

/* Rail tooltips */
.sidebar.rail { overflow:visible; z-index:35; }
.sidebar.rail .nav-item[data-tip]:hover::after, .sidebar.rail .nav-item[data-tip]:focus-visible::after {
  content:attr(data-tip); position:absolute; left:calc(100% + 10px); top:50%; transform:translateY(-50%);
  background:#0B1220; color:#F2F7FA; border:1px solid var(--border); border-radius:6px; padding:4px 8px; font-size:12px; white-space:nowrap; pointer-events:none; z-index:80; box-shadow:0 6px 18px rgba(0,0,0,.4); }
.sidebar.rail .advanced-nav, .sidebar.rail .side-sessions, .sidebar.rail #appearance { display:none; }
/* At rest the rail hides whole sections (above); "More" is the hint they
   exist. It hides again while peeked, when the real sections are showing. */
.rail-more { display:none; }
.sidebar.rail .rail-more { display:flex; }
.sidebar.rail.peek .rail-more { display:none; }

/* Rail peek: an unpinned rail expands over the content while the pointer is
   on it or it holds keyboard focus (app.js toggles .peek from hover/focus),
   and folds back to the icon strip when the pointer leaves. Desktop
   pointers only — touch uses the pin button on the rail as its toggle,
   and phones keep the drawer. The restores below undo every rail-mode
   hiding rule above (envoy.css) and in app.css, !important for !important. */
@media (min-width: 901px) and (hover: hover) and (pointer: fine) {
  .sidebar.rail.peek { position:fixed; left:0; top:0; bottom:0; width:var(--side-full-w); padding:16px 12px; z-index:55; overflow-y:auto; overflow-x:hidden; box-shadow:24px 0 48px rgba(0,0,0,.45); transition:width var(--dur) var(--ease), padding var(--dur) var(--ease); }
  .sidebar.rail.peek .logo { justify-content:flex-start; padding:0 4px; }
  .sidebar.rail.peek .logo strong { display:block; }
  .sidebar.rail.peek .logo span, .sidebar.rail.peek .nav-item span.label { display:inline; }
  .sidebar.rail.peek .side-head { display:flex; }
  .sidebar.rail.peek .accordion { display:block; }
  .sidebar.rail.peek .nav-item { justify-content:flex-start; padding:7px 10px; font-size:13.5px; }
  .sidebar.rail.peek .nav-item[data-tip]:hover::after, .sidebar.rail.peek .nav-item[data-tip]:focus-visible::after { content:none; }
  .sidebar.rail.peek .nav-item .badge { position:static; }
  .sidebar.rail.peek .side-foot .svc { justify-content:flex-start; }
  .sidebar.rail.peek .advanced-nav, .sidebar.rail.peek .side-sessions, .sidebar.rail.peek #appearance { display:block; }
  .sidebar.rail.peek #project-filter { display:block !important; }
  .sidebar.rail.peek #project-shelf, .sidebar.rail.peek #sessions, .sidebar.rail.peek #account { display:block !important; }
  .sidebar.rail.peek #project-shelf-empty:not([hidden]) { display:block !important; }
  .sidebar.rail.peek #new-project-form:not([hidden]) { display:flex !important; }
  .sidebar.rail.peek #svc-text { display:inline !important; }
  .sidebar.rail.peek .foot-links { display:flex !important; }
}

/* Right Guard column on non-Desktop pages: labelled actions, tidy tabs, no sideways scroll. */
.guard-head { flex-wrap:nowrap; }
.guard-head .title { white-space:nowrap; font-size:11px; color:var(--muted); }
.gbtn { border:1px solid var(--border); background:transparent; color:var(--muted); border-radius:6px; padding:3px 8px; font-size:11px; font-weight:600; cursor:pointer; white-space:nowrap; transition:color .15s, border-color .15s; }
.gbtn:hover { color:var(--text); border-color:var(--accent); }
.gbtn.icon { padding:3px 7px; }
.panel-tabs { overflow:hidden; gap:0; }
.panel-tab { flex:1 1 0; min-width:0; padding:8px 4px; font-size:12px; letter-spacing:0; overflow:hidden; text-overflow:ellipsis; text-align:center; }
.panel-tabs #workbench-collapse { flex:none; }
.panel-pane > .pane-head > .eyebrow:only-child { display:none; }
.panel-pane > .pane-head:has(> .eyebrow:only-child) { display:none; }
#browser-url { font-family:inherit; }
.feed .card, .feed > div { transition:border-color .15s; }

/* ---- Pass 1: chat header, composer, agent cards, empty panes ---- */
.ew-chat { container-type:inline-size; container-name:ewchat; }
.ew-chat-head strong { min-width:min(10ch, 40%); flex:0 1 auto; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.ew-chat-head .ew-btn { display:inline-flex; align-items:center; gap:6px; flex:none; }
.ew-chat-head .ew-btn svg { flex:none; }
.ew-chat-head .ew-badge { flex:0 1 auto; min-width:0; max-width:40%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
@container ewchat (max-width: 640px) {
  .ew-chat-head .ew-btn .lbl { display:none; }
  .ew-chat-head .ew-btn { padding:4px 7px; }
  .ew-hint { display:none; }
}
@container ewchat (max-width: 480px) {
  .ew-chat-head .ew-badge { font-size:0; width:8px; height:8px; padding:0; border-radius:50%; }
}
.ew-status { padding:6px 12px; color:var(--muted); font-size:12px; }
.ew-status:empty { display:none; }
.ew-pad { padding:8px 12px; }
.ew-empty { line-height:1.5; max-width:34ch; }

/* Onboarding checklist */
.check { display:inline-grid; place-items:center; width:18px; height:18px; border-radius:50%; border:1.5px solid var(--faint); flex:none; font-size:11px; color:transparent; }
.check.on { background:var(--accent); border-color:var(--accent); color:#06121f; }
.check.on::before { content:'✓'; }

@media (max-width: 900px) {
  .panel > .eyebrow:not(summary) { display:block; }
  input, select, textarea { max-width:100%; box-sizing:border-box; }
}

/* ---- One shell: Channels | CLI | Guard | Workbench ---- */
.ew-shield { width:14px; height:14px; flex:none; display:inline-block; background:currentColor; color:var(--accent);
  -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2 4 5v6c0 5 3.4 9.3 8 11 4.6-1.7 8-6 8-11V5l-8-3z'/%3E%3C/svg%3E") center/contain no-repeat;
          mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2 4 5v6c0 5 3.4 9.3 8 11 4.6-1.7 8-6 8-11V5l-8-3z'/%3E%3C/svg%3E") center/contain no-repeat; }
.ew-gh-mark { width:13px; height:13px; display:inline-block; background:currentColor;
  -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 0a8 8 0 0 0-2.5 15.6c.4 0 .5-.2.5-.4v-1.5c-2.2.5-2.7-1-2.7-1-.4-.9-.9-1.2-.9-1.2-.7-.5.1-.5.1-.5.8.1 1.2.8 1.2.8.7 1.3 1.9.9 2.3.7.1-.5.3-.9.5-1.1-1.8-.2-3.6-.9-3.6-4 0-.9.3-1.6.8-2.1-.1-.2-.4-1 .1-2.1 0 0 .7-.2 2.2.8a7.6 7.6 0 0 1 4 0c1.5-1 2.2-.8 2.2-.8.4 1.1.2 1.9.1 2.1.5.6.8 1.3.8 2.1 0 3.1-1.9 3.8-3.6 4 .3.3.6.8.6 1.5v2.2c0 .2.1.5.6.4A8 8 0 0 0 8 0z'/%3E%3C/svg%3E") center/contain no-repeat;
          mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 0a8 8 0 0 0-2.5 15.6c.4 0 .5-.2.5-.4v-1.5c-2.2.5-2.7-1-2.7-1-.4-.9-.9-1.2-.9-1.2-.7-.5.1-.5.1-.5.8.1 1.2.8 1.2.8.7 1.3 1.9.9 2.3.7.1-.5.3-.9.5-1.1-1.8-.2-3.6-.9-3.6-4 0-.9.3-1.6.8-2.1-.1-.2-.4-1 .1-2.1 0 0 .7-.2 2.2.8a7.6 7.6 0 0 1 4 0c1.5-1 2.2-.8 2.2-.8.4 1.1.2 1.9.1 2.1.5.6.8 1.3.8 2.1 0 3.1-1.9 3.8-3.6 4 .3.3.6.8.6 1.5v2.2c0 .2.1.5.6.4A8 8 0 0 0 8 0z'/%3E%3C/svg%3E") center/contain no-repeat; }
.ew-slack-mark { width:13px; height:13px; display:inline-block; background:currentColor;
  -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5.042 15.165a2.528 2.528 0 0 1-2.52 2.523A2.528 2.528 0 0 1 0 15.165a2.527 2.527 0 0 1 2.522-2.52h2.52v2.52zM6.313 15.165a2.527 2.527 0 0 1 2.521-2.52 2.527 2.527 0 0 1 2.521 2.52v6.313A2.528 2.528 0 0 1 8.834 24a2.528 2.528 0 0 1-2.521-2.522v-6.313zM8.834 5.042a2.528 2.528 0 0 1-2.521-2.52A2.528 2.528 0 0 1 8.834 0a2.528 2.528 0 0 1 2.521 2.522v2.52H8.834zM8.834 6.313a2.528 2.528 0 0 1 2.521 2.521 2.528 2.528 0 0 1-2.521 2.521H2.522A2.528 2.528 0 0 1 0 8.834a2.528 2.528 0 0 1 2.522-2.521h6.312zM18.956 8.834a2.528 2.528 0 0 1 2.522-2.521A2.528 2.528 0 0 1 24 8.834a2.528 2.528 0 0 1-2.522 2.521h-2.522V8.834zM17.688 8.834a2.528 2.528 0 0 1-2.523 2.521 2.527 2.527 0 0 1-2.52-2.521V2.522A2.527 2.527 0 0 1 15.165 0a2.528 2.528 0 0 1 2.523 2.522v6.312zM15.165 18.956a2.528 2.528 0 0 1 2.523 2.522A2.528 2.528 0 0 1 15.165 24a2.527 2.527 0 0 1-2.52-2.522v-2.522h2.52zM15.165 17.688a2.527 2.527 0 0 1-2.52-2.523 2.526 2.526 0 0 1 2.52-2.52h6.313A2.527 2.527 0 0 1 24 15.165a2.528 2.528 0 0 1-2.522 2.523h-6.313z'/%3E%3C/svg%3E") center/contain no-repeat;
          mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5.042 15.165a2.528 2.528 0 0 1-2.52 2.523A2.528 2.528 0 0 1 0 15.165a2.527 2.527 0 0 1 2.522-2.52h2.52v2.52zM6.313 15.165a2.527 2.527 0 0 1 2.521-2.52 2.527 2.527 0 0 1 2.521 2.52v6.313A2.528 2.528 0 0 1 8.834 24a2.528 2.528 0 0 1-2.521-2.522v-6.313zM8.834 5.042a2.528 2.528 0 0 1-2.521-2.52A2.528 2.528 0 0 1 8.834 0a2.528 2.528 0 0 1 2.521 2.522v2.52H8.834zM8.834 6.313a2.528 2.528 0 0 1 2.521 2.521 2.528 2.528 0 0 1-2.521 2.521H2.522A2.528 2.528 0 0 1 0 8.834a2.528 2.528 0 0 1 2.522-2.521h6.312zM18.956 8.834a2.528 2.528 0 0 1 2.522-2.521A2.528 2.528 0 0 1 24 8.834a2.528 2.528 0 0 1-2.522 2.521h-2.522V8.834zM17.688 8.834a2.528 2.528 0 0 1-2.523 2.521 2.527 2.527 0 0 1-2.52-2.521V2.522A2.527 2.527 0 0 1 15.165 0a2.528 2.528 0 0 1 2.523 2.522v6.312zM15.165 18.956a2.528 2.528 0 0 1 2.523 2.522A2.528 2.528 0 0 1 15.165 24a2.527 2.527 0 0 1-2.52-2.522v-2.522h2.52zM15.165 17.688a2.527 2.527 0 0 1-2.52-2.523 2.526 2.526 0 0 1 2.52-2.52h6.313A2.527 2.527 0 0 1 24 15.165a2.528 2.528 0 0 1-2.522 2.523h-6.313z'/%3E%3C/svg%3E") center/contain no-repeat; }
.ew-src-head { display:flex; align-items:center; gap:6px; color:var(--muted); font-size:10.5px; font-weight:700; letter-spacing:.09em; padding:12px 12px 4px; }
.ew-src-head:first-child { padding-top:6px; }
.ew-src-head .ew-discord-mark, .ew-foot .ew-discord-mark { color:#8B95FF; }
.ew-src-head .ew-slack-mark, .ew-foot .ew-slack-mark { color:#E3B7E8; }
/* Network flip (bite 2): labelled three-segment Envoy/Discord/Slack
   switch at the top of the channels pane + the anti-mis-send strip
   above the composer. Geometry is identical in every mode; Discord
   mode adds the blurple accent and Slack mode the aubergine accent
   as redundant cues next to the word labels. */
.ew-net-switch { display:flex; gap:2px; margin:10px 10px 0; padding:2px; border:1px solid var(--border); border-radius:999px; background:var(--panel-2); flex:none; }
.ew-net-seg { flex:1; display:inline-flex; align-items:center; justify-content:center; gap:6px; border:0; background:transparent; color:var(--muted); font-weight:700; font-size:12.5px; padding:5px 8px; border-radius:999px; cursor:pointer; transition:background .15s, color .15s; }
.ew-net-seg.on { background:var(--accent); color:#04121c; }
.ew-net-seg#ew-net-discord.on { background:#5865F2; color:#fff; }
.ew-net-seg#ew-net-slack.on { background:#611F69; color:#fff; }
.ew-net-seg .ew-discord-mark { width:12px; height:12px; }
.ew-net-seg .ew-slack-mark { width:12px; height:12px; }
.ew-net-count { background:var(--panel); border:1px solid var(--border); color:var(--text); font-size:10.5px; font-weight:700; border-radius:999px; padding:0 6px; line-height:16px; }
.ew-net-strip { flex:none; padding:5px 16px; font-size:11.5px; font-weight:600; color:var(--muted); border-top:1px solid var(--border); background:var(--panel-2); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.ew-agent-state { flex:none; padding:8px 16px; font-size:12.5px; font-weight:600; color:#FBBF24; border-top:1px solid var(--border); background:rgba(245,158,11,.08); }
/* First-run hand-off (polish P1): the setup card under the asleep
   banner — one button, the Agents tab, gone once a seat connects. */
.ew-first-run { flex:none; display:flex; align-items:center; gap:14px; padding:10px 16px; border-top:1px solid var(--border); background:var(--panel-2); }
.ew-first-run[hidden] { display:none; }
.ew-first-run-body { flex:1; min-width:0; }
.ew-first-run-body strong { display:block; font-size:13px; color:var(--text); }
.ew-first-run-body p { margin:2px 0 0; font-size:12px; color:var(--muted); }
.ew-net-strip.discord { color:#AAB4FF; box-shadow:inset 3px 0 0 #5865F2; }
#ew-chat.net-discord .ew-composer { border-color:rgba(88,101,242,.55); }
.ew-net-strip.slack { color:#E3B7E8; box-shadow:inset 3px 0 0 #611F69; }
#ew-chat.net-slack .ew-composer { border-color:rgba(97,31,105,.55); }
.ew-channel-list .ew-note { padding:2px 12px 6px 32px; font-size:11.5px; }
.ew-channel-list .ew-note a { color:var(--accent); }
.ew-guard-sum { color:var(--muted); font-size:11px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.ew-guard { background:var(--panel); }
.ew-guard .ew-scroll { flex:1 1 auto; }
.ew-approvals { border-bottom:1px solid var(--border); padding-bottom:8px; }
.ew-count { display:inline-grid; place-items:center; min-width:16px; height:16px; padding:0 4px; border-radius:999px; background:var(--amber, #F59E0B); color:#1A1205; font-size:10px; font-weight:800; margin-left:4px; vertical-align:middle; }
.ew-count:empty { display:none; }
.ew-approvals-list { display:flex; flex-direction:column; gap:4px; padding:0 10px; }
.ew-approvals-list .ew-note { padding:2px 2px 4px; }
.ew-approval { display:flex; justify-content:space-between; gap:8px; padding:7px 9px; border-radius:8px; border:1px solid rgba(245,158,11,.35); background:rgba(245,158,11,.07); color:var(--text); text-decoration:none; font-size:12.5px; }
.ew-approval:hover { border-color:var(--amber, #F59E0B); }
.ew-approval-title { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.ew-approval-time { color:var(--muted); font-size:11px; flex:none; }
.ew-approval-card { display:flex; flex-direction:column; gap:5px; padding:7px 9px; border-radius:8px; border:1px solid rgba(245,158,11,.35); background:rgba(245,158,11,.07); color:var(--text); font-size:12.5px; }
.ew-approval-main { display:flex; justify-content:space-between; gap:8px; }
.ew-approval-meta { color:var(--muted); font-size:11.5px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.ew-approval-btns { display:flex; gap:6px; }
.ew-approvals-open { display:inline-block; margin:8px 10px 0; text-decoration:none; }
.ew-field { display:flex; flex-direction:column; gap:4px; font-size:11px; color:var(--muted); }
.ew-field select { width:100%; }
/* A field's caption line: full-strength, so labels read as labels
   instead of as faint helper text (Create Agent dialog, polish pass). */
.ew-field-label { font-size:12px; font-weight:600; color:var(--text); }
/* CLI agent picker */
.ew-pills { display:flex; gap:6px; flex-wrap:wrap; }
.ew-pill.add { opacity:.7; border-style:dashed; }
.ew-pill.add:hover { opacity:1; }
.ew-pill.session { margin-left:auto; color:var(--accent); border-color:rgba(56,189,248,.45); }
@media (max-width: 900px) {
  .ew-pills { flex-wrap:nowrap; overflow-x:auto; scrollbar-width:none; -webkit-mask:linear-gradient(90deg,#000 88%,transparent); mask:linear-gradient(90deg,#000 88%,transparent); }
  .ew-pills::-webkit-scrollbar { display:none; }
  .ew-pill { flex:none; }
  .ew-pill.session { margin-left:0; }
}

/* ---- Chat avatars: characters or simple letter icons ---- */
.ew-ava { display:inline-grid; place-items:center; width:28px; height:28px; border-radius:9px; flex:none; font-size:17px; line-height:1; user-select:none; }
.ew-ava.sm { width:22px; height:22px; border-radius:7px; font-size:13px; }
.ew-ava.char { background:var(--panel-2); border:1px solid var(--border); }
.ew-ava.plain { background:color-mix(in srgb, var(--ava) 22%, transparent); color:var(--ava); border:1px solid color-mix(in srgb, var(--ava) 45%, transparent); font-weight:800; font-size:13px; }
.ew-ava.plain.sm { font-size:11px; }
.ew-ava-btn { border:0; background:transparent; padding:0; cursor:pointer; display:inline-grid; place-items:center; border-radius:10px; transition:transform .12s var(--ease); }
.ew-ava-btn:hover { transform:scale(1.08); }
.ew-ava-btn:focus-visible { outline:2px solid var(--accent); outline-offset:2px; }
.ew-ava-pick { display:flex; flex-direction:column; gap:8px; margin-top:4px; }
.ew-seg { display:inline-flex; align-self:flex-start; border:1px solid var(--border); border-radius:999px; padding:2px; background:var(--panel-2); }
.ew-seg button { border:0; background:transparent; color:var(--muted); font-weight:600; font-size:12px; padding:4px 12px; border-radius:999px; cursor:pointer; transition:background .15s, color .15s; }
.ew-seg button.on { background:var(--accent); color:#04121c; }
/* Helmian's own emoji art (emoji-map.mjs): inline in message text it sits
   on the text line; inside the round/square avatar frames it stays glyph-
   sized instead of filling the frame like the provider logos do. */
.hx-emoji { width:1.3em; height:1.3em; vertical-align:-0.3em; object-fit:contain; }
.ew-avatar .hx-emoji { width:25px; height:25px; vertical-align:middle; }
.ew-ava-grid { display:grid; grid-template-columns:repeat(6, minmax(0, 1fr)); gap:6px; max-width:300px; }
.ew-ava-grid.plain { grid-template-columns:repeat(4, minmax(0, 1fr)); max-width:200px; }
.ew-ava-grid .ew-ava { width:100%; aspect-ratio:1; height:auto; cursor:pointer; font-size:19px; transition:transform .12s var(--ease), border-color .15s, box-shadow .15s; }
.ew-ava-grid .ew-ava:hover { transform:translateY(-2px) scale(1.06); }
.ew-ava-grid .ew-ava.on { border-color:var(--accent); box-shadow:0 0 0 2px color-mix(in srgb, var(--accent) 45%, transparent); }
.ew-ava-grid .ew-ava:focus-visible { outline:2px solid var(--accent); outline-offset:1px; }
.ew-new-channel .ew-field { display:flex; flex-direction:column; gap:4px; font-size:12px; color:var(--muted); }
@media (prefers-reduced-motion: reduce) { .ew-ava-btn, .ew-ava-grid .ew-ava { transition:none; } }

/* ---- Integrations: small friendly cards ---- */
.int-page { display:flex; flex-direction:column; gap:18px; max-width:1100px; }
/* R1 (Integrations redesign): the 1100px cap covers the WHOLE view —
   heading, tab bar and the card sections. */
#view-integrations { max-width:1100px; }
.int-tabs { display:flex; gap:2px; flex-wrap:wrap; border-bottom:1px solid var(--border); padding-bottom:8px; margin-bottom:18px; position:sticky; top:0; z-index:2; background:var(--bg); }
.int-tab { position:relative; border:0; background:transparent; color:var(--muted); font-weight:700; font-size:12px; letter-spacing:.04em; padding:8px 10px; border-radius:6px 6px 0 0; cursor:pointer; white-space:nowrap; min-height:40px; }
.int-tab:hover { color:var(--text); background:var(--panel-2); }
.int-tab.active { color:var(--text); box-shadow:inset 0 -2px 0 var(--accent); }
.int-head { margin:0 0 8px; font-size:12px; letter-spacing:.08em; text-transform:uppercase; color:var(--faint); font-weight:700; }
/* R2 (Integrations redesign §2): the compact card. Grid per spec —
   minmax(232px, 1fr), 8px gap; cards size to their own content
   (align-items:start) so a resting card is its own 60–72px, never
   stretched by a taller neighbour. */
.int-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(232px, 1fr)); gap:8px; align-items:start; }
/* Connector catalog (bite 2): cards ride the integrations grid; the
   catalog card is a plain read-only listing — name, vendor, what it
   does, its live-fetched tools — with no action on it. */
.cat-head { display:flex; flex-wrap:wrap; gap:8px 16px; align-items:center; justify-content:space-between; margin-bottom:12px; }
.cat-seat { font-size:13px; color:var(--faint); display:flex; gap:6px; align-items:center; }
.cat-card { border:1px solid var(--border); background:var(--panel); border-radius:14px; padding:12px; display:flex; flex-direction:column; gap:6px; }
.cat-card-head { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.cat-card-head h4 { margin:0; font-size:14px; }
.cat-chip { font-size:10px; letter-spacing:.06em; text-transform:uppercase; color:var(--accent); border:1px solid var(--border); border-radius:999px; padding:2px 7px; }
.cat-vendor { margin:0; font-size:12px; color:var(--faint); font-weight:600; }
.cat-line { margin:0; font-size:13px; }
.cat-meta, .cat-state { margin:0; font-size:12px; color:var(--faint); }
.cat-tools { border-top:1px solid var(--border); padding-top:6px; }
.cat-tools-count { margin:0 0 4px; font-size:12px; font-weight:600; }
.cat-tools-list { margin:0; padding-left:16px; font-size:12px; display:flex; flex-direction:column; gap:2px; }
.cat-source { font-size:12px; margin-top:auto; }
.int-card { border:1px solid var(--border); background:var(--panel); border-radius:14px; padding:12px; display:flex; flex-direction:column; gap:8px; transition:border-color .15s, transform .15s var(--ease); animation:ew-in .22s var(--ease); }
.int-card:hover { border-color:color-mix(in srgb, var(--accent) 45%, var(--border)); transform:translateY(-1px); }
.int-card.wide { grid-column:span 2; }
/* The resting row: 28px icon, name + state on one line, one button.
   min-height 36px + the card's 12px padding lands the resting card
   at 62px; the second-line slot (account line / one-line
   description) fits inside the same 36px before it can grow it. */
.int-top { display:flex; align-items:center; gap:10px; min-height:36px; }
.int-icon { width:28px; height:28px; flex:none; border-radius:9px; background:var(--panel-2); border:1px solid var(--border); display:grid; place-items:center; font-size:15px; }
.int-icon img { border-radius:6px; }
/* Letter tile for AI cards with no settled asset file (Mistral,
   Runway): the same construction as the /assets/agents/ tiles — a
   filled circle, dark ring, near-black initial — coloured from the
   app's plain-avatar palette (avatars.mjs, via --ava). */
.int-tile { width:24px; height:24px; box-sizing:border-box; border-radius:50%; background:var(--ava); border:2px solid #141a22; color:#0d1117; display:grid; place-items:center; font-size:12px; font-weight:800; line-height:1; }
.int-icon .ew-discord-mark, .int-icon .ew-gh-mark, .int-icon .ew-slack-mark { width:16px; height:16px; }
.int-text { flex:1; min-width:0; display:flex; flex-direction:column; gap:2px; justify-content:center; }
/* The name line wraps (P2 fix, 2026-11-09): the name and the state
   shared one no-wrap row, and at the grid's narrow card width the
   state ("• Not connected", a flex:none block) won the whole line
   and the name ellipsised to a single letter ("C…"). Wrapping lets
   the state drop to its own line when the two cannot share one, so
   the seat name always renders in full; the ellipsis on .int-name
   remains only as the last resort for a name longer than the card. */
.int-line1 { display:flex; align-items:center; gap:8px; min-width:0; flex-wrap:wrap; row-gap:2px; }
.int-name { font-weight:700; font-size:14px; line-height:1.3; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; min-width:0; }
/* State is a dot and the model's own words — the pill is retired.
   The dot carries the colour the pill's border used to carry. */
.int-state { display:inline-flex; align-items:center; gap:6px; font-size:11.5px; font-weight:700; color:var(--muted); white-space:nowrap; flex:none; }
.int-dot { width:8px; height:8px; border-radius:50%; background:var(--faint); flex:none; }
.int-state.on .int-dot { background:#4ade80; }
.int-state.off .int-dot { background:#fbbf24; }
.int-state.qr .int-dot, .int-state.info .int-dot { background:var(--accent); }
/* The second line: the account line on a connected AI seat, else the
   card's description held to one line. Same slot, same size. */
.int-sub { font-size:11.5px; line-height:1.3; color:var(--muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.int-blurb { color:var(--muted); font-size:12.5px; line-height:1.35; }
/* The Manage expansion: everything a card does lives here, opened in
   place under the resting row. Width is the card's own (≤ the grid
   cell, well under the design's 560px cap). */
.int-open { border-top:1px solid var(--border); padding-top:10px; display:flex; flex-direction:column; gap:10px; animation:ew-in .2s var(--ease); }
.int-actions { display:flex; gap:8px; }
.int-help { border-top:1px solid var(--border); padding-top:8px; display:flex; flex-direction:column; gap:4px; animation:ew-in .2s var(--ease); }
.int-help p { margin:0; }
/* R3 (Integrations redesign §2): fields ACROSS. The form is one flex
   row — fields flexible, the submit button fixed — never a stacked
   column. The label text is not printed above the field: the field's
   placeholder names it on screen, and the label text rides a
   visually-hidden span so the input keeps its accessible name.
   Wrap: each field carries a 96px flex basis, so once the row can no
   longer hold fields + button (about 294px of content width) the
   button drops to a second row, right-aligned by its auto left
   margin, while the fields stay side by side on the first row. The
   note always takes its own full row under the fields. */
.connect-fields { display:flex; flex-wrap:wrap; align-items:center; gap:8px; margin-top:auto; }
.connect-fields-label { flex:1 1 96px; min-width:0; display:block; }
.connect-fields-label-text { position:absolute; width:1px; height:1px; margin:-1px; padding:0; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; border:0; }
.connect-fields-input { width:100%; box-sizing:border-box; }
.connect-fields > button { flex:none; margin-left:auto; }
.connect-fields-note { flex:1 0 100%; margin:0; }
/* The phone card is the one exception to the resting height (§2):
   two cells wide, the QR at 96px, its three steps across. */
.int-qr-row { display:flex; gap:16px; align-items:center; }
.int-qr { width:96px; height:96px; flex:none; border-radius:12px; overflow:hidden; background:#fff; }
.int-qr svg { width:100%; height:100%; display:block; }
.int-steps { margin:0; padding-left:18px; color:var(--muted); font-size:13px; display:flex; flex-direction:row; gap:14px; }
.int-steps li { flex:1 1 0; }
@media (max-width: 900px) {
  .int-grid { grid-template-columns:1fr; }
  .int-card.wide { grid-column:auto; }
}

/* On the phone itself the QR is pointless; keep the steps. */
@media (max-width: 900px) and (pointer: coarse) {
  .int-qr { display:none; }
}

/* ── The Maestro desk ─────────────────────────────────────────────
   The desk channel's row in the channel list is marked in amber.
   The desk itself wears no costume (fun pass F4): no banner over
   the thread, no frame on the chat pane — it is simply the desk
   channel. (Its handoff/checkpoint lists live in the Evidence view.) */
.ew-channel.seat { border:1px solid rgba(245,158,11,.45); background:rgba(245,158,11,.07); color:var(--text); }
.ew-channel.seat:hover { background:rgba(245,158,11,.13); }
.ew-channel.seat.active { background:rgba(245,158,11,.16); box-shadow:inset 3px 0 0 var(--amber); }
.ew-channel .seat-ava { width:22px; height:22px; flex:none; margin:0; }
.ew-mini.seat { color:var(--amber);
  -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2 3 7v2h18V7l-9-5ZM5 11v7H3v3h18v-3h-2v-7h-3v7h-3v-7h-2v7H8v-7H5Z'/%3E%3C/svg%3E") center/contain no-repeat;
          mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2 3 7v2h18V7l-9-5ZM5 11v7H3v3h18v-3h-2v-7h-3v7h-3v-7h-2v7H8v-7H5Z'/%3E%3C/svg%3E") center/contain no-repeat; }
.ew-dispatch { margin-top:3px; font-size:11.5px; font-weight:600; color:var(--amber); }

/* ---- 2026-10-29 demo polish ---- */
/* Splitter hit area must never sit over pills or composer buttons. */
.ew-split { z-index:1; }
.ew-split::after { inset:0 -3px; }
.ew-pills, #ew-crew-add, .ew-chips { position:relative; z-index:2; }
.ew-pane.collapsed .ew-pills, .ew-pane.collapsed .ew-chips { pointer-events:none; }
/* Agent pills read as faces, not names: bigger avatar with a soft ring. */
.ew-pill { padding:3px 12px 3px 3px; gap:7px; }
.ew-pill img { width:24px; height:24px; box-shadow:0 0 0 2px var(--panel), 0 0 0 3px rgba(56,189,248,.45); }
.ew-pill:hover { transform:translateY(-1px); box-shadow:0 4px 14px rgba(56,189,248,.18); }
.ew-avatar img { border-radius:50%; box-shadow:0 0 0 2px rgba(56,189,248,.35); }
/* Character faces are boxless: the generic circle crop and ring
   above never reach a crew-pack face or a library face. */
.ew-avatar.face-ava img, .ew-avatar.face-ava video, .ew-avatar.lib-ava img { border-radius:0; box-shadow:none; }
/* ADVANCED no longer vanishes when the unpinned rail stops peeking: its
   icons stay on the rail (summary hidden), so it does not "collapse itself". */
.sidebar.rail .advanced-nav[open] { display:block; }
.sidebar.rail .advanced-nav[open] > summary { display:none; }
.sidebar.rail.peek .advanced-nav > summary { display:flex; }
/* Empty states and Get started */
.empty-hint { margin-top:14px; border:1px dashed var(--border); border-radius:14px; padding:22px; text-align:center; background:linear-gradient(180deg, rgba(56,189,248,.06), transparent); }
.empty-hint .btn { margin-top:10px; }
.getting-started { background:linear-gradient(135deg, rgba(56,189,248,.10), rgba(167,139,250,.08)); border-color:rgba(56,189,248,.35); }
.gs-steps { margin:8px 0 0; padding-left:20px; line-height:1.6; }
.gs-steps li { margin:4px 0; }
.gs-steps a { color:var(--accent); }

/* ---- Monday Launch: Custom Agents, Free-Willy Debate, GitHub Link & Full Mobile Clone Pass ---- */
.ew-badge.github { background:rgba(148,163,184,.18); color:#E2E8F0; border:1px solid rgba(148,163,184,.45); }
.ew-badge.debate { background:rgba(245,158,11,.18); color:#FBBF24; border:1px solid rgba(245,158,11,.55); animation:ew-pulse 1.6s ease-in-out infinite; }
.ew-badge.maestro { background:rgba(56,189,248,.16); color:#7DD3FC; border:1px solid rgba(56,189,248,.5); }
.ew-btn.danger { background:rgba(239,68,68,.18); border-color:rgba(239,68,68,.55); color:#FCA5A5; }
.ew-btn.danger:hover { background:rgba(239,68,68,.3); border-color:#EF4444; }
.ew-custom-ava, .ew-avatar.custom { width:30px; height:30px; border-radius:50%; background:var(--panel); border:1px solid rgba(56,189,248,.4); display:grid; place-items:center; font-size:17px; grid-row:span 2; }
.ew-avatar.custom { width:36px; height:36px; font-size:19px; grid-row:auto; }
.ew-pill-emoji { font-size:15px; line-height:1; padding-left:4px; }
.ew-ca-tag { font-size:10px; font-weight:700; color:var(--accent); background:rgba(14,165,233,.12); border:1px solid rgba(14,165,233,.3); border-radius:999px; padding:1px 6px; max-width:96px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.ew-foot-actions { display:flex; gap:6px; flex-wrap:wrap; margin-top:4px; }
.ew-foot-actions .ew-btn { flex:1 1 auto; text-align:center; justify-content:center; }
.ew-emoji-grid { display:grid; grid-template-columns:repeat(8, minmax(0, 1fr)); gap:4px; flex:1; }
.ew-emoji-btn { border:1px solid var(--border); background:var(--bg); border-radius:8px; height:34px; font-size:17px; cursor:pointer; display:grid; place-items:center; transition:border-color .15s, transform .1s; }
.ew-emoji-btn:hover { border-color:var(--accent); transform:scale(1.06); }
.ew-emoji-btn.on { border-color:var(--accent); background:rgba(14,165,233,.16); box-shadow:0 0 0 2px rgba(14,165,233,.35); }
.ew-modal-form { display:flex; flex-direction:column; gap:10px; }
.ew-grid-2 { display:grid; grid-template-columns:1fr 1fr; gap:8px; }
.ew-code.sm { font-size:12px; letter-spacing:.02em; padding:8px 10px; word-break:break-all; }
.ew-icon.sm { width:22px; height:22px; font-size:15px; font-weight:700; }

/* ---- Create Custom Agent dialog (polish pass) ----
   Presentation only: the dialog's fields, order, and submit are the
   Bite 5 build. Scoped to .ew-ca-form so the sibling modals that share
   .ew-modal-form (Debate, GitHub link) keep their existing look. */
.ew-ca-form { gap:12px; }
.ew-ca-form .ew-field { gap:6px; }
.ew-ca-form input, .ew-ca-form select, .ew-ca-form textarea { font-size:13.5px; }
.ew-emoji-input { width:56px; text-align:center; font-size:18px; }
/* Message reactions (emoji bite 3): chips under a message carry bite
   1's own art plus the count; the member's own reaction is accent-lit.
   The row is display:none while empty so an unreacted thread keeps its
   density. The add control floats at the message's top-right — it
   appears on hover/focus and stays half-visible on touch. */
.ew-reactions { display:flex; flex-wrap:wrap; gap:4px; margin-top:4px; }
.ew-reactions:empty { display:none; }
.ew-rchip { display:inline-flex; align-items:center; gap:5px; padding:2px 8px 2px 4px; border:1px solid var(--border); border-radius:999px; background:var(--panel); color:var(--text); font-size:12px; font-weight:600; line-height:1; cursor:pointer; transition:border-color .15s, background .15s; }
.ew-rchip:hover { border-color:var(--accent); }
.ew-rchip.mine { border-color:var(--accent); background:rgba(14,165,233,.14); }
.ew-rchip .ew-rchip-face { width:16px; height:16px; }
/* Hover toolbar (bite 2): every per-message action lives in this
   one floating bar at the row's top-right, overlapping the row
   above — hidden until hover or focus, always faintly present
   on touch. The reaction button keeps its .ew-react-add
   class and picker wiring; inside the bar it is a plain icon
   button, like Copy beside it. */
.ew-msg-tools { position:absolute; top:-10px; right:12px; z-index:3; display:inline-flex; align-items:center; gap:2px; padding:2px; background:var(--panel); border:1px solid var(--border); border-radius:8px; box-shadow:0 8px 24px rgba(0,0,0,.28); opacity:0; pointer-events:none; transition:opacity .15s; }
.ew-msg:hover .ew-msg-tools, .ew-msg:focus-within .ew-msg-tools { opacity:1; pointer-events:auto; }
@media (pointer:coarse) { .ew-msg-tools { opacity:.85; pointer-events:auto; } }
.ew-react-add { display:inline-flex; align-items:center; justify-content:center; gap:1px; min-width:28px; height:28px; padding:0 5px; border:0; border-radius:6px; background:none; color:var(--muted); cursor:pointer; }
.ew-react-add .hx-emoji { width:15px; height:15px; }
.ew-react-plus { font-size:12px; font-weight:700; line-height:1; }
.ew-react-add:hover { background:var(--panel-2); color:var(--text); }
.ew-tool-btn { display:inline-flex; align-items:center; justify-content:center; min-width:28px; height:28px; padding:0 7px; border:0; border-radius:6px; background:none; color:var(--muted); cursor:pointer; font:inherit; font-size:12px; font-weight:600; }
.ew-tool-btn:hover { background:var(--panel-2); color:var(--text); }
.ew-react-pop { position:fixed; z-index:70; background:var(--panel); border:1px solid var(--border); border-radius:12px; padding:8px; box-shadow:0 16px 40px rgba(0,0,0,.45); }
.ew-react-pop-head { display:flex; align-items:center; justify-content:space-between; font-size:13px; font-weight:650; padding:0 2px 6px; }
.ew-react-grid { max-height:264px; overflow:auto; }
/* Maestro Library (face-library bite): the Change-face picker's
   library grid, the pick preview, library faces in avatar slots, and
   the reaction popover's library section. Library art was made on a
   dark stage, so its tiles carry the face slot's stage colour
   (#10151F, bite 2c) in every theme. */
.ew-lib-sec { margin:10px 0 2px; font-weight:700; letter-spacing:.06em; text-transform:uppercase; font-size:11px; }
.ew-lib-grid { display:grid; grid-template-columns:repeat(4, minmax(0, 1fr)); gap:6px; flex:1; max-height:264px; overflow:auto; }
.ew-lib-btn { display:flex; flex-direction:column; align-items:center; gap:4px; padding:6px 2px; border:1px solid var(--border); background:#10151F; border-radius:10px; cursor:pointer; color:var(--text); font:inherit; transition:border-color .15s, transform .1s; }
.ew-lib-btn:hover { border-color:var(--accent); transform:scale(1.03); }
.ew-lib-btn.on { border-color:var(--accent); box-shadow:0 0 0 2px rgba(14,165,233,.35); }
.ew-lib-btn img { width:40px; height:40px; border-radius:8px; object-fit:cover; display:block; }
.ew-lib-btn-name { font-size:11px; font-weight:600; max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.ew-lib-preview { display:flex; align-items:center; justify-content:center; min-height:56px; padding:2px 0 4px; }
.ew-lib-preview > img, .ew-lib-preview > video { width:56px; height:56px; border-radius:10px; object-fit:cover; background:#10151F; display:block; }
.ew-lib-preview .ew-avatar { width:56px; height:56px; font-size:28px; }
.ew-lib-preview .ew-avatar .hx-emoji { width:40px; height:40px; }
.ew-avatar .ew-lib-face-img { width:100%; height:100%; object-fit:cover; display:block; }
.ew-react-sec { padding-top:10px; }
.ew-lib-react-grid { display:grid; grid-template-columns:repeat(4, minmax(0, 1fr)); gap:4px; max-height:220px; overflow:auto; }
.ew-lib-react-btn { display:flex; flex-direction:column; align-items:center; gap:2px; padding:5px 2px; border:1px solid var(--border); background:var(--bg); border-radius:8px; cursor:pointer; color:var(--text); font:inherit; transition:border-color .15s, transform .1s; }
.ew-lib-react-btn:hover { border-color:var(--accent); transform:scale(1.04); }
.ew-lib-react-btn.on { border-color:var(--accent); background:rgba(14,165,233,.16); box-shadow:0 0 0 2px rgba(14,165,233,.35); }
.ew-lib-react-btn img { width:28px; height:28px; object-fit:contain; display:block; }
.ew-lib-react-name { font-size:10px; font-weight:600; line-height:1.15; text-align:center; max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.ew-rchip .ew-rchip-face.ew-rchip-lib { object-fit:contain; }
[data-theme="light"] .ew-lib-react-btn.on { background:rgba(11,110,153,.14); box-shadow:0 0 0 2px rgba(11,110,153,.3); }
[data-theme="light"] .ew-lib-btn.on { box-shadow:0 0 0 2px rgba(11,110,153,.3); }
/* The connect step is a form inside the form; an inset panel groups it
   as its own step. */
.ew-ca-connect { background:var(--panel-2); border:1px solid var(--border); border-radius:10px; padding:10px 12px 12px; }
.ew-ca-note { margin:0; }
/* The dialog's footer: a divided action row, standard-size buttons. */
.ew-modal-actions { display:flex; align-items:center; gap:6px; border-top:1px solid var(--border); padding-top:12px; margin-top:2px; }

/* Mobile bottom navigation bar (hidden on desktop) */
.ew-mobile-nav { display:none; }

@media (max-width: 900px) {
  /* Hide duplicate pane toggles that live in #ew-mobile-nav */
  .ew-chat-head .ew-toggle[data-toggle="guard"],
  .ew-chat-head .ew-toggle[data-toggle="bench"] { display:none; }
  .ew-chat-head .ew-badge { flex-shrink:0; max-width:160px; }
  .view.desktop { display:flex; flex-direction:column; height:calc(100dvh - 52px); }
  .view.desktop > .ew { flex:1 1 auto; min-height:0; height:auto; }
  .ew-mobile-nav {
    display:grid;
    grid-template-columns:repeat(4, minmax(0, 1fr));
    gap:2px;
    background:var(--panel);
    border-top:1px solid var(--border);
    padding:4px 6px calc(4px + env(safe-area-inset-bottom));
    flex:none;
    z-index:45;
  }
  .ew-mnav-btn {
    border:0;
    background:transparent;
    color:var(--muted);
    border-radius:8px;
    min-height:46px;
    padding:4px 2px;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:2px;
    font-size:10.5px;
    font-weight:650;
    cursor:pointer;
  }
  .ew-mnav-btn.on, .ew-mnav-btn[aria-pressed="true"] {
    color:var(--accent);
    background:rgba(14,165,233,.12);
  }
  .ew-mnav-ico { font-size:15px; line-height:1; }
  .ew-modal-card { max-height:calc(100dvh - 24px); overflow-y:auto; width:calc(100vw - 16px); }
  .ew-grid-2 { grid-template-columns:1fr; }
  .ew-emoji-grid { grid-template-columns:repeat(8, minmax(0, 1fr)); }
  /* Prevent iOS Safari zoom on input focus */
  input, select, textarea, .ew-composer textarea { font-size:16px; }
}

/* Crisp SVG navigation & mobile bar icons */
.nav-item .nav-svg { width:16px; height:16px; flex:none; opacity:.85; transition:opacity .15s, color .15s; }
.nav-item:hover .nav-svg, .nav-item.active .nav-svg { opacity:1; color:var(--accent); }
.sidebar.rail .nav-item .nav-svg { width:18px; height:18px; }
.ew-mnav-ico { display:inline-grid; place-items:center; height:18px; }
.ew-mnav-ico svg { width:17px; height:17px; }

/* ---- Light theme literal triage (B0 §2.2 notes, §4.1; audit §2.4) ----
   The palette itself lives in app.css ([data-theme="light"]); envoy
   consumes the same root variables, so no envoy token block exists. What
   follows is only the literal layer that cannot follow the tokens:
   white-alpha hover flips to the spec's shadow hue; text set in the dark
   themes' near-black accent ink (#04121c) takes the light theme's
   accent-ink (#FFFFFF, B0 §2.2); brand badge/mark text darkens to the
   brand colors already used in this file (#5865F2, #4A154B); amber/red
   status surfaces take the flat §2.0 tint pairs; the old sky accent's
   alpha tints re-tint to the light accent (11,110,153); heavy black
   shadows soften to rgba(13,42,67,·). Scoped to light only — the dark
   themes' rules above are untouched. */
[data-theme="light"] .ew-msg:hover { background:rgba(13,42,67,.05); }
[data-theme="light"] .ew-msg-tools { box-shadow:0 8px 24px rgba(13,42,67,.14); }
/* Message-row character faces stay boxless and ring-free in light
   too — this out-specifies the generic light avatar-img ring below. */
[data-theme="light"] .ew-msg .ew-avatar.face-ava img,
[data-theme="light"] .ew-msg .ew-avatar.lib-ava img,
[data-theme="light"] .ew-msg .ew-avatar.face-ava video { border-radius:0; box-shadow:none; }
[data-theme="light"] .ew-btn.primary { color:#fff; }
[data-theme="light"] .ew-net-seg.on { color:#fff; }
[data-theme="light"] .ew-seg button.on { color:#fff; }
[data-theme="light"] .check.on { color:#fff; }
[data-theme="light"] .ew-badge.discord { background:rgba(88,101,242,.12); color:#5865F2; border-color:rgba(88,101,242,.45); }
[data-theme="light"] .ew-badge.slack { background:rgba(74,21,75,.08); color:#4A154B; border-color:rgba(74,21,75,.35); }
[data-theme="light"] .ew-badge.github { background:rgba(113,134,157,.16); color:#2F3A47; border-color:rgba(113,134,157,.45); }
[data-theme="light"] .ew-badge.debate { background:#FBF0DA; color:var(--amber); border-color:rgba(137,94,13,.45); }
[data-theme="light"] .ew-badge.maestro { background:rgba(2,132,199,.1); color:#0369A1; border-color:rgba(2,132,199,.45); }
[data-theme="light"] .ew-src.discord { color:#5865F2; }
[data-theme="light"] .ew-src.slack { color:#4A154B; }
[data-theme="light"] .ew-net-strip.discord { color:#5865F2; }
[data-theme="light"] .ew-mini.discord, [data-theme="light"] .ew-src-head .ew-discord-mark, [data-theme="light"] .ew-foot .ew-discord-mark { color:#5865F2; }
[data-theme="light"] .ew-mini.slack, [data-theme="light"] .ew-foot .ew-slack-mark { color:#4A154B; }
[data-theme="light"] .ew-agent-state { color:var(--amber); background:#FBF0DA; }
[data-theme="light"] .ew-first-run { background:#F4EFE4; }
[data-theme="light"] .ew-approval { background:#FBF0DA; border-color:rgba(137,94,13,.4); }
[data-theme="light"] .ew-approval-card { background:#FBF0DA; border-color:rgba(137,94,13,.4); }
[data-theme="light"] .ew-approval:hover { border-color:var(--amber); }
[data-theme="light"] .ew-count { background:#F6C453; }
[data-theme="light"] .int-state.on .int-dot { background:var(--green); }
[data-theme="light"] .int-state.off .int-dot { background:var(--amber); }
[data-theme="light"] .ew-btn.danger { background:#FDECEB; border-color:rgba(179,58,54,.5); color:var(--red); }
[data-theme="light"] .ew-btn.danger:hover { background:rgba(179,58,54,.16); border-color:var(--red); }
[data-theme="light"] .ew-body .mention { background:rgba(11,110,153,.10); }
[data-theme="light"] .ew-ca-tag { background:rgba(11,110,153,.10); border-color:rgba(11,110,153,.3); }
[data-theme="light"] .ew-pill.session { border-color:rgba(11,110,153,.45); }
[data-theme="light"] .ew-pill img { box-shadow:0 0 0 2px var(--panel), 0 0 0 3px rgba(11,110,153,.45); }
[data-theme="light"] .ew-pill:hover { box-shadow:0 4px 14px rgba(11,110,153,.18); }
[data-theme="light"] .ew-avatar img { box-shadow:0 0 0 2px rgba(11,110,153,.35); }
/* Character faces stay boxless in light on every surface, not only
   message rows: the generic light ring above never reaches them. */
[data-theme="light"] .ew-avatar.face-ava img, [data-theme="light"] .ew-avatar.face-ava video, [data-theme="light"] .ew-avatar.lib-ava img { border-radius:0; box-shadow:none; }
[data-theme="light"] .ew-custom-ava, [data-theme="light"] .ew-avatar.custom { border-color:rgba(11,110,153,.4); }
[data-theme="light"] .ew-emoji-btn.on { background:rgba(11,110,153,.14); box-shadow:0 0 0 2px rgba(11,110,153,.3); }
[data-theme="light"] .ew-rchip.mine { background:rgba(11,110,153,.12); }
[data-theme="light"] .ew-mnav-btn.on, [data-theme="light"] .ew-mnav-btn[aria-pressed="true"] { background:rgba(11,110,153,.12); }
[data-theme="light"] .empty-hint { background:linear-gradient(180deg, rgba(11,110,153,.06), transparent); }
[data-theme="light"] .getting-started { background:linear-gradient(135deg, rgba(11,110,153,.08), rgba(167,139,250,.08)); border-color:rgba(11,110,153,.35); }
[data-theme="light"] .ew-modal-card { box-shadow:0 20px 60px rgba(13,42,67,.28); }
[data-theme="light"] .sidebar.rail .nav-item[data-tip]:hover::after, [data-theme="light"] .sidebar.rail .nav-item[data-tip]:focus-visible::after { box-shadow:0 6px 18px rgba(13,42,67,.25); }
@media (min-width: 901px) and (hover: hover) and (pointer: fine) {
  [data-theme="light"] .sidebar.rail.peek { box-shadow:24px 0 48px rgba(13,42,67,.28); }
}
@media (max-width: 900px) {
  [data-theme="light"] .ew-pane.ew-channels, [data-theme="light"] .ew-pane.ew-bench, [data-theme="light"] .ew-pane.ew-guard { box-shadow:0 0 40px rgba(13,42,67,.30); }
}

/* ---- Panel bite (2026-11-08): sleek scrollbars + the channels rail ----
   Troy's final word, given twice the same night: "get rid of all these
   funky buttons and you just scroll... make it all sleek", and the side
   panel "just automatically collapses, and hovering over it opens it —
   scroll and do everything inside it — that's how it should be",
   everywhere, not only in a narrow window. */

/* Sleek scrollbars: on the surfaces he named — the channel list, the
   crew list, the messages on the right side of the chat window, the
   side panels and the popup panels — there is NO bar at all. No arrow
   buttons, no fat track, no pill. Scrolling is the wheel, touch, or a
   drag on the content itself. This drops the earlier hover-arrows idea
   outright: no arrow buttons anywhere. envoy.css loads after app.css
   and these selectors carry class-level specificity, so they win over
   app.css's global 8px pill for exactly these containers; every other
   surface keeps the themed pill.
   Why removal rather than thinner paint: the thin rules DO ship —
   app.css on the live site is byte-identical to this tree and carries
   the 8px pill with scrollbar buttons display:none — yet Troy's own
   screenshots show wide bars WITH arrow triangles. A Chromium-painted
   custom scrollbar cannot show those buttons; the bars in his pictures
   are the browser/OS native bars, which his environment paints over
   the styled ones. A native bar cannot be argued thinner — but a
   container whose scrollbar is display:none / scrollbar-width:none
   has no native bar to paint, in any environment. */
.ew-messages, .ew-channel-list, .ew-crew-list, .ew-scroll,
.ew-approvals-list, .ew-picker, .ew-tabs, #ew-crew-add,
.sidebar, .slide-panel-body { scrollbar-width:none; }
.ew-messages::-webkit-scrollbar, .ew-channel-list::-webkit-scrollbar,
.ew-crew-list::-webkit-scrollbar, .ew-scroll::-webkit-scrollbar,
.ew-approvals-list::-webkit-scrollbar, .ew-picker::-webkit-scrollbar,
.ew-tabs::-webkit-scrollbar, #ew-crew-add::-webkit-scrollbar,
.sidebar::-webkit-scrollbar, .slide-panel-body::-webkit-scrollbar { width:0; height:0; display:none; }

/* The channels rail tab: the pane's face at rest. Hidden unless the
   pane is resting (the rail rules below reveal it). */
.ew-channels-rail-tab { display:none; }

/* The peek grip: the resting pane's width handle. Hidden everywhere
   except on the peeking pane inside the rail media block below (the
   in-flow .ew-split is parked while the pane rests, so the peek
   overlay carries this edge grip instead; panel slide fix, 2026-11-15). */
.ew-peek-grip { display:none; }

/* Channels rail rest + hover peek, desktop pointers only — the same
   shape the nav sidebar's rail peek already uses. At rest the pane is
   a 48px strip showing only its rail tab; every other child is out of
   the layout entirely (display:none, restored by simply no longer
   matching once .peeking lands). The splitter parks while resting.
   While peeking, the pane floats over the chat at its full width —
   left offset by the shell sidebar (--side-w lives on .shell), top
   under the 52px topbar the desktop view's height already reserves —
   and its lists scroll inside it exactly as they do pinned. */
@media (min-width: 901px) and (hover: hover) and (pointer: fine) {
  .ew-channels.rail-rest { flex:0 0 48px; min-width:48px; }
  .ew-channels.rail-rest:not(.peeking) > :not(.ew-channels-rail-tab) { display:none !important; }
  .ew-channels.rail-rest .ew-channels-rail-tab { display:flex; flex:1 1 auto; width:100%; flex-direction:column; align-items:center; gap:10px; padding:12px 0; background:transparent; border:0; color:var(--muted); font:inherit; font-size:13px; cursor:pointer; }
  .ew-channels.rail-rest .ew-channels-rail-tab span { writing-mode:vertical-rl; letter-spacing:.14em; font-size:11px; font-weight:700; text-transform:uppercase; }
  .ew-channels.rail-rest .ew-channels-rail-tab:hover { color:var(--text); background:var(--panel-2); }
  .ew.channels-rest .ew-split[data-split="channels"] { flex-basis:0; pointer-events:none; }
  .ew-channels.rail-rest.peeking { position:fixed; top:52px; bottom:0; left:var(--side-w); width:var(--ew-channels); flex:none; z-index:55; box-shadow:24px 0 48px rgba(0,0,0,.45); }
  .ew-channels.rail-rest.peeking .ew-channels-rail-tab { display:none; }
  /* The peek's right edge is a drag grip for the column width (the
     var the pane is floating at), with the accent line the other
     splitters light on hover. */
  .ew-channels.rail-rest.peeking .ew-peek-grip { display:block; position:absolute; top:0; right:0; bottom:0; width:10px; cursor:col-resize; z-index:3; touch-action:none; }
  .ew-channels.rail-rest.peeking .ew-peek-grip::after { content:""; position:absolute; top:0; bottom:0; right:0; width:3px; background:transparent; transition:background .15s; }
  .ew-channels.rail-rest.peeking .ew-peek-grip:hover::after, .ew-channels.rail-rest.peeking .ew-peek-grip:focus-visible::after, .ew-channels.rail-rest.peeking .ew-peek-grip.dragging::after { background:var(--accent); }
  .ew-channels.rail-rest.peeking .ew-peek-grip:focus-visible { outline:none; }
  /* Hover-push (Troy, 2026-11-09): while the pane peeks it PUSHES the
     rest of the row right — it never covers the chat. The peeking pane
     is fixed, so its in-flow 48px slot is gone: the chat takes a left
     margin of the pane's full open width and lands with its left edge
     exactly on the pane's right edge, the same place it sits when the
     pane is pinned open. The margin animates on the panes' own
     --dur/--ease (the .ew-pane transition list with margin-left added;
     .ew.dragging still freezes it, out-specifying this rule), so the
     push out and the settle back move at the pane's own rate. At rest
     no offset applies at all: the resting row is pixel-identical. */
  .ew > .ew-chat { transition:flex-basis var(--dur) var(--ease), opacity var(--dur) var(--ease), transform var(--dur) var(--ease), margin-left var(--dur) var(--ease); }
  .ew-channels.rail-rest.peeking ~ .ew-chat { margin-left:var(--ew-channels); }
}
