.onq-quiz {
  --onq-quiz-bg: #edeef2;
  --onq-quiz-radius: 18px;
  --onq-title-color: #121a31;
  --onq-text-color: #49536b;
  --onq-muted-text-color: #8f97ac;
  --onq-counter-color: #2f3851;
  --onq-progress-bg: #f7f7fa;
  --onq-progress-fill: #3579ea;
  --onq-progress-stripe: #4b8dff;
  --onq-button-bg: #3579ea;
  --onq-button-text: #ffffff;
  --onq-button-hover-bg: #2c68cf;
  --onq-button-hover-text: #ffffff;
  --onq-button-shadow: 0 12px 30px rgba(53, 121, 234, 0.22);
  --onq-button-hover-shadow: 0 16px 34px rgba(53, 121, 234, 0.28);
  --onq-button-radius: 10px;
  --onq-button-font-size: 16px;
  --onq-button-secondary-bg: #f9f7f6;
  --onq-button-secondary-text: #151515;
  --onq-button-secondary-hover-bg: #ece8e6;
  --onq-button-secondary-hover-text: #151515;
  --onq-option-bg: #f7f7f8;
  --onq-option-border: #e2e6ef;
  --onq-option-text: #49536b;
  --onq-option-hover-bg: #ffe1ec;
  --onq-option-hover-border: #ff6fa5;
  --onq-option-hover-text: #25304d;
  --onq-option-selected-bg: #ffffff;
  --onq-option-selected-border: #3579ea;
  --onq-option-selected-text: #1f2740;
  --onq-check-bg: #eef1f6;
  --onq-check-mark: #3579ea;
  --onq-option-radius: 14px;
  --onq-option-text-size-desktop: 16px;
  --onq-option-text-size-laptop: 15px;
  --onq-option-text-size-mobile: 14px;
  --onq-option-card-min-height-desktop: 86px;
  --onq-option-card-min-height-laptop: 82px;
  --onq-option-card-min-height-mobile: 78px;
  --onq-footer-border: #d9dde7;
  --onq-input-bg: #f7f7f8;
  --onq-input-text: #40495f;
  --onq-success-accent: #17924a;
  --onq-contact-button-bg: #ffffff;
  --onq-contact-button-text: #121a31;
  --onq-contact-button-shadow: 0 6px 18px rgba(17, 24, 39, 0.06);
  --onq-contact-button-radius: 18px;
  --onq-contact-icon-padding: 10px;
  --onq-contact-icon-padding-mobile: 10px;
  --onq-contact-icon-box-size: 56px;
  --onq-contact-icon-inner-radius: 16px;
  --onq-contact-icon-image-size: 100%;
  --onq-contact-button-hover-bg: #f3f5fb;
  --onq-contact-button-hover-text: #121a31;
  --onq-contact-button-hover-shadow: 0 12px 26px rgba(17, 24, 39, 0.14);
  --onq-contact-button-active-bg: #ffe1ec;
  --onq-contact-button-active-text: #121a31;
  --onq-contact-button-active-shadow: 0 14px 30px rgba(17, 24, 39, 0.18);

  background: var(--onq-quiz-bg);
  border-radius: var(--onq-quiz-radius);
  padding: 28px;
  color: var(--onq-text-color);
  position: relative;
  overflow: hidden;
  font-family: inherit;
}

.onq-progress-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 28px;
}

.onq-progress {
  height: 28px;
  flex: 1;
  background: var(--onq-progress-bg);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(31, 39, 64, 0.06);
}

.onq-progress-bar {
  display: block;
  width: 0;
  height: 100%;
  border-radius: 8px;
  background: repeating-linear-gradient(
    -45deg,
    var(--onq-progress-fill),
    var(--onq-progress-fill) 10px,
    var(--onq-progress-stripe) 10px,
    var(--onq-progress-stripe) 20px
  );
  transition: width 0.25s ease;
}

.onq-step-counter {
  min-width: 120px;
  font-weight: 600;
  font-size: 15px;
  text-align: right;
  color: var(--onq-counter-color);
}

.onq-steps {
  min-height: 0;
}

.onq-step {
  display: none;
}

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

.onq-title {
  margin: 0 0 24px;
  font-size: 26px;
  line-height: 1.2;
  color: var(--onq-title-color);
}

.onq-description {
  margin: -8px 0 22px;
  color: var(--onq-muted-text-color);
  font-size: 16px;
}

.onq-options-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  align-items: stretch;
}

.onq-options-grid.is-text-only {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.onq-option {
  border: 1px solid var(--onq-option-border);
  background: var(--onq-option-bg);
  border-radius: var(--onq-option-radius);
  padding: 0;
  text-align: left;
  cursor: pointer;
  color: inherit;
  min-width: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.onq-option:not(.is-selected):hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(17, 24, 39, 0.08);
  border-color: var(--onq-option-hover-border);
  background: var(--onq-option-hover-bg);
}

.onq-option.is-selected {
  border-color: var(--onq-option-selected-border);
  background: var(--onq-option-selected-bg);
  box-shadow: 0 12px 30px rgba(17, 24, 39, 0.1);
}

.onq-option-image {
  display: block;
  width: 100%;
  aspect-ratio: 1.18 / 1;
  border-radius: var(--onq-option-radius) var(--onq-option-radius) 0 0;
  overflow: hidden;
}

.onq-option-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.onq-option-content {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px 16px;
  min-height: var(--onq-option-card-min-height-desktop);
  min-width: 0;
  flex: 1 1 auto;
}

.onq-options-grid.is-text-only .onq-option-content {
  min-height: var(--onq-option-card-min-height-desktop);
}

.onq-option-check {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  background: var(--onq-check-bg);
  border: 1px solid rgba(170, 180, 200, 0.5);
  position: relative;
  flex: 0 0 20px;
}

.onq-option.is-selected .onq-option-check::after {
  content: '';
  position: absolute;
  left: 6px;
  top: 2px;
  width: 5px;
  height: 10px;
  border-right: 2px solid var(--onq-check-mark);
  border-bottom: 2px solid var(--onq-check-mark);
  transform: rotate(45deg);
}

.onq-option-text {
  font-size: var(--onq-option-text-size-desktop);
  font-weight: 600;
  color: var(--onq-option-text);
  line-height: 1.3;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  min-width: 0;
  flex: 1 1 auto;
}

.onq-option:not(.is-selected):hover .onq-option-text {
  color: var(--onq-option-hover-text);
}

.onq-option.is-selected .onq-option-text {
  color: var(--onq-option-selected-text);
}

.onq-footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  border-top: 1px solid var(--onq-footer-border);
  margin-top: 34px;
  padding-top: 24px;
}

.onq-footer-text {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.onq-footer-text strong {
  color: var(--onq-title-color);
  font-size: 16px;
}

.onq-footer-text span {
  color: var(--onq-muted-text-color);
}

.onq-footer-actions {
  display: flex;
  gap: 14px;
  align-items: center;
}

.onq-back,
.onq-next,
.onq-submit,
.onq-close-success {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1.1;
  border: none;
  border-radius: var(--onq-button-radius);
  min-height: 56px;
  padding: 0 24px;
  cursor: pointer;
  font-size: var(--onq-button-font-size);
  font-weight: 700;
  letter-spacing: 0.02em;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.onq-back {
  width: 58px;
  min-width: 58px;
  background: var(--onq-button-secondary-bg);
  color: var(--onq-button-secondary-text);
}

.onq-back:hover:not(:disabled) {
  background: var(--onq-button-secondary-hover-bg);
  color: var(--onq-button-secondary-hover-text);
}

.onq-back:disabled {
  opacity: 0.45;
  cursor: default;
}

.onq-next,
.onq-submit,
.onq-close-success {
  background: var(--onq-button-bg);
  color: var(--onq-button-text);
  box-shadow: var(--onq-button-shadow);
}

.onq-submit {
  display: none;
  min-width: 250px;
}

.onq-next:hover,
.onq-submit:hover,
.onq-close-success:hover {
  background: var(--onq-button-hover-bg);
  color: var(--onq-button-hover-text);
  box-shadow: var(--onq-button-hover-shadow);
  transform: translateY(-1px);
}

.onq-final-step {
  display: none;
  grid-template-columns: minmax(220px, 320px) 1fr;
  gap: 34px;
  align-items: start;
}

.onq-final-step.is-active {
  display: grid;
}

.onq-final-step .onq-title {
  max-width: 520px;
  margin-bottom: 20px;
}

.onq-final-visual img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: calc(var(--onq-quiz-radius) - 2px);
}

.onq-final-content.no-visual {
  grid-column: 1 / -1;
}

.onq-final-tagline {
  color: var(--onq-muted-text-color);
  margin-bottom: 12px;
  font-weight: 600;
}

.onq-contact-methods {
  display: grid;
  grid-template-columns: repeat(4, minmax(72px, max-content));
  gap: 14px;
  margin: 0 0 28px;
  align-items: stretch;
}

.onq-contact-method {
  background: var(--onq-contact-button-bg);
  border: none;
  cursor: pointer;
  padding: 12px 12px 10px;
  min-width: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--onq-contact-button-text);
  font-weight: 600;
  border-radius: var(--onq-contact-button-radius);
  box-shadow: var(--onq-contact-button-shadow);
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.onq-contact-method:hover {
  background: var(--onq-contact-button-hover-bg);
  color: var(--onq-contact-button-hover-text);
  box-shadow: var(--onq-contact-button-hover-shadow);
  transform: translateY(-2px);
}

.onq-contact-method.is-active {
  background: var(--onq-contact-button-active-bg);
  color: var(--onq-contact-button-active-text);
  box-shadow: var(--onq-contact-button-active-shadow);
}

.onq-contact-method-icon {
  width: var(--onq-contact-icon-box-size);
  height: var(--onq-contact-icon-box-size);
  padding: var(--onq-contact-icon-padding);
  box-sizing: border-box;
  border-radius: var(--onq-contact-icon-inner-radius);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.9);
}

.onq-contact-method-icon img {
  width: var(--onq-contact-icon-image-size);
  height: var(--onq-contact-icon-image-size);
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}

.onq-contact-method-fallback {
  width: 100%;
  height: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 800;
  color: var(--onq-button-text);
  background: var(--onq-button-bg);
}

.onq-contact-method-label {
  font-size: 14px;
  line-height: 1.25;
}

.onq-phone-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0 0 22px;
}

.onq-phone-field span {
  color: var(--onq-muted-text-color);
  font-size: 14px;
}

.onq-phone-field input {
  width: 100%;
  border: none;
  border-radius: 10px;
  padding: 18px 18px;
  min-height: 62px;
  font-size: 26px;
  font-weight: 700;
  color: var(--onq-input-text);
  background: var(--onq-input-bg);
}

.onq-phone-field input::placeholder {
  color: rgba(64, 73, 95, 0.55);
}

.onq-phone-field input:focus {
  outline: 2px solid rgba(53, 121, 234, 0.28);
}

.onq-privacy-line {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--onq-muted-text-color);
  font-size: 13px;
  line-height: 1.4;
  margin-bottom: 12px;
}

.onq-message {
  min-height: 22px;
  margin-top: 16px;
  font-size: 14px;
}

.onq-message.is-error {
  color: #c23b3b;
}

.onq-message.is-success {
  color: var(--onq-success-accent);
}

.onq-success-modal {
  position: absolute;
  inset: 0;
  background: rgba(17, 24, 39, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.onq-success-modal[hidden] {
  display: none !important;
}

.onq-success-box {
  background: #fff;
  border-radius: 18px;
  padding: 28px;
  text-align: center;
  max-width: 420px;
  width: 100%;
}

.onq-success-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(23, 146, 74, 0.14);
  color: var(--onq-success-accent);
  font-size: 30px;
  font-weight: 800;
}

.onq-success-text {
  margin-bottom: 18px;
  font-size: 20px;
  font-weight: 700;
  color: var(--onq-title-color);
}

.onq-quiz-error {
  padding: 18px 20px;
  border-radius: 10px;
  background: #fff3f3;
  color: #a82727;
}

@media (max-width: 1199px) {
  .onq-option-text {
    font-size: var(--onq-option-text-size-laptop);
  }

  .onq-option-content,
  .onq-options-grid.is-text-only .onq-option-content {
    min-height: var(--onq-option-card-min-height-laptop);
  }
}

@media (max-width: 980px) {
  .onq-options-grid,
  .onq-options-grid.is-text-only,
  .onq-final-step.is-active {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .onq-final-step.is-active {
    gap: 24px;
  }

  .onq-contact-methods {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  .onq-quiz {
    padding: 18px;
  }

  .onq-progress-row,
  .onq-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .onq-step-counter {
    min-width: 0;
    text-align: left;
  }

  .onq-options-grid,
  .onq-options-grid.is-text-only {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .onq-final-step.is-active {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .onq-title {
    font-size: 23px;
  }

  .onq-option-text {
    font-size: var(--onq-option-text-size-mobile);
  }

  .onq-option-content,
  .onq-options-grid.is-text-only .onq-option-content {
    gap: 10px;
    padding: 12px 12px 14px;
    min-height: var(--onq-option-card-min-height-mobile);
  }

  .onq-phone-field {
    margin-bottom: 18px;
  }

  .onq-phone-field input {
    font-size: 22px;
  }

  .onq-contact-methods {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 20px;
  }

  .onq-contact-method {
    min-height: 120px;
  }

  .onq-contact-method-icon {
    padding: var(--onq-contact-icon-padding-mobile);
  }

  .onq-footer {
    margin-top: 22px;
    padding-top: 18px;
    gap: 14px;
  }

  .onq-footer-actions {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 12px;
    align-items: stretch;
  }

  .onq-back {
    width: auto;
    min-width: 0;
    min-height: 56px;
  }

  .onq-next,
  .onq-submit {
    width: 100%;
    min-width: 0;
    justify-content: center;
  }
}
