.top { padding-top: 3rem; padding-bottom: 2rem; }
.top h1 { font-size: clamp(2.3rem, 6vw, 4.4rem); font-weight: 700; max-width: 19ch; line-height: 0.98; }
.top .lede { max-width: 40rem; }
.verdict-lede { max-width: 40rem; font-size: 1.2rem; margin: 1rem 0 0; padding-left: 0.9rem; border-left: 3px solid var(--syntax); }

main section { margin: 0 0 4.5rem; }
.section-lede { max-width: 44rem; margin: 0 0 1rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.field { display: inline-grid; gap: 0.15rem; font: 600 0.95rem var(--display); color: var(--ink-soft); }
select, input[type="text"], textarea {
  font: 400 1rem var(--body); color: var(--ink); background: var(--paper-raised);
  border: 1px solid var(--rule); border-radius: 4px; padding: 0.35rem 0.55rem; max-width: 100%;
}
textarea { width: 100%; resize: vertical; font-family: var(--body); font-size: 1rem; }
button { font: 600 1rem var(--display); cursor: pointer; color: var(--ink); background: transparent;
  border: 1px solid var(--rule); border-radius: 4px; padding: 0.3rem 0.8rem; }
button:hover { border-color: var(--ink); }
button.primary { background: var(--ink); color: var(--paper); border-color: var(--ink); }
button.primary:hover { background: var(--pass); border-color: var(--pass); }
button:disabled { opacity: 0.45; cursor: default; }

.bench { background: var(--paper-raised); border: 1.5px solid var(--ink); border-radius: 4px; box-shadow: 6px 6px 0 var(--ink);
  padding: 1.25rem 1.4rem 1.4rem; }
.bench-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 0.75rem 1.5rem; }
.bench-head h2 { margin: 0; }
.task-desc { font-size: 1.1rem; margin: 0.75rem 0 1rem; max-width: 46rem; }
.hint { color: var(--ink-soft); font-size: 0.95rem; margin: 1rem 0 0; max-width: 46rem; }

.play-grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 1.5rem; }
.chat-col { display: grid; gap: 0.75rem; align-content: start; min-width: 0; }
.chat { display: grid; gap: 0.5rem; min-height: 10rem; max-height: 26rem; overflow-y: auto; padding: 0.75rem;
  background: var(--paper); border: 1px solid var(--rule); border-radius: 4px; align-content: start; }
.msg { max-width: 85%; padding: 0.45rem 0.7rem; border-radius: 10px; line-height: 1.45; }
.msg.them { justify-self: start; background: var(--paper-raised); border: 1px solid var(--rule); border-bottom-left-radius: 2px; }
.msg.you { justify-self: end; background: var(--ink); color: var(--paper); border-bottom-right-radius: 2px; }
.msg.dunno { border-color: var(--syntax); color: var(--syntax); }
.msg .who { display: block; font: 600 0.82rem var(--display); opacity: 0.75; }
.ask-form { display: flex; gap: 0.5rem; }
.ask-form input { flex: 1; min-width: 0; }
.answer-form { display: grid; gap: 0.4rem; }
.answer-form label { font: 600 0.95rem var(--display); color: var(--ink-soft); }
.answer-form button { justify-self: start; }
.grade:empty { display: none; }
.grade .verdict { font: 700 1.15rem var(--display); margin: 0 0 0.3rem; }
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.15rem; }
.checks li::before { content: ""; display: inline-block; width: 0.6rem; height: 0.6rem; margin-right: 0.45rem; border-radius: 50%; }
.checks li.ok::before { background: var(--pass); }
.checks li.no::before { box-shadow: inset 0 0 0 2px var(--syntax); border-radius: 1px; }

.hidden-col h3 { font-size: 1.25rem; margin-bottom: 0.5rem; }
.hidden-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.35rem; }
.hidden-list li { display: grid; grid-template-columns: 6.5rem 1fr; gap: 0.5rem; padding: 0.35rem 0; border-bottom: 1px solid var(--rule); }
.hidden-list .topic { font: 600 0.98rem var(--display); }
.hidden-list .val { color: var(--ink-soft); font-style: italic; }
.hidden-list li.found .val { color: var(--pass); font-style: normal; }
.hidden-list li.key .topic::after { content: " (needed)"; font-weight: 500; color: var(--ink-soft); }
#show-model { margin-top: 1rem; }
.model-turn { margin-top: 0.75rem; display: grid; gap: 0.45rem; }
.model-turn .msg { max-width: 100%; }

/* score */
.table-wrap { overflow-x: auto; }
table.score { min-width: 34rem; }
table.score td:not(:first-child), table.score th:not(:first-child) { text-align: right; }
table.score tr.trip td { font-weight: 600; }
table.score tr.trip td:first-child { color: var(--syntax); }
.v-pass { color: var(--pass); }
.v-fail { color: var(--syntax); }
.v-part { color: var(--wrong); }

/* replay */
.pickers { display: flex; flex-wrap: wrap; gap: 0.75rem 1rem; margin-bottom: 1rem; }
.replay { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.5rem; }
.replay.with-gold { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.replay-main, .replay-gold { min-width: 0; display: grid; gap: 0.75rem; align-content: start; }
.steps { display: grid; gap: 0.5rem; }
.step { display: grid; grid-template-columns: 6.2rem 1fr; gap: 0.7rem; align-items: start; }
.step .lab { font: 600 0.92rem var(--display); color: var(--ink-soft); text-align: right; padding-top: 0.1rem; }
.step .body { min-width: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.step.think .body { font-style: italic; color: var(--ink-soft); }
.step.ask .body { font-weight: 600; }
.step.reply .body { padding: 0.3rem 0.6rem; border: 1px solid var(--rule); border-radius: 10px; border-bottom-left-radius: 2px; background: var(--paper-raised); }
.step.reply.dunno .body { border-color: var(--syntax); color: var(--syntax); }
.step.fact .body, .step.notes .body, .step.check .body, .step.search .body, .step.result .body { font: 0.8rem/1.5 var(--mono); font-variant-ligatures: none; }
.step.result .body, .step.notes .body { color: var(--ink-soft); }
.step.answer .body, .step.text .body { border-left: 3px solid var(--ink); padding-left: 0.7rem; }
.steps.gold .step { opacity: 0.9; }
.step.match .lab { color: var(--wrong); }
.step.match .lab::after { content: "word for word"; display: block; font-weight: 500; font-size: 0.82rem; }
.gold-head { font: 600 1rem var(--display); margin: 0; }
.replay-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.outcome { font: 700 1.15rem var(--display); border-top: 1px solid var(--rule); padding-top: 0.6rem; margin: 0; }
.outcome .parts { display: block; font: 400 0.95rem var(--body); color: var(--ink-soft); margin-top: 0.2rem; }
.toggle { display: inline-flex; gap: 0.5rem; align-items: center; margin-top: 1rem; font: 600 1rem var(--display); cursor: pointer; }
.toggle input { width: 1.05rem; height: 1.05rem; accent-color: var(--ink); }

/* plain chat */
.plain-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.pane { margin: 0; min-width: 0; display: grid; gap: 0.4rem; align-content: start; }
.pane-title { font: 700 1.15rem var(--display); }
.said { margin: 0; background: var(--code-bg); border: 1px solid var(--rule); border-radius: 4px; padding: 0.75rem 0.9rem;
  font: 400 0.92rem/1.5 var(--body); white-space: pre-wrap; overflow-wrap: anywhere; max-height: 22rem; overflow-y: auto; }

.says ul { max-width: 46rem; padding-left: 1.2rem; }
.says li { margin-bottom: 0.6rem; }
.meta-line { font-family: var(--display); font-weight: 500; display: flex; flex-wrap: wrap; gap: 0.3rem 1rem; }

@media (max-width: 760px) {
  .bench { padding: 1rem; box-shadow: 4px 4px 0 var(--ink); }
  .play-grid, .plain-grid, .replay.with-gold { grid-template-columns: minmax(0, 1fr); }
  .step { grid-template-columns: 1fr; gap: 0.15rem; }
  .step .lab { text-align: left; }
  .hidden-list li { grid-template-columns: 5.5rem 1fr; }
}
.field { max-width: 100%; min-width: 0; }
.field select { width: 100%; }
.na { color: var(--ink-soft); }
