.canvas-layout {
  display: flex;
  flex: 1;
  min-height: 0;
  min-width: 0;
  position: relative;
  overflow: hidden;
  width: 100%;
}
.canvas-chat {
  display: flex;
  flex: 1;
  min-width: 0;
  min-height: 0;
}
.canvas-panel {
  color: var(--color-text-primary);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  min-width: 300px;
  min-height: 0;
  border-left: 1px solid var(--color-border-subtle);
  background: var(--color-base);
}
.canvas-divider {
  position: relative;
  width: 0;
  flex: none;
  cursor: col-resize;
  touch-action: none;
}
.canvas-divider::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 -2px;
  width: 5px;
  z-index: 1;
}
.canvas-divider:hover::after,
.canvas-divider:focus-visible::after {
  background: var(--color-accent);
}
.canvas-header {
  flex: 0 0 var(--shell-header-height);
  height: var(--shell-header-height);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 8px;
  background: var(--color-raised);
  min-width: 0;
}
.canvas-tabs {
  min-width: 0;
  display: flex;
  overflow-x: auto;
  flex: 1;
  align-items: center;
  gap: 6px;
  scrollbar-width: thin;
}
.canvas-tab {
  display: flex;
  align-items: center;
  flex: none;
  height: 32px;
  max-width: 220px;
  border-radius: var(--radius-sm);
  padding: 0 3px 0 10px;
  color: var(--color-text-muted);
}
.canvas-tab.active {
  background: var(--color-surface-high);
  color: var(--color-text-primary);
}
.canvas-tab:not(.active):hover {
  background: var(--color-raised-hover);
}
.canvas-panel button,
.canvas-code-open,
.canvas-reopen {
  color: inherit;
  background: transparent;
  border: 0;
  cursor: pointer;
  border-radius: 6px;
  padding: 6px;
  display: inline-flex;
  gap: 6px;
  align-items: center;
}
.canvas-panel button:hover,
.canvas-code-open:hover {
  background: var(--color-raised-hover);
}
.canvas-tab button[role="tab"] {
  min-width: 0;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: block;
  align-self: stretch;
  padding: 0 10px 0 0;
  border-radius: var(--radius-xs);
  font-size: var(--font-size-label);
}
.canvas-tab button[role="tab"]:hover {
  background: transparent;
}
.canvas-tab button:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: -2px;
}
.canvas-tab-content {
  min-width: 0;
  display: flex;
  flex: 1;
  min-height: 0;
  flex-direction: column;
  overflow: hidden;
}
.canvas-tab-content[hidden] {
  display: none;
}
.canvas-reader-tools {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px;
  border-bottom: 1px solid var(--color-border-subtle);
  font-size: 12px;
  flex: none;
}
.canvas-state {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  gap: 12px;
  padding: 24px;
  flex-direction: column;
  text-align: center;
  color: var(--color-text-muted);
}
.canvas-document {
  overflow: auto;
  padding: 24px;
  flex: 1;
  min-height: 0;
  overflow-wrap: anywhere;
}
.canvas-notice {
  padding: 8px 16px;
  font-size: 12px;
  color: var(--color-text-muted);
}
.canvas-code {
  overflow: auto;
  flex: 1;
  min-height: 0;
  font-size: 12px;
}
.canvas-code pre {
  margin: 0;
  padding: 12px 0;
  min-width: max-content;
}
.canvas-code pre > div {
  display: flex;
  min-height: 1.6em;
  padding-right: 16px;
}
.canvas-code code {
  white-space: pre;
  tab-size: 4;
}
.canvas-line-number {
  user-select: none;
  flex: none;
  width: 4.5em;
  text-align: right;
  padding-right: 1.5em;
  color: var(--color-text-muted);
}
.canvas-selected-line {
  background: var(--color-raised-hover);
  border-left: 2px solid var(--color-ember);
}
.canvas-code-wrap pre {
  min-width: 0;
}
.canvas-code-wrap code {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  min-width: 0;
}
.canvas-image-view {
  min-width: 0;
  display: flex;
  flex: 1;
  min-height: 0;
  flex-direction: column;
}
.canvas-image-stage {
  overflow: auto;
  flex: 1;
  min-height: 0;
  padding: 16px;
  touch-action: none;
}
.canvas-image-stage img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  margin: auto;
  user-select: none;
}
.canvas-attachment {
  display: inline-flex;
  vertical-align: middle;
  align-items: center;
  gap: 10px;
  max-width: 260px;
  padding: 8px;
  border: 1px solid var(--color-border-subtle);
  border-radius: 13px;
  color: inherit;
  background: transparent;
  text-decoration: none;
  cursor: pointer;
  font: inherit;
  text-align: left;
  min-width: 0;
}
.canvas-attachment:hover {
  background: var(--color-raised-hover);
}
.canvas-attachment img {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 6px;
}
.canvas-attachment > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.canvas-attachment small {
  display: block;
  font-size: 11px;
  white-space: normal;
  color: var(--color-text-muted);
}
.tr-images {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
.canvas-is-expanded > .canvas-chat,
.canvas-is-expanded > .canvas-divider {
  display: none;
}
.canvas-is-expanded > .canvas-panel {
  color: var(--color-text-primary);
  flex-shrink: 0;
  width: 100% !important;
  border-left: 0;
}
.canvas-reopen {
  position: absolute;
  right: 8px;
  top: 8px;
  background: var(--color-raised);
}
.canvas-code-open {
  position: absolute;
  top: 6px;
  left: 10px;
  font-size: 11px;
}
.canvas-code .hljs-keyword,
.canvas-code .hljs-selector-tag {
  color: var(--color-ember);
}
.canvas-code .hljs-string,
.canvas-code .hljs-attr {
  color: var(--color-diff-add-fg);
}
.canvas-code .hljs-number,
.canvas-code .hljs-literal {
  color: var(--color-ember);
}
.canvas-code .hljs-comment {
  color: var(--color-text-muted);
}
.canvas-code .hljs-title,
.canvas-code .hljs-built_in {
  color: var(--color-accent-bright);
}
@media (max-width: 850px) {
  .canvas-is-open > .canvas-chat,
  .canvas-is-open > .canvas-divider {
    display: none;
  }
  .canvas-is-open > .canvas-panel {
    color: var(--color-text-primary);
    flex-shrink: 0;
    width: 100% !important;
    min-width: 0;
    border: 0;
  }
  .canvas-document {
    padding: 16px;
  }
}

.canvas-header > button,
.canvas-reader-tools > button {
  flex-shrink: 0;
  min-width: 32px;
  min-height: 32px;
  justify-content: center;
}
.canvas-tab > button:last-child {
  flex: none;
  width: 26px;
  height: 26px;
  padding: 0;
  justify-content: center;
  color: var(--color-text-muted);
}
.canvas-tab > button:last-child:hover {
  color: var(--color-text-primary);
}
.canvas-panel button svg {
  flex: none;
}

.lifecycle-menu {
  position: relative;
  display: inline-flex;
  flex: none;
}

.lifecycle-trigger {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: none;
  border-radius: var(--radius-xs);
  background: transparent;
  color: var(--color-text-muted);
  cursor: pointer;
}

.lifecycle-trigger:hover,
.lifecycle-trigger[aria-expanded="true"] {
  background: var(--color-base-hover);
  color: var(--color-text-primary);
}

.lifecycle-trigger svg {
  stroke-width: var(--icon-stroke-width);
}

.lifecycle-popover {
  position: fixed;
  z-index: 40;
  display: flex;
  flex-direction: column;
  min-width: 180px;
  max-width: calc(100vw - 16px);
  overflow-y: auto;
  padding: 4px;
  background: var(--color-raised);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-md);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.lifecycle-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border: none;
  border-radius: var(--radius-xs);
  background: transparent;
  color: var(--color-text-primary);
  font-size: var(--font-size-label);
  text-align: left;
  cursor: pointer;
}

.lifecycle-item:hover:not(:disabled) {
  background: var(--color-base-hover);
}

.lifecycle-item:disabled {
  color: var(--color-text-muted);
  cursor: not-allowed;
}

.lifecycle-item--danger:hover:not(:disabled) {
  background: var(--color-diff-del-bg);
  color: var(--color-diff-del-fg);
}

.lifecycle-item svg {
  stroke-width: var(--icon-stroke-width);
}

.lifecycle-error {
  margin: 4px 6px;
  padding: 4px 8px;
  border-radius: var(--radius-xs);
  background: var(--color-diff-del-bg);
  color: var(--color-diff-del-fg);
  font-size: var(--font-size-small);
}

.lifecycle-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
}

.lifecycle-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 360px;
  max-width: calc(100vw - 48px);
  padding: 20px;
  background: var(--color-raised);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-dialog);
}

.lifecycle-panel-title {
  font-size: var(--font-size-large);
  color: var(--color-text-primary);
}

.lifecycle-panel-body {
  margin: 0;
  color: var(--color-text-muted);
  font-size: var(--font-size-label);
  line-height: 1.5;
}

.lifecycle-panel-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.lifecycle-input {
  height: 32px;
  padding: 0 10px;
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-sm);
  background: var(--color-base);
  color: var(--color-text-primary);
  font-size: var(--font-size-label);
}

.lifecycle-input:focus {
  outline: none;
  border-color: var(--color-accent);
}

.lifecycle-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--color-text-muted);
  font-size: var(--font-size-label);
  cursor: pointer;
}

.lifecycle-button {
  height: 30px;
  padding: 0 14px;
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-sm);
  background: var(--color-base);
  color: var(--color-text-primary);
  font-size: var(--font-size-label);
  cursor: pointer;
}

.lifecycle-button:hover:not(:disabled) {
  background: var(--color-base-hover);
}

.lifecycle-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.lifecycle-button--primary {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: var(--color-ink-on-fill);
}

.lifecycle-button--primary:hover:not(:disabled) {
  background: var(--color-accent-bright);
}

.lifecycle-button--danger {
  background: var(--color-danger);
  border-color: var(--color-danger);
  color: var(--color-ink-on-fill);
}

.lifecycle-resume-affordance {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 260px;
  height: 24px;
  padding: 0 10px;
  border: 1px solid var(--color-accent);
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--color-accent);
  font-size: var(--font-size-small);
  cursor: pointer;
}

.lifecycle-resume-affordance:hover:not(:disabled) {
  background: var(--color-base-hover);
}

.lifecycle-resume-affordance:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.lifecycle-resume-affordance svg {
  flex: none;
  stroke-width: var(--icon-stroke-width);
}

.lifecycle-resume-affordance span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lifecycle-attention {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 6px;
}

.lifecycle-attention-label {
  padding: 1px 8px;
  border: 1px solid var(--color-ember);
  border-radius: var(--radius-pill);
  color: var(--color-ember);
  font-size: var(--font-size-telemetry);
}

.lifecycle-attention-action {
  height: 22px;
  padding: 0 8px;
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-xs);
  background: transparent;
  color: var(--color-text-primary);
  font-size: var(--font-size-small);
  cursor: pointer;
}

.lifecycle-attention-action:hover:not(:disabled) {
  background: var(--color-base-hover);
}

.lifecycle-attention-action:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.conversation-indicator-slot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
}
.conversation-indicator {
  display: inline-block;
  box-sizing: border-box;
  flex: 0 0 6px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
}
.conversation-indicator--unread {
  background: var(--color-accent);
}
.conversation-indicator--working {
  border: 1.5px solid var(--color-accent);
  border-right-color: transparent;
  animation: conversation-spin 0.8s linear infinite;
}
.conversation-indicator--waiting {
  border: 1.5px solid var(--color-ember);
}
.conversation-indicator--unknown {
  border: 1px solid var(--color-text-muted);
}
@keyframes conversation-spin {
  to { transform: rotate(360deg); }
}
@media (prefers-reduced-motion: reduce) {
  .conversation-indicator--working { animation: none; }
}

.session-list-page {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
}

.session-filters {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
}

.session-filters select,
.session-filters input {
  height: 28px;
  padding: 0 8px;
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-sm);
  background: var(--color-base);
  color: var(--color-text-primary);
  font-size: var(--font-size-small);
  line-height: 28px;
}

.session-filters select {
  cursor: pointer;
}

.session-filters input {
  flex: 1 1 200px;
  min-width: 0;
}

.session-filters input::placeholder {
  color: var(--color-text-muted);
}

.session-sync {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  color: var(--color-text-muted);
  font-size: var(--font-size-small);
}

.session-sync-spinner {
  color: var(--color-ember);
  animation: session-spin 1s linear infinite;
}

@keyframes session-spin {
  to {
    transform: rotate(360deg);
  }
}

.session-note {
  flex: 0 0 auto;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  background: var(--color-base);
  color: var(--color-ember);
  font-size: var(--font-size-small);
}

.session-empty {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 48px 16px;
  color: var(--color-text-muted);
  text-align: center;
}

.session-empty p {
  margin: 0;
  font-size: var(--font-size-body);
}

.session-empty-link {
  color: var(--color-accent);
  font-size: var(--font-size-small);
  text-decoration: none;
  cursor: pointer;
}

.session-empty-link:hover {
  text-decoration: underline;
}

.session-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.session-row-line {
  display: flex;
  align-items: center;
  gap: 2px;
  width: 100%;
}

.session-row-line > .session-item {
  flex: 1 1 auto;
  min-width: 0;
}

.session-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  height: 36px;
  padding: 0 10px;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--color-text-primary);
  font-size: var(--font-size-label);
  text-align: left;
  cursor: pointer;
}

.session-item:hover {
  background: var(--color-base-hover);
}

.session-item--active,
.session-item--active:hover {
  background: var(--color-surface-high);
}

.session-dot {
  flex: 0 0 auto;
  width: 6px;
  height: 6px;
  border-radius: var(--radius-pill);
}

.session-dot--live {
  background: var(--color-accent-bright);
}

.session-dot--idle {
  background: var(--color-text-muted);
}

.session-item-title {
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.session-item-meta {
  display: flex;
  flex: 1 0 auto;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
  color: var(--color-text-muted);
  font-size: var(--font-size-small);
}

.session-item-model {
  overflow: hidden;
  max-width: 180px;
  font-family: var(--font-mono);
  font-size: var(--font-size-code);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.session-item-project {
  overflow: hidden;
  max-width: 160px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.session-badge {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  padding: 0 8px;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  line-height: 1.7;
  color: var(--color-text-muted);
  font-size: var(--font-size-small);
}

.session-badge--live {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.session-badge--stopped {
  border-color: var(--color-border-strong);
}

.session-badge--discovered {
  border-color: var(--color-ember);
  color: var(--color-ember);
}

.session-badge--active {
  color: var(--color-accent);
}

.session-badge--idle {
  color: var(--color-text-muted);
}

.session-badge--approvals {
  border-color: var(--color-ember);
  color: var(--color-ember);
}

.composer {
  --composer-radius: 24px;
  --composer-inset: 10px;
  --composer-action-size: 26px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  padding: var(--composer-inset);
  background: var(--color-raised);
  border: 0.5px solid var(--color-border-strong);
  border-radius: var(--composer-radius);
}

.composer-input {
  resize: none;
  field-sizing: content;
  overflow-y: auto;
  flex-shrink: 0;
  /* Preserve the existing rows=2 height when native sizing ignores rows. */
  min-height: max(40px, calc(3em + 4px));
  padding: 2px 6px;
  border: none;
  background: transparent;
  color: var(--color-text-primary);
  font-family: var(--font-ui);
  font-size: var(--font-size-body);
  font-weight: var(--font-weight-regular);
  line-height: 1.5;
  outline: none;
}

.composer-input::placeholder {
  color: var(--color-text-muted);
}

.composer-input:disabled {
  opacity: 0.6;
}

.composer-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-height: 26px;
}

.composer-spacer {
  flex: 1 1 auto;
}

.composer-chip-anchor {
  position: relative;
  display: inline-flex;
}

.composer-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 26px;
  padding: 0 9px;
  border: none;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--color-text-primary);
  font-size: var(--font-size-body);
  font-weight: var(--font-weight-regular);
  white-space: nowrap;
}

span.composer-chip {
  cursor: default;
}

button.composer-chip {
  cursor: pointer;
}

button.composer-chip:hover:not(:disabled) {
  background: var(--color-base-hover);
}

button.composer-chip:disabled {
  cursor: default;
}

.composer-chip svg {
  flex: none;
  stroke-width: var(--icon-stroke-width);
}

.composer-chip-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 13px;
}

.composer-chip-suffix {
  flex: none;
  overflow: hidden;
  max-width: 160px;
  color: var(--color-text-muted);
  text-overflow: ellipsis;
}

.chip-popover {
  position: absolute;
  right: 0;
  bottom: calc(100% + 6px);
  z-index: 40;
  display: flex;
  flex-direction: column;
  min-width: 240px;
  max-height: 320px;
  padding: 6px;
  overflow-y: auto;
  background: var(--color-raised);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-sm);
}

.chip-popover--bottom {
  top: calc(100% + 6px);
  bottom: auto;
}

.model-menu {
  display: flex;
  flex-direction: column;
  min-height: 0;
  gap: 2px;
}
.model-menu-scroll {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-gutter: stable;
}

.model-settings {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.model-settings-select {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  width: 100%;
  padding: 6px 8px;
  border: 0;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--color-text-primary);
  cursor: pointer;
  text-align: left;
}
.model-settings-select:hover { background: var(--color-base-hover); }
.model-settings-name { max-width: 100%; overflow-wrap: anywhere; font-size: var(--font-size-label); }
.model-settings-change { display: flex; align-items: center; gap: 6px; color: var(--color-text-muted); font-size: var(--font-size-small); }
.model-settings-reasoning { padding: 0 8px; }
.model-settings-heading, .model-settings-scale { display: flex; justify-content: space-between; gap: 12px; font-size: var(--font-size-small); color: var(--color-text-muted); }
.model-settings-heading output { color: var(--color-text-primary); }
.model-settings-slider-wrap { position: relative; margin: 10px 0 6px; }
.model-settings-slider-ticks { position: absolute; inset: 0 12px; pointer-events: none; }
.model-settings-slider-tick { position: absolute; top: 50%; width: 4px; height: 4px; border-radius: var(--radius-pill); background: var(--color-text-primary); opacity: 0.35; transform: translate(-50%, -50%); }
.model-settings-slider { appearance: none; display: block; width: 100%; height: 24px; margin: 0; padding: 0; border: 0; border-radius: var(--radius-pill); cursor: pointer; }
.model-settings-slider::-webkit-slider-thumb { appearance: none; width: 24px; height: 24px; border: 2px solid var(--color-raised); border-radius: var(--radius-pill); background: var(--color-text-primary); box-shadow: 0 1px 3px rgb(0 0 0 / 0.2); }
.model-settings-slider::-moz-range-thumb { width: 20px; height: 20px; border: 2px solid var(--color-raised); border-radius: var(--radius-pill); background: var(--color-text-primary); }
.model-settings-slider:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 3px; }
.model-settings-slider:disabled { cursor: default; }
.model-settings-reset { padding: 6px 0; margin-top: 6px; border: 0; background: transparent; color: var(--color-text-muted); font-size: var(--font-size-small); cursor: pointer; }
.model-settings-reset:hover { color: var(--color-text-primary); }
.model-settings-unavailable { margin: 0; padding: 0 8px 8px; color: var(--color-text-muted); font-size: var(--font-size-small); }

.model-menu-search {
  position: relative;
  flex: none;
  z-index: 1;
  margin: 0 0 4px;
  padding: 0;
  background: var(--color-raised);
  border-bottom: none;
}

.model-menu-results {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.model-menu-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.model-menu-provider {
  padding: 6px 8px 2px;
  color: var(--color-text-muted);
  font-size: var(--font-size-small);
}

.model-menu-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 5px 8px;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--color-text-primary);
  font-size: var(--font-size-label);
  text-align: left;
  cursor: pointer;
}

.model-menu-row:hover,
.model-menu-row--active {
  background: var(--color-base-hover);
}

.model-menu-row-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.model-menu-row-provider {
  flex: none;
  max-width: 45%;
  overflow: hidden;
  color: var(--color-text-muted);
  font-size: var(--font-size-small);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.model-menu-hit {
  color: var(--color-accent-bright);
  font-weight: var(--font-weight-semibold);
}

.model-menu-row--exact {
  color: var(--color-accent-bright);
  font-size: var(--font-size-small);
}

.model-menu-state {
  padding: 2px 8px 6px;
  color: var(--color-text-muted);
  font-size: var(--font-size-small);
}

.model-menu-empty {
  padding: 6px 8px;
  color: var(--color-text-muted);
  font-size: var(--font-size-label);
}

.model-menu-thinking {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 4px;
  padding-top: 6px;
  border-top: 1px solid var(--color-border-subtle);
}

.model-menu-thinking-title {
  padding: 0 8px 2px;
  color: var(--color-text-muted);
  font-size: var(--font-size-small);
}

.model-menu-row--current {
  color: var(--color-accent-bright);
  font-weight: var(--font-weight-semibold);
}

.model-menu-input {
  box-sizing: border-box;
  width: 100%;
  height: 26px;
  padding: 0 8px;
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-sm);
  background: var(--color-base);
  color: var(--color-text-primary);
  font-size: var(--font-size-label);
}

.model-menu-input:focus {
  outline: none;
  border-color: var(--color-accent);
}

.model-menu-input::placeholder {
  color: var(--color-text-muted);
}

.composer-mic {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 26px;
  height: 26px;
  padding: 0;
  border: none;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--color-text-muted);
  cursor: pointer;
}

.composer-mic svg {
  stroke-width: var(--icon-stroke-width);
}

.composer-mic:hover {
  color: var(--color-text-primary);
}

.composer-send {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 26px;
  height: 26px;
  padding: 0;
  border: none;
  border-radius: var(--radius-pill);
  background: var(--color-accent);
  color: var(--color-ink-on-fill);
  cursor: pointer;
}

.composer-send svg {
  stroke-width: var(--icon-stroke-width);
}

.composer-send:hover:not(:disabled) {
  background: var(--color-accent-bright);
}

.composer-send:disabled {
  opacity: 0.5;
  cursor: default;
}

.composer-stop {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 1px solid var(--color-danger);
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--color-danger);
  cursor: pointer;
}

.composer-stop svg {
  stroke-width: var(--icon-stroke-width);
}

.composer-stop:hover {
  background: var(--color-diff-del-bg);
}

.composer-error {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  background: var(--color-diff-del-bg);
  border-radius: var(--radius-sm);
  color: var(--color-diff-del-fg);
  font-size: var(--font-size-label);
}

.composer-error-text {
  flex: 1 1 auto;
  min-width: 0;
  overflow-wrap: anywhere;
}

.composer-error-dismiss {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  padding: 0;
  border: none;
  border-radius: var(--radius-xs);
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.composer-error-dismiss:hover {
  background: var(--color-base-hover);
}

.composer-error-dismiss svg {
  stroke-width: var(--icon-stroke-width);
}
.composer {
  min-width: 0;
  border-width: 1px;
}
.composer-input {
  width: 100%;
  max-height: min(320px, 40dvh);
}

.composer-spacer {
  display: none;
}
.composer-chip-anchor {
  min-width: 0;
  max-width: 100%;
}
.composer-chip {
  min-width: 0;
  max-width: 100%;
  padding: 0 6px;
  font-size: var(--font-size-small);
  border-radius: var(--radius-pill);
}
.composer-chip-label {
  max-width: 220px;
}
.composer-chip-suffix {
  flex: 0 1 auto;
  max-width: 140px;
  font-size: 13px;
}
.composer-send {
  margin-left: 0;
  width: var(--composer-action-size);
  height: var(--composer-action-size);
}
.composer-chip-anchor--model {
  margin-left: auto;
}
.chip-popover {
  position: fixed;
  inset: auto;
  width: 320px;
  min-width: 0;
  max-width: calc(100vw - 16px);
  padding: 6px;
  overflow: auto;
  border-radius: var(--radius-md);
  z-index: 100;
  box-shadow: 0 8px 28px rgb(0 0 0 / 0.18);
  scrollbar-width: thin;
}
.model-menu-input {
  height: 32px;
}
.model-menu-row {
  min-height: 30px;
}
.model-menu-row--current {
  color: var(--color-text-primary);
  background: var(--color-raised-hover);
}
.model-menu-row--current::after {
  content: "✓";
  flex: none;
}

.chip-popover:has([data-model-view]) {
  padding: 10px;
  border-radius: var(--radius-md);
  overflow-x: hidden;
  scrollbar-gutter: stable;
}
.chip-popover:has([data-model-view="catalog"]) { overflow: hidden; }
[data-model-view] { animation: model-view-enter 160ms ease-out; }
.model-menu-search > .model-settings-reset {
  display: block;
  margin: 0 0 8px;
  padding: 6px 8px;
  width: 100%;
  text-align: left;
  border-radius: var(--radius-sm);
}
.model-menu-search > .model-settings-reset:hover { background: var(--color-base-hover); }
.model-menu-input { height: 32px; border-radius: var(--radius-pill); padding: 0 12px; font-size: var(--font-size-small); }
.model-menu-input:focus { border-color: var(--color-border-strong); box-shadow: none; }
.model-menu-provider { padding: 12px 8px 6px; font-size: var(--font-size-small); }
.model-menu-row { padding: 7px 8px; min-height: 32px; border-radius: var(--radius-sm); font-size: var(--font-size-small); }
.model-menu-hit { color: var(--color-text-primary); }
.model-menu-row--exact { color: var(--color-text-muted); }
@keyframes model-view-enter {
  from { opacity: 0; transform: translateY(3px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  [data-model-view] { animation: none; }
}
.chip-popover--folder {
  width: 340px;
}
@media (max-width: 760px) {
  .composer-chip-label {
    max-width: 150px;
  }
  .composer-chip-suffix {
    max-width: 100px;
  }
}

.composer-external > p {
  margin: 0 12px 8px;
  color: var(--color-text-muted);
  font-size: var(--font-size-small);
}
.composer-external-pill {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 48px;
  padding: 12px 18px;
}
.composer-external-harness {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: none;
}
.composer-external-model {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--color-text-muted);
}

.composer-permissions {
  min-width: 0;
  max-width: 240px;
  font-family: var(--font-ui);
  text-overflow: ellipsis;
}

.composer-model-harness {
  align-self: center;
  flex: none;
  margin-right: 4px;
  color: var(--color-text-muted);
  font-size: var(--font-size-label);
  white-space: nowrap;
}

.chip-popover.permission-popover {
  width: min(360px, calc(100vw - 32px));
}
.permission-menu {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 4px;
}
.permission-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--color-text-primary);
  text-align: left;
  cursor: pointer;
  font: inherit;
}
.permission-option:hover,
.permission-option[aria-pressed="true"] {
  background: var(--color-base-hover);
}
.permission-option:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: -2px;
}
.permission-option > span {
  min-width: 0;
}
.permission-option svg {
  flex-shrink: 0;
}
.permission-option-label {
  display: block;
  font-size: var(--font-size-label);
}
.permission-option-description {
  display: block;
  margin-top: 3px;
  font-size: var(--font-size-small);
  line-height: 1.4;
  color: var(--color-text-muted);
}

.permission-check--hidden {
  visibility: hidden;
}
.permission-option--check-left {
  justify-content: flex-start;
  gap: 8px;
}
.permission-option--check-left > svg {
  order: -1;
}

.settings-menu-heading {
  padding: 6px 8px;
  color: var(--color-text-muted);
  font-family: var(--font-ui);
  font-size: var(--font-size-small);
  font-weight: var(--font-weight-regular);
  line-height: 1.4;
}

[data-setting-tone="amber"] { --setting-color: var(--color-ember); }
[data-setting-tone="danger"] { --setting-color: var(--color-danger); }
button.composer-chip[data-setting-tone],
button.permission-option[data-setting-tone] {
  color: var(--setting-color);
}
[data-setting-tone] .permission-option-label,
[data-setting-tone] .permission-option-description,
button.composer-chip[data-setting-tone] svg {
  color: inherit;
}

.shell-endpoint {
  flex: 0 0 auto;
  align-self: flex-start;
  max-width: calc(100% - 16px);
  margin: 8px;
}
.shell-endpoint-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.shell-connection > svg {
  flex-shrink: 0;
}
.shell-endpoint-status {
  display: flex;
  flex: 0 0 auto;
  margin-left: 2px;
}
.endpoint-menu-heading {
  padding: 4px 10px 6px;
  font-size: var(--font-size-small);
  color: var(--color-text-muted);
}
.endpoint-menu-copy {
  flex: 1;
  overflow-wrap: anywhere;
}
.endpoint-menu-divider {
  border-top: 1px solid var(--color-border-subtle);
  margin: 4px 0;
}

/* Same local font and axes as the website header. */
@font-face {
  font-family: "Mandri Wordmark";
  src: url("/demos/assets/7e744849028e2219.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

.shell {
  display: flex;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  background: var(--color-base);
  color: var(--color-text-primary);
}

.shell-sidebar {
  display: flex;
  flex: 0 0 260px;
  flex-direction: column;
  width: 260px;
  padding: 4px 8px 10px 8px;
  overflow: hidden;
  background: var(--color-raised);
}

.shell-top {
  display: flex;
  flex: 0 0 36px;
  align-items: center;
  justify-content: space-between;
  height: 36px;
  padding: 0 0 0 8px;
}

.shell-brand {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  border: none;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.shell-brand-name {
  display: inline-block;
  font-family: "Mandri Wordmark", Georgia, serif;
  font-size: var(--font-size-logo);
  font-weight: 540;
  font-style: normal;
  font-optical-sizing: none;
  font-synthesis: none;
  font-variation-settings: "wght" 540, "opsz" 60, "SOFT" 45, "WONK" 0;
  letter-spacing: -0.034em;
  line-height: 1;
}

.shell-brand-chevron {
  color: var(--color-text-muted);
}

.shell-top-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.shell-icon-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--color-text-muted);
  cursor: pointer;
}

.shell-icon-button svg {
  stroke-width: var(--icon-stroke-width);
}

.shell-icon-button:hover {
  color: var(--color-text-primary);
}

.shell-nav {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  gap: 2px;
  margin-top: 8px;
}

.shell-row {
  display: flex;
  flex: 0 0 32px;
  align-items: center;
  gap: 10px;
  height: 32px;
  padding: 0 8px;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--color-text-muted);
  font-size: var(--font-size-label);
  font-weight: var(--font-weight-medium);
  line-height: 1;
  text-align: left;
  cursor: pointer;
}

.shell-row svg {
  stroke-width: var(--icon-stroke-width);
}

.shell-row:hover:not(:disabled) {
  background: var(--color-raised-hover);
  color: var(--color-text-primary);
}

.shell-row--active,
.shell-row--active:hover:not(:disabled) {
  background: var(--color-raised-hover);
  color: var(--color-text-primary);
}

.shell-row:disabled {
  opacity: 0.55;
  cursor: default;
}

.shell-section-label {
  flex: 0 0 auto;
  margin: 12px 0 6px;
  padding: 0 8px;
  font-size: var(--font-size-body);
  font-weight: var(--font-weight-regular);
  color: var(--color-text-muted);
}

.shell-projects {
  min-height: 0;
  scrollbar-width: thin;
  scrollbar-gutter: stable;
  padding-inline-end: 8px;
  display: flex;
  flex: 1 1 0;
  flex-direction: column;
  gap: 16px;
  overflow-y: auto;
}

.shell-project {
  flex: none;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.shell-project-heading {
  position: relative;
  display: flex;
  align-items: center;
  gap: 2px;
  border-radius: var(--radius-sm);
}

.shell-project-heading:hover,
.shell-project-heading:focus-within {
  background: var(--color-raised-hover);
}

.shell-project-heading .shell-project-row {
  flex: 1;
  min-width: 0;
  padding-right: 34px;
}

.shell-project-new {
  position: absolute;
  right: 4px;
  opacity: 0;
  transition: opacity 140ms ease-out;
}

.shell-project-heading:hover .shell-project-new,
.shell-project-heading:focus-within .shell-project-new {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .shell-project-new { transition: none; }
}

.shell-project-row {
  display: flex;
  flex: 0 0 28px;
  align-items: center;
  gap: 10px;
  height: 28px;
  padding: 0 8px;
  border: none;
  background: transparent;
  text-align: left;
  cursor: pointer;
  border-radius: var(--radius-sm);
  color: var(--color-text-primary);
  font-size: var(--font-size-label);
  font-weight: var(--font-weight-medium);
}

.shell-project-row svg {
  flex: 0 0 auto;
  stroke-width: var(--icon-stroke-width);
  color: var(--color-text-muted);
}

.shell-project-row:hover { background: var(--color-raised-hover); }
.shell-project-more {
  min-height: 28px;
  padding: 0 8px 0 34px;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--color-text-muted);
  font-size: var(--font-size-small);
  text-align: left;
  cursor: pointer;
}
.shell-project-more:hover { background: var(--color-raised-hover); color: var(--color-text-primary); }

.shell-project-row--active {
  color: var(--color-text-primary);
}

.shell-project-row--active svg {
  color: var(--color-ember);
  stroke-width: 1.5;
}

.shell-project-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shell-session-row {
  flex: 0 0 30px;
  min-width: 0;
  overflow: hidden;
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  height: 30px;
  padding: 0 8px;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--color-text-primary);
  font-size: var(--font-size-small);
  text-align: left;
  cursor: pointer;
}

.shell-session-icon-slot {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 14px;
  color: var(--color-text-muted);
  opacity: 0.65;
}

.shell-session-row:hover .shell-session-icon-slot,
.shell-session-row--active .shell-session-icon-slot {
  color: var(--color-text-primary);
  opacity: 1;
}

.shell-session-icon-slot svg {
  display: block;
  flex: none;
}

.shell-session-status-slot {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 18px;
}

.shell-session-status-slot > * {
  flex: none;
}

.shell-session-status-slot svg {
  display: block;
}

.shell-worktree-icon--integrated {
  color: var(--color-success);
}

.shell-session-row:hover {
  background: var(--color-raised-hover);
}

.shell-session-row--active,
.shell-session-row--active:hover {
  background: var(--color-raised-hover);
}

.shell-session-title {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--color-text-muted);
}

.shell-session-row .session-dot {
  margin: 0;
}

.shell-connection {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  align-self: flex-start;
  max-width: 100%;
  margin: 0;
  padding: 5px 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-pill);
  background: var(--color-raised);
  font-size: var(--font-size-small);
  color: var(--color-text-primary);
  cursor: pointer;
}
.shell-connection:hover { background: var(--color-base-hover); }
.shell-connection:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }

.status-dot {
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  border-radius: var(--radius-pill);
}

.status-dot--online {
  background: var(--color-accent);
}

.status-dot--connecting {
  background: var(--color-ember);
}

.status-dot--reconnecting {
  background: var(--color-ember);
}

.status-dot--offline {
  background: var(--color-danger);
}

.shell-main {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-width: 0;
}

.shell-header {
  display: flex;
  flex: 0 0 var(--shell-header-height);
  align-items: center;
  height: var(--shell-header-height);
  padding: 0 16px;
  background: var(--color-raised);
}

.shell-breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  flex: 1;
  font-size: var(--font-size-label);
}

.shell-header-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: none;
  margin-left: 12px;
}

.shell-header-actions .canvas-reopen {
  position: static;
  background: transparent;
}

.shell-breadcrumb-chevron {
  color: var(--color-text-muted);
}

.shell-breadcrumb-segment {
  overflow: hidden;
  color: var(--color-text-primary);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shell-breadcrumb-link {
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  text-decoration: none;
}

.shell-breadcrumb-link:hover,
.shell-breadcrumb-link:focus-visible {
  background: var(--color-raised-hover);
  text-decoration: none;
}

.shell-breadcrumb-segment--muted {
  color: var(--color-text-muted);
}

.shell-content {
  position: relative;
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  background: var(--color-base);
}

.shell-content-scroll {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  padding: 20px 24px;
  overflow: auto;
}

.shell-content-scroll:has(.pane-workspace--split) {
  --pane-spacing: 8px;
  padding: var(--pane-spacing);
}

.shell-placeholder {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  justify-content: center;
}

.shell-placeholder h1 {
  margin: 0;
  font-size: var(--font-size-title);
  font-weight: var(--font-weight-heading);
}

.shell-session-row--active .shell-session-title {
  color: var(--color-text-primary);
}
.shell-session-row .session-dot--idle {
  visibility: hidden;
}
@media (max-width: 760px) {
  .shell-sidebar {
    flex-basis: 208px;
    width: 208px;
  }
  .shell-content-scroll {
    padding: 16px;
  }
}
.shell-session-attention {
  flex: none;
  margin: 0;
  color: var(--color-ember);
  font-size: var(--font-size-small);
}

.shell-session-container {
  position: relative;
  border-radius: var(--radius-sm);
}
.shell-session-container:hover,
.shell-session-container--active {
  background: var(--color-raised-hover);
}
.shell-session-container > .shell-session-row {
  transition: padding-right 140ms ease-out;
}
.shell-session-container:hover > .shell-session-row,
.shell-session-container:focus-within > .shell-session-row,
.shell-session-container:has(.lifecycle-trigger[aria-expanded="true"]) > .shell-session-row {
  padding-right: 34px;
}
.shell-session-container .shell-session-icon-slot {
  transition: color 140ms ease-out, opacity 140ms ease-out;
}
.shell-session-container:hover .shell-session-icon-slot,
.shell-session-container:focus-within .shell-session-icon-slot {
  color: var(--color-text-primary);
  opacity: 1;
}
.shell-session-container > .lifecycle-menu {
  position: absolute;
  right: 4px;
  top: 3px;
}
.shell-session-container .lifecycle-trigger {
  opacity: 0;
  transition: opacity 140ms ease-out;
}
.shell-session-container:hover .lifecycle-trigger,
.shell-session-container:focus-within .lifecycle-trigger,
.shell-session-container .lifecycle-trigger[aria-expanded="true"] {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .shell-session-container > .shell-session-row,
  .shell-session-container .shell-session-icon-slot,
  .shell-session-container .lifecycle-trigger {
    transition: none;
  }
}

.shell-project-loading {
  padding: 6px 8px 6px 34px;
  color: var(--color-text-muted);
  font-size: var(--font-size-small);
}

.project-menu { position: relative; flex: none; }
.project-menu-trigger {
  display: grid; place-items: center; width: 28px; height: 28px;
  padding: 0; border: 0; border-radius: var(--radius-sm);
  color: var(--color-text-primary); background: transparent; cursor: pointer;
}
.project-menu-trigger:hover, .project-menu-trigger[aria-expanded="true"] { background: var(--color-raised-hover); }
.project-menu-panel {
  position: absolute; top: calc(100% + 6px); left: 0; z-index: 50;
  width: min(320px, calc(100vw - 48px)); box-sizing: border-box;
  padding: 12px; border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-md); background: var(--color-surface-high);
  color: var(--color-text-primary); box-shadow: 0 8px 24px #0003;
}
.project-menu-line { display: flex; align-items: center; gap: 8px; min-width: 0; }
.project-menu-line svg { flex: none; }
.project-menu-line strong, .project-menu-path span { overflow-wrap: anywhere; min-width: 0; }
.project-menu-counts { margin-top: 8px; }
.project-menu-counts svg, .project-menu-path svg { color: var(--color-text-muted); }
.project-menu-path { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--color-border-subtle); }

.agents-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--color-text-muted);
  padding-bottom: 12px;
  font-size: var(--font-size-small);
}
.agents-stop {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-xs);
  background: var(--color-raised);
  color: var(--color-text-primary);
  cursor: pointer;
  font-size: var(--font-size-small);
}
.agents-stop:disabled {
  opacity: 0.5;
  cursor: default;
}
.agents-stop:hover:not(:disabled) {
  background: var(--color-raised-hover);
}
.agents-parent {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  background: transparent;
  color: var(--color-text-primary);
  cursor: pointer;
  margin-right: auto;
}
.agents-readonly {
  margin: 0;
  padding: 10px;
  color: var(--color-text-muted);
  text-align: center;
  font-size: var(--font-size-small);
}
.agents-empty {
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.shell-agent-row {
  padding-left: 22px;
  font-size: var(--font-size-small);
}
.shell-agent-heading {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px 3px 22px;
  border: 0;
  background: transparent;
  color: var(--color-text-muted);
  cursor: pointer;
  font: inherit;
  font-size: var(--font-size-small);
}
.shell-agent-heading:hover {
  color: var(--color-text-primary);
}
.shell-agent-chevron--expanded {
  transform: rotate(90deg);
}

.shell-agent-row {
  align-items: center;
  flex-wrap: nowrap;
}
.shell-agent-row .shell-session-title {
  flex: 1;
  min-width: 0;
}

.native-command-palette { position: absolute; bottom: calc(100% + 10px); left: 0; right: 0; z-index: 25; padding: 6px; max-height: min(380px, 50vh); overflow-y: auto; background: var(--color-raised); border: 1px solid var(--color-border-strong); border-radius: var(--radius-composer); box-shadow: 0 10px 32px #0003; color: var(--color-text-primary); }
.native-command-palette header, .native-command-card header { display: flex; align-items: center; gap: 10px; }
.native-command-palette header { padding: 7px 10px 9px; color: var(--color-text-muted); font-size: 12px; justify-content: flex-end; }
.native-command-palette button { background: none; border: 0; color: inherit; cursor: pointer; display: inline-flex; padding: 4px; border-radius: 5px; }
.native-command-palette > [role="listbox"] { display: flex; flex-direction: column; gap: 4px; }
.native-command-option { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 10px; cursor: pointer; }
.native-command-option > div { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; column-gap: 12px; row-gap: 3px; align-items: baseline; }
.native-command-option strong { font-size: 14px; font-weight: 500; }
.native-command-option span { font-size: 13px; color: var(--color-text-muted); overflow-wrap: anywhere; }
.native-command-option small { flex-basis: 100%; color: var(--color-ember); }
.native-command-option[aria-selected="true"], .native-command-option:hover { background: var(--color-surface-high); }
.native-command-option[aria-disabled="true"] { cursor: default; opacity: .7; }
.native-command-palette footer { display: flex; justify-content: flex-end; color: var(--color-text-muted); padding: 4px 8px 2px; }
.native-command-palette > p { padding: 14px 12px; font-size: 13px; display: flex; align-items: center; gap: 8px; }
.native-command-history { margin: 12px auto; width: min(100%, 780px); display: grid; gap: 12px; }
.native-command-card { border: 1px solid var(--color-border-subtle); border-radius: var(--radius-lg); padding: 16px 18px; background: var(--color-raised); color: var(--color-text-primary); font-size: 14px; overflow-wrap: anywhere; }
.native-command-card header { font-size: 13px; }
.native-command-card header > strong { flex: 1; font-weight: 500; }
.native-command-state { color: var(--color-text-muted); display: flex; align-items: center; gap: 6px; font-size: 12px; }
.native-command-card[data-state="failed"] .native-command-state { color: var(--color-danger); }
.native-command-card[data-state="unknown"] .native-command-state { color: var(--color-ember); }
.native-command-card h3 { font-size: 16px; font-weight: 500; margin: 16px 0 10px; }
.native-command-card p { line-height: 1.6; margin-bottom: 0; }
.native-command-muted { color: var(--color-text-muted); font-size: 13px; }
.native-command-fields { margin-bottom: 0; }
.native-command-fields > div { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; padding: 10px 0; border-top: 1px solid var(--color-border-subtle); }
.native-command-fields dt { color: var(--color-text-muted); }
.native-command-fields dd { margin: 0; font-variant-numeric: tabular-nums; }
.native-command-items { list-style: none; padding: 0; margin-bottom: 0; }
.native-command-items li { padding: 11px 0; border-top: 1px solid var(--color-border-subtle); }
.native-command-items li strong { font-weight: 500; }
.native-command-items p { color: var(--color-text-muted); margin: 4px 0 0; font-size: 13px; }
.native-command-action, .native-command-primary { font: inherit; display: inline-flex; gap: 8px; align-items: center; cursor: pointer; color: var(--color-text-primary); background: var(--color-surface-high); border: 1px solid var(--color-border-strong); border-radius: 8px; padding: 8px 12px; }
.native-command-primary { background: var(--color-accent); color: var(--color-ink-on-fill); border-color: transparent; }
.native-command-primary:disabled { opacity: .5; cursor: default; }
.native-command-error { font-size: 13px; color: var(--color-danger); }
.native-command-error button { margin-left: 10px; font: inherit; color: inherit; border: 0; background: transparent; text-decoration: underline; cursor: pointer; }
.native-command-palette button:focus-visible, .native-command-action:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 3px; }
.native-command-spin { animation: native-command-spin 1s linear infinite; }
@keyframes native-command-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .native-command-spin { animation: none; } }
@media (max-width: 480px) { .native-command-option > div { display: grid; } .native-command-state { font-size: 11px; } }

.native-command-arguments { white-space: pre-wrap; }

.native-command-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  padding: 5px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--color-text-muted);
  cursor: pointer;
}
.native-command-close:hover { color: var(--color-text-primary); background: var(--color-surface-high); }
.native-command-close:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }

.attachment-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.attachment-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 240px;
  border: 1px solid var(--border-subtle, #8884);
  border-radius: calc(var(--composer-radius, 24px) - var(--composer-inset, 10px) - 1px);
  padding: 6px 8px;
  font-size: 12px;
}
.attachment-chip img {
  width: 36px;
  height: 36px;
  object-fit: cover;
  border-radius: 4px;
}
.attachment-chip span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.attachment-chip button {
  display: flex;
  background: none;
  color: inherit;
  border: 0;
  cursor: pointer;
  padding: 4px;
}
.attachment-add {
  flex-shrink: 0;
}
.session-file-error {
  color: var(--text-danger, #c44);
  font-size: 12px;
  margin-left: 6px;
}

.protection-selector {
  border: 0;
  padding: 0;
  margin: 18px 0 0;
  width: 100%;
}
.protection-selector legend {
  color: var(--color-text-muted);
  font-size: 12px;
  margin-bottom: 8px;
}
.protection-options {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}
.protection-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--color-border-subtle);
  border-radius: 8px;
  cursor: pointer;
}
.protection-option--selected {
  border-color: var(--color-border-strong);
  background: var(--color-raised-hover);
}
.protection-option:has(input:disabled) {
  opacity: 0.55;
  cursor: not-allowed;
}
.protection-option input {
  appearance: none;
  flex: none;
  width: 12px;
  height: 12px;
  margin: 0;
  border: 1px solid var(--color-text-muted);
  border-radius: 50%;
}
.protection-option input:checked {
  border: 3px solid var(--color-accent);
  background: var(--color-base);
}
.protection-option input:focus-visible {
  outline: 2px solid var(--color-accent-bright);
  outline-offset: 3px;
}
.protection-option svg {
  flex-shrink: 0;
  margin-top: 2px;
}
.protection-option strong {
  font-size: 12px;
  font-weight: 500;
}
.protection-description {
  display: block;
  font-size: var(--font-size-small);
  line-height: 1.4;
  color: var(--color-text-muted);
  margin-top: 3px;
}
.protection-note {
  font-size: var(--font-size-small);
  color: var(--color-text-muted);
  line-height: 1.5;
  margin: 8px 0 0;
}
.protection-status {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 12px;
  padding: 6px 0;
  color: var(--color-text-muted);
}
.protection-summary {
  font-size: var(--font-size-small);
  color: var(--color-text-muted);
}
.protection-fork-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 12px;
}
@media (max-width: 540px) {
  .protection-options {
    grid-template-columns: 1fr;
  }
}

.protection-option .protection-description {
  display: none;
}
.protection-option:has(input:disabled) .protection-description {
  display: block;
}
@media (max-width: 760px) {
  .protection-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.chip-popover.session-protection-popover {
  width: 360px;
  font-family: var(--font-ui);
}
.session-protection-menu .permission-option:disabled {
  cursor: default;
}
.session-protection-menu .protection-note {
  margin: 8px;
}
.session-protection-confirm {
  border-top: 1px solid var(--color-border-subtle);
  margin-top: 4px;
  padding-top: 4px;
}
.session-protection-confirm .protection-fork-actions {
  flex-wrap: wrap;
  gap: 4px;
}

.protection-selector--check .protection-option {
  position: relative;
}
.protection-selector--check .protection-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  border: 0;
  clip-path: inset(50%);
  overflow: hidden;
}
.protection-selector--check .protection-option:has(input:focus-visible) {
  outline: 2px solid var(--color-accent);
  outline-offset: -2px;
}
.protection-selector--check .protection-check {
  flex: none;
  align-self: center;
  margin-left: auto;
}
.protection-check--hidden {
  visibility: hidden;
}

.composer-tools > .protection-status {
  padding: 0;
  flex: none;
}

.execution-menu {
  min-width: 0;
}
.execution-menu .execution-option {
  display: flex;
  align-items: center;
  gap: 12px;
}
.execution-option > svg:first-child {
  flex-shrink: 0;
  color: var(--color-text-muted);
}
.execution-option-copy {
  flex: 1;
  min-width: 0;
}
.execution-option > svg:last-child {
  flex-shrink: 0;
}
.execution-privacy {
  border-top: 1px solid var(--color-border-subtle);
  margin-top: 8px;
  padding-top: 8px;
}
.execution-switch {
  box-sizing: content-box;
  width: 24px;
  height: 12px;
  border-radius: 12px;
  background: var(--color-text-muted);
  padding: 3px;
  flex-shrink: 0;
}
.execution-switch > span {
  display: block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--color-text-primary);
  transition: transform 120ms ease;
}
.execution-switch--on {
  background: var(--color-accent);
}
.execution-switch--on > span {
  transform: translateX(12px);
}
.worktree-name-field {
  padding: 8px 12px 12px 41px;
  display: grid;
  gap: 6px;
}
.worktree-name-field label {
  font-size: 12px;
  color: var(--color-text-muted);
}
.worktree-name-field input {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  border: 1px solid var(--color-border-subtle);
  border-radius: 8px;
  background: var(--color-base);
  color: var(--color-text-primary);
  padding: 8px 10px;
  font: inherit;
  font-size: 13px;
}
.worktree-name-field input:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}
.worktree-name-field p {
  margin: 0;
  color: var(--color-text-muted);
  font-size: 12px;
  line-height: 1.45;
}
.worktree-identity {
  border-bottom: 1px solid var(--color-border-subtle);
  padding: 12px;
}
.worktree-identity .worktree-name-field {
  padding: 0;
}
.worktree-identity button {
  margin-top: 8px;
}

.chip-popover.welcome-protection-popover,
.chip-popover.session-protection-popover {
  width: min(400px, calc(100vw - 32px));
}
.welcome-config-trigger--execution .welcome-config-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.permission-option:disabled,
.permission-option[aria-disabled="true"] {
  cursor: default;
  opacity: 0.65;
}

.execution-privacy--with-info {
  position: relative;
  padding-right: 34px;
}
.execution-privacy-info {
  position: absolute;
  top: 13px;
  right: 0;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--color-text-muted);
  cursor: pointer;
}
.execution-privacy-info:hover {
  color: var(--color-text-primary);
  background: var(--color-base-hover);
}
.execution-privacy-info:focus-visible,
.privacy-inventory-list:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: -2px;
}
.settings-modal.privacy-dialog {
  flex-direction: column;
  width: min(680px, calc(100vw - 32px));
  height: min(680px, calc(100dvh - 48px));
  font-family: var(--font-ui);
  color: var(--color-text-primary);
}
.privacy-dialog-header,
.privacy-dialog-heading {
  display: flex;
  align-items: center;
  gap: 12px;
}
.privacy-dialog-header {
  flex-shrink: 0;
  justify-content: space-between;
  padding: var(--settings-padding);
  border-bottom: 1px solid var(--color-border-subtle);
}
.privacy-dialog-heading > svg {
  flex-shrink: 0;
  color: var(--color-text-muted);
}
.privacy-inventory {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
  padding: var(--settings-padding);
  background: var(--color-surface-high);
}
.privacy-inventory-intro h3 {
  margin: 0 0 8px;
  font-family: var(--font-ui);
  font-size: var(--font-size-body);
  font-weight: var(--font-weight-medium);
}
.privacy-inventory-intro p,
.privacy-inventory-state {
  margin: 0;
  color: var(--color-text-muted);
  font-size: var(--font-size-body);
  line-height: 1.5;
}
.privacy-inventory-state {
  margin-top: 20px;
}
.privacy-inventory-count {
  margin: 20px 0 10px;
  color: var(--color-text-muted);
  font-size: var(--font-size-small);
}
.privacy-inventory-list {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-md);
  background: var(--color-raised);
}
.privacy-inventory-list:empty {
  display: none;
}
.privacy-inventory-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  align-items: center;
  gap: 16px;
  min-height: 44px;
  padding: 10px 14px;
  font-size: var(--font-size-body);
  overflow-wrap: anywhere;
}
.privacy-inventory-list li + li {
  border-top: 1px solid var(--color-border-subtle);
}
.privacy-inventory-list code {
  text-align: right;
  font-size: var(--font-size-small);
  line-height: 1.5;
}
.privacy-dialog-footer {
  flex-shrink: 0;
  padding: 16px var(--settings-padding);
  border-top: 1px solid var(--color-border-subtle);
  color: var(--color-text-muted);
  font-size: var(--font-size-small);
  line-height: 1.5;
}
@media (max-width: 540px) {
  .settings-modal.privacy-dialog {
    height: calc(100dvh - 24px);
    width: calc(100vw - 24px);
  }
  .privacy-inventory-list li {
    gap: 10px;
    padding: 10px;
  }
}

.approval-inbox {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  gap: 12px;
  padding: 12px 16px;
}

.approval-inbox-title {
  margin: 0;
  font-family: var(--font-serif);
  font-size: var(--font-size-title);
  font-weight: var(--font-weight-heading);
  color: var(--color-text-primary);
}

.approval-inbox-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.approval-inbox-session {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--color-text-primary);
  font-size: var(--font-size-label);
  text-align: left;
  cursor: pointer;
}

.approval-inbox-session:hover .approval-inbox-session-open {
  color: var(--color-accent-bright);
  text-decoration: underline;
}

.approval-inbox-session-title {
  font-weight: var(--font-weight-semibold);
}

.approval-inbox-session-open {
  color: var(--color-text-muted);
  font-size: var(--font-size-small);
}

.approval-inbox-cards {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.approval-card {
  min-width: 0;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-md);
  background: var(--color-raised);
}

.approval-card--answered,
.approval-card--expired,
.approval-card--cancelled {
  opacity: 0.7;
}

.approval-card--error {
  border-color: var(--color-danger);
}

.approval-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.approval-kind {
  font-size: var(--font-size-label);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
}

.approval-countdown {
  margin-left: auto;
  color: var(--color-text-muted);
  font-family: var(--font-mono);
  font-size: var(--font-size-code);
}

.approval-countdown--urgent {
  color: var(--color-ember);
  font-weight: var(--font-weight-bold);
}

.approval-context {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.approval-command {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-height: 160px;
  margin: 0;
  padding: 8px 10px;
  border-radius: var(--radius-xs);
  background: var(--color-base);
  color: var(--color-text-primary);
  font-family: var(--font-mono);
  font-size: var(--font-size-code);
  overflow-x: auto;
}

.approval-path {
  color: var(--color-text-primary);
  font-family: var(--font-mono);
  font-size: var(--font-size-code);
  word-break: break-all;
}

.approval-scopes {
  overflow-wrap: anywhere;
  margin: 0;
  padding: 0 0 0 16px;
  color: var(--color-text-primary);
  font-family: var(--font-mono);
  font-size: var(--font-size-code);
}

.approval-summary {
  color: var(--color-text-primary);
  font-size: var(--font-size-body);
}

.approval-resolved {
  color: var(--color-text-muted);
  font-size: var(--font-size-label);
}

.approval-resolved--expired {
  color: var(--color-ember);
}

.approval-resolved--cancelled {
  color: var(--color-danger);
}

.approval-error {
  margin: 0;
  color: var(--color-danger);
  font-size: var(--font-size-small);
}

.approval-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.approval-decision {
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--color-text-primary);
  font-size: var(--font-size-label);
  cursor: pointer;
}

.approval-decision:hover {
  background: var(--color-base-hover);
}

.approval-decision--allow,
.approval-decision--accept,
.approval-decision--acceptForSession,
.approval-decision--once,
.approval-decision--always {
  border-color: var(--color-border-strong);
  background: var(--color-surface-high);
  color: var(--color-text-primary);
}

.approval-decision--allow:hover,
.approval-decision--accept:hover,
.approval-decision--acceptForSession:hover,
.approval-decision--once:hover,
.approval-decision--always:hover {
  background: var(--color-base-hover);
}

.approval-decision--deny,
.approval-decision--decline,
.approval-decision--reject {
  color: var(--color-text-primary);
}

.approval-decision--cancel {
  color: var(--color-text-muted);
}

.approval-card--mini {
  padding: 8px 10px;
  gap: 6px;
}

.session-approvals {
  position: relative;
  z-index: 1;
  min-width: 0;
  width: 100%;
  display: grid;
  gap: 8px;
  max-height: 40vh;
  overflow-y: auto;
  flex: 0 0 auto;
}

.approval-decision:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
.approval-decision:disabled { opacity: 0.5; cursor: wait; }

.approval-question { display: grid; gap: 8px; border: 0; padding: 8px 0; }
.approval-question label { display: flex; align-items: center; gap: 8px; }
.approval-question textarea { width: 100%; min-height: 48px; color: inherit; background: transparent; border: 1px solid currentColor; border-radius: 4px; }

.native-questions { display: grid; gap: 12px; min-width: 0; }
.approval-plan { min-width: 0; overflow-wrap: anywhere; }
.approval-plan .approval-actions { flex-wrap: wrap; }
.native-questions > button { justify-self: start; }
.native-questions .approval-question { min-width: 0; margin: 0; padding: 12px 0; }
.approval-question legend { font-weight: var(--font-weight-semibold); overflow-wrap: anywhere; }
.approval-question-header { display: block; color: var(--color-text-muted); font-size: var(--font-size-small); margin-bottom: 4px; }
.approval-question-hint, .approval-input-unavailable { margin: 0; color: var(--color-text-muted); font-size: var(--font-size-small); }
.approval-question .approval-question-option { padding: 10px 12px; border: 1px solid var(--color-border-subtle); border-radius: var(--radius-sm); cursor: pointer; align-items: flex-start; }
.approval-question-option:has(input:checked) { background: var(--color-surface-high); border-color: var(--color-border-strong); }
.approval-question-option:focus-within { outline: 2px solid var(--color-accent); outline-offset: 2px; }
.approval-question-option input { margin-top: 3px; accent-color: var(--color-accent); flex-shrink: 0; }
.approval-question-option strong { font-weight: var(--font-weight-semibold); }
.approval-question-option span { min-width: 0; overflow-wrap: anywhere; }
.approval-question-description { display: block; color: var(--color-text-muted); font-size: var(--font-size-small); margin-top: 3px; }
.approval-question-freeform { display: grid; gap: 6px; font-size: var(--font-size-small); }
.approval-question-freeform textarea, .approval-question-freeform input, .approval-question-freeform select { box-sizing: border-box; width: 100%; padding: 8px 10px; color: var(--color-text-primary); background: var(--color-base); border: 1px solid var(--color-border-strong); border-radius: var(--radius-sm); font: inherit; resize: vertical; }
.approval-question-freeform textarea:focus-visible, .approval-question-freeform input:focus-visible, .approval-question-freeform select:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }

.composer-with-questions {
  display: grid;
  gap: 12px;
  min-width: 0;
  width: 100%;
}

.async-questions.approval-card {
  gap: 16px;
  padding: 16px;
  max-height: 50vh;
}

.async-question-panel {
  max-height: none;
  overflow: visible;
}

.async-question-fields {
  display: grid;
  gap: 16px;
  min-height: 0;
  overflow-y: auto;
  padding: 3px;
  margin: -3px;
}

.async-questions .approval-card-header,
.async-questions .approval-actions {
  flex: none;
}

.async-questions .approval-kind {
  color: var(--color-text-muted);
  font-size: var(--font-size-small);
}

.async-questions fieldset {
  display: grid;
  gap: 6px;
  min-width: 0;
  margin: 0;
  border: 0;
  padding: 0;
}

.async-questions legend {
  padding: 0 0 12px;
  color: var(--color-text-primary);
  font-size: var(--font-size-body);
  font-weight: var(--font-weight-semibold);
  line-height: 1.5;
}

.async-question-option {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-sm);
  color: var(--color-text-primary);
  font-size: var(--font-size-body);
  line-height: 1.5;
  overflow-wrap: anywhere;
  cursor: pointer;
}

.async-question-option:hover {
  background: var(--color-base-hover);
}

.async-question-option:has(input:checked) {
  border-color: var(--color-accent);
  background: var(--color-surface-high);
}

.async-question-option:has(input:focus-visible) {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.async-question-option input {
  flex: none;
  margin: 0;
  accent-color: var(--color-accent);
}

.async-question-other {
  color: var(--color-text-muted);
}

.async-questions textarea {
  width: 100%;
  box-sizing: border-box;
  min-height: 72px;
  resize: vertical;
  background: var(--color-base);
  color: var(--color-text-primary);
  font: inherit;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
}

.async-questions textarea:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.async-questions .approval-actions {
  justify-content: flex-end;
}

.async-questions fieldset:disabled {
  opacity: 0.6;
}

.settings-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgb(0 0 0 / 0.55);
}

.settings-modal {
  --settings-padding: 24px;
  display: flex;
  width: min(1052px, calc(100vw - 48px));
  height: min(685px, calc(100vh - 48px));
  overflow: hidden;
  background: var(--color-raised);
  border-radius: var(--radius-dialog);
  box-shadow: 0 24px 64px rgb(0 0 0 / 0.45);
}

.settings-modal-nav {
  display: flex;
  flex: 0 0 244px;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
  padding: var(--settings-padding) calc(var(--settings-padding) - 8px);
}

.settings-modal-nav-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 8px;
}

.settings-modal-title,
.settings-modal-section-title {
  margin: 0;
  font-family: var(--font-serif);
  font-size: var(--font-size-title);
  font-weight: var(--font-weight-heading);
  line-height: 28px;
  color: var(--color-text-primary);
}

.settings-modal-close {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--color-text-muted);
  cursor: pointer;
}

.settings-modal-close:hover {
  background: var(--color-base-hover);
  color: var(--color-text-primary);
}

.settings-modal-items {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.settings-modal-item {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 37px;
  padding: 0 10px;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--color-text-primary);
  font-size: var(--font-size-body);
  font-weight: var(--font-weight-regular);
  text-align: left;
  cursor: pointer;
}

.settings-modal-item:hover {
  background: var(--color-base-hover);
}

.settings-modal-item--active,
.settings-modal-item--active:hover {
  background: var(--color-surface-high);
}

.settings-modal-item span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.settings-modal-content {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 24px;
  min-width: 0;
  padding: var(--settings-padding);
  overflow-y: auto;
  background: var(--color-surface-high);
}

@media (max-width: 760px) {
  .settings-modal {
    --settings-padding: 16px;
    flex-direction: column;
    width: calc(100vw - 24px);
    height: calc(100vh - 24px);
  }
  .settings-modal-nav {
    flex: 0 0 auto;
    gap: 8px;
  }
  .settings-modal-items {
    flex-direction: row;
    overflow-x: auto;
  }
  .settings-modal-item {
    flex: 0 0 auto;
  }
}

.settings-modal-header {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.settings-modal-section-desc {
  margin: 0;
  color: var(--color-text-muted);
  font-size: var(--font-size-body);
}

.settings-modal-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.settings-modal-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.settings-modal-field-label {
  margin: 0;
  color: var(--color-text-muted);
  font-size: var(--font-size-small);
}

.settings-modal-hint {
  margin: 0;
  color: var(--color-text-muted);
  font-size: var(--font-size-small);
}

.settings-modal-error {
  margin: 0;
  color: var(--color-danger);
  font-size: var(--font-size-small);
}

.settings-modal-warning {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0;
  padding: 8px 10px;
  border: 1px solid var(--color-danger);
  border-radius: var(--radius-sm);
  color: var(--color-danger);
  font-size: var(--font-size-small);
}

.settings-modal-option-group {
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-md);
  background: var(--color-raised);
}

.settings-modal-option {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-md);
  background: var(--color-raised);
  color: var(--color-text-primary);
  font-size: var(--font-size-body);
  cursor: pointer;
}

.settings-modal-option input {
  accent-color: var(--color-accent);
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  margin: 0;
}

.settings-modal-option-group .settings-modal-option {
  border: 0;
  border-radius: 0;
}
.settings-modal-option-group .settings-modal-option + .settings-modal-option {
  border-top: 1px solid var(--color-border-subtle);
}
.settings-modal-option:has(input:checked) {
  background: var(--color-base-hover);
}

.settings-modal-input,
.settings-modal-select {
  min-height: 38px;
  width: 100%;
  padding: 0 12px;
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-sm);
  background: var(--color-base);
  color: var(--color-text-primary);
  font-size: var(--font-size-body);
}

.settings-modal-select {
  cursor: pointer;
}

.settings-modal-input:focus,
.settings-modal-select:focus {
  border-color: var(--color-accent);
  outline: none;
}

.settings-modal-input::placeholder {
  color: var(--color-text-muted);
}

.settings-modal-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.settings-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  gap: 6px;
  padding: 0 14px;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--color-text-primary);
  font-size: var(--font-size-body);
  font-weight: var(--font-weight-medium);
  cursor: pointer;
}

.settings-pill:hover:not(:disabled) {
  background: var(--color-raised-hover);
}

.settings-pill--primary,
.settings-pill--primary:hover:not(:disabled) {
  background: var(--color-accent);
  color: var(--color-ink-on-fill);
}

.settings-pill--primary:hover:not(:disabled) {
  background: var(--color-accent-bright);
}

.settings-pill:disabled {
  opacity: 0.5;
  cursor: default;
}

.settings-harness-label {
  margin: 0;
  color: var(--color-text-muted);
  font-size: var(--font-size-small);
}

.settings-harness-list {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-md);
  background: var(--color-raised);
  list-style: none;
}

.settings-harness-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 66px;
  padding: 12px 14px;
}

.settings-harness-row + .settings-harness-row {
  border-top: 1px solid var(--color-border-subtle);
}

.settings-harness-logo {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  color: var(--color-text-primary);
}

.settings-harness-info {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.settings-harness-name {
  color: var(--color-text-primary);
  font-size: var(--font-size-body);
  font-weight: var(--font-weight-medium);
}

.settings-harness-status {
  color: var(--color-text-muted);
  font-size: var(--font-size-small);
}

.settings-harness-status--ember {
  color: var(--color-ember);
}

.settings-modal-providers .providers-page {
  flex: none;
  gap: 12px;
  padding: 0;
}

.settings-modal-providers .providers-title {
  display: none;
}

/* All settings pages share the same control and row rhythm. */
.settings-modal-providers .providers-button {
  min-height: 34px;
  height: auto;
  font-size: var(--font-size-body);
  font-weight: var(--font-weight-medium);
}
.settings-modal-providers .providers-item-name {
  font-size: var(--font-size-body);
}
.settings-pill--danger {
  color: var(--color-danger);
}
.settings-modal :is(button, input, select):focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}
.settings-endpoint {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.settings-endpoint-select {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
  min-height: 42px;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--color-text-primary);
  text-align: left;
  cursor: pointer;
}
.settings-endpoint-select > svg {
  flex-shrink: 0;
}
.settings-endpoint-select [aria-label] {
  color: var(--color-accent);
}
.settings-endpoint-info {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.settings-endpoint-info strong {
  font-size: var(--font-size-body);
  font-weight: var(--font-weight-medium);
  overflow-wrap: anywhere;
}
.settings-endpoint-info > span {
  color: var(--color-text-muted);
  font-size: var(--font-size-small);
  overflow-wrap: anywhere;
}
.settings-endpoint-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.settings-endpoint-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 2px;
}
.settings-model-anchor {
  min-width: 0;
}
.settings-model-trigger {
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  cursor: pointer;
}
.settings-model-trigger > span:first-child {
  flex: 0 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.settings-model-trigger > svg {
  flex-shrink: 0;
}
.settings-model-trigger > svg:last-child {
  margin-left: auto;
}
@media (max-width: 760px) {
  .settings-endpoint {
    flex-wrap: wrap;
  }
  .settings-endpoint-select {
    flex-basis: 100%;
  }
  .settings-endpoint-actions {
    margin-left: 30px;
  }
}

.settings-harness-trigger > .welcome-menu-row-label {
  flex: 1;
}

/* Keep normal text as the fallback when text clipping is unavailable. */
.tr-shimmer {
  display: inline-block;
  color: var(--color-text-muted);
}

@supports (background-clip: text) or (-webkit-background-clip: text) {
  .tr-shimmer {
    background-image: linear-gradient(
      100deg,
      var(--color-text-muted) 0%,
      var(--color-text-muted) 35%,
      var(--color-text-primary) 50%,
      var(--color-text-muted) 65%,
      var(--color-text-muted) 100%
    );
    background-size: 300% 100%;
    background-repeat: no-repeat;
    background-position: 100% 0;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
    animation: transcript-shimmer 4s linear .6s infinite;
  }
}

/* A one-second left-to-right sweep followed by three seconds at rest. */
@keyframes transcript-shimmer {
  0% { background-position: 100% 0; }
  25%, 100% { background-position: 0% 0; }
}

@media (prefers-reduced-motion: reduce), (forced-colors: active) {
  .tr-shimmer {
    animation: none;
    background: none;
    color: var(--color-text-muted);
    -webkit-text-fill-color: currentColor;
  }
}

.tr-plan {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tr-plan-step {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--font-size-label);
}

.tr-plan-icon {
  display: flex;
  flex: none;
}

.tr-plan-step-done {
  color: var(--color-text-muted);
}

.tr-plan-step-done .tr-plan-icon {
  color: var(--color-accent);
}

.tr-plan-step-running {
  color: var(--color-text-primary);
}

.tr-plan-step-running .tr-plan-icon {
  color: var(--color-accent);
}

.tr-plan-step-waiting {
  color: var(--color-text-muted);
}

.tr-plan-step-waiting .tr-plan-icon {
  color: var(--color-text-muted);
}

.tr-plan-step-cancelled {
  color: var(--color-text-muted);
  text-decoration: line-through;
}

.tr-banner {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 12px;
  border-left: 2px solid transparent;
  border-radius: var(--radius-sm);
  font-size: var(--font-size-label);
}

.tr-banner svg {
  flex: none;
  margin-top: 1px;
}

.tr-record-truncated {
  color: var(--color-text-muted);
  font-size: var(--font-size-label);
}

.tr-record-preview {
  max-height: 24rem;
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: var(--font-size-label);
}

.tr-banner-error {
  background: var(--color-diff-del-bg);
  border-left-color: var(--color-danger);
  color: var(--color-diff-del-fg);
}

.tr-banner-warning {
  background: var(--color-raised);
  border-left-color: var(--color-ember);
  color: var(--color-ember);
}

.tr-banner-info {
  background: transparent;
  border-left-color: transparent;
  color: var(--color-text-muted);
  padding: 6px 0;
}

.tr-user-row {
  display: flex;
  justify-content: flex-end;
  padding: 20px 0 12px;
}
.tr-user-bubble {
  max-width: 85%;
  padding: 10px 14px;
  background: var(--color-raised-hover);
  border-radius: var(--radius-md);
  color: var(--color-text-primary);
  font-size: var(--font-size-body);
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  min-width: 0;
}
.tr-user-preview {
  text-align: left;
  color: var(--color-text-primary);
  line-height: 1.6;
  white-space: normal;
}
.tr-user-preview > span {
  display: block;
  color: var(--color-text-muted);
  font-size: var(--font-size-small);
}
.tr-user-full {
  white-space: pre-wrap;
}
.tr-assistant {
  color: var(--color-text-primary);
  font-size: var(--font-size-body);
  line-height: 1.6;
  overflow-wrap: anywhere;
  padding: 10px 0;
}
.tr-markdown {
  min-width: 0;
  white-space: normal;
}
.tr-markdown > :first-child {
  margin-top: 0;
}
.tr-markdown > :last-child {
  margin-bottom: 0;
}
.tr-markdown p {
  margin: 0 0 12px;
}
.tr-markdown h1,
.tr-markdown h2,
.tr-markdown h3,
.tr-markdown h4 {
  font-family: var(--font-ui);
  font-size: var(--font-size-body);
  font-weight: var(--font-weight-semibold);
  margin: 20px 0 8px;
}
.tr-markdown ul,
.tr-markdown ol {
  padding-left: 24px;
  margin: 8px 0 12px;
}
.tr-markdown li {
  padding-left: 2px;
  margin: 4px 0;
}
.tr-markdown li > p {
  margin: 0;
}
.tr-markdown blockquote {
  border-left: 2px solid var(--color-border-strong);
  margin: 12px 0;
  padding-left: 16px;
  color: var(--color-text-muted);
}
.tr-markdown a {
  color: var(--color-accent-bright);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.tr-markdown code {
  font-family: var(--font-mono);
  font-size: var(--font-size-code);
  background: var(--color-surface-high);
  border-radius: var(--radius-xs);
  padding: 2px 4px;
}
.tr-code-block {
  position: relative;
  margin: 12px 0;
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--color-raised);
}
.tr-code-block pre {
  margin: 0;
  padding: 36px 14px 14px;
  overflow: auto;
  max-height: 420px;
  white-space: pre;
}
.tr-code-block code {
  background: transparent;
  padding: 0;
  border-radius: 0;
}
.tr-copy {
  position: absolute;
  top: 6px;
  right: 8px;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--color-raised);
  color: var(--color-text-muted);
  padding: 3px 6px;
  cursor: pointer;
  font-size: var(--font-size-small);
}
.tr-copy:hover {
  color: var(--color-text-primary);
}
.tr-markdown img {
  max-width: 100%;
  height: auto;
}
.tr-markdown hr {
  border: 0;
  border-top: 1px solid var(--color-border-subtle);
  margin: 20px 0;
}
.tr-table-scroll {
  overflow-x: auto;
  margin: 12px 0;
}
.tr-markdown table {
  border-collapse: collapse;
  font-size: var(--font-size-label);
}
.tr-markdown th,
.tr-markdown td {
  border-bottom: 1px solid var(--color-border-subtle);
  padding: 8px 12px;
  text-align: left;
}
.tr-caret {
  display: inline-block;
  width: 5px;
  height: 1em;
  margin-left: 3px;
  background: var(--color-text-muted);
  animation: tr-blink 1s step-end infinite;
}
.tr-disclosure {
  width: 100%;
  min-width: 0;
}
.tr-disclosure-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  min-width: 0;
  padding: 5px 0;
  border: none;
  background: transparent;
  color: var(--color-text-muted);
  font-family: var(--font-ui);
  font-size: var(--font-size-label);
  line-height: 1.5;
  text-align: left;
  cursor: pointer;
}
.tr-disclosure-toggle:hover {
  color: var(--color-text-primary);
}
.tr-disclosure-toggle > svg {
  flex: none;
  stroke-width: var(--icon-stroke-width);
}
.tr-disclosure-content {
  margin: 6px 0 10px;
  min-width: 0;
}
.tr-thinking {
  color: var(--color-text-muted);
  font-size: var(--font-size-label);
}
.tr-thinking .tr-disclosure-content {
  padding-left: 12px;
  border-left: 1px solid var(--color-border-subtle);
}
.tr-tool {
  min-width: 0;
}
.tr-agent-activity {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 5px 0;
  color: var(--color-text-muted);
  font-family: var(--font-ui);
  font-size: var(--font-size-label);
  line-height: 1.5;
}
.tr-agent-activity > svg { flex: none; }
.tr-agent-activity--failed { color: var(--color-text-primary); }
.tr-tool-summary {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tr-tool-duration,
.tr-tool-outcome {
  flex: none;
  font-size: var(--font-size-small);
}
.tr-tool--failed > .tr-disclosure > .tr-disclosure-toggle {
  color: var(--color-danger);
}
.tr-tool--running > .tr-disclosure > .tr-disclosure-toggle > svg:first-child {
  color: var(--color-accent);
}
.tr-tool .tr-disclosure-content {
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--color-raised);
}
.tr-tool-detail-head {
  padding: 8px 12px;
  font-size: var(--font-size-small);
  color: var(--color-text-muted);
}
.tr-tool-command,
.tr-tool-detail {
  margin: 0;
  padding: 8px 12px 12px;
  max-height: 300px;
  overflow: auto;
  font-family: var(--font-mono);
  font-size: var(--font-size-code);
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: var(--color-text-muted);
}
.tr-tool-command {
  color: var(--color-text-primary);
  border-bottom: 1px solid var(--color-border-subtle);
}
.tr-tool-add,
.tr-diff-add {
  color: var(--color-diff-add-fg);
  flex: none;
  font-size: var(--font-size-small);
}
.tr-tool-del,
.tr-diff-del {
  color: var(--color-diff-del-fg);
  flex: none;
  font-size: var(--font-size-small);
}
.tr-tool-chevron-open {
  transform: rotate(180deg);
}
.tr-diff {
  min-width: 0;
}
.tr-diff-path {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tr-diff-body {
  max-height: 320px;
  overflow: auto;
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-md);
  background: var(--color-base);
  font-family: var(--font-mono);
}
.tr-diff-row {
  display: flex;
  min-width: max-content;
  line-height: 1.7;
}
.tr-diff-no {
  flex: none;
  width: 40px;
  padding-right: 8px;
  color: var(--color-text-muted);
  font-size: var(--font-size-code);
  text-align: right;
  user-select: none;
}
.tr-diff-code {
  flex: 1;
  padding: 0 12px;
  font-size: var(--font-size-code);
  white-space: pre;
}
.tr-diff-row-del {
  background: var(--color-diff-del-bg);
  color: var(--color-diff-del-fg);
}
.tr-diff-row-add {
  background: var(--color-diff-add-bg);
  color: var(--color-diff-add-fg);
}
.tr-diff-row-context {
  color: var(--color-text-muted);
}
.tr-diagnostics {
  color: var(--color-text-muted);
  font-size: var(--font-size-small);
  border-top: 1px solid var(--color-border-subtle);
  margin-top: 24px;
}
.tr-codex-details {
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-md);
  background: var(--color-raised);
  overflow: hidden;
}

.tr-codex-details summary {
  cursor: pointer;
  color: var(--color-text-muted);
  padding: 8px 12px;
}

.tr-codex-details .tr-tool-detail-head {
  display: flex;
  gap: 16px;
}

.tr-codex-result + .tr-codex-result {
  border-top: 1px solid var(--color-border-subtle);
}

.tr-codex-fields {
  margin: 0;
  padding: 8px 12px;
}

.tr-codex-fields dt {
  color: var(--color-text-muted);
  margin-bottom: 4px;
}

.tr-codex-fields dd {
  margin: 0 0 8px;
}

.tr-codex-value {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.tr-codex-list {
  padding-left: 20px;
  margin: 4px 0;
}

.tr-debug-page {
  max-height: 360px;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
}

.tr-debug-event-toggle,
.tr-debug-pagination button {
  border: 0;
  background: transparent;
  color: var(--color-text-muted);
  font: inherit;
  cursor: pointer;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
}

.tr-debug-event-toggle {
  display: flex;
  gap: 8px;
  width: 100%;
  text-align: left;
}

.tr-debug-event-toggle span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tr-debug-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
}

.tr-debug-event-toggle:hover,
.tr-debug-pagination button:not(:disabled):hover {
  background: var(--color-raised);
}

.tr-debug-pagination button:disabled {
  opacity: 0.4;
  cursor: default;
}

.tr-raw-payload {
  margin: 0;
  padding: 12px;
  max-height: 240px;
  overflow: auto;
  max-width: 100%;
  scrollbar-width: thin;
  scrollbar-gutter: stable;
  overscroll-behavior: contain;
  background: var(--color-raised);
  border-radius: var(--radius-md);
  font: var(--font-size-code)/1.6 var(--font-mono);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.tr-spin {
  animation: tr-spin 1s linear infinite;
}
@keyframes tr-spin {
  to {
    transform: rotate(360deg);
  }
}
@keyframes tr-blink {
  50% {
    opacity: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .tr-spin,
  .tr-caret {
    animation: none;
  }
}
.tr-changed-files {
  flex: none;
  padding: 4px 0;
  border-top: 1px solid var(--color-border-subtle);
}
.tr-changed-files > .tr-disclosure-content {
  max-height: 240px;
  overflow: auto;
}
.tr-codex-questions {
  padding-left: 20px;
  margin: 0;
}
.tr-codex-questions li {
  margin-block: 6px;
}
.tr-codex-question {
  font-weight: var(--font-weight-medium);
}
.tr-codex-answer {
  color: var(--color-text-primary);
}
.tr-codex-delegation-message {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.tr-diff > .tr-disclosure-toggle,
.tr-tool > .tr-disclosure > .tr-disclosure-toggle { width: 100%; }
.tr-file-path { display: block; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tr-tool-summary:has(.tr-file-path) { flex: 1; min-width: 0; }

.transcript {
  position: relative;
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
}

.transcript-viewport {
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
  scrollbar-gutter: stable;
  padding-inline-end: var(--transcript-scroll-padding, 8px);
  width: calc(100% + var(--transcript-scroll-extension, 8px));
  overflow-x: hidden;
  overflow-y: auto;
}

.transcript-inner {
  position: relative;
  width: 100%;
}

.transcript-item {
  position: absolute;
  top: 0;
  left: 0;
  box-sizing: border-box;
  width: 100%;
  padding: 2px 16px;
}

.transcript-status {
  position: absolute;
  right: 16px;
  left: 16px;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--color-text-muted);
  font-size: var(--font-size-label);
  pointer-events: none;
}

.transcript-status-top {
  /* Loading must not resize or move the virtualized reading viewport. */
  top: 0;
  z-index: 1;
  min-height: 24px;
  padding: 2px 16px;
  justify-content: center;
  background: var(--color-base);
}

.transcript-status-bottom {
  bottom: 8px;
}

.transcript-jump {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--color-text-primary);
  font-family: var(--font-ui);
  font-size: var(--font-size-label);
  cursor: pointer;
}

.transcript-jump:hover {
  border-color: var(--color-text-muted);
}

.transcript-jump svg {
  stroke-width: var(--icon-stroke-width);
}

.transcript-spin {
  display: inline-flex;
  flex: none;
  transform-origin: center;
  animation: transcript-spin 1s linear infinite;
}

.transcript-status svg {
  stroke-width: var(--icon-stroke-width);
}

@keyframes transcript-spin {
  to {
    transform: rotate(360deg);
  }
}
.transcript-viewport {
  scrollbar-width: thin;
  overflow-anchor: none;
}
.transcript-status-bottom {
  position: static;
  flex: none;
  min-height: 28px;
  border-top: 1px solid var(--color-border-subtle);
  padding-top: 8px;
}
@media (prefers-reduced-motion: reduce) {
  .transcript-spin { display: none; animation: none; }
}
.transcript-jump {
  font-size: var(--font-size-small);
  padding: 6px 10px;
}

.transcript-elapsed {
  margin-left: auto;
  font-variant-numeric: tabular-nums;
}

.transcript-buffered {
  display: block;
  margin-top: 3px;
  font-size: var(--font-size-small);
  color: var(--color-text-muted);
}

.transcript-turn-summary {
  display: flex;
  align-items: center;
  gap: 12px;
}
.transcript-turn-summary::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--color-border-subtle);
}
/* Status changes keep the same text metrics; only activity has a shimmer. */
.transcript-turn-summary,
.transcript-activity {
  padding: 10px 0;
  color: var(--color-text-muted);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.tr-thinking-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }

/* Keep the navigation control outside the reading and diff surfaces. */
.transcript-navigation {
  flex: none;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tr-activity-group-items > .tr-disclosure,
.tr-activity-group-items > .tr-tool {
  margin-block: 8px;
}

.tr-activity-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Match the virtual transcript's initial inset and row spacing before creation. */
.transcript-inner--startup { padding-top: 24px; }
.transcript-item--static { position: relative; }

/* Keep normal text as the fallback when text clipping is unavailable. */
.tr-shimmer {
  display: inline-block;
  color: var(--color-text-muted);
}

@supports (background-clip: text) or (-webkit-background-clip: text) {
  .tr-shimmer {
    background-image: linear-gradient(
      100deg,
      var(--color-text-muted) 0%,
      var(--color-text-muted) 35%,
      var(--color-text-primary) 50%,
      var(--color-text-muted) 65%,
      var(--color-text-muted) 100%
    );
    background-size: 300% 100%;
    background-repeat: no-repeat;
    background-position: 100% 0;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
    animation: transcript-shimmer 4s linear .6s infinite;
  }
}

/* A one-second left-to-right sweep followed by three seconds at rest. */
@keyframes transcript-shimmer {
  0% { background-position: 100% 0; }
  25%, 100% { background-position: 0% 0; }
}

@media (prefers-reduced-motion: reduce), (forced-colors: active) {
  .tr-shimmer {
    animation: none;
    background: none;
    color: var(--color-text-muted);
    -webkit-text-fill-color: currentColor;
  }
}

.session-view {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  width: 100%;
  min-height: 0;
}

.session-view-column {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  width: min(var(--conversation-width, 800px), 100%);
  margin: 0 auto;
  min-height: 0;
}

.session-view[data-conversation-width="wide"] {
  --conversation-width: 1200px;
}

.session-view[data-conversation-width="full"] {
  --conversation-width: 100%;
}

.session-status {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-height: 24px;
  padding: 0 0 8px;
  color: var(--color-text-muted);
  font-size: var(--font-size-small);
}

.session-status:empty {
  display: none;
}

.session-view-composer {
  position: relative;
  z-index: 1;
  background: var(--color-base);
  flex: none;
  padding: 8px 0 12px;
}

.session-view .transcript-item {
  padding: 4px 0;
}

.session-command-dock {
  max-height: min(280px, 30dvh);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.session-command-dock .native-command-history {
  width: 100%;
  margin: 0 0 10px;
}

.folder-picker {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 340px;
}

.folder-picker-section {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.folder-picker-section-label {
  padding: 0 8px 2px;
  color: var(--color-text-muted);
  font-size: var(--font-size-small);
}

.folder-picker-row {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 26px;
  padding: 0 8px;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--color-text-primary);
  font-size: var(--font-size-label);
  text-align: left;
  cursor: pointer;
}

.folder-picker-row:hover {
  background: var(--color-base-hover);
}

.folder-picker-row[aria-selected="true"] {
  background: var(--color-surface-high);
}

.folder-picker-row svg {
  flex: none;
  stroke-width: var(--icon-stroke-width);
  color: var(--color-text-muted);
}

.folder-picker-row-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.folder-picker-breadcrumb {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  flex-wrap: wrap;
  gap: 2px;
  min-height: 22px;
}

.folder-picker-crumb-wrap {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  color: var(--color-text-muted);
}

.folder-picker-crumb {
  padding: 2px 6px;
  border: none;
  border-radius: var(--radius-xs);
  background: transparent;
  color: var(--color-text-muted);
  font-size: var(--font-size-small);
  cursor: pointer;
}

.folder-picker-crumb:hover {
  background: var(--color-base-hover);
  color: var(--color-text-primary);
}

.folder-picker-crumb--current {
  color: var(--color-text-primary);
  cursor: default;
}

.folder-picker-crumb--current:hover {
  background: transparent;
}

.folder-picker-up {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  margin-left: auto;
  padding: 0;
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-xs);
  background: transparent;
  color: var(--color-text-muted);
  cursor: pointer;
}

.folder-picker-up:hover:not(:disabled) {
  background: var(--color-base-hover);
  color: var(--color-text-primary);
}

.folder-picker-up:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.folder-picker-up svg {
  stroke-width: var(--icon-stroke-width);
}

.folder-picker-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: 200px;
  overflow-y: auto;
}

.folder-picker-status {
  padding: 6px 8px;
  color: var(--color-text-muted);
  font-size: var(--font-size-label);
}

.folder-picker-status--error {
  color: var(--color-danger);
}

.folder-picker-footer {
  display: flex;
  justify-content: flex-end;
  padding-top: 2px;
}

.folder-picker-confirm {
  height: 26px;
  padding: 0 12px;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--color-accent);
  color: var(--color-ink-on-fill);
  font-size: var(--font-size-label);
  cursor: pointer;
}

.folder-picker-confirm:hover:not(:disabled) {
  background: var(--color-accent-bright);
}

.folder-picker-confirm:disabled {
  opacity: 0.5;
  cursor: default;
}
.folder-picker {
  width: 100%;
  min-width: 0;
}
.folder-picker-row {
  flex: none;
  min-height: 30px;
}

.welcome-composer {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 24px;
  width: 100%;
}

.welcome-greeting {
  margin: 0;
  text-align: center;
  font-family: var(--font-serif);
  font-size: var(--font-size-title);
  font-weight: var(--font-weight-heading);
  color: var(--color-text-primary);
}

.welcome-menu {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 200px;
}

.welcome-menu-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--color-text-primary);
  font-size: var(--font-size-label);
  text-align: left;
  cursor: pointer;
}

.welcome-menu-row:hover:not(:disabled) {
  background: var(--color-base-hover);
}

.welcome-menu-row:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.welcome-menu-row--active {
  background: var(--color-surface-high);
}

.welcome-menu-row svg {
  flex: none;
  stroke-width: var(--icon-stroke-width);
  color: var(--color-text-muted);
}

.welcome-menu-row-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.welcome-menu-row-reason {
  margin-left: auto;
  flex: none;
  color: var(--color-text-muted);
  font-size: var(--font-size-small);
}

.welcome-menu-row-anchor {
  position: relative;
  display: flex;
  align-items: stretch;
  border-radius: var(--radius-sm);
}

.welcome-menu-row-anchor .welcome-menu-row {
  flex: 1 1 auto;
  min-width: 0;
}

.welcome-config-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  align-self: center;
  justify-content: center;
  max-width: 100%;
  gap: 4px 8px;
  margin-top: -12px;
  padding: 6px;
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-pill);
  background: var(--color-raised);
}
.welcome-config-bar .composer-chip-anchor {
  min-width: 0;
  max-width: 100%;
}
.welcome-config-trigger {
  min-width: 0;
  max-width: 100%;
  height: auto;
  min-height: 28px;
  font-size: var(--font-size-small);
  color: var(--color-text-muted);
}
.welcome-config-label {
  min-width: 0;
  overflow-wrap: anywhere;
  white-space: normal;
  text-align: left;
}
.welcome-config-trigger:hover,
.welcome-config-trigger[aria-expanded="true"] {
  color: var(--color-text-primary);
}
.chip-popover--folder {
  max-height: none;
  min-width: 0;
}
.welcome-model-notice {
  margin: 0 8px;
  font-size: var(--font-size-small);
  color: var(--color-text-muted);
}
.welcome-composer .composer-tools > .composer-chip-anchor {
  min-width: 0;
}
.welcome-composer .composer-tools .composer-chip {
  min-width: 0;
  max-width: 100%;
}

.welcome-composer .composer-chip-anchor--model {
  margin-left: auto;
}

.welcome-permissions-popover,
.welcome-protection-popover {
  width: 360px;
  font-family: var(--font-ui);
}
.welcome-permissions-popover .permission-menu,
.welcome-protection-popover .permission-menu {
  padding: 0;
  gap: 2px;
}
.welcome-permissions-popover .permission-option,
.welcome-protection-popover .permission-option {
  padding: 6px 8px;
}

.welcome-composer > .composer {
  position: relative;
}

.dashboard {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
}

.dashboard-welcome {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 24px;
}

/* Startup occupies the same column and viewport as the destination session. */
.dashboard-welcome:has(.session-view) {
  max-width: none;
  min-height: 0;
  padding: 0;
}

.collection-panel {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-md);
  background: var(--color-raised);
}

.collection-panel-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.collection-panel-item {
  min-width: 0;
  padding: 14px;
}

.collection-panel-item + .collection-panel-item {
  border-top: 1px solid var(--color-border-subtle);
}

.collection-panel-item--selected {
  background: var(--color-base-hover);
}

.collection-panel-empty {
  margin: 0;
  padding: 24px 14px 14px;
  color: var(--color-text-muted);
  font-size: var(--font-size-body);
  text-align: center;
}

.collection-panel-footer {
  padding: 12px;
}

.collection-panel-list + .collection-panel-footer {
  border-top: 1px solid var(--color-border-subtle);
}

.collection-panel-add {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px dashed var(--color-border-strong);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--color-text-muted);
  font: inherit;
  font-size: var(--font-size-body);
  cursor: pointer;
  transition:
    background-color 160ms ease,
    border-color 160ms ease,
    color 160ms ease;
}

.collection-panel-add > svg {
  flex-shrink: 0;
}

.collection-panel-add:hover {
  border-color: var(--color-accent);
  background: color-mix(in srgb, var(--color-accent) 10%, transparent);
  color: var(--color-accent);
}

.collection-panel :is(button, input, select):focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .collection-panel-add {
    transition: none;
  }
}

.worktree-integration-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 10px;
  padding: 8px 12px;
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-md);
  color: var(--color-text-muted);
  font-size: var(--font-size-label);
}
.worktree-integration-bar p {
  flex-basis: 100%;
  margin: 0;
}
.worktree-integration-context {
  display: flex;
  gap: 8px;
  align-items: center;
  min-width: 0;
}
.worktree-integration-context span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.lifecycle-panel.worktree-integration-panel {
  width: calc(100vw - 64px);
  height: min(880px, calc(100dvh - 64px));
  max-width: calc(100vw - 64px);
  max-height: calc(100dvh - 64px);
  padding: 0;
  gap: 0;
  overflow: hidden;
  box-shadow: 0 24px 80px rgb(0 0 0 / 0.3);
}
.lifecycle-panel.worktree-integration-panel--fullscreen {
  width: 100vw;
  height: 100dvh;
  max-width: none;
  max-height: none;
  border: 0;
  border-radius: 0;
}
.worktree-integration-heading {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  border-bottom: 1px solid var(--color-border-subtle);
}
.worktree-integration-heading h2 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: var(--font-size-title);
  font-weight: var(--font-weight-heading);
  line-height: 28px;
  color: var(--color-text-primary);
}
.worktree-window-actions {
  display: flex;
  flex: none;
  gap: 4px;
}
.worktree-icon-button {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--color-text-muted);
  cursor: pointer;
}
.worktree-icon-button:hover:not(:disabled) {
  background: var(--color-base-hover);
  color: var(--color-text-primary);
}
.worktree-icon-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.worktree-integration-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}
.worktree-integration-controls {
  display: grid;
  gap: 16px;
  padding: 20px 24px;
}
.worktree-integration-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
}
.worktree-select-field,
.worktree-message {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  font-size: var(--font-size-label);
}
.worktree-select-trigger {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-sm);
  background: var(--color-base);
  color: var(--color-text-primary);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.worktree-select-trigger span {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.worktree-select-trigger svg {
  flex: none;
  color: var(--color-text-muted);
}
.worktree-select-trigger:hover:not(:disabled),
.worktree-select-trigger[aria-expanded="true"] {
  background: var(--color-base-hover);
  border-color: var(--color-border-strong);
}
.worktree-select-trigger:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.worktree-select-option[aria-checked="true"] {
  background: var(--color-base-hover);
}
.worktree-select-option .permission-option-label {
  overflow-wrap: anywhere;
}
.worktree-integration-panel .lifecycle-input {
  width: 100%;
  height: 38px;
}
.worktree-review-summary {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 16px;
  color: var(--color-text-muted);
  font-size: var(--font-size-label);
}
.worktree-review-branches {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-wrap: anywhere;
  min-width: 0;
}
.worktree-review-branches svg {
  flex: none;
}
.worktree-integration-footer {
  flex: none;
  display: grid;
  gap: 12px;
  padding: 16px 24px;
  border-top: 1px solid var(--color-border-subtle);
}
.worktree-integration-footer > p {
  margin: 0;
}
.worktree-integration-panel .lifecycle-panel-actions {
  flex-wrap: wrap;
}
.worktree-integration-panel .lifecycle-button {
  height: auto;
  min-height: 36px;
  padding-block: 8px;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
}
.worktree-conflicts {
  border-left: 2px solid var(--color-diff-del-fg);
  padding-left: 12px;
}
.worktree-conflicts li {
  overflow-wrap: anywhere;
}
.worktree-review {
  padding: 0 24px 24px;
}
.worktree-review--fullscreen {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}
.worktree-file-nav {
  position: sticky;
  top: 12px;
  max-height: calc(100dvh - 200px);
  overflow: auto;
  padding-right: 12px;
  border-right: 1px solid var(--color-border-subtle);
}
.worktree-file-nav button {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 9px 8px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--color-text-muted);
  text-align: left;
  font-size: var(--font-size-small);
  cursor: pointer;
}
.worktree-file-nav button:hover,
.worktree-file-nav button:focus-visible {
  background: var(--color-base-hover);
  color: var(--color-text-primary);
}
.worktree-file-nav svg {
  flex: none;
}
.worktree-file-nav button span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.worktree-review-files {
  display: grid;
  gap: 16px;
  min-width: 0;
}
.worktree-file {
  min-width: 0;
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--color-base);
}
.worktree-file-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px 14px;
  border: 0;
  background: var(--color-raised-hover);
  color: var(--color-text-primary);
  text-align: left;
  font-size: var(--font-size-small);
  cursor: pointer;
  scroll-margin-top: 12px;
}
.worktree-file-heading:hover {
  background: var(--color-surface-high);
}
.worktree-file-heading:focus-visible {
  outline-offset: -2px;
}
.worktree-file-heading svg {
  flex: none;
  color: var(--color-text-muted);
}
.worktree-file-chevron--closed {
  transform: rotate(-90deg);
}
.worktree-file-path {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
  font-family: var(--font-mono);
  line-height: 1.6;
}
.worktree-file-previous,
.worktree-file-status {
  color: var(--color-text-muted);
}
.worktree-file-status {
  font-size: var(--font-size-small);
}
.worktree-file-content {
  border-top: 1px solid var(--color-border-subtle);
}
.worktree-diff-scroll {
  overflow-x: auto;
}
.worktree-diff-table {
  width: 100%;
  border-collapse: collapse;
  border-spacing: 0;
  font-family: var(--font-mono);
  font-size: var(--font-size-code);
  line-height: 22px;
  tab-size: 4;
}
.worktree-diff-table td {
  padding-block: 0;
  vertical-align: top;
}
.worktree-diff-number {
  width: 1%;
  min-width: 44px;
  padding-inline: 10px;
  border-right: 1px solid var(--color-border-subtle);
  color: var(--color-text-muted);
  text-align: right;
  user-select: none;
}
.worktree-diff-sign {
  width: 1%;
  min-width: 26px;
  padding-inline: 6px;
  text-align: center;
  user-select: none;
}
.worktree-diff-code {
  padding-inline: 4px 16px;
  white-space: pre;
}
.worktree-diff-hunk {
  background: var(--color-raised);
  color: var(--color-text-muted);
}
.worktree-diff-hunk td {
  padding: 7px 14px;
  font-family: var(--font-ui);
  font-size: var(--font-size-small);
}
.worktree-diff-line--add {
  background: var(--color-diff-add-bg);
}
.worktree-diff-line--del {
  background: var(--color-diff-del-bg);
}
.worktree-diff-line--add .worktree-diff-sign,
.worktree-diff-add {
  color: var(--color-diff-add-fg);
}
.worktree-diff-line--del .worktree-diff-sign,
.worktree-diff-del {
  color: var(--color-diff-del-fg);
}
.worktree-diff-line--note {
  color: var(--color-text-muted);
  font-style: italic;
}
.worktree-diff-notice {
  margin: 0;
  padding: 16px;
  color: var(--color-text-muted);
  font-size: var(--font-size-label);
}
@media (max-width: 760px) {
  .lifecycle-panel.worktree-integration-panel {
    width: calc(100vw - 24px);
    max-width: calc(100vw - 24px);
    height: calc(100dvh - 24px);
    max-height: calc(100dvh - 24px);
  }
  .lifecycle-panel.worktree-integration-panel--fullscreen {
    width: 100vw;
    max-width: none;
    height: 100dvh;
    max-height: none;
  }
  .worktree-integration-heading {
    padding: 14px 16px;
    gap: 8px;
  }
  .worktree-integration-controls {
    padding: 16px;
  }
  .worktree-integration-fields {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }
  .worktree-review {
    padding: 0 16px 16px;
  }
  .worktree-review--fullscreen {
    display: block;
  }
  .worktree-file-nav {
    display: none;
  }
  .worktree-integration-footer {
    padding: 12px 16px;
  }
  .worktree-file-heading {
    padding: 10px;
    gap: 6px;
  }
  .worktree-file-status {
    display: none;
  }
  .worktree-diff-number {
    min-width: 32px;
    padding-inline: 6px;
  }
}

.chatgpt-connect {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 20px;
}
.chatgpt-connect-emblem {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-lg);
  background: var(--color-base);
  color: var(--color-accent-bright);
}
.chatgpt-connect-emblem--error {
  color: var(--color-danger);
}
.chatgpt-connect-heading {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}
.chatgpt-connect-eyebrow {
  color: var(--color-text-muted);
  font-size: var(--font-size-small);
}
.chatgpt-connect-heading p,
.chatgpt-connect-manual p,
.chatgpt-connect-intro p {
  margin: 0;
  color: var(--color-text-muted);
  font-size: var(--font-size-label);
  line-height: 1.65;
}
.chatgpt-connect-account {
  max-width: 100%;
  overflow-wrap: anywhere;
  padding: 4px 8px;
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-sm);
  font-size: var(--font-size-small);
}
.chatgpt-connect-steps {
  display: flex;
  gap: 12px;
  margin: 0;
  padding: 16px 0;
  list-style: none;
  border-block: 1px solid var(--color-border-subtle);
}
.chatgpt-connect-steps li {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--color-text-muted);
  font-size: var(--font-size-small);
}
.chatgpt-connect-steps li > span {
  display: grid;
  place-items: center;
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-pill);
}
.chatgpt-connect-steps li[data-active="true"] {
  color: var(--color-text-primary);
}
.chatgpt-connect-steps li[data-active="true"] > span {
  border-color: var(--color-accent);
  color: var(--color-accent-bright);
}
.chatgpt-connect-browser {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chatgpt-connect-browser .providers-button {
  height: 36px;
  justify-content: center;
}
.chatgpt-connect-browser .providers-button--primary {
  flex: 1;
}
.chatgpt-connect-wait {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--color-text-muted);
  font-size: var(--font-size-small);
}
.chatgpt-connect-wait svg {
  animation: chatgpt-wait 1.6s linear infinite;
}
.chatgpt-connect-manual {
  border-top: 1px solid var(--color-border-subtle);
  padding-top: 14px;
}
.chatgpt-connect-manual summary {
  cursor: pointer;
  color: var(--color-text-muted);
  font-size: var(--font-size-small);
}
.chatgpt-connect-manual summary:hover {
  color: var(--color-text-primary);
}
.chatgpt-connect-manual p {
  margin: 12px 0;
}
.chatgpt-connect-manual form {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  margin-bottom: 12px;
}
.chatgpt-connect-manual .providers-input {
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}
.chatgpt-connect-footer {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-top: 4px;
}
.chatgpt-connect-footer > span {
  color: var(--color-text-muted);
  font-size: var(--font-size-small);
  line-height: 1.6;
}
.chatgpt-connect-intro {
  display: flex;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-md);
  background: var(--color-base);
}
.chatgpt-connect-intro svg {
  flex-shrink: 0;
  margin-top: 2px;
  color: var(--color-accent-bright);
}
.chatgpt-connect-intro strong {
  display: block;
  margin-bottom: 5px;
  font-size: var(--font-size-label);
  font-weight: var(--font-weight-medium);
}
.providers-dialog--oauth {
  width: min(460px, calc(100vw - 32px));
  padding: 28px;
  box-sizing: border-box;
}
.providers-dialog {
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
}
.providers-auth-state {
  color: var(--color-ember);
  font-size: var(--font-size-small);
}
@keyframes chatgpt-wait {
  to {
    transform: rotate(360deg);
  }
}
@media (prefers-reduced-motion: reduce) {
  .chatgpt-connect-wait svg {
    animation: none;
  }
}
@media (max-width: 420px) {
  .providers-dialog--oauth {
    padding: 20px;
  }
  .chatgpt-connect-steps {
    gap: 8px;
  }
  .chatgpt-connect-steps li {
    flex-direction: column;
    align-items: flex-start;
  }
}

.providers-page {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 16px;
  min-height: 0;
  padding: 16px;
}

.providers-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.providers-title {
  margin: 0;
  font-family: var(--font-serif);
  font-size: var(--font-size-hero);
  font-weight: var(--font-weight-heading);
  color: var(--color-text-primary);
}

.providers-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 16px;
  color: var(--color-text-muted);
  font-size: var(--font-size-body);
}

.providers-note {
  margin: 0;
  color: var(--color-text-muted);
  font-size: var(--font-size-small);
}

.providers-routes {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.providers-item {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.providers-route-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-md);
  background: var(--color-raised);
}

.providers-item-head,
.providers-route-head {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex-wrap: wrap;
}

.providers-item-toggle {
  display: flex;
  flex: 1 1 180px;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--color-text-primary);
  text-align: left;
  cursor: pointer;
}

.providers-item-name {
  min-width: 80px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: var(--font-size-large);
  font-weight: var(--font-weight-medium);
}

.providers-item-kind {
  flex: 0 0 auto;
  color: var(--color-text-muted);
  font-size: var(--font-size-small);
}

.providers-item-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
}

.providers-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 12px;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--color-text-primary);
  font-size: var(--font-size-label);
  cursor: pointer;
}

.providers-button:hover {
  background: var(--color-base-hover);
}

.providers-button--primary {
  border-color: transparent;
  background: var(--color-accent);
  color: var(--color-ink-on-fill);
}

.providers-button--primary:hover {
  background: var(--color-accent-bright);
}

.providers-button--danger {
  border-color: var(--color-danger);
  color: var(--color-danger);
}

.providers-button--small {
  height: 26px;
  padding: 0 8px;
  font-size: var(--font-size-small);
}

.providers-button:disabled {
  opacity: 0.5;
  cursor: default;
}

.providers-input {
  height: 30px;
  padding: 0 10px;
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-sm);
  background: var(--color-base);
  color: var(--color-text-primary);
  font-size: var(--font-size-label);
}

.providers-input--small {
  height: 26px;
  padding: 0 8px;
  font-size: var(--font-size-small);
}

.providers-input:focus {
  border-color: var(--color-accent);
  outline: none;
}

.providers-input:disabled {
  color: var(--color-text-muted);
}

.providers-confirm {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: var(--color-base);
  color: var(--color-ember);
  font-size: var(--font-size-small);
}

.providers-confirm-actions {
  display: flex;
  gap: 6px;
}

.providers-refusal {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px;
  border: 1px solid var(--color-danger);
  border-radius: var(--radius-sm);
  color: var(--color-danger);
  font-size: var(--font-size-small);
}

.providers-refusal-title {
  font-weight: var(--font-weight-semibold);
}

.providers-refusal-note {
  color: var(--color-text-muted);
}

.providers-refusal-routes {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.providers-refusal-route {
  display: flex;
  align-items: center;
  gap: 8px;
}

.providers-refusal-route-id {
  font-family: var(--font-mono);
  font-size: var(--font-size-code);
}

.providers-catalog {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px 0 2px;
  border-top: 1px solid var(--color-border-subtle);
}

.providers-catalog-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--color-text-muted);
  font-size: var(--font-size-small);
  cursor: pointer;
}

.providers-catalog-toggle:hover {
  color: var(--color-text-primary);
}

.providers-catalog-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.providers-catalog-state {
  color: var(--color-text-muted);
  font-size: var(--font-size-small);
}

.providers-catalog-note {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: var(--color-base);
  color: var(--color-ember);
  font-size: var(--font-size-small);
}

.providers-catalog-note-detail {
  color: var(--color-text-muted);
}

.providers-catalog-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.providers-catalog-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 2px;
  border-bottom: 1px solid var(--color-border-subtle);
}

.providers-catalog-id {
  font-family: var(--font-mono);
  font-size: var(--font-size-code);
  color: var(--color-text-primary);
}

.providers-route-id {
  flex: 0 1 auto;
  min-width: 0;
  overflow-wrap: anywhere;
  font-family: var(--font-mono);
  font-size: var(--font-size-code);
  color: var(--color-text-muted);
}

.providers-route-provider {
  flex: 0 0 auto;
  color: var(--color-text-muted);
  font-size: var(--font-size-small);
}

.providers-route-formats {
  display: flex;
  flex: 0 0 auto;
  gap: 4px;
}

.providers-chip {
  display: inline-flex;
  padding: 0 8px;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-pill);
  line-height: 1.7;
  color: var(--color-text-muted);
  font-size: var(--font-size-code);
}

.providers-route-manual {
  display: flex;
  gap: 6px;
}

.providers-route-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.providers-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.providers-form .worktree-select-trigger {
  height: 30px;
  padding: 0 10px;
}

.providers-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.providers-fieldset {
  margin: 0;
  padding: 8px;
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-sm);
}

.providers-check {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--color-text-primary);
  font-size: var(--font-size-label);
}

.providers-field-label {
  color: var(--color-text-muted);
  font-size: var(--font-size-label);
}

.providers-field-hint {
  color: var(--color-text-muted);
  font-size: var(--font-size-code);
}

.providers-field-error {
  color: var(--color-danger);
  font-size: var(--font-size-small);
}

.providers-form-error {
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: var(--color-base);
  color: var(--color-danger);
  font-size: var(--font-size-small);
}

.providers-dialog-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgb(0 0 0 / 0.5);
}

.providers-dialog {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: min(420px, calc(100vw - 32px));
  padding: 20px;
  border-radius: var(--radius-dialog);
  background: var(--color-raised);
  color: var(--color-text-primary);
}

.providers-dialog-title {
  margin: 0;
  font-family: var(--font-serif);
  font-size: var(--font-size-title);
  font-weight: var(--font-weight-regular);
}

.providers-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
.providers-catalog-count {
  color: var(--color-text-muted);
  font-variant-numeric: tabular-nums;
}
.providers-catalog-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-sm);
  color: var(--color-text-muted);
}
.providers-catalog-search:focus-within {
  border-color: var(--color-accent);
}
.providers-catalog-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--color-text-primary);
  font: inherit;
  font-size: var(--font-size-small);
}
.providers-model-name {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: var(--font-size-label);
}
.providers-model-name .providers-catalog-id {
  color: var(--color-text-muted);
  font-size: var(--font-size-small);
}
.providers-model-capabilities {
  display: flex;
  flex-shrink: 0;
  gap: 8px;
  align-items: center;
}
.providers-model-capability {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: var(--radius-sm);
  color: var(--color-text-muted);
}
.providers-model-capability:hover,
.providers-model-capability:focus-visible {
  background: var(--color-base-hover);
  color: var(--color-accent);
}
.providers-model-tooltip {
  display: none;
  position: absolute;
  z-index: 2;
  bottom: calc(100% + 6px);
  right: 0;
  padding: 5px 8px;
  background: var(--color-raised);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-sm);
  color: var(--color-text-primary);
  white-space: nowrap;
  font-size: var(--font-size-small);
  box-shadow: 0 4px 16px rgb(0 0 0 / 0.15);
}
.providers-model-capability:hover .providers-model-tooltip,
.providers-model-capability:focus-visible .providers-model-tooltip {
  display: block;
}
.providers-model-unknown {
  color: var(--color-text-muted);
  font-size: var(--font-size-small);
}
.providers-catalog-list {
  gap: 0;
}
.providers-catalog-row:last-child {
  border-bottom: 0;
}
.providers-dialog {
  border: 1px solid var(--color-border-subtle);
  box-shadow: 0 16px 64px rgb(0 0 0 / 0.25);
}
@media (max-width: 560px) {
  .providers-model-tooltip {
    left: 0;
    right: auto;
  }
  .providers-catalog-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }
}

.native-session-extras {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  padding: 8px 12px;
  color: var(--color-text-muted);
  font-size: 12px;
}
.native-session-extras pre {
  flex-basis: 100%;
  margin: 0;
  max-height: 14rem;
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font: inherit;
}

/* fraunces-vietnamese-full-normal */


/* fraunces-latin-ext-full-normal */


/* fraunces-latin-full-normal */
@font-face {
  font-family: 'Fraunces Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(/demos/assets/7e744849028e2219.woff2) format('woff2-variations');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
/* fraunces-vietnamese-full-italic */


/* fraunces-latin-ext-full-italic */


/* fraunces-latin-full-italic */

/* hanken-grotesk-cyrillic-ext-wght-normal */


/* hanken-grotesk-vietnamese-wght-normal */


/* hanken-grotesk-latin-ext-wght-normal */


/* hanken-grotesk-latin-wght-normal */
@font-face {
  font-family: 'Hanken Grotesk Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(/demos/assets/e9201eddf1d41d0b.woff2) format('woff2-variations');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
/* hanken-grotesk-cyrillic-ext-wght-italic */


/* hanken-grotesk-vietnamese-wght-italic */


/* hanken-grotesk-latin-ext-wght-italic */


/* hanken-grotesk-latin-wght-italic */

/* jetbrains-mono-cyrillic-ext-wght-normal */


/* jetbrains-mono-cyrillic-wght-normal */


/* jetbrains-mono-greek-wght-normal */


/* jetbrains-mono-vietnamese-wght-normal */


/* jetbrains-mono-latin-ext-wght-normal */


/* jetbrains-mono-latin-wght-normal */
@font-face {
  font-family: 'JetBrains Mono Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 800;
  src: url(/demos/assets/18be452724bfdc23.woff2) format('woff2-variations');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
/* jetbrains-mono-cyrillic-ext-wght-italic */


/* jetbrains-mono-cyrillic-wght-italic */


/* jetbrains-mono-greek-wght-italic */


/* jetbrains-mono-vietnamese-wght-italic */


/* jetbrains-mono-latin-ext-wght-italic */


/* jetbrains-mono-latin-wght-italic */

:root {
  --color-base: #16140f;
  --color-base-hover: #22201b;
  --color-raised: #1e1b15;
  --color-raised-hover: #292621;
  --color-surface-high: #2e2b23;
  --color-border-subtle: #332e26;
  --color-border-strong: #423b30;
  --color-ink-on-fill: #16140f;
  --color-diff-add-bg: #1d2425;
  --color-diff-add-fg: #7cc5e7;
  --color-diff-del-bg: #2e221b;
  --color-diff-del-fg: #f0a08c;
  --color-accent: #4f97c6;
  --color-accent-bright: #7cc5e7;
  --color-danger: #e28570;
  --color-success: #8fa987;
  --color-ember: #c2924a;
  --color-text-primary: #ece7dd;
  --color-text-muted: #9c968a;

  --radius-xs: 6px;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 12px;
  --radius-dialog: 12px;
  --radius-composer: 16px;
  --radius-pill: 999px;

  --shell-header-height: 44px;

  --font-ui: "Hanken Grotesk Variable", system-ui, sans-serif;
  --font-serif: "Fraunces Variable", Georgia, serif;
  --font-mono: "JetBrains Mono Variable", ui-monospace, monospace;

  --font-size-hero: 24px;
  --font-size-title: 20px;
  --font-size-logo: 18px;
  --font-size-large: 16px;
  --font-size-body: 14px;
  --font-size-label: 13px;
  --font-size-small: 12px;
  --font-size-code: 12px;
  --font-size-telemetry: 10px;

  --font-weight-heading: 400;
  --font-weight-regular: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  /* Preserve the source font axes; no custom SOFT/WONK styling. */
  --font-variation-serif: normal;
  --icon-stroke-width: 1.2;
}

[data-theme="light"] {
  --color-base: #f6f1e7;
  --color-base-hover: #efe8db;
  --color-raised: #fdfaf2;
  --color-raised-hover: #f4eee1;
  --color-surface-high: #ffffff;
  --color-border-subtle: #e4dccd;
  --color-border-strong: #cfc4b0;
  --color-ink-on-fill: #fdfaf2;
  --color-diff-add-bg: #e4edf2;
  --color-diff-add-fg: #1d4f73;
  --color-diff-del-bg: #f4e6e0;
  --color-diff-del-fg: #b0492e;
  --color-accent: #2b6d9c;
  --color-accent-bright: #1d4f73;
  --color-danger: #b0492e;
  --color-success: #526f49;
  --color-ember: #8a5d1f;
  --color-text-primary: #1a1712;
  --color-text-muted: #6b6355;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body,
#root {
  height: 100%;
  margin: 0;
}

body {
  background: var(--color-base);
  color: var(--color-text-primary);
  font-family: var(--font-ui);
  font-size: var(--font-size-body);
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  font-family: var(--font-serif);
  font-weight: var(--font-weight-heading);
  font-variation-settings: var(--font-variation-serif);
}

code,
pre,
kbd {
  font-family: var(--font-mono);
}

.app-root {
  display: flex;
  height: 100%;
  overflow: hidden;
}

button {
  font-family: var(--font-ui);
}

input,
textarea {
  font-family: var(--font-ui);
  color: var(--color-text-primary);
}

::selection {
  background: var(--color-accent);
  color: var(--color-ink-on-fill);
}

:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

button:focus:not(:focus-visible),
a:focus:not(:focus-visible),
[tabindex]:focus:not(:focus-visible) {
  outline: none;
}

.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;
}

*,*::before,*::after{animation:none!important;transition:none!important;caret-color:transparent!important}
*,*::before,*::after{animation:none!important;transition:none!important;caret-color:transparent!important}