.ebook-cta {
    padding-block: clamp(32px, 6vw, 72px);
    background: #f4f8fe;
    color: #15244b;
    scroll-margin-top: 100px;
}

.ebook-cta-inner {
    padding-inline: clamp(20px, 5vw, 64px);
}

.ebook-preview {
    min-height: 58vh;
    padding-top: clamp(120px, 15vw, 190px);
    padding-bottom: 64px;
    background: #fff;
}

.ebook-cta :is(h1, h2) {
    max-width: 23ch;
    margin: 12px 0;
    font-size: clamp(1.85rem, 5vw, 4rem);
    line-height: 1.12;
    letter-spacing: -.035em;
}

.ebook-cta .btn { margin-top: 24px; }

.ebook-dialog {
    position: fixed;
    inset: 0;
    width: min(520px, calc(100% - 24px));
    max-height: calc(100dvh - 24px);
    margin: auto;
    padding: clamp(20px, 5vw, 36px);
    border: 0;
    border-radius: 22px;
    background: #fff;
    color: #15244b;
    box-shadow: 0 20px 70px #0b172b55;
    overscroll-behavior: contain;
}

.ebook-dialog::backdrop { background: #0b172baa; }
.ebook-dialog h2 { margin: 8px 0; font-size: clamp(1.5rem, 5vw, 2rem); line-height: 1.15; }
.ebook-dialog > p:not(.ebook-type) { margin: 8px 0 18px; }
.ebook-type { color: #146352; font-weight: 800; font-size: .87rem; }
.ebook-dialog .ebook-type { padding-right: 36px; }
.ebook-error { color: #a81828; font-weight: 700; }

.ebook-close {
    position: absolute;
    right: 12px;
    top: 12px;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 50%;
    background: #eef3fa;
    color: #15244b;
    font: inherit;
    font-size: 1.5rem;
    cursor: pointer;
}

.ebook-form { display: grid; gap: 12px; }
.ebook-form label { display: grid; gap: 4px; font-size: .9rem; font-weight: 700; }
.ebook-form input {
    width: 100%;
    min-height: 44px;
    padding: 8px 12px;
    border: 1px solid #a3b2c8;
    border-radius: 8px;
    color: inherit;
    font: inherit;
    font-size: 1rem;
    font-weight: 400;
}
.ebook-form input[aria-invalid="true"] { border-color: #a81828; }
.ebook-dialog :focus-visible { outline: 2px solid #1a5fd0; outline-offset: 2px; }
.ebook-form p { margin: 0; font-size: .83rem; }
.ebook-form p a { color: #154b9f; text-decoration: underline; }
.ebook-form .btn { justify-content: center; cursor: pointer; }
