/* ========== QUESTIONNAIRE PAGE ========== */
.qpage {
  min-height: 100vh;
  padding: 8rem 1.5rem 4rem;
  background: var(--background);
}

.qpage-inner {
  max-width: 780px;
  margin: 0 auto;
}

.q-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.q-header h1 {
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 700;
  color: var(--foreground);
  margin-bottom: 0.75rem;
}

.q-subtitle {
  font-size: 1.05rem;
  color: var(--foreground-secondary);
  max-width: 560px;
  margin: 0 auto;
}

/* Progress */
.q-progress-wrap {
  margin-bottom: 2.5rem;
}

.q-progress-bar {
  height: 6px;
  background: var(--border);
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: 0.6rem;
}

.q-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  border-radius: 99px;
  transition: width 0.4s ease;
  width: 7.14%;
}

.q-progress-text {
  font-size: 0.85rem;
  color: var(--foreground-secondary);
  text-align: right;
}

/* Step */
.q-step {
  display: none;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2.5rem;
  box-shadow: 0 4px 24px rgba(0,0,0,0.05);
  animation: stepIn 0.3s ease;
}

.q-step.active {
  display: block;
}

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

.q-step-header {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.q-step-num {
  width: 48px;
  height: 48px;
  min-width: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.q-step-header h2 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--foreground);
  margin-bottom: 0.25rem;
}

.q-step-header p {
  font-size: 0.9rem;
  color: var(--foreground-secondary);
}

/* Fields */
.q-fields {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.q-field label:not(.q-radio):not(.q-checkbox) {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--foreground);
  margin-bottom: 0.5rem;
}

.q-field .req {
  color: var(--primary);
}

.q-field input[type="text"],
.q-field input[type="email"],
.q-field input[type="url"],
.q-field input[type="date"],
.q-field textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  color: var(--foreground);
  background: var(--background);
  transition: border-color 0.2s, box-shadow 0.2s;
  resize: vertical;
}

.q-field input:focus,
.q-field textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(248, 149, 52, 0.12);
}

.q-field-half {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

/* Radio & Checkbox */
.q-radio-group,
.q-checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.25rem;
}

.q-radio,
.q-checkbox {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--foreground);
  background: var(--background);
  transition: border-color 0.2s, background 0.2s, color 0.2s;
  user-select: none;
}

.q-radio:hover,
.q-checkbox:hover {
  border-color: var(--primary);
  background: rgba(248, 149, 52, 0.04);
}

.q-radio input,
.q-checkbox input {
  accent-color: var(--primary);
  width: 16px;
  height: 16px;
}

.q-radio:has(input:checked),
.q-checkbox:has(input:checked) {
  border-color: var(--primary);
  background: rgba(248, 149, 52, 0.08);
  color: var(--primary-dark);
}

/* Summary box */
.q-summary-box {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  background: rgba(248, 149, 52, 0.07);
  border: 1px solid rgba(248, 149, 52, 0.2);
  border-radius: 10px;
  color: var(--foreground-secondary);
  font-size: 0.875rem;
  line-height: 1.6;
}

.q-summary-box svg {
  color: var(--primary);
  min-width: 22px;
  margin-top: 1px;
}

/* Navigation */
.q-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1.75rem;
  gap: 1rem;
}

.q-step-dots {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
  flex: 1;
}

.q-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border);
  transition: background 0.25s, transform 0.25s;
}

.q-dot.active {
  background: var(--primary);
  transform: scale(1.3);
}

.q-dot.done {
  background: var(--primary-light);
}

/* Error */
.q-error {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  background: rgba(226, 64, 64, 0.07);
  border: 1px solid rgba(226, 64, 64, 0.2);
  border-radius: 8px;
  color: var(--destructive);
  font-size: 0.875rem;
}

/* Success page */
.q-success {
  text-align: center;
  padding: 4rem 2rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.05);
}

.q-success-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(46, 158, 90, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
}

.q-success-icon svg {
  color: var(--success);
}

.q-success h2 {
  font-size: 1.75rem;
  margin-bottom: 0.75rem;
}

.q-success p {
  color: var(--foreground-secondary);
  margin-bottom: 2rem;
  max-width: 460px;
  margin-left: auto;
  margin-right: auto;
}

/* Responsive */
@media (max-width: 600px) {
  .q-step {
    padding: 1.5rem;
  }

  .q-field-half {
    grid-template-columns: 1fr;
  }

  .q-step-header {
    gap: 1rem;
  }

  .q-nav {
    flex-wrap: wrap;
  }
}
