/* Machine photo on /docs/benchmarks/<machine>/ pages */
.bench-machine { margin: 22px 0 18px; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: center; }
.bench-machine img { max-width: 100%; height: auto; flex: 0 1 auto; min-width: 0; }
.bench-machine figcaption { flex-basis: 100%; font-size: 13px; line-height: 1.5; color: var(--text-dim); text-align: center; }
/* Key figures: what was measured, the result, and its source on a small line.
   Same square, ruled look as the bench tables. */
.key-figures { margin: 28px 0; border-top: 1px solid var(--border-hi); }
.key-figures table { width: 100%; border-collapse: collapse; font-size: 14.5px; line-height: 1.5; }
.key-figures caption { caption-side: top; text-align: left; padding: 14px 0 4px; font-size: 12.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--text-dim); }
.key-figures th, .key-figures td { padding: 12px 0; border-bottom: 1px solid var(--border); vertical-align: top; text-align: left; }
.key-figures th { font-weight: 400; color: var(--text-dim); width: 44%; padding-right: 16px; }
.key-figures td b { color: var(--text); font-weight: 600; }
.key-figures .src { display: block; margin-top: 2px; font-size: 13px; color: var(--text-dim); }
@media (max-width: 560px) {
  .key-figures th, .key-figures td { display: block; width: auto; padding: 0; border: 0; }
  .key-figures tr { display: block; padding: 12px 0; border-bottom: 1px solid var(--border); }
  .key-figures th { font-size: 13.5px; }
  .key-figures td { padding-top: 2px; }
}

/* Square tables (design.css rounds .bench-table until its next version bump),
   and dates in the last column stay on one line. */
.article .bench-table { border-radius: 0; }
.article .bench-table td:last-child { white-space: nowrap; }

/* Two-row table headers (design.css has the same rules for its next version bump). */
.article .bench-table th[scope="colgroup"] { padding-bottom: 8px; }
.article .bench-table thead tr + tr th { padding-top: 8px; }
@media (max-width: 680px) { .article :is(.compare-table,.bench-table) table:has(tr > :nth-child(4)):not(:has(td[data-label])) thead tr + tr > :first-child { position: static; box-shadow: none; } }

/* Contents numbers stay on one line when an item wraps (same fix as design.css,
   which reaches every page with its next version bump). */
.doc-toc li a::before { flex: none; white-space: nowrap; }

/* Gallery: one main picture, thumbnails under it that switch it (bench-gallery.js). */
.bench-gallery { margin: 22px 0 18px; }
.bench-gallery .g-main { display: flex; align-items: center; justify-content: center; aspect-ratio: 1200 / 748; background: radial-gradient(ellipse at 50% 60%, #15181a 0%, var(--bg) 70%); }
.bench-gallery .g-main img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.bench-gallery .g-thumbs { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin: 12px 0 0; padding: 0; list-style: none; }
.bench-gallery .g-thumb { display: flex; align-items: center; justify-content: center; width: 96px; height: 64px; padding: 6px; border: 1px solid var(--border); background: var(--bg-soft); }
.bench-gallery .g-thumb img { max-width: 100%; max-height: 100%; object-fit: contain; }
.bench-gallery .g-thumb:hover { border-color: var(--border-hi); }
.bench-gallery .g-thumb[aria-current] { border-color: var(--accent); }
.bench-gallery .g-thumb:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.bench-gallery figcaption { margin-top: 10px; font-size: 13px; line-height: 1.5; color: var(--text-dim); text-align: center; }
.bench-gallery .g-credit { display: block; }
@media (max-width: 560px) { .bench-gallery .g-thumb { width: 72px; height: 50px; padding: 4px; } }
