*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg: #f1f5f9;
  --white: #ffffff;
  --text: #0f172a;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --dark: #0f172a;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, sans-serif;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ── Screens ── */
.screen {
  display: none;
  min-height: 100vh;
  flex-direction: column;
  align-items: center;
  animation: fadeIn 0.3s ease both;
}

.screen.active { display: flex; }

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

/* ── Welcome ── */
#screen-welcome {
  background: var(--white);
  justify-content: center;
  padding: 56px 24px 64px;
}

.welcome-container {
  max-width: 520px;
  width: 100%;
  text-align: center;
}

.welcome-icon {
  width: 56px;
  height: 56px;
  background: #f1f5f9;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin: 0 auto 28px;
  color: var(--text);
}

h1 {
  font-size: clamp(2rem, 6vw, 2.8rem);
  font-weight: 700;
  line-height: 1.15;
  color: var(--text);
  margin-bottom: 16px;
  letter-spacing: -0.025em;
}

.subtitle {
  color: var(--text-muted);
  font-size: 0.97rem;
  line-height: 1.7;
  margin-bottom: 28px;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

.result-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 24px;
}

.preview-pill {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 50px;
  padding: 6px 16px;
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
}

.stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 36px;
}

.stats-dot { color: #cbd5e1; }

/* ── Quiz ── */
#screen-quiz {
  background: var(--bg);
  padding-bottom: 56px;
}

.quiz-topbar {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 15px 24px;
  border-bottom: 1px solid var(--border);
  background: var(--white);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.quiz-topbar-icon { color: var(--text); font-size: 0.7rem; }

.quiz-progress-row {
  width: 100%;
  max-width: 640px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 24px 8px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.progress-bar {
  width: 100%;
  max-width: 640px;
  height: 4px;
  background: var(--border);
  margin-bottom: 24px;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: var(--dark);
  transition: width 0.4s ease;
}

.quiz-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 36px 32px 28px;
  width: calc(100% - 48px);
  max-width: 640px;
}

.question-text {
  font-size: clamp(1.05rem, 3vw, 1.2rem);
  font-weight: 600;
  line-height: 1.6;
  color: var(--text);
  margin-bottom: 28px;
  text-align: center;
  font-family: 'Inter', sans-serif;
  font-style: normal;
}

/* ── Options ── */
.options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.option {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 18px;
  cursor: pointer;
  text-align: left;
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--text);
  font-family: 'Inter', sans-serif;
  transition: border-color 0.15s, background 0.15s;
  -webkit-tap-highlight-color: transparent;
  width: 100%;
}

.option:hover {
  border-color: var(--dark);
  background: #f8fafc;
}

.option:active { transform: scale(0.99); }

.option.selected {
  border-color: var(--dark);
  background: var(--dark);
  color: var(--white);
  pointer-events: none;
}

/* ── Email Screen ── */
#screen-email {
  background: var(--white);
  justify-content: center;
  padding: 56px 24px 64px;
}

.email-container {
  max-width: 480px;
  width: 100%;
  text-align: center;
}

h2 {
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
  letter-spacing: -0.02em;
  font-family: 'Inter', sans-serif;
  font-style: normal;
}

.form-subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 28px;
}

.form-group { margin-bottom: 10px; }

.form-group input {
  width: 100%;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  color: var(--text);
  font-size: 0.97rem;
  font-family: 'Inter', sans-serif;
  outline: none;
  transition: border-color 0.2s;
}

.form-group input::placeholder { color: #94a3b8; }
.form-group input:focus { border-color: var(--dark); }

#lead-form { text-align: left; }

/* ── Result Screen ── */
#screen-result {
  background: var(--bg);
  padding: 40px 24px 64px;
}

.result-container {
  max-width: 580px;
  width: 100%;
}

.score-badge {
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
  border: 1px solid var(--border);
  border-radius: 50px;
  padding: 8px 20px;
  margin-bottom: 16px;
  background: var(--white);
  font-size: 0.78rem;
  color: var(--text-muted);
}

.score-number {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 3px;
}

.result-eyebrow {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.result-title {
  font-size: clamp(2rem, 6vw, 2.8rem);
  font-weight: 700;
  color: var(--text);
  margin-bottom: 28px;
  letter-spacing: -0.025em;
  font-style: normal;
  font-family: 'Inter', sans-serif;
}

.result-body {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px 24px;
  margin-bottom: 20px;
  text-align: left;
}

.result-body h3 {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 10px;
  margin-top: 22px;
  font-family: 'Inter', sans-serif;
}

.result-body h3:first-child { margin-top: 0; }

.result-body p {
  color: var(--text);
  font-size: 0.93rem;
  line-height: 1.8;
}

.result-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 20px 0 0;
}

/* ── Area breakdown ── */
.areas-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 12px;
}

.area-item { display: flex; flex-direction: column; gap: 6px; }

.area-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.area-name {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text);
}

.area-score {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.area-bar {
  height: 5px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
}

.area-fill {
  height: 100%;
  background: var(--dark);
  border-radius: 4px;
  transition: width 0.6s ease;
}

.area-highlights {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
}

.highlight-card {
  border-radius: 10px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.highlight-best {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
}

.highlight-work {
  background: #fff7ed;
  border: 1px solid #fed7aa;
}

.highlight-label {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.highlight-best .highlight-label { color: #16a34a; }
.highlight-work .highlight-label { color: #ea580c; }

.highlight-value {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
}

.highlight-desc {
  font-size: 0.82rem;
  line-height: 1.6;
  color: var(--text);
  margin-top: 2px;
  font-weight: 400;
}

/* ── Buttons ── */
.btn-primary {
  display: block;
  width: 100%;
  background: var(--dark);
  color: var(--white);
  border: none;
  border-radius: 10px;
  padding: 16px 32px;
  font-size: 0.97rem;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: opacity 0.2s;
  letter-spacing: 0.01em;
  text-decoration: none;
  text-align: center;
  margin-top: 12px;
}

.btn-primary:hover { opacity: 0.85; }
.btn-primary:disabled { opacity: 0.45; cursor: not-allowed; }

.btn-secondary {
  display: block;
  width: 100%;
  background: var(--white);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 32px;
  font-size: 0.93rem;
  font-weight: 500;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: border-color 0.2s;
  margin-top: 12px;
  margin-bottom: 8px;
  text-align: center;
}

.btn-secondary:hover { border-color: var(--dark); }

.disclaimer {
  font-size: 0.75rem;
  color: #94a3b8;
  text-align: center;
  margin-top: 12px;
}

/* ── Footer ── */
.quiz-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  text-align: center;
  padding: 10px 24px;
  font-size: 0.72rem;
  color: #94a3b8;
  letter-spacing: 0.04em;
  border-top: 1px solid var(--border);
  background: var(--white);
  z-index: 50;
}

/* ── Responsive ── */
@media (max-width: 480px) {
  .quiz-card {
    width: calc(100% - 32px);
    padding: 24px 18px 20px;
  }

  .quiz-progress-row {
    padding: 12px 16px 6px;
  }

  .progress-bar {
    max-width: none;
  }
}
