:root {
  --bg: #17181a;
  --panel: #222326;
  --line: #34363a;
  --text: #e8e8e6;
  --muted: #9a9b9e;
  --accent: #4f8cff;
  --accent-text: #ffffff;
  --ok: #3fb27f;
  --warn: #e0a23a;
  --who: #ffd43b;   /* the person to watch in close-up prompts */
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; }
main { max-width: 1600px; margin: 0 auto; padding: 24px 32px 48px; }

.card {
  max-width: 760px; margin: 8vh auto 0; padding: 32px 36px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px;
  line-height: 1.55;
}
.card h1 { font-size: 24px; margin: 0 0 16px; }
.card h2 { font-size: 18px; margin: 24px 0 8px; }
.card p, .card li { color: var(--text); }
.card .muted, .muted { color: var(--muted); }
.card .prompt-box {
  margin: 16px 0; padding: 14px 16px; border-left: 3px solid var(--accent);
  background: rgba(79, 140, 255, 0.08); font-size: 17px;
}

button {
  font: inherit; font-size: 16px; padding: 10px 22px; border-radius: 6px; cursor: pointer;
  border: 1px solid var(--line); background: #2c2e32; color: var(--text);
}
button:hover:not(:disabled) { border-color: #55585e; }
button.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
button:disabled { opacity: 0.4; cursor: not-allowed; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.actions { margin-top: 24px; display: flex; justify-content: flex-end; gap: 12px; }

.choices { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 16px 0; }
.choices button.selected { border-color: var(--accent); background: rgba(79, 140, 255, 0.15); }
.error { color: var(--warn); }

/* Trial page */
.trial-head { display: flex; justify-content: space-between; align-items: baseline; gap: 24px; margin-bottom: 12px; }
.trial-head .prompt { font-size: 18px; line-height: 1.45; }
.who { color: var(--who); font-weight: 700; }
.trial-head .progress { color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }

.switcher { display: flex; gap: 0; margin-bottom: 10px; }
.switcher button {
  flex: 1; border-radius: 0; font-size: 18px; padding: 12px; position: relative;
  border-color: var(--line);
}
.switcher button:first-child { border-radius: 6px 0 0 6px; }
.switcher button:last-child { border-radius: 0 6px 6px 0; border-left: none; }
.switcher button.active { background: #3a3d43; border-color: #6b6f76; font-weight: 600; }
.switcher .bar { position: absolute; left: 0; bottom: 0; height: 3px; background: var(--ok); width: 0; transition: width 0.2s linear; }
.switcher .tick { color: var(--ok); margin-left: 8px; visibility: hidden; }
.switcher .tick.on { visibility: visible; }

.stage { position: relative; width: 100%; background: #000; border-radius: 6px; overflow: hidden; }
.stage video { display: block; width: 100%; height: auto; max-height: calc(100vh - 250px); object-fit: contain; background: #000; }
.stage video.hidden { display: none; }
.stage .label {
  position: absolute; top: 12px; left: 14px; padding: 4px 10px; border-radius: 4px;
  background: rgba(0, 0, 0, 0.6); font-size: 15px; font-weight: 600; pointer-events: none;
}
.stage .overlay {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(0, 0, 0, 0.55); font-size: 18px; cursor: pointer;
}

.vote { margin-top: 14px; display: flex; gap: 16px; align-items: center; justify-content: center; }
.vote button { min-width: 220px; font-size: 18px; padding: 12px 24px; }
.vote .hint { color: var(--muted); font-size: 14px; }

.scale { display: flex; gap: 8px; margin: 8px 0 4px; }
.scale button { width: 52px; }
.scale button.selected { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.scale-ends { display: flex; justify-content: space-between; max-width: 292px; font-size: 13px; color: var(--muted); }
textarea { width: 100%; min-height: 80px; font: inherit; padding: 8px; border-radius: 6px; border: 1px solid var(--line); background: #1b1c1f; color: var(--text); }
