/* One compact task panel; surfaces share the Agent workbench tokens. */
.work-button { min-height: 36px; padding: 6px 10px; font-size: 11px; color: var(--muted); }
.work-button img { width: 16px; height: 16px; }
.work-button[aria-expanded='true'] { background: var(--surface); color: var(--text); }
.work-panel button:not(:where(.agent-detail-scroll *, #work-editor *, .side-chat-scroll *, #side-ask-send)) { min-height: 30px; padding: 5px 9px; font-size: 11px; background: var(--surface); border-radius: 5px; }
.work-panel button:not(:where(.agent-detail-scroll *, #work-editor *, #side-ask-send)):hover:not(:disabled) { background: var(--hover); }
.work-panel button:not(:where(.agent-detail-scroll *, #work-editor *, #side-ask-send)):disabled, .work-button:disabled { opacity: .45; cursor: not-allowed; }
.work-panel button:not(:where(.agent-detail-scroll *, #work-editor *, #side-ask-send)) img, .work-panel button:not(:where(.agent-detail-scroll *, #work-editor *, #side-ask-send)) svg { width: 16px; height: 16px; }
.project-workspace.with-workspace { grid-template-columns: minmax(280px,1fr) 7px var(--work-panel-width,50%); }
.with-workspace > .project-topbar { grid-column: 1; grid-row: 1; padding: 0 16px; gap: 8px; }
.with-workspace .project-topbar-actions { gap: 3px; }
.with-workspace .work-button { padding: 6px; }
.with-workspace .work-button span { display: none; }
/* Collapsed to an icon: state and hover show on the icon, not a filled box. */
.with-workspace .work-button, .with-workspace .work-button[aria-expanded='true'], .with-workspace .work-button:hover:not(:disabled) { background: transparent; }
.with-workspace .work-button img { transition: filter 150ms var(--ease), opacity 150ms var(--ease); }
.with-workspace .work-button:is(:hover, :focus-visible, [aria-expanded='true']):not(:disabled) img { filter: brightness(1.55); }
.with-workspace > .message-list { grid-column: 1; grid-row: 2; }
.with-workspace > .message-list, .with-workspace .agent-detail-scroll { padding-inline: 22px; }
.with-workspace > .ultra-room-view { grid-column: 1; grid-row: 2; padding: 20px; }
.with-workspace > .composer-shell { width: calc(100% - var(--work-panel-width,50%) - 35px); left: 14px; right: auto; }
.with-workspace > .jump-latest { left: calc((100% - var(--work-panel-width,50%) - 7px) / 2); }
.work-panel { grid-column: 3; grid-row: 1 / -1; display: grid; grid-template-rows: 48px auto minmax(0,1fr) auto; min-width: 0; min-height: 0; background: var(--bg); overflow: hidden; }
.work-panel[data-surface='agents'], .work-panel[data-surface='summary'], .work-panel[data-surface='computer'], .work-panel[data-surface='app'] { grid-template-rows: 48px minmax(0,1fr); }
.work-panel[data-surface='knowledge'] { grid-template-rows: 48px minmax(0,1fr) auto; }
.work-panel[data-surface='side'] { grid-template-rows: 48px minmax(0,1fr); }
.side-chat-view { position: relative; display: flex; flex-direction: column; min-height: 0; min-width: 0; background: var(--panel); }
.side-chat-view[hidden] { display: none; }
.side-chat-scroll { flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; padding: 22px 16px 128px; }
.side-chat-view > .composer-shell { position: absolute; z-index: 2; left: 12px; right: 12px; bottom: 12px; width: auto; margin: 0; }
.side-chat-view .composer-actions { margin-left: auto; }
.side-exchange .message-row { margin-bottom: 16px; }
.side-exchange .message-row:last-child { margin-bottom: 22px; }
.side-exchange.is-failed .message-row.assistant { color: var(--red); }
.side-exchange.is-pending .message-row.user { animation: message-in 180ms var(--ease); }
.side-exchange.is-pending .message-row.assistant { animation: message-in 180ms var(--ease) 70ms both; }
.side-exchange.is-streaming .message-row.assistant .message-content::after { content: ''; display: inline-block; width: 2px; height: 1em; margin-left: 3px; vertical-align: -2px; background: currentColor; opacity: .55; }
.work-divider { grid-column: 2; grid-row: 1 / -1; position: relative; cursor: col-resize; touch-action: none; outline-offset: -2px; }
.work-divider::after { position: absolute; content: ''; inset: 0 3px; background: var(--line); transition: background-color 120ms; }
.work-divider:hover::after, .work-divider[data-dragging]::after, .work-divider:focus-visible::after { background: var(--accent); }
.work-panel-bar { display: flex; align-items: center; min-width: 0; padding: 4px 6px; gap: 2px; }
.work-tabs { display: flex; flex: 1; min-width: 0; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.work-tabs::-webkit-scrollbar { display: none; }
.work-tab-item { display: flex; align-items: center; flex: 0 0 auto; min-width: 0; max-width: 190px; border-radius: 10px; transition: background-color 120ms; }
.work-tab-item:hover, .work-tab-item:focus-within { background: transparent; }
.work-tab-item:has([aria-selected='true']) { background: var(--surface); }
.work-tabs [role='tab'] { display: flex; align-items: center; flex: 1 1 auto; gap: 7px; width: auto; min-width: 0; min-height: 28px; padding: 0 8px; font-size: 12px; color: var(--muted); background: transparent; white-space: nowrap; }
.work-panel .work-tabs [role='tab']:hover:not(:disabled) { background: transparent; }
.work-tabs [aria-selected='true'] { color: var(--text); }
.work-tab-icon { display: inline-block; width: 16px; height: 16px; flex: 0 0 16px; background: currentColor; mask: var(--tab-icon) center / contain no-repeat; -webkit-mask: var(--tab-icon) center / contain no-repeat; transition: opacity 140ms, scale 140ms, filter 140ms; }
.work-tab-title { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; transition: transform 140ms; }
.work-tabs .work-tab-close { display: grid; flex: 0 0 24px; place-items: center; width: 24px; min-height: 28px; margin-right: 3px; padding: 0; border-radius: 4px; color: var(--muted); background: transparent; opacity: 0; scale: .85; pointer-events: none; transition: opacity 140ms, scale 140ms; }
.work-panel .work-tabs .work-tab-close:is(:hover, :active, :focus) { background: transparent; box-shadow: none; }
.work-tabs .work-tab-close img { width: 12px; height: 12px; }
.work-tab-item:is(:hover,:focus-within) .work-tab-close { opacity: 1; scale: 1; pointer-events: auto; }
.work-add { position: relative; flex: 0 0 auto; }
.work-add > summary, .work-panel #work-close { display: grid; place-items: center; width: 32px; height: 36px; min-height: 36px; padding: 0; color: var(--muted); background: transparent; border-radius: 5px; cursor: pointer; list-style: none; flex-shrink: 0; }
.work-add > summary::-webkit-details-marker { display: none; }
.work-add > summary img { width: 16px; height: 16px; }
.work-add > summary:hover { background: var(--surface); }
.work-add-menu { position: absolute; z-index: 30; right: 0; top: 40px; width: 210px; padding: 5px; background: var(--panel); border-radius: 9px; box-shadow: var(--floating-shadow); border: 1px solid var(--line); }
.work-add-menu button { display: flex; justify-content: flex-start; gap: 9px; align-items: center; width: 100%; text-align: left; background: transparent; min-height: 34px; }
.work-session { display: flex; align-items: center; min-width: 0; gap: 12px; min-height: 38px; padding: 4px 16px; border-bottom: 1px solid var(--line-subtle); font-size: 11px; color: var(--muted); }
#work-agent-state { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-right: auto; }
#work-vm { flex-shrink: 0; color: var(--faint); font-variant-numeric: tabular-nums; letter-spacing: .01em; }
#work-branch { max-width: 30%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--faint); font: 10.5px var(--mono); }
.work-session button { min-height: 26px; padding: 3px 8px; border-radius: 7px; font-size: 11px; background: transparent; color: var(--muted); flex-shrink: 0; }
.work-session button:hover { background: var(--surface); color: var(--text); }
.work-panel input:not(:where(#work-editor *)), .work-panel textarea:not(:where(#work-editor *, #side-ask-input)) { background: var(--surface); color: var(--text); border: 1px solid var(--line-subtle); border-radius: 5px; min-width: 0; font: inherit; font-size: 11px; line-height: 1.5; padding: 7px 9px; }
.work-panel input:not(:where(#work-editor *)) { min-height: 30px; width: 100%; }
.work-panel textarea:not(:where(#work-editor *)) { font-family: inherit; }
.work-panel label:not(:where(#work-editor *)) { display: block; font-size: 11px; margin: 6px 0 3px; color: var(--muted); }
.work-panel #work-save:not(:disabled), .work-panel [type='submit']:not(:disabled):not(#side-ask-send) { background: var(--text); color: var(--panel); }
.work-scroll { overflow: auto; min-height: 0; padding: 12px 16px; }
.work-input-row { display: flex; align-items: center; gap: 5px; }
.work-input-row button { flex-shrink: 0; }
.work-panel pre:not(:where(.agent-detail-scroll *, #work-editor *)) { white-space: pre-wrap; overflow-wrap: anywhere; font: 11px/1.65 var(--mono); color: var(--muted); }
.work-empty { color: var(--faint); font-size: 12px; line-height: 1.7; padding: 16px 0; }
.work-status { padding: 8px 18px 10px; font-size: 11px; line-height: 1.5; color: var(--faint); min-height: 30px; overflow-wrap: anywhere; }
.work-status:empty { display: none; }
.work-status[data-error='true'] { color: var(--red); }
/* Files: a quiet explorer beside a full-height editor. */
.work-files-view { display: grid; grid-template-columns: minmax(150px,26%) minmax(0,1fr); min-height: 0; }
.work-explorer { display: flex; flex-direction: column; gap: 2px; min-width: 0; padding: 14px 10px 16px; overflow: auto; border-right: 1px solid var(--line-subtle); }
.work-explorer-search { display: grid; gap: 2px; margin-bottom: 10px; }
.work-panel .work-explorer-search input { min-height: 32px; padding: 6px 10px; border: 0; border-radius: 8px; background: transparent; color: var(--text); font-size: 12px; transition: background .15s ease; }
.work-panel .work-explorer-search input::placeholder { color: var(--faint); }
.work-panel .work-explorer-search input:is(:hover, :focus) { background: var(--surface); outline: none; }
.work-explorer-head { display: flex; align-items: center; justify-content: space-between; min-height: 28px; padding: 0 4px 0 10px; color: var(--faint); font-size: 11px; letter-spacing: .02em; }
.work-panel #work-new-file-open { display: grid; place-items: center; width: 24px; height: 24px; min-height: 24px; padding: 0; border-radius: 6px; background: transparent; opacity: .55; transition: opacity .15s ease, background .15s ease; }
.work-panel #work-new-file-open:is(:hover, :focus-visible, [aria-expanded='true']) { opacity: 1; background: var(--surface); }
.work-panel #work-new-file-open img { width: 13px; height: 13px; }
.work-new-file { display: flex; gap: 6px; margin: 2px 0 8px; padding: 0 2px; }
.work-new-file[hidden] { display: none; }
.work-panel .work-new-file input { min-height: 30px; padding: 5px 9px; border: 0; border-radius: 7px; background: var(--surface); font: 11.5px var(--mono); }
.work-panel .work-new-file button { flex: 0 0 auto; min-height: 30px; padding: 4px 10px; border-radius: 7px; font-size: 11.5px; }
#work-files { display: grid; gap: 1px; }
#work-files details > summary { cursor: pointer; padding: 7px 10px; border-radius: 7px; font-size: 12px; color: var(--faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; list-style: none; }
#work-files details > summary::-webkit-details-marker { display: none; }
#work-files details > summary:hover { color: var(--muted); }
#work-files details > div, #work-files details > :not(summary) { margin-left: 8px; }
#work-files button { display: flex; justify-content: flex-start; align-items: center; gap: 8px; width: 100%; min-height: 30px; padding: 5px 10px; border-radius: 7px; text-align: left; background: transparent; color: var(--muted); font-size: 12px; transition: background .12s ease, color .12s ease; }
#work-files button:hover { background: color-mix(in srgb, var(--surface) 60%, transparent); color: var(--text); }
#work-files button > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#work-files button[aria-current='true'] { background: var(--surface); color: var(--text); }
#work-files .work-empty { padding: 10px; font-size: 12px; }
.work-file-icon, .work-note-icon { display: block; width: 14px; height: 14px; flex: 0 0 14px; background: currentColor; mask: url('assets/panel/files.svg') center / contain no-repeat; -webkit-mask: url('assets/panel/files.svg') center / contain no-repeat; color: var(--faint); }
.work-editor-pane { display: grid; grid-template-rows: auto auto minmax(0,1fr) auto; min-height: 0; min-width: 0; }
#work-editor-tabs { display: flex; gap: 2px; overflow: auto; min-width: 0; padding: 10px 12px 0; }
#work-editor-tabs[hidden] { display: none; }
.editor-tab { display: flex; align-items: center; min-width: 0; max-width: 180px; }
#work-editor-tabs button { display: flex; align-items: center; min-width: 0; min-height: 28px; padding: 3px 8px; border-radius: 7px; font-size: 11.5px; background: transparent; color: var(--faint); }
#work-editor-tabs [aria-selected='true'] { color: var(--text); background: var(--surface); }
#work-editor-tabs .editor-tab-close { flex: 0 0 22px; justify-content: center; padding-inline: 0; color: var(--faint); }
#work-editor-tabs button span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.editor-tab.dirty [data-editor-tab] span::before { content: ""; display: inline-block; width: 5px; height: 5px; margin-right: 5px; border-radius: 50%; background: var(--amber); vertical-align: 1px; }
.work-editor-pane > header, .work-editor-pane > footer { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 6px 10px; color: var(--muted); font-size: 10px; }
.work-editor-pane > header { min-height: 40px; padding: 10px 18px 6px; font: 11px var(--mono); color: var(--faint); }
.work-files-view:not(.has-file) .work-editor-pane > :is(header, footer) { display: none; }
.work-editor-pane > #work-editor-tabs { grid-row: 1; }
.work-editor-pane > header { grid-row: 2; }
.work-editor-pane > .work-editor-surface { grid-row: 3; }
.work-editor-pane > footer { grid-row: 4; }
#work-path { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#work-dirty { color: var(--amber); margin-left: auto; }
.work-editor-surface { position: relative; min-width: 0; min-height: 0; overflow: hidden; background: var(--bg); }
#work-references { position: absolute; z-index: 6; top: 8px; right: 8px; left: 8px; max-height: 46%; overflow: auto; background: var(--surface); border: 1px solid var(--line-subtle); border-radius: 6px; }
#work-references[hidden] { display: none; }
.work-ref-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 8px; color: var(--faint); font-size: 10px; border-bottom: 1px solid var(--line-subtle); }
#work-references button { display: flex; align-items: baseline; gap: 8px; width: 100%; min-height: 28px; padding: 5px 8px; justify-content: flex-start; background: transparent; font: 11px/1.4 var(--mono); text-align: left; }
#work-references button span { flex: 0 0 auto; color: var(--text); }
#work-references button small { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--faint); font-size: 11px; }
#work-references .work-ref-bar button { width: auto; min-height: 22px; padding: 2px 6px; font-family: inherit; font-size: 10px; color: var(--muted); }
#work-editor { position: absolute; inset: 0; overflow: hidden; }
#work-editor-empty { position: absolute; inset: 0; display: grid; place-items: center; padding: 24px; color: var(--faint); font-size: 13px; background: var(--bg); text-align: center; }
#work-editor-empty[hidden] { display: none; }
#work-language { color: var(--faint); }
#work-editor .monaco-editor textarea { min-height: 0; border: 0; border-radius: 0; padding: 0; }
#work-editor .monaco-editor button { min-height: 0; border-radius: 0; scale: 1; }
#work-editor .monaco-editor input { min-height: 0; border-radius: 0; }
#work-editor .monaco-editor :is(input, textarea):focus { outline: none; box-shadow: none; }

.work-editor-pane > footer { padding: 8px 14px 10px 18px; flex-wrap: nowrap; gap: 2px; font-size: 11px; color: var(--faint); }
.work-editor-pane > footer > span { flex-shrink: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.work-editor-pane > footer button { flex-shrink: 0; }
.work-editor-pane > footer button { min-height: 28px; padding: 4px 10px; border-radius: 7px; background: transparent; color: var(--muted); font-size: 11.5px; }
.work-editor-pane > footer button:not(:disabled):hover { background: var(--surface); color: var(--text); }
.work-editor-pane > footer button:disabled { opacity: .4; }
.work-files-view[data-readonly='true'] .work-editor-pane > footer :is(button, form) { display: none; }
#work-rename { display: flex; align-items: center; gap: 4px; flex: 1 1 160px; min-width: 0; }
#work-rename[hidden] { display: none; }
#work-rename input { width: auto; flex: 1; min-width: 0; min-height: 26px; font-size: 10px; }
#work-delete[data-armed="true"] { color: var(--red); }
#work-position { margin-right: auto; font-variant-numeric: tabular-nums; }
#work-view-changes { padding: 0; }
#work-diff { white-space: pre; overflow-wrap: normal; padding: 8px 0 20px; min-width: 100%; width: max-content; }
.diff-line { display: block; min-height: 18px; padding: 0 14px; }
.diff-file { padding-block: 8px; color: var(--text); font-weight: 500; border-bottom: 1px solid var(--line-subtle); margin-bottom: 4px; }
.diff-hunk { color: var(--accent); background: color-mix(in srgb,var(--accent) 6%,transparent); }
.diff-add { color: var(--green); background: color-mix(in srgb,var(--green) 7%,transparent); }
.diff-remove { color: var(--red); background: color-mix(in srgb,var(--red) 7%,transparent); }
/* Commands retain their output without a card around every process. */
.work-terminal-view { display: grid; grid-template-rows: auto minmax(0,1fr) auto auto; min-height: 0; padding-bottom: 8px; gap: 6px; }
.work-terminal-search { display: flex; align-items: center; gap: 8px; margin: 8px 10px 0; }
.work-terminal-search input { width: 100%; min-height: 28px; padding: 4px 8px; border-radius: 8px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-subtle); font-size: 12px; }
.work-terminal-count { flex: none; color: var(--faint); font-size: 11px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.work-process[hidden] { display: none; }
#work-processes { padding: 0 12px; }
.work-terminal-view > form, #work-publish { margin: 0 10px; }
.work-panel #work-publish { color: var(--muted); background: transparent; font-size: 10px; }
.work-process { padding-block: 10px; border-bottom: 1px solid var(--line-subtle); }
.work-process header { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 10px; color: var(--faint); }
.work-process code { flex: 1; overflow-wrap: anywhere; color: var(--text); font-size: 11px; }
.work-process pre { max-height: 320px; overflow: auto; padding: 8px 0; }
.term-bold { font-weight: 600; }
.term-dim { opacity: 0.72; }
.term-underline { text-decoration: underline; text-underline-offset: 2px; }
.term-fg-0 { color: var(--faint); }
.term-fg-1 { color: var(--red); }
.term-fg-2 { color: var(--green); }
.term-fg-3 { color: color-mix(in srgb, var(--accent) 45%, var(--text)); }
.term-fg-4, .term-fg-6 { color: color-mix(in srgb, var(--accent) 75%, var(--text)); }
.term-fg-5 { color: color-mix(in srgb, var(--red) 35%, var(--accent)); }
.term-fg-7 { color: var(--text); }
.work-process-input { padding-top: 4px; }
.work-browser-view { display: grid; grid-template-rows: auto minmax(0,1fr) auto auto; gap: 7px; padding: 8px; min-height: 0; }
.work-app-view { position: relative; display: grid; grid-template-rows: auto minmax(0,1fr); min-width: 0; min-height: 0; background: #fff; }
.work-app-toolbar { display: flex; align-items: center; gap: 6px; min-width: 0; min-height: 38px; padding: 4px 7px; color: var(--muted); background: var(--bg); box-shadow: inset 0 -1px var(--line-subtle); }
.work-app-toolbar span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 10px var(--mono); }
.work-app-environment { display: inline-flex; flex: none; padding: 2px; border-radius: 6px; background: var(--surface); }
.work-panel .work-app-environment button { min-height: 24px; padding: 2px 7px; background: transparent; font-size: 10px; }
.work-panel .work-app-environment button[aria-pressed="true"] { color: var(--text); background: var(--raised); }
.work-panel #work-app-publish { color: var(--bg); background: var(--accent); font-weight: 600; }
.work-panel #work-app-publish:hover:not(:disabled) { background: var(--text); }
.work-panel .work-app-toolbar a { display: inline-flex; align-items: center; min-height: 30px; padding: 5px 9px; color: var(--text); font-size: 11px; text-decoration: none; background: var(--surface); border-radius: 5px; }
.work-app-empty { display: grid; place-items: center; align-content: center; gap: 9px; min-height: 0; padding: 24px; color: var(--muted); text-align: center; background: var(--bg); }
.work-app-empty img { width: 28px; height: 28px; opacity: .58; }
.work-app-empty h2 { color: var(--text); font-size: 13px; letter-spacing: 0; text-wrap: balance; }
.work-app-empty p { max-width: 320px; font-size: 11px; line-height: 1.6; text-wrap: pretty; }
.work-app-view iframe { width: 100%; height: 100%; min-width: 0; min-height: 0; border: 0; background: #fff; outline: 1px solid rgba(255,255,255,.1); outline-offset: -1px; }
.work-browser-canvas { overflow: auto; background: var(--surface); border-radius: 4px; }
#work-browser-image { display: block; width: 100%; height: auto; cursor: crosshair; outline: 1px solid #ffffff1a; }
#work-browser-input-form { flex-wrap: wrap; }
#work-browser-input { flex: 1 1 100%; }
#work-browser-errors { color: var(--red); max-height: 80px; overflow: auto; }
#work-browser-errors:empty { display: none; }
/* Knowledge starts with saved notes; the editor opens only when needed. */
.work-page-heading { margin-bottom: 12px; }
.work-page-heading h2, .work-summary h2 { font-size: 13px; font-weight: 500; text-wrap: balance; }
.work-page-heading p { font-size: 11px; color: var(--faint); margin-top: 5px; }
.work-new-note { border-bottom: 1px solid var(--line-subtle); margin-bottom: 5px; }
.work-new-note > summary { display: flex; align-items: center; gap: 7px; min-height: 34px; font-size: 11px; cursor: pointer; color: var(--muted); list-style: none; }
.work-new-note > summary::-webkit-details-marker { display: none; }
.work-new-note > summary img { width: 14px; height: 14px; }
.work-new-note[open] > summary img { rotate: 45deg; }
.work-knowledge form { display: grid; gap: 3px; padding-bottom: 12px; }
.work-knowledge form button { justify-self: start; margin-top: 5px; }
.work-note-folder { margin-top: 12px; }
.work-note-folder h3 { margin: 0; padding: 10px 2px 0; font-size: 11px; font-weight: 500; color: var(--faint); }
.work-note { border-bottom: 1px solid var(--line-subtle); }
.work-note > summary { display: flex; align-items: center; gap: 9px; padding: 11px 2px; cursor: pointer; list-style: none; }
.work-note > summary::-webkit-details-marker { display: none; }
.work-note > summary::after { content: ''; width: 5px; height: 5px; border-right: 1px solid var(--faint); border-bottom: 1px solid var(--faint); rotate: -45deg; margin-left: auto; flex-shrink: 0; }
.work-note[open] > summary::after { rotate: 45deg; }
.work-note > summary > span:nth-child(2) { display: grid; gap: 3px; min-width: 0; }
.work-note strong { font-size: 12px; font-weight: 500; overflow-wrap: anywhere; }
.work-note small { font-size: 11px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.work-note[open] small { display: none; }
.work-note-icon { mask-image: url('assets/panel/knowledge.svg'); -webkit-mask-image: url('assets/panel/knowledge.svg'); }
.work-note-body { padding: 0 0 12px 25px; }
.work-note-body .work-note-when, .work-note-body .work-note-used { margin: 0 0 6px; font-size: 11px; line-height: 1.4; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.work-note-body .work-note-used { color: var(--muted); }
.work-note-body p { font-size: 12px; line-height: 1.75; color: var(--muted); white-space: pre-wrap; overflow-wrap: anywhere; margin-bottom: 8px; }
.work-panel .work-note-body button { min-height: 26px; font-size: 10px; color: var(--faint); background: transparent; padding-inline: 0; }
.work-env { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--line-subtle); }
.work-env-row { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr) auto auto; align-items: center; gap: 6px; padding: 4px 0; }
.work-env-name { font-family: var(--mono); }
.work-panel input.work-env-value[type="password"] { letter-spacing: .08em; }
.work-knowledge .work-env-secret { margin: 0; display: inline-flex; align-items: center; gap: 6px; font-size: 11px; color: var(--muted); cursor: pointer; white-space: nowrap; }
.work-panel .work-env-secret input[type="checkbox"] { appearance: none; position: relative; flex: 0 0 36px; width: 36px; height: 20px; min-height: 0; padding: 0; margin: 0; border: 0; border-radius: 999px; background: var(--raised); cursor: pointer; }
.work-env-secret input[type="checkbox"]::after { content: ''; position: absolute; top: 50%; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: var(--muted); translate: 0 -50%; transition: translate .15s ease; }
.work-env-secret:hover input[type="checkbox"]:not(:checked)::after { background: var(--text); }
.work-panel .work-env-secret input[type="checkbox"]:checked { background: var(--accent); }
.work-env-secret input[type="checkbox"]:checked::after { background: var(--bg); translate: 16px -50%; }
.work-env-secret input[type="checkbox"]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.work-panel .work-env-row [data-env-remove] { background: transparent; padding-inline: 6px; color: var(--muted); }
.work-panel .work-env-row [data-env-remove] img { rotate: 45deg; opacity: .7; }
.work-panel .work-env-row [data-env-remove]:hover:not(:disabled) { background: transparent; }
.work-panel .work-env-row [data-env-remove]:hover img { opacity: 1; }
.work-panel .work-env-add { display: inline-flex; align-items: center; gap: 6px; justify-self: start; background: transparent; color: var(--muted); padding-inline: 0; margin: 4px 0 10px; }
.work-env textarea { font-family: var(--mono); }
.work-env-hint { font-size: 11px; color: var(--faint); margin: 2px 0 0; }
@media (max-width: 440px) { .work-env-row { grid-template-columns: minmax(0, 1fr) auto auto; } .work-env-value { grid-column: 1 / -1; grid-row: 2; } }
.work-tests { padding: 14px 16px; }
.work-tests .work-page-heading { margin-bottom: 14px; }
.work-insight { margin-bottom: 10px; padding: 11px 12px; border: 1px solid var(--line-subtle); border-radius: 10px; background: color-mix(in srgb, var(--surface) 75%, transparent); }
.work-insight-heading { display: flex; align-items: center; gap: 10px; }
.work-insight-heading strong { font-size: 11px; font-weight: 500; color: var(--muted); }
.work-insight-outcome { margin-left: auto; padding: 3px 7px; border-radius: 999px; color: var(--muted); background: var(--surface); font-size: 10px; }
.work-insight-outcome[data-status='passed'] { color: var(--green); }
.work-insight-outcome[data-status='failed'] { color: var(--red); }
.work-insight-counts { margin-top: 5px; color: var(--faint); font-size: 10px; font-variant-numeric: tabular-nums; }
.work-insight-notes { margin-top: 8px; border-top: 1px solid var(--line-subtle); color: var(--faint); }
.work-insight-notes summary, .work-test-output-wrap > summary { padding-top: 7px; cursor: pointer; list-style: none; font-size: 10px; }
.work-insight-notes summary::-webkit-details-marker, .work-test-summary::-webkit-details-marker, .work-test-output-wrap > summary::-webkit-details-marker { display: none; }
.work-insight-notes p { margin: 6px 0; font-size: 11px; line-height: 1.5; }
.work-insight-notes button { min-height: 24px; padding: 0 4px; color: var(--muted); background: transparent; font-size: 10px; }
.work-test { border-bottom: 1px solid var(--line-subtle); }
.work-test[open] { padding-bottom: 10px; }
.work-test-summary { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 9px 2px; cursor: pointer; list-style: none; }
.work-test-summary::after { content: ""; width: 6px; height: 6px; margin: 0 3px 3px 1px; border-right: 1px solid var(--faint); border-bottom: 1px solid var(--faint); rotate: 45deg; transition: rotate 140ms var(--ease); }
.work-test[open] > .work-test-summary::after { margin-bottom: 0; rotate: 225deg; }
.work-test-summary:focus-visible, .work-insight-notes summary:focus-visible, .work-test-output-wrap summary:focus-visible { outline: 1px solid var(--line); outline-offset: 2px; }
.work-test strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; font-weight: 500; }
.work-test-mark { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); flex-shrink: 0; }
.work-test[data-status='passed'] .work-test-mark, .work-test[data-status='recorded'] .work-test-mark { background: var(--green); }
.work-test[data-status='failed'] .work-test-mark { background: var(--red); }
.work-test[data-status='skipped'] .work-test-mark, .work-test[data-status='time limit'] .work-test-mark, .work-test[data-status='stopped'] .work-test-mark { background: var(--faint); }
.work-test-status { margin-left: auto; font-size: 10px; color: var(--faint); font-variant-numeric: tabular-nums; white-space: nowrap; }
.work-test[data-status='passed'] .work-test-status, .work-test[data-status='recorded'] .work-test-status { color: var(--green); }
.work-test[data-status='failed'] .work-test-status, .work-test[data-status='stale'] .work-test-status { color: var(--red); }
.work-test-meta, .work-test-detail { margin: 0 0 7px 15px; font-size: 10px; color: var(--faint); overflow-wrap: anywhere; }
.work-test-meta { line-height: 1.4; }
.work-test-detail { color: var(--muted); font-size: 11px; line-height: 1.6; }
.work-test-output-wrap { margin: 0 0 7px 15px; }
.work-test-output-wrap > summary { padding-top: 0; }
.work-test-output { max-height: 180px; overflow: auto; margin-top: 5px; padding: 8px; font-size: 10px; line-height: 1.5; white-space: pre-wrap; background: var(--field); border-radius: 6px; }
.work-test-play { margin: 0 0 5px 15px; min-height: 28px; padding: 0 10px; font-size: 11px; border-radius: 6px; background: var(--field); color: var(--text); }
.work-test-play:disabled { opacity: .7; }
.work-test-recording { display: block; width: calc(100% - 15px); margin: 8px 0 0 15px; border-radius: 8px; background: #141414; }
.work-summary { padding: 18px; }
.work-summary h2 { color: var(--muted); margin-bottom: 20px; }
/* The actual Linux screen is the primary content, with quiet control rails. */
.work-computer-view { min-height: 0; display: grid; grid-template-rows: auto minmax(0,1fr) auto auto; background: var(--bg); }
.computer-toolbar { display: flex; align-items: center; gap: 6px; padding: 3px 10px; min-height: 34px; border-bottom: 1px solid var(--line-subtle); }
.computer-environment { flex: 1; color: var(--muted); font-size: 10px; }
.work-panel .computer-toolbar button { min-height: 28px; padding: 3px 7px; font-size: 10px; }
.computer-screen { overflow: auto; min-height: 0; display: flex; align-items: center; background: #101010; outline-offset: -3px; }
.computer-screen img { display: block; flex: 0 0 auto; width: 100%; height: auto; touch-action: none; user-select: none; outline: 1px solid #ffffff1a; }
#computer-empty { color: var(--faint); font-size: 12px; line-height: 1.7; padding: 24px; text-align: center; width: 100%; }
.computer-text-form { display: flex; gap: 4px; padding: 6px 10px 0; }
.computer-text-form input { flex: 1; width: 0; }
.work-panel .computer-text-form button, .work-panel .computer-text-form input { min-height: 30px; padding: 5px 7px; font-size: 10px; }
.computer-status { font-size: 10px; color: var(--faint); min-height: 26px; padding: 6px 10px; overflow-wrap: anywhere; }
@media (max-width: 1000px) {
  .project-workspace.with-workspace { grid-template-columns: 1fr; }
  .work-divider { display: none; }
  .work-panel { position: absolute; inset: 48px 0 0; z-index: 25; grid-column: 1; grid-row: 1 / -1; width: auto; }
  .with-workspace > .composer-shell { left: 24px; right: 24px; width: min(calc(100% - 48px),736px); }
  .with-workspace > .jump-latest { left: 50%; }
}
@media (max-width: 760px) {
  .work-panel-bar { padding-inline: 4px; }
  .work-app-toolbar { justify-content: flex-end; }
  .work-app-toolbar > span { display: none; }
  .work-input-row { flex-wrap: wrap; }
  .work-input-row input { flex-basis: 100%; }
  .computer-text-form { flex-wrap: wrap; }
  .computer-text-form input { flex-basis: 100%; }
  .with-workspace > .composer-shell { left: 12px; right: 12px; width: calc(100% - 24px); }
}
@media (pointer: coarse) {
  .work-panel button:not(:where(.agent-detail-scroll *, #work-editor *, .side-chat-scroll *, #side-ask-send)), .work-add > summary, .work-panel #work-close, .work-tabs [role='tab'], .work-tabs .work-tab-close { min-height: 40px; }
  .work-tabs .work-tab-close { flex-basis: 32px; width: 32px; min-height: 40px; margin-right: 2px; opacity: 1; scale: 1; pointer-events: auto; }
  .work-tab-title { transform: none !important; mask-image: none !important; }
  #work-files button, .work-new-note > summary { min-height: 40px; }
}
@media (prefers-reduced-motion: reduce) {
  .work-tab-item, .work-tab-title, .work-tab-icon, .work-tabs .work-tab-close { transition: none; }
}
@media (forced-colors: active) {
  .work-tab-item:has([aria-selected='true']), .work-add-menu { border: 1px solid CanvasText; }
  .work-tab-icon, .work-file-icon, .work-note-icon { background: CanvasText; forced-color-adjust: none; }
}

/* Text fields remain quiet for pointer input; Tab navigation retains the shared focus ring. */
html[data-input-modality="pointer"] .work-panel :is(input, textarea):focus { outline: none; }

/* Tab change: the incoming view settles in from the side of the previous tab. */
.work-view-enter { animation: work-view-in 240ms var(--ease) both; }
@keyframes work-view-in { from { opacity: 0; translate: calc(var(--enter-dir, 1) * 14px) 0; filter: blur(2px); } to { opacity: 1; translate: 0 0; filter: blur(0); } }
@media (prefers-reduced-motion: reduce) { .work-view-enter { animation: none; } }

/* Tests: an open, readable column. No boxes; rows separated by hairlines and space. */
.work-tests { padding: 32px max(28px, calc((100% - 640px) / 2)) 56px; }
.work-tests .work-page-heading { margin-bottom: 28px; }
.work-tests .work-page-heading h2 { font-size: 16px; font-weight: 600; color: var(--text); }
.work-tests .work-page-heading p { margin-top: 6px; font-size: 12.5px; color: var(--faint); }
.work-tests .work-insight { margin-bottom: 28px; padding: 0; border: 0; border-radius: 0; background: transparent; }
.work-tests .work-insight-heading strong { font-size: 13px; color: var(--text); }
.work-tests .work-insight-outcome { padding: 3px 9px; font-size: 11px; }
.work-tests .work-insight-counts { margin-top: 6px; font-size: 12px; }
.work-tests .work-insight-notes { margin-top: 12px; border-top: 0; }
.work-tests .work-insight-notes summary { font-size: 12px; }
.work-tests .work-insight-notes p { font-size: 12.5px; line-height: 1.65; }
.work-tests .work-test { border-bottom: 1px solid var(--line-subtle); }
.work-tests .work-test:first-of-type { border-top: 1px solid var(--line-subtle); }
.work-tests .work-test[open] { padding-bottom: 16px; }
.work-tests .work-test-summary { gap: 12px; padding: 16px 4px; }
.work-tests .work-test strong { font-size: 13px; color: var(--text); }
.work-tests .work-test-mark { width: 8px; height: 8px; }
.work-tests .work-test-status { font-size: 12px; }
.work-tests :is(.work-test-meta, .work-test-detail, .work-test-output-wrap, .work-test-play) { margin-left: 24px; }
.work-tests .work-test-meta { font-size: 11.5px; line-height: 1.55; margin-bottom: 8px; }
.work-tests .work-test-detail { font-size: 12.5px; line-height: 1.7; }
.work-tests .work-test-output { max-height: 260px; padding: 12px 14px; font-size: 11.5px; line-height: 1.6; border-radius: 10px; }
.work-tests .work-test-output-wrap > summary { font-size: 12px; }
.work-tests .work-empty { padding: 40px 0; color: var(--faint); font-size: 13px; text-align: center; }

/* Computer: the live screen centered on the plain panel. */
.work-computer-view { background: var(--panel); }
.computer-toolbar { gap: 8px; min-height: 48px; padding: 10px 20px; border-bottom: 0; }
.computer-environment { color: var(--faint); font-size: 12px; }
.work-panel .computer-toolbar button { min-height: 30px; padding: 4px 10px; border-radius: 8px; font-size: 11.5px; }
.computer-screen { justify-content: center; padding: 24px 32px 72px; background: transparent; }
.computer-float { position: relative; width: 100%; max-width: 1100px; }
.computer-float img { position: relative; z-index: 1; width: 100%; height: auto; border-radius: 12px; outline: 0; box-shadow: 0 0 0 1px #ffffff17, 0 22px 44px -30px #000b; }
.computer-screen #computer-empty { color: var(--faint); font-size: 13px; }
.computer-text-form { gap: 8px; padding: 0 32px; }
.work-panel .computer-text-form button, .work-panel .computer-text-form input { min-height: 36px; padding: 6px 12px; border-radius: 10px; font-size: 12.5px; }
.computer-status { padding: 10px 32px 18px; font-size: 12px; }
