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

.hha [hidden] {
  display: none !important;
}

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

.hha-modal {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: grid;
  place-items: center;
  padding: clamp(12px, 3vw, 28px);
}

.hha-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(17, 17, 18, 0.72);
}

.hha-modal__dialog {
  position: relative;
  width: min(1080px, 100%);
  max-height: min(920px, 92vh);
  overflow: auto;
  border: 1px solid #e6e3dd;
  border-radius: 22px;
  background: #fffdfa;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.28);
  padding: clamp(24px, 4vw, 48px);
}

.hha-modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid #e6e3dd;
  border-radius: 999px;
  background: #fffdfa;
  color: #111112;
  font-size: 1.45rem;
  line-height: 1;
  cursor: pointer;
}

.hha-modal__close:focus-visible {
  outline: 3px solid rgba(219, 7, 15, 0.22);
  outline-offset: 3px;
}

.hha-modal__intro {
  max-width: 760px;
  padding: 4px 56px 22px 2px;
  color: #686b73;
}

.hha-modal__intro span {
  display: inline-block;
  margin-bottom: 8px;
  color: #db070f;
  font-size: 0.8rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hha-modal__intro h2 {
  margin: 0 0 8px;
  color: #111112;
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.hha-modal__intro p {
  margin: 0;
  max-width: 68ch;
}

.hha-process {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 0 0 28px;
  margin: 0 0 30px;
  border-bottom: 1px solid #e6e3dd;
  list-style: none;
}

.hha-process li {
  display: grid;
  gap: 6px;
  padding: 16px 18px;
  border-top: 5px solid #db070f;
  background: #f7f5ef;
}

.hha-process strong {
  color: #111112;
  font-size: 0.95rem;
}

.hha-process span {
  color: #686b73;
  font-size: 0.9rem;
  line-height: 1.45;
}

.hha {
  max-width: 1040px;
  margin: 0 auto;
  color: #111112;
}

.hha__form,
.hha__success {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
}

.hha__steps {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  padding: 0;
  margin: 0 0 28px;
  list-style: none;
  scroll-margin-top: 16px;
}

.hha__steps li {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid #e6e3dd;
  border-radius: 999px;
  color: #686b73;
  background: #f7f5ef;
  font-size: 0.9rem;
  font-weight: 850;
  text-align: center;
}

.hha__steps li.is-active {
  background: #db070f;
  border-color: #db070f;
  color: #fffdfa;
}

.hha__steps li.is-complete {
  background: #fce8e8;
  border-color: #f4c7ca;
  color: #a8060b;
}

.hha__error {
  margin-bottom: 18px;
  padding: 14px 16px;
  border-radius: 12px;
  background: #fce8e8;
  color: #8f0710;
  font-weight: 800;
}

.hha__error-link {
  color: inherit;
  font-weight: 950;
  text-decoration: underline;
}

.hha__panel {
  display: none;
  border: 0;
  padding: 0;
  margin: 0;
}

.hha__panel.is-active {
  display: block;
}

.hha__panel legend {
  display: block;
  width: 100%;
  margin-bottom: 10px;
  color: #111112;
  font-size: clamp(1.45rem, 3vw, 2.15rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-weight: 950;
}

.hha__panel-note {
  margin: 0 0 22px;
  max-width: 68ch;
  color: #686b73;
}

.hha__choice-help {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: -6px 0 22px;
  padding: 13px 15px;
  border: 1px solid #e6e3dd;
  border-radius: 12px;
  background: #fffdfa;
  color: #686b73;
  font-size: 0.94rem;
  line-height: 1.45;
}

.hha__choice-help strong {
  flex: 0 0 auto;
  color: #db070f;
  font-weight: 900;
}

.hha label {
  display: grid;
  gap: 8px;
  color: #27272a;
  font-weight: 800;
}

.hha label:not(.hha__choice):not(.hha__consent):has(> input[required], > select[required], > textarea[required]) {
  position: relative;
}

.hha label:not(.hha__choice):not(.hha__consent):has(> input[required], > select[required], > textarea[required])::before {
  content: "*";
  position: absolute;
  top: -1px;
  right: 0;
  color: #db070f;
  font-size: 1rem;
  font-weight: 950;
}

.hha__optional {
  color: #686b73;
  font-size: 0.78rem;
  font-weight: 650;
}

.hha__field-hint {
  color: #686b73;
  font-size: 0.84rem;
  font-weight: 650;
  line-height: 1.4;
}

.hha input,
.hha select,
.hha textarea {
  width: 100%;
  min-height: 48px;
  border: 1px solid #d9d5cc;
  border-radius: 12px;
  background: #fffdfa;
  color: #111112;
  padding: 12px 14px;
  font-size: 1rem;
}

.hha textarea {
  resize: vertical;
}

.hha input:focus,
.hha select:focus,
.hha textarea:focus {
  outline: 3px solid rgba(219, 7, 15, 0.18);
  border-color: #db070f;
}

.hha input[aria-invalid="true"],
.hha select[aria-invalid="true"],
.hha textarea[aria-invalid="true"] {
  border-color: #db070f;
  background: #fff7f7;
}

.hha__choice-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

@media (max-width: 940px) {
  .hha__choice-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.hha__choice {
  position: relative;
  display: block;
}

.hha__choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.hha__choice > span {
  border: 1px solid #e6e3dd;
  border-radius: 12px;
  background: #f7f5ef;
  color: #111112;
  font-weight: 850;
  transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.hha__choice-card {
  position: relative;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) 24px;
  gap: 14px;
  align-items: start;
  min-height: 112px;
  padding: 17px 16px;
}

.hha__choice > span:hover {
  transform: translateY(-2px);
  border-color: rgba(219, 7, 15, 0.32);
  box-shadow: 0 10px 26px rgba(17, 17, 18, 0.06);
}

.hha__choice:has(input[aria-invalid="true"]) > span {
  border-color: #db070f;
  background: #fff7f7;
}

.hha__choice-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 10px;
  background: #fffdfa;
  color: #db070f;
  box-shadow: inset 0 0 0 1px #e6e3dd;
}

.hha__choice-icon .hh-icon {
  width: 22px;
  height: 22px;
}

.hha__choice-icon-fallback {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: #db070f;
  font-weight: 950;
}

.hha__choice-copy {
  display: grid;
  gap: 5px;
}

.hha__choice-copy strong {
  color: #111112;
  font-size: 1rem;
  line-height: 1.18;
}

.hha__choice-copy em {
  color: #686b73;
  font-size: 0.9rem;
  font-style: normal;
  font-weight: 650;
  line-height: 1.4;
}

.hha__choice-check {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 1px solid #d9d5cc;
  border-radius: 999px;
  background: #fffdfa;
}

.hha__choice-check::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: transparent;
  transition: background-color 0.2s ease;
}

.hha__choice input:focus-visible + .hha__choice-card {
  outline: 3px solid rgba(219, 7, 15, 0.18);
  outline-offset: 3px;
}

.hha__choice input:checked + .hha__choice-card {
  background: #fff4f4;
  border-color: #db070f;
  box-shadow: 0 12px 30px rgba(219, 7, 15, 0.08);
}

.hha__choice input:checked + .hha__choice-card .hha__choice-icon {
  background: #db070f;
  color: #fffdfa;
  box-shadow: none;
}

.hha__choice input:checked + .hha__choice-card .hha__choice-icon-fallback {
  color: #fffdfa;
}

.hha__choice input:checked + .hha__choice-card .hha__choice-check {
  border-color: #db070f;
  background: #db070f;
}

.hha__choice input:checked + .hha__choice-card .hha__choice-check::before {
  background: #fffdfa;
}

.hha__field-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 16px;
  margin-bottom: 16px;
}

.hha__conditional-note {
  margin: -4px 0 18px;
  padding: 14px 16px;
  border: 1px solid rgba(219, 7, 15, 0.18);
  border-radius: 12px;
  background: #fce8e8;
  color: #8f0710;
  font-weight: 760;
}

.hha__conditional-field {
  align-self: end;
}

.hha__consent {
  grid-template-columns: auto 1fr;
  align-items: start;
  margin-top: 18px;
}

.hha__consent input {
  width: 20px;
  min-height: 20px;
  margin-top: 3px;
}

.hha__summary {
  margin-top: 24px;
  padding: 18px;
  border-radius: 16px;
  background: #f7f5ef;
  border: 1px solid #e6e3dd;
}

.hha__summary h4 {
  margin: 0 0 14px;
  font-size: 1rem;
}

.hha__summary dl {
  display: grid;
  grid-template-columns: minmax(110px, 0.35fr) minmax(0, 0.65fr);
  gap: 8px 16px;
  margin: 0;
}

.hha__summary dt {
  color: #686b73;
  font-weight: 850;
}

.hha__summary dd {
  margin: 0;
  color: #111112;
  font-weight: 700;
}

.hha__estimate {
  border: 1px solid #e6e3dd;
  border-radius: 16px;
  background: #f7f5ef;
  overflow: hidden;
}

.hha__estimate-head {
  display: grid;
  gap: 10px;
  padding: 20px;
  border-top: 5px solid #db070f;
  background: #fffdfa;
  color: #111112;
}

.hha__estimate-kicker {
  display: block;
  margin-bottom: 8px;
  color: #a70a12;
  font-size: 0.78rem;
  font-weight: 950;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.hha__estimate-head strong {
  display: block;
  font-size: clamp(1.45rem, 3vw, 2rem);
  line-height: 1.1;
  font-weight: 950;
}

.hha__estimate-head small {
  display: block;
  max-width: 62ch;
  margin-top: 8px;
  color: #686b73;
  font-size: 0.95rem;
  font-weight: 650;
  line-height: 1.5;
}

.hha__estimate-values {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 18px;
}

.hha__estimate-values > div {
  min-height: 112px;
  padding: 17px;
  border: 1px solid #e6e3dd;
  border-radius: 14px;
  background: #fffdfa;
}

.hha__estimate-values span {
  display: block;
  color: #686b73;
  font-size: 0.8rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hha__estimate-values strong {
  display: block;
  margin-top: 8px;
  color: #111112;
  font-size: clamp(1.45rem, 4vw, 2.15rem);
  line-height: 1.05;
  font-weight: 950;
}

.hha__estimate-values > div:last-child {
  border-color: #ffd7d9;
  background: #fff4f4;
}

.hha__estimate-values > div:last-child strong {
  color: #db070f;
}

.hha__estimate-lines {
  display: grid;
  gap: 0;
  padding: 0 18px 18px;
}

.hha__estimate-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 13px 0;
  border-top: 1px solid #e6e3dd;
}

.hha__estimate-line span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.hha__estimate-line strong {
  color: #db070f;
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hha__estimate-line b {
  color: #111112;
  font-size: 0.95rem;
  line-height: 1.3;
}

.hha__estimate-line small {
  color: #686b73;
  font-size: 0.84rem;
  font-weight: 650;
  line-height: 1.4;
}

.hha__estimate-line em {
  color: #111112;
  font-style: normal;
  font-weight: 950;
  white-space: nowrap;
}

.hha__estimate-line--optional em {
  color: #686b73;
}

.hha__estimate-subtitle,
.hha__estimate-missing {
  margin: 14px 0 0;
  padding: 12px 14px;
  border: 1px solid #e6e3dd;
  border-radius: 12px;
  background: #fffdfa;
  color: #686b73;
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1.45;
}

.hha__estimate-note {
  padding: 14px 18px 18px;
  color: #686b73;
  font-size: 0.9rem;
  font-weight: 650;
  line-height: 1.5;
}

.hha__actions {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-top: 28px;
}

.hha__back,
.hha__next,
.hha__submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 14px 24px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 900;
  cursor: pointer;
}

.hha__back {
  background: transparent;
  border-color: #d9d5cc;
  color: #27272a;
}

.hha__back:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.hha__next,
.hha__submit {
  margin-left: auto;
  background: #db070f;
  color: #fffdfa;
}

.hha__submit:disabled {
  opacity: 0.72;
  cursor: wait;
}

.hha__success {
  text-align: center;
  max-width: 760px;
  margin: 0 auto;
  padding-top: 16px;
}

.hha__success-kicker {
  display: inline-block;
  margin-bottom: 14px;
  color: #db070f;
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hha__success h3 {
  margin: 0 0 12px;
  color: #111112;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
}

.hha__success strong {
  color: #db070f;
}

.hha__success p {
  margin: 0 auto;
  color: #686b73;
}

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

  .hha-modal__dialog {
    width: 100%;
    max-height: 100vh;
    border-radius: 0;
    padding-top: 76px;
  }

  .hha-modal__intro {
    padding-right: 48px;
  }

  .hha-modal--form-step .hha-modal__intro,
  .hha-modal--form-step .hha-process {
    display: none;
  }

  .hha__steps,
  .hha-process,
  .hha__choice-grid,
  .hha__field-row {
    grid-template-columns: 1fr;
  }

  .hha__steps {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 20px;
  }

  .hha__steps li {
    min-height: 38px;
    padding: 6px 3px;
    font-size: 0.7rem;
    line-height: 1.1;
  }

  @media (max-width: 370px) {
    .hha__steps {
      gap: 5px;
    }

    .hha__steps li {
      font-size: 0.66rem;
    }
  }

  .hha__summary dl {
    grid-template-columns: 1fr;
  }

  .hha__summary dt {
    margin-top: 8px;
  }

  .hha__estimate-values,
  .hha__estimate-line {
    grid-template-columns: 1fr;
  }

  .hha__estimate-line {
    gap: 6px;
    align-items: start;
  }

  .hha__estimate-line em {
    white-space: normal;
  }

  .hha__choice-help {
    display: grid;
    gap: 4px;
  }

  .hha__choice-card {
    grid-template-columns: 42px minmax(0, 1fr) 22px;
    min-height: 96px;
    padding: 15px 14px;
  }

  .hha__choice-icon {
    width: 42px;
    height: 42px;
  }
}
