/* counts.html: eight-count ruler, caption rows, four stills. Builds on site.css tokens. */

.counts-top { padding-top: clamp(.5rem, 1.5vw, 1rem); align-items: stretch; }

.counts-intro > * + * { margin-top: clamp(.75rem, 1.6vw, 1.25rem); }

/* Opening photograph: stacked on phones, fills the double-height tile from 48rem. */
.counts-photo img { aspect-ratio: 4 / 5; flex: none; height: auto; min-height: 0; }
.counts-photo figcaption { min-height: 3.5rem; }
@media (min-width: 48rem) {
  .counts-photo { grid-row: 1 / span 2; grid-column: 9 / span 4; }
  .counts-photo img { flex: 1 1 0; height: 0; aspect-ratio: auto; min-height: 18rem; }
}

/* Ruler tile */
.counts-ruler > h2 + p { margin-top: .5rem; max-width: 34em; }
.ruler--main { margin-top: clamp(1rem, 2vw, 1.5rem); }
.ruler--main .ruler__c {
  min-height: clamp(3rem, 1.8rem + 4vw, 4.75rem);
  font-size: var(--fs-h3);
}

/* Caption rows: each carries its own copy of the ruler, counts filled in ink. */
.caps {
  margin: clamp(1rem, 2vw, 1.5rem) 0 0;
  padding: 0;
  list-style: none;
  border-top: var(--line) solid var(--ink);
}
.cap {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: .75rem var(--pad);
  padding: .875rem 0;
  border-bottom: var(--line) solid var(--ink);
}
.cap:last-child { border-bottom: 0; padding-bottom: 0; }
.cap__head { display: grid; gap: .375rem; align-content: start; min-width: 0; }
.cap__counts { font-size: var(--fs-small); }
.cap:hover h3 { text-decoration: underline; text-decoration-thickness: .06em; text-underline-offset: .14em; }
.cap:focus-visible { outline: .25rem solid var(--accent); outline-offset: .1875rem; }
.cap:focus-visible h3 { text-decoration: underline; }
.ruler--mini { gap: .25rem; max-width: 15rem; }
.ruler--mini .ruler__c { min-height: 1.125rem; }
@media (min-width: 48rem) {
  .cap { grid-template-columns: minmax(11rem, 15rem) minmax(0, 1fr); align-items: start; }
}

/* Four stills */
.stills__intro { max-width: 38em; margin-bottom: clamp(1rem, 2vw, 1.5rem); }
.still {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: baseline;
  column-gap: var(--pad);
  padding: .625rem var(--pad);
}
.still__n {
  font: 400 var(--fs-h2)/1 var(--text);
  font-variant-numeric: tabular-nums;
}

/* The closing line: a wide shallow count card */
.same { padding-block: clamp(.75rem, 1.6vw, 1.25rem); }
.same__line {
  font: italic 400 var(--fs-h2)/1.14 var(--display);
}

/* Link card */
.next__card { max-width: 52rem; }
.next__card > p { max-width: 36em; }
.next__links { display: flex; flex-wrap: wrap; gap: var(--gutter); margin-top: 1.25rem; }
