.workbench {
  --hero-padding-top: 26px;
  --hero-padding-bottom: 26px;
  --hero-title-size: 30px;
  --hero-copy-gap: 6px;
  --hero-title-bottom-gap: 18px;
  --composer-min-height: 122px;
  --composer-textarea-height: 54px;
  --composer-padding-block: 12px;
  --quick-prompts-gap-top: 10px;
  --capability-row-height: 104px;
  --workbench-ink: var(--ink, #1e293b);
  --workbench-text: var(--text, #334155);
  --workbench-muted: var(--muted, #64748b);
  --workbench-line: var(--line, #e2e8f0);
  --workbench-line-strong: var(--line-strong, #cbd5e1);
  --workbench-line-soft: color-mix(in srgb, var(--line, #e2e8f0) 58%, #fff);
  --workbench-surface: var(--surface, #fff);
  --workbench-surface-soft: var(--surface-soft, #f9fbff);
  --workbench-primary: var(--theme-primary, #3a7ca5);
  --workbench-primary-active: var(--theme-primary-active, #255b7d);
  --workbench-primary-soft: var(--theme-primary-soft, #eaf4fa);
  --workbench-secondary: var(--theme-secondary, #4f6f9f);
  --workbench-chart-blue: var(--chart-blue, #4f6f9f);
  --workbench-chart-purple: var(--chart-purple, #6e7fa6);
  --workbench-chart-amber: var(--chart-amber, #b58b4c);

  width: 100%;
  height: 100%;
  min-width: 0;
  display: grid;
  grid-template-rows: auto var(--capability-row-height) minmax(0, 1fr);
  gap: 10px;
  overflow: visible;
  color: var(--workbench-ink);
}

.workbench :where(button, textarea) {
  font: inherit;
}

.workbench,
.workbench * {
  box-sizing: border-box;
}

.workbench :where(button) {
  border: 0;
  background: transparent;
  cursor: pointer;
}

.workbench :where(button:disabled) { cursor: not-allowed; opacity: 0.7; }

.assistant-hero {
  --assistant-art-width: min(680px, 46vw);
  --assistant-art-x: 56px;
  --assistant-art-y: -12px;
  position: relative;
  z-index: 2;
  min-height: 0;
  overflow: visible;
  padding: var(--hero-padding-top) 20px var(--hero-padding-bottom) 52px;
  border: 1px solid color-mix(in srgb, var(--workbench-primary) 14%, var(--workbench-line));
  border-radius: 4px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.8) 0%, rgba(255, 255, 255, 0.6) 44%, rgba(255, 255, 255, 0.2) 66%, rgba(255, 255, 255, 0.05) 100%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.7) 0%, color-mix(in srgb, var(--workbench-primary-soft) 40%, rgba(255, 255, 255, 0.5)) 62%, color-mix(in srgb, var(--workbench-secondary) 15%, rgba(255, 255, 255, 0.1)) 100%);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04), inset 0 1px 0 rgba(255, 255, 255, 0.6);
  isolation: isolate;
}

.assistant-hero::after {
  content: "";
  position: absolute;
  right: var(--assistant-art-x);
  bottom: var(--assistant-art-y);
  width: var(--assistant-art-width);
  height: calc(100% + 28px);
  background: var(--assistant-bg-image) right bottom / auto 112% no-repeat;
  pointer-events: none;
  z-index: 2;
}

.assistant-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.3) 0%, rgba(255, 255, 255, 0.08) 42%, transparent 58%);
  pointer-events: none;
  z-index: 1;
}

.assistant-copy {
  position: relative;
  z-index: 3;
  width: min(1120px, 94%);
  display: grid;
  gap: var(--hero-copy-gap);
}

.assistant-copy h1 {
  margin: 0 0 var(--hero-title-bottom-gap);
  color: var(--workbench-ink);
  font-size: var(--hero-title-size);
  line-height: 1.18;
  font-weight: 850;
}

.assistant-copy h1 span {
  color: var(--workbench-primary-active);
}

.assistant-copy p {
  max-width: 680px;
  margin: 0 0 2px;
  color: var(--workbench-muted);
  font-size: 15px;
  line-height: 1.6;
  font-weight: 600;
}

.assistant-file-input { display: none; }

.assistant-composer {
  display: grid;
  gap: 6px;
  min-height: var(--composer-min-height);
  padding: var(--composer-padding-block) 18px 10px;
  border: 1px solid rgba(var(--theme-primary-rgb, 58, 124, 165), 0.28);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(4px);
}

.assistant-composer textarea {
  width: 100%;
  min-width: 0;
  height: var(--composer-textarea-height);
  min-height: var(--composer-textarea-height);
  max-height: var(--composer-textarea-height);
  resize: none;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--workbench-ink);
  font-size: 16px;
  line-height: 1.55;
  overflow: hidden;
}

.assistant-composer textarea::placeholder {
  color: color-mix(in srgb, var(--workbench-muted) 70%, #ffffff);
}

.assistant-composer textarea:focus { outline: none; }

.composer-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
}

.composer-icon-button,
.composer-related-button,
.composer-send-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  border-radius: 4px;
  white-space: nowrap;
}

.composer-icon-button {
  width: 36px;
  border: 1px solid var(--workbench-line);
  background: var(--workbench-surface);
  color: var(--workbench-text);
  font-size: 19px;
}

.composer-related-button {
  gap: 8px;
  padding: 0 16px;
  border: 1px solid var(--workbench-line);
  background: var(--workbench-surface);
  color: var(--workbench-text);
  font-size: 14px;
  font-weight: 700;
}

.composer-count {
  margin-left: auto;
  color: color-mix(in srgb, var(--workbench-muted) 75%, #ffffff);
  font-size: 13px;
  font-weight: 650;
}

.composer-send-button {
  width: 56px;
  background: var(--workbench-primary-active);
  color: #fff;
  font-size: 18px;
  box-shadow: 0 6px 14px rgba(var(--theme-primary-rgb, 58, 124, 165), 0.16);
}

.assistant-file-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.assistant-file-note,
.assistant-file-chip {
  display: inline-flex;
  align-items: center;
  max-width: 220px;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 750;
}

.assistant-file-note {
  background: var(--workbench-primary-soft);
  color: var(--workbench-primary-active);
}

.assistant-file-chip {
  overflow: hidden;
  border: 1px solid var(--workbench-line);
  background: var(--workbench-surface);
  color: var(--workbench-text);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.assistant-file-clear {
  color: var(--workbench-muted);
  font-size: 12px;
  font-weight: 750;
}

.quick-prompts {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: var(--quick-prompts-gap-top);
  margin-bottom: 0;
  color: var(--workbench-text);
  font-size: 14px;
  font-weight: 700;
}

.quick-prompts button {
  min-height: 28px;
  padding: 0 14px;
  border: 1px solid var(--workbench-line);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--workbench-text);
  font-size: 13px;
  font-weight: 650;
}

.quick-prompts .quick-more {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border-color: transparent;
  background: transparent;
  color: var(--workbench-primary-active);
  font-weight: 800;
}

.capability-grid {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 16px;
  min-height: 0;
}

.capability-grid--privileged {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.capability-grid--standard {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.capability-card {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 10px;
  align-items: center;
  gap: 14px;
  min-height: 0;
  padding: 17px 12px 17px 26px;
  overflow: hidden;
  border: 1px solid var(--workbench-line);
  border-left: 3px solid color-mix(in srgb, var(--capability-color) 54%, var(--workbench-line));
  border-radius: 4px;
  background: var(--workbench-surface);
  text-align: left;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.035);
}

.capability-card::after {
  display: none;
}

.capability-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 4px;
  border: 1px solid color-mix(in srgb, var(--capability-color) 20%, #ffffff);
  background: var(--capability-soft);
  color: var(--capability-color);
  font-size: 24px;
  box-shadow: none;
}

.capability-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
  padding-left: 18px;
}

.capability-copy strong {
  color: var(--workbench-ink);
  font-size: 14px;
  font-weight: 850;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.capability-copy small {
  overflow: hidden;
  color: var(--workbench-muted);
  font-size: 12px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.capability-arrow {
  color: color-mix(in srgb, var(--workbench-muted) 68%, #ffffff);
  font-size: 18px;
}

.capability-card--green {
  --capability-color: var(--workbench-primary);
  --capability-soft: var(--workbench-primary-soft);
}

.capability-card--blue {
  --capability-color: var(--workbench-primary);
  --capability-soft: var(--workbench-primary-soft);
}

.capability-card--emerald {
  --capability-color: var(--workbench-primary);
  --capability-soft: var(--workbench-primary-soft);
}

.capability-card--violet {
  --capability-color: var(--workbench-primary);
  --capability-soft: var(--workbench-primary-soft);
}

.capability-card--cyan {
  --capability-color: var(--workbench-primary);
  --capability-soft: var(--workbench-primary-soft);
}

.capability-card--amber {
  --capability-color: var(--workbench-chart-amber);
  --capability-soft: color-mix(in srgb, var(--workbench-chart-amber) 12%, #ffffff);
}

.workbench-content-grid {
  display: grid;
  grid-template-columns: minmax(360px, 0.95fr) minmax(560px, 1.4fr) minmax(320px, 0.82fr);
  gap: 14px;
  align-items: stretch;
  min-height: 0;
  overflow: hidden;
}

.workbench-card {
  min-height: 0;
  height: 100%;
  overflow: hidden;
  padding: 12px 14px;
  border: 1px solid var(--workbench-line);
  border-radius: 4px;
  background: var(--workbench-surface);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.035);
}

.todo-panel,
.progress-panel,
.side-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 24px;
  margin-bottom: 5px;
}

.section-head h2 {
  margin: 0;
  color: var(--workbench-ink);
  font-size: 16px;
  line-height: 1.25;
  font-weight: 850;
}

.title-with-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.soft-badge {
  min-width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 7px;
  border-radius: 4px;
  background: var(--workbench-primary-soft);
  color: var(--workbench-primary-active);
  font-size: 13px;
  font-weight: 850;
}

.link-action {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--workbench-muted);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.muted-link {
  color: var(--workbench-muted);
}

.todo-list,
.progress-list {
  display: grid;
  min-height: 0;
  height: 100%;
  grid-auto-rows: minmax(0, 1fr);
}

.todo-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 2px 0;
  border-top: 1px solid var(--workbench-line-soft);
  text-align: left;
}

.todo-row:first-child,
.progress-row:first-child {
  padding-top: 2px;
  border-top: 0;
}

.todo-row :deep(.workbench-list-icon) {
  width: 28px;
  height: 28px;
}

.todo-row :deep(.workbench-list-icon__panel) {
  border-radius: 4px;
}

.todo-row :deep(.workbench-list-icon__art),
.todo-row :deep(.workbench-heroicon) {
  width: 16px;
  height: 16px;
}

.todo-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.todo-copy strong,
.progress-identity strong,
.progress-result strong {
  overflow: hidden;
  color: var(--workbench-ink);
  font-size: 13px;
  font-weight: 850;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.todo-copy small,
.todo-meta small,
.progress-identity small {
  overflow: hidden;
  color: var(--workbench-muted);
  font-size: 11.5px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.todo-meta {
  min-width: 96px;
  display: grid;
  justify-items: end;
  gap: 2px;
}

.todo-status,
.progress-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 20px;
  padding: 0 7px;
  border-radius: 4px;
  font-size: 11.5px;
  font-weight: 850;
  white-space: nowrap;
}

.todo-status--warning,
.progress-status--warning {
  background: var(--warning-soft);
  color: var(--warning);
}

.todo-status--success,
.progress-status--success {
  background: var(--workbench-primary-soft);
  color: var(--workbench-primary-active);
}

.todo-status--danger {
  background: var(--danger-soft);
  color: var(--danger);
}

.todo-status--info {
  background: var(--info-soft);
  color: var(--info);
}

.todo-status--orange {
  background: var(--warning-soft);
  color: var(--warning);
}

.progress-status--muted {
  background: var(--info-soft);
  color: var(--workbench-muted);
}

.progress-row {
  display: grid;
  grid-template-columns: minmax(138px, 0.9fr) minmax(300px, 1.5fr) minmax(92px, auto);
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 1px 0;
  border-top: 1px solid var(--workbench-line-soft);
  text-align: left;
}

.progress-identity,
.progress-result {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.progress-result {
  justify-items: end;
}

.progress-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: start;
}

.progress-step {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 1px;
  color: color-mix(in srgb, var(--workbench-muted) 64%, #ffffff);
}

.progress-step::before {
  content: "";
  position: absolute;
  top: 8px;
  left: calc(-50% + 12px);
  right: calc(50% + 12px);
  height: 2px;
  background: var(--workbench-line);
}

.progress-step:first-child::before { display: none; }

.progress-step.is-done::before,
.progress-step.is-current::before {
  background: var(--workbench-primary);
}

.progress-step i {
  position: relative;
  z-index: 1;
  width: 16px;
  height: 16px;
  display: grid;
  place-items: center;
  border: 2px solid var(--workbench-line);
  border-radius: 999px;
  background: var(--workbench-surface);
  color: var(--workbench-line-strong, #cbd5e1);
  font-size: 12px;
  line-height: 1;
}

.progress-step.is-done i {
  border-color: var(--workbench-primary);
  background: var(--workbench-primary-soft);
  color: var(--workbench-primary-active);
}

.progress-step.is-current i {
  border-color: var(--workbench-primary-active);
  background: var(--theme-primary-light-9);
  color: var(--workbench-primary-active);
}

.progress-step small {
  color: currentColor;
  font-size: 10px;
  font-weight: 750;
  line-height: 1.2;
  white-space: nowrap;
}

.progress-step.is-done,
.progress-step.is-current {
  color: var(--workbench-ink);
}

.capability-card:hover,
.todo-row:hover,
.progress-row:hover,
.quick-prompts button:hover,
.composer-icon-button:hover,
.composer-related-button:hover {
  border-color: rgba(var(--theme-primary-rgb, 58, 124, 165), 0.24);
  color: var(--workbench-primary-active);
}
