.questionnaire-page__heading {
  font-weight: 500;
  color: #000000;
  margin-bottom: 1rem;
}

.questionnaire-page__lead {
  line-height: 1.2;
  color: #000000;
  margin-bottom: 2.5rem;
  max-width: 70ch;
  font-weight: 300;
}

.questionnaire-form {
  width: 70%;
  max-width: 600px;
  scroll-margin-top: 1.5rem;
}

.q-step {
  display: none;
}

.q-step.is-active {
  display: block;
}

.q-step__number {
  display: inline-block;
  font-family: "Archivo", sans-serif;
  font-size: 3rem;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 1rem;
  background: linear-gradient(180deg, #fbb271 38%, #54a6e2 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

.q-step__block + .q-step__block {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e2e2e2;
}

.q-step__title {
  font-size: 1.125rem;
  font-weight: 600;
  color: #000000;
  margin-bottom: 0.75rem;
}

.q-step__intro {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: #000000;
  margin-bottom: 1.5rem;
}

.q-step__note {
  font-size: 0.875rem;
  font-weight: 300;
  line-height: 1.2;
  color: #00000099;
  margin-top: 1.5rem;
  opacity: 1;
}

.q-step__field label {
  display: block;
  font-size: 0.875rem;
  font-weight: 300;
  margin-bottom: 1rem;
}

.q-step__field input {
  width: 100%;
  padding: 0.75rem 0.875rem;
  border: 1px solid #d5d5d5;
  border-radius: 2px;
  font-family: inherit;
  font-size: 0.9375rem;
  color: #000000;
}

.q-step__field input::placeholder {
  color: #a3a3a3;
}

.q-required-mark {
  color: #b3261e;
}

.q-step__field.is-invalid input,
.q-step__checkboxes.is-invalid,
.q-table.is-invalid {
  outline: 1px solid #b3261e;
}

.q-step__field.is-invalid input {
  border-color: #b3261e;
}

.q-step__checkboxes {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.q-step__checkboxes label {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-size: 0.9375rem;
  color: #000000;
  cursor: pointer;
}

.q-table-scroll {
  width: 100%;
  overflow-x: auto;
}

.q-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.q-table th,
.q-table td {
  padding: 0.625rem 0.5rem;
  text-align: center;
  border-bottom: 1px solid #e2e2e2;
  font-size: 0.875rem;
  color: #000000;
  word-wrap: break-word;
}

.q-table th,
.q-table td {
  padding: 0.625rem 0.5rem;
  text-align: center;
  border-bottom: 1px solid #e2e2e2;
  font-size: 0.875rem;
  color: #000000;
  word-wrap: break-word;
  line-height: 1.2;
}

.q-table td {
  word-wrap: break-word;
}

.q-table th {
  font-weight: 500;
  white-space: nowrap;
}

.q-table td:first-child,
.q-table th:first-child {
  width: 30%;
  text-align: left;
  font-weight: 500;
}

.q-table input[type="radio"] {
  cursor: pointer;
}

.q-table__option {
  display: inline-flex;
  cursor: pointer;
}

.q-table__option-label {
  display: none;
}

.q-nav__error {
  color: #b3261e;
  font-size: 0.875rem;
  margin-top: 1.5rem;
}

.q-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 4rem;
}

.q-nav__back {
  background: none;
  border: none;
  padding: 0;
  font-family: inherit;
  font-size: 0.9375rem;
  color: #000000;
  cursor: pointer;
}

.q-nav__back:disabled {
  opacity: 0.35;
  cursor: default;
}

.q-nav__submit {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border: 1px solid #000000;
  background: none;
  color: #000000;
  font-family: inherit;
  font-size: 1rem;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.q-nav__submit:hover {
  opacity: 0.65;
}

.q-progress {
  margin-top: 2rem;
}

.q-progress__bar {
  position: relative;
  height: 6px;
  background: #e2e2e2;
  border-radius: 6px;
}

.q-progress__fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #d0edfe 0%, #fbb271 100%);
  transition: width 0.25s ease;
  border-radius: 6px;
}

.q-progress__steps {
  display: flex;
  justify-content: space-between;
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0;
}

.q-progress__steps li {
  font-size: 0.8125rem;
  color: #a3a3a3;
  cursor: default;
}

.q-progress__steps li.is-active {
  color: #000;
  font-weight: 600;
}

@media (max-width: 1023px) {
  .questionnaire-form {
    width: 100%;
  }

  .q-table-scroll {
    overflow-x: visible;
  }

  .q-table {
    min-width: 0;
  }

  .q-table thead {
    display: none;
  }

  .q-table,
  .q-table tbody {
    display: block;
    width: 100%;
  }

  .q-table tr {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid #e2e2e2;
  }

  .q-table tr:last-child {
    margin-bottom: 0;
    border-bottom: none;
  }

  .q-table td {
    display: block;
    border-bottom: none;
    padding: 0.375rem 0;
  }

  .q-table td:first-child {
    flex: 0 0 100%;
    width: 100%;
    font-weight: 600;
    padding-bottom: 0.75rem;
  }

  .q-table td:not(:first-child) {
    flex: 0 0 auto;
    width: auto;
    text-align: left;
    padding: 0;
  }

  .q-table__option {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
  }

  .q-table__option-label {
    display: inline;
    font-size: 0.8125rem;
    color: #000000;
    opacity: 0.8;
  }
}
