:root {
  color-scheme: light;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
  margin: 0;
  min-height: 100vh;
  background: #fffcf5;
  color: #0b0f19;
  line-height: 1.55;
}

.page {
  display: flex;
  justify-content: center;
  padding: 56px 16px;
}

.quiz-card {
  width: 100%;
  max-width: 820px;
  background: #fff;
  border-radius: 24px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  padding: 32px;
}

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
  margin-bottom: 32px;
}

.hero--hidden {
  display: none !important;
}

.hero-logo {
  width: 96px;
  height: auto;
  display: block;
  margin-bottom: 8px;
}

.hero h1 {
  margin: 0 auto 18px;
  font-size: clamp(32px, 4vw, 54px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  text-align: center;
  max-width: 680px;
}

.intro {
  margin: 0 auto;
  max-width: 760px;
  color: #3f4654;
  font-size: 18px;
}

form {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.screen {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.screen[hidden] {
  display: none;
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

label {
  font-weight: 600;
  color: #1c2333;
}

input[type="text"],
input[type="email"] {
  padding: 14px 16px;
  border: 1px solid #d9dce5;
  border-radius: 12px;
  font-size: 1rem;
  background: #fff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input[type="text"]:focus,
input[type="email"]:focus {
  outline: none;
  border-color: #2f65ff;
  box-shadow: 0 0 0 3px rgba(47, 101, 255, 0.15);
}

.helper-text {
  margin: 0;
  color: #5b6273;
  text-align: center;
}

.step-nav {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

fieldset {
  border: 1px solid #ebeef5;
  border-radius: 16px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

legend {
  font-weight: 700;
  padding: 0 6px;
  color: #0b0f19;
}

.option-label {
  display: flex;
  gap: 12px;
  align-items: center;
  width: 100%;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid #e4e6ed;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.option-label:hover {
  background: #f7f7f7;
  border-color: #d4d8e6;
}

.option-label input {
  margin: 0;
  flex-shrink: 0;
  accent-color: #2f65ff;
}

.consent-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 20px 0 16px;
  color: #3f4654;
  font-weight: 600;
}

.consent-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
}

.actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 16px 28px;
  border-radius: 9999px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
  line-height: 1;
  white-space: nowrap;
  background: transparent;
  color: inherit;
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.2s ease;
}

.btn--lg {
  font-size: 16px;
}

.btn--primary {
  background: #2f65ff;
  color: #fff;
  border-color: #2f65ff;
  box-shadow: 0 8px 24px rgba(47, 101, 255, 0.35);
}

.btn--primary:hover:not(:disabled) {
  transform: translateY(-1px);
}

.btn--primary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn--ghost {
  background: #fff;
  color: #0b0f19;
  border-color: #e5e8f0;
  box-shadow: none;
}

.btn--ghost:hover:not(:disabled) {
  background: #f8faff;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  box-shadow: none;
}

.btn:focus-visible {
  outline: 3px solid rgba(47, 101, 255, 0.4);
  outline-offset: 4px;
}

.error {
  min-height: 1.2em;
  color: #c2410c;
  font-size: 0.95rem;
  text-align: center;
}

.result-card {
  text-align: center;
  padding: 48px 32px;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 15px 40px rgba(15, 23, 42, 0.12);
}

.match-percent {
  margin: 0;
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 800;
  color: #2f65ff;
}

.result-role {
  margin: 8px 0 16px;
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 700;
  color: #0b0f19;
}

.result-note {
  margin: 8px 0;
  color: #3f4654;
  font-size: 1rem;
  line-height: 1.6;
}

@media (max-width: 640px) {
  .quiz-card {
    padding: 24px;
  }

  fieldset {
    padding: 16px;
  }

  .actions {
    flex-direction: column;
    align-items: stretch;
  }

  .actions .btn {
    width: 100%;
  }
}
