html.dialog-open { overflow: hidden; scrollbar-gutter: stable; }
/* Keep body out of the scrolling-container chain: overflow:hidden on body
   changes the containing block of the pinned journey and triggers anchoring. */
body.dialog-open { overscroll-behavior: none; }

.site-dialog {
    position: fixed;
    inset: 0;
    width: min(520px, calc(100vw - 32px));
    max-width: none;
    max-height: calc(100svh - 32px);
    margin: auto;
    padding: 0;
    border: 1px solid #cad7de;
    border-radius: 22px;
    background: #fff;
    color: #132b39;
    box-shadow: 0 26px 100px #020c1d4d;
    overflow: hidden;
    overscroll-behavior: contain;
}
.site-dialog[open] { display: flex; flex-direction: column; animation: dialog-enter .18s ease-out; }
.site-dialog::backdrop { background: #06111dcc; backdrop-filter: blur(4px); }
#faq-dialog { width: min(700px, calc(100vw - 32px)); }
.dialog-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding: 27px 28px 21px;
    border-bottom: 1px solid #e2eaef;
    flex: 0 0 auto;
}
.dialog-head h2 { margin: 0; font-size: clamp(25px, 4.5vw, 30px); line-height: 1.15; letter-spacing: -.04em; font-weight: 650; }
.dialog-head h2:focus { outline: none; }
.dialog-eyebrow { display: block; margin-bottom: 8px; color: #386d81; font-size: 11px; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; }
.dialog-close {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    margin-top: -4px;
    padding: 0;
    border: 1px solid #d8e3e9;
    border-radius: 50%;
    color: #294958;
    background: #f4f8fa;
    font: inherit;
    font-size: 25px;
    line-height: 1;
    cursor: pointer;
}
.dialog-close:hover { background: #e5f1f5; }
.site-dialog :is(button, a, input, summary):focus-visible { outline: 3px solid #1685ad; outline-offset: 3px; }
.dialog-body { min-height: 0; padding: 23px 28px 28px; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.dialog-lede, .dialog-body > p:first-child { margin: 0 0 22px; color: #516879; font-size: 14px; line-height: 1.6; }
.dialog-form { display: grid; gap: 17px; }
.form-field { display: grid; gap: 7px; }
.form-field label { font-size: 13px; line-height: 1.4; font-weight: 600; color: #244454; }
.form-field label span { font-weight: 400; color: #637a8a; }
.form-field input {
    width: 100%;
    min-height: 48px;
    padding: 12px 14px;
    border: 1px solid #bdcdd7;
    border-radius: 10px;
    background: #fbfdfe;
    color: #162f3d;
    font: inherit;
    font-size: 16px;
    line-height: 1.4;
    box-sizing: border-box;
}
.form-field input::placeholder { color: #78909e; }
.form-field input:focus { border-color: #1685ad; }
.form-field input[aria-invalid="true"] { border-color: #b73b43; background: #fffafb; }
.field-error { margin: 0; color: #a62d37; font-size: 12px; line-height: 1.5; }
.field-error[hidden], #preview-notice[hidden] { display: none; }
#preview-notice {
    margin: 0 0 18px;
    padding: 11px 13px;
    border: 1px solid #c8dee7;
    border-radius: 9px;
    background: #f0f8fb;
    color: #345b6e;
    font-size: 12px;
    line-height: 1.5;
}
#leadSubmit {
    width: 100%;
    min-height: 48px;
    justify-content: center;
    margin-top: 3px;
    border: 0;
    border-radius: 10px;
    padding: 12px 18px;
    background: #1685ad;
    color: #fff;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}
#leadSubmit:hover { background: #116e91; }
#leadSubmit:disabled { cursor: wait; opacity: .72; }
.form-status { margin: 0; color: #3b596b; font-size: 13px; line-height: 1.6; }
.form-status:empty { display: none; }
.form-status[data-kind="error"] { color: #a62d37; }
.form-status[data-kind="success"] { color: #176349; }
.form-status[data-kind="preview"] { color: #345b6e; }
.form-disclaimer { margin: 0; color: #627786; font-size: 11px; line-height: 1.6; }
.form-disclaimer a { color: #226b88; text-decoration: underline; text-underline-offset: 2px; }
.dialog-body details { border-bottom: 1px solid #e1e9ee; }
.dialog-body details:first-of-type { border-top: 1px solid #e1e9ee; }
.dialog-body summary { padding: 17px 2px; color: #183c4e; font-size: 15px; font-weight: 600; line-height: 1.5; cursor: pointer; }
.dialog-body details[open] summary { padding-bottom: 10px; }
.dialog-body details > p { margin: 0; padding: 0 2px 18px; color: #516879; font-size: 14px; line-height: 1.65; }
.dialog-body details > p a { color: #226b88; text-decoration: underline; text-underline-offset: 2px; }
.dialog-footer { margin-top: 22px; padding-top: 4px; }
.dialog-footer p { margin: 0 0 12px; color: #516879; font-size: 14px; line-height: 1.6; }

@keyframes dialog-enter {
    from { opacity: 0; transform: translateY(8px) scale(.99); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
@media (max-width: 540px) {
    .site-dialog { width: calc(100vw - 24px); max-height: calc(100svh - 24px); border-radius: 18px; }
    #faq-dialog { width: calc(100vw - 24px); }
    .dialog-head { padding: 22px 20px 18px; gap: 12px; }
    .dialog-body { padding: 19px 20px 23px; }
}
@media (prefers-reduced-motion: reduce) {
    .site-dialog[open] { animation: none; }
}
