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

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #f4f4f4;
  color: #111111;
}

/* ── Nav ── */
.quiz-nav {
  background: #111111;
  padding: 14px 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.quiz-nav-logo {
  color: #ffffff;
  text-decoration: none;
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.03em;
}

.quiz-nav-badge {
  background: #f26531;
  color: #ffffff;
  border-radius: 999px;
  padding: 5px 14px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ── Progress ── */
.quiz-progress-wrap {
  background: #e0e0e0;
  height: 4px;
}

.quiz-progress-bar {
  height: 4px;
  background: #f26531;
  transition: width 0.35s ease;
}

/* ── Layout ── */
.quiz-main {
  padding: 40px 20px 64px;
}

.quiz-card {
  max-width: 640px;
  margin: 0 auto;
  background: #ffffff;
  border-radius: 18px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

.quiz-card-header {
  background: #f26531;
  color: #ffffff;
  padding: 28px 36px 24px;
  text-align: center;
}

.quiz-card-header-title {
  margin: 0 0 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.9;
}

.quiz-card-header-heading {
  margin: 0;
  font-size: clamp(20px, 4vw, 26px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.quiz-card-body {
  padding: 0;
}

.quiz-step {
  display: none;
  padding: 36px 36px 8px;
}

.quiz-step.is-active {
  display: block;
}

.quiz-step-label {
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #f26531;
}

.quiz-heading {
  margin: 0 0 8px;
  font-size: clamp(20px, 3.5vw, 26px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: #111111;
}

.quiz-sub {
  margin: 0 0 28px;
  font-size: 14px;
  line-height: 1.65;
  color: #666666;
}

.quiz-intro-free {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: #fafafa;
  border: 1px solid #eeeeee;
  border-radius: 12px;
  padding: 18px;
  margin-top: 8px;
}

.quiz-intro-free-icon {
  font-size: 28px;
  line-height: 1;
}

.quiz-intro-free-text {
  font-size: 14px;
  line-height: 1.55;
  color: #444444;
}

.quiz-intro-free-text strong {
  display: block;
  color: #111111;
  margin-bottom: 4px;
}

/* Scale */
.quiz-scale {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.quiz-scale-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid #dddddd;
  background: #ffffff;
  color: #111111;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.15s, background 0.15s, transform 0.1s;
}

.quiz-scale-btn:hover {
  border-color: #f26531;
}

.quiz-scale-btn.is-selected {
  background: #f26531;
  border-color: #f26531;
  color: #ffffff;
  transform: scale(1.08);
}

.quiz-scale-labels {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: #999999;
  margin-bottom: 8px;
}

/* Options */
.quiz-check-list,
.quiz-radio-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 8px;
}

.quiz-check-item,
.quiz-radio-item {
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1.5px solid #e8e8e8;
  border-radius: 10px;
  padding: 14px 16px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  background: #fafafa;
}

.quiz-check-item:hover,
.quiz-radio-item:hover {
  border-color: #f26531;
}

.quiz-check-item.is-selected,
.quiz-radio-item.is-selected {
  border-color: #f26531;
  background: #fff6f1;
}

.quiz-check-item input,
.quiz-radio-item input {
  accent-color: #f26531;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  cursor: pointer;
}

.quiz-option-label {
  font-size: 14px;
  color: #222222;
  line-height: 1.4;
}

.quiz-textarea,
.quiz-input {
  width: 100%;
  border: 1.5px solid #e0e0e0;
  border-radius: 10px;
  font-family: inherit;
  font-size: 15px;
  padding: 13px 16px;
  color: #111111;
  background: #fafafa;
  outline: none;
  transition: border-color 0.15s;
}

.quiz-textarea {
  min-height: 110px;
  resize: vertical;
  margin-bottom: 8px;
}

.quiz-textarea:focus,
.quiz-input:focus {
  border-color: #f26531;
  background: #ffffff;
}

.quiz-field {
  margin-bottom: 16px;
}

.quiz-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #666666;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.quiz-privacy-note {
  font-size: 12px;
  color: #888888;
  line-height: 1.55;
  margin: 0 0 8px;
}

.quiz-privacy-note a {
  color: #111111;
}

.quiz-error {
  display: none;
  margin: 20px 36px 0;
  padding: 12px 14px;
  background: #fff0f0;
  border: 1px solid #ffcccc;
  border-radius: 8px;
  font-size: 13px;
  color: #cc3333;
}

.quiz-error.is-visible {
  display: block;
}

/* Nav buttons */
.quiz-nav-btns {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 24px 36px 32px;
  border-top: 1px solid #eeeeee;
  margin-top: 16px;
}

.quiz-btn-back {
  background: transparent;
  border: 1.5px solid #dddddd;
  color: #666666;
  border-radius: 999px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
}

.quiz-btn-back:hover:not(:disabled) {
  border-color: #aaaaaa;
  color: #111111;
}

.quiz-btn-back:disabled {
  opacity: 0;
  pointer-events: none;
}

.quiz-btn-next,
.quiz-btn-submit {
  background: #111111;
  color: #ffffff;
  border: none;
  border-radius: 999px;
  padding: 11px 26px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  margin-left: auto;
}

.quiz-btn-next:hover,
.quiz-btn-submit:hover {
  background: #000000;
}

.quiz-btn-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.quiz-btn-submit .btn-spinner {
  display: none;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin-right: 6px;
  vertical-align: middle;
}

.quiz-btn-submit.is-loading .btn-spinner {
  display: inline-block;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 560px) {
  .quiz-step { padding: 28px 22px 8px; }
  .quiz-nav-btns { padding: 20px 22px 28px; }
  .quiz-card-header { padding: 24px 22px 20px; }
  .quiz-error { margin: 16px 22px 0; }
  .quiz-scale-btn { width: 38px; height: 38px; font-size: 13px; }
}
