/* Wizard */

.wizard-page {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 var(--space-xl) var(--space-xl);
}

.wizard-page__intro {
  padding: 44px 0 22px;
  text-align: center;
}

.wizard-page__title {
  font-family: var(--font-heading);
  font-weight: var(--fw-bold);
  font-size: 40px;
  line-height: 1.08;
  color: var(--ppch-deep);
  margin: 0 auto 12px;
  max-width: 620px;
}

.wizard-page__lead {
  font-size: 18px;
  line-height: 1.5;
  color: var(--text-secondary);
  margin: 0 auto;
  max-width: 560px;
}

.wizard-steps {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0 0 22px;
}

.wizard-steps__item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  border: var(--stroke-hair) solid transparent;
  background: transparent;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.2;
  text-decoration: none;
  transition: color 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.wizard-steps__item:hover {
  color: var(--ppch-deep);
  text-decoration: none;
}

.wizard-steps__item.is-active {
  border-color: var(--accent);
  background: var(--surface-accent-soft);
  color: var(--accent);
  font-weight: var(--fw-medium);
}

.wizard-steps__item.is-disabled {
  opacity: 0.42;
  pointer-events: none;
}

.wizard-steps__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--surface-card);
  border: var(--stroke-hair) solid var(--border-subtle);
  font-size: 12px;
  font-weight: var(--fw-medium);
}

.wizard-steps__item.is-active .wizard-steps__num {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-contrast, #fff);
}

.wizard-card {
  background: var(--ppch-haze-soft);
  border: var(--stroke-hair) solid var(--ppch-haze);
  border-radius: 28px;
  padding: 34px 40px 32px;
  box-shadow: var(--shadow-sm);
}

.wizard-card__progress {
  height: 6px;
  border-radius: var(--radius-pill);
  background: var(--surface-card);
  overflow: hidden;
  box-shadow: inset 0 0 0 1px var(--ppch-haze);
}

.wizard-card__progress-bar {
  height: 100%;
  border-radius: var(--radius-pill);
  background: var(--accent);
  transition: width 0.32s cubic-bezier(0.4, 0, 0.2, 1);
}

.wizard-card__step-label {
  margin: 20px 0 8px;
  font-size: 14px;
  letter-spacing: 0.02em;
  color: var(--text-secondary);
}

.wizard-card__question {
  font-family: var(--font-heading);
  font-weight: var(--fw-bold);
  font-size: 32px;
  line-height: 1.15;
  color: var(--ppch-deep);
  margin: 0 0 10px;
}

.wizard-card__hint {
  margin: 0 0 22px;
  font-size: 15px;
  line-height: 1.4;
  color: var(--text-secondary);
}

.wizard-card__options {
  display: grid;
  gap: 12px;
}

.wizard-card__options--cols-3 {
  grid-template-columns: repeat(3, 1fr);
}

.wizard-card__options--cols-4 {
  grid-template-columns: repeat(4, 1fr);
}

.wizard-option {
  position: relative;
  cursor: pointer;
  margin: 0;
}

.wizard-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.wizard-option__label {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  border: var(--stroke-medium) solid var(--border-subtle);
  background: var(--surface-card);
  color: var(--ppch-deep);
  font-size: 16px;
  font-weight: var(--fw-medium);
  padding: 14px 16px;
  border-radius: 16px;
  text-align: center;
  line-height: 1.25;
  transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.wizard-option:hover .wizard-option__label {
  border-color: var(--teal-light, #67bcb5);
}

.wizard-option input:checked + .wizard-option__label,
.wizard-option.is-selected .wizard-option__label {
  border-color: var(--accent);
  background: var(--surface-accent-soft);
  color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
}

.wizard-option:focus-within .wizard-option__label {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.wizard-card__helper {
  margin: 22px 0 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 8px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--text-secondary);
}

.wizard-card__helper-link {
  border: none;
  background: transparent;
  padding: 0;
  color: var(--ppch-deep);
  font-family: var(--font-body);
  font-size: inherit;
  font-weight: var(--fw-bold);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.wizard-card__helper-link:hover {
  color: var(--accent);
}

.wizard-card__nav {
  margin-top: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.wizard-card__nav:not(:has(button[value='back'])) {
  justify-content: flex-end;
}

.wizard-card__next {
  min-width: 148px;
}

.wizard-card__error {
  color: #b42318;
  font-size: 14px;
  margin: 0 0 14px;
}

.btn.is-disabled,
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.btn.btn--primary:not(:disabled):not(.is-disabled) {
  opacity: 1;
}

@media (max-width: 960px) {
  .wizard-page {
    padding-inline: var(--space-md);
  }

  .wizard-page__title {
    font-size: clamp(28px, 7vw, 36px);
  }

  .wizard-card__options--cols-3,
  .wizard-card__options--cols-4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .wizard-results__grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .wizard-page__intro {
    padding: 28px 0 16px;
  }

  .wizard-steps {
    gap: 6px;
    margin-bottom: 16px;
  }

  .wizard-steps__item {
    padding: 7px 11px;
    font-size: 13px;
  }

  .wizard-steps__tag {
    display: none;
  }

  .wizard-card {
    padding: 22px 16px 20px;
    border-radius: 22px;
  }

  .wizard-card__question {
    font-size: clamp(22px, 6vw, 28px);
  }

  .wizard-card__hint {
    margin-bottom: 16px;
  }

  .wizard-card__options--cols-3,
  .wizard-card__options--cols-4 {
    grid-template-columns: 1fr;
  }

  .wizard-card__nav {
    flex-direction: column-reverse;
    align-items: stretch;
  }

  .wizard-card__nav .btn {
    width: 100%;
    justify-content: center;
  }

  .wizard-card__next {
    min-width: 0;
  }

  .wizard-results {
    padding: 22px 16px;
  }

  .wizard-results__sort-note {
    white-space: normal;
  }
}

/* Wizard results */

.wizard-page--results {
  max-width: var(--container-wide);
}

.wizard-results__eyebrow {
  padding: 40px 0 22px;
  text-align: center;
  font-size: 12px;
  font-weight: var(--fw-medium);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.wizard-results {
  background: var(--ppch-haze-soft);
  border: var(--stroke-hair) solid var(--ppch-haze);
  border-radius: 28px;
  padding: 34px;
  box-shadow: var(--shadow-sm);
}

.wizard-results__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.wizard-results__title {
  font-family: var(--font-heading);
  font-weight: var(--fw-bold);
  font-size: 26px;
  line-height: 1.25;
  color: var(--ppch-deep);
  margin: 0;
  max-width: 820px;
}

.wizard-results__query-label {
  color: var(--text-secondary);
  font-weight: var(--fw-regular);
}

.wizard-results__query {
  color: var(--ppch-deep);
  font-weight: var(--fw-medium);
}

.wizard-results__sort-note {
  font-size: 14px;
  color: var(--text-secondary);
  white-space: nowrap;
}

.wizard-results__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.wizard-results__catalog {
  margin-top: 24px;
  padding: 20px;
  border-radius: 20px;
  font-size: 16px;
}

.wizard-results__notice {
  margin: 0 0 20px;
  padding: 14px 16px;
  border-radius: 14px;
  font-size: 15px;
  line-height: 1.45;
}

.wizard-results__notice--warn {
  background: color-mix(in srgb, var(--accent) 10%, var(--surface-card));
  border: var(--stroke-hair) solid var(--ppch-haze);
  color: var(--text-secondary);
}

.wizard-results__empty {
  margin-top: 8px;
}

.wizard-results__empty p {
  margin: 0 0 18px;
  font-size: 16px;
  line-height: 1.5;
  color: var(--text-secondary);
}

.wizard-results__empty-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

@media (max-width: 960px) {
  .wizard-results__grid {
    grid-template-columns: 1fr;
  }
}
