/* Psychological tests (anxiety / hunger) */

.test-page {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 var(--space-xl) var(--space-3xl);
}

.test-page__intro {
  padding: var(--space-xl) 0 var(--space-2xl);
}

.test-page__badge {
  display: inline-block;
  margin: 0 0 12px;
  font-size: 12px;
  font-weight: var(--fw-medium);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
}

.test-page__title {
  font-family: var(--font-heading);
  font-weight: var(--fw-bold);
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.12;
  color: var(--ppch-deep);
  margin: 0 0 14px;
  text-wrap: balance;
}

.test-page__lead {
  font-size: 18px;
  line-height: 1.55;
  color: var(--text-secondary);
  margin: 0 0 28px;
  max-width: 38em;
}

.test-card,
.test-gate,
.test-result {
  background: color-mix(in srgb, var(--ppch-haze) 42%, var(--surface-page));
  border: var(--stroke-hair) solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 28px 28px 24px;
  box-shadow: var(--shadow-sm);
}

.test-card__progress {
  height: 8px;
  border-radius: var(--radius-pill);
  background: var(--surface-card);
  overflow: hidden;
  margin-bottom: 18px;
}

.test-card__progress-bar {
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  transition: width var(--dur-base) var(--ease-standard);
}

.test-card__step {
  margin: 0 0 8px;
  font-size: 14px;
  color: var(--text-tertiary);
}

.test-card__question {
  font-family: var(--font-heading);
  font-weight: var(--fw-medium);
  font-size: clamp(22px, 3vw, 28px);
  line-height: 1.25;
  color: var(--ppch-deep);
  margin: 0 0 22px;
  text-wrap: balance;
}

.test-card__figure {
  margin: 0 0 20px;
  border-radius: 16px;
  overflow: hidden;
  border: var(--stroke-hair) solid var(--border-subtle);
  background: var(--ppch-haze-soft);
}

.test-card__figure img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

.test-card__options {
  display: grid;
  gap: 10px;
}

.test-option {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 16px;
  border-radius: 14px;
  border: var(--stroke-hair) solid var(--border-subtle);
  background: var(--surface-card);
  cursor: pointer;
  transition: border-color var(--dur-fast) var(--ease-standard), box-shadow var(--dur-fast) var(--ease-standard);
}

.test-option:hover,
.test-option:has(input:checked) {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--border-subtle));
  box-shadow: var(--shadow-xs);
}

.test-option input {
  margin-top: 3px;
  accent-color: var(--accent);
}

.test-option__label {
  font-size: 16px;
  line-height: 1.45;
  color: var(--ppch-grey-700);
}

.test-card__error {
  margin: 14px 0 0;
  color: var(--status-error);
  font-size: 14px;
}

.test-card__nav {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 24px;
}

.test-gate__title,
.test-result__title {
  font-family: var(--font-heading);
  font-weight: var(--fw-medium);
  font-size: clamp(22px, 3vw, 30px);
  line-height: 1.2;
  color: var(--ppch-deep);
  margin: 0 0 14px;
}

.test-gate__lead p {
  margin: 0 0 10px;
  color: var(--text-secondary);
  line-height: 1.55;
}

.test-gate__field {
  display: grid;
  gap: 6px;
  margin: 18px 0 14px;
  font-size: 14px;
  color: var(--text-secondary);
}

.test-gate__field em {
  font-style: normal;
  color: var(--text-tertiary);
}

.test-gate__input {
  width: 100%;
  border: var(--stroke-hair) solid var(--border-subtle);
  border-radius: 12px;
  padding: 12px 14px;
  font: inherit;
  background: var(--surface-card);
}

.test-gate__check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 18px;
  font-size: 14px;
  line-height: 1.45;
  color: var(--ppch-grey-700);
  cursor: pointer;
}

.test-gate__check input {
  margin-top: 2px;
  accent-color: var(--accent);
}

.test-result__eyebrow {
  margin: 0 0 8px;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
}

.test-result__text {
  margin: 0 0 22px;
  font-size: 17px;
  line-height: 1.6;
  color: var(--ppch-grey-700);
}

.test-result__block {
  padding: 18px 18px 8px;
  border-radius: 16px;
  background: var(--surface-card);
  border: var(--stroke-hair) solid var(--border-subtle);
  margin-bottom: 22px;
}

.test-result__heading {
  margin: 0 0 12px;
  font-size: 1.05rem;
  color: var(--ppch-deep);
}

.test-result__list {
  margin: 0 0 12px;
  padding-left: 1.2em;
}

.test-result__list li {
  margin-bottom: 8px;
  line-height: 1.5;
  color: var(--ppch-grey-700);
}

.test-result__closing {
  margin: 0 0 10px;
  color: var(--text-secondary);
  line-height: 1.5;
  white-space: pre-line;
}

.test-result__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

@media (max-width: 720px) {
  .test-page {
    padding: 0 var(--space-md) var(--space-2xl);
  }

  .test-card,
  .test-gate,
  .test-result {
    padding: 20px 16px;
    border-radius: 18px;
  }

  .test-card__nav {
    flex-direction: column-reverse;
  }

  .test-card__nav .btn {
    width: 100%;
  }
}
