#contact-dialog {
  width: min(720px, calc(100% - 32px));
  max-height: min(90dvh, 920px);
  overscroll-behavior: contain;
}
.qualification {
  padding: 42px 40px 32px;
}
.q-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-right: 22px;
}
.q-topline .eyebrow {
  margin: 0;
  font-size: 8px;
}
.q-step-count {
  font-size: 10px;
  color: var(--muted);
  white-space: nowrap;
}
.q-progress {
  height: 3px;
  background: #e8ecdf;
  border-radius: 4px;
  margin: 20px 0 27px;
  overflow: hidden;
}
.q-progress span {
  display: block;
  height: 100%;
  background: #8baf55;
  transition: width 0.3s;
}
.qualification h2 {
  font-size: 31px;
  letter-spacing: -1.2px;
  max-width: 520px;
  outline: none;
}
.q-description {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.8;
  margin: 13px 0 26px;
}
.q-fields {
  display: grid;
  gap: 23px;
}
.q-field {
  display: flex;
  flex-direction: column;
  gap: 9px;
  min-width: 0;
}
.q-field > span,
.q-choice-group legend {
  font-size: 12px;
  font-weight: 700;
  line-height: 1.6;
}
.q-field small {
  color: var(--muted);
  font-weight: 400;
  font-size: 10px;
}
.q-field input,
.q-field select {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid #dce2d4;
  border-radius: 5px;
  background: #fff;
  color: var(--ink);
  font-size: 13px;
}
.q-field select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 42px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2358614f' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-position: right 16px center;
  background-size: 16px 16px;
  background-repeat: no-repeat;
}
.q-field input::placeholder {
  color: #959b90;
  font-size: 12px;
}
.q-choice-group {
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}
.q-choice-group legend {
  margin-bottom: 12px;
  padding: 0;
}
.q-choices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}
.q-choice {
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
  min-height: 51px;
  padding: 13px 14px;
  border: 1px solid #e0e5d9;
  background: #fff;
  border-radius: 5px;
  cursor: pointer;
  transition:
    background 0.15s,
    border-color 0.15s;
  font-size: 11px;
  line-height: 1.6;
}
.q-choice input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.q-choice > span {
  flex: 1;
}
.q-choice i {
  height: 15px;
  width: 15px;
  border: 1px solid #c5cdbb;
  border-radius: 50%;
  flex-shrink: 0;
}
.q-choice:has(input:checked) {
  background: #f0f7e7;
  border-color: #8db755;
}
.q-choice input:checked ~ i {
  border: 4px solid #5e803a;
  background: #fff;
}
.q-choice:has(input:focus-visible) {
  outline: 3px solid #70a638;
  outline-offset: 3px;
}
.q-choice:hover {
  border-color: #9db67b;
  background: #f8faf3;
}
.q-checkbox {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 11px;
  color: #58614f;
  line-height: 1.8;
  cursor: pointer;
}
.q-checkbox input {
  margin: 3px 0 0;
  accent-color: #5e803a;
  flex-shrink: 0;
  width: 17px;
  height: 17px;
}
.q-monthly {
  display: grid;
  gap: 13px;
}
.q-consent {
  padding: 17px;
  background: var(--paper);
  border-radius: 5px;
}
.q-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.q-location {
  grid-template-columns: 1fr 110px;
}
.q-hint,
.q-context {
  font-size: 10px;
  line-height: 1.8;
  color: var(--muted);
  margin: -9px 0 0;
}
.q-context {
  margin-top: -14px;
  color: #66853d;
}
.q-actions {
  margin-top: 28px;
  padding-top: 23px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 15px;
  align-items: center;
}
.q-back {
  background: none;
  font-size: 11px;
  padding: 12px 0;
}
.q-actions > .button {
  margin-left: auto;
  font-size: 11px;
  gap: 20px;
  padding: 15px 20px;
}
.q-actions > .button[disabled] {
  opacity: 0.6;
  cursor: wait;
}
.q-error {
  font-size: 12px;
  line-height: 1.7;
  color: #9e3e29;
  padding: 12px;
  background: #fff1eb;
  border-radius: 4px;
}
.q-summary {
  margin: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 24px;
  border-top: 1px solid var(--line);
}
.q-summary > div {
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  min-width: 0;
}
.q-summary dt {
  font-size: 9px;
  color: var(--muted);
  margin-bottom: 5px;
}
.q-summary dd {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  overflow-wrap: anywhere;
  line-height: 1.7;
}
.q-send-note {
  font-size: 9px;
  color: var(--muted);
  text-align: right;
  line-height: 1.8;
  margin: 12px 0 0;
}
.q-complete-mark {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  background: var(--lime);
  border-radius: 50%;
  margin-bottom: 25px;
}
.q-complete-actions {
  display: flex;
  align-items: start;
  flex-direction: column;
  gap: 20px;
  margin-top: 28px;
}
.detail-interest {
  margin-top: 22px;
  width: 100%;
}
.footer-links {
  flex-wrap: wrap;
  gap: 18px;
}
@media (max-width: 520px) {
  #contact-dialog {
    width: calc(100% - 20px);
    max-height: 94dvh;
    border-radius: 9px;
  }
  .qualification {
    padding: 38px 21px 25px;
  }
  .qualification h2 {
    font-size: 26px;
  }
  .q-description {
    font-size: 11px;
  }
  .q-topline {
    gap: 10px;
    padding-right: 38px;
  }
  .q-topline .eyebrow {
    font-size: 6.5px;
    letter-spacing: 1px;
  }
  .q-step-count {
    font-size: 9px;
  }
  .q-choices {
    grid-template-columns: 1fr;
  }
  .q-choice {
    min-height: 48px;
    font-size: 12px;
  }
  .q-columns {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .q-location {
    grid-template-columns: 1fr 90px;
    gap: 12px;
  }
  .q-field input,
  .q-field select {
    font-size: 16px;
  }
  .q-actions > .button {
    font-size: 10px;
    padding: 14px 15px;
    gap: 10px;
    white-space: normal;
  }
  .q-back {
    font-size: 10px;
  }
  .q-summary {
    grid-template-columns: 1fr;
  }
  .q-send-note {
    text-align: left;
  }
  .q-fields {
    gap: 21px;
  }
}
