:root {
    --ink: #17202a;
    --ink-deep: #0f161d;
    --ink-soft: #3d4852;
    --paper: #f7f2ea;
    --paper-light: #fffdf9;
    --paper-dark: #ece3d6;
    --wine: #9f1f50;
    --wine-dark: #741438;
    --coral: #ff5a5f;
    --orange: #f47920;
    --gold: #c99a39;
    --gold-light: #f4dfae;
    --mint: #ddf7f2;
    --mint-border: #9de4d8;
    --muted: #626a71;
    --line: rgba(23, 32, 42, 0.14);
    --white: #ffffff;
    --radius-small: 10px;
    --radius-medium: 18px;
    --radius-large: 26px;
    --page-width: 1120px;
    --reader-width: 780px;
    --reader-size: 19px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family:
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Arial,
        sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

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

a {
    color: inherit;
    -webkit-tap-highlight-color: transparent;
}

button,
input {
    font: inherit;
}

.page-width {
    width: min(calc(100% - 28px), var(--page-width));
    margin-inline: auto;
}

.reader-width {
    width: min(calc(100% - 28px), var(--reader-width));
    margin-inline: auto;
}

.skip-link {
    position: fixed;
    top: 8px;
    left: 8px;
    z-index: 1000;
    padding: 9px 14px;
    transform: translateY(-180%);
    border-radius: var(--radius-small);
    background: var(--white);
    color: var(--ink);
    font-weight: 800;
    text-decoration: none;
}

.skip-link:focus {
    transform: translateY(0);
}

.reader-toolbar {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid var(--line);
    background: rgba(247, 242, 234, 0.96);
    backdrop-filter: blur(12px);
}

.reader-toolbar__inner {
    min-height: 58px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.brand {
    color: var(--ink-deep);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.45rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    text-decoration: none;
}

.reader-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.text-control,
.toolbar-link {
    min-height: 38px;
    padding: 7px 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--white);
    color: var(--ink);
    font-size: 0.78rem;
    font-weight: 850;
    text-decoration: none;
    cursor: pointer;
}

.toolbar-link {
    border-color: transparent;
    background: var(--wine);
    color: var(--white);
}

.fragment-heading {
    padding: 28px 0 36px;
    text-align: center;
}

.fragment-heading__image {
    width: min(100%, 1200px);
    aspect-ratio: 1200 / 630;
    margin-inline: auto;
    object-fit: cover;
    border-radius: clamp(10px, 2.5vw, 22px);
    box-shadow: 0 18px 45px rgba(15, 22, 29, 0.22);
}

.eyebrow {
    margin: 24px 0 0;
    color: var(--wine);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.fragment-heading h1 {
    max-width: 900px;
    margin: 8px auto 0;
    color: var(--ink-deep);
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2.35rem, 8vw, 5.1rem);
    font-weight: 700;
    letter-spacing: -0.052em;
    line-height: 0.98;
    text-wrap: balance;
}

.fragment-heading__lead {
    max-width: 640px;
    margin: 16px auto 0;
    color: var(--muted);
    font-size: 0.98rem;
}

.fragment-text {
    padding: 26px 0 68px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: var(--reader-size);
    line-height: 1.78;
}

.fragment-text p {
    margin: 0 0 0.78em;
    text-indent: 1.35em;
}

.fragment-text > p:first-child,
.scene-break + p {
    text-indent: 0;
}

.fragment-text em {
    color: #22262b;
}

.scene-break {
    margin: 2.3rem 0;
    color: var(--wine);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: 0.42em;
    text-align: center;
    scroll-margin-top: 78px;
}

.book-cta {
    width: min(calc(100% - 28px), 860px);
    margin: 0 auto 42px;
    padding: clamp(26px, 6vw, 54px);
    border: 1px solid rgba(23, 32, 42, 0.08);
    border-radius: var(--radius-large);
    background: var(--paper-light);
    box-shadow: 0 20px 55px rgba(23, 32, 42, 0.10);
    text-align: center;
}

.book-cta__intro {
    margin: 0;
    color: var(--ink-soft);
    font-size: 0.98rem;
}

.book-cta h2 {
    margin: 8px auto 0;
    color: var(--ink-deep);
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2rem, 7vw, 3.55rem);
    line-height: 1.02;
    letter-spacing: -0.045em;
    text-wrap: balance;
}

.book-cta__promise {
    margin: 12px 0 0;
    color: var(--wine);
    font-size: 0.82rem;
    font-weight: 900;
    letter-spacing: 0.085em;
    text-transform: uppercase;
}

.book-series {
    margin: 28px auto 32px;
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    align-items: end;
    gap: clamp(4px, 1.2vw, 10px);
}

.book-series img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 3px;
    box-shadow: 0 7px 17px rgba(15, 22, 29, 0.15);
}

.book-form {
    width: min(100%, 560px);
    margin: 0 auto;
    text-align: left;
}

.book-form__heading {
    margin: 0 0 4px;
    color: var(--ink);
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(1.45rem, 4vw, 1.9rem);
    font-weight: 700;
    text-align: center;
}

.book-form__lead {
    margin: 0 0 18px;
    color: var(--muted);
    text-align: center;
}

.book-form__label {
    display: block;
    margin: 0 0 7px;
    color: var(--ink);
    font-size: 0.78rem;
    font-weight: 850;
}

.book-form__input {
    width: 100%;
    min-height: 56px;
    padding: 13px 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius-small);
    background: var(--white);
    color: var(--ink);
    outline: none;
}

.book-form__input:focus {
    border-color: var(--wine);
    box-shadow: 0 0 0 3px rgba(159, 31, 80, 0.13);
}

.book-form__button {
    width: 100%;
    min-height: 56px;
    margin-top: 12px;
    padding: 13px 22px;
    border: 0;
    border-radius: 999px;
    background: var(--wine);
    color: var(--white);
    font-size: 0.82rem;
    font-weight: 900;
    letter-spacing: 0.075em;
    text-transform: uppercase;
    box-shadow: 0 12px 28px rgba(159, 31, 80, 0.25);
    cursor: pointer;
}

.book-form__note {
    margin: 11px 0 0;
    color: var(--muted);
    font-size: 0.72rem;
    line-height: 1.5;
    text-align: center;
}

.hp-field {
    position: absolute !important;
    left: -10000px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

.excerpt-share {
    padding: 42px 0 56px;
    background: var(--mint);
    border-top: 1px solid var(--mint-border);
}

.excerpt-share__inner {
    width: min(calc(100% - 28px), 720px);
    margin-inline: auto;
    text-align: center;
}

.excerpt-share h2 {
    margin: 0;
    color: var(--ink-deep);
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(1.65rem, 5vw, 2.35rem);
    line-height: 1.12;
}

.excerpt-share p {
    margin: 9px 0 20px;
    color: var(--ink-soft);
}

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

.share-button {
    min-height: 50px;
    padding: 11px 15px;
    border: 1px solid var(--line);
    border-radius: var(--radius-small);
    background: var(--white);
    color: var(--ink);
    font-weight: 850;
    cursor: pointer;
}

.share-button--primary {
    grid-column: 1 / -1;
    min-height: 60px;
    border-color: transparent;
    background: var(--coral);
    color: var(--white);
    font-size: 1.05rem;
}

.share-status {
    min-height: 1.45em;
    margin: 12px 0 0 !important;
    color: #137f77 !important;
    font-size: 0.9rem;
    font-weight: 850;
}

.site-footer {
    padding: 25px 0;
    background: var(--ink-deep);
    color: rgba(255, 255, 255, 0.62);
}

.site-footer__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.site-footer p {
    margin: 0;
    font-size: 0.72rem;
}

/* Excerpt hub */

.hub-hero {
    padding: clamp(58px, 9vw, 110px) 0 64px;
    background:
        radial-gradient(circle at 12% 12%, rgba(244, 121, 32, 0.25), transparent 30%),
        radial-gradient(circle at 88% 18%, rgba(255, 90, 95, 0.20), transparent 32%),
        var(--ink-deep);
    color: var(--white);
    text-align: center;
}

.hub-hero__kicker {
    margin: 0;
    color: var(--gold-light);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.hub-hero h1 {
    max-width: 900px;
    margin: 12px auto 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2.7rem, 9vw, 5.8rem);
    letter-spacing: -0.055em;
    line-height: 0.96;
    text-wrap: balance;
}

.hub-hero__lead {
    max-width: 650px;
    margin: 18px auto 0;
    color: rgba(255, 255, 255, 0.74);
}

.excerpt-list {
    padding: 58px 0 80px;
}

.excerpt-list__heading {
    margin-bottom: 24px;
}

.excerpt-list__heading h2 {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2rem, 6vw, 3.25rem);
    letter-spacing: -0.04em;
}

.excerpt-list__heading p {
    margin: 8px 0 0;
    color: var(--muted);
}

.excerpt-grid {
    display: grid;
    gap: 22px;
}

.excerpt-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-large);
    background: var(--paper-light);
    box-shadow: 0 16px 38px rgba(23, 32, 42, 0.10);
}

.excerpt-card__image {
    width: 100%;
    aspect-ratio: 1200 / 630;
    object-fit: cover;
}

.excerpt-card__body {
    padding: clamp(22px, 5vw, 36px);
}

.excerpt-card__number {
    margin: 0;
    color: var(--wine);
    font-size: 0.7rem;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.excerpt-card h3 {
    margin: 7px 0 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(1.75rem, 5vw, 2.7rem);
    line-height: 1.05;
}

.excerpt-card__description {
    margin: 12px 0 0;
    color: var(--ink-soft);
}

.excerpt-card__button {
    min-height: 50px;
    margin-top: 20px;
    padding: 12px 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--wine);
    color: var(--white);
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.07em;
    text-decoration: none;
    text-transform: uppercase;
}

.text-control:focus-visible,
.toolbar-link:focus-visible,
.book-form__button:focus-visible,
.share-button:focus-visible,
.excerpt-card__button:focus-visible,
.brand:focus-visible {
    outline: 3px solid var(--gold);
    outline-offset: 3px;
}

@media (min-width: 760px) {
    .page-width,
    .reader-width {
        width: min(calc(100% - 48px), var(--page-width));
    }

    .reader-width {
        width: min(calc(100% - 48px), var(--reader-width));
    }

    .fragment-heading {
        padding-top: 42px;
    }

    .fragment-text {
        padding-top: 38px;
    }

    .excerpt-card {
        display: grid;
        grid-template-columns: minmax(0, 1.12fr) minmax(300px, 0.88fr);
        align-items: stretch;
    }

    .excerpt-card__image {
        height: 100%;
        min-height: 340px;
    }

    .excerpt-card__body {
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
}

@media (max-width: 520px) {
    :root {
        --reader-size: 18px;
    }

    .toolbar-link {
        display: none;
    }

    .book-series {
        margin-block: 22px 28px;
        gap: 4px;
    }

    .book-cta {
        padding-inline: 18px;
    }

    .share-actions {
        grid-template-columns: 1fr;
    }

    .share-button--primary {
        grid-column: auto;
    }

    .site-footer__inner {
        flex-direction: column;
        gap: 4px;
        text-align: center;
    }
}

@media (hover: hover) and (pointer: fine) {
    .text-control,
    .toolbar-link,
    .book-form__button,
    .share-button,
    .excerpt-card__button {
        transition:
            transform 150ms ease,
            background-color 150ms ease,
            box-shadow 150ms ease;
    }

    .text-control:hover,
    .toolbar-link:hover,
    .book-form__button:hover,
    .share-button:hover,
    .excerpt-card__button:hover {
        transform: translateY(-2px);
    }

    .book-form__button:hover,
    .toolbar-link:hover,
    .excerpt-card__button:hover {
        background: var(--wine-dark);
    }

    .share-button--primary:hover {
        background: #e7474d;
    }
}

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

    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}
