:root {
    --paper: #faf7f2;
    --ink: #455773;
    --muted: #626875;
    --gold: #b38958;
    --line: #dfd9d0;
    --soft: #eee7de;
    --white: #fffdf9;
    color-scheme: light;
    font-family: Arial, Helvetica, sans-serif;
    color: var(--ink);
    background: var(--paper)
}

* {
    box-sizing: border-box
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 24px
}

body {
    margin: 0
}

a {
    color: inherit
}

button, a {
    -webkit-tap-highlight-color: transparent
}

button {
    font: inherit
}

a:focus-visible, button:focus-visible {
    outline: 3px solid #ae793c;
    outline-offset: 5px
}

button:disabled {
    opacity: .35;
    cursor: default
}

img {
    max-width: 100%;
    height: auto;
    display: block
}

.wrap {
    width: min(1160px, calc(100% - 64px));
    margin-inline: auto
}

.header {
    min-height: 112px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    border-bottom: 1px solid var(--line)
}

.signature {
    text-decoration: none;
    display: grid;
    gap: 7px
}

.signature strong {
    font: 400 22px Georgia, serif
}

.signature span {
    color: var(--muted);
    font-size: 14px;
    letter-spacing: 1.2px
}

.header nav {
    display: flex;
    align-items: center;
    gap: 30px;
    font-size: 14px
}

.header nav > a:not(.button) {
    text-decoration: none
}

.button {
    background: var(--ink);
    color: white;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 22px;
    padding: 19px 24px;
    border-radius: 4px;
    text-decoration: none;
    line-height: 1.4;
    font-size: 16px;
    font-weight: 600;
    transition: background .2s, transform .2s
}

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

.button.small {
    padding: 13px 22px;
    font-size: 14px
}

.hero {
    display: grid;
    grid-template-columns:1.15fr 1fr;
    gap: 90px;
    align-items: center;
    padding-block: 68px 76px
}

.eyebrow {
    font-size: 12px;
    letter-spacing: 2px;
    font-weight: 600;
    line-height: 1.6;
    margin: 0 0 25px;
    color: #805f37
}

h1, h2 {
    font-family: Georgia, 'Times New Roman', serif;
    font-weight: 400
}

h1 {
    font-size: clamp(48px, 5.5vw, 76px);
    line-height: 1.07;
    letter-spacing: -2px;
    margin: 0 0 24px
}

h1 em {
    font-weight: 400
}

.subtitle {
    font-size: 19px;
    line-height: 1.5;
    max-width: 430px;
    margin: 0 0 23px
}

.lead {
    font-size: 16px;
    line-height: 1.85;
    color: var(--muted);
    max-width: 470px;
    margin-bottom: 30px
}

.actions {
    display: flex;
    align-items: flex-start;
    flex-direction: column;
    gap: 22px
}

.text-link {
    text-underline-offset: 5px;
    font-size: 14px;
    line-height: 1.7
}

.text-link span {
    margin-left: 8px
}

.author {
    font-size: 13px;
    line-height: 1.8;
    color: var(--muted);
    margin: 36px 0 0
}

.cover {
    margin: 0;
    max-width: 410px;
    justify-self: center;
    width: 100%
}

.cover img {
    box-shadow: 12px 20px 40px #39445d24, 3px 3px 0 #dfd5c8;
    transform: rotate(2deg);
    border-radius: 2px
}

.cover figcaption {
    font: italic 16px Georgia, serif;
    text-align: center;
    margin-top: 29px;
    color: var(--muted)
}

.contents-band {
    border-block: 1px solid var(--line);
    background: var(--soft)
}

.contents {
    display: grid;
    grid-template-columns:1fr 1fr 1.3fr;
    padding-block: 30px
}

.contents p {
    margin: 0;
    padding: 0 32px;
    border-left: 1px solid #d2c9bd;
    display: grid;
    gap: 9px
}

.contents p:first-child {
    border: 0;
    padding-left: 0
}

.contents strong {
    font: 400 25px Georgia, serif
}

.contents span {
    font-size: 14px;
    color: var(--muted);
    line-height: 1.5
}

.preview {
    padding-block: 88px
}

.section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 32px;
    margin-bottom: 34px
}

.section-heading .eyebrow {
    margin-bottom: 12px
}

h2 {
    font-size: 44px;
    line-height: 1.15;
    margin: 0
}

.section-heading > p {
    font-size: 16px;
    line-height: 1.7;
    color: var(--muted);
    margin: 0
}

.reader {
    display: grid;
    grid-template-columns:280px 1fr;
    border: 1px solid var(--line);
    border-radius: 6px;
    overflow: hidden;
    background: var(--white)
}

.reader-sidebar {
    padding: 32px 24px
}

.reader-sidebar .eyebrow {
    font-size: 11px;
    letter-spacing: 1.5px
}

.page-tabs {
    display: grid;
    gap: 7px
}

.page-tabs button {
    cursor: pointer;
    display: flex;
    gap: 14px;
    align-items: center;
    text-align: left;
    border: 1px solid transparent;
    background: transparent;
    padding: 16px 12px;
    color: var(--ink);
    font-size: 14px;
    line-height: 1.4;
    border-radius: 3px
}

.page-tabs button span {
    font-size: 12px;
    color: #787368
}

.page-tabs button[aria-pressed=true] {
    background: var(--soft);
    border-color: var(--line)
}

.page-tabs button:hover {
    background: #f6f0e8
}

.reader-note {
    font-size: 14px;
    color: var(--muted);
    line-height: 1.8;
    margin: 35px 0 20px
}

.reader-main {
    background: #e8e5e0;
    border-left: 1px solid var(--line);
    min-width: 0
}

.reader-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 14px 22px;
    background: #f4f1ec;
    border-bottom: 1px solid var(--line)
}

.reader-toolbar p {
    font-size: 14px;
    margin: 0;
    line-height: 1.5
}

.reader-toolbar > div {
    display: flex;
    gap: 8px
}

.reader-toolbar button {
    width: 44px;
    height: 44px;
    border: 1px solid #c9c6c0;
    background: var(--white);
    border-radius: 50%;
    color: var(--ink);
    font-size: 21px;
    cursor: pointer
}

.page-stage {
    padding: 28px;
    display: flex;
    justify-content: center
}

.page-stage img {
    width: 100%;
    max-width: 630px;
    object-fit: contain;
    box-shadow: 0 5px 18px #29344415;
    align-self: flex-start
}

.reader-end {
    text-align: center;
    font-size: 13px;
    color: var(--muted);
    margin: 0;
    padding: 0 20px 24px
}

.purchase {
    background: var(--ink);
    color: var(--white);
    padding: 50px 55px;
    display: grid;
    grid-template-columns:1.5fr 1fr;
    gap: 55px;
    align-items: center;
    border-radius: 5px
}

.purchase .eyebrow {
    color: #edcfac;
    margin-bottom: 16px
}

.purchase p:not(.eyebrow) {
    font-size: 16px;
    line-height: 1.8;
    margin: 24px 0 0;
    color: #e5e6ea
}

.purchase-action {
    display: grid;
    justify-items: center;
    gap: 16px
}

.button.light {
    background: #eedcc4;
    color: #34465f
}

.button.light:hover {
    background: #f7e8d5
}

.purchase-action > span {
    font-size: 13px;
    color: #e5e6ea
}

.footer {
    display: flex;
    justify-content: space-between;
    gap: 25px;
    padding-block: 38px;
    font-size: 13px;
    color: var(--muted)
}

.footer a {
    text-underline-offset: 4px
}

.skip {
    position: absolute;
    left: 16px;
    top: -100px;
    background: white;
    padding: 14px;
    z-index: 5
}

.skip:focus {
    top: 16px
}

@media (max-width: 900px) {
    .hero {
        gap: 40px
    }

    .reader {
        grid-template-columns:230px 1fr
    }

    .reader-sidebar {
        padding: 26px 15px
    }

    .contents p {
        padding-inline: 20px
    }

    .purchase {
        gap: 30px;
        padding: 40px
    }

    h2 {
        font-size: 38px
    }
}

@media (max-width: 650px) {
    .wrap {
        width: calc(100% - 36px)
    }

    .header {
        min-height: 94px;
        gap: 12px
    }

    .signature strong {
        font-size: 18px
    }

    .signature span {
        font-size: 12px
    }

    .header nav > a:not(.button) {
        display: none
    }

    .button.small {
        padding: 12px 16px
    }

    .hero {
        grid-template-columns:1fr;
        gap: 42px;
        padding-block: 42px
    }

    .eyebrow {
        margin-bottom: 20px
    }

    h1 {
        font-size: 54px;
        letter-spacing: -1.5px
    }

    .subtitle {
        font-size: 18px
    }

    .lead {
        line-height: 1.7
    }

    .author {
        margin-top: 26px
    }

    .cover {
        max-width: 310px
    }

    .contents {
        grid-template-columns:1fr;
        padding-block: 8px
    }

    .contents p, .contents p:first-child {
        border: 0;
        padding: 20px 0;
        border-bottom: 1px solid #d2c9bd
    }

    .contents p:last-child {
        border: 0
    }

    .contents strong {
        font-size: 24px
    }

    .preview {
        padding-block: 52px
    }

    .section-heading {
        display: block
    }

    .section-heading > p {
        margin-top: 20px
    }

    .reader {
        grid-template-columns:1fr
    }

    .reader-sidebar {
        padding: 22px 16px
    }

    .reader-sidebar > .eyebrow {
        display: none
    }

    .page-tabs {
        display: flex;
        overflow-x: auto;
        padding-bottom: 8px
    }

    .page-tabs button {
        white-space: nowrap;
        padding: 12px
    }

    .reader-note {
        margin: 15px 0 10px;
        font-size: 14px
    }

    .reader-note br {
        display: none
    }

    .reader-main {
        border-left: 0;
        border-top: 1px solid var(--line)
    }

    .reader-toolbar {
        padding: 12px
    }

    .page-stage {
        padding: 12px
    }

    .reader-toolbar p {
        font-size: 13px
    }

    .reader-end {
        padding-bottom: 16px
    }

    .purchase {
        grid-template-columns:1fr;
        padding: 34px 26px;
        gap: 30px
    }

    .purchase-action {
        justify-items: start
    }

    .footer {
        display: grid;
        gap: 5px;
        padding-block: 28px
    }

    h2 {
        font-size: 36px
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto
    }

    .button {
        transition: none
    }
}

/* Keep the horizontal page selector inside the mobile reader column. */
.reader-sidebar {
    min-width: 0
}

@media (max-width: 650px) {
    .reader {
        grid-template-columns:minmax(0, 1fr)
    }
}

.nowrap {
    white-space: nowrap;
}
