:root{--err:#b3261e}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]){--err:#ff9a8f}}
:root[data-theme="dark"]{--err:#ff9a8f}
html.ebook-lock,html.ebook-lock body{overflow:hidden}
.ebook-overlay{position:fixed;inset:0;z-index:100;display:flex;align-items:center;justify-content:center;padding:16px;background:rgba(8,28,27,.6)}
.ebook-overlay[hidden]{display:none}
.ebook-modal{position:relative;background:var(--surface);color:var(--ink);border-radius:22px;width:100%;max-width:860px;max-height:calc(100vh - 32px);max-height:calc(100dvh - 32px);overflow:auto;box-shadow:0 24px 70px rgba(0,0,0,.35);animation:ebook-in .25s ease-out}
.ebook-modal:focus{outline:none}
@keyframes ebook-in{from{opacity:0;transform:translateY(12px)}to{opacity:1;transform:none}}
.ebook-close{position:absolute;top:12px;right:12px;width:44px;height:44px;border-radius:50%;border:1px solid var(--line);background:var(--bg);color:var(--ink);font-size:1.5rem;line-height:1;cursor:pointer;z-index:2}
.ebook-close:hover{background:var(--alt)}
.ebook-grid{display:grid;grid-template-columns:280px 1fr}
.ebook-side{background:var(--alt);padding:32px;display:grid;place-items:center}
.ebook-body{padding:40px 36px 32px}
.ebook-body h2{font-size:clamp(1.6rem,3vw,2.1rem);margin-bottom:10px}
.ebook-sub{color:var(--muted);margin:0 0 20px;font-size:1rem}
.bk{width:180px;aspect-ratio:2/3;border-radius:6px 10px 10px 6px;overflow:hidden;box-shadow:0 14px 30px rgba(0,0,0,.25);display:flex;flex-direction:column;background:#ffdd2d;font-family:var(--serif)}
.bk-top{flex:0 0 52%;background:#0c0c0c;color:#ffdd2d;padding:14px 12px;display:flex;align-items:center;justify-content:center;text-align:center;font-weight:600;font-size:1.05rem;line-height:1.12;text-transform:uppercase}
.bk-mid{flex:1;color:#0c0c0c;padding:10px 12px;text-align:center;font:600 .66rem/1.25 var(--sans);text-transform:uppercase;display:flex;align-items:center;justify-content:center}
.ef-form{display:grid;grid-template-columns:1fr 1fr;column-gap:12px}
.ef-form>*{grid-column:1/-1}
.ef-form>.ef[data-t^="first_name"],.ef-form>.ef[data-t^="last_name"]{grid-column:auto}
.ef{margin-bottom:14px}
.ef label{display:block;font-weight:600;font-size:.95rem;margin-bottom:6px}
.ef input[type=text],.ef input[type=email],.ef input[type=tel]{width:100%;min-height:50px;padding:0 14px;border:1.5px solid var(--line);border-radius:12px;background:var(--bg);color:var(--ink);font:400 1rem var(--sans)}
.ef input[aria-invalid=true]{border-color:var(--err)}
.ef-check label{display:flex;gap:12px;align-items:flex-start;font-weight:400;font-size:.92rem;color:var(--muted);cursor:pointer}
.ef-check input{flex:none;width:22px;height:22px;margin-top:2px;accent-color:var(--brand)}
.ef-err{color:var(--err);font-size:.88rem;margin:6px 0 0}
.ef-err[hidden]{display:none}
.ef-submit{width:100%;justify-content:center;margin-top:6px;cursor:pointer}
.ef-submit:disabled{opacity:.7;cursor:progress}
.ef-fine{color:var(--muted);font-size:.85rem;margin:12px 0 0}
.ef-note{color:var(--muted)}
.ef-done h3{font-size:1.5rem;margin-bottom:10px}
.ef-done p{color:var(--muted)}
.ef-done .btn{margin:6px 0 4px}
.ef-done a:not(.btn){color:var(--brand);font-weight:600}
.ebook-band-card{display:grid;grid-template-columns:auto 1fr;gap:40px;align-items:center;padding:36px}
.ebook-band-card h2{margin-bottom:10px}
.ebook-band-card p{color:var(--muted);margin:0 0 20px;max-width:34em}
.ebook-band-card .btn{cursor:pointer}
@media (max-width:720px){
.ebook-grid{grid-template-columns:1fr}
.ebook-side{display:none}
.ebook-body{padding:60px 22px 24px}
.ebook-band-card{grid-template-columns:1fr;gap:22px;padding:26px 22px;justify-items:start}
.bk{width:140px}
}
@media (max-width:520px){
.ef-form{grid-template-columns:1fr}
.ef-form>.ef[data-t^="first_name"],.ef-form>.ef[data-t^="last_name"]{grid-column:1/-1}
}
@media (prefers-reduced-motion:reduce){.ebook-modal{animation:none}}