:root {
  color-scheme: light;
  --ink: #172018;
  --muted: #5d685f;
  --paper: #f7f9f6;
  --surface: #ffffff;
  --line: #d8dfd9;
  --coral: #e6543d;
  --coral-dark: #bd3826;
  --mint: #dcefe5;
  --teal: #176c68;
  --navy: #17213a;
  --focus: #0b62d6;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--paper);
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: var(--paper);
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: var(--teal);
}

.site-head,
footer,
main {
  width: min(1120px, calc(100% - 32px));
  margin-inline: auto;
}

.site-head {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.wordmark {
  color: var(--navy);
  font-size: 15px;
  font-weight: 850;
  text-decoration: none;
}

.market {
  color: var(--muted);
  font-size: 13px;
}

main {
  padding: 28px 0 32px;
}

.quiz-shell {
  display: grid;
  grid-template-columns: minmax(300px, 0.82fr) minmax(420px, 1.18fr);
  min-height: 680px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 18px 54px rgba(31, 47, 34, 0.09);
}

.quiz-media {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 26px;
  padding: 44px clamp(24px, 3vw, 44px);
  background: var(--mint);
  border-right: 1px solid var(--line);
}

.media-eyebrow {
  margin: 0;
  color: var(--teal);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.media-numbers {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: none;
}

.media-numbers li {
  display: flex;
  align-items: baseline;
  gap: 14px;
}

.media-numbers b {
  flex: none;
  width: 30px;
  color: var(--teal);
  font-size: 26px;
  font-weight: 850;
  line-height: 1;
}

.media-numbers span {
  color: var(--ink);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.35;
}

.media-foot {
  margin: 0;
  padding-top: 18px;
  border-top: 1px solid rgba(23, 108, 104, 0.22);
  color: var(--muted);
  font-size: 14px;
}

.quiz-workspace {
  display: flex;
  min-width: 0;
  flex-direction: column;
  padding: 34px clamp(24px, 5vw, 58px) 42px;
}

.progress-wrap {
  margin-bottom: 42px;
}

.progress-copy {
  display: flex;
  justify-content: space-between;
  margin-bottom: 9px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.progress-track {
  width: 100%;
  height: 4px;
  overflow: hidden;
  background: #e8ece8;
}

.progress-track span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--teal);
  transition: width 180ms ease;
}

.step {
  display: none;
  width: 100%;
  max-width: 620px;
  margin: auto 0;
}

.step.is-active {
  display: block;
  animation: step-in 180ms ease-out;
}

@keyframes step-in {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--teal);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1,
h2 {
  max-width: 18ch;
  margin: 0;
  color: var(--navy);
  font-size: 36px;
  line-height: 1.14;
  letter-spacing: 0;
}

h2 {
  font-size: 30px;
}

h3 {
  margin: 0 0 8px;
  font-size: 20px;
  letter-spacing: 0;
}

.lead,
.question-help,
.result-copy {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.58;
}

.proof-list {
  display: grid;
  gap: 10px;
  margin: 26px 0 30px;
  padding: 0;
  list-style: none;
}

.proof-list li {
  position: relative;
  padding-left: 24px;
  color: #354138;
  line-height: 1.45;
}

.proof-list li::before {
  position: absolute;
  top: 0.42em;
  left: 2px;
  width: 9px;
  height: 9px;
  background: var(--coral);
  content: "";
}

.primary-action,
.text-action {
  min-height: 48px;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 800;
}

.primary-action {
  display: inline-flex;
  max-width: 100%;
  align-items: center;
  justify-content: center;
  padding: 13px 22px;
  color: #fff;
  background: var(--coral);
}

.primary-action:hover {
  background: var(--coral-dark);
}

.primary-action:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.link-action {
  text-decoration: none;
}

.text-action {
  padding: 10px 2px;
  color: var(--muted);
  background: transparent;
}

.primary-action:focus-visible,
.text-action:focus-visible,
.option:focus-visible,
input:focus-visible,
a:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.options {
  display: grid;
  gap: 10px;
  margin-top: 26px;
}

.option {
  min-height: 58px;
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  background: var(--surface);
  cursor: pointer;
  text-align: left;
  line-height: 1.35;
}

.option:hover {
  border-color: #9cac9f;
  background: #fafcf9;
}

.option.is-selected {
  border-color: var(--teal);
  background: var(--mint);
  box-shadow: inset 4px 0 0 var(--teal);
}

.step-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 28px;
}

.result-plan {
  margin: 26px 0 30px;
  padding: 18px 20px;
  border-left: 4px solid var(--teal);
  background: var(--mint);
}

.result-plan strong {
  color: var(--navy);
}

.result-plan p {
  margin: 8px 0 0;
  color: #354138;
  line-height: 1.5;
}

#lead-intake {
  margin-top: 26px;
}

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

.field-grid label {
  display: grid;
  gap: 7px;
  color: #354138;
  font-size: 13px;
  font-weight: 750;
}

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

.field-wide {
  grid-column: 1 / -1;
}

.field-grid input {
  min-width: 0;
  min-height: 48px;
  padding: 11px 12px;
  border: 1px solid #bfc9c0;
  border-radius: 5px;
  color: var(--ink);
  background: #fff;
}

.field-grid input[aria-invalid="true"] {
  border-color: var(--coral);
}

.consent {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 10px;
  margin-top: 18px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.consent input {
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  accent-color: var(--teal);
}

.form-error {
  min-height: 20px;
  margin: 14px 0 8px;
  color: #a62d1f;
  font-size: 13px;
  font-weight: 700;
}

.crm-stage {
  margin-top: 28px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}

.crm-stage > p {
  margin: 0 0 18px;
  color: var(--muted);
  line-height: 1.5;
}

#bitrix-form-slot {
  min-height: 360px;
}

.honeypot {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.noscript {
  padding: 12px 20px;
  color: #fff;
  background: var(--navy);
  text-align: center;
}

footer {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 13px;
}

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

@media (max-width: 840px) {
  .site-head,
  footer,
  main {
    width: min(100% - 24px, 680px);
  }

  .site-head {
    min-height: 60px;
  }

  main {
    padding-top: 16px;
  }

  .quiz-shell {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  /* На телефоне заголовок должен быть первым экраном, панель уходит вниз. */
  .quiz-workspace {
    order: 1;
  }

  .quiz-media {
    order: 2;
    min-height: 0;
    gap: 16px;
    padding: 20px;
    border-right: 0;
    border-top: 1px solid var(--line);
  }

  .media-numbers {
    gap: 12px;
  }

  .media-numbers b {
    font-size: 21px;
  }

  .media-numbers span {
    font-size: 15px;
  }

  .media-foot {
    padding-top: 12px;
  }

  .quiz-workspace {
    min-height: 620px;
    padding: 24px 20px 30px;
  }

  .progress-wrap {
    margin-bottom: 30px;
  }

  h1 {
    font-size: 32px;
  }

  h2 {
    font-size: 27px;
  }
}

@media (max-width: 520px) {
  .quiz-workspace {
    min-height: 650px;
    padding-inline: 17px;
  }

  .quiz-media {
    padding: 16px;
  }

  h1 {
    font-size: 29px;
  }

  h2 {
    font-size: 25px;
  }

  .lead,
  .question-help,
  .result-copy {
    font-size: 16px;
  }

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

  .field-wide {
    grid-column: auto;
  }

  .primary-action {
    width: 100%;
  }

  footer {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .step.is-active {
    animation: none;
  }

  .progress-track span {
    transition: none;
  }
}

.offer-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0 0 20px;
  padding-left: 20px;
  color: var(--ink);
  font-size: 17px;
  line-height: 1.45;
}

.offer-list li::marker {
  color: var(--teal);
  font-weight: 800;
}

.micro-note {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.crm-stage:empty {
  display: none;
}

@media (max-width: 520px) {
  .offer-list {
    font-size: 16px;
  }
}
