/*
 * Phone first. Big tap targets, one column, the course's blue as the only
 * colour, and nothing that has to load from elsewhere.
 */
:root {
  --blue: #002f6c;
  --blue-soft: #e6ecf5;
  --ink: #1f2430;
  --ink-soft: #6b7280;
  --paper: #fbfbfe;
  --rule: #d9deeb;
  --ok: #0d9488;
  --bad: #e11d48;
  color-scheme: light;
}

* { box-sizing: border-box; }

html, body { margin: 0; }

body {
  min-height: 100dvh;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-text-size-adjust: 100%;
}

.bar {
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px max(16px, env(safe-area-inset-left));
  background: var(--blue);
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.conn {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0;
  color: #ffd479;
}

main {
  max-width: 560px;
  margin: 0 auto;
  padding: 20px 16px 40px;
}

.hint {
  margin-top: 30vh;
  text-align: center;
  color: var(--ink-soft);
}

.question {
  margin: 0 0 6px;
  font-size: 21px;
  line-height: 1.3;
}

.meta {
  margin: 0 0 16px;
  color: var(--ink-soft);
  font-size: 14px;
}

code {
  padding: 0.05em 0.3em;
  border-radius: 4px;
  background: var(--blue-soft);
  font: 0.92em ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.options { display: grid; gap: 10px; }

.option {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 12px 14px;
  border: 2px solid var(--rule);
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
  cursor: pointer;
}

.option.picked { border-color: var(--blue); }

.option input {
  position: relative;
  z-index: 1;
  flex: none;
  width: 22px;
  height: 22px;
  margin: 0;
  accent-color: var(--blue);
}

.option .text { position: relative; z-index: 1; flex: 1; }

.option .share {
  position: relative;
  z-index: 1;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

/* the result bar sits behind the option's text */
.option .bar {
  position: absolute;
  inset: 0 auto 0 0;
  background: var(--blue-soft);
  transition: width 0.4s ease;
}

/* after the reveal: the right options, and the voter's own verdict */
.option.correct { border-color: var(--ok); }
.option.correct .bar { background: color-mix(in srgb, var(--ok) 16%, #fff); }
.option.wrong { opacity: 0.75; }

.option .tick {
  position: relative;
  z-index: 1;
  color: var(--ok);
  font-weight: 800;
}

.verdict {
  margin-top: 18px;
  padding: 12px 14px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--bad) 10%, #fff);
  color: var(--bad);
  font-weight: 600;
}

.verdict.right {
  background: color-mix(in srgb, var(--ok) 12%, #fff);
  color: var(--ok);
}

.submit {
  width: 100%;
  margin-top: 18px;
  padding: 15px;
  border: 0;
  border-radius: 12px;
  background: var(--blue);
  color: #fff;
  font: inherit;
  font-weight: 700;
}

.submit:disabled { opacity: 0.4; }

.status {
  margin-top: 14px;
  color: var(--ok);
  font-size: 15px;
}

.error {
  margin-top: 14px;
  color: var(--bad);
  font-size: 15px;
}
