/*
 * .seq-stage — a configuration's choices per stage of config/pipeline.yml, one row per choice
 * point in pipeline order (docs/plans/seq-redesign.md § 4, the configuration page's dominant
 * element; the catalogue page shows the same rows with no alternative chosen). The rows are
 * uniform, none promoted: each names the choice point in .body-sm-bold, the alternative chosen in
 * .body-md with its tool and step version linked to the step page, and the alternatives not
 * chosen in .body-sm grey after it, so a choice is read against the catalogue without
 * leaving the page. Nothing inside a row uses a headline composite.
 *
 *   <ol class="seq-stage">
 *     <li class="seq-stage__row">
 *       <p class="seq-stage__point body-sm-bold">Aligner</p>
 *       <div class="stack-4">
 *         <p class="seq-stage__chosen body-md">BWA-MEM2</p>
 *         <p class="seq-stage__tool body-sm">bwa-mem2 2.2.1, <a href="…">bwa_mem2.mem version 3</a></p>
 *         <p class="seq-stage__others body-sm">Not chosen: BWA, DRAGMAP, vg giraffe</p>
 *       </div>
 *     </li>
 *   </ol>
 *
 * From 768px the choice point stands in a 160px column of its own to the left of the choice, so
 * the points read down as a list; below it the point sits above its choice. The tool and step
 * version are the line under the alternative's name, and the alternatives not chosen the line
 * under that, so a row reads name, then what runs, then what does not.
 */

.seq-stage {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.seq-stage__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--spacing-8);
  padding-block: var(--spacing-16);
  border-block-start: var(--stroke-weight-1) solid var(--border-subtle);
}
.seq-stage__row:last-child {
  border-block-end: var(--stroke-weight-1) solid var(--border-subtle);
}

@media (min-width: 768px) {
  .seq-stage__row {
    grid-template-columns: 160px minmax(0, 1fr);
    gap: var(--spacing-24);
  }
}

.seq-stage__point {
  margin: 0;
  padding-block-start: var(--spacing-4);                /* its cap height meets the choice's first line */
  color: var(--text-secondary);
}

.seq-stage__chosen {
  margin: 0;
  color: var(--text-primary);
}
.seq-stage__tool {
  margin: 0;
  color: var(--text-secondary);
}
.seq-stage__tool a {
  color: var(--text-primary);
}

.seq-stage__others {
  margin: 0;
  color: var(--text-secondary);
}

/* ---------- Touch ---------- */
/* The tool line is a sentence ("GATK, gatk.base_recalibrator version 1, gatk.apply_bqsr version 1;
   declared, not built"), and an alternative that compiles to several steps names several links
   in it, on one line or wrapped onto the next: a 44px hit area on each would cover its
   neighbour's, so the links keep the line's size under WCAG 2.5.5's inline exception
   (TouchTargetTest::INLINE_PROSE_LINKS) and the rows take more room between them instead. */
@media (pointer: coarse) {
  .seq-stage__row {
    padding-block: var(--spacing-24);
  }
}
