/* Shared between the three pages. The stage is sized in vw/vh only, so it fills
   16:9 and 16:10 identically and the sidebar can never be cut off (§11). */

:root {
  --ink: #101418;
  --paper: #f7f5f2;
  --muted: #6b7280;
  --accent: #e4572e;
  --ok: #2f8f5b;
  --line: #d9d4cd;
  --radius: 10px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--paper);
  -webkit-text-size-adjust: 100%;
}

/* ---------- stage ---------- */

body.stage {
  height: 100vh;
  overflow: hidden;
  background: var(--ink);
  color: var(--paper);
}

.stage-grid {
  display: grid;
  grid-template-columns: 70fr 30fr;
  grid-template-rows: 1fr auto;
  height: 100vh;
}

.stage-main {
  padding: 4vh 4vw;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2.5vh;
  min-width: 0;
}

.sidebar {
  background: var(--paper);
  color: var(--ink);
  padding: 3vh 2vw;
  display: flex;
  flex-direction: column;
  gap: 1.6vh;
  overflow: hidden;
}

.sidebar .logo { height: 5vh; object-fit: contain; align-self: flex-start; }
.sidebar .brand { font-size: 2.2vh; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.sidebar .who { font-size: 3vh; font-weight: 700; }
.sidebar .photo {
  width: 100%; max-height: 22vh; object-fit: cover;
  border-radius: var(--radius); background: var(--line);
}
.sidebar .belief { font-size: 2.6vh; line-height: 1.25; font-style: italic; }
.sidebar .domains { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .6vh; }
.sidebar .domains li {
  font-size: 2.3vh; padding: .4vh .8vh; border-radius: 6px;
  transition: background 300ms ease, color 300ms ease;
}
.sidebar .domains li::before { content: "▸ "; color: var(--muted); }
.sidebar .domains li.on { background: var(--accent); color: #fff; }
.sidebar .domains li.on::before { color: #fff; }
.sidebar .qr { margin-top: auto; text-align: center; }
.sidebar .qr img { width: 100%; max-width: 20vh; background: #fff; padding: 1vh; border-radius: var(--radius); }
.sidebar .qr .caption { font-size: 2.2vh; color: var(--muted); margin-top: .5vh; }
.sidebar .qr .url { font-size: 2vh; font-weight: 600; word-break: break-all; }

.phasebar {
  grid-column: 1 / -1;
  display: flex; gap: 3vw; align-items: center;
  padding: 1.4vh 4vw;
  background: #0a0d10;
  font-size: 2.2vh; color: #7d8894;
  letter-spacing: .04em;
}
.phasebar .step.on { color: var(--paper); font-weight: 700; }

.stage-title { font-size: 6.5vh; line-height: 1.05; font-weight: 800; margin: 0; }
.stage-sub { font-size: 3.4vh; color: #9aa4b0; margin: 0; }
.stage-kicker { font-size: 2.4vh; letter-spacing: .2em; text-transform: uppercase; color: var(--accent); margin: 0; }

.statements { display: flex; flex-direction: column; gap: 2vh; margin: 0; padding: 0; list-style: none; }
.statement { border-left: .6vh solid #2a3138; padding: 1.4vh 0 1.4vh 2vw; position: relative; }
.statement .text { font-size: 3.6vh; line-height: 1.2; }
.statement .bar { height: 1.4vh; background: #2a3138; border-radius: 99px; margin-top: 1vh; overflow: hidden; }
.statement .bar span { display: block; height: 100%; background: #4a5560; transition: width 500ms ease; }
.statement .count { font-size: 2.2vh; color: #9aa4b0; margin-top: .5vh; }
.statement.lie { border-left-color: var(--accent); }
.statement.lie .bar span { background: var(--accent); }
.statement.truth { border-left-color: var(--ok); }
.statement.truth .bar span { background: var(--ok); }
.statement .verdict { font-size: 2.2vh; text-transform: uppercase; letter-spacing: .15em; margin-top: .6vh; }
.statement.lie .verdict { color: var(--accent); }
.statement.truth .verdict { color: var(--ok); }

.question-announce { font-size: 2.8vh; color: #9aa4b0; font-style: italic; }
.question-text { font-size: 6vh; line-height: 1.12; font-weight: 700; }
.question-meta { font-size: 2.4vh; color: #7d8894; }

.tally { display: flex; flex-direction: column; gap: 2.2vh; }
/* Explicitly block, because .row further down is a flex rule for the phone
   pages and would otherwise give every bar its own width - which makes three
   votes look the same length as one. */
.tally .row { display: block; }
.tally .row .label { font-size: 3.2vh; }
.tally .row .bar { height: 3vh; background: #2a3138; border-radius: 99px; overflow: hidden; margin-top: .8vh; }
.tally .row .bar span { display: block; height: 100%; background: var(--accent); transition: width 400ms ease; }
.tally .row .n { font-size: 2.4vh; color: #9aa4b0; }

.gate {
  position: fixed; inset: 0; background: var(--ink); color: var(--paper);
  display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 2vh;
  font-size: 3vh; cursor: pointer; z-index: 10; text-align: center; padding: 4vw;
}

/* ---------- phone pages (/ and /ctrl) ---------- */

.phone { max-width: 34rem; margin: 0 auto; padding: 1rem 1rem 4rem; }
.phone h1 { font-size: 1.3rem; margin: .2rem 0 1rem; }
.phone h2 { font-size: .8rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin: 1.6rem 0 .5rem; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; margin-bottom: .8rem; }
textarea, input[type=text] {
  width: 100%; font: inherit; padding: .7rem; border: 1px solid var(--line);
  border-radius: var(--radius); resize: vertical; background: #fff; color: inherit;
}
button {
  font: inherit; padding: .7rem 1rem; border-radius: var(--radius);
  border: 1px solid var(--ink); background: var(--ink); color: #fff; cursor: pointer;
}
button.ghost { background: #fff; color: var(--ink); }
button.warn { background: var(--accent); border-color: var(--accent); }
button[disabled] { opacity: .45; cursor: default; }
button.on { background: var(--ok); border-color: var(--ok); }
.row { display: flex; gap: .5rem; flex-wrap: wrap; }
.row > * { flex: 1 1 auto; }
.choices { display: flex; flex-direction: column; gap: .6rem; }
.choices button { text-align: left; padding: 1rem; }
.note { color: var(--muted); font-size: .85rem; }
.pill { display: inline-block; font-size: .75rem; padding: .1rem .5rem; border-radius: 99px; background: var(--line); color: var(--ink); }
.pill.hot { background: var(--accent); color: #fff; }
.pill.warn { background: #fde68a; }
.q { border-bottom: 1px solid var(--line); padding: .7rem 0; }
.q:last-child { border-bottom: 0; }
.q .text { font-size: 1rem; margin-bottom: .4rem; }
.q .vervolg { font-size: .85rem; color: var(--muted); font-style: italic; margin: .3rem 0; }
.q.staged { background: #fff7ed; }
.ok { color: var(--ok); font-weight: 600; }
