/* Content sections below the hero.
 *
 * Same vocabulary as the hero: light page, dark cards for media, hairline
 * rules, flat fills. Media is always presented in a labelled column so that
 * comparisons read left-to-right without a legend.
 */

.vda-section {
  padding: clamp(72px, 11vh, 132px) 0;
  border-top: 1px solid var(--vda-border);
}

.vda-section--sunken {
  background: var(--vda-bg-sunken);
}

.vda-section__head {
  max-width: 62ch;
  margin-bottom: clamp(34px, 5vw, 56px);
}

.vda-section__head h2 {
  font-size: clamp(1.8rem, 3.4vw, 2.9rem);
  font-weight: 660;
  letter-spacing: -0.035em;
  line-height: 1.08;
  margin: 12px 0 0;
  color: var(--vda-fg);
}

.vda-section__lede {
  margin: 16px 0 0;
  font-size: clamp(1rem, 1.5vw, 1.14rem);
  line-height: 1.55;
  color: var(--vda-muted);
}

/* Prose --------------------------------------------------------------------- */

.vda-prose {
  max-width: var(--vda-measure);
  display: grid;
  gap: 18px;
}

.vda-prose p {
  margin: 0;
  color: var(--vda-muted);
  line-height: 1.65;
}

.vda-prose b {
  color: var(--vda-fg);
  font-weight: 600;
}

.vda-prose em {
  color: var(--vda-fg);
  font-style: italic;
}

/* Stat tiles ---------------------------------------------------------------- */

.vda-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1px;
  background: var(--vda-border);
  border: 1px solid var(--vda-border);
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: clamp(30px, 4vw, 46px);
}

.vda-stat {
  background: var(--vda-bg);
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.vda-section--sunken .vda-stat {
  background: var(--vda-bg-sunken);
}

.vda-stat__value {
  font-size: clamp(1.9rem, 3.4vw, 2.6rem);
  font-weight: 660;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--vda-fg);
  font-variant-numeric: tabular-nums;
}

.vda-stat.is-lead .vda-stat__value {
  color: var(--vda-accent);
}

.vda-stat__label {
  font-size: 0.9rem;
  color: var(--vda-fg);
}

.vda-stat__note {
  font-size: 0.82rem;
  color: var(--vda-faint);
}

/* Tables -------------------------------------------------------------------- */

.vda-tablewrap {
  margin: 0 0 clamp(30px, 4vw, 46px);
}

/* Wide tables scroll inside their own box; the page never scrolls sideways. */
.vda-tablescroll {
  overflow-x: auto;
  border: 1px solid var(--vda-border);
  border-radius: 14px;
}

.vda-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.vda-table th,
.vda-table td {
  padding: 11px 16px;
  text-align: right;
  border-bottom: 1px solid var(--vda-border);
}

.vda-table thead th {
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--vda-faint);
  background: var(--vda-bg-sunken);
}

.vda-section--sunken .vda-table thead th {
  background: rgba(16, 16, 20, 0.045);
}

.vda-table th:first-child,
.vda-table td:first-child,
.vda-table tbody th {
  text-align: left;
  font-weight: 500;
  color: var(--vda-fg);
}

.vda-table tbody tr:last-child th,
.vda-table tbody tr:last-child td {
  border-bottom: none;
}

.vda-table__group td {
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--vda-faint);
  text-align: left;
  padding-top: 18px;
}

.vda-table .is-ours th,
.vda-table .is-ours td {
  background: var(--vda-accent-wash);
  color: var(--vda-fg);
  font-weight: 600;
}

/* The winning number in each column, marked rather than merely coloured so it
   survives greyscale printing and colour-blind readers. */
.vda-table .is-best {
  font-weight: 700;
  color: var(--vda-fg);
  box-shadow: inset 0 -2px 0 var(--vda-accent);
}

.vda-tablewrap figcaption,
.vda-figure figcaption {
  margin-top: 12px;
  font-size: 0.86rem;
  line-height: 1.5;
  color: var(--vda-faint);
  max-width: 78ch;
}

/* Figures ------------------------------------------------------------------- */

.vda-figure {
  margin: 0 0 clamp(30px, 4vw, 46px);
}

.vda-figure img {
  width: 100%;
  display: block;
  border-radius: 14px;
  border: 1px solid var(--vda-border);
  background: #fff;
}

/* A missing figure is stated plainly rather than silently omitted. */
.vda-figure__placeholder {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 240px;
  padding: 32px;
  border-radius: 14px;
  border: 1px dashed var(--vda-border-strong);
  background: var(--vda-bg-sunken);
}

.vda-figure__placeholder b {
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--vda-accent);
}

.vda-figure__placeholder span {
  max-width: 52ch;
  color: var(--vda-muted);
  font-size: 0.92rem;
}

.vda-figure__placeholder code,
.vda-media__missing code {
  font-family: var(--vda-mono);
  font-size: 0.76rem;
  color: var(--vda-faint);
}

/* Media tiles --------------------------------------------------------------- */

.vda-media {
  margin: 0;
  min-width: 0;
}

.vda-media__label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--vda-faint);
  margin-bottom: 7px;
}

.vda-media__el {
  width: 100%;
  display: block;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--vda-border);
  background: var(--vda-card);
}

.vda-media__missing {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: center;
  justify-content: center;
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  border: 1px dashed var(--vda-border-strong);
  background: var(--vda-bg-sunken);
  color: var(--vda-faint);
  font-size: 0.8rem;
  padding: 10px;
  text-align: center;
}

/* Comparison rows ----------------------------------------------------------- */

.vda-compare {
  margin-bottom: clamp(30px, 4vw, 46px);
}

.vda-compare__head {
  display: none;
}

.vda-compare__row {
  padding: 22px 0;
  border-top: 1px solid var(--vda-border);
}

.vda-compare__row:last-child {
  border-bottom: 1px solid var(--vda-border);
}

.vda-compare__grid {
  display: grid;
  grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
  gap: 12px;
}

/* Columns are coloured by what they are, not by where they sit. Keying off
   position highlighted whichever model happened to be last in a row, and made a
   ground-truth column look identical to a competing model. */
.vda-media__label.is-ours,
.vda-compare__col.is-ours {
  color: var(--vda-accent);
}

.vda-media__label.is-baseline {
  color: var(--vda-baseline);
}

.vda-media__label.is-truth {
  color: var(--vda-fg);
}

.vda-compare__caption {
  margin: 0 0 14px;
  color: var(--vda-muted);
  font-size: 0.92rem;
  line-height: 1.55;
  max-width: 82ch;
}

.vda-compare__note {
  margin: 12px 0 0;
  font-size: 0.86rem;
  color: var(--vda-muted);
}

.vda-compare__note b {
  color: var(--vda-fg);
}

/* One transport per row: every clip in the row shares it, which is the only
   way a side-by-side comparison is actually comparable. */
.vda-compare__bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
}

.vda-compare__play {
  width: 30px;
  height: 30px;
  flex: none;
  border-radius: 50%;
  border: 1px solid var(--vda-border-strong);
  background: transparent;
  color: var(--vda-fg);
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 0.66rem;
  line-height: 1;
}

.vda-compare__play:hover {
  border-color: var(--vda-accent);
  color: var(--vda-accent);
}

.vda-compare__scrub {
  flex: 1;
  appearance: none;
  -webkit-appearance: none;
  height: 3px;
  border-radius: 999px;
  background: var(--vda-border);
  cursor: pointer;
}

.vda-compare__scrub::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--vda-fg);
  border: none;
}

.vda-compare__scrub::-moz-range-thumb {
  width: 11px;
  height: 11px;
  border: none;
  border-radius: 50%;
  background: var(--vda-fg);
}

/* Steps --------------------------------------------------------------------- */

.vda-steps {
  list-style: none;
  margin: 0 0 clamp(30px, 4vw, 46px);
  padding: 0;
  border-top: 1px solid var(--vda-border);
}

.vda-step {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 18px;
  align-items: baseline;
  padding: 16px 0;
  border-bottom: 1px solid var(--vda-border);
}

.vda-step__n {
  font-family: var(--vda-mono);
  font-size: 0.78rem;
  color: var(--vda-faint);
}

.vda-step__body b {
  font-family: var(--vda-mono);
  font-size: 0.86rem;
  color: var(--vda-accent);
  font-weight: 600;
}

.vda-step__body p {
  margin: 5px 0 0;
  color: var(--vda-muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

/* Code ---------------------------------------------------------------------- */

.vda-codeblock {
  margin: 0 0 clamp(30px, 4vw, 46px);
  border: 1px solid var(--vda-card-border);
  border-radius: 14px;
  overflow: hidden;
  background: var(--vda-card);
}

.vda-codeblock figcaption {
  padding: 12px 18px;
  border-bottom: 1px solid var(--vda-card-border);
  background: var(--vda-card-2);
  color: var(--vda-on-card-faint);
  font-family: var(--vda-mono);
  font-size: 0.74rem;
}

.vda-codeblock figcaption:empty {
  display: none;
}

.vda-codeblock pre {
  margin: 0;
  padding: 18px;
  overflow-x: auto;
  color: var(--vda-on-card);
  font-family: var(--vda-mono);
  font-size: 0.78rem;
  line-height: 1.7;
}

/* Gallery ------------------------------------------------------------------- */

.vda-gallery__filters {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 28px;
}

.vda-gallery__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 26px;
}

.vda-gallery__card[hidden] {
  display: none;
}

.vda-gallery__media {
  display: grid;
  grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
  gap: 6px;
}

.vda-gallery__media .vda-media__label {
  font-size: 0.62rem;
  margin-bottom: 5px;
}

.vda-gallery__caption {
  margin: 10px 0 0;
  font-size: 0.84rem;
  color: var(--vda-faint);
}

.vda-gallery__caption code {
  font-family: var(--vda-mono);
}

/* Footer -------------------------------------------------------------------- */

.vda-footer {
  padding: 46px 0;
  border-top: 1px solid var(--vda-border);
  color: var(--vda-faint);
  font-size: 0.88rem;
}

.vda-footer p {
  margin: 0;
}

.vda-footer__meta {
  margin-top: 5px;
}

.vda-footer a {
  color: var(--vda-muted);
}

.vda-footer a:hover {
  color: var(--vda-accent);
}

@media (max-width: 720px) {
  /* Two across rather than four: legibility beats completeness on a phone. */
  .vda-compare__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .vda-gallery__grid {
    grid-template-columns: 1fr;
  }
}
