.wptech-qe {
  --wptech-blue: #1261e5;
  --wptech-blue-dark: #0a46ad;
  --wptech-ink: #172033;
  --wptech-muted: #667085;
  --wptech-border: #d8dee9;
  --wptech-soft: #f6f8fb;
  --wptech-green: #147d64;
  max-width: 920px;
  margin: 32px auto;
  color: var(--wptech-ink);
  font-family: inherit;
}

.wptech-qe * {
  box-sizing: border-box;
  letter-spacing: 0;
}

.wptech-qe__form {
  min-height: 560px;
  overflow: hidden;
  border: 1px solid var(--wptech-border);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 50px rgba(23, 32, 51, 0.08);
}

.wptech-qe__topbar {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  padding: 10px 22px;
  border-bottom: 1px solid #e8ebf0;
  background: #fff;
}

.wptech-qe__back {
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--wptech-border);
  border-radius: 50%;
  background: #fff;
  color: var(--wptech-ink);
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
}

.wptech-qe__back[hidden] {
  visibility: hidden;
  display: block;
}

.wptech-qe__progress {
  height: 5px;
  overflow: hidden;
  border-radius: 4px;
  background: #e8edf5;
}

.wptech-qe__progress span {
  display: block;
  width: 8%;
  height: 100%;
  border-radius: inherit;
  background: var(--wptech-green);
  transition: width 240ms ease;
}

.wptech-qe__progress-label {
  min-width: 108px;
  color: var(--wptech-muted);
  font-size: 13px;
  font-weight: 700;
  text-align: right;
}

.wptech-qe__conversation {
  padding: 56px clamp(24px, 8vw, 72px) 36px;
}

.wptech-qe__turn {
  max-width: 760px;
  margin: 0 auto;
  animation: wptech-qe-in 180ms ease-out;
}

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

.wptech-qe__eyebrow {
  margin: 0 0 10px;
  color: var(--wptech-green);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.wptech-qe__turn h2 {
  max-width: 720px;
  margin: 0;
  color: var(--wptech-ink);
  font-size: clamp(27px, 4vw, 38px);
  font-weight: 750;
  line-height: 1.18;
}

.wptech-qe__lead {
  max-width: 680px;
  margin: 12px 0 28px;
  color: var(--wptech-muted);
  font-size: 17px;
  line-height: 1.55;
}

.wptech-qe__prompt-box {
  position: relative;
  border: 2px solid var(--wptech-ink);
  border-radius: 8px;
  background: #fff;
}

.wptech-qe__prompt-box:focus-within {
  border-color: var(--wptech-blue);
  box-shadow: 0 0 0 3px rgba(18, 97, 229, 0.12);
}

.wptech-qe__prompt-box textarea {
  display: block;
  width: 100%;
  min-height: 126px;
  padding: 18px 58px 18px 18px;
  border: 0;
  outline: 0;
  resize: vertical;
  background: transparent;
  color: var(--wptech-ink);
  font: inherit;
  font-size: 17px;
  line-height: 1.5;
}

.wptech-qe__send {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: var(--wptech-ink);
  color: #fff;
  cursor: pointer;
  font-size: 21px;
  line-height: 1;
}

.wptech-qe__quick {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.wptech-qe__quick button,
.wptech-qe__selected {
  min-height: 38px;
  padding: 8px 13px;
  border: 1px solid var(--wptech-border);
  border-radius: 20px;
  background: #fff;
  color: var(--wptech-ink);
  cursor: pointer;
  font: inherit;
  font-size: 14px;
}

.wptech-qe__quick button:hover,
.wptech-qe__selected:hover {
  border-color: var(--wptech-blue);
  color: var(--wptech-blue-dark);
}

.wptech-qe__divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 26px 0 16px;
  color: #98a2b3;
  font-size: 13px;
}

.wptech-qe__divider::before,
.wptech-qe__divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #e4e7ec;
}

.wptech-qe__talk {
  width: 100%;
  min-height: 48px;
  padding: 11px 16px;
  border: 1px solid var(--wptech-border);
  border-radius: 6px;
  background: var(--wptech-soft);
  color: var(--wptech-ink);
  cursor: pointer;
  font: inherit;
  font-weight: 700;
}

.wptech-qe__choices {
  display: grid;
  gap: 9px;
}

.wptech-qe__choice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 52px;
  padding: 13px 16px;
  border: 1px solid var(--wptech-border);
  border-radius: 6px;
  background: #fff;
  color: var(--wptech-ink);
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  text-align: left;
}

.wptech-qe__choice:hover,
.wptech-qe__choice:focus {
  border-color: var(--wptech-blue);
  background: #f8fbff;
}

.wptech-qe__choice small {
  padding: 4px 8px;
  border-radius: 12px;
  background: #e8f6f1;
  color: var(--wptech-green);
  font-size: 11px;
}

.wptech-qe__text-button,
.wptech-qe__skip {
  display: block;
  margin: 16px auto 0;
  padding: 5px;
  border: 0;
  background: transparent;
  color: var(--wptech-blue-dark);
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.wptech-qe__select-wrap {
  display: grid;
  gap: 8px;
  color: var(--wptech-ink);
  font-weight: 700;
}

.wptech-qe__select-wrap select,
.wptech-qe__large-input,
.wptech-qe__answer textarea {
  width: 100%;
  min-height: 54px;
  padding: 13px 14px;
  border: 1px solid #aeb7c5;
  border-radius: 6px;
  outline: 0;
  background: #fff;
  color: var(--wptech-ink);
  font: inherit;
  font-size: 17px;
}

.wptech-qe__answer textarea {
  min-height: 132px;
  resize: vertical;
}

.wptech-qe__select-wrap select:focus,
.wptech-qe__large-input:focus,
.wptech-qe__answer textarea:focus {
  border-color: var(--wptech-blue);
  box-shadow: 0 0 0 3px rgba(18, 97, 229, 0.12);
}

.wptech-qe__selected-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 10px;
  margin-top: 14px;
}

.wptech-qe__selected {
  background: #edf4ff;
  border-color: #b9d2ff;
}

.wptech-qe__option-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.wptech-qe__option {
  min-height: 52px;
  padding: 11px 13px;
  border: 1px solid var(--wptech-border);
  border-radius: 6px;
  background: #fff;
  color: var(--wptech-ink);
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.wptech-qe__option:hover,
.wptech-qe__option.is-selected {
  border-color: var(--wptech-blue);
  background: #edf4ff;
  box-shadow: inset 3px 0 0 var(--wptech-blue);
}

.wptech-qe__actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
}

.wptech-qe__actions--stack {
  align-items: stretch;
  flex-direction: column;
}

.wptech-qe__button {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 48px;
  padding: 11px 18px;
  border: 0;
  border-radius: 6px;
  background: var(--wptech-blue);
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-weight: 750;
}

.wptech-qe__button:hover {
  background: var(--wptech-blue-dark);
}

.wptech-qe__button--secondary {
  justify-content: center;
  border: 1px solid var(--wptech-border);
  background: #fff;
  color: var(--wptech-ink);
}

.wptech-qe__button--secondary:hover {
  background: var(--wptech-soft);
}

.wptech-qe__skip {
  display: inline-block;
  margin: 0;
}

.wptech-qe__estimate,
.wptech-qe__success {
  display: grid;
  gap: 8px;
  padding: 24px;
  border-left: 4px solid var(--wptech-green);
  border-radius: 4px;
  background: #f1f8f5;
}

.wptech-qe__estimate strong,
.wptech-qe__success strong {
  font-size: 28px;
  line-height: 1.2;
}

.wptech-qe__estimate span,
.wptech-qe__success span {
  color: var(--wptech-muted);
  line-height: 1.45;
}

.wptech-qe__summary {
  display: grid;
  grid-template-columns: 105px minmax(0, 1fr);
  gap: 8px 14px;
  margin-bottom: 24px;
  padding: 18px;
  border-radius: 6px;
  background: var(--wptech-soft);
}

.wptech-qe__summary span {
  color: var(--wptech-muted);
}

.wptech-qe__consent {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  margin: 13px 0;
  line-height: 1.5;
}

.wptech-qe__consent input {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin-top: 2px;
}

.wptech-qe__consent--optional {
  color: var(--wptech-muted);
}

.wptech-qe__message {
  min-height: 24px;
  margin: 0 clamp(24px, 8vw, 72px) 24px;
  color: #b42318;
  font-weight: 700;
}

.wptech-qe__loader {
  width: 34px;
  height: 34px;
  margin-top: 24px;
  border: 3px solid #dce5f2;
  border-top-color: var(--wptech-blue);
  border-radius: 50%;
  animation: wptech-qe-spin 700ms linear infinite;
}

@keyframes wptech-qe-spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 640px) {
  .wptech-qe {
    margin: 16px 0;
  }

  .wptech-qe__form {
    min-height: 520px;
    box-shadow: none;
  }

  .wptech-qe__topbar {
    grid-template-columns: 36px minmax(0, 1fr);
    padding: 9px 14px;
  }

  .wptech-qe__progress-label {
    display: none;
  }

  .wptech-qe__conversation {
    padding: 36px 20px 28px;
  }

  .wptech-qe__turn h2 {
    font-size: 28px;
  }

  .wptech-qe__lead {
    margin-bottom: 22px;
    font-size: 16px;
  }

  .wptech-qe__option-list {
    grid-template-columns: 1fr;
  }

  .wptech-qe__button {
    width: 100%;
  }

  .wptech-qe__actions {
    align-items: stretch;
    flex-direction: column;
  }

  .wptech-qe__skip {
    width: 100%;
  }

  .wptech-qe__summary {
    grid-template-columns: 1fr;
  }

  .wptech-qe__message {
    margin: 0 20px 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .wptech-qe__turn,
  .wptech-qe__loader {
    animation: none;
  }
}