/* src/styles/base.css */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
:root {
  --bg: #0f1117;
  --bg-surface: #1a1d27;
  --bg-surface-2: #222533;
  --bg-surface-3: #22253345;
  --bg-hover: #2a2e40;
  --border: #2e3248;
  --text: #e2e4ef;
  --text-muted: #7b809e;
  --text-faint: #4a4f6a;
  --color-paused-bg: #2d1f00;
  --color-paused-fg: #ffb830;
  --color-running-bg: #0d2640;
  --color-running-fg: #5ab4ff;
  --color-pending-bg: #1e2030;
  --color-pending-fg: #7b809e;
  --color-ok-bg: #0d2218;
  --color-ok-fg: #4ade80;
  --color-warn-bg: #261e00;
  --color-warn-fg: #fbbf24;
  --color-error-bg: #2d0d0d;
  --color-error-fg: #f87171;
  --color-stopped-bg: #1a1d27;
  --color-stopped-fg: #7b809e;
  --color-stopping-bg: #2a1608;
  --color-stopping-fg: #f97316;
  --color-recovered-bg: #1c1630;
  --color-recovered-fg: #a78bfa;
  --recovered-accent: #a78bfa;
  --color-accent: #5b8dd9;
  --accent-blue: #5b8dd9;
  --paused-accent: #ffb830;
  --font-sans:
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    sans-serif;
  --font-mono:
    "SF Mono",
    "Cascadia Code",
    "Fira Mono",
    monospace;
  --nav-height: 48px;
}
html,
body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
#app {
  height: 100%;
  display: flex;
  flex-direction: column;
}
button {
  cursor: pointer;
  font: inherit;
  border: 1px solid var(--border);
  background: var(--bg-surface-2);
  color: var(--text);
  border-radius: 4px;
  padding: 5px 12px;
  transition: background 0.1s;
}
button:hover:not(:disabled) {
  background: var(--bg-hover);
}
button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.app {
  display: flex;
  flex-direction: column;
  height: 100%;
}
.app__main {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  max-width: 960px;
  width: 100%;
  margin: 0 auto;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid var(--border);
  border-top-color: var(--text-muted);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  vertical-align: middle;
}
.spinner--small {
  width: 10px;
  height: 10px;
  border-width: 1.5px;
}
.placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 64px 0;
}
.placeholder__label {
  color: var(--text-muted);
  font-size: 15px;
}
.placeholder__note {
  color: var(--text-faint);
  font-size: 13px;
}

/* src/styles/nav.css */
.nav-bar {
  height: var(--nav-height);
  border-bottom: 1px solid var(--border);
  background: var(--bg-surface);
  display: flex;
  align-items: center;
  padding: 0 20px;
  gap: 16px;
  flex-shrink: 0;
}
.nav-bar__wordmark {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text);
  cursor: pointer;
  user-select: none;
}
.nav-bar__actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav-bar__sign-out {
  font-size: 12px;
  padding: 4px 10px;
  color: var(--text-muted);
  border-color: transparent;
  background: transparent;
}
.nav-bar__sign-out:hover {
  color: var(--text);
  background: var(--bg-surface-2);
}
.nav-bar__new-run {
  font-size: 12px;
  padding: 4px 12px;
  background: #1e3a6e;
  border-color: #2d5299;
  color: #a8c4f0;
  font-weight: 600;
}
.nav-bar__new-run:hover:not(:disabled) {
  background: #264a8a;
  border-color: #3d6abf;
  color: var(--text);
}
.nav-bar__shares {
  font-size: 12px;
  padding: 4px 12px;
  background: transparent;
  border-color: var(--border);
  color: var(--text-muted);
}
.nav-bar__shares:hover {
  color: var(--text);
  border-color: var(--text-muted);
}

/* src/styles/auth.css */
.auth-gate {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
  background: var(--bg);
}
.auth-gate__card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 32px 28px;
  width: 360px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.auth-gate__title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.auth-gate__subtitle {
  color: var(--text-muted);
  font-size: 13px;
}
.auth-gate__form {
  display: flex;
  gap: 8px;
}
.auth-gate__input {
  flex: 1;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 6px 10px;
  color: var(--text);
  font: inherit;
}
.auth-gate__input:focus {
  outline: none;
  border-color: #4a78d4;
}
.auth-gate__submit {
  padding: 6px 14px;
}
.auth-gate__error {
  color: var(--color-error-fg);
  font-size: 12px;
}

/* src/styles/badge.css */
.badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  padding: 2px 7px;
  border-radius: 3px;
  white-space: nowrap;
  text-transform: uppercase;
}
.badge--prominent {
  font-size: 12px;
  padding: 3px 9px;
}
@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.6;
  }
}
.badge--pulse {
  animation: pulse 2s ease-in-out infinite;
}

/* src/styles/modal.css */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: modal-backdrop-in 0.15s ease-out both;
}
@keyframes modal-backdrop-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
.modal-content {
  outline: none;
  animation: modal-content-in 0.15s ease-out both;
}
@keyframes modal-content-in {
  from {
    opacity: 0;
    transform: scale(0.98);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
.confirm-modal {
  width: min(440px, 95vw);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px 22px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.04);
}
.confirm-modal__title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.01em;
}
.confirm-modal__message {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  white-space: pre-line;
  word-wrap: break-word;
  overflow-wrap: anywhere;
}
.confirm-modal__error {
  font-size: 12px;
  color: var(--color-error-fg);
  padding: 6px 10px;
  background: color-mix(in srgb, var(--color-error-bg) 60%, transparent);
  border: 1px solid var(--color-error-fg);
  border-radius: 4px;
  line-height: 1.4;
}
.confirm-modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 4px;
}
.confirm-modal__btn {
  font-size: 13px;
  padding: 6px 16px;
  border-radius: 4px;
  font-weight: 600;
  transition:
    background 0.12s,
    border-color 0.12s,
    color 0.12s;
}
.confirm-modal__btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.confirm-modal__btn--cancel {
  background: transparent;
  border-color: var(--border);
  color: var(--text-muted);
}
.confirm-modal__btn--cancel:hover:not(:disabled) {
  background: var(--bg-surface-2);
  border-color: var(--text-muted);
  color: var(--text);
}
.confirm-modal__btn--primary {
  background: #1e3a6e;
  border-color: #2d5299;
  color: #a8c4f0;
}
.confirm-modal__btn--primary:hover:not(:disabled) {
  background: #264a8a;
  border-color: #3d6abf;
  color: var(--text);
}
.confirm-modal__btn--destructive {
  background: #3a1818;
  border-color: #6a2a2a;
  color: #f0a8a8;
}
.confirm-modal__btn--destructive:hover:not(:disabled) {
  background: #4d2020;
  border-color: #8a3a3a;
  color: #ffc0c0;
}
.confirm-modal__btn--destructive:active:not(:disabled) {
  background: #2a1010;
  transform: translateY(1px);
}

/* src/styles/run-list.css */
.run-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.run-list__loading,
.run-list__error,
.run-list__empty {
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 64px 0;
}
.run-list__error {
  color: var(--color-error-fg);
}
.run-list__footer {
  font-size: 11px;
  color: var(--text-faint);
  text-align: right;
  padding-top: 4px;
}
.run-list__section {
  display: flex;
  flex-direction: column;
}
.run-list__section--paused .section-header__label {
  color: var(--paused-accent);
}
.run-list__section--recovered .section-header__label {
  color: var(--recovered-accent);
}
.section-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 8px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--border);
}
.section-header__label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.section-header__count {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-faint);
  background: var(--bg-surface-2);
  border-radius: 10px;
  padding: 0 6px;
}
.run-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 14px;
  border-radius: 6px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--border);
  background: var(--bg-surface);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  margin-bottom: 6px;
}
.run-row:hover {
  background: var(--bg-hover);
  border-color: #3d4260;
}
.run-row:last-child {
  margin-bottom: 0;
}
.run-row--paused {
  border-left-color: var(--color-paused-fg);
}
.run-row--recovered {
  border-left-color: var(--color-recovered-fg);
}
.run-row--running {
  border-left-color: var(--color-running-fg);
}
.run-row--stopping {
  border-left-color: var(--color-stopping-fg);
}
.run-row--completed {
  border-left-color: var(--color-ok-fg);
}
.run-row--failed {
  border-left-color: var(--color-error-fg);
}
.run-row--stopped {
  border-left-color: var(--text-faint);
}
.run-row--paused {
  background: color-mix(in srgb, var(--color-paused-bg) 60%, var(--bg-surface));
}
.run-row--paused:hover {
  background: var(--color-paused-bg);
}
.run-row--recovered {
  background: color-mix(in srgb, var(--color-recovered-bg) 60%, var(--bg-surface));
}
.run-row--recovered:hover {
  background: var(--color-recovered-bg);
}
.run-row__top {
  display: flex;
  align-items: center;
  gap: 10px;
}
.run-row__flow {
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.run-row__waiting-indicator {
  font-size: 12px;
  color: var(--paused-accent);
  white-space: nowrap;
}
.run-row__waiting-indicator--recovered {
  color: var(--recovered-accent);
}
.run-row__current-step {
  font-size: 12px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.run-row__id {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-faint);
  white-space: nowrap;
  margin-left: auto;
  flex-shrink: 0;
}
.run-row__action {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 3px;
  border: 1px solid var(--border);
  background: transparent;
  cursor: pointer;
  transition:
    background 0.12s,
    border-color 0.12s,
    color 0.12s;
}
.run-row__action:focus-visible {
  outline: 1px solid var(--text-muted);
  outline-offset: 1px;
}
.run-row__action--stop {
  color: var(--text-muted);
}
.run-row__action--stop:hover:not(:disabled) {
  background: var(--bg-surface-2);
  border-color: var(--text-muted);
  color: var(--text);
}
.run-row__action--delete {
  color: var(--text-faint);
}
.run-row__action--delete:hover:not(:disabled) {
  background: color-mix(in srgb, var(--color-error-bg) 60%, transparent);
  border-color: var(--color-error-fg);
  color: var(--color-error-fg);
}
.run-row__bottom {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--text-muted);
}
.run-row__progress {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.run-row__progress-label {
  color: var(--text-muted);
}
.run-row__progress-bar {
  display: inline-block;
  width: 60px;
  height: 4px;
  background: var(--bg-surface-2);
  border-radius: 2px;
  overflow: hidden;
  vertical-align: middle;
}
.run-row__progress-fill {
  display: block;
  height: 100%;
  border-radius: 2px;
  transition: width 0.3s ease;
  min-width: 1px;
}
.run-row--completed .run-row__progress-fill,
.run-row--paused .run-row__progress-fill {
  background: var(--color-ok-fg);
}
.run-row--recovered .run-row__progress-fill {
  background: var(--color-recovered-fg);
}
.run-row--running .run-row__progress-fill {
  background: var(--color-running-fg);
}
.run-row--stopping .run-row__progress-fill {
  background: var(--color-stopping-fg);
}
.run-row--failed .run-row__progress-fill {
  background: var(--color-error-fg);
}
.run-row--stopped .run-row__progress-fill {
  background: var(--text-faint);
}
.run-row__duration {
  color: var(--text-muted);
  white-space: nowrap;
}
.run-row__time {
  color: var(--text-faint);
  white-space: nowrap;
}
.run-row__sep {
  color: var(--text-faint);
}
.run-row__error-hint {
  color: var(--color-error-fg);
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 300px;
}
.run-detail__action--resume {
  color: var(--color-running-fg);
  border-color: color-mix(in srgb, var(--color-running-fg) 40%, var(--border));
}
.run-detail__action--resume:hover:not(:disabled) {
  background: var(--color-running-bg);
  border-color: var(--color-running-fg);
  color: var(--color-running-fg);
}
.run-detail__action--dismiss {
  color: var(--text-faint);
}
.run-detail__action--dismiss:hover:not(:disabled) {
  background: color-mix(in srgb, var(--color-error-bg) 60%, transparent);
  border-color: var(--color-error-fg);
  color: var(--color-error-fg);
}
.run-detail__state-pill[data-state=recovered] {
  background: var(--color-recovered-bg);
  color: var(--color-recovered-fg);
  font-weight: 700;
}

/* src/styles/run-detail.css */
.run-detail {
  display: flex;
  flex-direction: column;
  height: 100%;
  margin: -24px;
  position: relative;
}
.run-detail__loading,
.run-detail__error,
.run-detail__not-found {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 64px 0;
  color: var(--text-muted);
}
.run-detail__error {
  color: var(--color-error-fg);
}
.run-detail__header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-surface);
  flex-shrink: 0;
}
.run-detail__back {
  font-size: 12px;
  padding: 4px 10px;
  color: var(--text-muted);
  border-color: transparent;
  background: transparent;
}
.run-detail__back:hover {
  color: var(--text);
  background: var(--bg-surface-2);
}
.run-detail__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.run-detail__flow-id {
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.run-detail__run-id {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-faint);
}
.run-detail__state-pill {
  margin-left: auto;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 3px 9px;
  border-radius: 3px;
  white-space: nowrap;
}
.run-detail__state-pill[data-state=paused] {
  background: var(--color-paused-bg);
  color: var(--color-paused-fg);
}
.run-detail__state-pill[data-state=running] {
  background: var(--color-running-bg);
  color: var(--color-running-fg);
}
.run-detail__state-pill[data-state=pending] {
  background: var(--color-pending-bg);
  color: var(--color-pending-fg);
}
.run-detail__state-pill[data-state=stopping] {
  background: var(--color-stopping-bg);
  color: var(--color-stopping-fg);
}
.run-detail__state-pill[data-state=completed] {
  background: var(--color-ok-bg);
  color: var(--color-ok-fg);
}
.run-detail__state-pill[data-state=completed_with_warnings] {
  background: var(--color-warn-bg);
  color: var(--color-warn-fg);
}
.run-detail__state-pill[data-state=failed] {
  background: var(--color-error-bg);
  color: var(--color-error-fg);
}
.run-detail__state-pill[data-state=stopped] {
  background: var(--color-stopped-bg);
  color: var(--color-stopped-fg);
}
.run-detail__share-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 5px;
}
.run-detail__share-btn {
  font-size: 12px;
  padding: 4px 12px;
  background: #1a2a1a;
  border-color: #2a4a2a;
  color: #7acc7a;
  font-weight: 600;
}
.run-detail__share-btn:hover:not(:disabled) {
  background: #223322;
  border-color: #3a6a3a;
  color: #9ae09a;
}
.run-detail__share-btn--done {
  background: #0d2218;
  border-color: #1a4030;
  color: #4ade80;
  cursor: default;
}
.run-detail__share-btn--done:hover {
  background: #0d2218;
}
.run-detail__share-link {
  font-size: 12px;
  padding: 3px 8px;
  background: transparent;
  border-color: var(--border);
  color: var(--text-muted);
}
.run-detail__share-link:hover {
  color: var(--text);
  border-color: var(--text-muted);
}
.run-detail__share-error {
  font-size: 12px;
  color: var(--color-error-fg, #f87171);
}
.run-detail__action {
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 3px;
  border: 1px solid var(--border);
  background: transparent;
  cursor: pointer;
  transition:
    background 0.12s,
    border-color 0.12s,
    color 0.12s;
}
.run-detail__action:focus-visible {
  outline: 1px solid var(--text-muted);
  outline-offset: 1px;
}
.run-detail__action--stop {
  color: var(--text-muted);
}
.run-detail__action--stop:hover:not(:disabled) {
  background: var(--bg-surface-2);
  border-color: var(--text-muted);
  color: var(--text);
}
.run-detail__action--delete {
  color: var(--text-faint);
}
.run-detail__action--delete:hover:not(:disabled) {
  background: color-mix(in srgb, var(--color-error-bg) 60%, transparent);
  border-color: var(--color-error-fg);
  color: var(--color-error-fg);
}

/* src/styles/run-detail-summary-bar.css */
.run-detail__summary-bar {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 0;
  padding: 8px 16px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-muted);
}
.run-detail__summary-sep {
  color: var(--text-faint);
}
.run-detail__summary-label {
  color: var(--text-faint);
}
.run-detail__summary-value {
  color: var(--text);
  font-family: var(--font-mono);
}
.run-detail__summary-item--error .run-detail__summary-value {
  color: var(--color-error-fg);
}
.run-detail__summary-item--time {
  margin-left: auto;
}
.run-detail__summary-item--time .run-detail__summary-value {
  color: var(--text-muted);
  font-family: inherit;
}

/* src/styles/step-timeline.css */
.step-timeline-wrapper {
  flex-shrink: 0;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  position: relative;
}
.step-timeline-container {
  overflow-x: auto;
  overflow-y: hidden;
  padding: 16px 20px;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.step-timeline-container::-webkit-scrollbar {
  height: 4px;
}
.step-timeline-container::-webkit-scrollbar-track {
  background: transparent;
}
.step-timeline-container::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 2px;
}
.step-timeline {
  display: flex;
  align-items: center;
  gap: 0;
  width: max-content;
  min-height: 88px;
}
.step-timeline__item {
  display: flex;
  align-items: center;
}
.step-timeline-empty {
  padding: 24px 20px;
  color: var(--text-faint);
  font-size: 12px;
}
.step-card {
  width: 148px;
  min-height: 80px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  padding: 10px 12px;
  cursor: pointer;
  position: relative;
  transition: border-color 0.1s, background 0.1s;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.step-card:hover {
  background: var(--bg-hover);
}
.step-card--selected {
  border-color: #4a78d4;
  box-shadow: 0 0 0 1px #4a78d480;
}
.step-card--upcoming {
  opacity: 0.5;
}
.step-card--running {
  border-color: var(--color-running-fg);
  background: color-mix(in srgb, var(--color-running-bg) 80%, var(--bg));
}
.step-card--paused {
  border-color: var(--paused-accent);
  background: color-mix(in srgb, var(--color-paused-bg) 80%, var(--bg));
}
.step-card--failed {
  border-color: var(--color-error-fg);
  background: color-mix(in srgb, var(--color-error-bg) 80%, var(--bg));
}
.step-card--stopped {
  opacity: 0.6;
}
.step-card--completed.step-card--selected {
  border-color: #4a78d4;
}
.step-card__header {
  display: flex;
  align-items: center;
  gap: 6px;
}
.step-card__icon {
  font-size: 12px;
  line-height: 1;
}
.step-card--running .step-card__icon {
  color: var(--color-running-fg);
}
.step-card--paused .step-card__icon {
  color: var(--paused-accent);
}
.step-card--completed .step-card__icon {
  color: var(--color-ok-fg);
}
.step-card--failed .step-card__icon {
  color: var(--color-error-fg);
}
@keyframes icon-pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.4;
  }
}
.step-card__icon--pulse {
  animation: icon-pulse 1.6s ease-in-out infinite;
}
.step-card__state-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.step-card--running .step-card__state-label {
  color: var(--color-running-fg);
}
.step-card--paused .step-card__state-label {
  color: var(--paused-accent);
}
.step-card--failed .step-card__state-label {
  color: var(--color-error-fg);
}
.step-card__body {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.step-card__id {
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text);
}
.step-card--upcoming .step-card__id {
  color: var(--text-muted);
}
.step-card__type {
  font-size: 11px;
  color: var(--text-faint);
}
.step-card__paused-dot {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 7px;
  height: 7px;
  background: var(--paused-accent);
  border-radius: 50%;
  animation: icon-pulse 1.6s ease-in-out infinite;
}
.step-connector {
  display: flex;
  align-items: center;
  width: 28px;
  flex-shrink: 0;
  color: var(--text-faint);
  position: relative;
  left: 2px;
}
.step-connector__line {
  position: absolute;
  left: 0;
  right: 14px;
  height: 1px;
  background: var(--border);
}
.step-connector--done .step-connector__line {
  background: var(--color-ok-fg);
  opacity: 0.4;
}
.step-connector__arrow {
  position: absolute;
  right: 7px;
  top: -8px;
  font-size: 14px;
  line-height: 1;
  color: var(--border);
}
.step-connector--done .step-connector__arrow {
  color: var(--color-ok-fg);
  opacity: 0.5;
}

/* src/styles/step-detail.css */
.detail-panel {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
  background: var(--bg);
}
.detail-panel--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-faint);
  font-size: 13px;
}
.detail-panel__header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}
.detail-panel__step-id {
  font-size: 15px;
  font-weight: 600;
}
.detail-panel__step-type {
  font-size: 11px;
  color: var(--text-faint);
  background: var(--bg-surface-2);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 1px 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.detail-panel__placeholder {
  color: var(--text-faint);
  font-size: 13px;
}
.step-detail {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
  background: var(--bg);
}
.step-detail--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-faint);
  font-size: 13px;
}
.step-detail--loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 13px;
}
.step-detail__empty-label {
  color: var(--text-faint);
}
.step-detail--upcoming {
  display: flex;
  flex-direction: column;
  gap: 12px;
  color: var(--text-muted);
}
.step-detail--upcoming .step-detail__header {
  border-bottom-color: var(--border);
  margin-bottom: 0;
}
.step-detail--running {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.step-detail--running .step-detail__header {
  margin-bottom: 0;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.step-detail__step-name {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 400;
}
.step-detail__description {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
  padding: 4px 0;
}
.step-detail__header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0;
}
.step-detail__step-id {
  font-size: 15px;
  font-weight: 600;
}
.step-detail__type-badge {
  font-size: 11px;
  color: var(--text-faint);
  background: var(--bg-surface-2);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 1px 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.step-detail__type-badge--running {
  color: var(--color-running-fg);
  background: var(--color-running-bg);
  border-color: color-mix(in srgb, var(--color-running-fg) 30%, transparent);
}
.step-detail__running-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--color-running-fg);
  animation: pulse 2s ease-in-out infinite;
}
.step-detail__running-placeholder {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 24px 0;
  color: var(--text-muted);
  font-size: 13px;
}
.step-detail__recovered-badge {
  font-size: 11px;
  font-weight: 600;
  color: var(--color-warn-fg);
  background: var(--color-warn-bg);
  border-radius: 3px;
  padding: 1px 6px;
}
.step-detail__failed-badge {
  font-size: 11px;
  font-weight: 600;
  color: var(--color-error-fg);
  background: var(--color-error-bg);
  border-radius: 3px;
  padding: 1px 6px;
}
.step-detail__completed-badge {
  font-size: 11px;
  font-weight: 600;
  color: var(--color-ok-fg);
  background: color-mix(in srgb, var(--color-ok-bg) 50%, transparent);
  border-radius: 3px;
  padding: 1px 6px;
}
.step-detail__meta {
  display: flex;
  gap: 20px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}
.meta-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.meta-row__label {
  font-size: 11px;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.meta-row__value {
  font-size: 13px;
  color: var(--text-muted);
}
.meta-row__value--mono {
  font-family: var(--font-mono);
}
.step-detail__error-block {
  margin-bottom: 16px;
}
.step-detail__sections {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.step-detail__section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.step-detail__section-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.07em;
}
.step-detail__planned-tools {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.step-detail__planned-tool {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  padding: 4px 10px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 4px;
}
.step-detail__handoff-preview {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
  padding: 8px 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--paused-accent);
  border-radius: 4px;
}
.step-detail__handoff-presentation {
  color: var(--text-muted);
}
.output-block {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.output-block__label {
  font-size: 11px;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.output-block__content {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
  overflow-x: auto;
  max-height: 400px;
  overflow-y: auto;
}
.output-block__content--mono {
  font-family: var(--font-mono);
  font-size: 12px;
}
.output-block__content--error {
  border-color: var(--color-error-fg);
  background: var(--color-error-bg);
  color: var(--color-error-fg);
}
.output-block__fade {
  color: var(--text-faint);
}
.output-block__toggle {
  align-self: flex-start;
  font-size: 12px;
  color: var(--text-muted);
  background: transparent;
  border: none;
  padding: 2px 0;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.output-block__toggle:hover {
  color: var(--text);
  background: transparent;
}
.step-detail__evicted-note {
  font-size: 12px;
  color: var(--text-faint);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 10px 12px;
  line-height: 1.5;
}

/* src/styles/tool-feed.css */
.tcf {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 0;
  background-image:
    linear-gradient(
      to right,
      transparent 22.25px,
      var(--border) 22.25px,
      var(--border) 23.75px,
      transparent 23.75px);
  background-attachment: local;
  background-repeat: no-repeat;
  background-position: 0 20px;
  background-size: 100% calc(100% - 50px);
}
.tcf--empty {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 24px 0;
  color: var(--text-muted);
  font-size: 13px;
  background-image: none;
}
.tcf--history {
  padding: 4px 0 10px;
}
.tcf-card {
  margin: 6px 0;
}
.tcf-card + .tcf-card {
  margin-top: 2px;
}
.tcf-tail {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 1.5px;
  margin-left: 23px;
  padding-top: 4px;
  gap: 3px;
}
.tcf-tail::before,
.tcf-tail::after {
  content: "";
  display: block;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--text-faint);
}
.tcf-tail::after {
  box-shadow: 0 6px 0 var(--text-faint);
  margin-bottom: 6px;
}
.tcf-card__header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  font-size: 13px;
  min-height: 38px;
}
.tcf-card__header:hover {
  background-color: var(--bg-surface-3);
}
.tcf-card__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--bg-surface-2);
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  flex-shrink: 0;
  line-height: 1;
  background: var(--bg);
  outline: 3px solid var(--bg);
  padding-bottom: 1px;
}
.tcf-card__num--terminal {
  border-color: var(--color-ok-fg);
  color: var(--color-ok-fg);
  background: var(--bg);
  outline-color: var(--bg);
}
.tcf-card__title {
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tcf-card__title--terminal {
  color: var(--color-ok-fg);
  font-style: italic;
  font-weight: 500;
}
.tcf-card__subtitle {
  font-size: 12px;
  color: var(--text-faint);
  white-space: nowrap;
}
.tcf-card__stats {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  font-size: 11px;
  color: var(--text-faint);
  white-space: nowrap;
  flex-shrink: 0;
}
.tcf-card__ctx-pct {
  color: var(--text-muted);
}
.tcf-card__tokens {
  color: var(--text-faint);
}
.tcf-ctx-bar {
  display: inline-block;
  width: 80px;
  height: 6px;
  background: var(--bg-surface);
  border-radius: 3px;
  overflow: hidden;
  vertical-align: middle;
}
.tcf-ctx-bar__fill {
  display: block;
  height: 100%;
  background: var(--color-accent, #5b8dd9);
  border-radius: 3px;
  transition: width 0.3s ease;
  min-width: 2px;
}
.tcf-card__body {
  padding: 0 12px 8px 44px;
}
.tcf-card__empty {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 0;
  font-size: 12px;
  color: var(--text-muted);
}
.tcf-card--terminal {
  background: color-mix(in srgb, var(--color-ok-bg) 40%, transparent);
  border-radius: 4px;
  margin: 6px 0;
}
.tcf-card--terminal .tcf-card__header {
  padding: 6px 12px;
  min-height: 30px;
}
.tcf-op {
  padding: 6px 0;
}
.tcf-op + .tcf-op {
  border-top: 1px solid color-mix(in srgb, var(--border) 50%, transparent);
}
.tcf-op__header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px;
  font-size: 12px;
  line-height: 1.5;
}
.tcf-op__tool-name {
  font-weight: 700;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text);
  flex-shrink: 0;
}
.tcf-args {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px;
}
.tcf-arg {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 3px;
  white-space: nowrap;
  max-width: 400px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: inline-block;
  vertical-align: baseline;
  line-height: 1.6;
}
.tcf-arg--pattern {
  background: color-mix(in srgb, var(--color-accent, #5b8dd9) 15%, transparent);
  color: var(--text);
}
.tcf-arg--path {
  background: var(--bg-surface);
  color: var(--text-muted);
}
.tcf-arg--kv {
  background: var(--bg-surface);
  color: var(--text);
}
.tcf-arg__key {
  color: var(--text-faint);
}
.tcf-op__result {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: 6px;
  padding: 2px 0 0 24px;
  font-size: 12px;
  line-height: 1.5;
  margin-left: 0;
}
.tcf-op__result::before {
  content: "";
  position: absolute;
  left: 4px;
  top: -2px;
  width: 12px;
  height: calc(50% + 4px);
  border-left: 1.5px solid var(--text-faint);
  border-bottom: 1.5px solid var(--text-faint);
  border-bottom-left-radius: 6px;
  pointer-events: none;
}
.tcf-op__result::after {
  content: "";
  position: absolute;
  left: 15px;
  top: 51%;
  width: 5px;
  height: 5px;
  margin-top: -2px;
  border-top: 1.5px solid var(--text-faint);
  border-right: 1.5px solid var(--text-faint);
  transform: rotate(45deg);
  pointer-events: none;
}
.tcf-op__summary {
  color: var(--text-muted);
}
.tcf-op__result-label {
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.02em;
}
.tcf-op__result-label--hit {
  color: var(--color-ok-fg);
}
.tcf-op__result-label--miss {
  color: var(--text-faint);
  font-weight: 600;
}
.tcf-op__duration {
  color: var(--text-faint);
  font-size: 11px;
  flex-shrink: 0;
}
.tcf-op__error {
  color: var(--color-error-fg);
  font-size: 11px;
}
.tcf-op__result--running {
  color: var(--text-faint);
}
.tcf-op__result--running::before {
  border-color: var(--color-running-fg);
}
.tcf-op__result--running::after {
  border-top-color: var(--color-running-fg);
  border-right-color: var(--color-running-fg);
}
.tcf-op__result--failed::before {
  border-color: var(--color-error-fg);
}
.tcf-op__result--failed::after {
  border-top-color: var(--color-error-fg);
  border-right-color: var(--color-error-fg);
}
.tcf-compression {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--text-faint);
  padding: 6px 12px;
  margin: 2px 0;
  background: color-mix(in srgb, var(--color-warn-bg) 30%, transparent);
  border-left: 2px solid var(--color-warn-fg);
  border-radius: 0 3px 3px 0;
}
.tcf-compression__icon {
  color: var(--color-warn-fg);
  font-size: 12px;
}
.tcf-compression__label {
  color: var(--text-faint);
}
.tcf-compression__ratio {
  color: var(--color-warn-fg);
  font-weight: 600;
}
.tcf-compression__msgs {
  color: var(--text-faint);
}
.tcf-history {
  margin-top: 16px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg-surface);
}
.tcf-history[open] {
  background: var(--bg);
}
.tcf-history__toggle {
  display: block;
  padding: 8px 12px;
  font-size: 12px;
  color: var(--text-muted);
  cursor: pointer;
  user-select: none;
  list-style: none;
}
.tcf-history__toggle::-webkit-details-marker {
  display: none;
}
.tcf-history__toggle::before {
  content: "\25b8  ";
  color: var(--text-faint);
}
.tcf-history[open] .tcf-history__toggle::before {
  content: "\25be  ";
}
.tcf-history__toggle:hover {
  color: var(--text);
  background: var(--bg-hover);
  border-radius: 4px 4px 0 0;
}
.tcf-budget {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
  padding: 8px 12px;
  margin: 4px 0;
  margin-left: 21px;
  background: color-mix(in srgb, var(--color-warn-bg) 60%, transparent);
  border-left: 3px solid var(--color-warn-fg);
  border-radius: 0 3px 3px 0;
}
.tcf-budget__icon {
  color: var(--color-warn-fg);
  font-size: 14px;
  flex-shrink: 0;
}
.tcf-budget__label {
  color: var(--text);
  font-weight: 600;
}
.tcf-budget__sub {
  color: var(--text-faint);
  font-style: italic;
  font-size: 11px;
}
.tcf-budget__tokens {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-faint);
}
.tcf-history__truncated {
  color: var(--color-warn-fg);
  font-weight: 500;
}

/* src/styles/handoff.css */
.step-detail--handoff {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.step-detail--resuming {
}
.handoff__header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.handoff__loading,
.handoff__resuming {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 13px;
  padding: 24px 0;
}
.handoff__load-error {
  color: var(--color-error-fg);
  font-size: 13px;
  padding: 16px 0;
}
.handoff__presentation {
  position: relative;
  padding: 16px 0 0;
  max-height: 45vh;
  overflow-y: auto;
  mask-image:
    linear-gradient(
      to bottom,
      #000 calc(100% - 28px),
      transparent 100%);
  -webkit-mask-image:
    linear-gradient(
      to bottom,
      #000 calc(100% - 28px),
      transparent 100%);
}
.handoff__presentation::after {
  content: "";
  display: block;
  height: 28px;
  flex-shrink: 0;
}
.handoff__context-callout {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 16px 0 12px;
  padding: 10px 14px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--text-faint);
  border-radius: 4px;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}
.handoff__flow-message {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 14px;
  background: color-mix(in srgb, var(--color-running-bg) 50%, var(--bg-surface));
  border: 1px solid var(--border);
  border-left: 3px solid var(--color-running-fg);
  border-radius: 4px;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 12px;
}
.handoff__callout-text {
  flex: 1;
  min-width: 0;
}
.handoff__callout-dismiss {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  padding: 0;
  margin: -2px -4px 0 0;
  font-size: 16px;
  line-height: 1;
  color: var(--text-faint);
  background: transparent;
  border: none;
  border-radius: 3px;
  cursor: pointer;
  transition: color 0.12s, background 0.12s;
}
.handoff__callout-dismiss:hover {
  color: var(--text);
  background: var(--bg-surface-2);
}
.handoff__callout-dismiss:focus-visible {
  outline: 1px solid var(--border);
  outline-offset: 1px;
}
.handoff__input {
  width: 100%;
  min-height: 80px;
  max-height: 220px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 10px 12px;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  line-height: 1.6;
  resize: none;
  overflow-y: hidden;
  transition: border-color 0.15s;
  margin-bottom: 4px;
}
.handoff__input:not(:placeholder-shown) {
  overflow-y: auto;
}
.handoff__input:focus {
  outline: none;
  border-color: #4a78d4;
  box-shadow: 0 0 0 1px color-mix(in srgb, #4a78d4 25%, transparent);
}
.handoff__input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.handoff__input::placeholder {
  color: var(--text-faint);
}
.handoff__submit-error {
  font-size: 12px;
  color: var(--color-error-fg);
  padding: 4px 0 8px;
}
.handoff__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 8px;
}
.handoff__btn {
  font-size: 12px;
  padding: 6px 14px;
  border-radius: 4px;
  transition:
    background 0.12s,
    border-color 0.12s,
    color 0.12s;
}
.handoff__btn--stub {
  color: var(--text-faint);
  border-color: transparent;
  background: transparent;
}
.handoff__btn--stub:hover:not(:disabled) {
  color: var(--text-muted);
  background: var(--bg-surface-2);
  border-color: var(--border);
}
.handoff__btn--stub:disabled {
  opacity: 0.35;
}
.handoff__btn--submit {
  background: #1e3a6e;
  border-color: #2d5299;
  color: #a8c4f0;
  font-weight: 600;
  padding: 7px 22px;
}
.handoff__btn--submit:hover:not(:disabled) {
  background: #264a8a;
  border-color: #3d6abf;
  color: var(--text);
}
.handoff__btn--submit:active:not(:disabled) {
  background: #1a3060;
  transform: translateY(1px);
}
.handoff__btn--submit:disabled {
  opacity: 0.4;
}
.handoff__share-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-right: auto;
}
.handoff__btn--share {
  background: #1a2a1a;
  border-color: #2a4a2a;
  color: #7acc7a;
}
.handoff__btn--share:hover:not(:disabled) {
  background: #223322;
  border-color: #3a6a3a;
  color: #9ae09a;
}
.handoff__btn--share:active:not(:disabled) {
  background: #162016;
  transform: translateY(1px);
}
.handoff__btn--share--done {
  background: #0d2218;
  border-color: #1a4030;
  color: #4ade80;
  cursor: default;
}
.handoff__btn--share--done:hover {
  background: #0d2218;
  border-color: #1a4030;
}
.handoff__share-link {
  font-size: 12px;
  padding: 3px 8px;
  background: transparent;
  border-color: var(--border);
  color: var(--text-muted);
}
.handoff__share-link:hover {
  color: var(--text);
  border-color: var(--text-muted);
}
.handoff__share-error {
  font-size: 12px;
  color: var(--color-error-fg, #f87171);
}

/* src/styles/safe-markdown.css */
.safe-markdown {
  font-size: 13px;
  line-height: 1.7;
  color: var(--text);
  word-break: break-word;
}
.safe-markdown p {
  margin-bottom: 10px;
}
.safe-markdown p:last-child {
  margin-bottom: 0;
}
.safe-markdown h1,
.safe-markdown h2,
.safe-markdown h3,
.safe-markdown h4 {
  font-weight: 600;
  margin: 16px 0 6px;
  color: var(--text);
  line-height: 1.3;
}
.safe-markdown h1 {
  font-size: 16px;
}
.safe-markdown h2 {
  font-size: 15px;
}
.safe-markdown h3 {
  font-size: 14px;
}
.safe-markdown h4 {
  font-size: 13px;
  color: var(--text-muted);
}
.safe-markdown ul,
.safe-markdown ol {
  padding-left: 20px;
  margin-bottom: 10px;
}
.safe-markdown li {
  margin-bottom: 3px;
}
.safe-markdown code {
  font-family: var(--font-mono);
  font-size: 12px;
  background: var(--bg-surface-2);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 1px 5px;
  color: var(--text);
}
.safe-markdown pre {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 10px 12px;
  overflow-x: auto;
  margin-bottom: 10px;
}
.safe-markdown pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: 12px;
}
.safe-markdown blockquote {
  border-left: 3px solid var(--border);
  padding-left: 12px;
  margin: 0 0 10px;
  color: var(--text-muted);
}
.safe-markdown hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 14px 0;
}
.safe-markdown a {
  color: #5ab4ff;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.safe-markdown a:hover {
  color: var(--text);
}
.safe-markdown table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  margin-bottom: 10px;
}
.safe-markdown th,
.safe-markdown td {
  padding: 6px 10px;
  border: 1px solid var(--border);
  text-align: left;
}
.safe-markdown th {
  background: var(--bg-surface-2);
  font-weight: 600;
  color: var(--text-muted);
}

/* src/styles/evidence.css */
.evidence-ref {
  display: inline-flex;
  align-items: baseline;
  font-family: var(--font-mono);
  font-size: 0.8em;
  padding: 0.1em 0.4em;
  border-radius: 3px;
  background: color-mix(in srgb, var(--accent-blue) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent-blue) 30%, transparent);
  color: var(--accent-blue);
  max-width: 38ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: baseline;
  transition: background 0.1s, border-color 0.1s;
}
.evidence-ref--lines {
  cursor: pointer;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 2px;
  text-decoration-color: color-mix(in srgb, var(--accent-blue) 50%, transparent);
}
.evidence-ref--lines:hover {
  background: color-mix(in srgb, var(--accent-blue) 22%, transparent);
  border-color: var(--accent-blue);
  text-decoration-color: var(--accent-blue);
}
.evidence-ref--lines:active {
  background: color-mix(in srgb, var(--accent-blue) 30%, transparent);
  transform: translateY(0.5px);
}
.evidence-ref--lines:focus-visible {
  outline: 2px solid var(--accent-blue);
  outline-offset: 1px;
}
.evidence-ref--bytes {
  cursor: default;
  opacity: 0.7;
}

/* src/styles/file-preview.css */
.file-preview {
  width: fit-content;
  min-width: min(400px, 95vw);
  max-width: min(95vw, 1400px);
  max-height: 85vh;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.04);
}
.file-preview__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-surface-2);
  flex-shrink: 0;
  gap: 10px;
  min-height: 38px;
}
.file-preview__title {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
  flex: 1;
}
.file-preview__path {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.file-preview__range {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--color-running-fg);
  flex-shrink: 0;
  background: var(--color-running-bg);
  padding: 1px 6px;
  border-radius: 3px;
}
.file-preview__close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 13px;
  padding: 4px 8px;
  border-radius: 3px;
  line-height: 1;
  flex-shrink: 0;
  transition: color 0.1s, background 0.1s;
}
.file-preview__close:hover {
  color: var(--text);
  background: var(--bg-hover);
}
.file-preview__close:focus-visible {
  outline: 2px solid var(--accent-blue);
  outline-offset: 1px;
}
.file-preview__body {
  flex: 1;
  overflow: auto;
  min-height: 60px;
}
.file-preview__body--loading,
.file-preview__body--error,
.file-preview__body--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  color: var(--text-muted);
  font-size: 13px;
}
.file-preview__body--error {
  color: var(--color-error-fg);
}
.file-preview__table {
  border-collapse: collapse;
  width: 100%;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.65;
}
.file-preview__line--cited {
  vertical-align: top;
  background: color-mix(in srgb, var(--color-running-fg) 8%, var(--bg));
}
.file-preview__line--cited:hover {
  background: color-mix(in srgb, var(--color-running-fg) 14%, var(--bg));
}
.file-preview__line--cited .file-preview__line-num {
  color: var(--color-running-fg);
  border-right: 2px solid var(--color-running-fg);
}
.file-preview__line--cited .file-preview__line-content {
  color: var(--text);
}
.file-preview__line--context {
  vertical-align: top;
  background: var(--bg);
}
.file-preview__line--context:hover {
  background: var(--bg-surface);
}
.file-preview__line--context .file-preview__line-num {
  color: var(--text-faint);
  border-right: 1px solid var(--border);
}
.file-preview__line--context .file-preview__line-content {
  color: var(--text-faint);
}
.file-preview__line-num {
  text-align: right;
  padding: 0 10px 0 12px;
  user-select: none;
  min-width: 3.5ch;
  width: 1%;
  white-space: nowrap;
  position: sticky;
  left: 0;
  background: inherit;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}
.file-preview__line-content {
  padding: 0 14px;
  white-space: pre;
  overflow-x: visible;
}

/* src/styles/run-submit.css */
.run-submit {
  display: flex;
  flex-direction: column;
  gap: 28px;
  max-width: 640px;
}
.run-submit--loading,
.run-submit--error {
  gap: 16px;
}
.run-submit__header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.run-submit__back {
  font-size: 12px;
  padding: 4px 10px;
  color: var(--text-muted);
  border-color: transparent;
  background: transparent;
}
.run-submit__back:hover {
  color: var(--text);
  background: var(--bg-surface-2);
}
.run-submit__title {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.run-submit__loading {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 13px;
}
.run-submit__loading--inline {
  padding: 8px 0;
}
.run-submit__load-error,
.run-submit__empty {
  color: var(--text-muted);
  font-size: 13px;
  padding: 16px 0;
}
.run-submit__load-error {
  color: var(--color-error-fg);
}
.run-submit__load-error--inline {
  padding: 8px 0;
}
.run-submit__section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.run-submit__section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.run-submit__label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-faint);
  display: block;
}
.run-submit__select {
  width: 100%;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 8px 10px;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  appearance: auto;
}
.run-submit__select:focus {
  outline: none;
  border-color: #4a78d4;
}
.run-submit__select:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.run-submit__flow-meta {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  padding: 8px 10px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 4px;
}
.run-submit__flow-id {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
}
.run-submit__flow-steps {
  font-size: 11px;
  color: var(--text-faint);
}
.run-submit__flow-description {
  width: 100%;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-top: 2px;
}
.run-submit__schema-fields {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.run-submit__field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.run-submit__field-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}
.run-submit__field-required {
  color: var(--color-error-fg);
  font-weight: 700;
}
.run-submit__field-description {
  font-size: 11px;
  color: var(--text-faint);
  line-height: 1.4;
  margin-bottom: 2px;
}
.run-submit__field-input {
  width: 100%;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 7px 10px;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  transition: border-color 0.15s;
}
.run-submit__field-input:focus {
  outline: none;
  border-color: #4a78d4;
}
.run-submit__field-input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.run-submit__field-input--select {
  cursor: pointer;
  appearance: auto;
}
.run-submit__field-input--number {
  font-family: var(--font-mono);
  width: 160px;
}
.run-submit__field-input--textarea {
  field-sizing: content;
  min-height: 80px;
  max-height: 50vh;
  line-height: 1.6;
  resize: vertical;
  overflow-y: auto;
}
.run-submit__field-input--textarea::placeholder {
  color: var(--text-faint);
}
.run-submit__slider-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}
.run-submit__field-input--slider {
  flex: 1;
  padding: 0;
  height: 4px;
  border: none;
  border-radius: 2px;
  background: var(--border);
  appearance: auto;
  cursor: pointer;
  accent-color: #5ab4ff;
}
.run-submit__slider-value {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text);
  font-weight: 600;
  min-width: 36px;
  text-align: right;
}
.run-submit__slider-range {
  font-size: 11px;
  color: var(--text-faint);
  white-space: nowrap;
}
.run-submit__model-loading {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  color: var(--text-muted);
  font-size: 12px;
  background: none;
  border: none;
}
.run-submit__model-error-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.run-submit__model-error {
  font-size: 11px;
  color: var(--color-error-fg);
}
.run-submit__kv-fallback {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.run-submit__add-input {
  font-size: 11px;
  padding: 3px 10px;
  color: var(--text-muted);
}
.run-submit__input-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.run-submit__input-row {
  display: flex;
  align-items: flex-start;
  gap: 6px;
}
.run-submit__input-key {
  width: 180px;
  flex-shrink: 0;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 6px 10px;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 12px;
}
.run-submit__input-key:focus {
  outline: none;
  border-color: #4a78d4;
}
.run-submit__input-sep {
  padding-top: 7px;
  color: var(--text-faint);
  flex-shrink: 0;
  font-size: 13px;
}
.run-submit__input-value {
  flex: 1;
  min-height: 32px;
  max-height: 240px;
  field-sizing: content;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 6px 10px;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  line-height: 1.5;
  resize: vertical;
  overflow-y: auto;
}
.run-submit__input-value:focus {
  outline: none;
  border-color: #4a78d4;
}
.run-submit__input-remove {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  padding: 0;
  margin-top: 3px;
  font-size: 14px;
  line-height: 1;
  color: var(--text-faint);
  background: transparent;
  border-color: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
}
.run-submit__input-remove:hover:not(:disabled) {
  color: var(--color-error-fg);
  background: var(--color-error-bg);
  border-color: transparent;
}
.run-submit__input-hint {
  font-size: 11px;
  color: var(--text-faint);
  line-height: 1.5;
}
.run-submit__input-hint--muted {
  color: var(--text-faint);
  font-style: italic;
}
.run-submit__submit-error {
  font-size: 12px;
  color: var(--color-error-fg);
  padding: 4px 0;
}
.run-submit__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 4px;
  border-top: 1px solid var(--border);
}
.run-submit__cancel {
  font-size: 12px;
  color: var(--text-muted);
  background: transparent;
  border-color: transparent;
}
.run-submit__cancel:hover:not(:disabled) {
  background: var(--bg-surface-2);
  border-color: var(--border);
}
.run-submit__submit {
  font-size: 13px;
  font-weight: 600;
  padding: 6px 20px;
  background: #1e3a6e;
  border-color: #2d5299;
  color: #a8c4f0;
}
.run-submit__submit:hover:not(:disabled) {
  background: #264a8a;
  border-color: #3d6abf;
  color: var(--text);
}
.run-submit__submit:disabled {
  opacity: 0.4;
}
.run-submit__file-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.4em;
  height: 1.4em;
  margin-left: 0.5em;
  padding: 0 0.4em;
  font-size: 0.75em;
  font-weight: 600;
  line-height: 1;
  color: var(--text-secondary, #94a3b8);
  background: var(--surface-raised, #1e293b);
  border-radius: 999px;
  vertical-align: middle;
}
.run-submit__file-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 0.75rem;
  border: 1px solid var(--border-default, #334155);
  border-radius: 6px;
  overflow: hidden;
}
.run-submit__file-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.6rem;
  background: var(--surface-default, #0f172a);
  transition: background 0.1s ease;
}
.run-submit__file-item:hover {
  background: var(--surface-raised, #1e293b);
}
.run-submit__file-item + .run-submit__file-item {
  border-top: 1px solid var(--border-subtle, #1e293b);
}
.run-submit__file-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--font-mono, "SF Mono", "Fira Code", monospace);
  font-size: 0.8125rem;
  color: var(--text-primary, #e2e8f0);
}
.run-submit__file-size {
  flex-shrink: 0;
  font-size: 0.75rem;
  color: var(--text-tertiary, #64748b);
  font-variant-numeric: tabular-nums;
}
.run-submit__file-remove {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  padding: 0;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: var(--text-tertiary, #64748b);
  font-size: 1rem;
  cursor: pointer;
  opacity: 0;
  transition:
    opacity 0.15s ease,
    color 0.15s ease,
    background 0.15s ease;
}
.run-submit__file-item:hover .run-submit__file-remove {
  opacity: 1;
}
.run-submit__file-remove:hover {
  color: var(--status-error, #ef4444);
  background: var(--surface-raised, #1e293b);
}
.run-submit__upload-controls {
  margin-bottom: 0.5rem;
}
.run-submit__file-input-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.run-submit__upload-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  padding: 0.4rem 0.8rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-secondary, #94a3b8);
  background: var(--surface-raised, #1e293b);
  border: 1px dashed var(--border-default, #334155);
  border-radius: 6px;
  cursor: pointer;
  transition:
    color 0.15s ease,
    border-color 0.15s ease,
    background 0.15s ease;
}
.run-submit__upload-btn:hover:not(:disabled) {
  color: var(--text-primary, #e2e8f0);
  border-color: var(--border-active, #60a5fa);
  background: var(--surface-hover, #1e293b);
}
.run-submit__upload-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.run-submit__upload-error {
  margin-top: 0.5rem;
  padding: 0.4rem 0.6rem;
  font-size: 0.8125rem;
  color: var(--status-error, #ef4444);
  background: var(--status-error-bg, rgba(239, 68, 68, 0.08));
  border: 1px solid var(--status-error-border, rgba(239, 68, 68, 0.2));
  border-radius: 6px;
}

/* src/styles/shares.css */
.share-list {
  padding: 24px;
  max-width: 900px;
  margin: 0 auto;
}
.share-list__loading,
.share-list__error,
.share-list__empty {
  padding: 48px 24px;
  text-align: center;
  color: var(--text-muted);
}
.share-list__error {
  color: var(--color-error-fg, #f87171);
}
.share-list__empty p + p {
  margin-top: 8px;
  font-size: 0.875em;
  color: var(--text-faint);
}
.share-list__header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}
.share-list__title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}
.share-list__count {
  font-size: 12px;
  padding: 1px 7px;
  background: var(--bg-surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-muted);
}
.share-list__rows {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.share-list__note {
  margin-top: 20px;
  font-size: 0.8em;
  color: var(--text-faint);
}
.share-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.1s, border-color 0.1s;
}
.share-row:hover {
  background: var(--bg-hover);
  border-color: var(--text-faint);
}
.share-row__left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.share-row__right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  margin-left: 16px;
}
.share-row__state {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 3px;
  white-space: nowrap;
  flex-shrink: 0;
}
.share-row__state--paused {
  background: var(--color-paused-bg);
  color: var(--color-paused-fg);
}
.share-row__state--completed {
  background: var(--color-ok-bg);
  color: var(--color-ok-fg);
}
.share-row__flow {
  font-size: 13px;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.share-row__by {
  font-size: 12px;
  color: var(--text-muted);
}
.share-row__time {
  font-size: 12px;
  color: var(--text-faint);
}
.share-row__id {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-faint);
}
.share-detail {
  display: flex;
  flex-direction: column;
  height: 100%;
  margin: -24px;
}
.share-detail__header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.share-detail__back {
  font-size: 12px;
  padding: 4px 10px;
  background: transparent;
  border-color: var(--border);
  color: var(--text-muted);
  flex-shrink: 0;
}
.share-detail__back:hover {
  color: var(--text);
  border-color: var(--text-muted);
}
.share-detail__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}
.share-detail__flow {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.share-detail__state-badge {
  font-size: 11px;
  padding: 2px 7px;
  background: var(--bg-surface-2);
  border: 1px solid var(--border);
  border-radius: 3px;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}
.share-detail__new-run {
  font-size: 12px;
  padding: 4px 12px;
  background: #1e3a6e;
  border-color: #2d5299;
  color: #a8c4f0;
  font-weight: 600;
  flex-shrink: 0;
}
.share-detail__new-run:hover {
  background: #264a8a;
  border-color: #3d6abf;
  color: var(--text);
}
.share-detail__attribution {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 20px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-muted);
  flex-shrink: 0;
}
.share-detail__attr-item {
  display: flex;
  align-items: center;
  gap: 5px;
}
.share-detail__attr-label {
  color: var(--text-faint);
}
.share-detail__attr-value {
  color: var(--text-muted);
}
.share-detail__attr-sep {
  color: var(--text-faint);
}
.share-detail__run-link {
  font-family: var(--font-mono);
  cursor: pointer;
  color: var(--text-muted);
  text-decoration: underline;
  text-decoration-color: var(--text-faint);
}
.share-detail__run-link:hover {
  color: var(--text);
}
.share-detail__attr-time {
  color: var(--text-faint);
}
.share-detail__body {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  position: relative;
}
.share-detail__section {
  margin-bottom: 32px;
}
.share-detail__section-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.share-detail__file-count {
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  font-size: 11px;
  padding: 1px 6px;
  background: var(--bg-surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-muted);
}
.share-detail__findings {
}
.share-detail__empty-findings {
  color: var(--text-faint);
  font-style: italic;
}
.share-detail__files-note {
  font-size: 12px;
  color: var(--text-faint);
  margin-bottom: 12px;
  line-height: 1.5;
}
.share-detail__file-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.share-detail__file-path {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  padding: 5px 10px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  word-break: break-all;
}
.share-detail__spinner {
  padding: 48px 24px;
  text-align: center;
  color: var(--text-muted);
}
.share-detail__error-msg {
  padding: 48px 24px;
  text-align: center;
  color: var(--color-error-fg, #f87171);
}

/* src/styles/directory-tree.css */
.dtree {
  font-family: var(--font-mono);
  font-size: 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
}
.dtree__header {
  padding: 6px 12px;
  background: var(--bg-surface-2);
  border-bottom: 1px solid var(--border);
  font-family: var(--font-sans);
  font-size: 12px;
  color: var(--text-muted);
}
.dtree__body {
  padding: 4px 0;
  max-height: 480px;
  overflow-y: auto;
}
.dtree__empty {
  padding: 12px 16px;
  color: var(--text-faint);
  font-style: italic;
  font-family: var(--font-sans);
}
.dtree-node__row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 3px 12px;
  width: 100%;
  background: none;
  border: none;
  color: inherit;
  font: inherit;
  text-align: left;
}
.dtree-node__row--dir {
  cursor: pointer;
  transition: background 0.08s;
}
.dtree-node__row--dir:hover {
  background: var(--bg-hover);
}
.dtree-node__row--dir:focus-visible {
  outline: 2px solid var(--accent-blue);
  outline-offset: -2px;
}
.dtree-node__chevron {
  display: inline-block;
  width: 10px;
  flex-shrink: 0;
  color: var(--text-muted);
  font-size: 10px;
  transition: transform 0.12s ease;
}
.dtree-node__chevron.is-open {
  transform: rotate(90deg);
}
.dtree-node__bullet {
  display: inline-block;
  width: 10px;
  flex-shrink: 0;
  color: var(--text-faint);
  text-align: center;
  font-size: 14px;
  line-height: 1;
}
.dtree-node__name {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.dtree-node--dir > .dtree-node__row .dtree-node__name {
  color: var(--text);
  font-weight: 500;
}
.dtree-node--file .dtree-node__name {
  color: var(--text-muted);
}
.dtree-node__count {
  flex-shrink: 0;
  padding: 0 5px;
  background: var(--bg-surface-3);
  border: 1px solid var(--border);
  border-radius: 2px;
  color: var(--text-faint);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}
.dtree-node__size {
  flex-shrink: 0;
  color: var(--text-faint);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  min-width: 56px;
  text-align: right;
}
.dtree-node__mime {
  flex-shrink: 0;
  max-width: 14ch;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-faint);
  font-size: 10px;
  opacity: 0.75;
}
.dtree-node__row--clickable {
  cursor: pointer;
  transition: background 0.08s;
}
.dtree-node__row--clickable:hover {
  background: color-mix(in srgb, var(--accent-blue) 10%, transparent);
}
.dtree-node__row--clickable:hover .dtree-node__name {
  color: var(--accent-blue);
  text-decoration: underline;
  text-decoration-style: dotted;
  text-decoration-color: color-mix(in srgb, var(--accent-blue) 50%, transparent);
  text-underline-offset: 2px;
}
.dtree-node__row--clickable:focus-visible {
  outline: 2px solid var(--accent-blue);
  outline-offset: -2px;
  background: color-mix(in srgb, var(--accent-blue) 8%, transparent);
}
.dtree-node__row--clickable:active {
  background: color-mix(in srgb, var(--accent-blue) 18%, transparent);
}
.dtree-node__children {
  margin-left: 16px;
  padding-left: 4px;
  border-left: 1px dashed var(--border);
}

/* src/app.css */
