:root {
  --lq-orange: #FC3B00;
  --lq-orange-dark: #D93400;
  --lq-ink: #111111;
  --lq-muted: #606060;
  --lq-line: #E5E5E5;
  --lq-soft: #F7F7F5;
  --lq-green: #128C4B;
}

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

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

.lq-progress-shell[hidden],
.lq-error[hidden],
.lq-actions[hidden],
.lq-btn[hidden] {
  display: none !important;
}

.lq-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: grid;
  place-items: center;
  padding: 20px;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

.lq-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 8, 8, 0.76);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 180ms ease;
}

.lq-dialog {
  position: relative;
  width: min(760px, 100%);
  max-height: min(850px, calc(100vh - 40px));
  max-height: min(850px, calc(100dvh - 40px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 22px;
  background: #fff;
  color: var(--lq-ink);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.32);
  opacity: 0;
  transform: translateY(14px) scale(0.985);
  transition: opacity 180ms ease, transform 180ms ease;
  outline: none;
}

.lq-modal.is-open .lq-backdrop,
.lq-modal.is-open .lq-dialog {
  opacity: 1;
}

.lq-modal.is-open .lq-dialog {
  transform: translateY(0) scale(1);
}

.lq-header {
  position: static;
  inset: auto;
  z-index: auto;
  flex: 0 0 auto;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 22px;
  border-bottom: 1px solid var(--lq-line);
  background: #fff;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  transition: none;
}

.lq-brand {
  display: flex;
  align-items: baseline;
  gap: 2px;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.lq-brand > span {
  color: var(--lq-orange);
}

.lq-brand small {
  margin-left: 10px;
  padding-left: 10px;
  border-left: 1px solid var(--lq-line);
  color: #777;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.lq-close {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: #F2F2F2;
  color: #333;
  cursor: pointer;
  transition: background 150ms ease, color 150ms ease;
}

.lq-close:hover,
.lq-close:focus-visible {
  background: #E7E7E7;
  color: #000;
  outline: 2px solid rgba(252, 59, 0, 0.25);
  outline-offset: 2px;
}

.lq-progress-shell {
  flex: 0 0 auto;
  padding: 14px 22px 0;
  background: #fff;
}

.lq-progress-meta {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  color: #777;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.lq-progress {
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: #ECECEC;
}

.lq-progress span {
  display: block;
  width: 20%;
  height: 100%;
  border-radius: inherit;
  background: var(--lq-orange);
  transition: width 220ms ease;
}

.lq-form {
  min-height: 0;
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
}

.lq-content {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 30px 34px 24px;
  overscroll-behavior: contain;
}

.lq-step-kicker {
  margin-bottom: 8px;
  color: var(--lq-orange);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.lq-step-title {
  max-width: 650px;
  margin: 0;
  color: var(--lq-ink);
  font-size: clamp(1.55rem, 4vw, 2.15rem);
  font-weight: 850;
  line-height: 1.08;
  letter-spacing: -0.04em;
  outline: none;
}

.lq-step-subtitle {
  max-width: 640px;
  margin: 12px 0 24px;
  color: var(--lq-muted);
  font-size: 14px;
  line-height: 1.65;
}

.lq-value-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 22px;
}

.lq-value-card {
  padding: 18px;
  border: 1px solid var(--lq-line);
  border-radius: 14px;
  background: #fff;
}

.lq-value-card.is-featured {
  border-color: rgba(252, 59, 0, 0.3);
  background: #FFF5F1;
}

.lq-value-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 9px;
  color: var(--lq-orange-dark);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.lq-value-card:not(.is-featured) .lq-value-label {
  color: #6B6B6B;
}

.lq-value-card h3 {
  margin: 0 0 7px;
  font-size: 16px;
  line-height: 1.3;
}

.lq-value-card p {
  margin: 0;
  color: #656565;
  font-size: 12px;
  line-height: 1.55;
}

.lq-proof-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.lq-proof {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border-radius: 999px;
  background: #F2F2F2;
  color: #444;
  font-size: 11px;
  font-weight: 700;
}

.lq-proof::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--lq-orange);
}

.lq-section-label {
  display: block;
  margin: 22px 0 10px;
  color: #333;
  font-size: 13px;
  font-weight: 800;
}

.lq-section-label:first-of-type {
  margin-top: 0;
}

.lq-required {
  color: var(--lq-orange);
}

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

.lq-options.lq-options-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.lq-option {
  min-height: 74px;
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 11px;
  width: 100%;
  padding: 14px;
  border: 1.5px solid #DEDEDE;
  border-radius: 13px;
  background: #fff;
  color: #1C1C1C;
  text-align: left;
  cursor: pointer;
  transition: border-color 140ms ease, background 140ms ease, box-shadow 140ms ease;
}

.lq-option:hover {
  border-color: #B8B8B8;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.05);
}

.lq-option:focus-visible {
  outline: 3px solid rgba(252, 59, 0, 0.2);
  outline-offset: 2px;
}

.lq-option.is-selected {
  border-color: var(--lq-orange);
  background: #FFF5F1;
  box-shadow: 0 0 0 1px var(--lq-orange);
}

.lq-option-marker {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  margin-top: 1px;
  border: 1.5px solid #BEBEBE;
  border-radius: 50%;
  background: #fff;
}

.lq-option[data-lq-multi] .lq-option-marker {
  border-radius: 5px;
}

.lq-option.is-selected .lq-option-marker {
  border-color: var(--lq-orange);
  background: var(--lq-orange);
}

.lq-option.is-selected .lq-option-marker::after {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fff;
}

.lq-option[data-lq-multi].is-selected .lq-option-marker::after {
  width: 8px;
  height: 5px;
  margin-top: -2px;
  border: solid #fff;
  border-width: 0 0 2px 2px;
  border-radius: 0;
  background: transparent;
  transform: rotate(-45deg);
}

.lq-option-copy {
  display: block;
  min-width: 0;
}

.lq-option-title {
  display: block;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.35;
}

.lq-option-description {
  display: block;
  margin-top: 3px;
  color: #747474;
  font-size: 11px;
  line-height: 1.4;
}

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

.lq-field {
  display: block;
}

.lq-field-full {
  grid-column: 1 / -1;
}

.lq-field span {
  display: block;
  margin-bottom: 7px;
  color: #333;
  font-size: 12px;
  font-weight: 750;
}

.lq-input {
  width: 100%;
  min-height: 50px;
  padding: 13px 14px;
  border: 1.5px solid #D6D6D6;
  border-radius: 11px;
  background: #fff;
  color: #111;
  font: inherit;
  font-size: 14px;
  outline: none;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

.lq-input:focus {
  border-color: var(--lq-orange);
  box-shadow: 0 0 0 3px rgba(252, 59, 0, 0.12);
}

.lq-input::placeholder {
  color: #9A9A9A;
}

.lq-cep-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 10px;
}

.lq-cep-button {
  min-width: 154px;
  min-height: 50px;
  background: var(--lq-ink);
  color: #fff;
}

.lq-cep-button:hover {
  background: #292929;
}

.lq-cep-button:disabled {
  opacity: .66;
  cursor: wait;
  transform: none;
}

.lq-cep-status {
  min-height: 0;
  margin-top: 10px;
  color: #666;
  font-size: 11px;
  font-weight: 650;
}

.lq-cep-status:empty {
  display: none;
}

.lq-cep-status.is-loading {
  color: #555;
}

.lq-cep-status.is-error {
  padding: 10px 12px;
  border-radius: 9px;
  background: #FFF0EC;
  color: #A62A06;
}

.lq-manual-link {
  display: inline-flex;
  margin-top: 9px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #4D4D4D;
  font: inherit;
  font-size: 11px;
  font-weight: 750;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.lq-address-panel {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid #E7E7E7;
  border-radius: 14px;
  background: #FAFAF8;
}

.lq-region-result {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  padding: 11px 12px;
  border: 1px solid #CFEADB;
  border-radius: 10px;
  background: #EDF9F2;
}

.lq-region-result.is-outside {
  border-color: #F1D3C8;
  background: #FFF2ED;
}

.lq-region-result-icon {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #11864A;
  color: #fff;
  font-size: 12px;
  font-weight: 850;
}

.lq-region-result.is-outside .lq-region-result-icon {
  background: var(--lq-orange);
}

.lq-region-result strong,
.lq-region-result span {
  display: block;
}

.lq-region-result strong {
  color: #173E29;
  font-size: 12px;
}

.lq-region-result.is-outside strong {
  color: #77240D;
}

.lq-region-result div > span {
  margin-top: 2px;
  color: #52705F;
  font-size: 10px;
}

.lq-region-result.is-outside div > span {
  color: #925741;
}

.lq-address-found {
  position: relative;
  padding: 3px 120px 14px 2px;
}

.lq-address-found-label {
  display: block;
  margin-bottom: 4px;
  color: #777;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.lq-address-found strong,
.lq-address-found > span:last-of-type {
  display: block;
}

.lq-address-found strong {
  color: #202020;
  font-size: 13px;
}

.lq-address-found > span:last-of-type {
  margin-top: 3px;
  color: #666;
  font-size: 11px;
}

.lq-address-found .lq-manual-link {
  position: absolute;
  top: 2px;
  right: 0;
  margin: 0;
}

.lq-address-grid,
.lq-number-grid {
  gap: 10px;
}

.lq-number-grid {
  margin-top: 2px;
}

.lq-context-note {
  display: flex;
  gap: 10px;
  margin-top: 16px;
  padding: 13px 14px;
  border-radius: 11px;
  background: var(--lq-soft);
  color: #555;
  font-size: 12px;
  line-height: 1.5;
}

.lq-context-note strong {
  color: #222;
}

.lq-context-icon {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #222;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
}

.lq-error {
  flex: 0 0 auto;
  margin: 0 34px 10px;
  padding: 10px 12px;
  border-radius: 9px;
  background: #FFF0EC;
  color: #A62A06;
  font-size: 12px;
  font-weight: 700;
}

.lq-actions {
  flex: 0 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 17px 22px;
  border-top: 1px solid var(--lq-line);
  background: #fff;
}

.lq-btn {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border: 0;
  border-radius: 10px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 140ms ease, background 140ms ease, box-shadow 140ms ease;
}

.lq-btn:hover {
  transform: translateY(-1px);
}

.lq-btn:focus-visible {
  outline: 3px solid rgba(252, 59, 0, 0.24);
  outline-offset: 2px;
}

.lq-btn-primary {
  margin-left: auto;
  background: var(--lq-orange);
  color: #fff;
  box-shadow: 0 7px 18px rgba(252, 59, 0, 0.2);
}

.lq-btn-primary:hover {
  background: var(--lq-orange-dark);
}

.lq-btn-secondary {
  background: #EFEFEF;
  color: #333;
}

.lq-btn-secondary:hover {
  background: #E5E5E5;
}

.lq-result-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  padding: 8px 11px;
  border-radius: 999px;
  background: #EAF8F0;
  color: #08753B;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.lq-result-badge::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #14A456;
  box-shadow: 0 0 0 4px rgba(20, 164, 86, 0.12);
}

.lq-result-badge.is-neutral {
  background: #F2F2F2;
  color: #555;
}

.lq-result-badge.is-neutral::before {
  background: #777;
  box-shadow: 0 0 0 4px rgba(90, 90, 90, 0.1);
}

.lq-summary {
  margin: 20px 0 14px;
  overflow: hidden;
  border: 1px solid var(--lq-line);
  border-radius: 14px;
  background: #fff;
}

.lq-summary-title {
  padding: 12px 15px;
  border-bottom: 1px solid var(--lq-line);
  background: #F7F7F7;
  color: #444;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.lq-summary ul {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.lq-summary li {
  padding: 12px 15px;
  border-bottom: 1px solid #EEEEEE;
  color: #555;
  font-size: 12px;
  line-height: 1.4;
}

.lq-summary li:nth-child(odd) {
  border-right: 1px solid #EEEEEE;
}

.lq-summary li strong {
  display: block;
  margin-bottom: 2px;
  color: #222;
  font-size: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.lq-result-value {
  margin: 14px 0 18px;
  padding: 16px;
  border-left: 4px solid var(--lq-orange);
  border-radius: 0 12px 12px 0;
  background: #FFF4EF;
}

.lq-result-value strong {
  display: block;
  margin-bottom: 5px;
  color: #3A160B;
  font-size: 13px;
}

.lq-result-value p {
  margin: 0;
  color: #694233;
  font-size: 12px;
  line-height: 1.55;
}

.lq-whatsapp {
  width: 100%;
  min-height: 54px;
  background: var(--lq-green);
  color: #fff;
  text-decoration: none;
  box-shadow: 0 8px 20px rgba(18, 140, 75, 0.2);
}

.lq-whatsapp:hover {
  background: #0E763E;
  color: #fff;
}

.lq-review-note {
  margin: 9px 0 0;
  color: #777;
  font-size: 10px;
  line-height: 1.45;
  text-align: center;
}

.lq-tally-link {
  display: block;
  margin-top: 14px;
  color: #555;
  font-size: 11px;
  font-weight: 700;
  text-align: center;
  text-underline-offset: 3px;
}

.lq-outcome-actions {
  display: flex;
  gap: 10px;
  margin-top: 22px;
}

.lq-outcome-actions .lq-btn {
  flex: 1;
}

@media (max-width: 700px) {
  .lq-modal {
    align-items: stretch;
    padding: 0;
  }

  .lq-dialog {
    width: 100%;
    height: 100vh;
    height: 100dvh;
    max-height: none;
    border-radius: 0;
  }

  .lq-header {
    min-height: 60px;
    padding: calc(10px + env(safe-area-inset-top)) 18px 10px;
  }

  .lq-progress-shell {
    padding: 12px 18px 0;
  }

  .lq-content {
    padding: 26px 20px 22px;
  }

  .lq-step-title {
    font-size: 1.75rem;
    line-height: 1.08;
  }

  .lq-actions {
    gap: 9px;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    box-shadow: 0 -8px 24px rgba(0, 0, 0, .04);
  }

  .lq-actions .lq-btn-primary { flex: 1; }

  .lq-actions .lq-btn-secondary { min-width: 88px; }

  .lq-error {
    margin-right: 18px;
    margin-left: 18px;
  }

  .lq-options,
  .lq-options.lq-options-3,
  .lq-value-grid,
  .lq-field-grid,
  .lq-summary ul {
    grid-template-columns: 1fr;
  }

  .lq-summary li:nth-child(odd) {
    border-right: 0;
  }

  .lq-option {
    min-height: 62px;
    padding: 13px;
  }

  .lq-brand small {
    display: none;
  }

  .lq-cep-row {
    grid-template-columns: 1fr;
  }

  .lq-cep-button {
    width: 100%;
  }

  .lq-address-found {
    padding-right: 0;
  }

  .lq-address-found .lq-manual-link {
    position: static;
    margin-top: 9px;
  }
}

@media (min-width: 701px) and (max-width: 900px) {
  .lq-dialog {
    width: calc(100% - 28px);
    max-height: calc(100dvh - 28px);
  }

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

@media (max-width: 390px) {
  .lq-step-title {
    font-size: 1.62rem;
  }

  .lq-step-subtitle {
    margin-bottom: 18px;
    font-size: 13px;
  }

  .lq-actions .lq-btn {
    padding-right: 15px;
    padding-left: 15px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .lq-backdrop,
  .lq-dialog,
  .lq-progress span,
  .lq-btn,
  .lq-option {
    transition: none !important;
  }
}
