/* DSH Desktop — visual system. * * Design language: reference design desktop / Apple macOS. Light by default; dark by * explicit `data-theme="dark"` on the root, or by `prefers-color-scheme: * dark` for users on system dark mode. Structure and spacing come first; * colour is a thin, brand-neutral layer over these tokens. Swap the accent * HSL and every hover/focus/badge follows without further edits. * * The selector families that follow (msg / tool-block / card / widget-* / * mission-* / market-* / plugins-* / devtools-* / visibility-* / panels-c-* * / playground-* / onboarding-* / adaptive-layout buckets) are load-bearing — * renderer.js and the sibling scripts reach into the DOM by exact class / * id. The visuals may change; the names must not. New surfaces (sidebar-brand, * nav-item, debug-popover, empty-welcome, prompt-chip, page-title/page-sub, * icon-btn) come from the reference design IA restructure. */ :root { color-scheme: light dark; /* Neutrals */ --bg: #ffffff; --surface: #ffffff; --bg-elev: #f7f7f8; /* legacy alias — panels used it as "one step up" */ --bg-elev-2: #f2f2f4; /* legacy alias — hover / secondary surface */ --surface-2: #f7f7f8; --surface-vibrancy: rgba(245, 245, 247, 0.78); --surface-hover: rgba(0, 0, 0, 0.045); --surface-active: rgba(0, 0, 0, 0.07); --text: #1d1d1f; --text-secondary: #6b6b70; --text-tertiary: #98989d; --muted: #6b6b70; --border: rgba(0, 0, 0, 0.09); --border-strong: rgba(0, 0, 0, 0.16); --divider: rgba(0, 0, 0, 0.06); /* Accent — the single hue used for CTAs, selection, live-state. */ --accent: #2563eb; --accent-strong: #1d4ed8; --accent-soft: rgba(37, 99, 235, 0.12); /* density-spec §7: turn edge tokens read across the chat stream. * --turn-action-edge paints the left rail of a sealed action turn * (reasoning + text + tool-call cluster reads as one blue-edged block). * --turn-output-edge paints the left rail of a tool-result row so the * result reads as grey-edged echo below the action's blue. * --turn-interrupt-marker paints the small orange sliver that appears * at the head of an interruption row so a reader tracking the rail * sees the seam. Kept as brand-neutral defaults; swap here to reskin. */ --turn-action-edge: var(--accent); --turn-output-edge: var(--border-strong); --turn-interrupt-marker: #ea580c; /* Semantic */ --ok: #16a34a; --ok-soft: rgba(22, 163, 74, 0.12); --warn: #d97706; --warn-soft: rgba(217, 119, 6, 0.14); --err: #dc2626; --error: #dc2626; /* legacy alias */ --err-soft: rgba(220, 38, 38, 0.12); --tool: #b45309; /* legacy alias — tool-family accents */ /* Bubble backgrounds still referenced by older msg rules. */ --user-bubble: #f0f2f5; --assistant-bubble: transparent; /* Category tints (icon backgrounds, family accents). */ --tint-blue: #2563eb; --tint-purple: #7c3aed; --tint-teal: #0d9488; --tint-orange: #ea580c; --tint-pink: #db2777; --tint-slate: #475569; /* Radii */ --radius-sm: 6px; --radius: 8px; --radius-lg: 12px; --radius-xl: 16px; /* Spacing (8px grid; halves for micro adjustments) */ --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-5: 20px; --space-6: 24px; --space-8: 32px; --space-10: 40px; --space-12: 48px; /* Type */ --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", "Segoe UI", Roboto, "Noto Sans SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif; --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace; --font-mono: var(--mono); --fs-hero: 32px; --fs-page: 28px; --fs-section: 17px; --fs-body: 14px; --fs-sm: 13px; --fs-xs: 12px; --fs-micro: 11px; /* Shadows */ --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.04), 0 1px 1px rgba(0, 0, 0, 0.02); --shadow-2: 0 2px 8px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04); --shadow-pop: 0 8px 24px rgba(0, 0, 0, 0.12), 0 2px 6px rgba(0, 0, 0, 0.06); /* Layout constants. `--sidebar-w` widened from 244→260 so session titles * with the `smoke-tr…`/`smoke-ki…` prefixes stop truncating at the fifth * character; `--stream-w` is the shared max-width used by chat bubbles, * cards, the empty-welcome block, and now the composer so everything reads * as one centered column. */ --sidebar-w: 260px; --stream-w: 760px; --header-h: 56px; /* D35 (drift cycle 18): chart series palette. widgets.js reads these * via `var(--chart-series-0..3)` so the single palette is themable and * reusable across chart consumers (mission-topo, growth widgets, etc.) * without touching module code. Series 0 mirrors --accent for * continuity with app-wide "primary series" cues. */ --chart-series-0: var(--accent); --chart-series-1: #8ad0a1; --chart-series-2: #e0b57b; --chart-series-3: #c88ad0; } /* Dark theme — honoured on `[data-theme="dark"]` and, when unset, whenever * the system reports dark preference. Users can force light with * `[data-theme="light"]` on . */ @media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --bg: #101013; --surface: #17171a; --bg-elev: #17171a; --bg-elev-2: #1c1c20; --surface-2: #1c1c20; --surface-vibrancy: rgba(28, 28, 32, 0.82); --surface-hover: rgba(255, 255, 255, 0.05); --surface-active: rgba(255, 255, 255, 0.08); --text: #f2f2f4; --text-secondary: #a1a1a8; --text-tertiary: #6c6c75; --muted: #a1a1a8; --border: rgba(255, 255, 255, 0.09); --border-strong: rgba(255, 255, 255, 0.18); --divider: rgba(255, 255, 255, 0.06); --accent: #4f8bff; --accent-strong: #6ea3ff; --accent-soft: rgba(79, 139, 255, 0.18); --turn-action-edge: var(--accent); --turn-output-edge: var(--border-strong); --turn-interrupt-marker: #f97316; --user-bubble: #22262f; --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.4); --shadow-2: 0 2px 8px rgba(0, 0, 0, 0.5); --shadow-pop: 0 12px 32px rgba(0, 0, 0, 0.6); } } :root[data-theme="dark"] { --bg: #101013; --surface: #17171a; --bg-elev: #17171a; --bg-elev-2: #1c1c20; --surface-2: #1c1c20; --surface-vibrancy: rgba(28, 28, 32, 0.82); --surface-hover: rgba(255, 255, 255, 0.05); --surface-active: rgba(255, 255, 255, 0.08); --text: #f2f2f4; --text-secondary: #a1a1a8; --text-tertiary: #6c6c75; --muted: #a1a1a8; --border: rgba(255, 255, 255, 0.09); --border-strong: rgba(255, 255, 255, 0.18); --divider: rgba(255, 255, 255, 0.06); --accent: #4f8bff; --accent-strong: #6ea3ff; --accent-soft: rgba(79, 139, 255, 0.18); --turn-action-edge: var(--accent); --turn-output-edge: var(--border-strong); --turn-interrupt-marker: #f97316; --user-bubble: #22262f; } * { box-sizing: border-box; } /* The app is a fixed viewport grid; the document itself must never scroll. * Without this, any sidebar section that outgrows 100vh (e.g. a long History * list) pushes the page into a document scroll below the statusbar. */ html, body { margin: 0; height: 100%; overflow: hidden; } body { background: var(--bg); color: var(--text); font-family: var(--font); font-size: 14px; line-height: 1.5; -webkit-font-smoothing: antialiased; } .app { display: grid; grid-template-columns: 260px 1fr; height: 100vh; } .sidebar { background: var(--bg-elev); border-right: 1px solid var(--border); display: flex; flex-direction: column; } .sidebar-head { padding: 12px; border-bottom: 1px solid var(--border); } .sidebar-foot { padding: 12px; border-top: 1px solid var(--border); } .sessions { list-style: none; margin: 0; padding: 6px; overflow-y: auto; flex: 1; } .sessions li { padding: 8px 10px; border-radius: 6px; cursor: pointer; color: var(--muted); font-size: 13px; display: flex; align-items: center; gap: 6px; } .sessions li .title { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .sessions li .live-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); flex: 0 0 auto; animation: pulse 1.4s ease-in-out infinite; } @keyframes pulse { 0%,100% { opacity: 1 } 50% { opacity: 0.35 } } .sessions li:hover { background: var(--bg-elev-2); color: var(--text); } .sessions li.active { background: var(--bg-elev-2); color: var(--text); } .sessions li .indent { flex: 0 0 auto; color: var(--border); font-family: var(--mono); font-size: 11px; letter-spacing: 0; white-space: pre; user-select: none; } .sessions li.child .title { color: var(--muted); } .sessions li.orphan .title::after { content: ' (orphan)'; color: var(--tool); font-size: 10px; } .fork-marker { align-self: flex-start; max-width: 780px; width: 100%; border: 1px dashed var(--accent); border-radius: 6px; background: rgba(110, 168, 255, 0.05); padding: 6px 10px; font-size: 12px; } .fork-marker .head { color: var(--accent); font-weight: 600; cursor: pointer; user-select: none; } .fork-marker .head::before { content: '⑂ '; } .fork-marker ul { margin: 6px 0 0; padding-left: 20px; list-style: disc; color: var(--muted); } .fork-marker ul li { cursor: pointer; padding: 2px 0; } .fork-marker ul li:hover { color: var(--text); } .fork-marker ul li .live-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--ok); margin-right: 4px; vertical-align: middle; animation: pulse 1.4s ease-in-out infinite; } .context-card { align-self: flex-start; max-width: 780px; background: var(--bg-elev); border: 1px solid var(--border); border-radius: 8px; padding: 6px 10px; font-size: 12.5px; } .context-card summary { cursor: pointer; color: var(--muted); list-style: none; display: flex; align-items: center; gap: 6px; } .context-card summary::-webkit-details-marker { display: none; } /* Round-visual N3 (2026-07-16): replaced a data:image/svg+xml paperclip * glyph (was refused by our CSP `default-src 'self'`, since we deliberately * do NOT allow `img-src data:`). A single typographic glyph via `content:` * has zero CSP surface and preserves the muted-stroke feel — the paperclip * spirit was "here's an attachment"; the down-arrow is the standard * typographic marker for "expand for content". */ .context-card summary::before { content: '\2304'; /* ⌄ down-arrow marker (typographic, not emoji) */ color: var(--muted); font-size: 12px; line-height: 1; width: 12px; height: 12px; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; transition: transform 120ms ease; } .context-card[open] summary::before { transform: rotate(180deg); } .context-card summary .src { color: var(--accent); font-family: var(--mono); font-size: 11px; } .context-card summary .hint { color: var(--muted); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; flex: 1; } .context-card[open] summary::before { /* N3: rotation lives on line 250 now */ } .context-card .body { margin-top: 6px; padding: 6px 8px; background: var(--bg); border-radius: 4px; font-family: var(--mono); font-size: 12px; white-space: pre-wrap; word-wrap: break-word; color: var(--text); } .compact-divider { align-self: stretch; text-align: center; color: var(--muted); font-size: 11px; letter-spacing: 0.1em; margin: 8px 0; position: relative; } .compact-divider::before, .compact-divider::after { content: ''; position: absolute; top: 50%; width: 30%; border-top: 1px dashed var(--border); } .compact-divider::before { left: 8%; } .compact-divider::after { right: 8%; } .compact-divider .tokens { color: var(--tool); margin-left: 6px; } .msg.assistant { position: relative; } .msg .fork-here { position: absolute; top: 6px; right: 8px; opacity: 0; transition: opacity 0.15s; font-size: 11px; padding: 2px 6px; background: var(--bg-elev-2); border: 1px solid var(--border); color: var(--muted); border-radius: 4px; cursor: pointer; } .msg.assistant:hover .fork-here { opacity: 1; } .msg .fork-here:hover { color: var(--accent); border-color: var(--accent); } .msg .fork-here.mock::after { content: ' (mock)'; color: var(--tool); font-size: 9px; } .main { display: flex; flex-direction: column; min-width: 0; min-height: 0; overflow-y: auto; } .header { padding: 10px 16px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 12px; } .title { font-weight: 600; } .debug { margin-left: auto; display: flex; gap: 8px; } .stream { flex: 1; overflow-y: auto; padding: 16px 24px; display: flex; flex-direction: column; gap: 12px; /* task #164: min-height:0 allows the stream to actually scroll inside its * parent column-flex; without it a tall body pushes .stream past 100% of * viewport instead of scrolling internally. */ min-height: 0; } /* task #164: prevent flex-column from collapsing children with no internal * overflow (approval / exit_plan_mode / steer cards, reasoning blocks, tool * rows). Flex column defaults to shrinking children to fit; that squashes * fixed-height interaction cards to ~16px whenever the stream body is taller * than the viewport. Every stream child renders at its intrinsic height and * the stream itself scrolls (established by min-height:0 above). */ .stream > * { flex-shrink: 0; } .msg { max-width: 780px; padding: 10px 14px; border-radius: 10px; white-space: pre-wrap; word-wrap: break-word; } .msg.user { background: var(--user-bubble); align-self: flex-end; } .msg.assistant { background: var(--assistant-bubble); border: 1px solid var(--border); } .msg.reasoning { font-style: italic; color: var(--muted); background: transparent; border-left: 2px solid var(--border); border-radius: 0; padding-left: 12px; } /* task #34 (2026-07-17 user 实机 + team-lead 正面参照): role labels are * lightweight — small typographic dot glyph + Titlecase word, inline with * body. The old block-level uppercase caps card ("USER"/"HUMAN") was flagged * as adding no information increment. Keeps `.role` selector for existing * tests + DOM queries; the inner `.role-glyph` + `.role-label` carry the new * two-part shape. LangSmith detail-pane grammar (System/User Titlecase word * with a small leading icon, body 13px) is the positive reference. */ .msg .role { display: flex; align-items: baseline; gap: 6px; font-size: 11px; color: var(--muted); margin-bottom: 4px; letter-spacing: 0; text-transform: none; } .msg .role .role-glyph { font-family: var(--mono); color: var(--muted); } .msg .role .role-label { font-weight: 500; color: var(--muted); } .tool-block { /* task #159: LangSmith-row shape. The old ~780px centered card with orange * mono heading was 老板 "太丑了" 反馈的直接靶子; the row is now full-width, * left-aligned, single-line summary ~28px tall. Left color edge stays * (family band), but the accent-orange mono name is retired — neutral * text with a per-family tint via .tool-family-name. Args + result are * still full disclosure on click, capped at 320px per density-spec §2 L1. */ background: var(--bg-elev); border: 1px solid var(--border); border-left-width: 2px; border-radius: 4px; padding: 4px 10px 4px 10px; font-family: var(--mono); font-size: 12.5px; max-width: none; width: 100%; min-height: 28px; margin: 2px 0; } .tool-block summary { cursor: pointer; color: var(--text); list-style: none; display: flex; align-items: center; gap: 8px; min-height: 20px; } .tool-block summary::-webkit-details-marker { display: none; } /* Round-visual N3: chevron via pure-CSS border triangle (right-pointing, * rotates 90deg when `[open]`). Replaces a `data:image/svg+xml` background * that CSP `default-src 'self'` refused. Border-triangle also carries * currentColor via `border-left-color`, so the chevron tints with the row * text automatically — the SVG-with-baked-hex approach couldn't. */ .tool-block summary::before { content: ''; width: 0; height: 0; border-top: 4px solid transparent; border-bottom: 4px solid transparent; border-left: 5px solid var(--muted); transition: transform 120ms ease; flex: 0 0 auto; } .tool-block[open] summary::before { transform: rotate(90deg); } .tool-block .args, .tool-block .result { margin-top: 6px; padding: 6px 8px; background: var(--bg); border-radius: 4px; white-space: pre-wrap; word-wrap: break-word; max-height: 320px; overflow: auto; /* density-spec §2 L1 rule */ } .tool-block .label { color: var(--muted); font-size: 11px; } .card { max-width: 780px; background: var(--bg-elev); border: 1px solid var(--accent); border-radius: 10px; padding: 12px 14px; } .card h4 { margin: 0 0 4px 0; font-size: 13px; } .card .actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; } .card.disabled { opacity: 0.45; border-color: var(--border); } .card.disabled button { pointer-events: none; } .system { color: var(--muted); font-size: 12px; font-style: italic; padding: 4px 0; text-align: center; } .composer { border-top: 1px solid var(--border); padding: 10px 16px; display: flex; gap: 10px; align-items: flex-end; } .composer textarea { flex: 1; background: var(--bg-elev); border: 1px solid var(--border); border-radius: 8px; color: var(--text); padding: 8px 10px; resize: none; font: inherit; font-family: var(--font); } .composer textarea:focus { outline: none; border-color: var(--accent); } /* Legacy rule once stacked Cancel above Send in a right-hand column; the * composer-bar layout wants a single trailing row (Cancel · Send) aligned * with the meta chips. Kept as a row so no later section needs to fight it. */ .composer-actions { display: flex; flex-direction: row; align-items: center; gap: 6px; } button { border: 1px solid var(--border); background: var(--bg-elev); color: var(--text); padding: 6px 12px; border-radius: 6px; cursor: pointer; font: inherit; font-size: 13px; } button:hover:not(:disabled) { background: var(--bg-elev-2); } button:disabled { opacity: 0.4; cursor: not-allowed; } button.primary { background: var(--accent); color: #0a0d14; border-color: var(--accent); font-weight: 600; } button.primary:hover:not(:disabled) { filter: brightness(1.1); background: var(--accent); } button.ghost { background: transparent; } .statusbar { padding: 6px 16px; border-top: 1px solid var(--border); display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); } .statusbar .spacer { flex: 1; } .statusbar .muted { color: var(--muted); } .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); } .dot.running { background: var(--ok); } .dot.starting, .dot.respawning { background: var(--tool); } .dot.crashed, .dot.dead { background: var(--error); } .field { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); } .field select { background: var(--bg-elev-2); border: 1px solid var(--border); color: var(--text); padding: 6px 8px; border-radius: 6px; } /* --- widget renderer ---------------------------------------------------- */ .widget { background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; margin-top: 4px; display: flex; flex-direction: column; gap: 10px; font-family: var(--font); font-size: 13px; color: var(--text); max-height: 420px; overflow: auto; } .widget-body { display: flex; flex-direction: column; gap: 8px; } .widget-caption { color: var(--muted); font-size: 11.5px; } .widget-unsupported { color: var(--muted); font-style: italic; font-size: 12px; } /* table */ .widget-table table { width: 100%; border-collapse: collapse; font-size: 12.5px; } .widget-table th, .widget-table td { padding: 5px 8px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; } .widget-table th { color: var(--muted); font-weight: 600; text-transform: uppercase; font-size: 10.5px; letter-spacing: 0.04em; } .widget-table tbody tr:last-child td { border-bottom: none; } .widget-table tbody tr:hover { background: var(--bg-elev); } /* chart */ .widget-chart-svg { width: 100%; height: auto; display: block; } .widget-chart-legend { display: flex; gap: 14px; font-size: 11.5px; color: var(--muted); flex-wrap: wrap; } .widget-chart-legend-item { display: inline-flex; align-items: center; gap: 6px; } .widget-chart-swatch { display: inline-block; width: 10px; height: 10px; border-radius: 2px; } /* options */ .widget-options-q { font-weight: 600; font-size: 13.5px; margin-bottom: 2px; } .widget-options-list { display: flex; flex-direction: column; gap: 4px; } .widget-option { border: 1px solid var(--border); background: var(--bg-elev); color: var(--text); border-radius: 6px; padding: 8px 10px; text-align: left; cursor: pointer; font: inherit; font-size: 12.5px; display: flex; flex-direction: column; gap: 2px; } .widget-option:hover { background: var(--bg-elev-2); border-color: var(--accent); } .widget-option-label { font-weight: 500; } .widget-option-hint { font-size: 11px; color: var(--muted); } /* kv */ .widget-kv { display: grid; grid-template-columns: max-content 1fr; gap: 4px 12px; margin: 0; font-size: 12.5px; } .widget-kv dt { color: var(--muted); font-weight: 500; } .widget-kv dd { margin: 0; } /* action row */ .widget-actions { display: flex; gap: 6px; flex-wrap: wrap; border-top: 1px dashed var(--border); padding-top: 8px; } .widget-actions button { font-size: 12px; padding: 4px 10px; } .widget-actions button.danger { border-color: var(--error); color: var(--error); background: transparent; } /* --- adaptive layout (heuristic buckets) -------------------------------- * * Body carries one of .layout-chat / .layout-code-review / .layout-artifact * / .layout-monitor at all times. The variables below are the levers each * bucket tweaks — main-column width, chat gutter, chat font size, tool * block open-by-default, right-rail width. Nothing here alters existing * selectors, so other layout work continues untouched. */ :root { --layout-stream-max: 780px; /* max-width of chat bubbles / tool blocks */ --layout-stream-pad: 16px; /* horizontal padding of .stream */ --layout-stream-gap: 12px; /* vertical gap between stream items */ --layout-chat-fs: 14px; /* body font-size in stream */ --layout-rail-w: 0px; /* right-rail width (artifact bucket only) */ --layout-tool-open: initial; /* used to force
open by default */ --layout-scroll-behavior: auto; --layout-transition: 220ms ease; } body { transition: background var(--layout-transition); } body .app { transition: grid-template-columns var(--layout-transition); } body .stream { transition: padding var(--layout-transition), font-size var(--layout-transition); scroll-behavior: var(--layout-scroll-behavior); font-size: var(--layout-chat-fs); padding-left: var(--layout-stream-pad); padding-right: var(--layout-stream-pad); gap: var(--layout-stream-gap); } /* Widen bubbles / tool blocks against the current bucket's max. Rules * are scoped by body class so unrelated layouts don't inherit. */ body.layout-code-review .msg, body.layout-code-review .tool-block, body.layout-code-review .widget, body.layout-code-review .context-card { max-width: var(--layout-stream-max); } body.layout-code-review { --layout-stream-max: 1080px; --layout-stream-pad: 20px; } body.layout-code-review .tool-block[open] .args, body.layout-code-review .tool-block[open] .result { font-size: 12.5px; } /* Force tool blocks open by default so diffs / patch results are visible * without a click. A user's manual toggle still wins (details keeps its * own open state on the element). We rely on `[open]` scoping already * present in existing rules. */ body.layout-code-review .tool-block:not([data-collapsed]) { /* Hack:
is only open when the `open` attribute is set. We * cannot force that via CSS, so layout-controller.js also sets `open` * on any newly-appended .tool-block while this class is active. */ } body.layout-artifact { --layout-rail-w: 320px; --layout-stream-max: 720px; /* narrower main so the rail fits */ } /* Reserve a right-rail column via a subtle right-padding on .main; the * artifact card can slot into it, or another module can drop a preview * webview there. Keeps DOM structure identical to the chat layout. */ body.layout-artifact .main { padding-right: var(--layout-rail-w); transition: padding var(--layout-transition); position: relative; } body.layout-artifact .layout-rail-slot { position: absolute; top: 48px; right: 0; width: var(--layout-rail-w); bottom: 32px; border-left: 1px solid var(--border); background: var(--bg-elev); overflow-y: auto; } body.layout-monitor { --layout-stream-pad: 10px; --layout-stream-gap: 6px; --layout-chat-fs: 12.5px; --layout-scroll-behavior: smooth; } body.layout-monitor .msg { padding: 6px 10px; border-radius: 6px; } body.layout-monitor .tool-block { padding: 4px 10px; } /* Layout indicator (header widget). Low-key text button, dropdown pinned * beneath. No background fanfare — the point is glanceable, not shouty. */ /* The indicator sits in .header-actions next to ghost/small buttons; its * metrics must match theirs exactly (same padding/font/radius/height) or the * row reads misaligned. No extra margin — the flex gap owns spacing. */ .layout-indicator { position: relative; display: inline-flex; } .layout-indicator-btn { font-family: var(--font); /* Neighbours in .header-actions are `ghost small` (4px 8px, --fs-xs) — * match that tier exactly, not the full-size ghost tier, or this button * reads taller than Quick chat / Debug beside it. */ font-size: var(--fs-xs); font-weight: 500; padding: 4px 8px; border-radius: var(--radius-sm); background: transparent; color: var(--text); border: 1px solid var(--border); display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; cursor: pointer; transition: background 120ms ease, color 120ms ease, border-color 120ms ease; } .layout-indicator-btn:hover { background: var(--surface-hover); } .layout-indicator-btn:hover { color: var(--text); border-color: var(--accent); } .layout-indicator-btn.locked { border-color: var(--tool); color: var(--tool); } .layout-indicator-dropdown { position: absolute; top: calc(100% + 4px); right: 0; background: var(--bg-elev); border: 1px solid var(--border); border-radius: 6px; padding: 4px; z-index: 10; display: flex; flex-direction: column; gap: 2px; min-width: 140px; box-shadow: 0 4px 12px rgba(0,0,0,0.35); } .layout-indicator-item { background: transparent; color: var(--text); border: none; text-align: left; padding: 4px 8px; border-radius: 4px; font-size: 12px; cursor: pointer; } .layout-indicator-item:hover { background: var(--bg-elev-2); } .layout-indicator-item.active { color: var(--accent); } .layout-indicator-auto { border-top: 1px solid var(--border); margin-top: 2px; padding-top: 6px; color: var(--muted); } /* Transient toast fired on every layout switch. Anchored top-right under the * header. The visible-difference tell for layouts whose stream-side effects * only kick in once diffs/artifacts/etc show up. */ .layout-toast { position: fixed; top: 62px; right: 20px; z-index: 30; padding: 6px 12px; border-radius: 6px; background: var(--bg-elev-2, var(--bg-elev)); color: var(--text); border: 1px solid var(--accent); font-size: 12px; box-shadow: 0 4px 12px rgba(0,0,0,0.4); opacity: 0; transform: translateY(-4px); transition: opacity 180ms ease, transform 180ms ease; pointer-events: none; } .layout-toast.show { opacity: 1; transform: translateY(0); } /* Artifact-rail empty-state placeholder. Renders inside .layout-rail-slot * whenever the artifact bucket is active AND no artifact card exists yet, * so switching to `artifact` has an immediate visual tell. */ .layout-rail-empty { padding: 24px 16px; color: var(--muted); text-align: center; display: flex; flex-direction: column; gap: 6px; align-items: center; } .layout-rail-empty .layout-rail-icon { font-size: 24px; opacity: 0.6; } .layout-rail-empty .layout-rail-title { font-size: 12px; color: var(--text); font-weight: 500; } .layout-rail-empty .layout-rail-sub { font-size: 11px; line-height: 1.5; } .layout-rail-empty code { font-size: 10.5px; background: var(--bg); padding: 1px 4px; border-radius: 3px; } /* Faint bucket-specific stream tint so an empty stream still shows a diff * between chat and code-review. Kept below tool-block/msg colors so no * existing surface is affected. */ body.layout-code-review .stream { background: linear-gradient(to bottom, transparent, color-mix(in oklab, var(--accent) 3%, transparent)); } body.layout-monitor .stream { background: color-mix(in oklab, var(--muted) 4%, transparent); } /* --- artifact card (density-spec §2 L0 row form, 2026-07-18) ------------ */ /* Each artifact renders as a compact ~28px row (native
) with an * L1 body that expands inline on click. Consecutive rows in the stream * fuse into a visual group via `:has()` (see block below). No hero button: * the L0 action is a tiny `open ↗` link; the ghost "Open in browser" * button lives in the L1 body. */ .artifact-card { align-self: flex-start; max-width: 780px; width: 100%; background: var(--bg-elev); border: 1px solid var(--border); border-radius: 8px; padding: 0; /*
gets a UA margin (~12px in some Chromiums) that would * fight the group's zero-gap layout. Zero it explicitly. */ margin: 0; transition: border-color 0.4s, background 0.4s; } .artifact-card.artifact-flash { border-color: var(--accent); background: color-mix(in oklab, var(--accent) 8%, var(--bg-elev)); } .artifact-row { display: flex; align-items: center; gap: 8px; padding: 4px 12px; min-height: 28px; cursor: pointer; list-style: none; font-size: 12px; color: var(--text); } /* Hide the native marker; the row itself is the affordance. */ .artifact-row::-webkit-details-marker { display: none; } .artifact-row::marker { content: ''; } .artifact-card:hover { background: var(--bg-elev-2); } .artifact-icon { display: inline-flex; align-items: center; justify-content: center; width: 14px; height: 14px; flex: 0 0 auto; color: var(--muted); } .artifact-icon svg { display: block; } .artifact-name { font-family: var(--mono); font-size: 12px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1 1 auto; min-width: 0; } .artifact-kind { flex: 0 0 auto; text-transform: uppercase; letter-spacing: 0.05em; font-size: 10px; padding: 1px 6px; border-radius: 3px; background: var(--bg-elev-2); color: var(--muted); } .artifact-version { flex: 0 0 auto; color: var(--accent); font-family: var(--mono); font-size: 11px; } .artifact-live-dot { flex: 0 0 auto; width: 6px; height: 6px; border-radius: 50%; background: var(--ok); animation: pulse 1.4s ease-in-out infinite; } .artifact-open-link { flex: 0 0 auto; font-size: 11px; color: var(--muted); text-decoration: none; padding: 2px 4px; border-radius: 3px; } .artifact-open-link:hover { color: var(--accent); background: var(--accent-soft); } .artifact-open-link[aria-disabled="true"] { pointer-events: none; opacity: 0.6; } .artifact-open-link.is-busy { color: var(--accent); } /* L1 body — inline expansion below the row. */ .artifact-body-l1 { padding: 8px 12px 12px 34px; /* 34 = 12 + 14 icon + 8 gap */ display: flex; flex-direction: column; gap: 8px; font-size: 11px; color: var(--muted); border-top: 1px solid var(--border); } .artifact-body-path { display: flex; align-items: baseline; gap: 8px; } .artifact-body-path-label { text-transform: uppercase; letter-spacing: 0.05em; font-size: 10px; color: var(--text-tertiary); } .artifact-body-path-val { font-family: var(--mono); font-size: 11px; color: var(--text); background: var(--bg-elev-2); padding: 1px 6px; border-radius: 3px; overflow-wrap: anywhere; } .artifact-body-actions { display: flex; gap: 8px; } .artifact-open { font-size: 12px; padding: 4px 10px; } /* Auto-group: consecutive artifact cards get wrapped in an * `.artifact-group` container by the renderer so the group owns its own * zero-gap layout (the stream's 12px flex-gap would otherwise dominate). * Cards inside a group share a single seam — the first keeps its top * corners rounded, the last keeps bottom, middles are square. The * cascade order here matters: reset all radii and top-border inside a * group, then re-add radii to the true first-of-type / last-of-type. */ .artifact-group { align-self: flex-start; max-width: 780px; width: 100%; display: flex; flex-direction: column; gap: 0; } .artifact-group > .artifact-card { max-width: none; width: 100%; border-radius: 0; border-top: none; /* Override the shared card-family `margin: var(--space-3) 0` rule * (further down the sheet) so grouped cards actually sit flush. */ margin: 0; } .artifact-group > .artifact-card:first-child { border-top: 1px solid var(--border); border-top-left-radius: 8px; border-top-right-radius: 8px; } .artifact-group > .artifact-card:last-child { border-bottom-left-radius: 8px; border-bottom-right-radius: 8px; } /* Also fuse via `:has()` for the future where cards might sit as direct * stream children (single-shot cases the wrapper doesn't touch). */ .artifact-card + .artifact-card { border-top-left-radius: 0; border-top-right-radius: 0; } .artifact-card:has(+ .artifact-card) { border-bottom-left-radius: 0; border-bottom-right-radius: 0; } /* --- tab nav (Chat / Plugins) ------------------------------------------- */ .tab-nav { display: flex; border-bottom: 1px solid var(--border); background: var(--bg); } .tab-btn { flex: 1; background: transparent; border: none; color: var(--muted); padding: 10px 8px; border-radius: 0; border-bottom: 2px solid transparent; cursor: pointer; font: inherit; font-size: 13px; } .tab-btn:hover:not(:disabled) { color: var(--text); background: var(--bg-elev-2); } .tab-btn.active { color: var(--accent); border-bottom-color: var(--accent); background: var(--bg-elev); } .tab-panel { display: flex; flex-direction: column; flex: 1; min-height: 0; } .tab-panel[hidden] { display: none; } .main .pane { display: flex; flex-direction: column; flex: 1; min-height: 0; } .main .pane[hidden] { display: none; } .sidebar { min-height: 0; display: flex; flex-direction: column; overflow: hidden; } /* Injected sections (History etc.) scroll inside their tab panel, never grow * the sidebar. panels-c-controller mounts the History
inside the * chat-tab panel (not as a direct child of `.sidebar`), so the selector has * to reach two levels deep. */ .sidebar > .tab-panel > .panels-c-history { flex: 1 1 auto; min-height: 0; overflow-y: auto; } .sidebar-foot { display: flex; flex-direction: column; gap: 8px; } .plugins-sidebar-note { padding: 10px 12px; font-size: 12px; color: var(--muted); } .plugins-sidebar-note.dirty { color: var(--tool); } /* --- Plugins pane ------------------------------------------------------- */ .plugins-body { flex: 1; overflow-y: auto; padding: 16px 24px; display: flex; flex-direction: column; gap: 12px; } .plugins-meta { padding: 8px 10px; background: var(--bg-elev); border: 1px solid var(--border); border-radius: 6px; font-size: 12px; color: var(--muted); } .plugins-meta code { background: var(--bg); padding: 1px 5px; border-radius: 3px; font-family: var(--mono); font-size: 11.5px; color: var(--text); } .plugins-meta .ok { color: var(--ok); } .plugins-meta .error { color: var(--error); } .plugins-meta .muted { color: var(--muted); } .plugins-table { width: 100%; border-collapse: collapse; font-size: 13px; background: var(--bg-elev); border: 1px solid var(--border); border-radius: 6px; } .plugins-table th, .plugins-table td { padding: 8px 10px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: middle; } .plugins-table th { color: var(--muted); font-weight: 600; text-transform: uppercase; font-size: 10.5px; letter-spacing: 0.04em; background: var(--bg); } .plugins-table tbody tr:last-child td { border-bottom: none; } .plugins-table tbody tr:hover { background: var(--bg-elev-2); } .plugins-table tbody tr.disabled { opacity: 0.55; } .plugins-table td.mono { font-family: var(--mono); font-size: 12px; } .plugins-table td.muted { color: var(--muted); } .plugins-table td.source-cell { font-family: var(--mono); font-size: 11px; text-transform: uppercase; color: var(--muted); letter-spacing: 0.05em; } .plugins-table td.source-cell.user { color: var(--accent); } .plugins-table td.runtime-cell { font-family: var(--mono); font-size: 11px; text-transform: uppercase; color: var(--muted); letter-spacing: 0.05em; } .plugins-table td.runtime-cell.muted { opacity: 0.6; } .plugins-table .runtime-state { display: inline-block; padding: 1px 6px; border-radius: 4px; } .plugins-table .runtime-active { color: #4ec9a0; } .plugins-table .runtime-loading { color: #dcdcaa; } .plugins-table .runtime-pending { color: var(--muted); } .plugins-table .runtime-failed { color: #f28b82; font-weight: 600; } .plugins-table .runtime-disposed, .plugins-table .runtime-unloading { color: var(--muted); } .plugins-table .runtime-absent { color: var(--muted); font-style: italic; } .plugins-table .runtime-mismatch { color: #e8b64c; font-weight: 700; margin-right: 4px; } .plugins-table tr.runtime-mismatch-row { background: rgba(232, 182, 76, 0.06); } .plugins-table tr.runtime-extras-head td { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); padding-top: 12px; border-top: 1px dashed var(--border); } .plugins-table tr.runtime-extras-row { opacity: 0.75; } .plugins-table td.empty { text-align: center; color: var(--muted); font-style: italic; padding: 24px 10px; } .plugins-table input[type="checkbox"] { cursor: pointer; } /* --- onboarding overlay ------------------------------------------------- */ .onboarding { position: fixed; inset: 0; z-index: 100; background: rgba(6, 8, 14, 0.85); display: flex; align-items: center; justify-content: center; padding: 40px 20px; } .onboarding[hidden] { display: none; } .onboarding.committing { pointer-events: none; opacity: 0.6; } .onboarding-card { max-width: 640px; width: 100%; background: var(--bg-elev); border: 1px solid var(--border); border-radius: 12px; padding: 28px 32px; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4); } .onboarding-progress { display: flex; gap: 6px; margin-bottom: 20px; } .onboarding-progress .dot { width: 22px; height: 4px; border-radius: 2px; background: var(--border); } .onboarding-progress .dot.on { background: var(--accent); } .onboarding-step h2 { margin: 0 0 6px 0; font-size: 20px; } .onboarding-step p.muted { margin: 0 0 22px 0; color: var(--muted); font-size: 13px; } .onboarding-cards { display: grid; grid-template-columns: 1fr; gap: 10px; margin-bottom: 20px; } .onboarding-choice { background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: 14px 16px; text-align: left; cursor: pointer; color: var(--text); font: inherit; transition: border-color 0.15s, background 0.15s; display: flex; flex-direction: column; gap: 4px; } .onboarding-choice:hover { border-color: var(--accent); background: var(--bg-elev-2); } .onboarding-choice.selected { border-color: var(--accent); background: rgba(110, 168, 255, 0.08); } .onboarding-choice .lbl { font-weight: 600; font-size: 14px; } .onboarding-choice .hint { color: var(--muted); font-size: 12px; } .onboarding-actions { display: flex; align-items: center; } .onboarding-actions .spacer { flex: 1; } /* --- plugins validation diagnostics ------------------------------------- */ .plugins-diagnostics { padding: 8px 12px; margin-bottom: 12px; border-radius: 6px; font-size: 12px; border: 1px solid var(--border); background: var(--bg-elev); } .plugins-diagnostics.ok { border-color: var(--ok); color: var(--ok); } .plugins-diagnostics.warn { border-color: var(--tool); color: var(--tool); } .plugins-diagnostics.error { border-color: var(--error); color: var(--error); } .plugins-diagnostics .muted { color: var(--muted); } /* --- plugins effect-heuristics info bar (A3) ---------------------------- */ /* Compact summary that sits above the diagnostics strip. Purely informational * — not a warning surface — so it uses the elevated-bg treatment without an * accent border. Fields are separated by dot-bullets and hover-tooltip'd. */ .plugins-summary { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; padding: 6px 12px; margin-bottom: 8px; border-radius: 6px; font-size: 12px; border: 1px solid var(--border); background: var(--bg-elev); color: var(--text); } .plugins-summary .field { display: inline-flex; align-items: center; gap: 4px; } .plugins-summary .field .label { color: var(--muted); } .plugins-summary .field .value { font-variant-numeric: tabular-nums; } .plugins-summary .field.warn { color: var(--tool); } .plugins-summary .field.warn .label { color: var(--tool); opacity: 0.85; } .plugins-summary .conflict-item { font-family: var(--mono); } .plugins-table tr.has-error { border-left: 3px solid var(--error); } .plugins-table tr.has-warn { border-left: 3px solid var(--tool); } .plugins-table tr.plugin-diagnostic td { border-top: none !important; border-bottom: 1px solid var(--border); font-size: 11.5px; padding: 4px 12px 8px 40px; font-family: var(--mono); } .plugins-table tr.plugin-diagnostic.error td { color: var(--error); } .plugins-table tr.plugin-diagnostic.warn td { color: var(--tool); } /* --- Mission Control ----------------------------------------------------- * * Long-running task management view. Three subviews (tree/topo/board) share * the same top-bar (summary chips + cross-session ticker). Palette reuses * the shell's existing variables so light-mode/dark-mode toggles (if they * ever ship) don't require a second pass; only the accent categoricals * (--mission-cat-*) are new, defined off the accent+tool+ok+error base. */ :root { --mission-cat-1: var(--accent); /* running / primary */ --mission-cat-2: var(--ok); /* finished / success */ --mission-cat-3: var(--tool); /* pending / advisory */ --mission-cat-4: var(--error); /* orphan / error */ --mission-cat-neutral: var(--muted); /* idle */ } .mission-sidebar-note { padding: 10px 12px; font-size: 12px; color: var(--muted); } .mission-body { flex: 1; overflow-y: auto; padding: 12px 16px; display: flex; flex-direction: column; gap: 12px; min-height: 0; } .mission-topbar { display: flex; gap: 12px; align-items: stretch; border: 1px solid var(--border); border-radius: 8px; background: var(--bg-elev); padding: 10px 12px; } .mission-summary { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; border-right: 1px solid var(--border); padding-right: 14px; } .mission-chip { display: flex; flex-direction: column; align-items: flex-start; min-width: 56px; } .mission-chip-value { font-size: 18px; font-weight: 600; color: var(--text); font-family: var(--mono); } .mission-chip-label { font-size: 10.5px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; } .mission-chip.running .mission-chip-value { color: var(--mission-cat-2); } .mission-chip.todos .mission-chip-value { color: var(--mission-cat-3); } .mission-ticker { flex: 1; min-width: 0; overflow: hidden; display: flex; gap: 12px; align-items: center; font-size: 12px; color: var(--muted); padding-left: 4px; white-space: nowrap; text-overflow: ellipsis; } .mission-ticker-hint { color: var(--muted); font-style: italic; } .mission-ticker-item { display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0; } .mission-ticker-badge { border: 1px solid var(--border); background: var(--bg); border-radius: 3px; padding: 1px 6px; color: var(--accent); font-family: var(--mono); font-size: 10.5px; cursor: pointer; } .mission-ticker-badge:hover { border-color: var(--accent); } .mission-ticker-text { color: var(--muted); overflow: hidden; text-overflow: ellipsis; max-width: 240px; } .mission-subview-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); } .mission-subview-tab { border: none; background: transparent; color: var(--muted); padding: 6px 14px; border-radius: 0; border-bottom: 2px solid transparent; cursor: pointer; font: inherit; font-size: 13px; } .mission-subview-tab:hover:not(:disabled) { color: var(--text); } .mission-subview-tab.active { color: var(--accent); border-bottom-color: var(--accent); } .mission-panels { flex: 1; min-height: 0; display: flex; flex-direction: column; } .mission-panel { flex: 1; min-height: 0; overflow-y: auto; } .mission-panel[hidden] { display: none; } .mission-empty { color: var(--muted); font-style: italic; font-size: 13px; padding: 24px; text-align: center; } /* --- tree subview ---------- */ .mission-tree { display: flex; flex-direction: column; gap: 2px; padding: 8px; } .mission-tree-row { position: relative; padding: 8px 10px 6px 10px; border-radius: 6px; border: 1px solid transparent; background: var(--bg-elev); display: grid; grid-template-columns: auto auto 1fr auto auto; grid-template-rows: auto auto; align-items: center; column-gap: 8px; font-size: 13px; } .mission-tree-row.running { border-color: color-mix(in oklab, var(--mission-cat-1) 40%, var(--border)); } .mission-tree-row.orphan { border-left: 3px solid var(--mission-cat-4); } .mission-tree-row:hover { background: var(--bg-elev-2); } .mission-tree-indent { color: var(--border); font-family: var(--mono); font-size: 11px; white-space: pre; user-select: none; grid-row: 1; } .mission-tree-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--mission-cat-neutral); flex-shrink: 0; grid-row: 1; } .mission-tree-dot.running { background: var(--mission-cat-2); box-shadow: 0 0 0 3px color-mix(in oklab, var(--mission-cat-2) 22%, transparent); animation: pulse 1.4s ease-in-out infinite; } .mission-tree-dot.finished { background: var(--mission-cat-1); } .mission-tree-dot.idle { background: var(--mission-cat-neutral); } .mission-tree-title { color: var(--text); font-weight: 500; cursor: pointer; grid-row: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; } .mission-tree-title:hover { color: var(--accent); } .mission-tree-collapse { background: transparent; border: none; color: var(--muted); padding: 0 4px; cursor: pointer; font-size: 12px; grid-row: 1; } .mission-tree-collapse:hover { color: var(--text); } .mission-tree-metrics { display: flex; gap: 8px; align-items: center; grid-row: 1; font-size: 11px; color: var(--muted); font-family: var(--mono); } .mission-tree-rel { color: var(--muted); } .mission-tree-count { padding: 1px 6px; border-radius: 3px; background: var(--bg); } .mission-tree-count.tools { color: var(--tool); } .mission-tree-count.todos { color: var(--mission-cat-1); } .mission-tree-sub { grid-column: 1 / -1; grid-row: 2; color: var(--muted); font-size: 11.5px; padding-left: 20px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } /* --- topology subview ---------- */ .mission-topo { position: relative; width: 100%; height: 100%; min-height: 400px; overflow: hidden; } .mission-topo-svg { display: block; background: var(--bg); border-radius: 6px; } .mission-topo-edge { fill: none; stroke: var(--border); stroke-width: 1.5; opacity: 0.7; } .mission-topo-edge.active { stroke: var(--mission-cat-1); stroke-dasharray: 5 4; animation: mission-edge-flow 1.2s linear infinite; opacity: 1; } @keyframes mission-edge-flow { to { stroke-dashoffset: -18; } } .mission-topo-node { cursor: pointer; } /* Fill/stroke come from JS inline attributes (family palette). CSS only * covers the neutral fallback + hover accent + transitions. */ .mission-topo-node .dot { stroke-width: 2; transition: stroke 120ms ease, filter 120ms ease; } .mission-topo-node:not([data-family]) .dot { fill: var(--bg-elev-2); stroke: var(--muted); } .mission-topo-node.running .dot { filter: saturate(1.1); } .mission-topo-node .halo { fill: none; stroke-width: 1; opacity: 0.55; animation: mission-halo 1.6s ease-in-out infinite; } @keyframes mission-halo { 0%,100% { r: 12; opacity: 0.6; } 50% { r: 18; opacity: 0.15; } } .mission-topo-node:hover .dot { stroke: var(--accent); } .mission-topo-node .label { fill: var(--text); font-size: 11px; font-family: var(--font); pointer-events: none; user-select: none; } .mission-topo-tip { position: absolute; z-index: 5; background: var(--bg-elev); border: 1px solid var(--border); border-radius: 6px; padding: 8px 10px; font-size: 12px; color: var(--text); box-shadow: 0 4px 12px rgba(0,0,0,0.35); pointer-events: none; max-width: 260px; } .mission-topo-tip-title { font-weight: 600; margin-bottom: 2px; } .mission-topo-tip-meta { color: var(--muted); font-size: 11px; } .mission-topo-tip-sub { color: var(--muted); font-size: 11.5px; margin-top: 4px; font-style: italic; } /* --- board subview ---------- */ .mission-board { padding: 8px; } .mission-board-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; align-items: start; } .mission-board-column { background: var(--bg-elev); border: 1px solid var(--border); border-radius: 8px; padding: 8px; min-height: 200px; display: flex; flex-direction: column; gap: 8px; } .mission-board-column-head { font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); padding: 4px 6px 6px; border-bottom: 1px solid var(--border); } .mission-board-column.pending .mission-board-column-head { color: var(--mission-cat-3); } .mission-board-column.in_progress .mission-board-column-head { color: var(--mission-cat-1); } .mission-board-column.completed .mission-board-column-head { color: var(--mission-cat-2); } .mission-board-column-body { display: flex; flex-direction: column; gap: 6px; } .mission-board-column-empty { color: var(--muted); text-align: center; font-size: 12px; padding: 12px 0; } .mission-board-card { background: var(--bg); border: 1px solid var(--border); border-radius: 6px; padding: 8px 10px; display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; } .mission-board-card.pending { border-left: 3px solid var(--mission-cat-3); } .mission-board-card.in_progress { border-left: 3px solid var(--mission-cat-1); } .mission-board-card.completed { border-left: 3px solid var(--mission-cat-2); opacity: 0.8; } .mission-board-card.completed .mission-board-card-content { text-decoration: line-through; color: var(--muted); } .mission-board-card-content { color: var(--text); line-height: 1.4; overflow-wrap: anywhere; } .mission-board-card-badge { align-self: flex-start; font-family: var(--mono); font-size: 10.5px; padding: 1px 6px; border-radius: 3px; background: var(--bg-elev); color: var(--accent); border: 1px solid var(--border); cursor: pointer; } .mission-board-card-badge:hover { border-color: var(--accent); } /* --- Board empty-state preview ----------------------------------------- * QA round-3 §5.1: the single-sentence empty state didn't teach the user * what the view fills in with. We wrap the copy in the same .mission-empty * shell tree/topo use, then stack a ghost mini-kanban below — three column * headers with one dashed placeholder card each. Dashed borders + reduced * opacity keep the preview visually distinct from real cards. */ .mission-board-empty { align-items: center; text-align: center; gap: 10px; } .mission-board-preview { margin-top: 16px; display: grid; grid-template-columns: repeat(3, minmax(120px, 160px)); gap: 12px; width: 100%; max-width: 520px; pointer-events: none; } .mission-board-preview-column { display: flex; flex-direction: column; gap: 6px; padding: 8px; border-radius: 8px; background: var(--bg); border: 1px dashed var(--border); } .mission-board-preview-head { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); text-align: left; padding: 2px 4px 4px; border-bottom: 1px dashed var(--border); } .mission-board-preview-column.pending .mission-board-preview-head { color: var(--mission-cat-3); } .mission-board-preview-column.in_progress .mission-board-preview-head { color: var(--mission-cat-1); } .mission-board-preview-column.completed .mission-board-preview-head { color: var(--mission-cat-2); } .mission-board-preview-card { padding: 8px 10px; border-radius: 6px; background: transparent; border: 1px dashed var(--border); color: var(--muted); font-size: 12px; line-height: 1.35; text-align: left; opacity: 0.78; } .mission-board-preview-card.pending { border-left: 3px dashed var(--mission-cat-3); } .mission-board-preview-card.in_progress { border-left: 3px dashed var(--mission-cat-1); } .mission-board-preview-card.completed { border-left: 3px dashed var(--mission-cat-2); } /* fix/demo-labels P4: the "preview" chip is a grid child alongside the three preview columns; span the full row so it reads as a caption above the grid rather than getting stretched into a column slot. */ .mission-board-preview-chip { grid-column: 1 / -1; justify-self: start; margin: 0; } /* --- playground pane ---------------------------------------------------- */ .pane[data-pane="playground"] { display: flex; flex-direction: column; } .playground-banner { background: rgba(214, 181, 110, 0.10); border-bottom: 1px solid var(--tool); color: var(--tool); padding: 8px 16px; font-size: 12.5px; } .playground-banner em { font-style: normal; font-weight: 600; } .playground-body { flex: 1; display: grid; grid-template-columns: 1fr 280px; overflow: hidden; min-height: 0; } .playground-stream { overflow-y: auto; padding: 12px 16px; min-height: 0; } .playground-side { border-left: 1px solid var(--border); background: var(--bg-elev); padding: 12px; overflow-y: auto; } .playground-meta { font-size: 12px; margin-bottom: 8px; } .playground-composer { border-top: 1px solid var(--border); padding: 10px 12px; display: flex; gap: 8px; align-items: flex-end; } .playground-composer textarea { flex: 1; resize: vertical; background: var(--bg); color: var(--text); border: 1px solid var(--border); border-radius: 6px; padding: 8px 10px; font: inherit; } /* Bubbles in the playground stream mirror the chat stream palette but the * simplified variant only needs a handful of types. */ .playground-stream .bubble { padding: 8px 12px; border-radius: 8px; margin: 6px 0; max-width: 80ch; white-space: pre-wrap; word-wrap: break-word; font-size: 13px; border: 1px solid var(--border); background: var(--bg-elev); } .playground-stream .bubble-user { background: var(--user-bubble); border-color: rgba(255, 255, 255, 0.06); margin-left: auto; } .playground-stream .bubble-assistant { background: var(--assistant-bubble); } .playground-stream .bubble-tool-call { color: var(--tool); font-family: var(--mono); font-size: 12px; } .playground-stream .bubble-tool-result { color: var(--ok); font-family: var(--mono); font-size: 12px; } .playground-stream .bubble-meta { background: transparent; border: none; color: var(--muted); font-size: 11.5px; padding: 2px 0; font-style: italic; } .playground-stream .bubble-error { background: rgba(242, 122, 122, 0.10); border-color: var(--error); color: var(--error); } /* Compare drawer sits above the playground stream (position:absolute). */ .playground-compare-drawer { position: absolute; inset: 60px 0 0 260px; z-index: 20; background: var(--bg); border-top: 1px solid var(--border); display: flex; flex-direction: column; } .playground-compare-drawer[hidden] { display: none; } .playground-compare-drawer .drawer-head { display: flex; gap: 10px; align-items: center; padding: 10px 16px; border-bottom: 1px solid var(--border); } .playground-compare-drawer .drawer-head .title { font-weight: 600; } .playground-compare-drawer .drawer-head select { background: var(--bg-elev); color: var(--text); border: 1px solid var(--border); border-radius: 4px; padding: 4px 8px; font: inherit; } .playground-compare-drawer .drawer-body { flex: 1; display: grid; grid-template-columns: 1fr 1fr; overflow: hidden; } .playground-compare-drawer .compare-col { border-right: 1px solid var(--border); display: flex; flex-direction: column; overflow: hidden; } .playground-compare-drawer .compare-col:last-child { border-right: none; } .playground-compare-drawer .col-title { padding: 6px 12px; font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); background: var(--bg-elev); border-bottom: 1px solid var(--border); } .playground-compare-drawer .stream.compact { overflow-y: auto; padding: 8px 12px; font-size: 12px; } /* ============================================================================ * Tool-render-intent cards (§ P0 render batch A) * Wired at src/renderer/renderer.js `tool/result` dispatch. Card kinds map * to `ToolResultView` in packages/core/tools/src/presentation.ts: * - card === 'terminal' → .card-terminal (bash) * - card === 'diff' → .card-diff (fs edit/write) * Per-tool family band is added by appendToolCall via .family-* classes * on the enclosing .tool-block (a left-border tint + a header icon). * ==========================================================================*/ /* Family band: coloured 2px left border on the tool-block + a monochrome * glyph column. Density-spec §2 L0: 2px status/type edge. New tool names * fall through to plain .tool-block styling (no family class means no * override). Width bumped to 2px to match the density spec exactly. */ .tool-block.family-bash { border-left: 2px solid var(--tool); } .tool-block.family-fs { border-left: 2px solid var(--accent); } .tool-block.family-web { border-left: 2px solid #7fc4a1; } .tool-block.family-skill { border-left: 2px solid #c48ad0; } .tool-block.family-subagent { border-left: 2px solid #d0a97b; } .tool-block.family-todo { border-left: 2px solid var(--ok); } .tool-block.family-cordis { border-left: 2px solid var(--muted); } .tool-block.family-code { border-left: 2px solid #6ea8ff; } .tool-family-icon { display: inline-block; width: 1em; text-align: center; color: var(--muted); font-size: 11px; flex: 0 0 auto; } .tool-family-name { color: var(--text); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; } .tool-arg-gist { color: var(--muted); font-family: var(--mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; flex: 1 1 auto; } /* ×N fold badge when ≥3 same-name tool calls collapse into one row. */ .tool-run-count { padding: 0 6px; border-radius: 3px; border: 1px solid var(--border); color: var(--muted); font-size: 10.5px; flex: 0 0 auto; } /* Duration pill — small right-aligned chip inside .tool-block summary, * populated by tool-cards.applyToolDuration when tool/result carries * `durationMs` (audit doc §2.3 GAP T1). Keeps the summary line the same * height; a reader can spot slow tools without opening the block. Flip * the summary to full-width flex so `margin-left: auto` on the pill * pushes it to the tool-block right edge instead of hugging the name. */ .tool-block summary { display: flex; } .tool-duration { margin-left: auto; padding: 1px 6px; border-radius: 3px; border: 1px solid var(--border); color: var(--muted); font-family: var(--mono); font-size: 10px; letter-spacing: 0.02em; font-variant-numeric: tabular-nums; } /* Terminal card (bash presentResult) --------------------------------------- */ .card-terminal { background: #0a0c11; border: 1px solid var(--border); border-radius: 6px; padding: 8px 10px; overflow: hidden; } .card-terminal-output { margin: 0; padding: 0; color: #d6d9e2; font-family: var(--mono); font-size: 12px; line-height: 1.5; white-space: pre-wrap; word-wrap: break-word; max-height: 320px; overflow-y: auto; } .card-terminal-footer { margin-top: 6px; display: flex; gap: 6px; align-items: center; } .card-badge { display: inline-block; padding: 1px 6px; border-radius: 3px; font-family: var(--mono); font-size: 10px; letter-spacing: 0.02em; border: 1px solid var(--border); color: var(--muted); } .card-badge.ok { color: var(--ok); border-color: color-mix(in oklab, var(--ok) 40%, transparent); } .card-badge.err { color: var(--error); border-color: color-mix(in oklab, var(--error) 40%, transparent); } .card-badge.sig { color: var(--tool); border-color: color-mix(in oklab, var(--tool) 40%, transparent); } /* Diff card (fs edit/write presentResult) --------------------------------- */ .card-diff { border: 1px solid var(--border); border-radius: 6px; overflow: hidden; background: var(--bg); } .card-diff-title { padding: 6px 10px; background: var(--bg-elev-2); color: var(--muted); font-size: 11px; font-family: var(--mono); border-bottom: 1px solid var(--border); } .card-diff-file { border-bottom: 1px solid var(--border); } .card-diff-file:last-child { border-bottom: none; } .card-diff-file-header { display: flex; align-items: center; justify-content: space-between; padding: 4px 10px; background: var(--bg-elev); font-family: var(--mono); font-size: 11px; color: var(--muted); } .card-diff-file-path { color: var(--text); } .card-diff-file-stats { display: flex; gap: 6px; align-items: center; } .card-diff-file-count { color: var(--muted); font-size: 10.5px; } .card-diff-body { font-family: var(--mono); font-size: 12px; line-height: 1.5; max-height: 360px; overflow-y: auto; } .card-diff-line { display: flex; padding: 0 8px; } .card-diff-line.add { background: color-mix(in oklab, var(--ok) 12%, transparent); } .card-diff-line.del { background: color-mix(in oklab, var(--error) 12%, transparent); } .card-diff-sigil { flex: 0 0 auto; width: 1.2em; text-align: center; color: var(--muted); user-select: none; } .card-diff-line.add .card-diff-sigil { color: var(--ok); } .card-diff-line.del .card-diff-sigil { color: var(--error); } .card-diff-text { flex: 1 1 auto; white-space: pre; overflow-x: auto; color: var(--text); } .card-diff-empty { padding: 8px 10px; color: var(--muted); font-style: italic; font-size: 12px; } /* Ticket #139 (strategy §1.5) — CodeSandbox layout for the diff card. * Multi-file diffs get a left file-tree column; single-file stays inline. * Every hunk is a
collapsed by default (first hunk opens); a tail * reveal button materialises when hunk count exceeds HUNK_CAP. Bench-flat * layout — no shadows, no scrim, hits the 老板 "简单 UI、绝不全塞满" note. */ .card-diff-body-wrap { display: flex; flex-direction: column; } .card-diff-body-wrap.has-tree { flex-direction: row; align-items: stretch; } .card-diff-tree { flex: 0 0 220px; max-width: 240px; min-width: 160px; border-right: 1px solid var(--border); background: var(--bg-elev); display: flex; flex-direction: column; overflow-y: auto; max-height: 420px; } .card-diff-tree-header { padding: 6px 10px; color: var(--muted); font-size: 11px; border-bottom: 1px solid var(--border); letter-spacing: 0.03em; text-transform: uppercase; font-family: var(--mono); } .card-diff-tree-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 10px; text-align: left; background: transparent; border: none; border-left: 2px solid transparent; color: var(--text); font-family: var(--mono); font-size: 12px; cursor: pointer; } .card-diff-tree-row:hover { background: var(--bg-elev-2); } .card-diff-tree-row.active { background: var(--bg); border-left-color: var(--accent); } .card-diff-tree-path { flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); } .card-diff-tree-count { flex: 0 0 auto; color: var(--muted); font-size: 10.5px; } .card-diff-pane { flex: 1 1 auto; min-width: 0; overflow: hidden; } /* Hunk fold — each hunk is a
. Summary is the "@@ … @@" header. */ .card-diff-hunk { border-top: 1px dashed var(--border); } .card-diff-hunk:first-child { border-top: none; } .card-diff-hunk-summary { cursor: pointer; user-select: none; padding: 4px 10px; color: var(--muted); font-family: var(--mono); font-size: 11px; background: var(--bg-elev); list-style: none; } .card-diff-hunk-summary::-webkit-details-marker { display: none; } .card-diff-hunk-summary::before { content: '▸'; display: inline-block; width: 1em; transition: transform 0.12s ease; } .card-diff-hunk[open] > .card-diff-hunk-summary::before { transform: rotate(90deg); } .card-diff-hunk-body { border-top: 1px solid var(--border); } .card-diff-hunk-more { display: block; width: 100%; padding: 6px 10px; background: var(--bg-elev); border: none; border-top: 1px dashed var(--border); color: var(--muted); font-family: var(--mono); font-size: 11px; cursor: pointer; text-align: left; } .card-diff-hunk-more:hover { color: var(--accent); background: var(--bg-elev-2); } /* Ticket #139 — universal "{ }" JSON badge on every tool card summary. * Sits at the right edge alongside the duration pill. Both use margin-left: * auto; because the badge is added first (at appendToolCall) and the pill * last (at tool/result), the badge floats leftward-of the pill. */ .tool-json-badge { margin-left: auto; padding: 1px 6px; border: 1px solid var(--border); border-radius: 3px; background: transparent; color: var(--muted); font-family: var(--mono); font-size: 10px; letter-spacing: 0.02em; cursor: pointer; } .tool-json-badge:hover { color: var(--accent); border-color: var(--accent); } /* When both are present, we want the pill to hug the right edge and the * badge to sit just left of it. First-child auto pushes the row right; a * fixed gap between siblings keeps them from touching. */ .tool-block summary > .tool-json-badge + .tool-duration { margin-left: 6px; } /* Ticket #139 — right-side JSON drawer. Non-modal on purpose (strategy §1.5 * / 老板 "抽屉 pin 时可保持打开切消息"): fixed panel that occupies ~40% of * the viewport, main flow stays interactive. Slides in with a transform on * .open; hidden by translate off-screen otherwise. */ .tool-json-drawer { position: fixed; top: 0; right: 0; height: 100vh; width: min(560px, 42vw); background: var(--bg); border-left: 1px solid var(--border); box-shadow: -6px 0 16px rgba(0,0,0,0.18); transform: translateX(100%); transition: transform 0.18s ease; z-index: 40; display: flex; flex-direction: column; pointer-events: auto; } .tool-json-drawer.open { transform: translateX(0); } .tool-json-drawer[aria-hidden="true"] { pointer-events: none; } .tool-json-drawer[aria-hidden="false"] { pointer-events: auto; } .tool-json-drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; border-bottom: 1px solid var(--border); background: var(--bg-elev); } .tool-json-drawer-title { font-family: var(--mono); font-size: 13px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .tool-json-drawer-body { flex: 1 1 auto; overflow-y: auto; padding: 8px 14px 14px; display: flex; flex-direction: column; gap: 12px; } .tool-json-section > summary { cursor: pointer; user-select: none; padding: 4px 0; color: var(--muted); font-family: var(--mono); font-size: 11px; letter-spacing: 0.02em; } .tool-json-section > summary::-webkit-details-marker { display: none; } .tool-json-section > summary::before { content: '▸'; display: inline-block; width: 1em; transition: transform 0.12s ease; } .tool-json-section[open] > summary::before { transform: rotate(90deg); } .tool-json-note { color: var(--muted); font-size: 10.5px; letter-spacing: 0; text-transform: none; } .tool-json-pane { margin: 4px 0 0; padding: 8px 10px; background: var(--bg-elev); border: 1px solid var(--border); border-radius: 4px; color: var(--text); font-family: var(--mono); font-size: 11.5px; line-height: 1.5; white-space: pre-wrap; word-wrap: break-word; max-height: 40vh; overflow-y: auto; } /* Code-dispatch sub-call list (fan-out under a run_code tool block) -------- */ .card-code-dispatch { border-top: 1px dashed var(--border); margin-top: 4px; padding-top: 4px; } .card-code-dispatch-header { color: var(--muted); font-size: 11px; letter-spacing: 0.03em; text-transform: uppercase; margin-bottom: 2px; } .card-code-dispatch-row { display: flex; align-items: center; gap: 6px; padding: 2px 0; font-family: var(--mono); font-size: 12px; } .card-code-dispatch-branch { color: var(--border); } .card-code-dispatch-name { color: var(--accent); } .card-code-dispatch-summary { color: var(--muted); } .card-code-dispatch-dot { width: 1em; text-align: center; } .card-code-dispatch-row.ok .card-code-dispatch-dot { color: var(--ok); } .card-code-dispatch-row.err .card-code-dispatch-dot { color: var(--error); } /* --- visibility batch B (todo, prompt/blocked, turn/end, subagent finished, sandbox+preset badges, approval audit) --- */ /* Owned by visibility-controller.js; scoped to .visibility-* / .todo-* / .pb-* / .sas-* / .sandbox-* / .preset-* classes so the block adds surface without overriding anything above. */ .visibility-card { margin: 8px 0; padding: 10px 12px; background: var(--bg-elev); border: 1px solid var(--border); border-radius: 6px; } .todo-card { border-left: 3px solid var(--accent); } .todo-head { display: flex; align-items: baseline; gap: 10px; border-bottom: 1px solid var(--border); padding-bottom: 6px; margin-bottom: 6px; } .todo-title { font-weight: 600; } .todo-summary { color: var(--muted); font-size: 12px; } .todo-items { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; } .todo-item { display: flex; align-items: baseline; gap: 8px; padding: 2px 0; } .todo-item .todo-icon { width: 16px; text-align: center; font-family: var(--mono); color: var(--muted); } .todo-item.status-in_progress .todo-icon { color: var(--tool); } .todo-item.status-completed .todo-icon { color: var(--ok); } .todo-item.status-completed .todo-text { text-decoration: line-through; color: var(--muted); } .todo-item .todo-text { flex: 1; } .todo-warn { margin-top: 6px; color: var(--tool); font-size: 12px; } .todo-empty { padding: 4px 0; } .prompt-blocked-card { border-left: 3px solid var(--error); background: color-mix(in oklab, var(--error) 10%, var(--bg-elev)); } /* .pb-head/.pb-title/.pb-reason/.pb-body were the multi-part pb-* rules for * the old prompt-blocked card layout; the compact .prompt-blocked-row * variant (.pb-row-* below) supersedes them. Only .pb-pre stays because * that
 is reused across both shapes. */
.pb-pre {
  margin: 6px 0 0; padding: 8px 10px;
  background: var(--bg); border: 1px solid var(--border); border-radius: 4px;
  font-family: var(--mono); font-size: 12px; white-space: pre-wrap;
}

/* prompt/blocked row (viz-coverage-matrix §5 P0-1 fix — compact single-row
 * form, red-edge, full-width left-aligned, L1 
body). Replaces * the earlier .prompt-blocked-card multi-part shape while keeping the * .prompt-blocked-card block above as a legacy shim (test/mock callers may * still target it — no behaviour change). .pb-pre stays because the new * row shape still uses it for the blocked-prompt
. */
details.prompt-blocked-row {
  border-left: 3px solid var(--error);
  background: color-mix(in oklab, var(--error) 6%, var(--bg-elev));
  padding: 6px 10px;
}
details.prompt-blocked-row > summary.pb-row-head {
  display: flex; align-items: baseline; gap: 6px;
  cursor: pointer; list-style: none;
  color: var(--text); font-size: 13px;
}
details.prompt-blocked-row > summary.pb-row-head::-webkit-details-marker { display: none; }
.pb-row-icon { color: var(--error); font-weight: 600; }
.pb-row-label { font-weight: 600; color: var(--error); }
.pb-row-sep { color: var(--muted); }
.pb-row-reason { color: var(--text); overflow: hidden; text-overflow: ellipsis; }
.pb-row-body {
  margin-top: 6px; padding-top: 6px;
  border-top: 1px dashed color-mix(in oklab, var(--error) 40%, var(--border));
  display: flex; flex-direction: column; gap: 6px;
}
.pb-row-reason-full { color: var(--text); font-size: 12px; }
.pb-row-body-label { color: var(--muted); font-size: 11px; font-family: var(--mono); }

/* approval note pinned inside the tool card (viz-coverage-matrix §5 P0-2 —
 * "auto-approved ·  灰字小行" per task brief). Sits inside a
 * .tool-block right after its , so a reader sees the auto-decision
 * inline with the tool even when the card is folded. */
.tool-approval-note {
  margin: 2px 12px 4px;
  padding: 2px 6px;
  color: var(--muted);
  font-size: 11px; font-family: var(--mono);
  border-left: 2px solid var(--border);
}
.tool-approval-note.tone-ok    { color: var(--ok);    border-left-color: var(--ok); }
.tool-approval-note.tone-warn  { color: var(--tool);  border-left-color: var(--tool); }
.tool-approval-note.tone-error { color: var(--error); border-left-color: var(--error); }

/* sandbox/preset switch divider (viz-coverage-matrix §5 P0-3 P0-4 — same
 * visual grammar as .compact-divider but scoped to permission/sandbox
 * events, so the point-in-time of a security-context change is anchored
 * in the main stream, not only in the header badge). */
.mode-divider {
  align-self: stretch; text-align: center;
  color: var(--muted); font-size: 11px; letter-spacing: 0.08em;
  margin: 6px 0; padding: 2px 0;
  font-family: var(--mono);
}
.mode-divider-sandbox .mode-divider-label { color: var(--accent); }
.mode-divider-preset  .mode-divider-label { color: var(--tool); }

.visibility-turnend {
  margin: 4px 0 8px;
  padding: 4px 10px 4px 12px; border-left: 3px solid var(--border);
  font-size: 12px; font-family: var(--mono);
}
.visibility-turnend-error { color: var(--error); border-left-color: var(--error); }
.visibility-turnend-warn  { color: var(--tool);  border-left-color: var(--tool); }
.visibility-turnend-info  { color: var(--muted); }

.visibility-subagent-summary {
  margin: 4px 0 8px;
  padding: 4px 10px; font-size: 12px;
  color: var(--muted); border-left: 2px solid var(--border);
}
.sas-label { color: var(--accent); margin-right: 4px; font-family: var(--mono); }
.sas-brief { color: var(--text); }
.sas-full { display: inline-block; margin-left: 8px; vertical-align: middle; }
.sas-full summary { color: var(--muted); cursor: pointer; }
.sas-pre {
  display: block; margin: 6px 0 0; padding: 8px 10px;
  background: var(--bg); border: 1px solid var(--border); border-radius: 4px;
  font-family: var(--mono); font-size: 12px; white-space: pre-wrap;
}

.visibility-badge {
  display: inline-flex; align-items: center;
  padding: 2px 8px; margin-right: 6px;
  border: 1px solid var(--border); border-radius: 10px;
  background: var(--bg-elev-2); color: var(--muted);
  font-size: 11px; font-family: var(--mono);
  transition: background 220ms ease, color 220ms ease;
}
.sandbox-badge.sandbox-read-only        { color: var(--ok);    border-color: var(--ok); }
.sandbox-badge.sandbox-workspace-write  { color: var(--accent);border-color: var(--accent); }
.sandbox-badge.sandbox-danger-full-access { color: var(--error); border-color: var(--error); }
.preset-badge { color: var(--tool); border-color: var(--tool); }
.visibility-badge.flash { animation: vb-flash 900ms ease; }
@keyframes vb-flash {
  0%   { background: var(--bg-elev-2); }
  20%  { background: var(--bg-elev); }
  100% { background: var(--bg-elev-2); }
}

.visibility-audit {
  margin: 4px 0; padding: 3px 10px;
  font-size: 12px; font-family: var(--mono);
  color: var(--muted); border-left: 2px solid var(--border);
}
.visibility-audit-ok    { color: var(--ok);    border-left-color: var(--ok); }
.visibility-audit-error { color: var(--error); border-left-color: var(--error); }
.visibility-audit-warn  { color: var(--tool);  border-left-color: var(--tool); }

/* -- Devtools drawer ------------------------------------------------------ */
/* Right-anchored, off by default. Sits above the app grid so opening it does
   not reflow the chat pane. Toggle via header "devtools" button or ⌥D. */
.devtools-toggle.active { color: var(--accent); border-color: var(--accent); }
.devtools-drawer {
  position: fixed; top: 0; right: 0; height: 100vh;
  width: 480px; max-width: 90vw;
  display: flex; flex-direction: column;
  background: var(--bg-elev); border-left: 1px solid var(--border);
  z-index: 40;
  box-shadow: -8px 0 24px rgba(0, 0, 0, 0.35);
  font-family: var(--font);
}
.devtools-head {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-bottom: 1px solid var(--border);
}
.devtools-title { flex: 1; font-weight: 600; }
.devtools-count { font-family: var(--mono); font-size: 11px; }
.devtools-close {
  padding: 2px 8px; font-size: 16px; line-height: 1;
}
.devtools-presets {
  display: flex; flex-wrap: wrap; gap: 6px;
  padding: 8px 12px; border-bottom: 1px solid var(--border);
}
.devtools-preset {
  padding: 3px 10px; border-radius: 12px;
  background: var(--bg-elev-2); color: var(--muted);
  border: 1px solid var(--border);
  font-size: 12px; cursor: pointer;
}
.devtools-preset:hover { color: var(--text); }
.devtools-preset.active {
  background: var(--accent); color: var(--bg); border-color: var(--accent);
}
.devtools-search-row {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px; border-bottom: 1px solid var(--border);
}
.devtools-search {
  flex: 1;
  background: var(--bg); color: var(--text);
  border: 1px solid var(--border); border-radius: 4px;
  padding: 4px 8px; font-family: var(--font); font-size: 13px;
}
.devtools-clear { font-size: 11px; padding: 3px 8px; }
.devtools-autoscroll {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; color: var(--muted);
  white-space: nowrap;
}
.devtools-chips {
  display: flex; flex-wrap: wrap; gap: 4px;
  padding: 6px 12px; border-bottom: 1px solid var(--border);
  max-height: 96px; overflow-y: auto;
}
.devtools-chips-empty { padding: 2px 4px; font-size: 11px; }
.devtools-chip {
  padding: 2px 8px; border-radius: 10px;
  background: var(--bg-elev-2); color: var(--muted);
  border: 1px solid var(--border);
  font-family: var(--mono); font-size: 10px; cursor: pointer;
}
.devtools-chip:hover { color: var(--text); }
.devtools-chip.active {
  background: var(--tool); color: var(--bg); border-color: var(--tool);
}
.devtools-chip-reset {
  font-size: 10px; padding: 2px 8px; margin-left: 2px;
}
.devtools-list {
  flex: 1; overflow-y: auto;
  padding: 8px 6px;
}
.devtools-list-empty {
  padding: 20px 12px; text-align: center; font-size: 12px;
}
/* t159 row grammar (mirrors .trace-event-row): 2px family edge on the left,
 * fixed monochrome glyph column, then type/session/seq, then a spacer that
 * pushes the surface pill + time + `{ }` badge to the right edge. */
.devtools-row {
  margin: 2px 0; border-left: 2px solid var(--border);
  background: var(--bg);
}
.devtools-row[open] { background: var(--bg-elev-2); }
.devtools-row-summary {
  display: flex; align-items: baseline; gap: 8px;
  padding: 4px 8px; cursor: pointer;
  font-family: var(--mono); font-size: 11px;
  list-style: none;
}
.devtools-row-summary::-webkit-details-marker { display: none; }
.devtools-row-glyph {
  width: 12px; text-align: center; color: var(--muted);
  font-family: var(--mono); flex-shrink: 0;
}
.devtools-row-type { color: var(--text); font-weight: 600; }
.devtools-row-session { font-size: 10px; }
.devtools-row-seq { font-size: 10px; flex: 1; } /* spacer: pushes trailing metrics right */
.devtools-row-time { color: var(--muted); font-size: 10px; margin-left: auto; }
.devtools-row-raw-badge { margin-left: 4px; }
.devtools-row-body {
  margin: 0; padding: 6px 12px 10px;
  display: flex; flex-direction: column; gap: 4px;
  max-height: 320px; overflow-y: auto;
}
.devtools-row-l2-head {
  display: flex; align-items: baseline; justify-content: space-between;
  font-family: var(--mono); font-size: 10px;
}
.devtools-row-l2-label { text-transform: uppercase; letter-spacing: 0.5px; }
.devtools-row-copy {
  padding: 1px 8px; border-radius: 4px;
  background: var(--bg); color: var(--muted);
  border: 1px solid var(--border);
  font-family: var(--mono); font-size: 10px; cursor: pointer;
}
.devtools-row-copy:hover { color: var(--accent); border-color: var(--accent); }
.devtools-row-pre {
  margin: 0; padding: 6px 8px;
  background: var(--bg); border: 1px solid var(--border); border-radius: 4px;
  font-family: var(--mono); font-size: 11px;
  color: var(--muted); white-space: pre-wrap; word-break: break-word;
}

/* Family edge — mirrors .trace-event-row-* colours from the trace panes
 * (renderer.js renderTraceEventRow). Overrides the generic --border edge
 * so family reads at a glance; the surface classification is orthogonal
 * (encoded via the surface pill + row background wash below). */
.devtools-row-family-assistant { border-left-color: color-mix(in srgb, var(--accent) 70%, transparent); }
.devtools-row-family-tool      { border-left-color: color-mix(in srgb, var(--tool)   70%, transparent); }
.devtools-row-family-context   { border-left-color: #7fc4a1; }
.devtools-row-family-hook      { border-left-color: #d0a97b; }
.devtools-row-family-approval  { border-left-color: color-mix(in srgb, var(--accent) 50%, #d0a97b); }
.devtools-row-family-bash      { border-left-color: color-mix(in srgb, var(--ok) 60%, transparent); }
.devtools-row-family-meta      { border-left-color: var(--border); }
.devtools-row-family-generic   { border-left-color: var(--border); }

.devtools-type-hook      { color: var(--tool); }
.devtools-type-approval  { color: var(--accent); }
.devtools-type-request   { color: var(--muted); }
.devtools-type-bash      { color: var(--ok); }
.devtools-type-tool      { color: var(--user-bubble); }
.devtools-type-assistant { color: var(--accent); }
.devtools-type-flow      { color: var(--muted); }
.devtools-type-compact   { color: var(--tool); }
.devtools-type-generic   { color: var(--text); }

/* --- Surface filter chips + row surface encoding (ticket #128) ------------ *
 * Three-way partition on every event: current / shadowed / log-only. The
 * left-border colour on each row matches the chip colour so the two read as
 * one system. Colours are tuned against both the demo dark chrome and the
 * default light theme via color-mix on --accent / neutrals. */

.devtools-surfaces {
  display: flex; align-items: center; gap: 6px;
  padding: 4px 8px 2px; flex-wrap: wrap;
}
.devtools-surfaces-label {
  font-family: var(--mono); font-size: 10px;
  text-transform: uppercase; letter-spacing: 0.5px;
  margin-right: 2px;
}
.devtools-surface {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 2px 8px; border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--muted);
  font-family: var(--mono); font-size: 11px;
  cursor: pointer;
}
.devtools-surface:hover { color: var(--text); }
.devtools-surface .devtools-surface-badge {
  font-size: 10px; padding: 0 5px; border-radius: 999px;
  background: color-mix(in oklab, currentColor 15%, transparent);
  min-width: 16px; text-align: center;
}
.devtools-surface-current {
  color: color-mix(in oklab, var(--ok) 70%, var(--text));
  border-color: color-mix(in oklab, var(--ok) 30%, var(--border));
}
.devtools-surface-shadowed {
  color: color-mix(in oklab, var(--warn) 70%, var(--text));
  border-color: color-mix(in oklab, var(--warn) 30%, var(--border));
}
.devtools-surface-log-only {
  color: color-mix(in oklab, var(--muted) 60%, var(--text));
  border-color: var(--border);
}
.devtools-surface.active {
  background: color-mix(in oklab, currentColor 12%, var(--bg));
  border-color: currentColor;
}

/* Surface encoding on the row itself is a subtle background wash — the
 * 2px left edge is owned by family (see .devtools-row-family-*), so the
 * two axes never fight for the same pixel. The surface pill in the summary
 * carries the labeled colour; the wash is a cross-check for skim reading. */
.devtools-row-surface-current  { background: color-mix(in oklab, var(--ok)    3%, var(--bg)); }
.devtools-row-surface-shadowed { background: color-mix(in oklab, var(--warn)   5%, var(--bg)); }
.devtools-row-surface-log-only { background: color-mix(in oklab, var(--muted) 4%, var(--bg)); }
.devtools-row-surface-current[open]  { background: color-mix(in oklab, var(--ok)    6%, var(--bg-elev-2)); }
.devtools-row-surface-shadowed[open] { background: color-mix(in oklab, var(--warn)   9%, var(--bg-elev-2)); }
.devtools-row-surface-log-only[open] { background: color-mix(in oklab, var(--muted) 7%, var(--bg-elev-2)); }

/* Small pill in the row summary — same colour family, denser than the chip. */
.devtools-row-surface {
  font-family: var(--mono); font-size: 9px;
  text-transform: uppercase; letter-spacing: 0.5px;
  padding: 1px 6px; border-radius: 999px;
  border: 1px solid currentColor;
  background: color-mix(in oklab, currentColor 8%, transparent);
  margin-left: 4px;
}

/* --- Plugins tab · Browse (marketplace) --------------------------------- *
 * reference-style row list (2026-07-16 redesign lane): big hero title + subtitle
 * + search, an Installed icon strip, then a vertical list of one-line rows
 * (icon left, name/desc middle, install button right). Only CSS variables
 * are used so the redesign lane's theme swap re-skins for free. */

.plugins-subnav {
  display: flex; gap: 4px; padding: 2px; margin-bottom: 4px;
  background: var(--bg-elev); border: 1px solid var(--border);
  border-radius: 8px; align-self: flex-start;
}
.plugins-subnav-btn {
  padding: 6px 14px; border: 0; background: transparent;
  border-radius: 6px; color: var(--muted);
  font-size: 12.5px; font-weight: 500; cursor: pointer;
  transition: background 120ms ease, color 120ms ease;
}
.plugins-subnav-btn:hover { color: var(--text); }
.plugins-subnav-btn.active {
  background: var(--bg-elev-2); color: var(--text);
  box-shadow: 0 0 0 1px var(--border);
}

.plugins-subpanel { display: flex; flex-direction: column; gap: 16px; }
.plugins-subpanel[hidden] { display: none; }

/* Hero: big title + one-paragraph subtitle + search input. The whole block
 * is intentionally airy so it reads as a landing page — reference design's plugin store
 * cadence — rather than a dense settings pane. */
.market-hero {
  display: flex; flex-direction: column; gap: 8px;
  padding: 4px 2px 8px 2px;
}
.market-hero-title {
  margin: 0; font-size: 22px; font-weight: 700; line-height: 1.2;
  color: var(--text); letter-spacing: -0.01em;
}
.market-hero-sub {
  margin: 0; font-size: 13px; line-height: 1.5;
  color: var(--muted); max-width: 68ch;
}
.market-hero-sub em {
  font-style: normal; color: var(--text);
  border-bottom: 1px dashed var(--border);
}
.market-search {
  display: flex; gap: 12px; align-items: center;
  margin-top: 6px;
}
.market-search input[type="search"] {
  flex: 1; min-width: 0;
  padding: 8px 12px;
  background: var(--bg); color: var(--text);
  border: 1px solid var(--border); border-radius: 8px;
  font-size: 13px; font-family: inherit;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}
.market-search input[type="search"]:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--accent) 20%, transparent);
}
.market-search input[type="search"]::placeholder { color: var(--muted); }
.market-meta {
  font-size: 11.5px; color: var(--muted); white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.market-meta code {
  background: var(--bg-elev-2); padding: 1px 5px; border-radius: 3px;
  font-family: var(--mono); font-size: 11px; color: var(--text);
}
.market-meta .warn { color: var(--tool); }

/* Installed strip: a small row of square avatars for currently-installed
 * plugins, click-to-scroll to the row-list entry. Nothing here is a form
 * control — the strip is a compact reference, not an editor. */
.market-installed-strip {
  display: flex; flex-direction: column; gap: 8px;
  padding: 4px 2px;
}
.market-installed-header {
  display: flex; align-items: baseline; gap: 10px;
}
.market-installed-label {
  font-size: 12px; font-weight: 600; color: var(--text);
  text-transform: uppercase; letter-spacing: 0.06em;
}
.market-installed-count {
  font-size: 11.5px; font-variant-numeric: tabular-nums;
}
.market-installed-icons {
  display: flex; flex-wrap: wrap; gap: 6px;
}
.market-installed-icon {
  width: 32px; height: 32px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--bg-elev); color: var(--accent);
  border: 1px solid var(--border); border-radius: 6px;
  font-family: var(--mono); font-size: 11px; font-weight: 600;
  cursor: pointer;
  transition: transform 120ms ease, border-color 120ms ease;
}
.market-installed-icon:hover {
  transform: translateY(-1px); border-color: var(--accent);
}
.market-installed-icon.is-disabled {
  color: var(--tool); border-color: var(--tool);
  opacity: 0.7;
}

.market-divider {
  height: 1px; background: var(--border); margin: 0;
}

/* Row list: vertical stack of one-line-ish cards. Each row is a flex
 * container with fixed-width icon, flexible body, fixed-width action
 * cluster. min-height keeps them visually uniform even when a description
 * is single-line. */
.market-list {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-direction: column; gap: 6px;
}
.market-row {
  display: flex; gap: 14px; align-items: center;
  padding: 12px 14px; min-height: 64px;
  background: var(--bg-elev); border: 1px solid var(--border); border-radius: 10px;
  transition: border-color 120ms ease, background 120ms ease, transform 120ms ease;
}
.market-row:hover { border-color: var(--accent); }
.market-row.is-installed {
  border-color: color-mix(in oklab, var(--ok) 60%, var(--border));
  background: color-mix(in oklab, var(--ok) 4%, var(--bg-elev));
}
.market-row.is-disabled {
  border-color: color-mix(in oklab, var(--tool) 60%, var(--border));
  background: color-mix(in oklab, var(--tool) 4%, var(--bg-elev));
}
.market-row.is-highlight {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px color-mix(in oklab, var(--accent) 30%, transparent);
}

.market-row-icon {
  flex: 0 0 auto;
  width: 40px; height: 40px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg); color: var(--accent);
  font-family: var(--mono); font-size: 13px; font-weight: 700;
  border: 1px solid var(--border);
}
.market-row-body {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column; gap: 3px;
}
.market-row-topline {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline;
}
.market-row-title {
  margin: 0; font-size: 14px; font-weight: 600; color: var(--text);
}
.market-row-package code {
  background: var(--bg); padding: 1px 6px; border-radius: 3px;
  font-family: var(--mono); font-size: 11px; color: var(--muted);
  border: 1px solid var(--border);
}
.market-row-author {
  font-size: 11.5px;
}
.market-row-desc {
  margin: 0; font-size: 12.5px; line-height: 1.45; color: var(--muted);
  overflow: hidden; display: -webkit-box;
  -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.market-row-perms {
  display: inline-flex; flex-wrap: wrap; gap: 4px; margin-top: 2px;
}
.market-perm {
  padding: 1px 7px; border-radius: 10px;
  font-family: var(--mono); font-size: 10.5px;
  border: 1px solid var(--border); background: var(--bg);
}
.market-perm.perm-net { color: var(--tool); border-color: var(--tool); }
.market-perm.perm-fs { color: var(--accent); border-color: var(--accent); }
.market-perm.perm-subprocess { color: var(--error); border-color: var(--error); }
.market-perm.perm-other { color: var(--muted); }

.market-row-actions {
  flex: 0 0 auto;
  display: flex; flex-direction: column; align-items: stretch;
  gap: 4px; min-width: 110px;
}
.market-primary { min-width: 110px; }
.market-primary.is-disabled { background: var(--tool); border-color: var(--tool); }
.market-primary:disabled.is-installed,
.market-primary:disabled {
  cursor: default;
  background: transparent; color: var(--ok); border: 1px solid var(--ok);
}
.market-uninstall {
  font-size: 11px; padding: 4px 8px;
}
.market-basehint {
  font-size: 11px; font-style: italic; text-align: center;
}

.market-empty, .market-error {
  list-style: none;
  padding: 32px; text-align: center; color: var(--muted); font-style: italic;
  background: var(--bg-elev); border: 1px dashed var(--border); border-radius: 8px;
}
.market-error { color: var(--error); font-style: normal; }

/* -- P1 batch C: panels-c-controller.js styles ---------------------------- */
/* web_search result-list card */
.card-web-search { display: flex; flex-direction: column; gap: 4px; }
.card-web-search-head { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.4px; }
.card-web-search-empty { font-style: italic; }
.card-web-search-raw {
  margin: 4px 0 0; padding: 6px 8px; background: var(--bg-elev-2);
  color: var(--muted); font-size: 11px; white-space: pre-wrap; border-radius: 4px;
}
.card-web-search-list { list-style: decimal inside; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.card-web-search-item { padding: 4px 0; border-bottom: 1px solid var(--bg-elev-2); }
.card-web-search-item:last-child { border-bottom: none; }
.card-web-search-title { display: inline; color: var(--accent); text-decoration: none; font-weight: 500; }
.card-web-search-title:hover { text-decoration: underline; cursor: pointer; }
.card-web-search-url { display: block; font-size: 11px; margin-top: 2px; word-break: break-all; }
.card-web-search-snippet { display: block; font-size: 12px; margin-top: 3px; color: var(--text); }

/* skill loaded card */
.card-skill { display: flex; flex-direction: column; }
.card-skill-summary {
  cursor: pointer; padding: 6px 8px; background: var(--bg-elev-2); border-radius: 4px;
  display: flex; align-items: center; gap: 8px; user-select: none;
}
.card-skill-icon { font-size: 14px; }
.card-skill-label { flex: 1; font-weight: 500; }
.card-skill-size { font-size: 11px; }
.card-skill-body {
  margin: 6px 0 0; padding: 8px; background: var(--bg-elev-2); color: var(--text);
  font-size: 12px; white-space: pre-wrap; word-break: break-word; max-height: 320px;
  overflow-y: auto; border-radius: 4px;
}

/* workflow orchestration skeleton */
.card-workflow { display: flex; flex-direction: column; gap: 6px; }
.card-workflow-head { display: flex; align-items: center; gap: 8px; }
.card-workflow-title { font-weight: 500; }
.card-workflow-chip {
  font-size: 10px; padding: 2px 6px; border-radius: 999px; border: 1px solid var(--bg-elev-2);
  background: transparent; text-transform: uppercase; letter-spacing: 0.4px;
}
.card-workflow-phases { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.card-workflow-phase { display: flex; align-items: center; gap: 8px; padding: 3px 0; font-size: 12px; }
.card-workflow-phase-dot { width: 14px; text-align: center; color: var(--muted); }
.card-workflow-phase.status-done .card-workflow-phase-dot { color: var(--ok); }
.card-workflow-phase.status-running .card-workflow-phase-dot { color: var(--tool); }
.card-workflow-phase.status-failed .card-workflow-phase-dot { color: var(--error); }
.card-workflow-empty { font-size: 12px; font-style: italic; }

/* Background task drawer (dock above composer) */
.panels-c-tasks-drawer {
  border-top: 1px solid var(--bg-elev-2);
  background: var(--bg-elev-1);
  max-height: 200px; overflow-y: auto;
  display: flex; flex-direction: column;
}
.panels-c-tasks-head {
  display: flex; align-items: center; gap: 8px; padding: 6px 10px;
  background: var(--bg-elev-2); font-size: 11px;
}
.panels-c-tasks-title { font-weight: 600; text-transform: uppercase; letter-spacing: 0.4px; }
.panels-c-tasks-count {
  min-width: 20px; text-align: center; padding: 1px 6px; border-radius: 999px;
  background: var(--bg-elev-1); font-variant-numeric: tabular-nums;
}
.panels-c-tasks-toggle { margin-left: auto; padding: 2px 8px; font-size: 11px; }
.panels-c-tasks-body { padding: 6px 10px; display: flex; flex-direction: column; gap: 4px; }
.panels-c-tasks-body.collapsed { display: none; }
.panels-c-task-row { display: flex; align-items: center; gap: 8px; padding: 4px 6px; border-radius: 3px; font-size: 12px; }
.panels-c-task-row.status-running { background: var(--bg-elev-2); border-left: 2px solid var(--tool); padding-left: 4px; }
.panels-c-task-row.status-done    { background: var(--bg-elev-2); border-left: 2px solid var(--ok);   padding-left: 4px; }
.panels-c-task-row.status-failed  { background: var(--bg-elev-2); border-left: 2px solid var(--error); padding-left: 4px; }
.panels-c-task-row.status-killed  { background: var(--bg-elev-2); border-left: 2px solid var(--muted); padding-left: 4px; }
.panels-c-task-status { width: 14px; text-align: center; font-family: monospace; }
.panels-c-task-id { color: var(--muted); font-family: monospace; font-size: 11px; }
.panels-c-task-name { font-weight: 500; }
.panels-c-task-summary { flex: 1; color: var(--muted); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* --- context meter + Compact-now button (task #49) ------------------- */

/* Sits between the status text and the model badge; a mini progress bar +
 * textual label + a compact-now button. Level colour is driven by
 * .level-* classes so the JS side just toggles a class name. */
.ctx-meter {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11.5px; color: var(--muted);
  margin-left: 8px;
}
.ctx-meter-bar {
  display: inline-block; position: relative;
  width: 90px; height: 6px; border-radius: 3px;
  background: var(--bg-elev-2); overflow: hidden;
}
.ctx-meter-fill {
  position: absolute; top: 0; left: 0; bottom: 0;
  width: 0%; background: var(--muted);
  transition: width 0.2s linear, background-color 0.2s;
}
.ctx-meter.level-nominal  .ctx-meter-fill { background: var(--ok); }
.ctx-meter.level-warn     .ctx-meter-fill { background: var(--tool); }
.ctx-meter.level-high     .ctx-meter-fill { background: var(--tool); filter: saturate(1.4); }
.ctx-meter.level-critical .ctx-meter-fill { background: var(--error); }
.ctx-meter-label { font-family: var(--mono); font-size: 11px; }
.ctx-meter.level-critical .ctx-meter-label { color: var(--error); }
#ctx-compact-btn {
  font-size: 11px; padding: 2px 8px; border-radius: 4px;
  background: var(--bg-elev-2); border: 1px solid var(--border);
  color: var(--muted); cursor: pointer;
}
#ctx-compact-btn:not(:disabled):hover { color: var(--text); }
#ctx-compact-btn:disabled { cursor: not-allowed; }

/* --- recall card (history_read / history_search) ---------------------- */

/* Same family as .context-card (which uses a paperclip glyph) so the
 * "context surface" cards share a visual language; the leading glyph is
 * what distinguishes reads (magnifying-glass) from writes (paperclip). The
 * details/summary shape lets the recalled content stay folded by default —
 * reads can be long. */
.recall-card {
  align-self: flex-start; max-width: 780px;
  background: var(--bg-elev); border: 1px solid var(--border); border-radius: 8px;
  padding: 6px 10px; font-size: 12.5px;
}
.recall-card summary {
  cursor: pointer; color: var(--muted); list-style: none;
  display: flex; align-items: center; gap: 6px;
}
.recall-card summary::-webkit-details-marker { display: none; }
.recall-card summary::before {
  /* Round-visual N3: was a search-glass SVG data-URI (CSP-refused). Uses
   * a typographic magnifier glyph via `content:` instead — same intent
   * (recall = search-through-history), zero image surface. `err` variant
   * below swaps the color; the glyph stays. */
  content: '\2315'; /* ⌕ telephone recorder (renders as a small magnifier) */
  color: var(--muted);
  font-size: 12px; line-height: 1;
  width: 12px; height: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  flex: 0 0 auto;
}
.recall-card .tool-name {
  color: var(--accent); font-family: var(--mono); font-size: 11px;
}
.recall-card .query {
  color: var(--muted); overflow: hidden; white-space: nowrap;
  text-overflow: ellipsis; flex: 1;
  font-family: var(--mono); font-size: 11px;
}
.recall-card .body {
  margin-top: 6px; padding: 6px 8px; background: var(--bg);
  border-radius: 4px; font-family: var(--mono); font-size: 12px;
  white-space: pre-wrap; word-wrap: break-word; color: var(--text);
  max-height: 320px; overflow: auto;
}
.recall-card.pending .body { color: var(--muted); font-style: italic; }
.recall-card.err summary::before {
  color: var(--err, #dc2626);
}
.recall-card.err .query { color: var(--error); }

/* --- compact summary as an expandable card --------------------------- */

/* Upgrade of `.compact-divider` from a static break to an interactive one:
 * still centred with dashes-on-either-side visual weight, but clicking the
 * label opens a details block showing the full summary text + shadowed
 * event count. Legacy `.compact-divider` styling above remains as the
 * fallback for compact/start / compact/end anchors. */
.compact-card {
  align-self: stretch; margin: 8px 0;
  color: var(--muted); font-size: 11px;
}
.compact-card summary {
  cursor: pointer; list-style: none;
  text-align: center; letter-spacing: 0.1em;
  position: relative; padding: 4px 0;
}
.compact-card summary::-webkit-details-marker { display: none; }
.compact-card summary::before, .compact-card summary::after {
  content: ''; position: absolute; top: 50%; width: 28%;
  border-top: 1px dashed var(--border);
}
.compact-card summary::before { left: 8%; }
.compact-card summary::after  { right: 8%; }
.compact-card summary .tokens { color: var(--tool); margin-left: 6px; }
.compact-card summary .events { color: var(--muted); margin-left: 6px; opacity: 0.7; }
/* Auto vs manual badge — a small pill on the left of the divider label.
   Auto = the runtime saved the turn (pre-step safety valve). Manual = the
   user or a plugin asked for compaction. Same 11px monospace family the
   surrounding meta uses, but with a coloured background so the two paths
   read as distinct at a glance. Sits inside the summary so the click
   affordance to open the card still covers the whole line. */
.compact-card summary .compact-badge {
  display: inline-block;
  margin-right: 8px; padding: 1px 6px;
  border-radius: 6px;
  font-family: var(--mono); font-size: 10px;
  letter-spacing: 0.05em; text-transform: uppercase;
  border: 1px solid transparent;
  vertical-align: baseline;
}
.compact-card summary .compact-badge-auto {
  background: color-mix(in oklab, var(--muted) 12%, var(--bg));
  color: color-mix(in oklab, var(--muted) 90%, var(--text));
  border-color: color-mix(in oklab, var(--muted) 30%, var(--border));
}
.compact-card summary .compact-badge-manual {
  background: color-mix(in oklab, var(--accent) 14%, var(--bg));
  color: color-mix(in oklab, var(--accent) 80%, var(--text));
  border-color: color-mix(in oklab, var(--accent) 40%, var(--border));
}
.compact-card .body {
  margin: 6px 12% 0; padding: 8px 10px;
  background: var(--bg); border: 1px solid var(--border); border-radius: 6px;
  font-family: var(--mono); font-size: 12px;
  white-space: pre-wrap; word-wrap: break-word; color: var(--text);
  max-height: 320px; overflow: auto;
  text-align: left; letter-spacing: normal;
}
.compact-card .meta {
  margin: 6px 12% 0; font-size: 11px; color: var(--muted);
  text-align: right; letter-spacing: normal;
}

/* Shadowed-events expander (task #103 P0-1). Compact cards can open a
   secondary 
that reveals the raw events the summary superseded — DSH's key differentiator (kernel intent doc §2.1). The visual grammar here is deliberately "read-only ghost": dashed left border, muted foreground, reduced opacity, no hover highlight, no cursor:pointer on rows. A reader must feel this is history the model no longer sees but the log still holds, not something to click, fork, or copy from. Nested inside .compact-card so it inherits the divider indentation. */ .compact-card .shadowed-expander { margin: 6px 12% 0; text-align: left; letter-spacing: normal; } .compact-card .shadowed-expander-summary { cursor: pointer; list-style: none; padding: 4px 8px; font-size: 11px; color: var(--muted); border-radius: 4px; border: 1px dashed var(--border); background: color-mix(in oklab, var(--muted) 4%, transparent); display: inline-block; } .compact-card .shadowed-expander-summary::-webkit-details-marker { display: none; } .compact-card .shadowed-expander-summary::before { content: '▸ '; margin-right: 2px; transition: transform 0.12s ease; display: inline-block; } .compact-card details[open] > .shadowed-expander-summary::before { content: '▾ '; } .compact-card .shadowed-expander-body { margin-top: 8px; padding: 8px 0 8px 12px; border-left: 2px dashed color-mix(in oklab, var(--muted) 40%, var(--border)); opacity: 0.78; } .compact-card .shadowed-event { margin-bottom: 8px; padding: 6px 8px; background: color-mix(in oklab, var(--muted) 3%, var(--bg)); border-radius: 4px; font-family: var(--mono); font-size: 11px; color: var(--muted); /* No cursor:pointer, no hover — ghost affordance. */ } .compact-card .shadowed-event-hdr { display: flex; gap: 8px; align-items: baseline; margin-bottom: 4px; } .compact-card .shadowed-event-seq { color: color-mix(in oklab, var(--accent) 40%, var(--muted)); font-weight: 600; } .compact-card .shadowed-event-type { color: var(--muted); opacity: 0.85; } .compact-card .shadowed-event-body { white-space: pre-wrap; word-wrap: break-word; color: color-mix(in oklab, var(--text) 55%, var(--muted)); max-height: 160px; overflow: auto; } .compact-card .shadowed-expander-fallback, .compact-card .shadowed-expander-error { padding: 6px 8px; font-size: 11px; color: var(--muted); font-style: italic; } /* ============================================================================ * Pull Requests page + Quick chat overlay * ==========================================================================*/ /* --- PR toolbar (search + filter chips) --------------------------------- */ .pr-toolbar { display: flex; align-items: center; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--border); } .pr-search-wrap { flex: 1; display: flex; align-items: center; gap: 8px; background: var(--bg-elev); border: 1px solid var(--border); border-radius: 8px; padding: 6px 10px; color: var(--muted); } .pr-search-wrap:focus-within { border-color: var(--accent); } .pr-search { flex: 1; background: transparent; border: none; outline: none; color: var(--text); font: inherit; font-size: 13px; } .pr-search::placeholder { color: var(--muted); } /* Filters lead the toolbar (see index.html §pr-toolbar). Order-agnostic * styling — the visual weight difference between the active chip and the * others is the load-bearing signal (QA round-3 §8.2). Active gets: * · brighter fill (accent-tinted background, not just border colour) * · text bumped from muted → text and font-weight 600 * · a live count pill on the right so scope + volume read at a glance */ .pr-filters { display: flex; align-items: center; gap: 4px; padding: 3px; border-radius: 999px; background: var(--bg-elev); border: 1px solid var(--border); } .pr-filter-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; font-size: 12.5px; font-weight: 500; background: transparent; color: var(--muted); border: 1px solid transparent; border-radius: 999px; cursor: pointer; transition: color 120ms ease, background-color 120ms ease, border-color 120ms ease; } .pr-filter-chip:hover { color: var(--text); background: color-mix(in oklab, var(--accent) 8%, transparent); } .pr-filter-chip.active { color: var(--text); font-weight: 600; background: color-mix(in oklab, var(--accent) 18%, var(--bg)); border-color: color-mix(in oklab, var(--accent) 40%, var(--border)); box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04); } .pr-filter-chip:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; } .pr-filter-count { display: inline-block; min-width: 18px; padding: 0 6px; font-size: 11px; font-family: var(--mono); line-height: 16px; text-align: center; color: var(--muted); background: var(--bg); border-radius: 999px; } .pr-filter-chip.active .pr-filter-count { color: var(--text); background: color-mix(in oklab, var(--accent) 26%, var(--bg)); } /* --- PR list body ------------------------------------------------------- */ .pr-body { flex: 1; overflow-y: auto; padding: 16px 20px 24px; } .pr-meta { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; } .pr-hint-banner { padding: 8px 12px; border: 1px dashed var(--tool); border-radius: 6px; background: rgba(214, 181, 110, 0.06); color: var(--muted); font-size: 12.5px; } .pr-hint-badge { display: inline-block; padding: 1px 8px; margin-right: 6px; border: 1px solid var(--tool); color: var(--tool); border-radius: 999px; font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; } .pr-hint-banner code { background: var(--bg); padding: 1px 6px; border-radius: 4px; font-family: var(--mono); color: var(--text); } .pr-group-head { font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); font-weight: 600; margin: 16px 0 6px; padding-left: 4px; } .pr-group-head:first-child { margin-top: 4px; } .pr-group-head-closed { color: var(--muted); opacity: 0.72; } .pr-group { display: flex; flex-direction: column; background: var(--bg-elev); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; } .pr-empty { padding: 32px 12px; text-align: center; display: flex; flex-direction: column; gap: 6px; align-items: center; color: var(--muted); } .pr-empty-title { font-size: 14px; color: var(--text); } .pr-empty-hint { font-size: 12.5px; } /* --- PR row ------------------------------------------------------------- */ .pr-row { display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 10px 14px; background: transparent; color: var(--text); border: none; border-bottom: 1px solid var(--border); cursor: pointer; font: inherit; } .pr-row:last-child { border-bottom: none; } .pr-row:hover { background: var(--bg-elev-2); } .pr-row:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; } .pr-row-lead { display: flex; align-items: center; gap: 6px; color: var(--muted); } .pr-icon { color: var(--muted); } .pr-state-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); flex: 0 0 auto; } .pr-state-open { background: var(--ok); } .pr-state-draft { background: var(--muted); } .pr-state-conflict { background: var(--error); } .pr-state-merged { background: #a184ff; } .pr-state-closed { background: var(--error); opacity: 0.7; } .pr-row-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; } .pr-row-titleline { display: flex; align-items: baseline; gap: 8px; min-width: 0; } .pr-title { font-weight: 600; font-size: 13.5px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; min-width: 0; } .pr-num { color: var(--muted); font-family: var(--mono); font-size: 12px; flex: 0 0 auto; } .pr-row-subline { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; color: var(--muted); font-size: 12px; } .pr-repo { font-family: var(--mono); } .pr-branch { font-family: var(--mono); color: var(--accent); } .pr-branch-sep { color: var(--muted); } .pr-base { font-family: var(--mono); } .pr-dotsep { color: var(--border); } .pr-author { } .pr-row-trail { display: flex; align-items: center; gap: 12px; flex: 0 0 auto; } .pr-diff { display: flex; gap: 8px; font-family: var(--mono); font-size: 11.5px; } .pr-diff-adds { color: var(--ok); } .pr-diff-dels { color: var(--error); } .pr-rel { font-size: 12px; min-width: 42px; text-align: right; } .pr-ask { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px 3px 8px; border-radius: 999px; font-size: 12px; border: 1px solid var(--border); } .pr-ask:hover { border-color: var(--accent); color: var(--accent); background: transparent; } .pr-ask svg { display: inline-block; vertical-align: middle; } .pr-sidebar-note { padding: 10px 12px; font-size: 12px; line-height: 1.45; } .pr-sidebar-note code { background: var(--bg); padding: 1px 4px; border-radius: 3px; font-family: var(--mono); font-size: 11.5px; } /* Merged PR titles read a shade more muted so the "recently merged/closed" * group visually recedes below Open. */ .pr-row-merged .pr-title, .pr-row-closed .pr-title { color: var(--muted); font-weight: 500; } /* --- Quick chat overlay ------------------------------------------------- * reference-style Cmd+Shift+Space palette. Tokens throughout so light and dark * come from the same rules; scrim uses a very low-alpha wash + backdrop blur * (macOS Spotlight feel) rather than a hardcoded dark curtain. */ /* `display: flex` would defeat the [hidden] attribute's UA default of * display:none — without this rule the invisible scrim covers the whole * window at z-index 900 and silently eats every click in the app. */ .quickchat-scrim[hidden] { display: none; } .quickchat-scrim { position: fixed; inset: 0; z-index: 900; background: rgba(0, 0, 0, 0.18); display: flex; align-items: flex-start; justify-content: center; padding-top: 12vh; opacity: 0; transition: opacity 120ms ease; backdrop-filter: saturate(160%) blur(10px); -webkit-backdrop-filter: saturate(160%) blur(10px); } :root[data-theme="dark"] .quickchat-scrim { background: rgba(0, 0, 0, 0.45); } @media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .quickchat-scrim { background: rgba(0, 0, 0, 0.45); } } .quickchat-scrim.quickchat-open { opacity: 1; } .quickchat-card { width: min(600px, 92vw); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-pop); padding: 12px 12px 10px; display: flex; flex-direction: column; gap: 8px; transform: translateY(6px); transition: transform 120ms ease; } .quickchat-scrim.quickchat-open .quickchat-card { transform: translateY(0); } .quickchat-head { display: flex; align-items: center; gap: 8px; padding: 2px 6px 8px; border-bottom: 1px solid var(--divider); } .quickchat-brand-logo { width: 16px; height: 16px; border-radius: 4px; display: block; flex: 0 0 auto; } .quickchat-title { font-weight: 600; font-size: 13px; color: var(--text); } .quickchat-hint { font-size: 11.5px; color: var(--text-secondary); } .quickchat-close { margin-left: auto; font-size: 15px; line-height: 1; padding: 0 8px; height: 24px; background: transparent; border: 1px solid transparent; border-radius: var(--radius-sm); color: var(--text-secondary); } .quickchat-close:hover { background: var(--surface-hover); color: var(--text); } .quickchat-recent { display: flex; flex-direction: column; gap: 1px; max-height: 240px; overflow-y: auto; } .quickchat-recent-head { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.06em; padding: 6px 8px 4px; color: var(--text-tertiary); } .quickchat-recent-empty { padding: 10px 8px; font-size: 12.5px; color: var(--text-secondary); } .quickchat-recent-row { display: flex; align-items: center; gap: 8px; padding: 7px 8px; border-radius: var(--radius-sm); background: transparent; border: none; color: var(--text); text-align: left; cursor: pointer; font: inherit; font-size: 13px; } .quickchat-recent-row:hover { background: var(--surface-hover); } .quickchat-recent-row:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; } .quickchat-recent-title { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text); } /* Smart-title flagged this row as a placeholder ("未命名 · rel-time"). Same * italic-muted treatment the sidebar uses so both surfaces read the same. */ .quickchat-recent-title.quickchat-recent-title-untitled { color: var(--text-secondary, var(--muted)); font-style: italic; } .quickchat-recent-id { font-family: var(--mono); font-size: 11px; color: var(--text-tertiary); } .quickchat-recent-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); animation: pulse 1.4s ease-in-out infinite; } .quickchat-composer { display: flex; align-items: flex-end; gap: 8px; padding-top: 8px; border-top: 1px solid var(--divider); } .quickchat-input { flex: 1; resize: none; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); color: var(--text); font: inherit; font-size: 13px; padding: 9px 12px; line-height: 1.45; transition: border-color 120ms ease, background 120ms ease; } .quickchat-input::placeholder { color: var(--text-tertiary); } .quickchat-input:focus { outline: none; border-color: var(--accent); background: var(--surface); } .quickchat-send { width: 32px; height: 32px; padding: 0; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; } /* Shared page header primitives — used by Mission Control, Plugins, Playground * and the new PR page. Kept as a *thin* base so the ui-redesign lane can layer * a proper theme on top without fighting these rules. */ .header-lead { display: flex; flex-direction: column; gap: 2px; } .header-lead .page-title { font-size: 15px; font-weight: 600; } .header-lead .page-sub { font-size: 12.5px; } /* ========================================================================== * reference design IA overrides — appended last so they win the cascade for new nodes. * This section rebases the shell (sidebar-brand, nav-item, sidebar-section-head, * icon-btn, debug-popover, empty-welcome, prompt-chip, page-title/page-sub, * .msg light-mode bubbles, composer / statusbar polish, sessions relative * time) onto the light-first tokens above. * ========================================================================== */ body { background: var(--bg); color: var(--text); font-family: var(--font); font-size: var(--fs-body); line-height: 1.5; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; } ::selection { background: var(--accent-soft); color: var(--text); } .app { grid-template-columns: var(--sidebar-w) 1fr; } /* --- sidebar: macOS vibrancy, brand row, section nav, foot ---------------- */ .sidebar { background: var(--surface-vibrancy); backdrop-filter: saturate(180%) blur(24px); -webkit-backdrop-filter: saturate(180%) blur(24px); border-right: 1px solid var(--border); } /* Brand row: 22px logo + DSH wordmark + search icon. Left padding reserves * the macOS traffic-light region so the row stays draggable there. The logo * is a plain ; a 6px radius (matching --radius-sm) softens the raster * corners into the surrounding UI without hiding the whale's own rounded * frame. Search is a no-drag island so a click actually lands on the button. */ .sidebar .sidebar-brand { display: flex; align-items: center; gap: var(--space-2); padding: var(--space-3) var(--space-3) var(--space-3) 78px; -webkit-app-region: drag; } .sidebar .brand-logo { width: 22px; height: 22px; border-radius: var(--radius-sm); flex: 0 0 auto; display: block; } .sidebar .brand-name { font-size: var(--fs-section); font-weight: 600; letter-spacing: -0.01em; color: var(--text); flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .sidebar .brand-search { -webkit-app-region: no-drag; } /* Section nav: icon + text rows, active row uses the subtle system tint. */ .sidebar .sidebar-nav { display: flex; flex-direction: column; gap: 2px; padding: var(--space-1) var(--space-2) var(--space-3); } .sidebar .nav-item { display: flex; align-items: center; gap: var(--space-3); width: 100%; padding: 7px var(--space-2); border: 0; background: transparent; color: var(--text); border-radius: var(--radius-sm); cursor: pointer; font-size: var(--fs-body); text-align: left; transition: background 120ms ease; } .sidebar .nav-item:hover { background: var(--surface-hover); } .sidebar .nav-item.active { background: var(--surface-active); font-weight: 500; } .sidebar .nav-item.active svg { color: var(--accent); } .sidebar .nav-item svg { color: var(--text-secondary); flex-shrink: 0; } .sidebar .sidebar-section-head { display: flex; align-items: center; justify-content: space-between; padding: var(--space-3) var(--space-4) var(--space-1); } .sidebar .section-label { font-size: var(--fs-xs); color: var(--text-tertiary); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; } .icon-btn { display: inline-flex; align-items: center; justify-content: center; padding: 4px; min-width: 24px; min-height: 24px; background: transparent; color: var(--text-secondary); border: 0; border-radius: var(--radius-sm); cursor: pointer; transition: background 120ms ease, color 120ms ease; } .icon-btn:hover:not(:disabled) { background: var(--surface-hover); color: var(--text); } .icon-btn:disabled { opacity: 0.4; cursor: not-allowed; } .sidebar > .tab-panel { display: flex; flex-direction: column; min-height: 0; flex: 1; } .sidebar > .tab-panel[hidden] { display: none; } .sidebar-foot { margin-top: auto; padding: var(--space-3); border-top: 1px solid var(--divider); display: flex; flex-direction: column; gap: var(--space-2); } .sidebar-foot .field { display: flex; flex-direction: column; gap: 4px; font-size: var(--fs-xs); color: var(--text-secondary); } .sidebar-foot select { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 6px 8px; font-size: var(--fs-sm); color: var(--text); cursor: pointer; } .sidebar-foot select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); } /* --- sessions list: unified "Recent" — row-dot + inline title + rel-time -- */ .sessions { padding: 0 var(--space-2) var(--space-2); /* Independent scroll so long history doesn't push the profile selector or the primary nav out of reach. min-height: 0 lets flex actually clip. */ overflow-y: auto; min-height: 0; } .sessions li { color: var(--text); padding: 6px var(--space-2); border-radius: var(--radius-sm); min-height: 32px; gap: var(--space-2); align-items: center; transition: background 120ms ease; display: flex; cursor: pointer; } .sessions li:hover { background: var(--surface-hover); color: var(--text); } .sessions li.active { background: var(--accent-soft); color: var(--text); } /* Row layout: state dot · title (grows) · rel-time (right-aligned muted). The title lives in a flex-1 wrapper so a very long title truncates while the rel-time chip stays pinned to the row's right edge. */ .sessions li .title-and-sub { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: var(--space-2); } .sessions li .title-and-sub .title { color: inherit; font-size: var(--fs-sm); line-height: 1.2; flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .sessions li .title-and-sub .title-untitled { color: var(--text-secondary); font-style: italic; } .sessions li .title-and-sub .rel-time { color: var(--text-tertiary); font-size: var(--fs-micro); line-height: 1.2; flex: 0 0 auto; } /* Per-row state dot family: green for a running live session (a turn is in flight right now), muted ring for a persisted-only resume row, an invisible spacer for a plain idle-live row so all rows line up on the same left edge regardless of state. */ .sessions li .row-dot { flex: 0 0 auto; width: 8px; height: 8px; border-radius: 50%; background: transparent; } .sessions li .row-dot-live { background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); } .sessions li .row-dot-resume { background: transparent; border: 1.5px solid var(--text-tertiary); width: 8px; height: 8px; box-sizing: border-box; } .sessions li .row-dot-idle { /* invisible spacer — keeps title left-edge aligned across states */ background: transparent; } /* Legacy .live-dot kept as an alias so any lingering reference (mocks, fork-marker rendering) still paints. Prefer .row-dot-live in new code. */ .sessions li .live-dot { background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); animation: none; } .sessions .session-group-label { padding: var(--space-3) var(--space-2) 4px; font-size: var(--fs-micro); color: var(--text-tertiary); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; list-style: none; } .sessions .session-untitled-group { padding: 4px var(--space-2); color: var(--text-secondary); font-style: italic; font-size: var(--fs-xs); cursor: default; } .sessions .session-untitled-group:hover { background: transparent; } /* Sessions head: label · Show-all toggle · new-session button. The toggle is a compact ghost affordance next to the "+" so it never fights the section-label. Hidden entirely when the list is short. */ .sidebar-section-head #sessions-toggle { font-size: var(--fs-micro); padding: 2px 6px; color: var(--text-tertiary); text-transform: none; letter-spacing: 0; margin-left: auto; margin-right: var(--space-1); } /* --- main area: page-header lockups + light background -------------------- */ .main { background: var(--bg); position: relative; } .pane { min-height: 0; } .header { padding: var(--space-4) var(--space-6) var(--space-3); border-bottom: 1px solid var(--divider); min-height: var(--header-h); /* Header is a column-flex child of .pane; without flex-shrink:0 the pane * squeezes it down to min-height and two-line subtitles bleed into the * content below (user-visible on Growth/Session Tree). Size to content. */ flex-shrink: 0; background: var(--bg); display: flex; align-items: flex-start; gap: var(--space-4); } .header .title { font-size: var(--fs-section); font-weight: 600; color: var(--text); padding-top: 4px; } .header .header-lead { flex: 1; min-width: 0; gap: 2px; } .header .header-lead .page-title { font-size: var(--fs-page); font-weight: 700; letter-spacing: -0.02em; color: var(--text); line-height: 1.2; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .header .header-lead .page-sub { font-size: var(--fs-sm); color: var(--text-secondary); line-height: 1.4; max-width: 640px; } .header .header-lead .page-title .muted.small { font-weight: 400; font-size: var(--fs-sm); } .header .header-actions { display: flex; align-items: center; gap: var(--space-2); flex-shrink: 0; } /* --- debug popover -------------------------------------------------------- */ .debug-popover { position: relative; } /* Fresh-eyes P0 (2026-07-18, review-fresh-eyes.md #4 + team-lead follow-up): the Debug popover should only exist when the app is running in QA mode (DSH_QA=1 → location.hash 'qa' → body[data-qa="1"] set by renderer.js). Production launches must not surface the mock-card / fixture-load / inject buttons — a first-time researcher clicking "Debug" was landing on a wall of unlabelled fixture verbs. The renderer sets the body flag once during boot; the popover is hidden here until that flag flips on. */ body:not([data-qa="1"]) .debug-popover { display: none; } .debug-toggle { display: inline-flex; align-items: center; gap: 6px; } .debug-toggle svg { color: var(--text-tertiary); } .debug-popover .debug { display: none; position: absolute; right: 0; top: calc(100% + 6px); min-width: 240px; max-height: 60vh; overflow-y: auto; padding: var(--space-2); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-pop); z-index: 30; flex-direction: column; gap: 2px; } .debug-popover[data-open="true"] .debug { display: flex; } .debug-popover .debug .debug-group-label { font-size: var(--fs-micro); color: var(--text-tertiary); text-transform: uppercase; letter-spacing: 0.06em; padding: 6px 6px 2px; } .debug-popover .debug button { justify-content: flex-start; width: 100%; text-align: left; padding: 6px 8px; } /* --- stream + messages (light theme rebase, keep max-width tokens) -------- */ .stream { padding: var(--space-6) var(--space-6) var(--space-4); } .msg { line-height: 1.55; } .msg.user { background: var(--user-bubble); border-radius: var(--radius-lg); padding: var(--space-3) var(--space-4); color: var(--text); max-width: 720px; margin-left: auto; border: none; } .msg.assistant { background: transparent; padding: var(--space-2) 0; color: var(--text); border: none; } .msg.reasoning { color: var(--text-secondary); font-style: italic; font-size: var(--fs-sm); padding: var(--space-2) var(--space-3); border-left: 2px solid var(--divider); } .system { color: var(--text-tertiary); font-size: var(--fs-xs); font-family: var(--mono); opacity: 0.75; } /* --- empty welcome card + prompt chips ------------------------------------ */ .empty-welcome { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: var(--space-12) var(--space-6); max-width: 760px; margin: auto; min-height: 60vh; } /* Rec 29 revision (2026-07-17): tight-viewport variant so the whole empty-state fits inside a ≤700px stream area without scrolling. The 4-card launcher block itself is ~180px; the badge+title+sub column above it eats ~330px with default padding, which pushes the bottom of the fourth card off a 600px viewport. Trim vertical padding + inter- block margins here (only at ≤700px viewport height) rather than on the base rule so the standard 900+px window keeps its generous whitespace. Numbers: 48→24 top/bottom padding (-48), 60vh floor drops out of the way (content is 400+), sub margin 24→12 (-12), badge margin 16→8 (-8). Net -68px, enough to bring the 4-card bottom edge inside a 600px viewport. */ @media (max-height: 700px) { .empty-welcome { padding-top: var(--space-6); padding-bottom: var(--space-6); min-height: 0; } .empty-welcome-badge { margin-bottom: var(--space-2); } .empty-welcome-sub { margin-bottom: var(--space-3); } } .empty-welcome-badge { display: inline-flex; align-items: center; justify-content: center; width: 56px; height: 56px; border-radius: var(--radius-lg); background: var(--accent-soft); color: var(--accent); margin-bottom: var(--space-4); } /* Brand variant of the welcome badge: the logo IS the badge, so we drop the * tinted plate and let the raster's own rounded frame speak. Same footprint * as the SVG variant so the layout is unchanged. */ .empty-welcome-badge--brand { background: transparent; padding: 0; border-radius: var(--radius-lg); overflow: hidden; } .empty-welcome-badge--brand img { display: block; width: 56px; height: 56px; } .empty-welcome-title { font-size: var(--fs-hero); font-weight: 700; letter-spacing: -0.02em; color: var(--text); margin: 0 0 var(--space-2); } .empty-welcome-sub { font-size: var(--fs-body); color: var(--text-secondary); margin: 0 0 var(--space-6); max-width: 540px; line-height: 1.5; } .empty-welcome-prompts { display: grid; /* Two columns at any reasonable width. The four cards teach the four surfaces (chat / fork / vibe / mission), so a 2x2 grid reads as a matrix of first moves rather than a random ribbon. */ grid-template-columns: repeat(2, minmax(240px, 1fr)); gap: var(--space-3); width: 100%; max-width: 720px; } @media (max-width: 640px) { .empty-welcome-prompts { grid-template-columns: 1fr; } } .prompt-chip { display: flex; flex-direction: column; gap: 6px; padding: var(--space-3) var(--space-4); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); cursor: pointer; text-align: left; transition: background 120ms ease, border-color 120ms ease, box-shadow 120ms ease, transform 120ms ease; } /* Icon-and-body variant used by the differentiator cards on the welcome screen. Reads as a two-column card: a tinted glyph on the left, title + one-line description on the right. Base `.prompt-chip` (title-only) is kept so older call sites still render sanely. */ .prompt-chip.prompt-chip--action { flex-direction: row; align-items: flex-start; gap: var(--space-3); padding: var(--space-4); min-height: 88px; } .prompt-chip:hover { border-color: var(--border-strong); box-shadow: var(--shadow-2); transform: translateY(-1px); } .prompt-chip:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; } /* §7 "one accent per view": the empty-state chip icons were four hues (blue/purple/teal/orange) painted on solid tint backgrounds. Collapsed to the single view accent — --accent glyph on --accent-soft tile — to match the launcher-icon grammar at line 7259 (rec 29 revision, drift #218). The .tint-* class variants stay defined below so surfaces that legitimately need per-kind hues (session badges, kind-palette waiver) can opt back in explicitly; nothing in the current empty-state HTML sets a tint-* class on .prompt-chip-icon anymore. */ .prompt-chip-icon { width: 36px; height: 36px; border-radius: var(--radius-sm); display: inline-flex; align-items: center; justify-content: center; color: var(--accent); background: var(--accent-soft); flex: 0 0 auto; } .prompt-chip-icon.tint-blue { background: var(--tint-blue); color: white; } .prompt-chip-icon.tint-purple { background: var(--tint-purple); color: white; } .prompt-chip-icon.tint-teal { background: var(--tint-teal); color: white; } .prompt-chip-icon.tint-orange { background: var(--tint-orange); color: white; } .prompt-chip-icon.tint-pink { background: var(--tint-pink); color: white; } .prompt-chip-icon.tint-slate { background: var(--tint-slate); color: white; } .prompt-chip-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; } .prompt-chip-title { font-size: var(--fs-body); font-weight: 600; color: var(--text); } .prompt-chip-hint { font-size: var(--fs-xs); color: var(--text-secondary); line-height: 1.45; } /* --- composer (rounded shell with focus ring) ----------------------------- */ .composer { padding: var(--space-3) var(--space-6); border-top: 1px solid var(--divider); background: var(--bg); } .composer textarea { border: 1px solid var(--border); background: var(--surface-2); color: var(--text); border-radius: var(--radius-lg); padding: var(--space-3) var(--space-4); font: inherit; font-size: var(--fs-body); line-height: 1.5; resize: vertical; width: 100%; outline: none; transition: border-color 120ms ease, box-shadow 120ms ease; } .composer textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); } .composer textarea::placeholder { color: var(--text-tertiary); } .composer-actions { display: flex; align-items: center; justify-content: flex-end; gap: var(--space-2); padding-top: var(--space-2); } /* --- buttons (unified primary + ghost, reference design weight) ---------------------- */ button.primary, button.ghost, button.small { font-family: var(--font); font-size: var(--fs-sm); padding: 6px 12px; border-radius: var(--radius-sm); border: 1px solid transparent; cursor: pointer; transition: background 120ms ease, border-color 120ms ease, color 120ms ease, box-shadow 120ms ease; font-weight: 500; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; } button.primary { background: var(--accent); color: white; border-color: var(--accent); } button.primary:hover:not(:disabled) { background: var(--accent-strong); border-color: var(--accent-strong); } button.primary:disabled { background: var(--surface-hover); color: var(--text-tertiary); border-color: transparent; cursor: not-allowed; } button.ghost { background: transparent; color: var(--text); border-color: var(--border); } button.ghost:hover:not(:disabled) { background: var(--surface-hover); } button.ghost:disabled { color: var(--text-tertiary); opacity: 0.6; cursor: not-allowed; } button.small { padding: 4px 8px; font-size: var(--fs-xs); } /* Status bar reads slightly quieter on a light backdrop. */ .statusbar { padding: 6px var(--space-6); background: var(--surface-2); border-top: 1px solid var(--divider); color: var(--text-secondary); font-size: var(--fs-xs); } .statusbar .dot { background: var(--text-tertiary); } .statusbar .dot.running, .statusbar .dot.starting { background: var(--warn); } .statusbar .dot.crashed { background: var(--err); } .statusbar .dot.idle, .statusbar .dot.ready { background: var(--ok); } /* Context meter uses semantic tokens for its level classes. */ .ctx-meter-bar { background: var(--surface-hover); } .ctx-meter.level-nominal .ctx-meter-fill { background: var(--ok); } .ctx-meter.level-warn .ctx-meter-fill, .ctx-meter.level-high .ctx-meter-fill { background: var(--warn); } .ctx-meter.level-critical .ctx-meter-fill { background: var(--err); } /* --- cards / tool blocks: unify on the surface token, gentle shadow ------- */ .tool-block, .card, .card-terminal, .card-diff, .card-code-dispatch, .card-web-search, .card-skill, .card-workflow, .artifact-card, .visibility-card, .todo-card, .recall-card, .compact-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-1); } /* History is sidebar chrome, not a chat card: it must stay a flat, full-width * list section (reference-style), never a floating boxed card that shrinks with * every inherited inset. Kept OUT of the max-width/margin:auto bucket below — * that grouping is chat-stream cards only. */ .panels-c-history { background: transparent; border: 0; border-radius: 0; box-shadow: none; margin: 0; width: 100%; max-width: none; } /* Centered-card ban (density-spec §7, user re-flagged 2026-07-17): every * in-stream card renders as a full-width, left-aligned row that expands * INLINE. No `margin: * auto` and no `max-width` narrowing here — the row * width is the stream width. Per-card padding stays; centered layouts are * reserved for empty-state page chrome (.empty-welcome / .empty-launcher / * .context-page-empty-*) and the .msg.user right-aligned bubble. */ .card, .tool-block, .artifact-card, .card-terminal, .card-diff, .card-code-dispatch, .card-web-search, .card-skill, .card-workflow, .visibility-card, .todo-card, .recall-card, .compact-card { margin: var(--space-3) 0; max-width: none; } /* Approval / question cards get a subtle accent bar so the user knows to act. */ .card.card-approval, .card.card-question { border-left: 3px solid var(--accent); } /* "demo" corner badge for anything injected by the Debug flyout. Mock helpers all use `mock-…` for callId / interruptId, so an attribute selector is enough — no JS change needed to tag them. The badge only appears when the DOM node carries such an id. */ .tool-block[data-call-id^="mock-"], .card[data-interrupt-id^="mock-"], .recall-card[data-call-id^="mock-"], .artifact-card[data-call-id^="mock-"], .card[data-mock="true"] { position: relative; } .tool-block[data-call-id^="mock-"]::before, .card[data-interrupt-id^="mock-"]::before, .recall-card[data-call-id^="mock-"]::before, .artifact-card[data-call-id^="mock-"]::before, .card[data-mock="true"]::before { content: "demo"; position: absolute; top: 8px; right: 10px; padding: 2px 8px; border-radius: 999px; font-size: 10px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-secondary); background: var(--surface-2); border: 1px solid var(--border); pointer-events: none; z-index: 2; } .card .card-icon { width: 32px; height: 32px; border-radius: var(--radius-sm); background: var(--accent-soft); color: var(--accent); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; } /* --- plugins / market / mission page shells re-inherit page-title/page-sub */ .plugins-body, .mission-body { padding: var(--space-4) var(--space-6); overflow-y: auto; gap: var(--space-4); display: flex; flex-direction: column; flex: 1; } /* --- market card polish (reference design row list) ---------------------------------- */ .market-row { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); transition: box-shadow 120ms ease, border-color 120ms ease, transform 120ms ease; } .market-row:hover { border-color: var(--border-strong); box-shadow: var(--shadow-2); transform: translateY(-1px); } /* --- devtools drawer: light theme rebase (frames + hover) ----------------- */ .devtools-drawer { background: var(--surface); border-left: 1px solid var(--border); box-shadow: var(--shadow-pop); } /* --- focus ring for keyboard users --------------------------------------- */ button:focus-visible, select:focus-visible, input:focus-visible, textarea:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--accent-soft); border-color: var(--accent); } /* ========================================================================== * Composer shell (reference-style) * Single rounded frame that groups the textarea + meta chips + send button. * Chips read the environment (cwd/permission mode/model) so the user always * knows the exact state before pressing Enter. `session/set_config` promotes * the model dropdown from cosmetic to functional; older daemons receive a * MethodNotFound and the field greys. * ========================================================================== */ .composer.composer-shell { padding: var(--space-3) var(--space-6) var(--space-4); border-top: 1px solid var(--divider); background: var(--bg); /* The composer sits inside a `