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

body.aq-modal-open {
  overflow: hidden;
}

.aq-modal {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(4, 24, 17, 0.48);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  animation: aq-fade-in 180ms ease-out both;
}

.aq-dialog {
  position: relative;
  width: min(100%, 720px);
  max-height: calc(100dvh - 36px);
  overflow: auto;
  overscroll-behavior: contain;
  color: #15251f;
  background: #fff;
  border: 1px solid rgba(8, 84, 49, 0.14);
  border-radius: 20px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  animation: aq-rise-in 220ms ease-out both;
}

.aq-close {
  position: sticky;
  top: 12px;
  z-index: 4;
  display: grid;
  width: 38px;
  height: 38px;
  margin: 12px 12px -50px auto;
  padding: 0;
  place-items: center;
  color: #315047;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid #d5e3dc;
  border-radius: 50%;
  box-shadow: 0 3px 12px rgba(4, 49, 38, 0.1);
  font: 700 25px/1 Arial, sans-serif;
  cursor: pointer;
}

.aq-close:hover {
  color: #fff;
  background: #085431;
  border-color: #085431;
}

.aq-close:focus-visible,
.aq-action:focus-visible,
.aq-result-button:focus-visible,
.aq-option:focus-within {
  outline: 3px solid rgba(25, 155, 98, 0.34);
  outline-offset: 3px;
}

.aq-content {
  padding: clamp(28px, 5vw, 46px);
}

.aq-intro,
.aq-processing,
.aq-result {
  text-align: center;
}

.aq-eyebrow {
  margin: 0 0 9px;
  color: #199b62;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.aq-title,
.aq-question legend {
  color: #043126;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  letter-spacing: -0.025em;
}

.aq-title {
  max-width: 610px;
  margin: 0 auto;
  font-size: clamp(25px, 4.8vw, 38px);
  line-height: 1.1;
}

.aq-subtitle {
  max-width: 560px;
  margin: 13px auto 0;
  color: #5f6f68;
  font-size: clamp(15px, 2.2vw, 17px);
  line-height: 1.5;
}

.aq-progress-wrap {
  margin: 24px 0 28px;
}

.aq-progress-meta {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 8px;
  color: #5f6f68;
  font-size: 13px;
  font-weight: 700;
}

.aq-progress-track {
  height: 9px;
  overflow: hidden;
  background: #e7efeb;
  border-radius: 999px;
}

.aq-progress-fill {
  width: 25%;
  height: 100%;
  background: linear-gradient(90deg, #085431, #29ad73);
  border-radius: inherit;
  transition: width 0.32s ease;
}

.aq-question {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.aq-question legend {
  width: 100%;
  margin: 0 0 8px;
  padding: 0;
  font-size: clamp(22px, 4vw, 29px);
  font-weight: 750;
  line-height: 1.18;
}

.aq-question-hint {
  margin: 0 0 17px;
  color: #5f6f68;
  font-size: 15px;
}

.aq-question:not(:has(.aq-question-hint)) legend {
  margin-bottom: 18px;
}

.aq-options {
  display: grid;
  gap: 10px;
}

.aq-option {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 56px;
  padding: 12px 14px;
  color: #263b32;
  background: #fbfdfc;
  border: 1.5px solid #d9e5df;
  border-radius: 12px;
  cursor: pointer;
  transition: border-color 0.16s ease, background-color 0.16s ease, box-shadow 0.16s ease;
  -webkit-tap-highlight-color: transparent;
}

.aq-option:hover,
.aq-option.aq-selected {
  background: #f2fffa;
  border-color: #199b62;
}

.aq-option.aq-selected {
  box-shadow: 0 0 0 2px rgba(25, 155, 98, 0.13);
}

.aq-option input {
  width: 21px;
  height: 21px;
  flex: 0 0 auto;
  margin: 0 13px 0 0;
  accent-color: #199b62;
  cursor: pointer;
}

.aq-option span {
  font-size: clamp(15px, 2.4vw, 17px);
  font-weight: 650;
  line-height: 1.32;
}

.aq-validation {
  margin: 13px 0 0;
  padding: 10px 12px;
  color: #b42318;
  background: #fff1f0;
  border: 1px solid #ffd2cc;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 650;
}

.aq-actions {
  position: sticky;
  bottom: 0;
  z-index: 2;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  margin-top: 21px;
  padding-top: 9px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0), #fff 24%);
}

.aq-action,
.aq-result-button {
  min-height: 54px;
  border-radius: 11px;
  font-weight: 800;
  cursor: pointer;
}

.aq-next {
  padding: 13px 21px;
  color: #fff;
  background: #199b62;
  border: 1px solid #199b62;
  box-shadow: 0 7px 17px rgba(25, 155, 98, 0.22);
}

.aq-next:hover,
.aq-result-button:hover {
  background: #085431;
  border-color: #085431;
}

.aq-back {
  padding: 13px 16px;
  color: #085431;
  background: #fff;
  border: 1px solid #b9d1c5;
}

.aq-back:hover {
  background: #f2fffa;
}

.aq-processing,
.aq-result {
  animation: aq-rise-in 0.38s ease both;
}

.aq-processing .aq-title,
.aq-result .aq-title {
  font-size: clamp(26px, 5vw, 35px);
}

.aq-processing > p,
.aq-result > p:not(.aq-eyebrow):not(.aq-auto-redirect) {
  max-width: 560px;
  margin: 12px auto 0;
  color: #5f6f68;
  font-size: 17px;
  line-height: 1.55;
}

.aq-processing-ring {
  position: relative;
  display: grid;
  width: 136px;
  height: 136px;
  margin: 25px auto;
  place-items: center;
}

.aq-processing-ring svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.aq-processing-ring circle {
  fill: none;
  stroke-width: 8;
}

.aq-ring-track {
  stroke: #e5efea;
}

.aq-ring-fill {
  stroke: #199b62;
  stroke-dasharray: 327;
  stroke-dashoffset: 327;
  stroke-linecap: round;
}

.aq-processing-ring strong {
  color: #085431;
  font-size: 30px;
}

.aq-processing-list {
  max-width: 430px;
  display: grid;
  gap: 10px;
  margin: 0 auto;
  padding: 0;
  color: #789087;
  list-style: none;
  text-align: left;
}

.aq-processing-list li {
  display: flex;
  align-items: center;
  gap: 10px;
}

.aq-processing-list span {
  display: grid;
  width: 25px;
  height: 25px;
  flex: 0 0 auto;
  place-items: center;
  color: transparent;
  background: #edf3f0;
  border-radius: 50%;
}

.aq-processing-list li.aq-complete {
  color: #15251f;
  font-weight: 650;
}

.aq-processing-list li.aq-complete span {
  color: #fff;
  background: #199b62;
}

.aq-result-check {
  display: grid;
  width: 72px;
  height: 72px;
  margin: 0 auto 20px;
  place-items: center;
  color: #fff;
  background: #199b62;
  border-radius: 50%;
  box-shadow: 0 0 0 10px #dff7ec;
  font-size: 37px;
  font-weight: 800;
}

.aq-result-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(100%, 470px);
  margin: 25px auto 0;
  padding: 13px 18px;
  color: #fff;
  background: #199b62;
  border: 1px solid #199b62;
  box-shadow: 0 8px 22px rgba(25, 155, 98, 0.25);
  text-decoration: none;
}

.aq-auto-redirect {
  margin: 12px 0 0 !important;
  color: #789087 !important;
  font-size: 13px !important;
}

.aq-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;
}

@keyframes aq-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes aq-rise-in {
  from { opacity: 0; transform: translateY(10px) scale(0.99); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 540px) {
  .aq-modal {
    align-items: end;
    padding: 0;
  }

  .aq-dialog {
    width: 100%;
    max-height: 94dvh;
    border-radius: 20px 20px 0 0;
  }

  .aq-content {
    padding: 28px 16px 22px;
  }

  .aq-close {
    top: 10px;
    margin: 10px 10px -48px auto;
  }

  .aq-progress-wrap {
    margin: 21px 0 24px;
  }

  .aq-option {
    min-height: 54px;
    padding: 11px 12px;
    border-radius: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .aq-modal,
  .aq-dialog,
  .aq-processing,
  .aq-result {
    animation: none;
  }

  .aq-progress-fill {
    transition: none;
  }
}
