:root {
    color-scheme: light;
    --ink: #0d2038;
    --muted: #5c6d83;
    --surface: #ffffff;
    --canvas: #f2f6fb;
    --border: #dce5ef;
    --primary: #1466cc;
    --primary-dark: #0e4d9e;
    --shadow: 0 18px 48px rgba(20, 50, 83, .12);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--canvas);
    color: var(--ink);
    font-family: "Outfit", system-ui, sans-serif;
    line-height: 1.5;
}

a { color: inherit; }

.site-header {
    background: #fff;
    border-bottom: 1px solid var(--border);
}

.header-inner,
.intro-inner,
.reader-section,
footer {
    width: min(1120px, calc(100% - 40px));
    margin: 0 auto;
}

.header-inner {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: var(--ink);
    font-weight: 800;
    font-size: 1.14rem;
    text-decoration: none;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 35px;
    height: 35px;
    background: var(--primary);
    color: #fff;
    border-radius: 10px;
    font-size: .74rem;
    letter-spacing: -.03em;
}

.back-link,
.text-link,
.reader-open {
    color: var(--primary-dark);
    font-weight: 700;
    text-decoration: none;
}

.back-link:hover,
.text-link:hover,
.reader-open:hover { text-decoration: underline; }

.book-intro {
    background: radial-gradient(circle at 15% 25%, #e1efff 0, transparent 30rem), linear-gradient(135deg, #fff 0%, #f4f8fc 100%);
    border-bottom: 1px solid var(--border);
    padding: clamp(46px, 7vw, 86px) 0;
}

.intro-inner {
    display: grid;
    grid-template-columns: minmax(210px, 300px) minmax(0, 1fr);
    align-items: center;
    gap: clamp(32px, 7vw, 88px);
}

.book-cover {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
    box-shadow: 0 24px 40px rgba(12, 34, 62, .26);
}

.eyebrow {
    margin: 0 0 10px;
    color: var(--primary-dark);
    font-size: .79rem;
    font-weight: 800;
    letter-spacing: .11em;
    text-transform: uppercase;
}

h1, h2 { line-height: 1.08; letter-spacing: -.04em; }

h1 {
    max-width: 690px;
    margin: 0;
    font-size: clamp(2.35rem, 5.6vw, 4.6rem);
}

h2 { margin: 0; font-size: clamp(1.65rem, 3vw, 2.35rem); }

.lead {
    max-width: 620px;
    margin: 22px 0 0;
    color: var(--muted);
    font-size: clamp(1.05rem, 1.8vw, 1.22rem);
}

.actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 16px;
    margin-top: 30px;
}

.button {
    display: inline-flex;
    min-height: 47px;
    align-items: center;
    justify-content: center;
    padding: 0 20px;
    border: 1px solid transparent;
    border-radius: 10px;
    font-weight: 800;
    text-decoration: none;
    transition: transform .18s ease, background .18s ease, border-color .18s ease;
}

.button:hover { transform: translateY(-2px); }

.button-primary { background: var(--primary); color: #fff; }
.button-primary:hover { background: var(--primary-dark); }
.button-secondary { border-color: #a9c8ee; background: #fff; color: var(--primary-dark); }
.button-secondary:hover { border-color: var(--primary); background: #edf6ff; }

.reader-section { padding: clamp(46px, 7vw, 78px) 0 82px; }

.reader-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 23px;
}

.pdf-frame-wrap {
    overflow: hidden;
    min-height: min(78vh, 1000px);
    background: #6d7783;
    border: 1px solid #c8d4e0;
    border-radius: 14px;
    box-shadow: var(--shadow);
}

.pdf-frame { display: block; width: 100%; height: min(78vh, 1000px); min-height: 680px; border: 0; background: #fff; }

footer {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding: 26px 0 34px;
    color: #627086;
    font-size: .92rem;
}

footer a { color: inherit; }

@media (max-width: 640px) {
    .header-inner,
    .intro-inner,
    .reader-section,
    footer { width: min(100% - 28px, 1120px); }
    .header-inner { min-height: 64px; }
    .back-link { font-size: .91rem; }
    .intro-inner { grid-template-columns: 145px minmax(0, 1fr); gap: 23px; }
    .lead { font-size: 1rem; }
    .actions { margin-top: 22px; }
    .button { width: 100%; }
    .text-link { margin-left: 2px; }
    .reader-heading { align-items: flex-start; flex-direction: column; gap: 10px; }
    .pdf-frame-wrap { min-height: 72vh; border-radius: 10px; }
    .pdf-frame { height: 72vh; min-height: 550px; }
    footer { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 410px) {
    .intro-inner { grid-template-columns: 1fr; }
    .book-cover { width: min(210px, 60vw); }
}
