.protein-studio-root .studio {
  --protein-accent: #128c7e;
  --protein-accent-2: #3457d5;
  --protein-warn: #b7791f;
  --protein-bad: #c24141;
}

.protein-form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
  align-items: start;
}

.protein-textarea {
  min-height: 74px;
  resize: vertical;
  line-height: 1.45;
}

.protein-mono,
.protein-seq-preview,
.protein-align-line,
.protein-report-preview,
.protein-ai-output,
.protein-ai-panel-output {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

.protein-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin: 12px 0;
}

.protein-metric {
  min-height: 74px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--panel) 88%, white 12%);
  padding: 12px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
}

.protein-metric strong {
  font-size: 20px;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.protein-metric span {
  font-size: 12px;
  color: var(--ink-soft);
}

.protein-inline-editor {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  margin-bottom: 10px;
  background: color-mix(in srgb, var(--panel) 92%, white 8%);
}

.protein-seq-preview {
  max-height: 240px;
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.65;
}

.protein-alignment {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--panel);
}

.protein-align-line {
  display: flex;
  align-items: center;
  min-width: max-content;
  margin-bottom: 8px;
}

.protein-align-label {
  width: 42px;
  color: var(--ink-soft);
  font-weight: 700;
  font-size: 12px;
}

.protein-aa {
  width: 20px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-bottom: 2px solid transparent;
  font-size: 12px;
}

.protein-aa.changed {
  color: var(--protein-bad);
  background: rgba(194, 65, 65, 0.1);
  border-bottom-color: var(--protein-bad);
}

.protein-report-preview,
.protein-ai-output,
.protein-ai-panel-output {
  white-space: pre-wrap;
  overflow: auto;
  max-height: 560px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: color-mix(in srgb, var(--panel) 92%, #f7fbff 8%);
  font-size: 12px;
  line-height: 1.55;
}

.protein-ai-panel-output {
  max-height: 320px;
  margin-top: 10px;
}

.protein-studio-root .st-card .st-table {
  font-size: 12px;
}

@media (max-width: 760px) {
  .protein-form-row,
  .protein-metrics {
    grid-template-columns: 1fr;
  }
}
