:root {
  --bg: #f7f8f8;
  --surface: #ffffff;
  --surface-muted: #f2f3f3;
  --text: #111315;
  --muted: #6e7378;
  --line: #e4e6e7;
  --line-strong: #cfd3d5;
  --teal: #0d766f;
  --teal-dark: #0a514d;
  --teal-strong: #0b5f58;
  --amber: #b56a00;
  --amber-soft: #fff6e5;
  --green: #1f7a4d;
  --green-soft: #eaf6ef;
  --blue: #1d65a6;
  --blue-soft: #edf5fc;
  --red: #b23a3a;
  --red-soft: #fff0f0;
  --ink-soft: #eceeef;
  --shadow: 0 18px 44px rgba(17, 19, 21, 0.07);
  --shadow-soft: 0 1px 2px rgba(17, 19, 21, 0.04);
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family:
    -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", Inter, ui-sans-serif,
    system-ui, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

body.resizing-assistant {
  cursor: ns-resize;
  user-select: none;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  height: 100vh;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.topbar {
  min-height: 68px;
  padding: 10px 22px;
  display: grid;
  grid-template-columns: minmax(310px, 1fr) auto minmax(300px, auto);
  gap: 16px;
  align-items: center;
  border-bottom: 1px solid rgba(17, 19, 21, 0.08);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(18px);
  position: sticky;
  top: 0;
  z-index: 20;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand-logo {
  display: block;
  width: clamp(164px, 15vw, 218px);
  height: auto;
  flex: 0 0 auto;
}

.brand-divider {
  width: 1px;
  height: 22px;
  background: var(--line-strong);
}

.brand-subtitle {
  color: var(--text);
  font-size: 14px;
  font-weight: 620;
  white-space: nowrap;
}

.project-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(242, 243, 243, 0.84);
  color: var(--muted);
  white-space: nowrap;
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--amber);
}

.status-dot.ready {
  background: var(--green);
}

.status-dot.running {
  background: var(--blue);
}

.status-dot.done {
  background: var(--teal);
}

.top-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.coin-balance {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 38px;
  padding: 0 12px;
  border: 1px solid rgba(17, 19, 21, 0.09);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  white-space: nowrap;
}

.coin-symbol {
  width: 20px;
  height: 20px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: var(--amber-soft);
  color: var(--amber);
  font-weight: 800;
}

.account-button {
  width: 38px;
  height: 38px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--text);
  color: #fff;
  font-weight: 900;
}

.account-button:hover {
  background: var(--teal-dark);
  border-color: var(--teal-dark);
}

.workspace {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(280px, 0.5fr) minmax(760px, 1.5fr);
  gap: 12px;
  padding: 12px;
  overflow: hidden;
}

.assistant-pane,
.project-pane {
  min-width: 0;
  min-height: 0;
  background: var(--surface);
  border: 1px solid rgba(17, 19, 21, 0.08);
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.assistant-pane {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.assistant-header {
  padding: 10px 14px;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid var(--line);
}

.assistant-header h1,
.project-head h2,
.modal h2,
.report-cover h3 {
  margin: 0;
}

.assistant-header p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.assistant-header > div {
  display: flex;
  align-items: center;
  gap: 8px;
}

.assistant-header h1 {
  font-size: 18px;
}

.help-dot {
  position: relative;
  width: 22px;
  height: 22px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: #fff;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.help-dot span {
  position: absolute;
  left: 50%;
  top: calc(100% + 8px);
  width: 230px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
  color: var(--text);
  font-size: 12px;
  font-weight: 500;
  text-align: left;
  transform: translateX(-50%);
  opacity: 0;
  pointer-events: none;
  z-index: 30;
}

.help-dot:hover span,
.help-dot:focus span {
  opacity: 1;
}

.help-anchor {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.help-hotspot {
  cursor: help;
}

.help-hotspot:hover {
  color: var(--text);
}

.help-tip {
  position: relative;
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(102, 113, 123, 0.36);
  border-radius: 50%;
  background: #fff;
  color: var(--muted);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  padding: 0 0 1px;
  text-align: center;
  cursor: help;
}

.floating-help-popover {
  position: fixed;
  left: 0;
  top: 0;
  width: min(320px, calc(100vw - 24px));
  box-sizing: border-box;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow);
  color: var(--text);
  font-size: 12px;
  font-weight: 560;
  line-height: 1.5;
  opacity: 0;
  pointer-events: none;
  text-align: left;
  transform: translateY(-2px);
  transition: opacity 0.14s ease, transform 0.14s ease;
  white-space: normal;
  z-index: 3000;
}

.floating-help-popover::before {
  position: absolute;
  left: var(--help-arrow-left, 50%);
  top: -5px;
  width: 8px;
  height: 8px;
  border-left: 1px solid var(--line);
  border-top: 1px solid var(--line);
  background: #fff;
  content: "";
  pointer-events: none;
  transform: translateX(-50%) rotate(45deg);
  z-index: -1;
}

.floating-help-popover.visible {
  opacity: 1;
  transform: translateY(0);
}

.floating-help-popover.above::before {
  top: auto;
  bottom: -5px;
  border: 0;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.field .help-tip,
.library-input .help-tip,
.sequence-summary .help-tip,
.constraint-rule-row .help-tip,
.developability-method .help-tip {
  width: 17px;
  max-width: none;
  height: 17px;
  box-sizing: border-box;
  padding: 0 0 1px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  text-align: center;
  white-space: normal;
}

.developability-method.help-anchor {
  display: block;
}

.developability-method > .help-tip {
  position: absolute;
  right: -6px;
  top: -6px;
  width: 15px;
  height: 15px;
  border-color: rgba(34, 124, 112, 0.24);
  background: #fff;
  font-size: 10px;
  z-index: 3;
}

.readiness-meter {
  width: 96px;
  min-height: 58px;
  padding: 8px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-muted);
  text-align: center;
}

.readiness-meter span {
  display: block;
  font-weight: 800;
  color: var(--teal-dark);
}

.readiness-meter small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.assistant-insight {
  margin: 8px 14px 0;
  padding: 8px 10px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfa;
}

.assistant-insight strong {
  display: block;
  margin-top: 2px;
  font-size: 14px;
}

.compact-insight {
  min-height: 46px;
}

.compact-insight > strong {
  flex: 1;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: var(--text);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-readiness {
  width: 78px;
  display: grid;
  gap: 4px;
  flex: 0 0 auto;
}

.mini-readiness span {
  color: var(--teal-dark);
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
}

.mini-readiness-track {
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--ink-soft);
}

.mini-readiness-track div {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: var(--teal);
  transition: width 0.2s ease;
}

.model-strip {
  margin: 8px 18px 0;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-muted);
}

.model-strip strong {
  display: block;
  font-size: 13px;
}

.label,
.eyebrow {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.assistant-terminal {
  flex: 1 1 auto;
  min-height: 160px;
  height: var(--assistant-terminal-height, auto);
  margin: 8px 14px 10px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfa;
}

.terminal-toolbar {
  min-height: 36px;
  flex-shrink: 0;
  flex-wrap: wrap;
  row-gap: 4px;
  padding: 6px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.conversation {
  flex: 1 1 auto;
  min-height: 0;
  padding: 18px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.assistant-resizer {
  height: 13px;
  min-height: 13px;
  padding: 0;
  border: 0;
  border-top: 1px solid var(--line);
  background: #fff;
  cursor: ns-resize;
}

.assistant-resizer span {
  display: block;
  width: 42px;
  height: 3px;
  margin: 4px auto;
  border-radius: 999px;
  background: var(--line-strong);
}

.assistant-resizer:hover span {
  background: var(--teal);
}

.message {
  max-width: 86%;
  margin-bottom: 12px;
  padding: 11px 12px;
  border-radius: 8px;
  font-size: 14px;
}

.message.assistant {
  background: var(--surface-muted);
  border: 1px solid var(--line);
}

.message.user {
  margin-left: auto;
  background: var(--teal);
  color: #fff;
}

.message .message-title {
  display: block;
  margin-bottom: 4px;
  font-weight: 800;
}

.quick-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 0 18px 10px;
}

.quick-actions button {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
}

.quick-actions button:hover,
.secondary-button:hover,
.tab-button:hover,
.text-button:hover {
  border-color: var(--teal);
  color: var(--teal-dark);
}

.form-section .secondary-button:hover,
.billing-panel .secondary-button:hover {
  border-color: var(--section-accent);
  color: var(--section-ink);
}

.assistant-input {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding: 10px 18px 12px;
  border-top: 1px solid var(--line);
}

.assistant-input input,
.field input,
.field textarea,
.field select {
  width: 100%;
  border: 1px solid rgba(17, 19, 21, 0.12);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
  outline: none;
}

.assistant-input input {
  min-width: 0;
  height: 42px;
  padding: 0 12px;
}

.assistant-input input:focus,
.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: rgba(13, 118, 111, 0.72);
  box-shadow: 0 0 0 4px rgba(13, 118, 111, 0.12);
}

.primary-button,
.secondary-button,
.text-button,
.icon-button {
  border-radius: 10px;
  border: 1px solid transparent;
  min-height: 38px;
  padding: 0 13px;
  font-weight: 680;
}

.primary-button {
  background: var(--text);
  color: #fff;
  border-color: var(--text);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.18) inset;
}

.primary-button:hover {
  background: #000;
}

.primary-button.submit-ready {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}

.primary-button.submit-ready:hover {
  background: #17643f;
  border-color: #17643f;
}

.primary-button.submit-warning {
  background: var(--amber);
  border-color: var(--amber);
  color: #fff;
}

.primary-button.submit-warning:hover {
  background: #955700;
  border-color: #955700;
}

.primary-button.submit-neutral {
  background: #8f9d9a;
  border-color: #8f9d9a;
  color: #fff;
}

.primary-button:disabled {
  cursor: not-allowed;
  background: #9eb5b0;
  border-color: #9eb5b0;
}

.secondary-button {
  background: #fff;
  color: var(--text);
  border-color: rgba(17, 19, 21, 0.12);
  box-shadow: var(--shadow-soft);
}

.secondary-button:disabled {
  cursor: not-allowed;
  background: #eef1f0;
  border-color: rgba(17, 19, 21, 0.08);
  box-shadow: none;
  color: #9aa4a1;
}

.text-button {
  background: transparent;
  color: var(--teal-dark);
  border-color: var(--line);
}

.icon-button {
  width: 36px;
  height: 36px;
  min-height: 36px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  flex: 0 0 36px;
  background: #fff;
  border-color: var(--line);
  font-family: Arial, sans-serif;
  font-size: 20px;
  line-height: 1;
}

.compact {
  min-height: 42px;
}

.full {
  width: 100%;
}

.project-pane {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.project-head {
  padding: 12px 16px 10px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "title round"
    "metrics metrics";
  align-items: start;
  gap: 8px 12px;
  border-bottom: 1px solid var(--line);
}

.project-head > div:first-child {
  grid-area: title;
  min-width: 0;
}

.project-head h2 {
  margin-top: 2px;
  font-size: 21px;
  font-weight: 720;
  line-height: 1.12;
}

.round-switcher {
  grid-area: round;
  min-width: 0;
  width: auto;
  display: grid;
  grid-template-columns: minmax(190px, 230px) minmax(108px, auto) minmax(112px, auto);
  gap: 8px;
  align-items: center;
  justify-self: end;
}

.round-switcher select {
  width: 100%;
  height: 38px;
  padding: 0 36px 0 12px;
  border: 1px solid rgba(17, 19, 21, 0.12);
  border-radius: 10px;
  background-color: #fff;
  color: var(--text);
  outline: none;
}

.round-controls {
  display: contents;
}

.round-controls .secondary-button {
  min-height: 38px;
  width: 100%;
  padding: 0 8px;
  white-space: nowrap;
}

.round-switcher select:disabled {
  color: var(--muted);
  background-color: var(--surface-muted);
}

.project-metrics {
  grid-area: metrics;
  display: grid;
  grid-template-columns: repeat(4, minmax(86px, 1fr));
  gap: 8px;
}

.project-metrics div {
  min-height: 40px;
  padding: 6px 9px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border: 1px solid rgba(17, 19, 21, 0.08);
  border-radius: 10px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.project-metrics span {
  color: var(--text);
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  font-weight: 760;
  white-space: nowrap;
}

/* 标签必须能折行：英文的「This round's estimated charge」比中文的「本轮预计扣费」
   长三倍，nowrap 会直接从卡片里溢出去压到隔壁。数值那一侧仍然 nowrap —— 它短，
   而且断行的数字没法看。 */
.project-metrics small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 620;
  min-width: 0;
  text-align: right;
  text-wrap: balance;
}

.workflow-strip {
  padding: 8px 16px;
  display: grid;
  grid-template-columns: auto 1fr auto 1fr auto 1fr auto 1fr auto;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid rgba(17, 19, 21, 0.08);
}

.workflow-step {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #8a9390;
  font-size: 11px;
  font-weight: 720;
  white-space: nowrap;
}

.workflow-step span {
  width: 22px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(17, 19, 21, 0.14);
  background: #fff;
  font-weight: 800;
  color: #8a9390;
}

.workflow-step.active {
  color: #4f5755;
}

.workflow-step.active span {
  border-color: #c9d0cd;
  background: #eef1f0;
  color: #39413f;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.68);
}

.workflow-step.done {
  color: var(--teal-dark);
}

.workflow-step.done span {
  border-color: var(--teal);
  background: var(--teal);
  color: #fff;
}

.workflow-line {
  height: 1px;
  background: #dfe4e2;
}

.workflow-line.done {
  background: rgba(13, 118, 111, 0.58);
}

.tabs {
  padding: 0 16px;
  display: flex;
  gap: 6px;
  border-bottom: 1px solid rgba(17, 19, 21, 0.08);
}

.tab-button {
  min-height: 40px;
  padding: 0 12px;
  background: transparent;
  border: 0;
  border-bottom: 3px solid transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 680;
  white-space: nowrap;
}

.tab-button.active {
  color: var(--text);
  border-bottom-color: var(--text);
}

.tab-panels {
  flex: 1;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-gutter: stable;
}

.tab-panel {
  min-height: 100%;
  display: none;
  overflow: visible;
  padding: 14px 16px 18px;
}

.tab-panel.active {
  display: block;
}

#inputPanel {
  overflow: visible;
}

.overview-layout {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.overview-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

.overview-kpis div {
  min-height: 86px;
  padding: 14px;
  display: grid;
  align-content: center;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.overview-kpis span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.overview-kpis strong {
  font-size: 24px;
  color: var(--teal-dark);
}

.overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  align-items: stretch;
  min-width: 0;
}

.overview-chart canvas {
  display: block;
  max-width: 100%;
  width: 100%;
  height: 280px;
}

.history-panel {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.history-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
}

.history-item {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfa;
}

.history-item strong,
.history-item span {
  display: block;
  overflow-wrap: anywhere;
}

.history-item strong {
  font-size: 13px;
}

.history-item span,
.empty-history {
  color: var(--muted);
  font-size: 12px;
}

.input-grid {
  height: auto;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.round-input-summary {
  margin-bottom: 14px;
  padding: 10px 12px;
  display: grid;
  gap: 6px;
  border: 1px solid rgba(17, 19, 21, 0.08);
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.round-summary-main {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.round-input-summary strong {
  white-space: nowrap;
}

.round-input-summary span {
  min-width: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.38;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
}

.input-snapshot {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.input-snapshot div {
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfa;
}

.input-snapshot small,
.input-snapshot b {
  display: block;
}

.input-snapshot small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 720;
}

.input-snapshot b {
  margin-top: 2px;
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  font-weight: 720;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.evo-form {
  min-height: 0;
  display: grid;
  gap: 14px;
  align-content: start;
  overflow-x: hidden;
  overflow-y: visible;
  padding-right: 0;
}

.evo-form > * {
  min-width: 0;
}

#mutationEvaluationSection {
  order: 10;
}

#dataComputeSection {
  display: grid;
  gap: 12px;
}

#dataComputeSection > .section-title {
  order: 1;
  margin-bottom: 0;
}

#dataComputeSection > .choice-grid {
  order: 2;
}

#coldStartCard {
  order: 3;
}

#mutationDataCard {
  order: 4;
}

#dataComputeSection > .model-config-card {
  order: 5;
  margin-bottom: 0;
}

.evo-form.readonly .form-section {
  background: #fbfcfa;
}

.evo-form.readonly input:disabled,
.evo-form.readonly textarea:disabled,
.evo-form.readonly select:disabled {
  color: var(--text);
  opacity: 1;
  -webkit-text-fill-color: var(--text);
  background: var(--surface-muted);
}

.form-section,
.billing-panel,
.result-section,
.compute-engine-panel,
.chart-box,
.run-status,
.report-block,
.report-cover {
  min-width: 0;
  border: 1px solid var(--section-border, rgba(17, 19, 21, 0.08));
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9) 0%, #fff 42%),
    linear-gradient(135deg, var(--section-tint, rgba(255, 255, 255, 0)) 0%, #fff 58%, #fff 100%);
  box-shadow: var(--shadow-soft);
}

.form-section,
.billing-panel {
  --section-accent: var(--teal);
  --section-border: rgba(17, 19, 21, 0.08);
  --section-tint: rgba(16, 122, 110, 0.035);
  --section-soft: rgba(16, 122, 110, 0.08);
  --section-ink: var(--teal-dark);
  --section-focus: rgba(16, 122, 110, 0.13);
  --section-card-tint: rgba(16, 122, 110, 0.025);
  position: relative;
}

.form-section::before,
.billing-panel::before {
  content: "";
  position: absolute;
  top: 10px;
  bottom: 10px;
  left: 3px;
  width: 4px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--section-accent), var(--section-ink));
  opacity: 0.66;
  pointer-events: none;
}

#projectInfoSection {
  --section-accent: #0f7a70;
  --section-border: rgba(15, 122, 112, 0.15);
  --section-tint: rgba(15, 122, 112, 0.055);
  --section-soft: rgba(15, 122, 112, 0.1);
  --section-ink: #0a514d;
  --section-focus: rgba(15, 122, 112, 0.14);
  --section-card-tint: rgba(15, 122, 112, 0.035);
}

#objectiveSection {
  --section-accent: #6b76cf;
  --section-border: rgba(107, 118, 207, 0.16);
  --section-tint: rgba(107, 118, 207, 0.06);
  --section-soft: rgba(107, 118, 207, 0.11);
  --section-ink: #3f488f;
  --section-focus: rgba(107, 118, 207, 0.16);
  --section-card-tint: rgba(107, 118, 207, 0.04);
}

#dataComputeSection {
  --section-accent: #357a9a;
  --section-border: rgba(53, 122, 154, 0.16);
  --section-tint: rgba(53, 122, 154, 0.055);
  --section-soft: rgba(53, 122, 154, 0.1);
  --section-ink: #245f79;
  --section-focus: rgba(53, 122, 154, 0.15);
  --section-card-tint: rgba(53, 122, 154, 0.035);
}

#mutationEvaluationSection {
  --section-accent: #8a6a2d;
  --section-border: rgba(138, 106, 45, 0.16);
  --section-tint: rgba(138, 106, 45, 0.055);
  --section-soft: rgba(138, 106, 45, 0.1);
  --section-ink: #624a1f;
  --section-focus: rgba(138, 106, 45, 0.14);
  --section-card-tint: rgba(138, 106, 45, 0.035);
}

.billing-panel {
  --section-accent: #2f7d52;
  --section-border: rgba(47, 125, 82, 0.16);
  --section-tint: rgba(47, 125, 82, 0.055);
  --section-soft: rgba(47, 125, 82, 0.1);
  --section-ink: #1e6642;
  --section-focus: rgba(47, 125, 82, 0.15);
  --section-card-tint: rgba(47, 125, 82, 0.035);
}

.form-section,
.billing-panel,
.result-section,
.compute-engine-panel,
.chart-box,
.run-status,
.report-block {
  padding: 16px;
}

.section-title {
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.section-title h3,
.report-block h4 {
  margin: 0;
  font-weight: 720;
}

.form-section > .section-title h3,
.billing-panel > .section-title h3 {
  font-size: 18px;
  line-height: 1.22;
  font-weight: 760;
  letter-spacing: 0;
}

.section-title span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.form-section > .section-title > span,
.billing-panel > .section-title > span {
  padding: 3px 8px;
  border: 1px solid var(--section-border);
  border-radius: 999px;
  background: var(--section-soft);
  color: var(--section-ink);
}

.compact-title {
  margin-bottom: 8px;
}

.field-grid {
  display: grid;
  gap: 12px;
}

.field-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.field-grid.one {
  grid-template-columns: minmax(0, 1fr);
}

.field-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.field {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
}

.field span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 660;
}

.field input,
.field select {
  height: 40px;
}

.field input {
  padding: 0 10px;
}

.field select {
  padding: 0 38px 0 10px;
}

.field select,
.round-switcher select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2714%27%20height%3D%2714%27%20viewBox%3D%270%200%2014%2014%27%20fill%3D%27none%27%20xmlns%3D%27http%3A//www.w3.org/2000/svg%27%3E%3Cpath%20d%3D%27M3.5%205.25L7%208.75L10.5%205.25%27%20stroke%3D%27%2366717B%27%20stroke-width%3D%271.7%27%20stroke-linecap%3D%27round%27%20stroke-linejoin%3D%27round%27/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 14px 14px;
}

.field textarea {
  min-height: 88px;
  padding: 10px;
  resize: vertical;
}

.field.invalid input,
.field.invalid textarea,
.field.invalid select {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(184, 59, 59, 0.12);
}

.form-section .field input:focus,
.form-section .field textarea:focus,
.form-section .field select:focus,
.billing-panel .field input:focus,
.billing-panel .field textarea:focus,
.billing-panel .field select:focus {
  border-color: var(--section-accent);
  box-shadow: 0 0 0 4px var(--section-focus);
}

.constraint-table-card.invalid,
.mutation-data-card.invalid,
.readout-config.invalid,
.cold-start-card.invalid {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(184, 59, 59, 0.12);
}

.sequence-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  align-items: stretch;
  min-width: 0;
}

.sequence-summary > * {
  min-width: 0;
}

.mutation-map-panel {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.sequence-summary canvas {
  display: block;
  width: 100%;
  max-width: 100%;
  height: 120px;
  border: 1px solid rgba(17, 19, 21, 0.08);
  border-radius: 12px;
  background: #fafafa;
  cursor: ew-resize;
  touch-action: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86), 0 10px 24px rgba(20, 36, 32, 0.05);
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease;
}

.sequence-summary canvas:hover,
.sequence-summary canvas.is-dragging {
  border-color: var(--section-accent, rgba(34, 124, 112, 0.36));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.92), 0 12px 28px var(--section-focus, rgba(20, 104, 92, 0.1));
}

.sequence-summary canvas.is-dragging {
  cursor: grabbing;
  transform: translateY(-1px);
}

.mutation-map-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.mutation-sequence-view {
  display: grid;
  gap: 6px;
  padding: 10px 12px;
  border: 1px solid rgba(17, 19, 21, 0.08);
  border-radius: 12px;
  background: #fafafa;
  max-height: 200px;
  overflow-y: auto;
  color: var(--muted);
  font-size: 13px;
}

/* ruler 和 row 各是一整行 60 个定宽格子；两个都设 wrap 的话，容器一旦不够宽，
   两行会各自换行、换行点却对不上同一屏——标尺就飘到字母上面去了。改成 nowrap，
   一行装不下就横向滚，ruler 跟 row 一起滚，永远对齐。 */
.mutation-sequence-block {
  margin-bottom: 12px;
}

/* 横向滚动条必须挂在这层单独的 wrapper 上，不能直接放 .mutation-sequence-block：
   block 是 .mutation-sequence-view（display:grid）的直接子项，overflow-x:auto
   摆在 grid item 上会被 CSS 规范隐式改写成 overflow-y:auto，grid 的行高算法
   再把这一整块压扁到几像素高，字母全部被裁掉只剩标尺数字露头——踩过这个坑。 */
.mutation-sequence-scroll {
  overflow-x: auto;
}

.mutation-sequence-ruler {
  display: flex;
  flex-wrap: nowrap;
  gap: 1px;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 12px;
  color: #66717b;
  line-height: 1.4;
  margin-bottom: 4px;
}

/* 宽度跟 .residue 保持一致（写死 px，不用 em）：两行字号不同，只有固定列宽才能对齐；
   数字可能是 1-3 位，超出列宽就往右溢出——反正右边的格子在数字出现的位置都是空的，
   视觉上不会跟别的数字重叠。 */
.mutation-sequence-mark-cell {
  display: inline-block;
  width: 20px;
  flex: 0 0 auto;
  white-space: nowrap;
  overflow: visible;
}

.mutation-sequence-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: baseline;
  gap: 1px;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 16px;
  line-height: 2.2;
}

.residue {
  display: inline-block;
  width: 20px;
  flex: 0 0 auto;
  text-align: center;
  color: #1f2a33;
  border-radius: 2px;
}

.residue--selected {
  background: rgba(47, 168, 148, 0.28);
}

.residue--mutated {
  font-weight: 700;
  color: #b7791f;
  text-decoration: underline;
  text-decoration-color: #b7791f;
  text-decoration-thickness: 2px;
}

.mutation-sequence-warning {
  margin: 4px 0 0;
  padding: 8px 12px;
  border-left: 3px solid #b7791f;
  background: #fdf6e7;
  color: #5c4a17;
  font-size: 12px;
  line-height: 1.5;
}

.mutation-library-card {
  padding: 12px;
  display: grid;
  grid-template-columns: minmax(84px, 0.12fr) minmax(170px, 0.2fr) minmax(220px, 0.28fr) minmax(160px, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--section-border, rgba(17, 19, 21, 0.08));
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.4)),
    var(--section-card-tint, var(--surface-muted));
}

.library-length {
  display: grid;
  gap: 3px;
  align-content: center;
}

.library-length strong {
  font-size: 22px;
  line-height: 1.05;
}

.sequence-summary span,
.library-input span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.library-toggle {
  display: grid;
  gap: 7px;
  align-content: center;
}

.library-toggle label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text);
  font-size: 12px;
  font-weight: 680;
}

.library-input {
  display: grid;
  gap: 5px;
  align-self: center;
}

.library-input span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 720;
  letter-spacing: 0.02em;
}

.library-input input {
  width: 100%;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid rgba(17, 19, 21, 0.1);
  border-radius: 9px;
  background: #fff;
  color: var(--text);
  font-size: 12px;
  font-weight: 650;
  outline: none;
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease;
}

.library-input input:focus {
  border-color: var(--section-accent, rgba(34, 124, 112, 0.48));
  box-shadow: 0 0 0 3px var(--section-focus, rgba(34, 124, 112, 0.12));
}

.library-input input::placeholder {
  color: rgba(102, 113, 123, 0.74);
}

.library-status {
  min-height: 34px;
  padding: 8px;
  border: 1px solid var(--section-border, var(--line));
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  align-self: center;
}

.library-actions {
  display: flex;
  justify-content: flex-start;
  align-self: center;
}

#clearMutationLibraryBtn:disabled {
  cursor: not-allowed;
  border-color: rgba(17, 19, 21, 0.08);
  background: rgba(17, 19, 21, 0.04);
  color: rgba(102, 113, 123, 0.52);
}

.choice-grid,
.objective-grid {
  margin-bottom: 12px;
  display: grid;
  gap: 8px;
}

.choice-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.objective-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.choice-card,
.objective-option {
  min-height: 42px;
  padding: 0 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(17, 19, 21, 0.08);
  border-radius: 10px;
  background: #fff;
  font-weight: 660;
  color: var(--text);
}

.choice-card {
  min-height: 86px;
  padding: 12px;
  align-items: flex-start;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas:
    "input title"
    "input text";
  align-content: center;
}

.choice-card input {
  grid-area: input;
  margin-top: 3px;
}

.choice-card strong {
  grid-area: title;
  line-height: 1.1;
}

.choice-card span {
  grid-area: text;
  color: var(--muted);
  font-size: 12px;
  font-weight: 520;
}

.form-section .choice-card input,
.form-section .objective-option input {
  accent-color: var(--section-accent, var(--teal));
}

.choice-card:has(input:checked),
.objective-option:has(input:checked) {
  border-color: var(--section-accent, var(--teal));
  background: var(--section-soft, var(--green-soft));
  color: var(--section-ink, var(--teal-dark));
  box-shadow: inset 0 0 0 1px var(--section-focus, rgba(13, 118, 111, 0.12));
}

.choice-card.checked,
.objective-option.checked {
  border-color: var(--section-accent, var(--teal));
  background: var(--section-soft, var(--green-soft));
  color: var(--section-ink, var(--teal-dark));
  box-shadow: inset 0 0 0 1px var(--section-focus, rgba(13, 118, 111, 0.12));
}

.secondary-objectives.disabled {
  opacity: 0.52;
}

.secondary-objectives.disabled .objective-option {
  background: var(--surface-muted);
}

.is-hidden {
  display: none !important;
}

.objective-helper {
  margin: -2px 0 12px;
  padding: 10px 12px;
  border: 1px solid var(--section-border, var(--line));
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.76), #fff 74%),
    var(--section-card-tint, #fbfcfa);
  color: var(--muted);
  font-size: 13px;
}

.readout-config {
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid var(--section-border, var(--line));
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.76), #fff 74%),
    var(--section-card-tint, #fbfcfa);
}

.readout-config .compact-title {
  margin-bottom: 8px;
}

.readout-config .field-grid {
  margin-bottom: 0;
  grid-template-columns: minmax(150px, 0.55fr) minmax(220px, 1fr);
  gap: 10px;
  align-items: end;
}

.readout-common-grid .readout-priority {
  grid-column: auto;
}

.readout-config h3 {
  font-size: 14px;
}

.readout-config .field {
  margin-bottom: 0;
}

.readout-definition-toolbar {
  margin-top: 10px;
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 13px;
}

.readout-definition-list {
  margin-top: 10px;
  display: grid;
  gap: 10px;
}

.readout-definition-card {
  padding: 10px;
  display: grid;
  grid-template-columns: minmax(136px, 0.85fr) minmax(180px, 1.2fr) repeat(2, minmax(92px, 0.7fr));
  column-gap: 8px;
  row-gap: 10px;
  align-items: end;
  border: 1px solid var(--section-border, rgba(18, 32, 38, 0.1));
  border-radius: 10px;
  background: #fff;
}

.readout-definition-card .field span {
  margin-bottom: 5px;
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.readout-definition-card .field {
  margin: 0;
}

.readout-definition-actions {
  grid-column: 3 / -1;
  grid-row: 2;
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.readout-primary-toggle {
  min-height: 36px;
  padding: 0 10px;
  display: inline-flex;
  gap: 7px;
  align-items: center;
  border: 1px solid var(--section-border, var(--line));
  border-radius: 9px;
  color: var(--section-ink, var(--text));
  font-size: 13px;
  font-weight: 760;
}

.readout-primary-toggle input {
  width: 16px;
  height: 16px;
  accent-color: var(--section-accent, var(--teal));
}

.readout-delete-button {
  width: auto;
  min-width: 52px;
  height: 36px;
  padding: 0 12px;
}

.mutation-evaluation-block {
  padding: 12px;
  border: 1px solid var(--section-border, var(--line));
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.76), #fff 74%),
    var(--section-card-tint, #fbfcfa);
}

.developability-matrix {
  display: grid;
  gap: 6px;
}

.developability-header,
.developability-row {
  display: grid;
  grid-template-columns: minmax(164px, 0.82fr) minmax(280px, 1.8fr);
  gap: 12px;
  align-items: center;
}

.developability-header {
  padding: 0 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.developability-header span:first-child {
  grid-column: 1;
}

.developability-row {
  min-height: 50px;
  padding: 8px 10px;
  border: 1px solid var(--section-border, rgba(17, 19, 21, 0.08));
  border-radius: 10px;
  background: #fff;
}

.developability-row.is-selected {
  border-color: var(--section-accent, var(--teal));
  background: var(--section-soft, var(--green-soft));
}

.developability-property-toggle {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.developability-property-toggle input {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  accent-color: var(--section-accent, var(--teal));
}

.developability-property {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.developability-property strong {
  font-size: 13px;
  font-weight: 780;
  line-height: 1.15;
}

.developability-property small {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  font-weight: 560;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.developability-methods {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.developability-row:not(.is-selected) .developability-methods {
  opacity: 0.82;
}

.developability-method {
  position: relative;
  max-width: 150px;
  min-width: 0;
}

.developability-method input {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
}

.developability-method > span {
  display: block;
  max-width: 150px;
  overflow: hidden;
  padding: 4px 7px;
  border: 1px solid var(--section-border, rgba(17, 19, 21, 0.08));
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.74);
  color: var(--section-ink, var(--text));
  font-size: 11px;
  font-weight: 650;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.developability-method.is-selected > span,
.developability-method:has(input:checked) > span {
  border-color: var(--section-accent, rgba(34, 124, 112, 0.55));
  background: var(--section-soft, #e3f1ed);
  color: var(--section-ink, var(--teal-dark));
  box-shadow: inset 0 0 0 1px var(--section-focus, rgba(34, 124, 112, 0.12));
}

.readout-config.single-readout .readout-delete-button {
  opacity: 0.4;
  pointer-events: none;
}

.legacy-readout-fields {
  display: none;
}

.constraint-predictor-block,
.constraint-table-card,
.mutation-data-card,
.cold-start-card {
  min-width: 0;
  margin-bottom: 12px;
}

.constraint-table-card,
.mutation-data-card,
.cold-start-card {
  padding: 12px;
  border: 1px solid var(--section-border, var(--line));
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.76), #fff 74%),
    var(--section-card-tint, #fbfcfa);
}

.constraint-predictor-block .compact-title,
.constraint-table-card .compact-title,
.mutation-data-card .compact-title,
.cold-start-card .compact-title {
  margin-bottom: 8px;
}

.mutation-data-card .compact-title span.warning {
  color: #a96508;
}

.constraint-predictor-block h3,
.constraint-table-card h3,
.mutation-data-card h3,
.cold-start-card h3 {
  font-size: 14px;
}

.model-config-card {
  margin-bottom: 12px;
  padding: 12px;
  display: grid;
  gap: 12px;
  border: 1px solid var(--section-border, var(--line));
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.76), #fff 74%),
    var(--section-card-tint, #fbfcfa);
}

.model-config-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.model-config-card .field {
  margin-bottom: 0;
}

.cold-start-options {
  margin: 0;
  grid-template-columns: repeat(5, minmax(92px, 1fr));
  gap: 8px;
}

.cold-start-options .objective-option {
  min-height: 38px;
  padding: 0 10px;
  justify-content: flex-start;
  border-radius: 9px;
  font-size: 13px;
}

.cold-start-options .objective-option input {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  accent-color: var(--section-accent, var(--teal));
}

.cold-start-routing {
  margin-top: 10px;
}

.model-section-label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 660;
}

.embedding-field {
  display: grid;
  gap: 8px;
}

.embedding-options {
  margin: 0;
  grid-template-columns: repeat(5, minmax(104px, 1fr));
  gap: 8px;
}

.embedding-options .objective-option {
  min-height: 38px;
  padding: 0 10px;
  justify-content: flex-start;
  border-radius: 9px;
  font-size: 13px;
}

.embedding-options .objective-option input {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  accent-color: var(--section-accent, var(--teal));
}

.embedding-options .objective-option span {
  min-width: 0;
  overflow: hidden;
  color: inherit;
  font-size: 13px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compact-table table {
  min-width: 620px;
}

.compact-table,
.wet-lab-table-wrap {
  overflow-x: auto;
}

.constraint-rule-grid {
  display: grid;
  gap: 8px;
}

.constraint-rule-row {
  min-width: 0;
  min-height: 42px;
  padding: 8px 10px;
  display: grid;
  grid-template-columns: minmax(120px, 0.22fr) minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  border: 1px solid var(--section-border, rgba(17, 19, 21, 0.08));
  border-radius: 10px;
  background: #fff;
}

.constraint-rule-row > span {
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.constraint-rule-row input,
.constraint-rule-row select,
.mutation-data-table input {
  width: 100%;
  min-width: 0;
  height: 34px;
  padding: 0 8px;
  border: 1px solid rgba(17, 19, 21, 0.12);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font-size: 12px;
}

.constraint-rule-row input:focus,
.constraint-rule-row select:focus,
.mutation-data-table input:focus {
  border-color: var(--section-accent, var(--teal));
  box-shadow: 0 0 0 3px var(--section-focus, rgba(13, 118, 111, 0.12));
  outline: none;
}

.mutation-depth-options {
  display: grid;
  grid-template-columns: repeat(4, minmax(72px, 1fr));
  gap: 6px;
}

.mutation-depth-options .objective-option {
  min-height: 34px;
  padding: 0 8px;
  border-radius: 8px;
  font-size: 12px;
}

.mutation-depth-options .objective-option input {
  width: 15px;
  height: 15px;
  accent-color: var(--section-accent, var(--teal));
}

.constraint-rule-row input[readonly] {
  background: var(--surface-muted);
  color: var(--muted);
}

.mutation-data-toolbar {
  margin-bottom: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mutation-data-toolbar .secondary-button {
  min-height: 34px;
}

.mutation-data-template-note {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.mutation-data-table {
  min-width: 760px;
  width: 100%;
  table-layout: auto;
}

.mutation-data-table th,
.mutation-data-table td {
  font-size: 12px;
  vertical-align: middle;
}

.mutation-data-table th {
  white-space: nowrap;
}

.mutation-data-table th:nth-child(1),
.mutation-data-table td:nth-child(1) {
  width: 132px;
  min-width: 132px;
}

.mutation-data-table th:nth-child(2),
.mutation-data-table td:nth-child(2) {
  width: 168px;
  min-width: 168px;
}

.mutation-data-table th:nth-child(3),
.mutation-data-table td:nth-child(3) {
  width: 74px;
  min-width: 74px;
}

.mutation-data-table th:last-child,
.mutation-data-table td:last-child {
  width: 190px;
  min-width: 190px;
}

.mutation-data-table th:not(:nth-child(1)):not(:nth-child(2)):not(:nth-child(3)):not(:last-child),
.mutation-data-table td:not(:nth-child(1)):not(:nth-child(2)):not(:nth-child(3)):not(:last-child) {
  min-width: 176px;
}

.mutation-data-round-row td {
  width: auto;
  min-width: 0;
  padding: 8px 10px;
  background: #f4f8f6;
}

.mutation-round-head {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.mutation-round-toggle {
  width: auto;
  min-width: 0;
  min-height: 34px;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 auto;
  border: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.mutation-round-toggle strong {
  flex: 0 0 auto;
  font-size: 13px;
  font-weight: 780;
}

.mutation-round-toggle small {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mutation-round-chevron {
  width: 16px;
  color: var(--teal-strong);
  font-size: 13px;
  line-height: 1;
  text-align: center;
}

.mutation-data-record-row.is-collapsed {
  display: none;
}

.mutation-data-record-row.is-wild-type td {
  background: rgba(16, 122, 110, 0.045);
}

.mutation-data-record-row.is-wild-type input {
  border-color: rgba(16, 122, 110, 0.18);
  background: rgba(255, 255, 255, 0.82);
}

.round-wt-copy-button {
  min-height: 28px;
  padding: 0 10px;
  flex: 0 0 auto;
  border: 1px solid var(--section-border, rgba(16, 122, 110, 0.18));
  border-radius: 999px;
  background: #fff;
  color: var(--section-ink, var(--teal-dark));
  font-size: 11px;
  font-weight: 760;
  cursor: pointer;
}

.round-wt-copy-button:hover {
  border-color: var(--section-accent, rgba(16, 122, 110, 0.42));
  background: var(--section-soft, rgba(16, 122, 110, 0.08));
}

.table-mini-badge {
  margin-left: 6px;
  padding: 2px 5px;
  border-radius: 999px;
  background: rgba(16, 122, 110, 0.1);
  color: var(--teal-strong);
  font-size: 10px;
  font-weight: 760;
  vertical-align: middle;
}

.wet-lab-table-wrap input,
.wet-lab-table-wrap select {
  width: 100%;
  min-width: 0;
  height: 34px;
  padding: 0 8px;
  border: 1px solid rgba(17, 19, 21, 0.12);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font-size: 12px;
}

.wet-lab-table-wrap th {
  white-space: nowrap;
}

.wet-lab-result-table {
  min-width: 960px;
  width: 100%;
  table-layout: auto;
}

.wet-lab-result-table th,
.wet-lab-result-table td {
  font-size: 12px;
  vertical-align: middle;
}

.wet-lab-result-table th:nth-child(1),
.wet-lab-result-table td:nth-child(1) {
  width: 132px;
  min-width: 132px;
}

.wet-lab-result-table th:nth-child(2),
.wet-lab-result-table td:nth-child(2) {
  width: 168px;
  min-width: 168px;
}

.wet-lab-result-table th:nth-child(3),
.wet-lab-result-table td:nth-child(3) {
  width: 74px;
  min-width: 74px;
}

.wet-lab-result-table th:nth-last-child(3),
.wet-lab-result-table td:nth-last-child(3) {
  width: 126px;
  min-width: 126px;
}

.wet-lab-result-table th:nth-last-child(2),
.wet-lab-result-table td:nth-last-child(2) {
  width: 124px;
  min-width: 124px;
}

.wet-lab-result-table th:last-child,
.wet-lab-result-table td:last-child {
  width: 220px;
  min-width: 220px;
}

.wet-lab-result-table th:not(:nth-child(1)):not(:nth-child(2)):not(:nth-child(3)):not(:nth-last-child(3)):not(:nth-last-child(2)):not(:last-child),
.wet-lab-result-table td:not(:nth-child(1)):not(:nth-child(2)):not(:nth-child(3)):not(:nth-last-child(3)):not(:nth-last-child(2)):not(:last-child) {
  min-width: 176px;
}

.wet-lab-control-row td {
  background: rgba(16, 122, 110, 0.06);
}

.wet-lab-control-row input[readonly] {
  color: var(--teal-strong);
  font-weight: 760;
}

.table-actions {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-start;
}

.hidden-field {
  display: none;
}

.billing-panel {
  padding: 14px;
  height: auto;
  min-height: 0;
  position: static;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 220px);
  gap: 10px;
  overflow: visible;
}

.billing-panel .compact-title {
  grid-column: 1 / -1;
  align-self: center;
  margin-bottom: 0;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(17, 19, 21, 0.08);
}

.billing-panel .compact-title h3 {
  font-size: 18px;
  line-height: 1.22;
  font-weight: 760;
}

#billingState {
  padding: 2px 7px;
  border-radius: 999px;
  border: 1px solid var(--section-border);
  background: var(--section-soft);
  color: var(--section-ink);
  font-size: 11px;
}

.billing-scroll {
  grid-column: 1 / -1;
  min-height: 0;
  overflow: visible;
  padding-right: 0;
  display: grid;
  grid-template-columns: minmax(240px, 0.28fr) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.billing-summary,
.billing-detail {
  min-width: 0;
  display: grid;
  gap: 10px;
}

.billing-detail {
  grid-template-columns: minmax(0, 1fr);
}

.compute-engine-panel {
  display: grid;
  gap: 12px;
}

.compute-engine-state {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 720;
}

.compute-engine-state strong {
  color: var(--text);
  font-size: 13px;
}

.compute-engine-state small {
  margin-left: auto;
  color: var(--muted);
  font-size: 12px;
  font-weight: 720;
}

.compute-engine-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.compute-engine-metrics div {
  min-height: 58px;
  padding: 10px;
  display: grid;
  gap: 2px;
  align-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfa;
}

.compute-engine-metrics span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 720;
}

.compute-engine-metrics strong {
  color: var(--text);
  font-size: 16px;
  font-variant-numeric: tabular-nums;
  font-weight: 760;
}

.compute-table-wrap table {
  min-width: 620px;
}

.billing-number {
  padding: 14px;
  min-height: 100px;
  align-content: center;
  border: 1px solid var(--section-border);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), #fff 70%),
    var(--section-card-tint);
  display: grid;
  gap: 4px;
}

.billing-number strong {
  color: var(--text);
  font-size: clamp(26px, 2.2vw, 34px);
  font-variant-numeric: tabular-nums;
  font-weight: 760;
  letter-spacing: 0;
  line-height: 1;
}

.billing-number span,
.fine-print {
  color: var(--muted);
  font-size: 13px;
}

.billing-ledger {
  margin-top: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.billing-ledger div {
  min-height: 62px;
  padding: 10px 12px;
  display: grid;
  align-content: center;
  gap: 4px;
  border: 1px solid var(--section-border);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.76), rgba(255, 255, 255, 0.44)),
    var(--section-card-tint);
}

.billing-ledger span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 680;
}

.billing-ledger strong {
  color: var(--text);
  font-size: 18px;
  font-variant-numeric: tabular-nums;
  font-weight: 760;
}

.cost-breakdown,
.modal-breakdown,
.readiness-list {
  margin: 14px 0;
  display: grid;
  gap: 8px;
}

.billing-panel .cost-breakdown {
  margin: 0;
  padding: 14px 16px;
  border: 1px solid var(--section-border);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), #fff 70%),
    var(--section-card-tint);
}

.billing-panel .readiness-list {
  margin: 0;
  align-content: start;
  padding: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border: 1px solid var(--section-border);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), #fff 70%),
    var(--section-card-tint);
}

.billing-panel .cost-breakdown::before,
.billing-panel .readiness-list::before {
  content: "费用构成";
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.billing-panel .readiness-list::before {
  content: "提交检查";
  grid-column: 1 / -1;
}

.billing-panel .primary-button {
  align-self: stretch;
  margin-top: 0;
  min-height: 48px;
  border-radius: 12px;
}

.billing-panel .fine-print {
  margin: 0;
  padding-top: 10px;
}

.billing-panel .check-line {
  min-height: 36px;
  justify-content: flex-start;
  padding: 7px 8px;
  border-radius: 10px;
  background: var(--surface-muted);
}

.billing-panel .check-line.ok {
  background: var(--section-soft);
  color: var(--section-ink);
}

.billing-panel .check-line.missing {
  background: var(--amber-soft);
}

.cost-line,
.check-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
}

.billing-panel .cost-line {
  min-height: 32px;
  padding: 5px 0;
  border-top: 1px solid var(--section-border);
}

.billing-panel .cost-line:first-of-type {
  border-top: 0;
}

.billing-panel .cost-line span {
  min-width: 0;
  padding-right: 16px;
}

.cost-line strong {
  color: var(--text);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.check-line {
  justify-content: flex-start;
}

.check-token {
  width: 18px;
  height: 18px;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid rgba(17, 19, 21, 0.18);
  background: #fff;
  color: var(--muted);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  padding: 0 0 1px;
  text-align: center;
  flex: 0 0 auto;
}

.check-line.ok .check-token {
  border-color: var(--teal);
  background: var(--teal);
  color: #fff;
}

.check-line.missing .check-token {
  border-color: var(--amber);
  background: var(--amber-soft);
  color: var(--amber);
}

.fine-print {
  margin: 12px 0 0;
  padding-top: 12px;
  border-top: 1px solid rgba(17, 19, 21, 0.08);
  line-height: 1.55;
}

.results-layout,
.report-layout {
  display: grid;
  gap: 14px;
}

.run-status {
  display: grid;
  grid-template-columns: minmax(240px, 300px) 1fr;
  gap: 14px;
  align-items: center;
}

.run-status strong {
  display: block;
  margin-top: 3px;
  word-break: keep-all;
}

.progress-track {
  height: 12px;
  border-radius: 999px;
  background: var(--ink-soft);
  overflow: hidden;
}

.progress-fill {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: var(--blue);
  transition: width 0.25s ease;
}

.table-wrap {
  overflow-x: visible;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.table-wrap.compact-table {
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scrollbar-color: var(--section-accent, var(--line-strong)) transparent;
  scrollbar-width: thin;
}

.table-wrap.wet-lab-table-wrap {
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scrollbar-color: var(--teal) transparent;
  scrollbar-width: thin;
}

.table-wrap.compact-table::-webkit-scrollbar {
  height: 8px;
}

.table-wrap.wet-lab-table-wrap::-webkit-scrollbar {
  height: 8px;
}

.table-wrap.compact-table::-webkit-scrollbar-track {
  background: transparent;
}

.table-wrap.wet-lab-table-wrap::-webkit-scrollbar-track {
  background: transparent;
}

.table-wrap.compact-table::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 999px;
  background-clip: padding-box;
  background-color: var(--section-accent, var(--line-strong));
}

.table-wrap.wet-lab-table-wrap::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 999px;
  background-clip: padding-box;
  background-color: var(--teal);
}

table {
  width: 100%;
  min-width: 0;
  border-collapse: collapse;
  table-layout: fixed;
}

th,
td {
  padding: 11px 10px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  font-size: 14px;
  overflow-wrap: anywhere;
}

th:nth-child(1),
td:nth-child(1) {
  width: 56px;
}

th:nth-child(2),
td:nth-child(2) {
  width: 30%;
}

th:nth-child(3),
td:nth-child(3),
th:nth-child(4),
td:nth-child(4),
th:nth-child(5),
td:nth-child(5) {
  width: 13%;
}

th {
  background: var(--surface-muted);
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

tbody tr:last-child td {
  border-bottom: 0;
}

.empty-cell {
  text-align: center;
  color: var(--muted);
  padding: 32px;
}

.pill {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.pill.green {
  background: var(--green-soft);
  color: var(--green);
}

.pill.amber {
  background: var(--amber-soft);
  color: var(--amber);
}

.pill.blue {
  background: var(--blue-soft);
  color: var(--blue);
}

.chart-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}

.chart-box canvas {
  width: 100%;
  height: 210px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfa;
}

.report-cover {
  padding: 18px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  gap: 16px;
  align-items: stretch;
}

.report-cover p {
  margin: 8px 0 0;
  color: var(--muted);
}

.charge-receipt {
  padding: 14px;
  display: grid;
  gap: 4px;
  align-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-muted);
}

.charge-receipt span,
.charge-receipt small {
  color: var(--muted);
}

.charge-receipt strong {
  color: var(--teal-dark);
  font-size: 24px;
}

.report-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.report-block p,
.report-block ul {
  margin: 8px 0 0;
  color: var(--muted);
}

.report-block ul {
  padding-left: 18px;
}

.download-row {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(18, 25, 31, 0.46);
}

.modal-backdrop.hidden,
.toast.hidden {
  display: none;
}

.hidden {
  display: none;
}

.modal {
  width: min(640px, 100%);
  max-height: min(760px, calc(100vh - 40px));
  overflow-y: auto;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 24px 80px rgba(18, 25, 31, 0.25);
  border: 1px solid var(--line);
}

.modal.small {
  width: min(520px, 100%);
}

.modal.wide {
  width: min(1040px, calc(100vw - 40px));
  overflow-x: hidden;
}

.modal.settings-modal {
  width: min(860px, 100%);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.settings-modal .modal-body {
  min-height: 0;
  overflow-y: auto;
}

.settings-modal .modal-head,
.settings-modal .modal-actions {
  flex: 0 0 auto;
}

.modal-head {
  padding: 18px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  border-bottom: 1px solid var(--line);
}

.modal-head > div {
  min-width: 0;
}

.modal-body {
  padding: 18px;
  min-width: 0;
}

.modal-body p {
  margin: 0 0 14px;
  color: var(--muted);
}

.overview-layout .chart-box,
.overview-layout .result-section,
.overview-layout .table-wrap {
  min-width: 0;
}

.overview-layout .table-wrap {
  overflow-x: auto;
}

.overview-layout table {
  min-width: 680px;
}

.modal-cost {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.modal-cost div {
  min-height: 76px;
  padding: 12px;
  display: grid;
  gap: 4px;
  align-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-muted);
}

.modal-cost span {
  color: var(--muted);
  font-size: 13px;
}

.modal-cost strong {
  font-size: 24px;
  color: var(--teal-dark);
}

.confirm-check {
  margin-top: 12px;
  padding: 12px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfa;
}

.settings-section-title {
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.settings-section {
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.settings-section + .settings-section {
  padding-top: 18px;
}

.settings-section:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.settings-section-title h3 {
  margin: 0;
}

.settings-section-title span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.settings-title-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.settings-inline-actions {
  margin-top: -2px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.settings-inline-actions span {
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 720;
  overflow-wrap: anywhere;
}

.project-manager-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 0.74fr);
  gap: 12px;
}

.project-list {
  min-height: 172px;
  max-height: 260px;
  overflow-y: auto;
  display: grid;
  gap: 8px;
  padding-right: 2px;
  scrollbar-gutter: stable;
}

.project-list-item {
  padding: 12px;
  display: grid;
  gap: 4px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.project-list-item:hover,
.project-list-item.active {
  border-color: var(--teal);
  background: var(--green-soft);
}

.project-list-item strong,
.project-list-item span,
.project-list-item small {
  display: block;
}

.project-list-item span,
.project-list-item small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 560;
}

.project-list-note {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-muted);
  color: var(--muted);
  font-size: 12px;
}

.project-list-note.warning {
  border-color: rgba(181, 106, 0, 0.24);
  background: var(--amber-soft);
  color: var(--amber);
}

.project-actions-panel {
  min-width: 0;
  display: grid;
  gap: 10px;
  align-content: start;
}

.project-action-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.danger-button {
  color: var(--red);
  border-color: rgba(178, 58, 58, 0.24);
}

.danger-button:hover {
  color: var(--red);
  border-color: var(--red);
  background: var(--red-soft);
}

.danger-button:disabled {
  cursor: not-allowed;
  color: var(--muted);
  border-color: var(--line);
  background: var(--surface-muted);
}

.modal-actions {
  padding: 14px 18px 18px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  border-top: 1px solid var(--line);
}

.template-list {
  padding: 18px;
  display: grid;
  gap: 10px;
}

.template-list button {
  padding: 14px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.template-list button:hover {
  border-color: var(--teal);
  background: var(--green-soft);
}

.template-list strong,
.template-list span {
  display: block;
}

.template-list span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.case-template-title {
  margin: 0 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 14px;
}

.case-template-list {
  padding-top: 10px;
}

.case-template-list .case-template-hint {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.case-template-list .case-template-meta {
  color: var(--teal);
  font-size: 12px;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 70;
  max-width: min(420px, calc(100vw - 36px));
  padding: 12px 14px;
  border-radius: 8px;
  background: #1f2a33;
  color: #fff;
  box-shadow: var(--shadow);
}

@media (max-width: 1180px) {
  .app-shell {
    height: auto;
    overflow: visible;
  }

  .topbar {
    grid-template-columns: 1fr;
  }

  .top-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .workspace {
    grid-template-columns: 1fr;
    height: auto;
    overflow: visible;
  }

  .assistant-pane,
  .project-pane {
    min-height: 620px;
  }

  .billing-panel {
    height: auto;
    position: static;
  }

  #inputPanel {
    overflow-y: auto;
  }

  #inputPanel .input-grid,
  .evo-form {
    height: auto;
    overflow: visible;
  }

  .assistant-terminal {
    height: min(420px, 52vh);
  }
}

@media (max-width: 820px) {
  .workspace {
    padding: 10px;
  }

  .project-head,
  .assistant-header,
  .billing-panel,
  .report-cover,
  .run-status {
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .project-head {
    grid-template-areas:
      "title"
      "round"
      "metrics";
  }

  .round-switcher {
    min-width: 0;
    width: 100%;
    justify-self: stretch;
  }

  .project-metrics,
  .input-grid,
  .mutation-library-card,
  .field-grid.two,
  .field-grid.three,
  .model-config-row,
  .choice-grid.two,
  .objective-grid,
  .billing-scroll,
  .chart-grid,
  .report-grid,
  .overview-kpis,
  .overview-grid,
  .compute-engine-metrics,
  .round-controls,
  .input-snapshot,
  .project-manager-layout,
  .project-action-grid,
  .modal-cost {
    grid-template-columns: 1fr;
  }

  .round-switcher {
    grid-template-columns: minmax(180px, 1fr) minmax(96px, auto) minmax(104px, auto);
  }

  .developability-header {
    display: none;
  }

  .developability-row {
    grid-template-columns: 1fr;
    align-items: flex-start;
  }

  .developability-methods {
    grid-column: auto;
  }

  .readout-config .readout-grid {
    grid-template-columns: 1fr;
  }

  .readout-definition-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .readout-definition-card {
    grid-template-columns: 1fr;
  }

  .readout-definition-actions {
    grid-column: auto;
    grid-row: auto;
    justify-content: flex-start;
  }

  .billing-scroll {
    grid-template-columns: 1fr;
  }

  .billing-ledger,
  .billing-panel .readiness-list {
    grid-template-columns: 1fr;
  }

  .embedding-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cold-start-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .constraint-rule-row,
  .mutation-depth-options {
    grid-template-columns: 1fr;
  }

  .billing-number,
  .billing-ledger,
  .billing-panel .cost-breakdown,
  .billing-panel .readiness-list,
  .billing-panel .compact-title,
  .billing-panel .primary-button,
  .billing-panel .fine-print {
    grid-column: auto;
    grid-row: auto;
  }

  .workflow-strip {
    overflow-x: auto;
    grid-template-columns: repeat(9, max-content);
  }

  .table-wrap {
    overflow-x: auto;
  }

  table {
    min-width: 640px;
  }

  .sequence-summary {
    grid-template-columns: 1fr;
  }

  .quick-actions {
    grid-template-columns: 1fr;
  }

  .tabs {
    overflow-x: auto;
  }

  .model-strip {
    flex-direction: column;
    align-items: stretch;
  }

  .round-input-summary {
    align-items: flex-start;
  }

  .round-summary-main {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .round-input-summary strong,
  .round-input-summary span {
    white-space: normal;
  }

  .assistant-terminal {
    height: 380px;
  }
}

@media (max-width: 560px) {
  .round-switcher {
    grid-template-columns: 1fr;
  }

  .round-controls {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }

}

@supports not selector(:has(*)) {
  .choice-card.checked,
  .objective-option.checked {
    border-color: var(--teal);
    background: var(--green-soft);
    color: var(--teal-dark);
  }
}

/* WT FASTA / PDB 上传：kit 冷启动依赖结构文件 */
.structure-field .structure-uploads {
  display: flex;
  gap: 12px;
  margin: 6px 0;
}
.structure-upload {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px 10px;
  border: 1px dashed rgba(148, 163, 184, 0.5);
  border-radius: 8px;
}
.structure-upload em {
  font-style: normal;
  font-size: 12px;
  color: #64748b;
}
.structure-field small {
  color: #64748b;
  font-size: 12px;
}
/* 实测 readout 未回填：显式留白，不用 0 冒充 */
.pending-readout {
  color: #94a3b8;
  font-style: italic;
}

/* 打分无区分度的警示：排名是假的时候必须直说 */
.rank-warning {
  margin: 0 0 12px;
  padding: 10px 14px;
  border-left: 3px solid #b7791f;
  background: #fdf6e7;
  color: #5c4a17;
  font-size: 13px;
  line-height: 1.6;
}
.rank-warning.severe {
  border-left-color: #b83b3b;
  background: #fbeceb;
  color: #6b2420;
}
.rank-warning.hidden {
  display: none;
}

/* kit 里没有对应概念的控件：专家方法（kit 固定 RandomForest）、冷启动器多选、
   可开发性评估模型选择。用户能选但选了没用 —— 先隐藏，别让人以为能配。
   DOM 保留，readForm() 还在读这些元素。
   模型运行模式（single/MoE）和预训练编码模型（3b/15b/ptdit）自 kit 1.0.42 起是真实字段，已放出。 */
.fake-hidden {
  display: none !important;
}
