.tf-quiz {
  width: 100%;
}

.tf-quiz-step {
  min-height: 100vh;
  display: flex;
  align-items: stretch;
  padding: clamp(32px, 6vh, 80px) 16px;
  padding-bottom: calc(clamp(48px, 10vh, 120px) + env(safe-area-inset-bottom, 0px));
}

.tf-quiz-step__inner {
  width: min(920px, 100%);
  margin: 0 auto;
  display: grid;
  align-content: center;
  gap: 20px;
}

.tf-quiz-step[data-step='intro'] .tf-quiz-step__inner {
  align-content: start;
  padding-top: clamp(8px, 2vh, 24px);
}

.tf-quiz__kicker {
  margin: 0;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
  opacity: 0.75;
}

.tf-quiz__title,
.tf-quiz__question {
  margin: 0;
}

.tf-quiz__description {
  max-width: 60ch;
}

.tf-quiz__description > :first-child {
  margin-top: 0;
}

.tf-quiz__description > :last-child {
  margin-bottom: 0;
}

.tf-quiz__answers {
  display: grid;
  gap: 12px;
}

.tf-quiz__answerWrap {
  display: block;
}

.tf-quiz__answer {
  width: 100%;
  text-align: left;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.15);
  background: rgba(255, 255, 255, 0.7);
  cursor: pointer;
}

.tf-quiz__answer.is-selected {
  border-color: rgba(0, 0, 0, 0.35);
  background: #fff;
}

.tf-quiz-step--multiselect .tf-quiz__answer.is-selected {
  border-width: 2px;
  font-weight: 600;
}

.tf-quiz__message {
  display: none;
  padding: 14px 16px;
  border-radius: 12px;
}

.tf-quiz__message.is-visible {
  display: block;
}

.tf-quiz__message:not(.alert) {
  border: 1px solid rgba(0, 0, 0, 0.15);
  background: rgba(255, 255, 255, 0.7);
}

.tf-quiz__messageContent {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 16px;
  align-items: center;
}

.tf-quiz__messageContent:not(:has(.tf-quiz__messageMedia)) {
  display: block;
}

.tf-quiz__messageMedia {
  width: 100%;
}

.tf-quiz__messageMedia img,
.tf-quiz__messageImage {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
  object-fit: cover;
}

.tf-quiz-split {
  display: grid;
  gap: 20px;
}

.tf-quiz-split__content {
  display: grid;
  gap: 20px;
  align-content: center;
}

.tf-quiz-split__media img,
.tf-quiz-split__image {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
  object-fit: cover;
}

@media (min-width: 601px) {
  .tf-quiz-split--has-media {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    gap: 32px;
    align-items: center;
  }
}

.tf-quiz__messageText > :first-child {
  margin-top: 0;
}

.tf-quiz__messageText > :last-child {
  margin-bottom: 0;
}

.tf-quiz__nav {
  display: flex;
  gap: 12px;
}

.tf-quiz__primary,
.tf-quiz__secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 16px;
  border-radius: 999px;
  text-decoration: none;
  border: 1px solid rgba(0, 0, 0, 0.25);
  background: #111;
  color: #fff;
  width: fit-content;
  cursor: pointer;
}

.tf-quiz__secondary {
  background: #fff;
  color: #111;
}

.tf-quiz__secondary[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}

@media (max-width: 600px) {
  .tf-quiz__messageContent {
    grid-template-columns: 1fr;
  }

  .tf-quiz__messageMedia img,
  .tf-quiz__messageImage {
    max-width: 100%;
  }
}
