/* /labs/models/: page-only bits. */
.lab-main section > * + * { margin-top: 16px; }
.lab-main section > h2 { margin-top: 0; }
.lab-main > section + section { margin-top: 56px; }
.lab-main h3 { margin-top: 36px; font-size: 1.15rem; font-weight: 600; letter-spacing: -0.015em; }
.lab-main code { font-family: var(--font-mono); font-size: 0.92em; color: var(--text); overflow-wrap: anywhere; }

.lm-lineup table { min-width: 940px; }
.lm-lineup tbody th { white-space: nowrap; }
.lm-lineup td:nth-child(2) { min-width: 150px; }
.lm-lineup td:nth-child(6) { min-width: 130px; }
.lm-lineup td:nth-child(7) { min-width: 170px; }
.lm-lineup .lm-fine td { padding-top: 0; padding-bottom: 12px; border-top: 0; }
.lm-lineup tr:has(+ .lm-fine) th, .lm-lineup tr:has(+ .lm-fine) td { padding-bottom: 4px; }
.lm-lineup .lm-fine:hover, .lm-lineup tr:has(+ .lm-fine):hover { background: transparent; }
/* the fine print sticks to the left edge, so it stays readable while the table scrolls */
.lm-fine__text { position: sticky; left: 16px; width: min(64ch, calc(100vw - 6rem)); font-size: 13px; line-height: 1.5; color: var(--text-3); }
.lm-unreleased > * { color: var(--text-3); }
.lm-cols { list-style: none; padding: 0; display: grid; gap: 4px; }
.lm-cols strong { font-weight: 500; color: var(--text-2); }

.lm-fine__text code { white-space: nowrap; }
.lm-family { cursor: default; }
@media (min-width: 900px) {
  .lm-families { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.lm-family:hover { border-color: var(--line-strong); background: var(--bg-elev); }

.pick { list-style: none; padding: 0; display: grid; gap: 12px; counter-reset: pick; max-width: 68ch; }
.pick__step { counter-increment: pick; position: relative; padding: 16px 20px 16px 56px; border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--bg-elev); scroll-margin-top: 24px; }
.pick__step::before { content: counter(pick); position: absolute; left: 16px; top: 16px; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-hi); font-family: var(--font-mono); font-size: 13px; font-weight: 500; }
.pick__step:target { border-color: var(--accent-lo); }
.pick__q { color: var(--text); font-weight: 500; }
.pick__a { list-style: none; padding: 0; margin-top: 8px; display: grid; gap: 4px; color: var(--text-2); }
.pick__yn { display: inline-block; min-width: 2.4em; font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-3); }
.pick__a strong { color: var(--text); font-weight: 600; }

.lm-compare table { min-width: 620px; }
.lm-compare thead th { white-space: normal; }
.lm-compare tbody th { white-space: nowrap; }
/* Footnote marks: underlined, so they are not told apart by colour alone. */
.lm-compare tbody th a { color: var(--accent-hi); text-decoration: underline; text-underline-offset: 2px; padding-inline: 2px; }
.lm-compare td:nth-child(2) { color: var(--text); font-weight: 500; }
.lm-compare td a { color: var(--accent-hi); text-decoration: underline; text-underline-offset: 2px; padding-inline: 2px; }
/* Media comparison: Medium is the row header, so the whybother score is the third cell. */
.lm-compare--media table { min-width: 640px; }
.lm-compare--media td:nth-child(2) { color: inherit; font-weight: inherit; min-width: 260px; }
.lm-compare--media td:nth-child(3) { color: var(--text); font-weight: 500; }
.lm-data table { min-width: 460px; }
.lm-aliases table { min-width: 540px; }
.lm-aliases tbody th, .lm-aliases td code { overflow-wrap: anywhere; }

.lm-chart { max-width: 560px; padding: clamp(10px, 3vw, 20px); }
.lm-chart svg { display: block; overflow: visible; }
.lm-chart .grid { stroke: var(--line-strong); stroke-width: 1; }
.lm-chart .tick, .lm-chart .axis { font: 400 12px var(--font-mono); fill: var(--text-3); }
.lm-chart .axis { font-size: 13px; fill: var(--text-2); }
.lm-chart .frontier { fill: none; stroke: var(--accent); stroke-width: 1.5; stroke-dasharray: 5 4; }
.lm-chart .leader { stroke: var(--text-3); stroke-width: 1; }
.lm-chart .pt { fill: var(--bg-elev-3); stroke: var(--text-3); stroke-width: 1.5; }
.lm-chart .pt--on { fill: var(--accent); stroke: var(--accent-hi); }
.lm-chart .name { font: 400 13px var(--font-sans); fill: var(--text-2); }
.lm-chart .name--on { font-weight: 600; fill: var(--accent-hi); }
.lm-chart figcaption { margin-top: 10px; }

@media (max-width: 480px) {
  .pick__step { padding-left: 50px; padding-right: 14px; }
  .pick__step::before { left: 12px; }
}

/* Media table: six columns, so it needs less width than the lineup. */
.lm-media table { min-width: 800px; }
.lm-media td:nth-child(6) { min-width: 170px; }

/* On a phone the Best for column goes, so the prices are on screen without scrolling sideways first. */
@media (max-width: 560px) {
  .lm-lineup table { min-width: 780px; }
  .lm-media table { min-width: 640px; }
  .lm-lineup thead th:nth-child(2), .lm-lineup tbody td:nth-child(2) { display: none; }
}
