.questionnaire-page {
  background: #f7f7fa;
}

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

.survey-main {
  min-height: 100vh;
}

.survey-hero {
  padding: 126px 0 54px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.survey-hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 72px;
  align-items: end;
}

.survey-hero h1 {
  max-width: 820px;
  font-size: clamp(38px, 4vw, 54px);
  line-height: 1.08;
}

.survey-hero p:not(.eyebrow) {
  max-width: 720px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.6;
}

.survey-hero aside {
  display: grid;
  gap: 9px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f7f7fa;
}

.survey-hero aside strong {
  font-size: 17px;
}

.survey-hero aside span {
  color: var(--muted);
  font-size: 14px;
}

.survey-section {
  padding: 42px 0 72px;
}

.survey-shell {
  max-width: 1050px;
}

.survey-progress {
  position: sticky;
  z-index: 30;
  top: 82px;
  margin-bottom: 18px;
  padding: 16px 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 10px 30px rgba(23, 24, 39, .06);
  backdrop-filter: blur(12px);
}

.survey-progress__meta {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 11px;
  color: var(--muted);
  font-size: 14px;
}

.survey-progress__meta strong {
  color: var(--ink);
  font-weight: 700;
}

.survey-progress__track {
  display: block;
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: #e7e5ed;
}

.survey-progress__track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  transition: width .25s ease;
}

.survey-form,
.survey-success {
  padding: clamp(24px, 4vw, 46px);
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 18px 55px rgba(23, 24, 39, .07);
}

.survey-step[hidden],
.survey-success[hidden],
.survey-contact-fields[hidden] {
  display: none;
}

.survey-step__header {
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 16px;
  align-items: start;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
}

.survey-step__header > span {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 10px;
  background: #efecfb;
  color: var(--accent-dark);
  font-size: 14px;
  font-weight: 700;
}

.survey-step__header h2 {
  font-size: 28px;
}

.survey-step__header p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 15px;
}

.survey-question {
  min-width: 0;
  margin: 0;
  padding: 30px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
}

.survey-question legend {
  display: flex;
  width: 100%;
  align-items: flex-start;
  gap: 12px;
  padding: 0;
  color: var(--ink);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.4;
}

.survey-question legend > span {
  flex: 0 0 32px;
  color: #707381;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.9;
}

.survey-question legend b,
.survey-field-grid label > b {
  margin-left: 2px;
  color: #b42318;
}

.survey-question__hint {
  margin: 7px 0 16px 44px;
  color: var(--muted);
  font-size: 13px;
}

.survey-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-left: 44px;
}

.survey-option {
  position: relative;
  display: flex;
  min-height: 50px;
  align-items: center;
  gap: 11px;
  padding: 11px 13px;
  border: 1px solid #d8d9e0;
  border-radius: 9px;
  background: #fff;
  color: #333541;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, box-shadow .18s ease;
}

.survey-option:hover {
  border-color: #aaa6bc;
  background: #faf9fd;
}

.survey-option:has(input:checked) {
  border-color: var(--accent);
  background: #f4f1fd;
  box-shadow: 0 0 0 1px var(--accent);
}

.survey-option input {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  min-height: 18px;
  margin: 0;
  padding: 0;
  accent-color: var(--accent);
}

.survey-option span {
  color: inherit;
}

.survey-option.is-disabled {
  opacity: .48;
  cursor: not-allowed;
}

.survey-textarea {
  position: relative;
  display: block;
  margin-left: 44px;
}

.survey-textarea textarea {
  min-height: 122px;
  margin: 0;
  padding-bottom: 34px;
  background: #fff;
  font-size: 15px;
}

.survey-textarea small {
  position: absolute;
  right: 12px;
  bottom: 10px;
  color: var(--muted);
  font-size: 12px;
}

.survey-question__error {
  min-height: 0;
  margin: 9px 0 0 44px;
  color: #b42318;
  font-size: 13px;
  font-weight: 600;
}

.survey-question__error:empty {
  display: none;
}

.survey-question.has-error .survey-option,
.survey-question.has-error textarea {
  border-color: #d92d20;
}

.survey-contact-fields {
  margin-top: 24px;
  padding: 24px;
  border-radius: 12px;
  background: #f7f7fa;
}

.survey-contact-fields__head h3 {
  font-size: 20px;
}

.survey-contact-fields__head p {
  margin: 5px 0 20px;
  color: var(--muted);
  font-size: 14px;
}

.survey-field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.survey-field-grid label {
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
}

.survey-field-grid label small {
  color: var(--muted);
  font-weight: 400;
}

.survey-field-grid input {
  margin-top: 7px;
  background: #fff;
}

.survey-consent {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 10px;
  align-items: start;
  margin-top: 24px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.survey-consent input {
  width: 18px;
  height: 18px;
  min-height: 18px;
  margin: 2px 0 0;
  accent-color: var(--accent);
}

.survey-consent a {
  color: var(--ink);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.survey-consent b {
  color: #b42318;
}

.survey-form__status {
  margin-top: 18px;
  color: #b42318;
  font-size: 14px;
  font-weight: 600;
}

.survey-form__status:empty {
  display: none;
}

.survey-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding-top: 26px;
}

.survey-button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 11px 20px;
  border: 1px solid var(--accent);
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font: 700 14px/1.3 var(--font-family);
  cursor: pointer;
}

.survey-button:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
}

.survey-button:disabled {
  opacity: .55;
  cursor: wait;
}

.survey-button--secondary {
  border-color: var(--line);
  background: #fff;
  color: var(--ink);
}

.survey-button--secondary:hover {
  border-color: #bbb9c5;
  background: #f7f7fa;
}

.survey-success {
  text-align: center;
}

.survey-success > span {
  display: grid;
  width: 54px;
  height: 54px;
  margin: 0 auto 18px;
  place-items: center;
  border-radius: 50%;
  background: #e5f5ec;
  color: #1f7a4d;
  font-size: 24px;
  font-weight: 700;
}

.survey-success h2 {
  font-size: 30px;
}

.survey-success p {
  margin: 12px auto 24px;
  color: var(--muted);
}

.survey-success .survey-button {
  width: fit-content;
  margin: 0 auto;
}

@media (max-width: 900px) {
  .survey-hero__grid {
    grid-template-columns: 1fr;
    gap: 26px;
  }

  .survey-hero aside {
    grid-template-columns: repeat(3, 1fr);
  }

  .survey-options {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .survey-hero {
    padding: 104px 0 38px;
  }

  .survey-hero h1 {
    font-size: 34px;
  }

  .survey-hero aside {
    grid-template-columns: 1fr;
  }

  .survey-section {
    padding: 24px 0 48px;
  }

  .survey-progress {
    top: 78px;
    padding: 13px 14px;
  }

  .survey-progress__meta {
    display: grid;
    gap: 3px;
  }

  .survey-form,
  .survey-success {
    padding: 20px;
    border-radius: 14px;
  }

  .survey-step__header {
    grid-template-columns: 38px 1fr;
  }

  .survey-step__header > span {
    width: 36px;
    height: 36px;
  }

  .survey-step__header h2 {
    font-size: 24px;
  }

  .survey-question legend {
    font-size: 16px;
  }

  .survey-question legend > span {
    flex-basis: 28px;
  }

  .survey-question__hint,
  .survey-options,
  .survey-textarea,
  .survey-question__error {
    margin-left: 40px;
  }

  .survey-field-grid {
    grid-template-columns: 1fr;
  }

  .survey-actions {
    justify-content: space-between;
  }
}


/* Explicit final-action visibility and question-level progress */
[data-survey-submit][hidden],
[data-survey-next][hidden],
[data-survey-back][hidden],
.survey-progress[hidden] {
  display: none !important;
}

.survey-progress__questions {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 9px;
  color: #737684;
  font-size: 12px;
}

.survey-progress__questions strong {
  color: #4b4e5a;
  font-weight: 600;
}

.survey-progress__questions b {
  color: var(--accent-dark);
  font-size: 13px;
}

@media (max-width: 640px) {
  .survey-progress__questions {
    display: grid;
    gap: 2px;
  }
}
