:root {
  color-scheme: light;
  --page: #f6f7fb;
  --surface: #ffffff;
  --surface-soft: #f9faff;
  --rail: #ffffff;
  --ink: #171a22;
  --muted: #687083;
  --faint: #9aa2b3;
  --line: #e5e8f0;
  --line-strong: #d7dce8;
  --brand: #6658f6;
  --brand-strong: #4f43d4;
  --brand-soft: #f0efff;
  --teal: #13a99b;
  --orange: #f0833a;
  --rose: #e55361;
  --blue: #3d78d8;
  --shadow: 0 18px 44px rgba(38, 45, 67, 0.09);
  --radius: 8px;
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", "Segoe UI", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
}

button,
input,
select,
textarea {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

code {
  background: #f3f5fb;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: #2a3142;
  display: inline-block;
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 12px;
  line-height: 1.45;
  max-width: 100%;
  overflow-wrap: anywhere;
  padding: 2px 6px;
}

.app-shell {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  min-height: 100vh;
}

.side-rail {
  align-self: start;
  background: var(--rail);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 22px;
  height: 100vh;
  min-height: 100vh;
  overflow-y: auto;
  padding: 22px 16px;
  position: sticky;
  top: 0;
}

.brand {
  align-items: center;
  display: flex;
  gap: 12px;
  min-width: 0;
  padding: 2px 4px;
}

.brand-mark {
  align-items: center;
  background: var(--brand);
  border-radius: var(--radius);
  color: #ffffff;
  display: inline-flex;
  font-size: 14px;
  font-weight: 800;
  height: 40px;
  justify-content: center;
  width: 40px;
}

.brand strong,
.brand small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand strong {
  font-size: 17px;
}

.brand small {
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}

.nav-list {
  display: grid;
  gap: 6px;
}

.nav-list a {
  border-radius: 7px;
  color: #4c5568;
  font-size: 14px;
  min-height: 38px;
  padding: 9px 12px;
}

.nav-list a:hover,
.nav-list a.active,
.nav-list a[aria-current="page"] {
  background: var(--brand-soft);
  color: var(--brand-strong);
  font-weight: 700;
}

#shots,
#tasks,
#support,
#projects,
#project-admin,
#run-list-section,
#workflows {
  scroll-margin-top: 18px;
}

.is-route-target {
  animation: route-target-flash 0.8s ease;
}

@keyframes route-target-flash {
  0% {
    background-color: rgba(102, 88, 246, 0.08);
  }

  100% {
    background-color: transparent;
  }
}

.rail-foot {
  border-top: 1px solid var(--line);
  display: grid;
  margin-top: auto;
  padding: 16px 4px 0;
  position: relative;
}

.rail-project-switch {
  display: grid;
  gap: 7px;
  min-width: 0;
  position: relative;
}

.project-trigger {
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  color: var(--ink);
  display: flex;
  gap: 9px;
  justify-content: space-between;
  min-height: 42px;
  min-width: 0;
  padding: 8px 10px;
  text-align: left;
  width: 100%;
}

.project-trigger:hover,
.project-trigger[aria-expanded="true"] {
  background: #f7f8ff;
  border-color: var(--brand);
  color: var(--ink);
}

.project-trigger:focus-visible {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(102, 88, 246, 0.13);
  outline: none;
}

.project-trigger-text {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.project-trigger-text strong,
.project-trigger-text span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-trigger-text strong {
  font-size: 13px;
}

.project-trigger-text span {
  color: var(--muted);
  font-size: 12px;
}

.project-trigger-caret {
  border-bottom: 2px solid var(--muted);
  border-right: 2px solid var(--muted);
  display: inline-block;
  flex: 0 0 auto;
  height: 8px;
  transform: rotate(45deg);
  transition: transform 0.16s ease;
  width: 8px;
}

.rail-project-switch.is-open .project-trigger-caret {
  transform: rotate(225deg);
}

.project-menu {
  background: #ffffff;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  box-shadow: 0 18px 44px rgba(38, 45, 67, 0.16);
  display: none;
  left: 0;
  max-height: min(280px, calc(100vh - 32px));
  min-width: 100%;
  overflow-y: auto;
  padding: 6px;
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 30;
}

.rail-project-switch.is-open .project-menu {
  display: grid;
  gap: 4px;
}

.rail-project-switch.opens-up .project-menu {
  bottom: calc(100% + 8px);
  top: auto;
}

.project-option {
  border-radius: 6px;
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 9px 10px;
}

.project-option:hover,
.project-option:focus-visible {
  background: #f4f6ff;
  outline: none;
}

.project-option.is-selected {
  background: var(--brand-soft);
  color: var(--brand-strong);
}

.project-option strong,
.project-option span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-option strong {
  font-size: 13px;
}

.project-option span {
  color: var(--muted);
  font-size: 12px;
}

.page {
  display: grid;
  gap: 18px;
  min-width: 0;
  padding: 22px clamp(18px, 3vw, 36px) 42px;
}

.page.is-workflow-page {
  gap: 0;
  height: 100vh;
  overflow: hidden;
  padding-bottom: 22px;
}

.topbar {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: flex;
  gap: 22px;
  justify-content: space-between;
  min-width: 0;
  padding: 18px 20px;
}

.topbar h1 {
  font-size: 24px;
  line-height: 1.28;
  margin: 4px 0 0;
}

.eyebrow,
.section-kicker {
  color: var(--brand);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  margin: 0;
  text-transform: uppercase;
}

.top-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  min-width: 0;
}

.runtime-card {
  align-items: center;
  background: #f7f8fd;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: flex;
  gap: 8px;
  max-width: min(520px, 44vw);
  min-height: 40px;
  min-width: 0;
  padding: 6px 8px;
}

.runtime-card span {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.runtime-card small {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.health {
  border-radius: 999px;
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  padding: 6px 9px;
  white-space: nowrap;
}

.is-ok {
  background: #e7f8f5;
  color: #087d73;
}

.is-bad {
  background: #fdebed;
  color: var(--rose);
}

.ghost-button,
.primary-link {
  align-items: center;
  border-radius: 7px;
  display: inline-flex;
  font-size: 14px;
  font-weight: 800;
  min-height: 40px;
  padding: 9px 13px;
}

.ghost-button {
  background: #ffffff;
  border: 1px solid var(--line-strong);
  color: #3d4659;
}

.ghost-button:hover {
  border-color: var(--brand);
  color: var(--brand-strong);
}

.primary-link,
button {
  background: var(--brand);
  border: 0;
  color: #ffffff;
}

.primary-link:hover,
button:hover {
  background: var(--brand-strong);
}

.notice,
.inline-error {
  background: #fff4df;
  border: 1px solid #f0c881;
  color: #7a4b11;
}

.notice {
  border-radius: var(--radius);
  padding: 12px 14px;
}

.inline-error {
  border-width: 0 0 1px;
  padding: 10px 12px;
}

.overview {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.stat-card,
.pipeline-step,
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.stat-card {
  display: grid;
  gap: 6px;
  min-height: 104px;
  padding: 16px;
  position: relative;
}

.stat-card::before {
  background: var(--brand);
  border-radius: 999px;
  content: "";
  height: 8px;
  position: absolute;
  right: 16px;
  top: 16px;
  width: 8px;
}

.stat-card:nth-child(2)::before {
  background: var(--teal);
}

.stat-card:nth-child(3)::before {
  background: var(--orange);
}

.queue-card::before {
  background: var(--blue);
}

.stat-card span,
label span,
.count {
  color: var(--muted);
  font-size: 12px;
}

.stat-card strong {
  font-size: 30px;
  line-height: 1;
}

.stat-card small {
  color: var(--faint);
  overflow-wrap: anywhere;
}

.pipeline {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.workflow-page {
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
}

.pipeline-step {
  border-color: transparent;
  display: grid;
  gap: 6px;
  padding: 14px;
}

.pipeline-step span {
  color: var(--brand);
  font-size: 12px;
  font-weight: 900;
}

.pipeline-step strong {
  font-size: 15px;
}

.pipeline-step small {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.pipeline-step.is-current {
  border-color: rgba(102, 88, 246, 0.35);
  box-shadow: 0 18px 44px rgba(102, 88, 246, 0.14);
}

.workbench {
  align-items: start;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1.28fr) minmax(360px, 0.72fr);
}

.manager-column {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.panel {
  min-width: 0;
  padding: 18px;
}

.shot-panel {
  min-height: 520px;
}

.panel-head {
  align-items: center;
  display: flex;
  gap: 14px;
  justify-content: space-between;
  margin-bottom: 16px;
}

.panel-head h2 {
  font-size: 20px;
  line-height: 1.25;
  margin: 3px 0 0;
}

.count {
  background: #f5f6fb;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 9px;
  white-space: nowrap;
}

.shot-form,
.compact-form {
  display: grid;
  gap: 12px;
}

.shot-form {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.preset-summary {
  background: #fcfcff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: grid;
  gap: 10px;
  padding: 12px 14px;
}

.preset-summary-head {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  min-width: 0;
}

.preset-summary-head strong {
  font-size: 14px;
  line-height: 1.4;
  min-width: 0;
  overflow-wrap: anywhere;
}

.preset-summary-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.preset-chip {
  align-items: center;
  background: #f5f7fb;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #556076;
  display: inline-flex;
  font-size: 12px;
  font-weight: 700;
  min-height: 26px;
  padding: 4px 8px;
}

.preset-chip[hidden] {
  display: none;
}

.preset-chip-quiet {
  background: var(--brand-soft);
  border-color: #d8d4ff;
  color: var(--brand-strong);
}

.shot-advanced {
  background: #f8faff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
}

.shot-advanced summary {
  align-items: center;
  color: #2e3850;
  cursor: pointer;
  display: flex;
  font-size: 14px;
  font-weight: 800;
  gap: 10px;
  justify-content: space-between;
  list-style: none;
}

.shot-advanced summary::-webkit-details-marker {
  display: none;
}

.shot-advanced summary::after {
  border-bottom: 2px solid var(--muted);
  border-right: 2px solid var(--muted);
  content: "";
  display: inline-block;
  flex: 0 0 auto;
  height: 8px;
  margin-top: -3px;
  transform: rotate(45deg);
  transition: transform 0.16s ease, margin-top 0.16s ease;
  width: 8px;
}

.shot-advanced[open] summary::after {
  margin-top: 3px;
  transform: rotate(225deg);
}

.shot-advanced-grid {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 12px;
  margin-top: 12px;
  padding-top: 12px;
}

.shot-advanced-grid .field-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.compact-form {
  border-top: 1px solid var(--line);
  margin-top: 12px;
  padding-top: 12px;
}

.span-2 {
  grid-column: span 2;
}

.span-3 {
  grid-column: 1 / -1;
}

.field-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

[data-shot-field].is-hidden {
  display: none;
}

label {
  display: grid;
  gap: 6px;
  min-width: 0;
}

input,
select,
textarea {
  background: #ffffff;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  color: var(--ink);
  min-height: 40px;
  outline: none;
  padding: 8px 10px;
  width: 100%;
}

textarea {
  line-height: 1.55;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(102, 88, 246, 0.13);
}

button {
  border-radius: 7px;
  cursor: pointer;
  font-weight: 800;
  min-height: 40px;
  padding: 9px 14px;
}

button.small {
  font-size: 13px;
  min-height: 32px;
  padding: 6px 10px;
  white-space: nowrap;
}

button.secondary {
  background: #edf4ff;
  color: var(--blue);
}

button.secondary:hover {
  background: #dce9ff;
}

button.danger {
  background: #fdebed;
  color: var(--rose);
}

button.danger:hover {
  background: #fad8dd;
}

.editor-fold {
  border-bottom: 1px solid var(--line);
  margin-bottom: 14px;
  padding-bottom: 14px;
}

.import-fold {
  background: #f7fbff;
  border: 1px solid #d7e8ff;
  border-radius: var(--radius);
  margin-bottom: 14px;
  padding: 12px;
}

.editor-fold summary {
  align-items: center;
  color: var(--brand-strong);
  cursor: pointer;
  display: flex;
  font-size: 14px;
  font-weight: 900;
  gap: 8px;
  list-style: none;
}

.editor-fold summary::-webkit-details-marker {
  display: none;
}

.editor-fold summary::before {
  background: var(--brand);
  border-radius: 999px;
  color: #ffffff;
  content: "+";
  display: inline-flex;
  height: 20px;
  justify-content: center;
  line-height: 20px;
  width: 20px;
}

.editor-fold[open] summary::before {
  content: "-";
}

.table-wrap {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow-x: auto;
}

.data-list-section {
  display: grid;
  gap: 12px;
}

.workflow-list-layout {
  flex: 1 1 auto;
  grid-template-rows: minmax(0, 1fr) auto;
  min-height: 0;
}

.workflow-list-scroll {
  min-height: 0;
  overflow: auto;
  padding-right: 4px;
}

.workflow-panel-shell.is-standalone {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  padding: 20px;
}

.data-list {
  background: var(--surface);
}

.workflow-table table {
  table-layout: fixed;
  width: 100%;
}

.workflow-table th {
  position: sticky;
  top: 0;
  z-index: 1;
}

.workflow-table th:nth-child(1),
.workflow-row td:nth-child(1) {
  width: 24%;
}

.workflow-table th:nth-child(2),
.workflow-row td:nth-child(2) {
  width: 11%;
}

.workflow-table th:nth-child(3),
.workflow-row td:nth-child(3) {
  width: 27%;
}

.workflow-table th:nth-child(4),
.workflow-row td:nth-child(4) {
  width: 16%;
}

.workflow-table th:nth-child(5),
.workflow-row td:nth-child(5) {
  width: 10%;
}

.workflow-table th:nth-child(6),
.workflow-row td:nth-child(6) {
  width: 12%;
}

.workflow-inline-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.workflow-inline-meta span {
  background: #f5f7fb;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #556076;
  display: inline-flex;
  font-size: 12px;
  font-weight: 700;
  margin: 0;
  padding: 4px 8px;
}

.workflow-row code {
  display: block;
  white-space: normal;
}

.workflow-actions {
  min-width: 0;
}

.workflow-actions-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.copy-button {
  min-width: 78px;
}

.copy-button.is-copied {
  background: #e7f8f5;
  color: #087d73;
}

.copy-button.is-error {
  background: #fdebed;
  color: var(--rose);
}

.workflow-rename-editor {
  border-top: 0;
  padding-top: 0;
}

.workflow-rename-editor summary {
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  color: #3d4659;
  display: inline-flex;
  font-size: 13px;
  font-weight: 800;
  justify-content: center;
  min-height: 32px;
  padding: 6px 10px;
}

.workflow-rename-editor summary::before {
  content: none;
}

.workflow-rename-editor summary:hover {
  border-color: var(--brand);
  color: var(--brand-strong);
}

.workflow-rename-editor[open] summary {
  background: var(--brand-soft);
  border-color: rgba(102, 88, 246, 0.26);
  color: var(--brand-strong);
}

.workflow-rename-form {
  display: grid;
  gap: 8px;
  margin-top: 8px;
  min-width: 0;
}

.workflow-rename-form input {
  min-height: 36px;
}

.workflow-rename-form button {
  width: 100%;
}

.support-fold {
  display: grid;
  gap: 12px;
}

.support-fold summary {
  align-items: center;
  cursor: pointer;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) auto auto;
  list-style: none;
}

.support-fold summary::-webkit-details-marker {
  display: none;
}

.support-fold summary::after {
  border-bottom: 2px solid var(--muted);
  border-right: 2px solid var(--muted);
  content: "";
  display: inline-block;
  height: 8px;
  justify-self: end;
  margin-top: -3px;
  transform: rotate(45deg);
  transition: transform 0.16s ease, margin-top 0.16s ease;
  width: 8px;
}

.support-fold[open] summary::after {
  margin-top: 3px;
  transform: rotate(225deg);
}

.support-fold-title {
  color: #273044;
  font-size: 15px;
  font-weight: 800;
  min-width: 0;
}

.support-fold > :not(summary) {
  min-width: 0;
}

.pagination {
  align-items: center;
  background: #fbfcff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: grid;
  gap: 10px;
  grid-template-columns: max-content max-content minmax(0, 1fr);
  padding: 10px 12px;
}

.pagination-summary {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  min-width: 0;
  white-space: nowrap;
}

.page-size-form {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-self: start;
  margin-left: 0;
  white-space: nowrap;
}

.page-size-form label {
  align-items: center;
  display: flex;
  gap: 6px;
}

.page-size-form label span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.page-size-form select {
  min-height: 32px;
  min-width: 76px;
  padding: 5px 28px 5px 10px;
}

.pagination-nav {
  align-items: center;
  display: flex;
  gap: 6px;
  justify-content: flex-end;
  justify-self: end;
  min-width: 0;
  overflow-x: auto;
  padding-bottom: 2px;
  white-space: nowrap;
}

.page-link {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  color: #3b4458;
  display: inline-flex;
  font-size: 13px;
  font-weight: 900;
  justify-content: center;
  min-height: 32px;
  min-width: 32px;
  padding: 0 10px;
  flex: 0 0 auto;
}

.page-link:hover {
  background: #edf4ff;
  border-color: #cfe0ff;
  color: var(--blue);
}

.page-link.is-active {
  background: var(--brand);
  border-color: var(--brand);
  color: #ffffff;
}

.page-link.is-disabled {
  color: var(--faint);
  cursor: not-allowed;
  opacity: 0.72;
}

.record-list {
  display: grid;
  gap: 10px;
}

.run-list {
  display: grid;
  gap: 10px;
}

.asset-list {
  display: grid;
  gap: 10px;
}

.asset-item {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 12px;
}

.asset-item-head {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  min-width: 0;
}

.asset-item-head strong {
  line-height: 1.4;
  min-width: 0;
  overflow-wrap: anywhere;
}

.asset-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.asset-item-meta {
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  min-width: 0;
}

.asset-item-meta span {
  font-size: 12px;
  margin: 0;
}

.asset-item code {
  display: block;
}

.asset-note {
  color: var(--muted);
  display: block;
  font-size: 12px;
  line-height: 1.5;
}

.run-item {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 12px;
}

.run-item-head {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  min-width: 0;
}

.run-item-head strong {
  line-height: 1.4;
  min-width: 0;
  overflow-wrap: anywhere;
}

.run-item-meta {
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  min-width: 0;
}

.run-item-meta span {
  font-size: 12px;
  margin: 0;
}

.run-item code {
  display: block;
}

.workflow-library-list {
  border-bottom: 1px solid var(--line);
  margin-bottom: 14px;
  padding-bottom: 14px;
}

.workflow-library-item {
  background: #f8fbff;
  border-color: #dcecff;
}

.record-item {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: grid;
  gap: 9px;
  min-width: 0;
  padding: 12px;
}

.record-item.is-active-project {
  background: #f7f6ff;
  border-color: rgba(102, 88, 246, 0.36);
}

.record-title {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.record-title strong {
  line-height: 1.45;
  min-width: 0;
  overflow-wrap: anywhere;
}

.record-meta {
  display: grid;
  gap: 4px;
}

.record-meta span {
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.record-editor {
  border-top: 1px solid var(--line);
  padding-top: 8px;
}

.record-editor summary {
  color: var(--brand-strong);
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
  list-style: none;
  width: max-content;
}

.record-editor summary::-webkit-details-marker {
  display: none;
}

.record-editor summary::before {
  content: "+";
  font-weight: 900;
  margin-right: 6px;
}

.record-editor[open] summary::before {
  content: "-";
}

table {
  border-collapse: collapse;
  min-width: 100%;
}

.shot-table table {
  min-width: 980px;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 11px 12px;
  text-align: left;
  vertical-align: top;
}

th {
  background: #f5f6fb;
  color: #596174;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

td {
  font-size: 14px;
}

td strong {
  display: block;
  line-height: 1.45;
}

td span {
  color: var(--muted);
  display: block;
  margin-top: 3px;
}

.shot-inline-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 8px;
  margin-top: 8px;
}

.shot-inline-meta span {
  background: #f5f7fb;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #556076;
  display: inline-flex;
  font-size: 12px;
  font-weight: 700;
  margin: 0;
  padding: 4px 8px;
}

.shot-note {
  color: var(--muted);
  display: block;
  font-size: 12px;
  line-height: 1.5;
  margin-top: 6px;
}

.shot-result {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.shot-result code {
  display: block;
}

tr:last-child td {
  border-bottom: 0;
}

tbody tr:hover {
  background: #fafbff;
}

.empty {
  color: var(--muted);
  padding: 24px 12px;
  text-align: center;
}

.badge {
  align-items: center;
  border-radius: 999px;
  display: inline-flex;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  margin: 0;
  padding: 6px 9px;
  width: max-content;
}

.kind-badge,
.status-badge {
  background: var(--brand-soft);
  border: 1px solid #d8d4ff;
  color: var(--brand-strong);
}

.stage-badge {
  background: #eef4ff;
  border: 1px solid #cfe0ff;
  color: var(--blue);
}

.stage-delivery {
  background: #e7f8f5;
  border-color: #c0ede7;
  color: #087d73;
}

.status-submitted {
  background: #eef4ff;
  border-color: #cfe0ff;
  color: var(--blue);
}

.status-generated,
.status-upscaled,
.status-accepted {
  background: #e7f8f5;
  border-color: #c0ede7;
  color: #087d73;
}

.status-planned {
  background: #fff3e8;
  border-color: #ffd7b7;
  color: #a45112;
}

.status-rejected,
.status-cancelled,
.status-error {
  background: #fdebed;
  border-color: #f6c7cf;
  color: var(--rose);
}

.node-map {
  display: grid;
  gap: 3px;
}

.node-map span {
  color: var(--muted);
  display: block;
  margin: 0;
}

.actions {
  align-items: flex-start;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.actions form {
  margin: 0;
}

.empty-action {
  align-items: center;
  color: var(--faint);
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  min-height: 32px;
}

.error-text {
  color: var(--rose);
  font-weight: 800;
}

.htmx-request {
  opacity: 0.72;
}

@media (max-width: 1220px) {
  .overview,
  .pipeline {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .workbench {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 920px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .side-rail {
    height: auto;
    min-height: auto;
    position: static;
  }

  .nav-list {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .nav-list a {
    flex: 0 0 auto;
  }

  .rail-foot {
    margin-top: 0;
  }

  .topbar {
    align-items: start;
    display: grid;
  }

  .top-actions {
    justify-content: flex-start;
  }

  .runtime-card {
    max-width: 100%;
  }

  .rail-project-switch {
    width: 100%;
  }

  .shot-form,
  .field-grid {
    grid-template-columns: 1fr;
  }

  .span-2,
  .span-3 {
    grid-column: 1 / -1;
  }
}

@media (max-width: 560px) {
  .page {
    padding: 14px 12px 28px;
  }

  .topbar,
  .panel,
  .stat-card,
  .pipeline-step {
    padding: 14px;
  }

  .topbar h1 {
    font-size: 20px;
  }

  .overview,
  .pipeline {
    grid-template-columns: 1fr;
  }

  .panel-head {
    align-items: start;
    display: grid;
  }

  .runtime-card {
    align-items: flex-start;
    display: grid;
    width: 100%;
  }

  .pagination {
    grid-template-columns: 1fr;
  }

  .page-size-form,
  .pagination-nav {
    justify-self: start;
  }

  .pagination-nav {
    justify-content: flex-start;
  }
}
