:root {
  --bg: #0f172a;
  --card: #1e293b;
  --accent: #22c55e;
  --accent-hover: #16a34a;
  --danger: #ef4444;
  --text: #f1f5f9;
  --muted: #94a3b8;
  --border: #334155;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.card {
  background: var(--card);
  border-radius: 16px;
  padding: 32px;
  max-width: 480px;
  width: 100%;
  box-shadow: 0 10px 40px rgba(0,0,0,0.4);
}

h1 { font-size: 22px; margin-top: 0; }
p.subtitle { color: var(--muted); margin-bottom: 24px; }

.progress {
  display: flex;
  gap: 6px;
  margin-bottom: 20px;
}
.progress span {
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: var(--border);
}
.progress span.active { background: var(--accent); }

.question { display: none; }
.question.active { display: block; animation: fade .2s ease-in; }

@keyframes fade { from { opacity: 0; transform: translateY(4px);} to { opacity: 1; transform: translateY(0);} }

.question h2 { font-size: 18px; margin-bottom: 16px; }

.answers { display: flex; gap: 12px; }

button.answer {
  flex: 1;
  padding: 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  font-size: 16px;
  cursor: pointer;
  transition: all .15s;
}
button.answer:hover { border-color: var(--accent); }
button.answer.yes:hover, button.answer.yes.selected { background: var(--accent); border-color: var(--accent); }
button.answer.no:hover, button.answer.no.selected { background: var(--danger); border-color: var(--danger); }

.screen { display: none; }
.screen.active { display: block; animation: fade .2s ease-in; }

.result-passed { color: var(--accent); font-weight: 600; }
.result-failed { color: var(--danger); font-weight: 600; }

.btn {
  display: block;
  width: 100%;
  padding: 14px;
  margin-top: 12px;
  border-radius: 10px;
  border: none;
  font-size: 16px;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
}

.btn-primary { background: var(--accent); color: #0f172a; font-weight: 600; }
.btn-primary:hover { background: var(--accent-hover); }

.btn-secondary { background: transparent; border: 1px solid var(--border); color: var(--text); }

input[type="tel"] {
  width: 100%;
  padding: 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #0f172a;
  color: var(--text);
  font-size: 16px;
  margin-bottom: 12px;
}

.hint { color: var(--muted); font-size: 13px; margin-top: 8px; }
.divider { text-align: center; color: var(--muted); margin: 20px 0; font-size: 13px; }
.center { text-align: center; }
.success-icon { font-size: 48px; margin-bottom: 12px; }

/* stats page */
.stats-wrap { max-width: 960px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin: 20px 0; }
.tile { background: #0f172a; border: 1px solid var(--border); border-radius: 12px; padding: 18px; }
.tile .value { font-size: 28px; font-weight: 700; }
.tile .label { color: var(--muted); font-size: 13px; margin-top: 4px; }
table { width: 100%; border-collapse: collapse; margin-top: 12px; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--border); }
th { color: var(--muted); font-weight: 500; font-size: 13px; }
.updated-at { color: var(--muted); font-size: 12px; margin-top: 16px; }
