/* Tests section: builds on /home.css (fonts, header, footer, palette). */
:root { --line: #26251f; --panel: #111110; --gold: #f2c14e; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
nav a[aria-current="page"] { color: #eeedea; }
.tests-page main { padding-bottom: 72px; }
.eyebrow { margin: 0 0 14px; color: var(--quiet); font-size: 12px; letter-spacing: .02em; }
.eyebrow a { text-decoration: underline; text-underline-offset: 3px; }
.set-intro { padding-block: 40px 56px; max-width: 900px; }
.set-intro h1 { font-size: clamp(40px, 5vw, 62px); }
.lede { margin: 22px 0 0; max-width: 640px; color: var(--muted); font-size: 16px; line-height: 1.7; text-wrap: pretty; }
.controls { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; margin-top: 30px; }
.jump { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 13px; color: var(--muted); }
.jump a { padding-block: 6px; transition: color 180ms; }
.jump a:hover { color: #fff; }
button { font: inherit; color: inherit; }
.blind-toggle, .reveal-button, .button {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 9px 16px; border: 1px solid #4a4943;
  border-radius: 999px; background: none; font-size: 13px; cursor: pointer; transition: border-color 180ms, background 180ms;
}
.blind-toggle:hover, .reveal-button:hover, .button:hover { border-color: #eeedea; }
.blind-toggle[aria-pressed="true"] { background: #eeedea; color: #090909; border-color: #eeedea; }
.button .arrow { width: 14px; height: 14px; }
.blind-note { margin: 16px 0 0; color: var(--gold); font-size: 13px; }
.fine { color: var(--quiet); font-size: 12px; line-height: 1.6; margin: 12px 0 0; }
h2 { font-size: clamp(26px, 3.4vw, 40px); letter-spacing: -.035em; font-weight: 500; }
h3 { font-size: 15px; font-weight: 500; margin: 0 0 8px; letter-spacing: -.01em; }

/* overall + cost tables */
.overall, .cost { padding-block: 8px 40px; }
.overall h2, .cost h2 { margin-bottom: 20px; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.results { border-collapse: collapse; min-width: 560px; width: 100%; font-variant-numeric: tabular-nums; font-size: 14px; }
.results th, .results td { padding: 11px 10px; text-align: right; border-bottom: 1px solid var(--line); white-space: nowrap; }
.results th[scope="row"], .results thead th:first-child { text-align: left; font-weight: 500; }
.results thead th { color: var(--quiet); font-weight: 400; font-size: 12px; }
.results thead a { text-decoration: underline; text-decoration-color: #4a4943; text-underline-offset: 3px; }
.results .lead th, .results .lead td.total { color: var(--gold); }
.results td.total { font-weight: 600; }

/* a test */
.test { padding-top: 72px; border-top: 1px solid var(--line); margin-top: 40px; scroll-margin-top: 12px; }
.test-head { max-width: 760px; }
.shows { color: var(--muted); font-size: 15px; line-height: 1.65; margin: 12px 0 0; }
.reveal-button { margin-top: 18px; }
details > summary { cursor: pointer; list-style: none; display: inline-flex; align-items: center; gap: 8px; min-height: 40px; color: var(--muted); font-size: 13px; transition: color 180ms; }
details > summary::-webkit-details-marker { display: none; }
details > summary::before { content: "+"; display: inline-grid; place-items: center; width: 18px; height: 18px; border: 1px solid #4a4943; border-radius: 50%; font-size: 12px; line-height: 1; }
details[open] > summary::before { content: "–"; }
details > summary:hover { color: #fff; }
.prompt { margin-top: 22px; }
.prompt pre {
  margin: 12px 0 0; padding: 20px 22px; max-height: 460px; overflow: auto; background: var(--panel); border: 1px solid var(--line);
  border-radius: 10px; white-space: pre-wrap; word-break: break-word; font: 12.5px/1.65 ui-monospace, SFMono-Regular, Menlo, monospace; color: #d6d4ce;
}
.entries { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px 28px; margin-top: 30px; }
.entry { min-width: 0; }
.media video, .media img { display: block; width: 100%; height: auto; background: #000; border-radius: 6px; }
.media .tall { max-height: 78vh; object-fit: contain; }
.stage [hidden] { display: none; }
.entry.first .media > video, .entry.first .stage { box-shadow: 0 0 0 1px var(--gold); border-radius: 6px; }
body.blind .entry.first .media > video, body.blind .entry.first .stage { box-shadow: none; }
body.blind .test.revealed .entry.first .media > video, body.blind .test.revealed .entry.first .stage { box-shadow: 0 0 0 1px var(--gold); }
.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.tabs button { min-height: 32px; padding: 5px 12px; border: 1px solid #3a3933; border-radius: 999px; background: none; font-size: 12px; color: var(--muted); cursor: pointer; }
.tabs button[aria-pressed="true"] { color: #090909; background: #d9d7d1; border-color: #d9d7d1; }
.closeups { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 4px; margin-top: 8px; }
.closeups img { border-radius: 3px; aspect-ratio: 16 / 9; object-fit: cover; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin-top: 12px; }
.small { font-size: 12px; color: var(--muted); }
.entry-head { display: flex; align-items: center; gap: 12px; margin-top: 14px; }
.letter { flex: 0 0 auto; display: grid; place-items: center; width: 30px; height: 30px; border: 1px solid #4a4943; border-radius: 50%; font-size: 13px; font-weight: 600; }
.name { flex: 1 1 auto; min-width: 0; font-size: 16px; font-weight: 500; letter-spacing: -.01em; }
.maker { display: block; color: var(--quiet); font-size: 11.5px; font-weight: 400; margin-top: 2px; }
.score { flex: 0 0 auto; text-align: right; font-variant-numeric: tabular-nums; }
.score strong { font-size: 20px; font-weight: 600; letter-spacing: -.02em; }
.score span { display: block; color: var(--quiet); font-size: 11.5px; }
.entry.first .score strong, .entry.first .name { color: var(--gold); }
body.blind .test:not(.revealed) .entry.first .name { color: inherit; }
.graders { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 8px 0 0 42px; color: var(--quiet); font-size: 12px; font-variant-numeric: tabular-nums; }
.more { margin: 4px 0 0 42px; }
.more[open] { padding-bottom: 8px; }
.criteria { border-collapse: collapse; width: 100%; margin-top: 8px; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.criteria th, .criteria td { padding: 6px 6px; border-bottom: 1px solid var(--line); text-align: right; }
.criteria th[scope="row"], .criteria thead th:first-child { text-align: left; font-weight: 400; color: var(--muted); }
.criteria thead th { font-weight: 400; color: var(--quiet); font-size: 11px; }
.criteria .sum th, .criteria .sum td { font-weight: 600; color: #eeedea; border-bottom: 0; }
.lines { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 12px; font-size: 13px; line-height: 1.6; color: #d6d4ce; }
.lines .who { display: block; color: var(--quiet); font-size: 11.5px; margin-bottom: 2px; }
.guess, .moved { color: var(--quiet); font-size: 12px; }
.moved { color: var(--gold); }
.facts { margin: 14px 0 0; padding-left: 18px; color: var(--muted); font-size: 12.5px; line-height: 1.6; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; margin: 16px 0 0; font-size: 12.5px; }
.stats dt { color: var(--quiet); font-size: 11px; }
.stats dd { margin: 2px 0 0; font-variant-numeric: tabular-nums; }
.notes { margin: 16px 0 0; }
.notes figcaption { color: var(--quiet); font-size: 11px; }
.notes blockquote { margin: 6px 0 0; padding: 12px 14px; background: var(--panel); border-radius: 8px; font-size: 12.5px; line-height: 1.6; color: #d6d4ce; }
.method { margin-top: 30px; max-width: 760px; }
.method p, .method li { color: var(--muted); font-size: 13px; line-height: 1.65; }
.method ul { padding-left: 18px; }
.missing { color: var(--quiet); font-size: 13px; padding: 40px 0; text-align: center; border: 1px dashed var(--line); border-radius: 6px; }

/* notes at the end */
.how { padding-top: 64px; border-top: 1px solid var(--line); margin-top: 40px; }
.how h2 { margin-bottom: 26px; }
.how-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px 48px; }
.how p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.7; text-wrap: pretty; }
.how code { font: 12.5px ui-monospace, SFMono-Regular, Menlo, monospace; color: #d6d4ce; }

/* the index */
.sets { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 36px; padding-bottom: 60px; }
.set-card a { display: block; }
.set-card .art img { transition: transform 600ms var(--ease), filter 400ms; }
.set-card a:hover .art img, .set-card a:focus-visible .art img { transform: scale(1.025); filter: brightness(1.08); }
.set-card h2 { font-size: clamp(19px, 2vw, 23px); }
.set-card p { margin: 10px 0 0; color: var(--muted); font-size: 13px; line-height: 1.65; }

/* blind mode: names, scores and grades stay hidden until a test is revealed */
.blind-only { display: none; }
body.blind .blind-only { display: block; }
body.blind button.blind-only { display: inline-flex; }
body.blind .reveal-only { display: none; }
body.blind .test.revealed .reveal-only { display: revert; }
body.blind .test.revealed .entry-head .reveal-only { display: inline; }
body.blind .test.revealed .graders.reveal-only { display: flex; }
body.blind .test.revealed .reveal-button { display: none; }
.entry-head .name.reveal-only, .entry-head .score.reveal-only { display: block; }
body.blind .entry-head .reveal-only { display: none; }
body.blind .test.revealed .entry-head .name.reveal-only, body.blind .test.revealed .entry-head .score.reveal-only { display: block; }

@media (max-width: 1000px) { .entries { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px 20px; } }
@media (max-width: 640px) {
  .set-intro { padding-block: 24px 36px; }
  .entries { grid-template-columns: 1fr; }
  .entries.tall-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 12px; }
  .tall-grid .entry-head { flex-wrap: wrap; gap: 8px; }
  .tall-grid .letter { width: 26px; height: 26px; font-size: 12px; }
  .tall-grid .name { font-size: 14px; }
  .tall-grid .score { width: 100%; text-align: left; }
  .tall-grid .score span { display: inline; margin-left: 4px; }
  .tall-grid .graders, .tall-grid .more { margin-left: 0; }
  .tall-grid .actions { flex-direction: column; align-items: flex-start; }
  .graders, .more { margin-left: 0; }
  .stats { grid-template-columns: 1fr; }
  .how-grid, .sets { grid-template-columns: 1fr; }
  .test { padding-top: 52px; }
}
@media (prefers-reduced-motion: reduce) { .set-card a:hover .art img { transform: none; } }
.results td .best { display: inline-block; min-width: 3.2em; padding: 2px 8px; margin: -3px -9px -3px 0; border: 1px solid #c9c7c1; border-radius: 999px; text-align: center; }
.results th[scope="row"] { position: sticky; left: 0; z-index: 1; background: #090909; }
@media (max-width: 640px) {
  .results { font-size: 13px; }
  .results th, .results td { padding: 10px 7px; }
}
