:root {
  --bg: #12151a;
  --panel: #1a1f27;
  --panel-2: #222935;
  --line: #2e3744;
  --text: #e6eaf0;
  --dim: #9aa6b6;
  --accent: #5b9dd9;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  padding: 0 16px 56px;
}

header {
  width: 100%;
  max-width: 760px;
  padding: 34px 0 18px;
  text-align: center;
}
header h1 { margin: 0 0 6px; font-size: 27px; letter-spacing: -0.4px; }
header p { margin: 0; color: var(--dim); font-size: 15px; }

main { width: 100%; max-width: 760px; }

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 24px;
}

/* ---- progress ---- */
.progress { height: 5px; background: var(--panel-2); border-radius: 3px; overflow: hidden; margin-bottom: 20px; }
.progress > div { height: 100%; background: var(--accent); width: 0; transition: width .2s ease; }
.count { color: var(--dim); font-size: 13px; text-align: center; margin: 0 0 18px; letter-spacing: .3px; }

/* ---- question ---- */
.statement { font-size: 21px; line-height: 1.4; margin: 0 0 26px; min-height: 88px; }
.choices { display: flex; flex-direction: column; gap: 9px; }
.choices button {
  font: inherit;
  text-align: left;
  color: var(--text);
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 13px 16px;
  cursor: pointer;
  transition: background .12s, border-color .12s, transform .06s;
}
.choices button:hover { background: #29323f; border-color: #3d4a5c; }
.choices button:active { transform: translateY(1px); }
.choices button.picked { border-color: var(--accent); background: #22344a; }

.nav { display: flex; justify-content: space-between; align-items: center; margin-top: 20px; }
.nav button, .btn {
  font: inherit;
  color: var(--dim);
  background: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 16px;
  cursor: pointer;
  text-decoration: none;
}
.nav button:hover, .btn:hover { color: var(--text); border-color: #3d4a5c; }
.nav button[disabled] { opacity: .35; cursor: default; }
.btn.primary { color: #fff; background: var(--accent); border-color: var(--accent); }
.btn.primary:hover { background: #6faae2; }

/* ---- compass ---- */
.compass { width: 100%; height: auto; display: block; }
.compass .grid { stroke: rgba(255,255,255,.12); stroke-width: 1; }
.compass .axis { stroke: rgba(255,255,255,.55); stroke-width: 1.5; }
.compass .frame { fill: none; stroke: rgba(255,255,255,.35); stroke-width: 1.5; }
.compass .axlabel { fill: var(--dim); font-size: 13px; font-family: inherit; letter-spacing: .5px; }
.compass .dotlabel { fill: #fff; font-size: 12px; font-family: inherit; paint-order: stroke; stroke: rgba(0,0,0,.65); stroke-width: 3px; }
.compass .mid { text-anchor: middle; }
.compass .end { text-anchor: end; dominant-baseline: middle; }
.compass .start { text-anchor: start; dominant-baseline: middle; }
.compass .dot { fill: #fff; stroke: #12151a; stroke-width: 2; }
.compass .dot.you { fill: #ffd34d; stroke: #12151a; stroke-width: 3; }

/* ---- result ---- */
.verdict { text-align: center; margin: 4px 0 22px; }
.verdict h2 { margin: 0 0 8px; font-size: 30px; letter-spacing: -0.5px; }
.verdict p { margin: 0 auto; max-width: 52ch; color: var(--dim); }
.scores { display: flex; gap: 12px; justify-content: center; margin: 22px 0 6px; flex-wrap: wrap; }
.scores div {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 10px 18px;
  text-align: center;
  min-width: 190px;
}
.scores span { display: block; color: var(--dim); font-size: 12px; text-transform: uppercase; letter-spacing: .7px; }
.scores b { font-size: 19px; font-weight: 600; }

.share { margin-top: 24px; text-align: center; }
.share input {
  font: 14px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace;
  width: 100%;
  max-width: 460px;
  color: var(--dim);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 12px;
  text-align: center;
}
.actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 18px; }

.signin { margin: 26px 0 0; text-align: center; }
.signin label { display: block; color: var(--dim); font-size: 14px; margin-bottom: 9px; }
.signin form { display: flex; gap: 9px; justify-content: center; flex-wrap: wrap; }
.signin input[type=text] {
  font: inherit;
  color: var(--text);
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 14px;
  width: 220px;
}
.note { color: var(--dim); font-size: 13px; text-align: center; margin-top: 12px; }
.note.err { color: #e08585; }

/* ---- board ---- */
table { width: 100%; border-collapse: collapse; margin-top: 26px; font-size: 15px; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); }
th { color: var(--dim); font-size: 12px; text-transform: uppercase; letter-spacing: .7px; font-weight: 600; }
td.num { font-variant-numeric: tabular-nums; color: var(--dim); }
tr.me td { color: #ffd34d; }
.empty { color: var(--dim); text-align: center; padding: 34px 0; }

footer { margin-top: 26px; color: var(--dim); font-size: 13px; text-align: center; }
footer a { color: var(--dim); }

@media (max-width: 560px) {
  .statement { font-size: 18px; min-height: 72px; }
  header h1 { font-size: 22px; }
  .verdict h2 { font-size: 24px; }
}
