Z ZPI 文档 v0.3.8
介绍页

源码

packages/desktop/src/renderer/workbench.css

css6549 行查看原文
/* biome-ignore-all lint/style/noDescendingSpecificity: Scoped workbench rules override the shared UI stylesheet. */
/* Workbench: ZCode-style task actions and tabbed side pane. */
.sidebar {
  --color-sidebar: light-dark(#f0f0f0, #161616);
  /* ZCode's desktop sidebar exposes the window surface and macOS vibrancy. */
  background: transparent;
  min-height: 0;
  padding: 48px 0 12px;
  overflow: clip;
  width: var(--left-sidebar-width);
  transition:
    width 200ms ease-out,
    opacity 200ms ease-out,
    display 200ms allow-discrete;
}
.workspace-surface[data-sidebar-resizing] > .sidebar {
  transition: opacity 200ms ease-out;
}
.workspace-surface > .sidebar[hidden] {
  opacity: 0;
}
@starting-style {
  .workspace-surface > .sidebar:not([hidden]) {
    width: 0;
    opacity: 0;
  }
}
.sidebar-global {
  padding: 12px 8px;
}
.shell:not(.mac-desktop) .sidebar-global {
  padding-block: 8px;
}
.sidebar-global > button {
  flex-shrink: 0;
}
.section-toggle {
  display: flex;
  align-items: center;
  gap: 4px;
  color: inherit;
  height: 28px;
  padding: 0 10px;
  flex: 1;
  min-width: 0;
  text-align: left;
}
.sidebar-heading {
  flex: 0 0 auto;
}
.projects,
.recent-sessions {
  overscroll-behavior: contain;
}
.session-row {
  border-left: 0;
}
.session-row.active {
  border-left: 0;
}
.session-row .task-archive {
  width: 20px;
  min-width: 20px;
}
.session-row .task-pin.pinned {
  opacity: 1;
  color: var(--color-text-subtle);
}
.topbar {
  min-height: 48px;
  height: 48px;
  flex: 0 0 48px;
  padding: 4px 8px 0 20px;
  gap: 12px;
  container-type: inline-size;
  border-bottom-color: color-mix(in oklab, var(--color-border) 50%, transparent);
}
.draft-main .topbar {
  border-bottom-color: transparent;
}
.shell:not(.pane-open) .topbar {
  padding-right: 44px;
}
.left-collapsed .topbar {
  padding-left: max(20px, calc(84px - var(--left-sidebar-width)));
}
.mac-desktop.left-collapsed .topbar {
  padding-left: max(20px, calc(164px - var(--left-sidebar-width)));
}
/* 开关独立于栏宽定位,折叠只改图标和状态,避免目标随布局跳动。 */
.shell {
  position: relative;
  background: var(--color-window-bg);
}
.shell.mac-desktop {
  background: var(--color-window-bg-mac);
}
.workspace-surface > main {
  margin: 4px 4px 4px 0;
  border: 1px solid var(--color-border);
  border-radius: var(--workspace-panel-radius);
  background: var(--color-bg);
  overflow: hidden;
}
.left-collapsed .workspace-surface > main {
  /* ZCode keeps a 4px sidebar gutter even when its sidebar is collapsed. */
  margin-left: 4px;
}
.sidebar-drag-space {
  position: absolute;
  top: 0;
  left: 132px;
  height: 56px;
  width: max(0px, calc(var(--left-sidebar-width) - 132px));
  -webkit-app-region: drag;
}
.topbar-drag-space {
  flex: 1;
  align-self: stretch;
  min-width: 0;
  -webkit-app-region: drag;
}
/* Native drag regions must not overlap floating window controls: stacking order cannot exclude them. */
.topbar,
.pane-header,
.desktop-top-controls {
  -webkit-app-region: no-drag;
}
.topbar-title {
  align-self: stretch;
  -webkit-app-region: drag;
}
.desktop-top-controls {
  position: absolute;
  left: 0;
  top: 0;
  height: 56px;
  padding: 4px 0 0 16px;
  display: flex;
  align-items: center;
  pointer-events: none;
  z-index: 30;
}
.mac-desktop .desktop-top-controls {
  padding-left: 96px;
}
.desktop-top-actions,
.pane-tabs,
.topbar button,
.pane-header button {
  -webkit-app-region: no-drag;
}
.desktop-top-actions {
  display: flex;
  pointer-events: auto;
}
.window-chrome-button {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  color: var(--color-text-muted);
  -webkit-app-region: no-drag;
  transition:
    background-color 150ms,
    color 150ms;
}
.window-chrome-button:active:not(:disabled) {
  transform: none;
}
.right-sidebar-toggle {
  position: absolute;
  top: 16px;
  right: 8px;
  z-index: 30;
}
/* Windows 的系统窗口按钮覆盖右上角,开关与顶栏内容让出该区域。 */
.shell:not(.mac-desktop) {
  --caption-inset: calc(100vw - env(titlebar-area-width, calc(100vw - 154px)));
}
.shell:not(.mac-desktop) .right-sidebar-toggle {
  right: calc(var(--caption-inset) + 8px);
}
.shell:not(.mac-desktop):not(.pane-open) .topbar {
  padding-right: calc(var(--caption-inset) + 44px);
}
.shell:not(.mac-desktop) .pane-header {
  padding-right: calc(var(--caption-inset) + 44px);
}
.right-sidebar-toggle[aria-expanded="true"] {
  background: var(--color-active);
  color: var(--color-foreground);
}
.right-pane {
  width: var(--right-pane-width);
  position: relative;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  min-width: 0;
  min-height: 0;
  margin: 4px 4px 4px 0;
  border-radius: var(--workspace-panel-radius);
  transition: none;
}
.right-pane[data-animating] {
  transition:
    width 200ms ease-out,
    opacity 200ms ease-out,
    margin-right 200ms ease-out,
    display 200ms allow-discrete;
}
.right-pane[data-resizing] {
  transition: none;
}
.workspace-surface > .right-pane[hidden] {
  width: 0;
  opacity: 0;
  margin-right: 0;
}
@starting-style {
  .workspace-surface > .right-pane:not([hidden]) {
    width: 0;
    opacity: 0;
    margin-right: 0;
  }
}
.right-pane-frame {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: var(--workspace-panel-radius);
  background: var(--color-bg);
}
.right-pane-content {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  width: 100%;
  container-type: inline-size;
}
.shell:not(.pane-full-view) .right-pane[data-animating]:not([data-resizing]) .right-pane-content {
  width: calc(var(--right-pane-width) - 2px);
}
.right-resizer {
  position: absolute;
  left: -4px;
  top: 0;
  bottom: 0;
  height: 100%;
  width: 4px;
  margin: 0;
  border: 0;
  cursor: col-resize;
  background: transparent;
  z-index: 21;
  touch-action: none;
  outline: none;
  -webkit-app-region: no-drag;
}
.pane-header {
  height: 48px;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 44px 0 8px;
  border-bottom: 1px solid color-mix(in oklab, var(--color-border) 50%, transparent);
  flex-shrink: 0;
}
.pane-tabs {
  display: flex;
  gap: 4px;
  flex: 0 1 auto;
  min-width: 0;
  height: 100%;
  overflow-x: auto;
  scrollbar-width: none;
  align-items: center;
}
.pane-tab {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1 1 156px;
  width: 156px;
  min-width: 60px;
  max-width: 156px;
  border: 1px solid transparent;
  border-radius: 8px;
  height: 28px;
  cursor: default;
  touch-action: none;
  color: var(--color-text-subtle);
}
.pane-tab.selected {
  background: var(--color-active);
  color: var(--color-text);
}
.pane-tab-trigger {
  display: flex;
  width: 100%;
  height: 100%;
  gap: 4px;
  align-items: center;
  min-width: 0;
  padding: 0 8px 0 6px;
  font-size: var(--text-body);
  font-weight: 500;
}
.pane-tab-trigger svg {
  flex-shrink: 0;
}
.pane-tab-content {
  --tab-fade-offset: 0px;
  display: flex;
  flex: 1;
  min-width: 0;
  align-items: center;
  gap: 4px;
  overflow: hidden;
  white-space: nowrap;
  mask-image: linear-gradient(
    to right,
    black calc(100% - var(--tab-fade-offset) - 8px),
    transparent calc(100% - var(--tab-fade-offset))
  );
}
.pane-tab.selected .pane-tab-content,
.pane-tab:hover .pane-tab-content,
.pane-tab:focus-within .pane-tab-content {
  --tab-fade-offset: 20px;
}
.pane-tab-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
.pane-tab-title {
  flex-shrink: 0;
  white-space: nowrap;
}
.tab-close {
  position: absolute;
  right: 4px;
  top: 4px;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  padding: 0;
  opacity: 0;
  pointer-events: none;
}
.pane-tab.selected .tab-close,
.pane-tab:hover .tab-close,
.pane-tab:focus-within .tab-close {
  opacity: 1;
  pointer-events: auto;
}
.pane-header > .pane-drag-space {
  flex: 1;
  align-self: stretch;
  -webkit-app-region: drag;
}
.pane-add-tab {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  padding: 0;
  display: grid;
  place-items: center;
}
.pane-content {
  flex: 1;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
}
.pane-empty {
  color: var(--color-text-muted);
  padding: 24px;
  text-align: center;
}
.changes-pane,
.terminal-pane {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}
.pane-subheading {
  display: flex;
  justify-content: space-between;
  padding: 8px 12px;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-text-muted);
  font-size: var(--text-body);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex-shrink: 0;
}
.terminal-surface {
  flex: 1;
  min-height: 0;
  padding: 12px;
  overflow: hidden;
}
.terminal-surface .xterm {
  height: 100%;
}
.diff-layout {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1;
  gap: 0;
  overflow: hidden;
}
.diff-layout > .diff-file-list {
  width: 100%;
  max-height: 28%;
  flex-shrink: 0;
  overflow: auto;
  padding: 6px;
  border-bottom: 1px solid var(--color-border);
}
.diff-layout > .diff-file-list button {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 7px 9px;
  border-radius: var(--radius-control);
  min-width: 0;
}
.diff-file-name {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
  text-align: left;
}
.diff-file-name strong {
  font-size: var(--text-body);
  font-weight: 400;
}
.diff-file-name small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: var(--text-body);
  color: var(--color-text-subtlest);
}
.diff-file-status {
  color: var(--color-text-muted);
  font-size: var(--text-body);
}
.diff-detail {
  flex: 1;
  min-height: 0;
  overflow: auto;
  min-width: 0;
  padding: 0;
}
.diff-detail section {
  border-bottom: 1px solid var(--color-border);
}
.diff-mode {
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 8px 10px;
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
}
.diff-mode span {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: var(--text-body);
}
.diff-mode button,
.diff-heading button {
  font-size: var(--text-body);
  padding: 4px 6px;
  color: var(--color-text-muted);
}
.diff-mode button[aria-pressed="true"] {
  background: var(--color-active);
  color: var(--color-text);
}
.diff-heading {
  padding: 6px 10px;
  margin: 0;
}
.diff-detail [data-diffs] {
  font-size: var(--text-small);
}
.diff-plain {
  font: 12px / 1.6 var(--font-mono);
  overflow: auto;
}
.diff-row {
  display: grid;
  grid-template-columns: 38px 38px minmax(max-content, 1fr);
  white-space: pre;
}
.diff-row > span {
  color: var(--color-text-muted);
  text-align: right;
  padding-right: 8px;
  border-right: 1px solid var(--color-border);
  user-select: none;
}
.diff-row code {
  padding: 0 10px;
}
.diff-row.added {
  background: light-dark(#e5f2e8, #1f352a);
}
.diff-row.removed {
  background: light-dark(#fae8e7, #40282b);
}
.diff-plain .diff-hunk {
  padding: 5px 10px;
  background: var(--color-surface-muted);
  font-size: var(--text-small);
}
.modal {
  max-width: calc(100vw - 32px);
  max-height: calc(100dvh - 32px);
}
/* Match ZCode TaskRenameDialog rather than inheriting the generic form surface. */
.task-rename-dialog {
  width: min(576px, 100vw - 32px);
  padding: 0;
  overflow: hidden;
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: 1.625;
  outline: none;
  -webkit-app-region: no-drag;
}
.task-rename-dialog form {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 24px;
  padding: 24px;
  max-height: calc(100dvh - 34px);
  overflow: auto;
}
.task-rename-dialog h2 {
  margin: 0;
  font-size: var(--text-body);
  font-weight: 500;
  line-height: 1.625;
}
.task-rename-dialog input {
  height: 32px;
  min-width: 0;
  padding: 6px 12px;
  border-radius: 8px;
  background: var(--color-input);
  font: inherit;
  outline: none;
  box-shadow: none;
  transition:
    background-color 150ms,
    border-color 150ms;
}
.task-rename-dialog input:is(:hover, :focus-visible) {
  border-color: var(--color-border-strong);
  background: var(--color-input);
}
.task-rename-dialog .modal-actions {
  margin: 0;
  flex-wrap: nowrap;
  align-items: center;
  gap: 12px;
}
.task-rename-dialog .modal-actions button {
  display: inline-flex;
  height: 40px;
  min-width: 0;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 8px;
  background-clip: padding-box;
  font: inherit;
  white-space: nowrap;
}
.task-rename-dialog .secondary {
  background-color: var(--color-secondary);
  color: var(--color-text);
}
.task-rename-dialog .secondary:hover {
  background-color: color-mix(in oklab, var(--color-secondary) 80%, transparent);
}
.task-rename-dialog .primary:hover {
  background-color: color-mix(in oklab, var(--color-primary) 80%, transparent);
}
.task-rename-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 20;
  display: inline-flex;
  width: 24px;
  height: 24px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--color-text);
  background: transparent;
  -webkit-app-region: no-drag;
}
.task-rename-close:hover {
  background: var(--color-fill-hover);
}
.task-rename-close svg {
  width: 12px;
  height: 12px;
}
@media (max-width: 639px) {
  .task-rename-dialog .modal-actions {
    flex-direction: column-reverse;
  }
}
.selection-menu {
  max-width: calc(100vw - 24px);
  max-height: min(450px, calc(100dvh - 48px));
  overflow: auto;
}
.model-menu,
.reasoning-menu {
  min-width: min(180px, var(--radix-dropdown-menu-content-available-width));
  max-width: min(320px, var(--radix-dropdown-menu-content-available-width), calc(100vw - 24px));
}
.model-menu {
  /* Leave room for the reasoning submenu inside the chat boundary. */
  max-width: min(320px, calc(var(--radix-dropdown-menu-content-available-width) - 180px));
}
@media (max-width: 1099px) {
  /* 窄窗侧栏沿用覆盖方式,顶栏为三个动作保留侧栏左侧的位置。 */
  .pane-open .topbar {
    margin-right: var(--right-pane-width);
    padding-right: 8px;
    padding-left: 0;
    gap: 0;
  }

  .right-pane {
    position: fixed;
    right: 0;
    top: 0;
    bottom: 0;
    z-index: 20;
    box-shadow: -8px 0 28px #0002;
    max-width: calc(100vw - 76px);
  }
  .right-pane-content {
    max-width: calc(100vw - 78px);
  }
}
@container (max-width: 180px) {
  .pane-open .topbar-title {
    visibility: hidden;
  }
}
@media (hover: none) {
  .session-row .row-action,
  .tab-close {
    opacity: 1;
  }
}

.shell [hidden] {
  display: none;
}

/* ZCode keeps task sections in a natural scroll flow and the footer outside it. */
.sidebar-sections {
  container-type: inline-size;
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 0 8px 12px;
  /* ZCode's task sections use px-2 inside the sidebar. */
}
.sidebar .projects,
.sidebar .recent-sessions {
  flex: none;
  max-height: none;
  overflow: visible;
}
.sidebar .sidebar-footer {
  margin-top: auto;
  flex: 0 0 auto;
}
.sidebar-purpose-section {
  position: relative;
}
.sidebar .sidebar-heading,
.sidebar .section-toggle,
.sidebar .project-name,
.sidebar .session-name {
  font-family: var(--font-body);
  font-size: var(--ui-font-size);
  line-height: 1.5;
  letter-spacing: normal;
}
.sidebar .sidebar-heading {
  height: 28px;
  min-width: 0;
  font-weight: 500;
  color: var(--color-text-subtlest);
  padding: 0;
  margin: 0;
}
.sidebar .section-toggle {
  font-weight: 500;
  outline: none;
  border-radius: 0;
  transition: color 150ms;
}
.sidebar .section-toggle span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sidebar .section-toggle:hover:not(:disabled),
.sidebar .section-toggle:focus-visible {
  color: var(--color-foreground);
  background: transparent;
}
.sidebar .sidebar-heading button:active {
  transform: none;
}
.sidebar .sidebar-heading-actions {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  padding-right: 0;
  opacity: 0;
  transition: opacity 150ms;
}
.sidebar .sidebar-heading-actions > .muted-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  padding: 0;
  border-radius: 6px;
  transition:
    color 150ms,
    background-color 150ms;
}
.sidebar .sidebar-heading-actions > .muted-icon:hover {
  color: var(--color-foreground);
  background: light-dark(rgba(13, 13, 13, 0.05), rgba(255, 255, 255, 0.05));
}
.sidebar .sidebar-heading-actions > .muted-icon {
  color: var(--color-text-subtle);
}
.sidebar .project {
  margin: 2px 0 8px;
}
.sidebar .project-title {
  font-weight: 400;
  color: var(--color-text-subtle);
  gap: 8px;
  height: 32px;
  padding: 0 4px 0 10px;
  border-radius: var(--radius-nested);
}
.sidebar .session-row {
  font-weight: 400;
  color: var(--color-foreground);
  gap: 8px;
  min-height: 32px;
  border-radius: var(--radius-nested);
  margin: 0;
  padding: 4px 4px 4px 10px;
}
.sidebar .session-row.active,
.sidebar .project-title:hover,
.sidebar .session-row:hover {
  background: var(--color-active);
}
.sidebar .project-toggle {
  align-items: center;
  justify-content: center;
  color: inherit;
  padding: 0;
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
}
.sidebar .project-name {
  padding: 0;
  color: inherit;
  font-weight: 400;
}
.sidebar .session-name {
  display: flex;
  align-items: center;
  height: 24px;
  font-weight: 400;
}
.sidebar .session-name-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sidebar .row-action,
.sidebar .muted-icon {
  color: var(--color-text-subtle);
}
.sidebar .row-action:hover:not(:disabled),
.sidebar .muted-icon:hover:not(:disabled) {
  color: var(--color-foreground);
}
.sidebar .task-pin {
  width: 16px;
  min-width: 16px;
  height: 16px;
  padding: 0;
  border-radius: 2px;
}
.task-leading-slot,
.task-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
}
.task-leading-slot {
  position: relative;
}
.task-indicator {
  transition: opacity 150ms ease;
}
.sidebar .task-leading-slot .task-pin {
  position: absolute;
  inset: 0;
  background: transparent;
  transition: opacity 150ms ease;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.sidebar .session-row[data-indicator="none"] .task-pin.pinned,
.session-row:hover .task-pin,
.session-row:focus-within .task-pin {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.session-row:hover .task-indicator,
.session-row:focus-within .task-indicator {
  opacity: 0;
}
.task-running-icon {
  color: color-mix(in oklab, #404040 60%, transparent);
  animation: task-indicator-spin 1s linear infinite;
}
@keyframes task-indicator-spin {
  to {
    transform: rotate(360deg);
  }
}
.task-unread-dot,
.task-error-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}
.task-unread-dot {
  background: oklch(68.5% 0.169 237.323);
}
.task-error-dot {
  background: #dc2626;
}
[data-theme="dark"] {
  .task-running-icon {
    color: color-mix(in oklab, #e5e5e5 60%, transparent);
  }
  .task-unread-dot {
    background: oklch(74.6% 0.16 232.661);
  }
}
.sidebar .task-archive {
  padding: 0;
}
.sidebar .task-archive:disabled {
  opacity: 0;
}
.sidebar .session-row:hover .task-archive:disabled,
.sidebar .session-row:focus-within .task-archive:disabled {
  opacity: 0.45;
}
.sidebar .pinned-tasks {
  margin-bottom: 12px;
}
.sidebar .pinned-tasks .sidebar-heading {
  height: auto;
  padding: 4px 10px;
}
.sidebar .section-toggle svg {
  width: 14px;
  height: 14px;
  opacity: 0;
  transition: opacity 150ms;
}
.sidebar .section-toggle,
.sidebar .section-toggle svg,
.sidebar .sidebar-heading-actions,
.sidebar .sidebar-heading-actions > .muted-icon {
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}
.sidebar .sidebar-purpose-section:hover .section-toggle svg,
.sidebar .sidebar-purpose-section:focus-within .section-toggle svg,
.sidebar .sidebar-purpose-section:hover .sidebar-heading-actions,
.sidebar .sidebar-purpose-section:focus-within .sidebar-heading-actions,
.sidebar .sidebar-heading-actions:has([data-state="open"]) {
  opacity: 1;
}
@media (hover: none) {
  .sidebar .section-toggle svg,
  .sidebar .sidebar-heading-actions {
    opacity: 1;
  }
}
.sidebar .project-row-action {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  padding: 0;
  color: var(--color-text-subtle);
  opacity: 0;
  pointer-events: none;
  transition: opacity 150ms;
}
.sidebar .project-title:hover .project-row-action,
.sidebar .project-title:has(:focus-visible) .project-row-action,
.sidebar .project-row-action[aria-expanded="true"] {
  opacity: 1;
  pointer-events: auto;
}
.sidebar .project-row-action:hover {
  color: var(--color-foreground);
}
.project-action-menu {
  z-index: var(--layer-popover);
  min-width: 128px;
  padding: 4px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-nested);
  background: var(--color-popover);
  color: var(--color-text);
  font-size: var(--text-body);
  box-shadow: var(--shadow-menu);
  -webkit-app-region: no-drag;
}
.project-action-menu-item {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 28px;
  padding: 4px 8px;
  border-radius: var(--radius-control);
  outline: none;
  cursor: default;
}
.project-action-menu-item[data-highlighted] {
  background: var(--color-active);
}
.sidebar .project .session-row {
  margin-left: 0;
}
/* Match ZCode RootWorkspaceContent: keep the workspace mounted and in layout,
   and switch the whole surface immediately instead of animating each panel out. */
.workspace-surface {
  display: flex;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
}
.shell.show-settings > .workspace-surface {
  opacity: 0;
  pointer-events: none;
}
.settings-screen {
  position: absolute;
  inset: 0;
  z-index: 40;
  display: grid;
  grid-template-columns: 268px minmax(0, 1fr);
  background: transparent;
  min-width: 0;
  min-height: 0;
  text-align: left;
}
.settings-sidebar {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 0 8px 16px;
  background: transparent;
}
.settings-sidebar-drag-space {
  height: 48px;
  flex-shrink: 0;
  margin: 0 -8px;
  -webkit-app-region: drag;
}
.settings-back {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  padding: 0 6px;
  margin: 12px 4px 24px;
  color: var(--color-text-muted);
  font-size: var(--text-body);
  -webkit-app-region: no-drag;
}
.settings-screen .settings-tabs {
  display: flex;
  flex-direction: column;
  overflow: auto;
  border: 0;
  padding: 0;
  gap: 4px;
}
.settings-screen .settings-tabs button {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  height: 32px;
  flex-shrink: 0;
  padding: 0 10px;
  font-size: var(--text-body);
  font-weight: 400;
  border-radius: var(--radius-panel);
  color: var(--color-text);
  text-align: left;
  -webkit-app-region: no-drag;
}
.settings-screen .settings-tabs button[aria-pressed="true"] {
  background: var(--color-active);
  color: var(--color-text);
  font-weight: 400;
}
.settings-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  margin: 4px 4px 4px 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-panel);
  background: var(--color-bg);
  overflow: hidden;
}
.settings-titlebar {
  position: relative;
  height: 48px;
  flex-shrink: 0;
  -webkit-app-region: drag;
}
.settings-breadcrumb {
  width: fit-content;
  max-width: calc(100% - 48px);
  height: 48px;
  padding: 0 10px;
  color: var(--color-text-subtle);
  -webkit-app-region: no-drag;
}
.settings-breadcrumb ol,
.settings-breadcrumb li {
  display: flex;
  align-items: center;
  min-width: 0;
  height: 100%;
}
.settings-breadcrumb ol {
  list-style: none;
  margin: 0;
  padding: 0;
}
.settings-breadcrumb li:first-child {
  flex-shrink: 0;
}
.settings-breadcrumb button {
  min-height: 28px;
  padding: 0 8px;
  color: inherit;
}
.settings-breadcrumb svg {
  flex-shrink: 0;
  color: var(--color-text-subtlest);
}
.settings-breadcrumb [aria-current="page"] {
  min-width: 0;
  padding: 0 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--color-text);
}
.settings-content.settings-detail-content {
  padding-top: 32px;
}
.settings-titlebar > .settings-help {
  position: absolute;
  top: 12px;
  right: 12px;
  -webkit-app-region: no-drag;
}
.settings-font-size {
  position: relative;
  width: 112px;
  flex-shrink: 0;
}
.settings-font-size input {
  width: 100%;
  height: 28px;
  padding: 2px 32px 2px 8px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-control);
  background: var(--color-input);
  outline: none;
  transition: border-color 150ms;
  text-align: right;
  font-variant-numeric: tabular-nums;
  appearance: textfield;
}
.settings-font-size input:hover,
.settings-font-size input:focus-visible {
  border-color: var(--color-focus);
  outline: none;
}
.settings-font-size input::-webkit-inner-spin-button,
.settings-font-size input::-webkit-outer-spin-button {
  appearance: none;
  margin: 0;
}
.settings-font-size span {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  font-size: var(--text-heading);
  color: var(--color-text-subtle);
  pointer-events: none;
}
.settings-scroll {
  overflow: auto;
  flex: 1;
  min-height: 0;
  scrollbar-gutter: stable;
}
.settings-content {
  margin: 0 auto;
  width: 100%;
  max-width: 896px;
  padding: 0 32px 40px;
}
.settings-content h1 {
  font-size: 30px;
  font-weight: 600;
  line-height: 36px;
  margin: 0 0 32px;
  letter-spacing: -0.025em;
}
.settings-content h2 {
  font-size: var(--text-heading);
  font-weight: 600;
  line-height: 24px;
  margin: 32px 0 4px;
}
.settings-content .interface-settings {
  padding: 0;
}
.interface-settings h2:first-child {
  margin-top: 0;
}
.settings-screen .settings-page {
  overflow: visible;
  max-height: none;
}
.settings-screen .settings-intro {
  font-size: var(--text-body);
  color: var(--color-text-muted);
  line-height: 24px;
  margin: 0 0 12px;
}
.settings-group {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-panel);
  background: var(--color-surface);
  overflow: hidden;
}
.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 16px;
}
.settings-row + .settings-row {
  border-top: 1px solid var(--color-border);
}
.settings-row-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.settings-row-copy strong,
.settings-row > .settings-label > strong {
  font-size: var(--text-body);
  font-weight: 500;
}
.settings-row-copy small {
  font-size: var(--text-body);
  line-height: 24px;
}
.settings-switch {
  position: relative;
  display: flex;
  width: 36px;
  height: 22px;
  flex-shrink: 0;
}
.settings-switch input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
  margin: 0;
  z-index: 1;
}
.settings-switch > span {
  width: 36px;
  height: 22px;
  border-radius: var(--radius-panel);
  background: var(--color-border);
  transition: background 150ms;
}
.settings-switch > span::after {
  content: "";
  display: block;
  width: 18px;
  height: 18px;
  margin: 2px;
  border-radius: 50%;
  background: var(--color-bg);
  box-shadow: 0 1px 3px #0002;
  transition: transform 150ms;
}
.settings-switch input:checked + span {
  background: var(--color-primary);
}
.settings-switch input:checked + span::after {
  transform: translateX(14px);
}
.settings-switch input:focus-visible + span {
  outline: 1px solid var(--color-focus);
  outline-offset: 2px;
}
.settings-switch input:disabled {
  cursor: not-allowed;
}
.settings-switch input:disabled + span {
  opacity: 0.5;
}
.task-notification-switch,
.task-notification-switch > span {
  width: 32px;
  height: 18px;
}
.general-settings .settings-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 192px;
}
.general-settings .task-notification-switch {
  justify-self: end;
}
.task-notification-switch > span {
  border-radius: 9999px;
  background: color-mix(in srgb, var(--color-primary) 30%, transparent);
}
.task-notification-switch > span::after {
  width: 16px;
  height: 16px;
  margin: 1px;
  box-shadow: none;
  background: var(--color-on-primary);
}
.settings-hint {
  color: var(--color-text-muted);
  font-size: var(--text-small);
  padding: 12px 2px;
}
.settings-screen .preview-heading small {
  font-weight: 400;
  font-size: var(--text-small);
  margin-left: 6px;
}
.settings-screen .resource-settings p {
  font-size: var(--text-body);
  line-height: 24px;
  color: var(--color-text-muted);
}
.settings-screen .resource-settings pre {
  font-size: var(--text-small);
  line-height: 1.7;
  padding: 16px;
  border-radius: var(--radius-panel);
  border: 1px solid var(--color-border);
  background: var(--color-surface-muted);
  max-height: 400px;
  overflow: auto;
}
.settings-screen .resource-settings .prompt-preview,
.settings-screen .resource-settings .custom-instructions-preview {
  max-height: 260px;
}
.settings-screen .provider-list button {
  font-size: var(--text-body);
  font-weight: 400;
  border-radius: var(--radius-nested);
  padding: 10px;
  text-align: left;
}
.settings-screen .provider-editor {
  font-size: var(--text-body);
}
@media (max-width: 1023px) {
  .settings-screen {
    grid-template-columns: 68px minmax(0, 1fr);
  }
  .settings-sidebar {
    padding: 0 8px 16px;
  }
  .mac-desktop .settings-sidebar-drag-space {
    height: 64px;
  }
  .settings-screen .settings-tabs button,
  .settings-screen .settings-back {
    padding: 0;
    justify-content: center;
  }
  .settings-tabs button span,
  .settings-back span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }
  .settings-content {
    padding: 0 16px 32px;
  }
  .settings-content h1 {
    font-size: 24px;
    line-height: 32px;
  }
  .settings-screen .settings-layout {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ZCode SettingsResourceGroup / SkillsSection and model-provider SectionLayout. */
.resource-group-heading,
.resource-section-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin: 16px 0;
}
.resource-group-heading h3 {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-size: var(--text-body);
  font-weight: 500;
}
.resource-group-heading h3 > span:not(.settings-label) {
  font-size: var(--text-small);
  font-weight: 400;
  color: var(--color-text-subtle);
}
.resource-icon-button {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-nested);
  color: var(--color-text-subtle);
}
.skill-resource-list {
  overflow: hidden;
  border-radius: var(--radius-panel);
  background: var(--color-surface-muted);
}
.skill-resource-row {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
}
.skill-resource-row + .skill-resource-row {
  border-top: 1px solid color-mix(in oklab, var(--color-border) 50%, transparent);
}
.skill-resource-row:hover {
  background: color-mix(in oklab, var(--color-foreground) 4%, transparent);
}
.resource-avatar {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: var(--radius-panel);
  background: var(--color-bg);
  color: var(--color-text-subtle);
}
.skill-resource-name {
  min-width: 0;
  padding: 0;
  text-align: left;
}
.skill-resource-name > span {
  display: block;
  font-size: var(--text-body);
  font-weight: 500;
  color: var(--color-foreground);
}
.skill-resource-name small {
  display: block;
  margin-top: 2px;
  font-size: var(--text-small);
  color: var(--color-text-subtle);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.resource-empty {
  padding: 16px;
}
.skill-detail-dialog {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(720px, calc(100vw - 32px));
  max-height: calc(100dvh - 48px);
  display: flex;
  flex-direction: column;
  z-index: 50;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-dialog);
  background: var(--color-popover);
  color: var(--color-foreground);
  box-shadow: var(--shadow-menu);
  overflow: hidden;
}
.skill-detail-dialog > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--color-border);
  padding: 16px;
}
.skill-detail-dialog h2 {
  margin: 0;
  font-size: calc(var(--ui-font-size) + 2px);
  font-weight: 500;
}
.skill-detail-dialog h3 {
  font-size: var(--text-body);
  font-weight: 500;
}
.skill-detail-dialog header button {
  width: 28px;
  height: 28px;
  padding: 0;
  display: grid;
  place-items: center;
  color: var(--color-text-subtle);
}
.skill-detail-body {
  padding: 16px 20px;
  overflow: auto;
}
.skill-detail-body p {
  color: var(--color-text-subtle);
  font-size: var(--text-body);
  line-height: 1.7;
}
.skill-detail-body dl {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.skill-detail-body dt,
.skill-detail-path > span {
  display: block;
  font-size: var(--text-small);
  color: var(--color-text-subtle);
  margin-bottom: 4px;
}
.skill-detail-body dd {
  margin: 0;
  font-size: var(--text-body);
}
.skill-detail-path code {
  font-size: var(--text-small);
  overflow-wrap: anywhere;
}
.skill-detail-body pre {
  font-size: var(--text-small);
  line-height: 1.7;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-nested);
  padding: 16px;
}
.settings-screen .model-settings-content {
  max-width: 1152px;
}
.resource-section-heading {
  align-items: flex-start;
  margin-top: 0;
}
.resource-section-heading p {
  margin: 0;
  font-size: var(--text-body);
  line-height: 24px;
  color: var(--color-text-subtle);
}
.resource-section-heading button {
  flex-shrink: 0;
  height: 32px;
  border-radius: var(--radius-nested);
  font-size: var(--text-small);
}
.settings-screen .model-provider-panel {
  grid-template-columns: 224px minmax(0, 1fr);
  min-height: 576px;
  gap: 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-panel);
  background: var(--color-surface);
  overflow: clip;
}
.settings-screen .model-provider-panel .provider-list {
  padding: 16px 12px;
  gap: 4px;
  overflow: visible;
}
.provider-list h3 {
  margin: 0 8px 12px;
  font-size: var(--text-small);
  font-weight: 600;
  color: var(--color-text-subtlest);
}
.provider-nav-group + .provider-nav-group {
  margin-top: 24px;
}
.provider-nav-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.provider-status {
  margin-left: auto;
  width: 8px;
  height: 8px;
  flex-shrink: 0;
  border-radius: 50%;
  background: #218c45;
}
.provider-status.disabled {
  background: var(--color-text-subtlest);
}
.settings-screen .model-provider-panel .provider-list button {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  padding: 0 8px;
  font-size: var(--text-body);
  font-weight: 500;
  color: var(--color-foreground);
  border: 1px solid transparent;
}
.provider-list button svg {
  flex: 0 0 16px;
}
.provider-list button span {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.settings-screen .model-provider-panel .provider-list button.selected {
  color: var(--color-foreground);
  background: var(--color-surface);
  border-color: var(--color-focus);
}
.settings-screen .model-provider-panel .provider-editor {
  max-height: none;
  overflow: visible;
  padding: 24px;
  min-width: 0;
  font-size: var(--text-body);
}
/* ZCode InlineEditableProviderCard: space-y-3, labels mb-1, input/select size="lg". */
.provider-details,
.provider-connection-fields {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}
.provider-detail-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}
.settings-screen .provider-detail-heading h2 {
  font-size: calc(var(--ui-font-size) + 2px);
  font-weight: 600;
  margin: 0;
}
.provider-detail-heading p {
  font-size: var(--text-small);
  color: var(--color-text-subtle);
  margin: 4px 0 0;
}
.settings-screen .provider-editor label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0;
  color: var(--color-text-subtle);
  font-size: var(--text-body);
  font-weight: 400;
}
.settings-screen .provider-editor input:not([type="checkbox"]) {
  width: 100%;
  height: 32px;
  padding: 6px 12px;
  border: 1px solid var(--color-border);
  font-size: var(--text-body);
  border-radius: var(--radius-nested);
  color: var(--color-foreground);
  background: var(--color-input);
}
.settings-screen .provider-editor :is(input:not([type="checkbox"]), textarea):focus {
  border-color: var(--color-border-strong);
}
.provider-heading-actions,
.model-section-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}
.settings-screen .model-list-heading {
  margin: 0;
}
.settings-screen .model-list-heading h3 {
  margin: 0;
  font-size: var(--text-body);
  font-weight: 400;
  color: var(--color-text-subtle);
}
.provider-more,
.model-refresh {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-nested);
  padding: 0;
  display: grid;
  place-items: center;
}
/* ZCode ProviderCardHeader / dropdown-menu geometry. */
.provider-actions-menu {
  --provider-menu-background: #ffffff;
  --provider-menu-hover: #f0f0f0;
  --provider-menu-danger: #e03131;
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 128px;
  max-height: var(--radix-dropdown-menu-content-available-height);
  padding: 4px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--provider-menu-background);
  color: var(--color-foreground);
  box-shadow:
    0 4px 6px -1px #0000001a,
    0 2px 4px -2px #0000001a;
  overflow: hidden auto;
  outline: none;
}
.provider-action-item {
  display: flex;
  align-items: center;
  min-height: 28px;
  gap: 8px;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: var(--text-body);
  line-height: 1.625;
  cursor: default;
  user-select: none;
  outline: none;
}
.provider-action-item svg {
  flex-shrink: 0;
  pointer-events: none;
}
.provider-action-item[data-highlighted] {
  background: var(--provider-menu-hover);
}
.provider-action-delete {
  color: var(--provider-menu-danger);
}
.provider-action-delete[data-highlighted] {
  background: var(--provider-menu-danger);
  color: #fff;
}
.provider-action-separator {
  height: 1px;
  margin: 2px -4px;
  background: var(--color-border);
}
.provider-more {
  width: 24px;
  height: 24px;
  border-radius: 6px;
}
.settings-screen .provider-editor .provider-rename-input {
  width: min(320px, 50%);
  height: 28px;
  padding: 2px 8px;
  font-size: calc(var(--ui-font-size) + 2px);
  font-weight: 600;
}
.model-refresh {
  border: 1px solid var(--color-border);
}
.model-provider-section .resource-section-heading button {
  height: 28px;
  font-size: var(--text-body);
}
.credential-input {
  display: flex;
  position: relative;
}
.settings-screen .provider-editor .credential-input input:not([type="checkbox"]) {
  width: 100%;
  padding-right: 40px;
}
.credential-input button {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  padding: 0;
  display: grid;
  place-items: center;
}
.settings-screen .provider-footer {
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: static;
  margin: 0;
  padding-top: 12px;
  background: var(--color-surface);
}
.provider-footer .run-error,
.provider-footer .run-notice {
  margin: 0;
}
.provider-footer .modal-actions {
  margin: 0;
  flex-wrap: wrap;
}
.provider-footer .primary,
.model-list-actions .secondary,
.chatgpt-connection button {
  height: 32px;
  padding: 0 12px;
  border-radius: var(--radius-nested);
}
.pane-empty-launcher {
  container: launcher / inline-size;
  display: flex;
  height: 100%;
  min-height: 0;
  flex: 1;
  flex-direction: column;
  background: var(--color-bg);
}
.pane-launcher-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 24px 28px;
}
.pane-launcher-inner {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-inline: auto;
  width: 100%;
  max-width: 768px;
}
.pane-empty-launcher h2 {
  padding-left: 8px;
  margin: 0;
  font-size: var(--text-title);
  font-weight: 600;
  line-height: 1.5;
}
.pane-launcher-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  column-gap: 32px;
  row-gap: 4px;
  min-width: 0;
}
.pane-launcher-actions > button {
  display: flex;
  font-size: 16px;
  line-height: 24px;
  color: #000;
  width: 100%;
  min-width: 0;
  align-items: center;
  gap: 12px;
  border-radius: 12px;
  padding: 10px 8px;
  text-align: left;
  background: transparent;
  transition: background-color 150ms;
}
.pane-launcher-actions > button:hover {
  background: var(--color-fill-hover);
}
.pane-launcher-icon {
  display: flex;
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--color-fill);
}
.pane-launcher-icon svg {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  color: var(--color-text-subtle);
}
.pane-launcher-copy {
  min-width: 0;
  flex: 1;
}
.pane-launcher-label {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: var(--text-body);
  font-weight: 600;
  color: var(--color-text);
  line-height: 1.5;
}
.pane-launcher-description {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 2px;
  font-size: var(--text-small);
  line-height: 1.5;
  color: var(--color-text-subtle);
}
.pane-launcher-open {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  height: 24px;
  padding: 0 8px;
  border: 1px solid transparent;
  border-radius: 9999px;
  user-select: none;
  color: var(--color-text);
  background: var(--color-secondary);
  background-clip: padding-box;
  font-size: var(--text-body);
  line-height: 1.625;
  white-space: nowrap;
}
@container launcher (min-width: 36rem) {
  .pane-launcher-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 1023px) {
  .settings-screen .model-provider-panel {
    grid-template-columns: 56px minmax(0, 1fr);
  }
  .settings-screen .model-provider-panel .provider-list {
    padding: 12px 8px;
  }
  .model-provider-panel .provider-list h3,
  .model-provider-panel .provider-list button span {
    display: none;
  }
  .settings-screen .model-provider-panel .provider-editor {
    padding: 16px;
  }
}
@media (max-width: 600px) {
  .resource-section-heading {
    flex-wrap: wrap;
  }
}

.sidebar .session-name:hover:not(:disabled),
.sidebar .project-name:hover:not(:disabled),
.sidebar .task-pin:hover:not(:disabled),
.sidebar .task-archive:hover:not(:disabled),
.settings-screen .skill-resource-name:hover:not(:disabled) {
  background: transparent;
}
.settings-screen .skill-resource-row .settings-switch {
  margin: 0;
}
.tool-resource-list {
  border-radius: var(--radius-panel);
  background: var(--color-surface);
  overflow: hidden;
}
.tool-resource-item + .tool-resource-item {
  border-top: 1px solid color-mix(in oklab, var(--color-border) 50%, transparent);
}
.tool-resource-row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  text-align: left;
  border-radius: 0;
}
.tool-resource-summary {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.tool-resource-summary > span {
  font-size: var(--text-body);
  font-weight: 500;
}
.tool-resource-summary small {
  font-size: var(--text-small);
  color: var(--color-text-subtle);
  overflow-wrap: anywhere;
}
.tool-resource-status {
  font-size: var(--text-small);
  color: var(--color-text-subtle);
  white-space: nowrap;
}
.tool-resource-row > svg {
  color: var(--color-text-subtle);
}
.tool-resource-row > svg.rotated {
  transform: rotate(180deg);
}
.tool-resource-detail {
  padding: 0 16px 16px;
  border-top: 1px solid color-mix(in oklab, var(--color-border) 50%, transparent);
}
.tool-resource-detail > p {
  font-size: var(--text-caption);
  line-height: 1.6;
  color: var(--color-text-subtle);
  margin: 16px 0;
}
.tool-resource-detail h4 {
  font-size: var(--text-caption);
  font-weight: 500;
  margin: 16px 0 8px;
}
.settings-screen .tool-resource-detail pre {
  margin: 0;
  padding: 12px;
  background: var(--color-bg);
  border-radius: var(--radius-nested);
  border: 1px solid var(--color-border);
  max-height: 320px;
  overflow: auto;
}
.skill-detail-backdrop {
  z-index: 49;
}
.settings-screen .provider-editor label:has(input[type="checkbox"]) {
  flex-direction: row;
  align-items: center;
}
.settings-screen .provider-editor textarea {
  width: 100%;
  border: 1px solid var(--color-border);
}
.settings-screen .provider-editor textarea {
  min-height: 80px;
  border-radius: var(--radius-nested);
  padding: 8px 12px;
  font-family: var(--font-code);
  font-size: var(--text-small);
}
.settings-screen .provider-list button:hover:not(:disabled) {
  background: color-mix(in oklab, var(--color-foreground) 4%, transparent);
}

.sidebar .project-toggle:hover:not(:disabled) {
  background: transparent;
  color: var(--color-text-subtle);
}
.window-chrome-button:hover:not(:disabled) {
  background: var(--color-active);
  color: var(--color-foreground);
}

/* ZCode ConversationTimeline: responsive 29dvh top spacer, then greeting and dock. */
.task-body {
  position: relative;
  container-type: inline-size;
  container-name: task-layout;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}
.draft-main .task-body {
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}
.draft-main .task-body::before {
  content: "";
  flex: 0 1 29dvh;
  min-height: 52px;
}
.draft-main .task-body::after {
  content: "";
  flex: 1 0 16px;
}
.draft-main .conversation-wrap {
  flex: 0 0 auto;
  overflow: visible;
}
.draft-main .conversation {
  height: auto;
  overflow: visible;
  scrollbar-gutter: auto;
}
.draft-main .conversation-inner {
  width: 100%;
  max-width: none;
  padding: 0;
}
.draft-main .empty-chat {
  display: flow-root;
  padding: 0 16px;
}
.draft-main .composer-container {
  width: 100%;
  max-width: none;
  flex-shrink: 0;
  padding: 12px 16px 0;
}
.draft-main .composer-stack {
  max-width: 672px;
}
.empty-chat .draft-greeting {
  position: relative;
  /* The hidden unwrapped measurement must not enlarge the conversation's scroll area. */
  overflow: clip;
  width: 100%;
  max-width: 672px;
  font-size: 30px;
  line-height: 1.2;
  font-weight: 500;
  margin: 0 auto 32px;
  padding: 0 16px;
}
.draft-greeting-measurement {
  position: absolute;
  white-space: nowrap;
  visibility: hidden;
  pointer-events: none;
  font-size: 30px;
}
/* Adapted from ZCode ProviderTemplatePicker / ProviderModelMetadataDialog. */
.provider-logo {
  object-fit: contain;
  flex-shrink: 0;
}
.provider-logo-chatgpt {
  display: inline-flex;
  flex: 0 0 auto;
  overflow: hidden;
}
.provider-logo-chatgpt > img {
  /* The 2048px asset has a 1648px visible body, surrounded by transparent padding. */
  transform: scale(1.242718);
}
.provider-template-picker > header {
  display: flex;
  align-items: center;
  gap: 12px;
}
.provider-template-picker > header h2 {
  font-size: calc(var(--ui-font-size) + 2px);
  margin: 0;
}
.provider-template-picker > h3 {
  margin: 24px 0 12px;
  font-weight: 500;
  color: var(--color-text-subtle);
}
.provider-template-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.provider-template-grid > button {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 60px;
  padding: 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-panel);
  text-align: left;
}
.provider-template-label {
  flex: 1;
}
.provider-template-grid > button > svg:last-child {
  color: var(--color-text-subtlest);
}
.model-list-actions {
  display: flex;
  gap: 8px;
}
.provider-models {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.provider-model-empty {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 16px;
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-nested);
  color: var(--color-text-subtle);
}
.provider-model-empty > svg {
  flex-shrink: 0;
}
.provider-model-list {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-nested);
  background: var(--color-input);
  overflow: hidden;
}
.provider-model-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px 12px;
}
.provider-model-row + .provider-model-row {
  border-top: 1px solid var(--color-border);
}
.model-row-summary {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.model-row-name {
  font: var(--text-body) / var(--line-body) var(--font-code);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.model-context-badge,
.model-vision-badge {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  height: 20px;
  padding: 0 6px;
  font: var(--text-small) / var(--line-body) var(--font-code);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-control);
  background: var(--color-bg);
  color: var(--color-text-subtle);
}
.model-vision-badge {
  font-family: var(--font-body);
  border-radius: var(--radius-full);
}
.provider-model-row > button {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  padding: 0;
  color: var(--color-text-subtle);
}
.settings-screen .model-enabled-switch,
.settings-screen .model-enabled-switch > span {
  width: 28px;
  height: 16px;
}
.settings-screen .provider-editor .settings-switch {
  margin: 0;
  gap: 0;
}
.settings-screen .provider-enabled-switch,
.settings-screen .provider-enabled-switch > span {
  width: 32px;
  height: 18px;
}
.settings-screen .model-enabled-switch > span,
.settings-screen .provider-enabled-switch > span {
  padding: 1px;
  background: color-mix(in oklab, var(--color-primary) 30%, transparent);
}
.settings-screen .model-enabled-switch > span::after {
  width: 14px;
  height: 14px;
  margin: 0;
  background: var(--color-on-primary);
  box-shadow: none;
}
.settings-screen .provider-enabled-switch > span::after {
  width: 16px;
  height: 16px;
  margin: 0;
  background: var(--color-on-primary);
  box-shadow: none;
}
.settings-screen .model-enabled-switch input:checked + span::after {
  transform: translateX(12px);
}
.settings-screen .provider-enabled-switch input:checked + span::after {
  transform: translateX(14px);
}
/* ZCode model metadata dialog and reasoning editor. */
.model-config-backdrop {
  position: fixed;
  inset: 0;
  z-index: 49;
  background: #0009;
  backdrop-filter: blur(4px);
}
.model-config-dialog {
  --model-control-hover: rgba(13, 13, 13, 0.05);
  position: fixed;
  z-index: 50;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  width: min(672px, calc(100vw - 32px));
  max-height: min(768px, calc(100vh - 64px));
  display: flex;
  flex-direction: column;
  overflow: clip;
  border: 1px solid var(--color-border);
  border-radius: 16px;
  background: var(--color-input);
  color: var(--color-foreground);
  box-shadow:
    0 4px 6px -1px #0000001a,
    0 2px 4px -2px #0000001a;
  padding: 16px;
  gap: 16px;
  font-size: var(--text-body);
  line-height: 1.625;
  outline: none;
  -webkit-app-region: no-drag;
}
.model-config-heading {
  flex: 0 0 auto;
  position: relative;
}
.model-config-heading h2 {
  margin: 0 32px 0 0;
  font-size: var(--text-body);
  font-weight: 500;
}
.model-config-close {
  position: absolute;
  top: 0;
  right: 0;
  width: 24px;
  height: 24px;
  padding: 0;
  display: grid;
  place-items: center;
  border-radius: 6px;
  color: var(--color-text-subtle);
}
.model-smart-switch {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 16px;
}
.model-smart-switch strong {
  font-weight: 500;
}
.model-smart-switch .settings-switch,
.model-smart-switch .settings-switch > span {
  margin: 0;
  width: 32px;
  height: 18px;
}
.model-smart-switch .settings-switch > span {
  padding: 1px;
  background: color-mix(in oklab, var(--color-primary) 30%, transparent);
}
.model-smart-switch .settings-switch > span::after {
  width: 16px;
  height: 16px;
  margin: 0;
  background: var(--color-on-primary);
  box-shadow: none;
}
.model-smart-switch .settings-switch input:checked + span {
  background: var(--color-primary);
}
.model-smart-switch .settings-switch input:checked + span::after {
  transform: translateX(14px);
}
.model-help {
  display: inline-flex;
  align-items: center;
  color: var(--color-text-subtle);
  cursor: help;
  vertical-align: middle;
}
.model-config-body {
  flex: 1;
  min-height: 0;
  min-width: 0;
  overflow-y: auto;
  margin-right: -12px;
  padding-right: 16px;
}
.model-config-body > fieldset {
  display: flex;
  flex-direction: column;
  gap: 16px;
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}
.model-config-identity {
  display: flex;
  gap: 16px;
}
.model-config-identity label {
  flex: 1;
  min-width: 0;
}
.model-config-body label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0;
  color: var(--color-text-subtle);
}
.model-config-body label > span,
.model-option-group > span {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--color-text-subtle);
}
.model-config-body input,
.model-config-body textarea {
  width: 100%;
  height: 32px;
  padding: 4px 12px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  font-size: var(--text-body);
  background: var(--color-input);
  color: var(--color-foreground);
  outline: none;
}
.model-config-body input:hover,
.model-config-body input:focus,
.model-config-body textarea:hover,
.model-config-body textarea:focus {
  background: var(--model-control-hover);
}
.model-config-body :is(input, textarea):focus {
  border-color: var(--color-border-strong);
}
.model-config-body textarea {
  font: var(--text-body) / 1.625 var(--font-code);
  height: 128px;
  min-height: 128px;
  max-height: 128px;
  padding: 8px 12px;
  resize: none;
  overflow-y: auto;
}
.model-config-body [data-inherited="true"] {
  color: var(--color-text-subtlest);
}
.model-advanced-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  font-weight: 400;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 2px;
}
.model-advanced-trigger:hover {
  background: var(--model-control-hover);
}
.model-advanced-trigger svg {
  transition: transform 200ms;
}
.model-advanced-trigger[aria-expanded="true"] svg {
  transform: rotate(90deg);
}
.model-advanced-content {
  display: grid;
  margin-inline: -4px;
  grid-template-rows: 0fr;
  opacity: 0;
  visibility: hidden;
  transition:
    grid-template-rows 200ms,
    opacity 200ms,
    visibility 200ms;
}
.model-advanced-content[data-expanded="true"] {
  grid-template-rows: 1fr;
  opacity: 1;
  visibility: visible;
}
.model-advanced-clip {
  min-height: 0;
  overflow: hidden;
}
.model-advanced-fields {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 16px 4px 4px;
}
@media (prefers-reduced-motion: reduce) {
  .model-advanced-content,
  .model-advanced-trigger svg {
    transition: none;
  }
}
.model-option-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.model-option-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.model-option-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--color-border);
  font-weight: 500;
}
.model-option-chip[aria-pressed="true"] {
  background: color-mix(in oklab, var(--color-foreground) 15%, transparent);
}
.model-option-chip[aria-pressed="true"]:hover {
  background: color-mix(in oklab, var(--color-foreground) 20%, transparent);
}
.model-option-chip:disabled {
  opacity: 1;
}
.model-option-check {
  width: 16px;
  height: 16px;
  display: grid;
  place-items: center;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  background: var(--color-input);
}
.model-option-chip[aria-pressed="true"] .model-option-check {
  background: var(--color-primary);
  color: var(--color-on-primary);
  border-color: var(--color-primary);
}
.model-reasoning-editor {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.model-reasoning-chip {
  margin: 0;
  padding: 0;
  min-width: 0;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  height: 32px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  user-select: none;
}
.model-reasoning-chip[data-personal-override="true"] {
  border-color: color-mix(in oklab, var(--color-primary) 35%, transparent);
}
.model-reasoning-chip[data-dragging="true"] {
  opacity: 0.6;
}
.model-reasoning-chip:hover,
.model-reasoning-chip:focus-within {
  background: var(--model-control-hover);
}
.model-reasoning-chip .model-reasoning-value {
  min-width: 40px;
  height: 32px;
  padding: 0 8px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  cursor: grab;
  outline: none;
}
.model-reasoning-value:active {
  cursor: grabbing;
}
.model-reasoning-chip .model-reasoning-remove {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  margin-right: 2px;
  padding: 0;
  border-radius: 6px;
  opacity: 0;
  transition: opacity 150ms;
}
.model-reasoning-chip:hover .model-reasoning-remove,
.model-reasoning-chip .model-reasoning-remove:focus-visible {
  opacity: 1;
}
.model-reasoning-chip .model-reasoning-remove:disabled {
  opacity: 0;
}
.model-config-body .model-reasoning-input {
  field-sizing: content;
  min-width: 40px;
  max-width: 128px;
  width: auto;
  height: 32px;
  padding: 0 8px;
  border: 0;
  background: transparent;
}
.model-config-body .model-reasoning-new {
  border: 1px solid var(--color-border);
  background: var(--color-input);
}
.model-reasoning-add:hover,
.model-reasoning-remove:hover {
  background: var(--model-control-hover);
}
.model-reasoning-add {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid var(--color-border);
  border-radius: 8px;
}
.model-transport-options {
  color: var(--color-text-subtle);
}
.model-transport-options > :not(summary) {
  margin-top: 16px;
}
.model-config-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 4px;
  flex: 0 0 auto;
}
.model-config-footer > button {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 32px;
  padding: 4px 10px;
  font-weight: 500;
  border: 1px solid transparent;
  border-radius: 8px;
}
.model-config-footer .model-reset {
  margin-right: auto;
  height: 24px;
  padding: 0;
  color: var(--color-text-subtle);
  font-size: var(--text-small);
  text-decoration: underline;
  text-underline-offset: 4px;
}
.model-config-error {
  color: var(--color-error);
  overflow-wrap: anywhere;
}
.provider-delete-dialog {
  position: fixed;
  z-index: 50;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  width: min(448px, calc(100vw - 32px));
  display: grid;
  gap: 20px;
  border-radius: 16px;
  background: var(--color-input);
  padding: 20px;
  box-shadow: 0 25px 50px -12px #0004;
  outline: none;
  -webkit-app-region: no-drag;
}
.provider-delete-dialog header {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.provider-delete-dialog h2 {
  font-size: calc(var(--ui-font-size) + 2px);
  font-weight: 600;
  margin: 0;
}
.provider-delete-dialog p {
  padding-top: 2px;
  font-size: var(--text-body);
  line-height: 24px;
  color: var(--color-text-subtle);
  margin: 0;
}
.provider-delete-dialog footer {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}
.provider-delete-dialog footer button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  height: 36px;
  padding: 4px 16px;
  border-radius: 8px;
}
.provider-delete-dialog footer span {
  font-family: var(--font-code);
  color: var(--color-text-subtle);
}
.provider-delete-dialog footer .primary span {
  color: color-mix(in oklab, var(--color-on-primary) 60%, transparent);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
@media (max-width: 600px) {
  .provider-template-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .model-config-dialog {
    width: calc(100vw - 32px);
    max-height: calc(100vh - 32px);
    padding: 16px;
  }
}

.settings-screen .model-enabled-switch input:checked + span,
.settings-screen .provider-enabled-switch input:checked + span {
  background: var(--color-primary);
}

.interface-settings h2:not(:first-child) {
  margin-top: 32px;
  margin-bottom: 12px;
}

.file-pane {
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: var(--color-bg);
}
.file-text-preview {
  flex: 1;
  min-height: 0;
  overflow: auto;
}
.file-markdown-preview {
  padding: 16px 24px;
}
.file-image-preview {
  flex: 1;
  overflow: auto;
  display: grid;
  place-items: center;
  padding: 16px;
}
.file-image-preview img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.file-media-preview {
  max-height: 100%;
  margin: auto;
}
.file-office-preview {
  flex: 1;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
}
.file-sheet-tabs {
  display: flex;
  gap: 4px;
  overflow: auto;
  border-bottom: 1px solid var(--color-border);
  padding: 4px 8px;
  background: var(--color-surface);
}
.file-sheet-tabs button {
  flex-shrink: 0;
  max-width: 192px;
  height: 28px;
  padding: 0 8px;
  border-radius: 6px;
  color: var(--color-text-subtle);
  font-size: var(--text-small);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.file-sheet-tabs button[aria-selected="true"] {
  background: var(--color-active);
  color: var(--color-text);
}
.file-docx-preview {
  height: 100%;
  overflow: auto;
}
.file-docx-content {
  padding: 16px;
  width: max-content;
}
.file-docx-content .docx-wrapper {
  background: transparent;
  padding: 0;
}
.file-docx-content .docx-wrapper > section.docx {
  margin-bottom: 16px;
  box-shadow:
    0 2px 10px rgba(15, 23, 42, 0.08),
    0 1px 2px rgba(15, 23, 42, 0.05);
}

/* ZCode draft workspace chip, shadow-xl/5 and 288px workspace menu. */
.composer-stack.with-header {
  background: var(--color-fill);
  border-radius: 16px;
  box-shadow:
    0 20px 25px -5px rgb(0 0 0 / 0.05),
    0 8px 10px -6px rgb(0 0 0 / 0.05);
  gap: 0;
}
.draft-project-header {
  padding: 6px;
}
.draft-project-chip {
  position: relative;
  display: inline-flex;
  max-width: 240px;
  border-radius: 9999px;
}
.draft-project-chip:hover,
.draft-project-chip:focus-within {
  background: var(--color-active);
}
.draft-project-trigger {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  max-width: 240px;
  height: 28px;
  padding: 0 8px 0 12px;
  border-radius: 9999px;
  background: transparent;
  font-size: var(--text-body);
  font-weight: 400;
}
.draft-project-trigger:hover:not(:disabled) {
  background: transparent;
}
.draft-project-trigger span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.draft-project-trigger svg,
.draft-project-option svg {
  flex-shrink: 0;
  color: var(--color-text-subtle);
}
.draft-project-detach {
  position: absolute;
  left: 6px;
  top: 2px;
  z-index: 1;
  width: 24px;
  height: 24px;
  padding: 0;
  border-radius: 9999px;
  opacity: 0;
  pointer-events: none;
}
.draft-project-chip.attached:hover .draft-project-detach,
.draft-project-chip.attached:focus-within .draft-project-detach {
  opacity: 1;
  pointer-events: auto;
}
.draft-project-chip.attached:hover .draft-project-trigger > svg:first-child,
.draft-project-chip.attached:focus-within .draft-project-trigger > svg:first-child {
  opacity: 0;
}
.draft-project-menu {
  z-index: var(--layer-popover);
  width: 288px;
  max-height: min(480px, var(--radix-dropdown-menu-content-available-height));
  overflow: auto;
  background: var(--color-popover);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  box-shadow: var(--shadow-menu);
  color: var(--color-text);
  font-size: var(--text-body);
}
.draft-project-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px;
  height: 40px;
  border-bottom: 1px solid var(--color-border);
}
.draft-project-search svg {
  color: var(--color-text-subtlest);
}
.draft-project-search input {
  min-width: 0;
  width: 100%;
  border: 0;
  background: transparent;
  outline: none;
  padding: 4px 0;
}
.draft-project-options {
  padding: 4px;
}
.draft-project-option {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  padding: 4px 8px;
  outline: none;
  cursor: default;
  border-radius: 4px;
}
.draft-project-option span {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.draft-project-option[data-highlighted] {
  background: var(--color-active);
}
.draft-project-menu [role="separator"] {
  height: 1px;
  margin: 4px -4px;
  background: var(--color-border);
}
.draft-project-empty {
  padding: 8px;
  margin: 0;
  color: var(--color-text-subtlest);
}
.sortable-provider,
.sortable-model {
  cursor: grab;
  touch-action: pan-y;
  user-select: none;
}
.sortable-provider:active,
.sortable-model:active {
  cursor: grabbing;
}
.sortable-provider.dragging {
  position: relative;
  z-index: 20;
  opacity: 0.7;
}
.sortable-model.dragging {
  position: relative;
  z-index: 10;
  background: var(--color-surface);
  box-shadow: 0 4px 6px #0000001a;
  border-color: transparent;
}

/* ZCode Select: input trigger, item-aligned menu and trailing check mark. */
.settings-select-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  width: 260px;
  max-width: 100%;
  min-width: 0;
  height: 32px;
  padding: 0 8px 0 12px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-surface);
  color: var(--color-text);
  font-size: var(--text-body);
  font-weight: 400;
  text-align: left;
}
.settings-select-trigger:hover:not(:disabled) {
  background: var(--color-surface);
  border-color: var(--color-focus);
}
.settings-select-trigger:focus-visible {
  border-color: var(--color-text-subtle);
  outline: none;
}
.settings-select-trigger > svg {
  flex-shrink: 0;
  color: var(--color-text-subtle);
}
.settings-select-value {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}
.settings-select-menu {
  position: relative;
  z-index: 60;
  min-width: 128px;
  max-height: var(--radix-select-content-available-height);
  overflow: hidden;
  padding: 4px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-popover);
  color: var(--color-text);
  box-shadow: var(--shadow-menu);
  font-size: var(--text-body);
  -webkit-app-region: no-drag;
}
.settings-select-options {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.settings-select-option {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 28px;
  gap: 8px;
  padding: 4px 32px 4px 8px;
  border-radius: 6px;
  outline: none;
  cursor: default;
  user-select: none;
}
.settings-select-option[data-highlighted] {
  background: var(--color-active);
}
.settings-select-option > span:last-child:not(:first-child) {
  position: absolute;
  right: 8px;
  display: flex;
  color: var(--color-text-subtle);
}
.settings-select-scroll {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 24px;
  color: var(--color-text-subtle);
}
.model-config-body .settings-select-trigger {
  width: 100%;
}

.task-more {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  padding: 0;
  border-radius: 6px;
  color: var(--color-text-subtle);
  -webkit-app-region: no-drag;
}
.task-more:hover {
  background: var(--color-active);
}
.task-menu {
  min-width: 190px;
}
.task-menu .menu-item {
  justify-content: flex-start;
  gap: 8px;
}
.task-menu small {
  margin-left: auto;
  font-size: 11px;
}
.menu-separator {
  height: 1px;
  margin: 4px 0;
  border: 0;
  background: var(--color-border);
}
.archived-heading {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
}
.archived-heading h1 {
  flex: 1;
  margin: 0;
}
.archived-heading > .settings-heading-title {
  flex: 1;
}
.archived-delete-all {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  padding: 8px 12px;
  border-radius: 10px;
  color: var(--color-error);
  background: var(--color-danger-surface);
}
.archived-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  margin: 20px 0 32px;
  border: 1px solid var(--color-border);
  border-radius: 20px;
  color: var(--color-text-subtle);
}
.archived-search input {
  width: 100%;
  border: 0;
  background: transparent;
  padding: 0;
}
.archived-search:focus-within {
  border-color: var(--color-border-strong);
}
.archived-group {
  margin-bottom: 32px;
}
.archived-group header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}
.archived-group header strong {
  font-weight: 500;
}
.archived-group header span {
  margin-left: auto;
  color: var(--color-text-subtle);
}
.archived-list {
  border: 1px solid var(--color-border);
  border-radius: 16px;
  padding: 0 16px;
}
.archived-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 0;
}
.archived-row + .archived-row {
  border-top: 1px solid var(--color-border);
}
.archived-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 0;
}
.archived-copy strong {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-weight: 500;
}
.archived-copy small {
  color: var(--color-text-subtle);
}
.archived-diagnostic {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.archived-delete {
  display: flex;
  color: var(--color-text-subtle);
  padding: 6px;
}
.archived-restore {
  padding: 7px 14px;
  border-radius: 14px;
  background: var(--color-surface-muted);
}
.archived-tasks .run-error {
  white-space: pre-wrap;
}
.archived-delete-backdrop {
  z-index: 49;
}
.archived-delete-dialog {
  z-index: 50;
}

.chatgpt-connection {
  padding: 14px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
}
.chatgpt-connection p {
  margin: 0 0 12px;
}
.chatgpt-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.chatgpt-actions > button {
  box-sizing: border-box;
  font-size: var(--text-body);
  line-height: 1.5;
}
.chatgpt-login-pending {
  margin-top: 14px;
}
.chatgpt-login-pending button {
  margin: 0 8px 12px 0;
}

[data-theme="dark"] .provider-actions-menu {
  --provider-menu-background: #2b2b2b;
  --provider-menu-hover: #363636;
  --provider-menu-danger: #ff5c5c;
}
[data-theme="dark"] .model-config-dialog {
  --model-control-hover: rgba(255, 255, 255, 0.05);
}

/* ZCode task list variants have distinct geometry; the default list is flat. */
.sidebar-task-list-region {
  display: flex;
  flex: 1;
  min-height: 0;
  flex-direction: column;
  border-top: 1px solid color-mix(in srgb, var(--color-border) 50%, transparent);
  padding-top: 12px;
}
.sidebar-task-toolbar {
  display: flex;
  flex-shrink: 0;
  min-width: 0;
  align-items: center;
  gap: 4px;
  padding: 0 8px 8px;
  color: var(--color-text-subtle);
}
.sidebar-list-title {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding-inline: 10px;
  font-size: var(--ui-font-size);
  font-weight: 500;
  line-height: 1.5;
}
.sidebar-task-toolbar-actions {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: 4px;
}
.sidebar .task-view-trigger,
.sidebar .task-group-toggle {
  border: 1px solid transparent;
  background-clip: padding-box;
  line-height: 1.625;
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border-radius: 6px;
  color: var(--color-text-subtle);
}
.sidebar .task-view-trigger:hover,
.sidebar .task-group-toggle:hover:not(:disabled),
.sidebar .task-view-trigger[aria-expanded="true"] {
  background: var(--preview-hover);
  color: var(--color-foreground);
}
.task-view-menu {
  font-size: 16px;
  width: max-content;
  min-width: 128px;
  line-height: 1.5;
}
.task-view-menu:focus {
  box-shadow:
    0 4px 6px -1px rgb(0 0 0 / 0.1),
    0 2px 4px -2px rgb(0 0 0 / 0.1);
}
.task-list-rows {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.sidebar .project {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0;
}
.sidebar .project + .project {
  margin-top: 0;
}
.sidebar .session-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  padding: 0;
  text-align: left;
}
.sidebar .session-name .task-title-overflow {
  width: 100%;
}
.task-row-time {
  flex-shrink: 0;
  text-align: right;
  margin-right: 2px;
  font-size: var(--text-small);
  line-height: 18px;
  color: var(--color-text-subtle);
  white-space: nowrap;
}
/* Derive interaction from the DOM so task reordering cannot retain stale hover state. */
.session-row .task-row-actions {
  display: none;
}
.session-row:is(:hover, :focus-within) .task-row-actions {
  display: inline-flex;
}
.session-row:is(:hover, :focus-within) .task-row-time {
  display: none;
}
@media (hover: none) {
  .session-row .task-row-actions {
    display: inline-flex;
  }
}
.task-row-actions {
  flex-shrink: 0;
  align-items: center;
}
.task-archive-hint {
  display: inline-flex;
}
.sidebar .task-row-actions .task-archive {
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  width: 24px;
  min-width: 24px;
  height: 24px;
  padding: 0;
  border-radius: 6px;
  color: var(--color-foreground);
}
.sidebar .task-row-actions .task-archive:disabled {
  opacity: 0.5;
}
.sidebar .task-row-actions .task-archive:hover {
  background: var(--preview-hover);
}
.sidebar .timeline-row {
  align-items: flex-start;
  padding: 6px 4px 6px 10px;
}
.timeline-row .task-leading-slot {
  margin-top: 2px;
}
.timeline-row-body {
  display: flex;
  flex: 1;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}
.sidebar .timeline-row .session-name {
  height: 21px;
  min-height: 21px;
  line-height: 21px;
}
.timeline-row-metadata {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 24px;
  gap: 8px;
}
.timeline-row-metadata > div {
  display: flex;
  flex-shrink: 0;
  align-items: center;
}
.task-workspace-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: var(--ui-font-size);
  color: var(--color-text-subtle);
}
.timeline-row .task-row-time {
  margin-right: 4px;
  font-size: var(--ui-font-size);
  line-height: 21px;
}
.task-idle-dot {
  width: 6px;
  height: 6px;
  background: var(--color-border);
  border-radius: 50%;
}
.timeline-tasks {
  display: flex;
  flex-direction: column;
}
.timeline-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.timeline-group-label {
  padding: 8px 12px 4px;
  font-size: var(--ui-font-size);
  line-height: 21px;
  font-weight: 500;
  color: var(--color-text-subtle);
}
.task-show-more {
  padding-left: 34px;
  cursor: pointer;
}
.project-task-list > .task-show-more {
  font-size: 16px;
  line-height: 24px;
}
.task-show-more-global {
  padding-bottom: 16px;
}
.sidebar .task-show-more button {
  padding: 0;
  color: var(--color-text-subtlest);
  font-size: var(--ui-font-size);
  line-height: 1.5;
}
.sidebar .task-show-more button:hover {
  color: var(--color-text-subtle);
  background: transparent;
}
.timeline-group + .timeline-group {
  margin-top: 4px;
}
.task-list-empty {
  padding: 8px 34px;
  font-family: var(--font-body);
  font-size: var(--ui-font-size);
  font-weight: 400;
  line-height: 1.5;
  color: var(--color-text-subtlest);
}
/* Timeline empty state is outside upstream's extra px-2 row wrapper. */
.task-list-empty-timeline {
  padding-inline: 26px;
}
.task-groups .task-list-empty {
  padding-inline: 12px;
  color: var(--color-text-subtle);
}

.provider-api-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.provider-api-field .settings-select-trigger {
  width: 100%;
  min-width: 0;
  justify-content: space-between;
  background: var(--color-input);
}
.provider-api-field .settings-select-trigger > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Keep the sidebar content at its expanded width throughout the 200ms reveal. */
.sidebar > :is(.sidebar-global, .sidebar-task-list-region, .sidebar-footer) {
  width: var(--sidebar-content-width);
  flex-shrink: 0;
}
@media (prefers-reduced-motion: reduce) {
  .workspace-surface > :is(.sidebar, .right-pane) {
    transition: none;
  }
}

.draft-composer-header {
  display: flex;
  align-items: center;
  gap: 12px;
}
.draft-environment {
  flex: 1;
  display: flex;
  align-items: center;
  padding-right: 6px;
}
.environment-trigger {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  margin-left: auto;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--color-text-subtle);
}
.environment-trigger:hover,
.environment-trigger[data-state="open"] {
  background: var(--color-active);
}
.environment-menu [data-radix-collection-item][data-disabled] {
  opacity: 0.5;
}
.environment-menu .environment-label {
  padding: 6px 12px;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-text-subtle);
  font-size: var(--text-small);
}
.worktree-branch-menu {
  display: flex;
  flex-direction: column;
  max-height: min(320px, var(--radix-dropdown-menu-content-available-height, 320px));
  overflow: hidden;
}
.worktree-branch-menu .draft-project-search {
  flex-shrink: 0;
}
.worktree-branch-menu .draft-project-options {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.environment-branch > span {
  flex: 0 0 auto;
}
.environment-branch small {
  min-width: 0;
  margin-left: auto;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: inherit;
  color: var(--color-text-subtle);
}
.environment-menu .environment-switch {
  flex: 0 0 32px;
  width: 32px;
  height: 18px;
  border-radius: 999px;
  background: var(--color-border);
  padding: 2px;
}
.environment-switch::after {
  content: "";
  display: block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--color-bg);
  transition: transform 0.15s;
}
.environment-switch[data-checked="true"] {
  background: var(--color-text);
}
.environment-switch[data-checked="true"]::after {
  transform: translateX(14px);
}
.side-chat-pane {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-width: 0;
  min-height: 0;
}
.side-chat-pane .conversation {
  flex: 1;
  min-height: 0;
}
.side-chat-pane .composer-container {
  padding: 12px;
}
.side-chat-pane .conversation-inner {
  padding-left: 20px;
  padding-right: 20px;
}
.side-chat-loading {
  padding: 24px;
  color: var(--color-text-subtle);
}
/* Adapted from ZCode ElicitationDialog and its Badge/Button/Textarea primitives. */
.user-question-card {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  gap: 12px;
  width: 100%;
  min-height: 0;
  max-height: min(72dvh, 42rem);
  overflow: hidden;
  padding: 12px;
  margin-bottom: 12px;
  border: 1px solid var(--color-border);
  border-radius: 16px;
  background: var(--color-popover);
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.05);
  outline: none;
  font-size: var(--text-body);
}
.question-scroll-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 4px;
}
.user-question-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.user-question-heading > div {
  flex: 1;
  min-width: 0;
  font-weight: 500;
  line-height: 20px;
}
.question-title {
  overflow-wrap: break-word;
  white-space: pre-wrap;
  line-height: 24px;
}
.question-badge {
  display: inline-flex;
  align-items: center;
  height: 20px;
  max-width: 160px;
  margin-right: 8px;
  padding: 2px 8px;
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: color-mix(in oklab, var(--color-input) 20%, transparent);
  font-weight: 500;
  line-height: 20px;
  vertical-align: baseline;
  white-space: nowrap;
  text-overflow: ellipsis;
}
[data-theme="dark"] .question-badge {
  background: color-mix(in oklab, var(--color-input) 30%, transparent);
}
.user-question-heading nav {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  gap: 4px;
  color: var(--color-text-subtlest);
  font-weight: 500;
  line-height: 1.25;
}
.user-question-heading nav > span {
  min-width: 40px;
  text-align: center;
  white-space: nowrap;
}
.user-question-heading nav button,
.question-collapsed-summary > button:last-child {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  color: inherit;
  transition: background-color 150ms;
}
.user-question-heading nav button:hover:not(:disabled),
.question-expand-text:hover,
.question-collapsed-summary > button:hover {
  background: var(--color-fill-hover);
}
.user-question-heading nav .question-collapse,
.question-expand-text,
.question-collapsed-summary {
  display: none;
}
.question-options {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.question-options > button,
.question-custom {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 8px 12px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  text-align: left;
  color: var(--color-text);
  outline: none;
  transition: background-color 150ms;
}
.question-options > button:hover,
.question-options > button[data-active="true"],
.question-custom:hover,
.question-custom[data-active="true"] {
  background: var(--color-fill-hover);
}
.question-options > button[data-selected="true"],
.question-custom[data-selected="true"] {
  background: var(--color-active);
}
.question-option-copy {
  flex: 1;
  min-width: 0;
  line-height: 1.5;
}
.question-options strong {
  font-weight: 500;
}
.question-option-description {
  margin-left: 8px;
  color: var(--color-text-subtle);
}
.question-number {
  width: 20px;
  flex-shrink: 0;
  font-weight: 500;
  color: var(--color-text-subtlest);
}
[data-selected="true"] > .question-number {
  color: var(--color-text);
}
.question-checkbox {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  border: 1px solid var(--color-border);
  border-radius: 4px;
}
.question-checkbox svg {
  visibility: hidden;
}
[data-selected="true"] > .question-checkbox {
  background: var(--color-text);
  color: var(--color-bg);
  border-color: var(--color-text);
}
[data-selected="true"] > .question-checkbox svg {
  visibility: visible;
}
.question-custom {
  cursor: text;
}
.question-custom > .question-number {
  align-self: flex-start;
  margin-top: 1px;
  line-height: 1.625;
}
.question-custom textarea {
  flex: 1;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  min-height: 20px;
  max-height: 5lh;
  height: auto;
  overflow-y: auto;
  resize: none;
  border: 1px solid transparent;
  border-radius: 0;
  padding: 0;
  outline: none;
  background: transparent;
  color: var(--color-text);
  font: inherit;
  font-weight: 500;
  line-height: 1.625;
  field-sizing: content;
}
.question-custom textarea::placeholder {
  color: var(--color-text-muted);
}
.user-question-card footer {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 4px;
}
.user-question-card footer > p {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
  margin: 0;
  color: var(--color-text-subtle);
}
.user-question-card footer > p svg {
  flex-shrink: 0;
  color: var(--color-text);
}
.user-question-card footer > div {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: 8px;
}
.user-question-card footer button {
  height: 32px;
  padding: 0 10px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: transparent;
  color: var(--color-text);
  font-weight: 500;
  line-height: 1.625;
  white-space: nowrap;
  transition: background-color 150ms;
}
.user-question-card footer button:hover:not(:disabled) {
  background: var(--color-fill-hover);
}
.user-question-card footer .primary {
  border-color: transparent;
  background: var(--color-text);
  color: var(--color-bg);
}
.user-question-card footer .primary:hover:not(:disabled) {
  background: color-mix(in oklab, var(--color-text) 80%, transparent);
}
.user-question-card button:disabled {
  opacity: 0.5;
  pointer-events: none;
}
.user-question-card .question-countdown {
  width: auto;
  min-width: 40px;
  height: 20px;
  padding: 0 6px;
  color: var(--color-text-subtle);
  background: var(--color-surface);
  border-radius: 4px;
  font-variant-numeric: tabular-nums;
}
@media (width < 768px) {
  .question-custom textarea,
  .question-custom > .question-number {
    line-height: 1.5;
  }
  .user-question-heading nav .question-collapse,
  .question-expand-text {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .question-expand-text {
    height: 20px;
    gap: 4px;
    margin-top: 8px;
    padding: 0 6px;
    border-radius: 4px;
    font-weight: 500;
  }
  .question-clamped {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
    overflow: hidden;
  }
  .user-question-card[data-expanded="false"] .question-scroll-body,
  .user-question-card[data-expanded="false"] footer {
    display: none;
  }
  .question-collapsed-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-width: 0;
    font-weight: 500;
    color: var(--color-text-subtlest);
  }
  .question-collapsed-summary > button:first-child {
    display: flex;
    flex: 1;
    min-width: 0;
    align-items: center;
    gap: 8px;
    padding: 2px 4px;
    border-radius: 8px;
    color: var(--color-text);
    text-align: left;
  }
  .question-collapsed-summary .question-badge {
    flex-shrink: 0;
    max-width: 128px;
    margin: 0;
  }
  .question-collapsed-summary > button:first-child > span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}
@media (width < 640px) {
  .user-question-card footer {
    flex-wrap: wrap;
  }
  .user-question-card footer > p {
    flex-basis: 100%;
  }
}
.task-question-badge {
  position: relative;
  display: inline-grid;
  overflow: hidden;
  border-radius: 5px;
  padding: 2px 6px;
  font-size: 11px;
  color: #195b89;
  background: #e1effa;
}
.task-question-badge::before {
  content: "";
  position: absolute;
  inset: 0;
  background: #c4e0f6;
  transform-origin: left;
}
.task-question-badge[data-progress="true"]::before {
  animation: question-progress 240s linear both;
  animation-delay: var(--question-elapsed);
}
.task-question-badge span {
  position: relative;
  grid-area: 1 / 1;
}
.task-question-badge span + span {
  visibility: hidden;
}
.task-question-badge[data-timed="true"]:is(:hover, :focus-visible) span:first-child {
  visibility: hidden;
}
.task-question-badge[data-timed="true"]:is(:hover, :focus-visible) span + span {
  visibility: visible;
}
.task-question-badge[data-timed="true"]:is(:hover, :focus-visible)::before {
  visibility: hidden;
}
[data-theme="dark"] .task-question-badge {
  color: #b4dcfa;
  background: #173346;
}
[data-theme="dark"] .task-question-badge::before {
  background: #254c69;
}
@keyframes question-progress {
  from {
    transform: scaleX(1);
  }
  to {
    transform: scaleX(0);
  }
}
@media (prefers-reduced-motion: reduce) {
  .task-question-badge[data-progress="true"]::before {
    animation: none;
  }
}
.session-row[data-question="true"] .task-row-time {
  display: inline-flex;
}
.session-row[data-question="true"] .task-row-actions {
  display: none;
}

.session-row[data-question="true"]:is(:hover, :focus-within) .task-row-actions {
  display: inline-flex;
}
.session-row[data-question="true"]:is(:hover, :focus-within) .task-row-time {
  display: none;
}

.pending-file-preview {
  min-height: 0;
  overflow: auto;
  padding: 0 16px 16px;
}
.pending-file-preview .tool-content-preview,
.pending-file-preview .tool-inline-diff,
.pending-file-preview .tool-parameters-code {
  max-height: none;
  mask-image: none;
}

/* ZCode SubagentsSection: grouped rows, Bot avatars, inline model overrides and profile form. */
.subagent-settings {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.subagent-settings-heading,
.subagent-settings-heading > div {
  display: flex;
  align-items: center;
  gap: 8px;
}
.subagent-settings-heading {
  justify-content: space-between;
  margin-bottom: 0;
}
.subagent-settings-heading h2 {
  margin: 0;
  font-size: var(--text-body);
  font-weight: 600;
}
.subagent-search {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  color: var(--color-text-subtle);
}
.subagent-search input {
  width: 100%;
  min-width: 0;
  background: transparent;
  border: 0;
}
.subagent-search:focus-within {
  border-color: var(--color-border-strong);
}
.subagent-settings-group {
  margin-top: 0;
}
.subagent-settings-group h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 16px;
  padding: 0 4px;
  font-size: var(--text-body);
  font-weight: 500;
}
.subagent-settings-group h3 small {
  color: var(--color-text-subtle);
  font-weight: 400;
}
.subagent-list {
  background: var(--color-surface);
  border-radius: 12px;
  overflow: hidden;
}
.subagent-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
}
.subagent-row + .subagent-row {
  border-top: 1px solid var(--color-border);
}
.subagent-row.editable:hover {
  background: var(--color-fill-hover);
}
.subagent-avatar {
  position: relative;
  width: 36px;
  height: 36px;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 12px;
  background: var(--color-bg);
  color: var(--color-text-subtle);
}
.subagent-avatar > span {
  position: absolute;
  bottom: -4px;
  right: -4px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 3px solid var(--color-surface);
  background: var(--agent-dot);
}
.subagent-row-copy {
  min-width: 0;
}
.subagent-row-copy strong,
.subagent-edit {
  font-weight: 500;
  font-size: var(--text-body);
}
.subagent-edit {
  padding: 0;
}
.subagent-row-copy p {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 2px 0 0;
  font-size: var(--text-small);
  color: var(--color-text-subtle);
  line-height: 1.5;
}
.subagent-tools-badge {
  display: inline-flex;
  align-items: center;
  margin-left: 8px;
  min-height: 20px;
  padding: 2px 6px;
  border-radius: 6px;
  box-shadow: 0 0 0 1px var(--color-border);
  background: var(--color-surface);
  color: var(--color-text-subtle);
  font-size: var(--text-small);
}
.subagent-row-actions,
.subagent-model-control {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.subagent-model-control {
  flex-wrap: wrap;
  justify-content: flex-end;
}
.subagent-model-control .settings-select-trigger {
  height: 32px;
  min-width: 0;
  max-width: 208px;
  border-radius: 8px;
}
.subagent-model-control .settings-select-trigger > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.subagent-empty {
  padding: 40px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
  font-size: var(--text-small);
  color: var(--color-text-subtle);
  border: 1px dashed var(--color-border);
  border-radius: 12px;
}
.subagent-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--color-border);
  border-radius: 12px;
}
.subagent-form label:not(.subagent-inject) {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.subagent-form input:not([type="checkbox"]),
.subagent-form textarea {
  width: 100%;
  padding: 8px 12px;
  background: var(--color-input);
  border: 1px solid var(--color-border);
  border-radius: 8px;
}
.subagent-form textarea {
  resize: vertical;
  min-height: 64px;
  max-height: 224px;
}
.subagent-form :is(input:not([type="checkbox"]), textarea):focus {
  border-color: var(--color-border-strong);
}
.subagent-form-scope {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
}
.subagent-form-identity {
  display: grid;
  grid-template-columns: minmax(192px, 224px) auto minmax(0, 1fr);
  align-items: start;
  gap: 12px;
}
.subagent-form-identity > div {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.subagent-form-identity .subagent-model-control {
  justify-content: flex-start;
}
.subagent-color-picker {
  display: flex;
  width: 224px;
  justify-content: space-between;
  padding: 4px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-input);
}
.subagent-color-picker label {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid transparent;
}
.subagent-color-picker label.selected {
  background: var(--color-surface);
  border-color: var(--color-border);
  box-shadow: 0 1px 2px #0001;
}
.subagent-color-picker span {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--agent-dot);
}
.subagent-tools-card {
  padding-top: 4px;
}
.subagent-tools-card > div:first-child {
  display: flex;
  justify-content: flex-start;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.subagent-tool-options {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px;
  margin-top: 8px;
  padding: 4px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  max-height: 288px;
  overflow: auto;
}
.subagent-tool-options button {
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  padding: 8px;
}
.subagent-tool-options button:hover {
  background: var(--color-fill-hover);
}
.subagent-check {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border: 1px solid var(--color-border);
  border-radius: 3px;
  color: transparent;
}
.subagent-check.selected {
  color: var(--color-bg);
  background: var(--color-text);
}
.subagent-tool-options i.risky {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  margin-left: auto;
  background: var(--color-danger);
}
.subagent-inject {
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 10px 12px;
  justify-content: space-between;
  display: flex;
  align-items: center;
  gap: 8px;
}
.subagent-form footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
@media (max-width: 1000px) {
  .subagent-form-identity {
    grid-template-columns: 1fr;
  }
  .subagent-row:has(.subagent-model-control) {
    grid-template-columns: auto minmax(0, 1fr);
  }
  .subagent-row > .subagent-model-control {
    grid-column: 1 / -1;
  }
}

.subagent-form .subagent-color-picker label {
  position: relative;
  flex-direction: row;
  gap: 0;
  cursor: pointer;
}
.subagent-color-picker input {
  position: absolute;
  inset: 0;
  opacity: 0;
  margin: 0;
  cursor: inherit;
}
/* ZCode ConversationStatusPanel: 34px capsule, 320px panel, independent sections. */
.task-activity {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 1;
  display: inline-flex;
  flex-direction: column;
  width: max-content;
  max-width: min(320px, calc(100cqw - 32px));
  max-height: 34px;
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: 16px;
  background: var(--color-popover);
  box-shadow: var(--shadow-menu);
  font-size: var(--text-body);
  color: var(--color-text);
  transition:
    border-radius 300ms ease-in-out,
    padding 300ms ease-in-out,
    background-color 300ms ease-in-out,
    box-shadow 300ms ease-in-out;
}
.task-activity[data-display-mode="panel"] {
  display: flex;
  width: 320px;
  max-height: min(64dvh, 512px);
}
.task-activity-controls {
  display: none;
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 10;
  align-items: center;
  gap: 4px;
}
.task-activity-control {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 6px;
}
.task-activity-menu {
  z-index: var(--layer-popover);
  width: 176px;
}
.task-activity-sections {
  display: none;
  flex: 1;
  min-height: 0;
  flex-direction: column;
  gap: 8px;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 8px;
}
.task-activity[data-display-mode="panel"] .task-activity-controls,
.task-activity[data-display-mode="panel"] .task-activity-sections {
  display: flex;
}
.task-activity-toggle {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  width: max-content;
  max-width: 100%;
  height: 32px;
  gap: 6px;
  padding: 0 12px 0 8px;
  border-radius: 0;
  text-align: left;
  white-space: nowrap;
}
.task-activity[data-display-mode="panel"] .task-activity-toggle {
  display: none;
}
.task-summary-icon {
  position: relative;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
.task-summary-icon > svg {
  position: absolute;
  inset: 0;
  transition: opacity 150ms;
}
.task-summary-icon > svg:last-child,
.task-activity-toggle:hover .task-summary-icon > svg:first-child,
.task-activity-toggle:focus-visible .task-summary-icon > svg:first-child {
  opacity: 0;
}
.task-activity-toggle:hover .task-summary-icon > svg:last-child,
.task-activity-toggle:focus-visible .task-summary-icon > svg:last-child {
  opacity: 1;
}
.task-status-section {
  min-width: 0;
  flex: none;
}
.task-status-section + .task-status-section {
  border-top: 1px solid var(--color-border);
  padding-top: 8px;
}
.task-section-header {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  min-width: 0;
  height: 32px;
  gap: 6px;
  margin-bottom: 2px;
  padding: 0 32px 0 8px;
}
.task-section-trigger {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  min-width: 0;
  gap: 4px;
  padding: 0;
  color: var(--color-text-subtle);
  text-align: left;
}
.task-section-trigger:hover:not(:disabled) {
  background: transparent;
}
.task-section-trigger > svg {
  opacity: 0;
  transition: opacity 150ms;
}
.task-section-trigger:hover > svg,
.task-section-trigger:focus-visible > svg {
  opacity: 1;
}
.task-section-summary {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  max-width: 100%;
  gap: 6px;
  font-size: var(--text-small);
  color: var(--color-text-subtlest);
}
.task-section-summary > span {
  flex-shrink: 0;
  white-space: nowrap;
}
.task-section-summary > span:first-child {
  flex-shrink: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.task-activity-list {
  min-height: 0;
  max-height: 192px;
  overflow-x: hidden;
  overflow-y: auto;
  padding-right: 4px;
}
.task-running-row {
  position: relative;
  display: flex;
  align-items: start;
  min-width: 0;
  gap: 8px;
  padding: 8px;
  border-radius: 8px;
}
.task-running-row:hover {
  background: var(--color-hover);
}
.task-row-open {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  border-radius: 8px;
  padding: 0;
}
.task-row-open:hover:not(:disabled) {
  background: transparent;
}
.task-running-row > svg {
  position: relative;
  z-index: 1;
  margin-top: 2px;
  color: var(--color-text-subtle);
  pointer-events: none;
}
.task-row-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex: 1;
  min-width: 0;
  flex-direction: column;
  gap: 6px;
  pointer-events: none;
}
.task-row-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 20px;
}
.task-row-detail {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  min-width: 0;
  gap: 4px 8px;
}
.task-row-elapsed {
  color: var(--color-text-subtle);
  font-variant-numeric: tabular-nums;
}
.task-stop {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  gap: 4px;
  height: 24px;
  padding: 0 6px;
  margin-left: auto;
  border: 1px solid transparent;
  border-radius: 6px;
  pointer-events: auto;
  line-height: 1.625;
  white-space: nowrap;
}
.task-stop .chat-loading-spinner {
  color: inherit;
}
.task-ended-container[data-separated="true"] {
  border-top: 1px solid var(--color-border);
  padding-top: 8px;
}
.task-ended {
  display: flex;
  align-items: center;
  width: 100%;
  gap: 8px;
  padding: 8px;
  border-radius: 8px;
  text-align: left;
}
.task-ended > svg,
.task-ended > span:last-of-type {
  color: var(--color-text-subtle);
}
.task-ended > span:last-of-type {
  margin-left: auto;
}
/* The status panel and both columns must query the same outer width, even when
   a classic scrollbar makes the nested conversation narrower at this breakpoint. */
@container task-layout (min-width: 1280px) {
  .task-activity[data-display-mode="auto"] {
    width: 320px;
    max-height: min(64dvh, 512px);
  }
  .task-activity[data-display-mode="auto"] .task-activity-controls,
  .task-activity[data-display-mode="auto"] .task-activity-sections {
    display: flex;
  }
  .task-activity[data-display-mode="auto"] .task-activity-toggle {
    display: none;
  }
  .task-body:has(.task-activity:not([data-display-mode="mini"])) .conversation-inner,
  .task-body:has(.task-activity:not([data-display-mode="mini"])) .composer-container {
    transform: translateX(-168px);
  }
}
.task-directory {
  display: flex;
  flex-direction: column;
  height: 100%;
}
.task-directory > h2 {
  margin: 0;
  padding: 12px 16px;
  font-size: var(--text-body);
  font-weight: 500;
  border-bottom: 1px solid var(--color-border);
}
.task-directory > div {
  padding: 12px 8px;
  overflow: auto;
}
.task-directory h3 {
  margin: 0;
  padding: 4px 12px;
  font-size: var(--text-small);
  color: var(--color-text-subtle);
  font-weight: 500;
}
.task-directory .task-load-more {
  display: block;
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  text-align: center;
}
.background-task-pane {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  font-size: var(--text-small);
}
.background-task-pane header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--color-border);
}
.background-task-pane header button {
  margin-left: auto;
  color: var(--color-text-subtle);
}
.background-task-command,
.background-task-pane p {
  padding: 8px 16px;
  margin: 0;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  color: var(--color-text-subtle);
}
.background-task-pane pre {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 12px 16px;
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.subagent-settings-heading .subagent-search {
  margin-left: auto;
  width: 256px;
}
.subagent-settings-group h3 .subagent-group-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}
.subagent-settings-group h3 button,
.subagent-create {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.subagent-row.editable {
  cursor: pointer;
}
.subagent-form footer button {
  height: 40px;
}
.subagent-form footer .subagent-delete {
  margin-right: auto;
  color: var(--color-danger);
}
.subagent-model-menu {
  min-width: 256px;
  max-height: 360px;
  overflow-y: auto;
}
.subagent-model-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--color-border);
}
.subagent-model-search input {
  border: 0;
  background: transparent;
  min-width: 0;
  width: 100%;
  outline: none;
}
.subagent-model-provider {
  display: flex;
  gap: 8px;
  padding: 8px 12px;
  color: var(--color-text-subtle);
  font-size: var(--text-small);
}
.subagent-model-menu [role="menuitem"] {
  display: flex;
  justify-content: space-between;
  padding: 6px 12px;
}
.subagent-model-menu [role="menuitem"][data-highlighted] {
  background: var(--color-fill-hover);
  outline: none;
}
.subagent-confirm {
  position: fixed;
  z-index: 120;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  box-shadow: 0 16px 48px #0003;
  width: 400px;
  padding: 24px;
}
.subagent-confirm h2 {
  font-size: 18px;
  margin: 0;
}
.subagent-confirm p {
  margin: 12px 0 24px;
}
.subagent-confirm footer {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.subagent-reasoning {
  display: flex;
  align-items: center;
  gap: 4px;
}

.subagent-scope-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  height: 32px;
  padding: 0 12px;
  background: var(--color-input);
}
.subagent-scope-trigger span {
  max-width: 192px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.subagent-scope-menu {
  width: 256px;
}
.subagent-scope-menu [role="menuitemradio"] {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
}
.subagent-scope-menu [role="menuitemradio"] > span:first-of-type {
  flex: 1;
}
.subagent-scope-menu [role="menuitemradio"][data-highlighted] {
  background: var(--color-fill-hover);
  outline: none;
}
.subagent-scope-menu [role="group"] > div:not([role]) {
  padding: 8px 12px;
  font-size: var(--text-small);
  color: var(--color-text-subtle);
}
.subagent-settings-heading:not(.editing) h2 {
  border-left: 1px solid var(--color-border);
  padding-left: 12px;
  font-weight: 500;
}
.subagent-settings-heading small {
  color: var(--color-text-subtle);
}
.subagent-settings-heading.editing h2 {
  font-size: 18px;
}

.subagent-empty strong {
  font-weight: 500;
  color: var(--color-text);
  font-size: var(--text-body);
}
.subagent-empty p {
  margin: 4px 0 0;
}
.subagent-create {
  font-size: var(--text-body);
  font-weight: 500;
}
.subagent-group-actions button,
.subagent-create {
  height: 32px;
  border-radius: 8px;
  padding: 0 12px;
}
.subagent-group-actions button:first-child {
  width: 32px;
  padding: 0;
  justify-content: center;
  border: 1px solid var(--color-border);
}
.subagent-search input::-webkit-search-cancel-button {
  appearance: none;
}
.subagent-tools-description {
  color: var(--color-text-subtle);
}
.subagent-tools-card .settings-select-trigger {
  width: fit-content;
}

/* ZCode CommandCenterDialog / quickPickStyles: same geometry, assets and type scale. */
.sidebar-global {
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
}
.sidebar-action-label {
  flex: 1;
  min-width: 0;
  text-align: left;
}
.sidebar-action-shortcut {
  color: var(--color-text-subtlest);
  font-size: var(--text-xs);
  white-space: nowrap;
}
.task-search-dialog {
  z-index: var(--layer-dialog);
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  width: min(512px, calc(100vw - 32px));
  max-height: calc(100dvh - 96px);
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: 16px;
  background: var(--color-popover);
  color: var(--color-foreground);
  box-shadow: var(--shadow-menu);
  outline: none;
}
.task-search-command {
  display: flex;
  flex-direction: column;
  padding: 2px;
  border-radius: 16px;
  overflow: hidden;
}
.task-search-header {
  padding: 8px;
  border-bottom: 1px solid var(--color-border);
}
.task-search-input-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  padding: 0 10px;
  border: 1px solid var(--color-border);
  border-radius: 9999px;
  background: var(--color-input);
  transition:
    border-color 150ms,
    background-color 150ms;
}
.task-search-input-wrap:hover {
  border-color: color-mix(in oklab, var(--color-foreground) 20%, transparent);
}
.task-search-input-wrap:focus-within {
  border-color: light-dark(#38bdf8, #0ea5e9);
  background: light-dark(#fafafa, #0a0a0a);
}
.task-search-input-wrap > svg {
  flex-shrink: 0;
  color: var(--color-text-subtlest);
}
.task-search-input-wrap input {
  width: 100%;
  min-width: 0;
  flex: 1;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--color-foreground);
  font-size: var(--text-body);
  line-height: 20px;
  outline: none;
  box-shadow: none;
}
.task-search-input-wrap input::placeholder {
  color: var(--color-text-subtlest);
}
.task-search-scopes {
  display: flex;
  gap: 4px;
  margin: 6px -4px 0;
  padding: 0 4px 2px;
  overflow-x: auto;
  scrollbar-width: none;
}
.task-search-scopes button {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  height: 24px;
  padding: 0 8px;
  border: 1px solid transparent;
  border-radius: 9999px;
  font-size: var(--text-body);
  font-weight: 500;
  line-height: 1;
  color: var(--color-text-subtle);
  transition: background-color 150ms;
}
.task-search-scopes button:hover {
  background: var(--color-fill-hover);
  color: var(--color-foreground);
}
.task-search-scopes button[aria-selected="true"] {
  border-color: var(--color-border);
  background: light-dark(rgb(10 10 10 / 0.1), rgb(255 255 255 / 0.1));
  color: var(--color-foreground);
}
.task-search-list {
  max-height: min(440px, calc(100dvh - 240px));
  padding: 2px 0;
  overflow-y: auto;
  overflow-x: hidden;
  scroll-padding: 4px;
  scrollbar-width: none;
  outline: none;
}
.task-search-group {
  padding: 4px;
  overflow: hidden;
}
.task-search-group [cmdk-group-heading] {
  padding: 6px 10px;
  font-size: var(--text-body);
  font-weight: 500;
  color: var(--color-text-subtle);
}
.task-search-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  padding: 6px 10px;
  border-radius: 12px;
  outline: none;
  font-size: var(--text-body);
  line-height: 1.625;
  cursor: default;
  user-select: none;
}
.task-search-item:hover,
.task-search-item[data-selected="true"] {
  background: var(--color-menu-hover);
  color: var(--color-foreground);
}
.task-search-item[data-disabled="true"] {
  opacity: 0.5;
  pointer-events: none;
}
.task-search-item > svg,
.task-search-item > img {
  flex-shrink: 0;
}
.task-search-icon {
  color: var(--color-text-subtle);
}
.task-search-title {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.task-search-task-text {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
  padding: 2px 0;
  justify-content: center;
}
.task-search-task-text .task-search-title {
  line-height: 20px;
  font-weight: 400;
}
.task-search-snippet {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 16px;
  color: var(--color-text-subtle);
}
.task-search-metadata {
  margin-left: auto;
  max-width: 45%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: var(--text-body);
  line-height: 1;
  color: var(--color-text-subtle);
}
.task-search-timestamp {
  flex-shrink: 0;
  max-width: 48px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: var(--text-small);
  color: var(--color-text-subtlest);
}
.task-search-shortcut {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 16px;
  min-width: 28px;
  padding: 0 4px;
  border-radius: 2px;
  background: light-dark(rgb(10 10 10 / 0.03), rgb(255 255 255 / 0.05));
  color: var(--color-text-subtle);
  line-height: 1;
}
.task-search-empty {
  padding: 20px 16px;
  text-align: center;
  font-size: var(--text-body);
  color: var(--color-text-subtle);
}
.task-search-more {
  margin-top: 2px;
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  width: 100%;
  padding: 0 10px 0 32px;
  border-radius: 12px;
  text-align: left;
  font-size: var(--text-body);
  color: var(--color-text-subtle);
}
.task-search-more:hover {
  background: var(--color-hover);
  color: var(--color-foreground);
}
.task-search-highlight {
  border-radius: 2px;
  background: light-dark(#f0f9ff, #082f49);
  color: var(--color-foreground);
  font-weight: 600;
}
.task-search-history-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px 0;
  font-size: var(--text-small);
  font-weight: 500;
  color: var(--color-text-subtle);
}
.task-search-history-heading button {
  margin-left: auto;
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  color: var(--color-text-subtlest);
}
.task-search-history {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  overflow: hidden;
  padding: 4px 44px 8px 12px;
  max-height: 34px;
}
.task-search-history.expanded {
  max-height: min(200px, calc(100dvh - 240px));
  overflow-y: auto;
}
.task-search-history-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 20px;
  max-width: 176px;
  flex-shrink: 0;
  padding: 2px 8px;
  border: 1px solid var(--color-border);
  border-radius: 9999px;
  font-size: var(--text-body);
  line-height: 1;
  color: var(--color-text-subtle);
}
.task-search-history-chip span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.task-search-history-chip span:first-child:not(:last-child) {
  font-family: var(--font-code);
  font-size: var(--text-xs);
  color: light-dark(#38bdf8, #0ea5e9);
}
.task-search-history-expand {
  position: absolute;
  right: 12px;
  top: 4px;
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  color: var(--color-text-subtle);
}
.task-search-history button:hover,
.task-search-history-heading button:hover {
  background: var(--color-fill-hover);
  color: var(--color-foreground);
}
@media (width < 640px) {
  .task-search-dialog {
    top: 64px;
    max-height: calc(100dvh - 72px);
  }
}

.task-search-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.task-search-added {
  color: var(--color-diff-added);
}
.task-search-removed {
  color: var(--color-diff-removed);
}

/* ZCode 3c5b2276 grouped actions stay before search and view in the list header. */
.task-groups {
  min-width: 0;
}
.task-group {
  position: relative;
  padding-top: 10px;
}
.task-group-header {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 32px;
  margin-bottom: 2px;
  padding: 0 4px 0 6px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--color-foreground);
  font-size: var(--ui-font-size);
  cursor: pointer;
}
.task-group-header:hover {
  background: var(--color-active);
}
.task-group-title-wrap {
  display: flex;
  flex: 1;
  align-items: center;
  min-width: 0;
  gap: 4px;
}
.task-group-title-wrap > svg {
  flex-shrink: 0;
  color: var(--color-text-subtlest);
}
.sidebar .task-group-title {
  min-width: 0;
  max-width: 100%;
  flex: 0 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: transparent;
  padding: 0 4px;
  border-radius: 2px;
  font-weight: 400;
  font-size: inherit;
  color: inherit;
}
.task-group-name-input {
  min-width: 24px;
  max-width: 100%;
  padding: 0 4px;
  border: 0;
  border-radius: 2px;
  background: transparent;
  color: var(--color-foreground);
  font: inherit;
  outline: 1px solid var(--color-border-strong);
}
.task-group-color-mark,
.task-group-color-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: light-dark(var(--group-300), color-mix(in oklab, var(--group-dark) 32%, transparent));
  color: light-dark(var(--group-900), var(--group-50));
}
.task-group-color-dot {
  width: 10px;
  height: 10px;
}
[data-group-color="gray"] {
  --group-300: oklch(87.1% 0.006 286.286);
  --group-dark: oklch(70.5% 0.015 286.067);
  --group-900: oklch(27.4% 0.006 286.033);
  --group-50: oklch(96.7% 0.001 286.375);
  --group-500: oklch(55.2% 0.016 285.938);
  --group-dark-rail: 55%;
}
[data-group-color="red"] {
  --group-300: oklch(81% 0.117 11.638);
  --group-dark: oklch(71.2% 0.194 13.428);
  --group-900: oklch(41% 0.159 10.272);
  --group-50: oklch(96.9% 0.015 12.422);
  --group-500: oklch(64.5% 0.246 16.439);
}
[data-group-color="orange"] {
  --group-300: oklch(83.7% 0.128 66.29);
  --group-dark: oklch(75% 0.183 55.934);
  --group-900: oklch(40.8% 0.123 38.172);
  --group-50: oklch(98% 0.016 73.684);
  --group-500: oklch(70.5% 0.213 47.604);
}
[data-group-color="yellow"] {
  --group-300: oklch(87.9% 0.169 91.605);
  --group-dark: oklch(87.9% 0.169 91.605);
  --group-900: oklch(41.4% 0.112 45.904);
  --group-50: oklch(98.7% 0.022 95.277);
  --group-500: oklch(76.9% 0.188 70.08);
}
[data-group-color="green"] {
  --group-300: oklch(84.5% 0.143 164.978);
  --group-dark: oklch(76.5% 0.177 163.223);
  --group-900: oklch(37.8% 0.077 168.94);
  --group-50: oklch(97.9% 0.021 166.113);
  --group-500: oklch(69.6% 0.17 162.48);
}
[data-group-color="blue"] {
  --group-300: oklch(82.8% 0.111 230.318);
  --group-dark: oklch(74.6% 0.16 232.661);
  --group-900: oklch(39.1% 0.09 240.876);
  --group-50: oklch(97.7% 0.013 236.62);
  --group-500: oklch(68.5% 0.169 237.323);
}
[data-group-color="purple"] {
  --group-300: oklch(81.1% 0.111 293.571);
  --group-dark: oklch(70.2% 0.183 293.541);
  --group-900: oklch(38% 0.189 293.745);
  --group-50: oklch(96.9% 0.016 293.756);
  --group-500: oklch(60.6% 0.25 292.717);
}
.sidebar .task-group-color-trigger {
  width: 20px;
  height: 20px;
  padding: 0;
  border-radius: 50%;
  flex-shrink: 0;
}
.task-group-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  padding: 2px 6px;
  border-radius: 999px;
  background: light-dark(rgba(230, 230, 230, 0.5), rgba(54, 54, 54, 0.5));
  color: var(--color-text-subtle);
  font-size: var(--text-small);
  font-weight: 500;
  line-height: 1;
}
.sidebar .task-group-new-task,
.grouped-task-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  padding: 0;
  color: var(--color-text-subtle);
  border-radius: 6px;
}
.grouped-task-archive-hint {
  display: inline-flex;
}
.grouped-task-actions button:disabled {
  opacity: 0.45;
}
.task-group-content {
  margin-left: 16px;
  border-left: 1px solid
    light-dark(
      color-mix(in oklab, var(--group-500) 70%, transparent),
      color-mix(in oklab, var(--group-dark) var(--group-dark-rail, 52%), transparent)
    );
  padding: 1px 0 1px 8px;
}
.task-group-footer-drop {
  height: 10px;
}
.sidebar .task-group-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  height: 32px;
  padding: 8px;
  border: 1px dashed var(--color-border);
  border-radius: 8px;
  font-size: var(--ui-font-size);
  color: var(--color-text-subtle);
  white-space: nowrap;
}
.sidebar .task-group-empty:hover {
  background: var(--color-active);
  color: var(--color-foreground);
  border-color: var(--color-border-strong);
}
.grouped-task-wrapper {
  padding: 1px 0;
  border: 1px solid transparent;
  border-radius: 8px;
}
.grouped-task-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  height: 28px;
  padding: 0 4px 0 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: var(--ui-font-size);
  color: var(--color-foreground);
  cursor: pointer;
}
.grouped-task-row.active,
.grouped-task-row:hover {
  background: var(--color-active);
}
.grouped-task-metadata {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  flex-shrink: 0;
  font-size: var(--text-small);
  color: var(--color-text-subtle);
}
.grouped-task-time {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-right: 4px;
}
.grouped-task-actions {
  display: none;
  align-items: center;
  gap: 2px;
}
.grouped-task-row:hover .grouped-task-time,
.grouped-task-row:focus-within .grouped-task-time {
  display: none;
}
.grouped-task-row:hover .grouped-task-actions,
.grouped-task-row:focus-within .grouped-task-actions {
  display: flex;
}
.grouped-task-actions button:hover {
  background: var(--color-active);
  color: var(--color-foreground);
}
.grouped-task-row[data-dragging="true"],
.task-group-header[data-dragging="true"] {
  opacity: 0;
}
.task-group-drag-overlay {
  pointer-events: none;
  cursor: grabbing;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  box-shadow: 0 8px 20px #0002;
}
.task-group-context-menu {
  width: 176px;
}
.task-group-color-menu {
  width: 160px;
  min-width: 160px;
}
.grouped-task-context-menu {
  width: 224px;
}
.task-group-move-menu {
  width: 208px;
}
.task-group-move-menu .menu-item {
  justify-content: flex-start;
}
.task-group-move-title,
.task-group-overlay-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.task-group-overlay-title {
  flex: 1;
  padding: 0 4px;
}
.task-group-drag-overlay .task-group-count {
  flex-shrink: 0;
}
.menu-sub-arrow {
  margin-left: auto;
}
.task-group-header svg,
.grouped-task-row svg {
  stroke-width: 1.5;
}
.task-group-header:focus-visible,
.grouped-task-row:focus-visible {
  outline: 1px solid var(--color-border-strong);
}
.task-group-virtual-list {
  position: relative;
  width: 100%;
  overflow-anchor: none;
}
.task-group-virtual-row {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
}
.task-group[data-group-collapsed="false"] .task-group-header {
  position: sticky;
  top: 4px;
  z-index: 5;
}
.task-group-header.task-group-header-sticky {
  background: var(--color-bg);
  border-color: var(--color-border);
  box-shadow: 0 1px 3px #0002;
}
.task-groups[data-drag-active="true"] .task-group-header {
  position: relative;
  top: auto;
}
.grouped-draft-row {
  border-style: dashed;
  border-color: light-dark(#16a34a33, #4ade8033);
  background: light-dark(#16a34a1a, #4ade801a);
}
.grouped-draft-title {
  min-width: 0;
  flex: 1;
  color: var(--color-text-subtlest);
}
.grouped-draft-workspace {
  max-width: 96px;
  padding: 2px 6px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  border-radius: 999px;
  background: light-dark(#e6e6e680, #36363680);
  color: var(--color-text-subtle);
  font-size: var(--text-small);
}
.grouped-draft-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
}
.grouped-draft-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: light-dark(#22c55e, #4ade80);
}
.grouped-draft-close button {
  display: none;
}
.grouped-draft-row:hover .grouped-draft-dot,
.grouped-draft-row:focus-within .grouped-draft-dot {
  display: none;
}
.grouped-draft-row:hover .grouped-draft-close button,
.grouped-draft-row:focus-within .grouped-draft-close button {
  display: flex;
  padding: 0;
  width: 24px;
  height: 24px;
  align-items: center;
  justify-content: center;
}
.task-group-name-editor {
  display: inline-grid;
  min-width: 24px;
  max-width: 100%;
  overflow: hidden;
}
.task-group-name-measure {
  grid-area: 1 / 1;
  visibility: hidden;
  padding: 0 4px;
  white-space: pre;
}
.task-group-name-editor .task-group-name-input {
  grid-area: 1 / 1;
  width: 100%;
  min-width: 0;
}

/* ZCode ShortcutSettingsSection: 28px controls, 20px keycaps, 1fr/1fr/80/72 grid.
 * Its en document resolves Chinese to PingFang SC; keep zh-CN semantics and match that font locally. */
.shortcut-settings {
  font-family: "PingFang SC", var(--font-body);
  display: flex;
  flex-direction: column;
  gap: 16px;
  font-size: var(--text-body);
}
.shortcut-settings svg {
  stroke-width: 1.5;
}
.shortcut-settings .shortcut-search-bar {
  display: flex;
  gap: 8px;
}
.shortcut-settings .shortcut-search {
  position: relative;
  flex: 1;
  min-width: 0;
}
.shortcut-settings .shortcut-search > svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-text-subtle);
  pointer-events: none;
}
.shortcut-settings .shortcut-search input {
  width: 100%;
  min-width: 0;
  height: 28px;
  padding: 2px 36px;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  outline: none;
  background: var(--color-input);
  color: var(--color-text);
  font: var(--text-body) / 1.625 var(--font-code);
}
.shortcut-settings .shortcut-search:has(.shortcut-search-clear) input {
  padding-right: 64px;
}
.shortcut-settings .shortcut-search input::placeholder {
  color: var(--color-text-subtlest);
}
.shortcut-settings .shortcut-search input:hover,
.shortcut-settings .shortcut-search input:focus-visible {
  border-color: var(--color-focus);
}
.shortcut-settings .shortcut-search input[data-key-filter="true"] {
  color: var(--color-primary);
}
.shortcut-settings .shortcut-key-search,
.shortcut-settings .shortcut-search-clear {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  padding: 4px;
  border-radius: 2px;
  color: var(--color-text-subtle);
}
.shortcut-settings .shortcut-key-search {
  right: 10px;
}
.shortcut-settings .shortcut-search-clear {
  right: 36px;
  padding: 2px;
}
.shortcut-settings .shortcut-key-search[aria-pressed="true"] {
  color: var(--color-primary);
  background: var(--color-active);
}
.settings-action-button,
.shortcut-settings .shortcut-reset {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  gap: 4px;
  height: 28px;
  padding: 0 8px;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  white-space: nowrap;
  line-height: 1.5;
}
.shortcut-settings .shortcut-reset svg {
  margin-right: 8px;
}
.settings-action-button:hover:not(:disabled),
.shortcut-settings .shortcut-reset:hover:not(:disabled) {
  border-color: var(--color-border-strong);
  background: var(--color-fill);
}
.settings-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.settings-help {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  padding: 0;
  color: var(--color-text-subtlest);
}
.settings-help:hover:not(:disabled),
.settings-help:focus-visible {
  color: var(--color-text);
}
.settings-help-tooltip {
  max-width: min(320px, calc(100vw - 24px));
}
.settings-heading-title {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.settings-page-heading,
.shortcut-settings .shortcut-settings-heading {
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: var(--text-small);
  color: var(--color-text-subtle);
}
.settings-page-heading h1,
.shortcut-settings .shortcut-settings-heading h1 {
  color: var(--color-text);
  margin: 0;
}
.settings-page-heading .settings-enable,
.shortcut-settings .shortcut-enable {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--color-text);
}
.settings-page-heading {
  flex-wrap: wrap;
}
.settings-page-heading .settings-enable {
  margin-left: auto;
  white-space: nowrap;
}
.web-search-settings .settings-page-heading,
.subagent-settings > .settings-page-heading {
  margin-bottom: 0;
}
.model-provider-section .model-settings-toolbar {
  justify-content: flex-end;
}
.shortcut-settings .shortcut-table-scroll {
  overflow-x: auto;
  border: 1px solid var(--color-border);
  border-radius: 12px;
}
.shortcut-settings .shortcut-table {
  min-width: 480px;
  width: 100%;
  display: block;
  border-collapse: collapse;
}
.shortcut-settings .shortcut-table :is(thead, tbody) {
  display: block;
}
.shortcut-settings .shortcut-table :is(th, td) {
  text-align: left;
  font-weight: 400;
}
.shortcut-settings .shortcut-table-header,
.shortcut-settings .shortcut-setting-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 80px 72px;
  align-items: center;
  padding: 12px 16px;
}
.shortcut-settings .shortcut-table-header {
  background: var(--color-fill);
  color: var(--color-text-subtle);
  font-size: var(--text-small);
  line-height: 1.5;
}
.shortcut-settings .shortcut-setting-row {
  border-top: 1px solid var(--color-border);
}
.shortcut-settings .shortcut-command {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding-right: 8px;
}
.shortcut-settings .shortcut-binding-cell {
  min-width: 0;
  padding-right: 8px;
}
.shortcut-settings .shortcut-binding {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--color-text-subtle);
}
.shortcut-settings .shortcut-recorder {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  width: fit-content;
  padding: 4px 0;
  border-radius: 8px;
  text-align: left;
}
.shortcut-settings kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  width: fit-content;
  height: 20px;
  padding: 0 4px;
  border-radius: 4px;
  background: transparent;
  color: var(--color-text);
  font: 500 var(--text-xs) / 1.5 var(--font-body);
  pointer-events: none;
  user-select: none;
}
.shortcut-settings [data-customized="true"] kbd {
  color: var(--color-primary);
}
.shortcut-settings .shortcut-recorder:hover:not(:disabled) {
  background: transparent;
}
.shortcut-settings .shortcut-recorder.recording kbd {
  height: auto;
  padding: 4px 8px;
  border-radius: 6px;
  background: var(--color-fill);
  font: var(--text-small) / 1.5 var(--font-code);
}
.shortcut-settings .shortcut-recorder[aria-invalid="true"] kbd {
  color: var(--color-error);
}
.shortcut-settings .shortcut-edit,
.shortcut-settings .shortcut-clear {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  color: var(--color-text);
}
.shortcut-settings .shortcut-clear {
  width: 28px;
  height: 28px;
}
.shortcut-settings .shortcut-edit:hover:not(:disabled),
.shortcut-settings .shortcut-clear:hover:not(:disabled) {
  background: var(--color-fill-hover);
}
.shortcut-settings .shortcut-scope {
  font-size: var(--text-small);
  color: var(--color-text-subtle);
}
.shortcut-settings [data-disabled="true"] .shortcut-binding {
  opacity: 0.5;
}
.settings-action-button:disabled,
.shortcut-settings button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.shortcut-settings .shortcut-record-hint,
.shortcut-settings .shortcut-record-error {
  display: block;
  font-size: var(--text-xs);
  color: var(--color-text-subtlest);
  overflow-wrap: anywhere;
}
.shortcut-settings .shortcut-record-error {
  font-size: var(--text-small);
  color: var(--color-error);
}
.shortcut-settings .shortcut-empty {
  display: flex;
  justify-content: center;
  border-top: 1px solid var(--color-border);
  padding: 32px 16px;
  text-align: center;
  color: var(--color-text-subtle);
  font-size: var(--text-small);
}
.shortcut-settings .shortcut-settings-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}
.shortcut-settings .shortcut-settings-footer button {
  flex-shrink: 0;
  height: 28px;
  padding: 0 8px;
}
.shortcut-settings .shortcut-notice {
  margin: 0;
  font-size: var(--text-small);
  color: var(--color-text-subtle);
}
@media (max-width: 600px) {
  .shortcut-settings .shortcut-search-bar {
    flex-wrap: wrap;
  }
  .shortcut-settings .shortcut-search {
    flex-basis: 100%;
  }
  .shortcut-settings .shortcut-reset {
    margin-left: auto;
  }
  .shortcut-settings .shortcut-settings-footer {
    align-items: flex-start;
  }
}
.task-row-shortcut {
  font: inherit;
}
.session-row[data-shortcut="true"] .task-row-time {
  display: block;
}
.session-row[data-shortcut="true"] .task-row-actions {
  display: none;
}
.grouped-task-tooltip {
  display: flex;
  align-items: center;
  gap: 4px;
}
.grouped-task-tooltip > span:first-of-type {
  max-width: 192px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.task-group-body-grid {
  display: grid;
  grid-template-rows: 1fr;
  opacity: 1;
  overflow: hidden;
  transition:
    grid-template-rows 200ms ease-out,
    opacity 200ms ease-out;
}
.task-group-body-grid[data-collapsed="true"] {
  grid-template-rows: 0fr;
  opacity: 0;
}
.task-group-body {
  min-height: 0;
  overflow: hidden;
}
@media (prefers-reduced-motion: reduce) {
  .task-group-body-grid {
    transition: none;
  }
}

.composer-container {
  position: relative;
}
.model-performance {
  position: absolute;
  inset-inline: 16px;
  bottom: 2px;
  height: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  max-width: 1024px;
  margin-inline: auto;
  color: var(--color-text-muted);
  font-size: 10px;
  line-height: 12px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.side-chat-pane .model-performance {
  inset-inline: 12px;
  bottom: 0;
}
.model-stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  max-width: 100%;
  height: 12px;
  padding: 0 2px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--color-text-muted);
  font: inherit;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
button.model-stat-pill:hover,
.model-stat-pill[data-state="open"] {
  background: var(--color-fill-hover);
  color: var(--color-text-subtle);
}
.model-stat-pill svg {
  width: 10px;
  height: 10px;
  flex: none;
}
.model-stat-title svg {
  width: 14px;
  height: 14px;
  flex: none;
}
.model-stat-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.model-stat-separator {
  margin: 0 4px;
  color: var(--color-border);
}
.model-stat-dialog {
  z-index: 1100;
  box-sizing: border-box;
  width: max-content;
  min-width: min(300px, calc(100vw - 24px));
  max-width: min(440px, calc(100vw - 24px));
  padding: 16px;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  background: var(--color-popover);
  box-shadow: var(--shadow-popover);
  font-size: 12px;
  line-height: 18px;
  color: var(--color-text-subtle);
}
.model-stat-title {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 10px;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-text);
  font-weight: 500;
}
.model-stat-title span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.model-stat-dialog dl {
  display: grid;
  grid-template-columns: minmax(76px, auto) minmax(0, 1fr);
  gap: 6px 16px;
  margin: 0;
  color: var(--color-text-muted);
}
.model-stat-dialog dt,
.model-stat-dialog dd {
  min-width: 0;
  margin: 0;
}
.model-stat-dialog dd {
  color: var(--color-text-subtle);
  font-variant-numeric: tabular-nums;
  text-align: right;
}

/* File and diff previews share ZCode's quiet breadcrumb toolbar. */
.preview-header {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  height: 40px;
  min-width: 0;
  padding: 0 6px 0 12px;
  gap: 8px;
  background: color-mix(in oklab, var(--color-fill) 30%, transparent);
}
.preview-breadcrumb {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
  gap: 2px;
  overflow-x: auto;
  scrollbar-width: none;
  white-space: nowrap;
  color: var(--color-text-muted);
  font-size: var(--text-body);
}
.preview-breadcrumb::-webkit-scrollbar {
  display: none;
}
.preview-breadcrumb > *,
.preview-path-segment > * {
  flex-shrink: 0;
}
.preview-breadcrumb strong {
  color: var(--color-text);
  font-weight: 400;
}
.preview-breadcrumb .lucide-chevron-right {
  color: var(--color-text-subtlest);
}
.preview-path-file {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding-right: 12px;
}
.preview-path-segment {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}
.preview-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.preview-header-actions button {
  height: 28px;
  border-radius: 8px;
  color: var(--color-text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.preview-header-actions button:hover {
  background: var(--color-fill-hover);
  color: var(--color-text);
}
.preview-header-actions .preview-icon-button {
  width: 28px;
  padding: 0;
}
.preview-source {
  padding: 0 8px;
  white-space: nowrap;
  font-size: var(--text-body);
}
.preview-menu {
  width: 192px;
}
.preview-menu-check {
  margin-left: auto;
}
.preview-menu-separator {
  height: 1px;
  background: var(--color-border);
  margin: 4px 0;
}
.file-text-preview > diffs-container {
  font-size: 12px;
  --diffs-font-size: 12px;
  --diffs-line-height: 20px;
  --diffs-bg: var(--color-bg);
  --diffs-light-bg: var(--color-bg);
  --diffs-dark-bg: var(--color-bg);
  --diffs-font-family: var(--font-code);
}
.pane-tab-diff-badge {
  flex: none;
  margin-left: 2px;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  padding: 0 4px;
  font-size: var(--text-xs);
  line-height: 12px;
  color: var(--color-text-muted);
  background: var(--color-fill);
}
.file-comment-card {
  margin: 8px;
  padding: 12px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: 1.5;
  box-shadow: 0 1px 2px #0000000d;
}
.file-comment-range {
  margin-bottom: 8px;
  color: var(--color-text-muted);
}
.file-comment-card textarea {
  width: 100%;
  min-height: 64px;
  resize: none;
  padding: 8px;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  font: inherit;
  color: inherit;
  background: var(--color-bg);
}
.file-comment-text {
  line-height: 1.625;
  white-space: pre-wrap;
}
.file-comment-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 8px;
}
.file-comment-actions button {
  color: var(--color-text-muted);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 8px;
  border-radius: 6px;
}
.file-comment-actions button:hover {
  color: var(--color-text);
  background: var(--color-fill-hover);
}
.file-comment-actions .primary {
  background: var(--color-primary);
  color: var(--color-bg);
}
.file-comment-actions kbd {
  opacity: 0.6;
  font-size: 11px;
}

.file-image-preview {
  overflow: hidden;
  padding: 40px;
  background-color: var(--color-bg);
  background-image:
    linear-gradient(45deg, var(--color-surface) 25%, transparent 25%),
    linear-gradient(-45deg, var(--color-surface) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, var(--color-surface) 75%),
    linear-gradient(-45deg, transparent 75%, var(--color-surface) 75%);
  background-position:
    0 0,
    0 4px,
    4px -4px,
    -4px 0;
  background-size: 8px 8px;
}
.file-media-container {
  display: flex;
  flex: 1;
  min-height: 0;
  align-items: center;
  justify-content: center;
  overflow: auto;
  background: var(--color-bg);
  padding: 24px;
}
.file-media-container .file-media-preview {
  padding: 0;
  max-height: 100%;
  max-width: 100%;
  border-radius: 8px;
}
.file-media-container audio {
  width: 100%;
  max-width: 672px;
}
.file-markdown-preview {
  padding: 16px;
}

.preview-menu-label {
  padding: 6px 8px;
  font-size: 12px;
  color: var(--color-text-muted);
}
.file-image-preview .file-svg-preview {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.preview-breadcrumb[data-mask="left"] {
  mask-image: linear-gradient(to right, transparent, black 12px);
}
.preview-breadcrumb[data-mask="right"] {
  mask-image: linear-gradient(to right, black calc(100% - 12px), transparent);
}
.preview-breadcrumb[data-mask="both"] {
  mask-image: linear-gradient(to right, transparent, black 12px, black calc(100% - 12px), transparent);
}
.file-text-preview > .file-image-preview {
  height: 100%;
}

.preview-header-divider {
  border-bottom: 1px solid var(--color-border);
}

.preview-menu .menu-item {
  position: relative;
  justify-content: flex-start;
  gap: 8px;
  padding: 6px 8px;
}
.preview-menu [role="menuitemcheckbox"],
.preview-menu [role="menuitemradio"] {
  padding-right: 32px;
}
.preview-menu-check {
  position: absolute;
  right: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
}

.file-mermaid-preview {
  min-height: 100%;
  padding: 16px;
  background: var(--color-bg);
}

/* ZCode ProjectNode title is one folder/name trigger and the sortable activator. */
.sidebar .project-title {
  gap: 4px;
  padding-left: 0;
}
.sidebar .project-toggle-title {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex: 1;
  min-width: 0;
  height: 32px;
  padding: 0 4px 0 10px;
  gap: 8px;
  touch-action: none;
}
.project-toggle-title > svg {
  flex-shrink: 0;
}
.project-toggle-title > span:first-of-type {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.project-unread-dot {
  width: 6px;
  height: 6px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--color-file-link);
}
/* The viewport already contributes upstream's 8px inset. */
.project-drop-indicator {
  pointer-events: none;
  position: absolute;
  left: 12px;
  right: 0;
  z-index: 20;
  height: 2px;
  background: var(--color-file-link);
}
.project-drop-indicator.before {
  top: 0;
  transform: translateY(-50%);
}
.project-drop-indicator.after {
  bottom: 0;
  transform: translateY(50%);
}
.project-drop-indicator > span {
  position: absolute;
  left: -4px;
  top: 50%;
  width: 8px;
  height: 8px;
  transform: translateY(-50%);
  border-radius: 50%;
  border: 2px solid var(--color-file-link);
  background: var(--color-sidebar, var(--color-bg));
}

.task-list-header-icon {
  width: 14px;
  height: 14px;
}
.task-view-option-icon,
.task-view-check-icon {
  width: 16px;
  height: 16px;
}
.task-view-option-icon {
  color: var(--color-text-subtle);
}

.task-view-menu .parity-menu-radio {
  font-size: var(--ui-font-size);
}

.sidebar .section-toggle {
  touch-action: none;
}
.sidebar-purpose-section + .sidebar-purpose-section {
  margin-top: 12px;
}
.sidebar .projects:has(.project) {
  padding-bottom: 0;
}