/* v5 · C · Proof · round 5, front Q: 05 audiences (js/r5-q.js).
   One dot per 1,000 followers, on a frame of film. The four crowds share one baseline and one pitch, so the length
   of a row is the size of the crowd; every 100K is a block. The pour happens on one canvas (no per-dot layers).
   Nathan MBC's page is not in this portfolio: his row is the same system, caption only, no print.
   The round 4 film-edge ticker is retired (66 permanent GPU layers). */

.aud { position: relative; padding: 18px 0 56px; }

/* ── the frame: film inside, sprocket holes printed on both edges (a background, no mask), blue arc at its foot (.g-arc) ── */
.qa {
  position: relative; overflow: hidden;
  padding: 28px 16px 40px;
  color: var(--paper);
  background: linear-gradient(180deg, var(--film) 0%, var(--film) 34%, var(--night) 100%);
}
.qa::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='22' height='9'><rect x='5' y='.5' width='12' height='8' rx='2' fill='%23F1F2EF' fill-opacity='.2'/></svg>") repeat-x 0 6px / 22px 9px,
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='22' height='9'><rect x='5' y='.5' width='12' height='8' rx='2' fill='%23F1F2EF' fill-opacity='.2'/></svg>") repeat-x 0 calc(100% - 6px) / 22px 9px;
}
/* the edge print: stock and frame on the left, the date the counts were checked on the right (like a camera date stamp) */
.qa__edge { position: relative; display: flex; justify-content: space-between; gap: 12px; margin: 0; font: 400 11px/1 var(--f-mono); letter-spacing: .14em; color: color-mix(in srgb, var(--paper) 62%, var(--film)); white-space: nowrap; }
.qa__edge > span { display: inline-block; }
.qa__date { color: color-mix(in srgb, var(--marker) 85%, var(--ember)); }

.qa__head { position: relative; margin-top: 24px; }
.qa__h { margin-top: 14px; max-width: 15ch; font-weight: 500; font-size: clamp(32px, 8.4vw, 64px); line-height: .98; letter-spacing: -.045em; color: var(--paper); text-wrap: balance; }
.qa__h .w { display: inline-block; }
.qa__key { display: inline-flex; align-items: center; gap: 11px; margin: 16px 0 0; font: 400 27px/1 var(--f-hand); color: var(--g-lav); }
.qa__keydot { flex: none; display: block; width: 8px; height: 8px; border-radius: 50%; background: #DCE3FF; box-shadow: 0 0 0 3px color-mix(in srgb, var(--g-glow) 30%, transparent), 0 0 12px 2px color-mix(in srgb, var(--g-glow) 80%, transparent); }

/* ── the field: one pitch for all four rows (60 columns of 10 + 5 block gaps fill the width of the longest) ── */
.qa__field {
  position: relative; margin-top: 30px; container-type: inline-size;
  --x0: 0px;
  --p: min(10px, calc(100cqi / 63));
  --g: calc(var(--p) * .6);
}
.qa__list { position: relative; z-index: 1; display: grid; row-gap: 24px; margin: 0; padding: 0; list-style: none; }
.qa__row { position: relative; display: grid; grid-template-columns: 2.4em minmax(0, 1fr) auto; font-size: 30px; grid-template-areas: "num who print" "bar bar bar"; column-gap: 12px; row-gap: 11px; align-items: center; transition: opacity .32s var(--ease-out); }
.qa__tag { display: contents; }
.qa__num { grid-area: num; position: relative; z-index: 2; display: block; font-weight: 500; font-size: 30px; line-height: 1; letter-spacing: -.045em; font-variant-numeric: tabular-nums; color: var(--paper); transform-origin: 0 60%; }
.qa__ghost { visibility: hidden; }
.qa__cnt { position: absolute; left: 0; top: 0; transition: color .7s var(--ease-out); }
.qa--cv .qa__row:not(.is-done) .qa__cnt { color: var(--g-lav); }
.qa__who { grid-area: who; display: flex; font-size: 16px; flex-direction: column; gap: 5px; min-width: 0; margin: 0; }
.qa__name { font-weight: 500; font-size: 16px; line-height: 1.15; color: var(--paper); }
.qa__src { font: 400 11px/1.35 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: color-mix(in srgb, var(--frost) 86%, var(--paper)); }

/* the page built for that crowd, as a small print; a link to its card in Work */
.qa__print { grid-area: print; position: relative; z-index: 1; display: block; width: 76px; padding: 3px; background: var(--print); border-radius: 2px; rotate: var(--r, -2deg); box-shadow: 0 10px 18px -8px rgba(0, 0, 0, .7), 0 0 0 1px rgba(0, 0, 0, .25); -webkit-tap-highlight-color: transparent; }
.qa__print img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; border-radius: 1px; }
.qa__print:focus-visible { outline: 2px solid var(--g-lav); outline-offset: 4px; }
/* the colour of the dot it grows out of, peeled off as it opens (js/r5-q.js) */
.qa__skin { position: absolute; inset: 0; border-radius: 50%; background: color-mix(in srgb, var(--g-lav) 80%, #fff); opacity: 0; pointer-events: none; }

.qa__bar { grid-area: bar; position: relative; width: calc(var(--cols) * var(--p) + var(--blocks) * var(--g)); height: calc(10 * var(--p)); }
/* no JS (or the canvas never started): the dots are a printed pattern; the last, short column hangs on the right */
.qa__bar::before, .qa__bar::after { content: ""; position: absolute; top: 0; background: radial-gradient(circle at 50% 50%, color-mix(in srgb, var(--paper) 88%, transparent) 0 30%, transparent 34%) 0 0 / var(--p) var(--p) round; }
.qa__bar::before { left: 0; width: calc(100% - var(--p)); height: 100%; }
.qa__bar::after { right: 0; width: var(--p); height: calc(var(--rem) * var(--p)); }
.qa--cv .qa__bar::before, .qa--cv .qa__bar::after { content: none; }

/* each crowd has its own canvas: its bar plus room for the dots that drop in from above and behind (bleed in pitches) */
.qa__cv { position: absolute; z-index: 0; left: calc(var(--p) * -4.3); top: calc(var(--p) * -5); width: calc(100% + var(--p) * 6.1); height: calc(100% + var(--p) * 6.9); pointer-events: none; }

/* the scale: one mark per 100K, at the block gaps */
.qa__axis { position: relative; height: 22px; margin: 20px 0 0; font: 400 11px/1 var(--f-mono); letter-spacing: .06em; color: color-mix(in srgb, var(--paper) 60%, var(--film)); }
.qa__axis::before { content: ""; position: absolute; left: var(--x0); top: 0; width: calc(60 * var(--p) + 5 * var(--g)); height: 1px; background: color-mix(in srgb, var(--paper) 16%, transparent); }
.qa__axis span { position: absolute; top: 9px; left: calc(var(--x0) + var(--k) * (10 * var(--p) + var(--g)) - var(--g) / 2); translate: -50% 0; }
.qa__axis span::before { content: ""; position: absolute; left: 50%; top: -9px; width: 1px; height: 5px; background: color-mix(in srgb, var(--paper) 40%, transparent); }

/* focus (hover, tap, keyboard): the other crowds step back */
.qa__field.is-focus .qa__row:not(.is-on) { opacity: .4; }
@media (hover: none) { .qa__row { cursor: pointer; -webkit-tap-highlight-color: transparent; } }

.qa__note { margin: 16px 0 0; padding: 0 16px; max-width: 40em; font-size: 15px; line-height: 1.5; color: var(--graphite); }

@media (min-width: 768px) {
  .aud { padding: 28px var(--gutter) 72px; }
  .qa { width: min(var(--max), 100%); margin-inline: auto; border-radius: var(--r-card); padding: 30px 32px 44px; }
  .qa__print { width: 96px; }
  .qa__note { width: min(var(--max), 100%); margin: 18px auto 0; padding: 0 32px; max-width: none; }
  .qa__note > span { display: block; max-width: 44em; }
}

/* wide: names in a column, the count rides at the end of its crowd, the print sits right after it */
@media (min-width: 1200px) {
  .qa { padding: 34px 48px 48px; }
  .qa__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; }
  .qa__h { max-width: none; }
  .qa__key { margin: 0 0 6px; font-size: 30px; }
  .qa__field { --who: 230px; --tagw: 340px; --x0: calc(var(--who) + 32px); --p: min(11px, calc((100cqi - var(--who) - 32px - var(--tagw)) / 63)); margin-top: 44px; }
  .qa__list { row-gap: 34px; }
  .qa__row { grid-template-columns: var(--who) minmax(0, 1fr); grid-template-areas: "who bar"; column-gap: 32px; row-gap: 0; font-size: 16px; }
  .qa__tag { position: absolute; left: var(--x0); top: 50%; display: flex; align-items: center; gap: 22px; translate: 0 -50%; transform: translateX(calc(var(--cols) * var(--p) + var(--blocks) * var(--g) + 20px)); }
  .qa__num { font-size: clamp(40px, 3.9vw, 58px); }
  .qa__name { font-size: 18px; }
  .qa__print { width: clamp(96px, calc(var(--p) * 14), 150px); padding: 4px; }
  .qa__note { padding: 0 48px; }
}
