.questionnaire-wrap {
  padding: 40px 0 80px;
}

/* Journey badge */
.q-journey-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
  background: rgba(196, 96, 58, 0.08);
  border: 1px solid rgba(196, 96, 58, 0.25);
  border-radius: 20px;
  padding: 3px 12px;
  margin-bottom: 14px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

/* Progress bar */
.q-progress-bar-wrap {
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin-bottom: 12px;
  overflow: hidden;
}
.q-progress-bar {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
  transition: width 0.4s ease;
}
.q-step-counter {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 36px;
}

/* Section */
.q-section-header {
  margin-bottom: 32px;
}
.q-section-header h2 {
  font-family: var(--font-heading);
  font-size: 1.7rem;
  margin-bottom: 8px;
}
.q-section-desc {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Questions */
.q-question {
  margin-bottom: 32px;
}
.q-label {
  display: block;
  font-weight: 500;
  margin-bottom: 12px;
  font-size: 0.95rem;
}
.required { color: var(--accent); }

/* Radio options */
.q-options {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}
.q-options-inline {
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
}
.q-option {
  cursor: pointer;
  display: block;
}
.q-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
}
.q-option-label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  font-size: 0.9rem;
  transition: border-color 0.15s, background 0.15s;
  cursor: pointer;
}
.q-option input:checked + .q-option-label {
  border-color: var(--accent);
  background: rgba(196, 96, 58, 0.08);
}
.q-option-label:hover {
  border-color: var(--accent);
}
.q-option-icon { font-size: 1.3rem; }

/* Actions */
.q-actions {
  margin-top: 36px;
  display: flex;
  gap: 12px;
}

/* Number input with unit label */
.q-input-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 260px;
}
.q-input-unit {
  font-size: 0.9rem;
  color: var(--text-muted);
  white-space: nowrap;
}

/* Range slider */
.q-range-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: 420px;
}
.q-range {
  flex: 1;
  accent-color: var(--accent);
  cursor: pointer;
  height: 4px;
}
.q-range-value {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent);
  min-width: 52px;
  text-align: right;
}

/* Radio option with sub-description */
.q-option-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.q-option-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 400;
  line-height: 1.35;
}
.q-option input:checked + .q-option-label .q-option-sub {
  color: var(--accent);
}

/* Checkbox cards — same visual as radio */
.q-checkboxes {
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
}
.q-option input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
}
.q-option input[type="checkbox"]:checked + .q-option-label {
  border-color: var(--accent);
  background: rgba(196, 96, 58, 0.08);
}

/* Question divider */
.q-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 28px 0;
}

/* Label row with inline help toggle */
.q-label-row {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.q-label-row .q-label {
  margin-bottom: 0;
}

/* Collapsible help text */
.q-help {
  font-size: 0.8rem;
}
.q-help summary {
  color: var(--text-muted);
  cursor: pointer;
  user-select: none;
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px;
  border-radius: 4px;
  transition: background 0.15s;
}
.q-help summary:hover { background: var(--border); }
.q-help summary::-webkit-details-marker { display: none; }
.q-help[open] summary { color: var(--accent); }
.q-help p {
  margin: 8px 0 0;
  padding: 10px 14px;
  background: var(--bg-card);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--text-muted);
  font-size: 0.82rem;
  line-height: 1.55;
}

/* Option main label text */
.q-option-main {
  font-size: 0.9rem;
  font-weight: 500;
}

/* Loan breakdown below the slider */
.q-loan-breakdown {
  display: flex;
  gap: 24px;
  margin-top: 10px;
  font-size: 0.88rem;
  color: var(--text-muted);
}
.q-loan-breakdown strong {
  color: var(--accent);
  font-weight: 600;
}

/* Journey 2×3 grid */
.q-options-journey {
  grid-template-columns: repeat(3, 1fr);
  align-items: stretch;
}
.q-options-journey .q-option {
  display: flex;
}
.q-options-journey .q-option-label {
  flex: 1;
  align-items: flex-start;
}
@media (max-width: 700px) {
  .q-options-journey { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 420px) {
  .q-options-journey { grid-template-columns: 1fr; }
}

/* Checkboxes with inline size input */
.q-checkboxes-sized {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.q-option-sized-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.q-option--row {
  flex: 1;
  min-width: 0;
}
.q-room-size-input {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.q-room-size-input input {
  width: 130px;
}

/* Inline callout box */
.q-callout {
  margin-top: 12px;
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 0.88rem;
  line-height: 1.5;
}
.q-callout strong {
  display: block;
  margin-bottom: 4px;
  font-size: 0.9rem;
}
.q-callout p {
  margin: 0;
  color: var(--text-muted);
}
.q-callout--warn {
  background: rgba(196, 96, 58, 0.08);
  border-left: 3px solid var(--accent);
  color: var(--accent);
}

/* HTMX loading indicator */
.htmx-request .btn-primary {
  opacity: 0.7;
  cursor: wait;
}
