:root {
    color-scheme: dark;
    --ink: #f8efd9;
    --muted: #bba889;
    --paper: #15110d;
    --panel: #211913;
    --panel-strong: #2b2018;
    --line: #604a37;
    --gold: #e4b85f;
    --red: #d9644a;
    --green: #75b898;
    --blue: #70a7c8;
    --shadow: rgba(0, 0, 0, 0.32);
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: var(--paper);
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--ink);
    font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    background:
        linear-gradient(135deg, rgba(112, 167, 200, 0.12), transparent 34%),
        linear-gradient(225deg, rgba(217, 100, 74, 0.12), transparent 36%),
        var(--paper);
}

body::before {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    content: "";
    background-image:
        linear-gradient(rgba(248, 239, 217, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(248, 239, 217, 0.03) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: linear-gradient(to bottom, black, transparent 82%);
}

.page-shell {
    width: min(1120px, calc(100% - 40px));
    margin: 0 auto;
    padding: 72px 0 48px;
}

.hero {
    min-height: 54vh;
    display: grid;
    align-content: center;
    gap: 22px;
    padding: 64px 0 44px;
}

.kicker,
.status,
.edition,
.chapters span,
footer {
    letter-spacing: 0;
    text-transform: uppercase;
}

.kicker {
    width: fit-content;
    margin: 0;
    color: var(--gold);
    font-size: clamp(0.78rem, 1.4vw, 0.95rem);
    font-weight: 600;
}

h1,
h2,
p {
    margin: 0;
}

h1 {
    max-width: 900px;
    font-family: "Literata", Georgia, serif;
    font-size: clamp(4.4rem, 13vw, 10.8rem);
    line-height: 0.9;
    letter-spacing: 0;
    text-wrap: balance;
}

.lede {
    max-width: 760px;
    color: var(--muted);
    font-size: clamp(1.15rem, 2vw, 1.55rem);
    line-height: 1.6;
}

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

.status,
.edition {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 0 16px;
    font-size: 0.82rem;
    font-weight: 600;
}

.status {
    color: var(--paper);
    background: var(--gold);
    border-color: var(--gold);
}

.edition {
    color: var(--ink);
    background: rgba(33, 25, 19, 0.72);
}

.chapters {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    padding-top: 24px;
}

.chapters article {
    min-height: 220px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 22px;
    background: linear-gradient(180deg, var(--panel-strong), var(--panel));
    box-shadow: 0 18px 44px var(--shadow);
}

.chapters span {
    color: var(--green);
    font-size: 0.76rem;
    font-weight: 600;
}

.chapters article:nth-child(2) span {
    color: var(--blue);
}

.chapters article:nth-child(3) span {
    color: var(--red);
}

.chapters article:nth-child(4) span {
    color: var(--gold);
}

h2 {
    color: var(--ink);
    font-family: "Literata", Georgia, serif;
    font-size: clamp(1.35rem, 2vw, 1.75rem);
    line-height: 1.1;
}

.chapters p {
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.55;
}

footer {
    width: min(1120px, calc(100% - 40px));
    margin: 0 auto;
    padding: 12px 0 34px;
    color: rgba(248, 239, 217, 0.52);
    font-size: 0.75rem;
}

@media (max-width: 900px) {
    .chapters {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 620px) {
    .page-shell {
        width: min(100% - 28px, 1120px);
        padding-top: 42px;
    }

    .hero {
        min-height: auto;
        padding: 42px 0 28px;
    }

    h1 {
        font-size: clamp(3.5rem, 18vw, 6rem);
    }

    .chapters {
        grid-template-columns: 1fr;
    }

    .chapters article {
        min-height: 0;
    }

    footer {
        width: min(100% - 28px, 1120px);
    }
}
