:root {
  color-scheme: light;
  font-family: Geist, Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #14262a;
  background: #f4f7f7;
  --muted: #566a6e;
  --line: #dbe4e5;
  /* Brand: deep teal and coral, sampled from the OligoAL mark. */
  --accent: #0c2f34;
  --accent-tint: #e8f0f1;
  --highlight: #e5533f;
  --highlight-ink: #bf3e2b;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
[hidden] { display: none !important; }
.top { display: flex; align-items: center; gap: 16px; padding: 13px max(24px, calc((100% - 1320px) / 2)); background: #fff; color: var(--accent); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; line-height: 0; text-decoration: none; }
.brand img { width: auto; height: 29px; display: block; }
.top-divider { width: 1px; align-self: stretch; margin: 2px 0; background: var(--line); }
.product { color: var(--muted); font-size: 13px; }
.top-link { margin-left: auto; color: var(--highlight-ink); font-weight: 600; font-size: 13px; }
main { width: min(1320px, calc(100% - 48px)); margin: 37px auto 26px; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(29px, 4vw, 47px); letter-spacing: -.055em; line-height: 1.05; margin-bottom: 23px; }
h2 { font-size: 19px; letter-spacing: -.025em; }
h3 { font-size: 14px; margin-top: 20px; }
.setup { margin-bottom: 25px; }
.form-grid { display: grid; grid-template-columns: minmax(160px, 330px) minmax(205px, 275px) auto; width: fit-content; max-width: 100%; gap: 12px; align-items: end; }
label { display: grid; gap: 6px; font-weight: 620; font-size: 13px; }
input, select, textarea { min-width: 0; width: 100%; background: #fff; color: inherit; border: 1px solid #c3d2d4; border-radius: 6px; padding: 10px 11px; font: inherit; font-size: 15px; font-weight: 430; }
input, select, #run { height: 43px; }
button, a.secondary { font: inherit; font-size: 13px; font-weight: 640; cursor: pointer; }
#run { background: var(--accent); color: white; border: 1px solid var(--accent); border-radius: 6px; padding: 0 15px; white-space: nowrap; }
#run span { margin-left: 5px; }
#run:disabled { opacity: .6; cursor: wait; }
:focus-visible { outline: 2px solid var(--highlight); outline-offset: 3px; }
details { margin-top: 11px; color: var(--muted); font-size: 13px; }
summary { cursor: pointer; width: fit-content; }
.paste-label { margin: 10px 0 6px; }
textarea { font-family: var(--mono); max-width: 760px; resize: vertical; }
#status { margin-top: 14px; color: var(--muted); font-size: 14px; }
#status.error { color: var(--highlight-ink); }
.workspace { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); align-items: start; gap: 18px; }
.candidates, .detail { min-width: 0; background: #fff; border: 1px solid var(--line); border-radius: 11px; overflow: hidden; }
.section-head { display: flex; align-items: start; justify-content: space-between; gap: 12px; padding: 17px 18px 12px; }
.section-head p { margin-top: 4px; font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.method, .coverage { font-size: 12px; color: var(--muted); padding: 0 18px 13px; line-height: 1.5; }
.coverage { padding-top: 12px; }
.secondary { display: inline-block; border: 1px solid #c7d6d8; background: #fff; color: var(--accent); border-radius: 5px; padding: 6px 9px; text-decoration: none; white-space: nowrap; }
.secondary:hover { background: var(--accent-tint); }
.table-scroll { overflow-x: auto; max-height: 554px; }
table { width: 100%; border-spacing: 0; font-size: 13px; text-align: left; white-space: nowrap; }
th, td { padding: 9px 11px; border-bottom: 1px solid #e9efef; }
th:first-child, td:first-child { padding-left: 17px; }
th:last-child, td:last-child { padding-right: 17px; }
th { color: #3c5257; background: #edf3f3; font-size: 11px; position: sticky; top: 0; z-index: 1; }
th span { display: block; font-weight: 450; color: var(--muted); margin-top: 2px; }
td { font-variant-numeric: tabular-nums; }
tbody tr { cursor: pointer; }
tbody tr:hover, tbody tr.active { background: var(--accent-tint); }
tbody tr.active td:first-child { box-shadow: inset 3px 0 var(--highlight); }
.sequence { font: 600 12px var(--mono); background: none; border: 0; padding: 1px 0; color: var(--accent); letter-spacing: .01em; }
.detail { padding: 0 16px 16px; }
.detail-head { padding: 17px 0 12px; }
.structure-stage { position: relative; background: var(--accent); border-radius: 8px; overflow: hidden; }
canvas { width: 100%; height: 281px; display: block; touch-action: none; cursor: grab; }
canvas:active { cursor: grabbing; }
#viewer-status { color: white; position: absolute; inset: 16px auto auto 16px; font-size: 13px; }
.legend { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; color: #d7e6e8; font-size: 11px; padding: 0 10px 11px; }
.legend span::before { display: inline-block; width: 8px; height: 8px; border-radius: 50%; content: ""; margin-right: 5px; }
.wing::before { background: #6ed9b2; }
.core::before { background: #60a8fa; }
.rna::before { background: #f7ab64; }
.flank::before { background: #8d8f7f; }
.thio::before { background: #ffd9a8; border-radius: 0; transform: rotate(45deg); }
.view-controls { display: flex; gap: 6px; align-items: center; }
.icon-button { font-size: 15px; line-height: 1; padding: 6px 11px; }
.readout { position: absolute; inset: auto auto 12px 14px; margin: 0; color: #eaf4f5; font: 11px/1.4 var(--mono); background: rgba(6, 26, 29, .78); padding: 5px 9px; border-radius: 5px; pointer-events: none; opacity: 0; transition: opacity .12s; max-width: calc(100% - 28px); }
.readout.visible { opacity: 1; }
.structure-note, .footnote { color: var(--muted); font-size: 12px; margin-top: 8px; line-height: 1.45; }
.alignment { font: 11px/1.55 var(--mono); color: #20383c; background: #f1f6f6; padding: 8px; border-radius: 5px; overflow-x: auto; margin: 10px 0; }
.exports { display: flex; gap: 8px; flex-wrap: wrap; }
.candidate-exports { justify-content: flex-end; }
.bench-check { width: 15px; height: 15px; accent-color: var(--accent); }
dl { margin: 7px 0 0; }
.endpoint { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 8px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 12px; }
dt { font-weight: 600; }
dd { margin: 0; font-variant-numeric: tabular-nums; }
dd small { display: block; color: var(--muted); margin-top: 2px; }
.chemistry-detail code { display: block; margin-top: 8px; overflow-wrap: anywhere; }
.footnote { margin-top: 22px; }

@media (max-width: 1020px) {
  .workspace { grid-template-columns: minmax(0, 1fr) minmax(0, .9fr); }
  th, td { padding-left: 8px; padding-right: 8px; }
}
@media (max-width: 780px) {
  main { width: calc(100% - 28px); margin-top: 26px; }
  .workspace { grid-template-columns: minmax(0, 1fr); }
  .table-scroll { max-height: 365px; }
}
@media (max-width: 540px) {
  .form-grid { width: 100%; grid-template-columns: minmax(0, 1fr); }
  #run { justify-self: start; }
  table { font-size: 12px; }
  th, td { padding-inline: 6px; }
  th { white-space: normal; }
  th:first-child, td:first-child { padding-inline-start: 9px; }
  th:last-child, td:last-child { padding-inline-end: 9px; }
  .sequence { font-size: 10px; }
}
