/* Projects contain deliveries and their versions; runs have a separate view. */
.results-library {
  --library-radius: 12px;
}
.live-tasks {
  margin-bottom: 22px;
}
.live-tasks-heading,
.live-tasks-heading > div {
  display: flex;
  align-items: center;
  gap: 10px;
}
.live-tasks-heading {
  justify-content: space-between;
  margin-bottom: 14px;
}
.live-tasks-heading h2 {
  margin: 0;
  color: var(--ink);
  font-size: 17px;
  font-weight: 600;
}
.live-status-dot {
  display: inline-block;
  flex-shrink: 0;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--ui-accent-soft);
}
.live-task-count {
  padding: 3px 8px;
  color: var(--accent);
  background: var(--ui-accent-soft);
  border-radius: 5px;
  font-size: 11px;
}
.live-updates {
  color: var(--ink-soft);
  font-size: 11px;
}
.live-task-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.live-task-card {
  position: relative;
  isolation: isolate;
  min-width: 0;
  padding: 20px 22px;
  border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line));
  border-radius: 14px;
  background: var(--paper);
  box-shadow: inset 0 2px 0 color-mix(in srgb, var(--accent) 65%, transparent);
}
.live-task-card:only-child {
  grid-column: 1 / -1;
}
.live-task-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.live-delivery {
  color: var(--ink-soft);
  font-size: 11px;
}
.live-task-title {
  display: block;
  margin: 12px 0 16px;
  padding: 0;
  color: var(--ink);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.6;
  text-align: left;
  background: transparent;
  border: 0;
  cursor: pointer;
  overflow-wrap: anywhere;
}
.live-task-title:hover {
  color: var(--accent);
}
.live-task-title::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: 14px;
  cursor: pointer;
}
.live-task-card:hover {
  border-color: var(--accent);
}
.live-task-title:focus-visible {
  outline: none;
}
.live-task-title:focus-visible::after {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.live-task-actions button {
  position: relative;
  z-index: 2;
}
.production-current-step {
  padding: 15px 18px;
  border-left: 3px solid var(--accent);
  border-radius: 0 8px 8px 0;
  background: var(--ui-accent-soft);
}
.production-current-step > span {
  display: block;
  margin-bottom: 7px;
  color: var(--accent);
  font-size: 12px;
}
.production-current-step > strong {
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.7;
  overflow-wrap: anywhere;
}
.live-task-progress {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 22px;
}
.live-task-progress > span {
  font-size: 12px;
  line-height: 1.7;
  color: var(--ink-soft);
  min-height: 40px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.live-task-progress strong {
  color: var(--accent);
  font-size: 27px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  flex-shrink: 0;
}
.live-task-progress small {
  font-size: 13px;
  padding-left: 3px;
}
.live-task-card progress {
  display: block;
  width: 100%;
  height: 5px;
  margin: 13px 0 17px;
  border: 0;
  border-radius: 8px;
  overflow: hidden;
  accent-color: var(--accent);
  background: var(--soft);
}
.live-task-card progress::-webkit-progress-bar {
  background: var(--soft);
}
.live-task-card progress::-webkit-progress-value {
  background: var(--accent);
  border-radius: 8px;
}
.live-task-card progress::-moz-progress-bar {
  background: var(--accent);
  border-radius: 8px;
}
.live-task-card footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.live-task-time {
  color: var(--ink-soft);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}
.live-task-actions,
.live-task-actions .build-control-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.live-task-actions > .text-button {
  font-size: 12px;
}
.simple-workspace.creator-studio .live-task-actions .button {
  min-height: 32px;
  padding: 6px 12px;
  font-size: 11px;
}
.live-task-card.paused {
  border-color: var(--line);
  box-shadow: none;
}
.live-task-card.paused .live-task-progress strong {
  color: var(--ink-soft);
}
.live-tasks.is-idle {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink-soft);
  font-size: 12px;
}
.live-tasks.is-idle p {
  margin: 0;
}
.live-tasks.is-idle .live-status-dot {
  width: 5px;
  height: 5px;
  background: var(--ink-soft);
  box-shadow: none;
}
.library-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 28px;
}
.library-metrics > div {
  position: relative;
  padding: 19px 22px;
  text-align: left;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--library-radius);
  color: var(--ink);
}
.library-metrics span {
  display: block;
  color: var(--ink-soft);
  font-size: 12px;
}
.library-metrics strong {
  display: block;
  margin-top: 10px;
  font-size: 28px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.library-metrics strong small {
  margin-left: 8px;
  font-size: 12px;
  font-weight: 400;
  color: var(--ink-soft);
}
.library-tabbar {
  display: flex;
  gap: 28px;
  border-bottom: 1px solid var(--line);
}
.library-tabbar button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 2px 14px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--ink-soft);
  font-size: 15px;
  font-weight: 600;
}
.library-tabbar button[aria-selected="true"] {
  border-bottom-color: var(--accent);
  color: var(--ink);
}
.library-tabbar button > span {
  background: var(--soft);
  color: var(--ink-soft);
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 5px;
  font-weight: 400;
}
.task-live-dot {
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
}
.library-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 22px 0 16px;
}
.library-search {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 200px;
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  padding: 0 12px;
}
.library-search > span {
  font-size: 23px;
  color: var(--ink-soft);
}
.simple-workspace.creator-studio .library-search input {
  width: 100%;
  min-width: 0;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font-size: 13px;
  box-shadow: none;
}
.library-search:focus-within {
  border-color: var(--accent);
}
.simple-workspace.creator-studio .library-search input:focus-visible {
  outline: none;
}
.library-select {
  display: flex;
  align-items: center;
  gap: 8px;
}
.library-select > span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
.simple-workspace.creator-studio .library-select select {
  max-width: 210px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  padding: 0 28px 0 12px;
  font-size: 12px;
}
.library-list-caption {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  color: var(--ink-soft);
  font-size: 12px;
}
.library-auto-update {
  margin-left: auto;
  font-size: 11px;
}
.agent-result-list {
  display: grid;
  gap: 16px;
}
.agent-result-project {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  overflow: hidden;
}
.agent-result-heading {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}
.agent-result-icon {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  display: grid;
  place-items: center;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--accent);
}
.agent-result-icon svg {
  width: 24px;
  height: 24px;
}
.agent-result-heading > div {
  flex: 1;
  min-width: 0;
}
.agent-result-heading h3 {
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.agent-result-heading p {
  margin: 3px 0 0;
  font-size: 11px;
  color: var(--ink-soft);
}
.agent-result-heading > button {
  flex-shrink: 0;
  font-size: 12px;
}
.agent-delivery + .agent-delivery {
  border-top: 1px solid var(--line);
}
.agent-release {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px auto;
  align-items: center;
  gap: 20px;
  padding: 18px 22px;
}
.agent-release-name {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
  min-width: 0;
}
.delivery-type {
  flex: 0 0 100%;
  font-size: 12px;
  color: var(--ink-soft);
}
.agent-release-name > strong {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 14px;
  font-weight: 500;
}
.latest-release {
  border-radius: 4px;
  background: var(--ui-accent-soft);
  color: var(--accent);
  padding: 2px 6px;
  font-size: 10px;
  font-weight: 400;
}
.agent-release-name > small {
  color: var(--ink-soft);
  font-size: 11px;
}
.agent-release-date {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--ink-soft);
  font-size: 11px;
}
.agent-release-date time {
  color: var(--ink);
  font-size: 12px;
}
.simple-workspace.creator-studio .agent-release > .button {
  min-height: 36px;
  font-size: 12px;
  padding: 8px 14px;
}
.release-history {
  border-top: 1px dashed var(--line);
  margin: 0 22px;
  padding: 9px 0;
}
.release-history summary {
  width: fit-content;
  padding: 4px 0;
  cursor: pointer;
  color: var(--ink-soft);
  font-size: 12px;
}
.release-history summary > span {
  padding-left: 5px;
}
.release-history-row {
  display: grid;
  grid-template-columns: 75px minmax(65px, 1fr) 140px 45px;
  gap: 12px;
  align-items: center;
  padding: 12px 2px;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 11px;
}
.release-history-row:first-child {
  margin-top: 10px;
}
.release-history-row > strong {
  color: var(--ink);
  font-weight: 500;
  font-size: 12px;
}
.release-history-row .text-button {
  padding: 4px 0;
  font-size: 12px;
}
.task-table-wrap {
  border: 1px solid var(--line);
  border-radius: var(--library-radius);
  overflow: hidden;
  background: var(--paper);
}
.library-task-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 12px;
}
.library-task-table th {
  text-align: left;
  color: var(--ink-soft);
  background: var(--soft);
  font-weight: 500;
  padding: 14px 16px;
}
.library-task-table th:nth-child(1) {
  width: 28%;
}
.library-task-table th:nth-child(2) {
  width: 16%;
}
.library-task-table th:nth-child(3) {
  width: 25%;
}
.library-task-table th:nth-child(4) {
  width: 13%;
}
.library-task-table th:nth-child(5) {
  width: 18%;
}
.library-task-table td {
  padding: 19px 16px;
  vertical-align: middle;
  border-top: 1px solid var(--line);
  overflow-wrap: anywhere;
}
.library-task-table tbody tr:hover {
  background: var(--leaf-paper);
}
.task-name {
  display: block;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  line-height: 1.65;
  overflow-wrap: anywhere;
}
.task-name:hover {
  color: var(--accent);
}
.task-reference {
  display: block;
  color: var(--ink-soft);
  font-size: 10px;
  margin-top: 6px;
}
.task-delivery,
.task-date {
  font-size: 11px;
  color: var(--ink-soft);
}
.task-status-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--ink-soft);
  font-size: 11px;
}
.task-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--ink-soft);
}
.task-status::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}
.task-status:is(.planning, .building, .validating, .queued) {
  color: var(--violet);
}
.task-status.completed {
  color: var(--accent);
}
.task-status.paused {
  color: #c5a66a;
}
.task-status.failed {
  color: #e8a29b;
}
.creator-studio[data-theme="light"] .task-status.paused {
  color: #89651b;
}
.creator-studio[data-theme="light"] .task-status.failed {
  color: #a43c32;
}
.library-task-table progress {
  display: block;
  width: 100%;
  height: 3px;
  margin-top: 8px;
  accent-color: var(--violet);
}
.task-stage {
  margin: 7px 0 0;
  font-size: 10px;
  color: var(--ink-soft);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.task-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.task-actions > .text-button {
  font-size: 11px;
  padding: 6px 0;
}
.task-actions .build-control-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.simple-workspace.creator-studio .task-actions .button {
  min-height: 30px;
  padding: 5px 9px;
  font-size: 11px;
  border-radius: 7px;
}
.library-empty {
  padding: 64px 20px;
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: 12px;
}
.library-empty > span {
  color: var(--ink-soft);
  font-size: 30px;
}
.library-empty h3 {
  margin: 15px 0 8px;
  font-size: 16px;
}
.library-empty p {
  margin: 0 0 20px;
  font-size: 13px;
  color: var(--ink-soft);
}
.grouped-results-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 22px 0 14px;
}
.grouped-results-heading h2 {
  margin: 0;
  font-size: 16px;
}
.grouped-results-heading > button {
  font-size: 12px;
}
.studio-output .agent-result-heading {
  padding: 14px;
}
.studio-output .agent-result-icon {
  display: none;
}
.studio-output .agent-result-heading h3 {
  font-size: 13px;
}
.studio-output .agent-release {
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 15px;
  gap: 12px;
}
.studio-output .agent-release-date {
  display: none;
}
.studio-output .release-history {
  margin: 0 15px;
}
.studio-output .release-history-row {
  grid-template-columns: 55px 1fr auto;
  gap: 8px;
}
.studio-output .release-history-row time {
  grid-column: 2;
  grid-row: 2;
}
.studio-output .release-history-row button {
  grid-column: 3;
  grid-row: 1 / 3;
}
.studio-output .agent-release-name > small {
  font-size: 10px;
}
.product-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  color: var(--ink-soft);
  font-size: 12px;
  margin: 0 0 18px;
}
@media (max-width: 1120px) {
  .library-task-table th,
  .library-task-table td {
    padding-left: 12px;
    padding-right: 12px;
  }
}
@media (max-width: 700px) {
  .live-tasks-heading {
    align-items: flex-start;
  }
  .live-tasks-heading > div {
    flex-wrap: wrap;
    gap: 8px;
  }
  .live-tasks-heading h2 {
    font-size: 15px;
  }
  .live-updates {
    display: none;
  }
  .live-task-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }
  .live-task-card {
    padding: 16px;
  }
  .live-task-title {
    font-size: 14px;
    margin: 10px 0 14px;
  }
  .live-task-progress > span {
    font-size: 11px;
  }
  .live-task-actions,
  .live-task-actions .build-control-actions {
    gap: 8px;
  }
  .library-metrics {
    gap: 8px;
    margin-bottom: 20px;
  }
  .library-metrics > div {
    padding: 13px 11px;
    border-radius: 9px;
  }
  .library-metrics span {
    font-size: 10px;
    line-height: 1.6;
  }
  .library-metrics strong {
    font-size: 23px;
    margin-top: 7px;
  }
  .library-metrics strong small {
    font-size: 10px;
    margin-left: 4px;
  }
  .library-toolbar {
    gap: 8px;
    margin-top: 16px;
  }
  .library-search {
    flex: 1 0 100%;
    box-sizing: border-box;
  }
  .library-select {
    flex: 1;
    min-width: 0;
  }
  .simple-workspace.creator-studio .library-select select {
    width: 100%;
    max-width: none;
    min-width: 0;
    font-size: 11px;
    padding-left: 8px;
  }
  .library-auto-update {
    display: none;
  }
  .library-list-caption {
    font-size: 11px;
  }
  .agent-result-heading {
    gap: 9px;
    padding: 14px;
  }
  .agent-result-icon {
    width: 30px;
    height: 30px;
    flex-basis: 30px;
  }
  .agent-result-heading h3 {
    font-size: 13px;
  }
  .agent-result-heading > button {
    font-size: 10px;
  }
  .agent-release {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    padding: 15px 14px;
  }
  .agent-release-date {
    grid-column: 1;
    grid-row: 2;
    flex-direction: row;
    flex-wrap: wrap;
  }
  .agent-release > button {
    grid-column: 2;
    grid-row: 1 / 3;
  }
  .agent-release-name {
    gap: 7px 10px;
  }
  .release-history {
    margin: 0 14px;
  }
  .release-history-row {
    grid-template-columns: 55px 1fr auto;
    gap: 8px;
  }
  .release-history-row time {
    grid-column: 2;
    grid-row: 2;
  }
  .release-history-row button {
    grid-column: 3;
    grid-row: 1 / 3;
  }
  .library-task-table,
  .library-task-table tbody,
  .library-task-table tr,
  .library-task-table td {
    display: block;
    width: auto;
  }
  .library-task-table thead {
    display: none;
  }
  .library-task-table tr {
    padding: 16px;
  }
  .library-task-table tr + tr {
    border-top: 1px solid var(--line);
  }
  .library-task-table td {
    border: 0;
    padding: 5px 0;
  }
  .library-task-table td[data-column="交付类型"] {
    padding-top: 1px;
  }
  .library-task-table td[data-column="创建时间"]::before {
    content: "创建时间 · ";
  }
  .library-task-table td[data-column="操作"] {
    margin-top: 6px;
  }
  .task-actions {
    justify-content: space-between;
  }
  .task-name {
    font-size: 14px;
  }
  .task-stage {
    font-size: 11px;
  }
}
.result-version-card { position: relative; cursor: pointer; width: 100%; border: 0; border-radius: 0; background: transparent; color: inherit; font: inherit; text-align: left; }
.result-version-card:hover { background: color-mix(in srgb, var(--status-ready) 7%, var(--paper)); }
.result-version-card:focus-within { outline: 2px solid var(--status-ready); outline-offset: 3px; border-radius: 12px; }
.delivery-data-help { margin-top: 24px; padding: 20px; border: 1px solid var(--line); border-radius: 12px; line-height: 1.8; }
.delivery-data-help p, .delivery-data-help li { color: var(--ink-soft); font-size: 13px; }
.delivery-note { display: block; color: #96988e; font-size: 11px; font-weight: 400; line-height: 1.5; margin-top: 5px; }
.agent-release-name > .delivery-note { flex-basis: 100%; color: #96988e; font-weight: 400; }
.product-overview > .delivery-note { margin: 6px 0 14px; }
.background-task .task-stage { white-space: normal; max-width: 520px; }
.task-checks { font-size: 12px; color: #72766b; margin-top: 8px; }
.task-checks summary { cursor: pointer; }
.task-checks ul { margin: 8px 0; padding-left: 18px; }
.acceptance-message .acceptance-caption { display: block; color: #8a8e83; font-size: 11px; margin-bottom: 7px; }
.task-revision-badge {
  display: inline-flex;
  align-items: center;
  margin: 0 6px;
  padding: 3px 8px;
  border: 1px solid var(--accent);
  border-radius: 6px;
  color: var(--accent);
  background: var(--accent-soft, transparent);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
