.restored-lead-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px;
  width: 100%;
  max-width: 760px;
  min-width: 0;
  margin-inline: auto;
  font-family: Arial, Helvetica, sans-serif;
}

.restored-lead-form[hidden] { display: none; }
.lead-field { position: relative; min-width: 0; }
.lead-wide { grid-column: 1 / -1; }

.index-lead-input,
.index-lead-textarea {
  width: 100%;
  border: 1px solid #b9c1c5;
  background: #fff;
  color: #111827;
  border-radius: 0;
  font: 500 14px/1.4 Arial, Helvetica, sans-serif;
  outline: none;
  transition: border-color .16s ease, box-shadow .16s ease;
}

.index-lead-input { height: 56px; padding: 0 16px; }
.index-lead-textarea { display: block; height: 124px; min-height: 124px; resize: vertical; padding: 16px; }
.index-lead-input::placeholder,
.index-lead-textarea::placeholder { color: #7a8490; opacity: 1; }

.index-lead-input:focus,
.index-lead-textarea:focus,
.lead-phone-group:focus-within {
  border-color: #0e5ed7;
  box-shadow: 0 0 0 2px rgba(14, 94, 215, .1);
}

.index-lead-input:focus-visible,
.index-lead-textarea:focus-visible { outline: none; }

.index-lead-input[aria-invalid="true"],
.lead-phone-group:has(.lead-phone-input[aria-invalid="true"]) { border-color: #b42318; }

.lead-method { margin: 0; padding: 0; border: 0; min-width: 0; }
.lead-method legend { margin: 0 0 9px; padding: 0; color: #536071; font: 600 12px/1.35 Arial, Helvetica, sans-serif; }
.lead-method-options { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.lead-method-options label { position: relative; display: block; min-width: 0; }
.lead-method-options input { position: absolute; opacity: 0; pointer-events: none; }
.lead-method-options span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 9px 10px;
  border: 1px solid #cbd2d8;
  border-radius: 8px;
  background: #fff;
  color: #30404f;
  font: 600 12px/1.2 Arial, Helvetica, sans-serif;
  cursor: pointer;
  transition: border-color .16s ease, background-color .16s ease, color .16s ease, opacity .16s ease;
}
.lead-method-options input:checked + span {
  border-color: #0e5ed7;
  background: #eef5ff;
  color: #0e5ed7;
  box-shadow: 0 0 0 1px rgba(14, 94, 215, .08);
}
.lead-method-options input:focus-visible + span { outline: 2px solid rgba(14, 94, 215, .35); outline-offset: 2px; }
.lead-method-options input:disabled + span { background: #f4f5f6; color: #8f98a4; border-color: #e1e4e7; cursor: not-allowed; opacity: .55; }

.lead-phone-group {
  position: relative;
  display: flex;
  align-items: stretch;
  height: 56px;
  border: 1px solid #b9c1c5;
  background: #fff;
  transition: border-color .16s ease, box-shadow .16s ease;
}
.lead-country-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  max-width: 142px;
  padding: 0 10px;
  border: 0;
  border-right: 1px solid #dde1e4;
  background: #fff;
  color: #22314a;
  font: 600 13px/1 Arial, Helvetica, sans-serif;
  cursor: pointer;
}
.lead-country-toggle:hover { background: #f7f8f9; }
.lead-country-flag {
  display: block;
  width: 24px;
  height: 18px;
  flex: 0 0 24px;
  font-family: 'Apple Color Emoji', 'Segoe UI Emoji', sans-serif;
  font-size: 19px;
  text-align: center;
  background-repeat: no-repeat;
  box-shadow: inset 0 0 0 1px rgba(2, 22, 65, .1);
}
.lead-country-code { white-space: nowrap; }
.lead-country-chevron { width: 0; height: 0; border-inline: 4px solid transparent; border-top: 5px solid #7b8793; flex: 0 0 auto; }
.lead-phone-input { border: 0; box-shadow: none; height: 100%; min-width: 0; flex: 1 1 auto; padding-left: 13px; }
.lead-phone-input:focus { box-shadow: none; }

.lead-country-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 7px);
  z-index: 10;
  width: min(430px, calc(100vw - 32px));
  max-height: min(310px, 42dvh);
  overflow: auto;
  overscroll-behavior: contain;
  background: #fff;
  border: 1px solid #b9c1c5;
  box-shadow: 0 16px 36px rgba(2, 22, 65, .16);
}
.lead-country-option {
  width: 100%;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  gap: 11px;
  align-items: center;
  padding: 10px 12px;
  border: 0;
  border-bottom: 1px solid #edf0f2;
  background: #fff;
  color: #1f2937;
  text-align: left;
  font: 500 13px/1.35 Arial, Helvetica, sans-serif;
  cursor: pointer;
}
.lead-country-option:last-child { border-bottom: 0; }
.lead-country-option:hover,
.lead-country-option:focus,
.lead-country-option[aria-selected="true"] { background: #f1f6fb; }
.lead-country-option:focus-visible { outline: 2px solid #0e5ed7; outline-offset: -2px; }
.lead-country-option-code { color: #536071; font-weight: 700; white-space: nowrap; }

.lead-form-actions { display: flex; align-items: center; }
.index-lead-submit {
  border: 1px solid transparent;
  background: var(--accent, #183e52);
  color: #fff;
  min-height: 50px;
  padding: 13px 21px;
  border-radius: 8px;
  font: 700 14px/1.2 Arial, Helvetica, sans-serif;
  cursor: pointer;
}
.index-lead-submit:hover:not(:disabled) { background: #275572; }
.index-lead-submit:disabled { opacity: .62; cursor: wait; }

.restored-lead-form .index-lead-status,
.restored-lead-form .index-lead-consent { margin: 0; font-size: 12px; line-height: 1.55; }
.index-lead-status { min-height: 20px; color: #6b7280; }
.index-lead-status[data-state="error"] { color: #b42318; }
.index-lead-status[data-state="success"] { color: #147a45; }
.index-lead-consent { color: #687281; }
.index-lead-consent a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.index-lead-honeypot { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.section-dark .index-lead-status[data-state="error"] { color: #ffbabf; }
.section-dark .index-lead-status[data-state="success"] { color: #b2f3cc; }

.lead-section { padding: 65px 0; background: #e9f3f8; }
.lead-section h2,
.lead-section .lead-intro { max-width: 760px; margin: 0 auto 25px; }

html:has(.lead-dialog[open]) { overflow: hidden; }
.lead-dialog {
  box-sizing: border-box;
  width: min(760px, calc(100% - 48px));
  max-width: none;
  max-height: calc(100dvh - 48px);
  margin: auto;
  overflow: auto;
  overscroll-behavior: contain;
  border: 0;
  border-radius: 16px;
  padding: 30px 44px;
  background: #f6f7f8;
  color: #021641;
  box-shadow: 0 28px 80px rgba(0, 0, 0, .28);
  font-family: Arial, Helvetica, sans-serif;
}
.lead-dialog[open] { animation: lead-dialog-in .16s ease-out; }
.lead-dialog::backdrop { background: rgba(2, 22, 65, .72); animation: lead-fade-in .14s ease-out; }
.lead-dialog-head { padding-right: 44px; margin-bottom: 18px; }
.lead-dialog h2 { margin: 0; color: #021641; font: 700 34px/1.12 Arial, Helvetica, sans-serif; letter-spacing: -.035em; }
.lead-dialog-head p { margin: 8px 0 0; color: #536071; font-size: 14px; line-height: 1.55; max-width: 590px; }
.lead-dialog .restored-lead-form { gap: 12px; }
.lead-dialog .index-lead-textarea { height: 104px; min-height: 104px; }

.lead-close {
  position: absolute;
  right: 18px;
  top: 18px;
  width: 42px;
  height: 42px;
  border: 0;
  background: transparent;
  color: #586579;
  cursor: pointer;
}
.lead-close::before,
.lead-close::after { content: ""; position: absolute; left: 10px; top: 20px; width: 22px; height: 1.5px; background: currentColor; }
.lead-close::before { transform: rotate(45deg); }
.lead-close::after { transform: rotate(-45deg); }
.lead-close:hover { color: #021641; }
.lead-close:focus-visible,
.lead-country-toggle:focus-visible,
.index-lead-submit:focus-visible { outline: 2px solid #0e5ed7; outline-offset: 2px; }

.lead-success-toast {
  position: fixed;
  left: 50%;
  top: 24px;
  z-index: 1400;
  transform: translateX(-50%);
  width: max-content;
  max-width: min(560px, calc(100vw - 32px));
  padding: 14px 18px;
  border: 1px solid rgba(20, 122, 69, .28);
  border-radius: 10px;
  background: #fff;
  color: #147a45;
  box-shadow: 0 14px 32px rgba(2, 22, 65, .18);
  font: 700 14px/1.4 Arial, Helvetica, sans-serif;
  text-align: center;
}

.skip-link { position: fixed; left: 10px; top: -70px; z-index: 10000; padding: 12px 20px; background: #fff; color: #163a52; border-radius: 8px; }
.skip-link:focus { top: 10px; }

@keyframes lead-fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes lead-dialog-in { from { opacity: 0; transform: translateY(8px) scale(.99); } to { opacity: 1; transform: none; } }

@media (max-width: 720px) {
  .restored-lead-form,
  .lead-dialog .restored-lead-form { grid-template-columns: 1fr; gap: 8px; }
  .lead-method-options { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .lead-method legend { margin-bottom: 5px; }
  .lead-method-options span { min-height: 40px; padding: 7px 8px; }
  .lead-dialog {
    width: calc(100dvw - 16px);
    max-height: calc(100dvh - 16px);
    margin: 8px auto auto;
    border-radius: 12px;
    padding: 16px 16px 12px;
  }
  .lead-close { right: 6px; top: 6px; }
  .lead-dialog-head { padding-right: 34px; margin-bottom: 10px; }
  .lead-dialog h2 { font-size: 29px; }
  .lead-dialog-head p { margin-top: 6px; font-size: 13px; line-height: 1.4; }
  .lead-country-menu {
    position: fixed;
    inset: 50% 16px auto;
    transform: translateY(-50%);
    width: auto;
    max-height: min(440px, 70dvh);
  }
  .index-lead-input,
  .lead-phone-group { height: 44px; }
  .index-lead-input { padding-inline: 12px; font-size: 16px; }
  .lead-phone-input { height: 100%; }
  .index-lead-textarea,
  .lead-dialog .index-lead-textarea { height: 78px; min-height: 78px; padding: 9px 12px; font-size: 16px; }
  .index-lead-status:empty { display: none; }
  .restored-lead-form .index-lead-consent { line-height: 1.45; }
  .lead-section { padding: 40px 0; }
}

@media (max-width: 400px) {
  .lead-dialog h2 { font-size: 26px; }
  .lead-country-toggle { max-width: 132px; padding: 0 9px; }
}

@media (prefers-reduced-motion: reduce) {
  .lead-dialog[open],
  .lead-dialog::backdrop { animation: none; }
}

.lead-section{background:#f5f7f9}.lead-section .wrap>h2,.lead-section .wrap>p.lead-intro{max-width:760px;margin-left:auto;margin-right:auto}.index-lead-form .lead-country-flag{white-space:nowrap}
