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

html, body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: #2d3748;
  background: #ffffff;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* --- SCREENS --- */
.screen { display: none; }
.screen.active { display: flex; }

/* --- WELCOME --- */
#welcome {
  min-height: 100dvh;
  background: #1a365d;
  color: #ffffff;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 32px 24px;
}

.welcome-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 40px;
}
.welcome-brand img { width: 48px; height: 48px; }
.welcome-brand span { font-size: 1.125rem; font-weight: 600; }

.welcome-title {
  font-size: clamp(1.75rem, 6vw, 2.5rem);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 16px;
}

.welcome-subtitle {
  font-size: clamp(1rem, 3vw, 1.25rem);
  font-weight: 500;
  line-height: 1.4;
  margin-bottom: 24px;
  opacity: 0.92;
  max-width: 520px;
}

.welcome-body {
  font-size: 0.95rem;
  line-height: 1.6;
  opacity: 0.8;
  max-width: 480px;
  margin-bottom: 40px;
}

.btn-start {
  display: inline-block;
  background: #319795;
  color: #ffffff;
  font-family: inherit;
  font-size: 1.125rem;
  font-weight: 600;
  padding: 16px 48px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  -webkit-tap-highlight-color: transparent;
  min-height: 56px;
}
.btn-start:hover { background: #2c7a7b; }
.btn-start:active { transform: scale(0.97); }

/* --- QUESTIONS --- */
#questions {
  flex-direction: column;
  min-height: 100dvh;
  background: #ffffff;
}

.progress-wrap {
  position: sticky;
  top: 0;
  background: #ffffff;
  z-index: 10;
  padding: 0;
}

.progress-track {
  width: 100%;
  height: 5px;
  background: #e2e8f0;
}

.progress-fill {
  height: 100%;
  background: #319795;
  transition: width 0.4s ease;
  border-radius: 0 3px 3px 0;
}

.question-header {
  max-width: 600px;
  width: 100%;
  margin: 0 auto;
  padding: 12px 24px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.btn-back {
  display: flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  color: #718096;
  font-family: inherit;
  font-size: 0.9rem;
  cursor: pointer;
  padding: 8px 4px;
  min-height: 48px;
  -webkit-tap-highlight-color: transparent;
  transition: color 0.2s;
}
.btn-back:hover { color: #2d3748; }
.btn-back svg { width: 18px; height: 18px; }
.btn-back.hidden { visibility: hidden; pointer-events: none; }

.progress-text {
  font-size: 0.85rem;
  color: #718096;
  font-weight: 500;
}

.question-container {
  flex: 1;
  max-width: 600px;
  width: 100%;
  margin: 0 auto;
  padding: 24px 24px 40px;
  position: relative;
  overflow: hidden;
}

.question-slide {
  width: 100%;
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.question-slide.slide-out-left  { transform: translateX(-30px); opacity: 0; position: absolute; }
.question-slide.slide-out-right { transform: translateX(30px); opacity: 0; position: absolute; }
.question-slide.slide-in        { transform: translateX(0); opacity: 1; }

.question-text {
  font-size: 1.25rem;
  font-weight: 600;
  color: #2d3748;
  line-height: 1.45;
  margin-bottom: 28px;
}

.options-list { list-style: none; display: flex; flex-direction: column; gap: 12px; }

.option-card {
  width: 100%;
  text-align: left;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 16px;
  font-family: inherit;
  font-size: 1rem;
  color: #2d3748;
  line-height: 1.45;
  cursor: pointer;
  min-height: 56px;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
  -webkit-tap-highlight-color: transparent;
  display: flex;
  align-items: center;
}
.option-card:hover {
  background: #e6fffa;
  border-color: #319795;
}
.option-card.selected {
  background: #319795;
  border-color: #319795;
  color: #ffffff;
}

/* --- RESULTS --- */
#results {
  flex-direction: column;
  background: #ffffff;
  min-height: 100dvh;
}

.results-inner {
  max-width: 600px;
  width: 100%;
  margin: 0 auto;
  padding: 32px 24px 48px;
}

.results-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 32px;
}
.results-brand img { width: 36px; height: 36px; }
.results-brand span { font-size: 1rem; font-weight: 600; color: #1a365d; }

.results-heading {
  text-align: center;
  font-size: 1.15rem;
  font-weight: 500;
  color: #718096;
  margin-bottom: 8px;
}

.results-category {
  text-align: center;
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.results-score {
  text-align: center;
  font-size: 0.95rem;
  color: #718096;
  margin-bottom: 24px;
}

/* Score bar */
.score-bar-wrap { margin-bottom: 32px; }
.score-bar-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: #a0aec0;
  margin-bottom: 6px;
}
.score-bar-track {
  position: relative;
  width: 100%;
  height: 10px;
  background: #e2e8f0;
  border-radius: 5px;
  overflow: visible;
}
.score-bar-fill {
  height: 100%;
  border-radius: 5px;
  transition: width 0.8s ease;
}
.score-bar-marker {
  position: absolute;
  top: 50%;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 3px solid #ffffff;
  transform: translate(-50%, -50%);
  box-shadow: 0 1px 4px rgba(0,0,0,0.25);
  transition: left 0.8s ease;
}

.results-desc {
  font-size: 1rem;
  line-height: 1.7;
  color: #2d3748;
  text-align: center;
  margin-bottom: 48px;
}

/* CTA Section */
.cta-heading {
  font-size: 1.35rem;
  font-weight: 700;
  text-align: center;
  color: #1a365d;
  margin-bottom: 6px;
}
.cta-subtext {
  font-size: 0.95rem;
  color: #718096;
  text-align: center;
  margin-bottom: 28px;
}

.cta-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 24px;
  margin-bottom: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 2px 8px rgba(0,0,0,0.04);
  transition: box-shadow 0.2s, transform 0.15s;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  text-decoration: none;
  color: inherit;
  display: block;
}
.cta-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.1); }
.cta-card:active { transform: scale(0.99); }

.cta-icon { font-size: 1.5rem; margin-bottom: 8px; }
.cta-card-heading { font-size: 1.05rem; font-weight: 600; color: #1a365d; margin-bottom: 4px; }
.cta-card-sub { font-size: 0.9rem; color: #718096; line-height: 1.5; }

/* Expand form */
.form-area {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, opacity 0.3s ease;
  opacity: 0;
}
.form-area.open {
  max-height: 340px;
  opacity: 1;
}

.inline-form {
  padding-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.inline-form input {
  font-family: inherit;
  font-size: 1rem;
  padding: 14px 16px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  outline: none;
  transition: border-color 0.2s;
  min-height: 48px;
}
.inline-form input:focus { border-color: #319795; }

.btn-submit {
  background: #319795;
  color: #ffffff;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  padding: 14px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  min-height: 48px;
  transition: background 0.2s, opacity 0.2s;
}
.btn-submit:hover { background: #2c7a7b; }
.btn-submit:disabled {
  background: #a0aec0;
  cursor: not-allowed;
}

.form-success {
  padding-top: 20px;
  color: #319795;
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.5;
}
.form-error {
  padding-top: 20px;
  color: #e53e3e;
  font-size: 0.9rem;
  line-height: 1.5;
}
.form-error a { color: #e53e3e; }

.retake-link {
  display: block;
  text-align: center;
  margin-top: 32px;
  margin-bottom: 48px;
  color: #319795;
  font-weight: 500;
  font-size: 0.95rem;
  cursor: pointer;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  background: none;
  border: none;
  font-family: inherit;
}
.retake-link:hover { text-decoration: underline; }

/* Footer */
.results-footer {
  text-align: center;
  padding: 24px;
  border-top: 1px solid #e2e8f0;
}
.footer-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-bottom: 8px;
}
.footer-brand img { width: 24px; height: 24px; }
.footer-brand span { font-size: 0.875rem; font-weight: 600; color: #718096; }
.footer-links { font-size: 0.8rem; color: #a0aec0; }
.footer-links a { color: #718096; text-decoration: none; }
.footer-links a:hover { text-decoration: underline; }