/* Paper · Editorial — the desktop workspace (wider than 700 px; the phone, body.focus-ui, keeps its layout).
   Left column (brand and New, search, places, then the three groups or, in Projects, one list at a time: the
   projects, then one project's conversations; Settings and the person), the middle (the conversation, the control center or
   a group's full list) and the conversation's details column. Spec: "Layout › Desktop workspace" in
   docs/superpowers/specs/2026-11-10-ui-redo-paper-design.md; mock: mocks/ui-redo, "Desktop · A conversation".
   Markup: public/index.html (#workspaceSide, #workspaceGroups, #workspaceFoot, #workspaceGroupPage, the
   chat header slots and the details panes); behaviour: app/workspace.js, app/conversation-details.js. */

:root {
  --ws-need: #8a4f00; --ws-need-fill: #e8a13a; --ws-run: var(--accent); --ws-rev: #5b5bd6;
  --ws-side-width: clamp(244px, 19vw, 288px);
  /* The conversations column of the Projects place (app/workspace.js syncRail mirrors both widths). */
  --ws-list-width: clamp(288px, 20vw, 336px);
  --ws-card-radius: 24px;
  --ws-gap: 14px;
}
:root[data-theme="dark"] { --ws-need: #f0b45a; --ws-need-fill: #f0b45a; --ws-rev: #a3a3f5; }

/* Only the desktop shows these; the phone keeps today's panels and its own menu. */
.ws-side, .ws-groups, .ws-foot, .ws-group-page, .ws-head-actions, .ws-chat-meta, .ws-seg-tab, .ws-pane,
.ws-monitor-strip, .ws-tasks-card, .activity-when-stops, .ws-picker-title, .ws-label, .ws-item-label, .conversation-filters-toggle { display: none; }
.ws-sidebar-toggle, .ws-sidebar-resize, .ws-menu:not(:popover-open) { display: none; }
#activityPanel .ws-seg-tab { display: none; }

.ws-section-toggle {
  display: flex; align-items: center; gap: 8px; min-height: 28px; padding: 0 8px; border: 0;
  border-radius: 8px; background: transparent; box-shadow: none; color: inherit; font: inherit; cursor: pointer;
}
.ws-section-toggle:hover:not(:disabled) { background: var(--paper-raised); color: var(--text); }
.ws-section-toggle::after {
  content: ""; width: 6px; height: 6px; margin: -3px 2px 0; border: solid currentColor;
  border-width: 0 1.5px 1.5px 0; transform: rotate(45deg);
}
.ws-section-toggle[aria-expanded="false"]::after { margin-top: 0; transform: rotate(-45deg); }

@media (min-width: 701px) {
  /* ---------- the frame ---------- */
  /* Columns: the left column (places, then the groups or the projects), in Projects the chosen project's
     conversations, the middle, and the Browser beside it on a wide window. */
  body:not(.focus-ui) .shell {
    /* Larger text widens the columns with it (a column's contents lay out in its width divided by the zoom, so a fixed
       column would truncate every label), but never past a quarter of the window and never below the normal width,
       so the conversation keeps its room. */
    --ws-default-col-side: max(var(--ws-side-width), min(calc(var(--ws-side-width) * var(--ui-zoom-projects, 1)), 25vw));
    --ws-room-for-side: calc(100vw - 480px - 2 * var(--ws-gap));
    --ws-col-side: clamp(232px, var(--ws-side-preferred, var(--ws-default-col-side)),
      max(var(--ws-default-col-side), min(560px, 40vw, var(--ws-room-for-side))));
    --ws-col-list: max(var(--ws-list-width), min(calc(var(--ws-list-width) * var(--ui-zoom-conversations, 1)), 25vw));
    display: grid;
    grid-template-columns: var(--ws-col-side) minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr) auto;
    grid-template-areas: "side-top main" "side-body main" "side-foot main";
    column-gap: var(--ws-gap);
    row-gap: 0;
    height: 100dvh;
    padding: var(--ws-gap) var(--ws-gap) var(--ws-gap) 0;
  }
  body:not(.focus-ui).ws-column-projects:is(:not(.ws-picker), .chats-collapsed) .shell {
    --ws-room-for-side: calc(100vw - 480px - var(--ws-col-list) - 3 * var(--ws-gap));
    grid-template-columns: var(--ws-col-side) var(--ws-col-list) minmax(0, 1fr);
    grid-template-areas: "side-top list main" "side-body list main" "side-foot list main";
  }
  @media (min-width: 1200px) {
    body:not(.focus-ui).browser-visible .shell {
      --ws-room-for-side: calc(100vw - 640px - 3 * var(--ws-gap));
      grid-template-columns: var(--ws-col-side) minmax(320px, 1fr) minmax(320px, 1.1fr);
      grid-template-areas: "side-top main browser" "side-body main browser" "side-foot main browser";
    }
    body:not(.focus-ui).browser-visible.ws-column-projects:is(:not(.ws-picker), .chats-collapsed) .shell {
      --ws-room-for-side: calc(100vw - 640px - var(--ws-col-list) - 4 * var(--ws-gap));
      grid-template-columns: var(--ws-col-side) var(--ws-col-list) minmax(320px, 1fr) minmax(320px, 1.1fr);
      grid-template-areas: "side-top list main browser" "side-body list main browser" "side-foot list main browser";
    }
    body:not(.focus-ui).browser-visible #browserPanel { grid-area: browser; position: static; height: 100%; border-radius: var(--ws-card-radius); }
  }
  body:not(.focus-ui) :is(.mobile-nav, .app-menu, .back-button) { display: none !important; }
  /* styles.css hides these below 1024 px, where the phone menu once held them; the column holds them now. */
  body:not(.focus-ui) :is(#settingsButton, #openControlCenterButton) { display: flex; }
  body:not(.focus-ui) .ws-menu #projectNotesButton { display: flex; }
  body:not(.focus-ui) .ws-side { grid-area: side-top; display: flex; flex-direction: column; gap: 12px; min-width: 0; padding: 4px 0 6px var(--ws-gap); zoom: var(--ui-zoom-projects, 1); }
  body:not(.focus-ui) .ws-groups { grid-area: side-body; display: flex; flex-direction: column; min-width: 0; min-height: 0; overflow: hidden auto; scrollbar-width: thin; padding: 0 0 0 var(--ws-gap); zoom: var(--ui-zoom-projects, 1); }
  body:not(.focus-ui) .ws-foot { grid-area: side-foot; display: flex; align-items: center; gap: 2px; min-width: 0; padding: 8px 0 0 var(--ws-gap); zoom: var(--ui-zoom-projects, 1); }

  body:not(.focus-ui) :is(#chatPanel, #controlCenterPanel, #workspaceGroupPage) { grid-area: main; min-width: 0; min-height: 0; height: auto; }

  /* What the left column's body holds: the groups (Inbox, the default) or the projects (Projects). In Projects the
     chosen project's conversations have a column of their own beside it, the height of the window. Nothing in either
     column scrolls: both lists are one long scroll (app/long-scroll.js). */
  body:not(.focus-ui) .shell > :is(#projectsPanel, #chatsPanel) { display: none; min-width: 0; min-height: 0; max-height: none; animation: none; }
  body:not(.focus-ui) .shell > #projectsPanel { grid-area: side-body; margin: 0 0 0 var(--ws-gap); }
  body:not(.focus-ui) .shell > #chatsPanel { grid-area: list; margin: 0; }
  body:not(.focus-ui).ws-column-projects .ws-groups { display: none; }
  /* Until a project is chosen there is no second column, unless it is folded: its strip holds the way to unfold it. */
  body:not(.focus-ui).ws-column-projects .shell > #projectsPanel,
  body:not(.focus-ui).ws-column-projects:is(:not(.ws-picker), .chats-collapsed) .shell > #chatsPanel { display: flex; }
  body:not(.focus-ui) :is(#sessionList, #projectList) .usage-cost { display: none; }

  /* The middle holds one thing: the conversation, the control center, or a group's full list. */
  body:not(.focus-ui) #chatPanel { display: grid; }
  body:not(.focus-ui) #controlCenterPanel { display: none; }
  body:not(.focus-ui).view-control #controlCenterPanel { display: flex; }
  body:not(.focus-ui).view-control #chatPanel { display: none; }
  body:not(.focus-ui).ws-page-open :is(#chatPanel, #controlCenterPanel) { display: none; }
  body:not(.focus-ui).ws-page-open #workspaceGroupPage:not([hidden]) { display: flex; }
  /* A conversation opened from Bob's board floats over it, as it always has. */
  body:not(.focus-ui).view-control.control-popup .shell > #chatPanel { display: grid; position: fixed; inset: 48px max(16px, 5vw) 16px; height: auto; z-index: 40; }

  /* Cards on sand: the middle and the details are cream cards; the left column sits on the page. */
  body:not(.focus-ui) :is(#controlCenterPanel, #workspaceGroupPage) {
    border: 0; border-radius: var(--ws-card-radius); background: var(--panel); box-shadow: var(--shadow-soft); overflow: hidden;
  }
  /* The install card sat over the message box. On the desktop it is a small card at the foot of the left column,
     above Settings and the person. */
  body:not(.focus-ui) .install-banner {
    left: var(--ws-gap); bottom: 104px; transform: none; width: calc(var(--ws-side-width) - var(--ws-gap)); flex-wrap: wrap; gap: 10px;
    padding: 12px; border: 0; border-radius: 18px;
  }
  body:not(.focus-ui) .install-banner-copy { flex: 1 1 0; }
  body:not(.focus-ui) .install-banner-actions { flex: 1 0 100%; justify-content: flex-end; margin-left: 0; }
  body:not(.focus-ui):not(.nav-fixed):is(.projects-collapsed, .ws-auto-rail) .install-banner { width: 300px; }
  /* Dark themes draw a hairline instead of a shadow. */
  :root[data-theme="dark"] body:not(.focus-ui) :is(#controlCenterPanel, #workspaceGroupPage),
  :root[data-theme="dark"] body:not(.focus-ui) #chatPanel::before,
  :root[data-theme="dark"] body:not(.focus-ui) #chatPanel > .messages-wrap > #activityPanel { box-shadow: 0 0 0 1px var(--line); }
  /* The columns stay put, so the phone's slide-in for each screen is not used; its fill would also give every header
     a stacking context and put the ⋯ menu under the messages. */
  body:not(.focus-ui) :is(#chatPanel, #projectsPanel, #chatsPanel, #controlCenterPanel),
  body:not(.focus-ui) :is(#chatPanel, #projectsPanel, #chatsPanel) :is(.panel-bar, .chat-topbar, .panel-scroll, .messages) { animation: none; }

  /* ---------- left column: brand, New, search, places ---------- */
  .ws-brand { display: flex; align-items: center; gap: 6px; min-width: 0; padding: 6px 2px 2px 4px; }
  .ws-mark { display: grid; flex: none; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: var(--paper-raised); }
  .ws-mark img { width: 24px; height: 24px; }
  .ws-name { min-width: 0; flex: 1; overflow: hidden; font: 400 19px/1.1 var(--serif); color: var(--heading); white-space: nowrap; text-overflow: ellipsis; }
  /* The name and the release number under it, centred on the mark together. */
  .ws-title { display: grid; min-width: 0; flex: 1; }
  .ws-version { overflow: hidden; color: var(--muted); font: 400 11px/1.2 var(--mono); white-space: nowrap; text-overflow: ellipsis; }
  .ws-icon-button { width: 28px; min-width: 28px; min-height: 32px; color: var(--muted); }
  .ws-icon-button svg { width: 18px; height: 18px; }
  .ws-new-button { display: inline-flex; align-items: center; gap: 4px; min-height: 32px; padding: 0 11px 0 8px; border-radius: 10px; font-size: 13.5px; font-weight: 650; }
  .ws-new-button svg { width: 15px; height: 15px; }

  body:not(.focus-ui) .ws-sidebar-toggle { display: inline-flex; flex: none; }
  .ws-sidebar-toggle[aria-expanded="false"] svg { transform: scaleX(-1); }
  body:not(.focus-ui):is(.nav-fixed, :not(.projects-collapsed, .ws-auto-rail)) .ws-sidebar-resize {
    display: block; position: relative; z-index: 2; grid-area: 1 / 1 / -1 / 2; justify-self: end;
    width: var(--ws-gap); margin-right: calc(-1 * var(--ws-gap)); cursor: col-resize; touch-action: none;
  }
  .ws-sidebar-resize::after { content: ""; position: absolute; inset: calc(50% - 18px) calc(50% - 1px); border-radius: 2px; background: var(--line-strong); }
  .ws-sidebar-resize:is(:hover, :focus-visible, :active)::after { inset-block: 0; background: var(--accent); }

  .ws-search { position: relative; display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 10px 0 12px; border-radius: 12px; background: var(--field); color: var(--muted); cursor: text; }
  .ws-search:focus-within { box-shadow: 0 0 0 2px var(--accent); }
  .ws-search svg { width: 16px; height: 16px; flex: none; }
  .ws-search input { min-width: 0; flex: 1; height: 100%; padding: 0; border: 0; outline: 0; background: transparent; box-shadow: none; color: var(--text); font-size: 13.5px; }
  .ws-search input::placeholder { color: var(--muted); opacity: 0.85; }
  .ws-search input::-webkit-search-cancel-button { display: none; }
  .ws-search-key { flex: none; color: var(--muted); font: 500 11px/1 var(--mono); }

  .ws-places { display: grid; gap: 1px; }
  .ws-place, .ws-foot .ws-place {
    position: relative; display: flex; align-items: center; gap: 10px; width: 100%; min-width: 0; height: 34px; min-height: 34px;
    padding: 0 10px; border: 0; border-radius: 10px; background: transparent; box-shadow: none; color: var(--muted);
    font-size: 13.5px; font-weight: 550; text-align: left;
    /* Not `place-items: initial`: that shorthand also resets align-items, and the icon and label then sit at the top of the fill. */
    justify-items: initial; align-items: center; justify-content: flex-start;
  }
  .ws-place:hover:not(:disabled) { background: color-mix(in srgb, var(--paper-raised) 60%, transparent); color: var(--text); }
  .ws-place.on { background: var(--paper-raised); color: var(--text); }
  .ws-place > svg { width: 17px; height: 17px; flex: none; }
  .ws-place-label { min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .ws-place-note { flex: none; max-width: 48%; overflow: hidden; color: var(--muted); font-size: 12px; font-style: normal; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
  .ws-place-note.needs { color: var(--ws-need); }
  .ws-place-note:empty { display: none; }
  /* Bob: his hat and what waits for you in his chat. */
  .ws-place-bob > svg { color: var(--accent); }
  .ws-place-bob .control-icon-badge { position: static; display: inline-grid; place-items: center; min-width: 20px; height: 18px; margin-left: auto; padding: 0 6px; border: 0; border-radius: 9px; background: color-mix(in srgb, var(--ws-need-fill) 22%, transparent); color: var(--ws-need); font-size: 11px; font-weight: 700; }
  .ws-place-bob .control-icon-badge[hidden] { display: none; }
  .ws-place .shortcut-hint { left: 50%; }

  /* ---------- menus (New, More, the details column's More) ---------- */
  .ws-menu:popover-open { display: grid; }
  .ws-menu {
    position: fixed; inset: auto; margin: 0; gap: 2px; min-width: 232px; max-width: min(320px, calc(100vw - 16px));
    padding: 6px; border: 0; border-radius: 16px; background: var(--panel); color: var(--text); box-shadow: var(--shadow);
    /* A menu is as tall as its rows and never taller than the window. Said outright, whatever the browser's own
       popover rules are: with a bottom edge and no height of its own, the grid spread its rows over the whole window. */
    right: auto !important; bottom: auto !important; height: fit-content; max-height: calc(100dvh - 16px); overflow: hidden auto;
    align-content: start; grid-auto-rows: max-content;
  }
  :root[data-theme="dark"] .ws-menu { box-shadow: 0 0 0 1px var(--line-strong), var(--shadow); }
  .ws-menu > :is(button, a), .ws-menu .ws-menu-item, .ws-menu-harnesses > button {
    display: flex; align-items: center; gap: 10px; width: 100%; min-height: 38px; height: auto; padding: 6px 10px; border: 0;
    border-radius: 10px; background: transparent; box-shadow: none; color: var(--text); font-size: 13.5px; font-weight: 550;
    text-align: left; text-decoration: none; justify-items: initial; align-items: center; justify-content: flex-start;
  }
  .ws-menu :is(button, a):hover:not(:disabled), .ws-menu :is(button, a):focus-visible { background: var(--field); outline: none; }
  .ws-menu :is(button, a):disabled { opacity: 0.45; }
  .ws-menu :is(button, a) > svg { width: 17px; height: 17px; flex: none; color: var(--muted); }
  .ws-menu :is(button, a) > span:not(.reviews-badge):not(.shortcut-hint) { display: grid; min-width: 0; flex: 1; }
  .ws-menu small { color: var(--muted); font-size: 12px; font-weight: 450; }
  .ws-menu .ws-item-label { display: block; }
  .ws-menu .reviews-badge { position: static; margin-left: auto; }
  /* In a menu the chord is written out at the end of its row, always (the badge keeps the key alone for the buttons). */
  :is(.ws-menu, .chat-more-actions) .shortcut-hint {
    position: static !important; display: inline-block !important; flex: none; order: 9; margin-left: auto; padding: 0; border: 0;
    background: none; box-shadow: none; color: var(--muted); font-size: 0; transform: none; opacity: 0.85;
  }
  :is(.ws-menu, .chat-more-actions) .shortcut-hint::after { content: attr(title); font: 500 11.5px/1 var(--mono); }
  body.focus-ui .chat-more-actions .shortcut-hint { display: none !important; }
  .ws-menu-harnesses { display: grid; gap: 2px; padding: 2px 0; border-block: 1px solid var(--line); }
  .ws-menu-harnesses:empty, .ws-menu-harnesses[hidden] { display: none; }
  .ws-menu-harnesses svg { width: 17px; height: 17px; flex: none; }
  .ws-menu-harnesses .pi { color: var(--accent); } .ws-menu-harnesses .claude { color: var(--claude); } .ws-menu-harnesses .kiro { color: var(--kiro); }

  /* ---------- the groups ---------- */
  .ws-group { display: flex; flex: none; flex-direction: column; min-height: 0; }
  .ws-lab { display: flex; align-items: baseline; gap: 6px; height: 38px; padding: 16px 10px 4px; color: var(--text); font: 700 15px/1.2 var(--sans); letter-spacing: 0; }
  .ws-lab > i { color: var(--muted); font: 600 13px/1 var(--sans); font-style: normal; }
  .ws-group + .ws-group { margin-top: 4px; border-top: 1px solid var(--line-strong); }
  .ws-show-all { margin-left: auto; min-height: 0; padding: 0; border: 0; background: none; color: var(--accent); font: 600 12px/1 var(--sans); cursor: pointer; }
  .ws-show-all:hover { text-decoration: underline; }
  .ws-empty { margin: 0; padding: 2px 10px 6px; height: 26px; color: var(--muted); font-size: 12.5px; }
  .ws-row {
    display: flex; align-items: flex-start; gap: 10px; width: 100%; min-height: 0; margin: 0 0 2px; padding: 8px 10px;
    border: 0; border-radius: 12px; background: transparent; color: var(--text); text-align: left; font-weight: 400;
  }
  .ws-row:hover { background: color-mix(in srgb, var(--paper-raised) 55%, transparent); }
  .ws-row.sel { background: var(--panel); box-shadow: var(--shadow-soft); }
  .ws-row:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
  .ws-dot { display: inline-block; flex: none; width: 8px; height: 8px; margin-top: 6px; border-radius: 50%; background: var(--muted); }
  .ws-dot.need { background: var(--ws-need-fill); }
  .ws-dot.rev { background: var(--ws-rev); }
  /* Running is a solid green dot that stays fully opaque (also on the open, highlighted row); only the ring around it pulses. */
  .ws-dot.run { background: var(--live, var(--ws-run)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--live, var(--ws-run)) 28%, transparent); animation: ws-ring 1.8s ease-in-out infinite; }
  @keyframes ws-ring { 50% { box-shadow: 0 0 0 5px color-mix(in srgb, var(--live, var(--ws-run)) 10%, transparent); } }
  @keyframes ws-pulse { 50% { opacity: 0.35; } }
  .ws-row-copy { display: grid; min-width: 0; flex: 1; gap: 1px; }
  .ws-row-top { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
  .ws-row-top b { min-width: 0; flex: 1; overflow: hidden; font-size: 13.5px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
  .ws-row-top time { flex: none; color: var(--muted); font-size: 11.5px; }
  .ws-row-line { overflow: hidden; color: var(--muted); font-size: 12.5px; text-overflow: ellipsis; white-space: nowrap; }

  /* ---------- left column foot: one row — the person (opens themes, the palette), then the Settings gear ---------- */
  .ws-me { display: flex; flex: 1 1 auto; align-items: center; gap: 10px; width: auto; min-width: 0; min-height: 48px; padding: 6px 2px 6px 10px; border: 0; border-radius: 12px; background: transparent; color: var(--text); text-align: left; font-weight: 400; }
  .ws-me:hover { background: color-mix(in srgb, var(--paper-raised) 60%, transparent); }
  .ws-avatar { display: grid; flex: none; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent); font-size: 12px; font-weight: 700; }
  .ws-me-copy { display: grid; min-width: 0; flex: 1; }
  .ws-me-copy b { overflow: hidden; font-size: 13.5px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
  .ws-me-copy small { overflow: hidden; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
  /* The palette and the gear are the same icon cell: 32 px, a 17 px drawing. */
  .ws-me > svg { box-sizing: border-box; width: 32px; height: 32px; padding: 7.5px; flex: none; color: var(--muted); }
  .ws-me:hover > svg { color: var(--text); }
  .ws-foot .ws-foot-icon {
    position: relative; display: flex; flex: none; align-items: center; justify-content: center; width: 32px; min-width: 32px; height: 32px; min-height: 32px; padding: 0;
    border: 0; border-radius: 10px; background: transparent; box-shadow: none; color: var(--muted);
  }
  .ws-foot .ws-foot-icon:hover:not(:disabled) { background: color-mix(in srgb, var(--paper-raised) 60%, transparent); color: var(--text); }
  .ws-foot .ws-foot-icon > svg { width: 17px; height: 17px; flex: none; }
  .ws-foot-icon .shortcut-hint { left: 50%; }

  /* ---------- Projects: two columns, the projects and the chosen project's conversations ---------- */
  /* Both lists sit on the page as the Inbox groups do: no card, quiet rows, one highlight. */
  body:not(.focus-ui) :is(#projectsPanel, #chatsPanel) { border: 0; border-radius: 0; background: transparent; box-shadow: none; overflow: hidden; }
  body:not(.focus-ui) :is(#projectsPanel, #chatsPanel) > .panel-bar { flex: none; gap: 4px; height: 34px; min-height: 34px; padding: 0 0 0 10px; border: 0; background: transparent; }
  body:not(.focus-ui) #projectsPanel .brand { display: none; }
  body:not(.focus-ui) #projectsPanel .ws-picker-title { display: block; }
  body:not(.focus-ui) #projectsPanel .panel-title h1 { color: var(--muted); font: 400 15px/1.2 var(--serif); }
  body:not(.focus-ui) #projectsSectionToggle { margin-left: -8px; }
  body:not(.focus-ui) #projectsPanel:has(#projectsSectionToggle[aria-expanded="false"]) > :is(#projectsLoading, #projectSearchRow, #projectFilterRow, #projectList) { display: none; }
  /* The conversations column is headed by its project's name, level with the brand. */
  body:not(.focus-ui) #chatsPanel > .panel-bar { height: 44px; min-height: 44px; margin-top: 4px; padding-left: 10px; }
  body:not(.focus-ui) #chatsPanel .panel-title h1 { color: var(--heading); font: 400 19px/1.1 var(--serif); }
  /* The folder is on the project's row in the list of projects; here the name alone keeps the line. */
  body:not(.focus-ui) #chatsPanel .panel-title p { display: none; }
  body:not(.focus-ui) :is(#chatsRecentSessionsButton, #chatsRunningConversationsButton) { display: none !important; }
  body:not(.focus-ui) .collapse-button { display: inline-grid; flex: none; width: 28px; min-width: 28px; height: 28px; min-height: 28px; border-radius: 9px; color: var(--muted); }
  body:not(.focus-ui) .collapse-button svg { width: 16px; height: 16px; }

  /* The tools over each list: a search box and small square buttons, 32 px high. */
  body:not(.focus-ui) .project-search-row { flex: none; gap: 4px; margin: 2px 0 6px; }
  body:not(.focus-ui) #projectsPanel .project-search-row input,
  body:not(.focus-ui) #conversationListPane .conversation-search input,
  body:not(.focus-ui) #quickNotesSection .quick-note-search input { min-height: 32px; height: 32px; padding-block: 0; border-radius: 10px; font-size: 13px; }
  /* The focus ring is drawn inside the box: these boxes touch the column's edge, which would cut a ring around them. */
  body:not(.focus-ui) :is(#projectsPanel .project-search-row, #conversationListPane .conversation-search, #quickNotesSection .quick-note-search) input:focus {
    border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent);
  }
  body:not(.focus-ui) #projectsPanel .project-search-row .icon-button,
  body:not(.focus-ui) .conversation-filters-toggle {
    position: relative; display: inline-grid; flex: none; place-items: center; width: 32px; min-width: 32px; height: 32px; min-height: 32px; margin: 0;
    border: 0; border-radius: 10px; background: var(--field); box-shadow: none; color: var(--muted);
  }
  body:not(.focus-ui) #projectsPanel .project-search-row .icon-button.primary { background: var(--accent); color: var(--surface); font-size: 17px; font-weight: 500; line-height: 1; }
  body:not(.focus-ui) #projectsPanel .project-search-row .icon-button svg,
  body:not(.focus-ui) .conversation-filters-toggle svg { width: 16px; height: 16px; }
  body:not(.focus-ui) :is(.conversation-filters-toggle, #allProjectIssuesButton):is(:hover, [aria-expanded="true"], .on) { color: var(--accent); }
  body:not(.focus-ui) .conversation-filters-toggle[aria-expanded="true"] { background: color-mix(in srgb, var(--accent) 14%, var(--field)); }
  body:not(.focus-ui) .conversation-filters-toggle[hidden] { display: none; }
  body:not(.focus-ui) .conversation-filters-count {
    position: absolute; top: -4px; right: -4px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px;
    background: var(--accent); color: var(--surface); font: 600 10.5px/16px var(--sans); text-align: center;
  }
  body:not(.focus-ui) .conversation-filters-count[hidden] { display: none; }
  body:not(.focus-ui) :is(.new-chat-mobile, .quick-note-mobile, .projects-quick-note-mobile) { display: none; }
  /* The projects' cluster filter folds behind its button, as a project's filters do (app/workspace.js). */
  body:not(.focus-ui) #projectFilterRow { flex: none; margin: 0 0 6px; }
  body:not(.focus-ui) #projectsPanel:not(.filters-open) > #projectFilterRow { display: none; }

  /* A project's list: start a conversation with an agent, Conversations or Notes, then the search and its filters. */
  body:not(.focus-ui) .new-chat-row { display: block; flex: none; margin: 2px 0 0; }
  body:not(.focus-ui) #chatsPanel .new-chat-harnesses { display: flex; align-items: center; gap: 4px; min-height: 32px; }
  body:not(.focus-ui) #chatsPanel .new-chat-harnesses:not(:empty)::before { content: "New"; flex: none; margin: 0 6px 0 10px; color: var(--muted); font: 600 12.5px/1 var(--sans); }
  body:not(.focus-ui) #chatsPanel .new-chat-harness-button { flex: 0 0 36px; width: 36px; min-width: 36px; height: 32px; min-height: 32px; border: 0; border-radius: 10px; background: var(--field); box-shadow: none; }
  body:not(.focus-ui) #chatsPanel .new-chat-harness-button:hover:not(:disabled) { background: var(--paper-raised); }
  body:not(.focus-ui) #chatsPanel .new-chat-harness-icon { width: 17px; height: 17px; }
  body:not(.focus-ui) #chatsPanel .conversation-tabs { flex: none; gap: 2px; margin: 6px 0 0; padding: 3px; border: 0; border-radius: 12px; background: var(--paper-raised); }
  body:not(.focus-ui) #chatsPanel .conversation-tabs button { min-height: 26px; height: 26px; border-radius: 9px; font-size: 12.5px; }
  body:not(.focus-ui) #chatsPanel .conversation-tabs button.active { background: var(--panel); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12); }
  /* The state chips wrap onto a second line rather than run past the column's edge (a three-digit count is wider than a
     fifth of it); each takes what a line leaves over. */
  body:not(.focus-ui) .chat-filters { display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 6px; }
  body:not(.focus-ui) .chat-filters button { flex: 1 1 auto; min-width: 44px; padding: 0 4px; }
  body:not(.focus-ui) :is(.classification-filter, .list-filter-row) { margin-inline: 0; }
  body:not(.focus-ui) #quickNotesSection .section-title { margin-inline: 10px 0; }
  body:not(.focus-ui) #quickNotesSection .quick-note-search { margin-inline: 0; }
  /* The list's own title repeats the tab, so its row lends Mark all reviewed a line of its own under the filters. The
     label and cluster lists have the column's whole width, so an open list is never wider than its row. */
  body:not(.focus-ui) #conversationListPane {
    display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-content: start;
    grid-template-rows: auto auto auto auto auto minmax(0, 1fr);
    grid-template-areas: "search search search" "chips chips chips" "labels labels labels" "done sched sched" "mark mark mark" "list list list";
  }
  body:not(.focus-ui) #conversationListPane[hidden] { display: none; }
  body:not(.focus-ui) #conversationListPane > .section-title { display: contents; }
  body:not(.focus-ui) #conversationListPane > .section-title::after,
  body:not(.focus-ui) #conversationListPane > .section-title > span:first-child { display: none; }
  body:not(.focus-ui) #conversationListPane #chatsLiveDot { grid-area: mark; justify-self: end; align-self: center; margin: 0 12px 6px 0; }
  body:not(.focus-ui) #conversationListPane .mark-all-reviewed-button { grid-area: mark; justify-self: start; align-self: center; margin: 0 0 6px 8px; }
  body:not(.focus-ui) #conversationListPane > .section-title .mark-all-reviewed-button { min-width: 0; min-height: 22px; overflow: hidden; padding: 0 8px; font: 600 11.5px/20px var(--sans); text-overflow: ellipsis; white-space: nowrap; }
  /* The filters button's count badge overhangs its corner: the row's own padding keeps it inside the column. */
  body:not(.focus-ui) #conversationListPane > .conversation-search-row { grid-area: search; display: flex; align-items: center; gap: 4px; margin: 6px 0; padding: 4px 4px 0 0; }
  body:not(.focus-ui) #conversationListPane .conversation-search { flex: 1; min-width: 0; margin: 0; }
  body:not(.focus-ui) #conversationListPane > .chat-filters { grid-area: chips; }
  body:not(.focus-ui) #conversationListPane .chat-filters button { min-height: 28px; color: color-mix(in srgb, var(--text) 78%, transparent); }
  body:not(.focus-ui) #conversationListPane .chat-filters button.active { color: var(--text); }
  body:not(.focus-ui) #conversationListPane > #conversationFilterRow { grid-area: labels; margin-right: 0; }
  body:not(.focus-ui) #conversationListPane > .done-filter[for="showDoneConversations"] { grid-area: done; }
  body:not(.focus-ui) #conversationListPane > .done-filter[for="showScheduledConversations"] { grid-area: sched; }
  body:not(.focus-ui) #conversationListPane .done-filter { grid-column: auto; margin: 2px 2px 6px 8px; font-size: 12px; white-space: nowrap; }
  body:not(.focus-ui) #conversationListPane > #sessionList { grid-area: list; min-height: 0; }
  body:not(.focus-ui) #conversationListPane:not(.filters-open) > :is(.chat-filters, #conversationFilterRow, .done-filter),
  body:not(.focus-ui) #conversationListPane:not(.filters-open) :is(#markAllReviewedButton, #chatsLiveDot) { display: none; }

  /* Both lists are one long scroll inside their own column (app/long-scroll.js, .agents/knowledge/list-scrolling.md): no pages. */
  body:not(.focus-ui) :is(#projectList, #sessionList).panel-scroll { gap: 2px; padding: 2px 2px 4px; overflow-y: auto; overscroll-behavior: contain; }

  /* The projects' groups (Personal, Work, a machine) are headed like the Inbox's groups: a quiet label in the column's
     own colour (a chevron with a 20 px hit area, the workspace's dot, the name, its count in muted text), and a
     hairline between one workspace and the next. The label stays at the top of the list while its projects scroll
     under it. One line; the full name is the tooltip. */
  body:not(.focus-ui) #projectList .project-group { gap: 2px; min-width: 0; }
  body:not(.focus-ui) #projectList .project-group + .project-group { margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--line-strong); }
  body:not(.focus-ui) #projectList .project-group > .list-row + .list-row { border-top: 0; }
  body:not(.focus-ui) #projectList .project-group-summary {
    position: sticky; top: 0; z-index: 3; box-sizing: border-box; gap: 6px; min-width: 0; min-height: 32px; margin: 0 0 2px; padding: 0 6px 0 2px; border-radius: 10px;
    background: var(--bg); color: var(--text);
    font: 600 12.5px/1.2 var(--sans); letter-spacing: 0.02em; text-transform: none; opacity: 1;
  }
  body:not(.focus-ui) #projectList .project-group-summary:hover { background: var(--bg); color: var(--heading); }
  body:not(.focus-ui) #projectList .project-group-summary:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
  /* The chevron: a 20 px cell. */
  body:not(.focus-ui) #projectList .project-group-summary::before {
    content: "▸"; display: inline-grid; flex: none; place-items: center; width: 20px; height: 20px; border-radius: 6px; color: var(--text); font-size: 12px; line-height: 1;
  }
  body:not(.focus-ui) #projectList .project-group-summary > span:first-of-type {
    display: flex; align-items: center; gap: 8px; min-width: 0; flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  }
  /* The workspace's own colour. */
  body:not(.focus-ui) #projectList .project-group-summary > span:first-of-type::before {
    content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--project-hue, var(--accent));
  }
  body:not(.focus-ui) #projectList .project-group-count {
    flex: none; margin-left: 0; min-width: 0; padding: 0; border-radius: 0; background: none;
    color: var(--muted); font: 600 12.5px/20px var(--sans); text-align: left;
  }
  body:not(.focus-ui) #projectList :is(.project-group-running-badge, .project-group-review-badge) { margin-left: 0; font-size: 11px; }

  /* A row is one line of title and one quiet line under it. The row holds the highlight. Its pin and ⋮ lie over its
     end and show when the pointer or the keyboard is on the row (the title then ends before them); a pinned row keeps
     its pin in sight, and a touch screen keeps ⋮, which also pins. --row-lead is the room a row's own mark takes
     there: the count of its sub-agent conversations. */
  body:not(.focus-ui) #projectList .project-group > .list-row,
  body:not(.focus-ui) #sessionList .list-row-main { --row-lead: 4px; --row-end: calc(var(--row-lead) + 2px); position: relative; display: flex; align-items: center; min-width: 0; border-radius: 12px; }
  body:not(.focus-ui) #sessionList .list-row:is(.has-children, .has-ticket) > .list-row-main { --row-lead: 36px; }
  body:not(.focus-ui) #sessionList .list-row.has-children.has-ticket > .list-row-main { --row-lead: 68px; }
  body:not(.focus-ui) #projectList .project-group > .list-row:hover,
  body:not(.focus-ui) #sessionList .list-row-main:hover { background: color-mix(in srgb, var(--paper-raised) 55%, transparent); }
  body:not(.focus-ui) #projectList .project-group > .list-row.active,
  body:not(.focus-ui) #sessionList .list-row.active > .list-row-main { background: var(--panel); box-shadow: var(--shadow-soft); }
  body:not(.focus-ui) :is(#projectList .project-card, #sessionList .session-card),
  body:not(.focus-ui) :is(#projectList .project-card, #sessionList .session-card):is(:hover, .active) {
    flex: 1 1 0; width: auto; min-width: 0; min-height: 0; padding: 8px var(--row-end) 8px 10px; border: 0; border-radius: 12px; background: transparent; box-shadow: none;
  }
  body:not(.focus-ui) :is(#projectList .project-card, #sessionList .session-card):focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
  /* Rows look like the Inbox's: plain on the column, lighter under the pointer, the open one lifted onto the card
     colour. A project's own colour is a dot before its name, where the Inbox puts a conversation's state; every project
     row keeps the dot's room so the names line up. A conversation's own colour is a slim edge at its start. */
  body:not(.focus-ui) :is(#projectList .project-card, #sessionList .session-card)[data-color],
  body:not(.focus-ui) :is(#projectList .project-card, #sessionList .session-card)[data-color]:is(:hover, .active) { box-shadow: none; }
  body:not(.focus-ui) #projectList .project-card,
  body:not(.focus-ui) #projectList .project-card:is(:hover, .active) { padding-left: 26px; }
  body:not(.focus-ui) #projectList .project-group > .list-row::before {
    content: ""; position: absolute; left: 10px; top: 15px; width: 8px; height: 8px; border-radius: 50%;
    background: color-mix(in srgb, var(--muted) 45%, transparent); pointer-events: none;
  }
  body:not(.focus-ui) #projectList .project-group > .list-row[data-color]::before { background: var(--project-hue); }
  body:not(.focus-ui) #sessionList .list-row-main[data-color]::before {
    content: ""; position: absolute; left: 3px; top: 9px; bottom: 9px; width: 3px; border-radius: 2px; background: var(--project-hue); pointer-events: none;
  }
  body:not(.focus-ui) #sessionList .session-card > strong,
  body:not(.focus-ui) #projectList .project-card strong { display: block; overflow: hidden; margin-bottom: 2px; font-size: 13.5px; font-weight: 600; line-height: 1.35; white-space: nowrap; text-overflow: ellipsis; overflow-wrap: normal; }
  /* The counts on a project's row keep their hue but are darkened (lightened in the dark themes) to read on their tint. */
  body:not(.focus-ui) #projectList .project-review-badge { color: color-mix(in srgb, var(--amber) 50%, var(--text)); }
  body:not(.focus-ui) #projectList .project-running-badge { color: color-mix(in srgb, var(--live) 50%, var(--text)); }
  body:not(.focus-ui) #projectList .project-card-heading { flex-wrap: nowrap; align-items: center; margin-bottom: 2px; }
  body:not(.focus-ui) #projectList .project-card-heading strong { flex: 0 1 auto; margin: 0; }
  body:not(.focus-ui) #sessionList .session-card > span,
  body:not(.focus-ui) #projectList .project-card > span { display: block; overflow: hidden; font-size: 11.5px; line-height: 1.4; white-space: nowrap; text-overflow: ellipsis; }
  body:not(.focus-ui) #projectList .project-card > span { font-family: var(--sans); }
  /* A project's second line: its folder, then what there is to say about it (syncing, locked, at home). "Not shared"
     is how most projects are and says itself by saying nothing. */
  body:not(.focus-ui) #projectList .project-card { display: flex; flex-wrap: wrap; align-items: center; column-gap: 8px; text-align: left; }
  body:not(.focus-ui) #projectList .project-card-heading { flex: 0 0 100%; min-width: 0; }
  body:not(.focus-ui) #projectList .project-card > .project-path { display: none; }
  body:not(.focus-ui) #projectList :is(.project-sync-status-synced, .project-sync-none) { display: none; }
  body:not(.focus-ui) #projectList .project-card > em { flex: none; max-width: 100%; margin: 0; font-size: 11px; line-height: 1.4; }
  body:not(.focus-ui) #projectList .project-sync-status-unavailable { display: none; }
  body:not(.focus-ui) #projectList .project-card > .project-sync-status { color: var(--muted); }
  body:not(.focus-ui) #projectList .project-group-dashboard { width: 26px; min-width: 26px; height: 26px; min-height: 26px; margin-left: auto; border-radius: 8px; color: var(--muted); }
  body:not(.focus-ui) #projectList .project-group-dashboard svg { width: 15px; height: 15px; }
  body:not(.focus-ui) #projectsPanel .project-search-row .projects-quick-note-mobile { display: none; }
  body:not(.focus-ui) :is(#projectList, #sessionList) .row-action-button {
    top: 50%; right: var(--row-lead); transform: translateY(-50%); width: 28px; min-width: 28px; height: 28px; min-height: 28px; border-radius: 8px; background: transparent; box-shadow: none;
  }
  body:not(.focus-ui) :is(#projectList, #sessionList) .row-action-button:hover { background: var(--field); }
  /* Two fixed slots at the right edge of every row, so titles and row heights never change on hover: ⋯ (always visible)
     in the last, the pin in the one before it. A pinned row shows its pin there; the other rows reveal it on hover or
     focus (a touch screen has no hover: the menu also pins). The open menu is placed under or over ⋯, never over the pin. */
  body:not(.focus-ui) :is(#projectList .project-group > .list-row, #sessionList .list-row-main) { --row-end: calc(var(--row-lead) + 62px); }
  body:not(.focus-ui) :is(#projectList, #sessionList) .pin-button { right: calc(var(--row-lead) + 30px); }
  body:not(.focus-ui) :is(#projectList, #sessionList) .row-menu-button { right: var(--row-lead); opacity: 1; color: color-mix(in srgb, var(--text) 72%, transparent); }
  body:not(.focus-ui) :is(#projectList, #sessionList) .pin-button { color: color-mix(in srgb, var(--text) 72%, transparent); }
  body:not(.focus-ui) :is(#projectList, #sessionList) .row-menu-button:hover { color: var(--text); }
  body:not(.focus-ui) :is(#projectList, #sessionList) .pin-button:not(.pinned) { opacity: 0; }
  @media (hover: hover) {
    body:not(.focus-ui) :is(#projectList .list-row, #sessionList .list-row-main):is(:hover, :focus-within) .pin-button,
    body:not(.focus-ui) :is(#projectList, #sessionList) .list-row.menu-open .pin-button { opacity: 1; }
  }
  @media (hover: none) {
    body:not(.focus-ui) :is(#projectList, #sessionList) .pin-button:not(.pinned) { display: none; }
  }
  /* A conversation's sub-agent conversations open from the count at the end of its row; it never moves. */
  body:not(.focus-ui) #sessionList .session-children-toggle { right: 4px; width: 30px; min-width: 30px; padding: 0; opacity: 1; color: var(--muted); font: 600 10.5px/1 var(--mono); }
  body:not(.focus-ui) #sessionList .list-row[data-session-depth="1"] .session-card { min-height: 0; }
  /* Its sub-agent steps are a line of their own under the card, so the card's second line (date, agent, status such as
     Running) is never shortened to make room for them. */
  body:not(.focus-ui) #sessionList .agent-run-toggle[aria-expanded="false"] { margin-left: 12px; }
  body:not(.focus-ui) #sessionList .agent-run-toggle[aria-expanded="true"] { margin-left: 10px; }
  body:not(.focus-ui) #sessionList .agent-run-list { margin-left: 10px; }
  /* Notes: the queue's explanation is one line until the pointer or the focus is on the queue, so the notes keep the column. */
  body:not(.focus-ui) #quickNotesQueue .quick-note-queue-hint { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
  body:not(.focus-ui) #quickNotesQueue:is(:hover, :focus-within) .quick-note-queue-hint { white-space: normal; }
  /* Worktree actions wrap in a narrow conversation column. */
  body:not(.focus-ui) #chatsPanel .worktree-subsection-title { flex-wrap: wrap; gap: 4px; margin: 2px 0 2px 10px; }
  body:not(.focus-ui) #chatsPanel .worktree-subsection-title::after { display: none; }
  body:not(.focus-ui) #chatsPanel .worktree-subsection-title > span { flex: 0 0 auto; margin-right: auto; font-size: 13px; }
  body:not(.focus-ui) #chatsPanel .worktree-subsection-title > button { min-width: 0; min-height: 24px; padding: 0 5px; font: 600 11.5px/1 var(--sans); white-space: nowrap; }

  /* The places are one column of rows with their names, in Inbox and in Projects. Only a window under 720 px high
     folds them to one row of icons in Projects (their names are the tooltips), so some projects still fit under them. */
  @media (max-height: 719px) {
    body:not(.focus-ui).ws-column-projects .ws-places { display: flex; gap: 2px; }
    body:not(.focus-ui).ws-column-projects .ws-places > .ws-place { flex: 1 1 0; justify-content: center; padding: 0; }
    body:not(.focus-ui).ws-column-projects .ws-places :is(.ws-place-label, .ws-place-note) { display: none; }
    body:not(.focus-ui).ws-column-projects .ws-places .control-icon-badge { position: absolute; top: 1px; right: 2px; min-width: 16px; height: 15px; margin: 0; padding: 0 4px; font-size: 10px; }
  }

  /* Each column folds on its own chevron ([ and ]). The left column folds to a rail of icons with its expand button;
     a window too narrow for both columns folds it by itself (.ws-auto-rail, app/workspace.js syncRail). The
     conversations fold to a strip with theirs. */
  body:not(.focus-ui):not(.nav-fixed):is(.projects-collapsed, .ws-auto-rail) .shell { --ws-col-side: 64px; }
  body:not(.focus-ui).chats-collapsed .shell { --ws-col-list: 40px; }
  body:not(.focus-ui):not(.nav-fixed):is(.projects-collapsed, .ws-auto-rail) :is(.ws-title, .ws-search, .ws-place-label, .ws-place-note, .ws-me-copy, .ws-me > svg, .ws-groups) { display: none !important; }
  .ws-search-rail { display: none; }
  body:not(.focus-ui):not(.nav-fixed):is(.projects-collapsed, .ws-auto-rail) .ws-search-rail { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 36px; margin: 0 auto; padding: 0; border: 0; border-radius: 12px; background: transparent; box-shadow: none; color: var(--muted); }
  body:not(.focus-ui):not(.nav-fixed):is(.projects-collapsed, .ws-auto-rail) .ws-search-rail:hover { background: var(--field); color: var(--text); }
  body:not(.focus-ui):not(.nav-fixed):is(.projects-collapsed, .ws-auto-rail) .ws-search-rail svg { width: 18px; height: 18px; }
  body:not(.focus-ui):not(.nav-fixed):is(.projects-collapsed, .ws-auto-rail) .ws-brand { flex-direction: column; justify-content: center; padding-inline: 0; }
  body:not(.focus-ui):not(.nav-fixed):is(.projects-collapsed, .ws-auto-rail) .ws-new-button { width: 32px; padding: 0; justify-content: center; font-size: 0; }
  body:not(.focus-ui):not(.nav-fixed):is(.projects-collapsed, .ws-auto-rail) :is(.ws-place, .ws-me) { justify-content: center; padding: 0; }
  /* Folded, the foot stacks: the person (themes) over the Settings gear, both still one click away. */
  body:not(.focus-ui):not(.nav-fixed):is(.projects-collapsed, .ws-auto-rail) .ws-foot { flex-direction: column; }
  body:not(.focus-ui):not(.nav-fixed):is(.projects-collapsed, .ws-auto-rail) .ws-me { flex: none; width: 100%; min-height: 40px; }
  body:not(.focus-ui):not(.nav-fixed):is(.projects-collapsed, .ws-auto-rail) :is(.ws-side, .ws-foot) { padding-left: 10px; }
  body:not(.focus-ui):not(.nav-fixed):is(.projects-collapsed, .ws-auto-rail) .ws-places { display: grid; }
  body:not(.focus-ui):not(.nav-fixed):is(.projects-collapsed, .ws-auto-rail) .ws-places .control-icon-badge { position: absolute; top: 1px; right: 2px; min-width: 16px; height: 15px; margin: 0; padding: 0 4px; font-size: 10px; }
  body:not(.focus-ui):not(.nav-fixed):is(.projects-collapsed, .ws-auto-rail) .shell > #projectsPanel { display: flex; margin-left: 10px; }
  body:not(.focus-ui) :is(#projectsPanel, #chatsPanel).collapsed .panel-rail { align-items: center; padding-top: 6px; }
  body:not(.focus-ui) .view-panel.collapsed > :not(.panel-rail) { display: none !important; }
  body:not(.focus-ui) .view-panel.collapsed .panel-rail { display: flex; }

  /* ---------- a group's full list in the middle ---------- */
  .ws-group-page { flex-direction: column; min-height: 0; padding: 30px clamp(24px, 4vw, 56px) 18px; zoom: var(--ui-zoom-conversations, 1); }
  .ws-page-head { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; padding-bottom: 16px; zoom: var(--ui-zoom-headers, 1); }
  .ws-page-heading { min-width: 0; flex: 1; }
  .ws-page-crumb { margin: 0; color: var(--muted); font-size: 12.5px; font-weight: 600; }
  .ws-page-heading h1 { margin: 4px 0 0; font: 400 clamp(28px, 3vw, 40px)/1.08 var(--serif); color: var(--heading); }
  .ws-page-tabs { display: flex; flex-wrap: wrap; max-width: 100%; box-sizing: border-box; gap: 2px; padding: 3px; border-radius: 12px; background: var(--paper-raised); }
  .ws-page-tabs button { display: inline-flex; align-items: center; gap: 6px; min-height: 30px; padding: 0 12px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font-size: 12.5px; font-weight: 600; white-space: nowrap; }
  .ws-page-tabs button b { font-size: 11.5px; font-weight: 600; opacity: 0.75; }
  .ws-page-tabs button[aria-selected="true"] { background: var(--panel); color: var(--text); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12); }
  .ws-page-head > .icon-button { align-self: flex-start; }
  /* One long scroll (app/long-scroll.js): every row of the group, drawn as the list is scrolled. */
  /* Rows keep their own height however many there are (auto rows of a full list were squeezed to fit the box), and the page
     keeps a readable width on a very wide window. */
  .ws-page-list { display: grid; grid-auto-rows: max-content; align-content: start; gap: 6px; min-height: 0; flex: 1; overflow-y: auto; overscroll-behavior: contain; }
  .ws-group-page > * { box-sizing: border-box; width: 100%; max-width: 1180px; margin-inline: auto; }
  .ws-row.wide { margin: 0; padding: 12px 14px; border-radius: 14px; background: var(--field); }
  .ws-row.wide:hover { background: color-mix(in srgb, var(--field) 70%, var(--paper-raised)); }
  .ws-row.wide .ws-row-top b { font: 400 16px/1.3 var(--serif); }
  .ws-row.wide .ws-row-line { font-size: 13px; }

  /* ---------- the conversation: one card, its details beside it ---------- */
  body:not(.focus-ui) #chatPanel {
    position: relative;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto auto minmax(0, 1fr) auto auto auto auto auto auto auto;
    grid-template-areas: "popup" "head" "lease" "msgs" "reconnect" "routing" "strip" "lock" "done" "login" "composer";
    container: chatpanel / inline-size;
    column-gap: var(--ws-gap);
    border: 0; border-radius: 0; background: transparent; box-shadow: none; overflow: visible;
  }
  /* The card behind the conversation's own column. */
  body:not(.focus-ui) #chatPanel::before {
    content: ""; grid-area: 1 / 1 / -1 / 2; border-radius: var(--ws-card-radius); background: var(--panel); box-shadow: var(--shadow-soft); pointer-events: none;
  }
  body:not(.focus-ui) #chatPanel:has(> .messages-wrap > #activityPanel:not([hidden])):not(:has(> .messages-wrap.activity-floating)) {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "popup details" "head details" "lease details" "msgs details" "reconnect details" "routing details" "strip details" "lock details" "done details" "login details" "composer details";
  }
  body:not(.focus-ui) #chatPanel > .messages-wrap { display: contents; }
  body:not(.focus-ui) #chatPanel > .control-popup-bar { grid-area: popup; }
  body:not(.focus-ui) #chatPanel > .chat-topbar { grid-area: head; }
  body:not(.focus-ui) #chatPanel > .control-lease-banner { grid-area: lease; margin: 10px 28px 0; }
  body:not(.focus-ui) #chatPanel > .messages-wrap > :is(.messages, .jump-to-bottom, .story-return) { grid-area: msgs; }
  body:not(.focus-ui) #chatPanel > .reconnect-banner { grid-area: reconnect; }
  body:not(.focus-ui) #chatPanel > .routing-warning { grid-area: routing; }
  body:not(.focus-ui) #chatPanel > .command-strip { grid-area: strip; }
  body:not(.focus-ui) #chatPanel > #conversationLock { grid-area: lock; }
  body:not(.focus-ui) #chatPanel > #doneConversationNotice { grid-area: done; }
  body:not(.focus-ui) #chatPanel > .composer { grid-area: composer; }
  /* A sign-in the agent asked for sits directly above the message box (app/browser-login.js). */
  body:not(.focus-ui) #chatPanel > .browser-login-inline { grid-area: login; margin: 0 22px 8px; }
  body:not(.focus-ui) #chatPanel > :is(.reconnect-banner, .routing-warning, .conversation-lock) { margin-inline: 22px; }

  /* The header's first line: title, project, state; Stop, Mark done, the details toggle and ⋯ at the end. */
  body:not(.focus-ui) #chatPanel > .chat-topbar {
    display: flex; align-items: center; gap: 10px; height: auto; min-height: 0; padding: 24px 24px 0 30px; border: 0; background: transparent; zoom: var(--ui-zoom-headers, 1);
  }
  body:not(.focus-ui) #chatPanel .chat-title-block { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; }
  /* The worktree's name is cut inside its chip: a long one ran over the project, the state and the agent beside it. */
  #chatPanel #conversationWorktreeIndicator { display: inline-block; flex: 0 1 auto; max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
  #chatPanel #conversationWorktreeIndicator[hidden] { display: none; }
  /* A narrow conversation keeps its title: the project tag goes and Mark done keeps only its icon. */
  body:not(.focus-ui) #chatPanel > .chat-topbar { container: chathead / inline-size; }
  @container chathead (max-width: 620px) {
    #chatPanel .chat-project-name { display: none !important; }
    #chatHeadActions :is(#chatDoneButton, #chatMarkReviewedButton) { width: 34px !important; padding: 0 !important; justify-content: center; }
    #chatHeadActions :is(#chatDoneButton, #chatMarkReviewedButton) .chat-action-label { display: none !important; }
    #chatHeadActions #activityOverviewButton { width: 34px !important; padding: 0 !important; justify-content: center; }
    #chatHeadActions #activityOverviewButton > span { display: none !important; }
  }
  body:not(.focus-ui) #chatPanel .chat-topbar h2 { min-width: 80px; flex: 0 1 auto; font: 400 clamp(21px, 1.9vw, 28px)/1.15 var(--serif); color: var(--heading); }
  body:not(.focus-ui) #chatPanel .chat-title-meta { display: flex; align-items: center; gap: 8px; min-width: 0; flex: 0 1 auto; margin: 0; }
  body:not(.focus-ui) #chatPanel .chat-project-name {
    flex: 0 1 auto; min-width: 48px; max-width: 160px; padding: 3px 9px; border-radius: 999px; background: var(--paper-raised); color: var(--muted);
    font: 600 12.5px/1.3 var(--sans); letter-spacing: 0; text-transform: none;
  }
  /* The state may shrink (its words are cut) instead of running out of the title row under Listen and Mark done. */
  body:not(.focus-ui) #chatPanel .chat-actions { flex: 0 1 auto; min-width: 0; margin: 0; padding: 0; gap: 6px; }
  /* The state as words, not a traffic light: Idle, Connecting…, Connected, working. */
  body:not(.focus-ui) #chatPanel #connectionStatus {
    position: relative; width: auto; height: 24px; padding: 0 10px 0 22px; overflow: visible; border: 0; border-radius: 999px;
    background: color-mix(in srgb, var(--danger) 10%, transparent); color: var(--danger); font: 600 12.5px/24px var(--sans); text-indent: 0; animation: none;
  }
  /* In a narrow conversation the state gives way (its words are cut) before it runs under Stop. */
  body:not(.focus-ui) #chatPanel #connectionStatus:is(.working, .connecting, :not(.live)) { flex: 0 1 auto; min-width: 24px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  body:not(.focus-ui) #chatPanel #connectionStatus::before { content: ""; position: absolute; top: 8px; left: 9px; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
  body:not(.focus-ui) #chatPanel #connectionStatus.live { background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent); }
  body:not(.focus-ui) #chatPanel #connectionStatus.connecting { background: color-mix(in srgb, var(--ws-need-fill) 18%, transparent); color: var(--ws-need); }
  body:not(.focus-ui) #chatPanel #connectionStatus:is(.working, .connecting)::before { animation: ws-pulse 1.4s ease-in-out infinite; }
  /* Connected and resting says itself with a green dot (its name stays the tooltip and the accessible name). */
  body:not(.focus-ui) #chatPanel #connectionStatus.live:not(.working, .background) { width: 24px; padding: 0; overflow: hidden; color: var(--accent); font-size: 0; }
  /* The answer is out but its background tasks run on: say so in words, it waits for the person. */
  body:not(.focus-ui) #chatPanel #connectionStatus.live.background { flex: 0 1 auto; min-width: 24px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; background: color-mix(in srgb, var(--ws-need-fill) 18%, transparent); color: var(--ws-need); }
  body:not(.focus-ui) .ws-head-actions { display: flex; align-items: center; gap: 6px; flex: none; }
  body:not(.focus-ui) .ws-head-actions > :is(button, details > summary) { min-height: 34px; height: 34px; }
  /* Podcast playback pill in the conversation top header. */
  body:not(.focus-ui) .ws-head-actions #activityOverviewButton {
    display: inline-flex; align-items: center; gap: 6px; width: auto; min-width: 0; padding: 0 12px;
    border: 0; border-radius: 999px;
    background: color-mix(in srgb, var(--accent) 12%, var(--panel));
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 55%, transparent);
    color: var(--text); font-size: 13px; font-weight: 600; white-space: nowrap;
  }
  body:not(.focus-ui) .ws-head-actions #activityOverviewButton:hover:not(:disabled) { background: color-mix(in srgb, var(--accent) 20%, var(--panel)); }
  body:not(.focus-ui) .ws-head-actions #activityOverviewButton svg { width: 15px; height: 15px; flex: none; }
  body:not(.focus-ui) .ws-head-actions #activityOverviewButton[aria-busy="true"] {
    box-shadow: inset 0 0 0 1px var(--amber);
    background: color-mix(in srgb, var(--amber) 14%, var(--panel));
  }
  body:not(.focus-ui) .ws-head-actions #abortButton { display: inline-flex; align-items: center; gap: 6px; width: auto; min-width: 0; padding: 0 12px; border-radius: 10px; box-shadow: inset 0 0 0 1px var(--line); color: var(--danger); font-size: 13.5px; font-weight: 600; }
  body:not(.focus-ui) .ws-head-actions #abortButton:disabled { display: none; }
  body:not(.focus-ui) .ws-head-actions #abortButton svg { width: 15px; height: 15px; }
  body:not(.focus-ui) .ws-head-actions .ws-label { display: inline; }
  body:not(.focus-ui) .ws-head-actions :is(#chatDoneButton, #chatMarkReviewedButton) { display: inline-flex; width: auto; gap: 6px; padding: 0 12px; border-radius: 10px; background: transparent; box-shadow: inset 0 0 0 1px var(--line); font-size: 13.5px; font-weight: 600; }
  body:not(.focus-ui) .ws-head-actions :is(#chatDoneButton, #chatMarkReviewedButton) .chat-action-label { display: inline; }
  body:not(.focus-ui) .ws-head-actions :is(#chatDoneButton, #chatMarkReviewedButton) svg { width: 16px; height: 16px; }
  body:not(.focus-ui) .ws-head-actions #activityToggleButton { display: inline-grid; place-items: center; width: 34px; min-width: 34px; padding: 0; border-radius: 10px; background: transparent; box-shadow: none; color: var(--muted); }
  body:not(.focus-ui) .ws-head-actions #activityToggleButton .background-tasks-label { display: none; }
  body:not(.focus-ui) .ws-head-actions #activityToggleButton.active { background: var(--paper-raised); color: var(--text); }
  body:not(.focus-ui) .ws-head-actions #activityToggleButton svg { width: 18px; height: 18px; }
  /* ⋯: every other conversation action, as a menu. */
  body:not(.focus-ui) .ws-head-actions .chat-more { position: relative; display: block; }
  body:not(.focus-ui) .ws-head-actions .chat-more > summary { display: inline-grid; place-items: center; width: 34px; min-width: 34px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); list-style: none; cursor: pointer; }
  body:not(.focus-ui) .ws-head-actions .chat-more > summary::-webkit-details-marker { display: none; }
  body:not(.focus-ui) .ws-head-actions .chat-more[open] > summary, body:not(.focus-ui) .ws-head-actions .chat-more > summary:hover { background: var(--paper-raised); color: var(--text); }
  body:not(.focus-ui) .ws-head-actions .chat-more:not([open]) > .chat-more-actions { display: none; }
  body:not(.focus-ui) .ws-head-actions .chat-more[open] > .chat-more-actions {
    position: absolute; top: calc(100% + 6px); right: 0; bottom: auto; z-index: 30; display: grid; align-content: start; grid-auto-rows: max-content; gap: 2px; width: max-content; height: fit-content; min-width: 248px; max-width: min(380px, calc(100vw - 32px)); max-height: calc(100dvh - 120px); overflow: hidden auto;
    padding: 6px; border: 0; border-radius: 16px; background: var(--panel); box-shadow: var(--shadow);
  }
  :root[data-theme="dark"] body:not(.focus-ui) .ws-head-actions .chat-more[open] > .chat-more-actions { box-shadow: 0 0 0 1px var(--line-strong), var(--shadow); }
  body:not(.focus-ui) .ws-head-actions .chat-more-actions > button {
    display: flex; justify-content: flex-start; align-items: center; gap: 10px; width: 100%; min-height: 36px; padding: 0 10px; border: 0; border-radius: 10px;
    background: transparent; box-shadow: none; color: var(--text); font-size: 13.5px; font-weight: 550; line-height: normal; text-align: left;
  }
  body:not(.focus-ui) .ws-head-actions .chat-more-actions > button[hidden] { display: none; }
  body:not(.focus-ui) .ws-head-actions .chat-more-actions > button:hover:not(:disabled) { background: var(--field); }
  body:not(.focus-ui) .ws-head-actions .chat-more-actions > button svg { width: 17px; height: 17px; color: var(--muted); }
  body:not(.focus-ui) .ws-head-actions .chat-more-actions .chat-action-label { display: inline; white-space: nowrap; }
  body:not(.focus-ui) .ws-head-actions .chat-more-actions .shortcut-hint { padding-left: 14px; }
  /* The menu is grouped, and each action appears once: Open, This conversation, then Delete alone at the end. Notify and
     Auto respond are the two switches in the details column, so they are not repeated here. Order places buttons that
     conversation-sharing.js appends later. */
  body:not(.focus-ui) .ws-head-actions .chat-more-actions > :is(#notifyButton, #autoRespondButton) { display: none; }
  body:not(.focus-ui) .ws-head-actions .chat-more-group { display: block; padding: 8px 10px 4px; color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
  body:not(.focus-ui) .ws-head-actions .chat-more-rule { display: block; height: 1px; margin: 4px 6px; background: var(--line); }
  body:not(.focus-ui) .ws-head-actions .chat-more-group[data-group="open"] { order: 0; }
  body:not(.focus-ui) .ws-head-actions #chatFilesButton { order: 1; }
  body:not(.focus-ui) .ws-head-actions #openTerminalButton { order: 2; }
  body:not(.focus-ui) .ws-head-actions #openBrowserButton { order: 3; }
  body:not(.focus-ui) .ws-head-actions .chat-more-group[data-group="conversation"] { order: 10; }
  body:not(.focus-ui) .ws-head-actions #renameSessionButton { order: 11; }
  body:not(.focus-ui) .ws-head-actions #shareConversationButton { order: 12; }
  body:not(.focus-ui) .ws-head-actions #attachSecretButton { order: 13; }
  body:not(.focus-ui) .ws-head-actions #chatCronButton { order: 14; }
  body:not(.focus-ui) .ws-head-actions #chatMoreDashboardButton { order: 15; }
  body:not(.focus-ui) .ws-head-actions #chatSessionMenuButton { order: 16; }
  body:not(.focus-ui) .ws-head-actions #pinConversationButton { order: 17; }
  body:not(.focus-ui) .ws-head-actions [data-testid="chat-personal-assistant-button"] { order: 18; }
  body:not(.focus-ui) .ws-head-actions #installAppButton { order: 19; }
  body:not(.focus-ui) .ws-head-actions .chat-more-rule { order: 90; }
  body:not(.focus-ui) .ws-head-actions #chatDeleteButton { order: 91; }

  /* The second line: agent, model, effort and machine as chips; context, time and cost as quiet meta. It is always one
     line: model and machine names change while an agent works, and a row that re-wrapped on them moved the whole
     conversation up and down, so chips and meta shrink (and cut their text) instead. Its place in the header is set
     further down. */
  body:not(.focus-ui) #chatPanel .chat-toolbar {
    display: flex; flex-wrap: nowrap; align-items: center; gap: 6px; padding: 0; border: 0; background: transparent; overflow: visible;
  }
  body:not(.focus-ui) #chatPanel .chat-toolbar :is(.chat-session-controls, .chat-toolbar-actions) { display: contents; }
  body:not(.focus-ui) #chatPanel .chat-toolbar .chat-control { position: relative; display: inline-flex; align-items: center; flex: 0 1 auto; min-width: 0; max-width: none; }
  body:not(.focus-ui) #chatPanel .chat-toolbar .chat-control > span:not(.shortcut-hint) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  body:not(.focus-ui) #chatPanel .chat-toolbar .chat-control[for="chatHarnessSelect"] { order: 1; }
  body:not(.focus-ui) #chatPanel .chat-toolbar .chat-model-control { order: 2; }
  body:not(.focus-ui) #chatPanel .chat-toolbar .chat-mode-control { order: 3; }
  body:not(.focus-ui) #chatPanel .chat-toolbar .chat-control[for="chatNodeSelect"] { order: 4; }
  body:not(.focus-ui) #chatPanel .chat-toolbar .chat-mode-control[hidden] { display: none !important; }
  /* When the row is short, the quiet meta gives way first, then the model and the machine; the agent and the effort
     are short words and keep them whole. */
  body:not(.focus-ui) #chatPanel .chat-toolbar :is(.chat-control[for="chatHarnessSelect"], .chat-mode-control) { flex-shrink: 0; }
  body:not(.focus-ui) #chatPanel .chat-toolbar :is(.chat-model-control, .chat-control[for="chatNodeSelect"]) { min-width: 72px; }
  body:not(.focus-ui) #chatPanel .chat-toolbar .chat-toolbar-control {
    width: auto; min-width: 0; max-width: min(240px, 100%); height: 30px; min-height: 30px; padding: 0 28px 0 12px; border: 0; border-radius: 999px;
    background-color: transparent; box-shadow: inset 0 0 0 1px var(--line); color: var(--muted); font: 600 12.5px/30px var(--sans);
    background-position: right 11px center; text-overflow: ellipsis; white-space: nowrap; field-sizing: content;
  }
  body:not(.focus-ui) #chatPanel .chat-toolbar .chat-toolbar-control:hover:not(:disabled) { box-shadow: inset 0 0 0 1px var(--line-strong); color: var(--text); }
  body:not(.focus-ui) #chatPanel .chat-toolbar #chatNodeSelect { color: var(--muted); max-width: min(200px, 100%); }
  body:not(.focus-ui) #chatPanel .chat-toolbar #modelButton { display: inline-flex; max-width: min(260px, 100%); }
  body:not(.focus-ui) #chatPanel .chat-toolbar #modelButton.claude { color: var(--claude); }
  body:not(.focus-ui) #chatPanel .chat-toolbar .auto-respond-pill { order: 5; }
  body:not(.focus-ui) #chatPanel .chat-toolbar :is(#chatRecentSessionsButton, #chatRunningConversationsButton) { display: none !important; }
  /* Wide panel: one line in the title row, title, chips, quiet meta, then the actions. A narrower panel gives the chips
     a line of their own under the title. That row needs about 1500 px for itself: 1550 px of panel, or 1900 px while the
     details column is docked beside the conversation (it takes about 360 px of the panel). The panel's width decides,
     never the header's own content, so a model name that changes while an agent works cannot re-flow the header. */
  body:not(.focus-ui) #chatPanel .chat-topbar > .chat-title-block { flex: 0 1 auto; }
  /* The one-line header needs 150 px more than first measured once a worktree chip and an assistant chip sit beside a long
     title (the machine chip ran under Listen just above the old limits), so the limits above are 150 px higher. */
  /* A header crowded by the worktree and assistant chips squeezes this row below its chips: clip it so the machine chip
     ends at the row's edge instead of running under Listen and Mark done. */
  body:not(.focus-ui) #chatPanel .chat-topbar > .chat-toolbar { order: 0; flex: 1 3 auto; min-width: 0; padding: 0 0 0 16px; overflow: clip; overflow-clip-margin: 4px; }
  @container chatpanel (max-width: 1699px) {
    body:not(.focus-ui) #chatPanel .chat-topbar { flex-wrap: wrap; row-gap: 0; }
    body:not(.focus-ui) #chatPanel .chat-topbar > .chat-title-block { flex: 1 1 0; }
    body:not(.focus-ui) #chatPanel .chat-topbar > .chat-toolbar { order: 1; flex: 0 0 100%; padding: 12px 0 14px; }
  }
  @container chatpanel (max-width: 2049px) {
    body:not(.focus-ui):not(.ws-details-tucked) #chatPanel:has(> .messages-wrap > #activityPanel:not([hidden])) .chat-topbar { flex-wrap: wrap; row-gap: 0; }
    body:not(.focus-ui):not(.ws-details-tucked) #chatPanel:has(> .messages-wrap > #activityPanel:not([hidden])) .chat-topbar > .chat-title-block { flex: 1 1 0; }
    body:not(.focus-ui):not(.ws-details-tucked) #chatPanel:has(> .messages-wrap > #activityPanel:not([hidden])) .chat-topbar > .chat-toolbar { order: 1; flex: 0 0 100%; padding: 12px 0 14px; }
  }
  body:not(.focus-ui) .ws-chat-meta { order: 9; display: flex; flex: 0 1000 auto; align-items: center; gap: 12px; margin-left: auto; min-width: 0; overflow: hidden; color: var(--muted); font-size: 12.5px; white-space: nowrap; }
  body:not(.focus-ui) .ws-chat-meta > * { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  body:not(.focus-ui) .ws-chat-meta :is(.turn-timer, .context-usage) { font: 500 12.5px/1 var(--sans); }
  body:not(.focus-ui) .ws-chat-meta .ws-chat-cost[hidden] { display: none; }

  /* The thread and the message box sit in a centred column, as in the mock. */
  body:not(.focus-ui) #chatPanel .messages { padding-block: 8px 16px; padding-inline: max(28px, calc((100% - 1100px) / 2)); }
  /* Prose runs the width of the column, so a reply and its tables share one right edge. */
  body:not(.focus-ui) #chatPanel .messages { --measure: none; }
  body:not(.focus-ui) #chatPanel > .command-strip { justify-content: flex-start; gap: 4px; padding: 6px max(22px, calc((100% - 1120px) / 2)) 0; border: 0; background: transparent; }
  body:not(.focus-ui) #chatPanel > .command-strip button { min-height: 26px; height: 26px; padding: 0 10px; border: 0; background: transparent; box-shadow: inset 0 0 0 1px var(--line); color: var(--muted); font: 600 12px/26px var(--sans); }
  body:not(.focus-ui) #chatPanel > .command-strip button:hover { color: var(--text); box-shadow: inset 0 0 0 1px var(--line-strong); }
  body:not(.focus-ui) #chatPanel > .composer { padding: 6px max(22px, calc((100% - 1120px) / 2)) 20px; border: 0; background: transparent; }
  body:not(.focus-ui) #chatPanel .composer-row { max-width: none; }
  /* The / and @ suggestions float over the end of the thread. In the flow they took up to 320 px from the transcript on
     the first key and gave it back on the next, so the conversation jumped while typing. */
  body:not(.focus-ui) #chatPanel > .composer { position: relative; }
  body:not(.focus-ui) #chatPanel > .composer > .command-autocomplete {
    position: absolute; z-index: 8; bottom: 100%; left: max(22px, calc((100% - 1120px) / 2)); right: max(22px, calc((100% - 1120px) / 2));
    width: auto; max-width: none; max-height: min(320px, 42dvh); margin: 0; border: 0; border-radius: 14px; box-shadow: 0 0 0 1px var(--line), var(--shadow);
  }

  /* ---------- the details column ---------- */
  body:not(.focus-ui) #chatPanel > .messages-wrap > #activityPanel {
    grid-area: details; position: relative; flex: none;
    width: clamp(280px, var(--activity-preferred-width, clamp(300px, 24vw, 360px)), 42vw);
    /* Larger text (the conversation's and the column's own size) must not squeeze the conversation: the column never
       takes more than about a third of the window, whatever the zoom. */
    max-width: calc(36vw / var(--ui-zoom-chat, 1) / var(--ui-zoom-activity, 1));
    border: 0; border-radius: var(--ws-card-radius); background: var(--panel); box-shadow: var(--shadow-soft); overflow: hidden;
  }
  /* Narrow windows, or beside the Browser: it floats over the thread, between the header and the message box, so
     Mark done, ⋯ and the composer stay in reach. */
  body:not(.focus-ui) #chatPanel > .messages-wrap.activity-floating > #activityPanel,
  body:not(.focus-ui) #chatPanel:has(> .messages-wrap.activity-floating) > .messages-wrap > #activityPanel {
    grid-area: msgs; position: absolute; z-index: 6; inset: 0 0 0 auto; width: min(92%, var(--activity-preferred-width, 360px)); max-width: none; box-shadow: var(--shadow);
  }
  /* The column's controls are drawn from the theme's ink over its panel, so every theme gives them the same contrast
     (measured, test/ui/ui-workspace-layout.test.ts): labels at least 7:1 on their fill, the outlines of the segments'
     track, the lit segment and the buttons at least 3:1 against what is around them. */
  body:not(.focus-ui) #activityPanel {
    --ctl-fill: color-mix(in srgb, var(--text) 8%, var(--panel));
    --ctl-fill-hover: color-mix(in srgb, var(--text) 15%, var(--panel));
    --ctl-edge: color-mix(in srgb, var(--text) 56%, var(--panel));
    --ctl-ink: color-mix(in srgb, var(--text) 88%, var(--panel));
    --ctl-on: color-mix(in srgb, var(--accent) 20%, var(--panel));
  }
  /* Light ink on a dark panel reaches the same contrast with less of it. */
  :root[data-theme="dark"] body:not(.focus-ui) #activityPanel { --ctl-edge: color-mix(in srgb, var(--text) 42%, var(--panel)); }
  /* First line: the segments. Second line: Browser, Terminal, Share, Schedule. */
  body:not(.focus-ui) #activityPanel > .activity-panel-header { flex-wrap: wrap; gap: 8px 6px; padding: 16px 14px 10px 16px; border-bottom: 1px solid var(--line); }
  body:not(.focus-ui) #activityPanel .activity-tabs { flex: 1; display: flex; gap: 2px; min-width: 0; padding: 3px; border-radius: 12px; background: var(--ctl-fill); box-shadow: inset 0 0 0 1px var(--ctl-edge); }
  body:not(.focus-ui) #activityPanel .activity-tabs > button {
    display: flex; flex: 1 1 auto; align-items: center; justify-content: center; gap: 4px; min-width: 0; min-height: 30px; height: 30px; padding: 0 4px;
    border: 0; border-radius: 9px; background: transparent; color: var(--ctl-ink); font-size: 12.5px; font-weight: 600; white-space: nowrap;
  }
  body:not(.focus-ui) #activityPanel .activity-tabs > button > svg { display: none; }
  body:not(.focus-ui) #activityPanel .activity-tabs > button > span { display: inline; }
  body:not(.focus-ui) #activityPanel .activity-tabs > button:hover:not([aria-selected="true"]) { background: var(--ctl-fill-hover); color: var(--text); }
  /* The selected segment gets the accent's tint and outline. */
  body:not(.focus-ui) #activityPanel .activity-tabs > button[aria-selected="true"] {
    border: 0; background: var(--ctl-on); box-shadow: inset 0 0 0 1.5px var(--accent); color: var(--text); font-weight: 700;
  }
  body:not(.focus-ui) #activityPanel .ws-seg-count { color: inherit; font-size: 11px; font-weight: 700; }
  body:not(.focus-ui) #activityPanel .ws-seg-count[hidden] { display: none; }
  body:not(.focus-ui) #activityPanel .activity-modes { display: none; }
  /* No collapse arrow: the conversation's header toggle (#activityToggleButton) opens and closes the panel. The phone's focus UI keeps it. */
  body:not(.focus-ui) #activityPanel .activity-panel-close { display: none; }
  body:not(.focus-ui) #activityPanel > .activity-panel-header { container: details-head / inline-size; }
  /* The quiet buttons inside the cards (View, Edit, Update summary, the summary's model, Add to knowledge, Dismiss). */
  body:not(.focus-ui) #activityPanel :is(.activity-summary-actions, .activity-instructions-actions, .activity-rule-actions) > button {
    min-height: 28px; padding: 2px 10px; border: 0; border-radius: 8px; background: var(--ctl-fill); box-shadow: inset 0 0 0 1px var(--ctl-edge); color: var(--text);
  }
  body:not(.focus-ui) #activityPanel :is(.activity-summary-actions, .activity-instructions-actions, .activity-rule-actions) > button:hover:not(:disabled) { background: var(--ctl-fill-hover); }
  body:not(.focus-ui) #activityPanel .activity-rule-actions > button:not(.ghost) { background: var(--btn-bg); box-shadow: none; color: var(--btn-fg); }
  body:not(.focus-ui) #activityPanel :is(.activity-summary-actions, .activity-instructions-actions) { gap: 6px; margin-left: 0; }
  body:not(.focus-ui) #activityPanel > :is(.activity-body, .conversation-chat, .ws-pane) { flex: 1 1 0; min-height: 0; }
  body:not(.focus-ui) #activityPanel .ws-pane:not([hidden]) { display: flex; flex-direction: column; gap: 10px; overflow: hidden; padding: 8px 14px 12px; }
  .ws-pane-head { display: flex; align-items: center; gap: 8px; flex: none; }
  .ws-pane-head h3 { flex: none; margin: 0; font: 400 16px/1.2 var(--serif); color: var(--heading); white-space: nowrap; }
  .ws-pane-head small { min-width: 0; margin-left: auto; color: var(--muted); font-size: 12px; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .ws-pane-note { margin: 0; color: var(--muted); font-size: 12.5px; line-height: 1.45; }

  /* Unified Activity Monitor: live status tiles + inline running tasks card. */
  body:not(.focus-ui) #activityPanel .ws-monitor-strip {
    display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; padding: 10px 14px 0; flex: none;
  }
  .ws-stat-tile {
    padding: 7px 8px; border-radius: 11px; background: var(--field); box-shadow: inset 0 0 0 1px var(--line);
    display: flex; flex-direction: column; gap: 1px; min-width: 0;
  }
  .ws-stat-tile b { font-size: 14px; font-weight: 700; color: var(--heading); font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .ws-stat-tile b.is-live { color: var(--live); }
  .ws-stat-tile b.is-failed { color: var(--danger); }
  .ws-stat-tile span { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

  body:not(.focus-ui) #activityPanel .ws-tasks-card {
    display: flex; flex-direction: column; margin: 8px 14px 2px; border-radius: 12px;
    background: var(--field); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; flex: none;
  }
  .ws-card-head { display: flex; align-items: center; gap: 8px; padding: 8px 11px; border-bottom: 1px solid var(--line); }
  .ws-tasks-card:has(> .ws-tasks-list[hidden]) > .ws-card-head { border-bottom: 0; }
  .ws-card-title { font: 400 13.5px/1.2 var(--serif); color: var(--heading); white-space: nowrap; }
  .ws-card-head-actions { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; }
  .ws-card-head-actions > button {
    display: inline-flex !important; align-items: center; gap: 5px; width: auto !important; min-width: 0 !important;
    min-height: 26px !important; height: 26px; padding: 0 9px !important;
    border: 0; border-radius: 8px; background: var(--ctl-fill) !important; box-shadow: inset 0 0 0 1px var(--ctl-edge) !important;
    color: var(--text); font-size: 11.5px; font-weight: 600; line-height: normal !important;
  }
  .ws-card-head-actions > button svg { width: 13px; height: 13px; }
  .ws-card-head-actions .background-tasks-label { display: inline !important; }
  .ws-card-head-actions .background-tasks-badge { position: static !important; }
  .ws-card-head-actions .shortcut-hint { display: none !important; }
  .ws-card-link { margin-left: auto; border: 0; background: transparent; color: var(--accent); font-size: 12px; font-weight: 600; padding: 0; white-space: nowrap; }
  .ws-card-link:hover { text-decoration: underline; }
  .ws-tasks-list { display: flex; flex-direction: column; }
  .ws-tasks-list[hidden] { display: none; }
  .ws-task-row { padding: 8px 11px; display: flex; flex-direction: column; gap: 4px; border-top: 1px solid var(--line); }
  .ws-task-row:first-child { border-top: 0; }
  .ws-task-cmd { font: 500 12px var(--mono); color: var(--text); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

  /* Shared inline cards, badges, sub-tabs, diffs and logs for Git & Story. */
  .ws-card { background: var(--field); border-radius: 12px; box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; flex: none; }
  .ws-card-rows { display: flex; flex-direction: column; }
  .ws-card-empty { margin: 0; padding: 10px 12px; color: var(--muted); font-size: 12.5px; line-height: 1.45; }
  .ws-badge {
    display: inline-flex; align-items: center; gap: 4px; padding: 2px 7px; border-radius: 999px;
    font-size: 11px; font-weight: 700; white-space: nowrap;
  }
  .ws-badge.is-live { background: color-mix(in srgb, var(--live) 16%, transparent); color: var(--live); }
  .ws-badge.is-amber { background: color-mix(in srgb, var(--amber) 17%, transparent); color: var(--amber); }
  .ws-badge.is-danger { background: color-mix(in srgb, var(--danger) 17%, transparent); color: var(--danger); }
  .ws-badge.is-indigo { background: color-mix(in srgb, var(--ws-rev) 18%, transparent); color: var(--ws-rev); }
  .ws-badge.is-muted { background: var(--paper-raised); color: var(--muted); }
  .ws-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; flex: none; }
  .ws-dot.is-live { background: var(--live); }
  .ws-dot.is-amber { background: var(--amber); }
  .ws-dot.is-danger { background: var(--danger); }
  .ws-dot.is-muted { background: var(--muted); }

  .ws-btn-sm {
    display: inline-flex; align-items: center; justify-content: center; gap: 5px;
    min-height: 26px; height: 26px; padding: 0 9px; border: 0; border-radius: 8px;
    background: var(--ctl-fill); box-shadow: inset 0 0 0 1px var(--ctl-edge);
    color: var(--text); font-size: 11.5px; font-weight: 600; white-space: nowrap; text-decoration: none;
  }
  .ws-btn-sm:hover:not(:disabled) { background: var(--ctl-fill-hover); }
  .ws-btn-sm.is-primary { background: var(--btn-bg); box-shadow: none; color: var(--btn-fg); }
  .ws-btn-sm.is-primary:hover:not(:disabled) { background: var(--btn-bg-hover); }
  .ws-btn-sm.is-danger { color: var(--danger); }

  .ws-git-branch-bar {
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap; flex: none;
    padding: 7px 10px; border-radius: 11px; background: var(--field); box-shadow: inset 0 0 0 1px var(--line);
  }
  .ws-git-branch { display: flex; align-items: baseline; gap: 6px; min-width: 0; flex: 1 1 auto; font-size: 12.5px; }
  .ws-git-branch:empty { display: none; }
  .ws-git-branch b { font: 600 12.5px var(--mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .ws-git-branch small { color: var(--muted); font-size: 11.5px; white-space: nowrap; }
  .ws-git-branch-right { margin-left: auto; display: inline-flex; align-items: center; gap: 5px; flex: none; }

  .ws-subtabs {
    flex: none; display: flex; align-items: center; gap: 2px; overflow-x: auto; padding-bottom: 2px;
    border-bottom: 1px solid var(--line); scrollbar-width: none;
  }
  .ws-subtab {
    flex: none; border: 0; background: transparent; color: var(--muted);
    padding: 5px 8px 7px; font-size: 12px; font-weight: 600; position: relative;
    display: inline-flex; align-items: center; gap: 4px; white-space: nowrap;
  }
  .ws-subtab:hover { color: var(--text); }
  .ws-subtab[aria-selected="true"] { color: var(--text); }
  .ws-subtab[aria-selected="true"]::after {
    content: ""; position: absolute; left: 6px; right: 6px; bottom: 0; height: 2px;
    border-radius: 2px; background: var(--accent);
  }
  .ws-subtab-count {
    font-size: 10.5px; font-weight: 700; padding: 1px 5px; border-radius: 999px;
    background: var(--paper-raised); color: var(--muted);
  }
  .ws-subtab[aria-selected="true"] .ws-subtab-count { background: var(--ctl-on); color: var(--accent); }
  .ws-subtab-count[hidden] { display: none; }

  .ws-git-content, .ws-story-host {
    flex: 1 1 0; min-height: 0; overflow: hidden auto;
    display: flex; flex-direction: column; gap: 10px; padding-bottom: 8px;
  }
  .ws-git-content > *, .ws-story-host > * { flex: none; }

  .ws-git-row-wrap + .ws-git-row-wrap { border-top: 1px solid var(--line); }
  .ws-git-row {
    width: 100%; border: 0; background: transparent; color: var(--text); text-align: left;
    padding: 8px 11px; display: flex; flex-direction: column; gap: 3px; border-radius: 0;
  }
  button.ws-git-row:hover, button.ws-git-row.is-open { background: color-mix(in srgb, var(--field) 55%, var(--paper-raised)); }
  .ws-git-row-top { display: flex; align-items: center; gap: 7px; min-width: 0; }
  .ws-git-row-title { font-size: 12.5px; font-weight: 600; color: var(--text); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .ws-git-row-sub { font-size: 11.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

  .ws-inline-detail {
    border-top: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 52%, var(--panel));
    padding: 9px 11px; display: flex; flex-direction: column; gap: 7px; font-size: 12px;
  }
  .ws-inline-toolbar { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
  .ws-inline-path { font: 500 11px var(--mono); color: var(--muted); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .ws-code-block {
    margin: 0; padding: 8px 9px; border-radius: 9px; background: var(--bg);
    box-shadow: inset 0 0 0 1px var(--line); font: 11px/1.5 var(--mono);
    overflow-x: auto; max-height: 280px; overflow-y: auto; white-space: pre-wrap; word-break: break-word;
  }
  .ws-code-line { display: block; padding: 0 3px; }
  .ws-code-line.is-add { background: color-mix(in srgb, var(--live) 16%, transparent); color: var(--live); }
  .ws-code-line.is-del, .ws-code-line.is-err { background: color-mix(in srgb, var(--danger) 16%, transparent); color: var(--danger); }
  .ws-code-line.is-hunk { color: var(--ws-rev); }

  .ws-job-pills { display: flex; flex-wrap: wrap; gap: 5px; }
  .ws-job-pill {
    display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 8px;
    border: 0; background: var(--field); box-shadow: inset 0 0 0 1px var(--line-strong);
    color: var(--text); font-size: 11.5px; font-weight: 500;
  }
  .ws-job-pill.is-danger { color: var(--danger); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--danger) 45%, transparent); }
  .ws-job-pill.is-amber { color: var(--amber); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--amber) 45%, transparent); }

  .ws-filter-bar { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 7px 10px; border-bottom: 1px solid var(--line); }
  .ws-filter-bar-plain { padding: 0; border-bottom: 0; }
  .ws-scope-pills { display: inline-flex; padding: 2px; border-radius: 9px; background: var(--bg); box-shadow: inset 0 0 0 1px var(--line); }
  .ws-scope-pill { border: 0; background: transparent; color: var(--muted); padding: 3px 8px; border-radius: 7px; font-size: 11.5px; font-weight: 600; }
  .ws-scope-pill[aria-pressed="true"] { background: var(--field); color: var(--text); }
  .ws-search-mini {
    flex: 1 1 110px; min-width: 90px; height: 26px; padding: 0 8px; border-radius: 8px;
    border: 1px solid var(--line-strong); background: var(--bg); color: var(--text); font-size: 12px;
  }

  /* Inline top-level Story styling. */
  .ws-story-section { display: flex; flex-direction: column; gap: 10px; }
  .ws-story-hero {
    padding: 12px 13px; border-radius: 12px; background: var(--field); box-shadow: inset 0 0 0 1px var(--line);
    display: flex; flex-direction: column; gap: 7px;
  }
  .ws-story-hero h4 { margin: 0; font: 400 15.5px/1.25 var(--serif); color: var(--heading); }
  .ws-story-hero p { margin: 0; font-size: 12.5px; color: var(--muted); line-height: 1.5; }
  .ws-story-why strong { color: var(--text); }
  .ws-story-bullets { margin: 0; padding-left: 18px; font-size: 12.5px; color: var(--muted); display: flex; flex-direction: column; gap: 4px; }
  .ws-story-diagram {
    padding: 10px 11px; border-radius: 12px; background: var(--bg); box-shadow: inset 0 0 0 1px var(--line);
    display: flex; flex-direction: column; gap: 6px;
  }
  .ws-story-diagram-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
  .ws-flow-node {
    display: flex; align-items: center; gap: 8px; padding: 7px 9px; border-radius: 9px;
    background: var(--field); box-shadow: inset 0 0 0 1px var(--line-strong); font-size: 12px;
  }
  .ws-flow-node.is-decision { box-shadow: inset 0 0 0 1px var(--accent); }
  .ws-flow-node b { color: var(--heading); font-weight: 600; }
  .ws-flow-node small { margin-left: auto; color: var(--muted); font-family: var(--mono); font-size: 11px; }
  .ws-flow-arrow { text-align: center; color: var(--accent); font-size: 11.5px; line-height: 1.1; }
  .ws-story-podcast-bar { padding: 9px 11px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
  .ws-story-pivot { color: var(--amber); }

  .ws-pane-actions { display: flex; flex-wrap: wrap; gap: 6px; }
  .ws-pane-actions > button {
    display: inline-flex !important; align-items: center; gap: 5px; width: auto !important; min-width: 0 !important;
    min-height: 26px !important; height: 26px; padding: 0 9px !important;
    border: 0; border-radius: 8px; background: var(--ctl-fill) !important; box-shadow: inset 0 0 0 1px var(--ctl-edge) !important;
    color: var(--text); font-size: 12px; font-weight: 600; line-height: normal !important;
  }
  .ws-pane-actions > button svg { width: 14px; height: 14px; }
  .ws-pane-actions :is(.chat-action-label, .background-tasks-label, span) { display: inline !important; }
  .ws-pane-actions .shortcut-hint { display: none !important; }
  #detailsGitActions .chat-action-label::after { content: " dialog"; }
  #detailsStoryActions button > span::before { content: "Full "; }

  /* The two "when it stops" switches: the first section of Activity. */
  body:not(.focus-ui) #activityPanel .activity-when-stops { display: block; }
  .ws-switches { overflow: hidden; border-radius: 14px; background: var(--field); }
  .ws-switch-row { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 44px; padding: 0 14px; border: 0; border-radius: 0; background: transparent; color: var(--text); font-size: 13.5px; font-weight: 500; text-align: left; }
  .ws-switch-row + .ws-switch-row { box-shadow: inset 0 1px 0 var(--line); }
  .ws-switch-row > span { min-width: 0; flex: 1; }
  .ws-switch-row:disabled { opacity: 0.5; }
  /* Off: an outlined track with an ink knob; on: the accent with the panel's colour for the knob. Both read in every theme. */
  .ws-switch { position: relative; flex: none; width: 40px; height: 24px; border-radius: 12px; background: var(--ctl-fill, var(--paper-raised)); box-shadow: inset 0 0 0 1.5px var(--ctl-edge, var(--line-strong)); transition: background 0.2s; }
  .ws-switch::after { content: ""; position: absolute; top: 4px; left: 4px; width: 16px; height: 16px; border-radius: 50%; background: var(--ctl-edge, var(--muted)); transition: left 0.2s, background 0.2s; }
  .ws-switch-row[aria-checked="true"] .ws-switch { background: var(--accent); box-shadow: none; }
  .ws-switch-row[aria-checked="true"] .ws-switch::after { left: 20px; background: var(--panel); }

  /* Large text on a window that is not wide enough for both: the details float over the thread, as below 1024 px, so
     the conversation keeps a readable width (app/workspace.js sets the class). */
  body:not(.focus-ui).ws-details-float #chatPanel:has(> .messages-wrap > #activityPanel:not([hidden])):not(:has(> .messages-wrap.activity-floating)) {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "popup" "head" "lease" "msgs" "reconnect" "routing" "strip" "lock" "done" "login" "composer";
  }
  body:not(.focus-ui).ws-details-tucked #chatPanel > .messages-wrap > #activityPanel { display: none; }
  body:not(.focus-ui).ws-details-tucked .ws-head-actions #activityToggleButton.active { background: transparent; color: var(--muted); }
  body:not(.focus-ui).ws-details-float #chatPanel > .messages-wrap > #activityPanel {
    grid-area: msgs; position: absolute; z-index: 6; inset: 0 8px 0 auto; width: min(92%, var(--activity-preferred-width, 360px)); max-width: none; box-shadow: var(--shadow);
  }

  /* Below 1200 px the column is at its narrowest width: New keeps its icon so the name fits beside it. */
  @media (max-width: 1199px) {
    .ws-new-button { width: 32px; padding: 0; justify-content: center; font-size: 0; }
    .ws-new-button svg { width: 17px; height: 17px; }
  }
  /* While the column is narrow (under about 250 px) the search box keeps its words, not the key. */
  @media (max-width: 1320px) {
    .ws-search-key { display: none; }
  }

  /* ---------- 701–1023 px: a narrower column; the details float over the conversation ---------- */
  @media (max-width: 1023px) {
    :root { --ws-side-width: 232px; --ws-gap: 10px; }
    body:not(.focus-ui) #chatPanel > .chat-topbar { padding: 18px 16px 0 20px; }
    body:not(.focus-ui) #chatPanel .chat-project-name { display: none; }
    body:not(.focus-ui) .ws-head-actions :is(#chatDoneButton, #chatMarkReviewedButton) .chat-action-label { display: none; }
    body:not(.focus-ui) .ws-head-actions :is(#chatDoneButton, #chatMarkReviewedButton) { width: 34px; padding: 0; justify-content: center; }
    body:not(.focus-ui) .ws-head-actions #activityOverviewButton > span { display: none; }
    body:not(.focus-ui) .ws-head-actions #activityOverviewButton { width: 34px; padding: 0; justify-content: center; }
    body:not(.focus-ui) .ws-group-page { padding: 22px 20px 14px; }
    .ws-name { font-size: 17px; }
    .ws-new-button { width: 32px; padding: 0; justify-content: center; font-size: 0; }
    .ws-new-button svg { width: 17px; height: 17px; }
    /* The details float over the thread, as the activity pane did on a narrow window; the header and the message box
       stay in reach. */
    body:not(.focus-ui) #chatPanel:has(> .messages-wrap > #activityPanel:not([hidden])):not(:has(> .messages-wrap.activity-floating)) {
      grid-template-columns: minmax(0, 1fr);
      grid-template-areas: "popup" "head" "lease" "msgs" "reconnect" "routing" "strip" "lock" "done" "login" "composer";
    }
    body:not(.focus-ui) #chatPanel > .messages-wrap > #activityPanel {
      grid-area: msgs; position: absolute; z-index: 6; inset: 0 8px 0 auto; width: min(92%, var(--activity-preferred-width, 360px)); max-width: none; box-shadow: var(--shadow);
    }
    /* The control center keeps its own narrow layout (control-phone.js) inside the middle. */
    body:not(.focus-ui).view-control .shell > #controlCenterPanel { position: relative; }
  }
}

/* The end of a long list that draws in chunks (app/long-scroll.js): a line the scroll box watches, whatever list it is in. */
.long-scroll-sentinel { display: block !important; height: 1px; flex: none; margin: 0 !important; padding: 0 !important; pointer-events: none; }

/* ---------- the Inbox's filters and Select (app/inbox-filters.js): the phone's Home and the Show all page ---------- */
/* The column's project filter: one quiet box above the list (hidden with the list, in Projects and on the rail). */
.inbox-column-filter { margin: 6px 0 0; }
.inbox-column-filter .multi-select-trigger { width: 100%; min-height: 32px; padding: 0 10px; border-radius: 10px; font: 550 12.5px var(--sans); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body:is(.ws-column-projects, .projects-collapsed, .ws-auto-rail, .focus-ui) .inbox-column-filter { display: none; }
.inbox-tools { display: grid; gap: 8px; margin: 0 0 8px; }
.ws-group-page > .inbox-tools { margin-inline: auto; }
.inbox-search { box-sizing: border-box; width: 100%; min-width: 0; min-height: 44px; padding: 0 14px; border-radius: 12px; font: 400 14px var(--sans); }
.inbox-tools.phone-only { display: none; }
body.focus-ui.view-projects.ws-column-inbox .inbox-tools.phone-only { display: grid; padding: 0 12px 6px; }
.inbox-tools-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.inbox-tools-filters .multi-select { flex: 1 1 140px; min-width: 0; }
.inbox-tools-filters .multi-select-trigger, .inbox-range, .inbox-select-toggle, .inbox-bar-button { min-height: 44px; border-radius: 12px; font: 600 14px var(--sans); }
.inbox-tools-filters .multi-select-trigger { width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inbox-range { flex: 1 1 150px; min-width: 0; padding: 0 10px; }
.inbox-select-toggle[aria-pressed="true"] { background: var(--ink); color: var(--on-ink); }
.inbox-tools-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 6px 4px; }
.inbox-tools-bar[hidden] { display: none; }
.inbox-bar-count { flex: 1 1 auto; color: var(--muted); font: 600 14px var(--sans); }
.inbox-bar-button.danger:not(:disabled) { color: var(--danger); }
.inbox-bar-button:disabled { opacity: 0.45; }
.ws-check { flex: none; width: 20px; height: 20px; margin-top: 4px; border: 2px solid var(--line-strong); border-radius: 6px; box-sizing: border-box; }
.ws-row.picked { background: color-mix(in srgb, var(--accent) 14%, transparent); }
.ws-row.picked .ws-check { border-color: var(--accent); background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 10.5 3.5 3.5L15 6.5'/%3E%3C/svg%3E") center / 100% no-repeat; }

/* An assistant team's folder in the Inbox: its conversations are opened from here, not mixed into the groups. */
.ws-folder b::before { content: "▸ "; color: var(--muted, currentColor); }

/* ---------- what the control center's board did, now in the column (app/inbox-system.js, workspace.js) ---------- */
/* System messages: one coloured line under the places; it opens each message with what it means and how to fix it. */
.inbox-system { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.inbox-system[hidden] { display: none; }
.inbox-system-line {
  display: flex; align-items: center; gap: 8px; width: 100%; min-width: 0; min-height: 0; padding: 7px 10px; border: 0; border-radius: 10px;
  background: var(--sys-soft); box-shadow: inset 3px 0 0 var(--sys); color: var(--text); font: 600 13px/1.25 var(--sans); text-align: left; cursor: pointer;
}
.inbox-system-line.warn { --sys: var(--warn); }
.inbox-system-line:hover { background: color-mix(in srgb, var(--sys) 24%, transparent); }
.inbox-system-line b { flex: 1; min-width: 0; overflow: hidden; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.inbox-system-line .control-sys-icon { width: 20px; height: 20px; font-size: 12px; }
/* The words stay in the text colour (readable on the tint in every theme); the edge and the tint carry the red. */
.inbox-system-fix { flex: none; color: var(--heading); font-size: 12px; font-weight: 700; }
.inbox-system-line .control-sys-icon { color: var(--heading); }
.inbox-system-dialog { width: min(640px, calc(100vw - 32px)); max-height: calc(100vh - 64px); padding: 22px 26px 24px; border: 0; border-radius: 22px; background: var(--panel); color: var(--text); box-shadow: var(--shadow); overflow: auto; }
.inbox-system-dialog::backdrop { background: rgb(0 0 0 / 40%); }
.inbox-system-close { float: right; }
.inbox-system-body { display: flex; flex-direction: column; gap: 22px; }
.inbox-system-message { display: flex; flex-direction: column; gap: 14px; }
.inbox-system-message + .inbox-system-message { padding-top: 22px; border-top: 1px solid var(--line-strong); }
.inbox-system-body .control-list-pv-top { display: flex; align-items: center; gap: 10px; }
.inbox-system-body .control-list-heading { margin: 0; color: var(--heading); font: 400 24px/1.2 var(--serif); }
.inbox-system-body .control-list-meta { margin: 0; color: var(--muted); font-size: 13px; }
.inbox-system-body .control-list-section h4 { margin: 0 0 8px; color: var(--heading); font: 400 17px var(--serif); }
.inbox-system-body .control-sys-pill.system { display: none; }
/* The rail of icons has no room for words. */
body:is(.projects-collapsed, .ws-auto-rail) :is(.inbox-system, .ws-side > .control-moves-job) { display: none; }

/* Wrap whole controls onto the next line rather than wrapping labels into the first row. */
body:not(.focus-ui) .ws-state-heading {
  flex-wrap: wrap; align-items: center; gap: 2px 8px; height: auto; min-height: 32px; padding: 4px 10px;
}
.ws-section-toggle {
  display: inline-flex; flex: 0 0 auto; align-items: center; gap: 5px; padding: 4px 0; min-height: 24px;
  border: 0; border-radius: 4px; background: none; color: inherit; font: 600 12px/1.2 var(--sans); white-space: nowrap;
}
.ws-section-toggle i { color: var(--muted); font-style: normal; }
.ws-section-toggle::before {
  content: ""; width: 5px; height: 5px; border: solid var(--muted); border-width: 0 1px 1px 0;
  transform: rotate(-45deg);
}
.ws-section-toggle[aria-expanded="true"]::before { transform: translateY(-1px) rotate(45deg); }
.ws-section-toggle:hover > span { text-decoration: underline; }
.ws-state-heading .ws-show-all { flex: 0 0 auto; white-space: nowrap; }

/* Needs you's label counts what was snoozed; the "Show all" page puts Snooze and Wake beside the rows. */
.ws-snoozed-link { color: var(--muted); }
.ws-snoozed-link + .ws-show-all { margin-left: 0; }
.ws-page-item { display: flex; align-items: center; gap: 8px; }
.ws-page-item > .ws-row { flex: 1; min-width: 0; }
.ws-page-action { flex: none; }
.ws-page-reply { min-height: 44px; padding-inline: 12px; }
/* The sheet's body has `flex: 1` (a zero basis) and the dialog is as tall as its content, so without this the messages shrank to a sliver. */
.need-sheet-body.inbox-reply-history { flex: 1 1 auto; min-height: 120px; }
.inbox-reply-input { width: 100%; font-size: 16px; resize: none; }
.inbox-reply-actions { justify-content: space-between; }
.inbox-reply-error { color: var(--danger); }

/* Costs as a page beside the left column (app/usage-dashboard.js): the dialog opens without blocking the page and fills the middle. */
@media (min-width: 701px) {
  body.costs-page:not(.focus-ui) #usageDialog[open] {
    position: fixed; inset: var(--ws-gap, 14px) var(--ws-gap, 14px) var(--ws-gap, 14px) calc(var(--costs-left, 300px) + var(--ws-gap, 14px));
    z-index: 30; width: auto; height: auto; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; overflow: hidden;
    border-radius: var(--ws-card-radius, 24px); box-shadow: var(--shadow-soft);
  }
  body.costs-page:not(.focus-ui) #usageDialog[open] > .usage-card { width: 100%; height: 100%; max-height: none; }
  /* The page is Costs: the column lights it, not the control center's view under it. */
  body.costs-page:not(.focus-ui) .ws-places > #controlTabs .control-tab.active { background: transparent; color: var(--muted); }
}

/* The Inbox's own groups and rows: Scheduled and Done, row tags and menu, the grouping bar, project sections and folders. */
.ws-dot.sch { background: none; box-shadow: inset 0 0 0 1.6px var(--ws-rev); }
.ws-dot.done { background: color-mix(in srgb, var(--muted) 55%, transparent); }
.ws-tags { display: inline-flex; flex: none; gap: 4px; align-items: center; max-width: 55%; overflow: hidden; }
.ws-tag { max-width: 110px; overflow: hidden; padding: 0 6px; border-radius: 6px; background: color-mix(in srgb, var(--tag, var(--muted)) 16%, transparent); color: var(--tag, var(--muted)); font: 700 10.5px/17px var(--sans); font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
.ws-row { position: relative; }
/* Keep the menu anchor measurable after the pointer leaves the row for the popover. */
.ws-row-more { display: grid; visibility: hidden; position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; place-items: center; border-radius: 8px; background: var(--paper-raised, var(--field)); color: var(--text); font-size: 15px; line-height: 1; cursor: pointer; }
.ws-row:hover .ws-row-more, .ws-row:focus-visible .ws-row-more, .ws-row.sel .ws-row-more { visibility: visible; }
.ws-row:hover .ws-row-top time, .ws-row.sel .ws-row-top time { visibility: hidden; }
@media (pointer: coarse) { body:not(.focus-ui) .ws-row-more { visibility: visible; } }
body.focus-ui .ws-row-more { visibility: visible; top: 0; right: 0; width: 44px; height: 44px; border-radius: 12px; background: none; font-size: 20px; }
body.focus-ui .ws-row:hover .ws-row-top time, body.focus-ui .ws-row.sel .ws-row-top time { visibility: visible; }
body.focus-ui .ws-row-top { padding-right: 36px; }
@media (min-width: 701px) {
  #workspaceGroups .ws-row-more { position: static; flex: none; visibility: visible; background: none; }
  #workspaceGroups .ws-row-top time { visibility: visible; }
  .ws-side:has(.inbox-select-toggle[aria-pressed="true"]) > :is(.ws-places, .team-sidebar-section) { display: none; }
  .ws-column-tools .inbox-automation-toggle { flex: 1 0 60%; }
  .ws-column-tools .inbox-tools-bar { flex-basis: 100%; }
  .ws-column-tools :is(.inbox-select-toggle, .inbox-bar-button) { min-height: 30px; padding: 4px 8px; font-size: 12px; }
}
.ws-row.ws-kid { margin-left: calc(var(--kid, 1) * 16px); width: calc(100% - var(--kid, 1) * 16px); }
.ws-kids { cursor: pointer; color: var(--text); }
body:is(.ws-column-projects, .projects-collapsed, .ws-auto-rail, .focus-ui) .ws-column-tools { display: none; }
.ws-column-tools { display: flex; align-items: center; gap: 6px; }
.ws-column-tools .inbox-column-filter { flex: 1; min-width: 0; margin: 0; }
.ws-mode { flex: none; display: flex; gap: 1px; margin: 0; padding: 2px; border-radius: 11px; background: var(--field); }
.ws-mode button { min-height: 28px; padding: 0 7px; border: 0; border-radius: 8px; background: none; color: var(--muted); font: 600 12px var(--sans); }
.ws-mode button[aria-pressed="true"] { background: var(--panel); color: var(--heading, var(--text)); box-shadow: var(--shadow-soft); }
.ws-project-head { gap: 8px; }
.ws-project-name, .ws-folder-name { min-width: 0; padding: 0; border: 0; background: none; color: var(--text); font: 700 13.5px var(--sans); text-align: left; text-overflow: ellipsis; overflow: hidden; white-space: nowrap; cursor: pointer; }
.ws-project-name:hover, .ws-folder-name:hover { text-decoration: underline; }
.ws-project-tool { flex: none; min-width: 24px; height: 24px; padding: 0; border: 0; border-radius: 8px; background: none; color: var(--muted); font-size: 15px; cursor: pointer; }
.ws-project-tool:hover { background: var(--field); color: var(--text); }
.ws-project-head .ws-pills { margin-left: auto; }
.ws-pills { display: inline-flex; gap: 3px; flex: none; }
.ws-pill { min-width: 18px; padding: 0 6px; border-radius: 999px; background: color-mix(in srgb, var(--c, var(--muted)) 16%, transparent); color: var(--c, var(--muted)); font: 700 11px/18px var(--sans); font-style: normal; text-align: center; }
.ws-pill.needs-you { --c: var(--ws-need); }
.ws-pill.running { --c: var(--ws-run); }
.ws-pill.review { --c: var(--ws-rev); }
.ws-folder-row { display: flex; align-items: center; gap: 6px; min-height: 30px; padding: 0 4px 0 calc(4px + var(--depth, 0) * 16px); border-radius: 10px; }
.ws-folder-row:hover { background: color-mix(in srgb, var(--paper-raised, var(--field)) 55%, transparent); }
.ws-folder-row.over { background: color-mix(in srgb, var(--accent) 14%, transparent); box-shadow: inset 0 0 0 1.5px var(--accent); }
.ws-folder-name { flex: 1; font-weight: 650; }
.ws-folder-chevron { width: 18px; flex: none; padding: 0; border: 0; background: none; color: var(--muted); font-size: 12px; cursor: pointer; }
.ws-folder-count { flex: none; color: var(--muted); font-size: 12px; font-style: normal; }
.ws-folder-item { padding-left: calc(10px + var(--depth, 1) * 16px); }
.ws-folder-more { margin: 2px 0 4px calc(10px + var(--depth, 1) * 16px); }
/* On the phone every control is a 44 px target and no text is under 13 px. */
body.focus-ui .ws-mode { margin: 0 0 8px; }
body.focus-ui .ws-mode button { min-height: 44px; padding: 0 12px; font-size: 14px; }
body.focus-ui .ws-tag { font-size: 13px; line-height: 20px; }
body.focus-ui .ws-kids { display: inline-grid; place-items: center; min-width: 44px; min-height: 44px; }
body.focus-ui .ws-project-tool, body.focus-ui .ws-folder-chevron { min-width: 44px; min-height: 44px; }
body.focus-ui .ws-project-name, body.focus-ui .ws-folder-name { min-height: 44px; font-size: 15px; }
body.focus-ui .ws-pill, body.focus-ui .ws-folder-count { font-size: 13px; }
body.focus-ui .ws-folder-row { min-height: 44px; }
/* The column's project filter sits beside the grouping switch, so its box is narrow: the list opens wider, to the left, one line per project. */
.inbox-column-filter .searchable-select-popover { left: auto; right: 0; width: 270px; max-width: calc(100vw - 24px); }
.inbox-column-filter .multi-select-option-label { overflow: hidden; overflow-wrap: normal; text-overflow: ellipsis; white-space: nowrap; }

/* A header is larger than the rows under it: group, project and folder names. */
.ws-project-name, .ws-folder-name { font-size: 15px; }
.ws-pill { font-size: 12px; }
.ws-column-tools { flex-wrap: wrap; }
.inbox-automation-toggle { flex-basis: 100%; min-height: 24px; padding: 0 4px; border: 0; background: none; color: var(--muted); font: 600 12px var(--sans); text-align: left; cursor: pointer; }
.inbox-automation-toggle[aria-pressed="true"] { color: var(--accent); }
.inbox-automation-toggle:hover { text-decoration: underline; }
.inbox-tools-filters .inbox-automation-toggle { flex: 1 1 140px; min-height: 44px; padding: 0 14px; border-radius: 12px; background: var(--field); color: var(--text); font-size: 14px; text-align: center; }
.inbox-tools-filters .inbox-automation-toggle[aria-pressed="true"] { background: color-mix(in srgb, var(--accent) 16%, var(--field)); color: var(--accent); }
