/* Inspect the existing research results in the same place as their controls. */
.sequence-reader,
.context-example {
  color: #173754;
  border-block: 1px solid #c6dbe6;
  padding: 16px 0;
  margin: 14px 0;
  min-width: 0;
}
.sequence-reader[hidden] { display: none; }
.sequence-reader label { color: #193950; font-weight: 600; }
.letter-window {
  display: grid;
  grid-template-columns: repeat(9, minmax(0, 1fr));
  gap: clamp(2px, .45vw, 7px);
  margin: 10px 0;
  max-width: 36rem;
}
.letter-cell {
  display: grid;
  text-align: center;
  padding: 7px 0 4px;
  min-width: 0;
  color: #254963;
  border-block: 1px solid #c4dbe7;
  background: #edf5f8;
}
.letter-cell b,
.context-example strong,
.context-example b,
.library-letter-preview {
  font: 600 1.05rem/1.4 var(--font-mono, ui-monospace, monospace);
}
.letter-cell small { font-size: .65rem; font-variant-numeric: tabular-nums; }
.current-letter { color: white; background: #175998; border-color: #175998; border-radius: 4px; }
.position-control { display: grid; gap: 6px; }
.sequence-editor .position-control input[type=range] {
  width: 100%;
  max-width: 36rem;
  margin: 0;
  padding: 0;
  min-height: 32px;
  accent-color: #175998;
}
.position-control output, .reading-note, .context-example p {
  color: #475c70; font-size: .87rem; line-height: 1.55;
}
.reading-detail { color: #374b60; font-size: .87rem; }
.reading-detail summary { cursor: pointer; color: #255686; padding: 6px 0; width: fit-content; }
.generation-values { font-variant-numeric: tabular-nums; border-collapse: collapse; }
.generation-values :is(td, th) { padding: 5px 14px 5px 0; text-align: left; }
.context-example p { margin: 0 0 8px; }
.context-example strong, .context-example b {
  display: inline-block; color: #184b76; background: #e7f2f6;
  border-radius: 3px; padding: 2px 8px; letter-spacing: .08em;
}
.context-example b { color: white; background: #175998; }
.library-letter-preview {
  display: block;
  color: #19526b; margin: 5px 0; letter-spacing: .09em;
  font-size: .85rem; overflow-wrap: anywhere;
}
.reference-match, .library-card { border-inline-start: 3px solid #72a9bd; }
.runs-table .run-method { color: #174e80; font-weight: 650; }
.runs-table tr:focus-within { background: #eff7fb; }
.saved-run-details dl {
  display: grid;
  grid-template-columns: auto minmax(0,1fr);
  gap: 5px 14px;
  margin: 4px 0 10px;
  white-space: normal;
}
.saved-run-details dd { margin: 0; color: #173754; overflow-wrap: anywhere; }
.sample-inspector { margin: 18px 0; padding: 16px; border: 1px solid #bad3e0; border-radius: 10px; }
.sample-inspector select { width: 100%; max-width: 32rem; }
.sample-comparison { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; margin-top: 14px; }
.sample-comparison > div { padding: 0 12px; border-inline-start: 3px solid #5390b7; }
.sample-comparison > div:last-child { border-color: #20848d; }
.sample-comparison :is(h5,p) { margin: 0 0 5px; overflow-wrap: anywhere; }
.sample-comparison .sample-value { color: #165775; font-family: var(--font-mono); }
@media (max-width: 600px) { .sample-comparison { grid-template-columns: 1fr; } }
.reading-stages, .disease-empty ol, .pilot-intro ol {
  display: flex; gap: 0; flex-wrap: wrap; padding: 0; margin: 14px 0 20px;
  list-style: none; counter-reset: reading-step;
}
.reading-stages li, .disease-empty ol li, .pilot-intro ol li {
  counter-increment: reading-step; flex: 1 1 118px;
  border-block-start: 2px solid #90c1d2; margin: 0 6px 0 0; padding: 8px 4px 0 0;
  font-size: .85rem; line-height: 1.45;
}
.reading-stages li::before, .disease-empty ol li::before, .pilot-intro ol li::before {
  content: counter(reading-step) ". "; color: #175998; font-weight: 700;
}
.report-sources { border-block: 1px solid #c9dae4; padding: 12px 0; }
.report-sources dt { font-weight: 650; color: #214569; margin: 5px 0 2px; }
.report-sources dd { margin: 0 0 10px; overflow-wrap: anywhere; }
.measurement-coverage { flex: 1 1 100%; min-width: 0; }
.research-progress {
  display: block; width: min(100%, 26rem); height: 10px; margin: 8px 0 12px;
  accent-color: #307a94; background: #e4eff4; border-radius: 5px; border: 0;
}
.research-progress::-webkit-progress-bar { border-radius: 5px; background: #e4eff4; }
.research-progress::-webkit-progress-value { border-radius: 5px; background: #307a94; }
.research-progress::-moz-progress-bar { border-radius: 5px; background: #307a94; }
@media (max-width: 600px) {
  .letter-window { gap: 2px; }
  .position-control input { touch-action: pan-y; }
  .generation-values :is(td, th) { padding-inline-end: 6px; font-size: .8rem; }
}

/* The same table becomes a vertical history on phones, with all actions in view. */
@media (max-width: 600px) {
  .runs-table.table-wrap { max-height: none; }
  .runs-table table { display: block; min-width: 0; width: 100%; }
  .runs-table thead {
    position: absolute;
    width: 1px; height: 1px;
    overflow: hidden; clip-path: inset(50%);
  }
  .runs-table tbody { display: block; }
  .runs-table tbody tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px 12px;
    padding: 14px;
    border-bottom: 1px solid #c9dae4;
  }
  .runs-table tbody tr:last-child { border-bottom: 0; }
  .runs-table td,
  .runs-table td:nth-child(3) {
    display: block; min-width: 0; padding: 0;
    border: 0; white-space: normal; overflow-wrap: anywhere;
  }
  .runs-table td:nth-child(1) { font-size: .78rem; }
  .runs-table td:nth-child(2) { text-align: right; }
  .runs-table td:nth-child(n+3) { grid-column: 1 / -1; }
  .runs-table td:nth-child(4):not(:empty)::before {
    content: "Files";
    content: "Files" / "";
    display: block; font-size: .75rem; color: #485b6f;
  }
  .runs-table .file-links { flex-wrap: wrap; }
  .runs-table .file-links a { white-space: normal; overflow-wrap: anywhere; }
  .runs-table .table-action { min-height: 40px; }
}
