.quiz-wizard {
  gap: 1.5rem;
}

.sticky-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  margin: 0 0 1.25rem;
}

.wizard-breadcrumbs {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.7rem 1rem;
  border-radius: 14px;
  border: 1px solid rgba(90, 120, 200, 0.35);
  background: linear-gradient(120deg, rgba(8, 12, 20, 0.94), rgba(4, 7, 14, 0.96));
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(8px);
}

.wizard-breadcrumbs__list {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}

.sticky-pdoom {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.75rem;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(255, 100, 100, 0.15), rgba(255, 60, 60, 0.08));
  border: 1px solid rgba(255, 100, 100, 0.35);
  flex-shrink: 0;
}

.sticky-pdoom__label {
  font-size: 0.8rem;
  font-weight: 600;
  color: rgba(255, 180, 180, 0.9);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.sticky-pdoom__value {
  font-size: 1.1rem;
  font-weight: 700;
  color: rgba(255, 120, 120, 1);
  font-variant-numeric: tabular-nums;
}

.sticky-pdoom[hidden] {
  display: none;
}

.wizard-breadcrumbs__item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  color: rgba(230, 235, 255, 0.85);
  font-weight: 600;
}

.wizard-breadcrumbs__button {
  appearance: none;
  border: none;
  background: rgba(120, 186, 255, 0.1);
  color: inherit;
  font: inherit;
  padding: 0.35rem 0.65rem;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.wizard-breadcrumbs__button--past {
  background: rgba(131, 232, 198, 0.18);
  color: rgba(131, 232, 198, 0.95);
}

.wizard-breadcrumbs__button--active {
  background: rgba(131, 232, 198, 0.25);
  color: rgba(255, 255, 255, 0.95);
  cursor: default;
}

.wizard-breadcrumbs__button--future {
  background: rgba(120, 186, 255, 0.08);
  color: rgba(230, 235, 255, 0.8);
}

.wizard-breadcrumbs__button:hover,
.wizard-breadcrumbs__button:focus-visible {
  background: rgba(120, 186, 255, 0.22);
  color: rgba(255, 255, 255, 0.95);
  outline: none;
}

.wizard-breadcrumbs__button[aria-current="page"] {
  cursor: default;
  background: rgba(131, 232, 198, 0.15);
  color: rgba(131, 232, 198, 0.95);
}

.wizard-breadcrumbs__button[disabled] {
  opacity: 0.9;
}

.wizard-breadcrumbs__separator {
  color: rgba(230, 235, 255, 0.5);
  font-weight: 500;
}

.wizard-header {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  text-align: center;
}

.wizard-step {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.8rem;
  color: rgba(120, 186, 255, 0.85);
}

.wizard-intro {
  margin: 0;
  font-size: 0.95rem;
  color: rgba(230, 235, 255, 0.75);
}

.wizard-body {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.wizard-panel {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: opacity 0.2s ease;
}

.wizard-panel[hidden] {
  display: none;
  opacity: 0;
  pointer-events: none;
}

.wizard-flow-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.wizard-flow-grid--hidden {
  display: none;
}

.wizard-welcome-actions {
  display: flex;
  justify-content: center;
  margin-top: 0.25rem;
}

.wizard-flow-card {
  appearance: none;
  font: inherit;
  border: 1px solid rgba(90, 120, 200, 0.35);
  border-radius: 18px;
  background: rgba(5, 9, 16, 0.85);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  text-align: left;
  color: inherit;
  cursor: pointer;
  transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.wizard-flow-card:hover,
.wizard-flow-card:focus-visible {
  border-color: rgba(120, 186, 255, 0.6);
  transform: translateY(-2px);
  outline: none;
}

.wizard-flow-card--recommended {
  border-color: rgba(131, 232, 198, 0.8);
  box-shadow: 0 18px 40px rgba(14, 74, 58, 0.4);
}

.wizard-card-badge {
  align-self: flex-start;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(131, 232, 198, 0.14);
  color: rgba(131, 232, 198, 0.95);
}

.wizard-flow-card__title {
  margin: 0;
  font-size: 1.2rem;
}

.wizard-flow-card__description {
  margin: 0;
  color: rgba(230, 235, 255, 0.75);
  font-size: 0.9rem;
}

.wizard-flow-card__meta {
  margin: 0;
  font-size: 0.85rem;
  color: rgba(230, 235, 255, 0.6);
}

.wizard-selected {
  padding: 1rem 1.2rem;
  border-radius: 14px;
  border: 1px solid rgba(90, 120, 200, 0.35);
  background: rgba(8, 12, 20, 0.85);
}

.wizard-selected__title {
  margin: 0;
}

.wizard-selected__meta {
  margin: 0.2rem 0 0;
  color: rgba(230, 235, 255, 0.65);
  font-size: 0.9rem;
}

.wizard-question-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.wizard-question {
  padding: 1rem 1.2rem;
  border-radius: 14px;
  border: 1px solid rgba(90, 120, 200, 0.2);
  background: rgba(4, 6, 12, 0.85);
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.wizard-question__prompt {
  display: flex;
  gap: 0.75rem;
}

.wizard-question__text {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: baseline;
  width: 100%;
}

.wizard-question__number {
  font-weight: 700;
  color: rgba(120, 186, 255, 0.8);
}

.wizard-question__label {
  margin: 0;
  font-size: 1rem;
  flex: 1 1 auto;
}

.reference-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 999px;
  border: 1px solid rgba(131, 232, 198, 0.7);
  background: rgba(131, 232, 198, 0.08);
  color: rgba(131, 232, 198, 0.95);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.85rem;
  line-height: 1;
  flex-shrink: 0;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.reference-link:hover,
.reference-link:focus-visible {
  color: rgba(131, 232, 198, 1);
  border-color: rgba(131, 232, 198, 1);
  background: rgba(131, 232, 198, 0.18);
}

.reference-link:focus-visible {
  outline: 2px solid rgba(131, 232, 198, 0.35);
  outline-offset: 2px;
}

.wizard-question__link {
  margin-left: auto;
}

.quiz-question__link {
  align-self: flex-start;
}

.wizard-question__options {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.wizard-radio,
.wizard-checkbox {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 0.8rem;
  border-radius: 12px;
  border: 1px solid rgba(90, 120, 200, 0.15);
  background: rgba(10, 14, 22, 0.8);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
  user-select: none; /* Prevent accidental text selection on desktop */
}

.wizard-radio:hover,
.wizard-checkbox:hover {
  border-color: rgba(120, 186, 255, 0.6);
}

.wizard-radio input,
.wizard-checkbox input {
  accent-color: rgba(120, 186, 255, 0.95);
}

.sliders-ui__actions {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 1rem;
}

.wizard-option__content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  width: 100%;
}

.wizard-option__text {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.wizard-option__label {
  margin: 0;
}

.wizard-option__description {
  margin: 0;
  font-size: 0.9rem;
  color: rgba(230, 235, 255, 0.75);
}

.wizard-option__link {
  margin-left: auto;
  align-self: center;
}

.wizard-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  justify-content: center;
}

.quiz-result {
  margin: 0.35rem 0 0;
  text-align: center;
}

.quiz-result-actions {
  display: flex;
  justify-content: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-top: 0.4rem;
}

.quiz-result-actions[hidden] {
  display: none;
}

.quiz-preview {
  border: 1px solid rgba(90, 120, 200, 0.35);
  border-radius: 12px;
  padding: 0.8rem 1rem;
  background: rgba(8, 12, 20, 0.95);
  backdrop-filter: blur(8px);
}

/* When quiz preview is visible, adjust corners for stacked appearance */
.wizard-breadcrumbs:has(+ .quiz-preview:not([hidden])) {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  border-bottom: none;
}

.quiz-preview:not([hidden]) {
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}

.quiz-preview__title {
  margin: 0;
  font-size: 0.95rem;
  color: rgba(230, 235, 255, 0.8);
}

.quiz-preview__values {
  display: flex;
  gap: 1.2rem;
  flex-wrap: wrap;
  margin-top: 0.35rem;
  color: rgba(230, 235, 255, 0.8);
}

.quiz-preview[hidden] {
  display: none;
}

/* ===== SLIDER BOUNCE HINT ===== */
@keyframes slider-bounce {
  0%   { transform: translateX(0); }
  15%  { transform: translateX(12px); }
  30%  { transform: translateX(-10px); }
  45%  { transform: translateX(7px); }
  60%  { transform: translateX(-4px); }
  75%  { transform: translateX(2px); }
  100% { transform: translateX(0); }
}

.slider-bellcurve--bounce {
  animation: slider-bounce 1s ease-in-out;
}

.slider-hint {
  text-align: center;
  font-size: 0.9rem;
  color: rgba(120, 186, 255, 0.75);
  margin: 0 0 1rem;
  transition: opacity 0.5s ease;
}

.slider-hint--hidden {
  opacity: 0;
}

.secondary-button {
  padding: 0.75rem 1.4rem;
  border-radius: 999px;
  border: 1px solid rgba(120, 186, 255, 0.6);
  background: transparent;
  color: rgba(230, 235, 255, 0.85);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.secondary-button:hover {
  background: rgba(120, 186, 255, 0.1);
}

.secondary-button:focus-visible {
  outline: 2px solid rgba(120, 186, 255, 0.9);
  outline-offset: 2px;
}

/* ===== MOBILE-FIRST OPTIMIZATIONS ===== */
@media (max-width: 720px) {
  /* Remove excessive nested container padding */
  .quiz-wizard {
    padding: 0.6rem 0;
    margin-bottom: 1rem;
    border: none;
    background: transparent;
    gap: 0.8rem;
  }

  .wizard-header {
    gap: 0.25rem;
    padding: 0 0.25rem;
  }

  .wizard-header h2 {
    font-size: 1.3rem;
  }

  .wizard-intro {
    font-size: 1rem;
  }

  .wizard-body {
    gap: 0.8rem;
  }

  /* Breadcrumbs - compact but still functional */
  .wizard-breadcrumbs {
    padding: 0.5rem 0.6rem;
    border-radius: 10px;
    flex-wrap: wrap;
  }

  .wizard-breadcrumbs__button {
    padding: 0.4rem 0.6rem;
    font-size: 0.9rem;
  }

  .sticky-pdoom {
    padding: 0.3rem 0.6rem;
    gap: 0.4rem;
  }

  .sticky-pdoom__label {
    font-size: 0.7rem;
  }

  .sticky-pdoom__value {
    font-size: 1rem;
  }

  /* Flow cards - full width, less chrome */
  .wizard-flow-grid {
    grid-template-columns: 1fr;
    gap: 0.6rem;
  }

  .wizard-flow-card {
    padding: 0.9rem 1rem;
    border-radius: 12px;
    gap: 0.4rem;
  }

  .wizard-flow-card__title {
    font-size: 1.15rem;
  }

  .wizard-flow-card__description {
    font-size: 0.95rem;
  }

  .wizard-card-badge {
    font-size: 0.7rem;
    padding: 0.15rem 0.5rem;
  }

  /* Selected flow indicator - minimal */
  .wizard-selected {
    padding: 0.6rem 0.8rem;
    border-radius: 10px;
    margin-bottom: 0.25rem;
  }

  /* Questions - flatten the hierarchy */
  .wizard-question-list {
    gap: 0.5rem;
  }

  .wizard-question {
    padding: 0.7rem 0.8rem;
    border-radius: 10px;
    gap: 0.6rem;
    border-width: 1px;
  }

  .wizard-question__prompt {
    gap: 0.5rem;
  }

  .wizard-question__label {
    font-size: 1.05rem;
    line-height: 1.35;
  }

  .wizard-question__number {
    font-size: 0.95rem;
    min-width: 1.6rem;
  }

  /* Options - larger tap targets, less padding waste */
  .wizard-question__options {
    gap: 0.35rem;
  }

  .wizard-radio,
  .wizard-checkbox {
    padding: 0.7rem 0.65rem;
    border-radius: 8px;
    gap: 0.5rem;
    min-height: 44px; /* iOS minimum tap target */
    user-select: auto; /* Re-enable text selection on mobile for long-press */
  }

  .wizard-radio input,
  .wizard-checkbox input {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
  }

  .wizard-option__label {
    font-size: 1rem;
    line-height: 1.3;
  }

  .wizard-option__description {
    font-size: 0.9rem;
    line-height: 1.3;
  }

  .wizard-option__content {
    gap: 0.5rem;
    align-items: center; /* Vertically center text in options */
  }

  .wizard-option__text {
    justify-content: center;
  }

  /* Reference links - good tap size */
  .reference-link {
    width: 2rem;
    height: 2rem;
    font-size: 0.9rem;
  }

  /* Actions - prominent buttons */
  .wizard-actions {
    gap: 0.6rem;
    padding: 0.5rem 0;
  }

  .wizard-welcome-actions {
    margin-top: 0.5rem;
  }

  .sticky-header {
    margin: 0 0 0.5rem;
  }

  /* Quiz preview - compact */
  .quiz-preview {
    padding: 0.6rem 0.8rem;
    border-radius: 10px;
  }

  .quiz-preview:not([hidden]) {
    border-top-left-radius: 0;
    border-top-right-radius: 0;
  }

  .quiz-preview__title {
    font-size: 0.9rem;
  }

  .quiz-preview__values {
    gap: 0.8rem;
    font-size: 0.95rem;
  }

  /* Result section */
  .quiz-result {
    font-size: 1rem;
    padding: 0.25rem 0;
  }

  .quiz-result-actions {
    gap: 0.5rem;
    margin-top: 0.5rem;
  }
}

/* Extra small screens - even more aggressive */
@media (max-width: 400px) {
  .quiz-wizard {
    padding: 0.4rem 0;
  }

  .wizard-flow-card {
    padding: 0.8rem;
  }

  .wizard-question {
    padding: 0.6rem 0.65rem;
    gap: 0.5rem;
  }

  .wizard-radio,
  .wizard-checkbox {
    padding: 0.6rem 0.5rem;
  }

  .wizard-breadcrumbs {
    padding: 0.4rem 0.5rem;
  }

  .wizard-breadcrumbs__button {
    padding: 0.35rem 0.5rem;
    font-size: 0.85rem;
  }

  .sticky-pdoom {
    padding: 0.25rem 0.5rem;
  }

  .sticky-pdoom__label {
    font-size: 0.65rem;
  }

  .sticky-pdoom__value {
    font-size: 0.9rem;
  }
}
