Skip to content

Local-first AI coding agent desktop: Electron + Rust host core + pi Agent Harness + user-installable plugins

25.2 KB
Raw Blame
/*
  Work panel — dock, header and tab switcher, plus the review (diff), browser,
  files, and plugin-contributed views.
*/

/* ---------- Work panel (review / browser / files / plugin views) ---------- */

.work-panel {
  position: relative;
  display: flex;
  flex-direction: row;
  flex: 0 0 var(--work-panel-width);
  width: var(--work-panel-width);
  min-width: 0;
  height: 100%;
  min-height: 0;
  z-index: 20;
  /* The dock is a step lighter than the conversation pane, and that tone
     change is its only edge (D297): no divider against the chat column.
     `--ds-bg-dock` is a token, not a literal, so a contributed theme can move
     the whole column (D419). */
  background: var(--ds-bg-dock);
  /*
   * Animate the allocated dock width as well as its small compositor slide.
   * Transform-only feedback used to leave the flex item at full width before
   * the animation painted, which made the chat column jump on every open or
   * close.
   */
  animation: work-panel-in var(--motion-duration-normal) var(--motion-ease-out)
    both;
}

.work-panel-pending {
  align-items: center;
  justify-content: center;
  animation: none;
}

.work-panel.is-exit-pending,
.work-panel.is-exiting {
  pointer-events: none;
}

.work-panel.is-exiting {
  overflow: hidden;
  animation: work-panel-out var(--motion-duration-fast) var(--motion-ease-in)
    both;
}

@keyframes work-panel-in {
  from {
    opacity: 0;
    flex-basis: 0;
    width: 0;
    transform: translateX(8px);
  }
  to {
    opacity: 1;
    flex-basis: var(--work-panel-width);
    width: var(--work-panel-width);
    transform: translateX(0);
  }
}

@keyframes work-panel-out {
  from {
    opacity: 1;
    flex-basis: var(--work-panel-width);
    width: var(--work-panel-width);
    transform: translateX(0);
  }
  to {
    opacity: 0;
    flex-basis: 0;
    width: 0;
    transform: translateX(8px);
  }
}

.work-panel-main {
  display: flex;
  flex: 1;
  min-width: 0;
  min-height: 0;
  flex-direction: column;
}

.work-panel-resize {
  position: absolute;
  inset-block: 0;
  left: -5px;
  width: 10px;
  z-index: 30;
  cursor: col-resize;
  touch-action: none;
}

.work-panel-resize::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 2px;
  height: 32px;
  border-radius: var(--radius-full);
  background: color-mix(in oklab, var(--ds-text-primary) 20%, transparent);
  opacity: 0;
  transform: translate(-50%, -50%);
  transition: opacity var(--motion-duration-fast) var(--motion-ease-out);
}

.work-panel-resize:hover::after,
.work-panel-resize:active::after,
.work-panel-resize:focus-visible::after,
.work-panel[data-resizing="true"] .work-panel-resize::after {
  opacity: 1;
}

.work-panel-resize:focus-visible {
  outline: none;
}

.work-panel-resize:focus-visible::after,
.work-panel-resize:active::after,
.work-panel[data-resizing="true"] .work-panel-resize::after {
  background: var(--ds-accent);
}

:root[data-work-panel-resizing="true"],
:root[data-work-panel-resizing="true"] * {
  cursor: col-resize !important;
  user-select: none !important;
}

.work-panel-header {
  position: relative;
  display: flex;
  height: var(--ds-toolbar-height);
  flex: 0 0 auto;
  align-items: center;
  gap: var(--ds-work-panel-control-gap);
  background: var(--ds-bg-dock-raised);
  /* Keep the fixed work-panel toggle in its own hit-target lane. The reserve is
     spent from the toggle's size/inset tokens plus the header's own control
     gap, so the last panel control ends exactly one button gap before the
     toggle instead of behind a divider. */
  padding: 0
    calc(
      var(--ds-work-panel-toggle-size) + var(--ds-work-panel-toggle-inset) +
        var(--ds-work-panel-control-gap)
    )
    0 12px;
  -webkit-app-region: drag;
}

.app-shell.work-panel-maximized .work-panel-header {
  margin-left: calc(var(--preview-chrome-inset) + var(--preview-chrome-action-lane));
  padding-left: 0;
}

.app-shell.work-panel-maximized .work-panel-main {
  background: linear-gradient(
    var(--ds-bg-dock-raised) 0 var(--ds-toolbar-height),
    transparent var(--ds-toolbar-height)
  );
}

:root[data-platform="win32"] .work-panel-header,
:root[data-platform="linux"] .work-panel-header {
  /* End this header's box — and therefore its native drag rectangle — before
     the viewport-fixed control band. The drag rectangle is the border box, so
     padding the content clear of the band still leaves that rectangle across
     the controls, and Electron swallows their hover and click. The shared
     right-side control lane keeps the same content inset once the box stops
     early. */
  margin-right: var(--ds-window-controls-width);
}

/* The header is a clipped tab strip plus a fixed add trigger. On Windows/Linux
   the shared control lane and 120px margin reserve the toggle and native
   controls without allowing the strip to claim either hit target. */
.work-panel-tab-strip-wrap {
  display: flex;
  min-width: 0;
  flex: 1 1 auto;
  align-items: center;
  overflow: hidden;
}

.work-panel-tab-strip {
  display: flex;
  min-width: 0;
  max-width: 100%;
  width: max-content;
  height: 32px;
  /* Only the visible viewport excludes native dragging. Per-tab exclusions
     escape the overflow clip when scrolled, blocking neighboring titlebars.
     Keep unused header space outside this content-sized viewport draggable. */
  flex: 0 1 auto;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-inline: contain;
  /* Reserve the close button's width at the inline end so a scrolled-to tab
     never lands with its sibling close button clipped by the overflow edge
     (issue #1762). */
  scroll-padding-inline: 2px 24px;
}

.work-panel-tab-strip::-webkit-scrollbar {
  display: none;
}

.work-panel-tab {
  position: relative;
  display: inline-flex;
  min-width: 92px;
  max-width: 180px;
  height: 28px;
  flex: 0 0 auto;
  align-items: center;
  border-radius: var(--radius-sm);
  color: var(--ds-text-muted);
  transition:
    background var(--motion-duration-fast) var(--motion-ease-out),
    color var(--motion-duration-fast) var(--motion-ease-out);
}

.work-panel-tab.is-dragging {
  opacity: 0.5;
}

.work-panel-tab.is-dragging .work-panel-tab-button {
  cursor: grabbing;
}

.work-panel-tab.is-drop-before::before,
.work-panel-tab.is-drop-after::after {
  position: absolute;
  top: 4px;
  bottom: 4px;
  z-index: 1;
  width: 2px;
  border-radius: var(--radius-round);
  background: var(--ds-accent);
  content: "";
  pointer-events: none;
}

.work-panel-tab.is-drop-before::before {
  left: -4px;
}

.work-panel-tab.is-drop-after::after {
  right: -4px;
}

.work-panel-tab:hover,
.work-panel-tab.active {
  background: var(--ds-bg-hover);
  color: var(--ds-text-primary);
}

.work-panel-tab-button {
  display: inline-flex;
  min-width: 0;
  height: 28px;
  flex: 1 1 auto;
  align-items: center;
  gap: 6px;
  padding: 0 2px 0 10px;
  cursor: grab;
  color: inherit;
  text-align: left;
}

.work-panel-tab-button > svg {
  flex: 0 0 auto;
}

.work-panel-tab-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: var(--text-sm-plus);
  font-weight: var(--font-weight-medium);
}

.work-panel-tab-button:focus-visible,
.work-panel-tab-close:focus-visible {
  outline: 2px solid var(--ds-focus);
  outline-offset: -2px;
  border-radius: var(--radius-sm);
}

.work-panel-tab-close {
  display: inline-flex;
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  color: var(--ds-text-muted);
  opacity: 0;
  transition:
    background var(--motion-duration-fast) var(--motion-ease-out),
    color var(--motion-duration-fast) var(--motion-ease-out),
    opacity var(--motion-duration-fast) var(--motion-ease-out);
}

.work-panel-tab:hover .work-panel-tab-close,
.work-panel-tab.active .work-panel-tab-close,
.work-panel-tab-close:focus-visible {
  opacity: 1;
}

.work-panel-tab-close:hover {
  background: var(--ds-bg-active);
  color: var(--ds-text-primary);
}

:root[data-work-panel-tab-reordering="true"],
:root[data-work-panel-tab-reordering="true"] * {
  cursor: grabbing !important;
  user-select: none !important;
}

/* One button group with the viewport-fixed collapse toggle: the same control
   gap the header reserves for it, and no divider, inset, or margin of its own.
   The rule owns spacing only — `+` and maximize take the shared chrome-control
   geometry and transparent seat from chrome.css, so the group reads as quiet
   icon controls. */
.work-panel-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: var(--ds-work-panel-control-gap);
}


/* Preview mode: the panel takes MainChat's width as well, so the divider has no
   second column to trade width with and the dock fills its flex row. */
.work-panel.is-maximized {
  flex: 1 1 auto;
  width: auto;
  max-width: none;
}

.work-panel.is-maximized .work-panel-resize {
  cursor: default;
}


.work-panel-body {
  position: relative;
  display: flex;
  min-height: 0;
  flex: 1;
  flex-direction: column;
}

.work-panel-tabpane {
  display: flex;
  min-height: 0;
  flex: 1;
  flex-direction: column;
}

.work-panel-tabpane.is-hidden {
  display: none;
}

/* ---------- Subagent transcript tab ------------------------------------- */

/*
 * A delegation renders as a conversation: the tab reuses the main transcript's
 * message-list classes for its rows, so the only tab-specific layout is the
 * column (scroll area above a read-only composer) and the composer itself.
 * The scroll area owns the only scrollbar; the composer never scrolls.
 */
.subagent-transcript-tab {
  display: flex;
  min-width: 0;
  min-height: 0;
  flex: 1;
  flex-direction: column;
}

.subagent-transcript-scroll {
  min-width: 0;
  min-height: 0;
  flex: 1;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 0 16px 32px;
}

.subagent-transcript-list {
  /* Keep the shared turn styles, but size them to this panel, not MainChat. */
  --chat-prose-max-width: 100%;
  display: flex;
  min-width: 0;
  flex-direction: column;
}

/* Keep short prompts compact without carrying over MainChat's 600px cap. */
.subagent-transcript-list .message-row.user .message-col {
  width: min(max-content, 82%);
  max-width: 82%;
}

.subagent-transcript-empty {
  display: grid;
  min-height: 160px;
  place-items: center;
  padding: 0 16px;
  color: var(--ds-text-muted);
  font-size: var(--text-sm-plus);
  text-align: center;
}

.subagent-transcript-jump {
  bottom: calc(var(--st-composer-dock-height, 68px) + 8px);
  z-index: 6;
}

.subagent-transcript-composer {
  flex: none;
  min-width: 0;
  padding: 0 14px 10px;
}

.subagent-composer-notice {
  min-height: 2lh;
  max-height: none;
  color: var(--ds-text-secondary);
  cursor: default;
}

.subagent-composer-toolbar {
  justify-content: flex-end;
}

.subagent-composer-model {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  min-height: 28px;
  gap: 6px;
  font-size: var(--text-sm);
  padding-inline: 8px;
  color: var(--ds-text-secondary);
}
/* Shared per-tool empty state used by Files and plugin fallback surfaces. */
.work-tab-empty {
  display: flex;
  flex: 1;
  min-height: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 28px 24px;
  color: var(--ds-text-muted);
  text-align: center;
}

.work-tab-empty-icon {
  display: inline-flex;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
  border-radius: var(--radius-full);
  background: color-mix(in oklab, var(--ds-text-primary) 7%, transparent);
  color: var(--ds-text-secondary);
}

.work-tab-empty-title {
  margin: 0;
  color: var(--ds-text-primary);
  font-size: var(--text-base-plus);
  font-weight: var(--font-weight-medium-plus);
}

.work-tab-empty-body {
  max-width: 34ch;
  margin: 0;
  color: var(--ds-text-muted);
  font-size: var(--text-md);
  line-height: var(--leading-body);
}

.work-panel-launcher {
  display: flex;
  width: 100%;
  min-height: 0;
  flex: 1;
  flex-direction: column;
  gap: 8px;
  padding: 14px 10px;
  overflow: hidden;
}

.work-panel-launcher-title {
  flex: 0 0 auto;
  padding: 0 8px 4px;
  color: var(--ds-text-muted);
  font-size: var(--text-sm);
  font-weight: var(--font-weight-semibold);
}

.work-panel-launcher-list {
  display: flex;
  min-height: 0;
  flex: 1;
  flex-direction: column;
  gap: 2px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  scrollbar-gutter: stable;
}

/* A quiet, persistent thumb makes an overflowing tool list discoverable even
   before hover. The shared scrollbar still renders only when needed. */
.work-panel-launcher-list::-webkit-scrollbar-thumb {
  background: color-mix(in oklab, var(--ds-text-primary) 16%, transparent);
}

.work-panel-launcher-list::-webkit-scrollbar-thumb:hover,
.work-panel-launcher-list::-webkit-scrollbar-thumb:active {
  background: color-mix(in oklab, var(--ds-text-primary) 28%, transparent);
}

.work-panel-launcher-row {
  display: flex;
  min-width: 0;
  height: 40px;
  /* Rows are flex items of the scrollable list: keep them at their full 40px
     so a constrained list scrolls instead of compressing the click targets. */
  flex-shrink: 0;
  align-items: center;
  gap: 10px;
  padding: 0 10px;
  border-radius: var(--radius-sm);
  color: var(--ds-text-primary);
  font-size: var(--text-md);
  text-align: left;
  transition:
    background var(--motion-duration-fast) var(--motion-ease-out),
    color var(--motion-duration-fast) var(--motion-ease-out);
}

.work-panel-launcher-row:hover {
  background: var(--ds-bg-hover);
}

.work-panel-launcher-row:focus-visible {
  outline: 2px solid var(--ds-focus);
  outline-offset: -2px;
}

.work-panel-launcher-icon {
  display: inline-flex;
  width: 18px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  color: var(--ds-text-secondary);
}

.work-panel-launcher-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.work-panel-launcher-row kbd {
  margin-left: auto;
  color: var(--ds-text-muted);
  font-size: var(--text-2xs);
}

/* Work panel — review tab */

.review-tab {
  display: flex;
  min-height: 0;
  flex: 1;
  flex-direction: column;
}

.review-toolbar {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 6px 10px;
}

.review-summary {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--ds-text-muted);
  font-size: var(--text-sm);
}

.review-toolbar-counts {
  gap: 7px;
  font-size: var(--text-2xs);
}

.review-scroll {
  min-height: 0;
  flex: 1;
  overflow: auto;
  padding: 4px 8px 12px;
}

.diff-counts {
  display: inline-flex;
  flex: 0 0 auto;
  gap: 6px;
  font-size: var(--text-2xs);
  font-family: var(--font-mono);
}

.diff-count-add {
  color: var(--ds-success);
}

.diff-count-del {
  color: var(--ds-error);
}

/* Hunks are set apart by a gap; each opens with its own tinted header line. */
.diff-hunk + .diff-hunk {
  margin-top: 8px;
}

.diff-line {
  display: flex;
  min-width: 0;
  align-items: stretch;
  font-family: var(--font-mono);
  font-size: var(--text-xs-plus);
  line-height: var(--leading-relaxed);
}

.diff-line-sign {
  flex: 0 0 auto;
  width: 18px;
  text-align: center;
  user-select: none;
  color: var(--ds-text-muted);
}

.diff-line-text {
  flex: 1;
  min-width: 0;
  padding-right: 12px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.diff-line.add {
  background: color-mix(in oklab, var(--ds-success) 12%, transparent);
}

.diff-line.add .diff-line-sign {
  color: var(--ds-success);
}

.diff-line.del {
  background: color-mix(in oklab, var(--ds-error) 12%, transparent);
}

.diff-line.del .diff-line-sign {
  color: var(--ds-error);
}

.diff-line.hunk {
  padding: 2px 8px;
  background: color-mix(in oklab, var(--ds-text-primary) 4%, transparent);
  color: var(--ds-text-muted);
  font-size: var(--text-2xs);
}

/* Work panel — browser tab */

.work-browser {
  display: flex;
  min-height: 0;
  flex: 1;
  flex-direction: column;
}

.work-browser-chrome {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 4px;
  padding: 6px 8px;
  background: var(--ds-bg-dock-raised);
}

.work-browser-url {
  flex: 1;
  min-width: 0;
}

.work-browser-url input {
  width: 100%;
  height: 26px;
  padding: 0 10px;
  border: 0;
  border-radius: var(--radius-full);
  background: var(--ds-tile-hover);
  color: var(--ds-text-primary);
  font-size: var(--text-sm);
  transition:
    background var(--motion-duration-fast) var(--motion-ease-out),
    box-shadow var(--motion-duration-fast) var(--motion-ease-out);
}

/* Filled field, accent ring only while focused (D297). */
.work-browser-url input:focus {
  outline: none;
  background: var(--ds-raised);
  box-shadow: 0 0 0 2px color-mix(in oklab, var(--ds-accent) 22%, transparent);
}

.work-browser-surface {
  position: relative;
  min-height: 0;
  flex: 1;
  display: flex;
}

/* Work panel — plugin views (ADR 0104)

   The page itself is a native WebContentsView composited above the renderer,
   so this is only the rect it is positioned against. It still paints a
   background: during the first load the view has not drawn yet, and a
   transparent hole would show the conversation behind the panel. The panel
   itself is opaque, so the surface inherits that paint rather than restating
   the chat tone (D297). */

.work-plugin-view {
  min-height: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.work-plugin-view-surface {
  position: relative;
  min-height: 0;
  flex: 1;
  display: flex;
}

/* Fallback for a view whose icon token this build does not know. Sized to the
   15px icon box the launcher rows use so rows never shift between tools. */
.work-panel-view-initial {
  display: inline-flex;
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-3xs);
  background: color-mix(in oklab, var(--ds-text-primary) 10%, transparent);
  color: var(--ds-text-secondary);
  font-size: var(--text-xs);
  font-weight: var(--font-weight-medium-plus);
  line-height: var(--leading-none);
}

/* Work panel — files tab */

.file-tree {
  min-height: 0;
  flex: 1;
  overflow: auto;
  padding: 6px 6px 16px;
}

.file-tree-row {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 6px;
  padding-top: 3px;
  padding-bottom: 3px;
  padding-right: 8px;
  border-radius: var(--radius-2xs);
  text-align: left;
  font-size: var(--text-sm);
  color: var(--ds-text-secondary);
  transition:
    background var(--motion-duration-fast) var(--motion-ease-out),
    color var(--motion-duration-fast) var(--motion-ease-out);
}

.file-tree-row:hover {
  background: var(--ds-bg-hover);
  color: var(--ds-text-primary);
}

.file-tree-row.active {
  background: var(--ds-bg-active);
  color: var(--ds-text-primary);
}

.file-tree-caret {
  display: inline-flex;
  width: 12px;
  flex: 0 0 auto;
  color: var(--ds-text-muted);
  transition: transform var(--motion-duration-fast) var(--motion-ease-out);
}

.file-tree-caret.open {
  transform: rotate(90deg);
}

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

.file-tree-note {
  padding-top: 4px;
  padding-bottom: 4px;
  font-size: var(--text-sm);
  color: var(--ds-text-muted);
}

.file-viewer {
  display: flex;
  min-height: 0;
  flex: 1;
  flex-direction: column;
}

.file-viewer-header {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  background: var(--ds-bg-dock-raised);
}

.file-viewer-path {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  direction: rtl;
  text-align: left;
  font-family: var(--font-mono);
  font-size: var(--text-xs-plus);
  color: var(--ds-text-primary);
}

.file-viewer-size {
  flex: 0 0 auto;
  font-size: var(--text-2xs);
  color: var(--ds-text-muted);
}

.file-viewer-body {
  min-height: 0;
  flex: 1;
  overflow: auto;
  display: flex;
  flex-direction: column;
}

.file-viewer-code {
  margin: 0;
  padding: 10px 12px 20px;
  font-family: var(--font-mono);
  font-size: var(--text-xs-plus);
  line-height: var(--leading-relaxed);
  white-space: pre;
  min-width: max-content;
}

.file-viewer-line {
  min-height: 1em;
}

.file-viewer-cap {
  padding: 8px 0;
  color: var(--ds-text-muted);
}

.file-viewer-image {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.file-viewer-image img {
  max-width: 100%;
  max-height: 100%;
  border-radius: var(--radius-sm);
}

/* Round review has one vertical scroll owner, not nested diff viewports. */
.review-round-toolbar { gap: 6px; }
.review-select.review-round-scope { flex: 0 0 auto; width: auto; height: 24px; min-height: 24px; padding: 1px 8px; }
/* Keep native selection behavior; only review opts into the CSS-styled picker. */
.review-select {
  appearance: base-select;
  align-items: center;
  height: 28px; min-height: 28px; gap: 12px;
  font-size: var(--text-xs-plus);
}
.review-select::picker(select) {
  appearance: base-select;
  margin-block: 4px;
  padding: 0;
  border: 1px solid var(--ds-border-default);
  border-radius: var(--radius-sm);
  background: var(--ds-bg-sidebar);
  color: var(--ds-text-primary);
  box-shadow: var(--ds-shadow-dialog);
  max-height: 320px;
  overflow: auto;
}
.review-select option {
  padding: 6px 10px;
  gap: 12px;
  border-radius: 0;
  background: var(--ds-bg-sidebar);
  color: var(--ds-text-primary);
  font-size: var(--text-xs-plus);
}
.review-select option:first-of-type { border-start-start-radius: var(--radius-sm); border-start-end-radius: var(--radius-sm); }
.review-select option:last-of-type { border-end-start-radius: var(--radius-sm); border-end-end-radius: var(--radius-sm); }
.review-select option:hover,
.review-select option:focus-visible {
  background: color-mix(in oklab, var(--ds-bg-sidebar) 92%, var(--ds-text-primary));
}
.review-select option:checked {
  background: color-mix(in oklab, var(--ds-bg-sidebar) 86%, var(--ds-text-primary));
}
.review-select option:focus-visible { outline: 1px solid var(--ds-text-muted); outline-offset: -1px; }
.review-select option::checkmark { order: 1; margin-inline-start: auto; }
.review-settings-button, .review-file-menu-button { flex: 0 0 24px; width: 24px; height: 24px; padding: 0; border: 0; border-radius: var(--radius-sm); background: transparent; }
.review-history-selector { display: flex; flex: 0 0 auto; align-items: center; gap: 12px; padding: 4px 10px 10px; }
.review-history-label { flex: 0 0 auto; white-space: nowrap; color: var(--ds-text-muted); font-size: var(--text-xs-plus); }
.review-history-round-select { flex: 1; min-width: 0; padding: 3px 10px; }
.review-history-round-select option { display: flex; align-items: center; }
.review-history-round-select .review-round-selected { display: flex; align-items: center; flex: 1; min-width: 0; gap: 12px; padding: 0; min-height: 0; height: auto; border: 0; background: transparent; color: inherit; font: inherit; text-align: start; }
.review-round-selected selectedcontent { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; }
.review-history-round-select option::checkmark { margin-inline-start: 0; }
.review-turn-time { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.review-turn-counts { display: inline-flex; flex: 0 0 auto; gap: 4px; margin-inline-start: auto; white-space: nowrap; font-variant-numeric: tabular-nums; }
.review-turn-counts.is-unknown { color: var(--ds-text-muted); font-size: var(--text-2xs); }
.review-history .review-scroll { overflow-y: auto; overflow-x: auto; scrollbar-gutter: stable; scroll-padding-top: 36px; }
.review-history-file { position: relative; min-width: 0; scroll-margin-top: 4px; }
.review-history-file-heading { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 4px; background: var(--ds-bg-dock); }
.review-history-file-header {
  display: flex; align-items: center;
  justify-content: flex-start; gap: 12px; flex: 1; min-width: 0;
  padding: 5px 6px; border: 0; border-radius: var(--radius-sm); background: transparent;
  color: var(--ds-text-primary); text-align: left; font-size: var(--text-xs-plus);
}
.review-file-label { display: flex; align-items: center; gap: 6px; flex: 1; min-width: 0; }
.review-file-disclosure { display: inline-flex; flex: 0 0 11px; visibility: hidden; color: var(--ds-text-muted); }
.review-history-file-header:hover .review-file-disclosure,
.review-history-file-header:focus-visible .review-file-disclosure { visibility: visible; }
.review-history-file-header .diff-counts { min-width: 70px; justify-content: flex-end; }
.review-history-file.open .review-file-disclosure > svg { transform: rotate(90deg); }
.review-history-file-header > svg, .review-history-file-header .diff-counts { flex-shrink: 0; }
.review-history-file-header .review-change-card-path { flex: 0 1 auto; min-width: 0; }
.review-history-file-body { margin: 2px 0 8px; border-radius: var(--radius-sm); background: var(--ds-tile); }
.review-history-record { min-width: 0; }
.review-history .review-change-card-body-content { overflow: visible; max-height: none; }
.review-line-number {
  flex: 0 0 4ch; padding: 3px 4px; color: var(--ds-text-faint); text-align: right;
  font-family: var(--font-mono); font-size: var(--text-2xs); user-select: none;
}

.review-history.is-nowrap .review-change-diff .diff-line { min-width: max-content; }
.review-history.is-nowrap .diff-line-text { white-space: pre; overflow-wrap: normal; }