/* Participant screen: phone first (375px), a 480px column on laptops. Light only. */

body {
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
  padding-bottom: env(safe-area-inset-bottom);
}
#app { max-width: 480px; margin: 0 auto; min-height: 100vh; min-height: 100dvh; }

/* ---- Join: graphite band with the corner cut ---- */
.join-band { padding: calc(var(--space-12) + env(safe-area-inset-top)) var(--space-4) var(--space-12); }
.join-band .corner-cut { width: var(--corner-cut-phone); height: calc(var(--corner-cut-phone) * var(--cut-ratio)); }
/* The text box stops short of the cut's no-go zone, so long titles wrap first. */
.join-band .content { margin-right: calc(var(--corner-cut-phone) + var(--space-4)); display: grid; gap: var(--space-3); }
.join-band img { height: 28px; width: auto; display: block; margin-bottom: var(--space-4); }
.join-band .eyebrow { color: var(--teal-on-graphite); }
.join-band h1 {
  font-size: var(--t-display); line-height: var(--lh-display); font-weight: 600;
  letter-spacing: var(--track-display); color: var(--on-graphite); overflow-wrap: anywhere;
}
.join-form { display: grid; gap: var(--space-6); padding: var(--space-8) var(--space-4) var(--space-12); }
.join-note { color: var(--ink-muted); }

/* Organisation search: matches as full-width rows in a scrolling box under the box */
.org-field > label { font-weight: 500; }
.org-status { color: var(--ink-muted); }
.org-status:empty { display: none; }
.org-status.chosen { color: var(--teal-ink); font-weight: 500; }
.org-list {
  max-height: calc(var(--tap-min) * 5.5); overflow-y: auto; overscroll-behavior: contain;
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface-000);
}
.org-list[hidden] { display: none; }
.org-option {
  display: block; width: 100%; min-height: var(--tap-min); padding: var(--space-3) var(--space-4);
  border: 0; border-bottom: 1px solid var(--line); background: none;
  color: var(--ink); font-size: var(--t-body); line-height: var(--lh-body); text-align: left; cursor: pointer;
}
.org-option:last-child { border-bottom: 0; }
.org-option:active { background: var(--surface-200); }

/* ---- Statements (waiting, finished) ---- */
.statement { padding: var(--space-16) var(--space-4) var(--space-12); display: grid; gap: var(--space-4); }
.statement h1 {
  font-size: var(--t-display); line-height: var(--lh-display); font-weight: 600;
  letter-spacing: var(--track-display); overflow-wrap: anywhere;
}
.statement .lead { font-size: var(--t-lead); line-height: var(--lh-lead); color: var(--ink-muted); }
.statement .figure { font-size: var(--t-display); line-height: var(--lh-display); font-weight: 600; color: var(--teal-ink); }
.live-dot {
  width: var(--space-3); height: var(--space-3); background: var(--teal); margin-top: var(--space-4);
  animation: pulse 2.4s linear infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }
@media (prefers-reduced-motion: reduce) { .live-dot { animation: none; } }

/* ---- Answering ---- */
.question { padding: var(--space-6) var(--space-4) var(--space-12); display: grid; gap: var(--space-6); }
.question h1 { font-size: var(--t-title); line-height: var(--lh-title); font-weight: 600; letter-spacing: var(--track-display); overflow-wrap: anywhere; }
.options { display: grid; gap: var(--space-3); margin: 0; padding: 0; list-style: none; }
.option {
  display: flex; align-items: center; gap: var(--space-3); width: 100%;
  min-height: var(--tap-min); padding: var(--space-3) var(--space-4) var(--space-3) var(--space-3);
  border: 1px solid var(--line-strong); border-radius: var(--radius-0);
  background: var(--surface-000); color: var(--ink); text-align: left; cursor: pointer;
  transition: background var(--ease-fast), color var(--ease-fast);
}
.option .badge { width: 32px; height: 32px; }
.option .text { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.option .tag { flex: none; display: inline-flex; align-items: center; gap: var(--space-1); font-size: var(--t-small); font-weight: 600; }
/* Tapped, not yet locked in: 2px teal border (inset by 1px so nothing shifts) */
.option.picked { border-color: var(--teal); box-shadow: inset 0 0 0 1px var(--teal); background: var(--surface-100); }
/* Locked in, and the correct answer once revealed: teal fill */
.option.chosen { background: var(--teal); border-color: var(--teal); color: var(--on-teal); }
.option.chosen .badge { background: var(--surface-000); color: var(--teal-ink); }
/* The other options once something is locked in or closed */
.option.dim { color: var(--ink-muted); }
.option.dim .badge { background: var(--steel); color: var(--ink); }
/* Your answer, when it wasn't the correct one */
.option.yours { background: var(--surface-100); color: var(--ink); }
.option:disabled { cursor: default; }

.actions { display: grid; gap: var(--space-3); justify-items: start; }
.locked-note { font-weight: 500; }

.result { border-top: 3px solid var(--line-strong); padding-top: var(--space-4); display: grid; gap: var(--space-1); }
.result.correct { border-top-color: var(--teal); }
.result .headline { font-size: var(--t-lead); line-height: var(--lh-lead); font-weight: 600; display: flex; align-items: center; gap: var(--space-2); }
.result.correct .headline { color: var(--correct-ink); }
.result .score { color: var(--ink-muted); }
.info { color: var(--ink-muted); font-size: var(--t-lead); line-height: var(--lh-lead); }
