/* Dark by default (as jterm); light only when <html data-theme="light"> is set.
   Brutal chrome (after jterm), calm regions (after commandagi AppLayout): hairlines separate, colour marks state
   only, one accent. Layout regions (tab strip, docks, panes) stay flush; every floating or framed surface (menus,
   popovers, panels, dialogs, sheets, toasts, cards) is rounded and smooth, in one look: the unit card's (owner,
   2026-10-31). Use the tokens below, never a per-component radius or shadow. */
:root {
  color-scheme: dark;
  /* Warm ComputaCo dark palette: calm recessed frame (--bg-dock #151514) framing a softly lifted main sheet (--bg-0 #1d1d1b). */
  --bg-0: 60 3% 11.5%; --bg-1: 60 3% 14.5%; --bg-2: 60 3% 17.5%; --bg-3: 60 3% 21%;
  --bg-dock: 60 3% 8.5%; --bg-dock-2: 60 3% 16%; --bg-dock-3: 60 3% 20%;
  --border-1: 60 3% 19%; --border-2: 60 5% 27%;
  --text-1: 60 6% 92%; --text-2: 50 5% 78%; --text-3: 47 4% 59%; --text-4: 45 3% 47%;
  --brand: 45 86% 69%; --brand-fg: 44 100% 5%;
  --warn: 38 63% 58%; --danger: 0 100% 68%; --ok: 104 36% 61%;
  /* A run's annotations by state (editors/run.js, the time bar): amber waits for an answer, green is answered, blue
     is a remark, white is a person's own pin. */
  --ann-open: 38 92% 56%; --ann-answered: 104 45% 58%; --ann-remark: 208 85% 64%; --ann-pin: 0 0% 96%; --ann-ink: 0 0% 4%;
  /* Generous ComputaCo header rhythm for the title bar, LHS/RHS dock headers, and split-pane headers. */
  --header-h: 48px; --row-h: 34px;
  /* Floating surfaces: one radius for a panel, one for a control inside it, one for the command bar and its popup menu,
     one shadow, one translucent ground. */
  --radius-panel: 14px; --radius-control: 8px; --radius-pill: 999px; --radius-prompt: 22px;
  --shadow-float: 0 16px 36px -12px hsl(0 0% 0% / .45), 0 0 0 1px hsl(var(--border-1));
  --surface-float: hsl(var(--bg-1) / .94); --blur-float: blur(12px);
  /* A modal (a sheet) is lifted off the scrim: its own ground (warm paper in the light theme) and a deep, soft shadow
     (docs/regions.md § modal presentation). */
  --paper: var(--bg-1); --shadow-modal: 0 32px 80px hsl(0 0% 0% / .65), 0 8px 24px hsl(0 0% 0% / .45);
  --font-sans: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", "Cascadia Mono", Consolas, "DejaVu Sans Mono", monospace;
  /* Canonical consumer-friendly UI typography scale (docs/regions.md § typography; mirrored in packages/appkit/ui/src/styles/tokens.css):
     --fs-micro (11.5px)  uppercase micro section headers, kbd hints, compact badges (weight 500–600; never body/inputs)
     --fs-caption (13px)  secondary metadata, subtitles, status bar, dense table captions, timestamps, breadcrumbs
     --fs-ui (14px)       default workbench chrome: LHS Apps tab & sidebar rows, buttons, menus, tabs, form labels, search inputs, toasts
     --fs-body (15px)     readable prose, dialogs, notices, empty states, inspector body, descriptions
     --fs-composer (16px) command/prompt bar input & quick-command primary items (--fw-composer 450, antialiased)
     --fs-title (17px)    pane, dialog, and card titles (weight 600)
     --fs-heading (21px)  section and page headings (weight 600) */
  --fs-micro: 11.5px; --fs-caption: 13px; --fs-ui: 14px; --fs-body: 15px; --fs-composer: 16px; --fs-title: 17px; --fs-heading: 21px;
  --fw-composer: 450;
  /* The kit's checkbox and radio (.cagi-check, at the end of this file), in the shell's tokens for both themes. */
  --check-on: hsl(var(--brand)); --check-mark: hsl(var(--brand-fg)); --check-edge: hsl(var(--text-3)); --check-edge-hover: hsl(var(--text-2));
  --check-ground: hsl(var(--bg-0)); --check-ring: hsl(var(--brand) / .5);
  --check-dur: 180ms; --check-ease: cubic-bezier(.22, 1, .36, 1); --check-spring: cubic-bezier(.34, 1.2, .5, 1);
}
:root[data-theme=light] {
  color-scheme: light;
  /* Warm ComputaCo light palette: stone-white frame (--bg-dock #f5f5f3), active pill (--bg-dock-2 #e9e8e4), pure white work sheet (--bg-0 #ffffff). */
  --bg-0: 0 0% 100%; --bg-1: 60 11% 96%; --bg-2: 48 11% 92%; --bg-3: 48 10% 88%; --bg-dock: 60 11% 96%; --bg-dock-2: 48 11% 90%; --bg-dock-3: 46 11% 86%;
  --border-1: 48 12% 89%; --border-2: 47 10% 81%;
  --paper: 60 11% 98%; --shadow-float: 0 16px 32px -12px hsl(40 10% 10% / .16), 0 0 0 1px hsl(var(--border-1)); --shadow-modal: 0 32px 80px hsl(40 12% 10% / .2), 0 8px 24px hsl(40 12% 10% / .1);
  /* text-3 is ComputaCo's warm muted ink (#67655f, 5.6:1 on white, >= 5:1 on stone dock). */
  --text-1: 0 0% 7%; --text-2: 0 0% 23%; --text-3: 45 4% 39%; --text-4: 45 4% 53%;
  --brand: 42 89% 40%; --brand-fg: 0 0% 100%; --warn: 32 81% 37%; --danger: 0 72% 51%; --ok: 112 39% 34%;
  --ann-open: 36 90% 46%; --ann-answered: 112 45% 36%; --ann-remark: 210 80% 48%; --ann-pin: 0 0% 100%; --ann-ink: 0 0% 4%;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
/* The page never scrolls sideways; every region scrolls inside itself. */
html, body { margin: 0; height: 100%; overflow: hidden; overscroll-behavior: none; }
/* A View Transition never takes a press (docs/regions.md § the first minutes). While one plays, whoever started it (a
   tile's link, a zoom into a tile), its layer covers the whole window, and the page itself is one of the pictures it
   holds: a press in that time reached nothing. Both rules are needed (measured in Chrome 157, 2026-11-24): the page is
   not a picture of the transition, so it stays live under the layer, and the layer takes no pointer. A named element
   (a tile and the surface it grows into) still morphs; the page's own cross-fade is gone. */
:root { view-transition-name: none; }
::view-transition { pointer-events: none; }
body { background: hsl(var(--bg-0)); color: hsl(var(--text-1)); font: var(--fs-ui)/1.45 var(--font-sans); -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; -webkit-text-size-adjust: 100%; }
/* Selection rule: chrome is not text, so nothing selects by default. Copyable text opts in: form fields,
   contenteditable, file and text viewers, detail values, pane-body tables, notices, toasts and the events log.
   New copyable content takes `.selectable`; do not add another selector here. */
body { user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
input, textarea, [contenteditable]:not([contenteditable=false]), .selectable,
.source-code, .md, .ed-text, .ed-val, .ed-fx, .ed-ref, .ed-sheet td, .preview-svg,
.detail-body td, .detail-body p, .detail-body li, .detail-meta, .project, .kv span,
.variant-card .field span, .details .muted, .details strong,
.notice, .toast, .event, .boot { user-select: text; -webkit-user-select: text; -webkit-touch-callout: default; }
.detail-body button, .detail-body .toolbar { user-select: none; -webkit-user-select: none; }
/* a pane header is a drag handle, never text: nothing in it selects (its meta is copyable from the … menu) */
.detail-head, .detail-head * { user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus { outline: none; }
:focus-visible { outline: 1px solid hsl(var(--brand)); outline-offset: -1px; }
::selection { background: hsl(var(--brand) / .28); }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: hsl(var(--border-2)); }
h1, h2, h3, p { margin: 0; }
h1 { font-size: var(--fs-title); font-weight: 600; }
h2 { font-size: var(--fs-body); font-weight: 600; }
h3, .eyebrow, .nav-label, th, .pane-title { font: 600 var(--fs-micro)/1 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; color: hsl(var(--text-4)); }
a { color: hsl(var(--text-1)); text-decoration: underline; text-decoration-color: hsl(var(--border-2)); text-underline-offset: 2px; }
a:hover { text-decoration-color: hsl(var(--brand)); }
small, .muted { color: hsl(var(--text-3)); }
code, .mono { font-family: var(--font-mono); }

/* buttons */
/* The shell's buttons. Its defaults stop at an app's root (`:not(.cagi-app *)`, kept at a bare element's weight by
   `:where`): inside a page a button is the app's, and the shell's padding squeezed an app's icon buttons, a 16px glyph
   in a 28px tile left 12px (the 3D mode strip and banner, 2026-11-21). A quiet button's padding is a default too
   (`button:where(.quiet)`): an icon button's own class sets its padding, and the late `button.quiet` rule pushed the
   tree's "go into" arrow 3px off its centre. */
button:where(:not(.cagi-app *)) { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 2px 10px; font-size: var(--fs-ui); border: 1px solid transparent; background: transparent; color: hsl(var(--text-2)); border-radius: var(--radius-control); cursor: pointer; white-space: nowrap; }
/* naked (docs/wave-j.md §2, after IBM-2's sidebar combo box): no border and no box at rest; hover lifts a soft plate */
button:hover { background: hsl(var(--bg-2)); color: hsl(var(--text-1)); }
button:disabled { opacity: .4; pointer-events: none; }
button.primary { background: hsl(var(--brand)); color: hsl(var(--brand-fg)); border-color: transparent; font-weight: 500; }
button.primary:hover { opacity: .9; background: hsl(var(--brand)); color: hsl(var(--brand-fg)); }
button.quiet:where(:not(.cagi-app *)) { border-color: transparent; color: hsl(var(--text-4)); }
button:where(.quiet):where(:not(.cagi-app *)) { padding: 4px; }
button.quiet:hover { color: hsl(var(--text-1)); background: hsl(var(--bg-2)); }
button.danger { color: hsl(var(--danger)); }
button.danger:hover { background: hsl(var(--danger) / .1); }
button.secondary { border-color: hsl(var(--border-2)); color: hsl(var(--text-1)); }
/* Pressed toggle: soft rounded pill fill (never a single-side border). */
html button[aria-pressed=true] { background: hsl(var(--bg-2)); color: hsl(var(--text-1)); border-color: transparent; border-radius: var(--radius-control); box-shadow: none; }

/* inputs */
/* A field with no box is text over a hairline. A field with a box is a pill (owner, 2026-11-18); a box of several
   lines is a rounded rectangle (`textarea` below). */
input, select, textarea { background: transparent; border: 0; border-bottom: 1px solid hsl(var(--border-1)); color: hsl(var(--text-1)); padding: 4px 0 3px; font: var(--fs-ui) var(--font-mono); border-radius: 0; max-width: 100%; height: 28px; }
textarea { width: 100%; min-height: 80px; resize: vertical; height: auto; padding: 6px 10px; border: 1px solid hsl(var(--border-1)); border-radius: var(--radius-control); }
input:hover { border-bottom-color: hsl(var(--border-2)); }
/* A colour field is its swatch: the system picker's inner padding hid the colour behind a frame. */
input[type=color] { width: 40px; height: 22px; padding: 0; border: 0; background: transparent; cursor: pointer; }
input[type=color]::-webkit-color-swatch-wrapper { padding: 0; }
input[type=color]::-webkit-color-swatch { border: 1px solid hsl(var(--border-2)); border-radius: 4px; }
input[type=color]::-moz-color-swatch { border: 1px solid hsl(var(--border-2)); border-radius: 4px; }
select { appearance: none; -webkit-appearance: none; border-bottom-color: transparent; padding-inline-end: 20px; cursor: pointer; background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.5 6 8l3.5-3.5' fill='none' stroke='%23888' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 4px center / 12px 12px; }
select:hover { color: hsl(var(--text-1)); }
select option { background: hsl(var(--bg-2)); color: hsl(var(--text-1)); }
input:focus, select:focus, textarea:focus { border-color: hsl(var(--border-2)); outline: none; }
input:focus-visible { border-bottom-color: hsl(var(--brand)); }
select:focus-visible { outline: 1px solid hsl(var(--brand)); outline-offset: 2px; border-radius: 6px; }
input::placeholder { color: hsl(var(--text-4)); }
input[type=number] { text-align: right; }

/* chips + dots */
.badge { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; font: 500 var(--fs-micro) var(--font-mono); border: 0; color: hsl(var(--text-3)); border-radius: 6px; white-space: nowrap; text-transform: lowercase; background: hsl(var(--bg-2)); }
.badge.warn { color: hsl(var(--warn)); background: hsl(var(--warn) / .12); }
.badge.bad { color: hsl(var(--danger)); background: hsl(var(--danger) / .12); }
.badge.ok { color: hsl(var(--ok)); background: hsl(var(--ok) / .12); }
.badge.neutral { color: hsl(var(--text-3)); }
.dot { display: inline-block; width: 6px; height: 6px; background: hsl(var(--text-4)); margin-inline-end: 6px; }
.dot.online { background: hsl(var(--ok)); } .dot.busy { background: hsl(var(--warn)); }

/* shell (owner 2026-11-07): a rail at each edge of the window holds its dock's tab icons, always; an open dock stands
   beside its rail with one panel header; the centre column has no tab bar. The desktop app's title bar (its tabs, as
   jterm's) is the only bar over them. The time bar sits below when a time-aware pane is open. */
.shell { height: 100dvh; display: grid; grid-template-rows: minmax(0, 1fr) auto; }
.shell.titled { grid-template-rows: var(--header-h) minmax(0, 1fr) auto; }
.strip { display: flex; align-items: stretch; height: var(--header-h); background: hsl(var(--bg-1)); border-bottom: 1px solid hsl(var(--border-1)); user-select: none; min-width: 0; }
.brand-mark { width: 12px; height: 12px; background: hsl(var(--brand)); }
/* the CommandAGI mark (old commandagi's looped ⌘ square, a mask painted in the text colour; no plate) at the window's top left */
.brand-logo {
  flex: none; align-self: center; width: 16px; height: 16px; margin: 0 12px 0 6px; background: hsl(var(--text-2));
  /* @brand-mask:start — generated by packages/appkit/brand (pnpm brand:build); do not hand-edit. */
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4.635 8.265A3.63 3.63 0 1 1 8.265 4.635L8.265 19.365A3.63 3.63 0 1 1 4.635 15.735L19.365 15.735A3.63 3.63 0 1 1 15.735 19.365L15.735 4.635A3.63 3.63 0 1 1 19.365 8.265L4.635 8.265Z' fill='none' stroke='%23fff' stroke-width='3.05' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
    center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4.635 8.265A3.63 3.63 0 1 1 8.265 4.635L8.265 19.365A3.63 3.63 0 1 1 4.635 15.735L19.365 15.735A3.63 3.63 0 1 1 15.735 19.365L15.735 4.635A3.63 3.63 0 1 1 19.365 8.265L4.635 8.265Z' fill='none' stroke='%23fff' stroke-width='3.05' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
    center / contain no-repeat;
  /* @brand-mask:end */
}
.dock-tab .brand-logo { width: 16px; height: 16px; margin: 0; }
/* Soft ComputaCo tabs in the desktop title bar: rounded pills, no single-side active underlines or vertical dividers. */
.tabs { display: flex; align-items: center; gap: 4px; flex: 0 1 auto; min-width: 0; padding: 0 4px; overflow-x: auto; overflow-y: hidden; overscroll-behavior: contain; touch-action: pan-x; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { display: flex; align-items: center; gap: 6px; flex: 0 1 auto; width: 200px; min-width: 112px; height: 34px; padding: 0 6px 0 10px; border: 0; border-radius: 8px; background: transparent; color: hsl(var(--text-3)); font-size: var(--fs-ui); cursor: default; transition: background-color 120ms ease, color 120ms ease; }
.tab:hover { background: hsl(var(--bg-dock-2) / .7); color: hsl(var(--text-1)); }
.tab.active { background: hsl(var(--bg-0)); color: hsl(var(--text-1)); font-weight: 500; box-shadow: 0 1px 2px hsl(0 0% 0% / .06); }
.tab-glyph { width: 12px; flex: none; text-align: center; color: hsl(var(--text-4)); font-size: var(--fs-caption); }
.tab.active .tab-glyph { color: hsl(var(--text-2)); }
.tab-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* the ×: no plate under the pointer; hovered, only the glyph gets stronger (the owner, 2026-10-27) */
.tab-close { flex: none; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 6px; color: hsl(var(--text-4)); opacity: 0; cursor: pointer; }
.tab.active .tab-close, .tab:hover .tab-close { opacity: 1; }
.tab-close:hover { color: hsl(var(--text-1)); }
.tab-close:hover .icon { stroke-width: 3; }
.tab-new { flex: none; align-self: center; width: 32px; height: 32px; border: 0; border-radius: 8px; justify-content: center; font-size: 14px; color: hsl(var(--text-3)); background: transparent; padding: 0; }
.tab-new:hover { background: hsl(var(--bg-dock-2)); color: hsl(var(--text-1)); }
.strip-spacer { flex: 1 1 0; }
/* The desktop app's title bar (app.js titleBar): its empty parts drag the window; tabs and buttons do not. macOS keeps
   its traffic lights at the start (78 px and a 14 px grab margin, as jterm's; the margin alone in full screen). */
.titlebar { background: hsl(var(--bg-dock)); -webkit-app-region: drag; app-region: drag; }
.titlebar :is(.tab, .tab-new, .window-controls) { -webkit-app-region: no-drag; app-region: no-drag; }
.titlebar-inset { flex: none; width: 14px; }
.titlebar.os-mac .titlebar-inset { width: 92px; }
.titlebar.os-mac.fullscreen .titlebar-inset { width: 14px; }
.window-controls { display: flex; align-items: center; flex: none; }
.window-button { padding: 0; border: 0; justify-content: center; background: transparent; color: hsl(var(--text-2)); }
.window-button:hover { color: hsl(var(--text-1)); }
/* Linux: round buttons with a gap, as GNOME draws them */
.titlebar.os-linux .window-controls { gap: 8px; padding: 0 10px; }
.titlebar.os-linux .window-button { width: 24px; height: 24px; min-height: 0; border-radius: 50%; background: hsl(var(--bg-3)); }
.titlebar.os-linux .window-button .icon { width: 14px; height: 14px; }
/* Windows: square buttons the bar's whole height; close turns red */
.titlebar.os-windows .window-controls { align-self: stretch; }
.titlebar.os-windows .window-button { width: 46px; height: 100%; min-height: 0; border-radius: 0; }
.titlebar.os-windows .window-button:hover { background: hsl(var(--bg-3)); }
.titlebar.os-windows .window-close:hover { background: #c42b1c; color: #fff; }
/* a share link's strip (docs/shares.md): what is shared, whose, read-only, and the way on — in place of the tabs */
.share-strip { align-items: center; gap: 8px; padding-inline-start: 12px; font-size: var(--fs-ui); }
.share-strip .share-name { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: hsl(var(--text-1)); font-weight: 500; }
/* Report and block beside another account's content (moderation.js). */
.cagi-report-block { display: inline-flex; flex: 0 0 auto; gap: 6px; }
.cagi-report-reasons { display: grid; gap: 6px; margin: 8px 0; }
.cagi-report-reasons label { display: flex; align-items: center; gap: 6px; }
.share-strip .share-meta { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: hsl(var(--text-2)); }
.share-strip .badge { flex: none; }
.share-strip .share-ctas { display: flex; gap: 6px; flex: none; }
.share-strip .share-cta { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border: 1px solid hsl(var(--border-1)); border-radius: 2px; color: hsl(var(--text-1)); text-decoration: none; font-size: var(--fs-caption); flex: none; }
.share-strip .share-cta.primary { background: hsl(var(--brand)); color: hsl(var(--brand-fg)); border-color: transparent; font-weight: 500; }
/* The share dialogs (shares.js): the file's name, its path cut in the middle, one row per setting, the link with Copy. */
.share-dialog { width: min(460px, calc(100vw - 32px)); }
.share-dialog .share-title { margin-bottom: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.share-dialog .share-path { display: flex; min-width: 0; margin-bottom: 16px; font: var(--fs-caption) var(--font-mono); color: hsl(var(--text-3)); white-space: nowrap; }
.share-dialog .share-path-head { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.share-dialog .share-path-tail { flex: 0 0 auto; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.share-dialog .share-note { margin: 0 0 12px; }
.share-dialog .share-settings { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 12px 16px; align-items: baseline; margin: 4px 0 8px; }
.share-dialog .share-setting { display: contents; }
.share-dialog .share-label { font-size: var(--fs-ui); color: hsl(var(--text-2)); }
.share-dialog .share-control { min-width: 0; font-size: var(--fs-ui); }
.share-dialog .share-control select { max-width: 100%; padding-inline-start: 0; font: var(--fs-ui) var(--font-sans); color: hsl(var(--text-1)); }
.share-dialog .share-who { color: hsl(var(--text-1)); }
.share-dialog .share-hint { margin-top: 2px; font-size: var(--fs-caption); color: hsl(var(--text-3)); }
.share-dialog .share-check { display: inline-flex; align-items: center; gap: 8px; min-width: 0; color: hsl(var(--text-1)); cursor: pointer; }
.share-dialog .share-check span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.share-dialog .share-link-row { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; }
.share-dialog .share-url { flex: 1; min-width: 0; height: 28px; padding: 0 12px; border: 1px solid hsl(var(--border-2)); border-radius: var(--radius-pill); }
.share-dialog .share-snippet { height: auto; padding: 6px 10px; border-radius: var(--radius-control); font: var(--fs-caption)/1.4 var(--font-mono); resize: none; }
.share-dialog .share-origins { width: 100%; height: 28px; margin-top: 6px; padding: 0 12px; border: 1px solid hsl(var(--border-2)); border-radius: var(--radius-pill); }
.share-dialog .share-origins[hidden] { display: none; }
.share-dialog .share-link-row button { height: 28px; padding: 0 14px; font-size: var(--fs-ui); }
.share-dialog .ed-dialog-actions { gap: 8px; margin-top: 16px; align-items: center; }
.share-dialog .ed-dialog-actions button { height: 28px; padding: 0 14px; font-size: var(--fs-ui); }
.share-dialog .share-actions-spacer { flex: 1; }
@media (max-width: 420px) { .share-dialog .share-settings { grid-template-columns: minmax(0, 1fr); gap: 4px; } .share-dialog .share-setting > .share-control { margin-bottom: 8px; } }
.share-gone { max-width: 520px; margin: 12vh auto 0; display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.share-gone h1 { font-size: 18px; margin: 0; }
.share-gone p { margin: 0; color: hsl(var(--text-2)); }
.share-gone a.button { padding: 6px 12px; border-radius: 2px; background: hsl(var(--brand)); color: hsl(var(--brand-fg)); text-decoration: none; }
.share-row .toolbar { margin-top: 4px; }
/* naked chrome buttons (jterm's ChromeButton): no border or fill until hover; a pressed toggle turns the accent */
.chrome-button { width: 28px; height: 28px; padding: 0; justify-content: center; border-color: transparent; color: hsl(var(--text-3)); }
.chrome-button:hover { background: hsl(var(--bg-2)); color: hsl(var(--text-1)); }
.chrome-button[aria-pressed=true] { background: transparent; color: hsl(var(--brand)); box-shadow: none; }
.icon { display: block; flex: none; }
.menu { position: fixed; z-index: 50; min-width: 180px; padding: 4px; background: hsl(var(--bg-2)); border: 1px solid hsl(var(--border-2)); border-radius: var(--radius-panel); box-shadow: var(--shadow-float); }
.menu-item { display: flex; width: 100%; height: auto; border: 0; border-radius: 8px; padding: 6px 10px; font-size: var(--fs-ui); color: hsl(var(--text-2)); background: transparent; gap: 10px; }
.menu-item:hover, .menu-item:focus-visible { background: hsl(var(--bg-3)); color: hsl(var(--text-1)); }
.menu-item .nav-glyph { color: hsl(var(--text-4)); }
.menu-head { padding: 6px 12px 4px; }
.menu-label { flex: 1; text-align: start; }
.menu-item kbd, .keys kbd { font: 500 var(--fs-micro) var(--font-mono); color: hsl(var(--text-4)); }
.menu-item kbd { margin-inline-start: 16px; }
.menu-item .menu-detail { margin-inline-start: auto; padding-inline-start: 16px; color: hsl(var(--text-4)); font-variant-numeric: tabular-nums; }
.menu-sep { height: 1px; margin: 4px 6px; background: hsl(var(--border-1)); }
.menu-sub { display: inline-flex; margin-inline-start: 12px; color: hsl(var(--text-4)); }
.menu-item.open { background: hsl(var(--bg-3)); color: hsl(var(--text-1)); }
.menu.submenu { z-index: 51; max-height: calc(100dvh - 8px); overflow: auto; }
/* The sidebar's menus (+ New, the account): large rows, big chevrons, a thin gap between rows. */
.menu.nav-menu { display: flex; flex-direction: column; gap: 2px; min-width: 220px; padding: 6px; border-radius: var(--radius-panel); box-shadow: var(--shadow-float); }
.menu.nav-menu.submenu { box-shadow: 0 10px 32px hsl(0 0% 0% / .45); }
.menu.nav-menu .menu-item { min-height: 36px; padding: 8px 12px; gap: 12px; font-size: var(--fs-ui); align-items: center; border-radius: var(--radius-control); }
.menu.nav-menu .menu-item .nav-glyph { width: 20px; min-width: 20px; display: inline-flex; justify-content: center; color: hsl(var(--text-3)); }
.menu.nav-menu .menu-item:hover .nav-glyph, .menu.nav-menu .menu-item.open .nav-glyph { color: hsl(var(--text-1)); }
.menu.nav-menu .menu-item svg { width: 18px; height: 18px; }
.menu.nav-menu .menu-sub svg { width: 16px; height: 16px; }
.menu.nav-menu .menu-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* clip: a focused control near the foot never scrolls the shell (a hidden overflow can still be scrolled) */
.main { display: grid; grid-template-columns: 52px 280px 1px minmax(300px, 1fr) 1px 320px 52px; overflow: hidden; overflow: clip; min-height: 0; }
.splitter { position: relative; background: hsl(var(--border-1) / .65); cursor: col-resize; transition: background-color 140ms ease; }
.splitter::after { content: ''; position: absolute; inset: 0 -4px; z-index: 5; }
.splitter:hover { background: hsl(var(--border-2)); }
.splitter.dragging { background: hsl(var(--brand)); }

/* a dock: its panel header, then its body; put away, its column has no width (app.js resize) */
.dock { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: hsl(var(--bg-dock)); }
.shell:not(.phone) .dock.closed { visibility: hidden; overflow: hidden; }
/* The one panel header (regions.js panelHeader): generous ComputaCo breathing room on the dock surface. */
/* It has no rule of its own: the header stands on the dock's surface, and a hairline shows only while the panel is
   scrolled under it (regions.js scrollEdges). The transparent border keeps the row's height. */
.panel-header { display: flex; flex: none; align-items: center; height: var(--header-h); padding: 0 12px 0 16px; border-bottom: 1px solid transparent; transition: border-color .12s; }
.panel-header.scrolled { border-bottom-color: hsl(var(--border-1)); }
.panel-header-title { flex: 1 1 auto; margin: 0; min-width: 0; font: 600 var(--fs-body)/1.2 var(--font-sans); letter-spacing: -.015em; color: hsl(var(--text-1)); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.panel-header-title.has-custom { display: flex; align-items: center; overflow: hidden; }
/* The navigation's header is the product's name, as ComputaCo's sidebar is headed; the panel's own buttons stand at
   the header's right (regions.js setPanelHeader). */
.panel-header[data-tab=nav] .panel-header-title { font: 600 var(--fs-title)/1.2 var(--font-sans); letter-spacing: -.02em; }
.panel-header-actions { display: flex; flex: none; align-items: center; gap: 2px; margin-inline-start: auto; padding-inline-start: 8px; }
button.panel-header-action { width: 32px; height: 32px; min-height: 0; padding: 0; justify-content: center; border-radius: 8px; color: hsl(var(--text-3)); transition: background-color 120ms ease, color 120ms ease; }
button.panel-header-action:hover, button.panel-header-action[aria-pressed=true] { color: hsl(var(--text-1)); background: hsl(var(--bg-dock-2)); box-shadow: none; }
/* The rails: generous 52px ComputaCo icon rails with rounded 10px pill buttons — zero single-side borders.
   6px top padding centres the 36px top rail icon squarely on the 48px --header-h midline. */
.rail { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; min-height: 0; padding: 6px 0 10px; background: hsl(var(--bg-dock)); overflow: hidden; }
.rail-start { border-inline-end: 1px solid hsl(var(--border-1) / .55); }
.rail-end { border-inline-start: 1px solid hsl(var(--border-1) / .55); }
.rail .dock-tabs { flex-direction: column; align-items: center; gap: 4px; flex: 0 1 auto; width: 100%; min-height: 0; overflow-x: hidden; overflow-y: auto; touch-action: pan-y; }
.rail .dock-tab { position: relative; flex: none; width: 36px; height: 36px; min-height: 0; padding: 0; margin: 0; border: 0; border-radius: 10px; display: grid; place-items: center; justify-content: center; background: transparent; color: hsl(var(--text-3)); transition: background-color 120ms ease, color 120ms ease; }
.rail .dock-tab .nav-glyph { width: auto; font-size: 18px; color: hsl(var(--text-3)); transition: color 120ms ease; }
.rail .dock-tab:is(:hover, :focus-visible) { background: hsl(var(--bg-dock-2) / .65); color: hsl(var(--text-1)); }
.rail .dock-tab:is(:hover, :focus-visible) .nav-glyph { color: hsl(var(--text-1)); }
.rail.open .dock-tab.active { background: hsl(var(--bg-dock-2)); color: hsl(var(--text-1)); }
.rail.open .dock-tab.active .nav-glyph { color: hsl(var(--text-1)); }
.rail .dock-tab .tab-dot { position: absolute; top: 6px; inset-inline-end: 6px; margin: 0; }
/* Under the tabs: a hairline, then the apps pinned to the rail as soft rounded tiles (app.js renderShell); a press opens the app. */
.rail-pins { display: flex; flex-direction: column; align-items: center; gap: 6px; flex: 0 1 auto; width: 100%; min-height: 0; padding: 4px 0; overflow-x: hidden; overflow-y: auto; scrollbar-width: none; }
.rail-pins::-webkit-scrollbar { display: none; }
.rail-hairline { flex: none; width: 22px; height: 1px; margin: 4px 0; background: hsl(var(--border-1)); }
button.rail-pin { flex: none; width: 36px; height: 36px; min-height: 0; padding: 0; justify-content: center; border: 0; border-radius: 10px; background: transparent; overflow: hidden; transition: background-color 120ms ease; }
.rail-pin .app-icon { width: 26px; height: 26px; border-radius: 8px; overflow: hidden; }
.rail-pin:is(:hover, :focus-visible) { background: hsl(var(--bg-dock-2)); }
.rail-pin.active { background: hsl(var(--bg-dock-2)); box-shadow: 0 0 0 1.5px hsl(var(--border-2)); }
.rail-foot { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-top: auto; padding-top: 8px; }
.rail-button { flex: none; width: 36px; height: 36px; min-height: 0; padding: 0; justify-content: center; border-radius: 10px; border: 0; background: hsl(var(--bg-dock-2)); color: hsl(var(--text-1)); overflow: hidden; transition: background-color 120ms ease, opacity 120ms ease; }
.rail-button:is(:hover, [aria-expanded=true]) { background: hsl(var(--bg-dock-3)); }
.rail-new { background: hsl(var(--text-1)); color: hsl(var(--bg-0)); }
.rail-new:is(:hover, :focus-visible, [aria-expanded=true]) { background: hsl(var(--text-1) / .85); color: hsl(var(--bg-0)); }
.rail-back { margin-bottom: 4px; }
.rail-avatar, .rail-avatar > svg { display: block; width: 100%; height: 100%; }
.rail-account { border-radius: 50%; }
.rail-account:is(:hover, [aria-expanded=true]) > .rail-avatar { opacity: .85; }
/* Inside a dock the surfaces step from the dock's colour, so a hover is never darker than the dock it sits on. */
.dock { --bg-1: var(--bg-dock); --bg-2: var(--bg-dock-2); --bg-3: var(--bg-dock-3); }
.dock-strip { display: flex; align-items: center; gap: 4px; height: var(--header-h); padding: 0 8px; border-bottom: 1px solid hsl(var(--border-1)); flex: none; }
.dock-tabs { display: flex; align-items: center; gap: 2px; flex: 0 1 auto; min-width: 0; overflow-x: auto; overflow-y: hidden; overscroll-behavior: contain; touch-action: pan-x; scrollbar-width: none; }
.dock-tabs::-webkit-scrollbar { display: none; }
.dock-tab { height: 34px; border: 0; border-radius: 8px; padding: 0 10px; font-size: var(--fs-ui); color: hsl(var(--text-3)); background: transparent; min-width: 0; transition: background-color 120ms ease, color 120ms ease; }
.dock-tab:hover { background: hsl(var(--bg-dock-2) / .65); color: hsl(var(--text-1)); }
.dock-tab.active { background: hsl(var(--bg-dock-2)); color: hsl(var(--text-1)); font-weight: 500; }
.dock-tab .nav-glyph { color: hsl(var(--text-4)); font-size: var(--fs-caption); min-width: 0; }
/* a label standing in a strip (details, events) centres like the tabs beside it */
span.dock-tab { display: flex; align-items: center; padding: 0 12px; }
.dock-tab-label { overflow: hidden; text-overflow: ellipsis; }
.dock-body { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.nav, .detail { min-width: 0; min-height: 0; overflow: auto; }
.dock-body > .nav { flex: 1; }
/* the sign-in dialog (sign-in.js): a guest on the hosted site, and every page that needs an account. One fixed-size
   card (the X / Twitter sign-in): steps change its content, never its size. */
.cagi-signin { position: absolute; inset: 0; z-index: 40; display: flex; align-items: center; justify-content: center; box-sizing: border-box; padding: 16px; background: hsl(var(--bg-0) / .55); backdrop-filter: blur(6px); font-family: var(--font-sans); }
.cagi-signin.fixed { position: fixed; z-index: 1000; }
.cagi-signin-card { position: relative; display: flex; flex-direction: column; box-sizing: border-box; width: 600px; max-width: 100%; min-height: min(650px, 100%); max-height: 100%; overflow: auto; border-radius: 16px; background: hsl(var(--bg-1)); color: hsl(var(--text-1)); box-shadow: 0 0 0 1px hsl(var(--border-1)), 0 24px 64px rgb(0 0 0 / .35); }
.cagi-signin-card:focus { outline: none; }
.cagi-signin-head { position: relative; flex: none; display: flex; align-items: center; justify-content: center; height: 56px; }
.cagi-signin .cagi-signin-logo { width: 32px; height: 32px; margin: 0; background: hsl(var(--text-1)); }
.cagi-signin .cagi-signin-close { position: absolute; inset-inline-start: 12px; top: 10px; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 999px; background: transparent; color: hsl(var(--text-1)); font-size: 24px; line-height: 36px; cursor: pointer; }
.cagi-signin .cagi-signin-close:hover { background: hsl(var(--bg-2)); }
.cagi-signin-body { flex: 1; display: flex; justify-content: center; padding: 0 32px 32px; }
.cagi-signin-column { display: flex; flex-direction: column; gap: 20px; width: 100%; max-width: 364px; }
.cagi-signin-column.is-wide { max-width: 440px; }
.cagi-signin-card h2 { margin: 12px 0 8px; font-size: 31px; line-height: 36px; font-weight: 700; letter-spacing: -.01em; color: hsl(var(--text-1)); }
.cagi-signin-lede { margin: -12px 0 4px; font-size: 15px; color: hsl(var(--text-3)); }
.cagi-signin-stack { display: flex; flex-direction: column; gap: 12px; }
.cagi-signin .cagi-signin-pill { display: flex; align-items: center; justify-content: center; gap: 10px; box-sizing: border-box; width: 100%; height: 40px; padding: 0 16px; border: 1px solid hsl(var(--border-2)); border-radius: 999px; background: hsl(var(--bg-0)); color: hsl(var(--text-1)); font: 600 15px var(--font-sans); text-decoration: none; cursor: pointer; transition: background .15s, filter .15s; }
.cagi-signin .cagi-signin-pill:hover { background: hsl(var(--bg-2)); }
.cagi-signin .cagi-signin-pill.is-solid { border-color: transparent; background: hsl(var(--text-1)); color: hsl(var(--bg-0)); font-weight: 700; }
.cagi-signin .cagi-signin-pill.is-solid:hover { filter: brightness(.9); }
.cagi-signin .cagi-signin-pill.is-ghost { background: transparent; }
.cagi-signin .cagi-signin-pill.is-big { height: 52px; font-size: 17px; }
.cagi-signin .cagi-signin-pill:disabled { opacity: .55; cursor: default; filter: none; }
.cagi-signin-mark { display: inline-flex; width: 20px; height: 20px; }
.cagi-signin-or { display: flex; align-items: center; gap: 8px; margin: -4px 0; color: hsl(var(--text-2)); font-size: 15px; }
.cagi-signin-or::before, .cagi-signin-or::after { content: ''; flex: 1; height: 1px; background: hsl(var(--border-1)); }
.cagi-signin-field { position: relative; display: block; }
.cagi-signin .cagi-signin-field input { box-sizing: border-box; width: 100%; height: 56px; padding: 24px 44px 6px 8px; border: 1px solid hsl(var(--border-2)); border-radius: 4px; background: transparent; color: hsl(var(--text-1)); font: 17px var(--font-sans); outline: none; }
.cagi-signin .cagi-signin-field input:focus { border-color: hsl(var(--brand)); box-shadow: 0 0 0 1px hsl(var(--brand)); }
.cagi-signin .cagi-signin-field input:disabled { background: hsl(var(--bg-2)); color: hsl(var(--text-3)); border-color: transparent; }
.cagi-signin-field > span { position: absolute; inset-inline-start: 9px; top: 18px; color: hsl(var(--text-3)); font-size: 17px; pointer-events: none; transition: top .15s, font-size .15s, color .15s; }
.cagi-signin-field input:focus + span, .cagi-signin-field input:not(:placeholder-shown) + span { top: 7px; font-size: 13px; }
.cagi-signin-field input:focus + span { color: hsl(var(--brand)); }
.cagi-signin .cagi-signin-eye { position: absolute; inset-inline-end: 8px; top: 14px; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 999px; background: transparent; color: hsl(var(--text-2)); cursor: pointer; }
.cagi-signin-eye::before { content: ''; position: absolute; inset: 4px; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M2 12s3.6-7 10-7 10 7 10 7-3.6 7-10 7S2 12 2 12Z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M2 12s3.6-7 10-7 10 7 10 7-3.6 7-10 7S2 12 2 12Z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E") center / contain no-repeat; }
.cagi-signin-eye.on { color: hsl(var(--brand)); }
.cagi-signin .cagi-signin-link { align-self: flex-start; padding: 0; border: 0; background: none; color: hsl(var(--brand)); font: 14px var(--font-sans); text-decoration: none; cursor: pointer; }
.cagi-signin .cagi-signin-link:hover { text-decoration: underline; }
.cagi-signin-status { margin: -8px 0 0; font-size: 14px; color: hsl(var(--text-2)); }
.cagi-signin-status.bad { color: hsl(var(--danger)); }
.cagi-signin-end { margin-top: auto; display: flex; flex-direction: column; gap: 16px; }
.cagi-signin-foot { margin: 20px 0 0; font-size: 15px; color: hsl(var(--text-3)); }
.cagi-signin-end .cagi-signin-foot { margin: 0; }
.cagi-signin-foot a { color: hsl(var(--brand)); text-decoration: none; }
.cagi-signin-foot a:hover { text-decoration: underline; }
.nav { padding: 6px 0; }
.nav-label { padding: 6px 12px 6px; display: flex; align-items: center; justify-content: space-between; }
.nav-label button { height: 18px; padding: 0 4px; letter-spacing: 0; text-transform: none; font-family: var(--font-sans); }
/* The Files tab's path breadcrumbs in the panel header (regions.js createHeaderBreadcrumbs): single-row, truncated
   from the start so the current folder stays visible even in a narrow sidebar. */
.explorer-crumbs { display: flex; flex-wrap: nowrap; align-items: center; gap: 2px; min-width: 0; width: 100%; padding: 0; overflow: hidden; font: 600 var(--fs-body)/1.2 var(--font-sans); letter-spacing: -.015em; }
.explorer-crumbs[data-measuring="true"] { overflow: visible; }
.explorer-crumbs[data-measuring="true"] > * { flex: 0 0 auto !important; max-width: none !important; }
/* A crumb's hover pill holds its name only: the "/" between two crumbs is an element of its own, outside both
   (owner, 2026-11-21). */
.explorer-crumbs button { flex: 0 0 auto; height: 26px; min-height: 0; padding: 0 6px; min-width: 0; font: 500 var(--fs-ui)/1 var(--font-sans); color: hsl(var(--text-3)); border-radius: 6px; white-space: nowrap; }
.explorer-crumbs button:hover { background: hsl(var(--bg-dock-2)); color: hsl(var(--text-1)); }
.explorer-crumbs button.crumb-overflow { padding: 0 5px; }
.explorer-crumbs button svg { width: 14px; height: 14px; }
.explorer-crumbs .crumb-sep { flex: 0 0 auto; color: hsl(var(--text-4)); font: 400 var(--fs-ui)/1 var(--font-sans); padding: 0 1px; user-select: none; }
.explorer-crumbs .crumb[aria-current] { flex: 0 1 auto; min-width: 0; overflow: hidden; padding: 0 4px; font: 600 var(--fs-body)/1.2 var(--font-sans); color: hsl(var(--text-1)); opacity: 1; cursor: default; }
.explorer-crumbs[data-visible-count="1"]:not([data-truncated="ellipsis"]) .crumb[aria-current] { padding-inline-start: 0; }
.explorer-crumbs .crumb-label { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tree-line { position: relative; }
.tree-go { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); height: 20px; width: 20px; padding: 0; display: grid; place-items: center; opacity: 0; }
.tree-go svg { width: 14px; height: 14px; }
.tree-line:hover .tree-go, .tree-go:focus-visible { opacity: 1; }
@media (hover: none) { .tree-go { opacity: 1; } }
.nav-item { display: flex; align-items: center; width: calc(100% - 12px); margin: 0 6px; min-height: 34px; height: auto; gap: 8px; padding: 5px 10px; border: 0; border-radius: 8px; background: transparent; color: hsl(var(--text-2)); font-size: var(--fs-ui); text-align: start; transition: background-color 120ms ease, color 120ms ease; }
.nav-item:hover { background: hsl(var(--bg-2) / .65); color: hsl(var(--text-1)); }
.nav-item.selected { background: hsl(var(--bg-2)); color: hsl(var(--text-1)); font-weight: 500; }
.nav-glyph { width: 14px; min-width: 14px; text-align: center; font-size: var(--fs-caption); color: hsl(var(--text-4)); }

/* a side panel's filter row, and list rows */
.master-header { height: var(--row-h); display: flex; align-items: center; border-bottom: 1px solid hsl(var(--border-1)); flex: none; }
.search { width: 100%; height: 100%; border: 0; background: transparent; padding: 0 12px; font-size: var(--fs-ui); }
.search:focus { border: 0; background: hsl(var(--bg-2)); }
.item { display: block; width: calc(100% - 12px); margin: 1px 6px; min-height: 34px; height: auto; text-align: start; border: 0; border-radius: 8px; background: transparent; padding: 6px 10px; font-size: var(--fs-ui); color: hsl(var(--text-2)); transition: background-color 120ms ease, color 120ms ease; }
.item:hover { background: hsl(var(--bg-2) / .65); color: hsl(var(--text-1)); }
.item.active { background: hsl(var(--bg-2)); color: hsl(var(--text-1)); font-weight: 500; }
.item-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: var(--fs-ui); }
.item small { display: block; font: var(--fs-caption) var(--font-mono); color: hsl(var(--text-4)); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* a view's outliner (sideRail: a world's units, the simulator's runs): soft rounded rows, no single-side stripes */
.outline { display: flex; flex-direction: column; gap: 1px; padding: 6px 6px 12px; }
.outline-row { display: flex; align-items: center; gap: 6px; width: 100%; min-height: 32px; flex: none; padding: 0 8px 0 10px; border: 0; border-radius: 8px; background: transparent; color: hsl(var(--text-2)); font-size: var(--fs-ui); text-align: start; transition: background-color 120ms ease, color 120ms ease; }
.outline-row:hover { background: hsl(var(--bg-2) / .65); color: hsl(var(--text-1)); }
.outline-row.selected { background: hsl(var(--bg-2)); color: hsl(var(--text-1)); font-weight: 500; }
.outline-row.group { font-weight: 600; color: hsl(var(--text-1)); margin-top: 6px; }
.outline-row.group:first-child { margin-top: 0; }
.outline-row.child { padding-inline-start: 24px; color: hsl(var(--text-2)); }
.outline-row.child:hover, .outline-row.child.selected { color: hsl(var(--text-1)); }
.outline-dot { flex: none; width: 6px; height: 6px; border-radius: 50%; background: hsl(var(--text-4)); }
.outline-dot[data-state=live] { background: hsl(var(--ok)); }
.outline-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.outline-token { flex: none; max-width: 45%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 500 var(--fs-micro) var(--font-mono); color: hsl(var(--text-4)); text-transform: lowercase; }
.outline-empty { margin: 8px 12px; font-size: var(--fs-body); color: hsl(var(--text-4)); }

/* detail: one header row, optional mono meta line, body */
.detail { position: relative; background: hsl(var(--bg-0)); display: flex; flex-direction: column; overflow: hidden; }
.detail-meta { font: var(--fs-caption) var(--font-mono); color: hsl(var(--text-3)); }
/* pane header (after jterm & ComputaCo): hidden in single-pane tabs unless the view itself carries tools;
   shown cleanly in split tabs (2+ panes) with generous height, soft surface contrast, and zero single-side borders. */
.detail-head { flex: none; height: var(--header-h); min-height: var(--header-h); max-height: var(--header-h); overflow: hidden; background: hsl(var(--bg-0)); border-bottom: 1px solid transparent; transition: border-color .12s, background-color .12s; }
.detail-head.scrolled { border-bottom-color: hsl(var(--border-1)); }
.pane[data-single-pane="false"] > .detail-head { border-bottom-color: hsl(var(--border-1)); }
.detail-row { height: 100%; display: flex; flex-wrap: nowrap; align-items: center; gap: 8px; padding: 0 10px 0 14px; overflow: hidden; white-space: nowrap; cursor: grab; touch-action: none; -webkit-touch-callout: none; }
.detail-row > * { flex: none; }
.detail-row h1 { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; font: 500 var(--fs-ui)/1.2 var(--font-sans); letter-spacing: -.01em; text-transform: none; color: hsl(var(--text-2)); }
.detail-row .detail-meta { flex: 1 1 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; font: var(--fs-caption)/1 var(--font-mono); color: hsl(var(--text-4)); }
.detail-row .toolbar { margin-inline-start: auto; flex-wrap: nowrap; gap: 6px; }
.detail-row .detail-meta ~ .toolbar, .detail-row .detail-meta ~ .pane-switch { margin-inline-start: 0; }
.detail-row button { height: 28px; min-height: 0; min-width: 0; padding: 0 8px; font: var(--fs-ui)/1 var(--font-sans); border-radius: 8px; cursor: pointer; }
.detail-row .badge { height: 18px; }
/* Single-pane header rule (after ../jterm): hide the pane header completely when a tab holds only one pane,
   leaving the main content sheet 100% clean and airy. */
.shell:not(.phone) .pane[data-single-pane="true"] > .detail-head { display: none; }
/* Single-pane world view: full-bleed 3D canvas with world tools floated quietly in a soft top-right pill. */
.shell:not(.phone) .pane[data-single-pane="true"][data-kind="world"] > .detail-head {
  display: block; position: absolute; top: 10px; inset-inline-end: 12px; z-index: 12;
  width: auto; max-width: calc(100% - 24px); height: auto; min-height: 0; max-height: none;
  padding: 4px 6px; border: 1px solid hsl(var(--border-1)); border-radius: 10px;
  background: var(--surface-float); backdrop-filter: var(--blur-float);
  box-shadow: 0 4px 16px hsl(0 0% 0% / .08);
}
.shell:not(.phone) .pane[data-single-pane="true"][data-kind="world"] > .detail-head .detail-row { height: auto; padding: 0; gap: 4px; cursor: default; }
.shell:not(.phone) .pane[data-single-pane="true"][data-kind="world"] > .detail-head :is(h1, .detail-meta) { display: none; }
/* Single-pane views that mount active view-specific controls (editor tabs/undo/save, page search/actions, device-def toolbar):
   keep a calm, borderless-at-rest inline view bar on the main sheet surface so every view control remains reachable. */
.shell:not(.phone) .pane[data-single-pane="true"]:not([data-kind="world"]) > .detail-head:has(
  .toolbar > :not([hidden]):not(.cagi-head-slot),
  .cagi-head-slot :is(button:not([hidden]), a:not([hidden]), input:not([hidden]), select:not([hidden]), [role="tab"]:not([hidden]), [role="button"]:not([hidden]), .cagi-head-title:not(:empty)),
  .cagi-title-mark > :not([hidden]),
  .head-annotate:not([hidden])
) { display: block; background: hsl(var(--bg-0)); border-bottom-color: transparent; }
.shell:not(.phone) .pane[data-single-pane="true"]:not([data-kind="world"]) > .detail-head.scrolled { border-bottom-color: hsl(var(--border-1)); }
.shell:not(.phone) .pane[data-single-pane="true"]:not([data-kind="world"]) > .detail-head .detail-row { cursor: default; }
.detail-row button.quiet { min-width: 24px; padding: 0 3px; font-size: var(--fs-body); justify-content: center; }
.detail-row .toolbar button.quiet { font-size: var(--fs-caption); }
.detail-row .overflowed { display: none !important; }
/* toolbars are glyphs (docs/regions.md § toolbars): one 24px square per verb, its words in the tooltip and its name */
button.tool, .detail-row button.tool, .ed-bar button.tool { width: 24px; min-width: 24px; height: 24px; padding: 0; gap: 0; justify-content: center; flex: none; color: hsl(var(--text-3)); }
button.tool:hover { color: hsl(var(--text-1)); background: hsl(var(--bg-2)); }
button.tool.primary { background: hsl(var(--brand)); color: hsl(var(--brand-fg)); }
button.tool.primary:hover { opacity: .9; background: hsl(var(--brand)); color: hsl(var(--brand-fg)); }
button.tool.danger { color: hsl(var(--danger)); }
/* the safing control (stop): red and filled, so it reads before any other tool */
button.tool.safing, button.tool.safing:hover { background: hsl(var(--danger)); color: #fff; }
button.tool[aria-pressed=true] { color: hsl(var(--brand)); box-shadow: none; background: hsl(var(--bg-2)); }
button.tool svg { width: 16px; height: 16px; flex: none; }
/* A group divider stops 10% short of its bar's top and bottom, as the ribbons' do (owner, 2026-10-29). */
.tool-sep { flex: none; align-self: stretch; width: 1px; min-height: 14px; margin: 0 5px; background: linear-gradient(hsl(var(--border-2)), hsl(var(--border-2))) center / 1px 80% no-repeat; }
.detail-row .head-more { width: 24px; padding: 0; justify-content: center; border-color: transparent; letter-spacing: 0; color: hsl(var(--text-3)); }
.detail-row .head-more:hover, .detail-row .head-more[aria-expanded=true] { color: hsl(var(--text-1)); }
.detail-row h1.untitled { flex: 1 1 0; }
/* A mounted page's own header row takes the room the empty title would (the marketplace keeps its search on a phone). */
.detail-row:has(> .page-head-slot) > h1.untitled { display: none; }
/* A page's tools end the row: the pane's ⋯ follows them at their own spacing (owner, 2026-11-18). */
.detail-row > .page-head-slot ~ .toolbar:empty { display: none; }
.detail-row > .page-head-slot ~ .head-more { margin-inline-start: -4px; }
.menu-note-line { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-note-name { color: hsl(var(--text-1)); font-weight: 600; }
.menu-note { max-width: min(360px, calc(100vw - 16px)); padding: 6px 12px 8px; font: var(--fs-caption)/1.5 var(--font-mono); color: hsl(var(--text-3)); white-space: normal; overflow-wrap: anywhere; border-bottom: 1px solid hsl(var(--border-1)); }
.detail-body { padding: 12px 16px; overflow: auto; flex: 1; min-height: 0; }
/* An editor or app fills its pane to the walls. Here, not in editors.css: that loads on demand, and an app opened before any editor kept the padding. */
.editor-host { padding: 0 !important; overflow: hidden !important; display: flex; flex-direction: column; min-height: 0; }
.toolbar, .top-actions, .row { display: flex; align-items: center; gap: 4px; }
.stack { display: grid; gap: 0; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; }
.card { padding: 12px 0; border-top: 1px solid hsl(var(--border-1)); background: transparent; }
.card h3 { margin-bottom: 8px; }
.kpi { font: 500 var(--fs-heading) var(--font-mono); color: hsl(var(--text-1)); }
.kpi-label { color: hsl(var(--text-3)); font-size: var(--fs-caption); }
.kv { display: flex; justify-content: space-between; gap: 16px; padding: 5px 0; border-bottom: 1px solid hsl(var(--border-1)); font-size: var(--fs-ui); }
.kv:last-child { border: 0; }
.kv span:first-child { color: hsl(var(--text-3)); }
.notice { padding: 8px 12px; margin: 8px 0; border-radius: var(--radius-control); background: hsl(var(--bg-1)); color: hsl(var(--text-2)); font-size: var(--fs-body); }
.notice.error { background: hsl(var(--danger) / .10); color: hsl(var(--danger)); }
.notice.warn { background: hsl(var(--warn) / .11); color: hsl(var(--warn)); }
.notice.success { background: hsl(var(--ok) / .11); color: hsl(var(--ok)); }
.empty { max-width: 60ch; margin: 24px 16px; color: hsl(var(--text-3)); font-size: var(--fs-body); }
.empty h2 { color: hsl(var(--text-1)); font-size: var(--fs-title); margin-bottom: 4px; }
.boot { min-height: 100dvh; display: grid; place-items: center; margin: 0; }
/* The page's own error when the shell could not load (boot-guard.js): plain, centred, one way out. */
.boot-failed[hidden] { display: none; }
.boot-failed { align-content: center; gap: 10px; text-align: center; padding: 0 16px; }
.boot-failed h1 { margin: 0; font-size: 18px; font-weight: 600; }
.boot-failed p { margin: 0; color: hsl(var(--text-2)); }
.boot-failed button { justify-self: center; margin-top: 6px; padding: 6px 14px; border: 1px solid hsl(var(--border-2)); border-radius: 6px; background: hsl(var(--bg-2)); cursor: pointer; }
.boot .brand-logo { width: 48px; height: 48px; margin: 0; background: hsl(var(--text-1)); }
/* The mark keeps no words (owner, 2026-10-03): a reader without the shell gets the site's summary and its pages here. */
.boot noscript { display: grid; gap: 12px; justify-items: center; max-width: 40rem; padding: 0 24px; text-align: center; font-size: 14px; line-height: 1.6; }
.boot noscript p { margin: 0; }
.boot noscript nav { display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: center; }

/* 3d viewport + details */
.viewport-wrap { position: relative; flex: 1; min-height: 220px; }
.scene { width: 100%; height: 100%; display: block; touch-action: none; }
.scene-caption { position: absolute; inset-inline-start: 8px; top: 8px; pointer-events: none; font: 500 var(--fs-micro) var(--font-mono); color: hsl(var(--text-2)); background: hsl(var(--bg-1) / .7); padding: 2px 6px; border-radius: 3px; }
/* The scene's foot: the hint over the tools, stacked, so neither covers the other (a long hint wraps). */
.scene-foot { position: absolute; inset-inline-start: 8px; inset-inline-end: 8px; bottom: 8px; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; pointer-events: none; }
.scene-foot > * { pointer-events: auto; }
.scene-tools { display: flex; gap: 2px; padding: 2px; border-radius: 6px; background: hsl(var(--bg-1) / .8); }
.scene-tools > button { background: transparent; border-radius: 4px; }
.scene-tools > button:hover { background: hsl(var(--bg-3)); }
.scene-tools > button[aria-pressed=true] { background: hsl(var(--bg-3)); box-shadow: none; }
.scene-hint { align-self: flex-end; max-width: 100%; font: 500 var(--fs-micro) var(--font-mono); color: hsl(var(--text-3)); background: hsl(var(--bg-1) / .85); padding: 2px 6px; }
.scene-hint:empty { display: none; }
.details { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 12px; border-top: 1px solid hsl(var(--border-1)); padding: 8px 12px; background: hsl(var(--bg-1)); max-height: 42%; overflow: auto; }
.details input { width: 76px; }
.details select { max-width: 360px; }
.field label { display: block; font: 500 var(--fs-micro) var(--font-mono); color: hsl(var(--text-4)); margin-bottom: 2px; }
.variant-card { display: flex; flex-wrap: wrap; gap: 4px 16px; width: 100%; padding-top: 8px; border-top: 1px solid hsl(var(--border-1)); font-size: var(--fs-caption); }
.variant-card .field span { color: hsl(var(--text-2)); font-family: var(--font-mono); font-size: var(--fs-caption); }
.variant-card p { width: 100%; font: var(--fs-caption)/1.5 var(--font-mono); color: hsl(var(--text-3)); }

/* viewers, tables, processes, plate */
.source-code { font: var(--fs-caption)/1.6 var(--font-mono); color: hsl(var(--text-2)); white-space: pre; overflow: auto; tab-size: 2; margin: 0; padding: 12px; background: hsl(var(--bg-1)); border: 1px solid hsl(var(--border-1)); max-height: 60vh; }
.viewer-media { display: block; width: 100%; height: 100%; max-height: 65vh; object-fit: contain; background: hsl(var(--bg-1)); }
.preview-svg { width: 100%; height: 430px; background: hsl(var(--bg-1)); border: 1px solid hsl(var(--border-1)); }
.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; font-size: var(--fs-ui); }
th { text-align: start; padding: 8px; border-bottom: 1px solid hsl(var(--border-2)); white-space: nowrap; }
td { padding: 5px 8px; border-bottom: 1px solid hsl(var(--border-1)); vertical-align: top; }
td input { width: 64px; height: 22px; padding: 2px 4px; }
td small { font-size: var(--fs-caption); }
.process { display: grid; gap: 2px; margin-top: 12px; padding-top: 6px; border-top: 1px solid hsl(var(--border-1)); }
.step { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 8px; }
.step-index { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 6px; font: 500 var(--fs-micro) var(--font-mono); border: 1px solid hsl(var(--border-2)); color: hsl(var(--text-3)); }
.step.running { background: hsl(var(--brand) / .08); }
.step.running .step-index { border-color: hsl(var(--brand)); color: hsl(var(--brand)); }
.step.simulated .step-index { border-color: hsl(var(--ok)); color: hsl(var(--ok)); }
.step.blocked, .step.failed { background: hsl(var(--danger) / .08); }
.step.blocked .step-index, .step.failed .step-index { border-color: hsl(var(--danger)); color: hsl(var(--danger)); }
.step-label { flex: 1; font-size: var(--fs-ui); }
.step-state { font: 500 var(--fs-micro) var(--font-mono); color: hsl(var(--text-3)); text-transform: lowercase; }
.progress-track { height: 2px; background: hsl(var(--border-1)); overflow: hidden; }
.progress-track > div { background: hsl(var(--brand)); height: 100%; transition: width .2s; }
.plate { display: grid; grid-template-columns: 20px repeat(12, minmax(16px, 1fr)); gap: 4px; max-width: 620px; margin: 16px 0; }
.well { aspect-ratio: 1; min-width: 12px; height: auto; padding: 0; justify-content: center; border-radius: 0; border: 1px solid hsl(var(--border-2)); background: hsl(var(--bg-1)); font: 8px var(--font-mono); color: hsl(var(--text-3)); }
.well:hover { border-color: hsl(var(--brand)); color: hsl(var(--text-1)); }
.plate-label { display: flex; align-items: center; justify-content: center; font: 500 var(--fs-micro) var(--font-mono); color: hsl(var(--text-4)); }

/* overlays */
.toast { position: fixed; bottom: 12px; inset-inline-end: 12px; max-width: 340px; padding: 8px 12px; background: hsl(var(--bg-2)); color: hsl(var(--text-1)); border: 1px solid hsl(var(--border-2)); border-radius: var(--radius-panel); box-shadow: var(--shadow-float); font-size: var(--fs-ui); z-index: 40; overflow-wrap: anywhere; }
.toast.error { border-color: hsl(var(--danger)); }
/* No modal scrolls sideways (owner, 2026-11-21). The cause they shared: a modal scrolls (`overflow: auto`, the
   browser's for a modal dialog; `overflow-y: auto` alone makes x auto too), so one child wider than its content box,
   a list with a fixed minimum width or a long unbroken name, drew a horizontal bar. A modal scrolls down only, and
   its children are held to its width. */
dialog { background: hsl(var(--bg-1)); color: hsl(var(--text-1)); border: 1px solid hsl(var(--border-2)); border-radius: var(--radius-panel); max-width: min(540px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); padding: 24px; box-shadow: 0 24px 80px #0006; overflow: hidden auto; }
dialog > * { max-width: 100%; }
dialog :is(p, label, .ed-dialog-title) { overflow-wrap: anywhere; }
dialog::backdrop { background: #0009; backdrop-filter: blur(4px); }
dialog button { border-radius: var(--radius-control); min-height: 36px; padding: 0 14px; }
/* welcome (app.js openWelcome, docs/wave-j.md §13): a modal card over the dimmed shell; on a phone it is the screen */
dialog.welcome-modal { width: min(600px, calc(100vw - 32px)); height: min(780px, calc(100dvh - 48px)); max-width: none; max-height: none; padding: 0; border: 0; border-radius: var(--radius-panel); background: hsl(var(--bg-1)); overflow: hidden; box-shadow: 0 24px 80px #0009; }
dialog.welcome-modal::backdrop { background: #0009; }
.welcome-modal .welcome-body { width: 100%; height: 100%; display: flex; }
/* the wizard's page draws a card of its own inside a full-screen root: here the modal is the card */
.welcome-modal [class~="sm:rounded-2xl"] { border: 0 !important; border-radius: 0 !important; }
.welcome-modal [class~="sm:py-8"] { padding: 0 !important; height: 100% !important; align-items: stretch !important; }
@media (max-width: 640px) { dialog.welcome-modal { width: 100vw; height: 100dvh; border-radius: 0; } }
details { margin-top: 12px; }
summary { cursor: pointer; font: 500 var(--fs-caption) var(--font-mono); color: hsl(var(--text-3)); }
video { width: 100%; max-height: 62vh; background: #000; }
.bignumber { font-variant-numeric: tabular-nums; }
@media (max-width: 900px) { .main { grid-template-columns: 220px 1px minmax(300px, 1fr); } .two { grid-template-columns: 1fr; } }

/* split panes inside a tab (after jterm): absolute boxes from core/panes.js, quiet dividers over the seams */
.detail.pane-area { position: relative; display: block; overflow: hidden; }
.pane { position: absolute; min-width: 0; min-height: 0; }
.pane.focused > .detail-head { background: hsl(var(--bg-1)); }
.pane.focused .detail-row h1 { color: hsl(var(--text-1)); font-weight: 600; }
.pane-area:has(.pane.focused) .pane:not(.focused) .detail-row h1 { color: hsl(var(--text-3)); font-weight: 400; }
.pane-area:has(.pane.focused) .pane:not(.focused) .detail-row .head-more { opacity: .65; }
/* dragging a pane by its header (or a tab from the strip) onto another pane: the source dims, the target half lights */
.pane.drag-source { opacity: .4; }
.drop-preview { position: absolute; z-index: 24; pointer-events: none; border: 2px solid hsl(var(--brand)); background: hsl(var(--brand) / .1); }
body.pane-dragging, body.pane-dragging * { cursor: grabbing !important; }
.pane-divider { position: absolute; z-index: 6; background: hsl(var(--border-2)); }
.pane-divider.x { width: 1px; margin-inline-start: -.5px; cursor: col-resize; }
.pane-divider.y { height: 1px; margin-top: -.5px; cursor: row-resize; }
.pane-divider::after { content: ''; position: absolute; inset: -4px 0; }
.pane-divider.x::after { inset: 0 -4px; }
.pane-divider:hover, .pane-divider.dragging { background: hsl(var(--brand)); }
.pane-switch { display: flex; align-items: center; flex: none; gap: 2px; font: 10px/1 var(--font-mono); color: hsl(var(--text-3)); }
.detail-row .pane-switch button { width: 20px; padding: 0; justify-content: center; border-color: transparent; }
.model-wrap { height: calc(100% - 64px); min-height: 200px; }

/* right dock, explorer tree; + and the account are the left rail's foot (.rail-foot above) */
.centre { display: grid; min-width: 0; min-height: 0; grid-template-rows: minmax(0, 1fr) auto; }
.share-mode .centre { grid-template-rows: var(--header-h) minmax(0, 1fr) auto; }
.centre > .detail { min-height: 0; }
.rdock { border-inline-start: 0; --rdock-inset: 14px; --rdock-cols: minmax(0, 1fr) minmax(0, 48%); }
.rdock-body { flex: 1; min-height: 0; overflow: auto; }
/* The shell's own right-dock panels wear the property rows (docs/regions.md § property rows): the dock's inset, a
   label column and a value column of fixed share, the value's field filling it. */
.rdock .details { flex-direction: column; flex-wrap: nowrap; align-items: stretch; max-height: none; border: 0; background: transparent; padding: 8px var(--rdock-inset); gap: 4px; }
.rdock .details > .field, .rdock .variant-card .field { display: grid; grid-template-columns: var(--rdock-cols); align-items: center; gap: 8px; min-height: 28px; }
.rdock .details > .field label { margin: 0; font: var(--fs-ui) var(--font-sans); color: hsl(var(--text-2)); }
.rdock .details > .field > :is(input, select, textarea) { width: 100%; max-width: none; min-width: 0; }
.rdock .variant-card { flex-direction: column; gap: 0; }
.rdock .variant-card .field span { text-align: end; overflow-wrap: anywhere; }
.rdock .kv { padding-inline: 0; }
.rdock .details .field-value { display: flex; align-items: center; justify-content: flex-end; gap: 4px; min-width: 0; text-align: end; }
.rdock .details-actions { display: flex; justify-content: flex-end; gap: 2px; }
.rdock .details-empty { margin: 4px 0; font-size: var(--fs-body); }
.rdock .empty { margin: 16px var(--rdock-inset); }
/* The shell's panel parts, the kit's in the shell's terms: a section head (medium, sentence case; a count after it,
   muted), read-only properties as a definition list on --rdock-cols (the value at the value column's right edge),
   and an action as an icon button (its name the tooltip and the accessible name). */
.rdock .panel-head { display: flex; align-items: center; gap: 6px; min-height: 28px; margin: 0; font: 500 var(--fs-ui) var(--font-sans); letter-spacing: 0; text-transform: none; color: hsl(var(--text-1)); }
.rdock .panel-head .muted { font-weight: 400; color: hsl(var(--text-3)); }
.rdock dl.props { display: grid; grid-template-columns: var(--rdock-cols); align-items: baseline; gap: 0 8px; margin: 0; font-size: var(--fs-ui); }
.rdock dl.props dt { min-height: 24px; padding-top: 4px; color: hsl(var(--text-2)); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rdock dl.props dd { margin: 0; padding-top: 4px; text-align: end; color: hsl(var(--text-1)); min-width: 0; overflow-wrap: anywhere; }
.rdock .icon-act { display: inline-grid; place-items: center; flex: none; width: 24px; height: 24px; min-height: 0; padding: 0; border: 0; border-radius: 2px; background: transparent; color: hsl(var(--text-2)); }
.rdock .icon-act:hover { color: hsl(var(--text-1)); background: hsl(var(--bg-2)); }
.rdock .icon-act svg { width: 14px; height: 14px; }
.events { flex: 1; overflow: auto; font: var(--fs-caption)/1.5 var(--font-mono); padding: 4px 0; }
.event { padding: 1px 12px; color: hsl(var(--text-2)); }
.event.error { color: hsl(var(--danger)); }
.event-time { color: hsl(var(--text-4)); margin-inline-end: 12px; }
.event-detail { margin: 2px 0 4px 64px; white-space: pre-wrap; color: hsl(var(--text-4)); font: inherit; max-height: 12em; overflow: auto; }
.dock-tab .tab-dot { display: inline-block; width: 5px; height: 5px; margin-inline-start: 5px; vertical-align: middle; border-radius: 50%; background: hsl(var(--brand)); }
.tree { padding: 4px 8px 8px; }
.tree-row { display: flex; align-items: center; gap: 6px; width: 100%; min-height: 32px; height: auto; border: 0; border-radius: 8px; background: transparent; color: hsl(var(--text-2)); font-size: var(--fs-ui); padding-block: 4px; padding-inline-end: 8px; text-align: start; transition: background-color 120ms ease, color 120ms ease; }
.tree-row:hover { background: hsl(var(--bg-2) / .65); color: hsl(var(--text-1)); }
.tree-row.selected { background: hsl(var(--bg-2)); color: hsl(var(--text-1)); font-weight: 500; }
/* project view */
.project { max-width: 1100px; display: grid; gap: 12px; font-size: var(--fs-body); }
.project > p { color: hsl(var(--text-2)); }
.project-status { display: flex; align-items: center; gap: 12px; font: var(--fs-caption) var(--font-mono); color: hsl(var(--text-2)); }
.project h3 { margin-top: 8px; }
.project td.attention { color: hsl(var(--warn)); }
.project ul { margin: 0; padding-inline-start: 16px; font-size: var(--fs-ui); color: hsl(var(--text-2)); }

/* empty pane (new tab / new split): calm, one pointer to the explorer, recent files, the keymap */
.blank { max-width: 44ch; margin: 12vh auto 0; display: grid; gap: 12px; color: hsl(var(--text-3)); font-size: var(--fs-body); }
.blank h2 { color: hsl(var(--text-1)); font-size: var(--fs-title); font-weight: 600; }
.blank .toolbar { flex-wrap: wrap; }
.recent { display: grid; margin-top: 8px; border-top: 1px solid hsl(var(--border-1)); padding-top: 8px; }
.recent h3 { margin-bottom: 4px; }
.recent-row { display: flex; align-items: center; width: 100%; min-height: 34px; border: 0; border-radius: var(--radius-control); background: transparent; padding: 0 10px; gap: 8px; font-size: var(--fs-ui); color: hsl(var(--text-2)); text-align: start; transition: background-color 120ms ease, color 120ms ease; }
.recent-row:hover { background: hsl(var(--bg-2) / .65); color: hsl(var(--text-1)); }
.recent-name { flex: none; }
.recent-row small { min-width: 0; overflow: hidden; text-overflow: ellipsis; font: var(--fs-caption) var(--font-mono); color: hsl(var(--text-4)); }
/* the Home (home.js; docs/home.md): the app's icon, the prompt bar, one row of suggestions, the list (My <things> or Recent), the desktop's open
   folder. The action tiles are the shell's one rounded thing, by the owner's decision (docs/wave-i.md §3). */
/* centred in the pane: auto margins in a flex column, so a tall new tab still scrolls from its top */
.start-body { display: flex; flex-direction: column; }
.start { width: 100%; max-width: 920px; margin: auto; padding: 24px 0; display: grid; gap: 22px; align-content: start; }
/* min-width 0: else the widest tile's nowrap hint widens the track past a narrow pane */
.start > * { min-width: 0; }
.start-group h3 { display: flex; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.start-note { font: var(--fs-caption) var(--font-mono); letter-spacing: 0; text-transform: none; color: hsl(var(--text-4)); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.start-prompt { display: flex; align-items: center; gap: 6px; padding: 6px 6px 6px 16px; border-radius: 999px; background: hsl(var(--bg-1)); border: 1px solid hsl(var(--border-1)); }
.start-prompt:focus-within { background: hsl(var(--bg-2)); border-color: hsl(var(--brand) / .6); }
.start-prompt-field { flex: 1; min-width: 0; height: 32px; border: 0; background: transparent; color: hsl(var(--text-1)); font-size: var(--fs-composer); font-weight: var(--fw-composer); line-height: 1.45; letter-spacing: -.006em; -webkit-font-smoothing: antialiased; outline: 0; }
.start-prompt-send { flex: none; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 50%; display: grid; place-items: center; background: hsl(var(--brand)); color: hsl(var(--bg-0)); }
.send-round { flex: none; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 50%; display: inline-grid; place-items: center; background: hsl(var(--brand)); color: hsl(var(--bg-0)); cursor: pointer; }
.send-round:disabled { opacity: .45; cursor: default; }
.start-ask { display: grid; gap: 6px; }
/* The line above the prompt bar (home.js): what the user agent's awareness of the folder asks, centred. The eye goes
   down from it to the bar, then to the suggestions that sharpen it. */
.start-line { margin: 0 0 10px; padding: 0 16px; text-align: center; text-wrap: balance; font: 600 var(--fs-heading)/1.25 var(--font-sans); letter-spacing: -.01em; color: hsl(var(--text-1)); overflow-wrap: anywhere; }
/* The mic (dictation.js): quiet at rest, the danger hue with a slow pulse while it listens. */
.prompt-mic { flex: none; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 50%; display: grid; place-items: center; background: transparent; color: hsl(var(--text-3)); }
.prompt-mic:hover { background: hsl(var(--bg-3)); color: hsl(var(--text-1)); }
.prompt-mic[data-dictation=listening] { background: hsl(var(--danger) / .16); color: hsl(var(--danger)); animation: prompt-listening 1.6s ease-in-out infinite; }
.prompt-mic[data-dictation=loading] { color: hsl(var(--text-1)); animation: cagi-saving 1.2s ease-in-out infinite; }
@keyframes prompt-listening { 50% { box-shadow: 0 0 0 4px hsl(var(--danger) / .14); } }
.prompt-note { padding: 0 16px; font: var(--fs-caption) var(--font-mono); color: hsl(var(--text-3)); }
.prompt-note[data-dictation=error] { color: hsl(var(--danger)); }
.start-more { margin-inline-start: auto; display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 6px; border: 0; background: transparent; color: hsl(var(--text-3)); font: var(--fs-caption) var(--font-mono); text-transform: none; letter-spacing: 0; }
.start-more:hover { color: hsl(var(--text-1)); }
.start-open { justify-self: start; height: 28px; padding: 0 12px; border: 1px solid hsl(var(--border-1)); border-radius: 999px; color: hsl(var(--text-2)); }
.start-open:hover { background: hsl(var(--bg-2)); color: hsl(var(--text-1)); }
/* A suggested action is drawn as a file tile of the file browser (fileTiles.tsx, tile/chrome.tsx): a 168px track, two a row at
   the least, a 16:9 rounded plate with the glyph, the words under it. */
.action-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(168px, calc(50% - 6px)), 1fr)); gap: 12px; }
/* The Home's suggestions are one row that scrolls sideways: each tile keeps the grid's track width. */
.action-row { display: grid; grid-auto-flow: column; grid-auto-columns: min(168px, calc(50% - 6px)); grid-template-columns: none; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: thin; padding-bottom: 4px; }
.home-icon { justify-self: center; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: hsl(var(--bg-1)); color: hsl(var(--text-1)); }
.home-sort { margin-inline-start: auto; height: 22px; padding: 0 4px; border: 1px solid hsl(var(--border-1)); border-radius: 6px; background: transparent; color: hsl(var(--text-2)); font: var(--fs-caption) var(--font-mono); text-transform: none; letter-spacing: 0; }
.home-sort + .start-more { margin-inline-start: 0; }
.home-list-fold { display: inline-flex; align-items: center; gap: 6px; height: auto; padding: 0; border: 0; background: transparent; color: inherit; font: inherit; letter-spacing: inherit; text-transform: inherit; cursor: pointer; }
.home-list-fold:hover, .home-list-fold:focus-visible { background: transparent; color: hsl(var(--text-1)); }
.home-list-fold svg { color: hsl(var(--text-4)); transition: transform .16s; }
.home-list-fold[aria-expanded="false"] svg { transform: rotate(-90deg); }
.home-list.folded h3 { margin-bottom: 0; }
.start-fail[data-home-error] { display: flex; align-items: center; gap: 10px; }
.action-tile { display: flex; flex-direction: column; align-items: stretch; gap: 0; height: auto; padding: 0; border: 0; border-radius: 16px; background: transparent; color: hsl(var(--text-1)); text-align: start; white-space: normal; min-width: 0; }
.action-tile:hover, .action-tile:focus-visible { background: transparent; }
.action-glyph { aspect-ratio: 16 / 9; width: 100%; display: grid; place-items: center; border-radius: 16px; background: hsl(var(--bg-1)); color: hsl(var(--text-2)); transition: background-color .12s, color .12s; }
/* the glyph scales with the plate, as a file tile's does (TILE_GLYPH_SCALE) */
.action-glyph svg { width: auto; height: 56%; }
/* an app's tile is a solid block: smaller than a line glyph so the plate keeps its open space */
.action-glyph svg.app-icon { height: 40%; }
.action-tile:hover .action-glyph, .action-tile:focus-visible .action-glyph { background: hsl(var(--bg-2)); color: hsl(var(--brand)); }
.action-tile[data-verb="ask"] .action-glyph { color: hsl(var(--brand)); }
/* A suggestion's picture (previews.js): the file drawn by the code that opens it, on the same plate; text is live text. */
.action-picture { overflow: hidden; place-items: stretch; }
.action-picture img { width: 100%; height: 100%; object-fit: cover; display: block; }
.action-text { overflow: hidden; place-items: start; padding: 8px 10px; }
.action-text pre { margin: 0; width: 100%; font: 8.5px/1.35 var(--font-mono); color: hsl(var(--text-3)); white-space: pre; overflow: hidden; }
.action-tile:hover .action-text pre { color: hsl(var(--text-2)); }
/* A tile with nothing to draw shows its poster: its own words, large, cut at the plate's foot, and its glyph where a
   picture's badge is. */
.action-poster { position: relative; overflow: hidden; place-items: start; padding: 10px 12px; background: linear-gradient(150deg, hsl(var(--bg-2)), hsl(var(--bg-1)) 55%, hsl(var(--brand) / .14)); }
.action-poster-words { display: block; font: 600 15px/1.2 var(--font-sans); letter-spacing: -.01em; color: hsl(var(--text-2)); overflow-wrap: anywhere; -webkit-mask-image: linear-gradient(#000 55%, transparent 96%); mask-image: linear-gradient(#000 55%, transparent 96%); max-height: 100%; }
.action-tile:hover .action-poster, .action-tile:focus-visible .action-poster { background: linear-gradient(150deg, hsl(var(--bg-3)), hsl(var(--bg-2)) 55%, hsl(var(--brand) / .2)); }
.action-tile:hover .action-poster-words, .action-tile:focus-visible .action-poster-words { color: hsl(var(--text-1)); }
/* A picture that is not the tile's own file carries a badge: chat on an ask (it stays a question), plus on a shipped
   example of what a new document or an action makes. */
.action-picture, .action-text { position: relative; }
.action-badge { position: absolute; inset-inline-end: 6px; bottom: 6px; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: hsl(var(--bg-0) / .85); color: hsl(var(--brand)); box-shadow: 0 0 0 1px hsl(var(--border-2)); }
.action-glyph .action-badge svg { width: 12px; height: 12px; }
.action-title { padding: 4px 6px 0; font-size: var(--fs-ui); line-height: 1.35; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.action-hint { padding: 2px 6px 8px; max-width: 100%; font: var(--fs-caption)/1.35 var(--font-mono); color: hsl(var(--text-4)); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* minmax(0, 1fr): else a long path widens the track and the folder is never cut with an ellipsis */
.start-recent { display: grid; grid-template-columns: minmax(0, 1fr); margin: 0; padding: 0; list-style: none; }
.start-recent .recent-row { min-width: 0; overflow: hidden; min-height: 34px; height: auto; align-items: center; padding: 0 8px; gap: 12px; }
.start-recent .recent-name { font-size: var(--fs-ui); color: hsl(var(--text-1)); max-width: 45%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.start-recent .recent-row small { flex: 1; min-width: 0; text-align: start; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.recent-when { flex: none; font: var(--fs-caption) var(--font-mono); color: hsl(var(--text-4)); }
/* The hosts a row needs (docs/capabilities.md § hosts): the same three glyphs an agent's capabilities list draws. */
.recent-needs { flex: none; display: inline-flex; align-items: center; gap: 4px; color: hsl(var(--text-4)); }
/* A group's heading in a grouped list (My Skills by category): the vocabulary's word, small, above its rows. */
.start-recent .start-group-head { padding: 10px 8px 2px; font-size: var(--fs-micro); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: hsl(var(--text-4)); }
/* A row with actions: its ⋯ beside it, shown on hover or focus (docs/home.md § the list). */
.start-recent li.has-actions { display: flex; align-items: center; min-width: 0; }
.start-recent li.has-actions .recent-row { flex: 1; }
.row-more { flex: none; display: grid; place-items: center; width: 22px; height: 22px; padding: 0; border: 0; border-radius: 6px; background: transparent; color: hsl(var(--text-4)); opacity: 0; }
.start-recent li:hover .row-more, .row-more:focus-visible, .row-more[aria-expanded=true] { opacity: 1; }
.row-more:hover { background: hsl(var(--bg-2)); color: hsl(var(--text-1)); }
@media (hover: none) { .row-more { opacity: 1; } }
[data-row-state=working] .recent-dir { color: hsl(var(--brand)); }
.start-none, .start-fail { margin: 0; font: var(--fs-body) var(--font-sans); color: hsl(var(--text-4)); }
.start-fail { color: hsl(var(--text-2)); }
/* The Home's map (embeddings-view.js; docs/home.md § the map): the files on a sphere, on a plate like a tile's, with the
   search and the tools in the heading, the cluster labels as text over the canvas, a hover card, and a legend of chips.
   Calm: one accent (the selected point's halo and the lasso), the rest in the surface and ink tokens. */
/* The map: a view of its own (docs/home.md § the map); its stage takes the pane's height. */
.map-page { display: flex; flex-direction: column; }
.map-view { display: flex; flex-direction: column; gap: 10px; flex: 1; min-height: 0; padding: 12px 16px 16px; }
.map-view > h3 { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; row-gap: 6px; margin: 0; }
.map-view > .map { display: flex; flex-direction: column; gap: 10px; flex: 1; min-height: 0; }
.map-view .map-stage { flex: 1; height: auto; min-height: 320px; }
.map-search-box { position: relative; margin-inline-start: auto; }
.map-search { height: 22px; width: 180px; padding: 0 10px; border: 1px solid hsl(var(--border-1)); border-radius: 999px; background: hsl(var(--bg-1)); color: hsl(var(--text-1)); font: 11px var(--font-sans); letter-spacing: 0; text-transform: none; outline: 0; }
.map-search:focus { border-color: hsl(var(--brand) / .6); background: hsl(var(--bg-2)); }
.map-found { position: absolute; top: 26px; inset-inline-end: 0; z-index: 3; margin: 0; padding: 4px; list-style: none; min-width: 240px; max-width: 320px; background: var(--surface-float); backdrop-filter: var(--blur-float); border: 1px solid hsl(var(--border-2)); border-radius: 10px; box-shadow: var(--shadow-float); text-transform: none; letter-spacing: 0; }
.map-found:empty { display: none; }
.map-hit, .map-neighbour, .map-chip { display: flex; align-items: center; gap: 8px; width: 100%; height: 26px; padding: 0 8px; border: 0; border-radius: 6px; background: transparent; color: hsl(var(--text-1)); font: 12px var(--font-sans); text-align: start; text-transform: none; letter-spacing: 0; box-sizing: border-box; }
.map-hit:hover, .map-neighbour:hover { background: hsl(var(--bg-2)); }
.map-hit-title, .map-neighbour-title, .map-chip-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.map-swatch { flex: none; width: 8px; height: 8px; border-radius: 50%; }
.map-tools { flex: none; margin-inline-start: 2px; }
.map-view .map-search-box + .map-tools { margin-inline-start: 2px; }
.map-colour { position: relative; display: inline-flex; }
.map-colour-menu { position: absolute; inset-inline-end: 0; top: calc(100% + 4px); z-index: 5; display: flex; flex-direction: column; gap: 2px; min-width: 168px; padding: 4px; border-radius: 8px; background: hsl(var(--bg-1)); box-shadow: 0 12px 32px hsl(0 0% 0% / 0.28); }
.map-colour-row { display: flex; align-items: center; gap: 4px; }
.map-colour-item { flex: 1; height: 26px; padding: 0 8px; border: 0; border-radius: 6px; background: transparent; color: hsl(var(--text-2)); font: 12px var(--font-sans); text-align: start; text-transform: none; letter-spacing: 0; }
.map-colour-item:hover { background: hsl(var(--bg-2)); color: hsl(var(--text-1)); }
.map-colour-item[aria-checked=true] { color: hsl(var(--text-1)); box-shadow: inset 0 0 0 1px hsl(var(--brand)); }
.map-colour-depth { height: 24px; font: 11px var(--font-mono); }
.map-chip-none { cursor: default; }
.map { display: grid; gap: 8px; }
.map-stage { position: relative; height: clamp(240px, 42vh, 420px); border-radius: 16px; background: hsl(var(--bg-1)); overflow: hidden; }
.map-host, .map-scene { position: absolute; inset: 0; }
/* The graph (graph-view.js): a canvas over the stage; an edge kind's chip shows its line (square ends, no radius). */
.graph-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: default; touch-action: none; }
.graph-edge-chip { display: inline-flex; align-items: center; gap: 6px; }
.graph-edge-swatch { width: 18px; height: 0; border-top-color: hsl(var(--text-3)); border-radius: 0; }
.graph-missing { color: hsl(var(--warn)); }
/* The edge filter and the flows' period select sit on one line under the stage. */
.graph-edge-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.graph-edge-filters .map-legend { flex: 1 1 auto; }
.graph-period { flex: none; }
/* A checked kind of the filter keeps its pill, outlined on every edge (a one-edge line never on rounded corners). */
html .map-chip.map-kind[aria-pressed=true] { border-radius: 999px; background: hsl(var(--bg-2)); color: hsl(var(--text-1)); box-shadow: inset 0 0 0 1px hsl(var(--brand)); }
.map-canvas { display: block; width: 100% !important; height: 100% !important; touch-action: none; }
.map-labels { position: absolute; inset: 0; pointer-events: none; }
.map-label { position: absolute; left: 0; top: 0; font: 11px var(--font-sans); color: hsl(var(--text-2)); letter-spacing: .01em; white-space: nowrap; text-shadow: 0 0 6px hsl(var(--bg-1)), 0 0 2px hsl(var(--bg-1)); will-change: transform, opacity; transition: opacity .18s linear; }
/* A label that gave way to another shows while the pointer is on its cluster, over the rest. */
.map-label.forced { z-index: 1; color: hsl(var(--text-1)); }
.map-lasso { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.map-lasso.on { pointer-events: auto; cursor: crosshair; touch-action: none; }
.map-lasso path { fill: hsl(var(--brand) / .12); stroke: hsl(var(--brand)); stroke-width: 1.5; stroke-dasharray: 4 3; }
.map-card { position: absolute; z-index: 2; display: grid; gap: 6px; width: 220px; padding: 6px; border-radius: 10px; background: var(--surface-float); backdrop-filter: var(--blur-float); border: 1px solid hsl(var(--border-2)); box-shadow: var(--shadow-float); pointer-events: none; }
.map-plate { flex: none; display: grid; place-items: center; width: 64px; aspect-ratio: 16 / 9; border-radius: 6px; background: hsl(var(--bg-2)); color: hsl(var(--text-3)); overflow: hidden; }
.map-plate img { width: 100%; height: 100%; object-fit: cover; display: block; }
.map-plate pre { margin: 0; align-self: start; justify-self: start; padding: 3px; font: 5px/1.3 var(--font-mono); color: hsl(var(--text-3)); }
.map-card .map-card-picture { width: 100%; }
.map-card-words { display: grid; align-content: center; min-width: 0; padding: 0 2px 2px; }
.map-card-title { font-size: 12px; color: hsl(var(--text-1)); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.map-card-hint { font: 10px var(--font-mono); color: hsl(var(--text-4)); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.map-legend { display: flex; flex-wrap: wrap; gap: 4px; overflow: hidden; }
.map-legend.open { max-height: 148px; overflow-y: auto; scrollbar-width: thin; }
.map-chip[hidden] { display: none; }
.map-more-chip { cursor: pointer; color: hsl(var(--text-1)); }
.map-chip { width: auto; flex: none; height: 24px; padding: 0 10px 0 8px; border-radius: 999px; background: hsl(var(--bg-1)); color: hsl(var(--text-2)); font-size: 11px; }
.map-chip:hover { background: hsl(var(--bg-2)); color: hsl(var(--text-1)); }
.map-chip small, .map-hit small, .map-neighbour small { flex: none; font: 10px var(--font-mono); color: hsl(var(--text-4)); }
.map-lost { position: absolute; inset: auto 12px 12px; z-index: 2; display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 10px; background: var(--surface-float); border: 1px solid hsl(var(--border-2)); }
/* The right dock: a point of the map, its neighbours and open (docs/regions.md § the map's details). */
.map-details { display: grid; gap: 10px; padding: 10px var(--rdock-inset); max-width: 100%; box-sizing: border-box; }
.map-details > * { min-width: 0; }
.map-details-picture { width: 100%; aspect-ratio: 16 / 9; border-radius: 10px; }
/* A file with no picture here (a web address) shows its glyph on a low plate, not an empty frame. */
.map-details-picture:not(.drawn) { aspect-ratio: 16 / 5; }
.map-details-picture pre { font-size: 7px; }
.map-details h2 { margin: 0; font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.map-details h3 { margin: 0; }
.map-details-rows { display: grid; grid-template-columns: var(--rdock-cols); gap: 4px 8px; margin: 0; font-size: 11.5px; }
.map-details-rows dt { color: hsl(var(--text-3)); }
.map-details-rows dd { margin: 0; min-width: 0; overflow-wrap: anywhere; color: hsl(var(--text-1)); }
.map-details-actions { display: flex; gap: 6px; }
.map-open { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 12px; border: 1px solid hsl(var(--border-2)); border-radius: 999px; background: hsl(var(--bg-1)); color: hsl(var(--text-1)); font-size: 12px; text-transform: none; letter-spacing: 0; }
.map-visit { color: hsl(var(--text-3)); }
.map-open:hover { background: hsl(var(--bg-2)); border-color: hsl(var(--brand) / .6); }
.map-neighbours { margin: 0 calc(-1 * var(--rdock-inset)); padding: 0; list-style: none; display: grid; grid-template-columns: minmax(0, 1fr); }
.map-neighbours li { min-width: 0; display: flex; align-items: center; }
.map-neighbours li > .map-neighbour { flex: 1; min-width: 0; }
.map-neighbour:has(.map-neighbour-words) { height: 40px; }
.map-neighbour-picture { width: 48px; border-radius: 4px; }
.map-neighbour-picture pre { font-size: 3px; }
.map-neighbour-words { flex: 1; min-width: 0; display: grid; }
.map-neighbour-hint { font: 10px var(--font-mono); color: hsl(var(--text-4)); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.map-neighbour-find { flex: none; display: grid; place-items: center; width: 26px; height: 26px; margin-inline-end: calc(var(--rdock-inset) - 6px); border: 0; border-radius: 6px; background: transparent; color: hsl(var(--text-3)); }
.map-neighbour-find:hover { background: hsl(var(--bg-2)); color: hsl(var(--text-1)); }
.map-neighbours .map-neighbour { border-radius: 0; padding: 0 var(--rdock-inset); max-width: 100%; box-sizing: border-box; }
.map-more { padding: 4px var(--rdock-inset); font: 10px var(--font-mono); color: hsl(var(--text-4)); }
@media (max-width: 640px) { .map-stage { height: 60vw; } .map-search { width: 120px; } .map-card { width: 180px; } }
.keys { display: grid; grid-template-columns: auto 1fr; gap: 2px 16px; margin: 16px 0 0; padding-top: 12px; border-top: 1px solid hsl(var(--border-1)); font-size: var(--fs-caption); }
.keys dt, .keys dd { margin: 0; }
.keys dd { color: hsl(var(--text-3)); }
.scrim { display: none; }

/* safe areas (notch, home indicator, rounded corners) apply at every width */
.shell { padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); width: 100%; overflow: hidden; }
.toast { bottom: calc(12px + env(safe-area-inset-bottom)); max-width: min(340px, calc(100vw - 24px)); }

/* touch (iPad, phones): no hover-only affordances, targets >= 36px, hover dimming off, no keymap to show */
@media (hover: none) {
  .nav-section:hover .nav-item:not(:hover):not(.selected) { color: hsl(var(--text-2)); }
  .keys { display: none; }
}
@media (pointer: coarse) {
  :root { --header-h: 48px; --row-h: 36px; --tap: 36px; }
  button:where(:not(.cagi-app *)) { height: auto; min-height: var(--tap); padding: 4px 10px; }
  button.quiet:where(:not(.cagi-app *)) { min-width: var(--tap); justify-content: center; }
  input, select { height: var(--tap); font-size: 16px; }
  textarea, .search { font-size: 16px; }
  .nav-item, .tree-row, .menu-item, .recent-row, .outline-row { min-height: var(--tap); }
  .item { min-height: var(--tap); padding: 8px 12px; }
  .tab { min-width: 120px; }
  .tab-close { width: 32px; height: 32px; }
  .chrome-button { width: var(--tap); height: var(--tap); min-height: var(--tap); padding: 0; }
  .detail-row button { height: 32px; min-height: 32px; }
  .detail-row button.quiet, .detail-row .head-more { min-width: 32px; }
  button.tool, .ed-bar button.tool { width: var(--tap); min-width: var(--tap); height: var(--tap); min-height: var(--tap); }
  .detail-row button.tool { width: 32px; min-width: 32px; height: 32px; min-height: 32px; }
  .dock-tab { min-height: 0; }
  .nav-label button { min-height: 28px; height: 28px; }
  .splitter::after { inset: 0 -10px; }
  .pane-divider::after { inset: -10px 0; }
  .pane-divider.x::after { inset: 0 -10px; }
  td input { height: 28px; min-height: 28px; font-size: 14px; }
  .details input { width: 104px; }
}

/* a narrow pane (split, iPad portrait, phone) drops the kind label from its header; the row never wraps */
.pane { container-type: inline-size; }
@container (max-width: 560px) {
    .scene-hint { display: none; }
  .scene-tools { flex-wrap: wrap; }
}

/* phone (docs/regions.md § the phone): no rails; one column, one pane at a time, its header the top bar; the left dock
   is a drawer from the screen's edge, the right dock a bottom sheet; nothing of the shell at the foot */
@media (max-width: 640px) {
  :root { --header-h: 48px; --row-h: 40px; --tap: 40px; }
  button:where(:not(.cagi-app *)) { height: auto; min-height: var(--tap); }
  .nav-item, .tree-row, .menu-item, .recent-row, .item, .outline-row { min-height: var(--tap); }
  .shell { grid-template-rows: minmax(0, 1fr) auto auto; padding-bottom: 0; }
  .wide-only { display: none; }
  .share-strip .share-meta, .share-strip .badge { display: none; }
  .share-strip .share-name { flex: 1 1 auto; }
  .main { grid-template-columns: minmax(0, 1fr) !important; }
  .splitter { display: none !important; }
  .centre { grid-template-rows: minmax(0, 1fr) !important; }
  .share-mode .centre { grid-template-rows: var(--header-h) minmax(0, 1fr) !important; }
  /* The drawer: full height from x = 0, its own safe-area insets (the left one in landscape). */
  .dock { --drawer-w: calc(min(86vw, 360px) + env(safe-area-inset-left)); position: fixed; z-index: 30; top: 0; bottom: 0; inset-inline-start: 0; width: var(--drawer-w); padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom) env(safe-area-inset-left); border-inline-end: 1px solid hsl(var(--border-2)); box-shadow: 0 0 40px #000c; }
  /* The sheet: the pane's right tabs from the bottom, 70% of the screen, the .sheet look. */
  .dock.rdock { top: auto; bottom: 0; inset-inline: 0; width: auto; height: 70dvh; padding: 0 env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); border: 1px solid hsl(var(--border-2)); border-bottom: 0; border-radius: 12px 12px 0 0; box-shadow: var(--shadow-modal); }
  .dock.rdock > .rdock-grab { flex: none; display: flex; justify-content: center; padding: 8px 0 4px; touch-action: none; cursor: grab; }
  .dock.rdock > .rdock-grab span { width: 36px; height: 4px; border-radius: 2px; background: hsl(var(--border-2)); }
  .dock.rdock > .panel-header { touch-action: none; }
  .panel-header > .sheet-x { margin-inline-start: auto; }
  .panel-header-actions:not([hidden]) + .sheet-x { margin-inline-start: 4px; }
  /* The scrim dims only what the drawer or the sheet does not cover, so a tap on it always lands on it, and never
     covers something that must stay tappable. The drawer drags its edge along (app.js dragDrawers). */
  .scrim { display: block; position: fixed; inset: 0; z-index: 29; background: #000a; }
  .shell[data-drawer=left] .scrim { inset-inline-start: calc(min(86vw, 360px) + env(safe-area-inset-left)); }
  .shell[data-drawer=right] .scrim { bottom: 70dvh; }
  /* The rail laid flat: the drawer's strip (its tabs, a hairline, the pinned apps) and the sheet's (its tabs, when two
     or more). Active tab uses a clean rounded pill fill. */
  .dock > .rail.drawer-strip { flex: none; flex-direction: row; align-items: center; width: auto; height: 48px; padding: 0 8px; gap: 4px; border: 0; border-bottom: 1px solid hsl(var(--border-1)); background: transparent; overflow-x: auto; overflow-y: hidden; overscroll-behavior: contain; touch-action: pan-x; scrollbar-width: none; }
  .dock > .rail.drawer-strip::-webkit-scrollbar { display: none; }
  .dock > .rail.drawer-strip .dock-tabs { flex: none; flex-direction: row; align-items: center; gap: 4px; width: auto; height: 100%; overflow: visible; touch-action: pan-x; }
  .dock > .rail.drawer-strip .dock-tab { width: 38px; height: 36px; border-radius: 10px; }
  .dock > .rail.drawer-strip .dock-tab.active { background: hsl(var(--bg-dock-2)); color: hsl(var(--text-1)); }
  .dock > .rail.drawer-strip .dock-tab.active .nav-glyph { color: hsl(var(--text-1)); }
  .dock > .rail.drawer-strip .rail-pins { flex: none; flex-direction: row; width: auto; height: 100%; padding: 0 4px; overflow: visible; }
  .dock > .rail.drawer-strip .rail-hairline { width: 1px; height: 20px; margin: 0 6px 0 2px; }
  .dock.rdock > .rail.drawer-strip:not(:has(.dock-tab ~ .dock-tab)) { display: none; }
  /* + New beside the header's own buttons; the account as a row at the drawer's foot. */
  .panel-header > .rail-new { flex: none; margin-inline-start: 6px; }
  .panel-header > .panel-header-actions[hidden] + .rail-new { margin-inline-start: auto; }
  .rail-foot.drawer-foot { flex: none; flex-direction: column; align-items: stretch; gap: 4px; margin: 0; padding: 6px 8px; border-top: 1px solid hsl(var(--border-1)); }
  button.drawer-account { display: flex; align-items: center; justify-content: flex-start; gap: 10px; width: 100%; height: 48px; padding: 0 8px; border: 0; border-radius: 10px; background: transparent; color: hsl(var(--text-2)); font-size: 14px; }
  button.drawer-account:is(:hover, [aria-expanded=true]) { background: hsl(var(--bg-3)); }
  .drawer-account-face { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; overflow: hidden; background: hsl(var(--bg-2)); color: hsl(var(--text-1)); }
  .drawer-account-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: start; color: hsl(var(--text-1)); }
  /* The top bar: the focused pane's header, ← and ☰ before its title, ◨ (while the pane has right tabs) before ⋯. */
  .shell.phone .detail-row { gap: 4px; padding-inline-start: 2px; }
  .detail-row button.head-bar { flex: none; width: var(--tap); min-width: var(--tap); padding: 0; justify-content: center; border-color: transparent; color: hsl(var(--text-2)); }
  .shell[data-right-empty] .head-sheet { display: none; }
  .detail-row .head-sheet { position: relative; }
  .shell[data-right-dot] .head-sheet::after { content: ''; position: absolute; top: 9px; inset-inline-end: 9px; width: 6px; height: 6px; border-radius: 50%; background: hsl(var(--brand)); }
  /* Toasts under the bar: the foot is the app's (a composer, a prompt bar, the keyboard). */
  .toast { top: calc(env(safe-area-inset-top) + var(--header-h) + 8px); bottom: auto; inset-inline: 12px; max-width: none; }
  .detail-body { padding: 12px; }
  .two { grid-template-columns: 1fr; }
  .scene-caption { inset-inline-end: 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .scene-tools { flex-wrap: wrap; }
  .scene-hint { display: none; }
  .menu { min-width: 220px; max-width: calc(100vw - 8px); }
  .blank { margin-top: 6vh; }
  .source-code { max-height: none; }
}

/* the git sidebar tab */
.side-panel { display: flex; flex-direction: column; min-height: 0; overflow: auto; padding: 0 0 12px; }
.side-panel .master-header { gap: 2px; padding-inline-end: 4px; }
.side-panel .master-header .search { flex: 1; }
.search-line { flex: none; min-width: 28px; text-align: end; font: var(--fs-micro) var(--font-mono); color: hsl(var(--text-4)); }
.git-row { display: flex; align-items: center; gap: 2px; padding: 0 6px; }
.git-row .tree-row { flex: 1; min-width: 0; gap: 8px; padding-inline-start: 10px; }
.git-flag { flex: none; width: 14px; font: var(--fs-caption) var(--font-mono); color: hsl(var(--warn)); }
.git-commit { display: flex; flex-direction: column; gap: 4px; padding: 4px 12px 8px; }
.git-message { min-height: 44px; font: var(--fs-ui) var(--font-mono); }
.git-diff { margin: 4px 8px; max-height: 40vh; font-size: var(--fs-caption); }
.git-design-diff { margin: 4px 0; }
.git-conflict { margin: 4px 8px; }
.git-conflict-sides { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.git-conflict-side { min-width: 0; }
.git-conflict-side pre { margin: 2px 0; max-height: 30vh; overflow: auto; font-size: var(--fs-caption); }
.git-design-headline { padding: 2px 12px; font-size: var(--fs-ui); font-weight: 600; color: hsl(var(--text-1)); }
.git-design-item { padding: 1px 12px 1px 20px; font-size: var(--fs-caption); color: hsl(var(--text-2)); overflow-wrap: anywhere; }
.git-design-file + .git-design-file { margin-top: 6px; }
.git-design-path { padding: 2px 12px; font-family: var(--font-mono, monospace); font-size: var(--fs-caption); color: hsl(var(--text-2)); overflow-wrap: anywhere; }
.git-log { cursor: pointer; padding: 2px 12px; font-size: var(--fs-caption); color: hsl(var(--text-2)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.git-log.current { color: hsl(var(--text)); font-weight: 600; }
.git-log .git-checkout { padding: 0 4px; margin-right: 4px; font-size: var(--fs-caption); line-height: 1; }
.git-remote .dock-tab-label { flex: 1; min-width: 0; padding-left: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* icons: bigger glyphs, less padding around them */
.nav-glyph { width: 18px; min-width: 18px; font-size: 15px; line-height: 1; display: inline-flex; align-items: center; justify-content: center; }
.tab-glyph { display: inline-flex; align-items: center; justify-content: center; }
.tab-glyph { width: 16px; font-size: 14px; }
.dock-tab .nav-glyph { font-size: 16px; }
button.quiet:where(:not(.cagi-app *)) { font-size: 14px; }
button:where(.quiet):where(:not(.cagi-app *)) { padding: 2px 5px; }
.menu-item .nav-glyph { font-size: 15px; }

/* world kind: "real" is hardware and gets the accent; "sim" stays quiet */
.nav-item .world-kind { flex: none; margin-inline-start: 6px; font: 500 9px/1 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; padding: 2px 4px; border: 1px solid hsl(var(--border-2)); color: hsl(var(--text-4)); }
.nav-item .world-kind.physical { color: hsl(var(--brand)); border-color: hsl(var(--brand)); }

/* regions (docs/regions.md): contributed panel tabs, put-away docks, maximized bottom, cinema, region errors */
.panel-tabs { display: flex; align-items: stretch; flex: 0 1 auto; min-width: 0; overflow-x: auto; overflow-y: hidden; overscroll-behavior: contain; touch-action: pan-x; scrollbar-width: none; }
.panel-tabs .dock-tab .tab-close { width: 18px; height: 18px; margin-inline-start: 4px; }
.panel-tabs .dock-tab.active .tab-close, .panel-tabs .dock-tab:hover .tab-close { opacity: 1; }
.panel-tabs::-webkit-scrollbar { display: none; }
.panel-tabs button.dock-tab { max-width: 240px; }
.panel-body { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.rdock-body { display: flex; flex-direction: column; }
.rdock-body > .panel-body { overflow: auto; }
/* a splitter whose dock is put away stays as a grab edge: invisible until hovered or dragged */
.splitter.put-away { background: transparent; }
.splitter.put-away:hover, .splitter.put-away.dragging { background: hsl(var(--brand)); }
.tail-head { flex: none; display: flex; align-items: center; gap: 12px; height: var(--row-h); padding: 0 12px; border-bottom: 1px solid hsl(var(--border-1)); font: var(--fs-caption) var(--font-mono); color: hsl(var(--text-4)); white-space: nowrap; }
.tail-path { min-width: 0; overflow: hidden; text-overflow: ellipsis; color: hsl(var(--text-3)); }
.tail-status { margin-inline-start: auto; flex: none; }
.tail { flex: 1; min-height: 0; overflow: auto; margin: 0; padding: 4px 12px; font: var(--fs-caption)/1.5 var(--font-mono); color: hsl(var(--text-2)); white-space: pre; tab-size: 4; }
.region-error { display: flex; align-items: center; gap: 8px; margin: 6px 8px; padding: 6px 8px 6px 10px; border-radius: var(--radius-control); background: hsl(var(--danger) / .10); font: var(--fs-ui) var(--font-mono); color: hsl(var(--text-1)); }
.region-error-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; user-select: text; -webkit-user-select: text; }
.region-error .region-retry { flex: none; font: var(--fs-ui) var(--font-sans); border-color: hsl(var(--border-2)); color: hsl(var(--text-1)); }
/* maximized (a pane's ⋯ → maximize, Mod+Enter): the pane fills the room between the rails; the docks put themselves
   away (app.js resize) */
.shell.maximized .splitter { visibility: hidden; }
/* cinema: the focused pane alone (its header stays: it carries the world's physical/simulation scope) */
.shell.cinema { grid-template-rows: minmax(0, 1fr); }
.shell.cinema .main { grid-template-columns: minmax(0, 1fr) !important; }
.shell.cinema .centre { grid-template-rows: minmax(0, 1fr) !important; }
.shell.cinema .dock, .shell.cinema .rail, .shell.cinema .splitter, .shell.cinema .strip, .shell.cinema .timebar, .shell.cinema .scrim { display: none !important; }
.cinema-exit { position: fixed; z-index: 45; top: calc(var(--header-h) + 8px + env(safe-area-inset-top)); inset-inline-end: calc(8px + env(safe-area-inset-right)); background: hsl(var(--bg-1) / .88); border-color: hsl(var(--border-2)); color: hsl(var(--text-1)); }
.cinema-exit:hover { background: hsl(var(--bg-3)); }
/* presentation (?present, app.js): a world's 3D view fills the window; nothing is drawn over it */
.shell.present .viewport-wrap { position: fixed; inset: 0; z-index: 1000; min-height: 0; }
.shell.present .scene-caption, .shell.present .scene-foot, .shell.present .cinema-exit { display: none !important; }
body:has(.shell.present) .toast { display: none !important; }
.splitter.inert { pointer-events: none; }

/* the window's time bar (timeline.js, clock.js): one slim row at the foot of the centre column, hairline above, one accent */
.timebar { display: flex; align-items: center; gap: 10px; height: 30px; padding: 0 8px; background: hsl(var(--bg-1)); border-top: 1px solid hsl(var(--border-1)); font: var(--fs-caption) var(--font-mono); color: hsl(var(--text-3)); min-width: 0; }
.timebar[hidden] { display: none; }
.timebar .tb-play { width: 24px; height: 22px; min-height: 0; flex: none; padding: 0; display: inline-flex; align-items: center; justify-content: center; }
.timebar .tb-track { position: relative; flex: 1; min-width: 60px; height: 22px; cursor: pointer; touch-action: none; }
.timebar .tb-track::before { content: ''; position: absolute; inset-inline-start: 0; inset-inline-end: 0; top: 10px; height: 2px; background: hsl(var(--border-2)); }
.timebar .tb-fill { position: absolute; inset-inline-start: 0; top: 10px; height: 2px; background: hsl(var(--brand)); }
.timebar .tb-handle { position: absolute; top: 5px; width: 10px; height: 12px; margin-inline-start: -5px; background: hsl(var(--brand)); border: 2px solid hsl(var(--bg-1)); }
.timebar .tb-lane { position: absolute; height: 1px; background: hsl(var(--text-4)); opacity: .55; }
.timebar .tb-flags { position: absolute; inset: 0; pointer-events: none; }
.timebar .tb-flag { position: absolute; top: 2px; width: 2px; height: 9px; margin-inline-start: -1px; background: hsl(var(--ann-remark)); }
.timebar .tb-flag::after { content: ''; position: absolute; inset-inline-start: 2px; top: 0; width: 6px; height: 4px; background: inherit; }
.timebar .tb-flag.s-open { background: hsl(var(--ann-open)); }
.timebar .tb-flag.s-answered { background: hsl(var(--ann-answered)); }
.timebar .tb-flag.s-pin { background: hsl(var(--ann-pin)); box-shadow: 0 0 0 1px hsl(var(--ann-ink) / .5); }
.timebar .tb-lane.open { background: hsl(var(--brand)); opacity: .8; }
.timebar .tb-track:focus-visible { outline: 1px solid hsl(var(--brand)); }
.timebar .tb-times { flex: none; color: hsl(var(--text-2)); font-variant-numeric: tabular-nums; }
.timebar .tb-note { flex: none; min-width: 42px; color: hsl(var(--text-4)); text-transform: uppercase; letter-spacing: .08em; }
.timebar[data-mode=paused] .tb-note { color: hsl(var(--warn, var(--brand))); }
.timebar[data-mode=live] .tb-note { color: hsl(var(--danger)); }
.timebar .tb-live { height: 20px; min-height: 0; padding: 0 8px; font: 600 var(--fs-micro)/1 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; }
.timebar .tb-live.on { color: hsl(var(--danger)); border-color: hsl(var(--danger)); }
.timebar .tb-rate { height: 20px; min-height: 0; padding: 0 18px 0 2px; font: var(--fs-caption) var(--font-mono); color: hsl(var(--text-3)); }
.timebar .tb-span { height: 20px; min-height: 0; max-width: 140px; padding: 0 18px 0 2px; font: var(--fs-caption) var(--font-mono); color: hsl(var(--text-3)); }
.timebar .tb-span-box[hidden] { display: none; }
.timebar .tb-lane.zoom { background: hsl(var(--brand)); opacity: .8; }
@media (max-width: 640px) { .timebar { height: 36px; gap: 8px; padding: 0 8px; } .timebar .tb-note, .timebar .tb-rate, .timebar .tb-span-box { display: none; } .timebar .tb-play { width: 32px; height: 28px; } .timebar .tb-live { min-height: 28px; } .timebar .tb-track { height: 28px; } .timebar .tb-track::before, .timebar .tb-fill { top: 13px; } .timebar .tb-handle { top: 8px; } }
/* the pane's own scrubber, linked to it (editors/stream.js) */
.sv-scrub .sv-link { height: 22px; min-height: 0; padding: 0 8px; font: 10px var(--font-mono); }
.sv-scrub .sv-link[aria-pressed=true] { background: transparent; color: hsl(var(--brand)); border: 1px solid hsl(var(--brand)); }
.sv-scrub { flex-wrap: wrap; }
.sv-outside { font: 10px var(--font-mono); color: hsl(var(--text-4)); }
/* A run's conversation lines (the stream viewer's conversation, editors/stream.js). */
.rp-convo { display: flex; flex-direction: column; gap: 6px; flex: 1 1 auto; min-height: 64px; max-height: 240px; overflow: auto; }
.rp-msg { border-radius: var(--radius-control); background: hsl(var(--bg-1)); padding: 6px 10px; }
.rp-msg.agent { background: hsl(var(--brand) / .09); }
.rp-msg.future { opacity: .35; }
.rp-msg .rp-from { color: hsl(var(--text-2)); margin-inline-end: 8px; }
.rp-msg.erased { font-style: italic; }
.rp-msg .rp-writer { margin-inline-start: 0; margin-inline-end: 8px; }
.rp-msg .rp-text { white-space: pre-wrap; color: hsl(var(--text-2)); }

/* the devices app (devices-app.js) and the network tab (network.js): a compact rail of live tiles, chips, the work band, a theater. */
.detail-body.devices { align-content: start; }
.devices-controls { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-bottom: 8px; }
.devices-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { height: 28px; padding: 0 12px; font: var(--fs-caption) var(--font-sans, inherit); border-radius: 999px; }
.chip.selected { color: hsl(var(--bg-1)); border-color: transparent; background: hsl(var(--brand)); }
/* A unit is drawn as a file tile (as the new tab's suggestions are): a 16:9 rounded plate, the words under it. */
.devices-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(168px, calc(50% - 6px)), 1fr)); gap: 12px; }
.devices-tile { display: flex; flex-direction: column; align-items: stretch; gap: 0; height: auto; padding: 0; border: 0; border-radius: 16px; background: transparent; text-align: start; white-space: normal; min-width: 0; }
.devices-tile:hover { background: transparent; }
.devices-tile.selected .devices-face { box-shadow: 0 0 0 2px hsl(var(--brand)); }
.devices-tile:hover .devices-face, .devices-tile:focus-visible .devices-face { background: hsl(var(--bg-2)); color: hsl(var(--brand)); }
.devices-face { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; aspect-ratio: 16 / 9; border-radius: 16px; background: hsl(var(--bg-1)); color: hsl(var(--text-2)); overflow: hidden; transition: background-color .12s, color .12s; }
.devices-face video, .devices-thumb { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* previews.js draws every 3D picture here, off screen: the view sizes its drawing from this box */
.preview-stage { position: fixed; inset-inline-start: -10000px; top: 0; width: 320px; height: 180px; pointer-events: none; }
/* The preview page (preview.html): one file's picture at the asked size, nothing around it */
.preview-page [data-preview-subject] { display: block; overflow: hidden; }
.preview-page canvas { display: block; }
/* The embed page (embed-page.js, docs/shares.md § embedding a file): one editor filling a frame on the public sites. */
html:has(body.embed-page), body.embed-page { height: 100%; margin: 0; overflow: hidden; background: hsl(var(--bg-0)); }
.embed-page [data-embed-subject] { display: flex; flex-direction: column; height: 100dvh; }
.embed-page [data-embed-subject] > * { flex: 1; min-height: 0; }
.embed-page .embed-loading { display: grid; place-items: center; }
.embed-page .embed-failed { margin: auto; padding: 24px; color: hsl(var(--text-2)); }
/* The pane in the frame: its header row (shown when the editor puts tabs or actions in it), then the editor between the
   docks its panels go to (embed-page.js). A dock is an icon rail over the active panel, as the shell's right dock. */
/* The pane's header row is the shell's (.detail-head, .detail-row): the row is not dragged here. */
.embed-page .embed-head .detail-row { cursor: default; touch-action: auto; }
.embed-page .embed-head .cagi-head-slot { margin-inline-start: auto; display: flex; align-items: center; min-width: 0; }
.embed-page .embed-row { display: flex; min-height: 0; }
.embed-page .embed-pane { position: relative; flex: 1; min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.embed-page .embed-pane > * { flex: 1; min-height: 0; }
.embed-page .embed-dock { flex: 0 0 clamp(200px, 26%, 320px); display: flex; flex-direction: column; min-height: 0; border-inline-start: 1px solid hsl(var(--border-1)); background: hsl(var(--bg-1)); }
.embed-page .embed-dock[hidden] { display: none; }
.embed-page .embed-dock-left { order: -1; border-inline-start: 0; border-inline-end: 1px solid hsl(var(--border-1)); }
.embed-page .embed-dock-tabs { display: flex; flex-wrap: wrap; gap: 2px; padding: 4px; border-bottom: 1px solid hsl(var(--border-1)); }
.embed-page .embed-dock-tabs .dock-tab { width: 28px; height: 28px; padding: 0; display: grid; place-items: center; margin: 0; border-bottom: 0; }
.embed-page .embed-dock-tabs .dock-tab.active .nav-glyph { color: hsl(var(--text-1)); }
.embed-page .embed-dock-head { padding: 6px 10px 0; font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; color: hsl(var(--text-3)); }
.embed-page .embed-dock-body { flex: 1; min-height: 0; overflow: auto; }
.embed-page .embed-dock-body > .panel-body { height: 100%; }
/* A narrow frame keeps the editor: its docks go. */
@media (max-width: 640px) { .embed-page .embed-dock { display: none; } }
/* The embedded editor is the pane as the workbench shows it (its toolbar and view). Outside a pane, its bar ends
   with the file's size and a download (a pane keeps those in its header's menu): they go, so the bar is the pane's. */
.embed-page .ed-bar > .ed-grow ~ :is(.ed-ro, button) { display: none; }
/* The part a person picked, by its name (the 3D surface says it to a screen reader; here it is shown). */
.embed-page .embed-pick { position: fixed; inset-inline-start: 72px; bottom: 16px; z-index: 50; padding: 6px 10px; border: 1px solid hsl(var(--border-1)); border-radius: var(--radius-control); background: hsl(var(--bg-1)); color: hsl(var(--text-1)); font: 13px var(--font-sans, inherit); pointer-events: none; }
.embed-page .embed-pick:empty { display: none; }
/* An embed share's scenario buttons (embed-page.js scenarioBar): one row under the pane, square, its top edge a hairline. */
.embed-page [data-embed-subject] > .embed-scenarios { flex: 0 0 auto; display: flex; flex-wrap: wrap; align-items: center; gap: 4px; padding: 6px 8px; border-top: 1px solid hsl(var(--border-1)); background: hsl(var(--bg-1)); }
.embed-page .embed-scenarios button[aria-pressed="true"] { background: hsl(var(--bg-3)); color: hsl(var(--text-1)); }
.embed-page .embed-scenarios .embed-scenarios-note { margin-inline-start: auto; font-size: 12px; color: hsl(var(--text-3)); }
.preview-text { margin: 0; padding: 16px; height: 100%; overflow: hidden; white-space: pre; font: 12px/1.5 var(--font-mono); color: hsl(var(--text-2)); }
/* A share link's card (preview-page.js `drawCard`, docs/shares.md § link previews): brand band, picture, title. */
.preview-page .card { display: flex; flex-direction: column; gap: 20px; padding: 40px; background: hsl(var(--bg-0)); }
.preview-page .card .brand-logo { flex: none; width: 26px; height: 26px; margin: 0; background: hsl(var(--text-1)); }
.preview-page .card-head { display: flex; align-items: center; gap: 12px; height: 40px; }
.preview-page .card-name { font: 600 21px var(--font-sans, inherit); letter-spacing: .02em; color: hsl(var(--text-1)); }
.preview-page .card-by { margin-inline-start: auto; font: 15px var(--font-sans, inherit); color: hsl(var(--text-3)); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.preview-page .card-picture { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; overflow: hidden; border: 1px solid hsl(var(--border-1)); border-radius: 10px; background: hsl(var(--bg-1)); }
.preview-page .card-picture .preview-text { padding: 24px; font-size: 14px; }
.preview-page .card-title { flex: none; font: 500 26px/34px var(--font-sans, inherit); color: hsl(var(--text-1)); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.devices-cat { font: 500 var(--fs-caption) var(--font-sans, inherit); color: hsl(var(--text-3)); }
.devices-state { position: absolute; inset-inline-start: 8px; top: 8px; height: 20px; padding: 0 9px; border-radius: 999px; font-family: var(--font-sans, inherit); background: hsl(var(--bg-1) / .85); }
.devices-name { padding: 4px 6px 0; font-size: var(--fs-ui); line-height: 1.35; color: hsl(var(--text-1)); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.devices-tile small { padding: 2px 6px 8px; font: 10px/1.35 var(--font-mono); color: hsl(var(--text-4)); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.devices-runs td { font-size: 11px; vertical-align: top; }
.devices-streams { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; }
.devices-streams figure { margin: 0; }
/* the unit's details (right region): name and state, its facts (dl.props), its channels (rows wall to wall), two icon actions */
.rdock .details.devices-details { gap: 12px; padding: 12px var(--rdock-inset); }
.devices-details header { display: flex; align-items: center; gap: 8px; }
.devices-details header h3 { flex: 1; min-width: 0; margin: 0; font: 600 15px var(--font-sans, inherit); letter-spacing: 0; text-transform: none; color: hsl(var(--text-1)); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.devices-channels { list-style: none; padding: 0; margin: 0 calc(-1 * var(--rdock-inset, 14px)); border-block: 1px solid hsl(var(--border-1)); }
/* The bench checklist's running log: what the runner said as it walked the steps. */
.devices-bench-log { max-height: 320px; overflow: auto; margin: 0; padding: 10px; border: 1px solid hsl(var(--border-1)); border-radius: 10px; background: hsl(var(--bg-2)); font: 11px/1.5 var(--font-mono); white-space: pre-wrap; }
.devices-channels li { display: grid; grid-template-columns: 6px 1fr auto auto; align-items: center; gap: 10px; min-height: 28px; padding: 2px var(--rdock-inset, 14px); font-size: 11.5px; }
.devices-channels li + li { border-top: 1px solid hsl(var(--border-1)); }
.devices-channels .dot { margin: 0; border-radius: 50%; }
.devices-channel-id { color: hsl(var(--text-1)); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.devices-channel-dir { color: hsl(var(--text-4)); }
.devices-channel-format { font: 10px var(--font-mono); color: hsl(var(--text-3)); padding: 1px 6px; border-radius: 999px; background: hsl(var(--bg-2)); }
.devices-details-actions { display: flex; justify-content: flex-end; gap: 2px; }
.devices-connect-ctas { display: grid; gap: 6px; }
.devices-connect-cta { width: 100%; justify-content: center; gap: 6px; padding: 8px 12px; font-size: 14px; }
.devices-qr { display: block; width: 200px; height: 200px; margin: 8px 0; image-rendering: pixelated; }
.devices-terminal { min-height: 160px; max-height: 360px; overflow: auto; white-space: pre-wrap; }
/* A terminal (terminal.js: xterm.js, or the plain reader); a terminal pane (terminals.js) fills its pane with it. */
.terminal-view { --term-bg: #0a0a09; height: 340px; min-height: 120px; background: var(--term-bg); padding: 6px; border: 1px solid hsl(var(--border-2)); overflow: hidden; }
/* the emulator's own background (terminal.js TERM_THEMES), so the padding around it matches */
:root[data-theme=light] .terminal-view { --term-bg: #f7f7f8; }
.terminal-pane { display: flex; flex-direction: column; height: 100%; min-height: 0; min-width: 0; gap: 6px; padding: 6px; }
.terminal-pane .terminal-slot { flex: 1; min-height: 0; display: flex; flex-direction: column; }
/* fit reads this width: the terminal must not widen its grid */
.terminal-pane .terminal-view { flex: 1; height: auto; min-width: 0; }
.terminal-pane .toolbar { flex-wrap: wrap; align-items: center; gap: 4px; }
.terminal-pane .terminal-name { font-weight: 600; }
.devices-terminals { list-style: none; padding: 0; margin: 4px 0; display: flex; flex-direction: column; gap: 2px; }
/* keyboard shortcuts app (keybindings.js) */
.kb-table td { vertical-align: top; }
.kb-table kbd { display: inline-block; font: 10px var(--font-mono); padding: 1px 4px; margin: 0 2px 2px 0; border: 1px solid hsl(var(--border-1)); border-radius: 2px; color: hsl(var(--text-1)); }
.kb-table .kb-actions .toolbar { display: flex; flex-direction: row; flex-wrap: wrap; gap: 0 6px; margin-top: 2px; }
.kb-table .kb-actions .toolbar button { height: auto; min-height: 0; padding: 0; font-size: 11px; }
.kb-table tr.kb-user { background: hsl(var(--brand) / .08); }

/* the navigation sidebar (navbar.js) and the Files tab's tree (app.js renderExplorer) draw one row (nav.js navRow):
   clean rounded pill rows inside the padded dock sections. A tree row steps in by NAV_STEP per level (inline). */
.navbar { padding: 0; display: flex; flex-direction: column; overflow: hidden; }
.nav-sections { flex: 1; min-height: 0; overflow: auto; padding: 4px 8px 16px; }
.navbar .nav-item, .explorer .nav-item { width: 100%; margin: 0; height: auto; min-height: 34px; gap: 12px; padding: 7px 10px; border-radius: 8px; font-size: var(--fs-ui); font-weight: 500; color: hsl(var(--text-2)); }
.navbar .nav-item:hover, .navbar .nav-item:focus-visible, .explorer .nav-item:hover, .explorer .nav-item:focus-visible { color: hsl(var(--text-1)); background: hsl(var(--bg-2) / .65); outline: 0; }
.navbar .nav-item.selected, .explorer .nav-item.selected { color: hsl(var(--text-1)); background: hsl(var(--bg-2)); box-shadow: none; }
.navbar .nav-item .nav-glyph, .explorer .nav-item .nav-glyph { width: 18px; min-width: 18px; color: inherit; }
.navbar .nav-item .dock-tab-label, .explorer .nav-item .dock-tab-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tree-line .nav-item { padding-inline-end: 32px; }
/* The Files tab (app.js renderExplorer): the tree at the navigation's own inset (breadcrumbs live in .panel-header). */
.files-panel { padding: 4px 8px 16px; }
/* The navigation's sections (navbar.js), as a chat app's sidebar: a section's head is a row (--fs-ui, muted, a plate on
   hover) that folds it, its chevron at the end shown on hover, on keyboard focus, on touch and while folded; its rows
   are 34px, --fs-ui, cut with an ellipsis. */
.navbar .nav-group + .nav-group { margin-top: 10px; }
button.nav-group-head { display: flex; align-items: center; width: 100%; height: 32px; min-height: 0; padding: 0 4px 0 12px; border: 0; border-radius: 8px; background: transparent; color: hsl(var(--text-2)); font: 500 var(--fs-ui)/1 var(--font-sans); letter-spacing: 0; text-transform: none; cursor: pointer; transition: background-color .12s, color .12s; }
button.nav-group-head:hover, button.nav-group-head:focus-visible { background: hsl(var(--bg-2)); color: hsl(var(--text-1)); outline: 0; }
.nav-group-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: start; }
.nav-group-chevron { flex: none; display: grid; place-items: center; width: 24px; height: 24px; color: hsl(var(--text-4)); opacity: 0; transition: opacity .12s; }
.nav-group-head:hover .nav-group-chevron, .nav-group-head:focus-visible .nav-group-chevron, .nav-group-head[aria-expanded="false"] .nav-group-chevron { opacity: 1; }
@media (hover: none) { .nav-group-chevron { opacity: 1; } }
.nav-group-body { margin-top: 2px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 1px; }
.navbar .nav-group-body .nav-item { min-height: 34px; padding: 0 8px 0 12px; border-radius: 8px; font-size: var(--fs-ui); font-weight: 400; }
.navbar .nav-group-body .nav-item:hover, .navbar .nav-group-body .nav-item:focus-visible { background: hsl(var(--bg-2)); }
.navbar .nav-group-body .nav-item.selected { background: hsl(var(--bg-3)); font-weight: 500; }
.nav-empty { padding: 8px 12px; font-size: var(--fs-ui); color: hsl(var(--text-2)); }
.navbar .nav-group-body .nav-pin .nav-item { padding-inline-end: 32px; }
.nav-pin { position: relative; display: flex; align-items: center; }
.nav-pin .nav-item { padding-inline-end: 32px; }
.nav-remove { position: absolute; inset-inline-end: 4px; width: 24px; min-width: 24px; height: 24px; padding: 0; border: 0; border-radius: 50%; display: grid; place-items: center; background: transparent; color: hsl(var(--text-4)); opacity: 0; transition: opacity .1s; }
.nav-pin:hover .nav-remove, .nav-remove:focus-visible { opacity: 1; }
.nav-remove:hover { color: hsl(var(--text-1)); background: transparent; }
.nav-trail { margin-inline-start: auto; display: inline-flex; color: hsl(var(--text-4)); }
.org-mark { width: 18px; height: 18px; border-radius: 4px; display: grid; place-items: center; background: hsl(var(--bg-3)); color: hsl(var(--text-1)); font: 600 10px/1 var(--font-sans); }
img.org-mark { object-fit: cover; }
.navbar .nav-item.nav-more { color: hsl(var(--text-2)); font-weight: 400; padding-inline-start: 38px; }
.navbar .nav-item.nav-more:hover { color: hsl(var(--text-2)); }
/* A rail's hover label (app.js railLabels): beside the icon, over everything, never in the pointer's way. */
.rail-label { position: fixed; z-index: 1000; transform: translateY(-50%); padding: 4px 8px; border-radius: var(--radius-control); box-shadow: var(--shadow-float); border: 1px solid hsl(var(--border-1)); background: hsl(var(--bg-3)); color: hsl(var(--text-1)); font-size: var(--fs-caption); white-space: nowrap; pointer-events: none; box-shadow: 0 4px 12px hsl(0 0% 0% / .25); }
.rail-label.before { transform: translate(-100%, -50%); }
.dock-tab .brand-mark { width: 10px; height: 10px; }
@media (pointer: coarse) { .nav-remove { opacity: 1; } }
/* side-list (side-list.js: the Apps and the Connections tabs). A group's head is a row on a hover plate, its label
   comfortable consumer-app size (--fs-ui); its trailing controls show on hover, on keyboard focus, on touch, while
   folded and in edit mode. Its items are 32px–34px rows that shorten their words, never the dock. */
.side-list { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; gap: 2px; padding: 4px 8px 16px; }
.side-group { min-width: 0; }
.side-head { display: flex; align-items: center; min-height: 34px; border-radius: var(--radius-control); transition: background-color .12s; }
.side-head:hover, .side-head:focus-within { background: hsl(var(--bg-dock-2)); }
.side-head-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; height: 34px; min-height: 34px; padding: 0 10px; border: 0; border-radius: var(--radius-control); background: transparent; color: hsl(var(--text-2)); font-size: var(--fs-ui); font-weight: 500; line-height: 1.3; text-align: start; }
.side-head-main:hover, .side-head-main:focus-visible, .side-head-main.selected { color: hsl(var(--text-1)); background: transparent; outline: 0; }
.side-head-main .nav-glyph { width: 20px; min-width: 20px; }
.side-head-main .nav-glyph svg, .side-head-main .nav-glyph .app-icon { width: 20px; height: 20px; }
.side-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-acts { flex: none; display: flex; align-items: center; gap: 0; opacity: 0; transition: opacity .12s; }
.side-group:hover .side-acts, .side-head:focus-within .side-acts, .side-group.folded .side-acts, .side-list.editing .side-acts { opacity: 1; }
.side-act, .side-chev { flex: none; width: 26px; min-width: 26px; height: 26px; padding: 0; border: 0; border-radius: 6px; display: grid; place-items: center; background: transparent; color: hsl(var(--text-3)); }
.side-act:hover, .side-act:focus-visible, .side-chev:hover, .side-chev:focus-visible { color: hsl(var(--text-1)); background: hsl(var(--bg-dock-3)); outline: 0; }
.side-act[aria-expanded="true"] { color: hsl(var(--text-1)); }
.side-chev { margin-inline-end: 2px; opacity: 0; transition: opacity .12s; }
.side-group:hover .side-chev, .side-chev:focus-visible, .side-chev[aria-expanded="false"] { opacity: 1; }
.side-chev svg { transition: transform .16s; }
.side-chev[aria-expanded="false"] svg { transform: rotate(-90deg); }
@media (hover: none) { .side-acts, .side-chev { opacity: 1; } }
html button.side-eye[aria-pressed=true] { color: hsl(var(--text-1)); background: transparent; border-radius: 6px; box-shadow: none; }
.side-grip { cursor: grab; touch-action: none; }
.side-grip:active { cursor: grabbing; }
.side-list.editing .side-group.hidden .side-head-main { color: hsl(var(--text-4)); }
.side-list.editing .side-head-main { cursor: default; }
.side-group.dragging { opacity: .5; }
.side-drop { position: absolute; inset-inline: 8px; height: 2px; border-radius: 1px; background: hsl(var(--brand)); pointer-events: none; }
.side-items { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1px; margin-top: 2px; padding-inline-start: 12px; }
.side-items .nav-item { width: 100%; margin: 0; height: 32px; min-height: 32px; gap: 10px; padding: 0 10px; border-radius: var(--radius-control); font-size: var(--fs-ui); color: hsl(var(--text-2)); }
.side-items .nav-item:hover, .side-items .nav-item:focus-visible { color: hsl(var(--text-1)); background: hsl(var(--bg-dock-2)); outline: 0; }
.side-items .nav-item.selected { color: hsl(var(--text-1)); background: hsl(var(--bg-dock-3)); box-shadow: none; font-weight: 500; }
.side-items .nav-item .nav-glyph { width: 18px; min-width: 18px; color: hsl(var(--text-3)); }
.side-items .nav-item .dock-tab-label { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-items .nav-trail { flex: 0 1 auto; max-width: 45%; min-width: 0; }
.side-sub { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--fs-caption); color: hsl(var(--text-4)); }
.side-items .side-more, .side-note { color: hsl(var(--text-3)); font-size: var(--fs-ui); }
.side-items .side-more .nav-glyph { color: hsl(var(--text-4)); }
.side-note { margin: 0; padding: 0 8px; line-height: 32px; }
.side-fail { color: hsl(var(--danger)); line-height: 1.4; padding-block: 6px; }
.side-empty { margin: 0; padding: 8px; color: hsl(var(--text-3)); font-size: var(--fs-ui); }
/* the Apps tab's find field (apps-tab.js), above its list */
.apps-find { display: flex; align-items: center; gap: 8px; margin: 4px 8px 2px; padding: 0 10px; height: 34px; border: 1px solid hsl(var(--border-2)); border-radius: var(--radius-control); background: hsl(var(--bg-dock-2)); color: hsl(var(--text-3)); }
.apps-find input { flex: 1; min-width: 0; height: 100%; border: 0; background: transparent; color: hsl(var(--text-1)); font-size: var(--fs-ui); outline: 0; }
.apps-tab { display: flex; flex-direction: column; min-height: 0; }
.apps-tab .side-list { flex: 1; min-height: 0; overflow: auto; }
/* the Connections tab (connections-tab.js): an account row's gear beside it, its picture's dot, the stand-in row */
.side-row { position: relative; display: flex; align-items: center; min-width: 0; }
.side-row > .nav-item { flex: 1; min-width: 0; }
.side-group .side-row > .side-acts { position: absolute; inset-inline-end: 4px; opacity: 0; }
.side-group .side-row:hover > .side-acts, .side-group .side-row:focus-within > .side-acts { opacity: 1; }
.side-row:hover > .nav-item .nav-trail, .side-row:focus-within > .nav-item .nav-trail { visibility: hidden; }
@media (hover: none) { .side-group .side-row > .side-acts { opacity: 1; } .side-row > .nav-item { padding-inline-end: 34px; } }
.conn-glyph { position: relative; display: inline-grid; place-items: center; width: 18px; height: 18px; }
.conn-glyph img, .side-head-main img.conn-mark { width: 18px; height: 18px; border-radius: 50%; object-fit: cover; }
.side-head-main img.conn-mark { width: 20px; height: 20px; border-radius: 4px; object-fit: contain; }
.conn-dot { position: absolute; inset-inline-end: -2px; bottom: -1px; width: 7px; height: 7px; border-radius: 50%; box-shadow: 0 0 0 2px hsl(var(--bg-dock)); }
.conn-dot.warn { background: hsl(var(--warn)); }
.conn-dot.bad { background: hsl(var(--danger)); }
.conn-skel { display: flex; align-items: center; gap: 10px; height: 34px; padding: 0 10px; }
.conn-skel-dot { width: 18px; height: 18px; border-radius: 5px; background: hsl(var(--bg-dock-3)); }
.conn-skel-bar { width: 45%; height: 9px; border-radius: 5px; background: hsl(var(--bg-dock-3)); animation: cagi-saving 1.6s ease-in-out infinite; }
/* the rail's account menu: old commandagi's menu, its items with their icons at full size */
.menu-current { display: inline-flex; margin-inline-start: 12px; color: hsl(var(--brand)); }
/* Apps (the sidebar's Apps anchor): every app as a rounded icon tile */
/* The sidebar's sheets (sheet.js; docs/regions.md § sheets): a modal on a desktop, a bottom sheet on a phone. Naked
   content in one hairline frame, on paper and a deep, soft shadow, under a title bar. A wide or large sheet keeps its
   size while its content changes. Stacks below menus, palette and toasts; above the docks. */
/* A page's own header row in its pane head (app.js renderMountedApp, react/pages.jsx HeaderBridge). */
.detail-row > .page-head-slot { flex: 1 1 0; min-width: 0; display: flex; align-items: center; }
.sheet-scrim { position: fixed; inset: 0; z-index: 35; display: flex; justify-content: center; align-items: flex-start; padding: calc(var(--header-h) + 7vh) 16px 16px; background: hsl(var(--bg-0) / .5); }
.sheet:focus { outline: none; }
.sheet { display: flex; flex-direction: column; width: min(560px, 100%); max-height: min(600px, 100%); background: hsl(var(--paper)); border: 1px solid hsl(var(--border-2)); border-radius: var(--radius-panel); overflow: hidden; box-shadow: var(--shadow-modal); animation: sheet-in .12s ease-out; }
.sheet-wide { width: min(800px, 100%); height: min(620px, 100%); max-height: none; }
.sheet-large { width: min(1080px, 100%); height: min(720px, 100%); max-height: none; }
.sheet-xl { width: min(1180px, calc(100vw - 48px)); height: min(780px, calc(100dvh - 48px)); max-height: none; border-radius: 20px; }
.sheet-scrim:has(> .sheet-xl) { align-items: center; padding: 24px; }
.sheet-headless > .sheet-body { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
/* A large sheet that shows one column (an integration's own page in Connections): the column's width, the same height. */
.sheet-large.sheet-column { width: min(680px, 100%); }
@keyframes sheet-in { from { opacity: 0; transform: translateY(-6px); } }
@keyframes sheet-up { from { transform: translateY(40%); opacity: .4; } }
.sheet-grab { display: none; }
.sheet-head { flex: none; display: flex; align-items: center; gap: 12px; height: 56px; padding: 0 12px 0 24px; border-bottom: 1px solid hsl(var(--border-1)); }
.sheet-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 600 var(--fs-title)/1.25 var(--font-sans); color: hsl(var(--text-1)); }
.sheet-tabs { flex: 1; min-width: 0; display: flex; align-items: center; gap: 4px; height: 100%; }
.sheet-tab { height: 32px; padding: 0 12px; border: 0; border-radius: 8px; background: none; color: hsl(var(--text-3)); font-size: var(--fs-ui); transition: background-color 120ms ease, color 120ms ease; }
.sheet-tab:hover { background: hsl(var(--bg-2)); color: hsl(var(--text-1)); }
.sheet-tab.active { background: hsl(var(--bg-2)); color: hsl(var(--text-1)); font-weight: 500; }
.sheet-close { flex: none; width: 32px; height: 32px; padding: 0; justify-content: center; border: 0; border-radius: var(--radius-pill); background: none; color: hsl(var(--text-3)); }
.sheet-close:hover { background: hsl(var(--text-1) / .07); color: hsl(var(--text-1)); }
.sheet-body { flex: 1; min-height: 0; overflow: hidden auto; padding: 4px 0 14px; }
.sheet-body-page { padding: 0; overflow: hidden; }
.sheet-surface { height: 100%; }
/* A page mounted in a sheet (Connections) stands on the sheet's paper, not on the pane's ground. */
.sheet .cagi-app { --bg: hsl(var(--paper)); }
.sheet-search { display: flex; align-items: center; gap: 10px; padding: 6px 16px 8px; color: hsl(var(--text-3)); cursor: text; }
.sheet-search-field { flex: 1; min-width: 0; height: 30px; padding: 0; border: 0; background: none; font: var(--fw-composer) var(--fs-composer) var(--font-sans); color: hsl(var(--text-1)); }
.sheet-search-field:focus { border: 0; }
.sheet-search-field::placeholder { color: hsl(var(--text-4)); }
.sheet-label { padding: 12px 16px 4px; font: 600 var(--fs-micro)/1 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; color: hsl(var(--text-4)); }
.sheet-intro { padding: 10px 16px 4px; color: hsl(var(--text-3)); font-size: var(--fs-body); line-height: 1.5; user-select: text; -webkit-user-select: text; }
.sheet-list { display: flex; flex-direction: column; }
/* Requests for edit (edit-requests.js): who asks for what, their words, and the answer. */
.edit-request-list { margin: 0; padding: 0; list-style: none; }
.edit-request { display: flex; align-items: flex-start; gap: 12px; margin: 2px 8px; padding: 8px 12px; border-radius: var(--radius-control); }
.edit-request.named { background: hsl(var(--brand) / .08); }
.edit-request-words { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; user-select: text; -webkit-user-select: text; }
.edit-request-title { font-size: var(--fs-ui); color: hsl(var(--text-1)); }
.edit-request-where { font: var(--fs-caption) var(--font-mono); color: hsl(var(--text-3)); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.edit-request-message { margin: 4px 0 0; padding: 6px 10px; border-radius: 6px; background: hsl(var(--bg-2)); color: hsl(var(--text-2)); font-size: var(--fs-body); overflow-wrap: anywhere; }
.edit-request-status { font-size: var(--fs-caption); color: hsl(var(--text-3)); }
.edit-request-actions { flex: none; display: flex; gap: 6px; }
.sheet-row { display: flex; align-items: center; gap: 12px; width: calc(100% - 16px); margin: 1px 8px; height: auto; min-height: 34px; padding: 5px 10px; border: 0; border-radius: 8px; background: none; color: hsl(var(--text-2)); font-size: var(--fs-ui); text-align: start; white-space: nowrap; transition: background-color 120ms ease, color 120ms ease; }
.sheet-row:hover { background: hsl(var(--bg-2) / .65); color: hsl(var(--text-1)); }
.sheet-row.active { background: hsl(var(--bg-2)); color: hsl(var(--text-1)); font-weight: 500; }
.sheet-row-glyph { flex: none; display: grid; place-items: center; color: hsl(var(--text-3)); }
.sheet-row-title { flex: none; max-width: 60%; overflow: hidden; text-overflow: ellipsis; }
.sheet-row-title b { font-weight: 600; color: hsl(var(--brand)); }
.sheet-row-sub { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; font: var(--fs-caption) var(--font-mono); color: hsl(var(--text-4)); }
.sheet-row-hint { flex: none; margin-inline-start: auto; font: var(--fs-caption) var(--font-mono); color: hsl(var(--text-4)); }
.sheet-row-static { cursor: default; }
.sheet-row-open { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: 12px; height: auto; min-height: 0; padding: 0; border: 0; background: none; color: inherit; font-size: var(--fs-ui); text-align: start; }
.sheet-row-open:hover { background: none; color: hsl(var(--text-1)); }
.sheet-row-open:disabled { opacity: 1; }
.sheet-row-open .sheet-row-title { max-width: 50%; }
.sheet-empty { padding: 8px 16px; color: hsl(var(--text-3)); }
.sheet-empty.error { color: hsl(var(--danger)); }
.sheet-actions { display: flex; gap: 8px; padding: 10px 16px; }
.sheet-inline-action { height: auto; min-height: 0; padding: 0; border: 0; background: none; color: hsl(var(--brand)); font-size: inherit; vertical-align: baseline; }
.sheet-inline-action:hover { background: none; text-decoration: underline; }
/* A switch (Customize › Skills "every thread"): a naked track and knob, the accent when on. */
.switch { flex: none; width: 26px; height: 14px; min-height: 0; padding: 0; border: 1px solid hsl(var(--border-2)); border-radius: 7px; background: none; position: relative; }
.switch:hover { background: none; border-color: hsl(var(--text-4)); }
.switch::before { content: ''; position: absolute; inset: -12px -8px; } /* a finger's hit area around the small track */
.switch-knob { position: absolute; top: 2px; inset-inline-start: 2px; width: 8px; height: 8px; border-radius: 50%; background: hsl(var(--text-3)); transition: left .1s; }
.switch.on { border-color: hsl(var(--brand)); }
.switch.on .switch-knob { inset-inline-start: 14px; background: hsl(var(--brand)); }
@media (max-width: 640px) {
  .sheet-scrim { align-items: flex-end; padding: 0; }
  .sheet, .sheet-wide, .sheet-large, .sheet-xl { width: 100%; height: 84dvh; max-height: none; border: 1px solid hsl(var(--border-2)); border-bottom: 0; border-radius: 12px 12px 0 0; padding-bottom: env(safe-area-inset-bottom); animation: sheet-up .18s ease-out; transition: transform .2s ease-out; }
  .sheet-scrim:has(> .sheet-xl) { align-items: flex-end; padding: 0; }
  .sheet-grab { display: flex; justify-content: center; padding: 8px 0 4px; touch-action: none; cursor: grab; }
  .sheet-grab span { width: 36px; height: 4px; border-radius: 2px; background: hsl(var(--border-2)); }
  .sheet-head { height: 48px; padding-inline-start: 16px; }
  .sheet-row { min-height: var(--tap, 40px); }
  .sheet-search-field { font-size: 16px; }
  .sheet-row-title { max-width: 70%; }
  .sheet-row-open { flex-direction: column; gap: 0; }
  .sheet-row-open .sheet-row-title { max-width: 100%; }
}
@media (prefers-reduced-motion: reduce) { .sheet, .sheet-wide, .sheet-large, .sheet-xl { animation: none; transition: none; } }

/* Desktop downloads: readable options, with checksums available on demand. */
dialog.download-modal { width: 520px; padding: 28px; }
.download-heading { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.download-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: hsl(var(--brand) / .12); color: hsl(var(--brand)); }
.download-close { width: 36px; padding: 0; }
.download-modal h2 { font: 600 24px/1.25 var(--font-sans); margin: 0 0 8px; letter-spacing: -.5px; }
.download-intro { font-size: 14px; color: hsl(var(--text-2)); margin: 0 0 24px; }
.download-files { display: grid; gap: 12px; }
.download-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 16px; border: 1px solid hsl(var(--border-1)); border-radius: 14px; background: hsl(var(--bg-2)); }
.download-file-info { display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.download-file-info span { color: hsl(var(--text-3)); font-size: 12px; }
.download-action { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 14px; border-radius: 10px; background: hsl(var(--brand)); color: hsl(var(--brand-fg)); font-size: 13px; font-weight: 600; text-decoration: none; }
.download-action:hover { opacity: .9; }
.download-checksum { grid-column: 1 / -1; margin: 0; }
.download-checksum summary { font: 11px var(--font-sans); }
.download-checksum code { display: block; overflow-wrap: anywhere; margin-top: 10px; font-size: 11px; color: hsl(var(--text-3)); }
.download-notes { margin: 20px 0; font-size: 12px; line-height: 1.6; color: hsl(var(--text-3)); }
.download-footer { display: flex; align-items: center; justify-content: space-between; color: hsl(var(--text-4)); font-size: 12px; }
@media (max-width: 420px) { dialog.download-modal { padding: 20px; } .download-card { padding: 12px; } .download-action { padding: 0 10px; } }
/* web search (editors/web-search.js) */
.web-search { max-width: 860px; align-content: start; gap: 12px; }
/* the search is the declared operation's form in the page (op-panel.js operationForm): its words take the width */
.web-search .cagi-op-inline { max-width: 560px; }
.web-search .cagi-op-inline :is([data-field=query], [data-field=url]) input { flex: 1; width: 100%; height: 28px; text-align: start; font-size: 13px; }
.web-bar { display: flex; gap: 8px; align-items: center; }
.web-results { display: flex; flex-direction: column; gap: 14px; }
.web-result-title { font-weight: 600; color: hsl(var(--accent, var(--text-1))); text-decoration: none; overflow-wrap: anywhere; }
.web-result-title:hover { text-decoration: underline; }
.web-result-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 11px; color: hsl(var(--text-3)); margin-top: 2px; }
.web-result-snippet { margin: 4px 0 0; color: hsl(var(--text-2)); }
.web-result-content { white-space: pre-wrap; max-height: 320px; overflow: auto; font-size: 12px; }
.web-answer { border-radius: var(--radius-control); background: hsl(var(--bg-1)); padding: 10px 14px; }
.web-providers { border-top: 1px solid hsl(var(--border, var(--bg-2))); padding-top: 8px; font-size: 12px; display: flex; flex-direction: column; gap: 4px; }
.web-provider { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; }
.web-provider-failed b, .web-provider-unknown b { color: hsl(var(--warn)); }

/* The right dock's tabs are icons on top, the left dock's strip and tab (regions.js panelRegion `head`); under them the
   active panel's name heads its body at the strip's height. A dot sits on the glyph's corner. */
.rdock .icon-tab { position: relative; padding: 0 8px; }
.rdock .icon-tab .tab-dot { position: absolute; top: 7px; inset-inline-end: 4px; margin: 0; }
/* An app's field drawn as a box (Tailwind `border`): the shell's element rule above (input, select, textarea: an
   underline, `border: 0`) leaves its style none on three sides, so the box draws as an underline. */
.cagi-app :is(input, select, textarea)[class~=border] { border-style: solid; }
/* The right dock's numbers, in every editor's panels (docs/regions.md § property rows): right-aligned in tabular figures;
   the native stepper is hidden until the pointer or the caret is on the field, and then sits flush and faint. The arrow
   keys step it either way. */
.rdock input[type=number] { text-align: end; font-variant-numeric: tabular-nums; -moz-appearance: textfield; }
.rdock input[type=number]::-webkit-inner-spin-button, .rdock input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.rdock input[type=number]:is(:hover, :focus)::-webkit-inner-spin-button { -webkit-appearance: inner-spin-button; margin: 0 -2px 0 2px; opacity: .5; }
/* What a live surface shows beside the pane's title: the unsaved dot and the code affordance (react/host.jsx). */
.cagi-title-mark { display: inline-flex; align-items: center; gap: 2px; flex: none; margin-inline-start: 2px; }
.cagi-title-mark:empty { display: none; }
/* Outside developer mode a document's code is "View code" in the pane's ⋯ only (docs/regions.md § file names). */
html:not(.developer-mode) .cagi-title-mark [data-code-part] { display: none; }
/* A file's name as the shell shows it (file-names.js): the kind's icon, the name, the kind's label. */
.file-name { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.file-name .file-kind-icon { display: inline-flex; flex: none; color: var(--muted, currentColor); }
.file-name .file-name-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-name .file-kind { flex: none; color: var(--muted, currentColor); font-size: .85em; opacity: .8; }
.cagi-title-mark { margin-inline-start: -4px; }
.detail-row .cagi-dirty { order: 0; display: inline-grid; place-items: center; width: 18px; height: 18px; padding: 0; border: 0; background: transparent; }
.detail-row .cagi-dirty > span[aria-hidden] { width: 7px; height: 7px; border-radius: 50%; background: hsl(var(--text-2)); }
.detail-row .cagi-dirty:hover > span[aria-hidden] { background: hsl(var(--brand)); }
.detail-row .cagi-dirty.saving > span[aria-hidden] { animation: cagi-saving 1s ease-in-out infinite; }
@keyframes cagi-saving { 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .detail-row .cagi-dirty.saving > span[aria-hidden] { animation: none; opacity: .5; } }

/* The device list sits on the pane itself: no frame around it. */
.devices-rail > .toolbar > h3 { margin-inline-end: auto; }

/* a pill for the one way to add (Google Drive's "New"): the dock foot's New, and a pane's floating action (devices · connect) */
.fab { height: 40px; padding: 0 20px 0 14px; gap: 10px; border-radius: 999px; border: 1px solid transparent; background: hsl(var(--brand)); color: hsl(var(--brand-fg)); font: 500 var(--fs-ui) var(--font-sans, inherit); box-shadow: none; }
.fab:hover, .fab:focus-visible { background: hsl(var(--brand)); color: hsl(var(--brand-fg)); opacity: .9; }
.fab.floating { position: absolute; inset-inline-end: 20px; bottom: 20px; z-index: 5; }
/* A shell menu grown out of its pill (app.js growMenu: + connect): the same shape, flush below or above the pill. */
.fab.grown-from { opacity: 1; }
.fab.grown-from.down { border-radius: 20px 20px 0 0; }
.fab.grown-from.up { border-radius: 0 0 20px 20px; }
.menu.grown { min-width: 0; padding: 6px 0; border: 1px solid hsl(var(--brand)); background: hsl(var(--bg-2)); box-shadow: 0 8px 16px hsl(0 0% 0% / .18); }
.menu.grown.down { border-top: 0; border-radius: 0 0 20px 20px; animation: menu-grow-down .16s ease-out; }
.menu.grown.up { border-bottom: 0; border-radius: 20px 20px 0 0; animation: menu-grow-up .16s ease-out; }
.menu.grown .menu-item { min-height: 36px; padding: 8px 16px; gap: 12px; font-size: var(--fs-ui); align-items: center; }
.menu.grown .menu-item svg { width: 18px; height: 18px; }
.menu.grown .menu-head { padding: 8px 16px 4px; }
@keyframes menu-grow-down { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes menu-grow-up { from { clip-path: inset(100% 0 0 0); } to { clip-path: inset(0 0 0 0); } }
@media (prefers-reduced-motion: reduce) { .menu.grown { animation: none; } }
.detail:has(> .fab.floating) > .detail-body { padding-bottom: 80px; }

/* the connect panel's notes (devices-app.js connectPanel): what this computer reaches, what cannot connect and why */
.devices-connect-notes { display: flex; flex-direction: column; gap: 4px; }
.devices-connect-notes .notice { margin: 4px 0; }
.devices-flow-reach { list-style: none; margin: 4px 0; padding: 0; font-size: 12px; }
.devices-flow-reach li { display: flex; align-items: center; gap: 8px; padding: 2px 0; }
.devices-flow-reach .dot { margin: 0; border-radius: 50%; }
/* "offer this host": the one-time link and its QR code */
.devices-offer { width: min(480px, calc(100vw - 32px)); }
.devices-offer .notice { margin: 8px 0; }
/* the unit's details: a channel row opens its pane; short lists of runs and grants */
.devices-channels li { cursor: pointer; }
.devices-channels li:hover { background: hsl(var(--bg-2)); }
.devices-channels li button { height: 20px; padding: 0 8px; font-size: 11px; border-radius: 999px; }
.devices-list { list-style: none; margin: 0; padding: 0; font-size: 12px; }
.devices-list li { padding: 2px 0; }
.devices-list button { width: 100%; justify-content: flex-start; gap: 8px; overflow: hidden; }
.devices-details h4 + p { margin: 0; font-size: 12px; }
.devices-channel-head .toolbar { gap: 10px; flex-wrap: wrap; }
.devices-channel-state { display: block; font-size: 11px; }
.devices-channels .devices-channel-state { grid-column: 2 / -1; margin-top: -4px; padding-bottom: 4px; }
.devices-flow-rest summary { cursor: pointer; font-size: 12px; color: hsl(var(--text-3)); margin: 8px 0; }
/* the hosts card never widens its pane: long ids and states wrap, the row's buttons stay inside */
.devices-hosts table { width: 100%; }
.devices-hosts td { white-space: normal; overflow-wrap: anywhere; }
.devices-hosts td:last-child { white-space: nowrap; text-align: end; }
/* a pane never takes the width of its widest content (a row of filter chips grew the devices pane past the window) */
.main > *, .centre > *, section.pane { min-width: 0; }

/* The interface languages' scripts (i18n.js). Inter carries the Latin of every locale; the system faces carry the rest,
   named per language so Japanese takes Japanese glyph forms, not Chinese ones. */
:root:lang(zh) { --font-sans: Inter, "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif; }
:root:lang(ja) { --font-sans: Inter, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Yu Gothic", Meiryo, "Noto Sans JP", system-ui, sans-serif; }
:root:lang(ar) { --font-sans: Inter, "Noto Sans Arabic", "Noto Naskh Arabic", "Geeza Pro", "Segoe UI", Tahoma, system-ui, sans-serif; }
/* Right to left (ar). The chrome and the apps mirror through the grid, flex and logical properties (an app's
   Tailwind utilities are built as start and end: scripts/workbench/app-styles.mjs). What reads left to right in every
   language stays so: code, code editors, terminals, the 3D view, drawings (svg, canvas) and numbers. An app keeps its
   own axes ltr (the video timeline). */
[dir="rtl"] select { background-position: left 4px center; }
[dir="rtl"] :is(code, pre, kbd, samp, .mono, .source-code, .ed-text, .terminal-view, .scene, .viewport-wrap, canvas, svg, input[type=number], .cm-editor, .monaco-editor, .xterm) { direction: ltr; }
/* Questions waiting for you (questions.js, docs/questions.md): the right region's tab and the questions app. The left
   edge of each says its state in the --ann-* colours of the run replay. */
.qs { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; height: 100%; overflow: auto; font-size: var(--fs-ui); background: hsl(var(--bg-0)); }
.qs-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 8px var(--rdock-inset, 14px); border-bottom: 1px solid hsl(var(--border-1)); position: sticky; top: 0; background: hsl(var(--bg-0)); z-index: 1; }
.qs-head.qs-head-inline { flex-wrap: nowrap; flex: 1 1 auto; min-width: 0; height: 100%; padding: 0; border-bottom: 0; position: static; background: transparent; overflow-x: auto; scrollbar-width: none; }
.qs-head.qs-head-inline::-webkit-scrollbar { display: none; }
.qs-title { color: hsl(var(--text-3)); font-size: var(--fs-caption); white-space: nowrap; flex: none; }
.qs-pick { max-width: 15em; flex: 0 1 auto; height: 26px; padding: 0 22px 0 8px; border-radius: var(--radius-control); border: 1px solid hsl(var(--border-1)); background: hsl(var(--bg-1)); color: hsl(var(--text-1)); font: var(--fs-caption) var(--font-sans); cursor: pointer; }
.qs-pick:hover { border-color: hsl(var(--border-2)); }
.qs-count { margin-inline-start: auto; padding-inline-start: 6px; color: hsl(var(--text-3)); font: var(--fs-caption) var(--font-mono); white-space: nowrap; flex: none; }
.qs-feed { width: 100%; max-width: 720px; margin: 0 auto; padding: 20px 24px 64px; display: flex; flex-direction: column; gap: 14px; box-sizing: border-box; }
.qs.qs-dock .qs-feed { max-width: none; padding: 10px var(--rdock-inset, 12px) 24px; gap: 10px; }
.qs-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.qs.qs-dock .qs-list { gap: 10px; }
.qs-item { display: flex; flex-direction: column; gap: 12px; padding: 18px 20px; border-radius: 14px; background: hsl(var(--bg-1)); border: 1px solid hsl(var(--border-1)); transition: border-color .14s ease; }
.qs.qs-dock .qs-item { padding: 12px 14px; gap: 10px; border-radius: 12px; }
.qs-item:hover { border-color: hsl(var(--border-2)); }
.qs-item.s-answered { background: hsl(var(--bg-0)); border-color: hsl(var(--border-1)); }
.qs-item.s-withdrawn { background: hsl(var(--bg-0)); opacity: .72; }
.qs-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; min-width: 0; }
.qs-card-meta-col { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1 1 auto; }
.qs-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; color: hsl(var(--text-3)); font-size: var(--fs-caption); line-height: 1.35; overflow-wrap: anywhere; }
.qs-dot { width: 7px; height: 7px; border-radius: 50%; flex: none; background: hsl(var(--brand)); }
.qs-item.s-answered .qs-dot { background: hsl(var(--ok)); }
.qs-item.s-withdrawn .qs-dot { background: hsl(var(--text-4)); }
.qs-about { color: hsl(var(--text-3)); font-size: var(--fs-micro, 11px); overflow-wrap: anywhere; }
.qs-copies { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; color: hsl(var(--text-3)); font-size: var(--fs-micro, 11px); }
.qs-copy { height: 20px; padding: 0 7px; border-radius: var(--radius-pill); border: 1px solid hsl(var(--border-1)); background: hsl(var(--bg-0)); color: hsl(var(--text-2)); font: var(--fs-micro, 11px) var(--font-mono); cursor: pointer; }
.qs-copy:hover { border-color: hsl(var(--border-2)); color: hsl(var(--text-1)); }
.qs-open { flex: none; display: inline-flex; align-items: center; gap: 4px; height: 26px; padding: 0 8px; border-radius: 8px; border: 1px solid transparent; background: transparent; color: hsl(var(--text-3)); font-size: var(--fs-caption); cursor: pointer; white-space: nowrap; }
.qs-open:hover { background: hsl(var(--bg-2)); color: hsl(var(--text-1)); border-color: hsl(var(--border-1)); }
.qs-open svg { width: 13px; height: 13px; flex: none; }
.qs-text { font-size: var(--fs-body); font-weight: 500; line-height: 1.48; color: hsl(var(--text-1)); overflow-wrap: anywhere; }
.qs-owner, .qs-agent-answer { padding: 8px 11px; border-radius: 9px; background: hsl(var(--bg-0)); border: 1px solid hsl(var(--border-1)); color: hsl(var(--text-2)); font-size: var(--fs-caption); line-height: 1.4; }
.qs-options { display: flex; flex-direction: column; gap: 7px; }
.qs-option { display: flex; align-items: flex-start; gap: 10px; width: 100%; height: auto; min-height: 38px; padding: 9px 12px; border-radius: 10px; border: 1px solid hsl(var(--border-1)); background: hsl(var(--bg-0)); color: hsl(var(--text-1)); text-align: left; white-space: normal; line-height: 1.4; cursor: pointer; transition: border-color .14s ease, background-color .14s ease, box-shadow .14s ease; }
.qs-option:hover { border-color: hsl(var(--brand) / .6); background: hsl(var(--brand) / .06); }
.qs-option:focus-visible { outline: none; border-color: hsl(var(--brand)); box-shadow: 0 0 0 2px hsl(var(--brand) / .18); }
.qs-option-idx { flex: none; display: inline-grid; place-items: center; width: 20px; height: 20px; margin-top: 1px; border-radius: 6px; border: 1px solid hsl(var(--border-2)); background: hsl(var(--bg-1)); color: hsl(var(--text-3)); font: 600 11px/1 var(--font-mono); transition: border-color .14s ease, background-color .14s ease, color .14s ease; }
.qs-option:hover .qs-option-idx { border-color: hsl(var(--brand)); background: hsl(var(--brand)); color: hsl(var(--brand-fg)); }
.qs-option-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 auto; }
.qs-option-label { font-weight: 500; font-size: var(--fs-ui); color: hsl(var(--text-1)); }
.qs-option-meaning { font-size: var(--fs-caption); color: hsl(var(--text-3)); line-height: 1.38; }
.qs-composer { display: flex; align-items: flex-end; gap: 8px; padding: 6px 6px 6px 12px; border-radius: 12px; border: 1px solid hsl(var(--border-1)); background: hsl(var(--bg-0)); transition: border-color .14s ease, box-shadow .14s ease; }
.qs-composer:focus-within { border-color: hsl(var(--brand) / .7); box-shadow: 0 0 0 2px hsl(var(--brand) / .14); }
.qs-reply { flex: 1 1 auto; min-width: 0; width: auto; min-height: 28px; max-height: 140px; padding: 3px 0; border: 0; background: transparent; color: hsl(var(--text-1)); resize: none; overflow-y: auto; font: var(--fs-ui)/1.45 var(--font-sans); outline: none; }
.qs-reply:focus { border: 0; outline: none; box-shadow: none; }
.qs-send { flex: none; display: inline-grid; place-items: center; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 8px; background: hsl(var(--brand)); color: hsl(var(--brand-fg)); cursor: pointer; transition: opacity .12s ease, background-color .12s ease; }
.qs-send:disabled { background: hsl(var(--bg-2)); color: hsl(var(--text-4)); opacity: .65; cursor: default; }
.qs-send svg { width: 14px; height: 14px; }
.qs-answer { padding: 8px 11px; border-radius: 9px; background: hsl(var(--bg-1)); border: 1px solid hsl(var(--border-1)); color: hsl(var(--text-2)); font-size: var(--fs-caption); }
.qs-status { font: var(--fs-micro, 11px) var(--font-mono); color: hsl(var(--text-3)); }
.qs-status:empty { display: none; }
.qs-empty { padding: 40px 16px; text-align: center; color: hsl(var(--text-3)); font-size: var(--fs-ui); }
.qs-problem { margin: 0; }
/* The library (library.js, docs/regions.md § the library): one tile size, a square picture, the name below in two lines. Only
   the rows in view are in the page; the scroll box is the library's own, so it is bounded by the dock. */
.library, .threed-library { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.library { gap: 6px; padding: 6px 8px 0; }
.library-bar { display: flex; gap: 4px; align-items: center; }
.library-search { flex: 1; min-width: 0; }
.library-add { flex: none; width: 26px; height: 26px; padding: 0; display: inline-grid; place-items: center; }
.library-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; font-size: var(--fs-caption); min-height: 22px; }
/* A crumb lifts a pill under the pointer, as the navigation's crumbs do; the › between crumbs is outside it. */
.library-crumbs .library-crumb { height: 24px; padding: 0 6px; font-size: var(--fs-caption); max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border-radius: var(--radius-pill); }
.library-sep { color: hsl(var(--text-4)); }
.library-note { font-size: var(--fs-caption); }
.library-note:empty { display: none; }
.library-scroll { flex: 1; min-height: 0; max-height: calc(100dvh - 150px); overflow-y: auto; overflow-x: hidden; padding-bottom: 8px; }
.library-space { position: relative; width: 100%; }
.library-tile { position: absolute; display: flex; flex-direction: column; gap: 4px; border-radius: 8px; cursor: pointer; outline: none; }
.library-tile.file { cursor: grab; }
.library-plate { width: 100%; aspect-ratio: 1; flex: none; display: grid; place-items: center; overflow: hidden; border-radius: 8px; background: hsl(var(--bg-2)); color: hsl(var(--text-3)); transition: background-color .12s, color .12s; }
.library-plate img { width: 100%; height: 100%; object-fit: contain; }
/* A folder's plate of its items' pictures (library.js mosaicOf): a 2×2; one fills it; two share it side by side; of
   three, the first takes the left half. Each picture is cropped to its cell, never stretched. */
.library-mosaic { width: 100%; height: 100%; display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 2px; }
.library-mosaic img { min-width: 0; min-height: 0; object-fit: cover; }
.library-mosaic[data-count="1"] { grid-template-columns: 1fr; grid-template-rows: 1fr; }
.library-mosaic[data-count="1"] img { object-fit: contain; }
.library-mosaic[data-count="2"] { grid-template-rows: 1fr; }
.library-mosaic[data-count="3"] img:first-child { grid-row: span 2; }
.library-tile.folder .library-plate { color: hsl(var(--text-2)); }
.library-tile[draggable=true] { cursor: grab; }
.library-tile.group .library-plate { position: relative; color: hsl(var(--text-2)); }
.library-count { position: absolute; right: 7px; bottom: 5px; font: 10px/1 var(--font-mono); color: hsl(var(--text-4)); }
/* An indexed asset's licence, on its picture: what may be done with it is in the tile's title. */
.library-tile.file .library-plate, .library-tile.folder .library-plate { position: relative; }
/* A connector entry's author(s), on its picture (top): its source's own credit is in the tile's title. */
.library-author { position: absolute; left: 4px; top: 4px; max-width: calc(100% - 8px); padding: 2px 4px; border-radius: 4px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font: 9px/1.2 var(--font-sans); background: hsl(var(--bg-1) / .85); color: hsl(var(--text-2)); }
.library-licence { position: absolute; left: 4px; bottom: 4px; max-width: calc(100% - 8px); padding: 2px 4px; border-radius: 4px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font: 9px/1.2 var(--font-mono); background: hsl(var(--bg-1) / .85); color: hsl(var(--text-2)); }
.library-licence[data-offered=false] { color: hsl(var(--danger)); }
.library-tile:hover .library-plate, .library-tile:focus-visible .library-plate { background: hsl(var(--bg-3)); color: hsl(var(--brand)); }
.library-tile:focus-visible .library-plate { box-shadow: 0 0 0 1px hsl(var(--brand)); }
.library-name { font-size: var(--fs-caption); line-height: 1.3; color: hsl(var(--text-2)); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; text-align: center; }
.library-remove { position: absolute; top: 3px; right: 3px; width: 20px; height: 20px; padding: 0; display: none; place-items: center; border-radius: 5px; background: hsl(var(--bg-1)); }
.library-tile:hover .library-remove, .library-tile:focus-within .library-remove { display: inline-grid; }
.navbar .nav-item.nav-more svg { margin-inline-start: 4px; vertical-align: -2px; }
/* A unit's controls in its world's 3D view (unit-affordance.js): a pin at each unit, the card at the selected one. */
.unit-layer { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.unit-layer > * { pointer-events: auto; }
.unit-pin { position: absolute; transform: translate(-50%, -130%); width: 26px; height: 26px; padding: 0; display: grid; place-items: center; border-radius: 50%; border: 1px solid hsl(var(--border-1)); background: hsl(var(--bg-1) / .9); color: hsl(var(--text-2)); box-shadow: 0 1px 3px hsl(0 0% 0% / .25); }
.unit-pin:hover, .unit-pin.selected { color: hsl(var(--brand-fg)); background: hsl(var(--brand)); border-color: hsl(var(--brand)); }
.unit-card { position: absolute; width: min(320px, calc(100% - 16px)); display: grid; gap: 6px; padding: 8px 8px 8px 10px; border-radius: var(--radius-panel); border: 1px solid hsl(var(--border-1)); background: var(--surface-float); backdrop-filter: var(--blur-float); box-shadow: var(--shadow-float); font-size: 12px; animation: unit-card-in .16s ease-out; transform-origin: top left; }
.unit-card[data-side$=left] { transform-origin: top right; }
.unit-card[data-side^=above] { transform-origin: bottom left; }
@keyframes unit-card-in { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .unit-card, .unit-dot.pulse { animation: none; } }
/* The live state, one line under the name (Computatrum's pill): a dot that pulses while it works. */
.unit-now { display: flex; align-items: center; gap: 7px; min-width: 0; font-weight: 600; color: hsl(var(--text-1)); }
.unit-now-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.unit-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: hsl(var(--ok)); }
.unit-now[data-state=working] .unit-dot { background: hsl(var(--warn)); }
.unit-now[data-state=seated] .unit-dot { background: hsl(var(--brand)); }
.unit-now[data-state=stopped] .unit-dot { background: hsl(var(--danger)); }
.unit-now[data-state=stopped] { color: hsl(var(--danger)); }
.unit-dot.pulse { background: hsl(var(--warn)); animation: unit-pulse 1.6s ease-out infinite; }
.unit-dot.planned { background: transparent; border: 1.5px dashed hsl(var(--text-3)); width: 9px; height: 9px; }
@keyframes unit-pulse { 0% { box-shadow: 0 0 0 0 hsl(var(--warn) / .55); } 70% { box-shadow: 0 0 0 7px hsl(var(--warn) / 0); } 100% { box-shadow: 0 0 0 0 hsl(var(--warn) / 0); } }
.unit-step-ic { display: grid; place-items: center; width: 14px; height: 16px; color: hsl(var(--ok)); }
.unit-line[data-from=person] .unit-step-ic { color: hsl(var(--text-3)); }
.unit-details { display: grid; gap: 6px; padding-top: 6px; border-top: 1px solid hsl(var(--border-1)); }
.unit-stop { display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; height: 30px; border: 0; border-radius: 10px; background: hsl(var(--danger)); color: #fff; font-weight: 600; font-size: 12px; }
.unit-stop:hover { filter: brightness(1.08); }
.unit-card > header { display: flex; align-items: center; gap: 6px; min-width: 0; }
.unit-card > header strong { min-width: 6em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.unit-tools-gap { flex: 1; }
.unit-prompt { display: flex; align-items: center; gap: 6px; padding: 3px 3px 3px 12px; border-radius: 999px; background: hsl(var(--bg-0)); border: 1px solid hsl(var(--border-1)); }
.unit-prompt:focus-within { border-color: hsl(var(--brand) / .6); }
.unit-prompt-field { flex: 1; min-width: 0; height: 28px; border: 0; background: transparent; color: hsl(var(--text-1)); font-size: var(--fs-ui); font-weight: var(--fw-composer); outline: 0; }
.unit-prompt-send { flex: none; width: 26px; height: 26px; padding: 0; border: 0; border-radius: 50%; display: grid; place-items: center; background: hsl(var(--brand)); color: hsl(var(--bg-0)); }
.unit-prompt-send:disabled { opacity: .45; }
/* A read in flight (dom.js loading): one line, never wrapped word by word in a narrow box. */
.loading-row { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 4px 8px; border-radius: var(--radius-control); color: hsl(var(--text-3)); font-size: var(--fs-ui); }
.loading-words { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.loading-spin { flex: none; width: 12px; height: 12px; border-radius: var(--radius-pill); border: 2px solid hsl(var(--border-2)); border-top-color: hsl(var(--brand)); animation: loading-spin .8s linear infinite; }
@keyframes loading-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .loading-spin { animation: none; border-color: hsl(var(--brand) / .5); } }
/* A document or a view loading (dom.js markLoading): the CommandAGI looped-square mark draws, holds, unwinds and
   rests, 0.5 s each, centered horizontally and vertically in its pane/container. */
.cagi-loading-center,
.mark-loading { flex: 1 1 auto; width: 100%; height: 100%; min-height: 45vh; display: grid; place-items: center; padding: 24px 16px; box-sizing: border-box; color: hsl(var(--text-3)); font-size: var(--fs-ui); }
.cagi-loading-center.cagi-loading-compact { min-height: 120px; padding: 16px 12px; }
.mark-loading-stack { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; text-align: center; }
.mark-loading-words { color: hsl(var(--text-3)); font-size: var(--fs-caption, 12px); line-height: 1.45; max-width: 38ch; }
.cagi-loading-actions { display: flex; justify-content: center; margin-top: 8px; }
.mark-loader { width: 40px; height: 40px; color: hsl(var(--brand)); }
.mark-loader svg { display: block; width: 100%; height: 100%; }
.mark-loader-stroke { stroke-dashoffset: 1; animation: mark-loader 2s linear infinite; }
@keyframes mark-loader { 0% { stroke-dashoffset: 1; } 25%, 50% { stroke-dashoffset: 0; } 75%, 100% { stroke-dashoffset: -1; } }
@media (prefers-reduced-motion: reduce) { .mark-loader-stroke { animation: none; stroke-dashoffset: 0; } }
.unit-hint { margin: 0; font-size: 11px; display: grid; grid-template-columns: 14px 1fr; gap: 6px; align-items: center; }
.unit-said:empty { display: none; }
.unit-said { display: grid; gap: 2px; max-height: 160px; overflow: auto; }
.unit-line { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 6px; line-height: 1.35; color: hsl(var(--text-2)); }
.unit-line[data-run=start] + .unit-line[data-run=start] { margin-top: 3px; }
.unit-line.current { color: hsl(var(--text-1)); font-weight: 600; }
/* Who said it, as the CAD ribbon's tiles (tokens.css .cagi-ribbon): an icon, a small-caps caption under it; a run of
   one speaker's lines shows it once. */
.speaker { display: flex; flex-direction: column; align-items: stretch; gap: 1px; min-width: 0; padding-top: 1px; color: hsl(var(--text-3)); }
.speaker-ic { display: grid; place-items: center; height: 14px; }
.speaker-cap { font: 9px/1.1 var(--font-mono); text-transform: uppercase; letter-spacing: .08em; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.speaker[data-speaker=agent] { color: hsl(var(--brand)); }
.speaker[data-speaker=system] { color: hsl(var(--text-3)); }
.speaker[data-speaker=device], .speaker[data-speaker=host] { color: hsl(var(--ok)); }
/* A tool call: a rounded pill of plain words, its parameters as small chips. */
.tool-pills { display: flex; flex-wrap: wrap; gap: 3px; }
.tool-pill { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; min-width: 0; padding: 1px 3px 1px 8px; border-radius: var(--radius-pill); background: hsl(var(--bg-2)); border: 1px solid hsl(var(--border-1)); font-size: 11px; font-weight: 400; color: hsl(var(--text-1)); }
.tool-pill-words { white-space: nowrap; }
.tool-pill:not(:has(.tool-chip)) { padding-right: 8px; }
.tool-chip { min-width: 0; padding: 0 6px; border-radius: var(--radius-pill); background: hsl(var(--bg-0)); color: hsl(var(--text-2)); font: 10px var(--font-mono); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.unit-tools-row { display: grid; gap: 3px; justify-items: start; }
.unit-tools-toggle { height: 20px; padding: 0 6px 0 8px; border-radius: var(--radius-pill); border-color: hsl(var(--border-1)); font-weight: 400; }
.unit-joints { display: grid; gap: 1px; }
.unit-joint { display: grid; grid-template-columns: 1fr auto 44px auto; align-items: center; gap: 2px; }
.unit-joint-name { color: hsl(var(--text-3)); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.unit-joint-value { font: 11px var(--font-mono); text-align: center; color: hsl(var(--text-2)); }
.unit-tools { display: flex; align-items: center; gap: 2px; }
.unit-act { width: 26px; height: 26px; padding: 0; display: grid; place-items: center; border: 0; border-radius: 5px; background: transparent; color: hsl(var(--text-2)); }
.unit-act:hover { background: hsl(var(--bg-3)); color: hsl(var(--text-1)); }
.unit-act.danger { color: hsl(var(--danger)); background: hsl(var(--danger) / .1); }
.unit-agents { display: grid; grid-template-columns: minmax(0, 1fr); min-width: 0; gap: 1px; padding: 4px; border-radius: var(--radius-control); border: 1px solid hsl(var(--border-1)); background: hsl(var(--bg-0)); }
.unit-agent { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 4px 8px; border: 0; border-radius: 5px; background: transparent; color: hsl(var(--text-1)); font-size: 12px; text-align: start; }
.unit-agent:hover:not(:disabled) { background: hsl(var(--bg-3)); }
.unit-agent[aria-current=true] { color: hsl(var(--brand)); }
.unit-agent > .muted { font-size: 10px; }
.unit-agent[data-missing] { opacity: .5; }
.unit-who { display: flex; align-items: center; gap: 6px; font-size: 12px; }
.unit-who-pick { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border: 1px solid hsl(var(--border-1)); border-radius: 999px; background: transparent; color: hsl(var(--text-1)); font-size: 12px; }
.unit-seat { display: flex; align-items: center; gap: 6px; font-size: 11px; color: hsl(var(--text-2)); }
.unit-grant { display: flex; align-items: center; gap: 6px; color: hsl(var(--warn)); font-size: 11px; }
.unit-grant[data-unit-grant=covered] { color: hsl(var(--ok)); }
.unit-follow { display: grid; gap: 4px; padding: 6px 8px; border-radius: 8px; border: 1px solid hsl(var(--border-1)); background: hsl(var(--bg-0)); }
.follow-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.follow-toggle { display: inline-flex; align-items: center; gap: 6px; flex: 1; min-width: 0; padding: 2px 4px 2px 2px; border: 0; background: transparent; color: hsl(var(--text-1)); font-size: 12px; text-align: start; }
.follow-knob { flex: none; width: 26px; height: 14px; border-radius: 999px; background: hsl(var(--bg-3)); position: relative; transition: background .15s; }
.follow-knob::after { content: ''; position: absolute; top: 2px; left: 2px; width: 10px; height: 10px; border-radius: 50%; background: hsl(var(--text-2)); transition: left .15s; }
.follow-toggle[aria-checked=true] .follow-knob { background: hsl(var(--brand)); }
.follow-toggle[aria-checked=true] .follow-knob::after { left: 14px; background: hsl(var(--bg-0)); }
.follow-num { display: inline-flex; align-items: center; gap: 2px; font-size: 10px; }
.unit-follow input.follow-field { flex: none; width: 48px; height: 22px; padding: 0 4px; border: 1px solid hsl(var(--border-1)); border-radius: 4px; background: hsl(var(--bg-1)); color: hsl(var(--text-1)); font: 11px var(--font-mono); }
.follow-state { flex: 1; min-width: 0; font-size: 11px; color: hsl(var(--text-3)); }
.follow-state[data-state=following] { color: hsl(var(--ok)); }
.follow-state[data-state=syncing], .follow-state[data-state=starting], .follow-state[data-state=holding] { color: hsl(var(--warn)); }
.follow-state[data-state=error], .follow-state[data-state=stopped] { color: hsl(var(--danger)); }
.devices-details .unit-follow { margin: 8px 0; }
.devices-try { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 8px; background: hsl(var(--brand) / .08); border: 1px solid hsl(var(--brand) / .3); }
.devices-try > p { flex: 1; margin: 0; font-size: 12px; color: hsl(var(--text-2)); }
.devices-try > svg { flex: none; color: hsl(var(--brand)); }

/* a definition's robot physics (app.js physicsBlock) */
.physics { display: grid; gap: 6px; margin-block-start: 8px; }
.physics-head { display: flex; align-items: center; gap: 6px; }
.physics-head h4 { margin: 0; font-size: 11px; font-weight: 600; }
.physics-finding { font-size: 11px; display: flex; gap: 6px; align-items: baseline; }
.physics-links { border-collapse: collapse; font: 10px var(--font-mono); }
.physics-links th, .physics-links td { padding: 1px 8px 1px 0; text-align: start; }
.physics-links td.num { text-align: end; }
/* The guided calibration of a servo bus (calibrate-modal.js): the model live on the left, the joint's prompt on the right. */
dialog.calibrate { width: min(980px, calc(100vw - 32px)); max-width: none; height: min(640px, calc(100dvh - 32px)); padding: 0; display: flex; flex-direction: column; overflow: hidden; }
dialog.calibrate:not([open]) { display: none; }
.calibrate-head { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid hsl(var(--border-1)); }
.calibrate-gap { flex: 1; }
.calibrate-body { flex: 1; min-height: 0; overflow: auto; padding: 16px; }
.calibrate-intro { max-width: 560px; display: grid; gap: 12px; }
.calibrate-warn { display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border-radius: var(--radius-control); color: hsl(var(--warn)); background: hsl(var(--warn) / .12); font-weight: 600; }
.calibrate-measure { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; height: 100%; }
.calibrate-stage { position: relative; min-height: 280px; border-radius: var(--radius-panel); overflow: hidden; background: hsl(var(--bg-0)); }
.calibrate-servos { padding: 14px 16px; overflow: auto; }
.calibrate-servo-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }
.calibrate-servo-list li { display: grid; grid-template-columns: 70px minmax(0, 1fr) 90px; align-items: center; gap: 10px; font-size: 13px; }
.calibrate-servo-motion { height: 8px; border-radius: 4px; background: hsl(var(--accent) / .55); min-width: 2px; }
.calibrate-servo-list li.found .calibrate-servo-motion { background: hsl(var(--ok, 140 60% 45%)); }
.calibrate-servo-list li.found { font-weight: 600; }
.calibrate-servo-list li.taken { opacity: .55; }
.calibrate-canvas { width: 100%; height: 100%; display: block; }
.calibrate-read { position: absolute; left: 10px; bottom: 6px; margin: 0; }
.calibrate-side { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.calibrate-joints { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; font-size: 12px; }
.calibrate-joints li { display: flex; align-items: center; gap: 6px; padding: 3px 8px; border-radius: 6px; color: hsl(var(--text-3)); }
.calibrate-joints li[data-state=current] { color: hsl(var(--text-1)); background: hsl(var(--brand) / .14); font-weight: 600; }
.calibrate-joints li[data-state=done] { color: hsl(var(--ok)); }
.calibrate-prompt { display: grid; gap: 8px; padding: 12px; border-radius: var(--radius-control); border: 1px solid hsl(var(--border-2)); }
.calibrate-prompt strong { font-size: 15px; line-height: 1.35; }
.calibrate-now { display: flex; align-items: baseline; gap: 8px; }
.calibrate-raw { font: 600 26px var(--font-mono); }
.calibrate-bar { position: relative; height: 14px; border-radius: 7px; background: hsl(var(--bg-2)); }
.calibrate-bar > span { position: absolute; top: 0; bottom: 0; }
.calibrate-bar-declared { background: hsl(var(--text-4) / .25); border-radius: 7px; }
.calibrate-bar-seen { background: hsl(var(--brand) / .45); border-radius: 7px; }
.calibrate-bar-now { width: 3px; margin-left: -1px; background: hsl(var(--text-1)); }
.calibrate-bar-end { width: 2px; top: -3px !important; bottom: -3px !important; background: hsl(var(--ok)); }
.calibrate-error { margin: 0; color: hsl(var(--danger)); }
/* The G-code path: the driver's live position under the header, large, through every step. */
.calibrate-position { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 24px; padding: 10px 16px; border-bottom: 1px solid hsl(var(--border-1)); }
.calibrate-state { padding: 2px 8px; border-radius: 6px; font: 600 12px var(--font-mono); background: hsl(var(--bg-2)); }
.calibrate-pos-row { display: flex; align-items: baseline; gap: 14px; }
.calibrate-pos-big { font: 600 18px var(--font-mono); }
.calibrate-suggest { display: grid; justify-items: start; gap: 8px; padding: 10px 12px; border-radius: var(--radius-control); background: hsl(var(--warn) / .10); }
.calibrate-suggest p { margin: 0; }
.calibrate-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.calibrate-summary { display: grid; gap: 12px; }
.calibrate-table { border-collapse: collapse; font-size: 12px; }
.calibrate-table th, .calibrate-table td { padding: 4px 12px 4px 0; text-align: start; border-bottom: 1px solid hsl(var(--border-1)); }
.calibrate-table td.num { font-family: var(--font-mono); }
.calibrate-reversed { color: hsl(var(--warn)); font-weight: 600; }
@media (max-width: 720px) { .calibrate-measure { grid-template-columns: 1fr; } .calibrate-stage { min-height: 220px; } }

/* A world's wiring (wiring.js, docs/regions.md § a world's wiring), after the Computaco topology editor: a dotted
   canvas, plain boxes on a hairline, ports that show on hover or while linking, a dashed band while dragging. */
.wr { display: flex; flex-direction: column; height: 100%; min-height: 0; outline: none; }
.wr-pane { height: 100%; min-height: 0; }
.wr-tools { display: flex; align-items: center; gap: 2px; padding: 2px 6px; border-bottom: 1px solid hsl(var(--border-1)); min-height: var(--row-h); }
.wr-note { margin-left: 8px; font-size: 11px; color: hsl(var(--text-3)); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wr-note.bad { color: hsl(var(--danger)); }
.wr-body { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 240px; }
.wr-canvas { overflow: auto; min-width: 0; background: radial-gradient(circle, hsl(var(--border-2)) 1px, transparent 1.2px) 0 0 / 24px 24px, hsl(var(--bg-1)); }
.wr-svg { display: block; touch-action: none; }
.wr-inspector { border-left: 1px solid hsl(var(--border-1)); padding: 10px 12px; overflow-y: auto; display: grid; gap: 8px; align-content: start; font-size: 11px; color: hsl(var(--text-2)); }
.wr-inspector h3 { margin: 0; font-size: 12px; font-weight: 500; color: hsl(var(--text-1)); overflow-wrap: anywhere; }
.wr-inspector p { margin: 0; }
.wr-field { display: grid; grid-template-columns: 70px minmax(0, 1fr) auto; align-items: center; gap: 6px; }
.wr-actions { display: flex; gap: 2px; }
.wr-box { fill: hsl(var(--bg-2)); stroke: hsl(var(--border-2)); stroke-width: 1; }
.wr-box.block.follow { fill: hsl(var(--bg-3)); }
.wr-box.block.agent, .wr-box.block.scene { stroke-dasharray: 3 3; }
.wr-box.pending { stroke: hsl(var(--brand)); stroke-dasharray: 4 3; }
.wr-node { cursor: pointer; }
.wr-node.sel .wr-box { stroke: hsl(var(--text-1)); stroke-width: 2; }
.wr-title { font: 500 12px var(--font-sans); fill: hsl(var(--text-1)); }
.wr-k, .wr-ch { font: 400 10.5px var(--font-mono); fill: hsl(var(--text-3)); }
.wr-side { font: 500 9.5px var(--font-sans); text-transform: uppercase; letter-spacing: .06em; fill: hsl(var(--text-3)); }
.wr-side.physical { fill: hsl(var(--warn)); }
.wr-state { font: 500 10.5px var(--font-mono); fill: hsl(var(--text-2)); }
.wr-state.following { fill: hsl(var(--ok)); }
.wr-state.holding { fill: hsl(var(--warn)); }
.wr-state.stopped { fill: hsl(var(--danger)); }
.wr-port { fill: hsl(var(--bg-1)); stroke: hsl(var(--text-2)); stroke-width: 1.2; cursor: crosshair; opacity: .35; transition: opacity 120ms ease; }
.wr-node:hover .wr-port, .wr-canvas.linking .wr-port, .wr-port:hover { opacity: 1; }
.wr-edge { stroke: hsl(var(--text-2)); stroke-width: 1.5; fill: none; pointer-events: none; }
.wr-edge.ro { stroke-dasharray: 5 4; stroke: hsl(var(--text-3)); }
.wr-edge.sel { stroke: hsl(var(--brand)); stroke-width: 2.5; }
.wr-arrowhead { fill: hsl(var(--text-2)); }
.wr-hit { stroke: transparent; stroke-width: 12; fill: none; cursor: pointer; }
.wr-rubber { stroke: hsl(var(--brand)); stroke-width: 1.5; stroke-dasharray: 4 3; fill: none; pointer-events: none; }
.wr-source circle { fill: hsl(var(--text-3)); }
.wr-source text { font: 400 10px var(--font-mono); fill: hsl(var(--text-3)); }
.wr-stop { cursor: pointer; }
.wr-stop rect { fill: hsl(var(--danger) / .12); stroke: hsl(var(--danger)); }
.wr-stop rect.sq { fill: hsl(var(--danger)); stroke: none; }
/* THE CHECKBOX AND THE RADIO (docs/regions.md § naked components, "the kit's checkbox"). A native input with
   `appearance: none`, so the keyboard, forms and screen readers keep the browser's behaviour; this rule only draws it.
   The input is the 24px hit area; its negative margin keeps its footprint the 16px box it draws, so a row does not
   grow (the 4px after the box is the space before its words).
   ::before is the box, ::after the mark (a tick, the indeterminate bar, the radio's dot). Colours are the --check-*
   tokens each stylesheet derives from its theme. This block is the same text in packages/appkit/ui/src/styles/tokens.css
   and packages/appkit/workbench/style.css (tests/workbench/checkbox.test.mjs holds them equal). `:root` lifts it over the
   shell's element rules (`input { height; padding; border-bottom }`, `.details input { width }`). */
:root input.cagi-check[type] {
  appearance: none;
  -webkit-appearance: none;
  box-sizing: border-box;
  display: inline-grid;
  place-content: center;
  flex: none;
  width: 24px;
  height: 24px;
  min-width: 24px;
  min-height: 24px;
  max-width: none;
  margin-block: -4px;
  margin-inline: -4px 0;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  vertical-align: middle;
  cursor: pointer;
  outline: none;
  box-shadow: none;
  accent-color: auto;
}
:root input.cagi-check[type]::before,
:root input.cagi-check[type]::after {
  content: "";
  grid-area: 1 / 1;
  place-self: center;
  box-sizing: border-box;
}
:root input.cagi-check[type]::before {
  width: 16px;
  height: 16px;
  border: 1.5px solid var(--check-edge);
  border-radius: 5px;
  background: var(--check-ground);
  transition:
    background-color var(--check-dur) var(--check-ease),
    border-color var(--check-dur) var(--check-ease),
    box-shadow var(--check-dur) var(--check-ease);
}
:root input.cagi-check[type]::after {
  width: 10px;
  height: 10px;
  background: var(--check-mark);
  clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0, 43% 62%);
  transform: scale(0);
  transition: transform var(--check-dur) var(--check-spring);
}
:root input.cagi-check[type="radio"]::before {
  border-radius: 50%;
}
:root input.cagi-check[type="radio"]::after {
  width: 6px;
  height: 6px;
  clip-path: circle(50%);
}
:root input.cagi-check[type="checkbox"]:indeterminate::after {
  clip-path: inset(40% 5% round 1px);
}
:root input.cagi-check[type]:hover::before {
  border-color: var(--check-edge-hover);
}
/* A radio group with nothing chosen also matches :indeterminate, so only a checkbox fills on it. */
:root input.cagi-check[type]:checked::before,
:root input.cagi-check[type="checkbox"]:indeterminate::before {
  border-color: var(--check-on);
  background: var(--check-on);
}
:root input.cagi-check[type]:checked::after,
:root input.cagi-check[type="checkbox"]:indeterminate::after {
  transform: scale(1);
}
:root input.cagi-check[type]:focus-visible::before {
  box-shadow:
    0 0 0 2px var(--check-ground),
    0 0 0 4px var(--check-ring);
}
:root input.cagi-check[type]:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}
:root input.cagi-check[type]:disabled::before {
  border-color: var(--check-edge);
}
@media (prefers-reduced-motion: reduce) {
  :root input.cagi-check[type]::before,
  :root input.cagi-check[type]::after {
    transition: none;
  }
}
/* end of the checkbox */

/* The guest's offer to keep what a prompt made (keep-guest-work.js): small, at the top of its thread, one icon. */
.keep-offer-slot { display: flex; justify-content: flex-end; padding: 8px 12px 0; }
.keep-offer { display: flex; align-items: center; gap: 8px; padding: 6px 8px 6px 12px; border: 1px solid var(--line, #d8d4c8); border-radius: 10px; background: var(--panel, #fff); box-shadow: 0 8px 24px rgba(0, 0, 0, .18); font-size: var(--fs-ui); }
.keep-offer .keep-offer-dismiss { border: 0; background: none; padding: 4px; cursor: pointer; color: inherit; opacity: .6; }

/* A part of a pane that did not load (react/host.jsx PartBoundary): its error, plainly, and a way to try again. */
.cagi-part-error { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 12px; color: hsl(var(--text-2)); font-size: var(--fs-caption); text-align: center; }
.cagi-part-error-retry { white-space: nowrap; font: inherit; padding: 2px 10px; border-radius: 6px; border: 1px solid hsl(var(--border-2)); background: transparent; color: inherit; cursor: pointer; }
.cagi-part-error-overlay { position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 20; padding: 6px 12px; border-radius: 8px; background: hsl(var(--bg-1)); border: 1px solid hsl(var(--border-2)); }

/* ── Universal Annotation System (annotations.js + annotations-ui.js) ─────────────────────────────────────────── */
.detail-row button.head-annotate {
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  min-width: 24px; height: 24px; padding: 0 4px;
  border-radius: var(--radius-control); font-size: var(--fs-caption); font-weight: 500; color: hsl(var(--text-3));
  border: 1px solid transparent; transition: background-color 120ms ease, color 120ms ease, border-color 120ms ease;
}
.detail-row button.head-annotate:hover { background: hsl(var(--bg-2)); color: hsl(var(--text-1)); border-color: transparent; }
.detail-row button.head-annotate.active,
.detail-row button.head-annotate[aria-pressed="true"] {
  background: hsl(var(--brand)); color: hsl(var(--brand-fg)); border-color: hsl(var(--brand));
}
.head-annotate-in { display: inline-flex; align-items: center; justify-content: center; gap: 4px; }
.head-annotate-badge {
  display: inline-flex; align-items: center; justify-content: center; min-width: 15px; height: 15px;
  padding: 0 4px; border-radius: 999px; font: 600 10px/1 var(--font-mono);
  background: hsl(var(--brand) / .16); color: hsl(var(--brand));
}
.head-annotate.active .head-annotate-badge,
.head-annotate[aria-pressed="true"] .head-annotate-badge {
  background: hsl(var(--brand-fg) / .22); color: hsl(var(--brand-fg));
}

.detail > .detail-body { position: relative; }
.pane-ann-stage { position: absolute; inset: 0; pointer-events: none; z-index: 30; overflow: hidden; }
.pane-ann-canvas { position: absolute; pointer-events: auto; cursor: crosshair; touch-action: none; z-index: 1; }
.pane-ann-live-svg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.pane-ann-marks { position: absolute; pointer-events: none; z-index: 2; }
.pane-ann-svg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.pane-ann-rect { fill: hsl(var(--brand) / .14); stroke: hsl(var(--brand)); stroke-width: 2; vector-effect: non-scaling-stroke; }
.pane-ann-rect.selected { fill: hsl(var(--brand) / .24); stroke-width: 2.5; }
.pane-ann-rect.draft { fill: rgba(255, 59, 48, .15); stroke: #ff3b30; stroke-dasharray: 4 3; }
.pane-ann-rect.dim { opacity: .28; }
.pane-ann-stroke { fill: none; stroke: #ff3b30; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.pane-ann-stroke.selected { stroke-width: 4; }
.pane-ann-stroke.dim { opacity: .28; }
.pane-ann-pins { position: absolute; inset: 0; pointer-events: none; }
.pane-ann-pin {
  position: absolute; transform: translate(-50%, -50%); pointer-events: auto;
  width: 24px; height: 24px; min-width: 24px; padding: 0; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  font: 600 11px/1 var(--font-mono); color: hsl(var(--brand-fg)); background: hsl(var(--brand));
  border: 2px solid hsl(var(--bg-0)); box-shadow: 0 2px 8px rgba(0, 0, 0, .28); cursor: pointer;
  transition: transform 120ms ease, opacity 120ms ease;
}
.pane-ann-pin:hover { transform: translate(-50%, -50%) scale(1.12); }
.pane-ann-pin.selected { transform: translate(-50%, -50%) scale(1.18); box-shadow: 0 0 0 3px hsl(var(--brand) / .35), 0 3px 10px rgba(0, 0, 0, .35); }
.pane-ann-pin.resolved { background: hsl(var(--text-3)); opacity: .75; }
.pane-ann-pin.dim { opacity: .35; }
.pane-ann-pin.pulse { animation: pane-ann-pulse 600ms ease; }
@keyframes pane-ann-pulse { 0% { transform: translate(-50%, -50%) scale(1); } 45% { transform: translate(-50%, -50%) scale(1.45); } 100% { transform: translate(-50%, -50%) scale(1.15); } }

.pane-ann-bar {
  position: absolute; top: 10px; left: 50%; transform: translateX(-50%); z-index: 4;
  pointer-events: auto; display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px;
  border-radius: 999px; border: 1px solid hsl(var(--border-1));
  background: var(--surface-float, hsl(var(--bg-1) / .92)); backdrop-filter: var(--blur-float, blur(12px));
  box-shadow: 0 6px 20px rgba(0, 0, 0, .14); max-width: calc(100% - 24px);
}
.pane-ann-bar button { height: 24px; padding: 0 8px; border-radius: 999px; font-size: var(--fs-caption); }
.pane-ann-bar button.active { background: hsl(var(--brand)); color: hsl(var(--brand-fg)); }
.pane-ann-tool-in { display: inline-flex; align-items: center; gap: 4px; }
.pane-ann-hint { font-size: var(--fs-caption); color: hsl(var(--text-2)); padding: 0 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pane-ann-sep { width: 1px; height: 14px; background: hsl(var(--border-1)); flex: none; }
.pane-ann-chip {
  display: inline-flex; align-items: center; max-width: 190px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  padding: 2px 7px; border-radius: 999px; border: 1px solid hsl(var(--border-1));
  background: hsl(var(--bg-2)); color: hsl(var(--text-1)); font: 500 var(--fs-micro)/1.2 var(--font-mono); cursor: pointer;
}
.pane-ann-chip:hover { border-color: hsl(var(--brand)); color: hsl(var(--brand)); }

.pane-ann-composer {
  position: absolute; left: 24px; top: 56px; width: 296px; max-width: calc(100% - 24px); z-index: 6;
  pointer-events: auto; display: flex; flex-direction: column; gap: 8px; padding: 10px;
  border-radius: 12px; border: 1px solid hsl(var(--border-1));
  background: hsl(var(--bg-0)); box-shadow: 0 12px 32px rgba(0, 0, 0, .22);
}
.pane-ann-composer-head { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.pane-ann-input {
  width: 100%; resize: vertical; min-height: 54px; padding: 7px 9px; border-radius: 8px;
  border: 1px solid hsl(var(--border-1)); background: hsl(var(--bg-1)); color: hsl(var(--text-1));
  font: var(--fs-ui)/1.45 var(--font-sans);
}
.pane-ann-input:focus { outline: none; border-color: hsl(var(--brand)); }
.pane-ann-composer-foot { display: flex; align-items: center; gap: 6px; justify-content: flex-end; }
.pane-ann-composer-foot button { height: 26px; padding: 0 10px; border-radius: 8px; font-size: var(--fs-ui); }

.pane-ann-rail {
  position: absolute; top: 0; inset-inline-end: 0; bottom: 0; width: 292px; max-width: 85%; z-index: 5;
  pointer-events: auto; display: flex; flex-direction: column;
  border-inline-start: 1px solid hsl(var(--border-1)); background: hsl(var(--bg-0) / .96);
  backdrop-filter: var(--blur-float, blur(12px)); box-shadow: -6px 0 24px rgba(0, 0, 0, .1);
}
.pane-ann-rail-head {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 8px 10px;
  border-bottom: 1px solid hsl(var(--border-1));
}
.pane-ann-rail-head strong { font-size: var(--fs-ui); font-weight: 600; color: hsl(var(--text-1)); margin-inline-end: auto; }
.pane-ann-filters { display: flex; gap: 3px; width: 100%; }
.pane-ann-filter { height: 22px; padding: 0 7px; border-radius: 999px; font-size: var(--fs-caption); color: hsl(var(--text-3)); }
.pane-ann-filter.active { background: hsl(var(--bg-2)); color: hsl(var(--text-1)); font-weight: 500; }
.pane-ann-list { flex: 1; overflow-y: auto; padding: 8px; display: flex; flex-direction: column; gap: 8px; }
.pane-ann-empty { padding: 18px 12px; text-align: center; font-size: var(--fs-body); color: hsl(var(--text-3)); line-height: 1.5; }
.pane-ann-card {
  padding: 9px 10px; border-radius: 10px; border: 1px solid hsl(var(--border-1));
  background: hsl(var(--bg-1)); cursor: pointer; display: flex; flex-direction: column; gap: 6px;
  transition: border-color 120ms ease, background-color 120ms ease;
}
.pane-ann-card:hover { border-color: hsl(var(--border-2, var(--border-1))); }
.pane-ann-card.selected { border-color: hsl(var(--brand)); background: hsl(var(--brand) / .05); }
.pane-ann-card.resolved { opacity: .72; }
.pane-ann-card-head { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; }
.pane-ann-num {
  width: 18px; height: 18px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center;
  font: 600 var(--fs-micro)/1 var(--font-mono); background: hsl(var(--brand)); color: hsl(var(--brand-fg)); flex: none;
}
.pane-ann-card.resolved .pane-ann-num { background: hsl(var(--text-3)); }
.pane-ann-meta { font-size: var(--fs-caption); color: hsl(var(--text-3)); margin-inline-start: auto; }
.pane-ann-text { margin: 0; font-size: var(--fs-ui); line-height: 1.45; color: hsl(var(--text-1)); white-space: pre-wrap; word-break: break-word; }
.pane-ann-replies { display: flex; flex-direction: column; gap: 4px; padding-inline-start: 10px; border-inline-start: 2px solid hsl(var(--border-1)); }
.pane-ann-reply { font-size: var(--fs-caption); line-height: 1.4; display: flex; gap: 5px; }
.pane-ann-reply-author { font-weight: 600; color: hsl(var(--text-2)); flex: none; }
.pane-ann-reply-text { color: hsl(var(--text-1)); }
.pane-ann-reply-form { display: flex; gap: 4px; }
.pane-ann-reply-input { flex: 1; min-width: 0; height: 26px; padding: 0 7px; border-radius: 6px; border: 1px solid hsl(var(--border-1)); background: hsl(var(--bg-0)); color: hsl(var(--text-1)); font-size: var(--fs-ui); }
.pane-ann-card-actions { display: flex; align-items: center; gap: 4px; padding-top: 2px; }
.pane-ann-card-actions button { height: 24px; padding: 0 7px; border-radius: 6px; font-size: var(--fs-caption); }

/* Native editor annotation markers (table cells, text lines, doc blocks) */
.ed-sheet td.ed-cell-ann { position: relative; }
.ed-sheet td.ed-cell-ann::after {
  content: ''; position: absolute; top: 0; right: 0; width: 0; height: 0;
  border-style: solid; border-width: 0 7px 7px 0; border-color: transparent hsl(var(--brand)) transparent transparent;
}
[data-doc-annotated="true"] { background: hsl(var(--brand) / .08); border-inline-start: 2px solid hsl(var(--brand)); padding-inline-start: 6px; border-radius: 0; }
