@font-face {
    font-family: "Inter";
    src: url("../../fonts/Inter-Regular.woff2") format("woff2");
    font-display: swap;
}

:root {
    color-scheme: light;
    --paper: #ffffff;
    --ink: #111111;
    --muted: #6d6d6d;
    --line: #dedede;
    --soft: #f5f5f3;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    color: var(--ink);
    background: var(--paper);
    font-family: Inter, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

.book-nav {
    min-height: 66px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 0 5vw;
    border-bottom: 1px solid var(--line);
}

.book-nav__brand,
.book-nav__links a {
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.book-nav__links { display: flex; gap: 22px; }
.book-nav__links a { color: var(--muted); }
.book-nav__links a:hover, .book-nav__links a[aria-current="page"] { color: var(--ink); }

.book-index {
    width: min(1120px, calc(100% - 40px));
    margin: 0 auto;
    padding: clamp(74px, 12vw, 150px) 0 100px;
}

.eyebrow {
    margin: 0 0 18px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.12em;
}

.book-index h1 {
    max-width: 760px;
    margin: 0;
    font-size: clamp(46px, 8vw, 104px);
    line-height: 0.94;
    letter-spacing: -0.07em;
}

.book-index__intro {
    max-width: 500px;
    margin: 28px 0 58px;
    color: #4f4f4f;
    font-size: 17px;
    line-height: 1.65;
    letter-spacing: -0.02em;
}

.book-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.book-card {
    min-height: 410px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: clamp(28px, 4vw, 50px);
    border: 1px solid var(--line);
    text-decoration: none;
    transition: transform 180ms ease, box-shadow 180ms ease;
}

.book-card:hover { transform: translateY(-4px); box-shadow: 0 18px 42px rgba(0,0,0,0.09); }
.book-card--polished { color: #fff; background: #111; border-color: #111; }
.book-card__label { margin: 0; font-size: 12px; font-weight: 700; letter-spacing: 0.1em; }
.book-card__title { max-width: 400px; margin: 0; font-size: clamp(32px, 4vw, 54px); line-height: 0.98; letter-spacing: -0.06em; }
.book-card__meta { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.55; }
.book-card--polished .book-card__meta { color: #bfbfbf; }
.book-card__arrow { font-size: 28px; line-height: 1; }

.book-page { padding-bottom: 100px; }

.book-header {
    width: min(760px, calc(100% - 40px));
    margin: 0 auto;
    padding: clamp(74px, 11vw, 130px) 0 clamp(54px, 8vw, 90px);
    text-align: center;
}

.book-header__type { margin: 0 0 18px; color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: 0.12em; }
.book-header h1 { margin: 0; font-size: clamp(43px, 7vw, 78px); line-height: 0.96; letter-spacing: -0.065em; }
.book-header__byline { margin: 24px 0 0; color: #515151; font-size: 15px; }
.ai-note { display: inline-block; margin: 22px 0 0; padding: 8px 11px; border: 1px solid var(--line); color: #4c4c4c; font-size: 12px; line-height: 1.4; }

.book-article {
    width: min(680px, calc(100% - 40px));
    margin: 0 auto;
    padding-top: 46px;
    border-top: 1px solid var(--line);
    font-size: clamp(16px, 1.45vw, 18px);
    line-height: 1.78;
    letter-spacing: -0.012em;
}

.book-article p { margin: 0 0 1.45em; }
.book-intro { margin-bottom: 2.6em; }
.book-intro p { margin-bottom: 1em; }
.book-contents {
    margin: 2.5em 0;
    padding: 24px 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}
.book-contents h2 {
    margin: 0 0 1.1em;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.book-contents ol { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; }
.book-contents li { display: grid; gap: 3px; margin: 0; }
.book-contents strong { font-size: 17px; font-weight: 800; letter-spacing: -0.025em; }
.book-contents span { color: var(--muted); font-size: 14px; line-height: 1.45; }
.book-reader-note {
    margin: 2.4em 0 0;
    padding-left: 18px;
    border-left: 2px solid var(--ink);
    color: #3f3f3f;
}
.book-reader-note strong { display: block; margin-bottom: 8px; font-size: 12px; letter-spacing: 0.09em; text-transform: uppercase; }
.book-reader-note p { margin: 0; }
.book-reader-note + .book-part { margin-top: 0.8em; }
.book-article h2.book-part {
    margin: 3.75em 0 1.1em;
    padding: 0.72em 0 0.2em;
    border-top: 2px solid var(--ink);
    font-size: clamp(40px, 6vw, 62px);
    font-weight: 800;
    line-height: 0.96;
    letter-spacing: -0.065em;
}
.book-article h2.book-part--first { margin-top: 0.65em; }
.book-article h2.book-part::before {
    content: "Part";
    display: block;
    margin-bottom: 0.6em;
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}
.book-article h3.book-chapter {
    margin: 2.75em 0 1.15em;
    font-size: clamp(32px, 4.5vw, 48px);
    font-weight: 800;
    line-height: 1.02;
    letter-spacing: -0.06em;
}
.book-article h3.book-chapter span {
    display: block;
    margin-bottom: 0.82em;
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}
.book-article h4.book-marker {
    display: inline-block;
    margin: 3.4em 0 1em;
    padding: 8px 10px;
    border: 1px solid var(--ink);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.1em;
    line-height: 1;
    text-transform: uppercase;
}
.book-article blockquote { margin: 2.2em 0; padding-left: 20px; border-left: 2px solid var(--ink); font-size: 1.14em; font-style: italic; line-height: 1.55; }
.book-article ul, .book-article ol { margin: 0 0 1.5em; padding-left: 1.25em; }
.book-article li { margin-bottom: 0.45em; }
.book-article .book-article__loading { color: var(--muted); }

@media (max-width: 620px) {
    .book-nav { padding: 0 20px; }
    .book-nav__links { gap: 14px; }
    .book-nav__links a:last-child { display: none; }
    .book-grid { grid-template-columns: 1fr; }
    .book-card { min-height: 330px; }
    .book-header { text-align: left; }
    .book-article { line-height: 1.72; }
    .book-article h2.book-part { margin-top: 3em; }
    .book-article h3.book-chapter { margin-top: 2.4em; }
}
