/* BNHR Quizzes. The brand's tokens (brand/tokens.css) mapped onto the page: core-light for the light theme, core-dark
   for the dark one, following the system setting. Right and wrong are this site's own tokens; they are never the
   only signal (every mark also has a word). */

:root {
  --bg: var(--core-light-bg);
  --surface: var(--core-light-surface);
  --ink: var(--core-light-ink);
  --muted: var(--core-light-muted);
  --subtle: var(--core-light-subtle);
  --rule: var(--core-light-rule);
  --hair: var(--core-light-hair);
  --accent: var(--bnhr-orange);
  --on-accent: var(--bnhr-navy);
  --focus: #b35c00;
  --right: #17663d;
  --right-tint: #e5f3ea;
  --wrong: #a3241b;
  --wrong-tint: #fbe9e7;
  --caution-tint: #fff6cc;
  --radius: 10px;
  --shadow: 0 1px 2px rgb(12 35 64 / 6%), 0 2px 8px rgb(12 35 64 / 5%);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: var(--core-dark-bg);
    --surface: var(--core-dark-surface);
    --ink: var(--core-dark-ink);
    --muted: var(--core-dark-muted);
    --subtle: var(--core-dark-subtle);
    --rule: var(--core-dark-rule);
    --hair: var(--core-dark-hair);
    --focus: var(--bnhr-orange);
    --right: #7dd9a3;
    --right-tint: #12402f;
    --wrong: #ff9f94;
    --wrong-tint: #4a1f25;
    --caution-tint: #3d3a1a;
    --shadow: none;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--bnhr-font-text);
}

main.page {
  flex: 1;
  width: 100%;
  max-width: 46rem;
  margin: 0 auto;
  padding: 2rem 1rem 4rem;
}

h1, h2, h3 {
  font-family: var(--bnhr-font-display);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0 0 0.5rem;
}
h1 { font-size: clamp(1.9rem, 1.5rem + 2vw, 2.6rem); }
h2 { font-size: 1.4rem; }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0 0 0.75rem; }
a { color: inherit; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 3px; }
code, pre { font-family: var(--bnhr-font-mono); font-size: 0.92em; }
:not(pre) > code { background: var(--hair); border-radius: 4px; padding: 0.05em 0.3em; overflow-wrap: anywhere; }
pre {
  background: var(--hair);
  border-radius: 8px;
  padding: 0.75rem 0.9rem;
  margin: 0.5rem 0 0.75rem;
  overflow-x: auto;
  line-height: 1.45;
}

:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
[tabindex="-1"]:focus { outline: none; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -3rem;
  z-index: 10;
  background: var(--accent);
  color: var(--on-accent);
  padding: 0.5rem 0.9rem;
  border-radius: 6px;
  font-weight: 700;
}
.skip:focus { top: 0.75rem; }

/* Top bar and footer */

.topbar { border-bottom: 1px solid var(--hair); background: var(--surface); }
.topbar .inner, footer.site .inner {
  max-width: 46rem;
  margin: 0 auto;
  padding: 0.65rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.brand { display: inline-flex; align-items: center; gap: 0.6rem; text-decoration: none; }
.brand img { height: 1.6rem; width: auto; display: block; }
.brand .name {
  font-family: var(--bnhr-font-mono);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--subtle);
  border-left: 1px solid var(--rule);
  padding-left: 0.6rem;
}
.topbar nav { display: flex; gap: 0.25rem; }
.topbar nav a {
  text-decoration: none;
  padding: 0.4rem 0.7rem;
  border-radius: 6px;
  font-weight: 500;
  color: var(--muted);
}
.topbar nav a:hover { background: var(--hair); color: var(--ink); }
.topbar nav a[aria-current="page"] { color: var(--ink); box-shadow: inset 0 -3px 0 var(--accent); border-radius: 6px 6px 0 0; }

footer.site { border-top: 1px solid var(--hair); color: var(--subtle); font-size: 0.9rem; }
footer.site .inner { padding: 1.5rem 1rem 2rem; display: grid; grid-template-columns: auto 1fr; gap: 0.25rem 1rem; }
footer.site .mark { grid-row: span 2; align-self: start; }
footer.site .mark img { height: 2.25rem; width: auto; display: block; }
footer.site .tagline { font-family: var(--bnhr-font-display); font-weight: 800; color: var(--ink); letter-spacing: -0.01em; margin: 0; }
footer.site .credit { margin: 0; }

/* Shared pieces */

.kicker {
  font-family: var(--bnhr-font-mono);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--subtle);
  margin: 0 0 0.4rem;
}
.lede { font-size: 1.15rem; color: var(--muted); max-width: 38rem; }
.muted { color: var(--subtle); }
.page-head { margin-bottom: 2rem; }

.pill {
  display: inline-block;
  background: var(--accent);
  color: var(--on-accent);
  font-family: var(--bnhr-font-mono);
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  vertical-align: middle;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--hair);
  border-radius: var(--radius);
  padding: 1.25rem 1.25rem 0.75rem;
  margin: 0 0 1.5rem;
  box-shadow: var(--shadow);
}
.panel.quiet { background: transparent; box-shadow: none; border-style: dashed; border-color: var(--rule); }
.panel.done { border-left: 6px solid var(--accent); }
.panel h2 { font-size: 1.3rem; }

.warning {
  background: var(--caution-tint);
  border-left: 4px solid var(--bnhr-hazard);
  padding: 0.6rem 0.85rem;
  border-radius: 6px;
}
.notice-inline { color: var(--muted); font-style: italic; }
.notice { padding-top: 1rem; }
.choices { list-style: none; padding: 0; display: grid; gap: 0.6rem; margin: 0.5rem 0 1.25rem; }
.choices .button { width: 100%; justify-content: flex-start; text-align: left; }
.choices .button.choice { flex-direction: column; align-items: flex-start; gap: 0.15rem; }
.choices-title { margin: 1.25rem 0 0; }
.choice-meta { font-family: var(--bnhr-font-mono); font-size: 0.8rem; font-weight: 400; color: var(--subtle); }

.actions { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; margin: 1rem 0 0.5rem; }

.button {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 2.9rem;
  padding: 0.6rem 1.2rem;
  border: 2px solid var(--accent);
  border-radius: 8px;
  background: var(--accent);
  color: var(--on-accent);
  font: 700 1rem/1.2 var(--bnhr-font-text);
  text-decoration: none;
  cursor: pointer;
}
.button:hover { filter: brightness(1.05); }
.button:disabled { opacity: 0.6; cursor: progress; }
.button.unavailable:disabled { opacity: 0.45; cursor: not-allowed; } /* a send button whose link or address is still blank */
.button.secondary { background: transparent; color: var(--ink); border-color: var(--rule); }
.button.secondary:hover { border-color: var(--ink); filter: none; }
.button.small { min-height: 2.75rem; padding: 0.45rem 1rem; font-size: 0.9rem; }
.button.link { background: none; border: none; color: var(--muted); text-decoration: underline; text-decoration-color: var(--rule); padding-inline: 0.4rem; }
.button.link:hover { color: var(--ink); filter: none; }
.button.danger { background: var(--wrong); border-color: var(--wrong); color: var(--surface); }
.button.link.danger { background: none; color: var(--wrong); }

/* Home page */

.steps { list-style: none; counter-reset: step; padding: 0; margin: 0 0 2rem; display: grid; gap: 1rem; }
.steps li { counter-increment: step; position: relative; padding-left: 3.25rem; }
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0; top: 0;
  width: 2.25rem; height: 2.25rem;
  display: grid; place-items: center;
  border-radius: 8px;
  background: var(--accent);
  color: var(--on-accent);
  font: 800 1.1rem/1 var(--bnhr-font-display);
}
.steps h2 { font-size: 1.1rem; margin: 0.25rem 0 0.25rem; }
.steps p { color: var(--muted); margin: 0; }

/* One section per delivery: its title and dates open to its days and quizzes. The chevron points down when closed
   and up when open. */
.cohort {
  background: var(--surface);
  border: 1px solid var(--hair);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin: 0 0 1rem;
}
.cohort > summary {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  list-style: none;
  cursor: pointer;
  border-radius: var(--radius);
}
.cohort > summary::-webkit-details-marker { display: none; }
.cohort > summary::after {
  content: "";
  width: 0.6rem; height: 0.6rem;
  margin: 0 0.3rem 0.3rem;
  border: solid var(--muted);
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg);
  transition: transform 120ms ease;
}
.cohort[open] > summary::after { transform: rotate(-135deg); margin-block: 0.3rem 0; }
.cohort > summary:hover::after { border-color: var(--ink); }
.cohort > summary:hover h4 { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 0.18em; }
.survey-link { margin-top: 0.6rem; }
.survey-link summary { cursor: pointer; color: var(--muted); font-size: 0.92rem; }
.survey-link .field { margin-top: 0.5rem; }
.names-tag { margin-left: 0.4rem; padding: 0 0.35rem; border-radius: 4px; background: var(--caution-tint); font-family: var(--bnhr-font-mono); font-size: 0.72rem; font-weight: 600; text-transform: uppercase; }
.who-sees { margin: 1.5rem 0 0.5rem; padding: 0.75rem 1rem; border: 1px dashed var(--rule); border-radius: 8px; color: var(--muted); font-size: 0.95rem; }
.group-note { margin: 0 0 1rem; max-width: 40rem; }
.cohort-group + .cohort-group { margin-top: 2rem; }
.cohort-group > .kicker { margin-bottom: 0.75rem; }
.cohort-head h4 { margin: 0; font: 700 1.15rem/1.15 var(--bnhr-font-display); letter-spacing: -0.02em; }
.cohort > .days { padding: 0 1.25rem 0.5rem; }
.days, .day-quizzes, .cards { list-style: none; padding: 0; margin: 0; }
.days > li { border-top: 1px solid var(--hair); padding: 1.25rem 0 0.5rem; }
.days > li > .kicker { margin-bottom: 0.25rem; }
/* One row per quiz, the same for tests and check-ins: title and what it is on the left, its buttons on the right
   (below, at full width, on a phone). Buttons share one width so the columns line up from row to row. */
.day-quizzes > li {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 0.75rem 1.5rem;
  padding: 0.9rem 0;
}
.day-quizzes > li + li { border-top: 1px dashed var(--hair); }
.quiz-title { display: block; font-weight: 700; line-height: 1.3; }
.quiz-meta { display: block; margin-top: 0.2rem; font-family: var(--bnhr-font-mono); font-size: 0.8rem; color: var(--subtle); }
.rounds { display: grid; grid-auto-flow: column; grid-auto-columns: 8.5rem; gap: 0.6rem; justify-content: end; }
.rounds .button { width: 100%; }
@media (max-width: 34rem) {
  .cohort > summary, .cohort > .days { padding-inline: 1rem; }
  .day-quizzes > li { grid-template-columns: 1fr; gap: 0.65rem; }
  .rounds { grid-auto-columns: 1fr; justify-content: stretch; }
}

/* Quiz page */

.quiz-head { margin-bottom: 1.5rem; }
.quiz-head .meta { display: flex; align-items: center; gap: 0.75rem; color: var(--subtle); font-family: var(--bnhr-font-mono); font-size: 0.85rem; }

.error-summary {
  border: 2px solid var(--wrong);
  background: var(--wrong-tint);
  border-radius: var(--radius);
  padding: 1rem 1.25rem 0.5rem;
  margin-bottom: 1.5rem;
}
.error-summary h2 { font-size: 1.1rem; }
.error-summary a { color: var(--wrong); font-weight: 700; }

.who {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  background: var(--surface);
  border: 1px solid var(--hair);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow);
}

.field label { display: block; font-weight: 700; margin-bottom: 0.15rem; }
/* Name and table/group side by side: label, hint, box and error each share a row, so the boxes line up whatever
   the hints wrap to and whichever field shows an error. */
@supports (grid-template-rows: subgrid) {
  .who { row-gap: 0; }
  .who .field { display: grid; grid-row: span 4; grid-template-rows: subgrid; align-content: start; }
  .who .field .hint { align-self: start; }
}
.field .hint { color: var(--subtle); font-size: 0.92rem; margin-bottom: 0.4rem; }
.field input {
  width: 100%;
  min-height: 2.9rem;
  padding: 0.55rem 0.75rem;
  border: 2px solid var(--rule);
  border-radius: 8px;
  background: var(--bg);
  color: var(--ink);
  font: 400 1.05rem/1.3 var(--bnhr-font-text);
}
.field input:focus-visible { border-color: var(--focus); outline-offset: 0; }
.field input[aria-invalid] { border-color: var(--wrong); }
.field-error { color: var(--wrong); font-weight: 700; margin: 0.35rem 0 0; min-height: 0; }
.field-error:empty { display: none; }
.field.inline { display: flex; flex-wrap: wrap; align-items: end; gap: 0.6rem; }
.field.inline label { flex-basis: 100%; }
.field.inline input { flex: 1 1 14rem; width: auto; font-family: var(--bnhr-font-mono); }

.question { margin: 0 0 2.25rem; }
.qnum {
  font-family: var(--bnhr-font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--subtle);
  margin-bottom: 0.35rem;
}
.qtype {
  margin-left: 0.6rem;
  padding-left: 0.6rem;
  border-left: 1px solid var(--rule);
  color: var(--muted);
}
.round-link { text-transform: uppercase; letter-spacing: 0.04em; font-family: var(--bnhr-font-mono); font-weight: 600; }
.stem { font-size: 1.1rem; font-weight: 500; margin-bottom: 0.75rem; }
.stem p:last-child { margin-bottom: 0; }
.stem pre { font-weight: 400; font-size: 0.88rem; }

.options { display: grid; gap: 0.5rem; padding: 0; margin: 0; list-style: none; }
.option {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 0.75rem;
  padding: 0.75rem 0.9rem;
  border: 2px solid var(--hair);
  border-radius: var(--radius);
  background: var(--surface);
  cursor: pointer;
  transition: border-color 120ms ease, background-color 120ms ease;
}
.option:hover { border-color: var(--rule); }
.option input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.option .letter {
  display: grid;
  place-items: center;
  width: 2rem; height: 2rem;
  border-radius: 6px;
  border: 2px solid var(--rule);
  font: 600 0.95rem/1 var(--bnhr-font-mono);
  color: var(--subtle);
  flex-shrink: 0;
}
.option .text { align-self: center; overflow-wrap: anywhere; }
.option:has(input:checked) { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 9%, var(--surface)); }
.option:has(input:checked) .letter { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.option:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }

.submit-bar {
  position: sticky;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1rem;
  margin: 0 -1rem;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(6px);
  border-top: 1px solid var(--hair);
}
.progress { margin: 0; font-family: var(--bnhr-font-mono); font-size: 0.9rem; color: var(--subtle); }

.filename { font-family: var(--bnhr-font-mono); font-weight: 600; overflow-wrap: anywhere; }

/* The reveal */

.score { display: flex; align-items: baseline; gap: 0.4rem; margin: 0.25rem 0 0.5rem; }
.score .big { font: 800 3.5rem/1 var(--bnhr-font-display); letter-spacing: -0.03em; }
.score .of { font-size: 1.15rem; color: var(--muted); }
.compare { font-size: 1.05rem; }

.review { list-style: none; padding: 0; margin: 1.5rem 0 0.5rem; display: grid; gap: 1.25rem; }
.review .item { border-top: 1px solid var(--hair); padding-top: 1.25rem; }
.item-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.item-head .qnum { margin: 0; }
.tag {
  font-family: var(--bnhr-font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  border: 1.5px solid currentColor;
}
.tag.right { color: var(--right); }
.tag.wrong { color: var(--wrong); }
.tag.blank { color: var(--subtle); }
.letter-inline { font-family: var(--bnhr-font-mono); font-weight: 600; color: var(--subtle); }
.tag.unscored { color: var(--muted); border-style: dashed; }

/* Several and written answers: what to do under the stem, the text box, and the answer as written. */
.answer-hint { font-size: 0.92rem; color: var(--subtle); margin: 0.35rem 0 0; }
.written textarea {
  width: 100%;
  min-height: 7rem;
  padding: 0.6rem 0.75rem;
  border: 2px solid var(--rule);
  border-radius: 8px;
  background: var(--bg);
  color: var(--ink);
  font: 400 1.05rem/1.45 var(--bnhr-font-text);
  resize: vertical;
}
.written textarea:focus-visible { border-color: var(--focus); outline-offset: 0; }
.written-answer { margin-top: 0.75rem; padding: 0.6rem 0.9rem; border: 1px solid var(--hair); border-radius: 8px; background: var(--surface); }
.written-answer.before { border-style: dashed; background: transparent; }
.written-text { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; }

.option.static { cursor: default; grid-template-columns: auto 1fr; }
.option.static:hover { border-color: var(--hair); }
.option.static.is-correct { border-color: var(--right); background: var(--right-tint); }
.option.static.is-correct .letter { border-color: var(--right); background: var(--right); color: var(--surface); }
.option.static.is-wrong { border-color: var(--wrong); background: var(--wrong-tint); }
.option.static.is-wrong .letter { border-color: var(--wrong); color: var(--wrong); }
.notes { grid-column: 2; display: flex; flex-wrap: wrap; gap: 0.35rem; }
.note {
  font-family: var(--bnhr-font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 0.1rem 0.45rem;
  border-radius: 4px;
  background: var(--hair);
  color: var(--muted);
}
.note.right { background: var(--right); color: var(--surface); }
.note.wrong { background: var(--wrong); color: var(--surface); }
.note.before { background: transparent; border: 1px dashed var(--rule); }

.why {
  margin-top: 0.75rem;
  padding: 0.75rem 1rem 0.25rem;
  border-left: 4px solid var(--accent);
  background: color-mix(in srgb, var(--accent) 7%, transparent);
  border-radius: 0 8px 8px 0;
}
.why-label { font-family: var(--bnhr-font-mono); font-size: 0.78rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--subtle); margin-bottom: 0.25rem; }

/* Check-ins: the traffic light. The colour is never the only signal; each option names it. */

:root { --green: #1f8a4c; --yellow: #e0b400; --red: #c0392b; }
.lights { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px dashed var(--rule); }
.option.light .dot, .light-said .dot {
  width: 1.25rem; height: 1.25rem;
  margin: 0.35rem 0.375rem;
  border-radius: 50%;
  border: 2px solid var(--surface);
  box-shadow: 0 0 0 2px var(--rule);
}
.green .dot { background: var(--green); }
.yellow .dot { background: var(--yellow); }
.red .dot { background: var(--red); }
.option.light:has(input:checked) { background: var(--surface); }
.option.light.green:has(input:checked) { border-color: var(--green); }
.option.light.yellow:has(input:checked) { border-color: var(--yellow); }
.option.light.red:has(input:checked) { border-color: var(--red); }
.option.light:has(input:checked) .dot { box-shadow: 0 0 0 3px var(--ink); }
.light-said { display: flex; align-items: center; gap: 0.25rem; font-weight: 700; }
.light-said .dot { margin: 0 0.4rem 0 0; flex-shrink: 0; }

/* Practice */

.practice-invite {
  margin: 1rem 0 0.5rem;
  padding: 1rem 1.1rem 0.25rem;
  border: 1px dashed var(--rule);
  border-radius: var(--radius);
}
.practice-invite .button { margin-bottom: 0.75rem; }
.practice-head { border-left: 6px solid var(--accent); }
.feedback:empty { display: none; }
.feedback { margin-top: 0.75rem; }
.feedback .tag { display: inline-block; margin: 0 0 0.25rem; }
.question.answered-right .option:has(input:checked) { border-color: var(--right); background: var(--right-tint); }
.question.answered-right .option:has(input:checked) .letter { background: var(--right); border-color: var(--right); color: var(--surface); }
.question.answered-wrong .option:has(input:checked) { border-color: var(--wrong); background: var(--wrong-tint); }
.question.answered-wrong .option:has(input:checked) .letter { background: var(--wrong); border-color: var(--wrong); color: var(--surface); }

/* Results page */

.cards { display: grid; gap: 1rem; }
.card {
  background: var(--surface);
  border: 1px solid var(--hair);
  border-radius: var(--radius);
  padding: 1rem 1.25rem 0.5rem;
  box-shadow: var(--shadow);
}
.card h3 { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.score-line { font-size: 1.05rem; }

/* Summary page (facilitators): the setup form, then the room view for the projector and the facilitator view.
   Bars always carry their number in text; the colour only tells before from after, and each bar is labelled. */

body.wide main.page, body.wide .topbar .inner, body.wide footer.site .inner { max-width: 68rem; }
:root { --before: var(--rule); }

.setup { display: grid; gap: 1.1rem; padding-bottom: 1rem; max-width: 46rem; }
.setup .actions { margin: 0; }
.field select {
  width: 100%;
  min-height: 2.9rem;
  padding: 0.5rem 0.75rem;
  border: 2px solid var(--rule);
  border-radius: 8px;
  background: var(--bg);
  color: var(--ink);
  font: 400 1.05rem/1.3 var(--bnhr-font-text);
}
.field .label { font-weight: 700; margin-bottom: 0.4rem; }
.dropzone {
  border: 2px dashed var(--rule);
  border-radius: var(--radius);
  padding: 1.1rem 1.1rem 0.4rem;
  text-align: center;
  transition: border-color 120ms ease, background-color 120ms ease;
}
.dropzone.over { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, transparent); }
.dropzone .actions { justify-content: center; margin-top: 0.25rem; }
.dropzone-title { font-weight: 700; margin-bottom: 0.15rem; }
.files-added { margin: 0.6rem 0 0; }

.summary-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  padding-bottom: 1rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--hair);
}
.summary-bar .actions { margin: 0; }
.view-switch { display: inline-flex; border: 2px solid var(--rule); border-radius: 8px; overflow: hidden; }
.view-switch button {
  appearance: none;
  min-height: 2.6rem;
  padding: 0.45rem 1rem;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: 700 0.95rem/1.2 var(--bnhr-font-text);
  cursor: pointer;
}
.view-switch button + button { border-left: 2px solid var(--rule); }
.view-switch button[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); }

.room { background: var(--bg); }
.room:fullscreen { overflow-y: auto; padding: 2.5rem clamp(1.5rem, 5vw, 5rem); font-size: 1.2rem; }
.room-head { margin-bottom: 1.25rem; }
.room-head h2 { font-size: clamp(1.9rem, 1.4rem + 2vw, 2.8rem); }
.room-head .meta { font-family: var(--bnhr-font-mono); font-size: 0.9rem; color: var(--subtle); }

.headline { display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: 1rem; margin: 0 0 1rem; }
.stat {
  background: var(--surface);
  border: 1px solid var(--hair);
  border-radius: var(--radius);
  padding: 1rem 1.25rem 0.5rem;
  box-shadow: var(--shadow);
}
.stat.after { border-top: 6px solid var(--accent); }
.stat.before { border-top: 6px solid var(--before); }
.stat.change { border-top: 6px solid var(--ink); }
.stat-label { font-family: var(--bnhr-font-mono); font-size: 0.8rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--subtle); margin-bottom: 0.2rem; }
.stat-value { font: 800 clamp(2.6rem, 2rem + 3vw, 4rem)/1 var(--bnhr-font-display); letter-spacing: -0.03em; margin-bottom: 0.35rem; }
.stat-note { color: var(--muted); font-size: 0.95rem; }
.both { font-size: 1.1rem; }

.room-block { border-top: 1px solid var(--hair); padding-top: 1.5rem; margin-top: 1.75rem; }
.room-block h3 { font-size: 1.35rem; margin-bottom: 1rem; }
.bar-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; }
.bar-list.compact { grid-template-columns: repeat(auto-fill, minmax(19rem, 1fr)); gap: 0.85rem 2rem; }
.bar-title { font-weight: 700; margin-bottom: 0.3rem; display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.bar-title .muted { font-weight: 400; }
.bars { display: grid; gap: 0.3rem; }
.bar-row { display: grid; grid-template-columns: 6.5rem 1fr 3.5rem; align-items: center; gap: 0.6rem; }
.bar-label { font-family: var(--bnhr-font-mono); font-size: 0.8rem; color: var(--subtle); }
.bar { display: block; height: 0.85rem; border-radius: 999px; background: var(--hair); overflow: hidden; }
.bar .fill { display: block; height: 100%; border-radius: 999px; background: var(--accent); }
.bar-row.before .fill { background: var(--before); }
/* A check-in's traffic lights: one bar per light, with how many chose it. */
.bar-row.light { grid-template-columns: 1fr 6.5rem; }
.bar-row.tally { grid-template-columns: 1fr 6.5rem; } /* a survey's count: no label column */
.bar-row.green .fill { background: var(--green); }
.bar-row.yellow .fill { background: var(--yellow); }
.bar-row.red .fill { background: var(--red); }
.bar-value { font-family: var(--bnhr-font-mono); font-weight: 600; font-size: 0.9rem; text-align: right; }
.compact .bar { height: 0.6rem; }

.missed-top { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.5rem 1rem; }
.missed-nav { display: flex; gap: 0.5rem; }
.missed { margin-top: 0.25rem; }
.missed-stat { font-size: 1.1rem; }
.missed .stem { font-size: 1.25rem; }
.option.choice { grid-template-columns: auto 1fr; }
.option .chose { grid-column: 2; display: grid; grid-template-columns: minmax(6rem, 1fr) auto auto; align-items: center; gap: 0.6rem; }
.option .chose .bar { height: 0.6rem; }
.option .chose .bar-value { text-align: left; font-weight: 500; color: var(--muted); }
.option.is-correct .chose .fill { background: var(--right); }
.option:not(.is-correct) .chose .fill { background: var(--rule); }

.facilitator h3 { margin-top: 2rem; }
.table-scroll { overflow-x: auto; margin: 0 0 0.75rem; border: 1px solid var(--hair); border-radius: var(--radius); }
table.data { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
table.data th, table.data td { padding: 0.5rem 0.75rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--hair); }
table.data th { font-family: var(--bnhr-font-mono); font-size: 0.78rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--subtle); background: var(--surface); }
table.data tbody tr:last-child td { border-bottom: 0; }
table.data .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

@media (max-width: 34rem) {
  .bar-row { grid-template-columns: 5rem 1fr 3rem; }
  .option .chose { grid-template-columns: 1fr auto; }
  .option .chose .note { grid-column: 1 / -1; justify-self: start; }
}

/* Dialog */

.dialog {
  max-width: min(32rem, calc(100vw - 2rem));
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  padding: 1.5rem 1.5rem 1rem;
  box-shadow: 0 12px 40px rgb(0 0 0 / 25%);
}
.dialog::backdrop { background: rgb(12 35 64 / 55%); }
.dialog h2 { font-size: 1.3rem; }
.dialog .actions { justify-content: flex-end; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}

@media (max-width: 30rem) {
  body { font-size: 1rem; }
  .submit-bar { flex-direction: column; align-items: stretch; text-align: center; }
  .actions .button { flex: 1 1 auto; }
}
