@font-face {
    font-family: "Source Serif 4";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("../fonts/source-serif-4-400.woff2") format("woff2");
}

@font-face {
    font-family: "Source Serif 4";
    font-style: italic;
    font-weight: 400;
    font-display: swap;
    src: url("../fonts/source-serif-4-400-italic.woff2") format("woff2");
}

@font-face {
    font-family: "Source Serif 4";
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url("../fonts/source-serif-4-600.woff2") format("woff2");
}

@font-face {
    font-family: "Source Sans 3";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("../fonts/source-sans-3-400.woff2") format("woff2");
}

@font-face {
    font-family: "Source Sans 3";
    font-style: italic;
    font-weight: 400;
    font-display: swap;
    src: url("../fonts/source-sans-3-400-italic.woff2") format("woff2");
}

@font-face {
    font-family: "Source Sans 3";
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url("../fonts/source-sans-3-600.woff2") format("woff2");
}

@font-face {
    font-family: "Source Sans 3";
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url("../fonts/source-sans-3-700.woff2") format("woff2");
}

:root {
    --paper: #f4efe6;
    --paper-2: #fffaf3;
    --shade: #e8e0d2;
    --ink: #1c1915;
    --ink-soft: #3c3832;
    --muted: #645e55;
    --line: #d5cdc0;
    --accent: #8f3328;
    --night: #171512;
    --night-text: #f6f1e7;
    --night-muted: #cfc6b8;
    --serif: "Source Serif 4", "Iowan Old Style", "Palatino Linotype", Palatino, serif;
    --sans: "Source Sans 3", "Segoe UI", sans-serif;
    --mono: "Source Sans 3", "Segoe UI", sans-serif;
    --shell: 1120px;
    --measure: 66ch;
}

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

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--sans);
    font-size: 1.0625rem;
    line-height: 1.65;
}

img {
    max-width: 100%;
}

a {
    color: inherit;
}

a:hover {
    color: var(--accent);
}

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

.skip {
    position: absolute;
    left: 1rem;
    top: 0;
    transform: translateY(-120%);
    background: var(--ink);
    color: var(--paper);
    padding: 0.6rem 0.9rem;
    z-index: 10;
}

.skip:focus {
    transform: none;
}

.stripe {
    height: 6px;
    background: var(--accent);
}

.shell {
    width: min(var(--shell), calc(100% - 2.5rem));
    margin-inline: auto;
}

.site-header {
    position: relative;
    border-bottom: 1px solid var(--line);
    background: var(--paper);
}

.header-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    min-height: 4.4rem;
}

.brand {
    font-family: var(--serif);
    font-weight: 600;
    font-size: 1.35rem;
    letter-spacing: -0.03em;
    text-decoration: none;
    color: var(--ink);
}

.nav-toggle {
    display: none;
    border: 1px solid var(--ink);
    background: transparent;
    color: var(--ink);
    font: inherit;
    font-size: 0.95rem;
    padding: 0.4rem 0.75rem;
    cursor: pointer;
}

#site-nav ul {
    display: flex;
    gap: 1.35rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

#site-nav a {
    text-decoration: none;
    font-weight: 600;
    color: var(--ink-soft);
}

#site-nav a[aria-current="page"] {
    color: var(--ink);
    box-shadow: inset 0 -2px 0 var(--accent);
}

.kicker,
.footer-label,
.source-label {
    font-family: var(--mono);
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent);
    margin: 0 0 0.75rem;
}

.hero {
    max-width: 40rem;
    padding: 2.6rem 0 0.2rem;
}

h1,
h2,
h3 {
    font-family: var(--serif);
    font-weight: 600;
    letter-spacing: -0.03em;
    line-height: 1.12;
    color: var(--ink);
}

h1 {
    font-size: clamp(2rem, 3.2vw, 3.15rem);
    margin: 0;
    max-width: 18em;
}

.lede,
.definition {
    font-size: 1.25rem;
    line-height: 1.5;
    max-width: 42rem;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    align-items: center;
    margin-top: 1.75rem;
}

.button,
.link-button {
    display: inline-flex;
    align-items: center;
    min-height: 2.9rem;
    padding: 0.55rem 1rem;
    background: var(--ink);
    color: var(--paper);
    text-decoration: none;
    font-weight: 700;
    border: 1px solid var(--ink);
}

.button:hover,
.link-button:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--paper);
}

.text-link {
    font-weight: 700;
    text-underline-offset: 0.22em;
}

.hero-index {
    border-left: 1px solid var(--line);
    padding-left: 1.4rem;
}

.hero-index ol {
    list-style: none;
    margin: 0;
    padding: 0;
}

.hero-index li + li {
    margin-top: 0.75rem;
}

.hero-index a {
    display: grid;
    grid-template-columns: 2rem 1fr;
    gap: 0.35rem 0.7rem;
    text-decoration: none;
}

.hero-index .idx {
    font-family: var(--mono);
    font-size: 0.75rem;
    color: var(--accent);
    padding-top: 0.25rem;
}

.hero-index strong {
    display: block;
    font-family: var(--serif);
    font-weight: 600;
    font-size: 1.15rem;
    color: var(--ink);
}

.hero-index a > span span {
    display: block;
    color: var(--muted);
    font-size: 0.92rem;
}

.hero-index .aside-link {
    display: inline-block;
    margin-top: 1.1rem;
    font-weight: 700;
}

.section {
    padding: 3.2rem 0;
    border-top: 1px solid var(--line);
}

.section h2 {
    font-size: clamp(1.8rem, 3vw, 2.6rem);
    max-width: 22em;
    margin: 0 0 1rem;
}

.prose {
    max-width: var(--measure);
}

.prose p,
.stack p {
    margin: 0 0 1rem;
}

.prose strong {
    font-weight: 700;
}

.pull {
    font-family: var(--serif);
    font-size: clamp(1.7rem, 3vw, 2.35rem);
    line-height: 1.2;
    letter-spacing: -0.03em;
    margin: 0;
    max-width: 22ch;
}

.sequence {
    list-style: none;
    margin: 2rem 0 0;
    padding: 0;
}

.sequence > li {
    border-top: 1px solid var(--line);
}

.sequence a {
    display: grid;
    grid-template-columns: 4.2rem 14rem 1fr;
    gap: 1rem;
    align-items: baseline;
    padding: 1.15rem 0;
    text-decoration: none;
}

.sequence .idx {
    font-family: var(--mono);
    color: var(--accent);
}

.sequence strong {
    font-family: var(--serif);
    font-size: 1.55rem;
    font-weight: 600;
}

.sequence em {
    font-style: normal;
    color: var(--muted);
}

.band {
    background: var(--night);
    color: var(--night-text);
}

.band h2,
.band p {
    color: var(--night-text);
}

.band .kicker {
    color: #e7b2ab;
}

.band-inner {
    padding: 4rem 0;
    max-width: 46rem;
}

.band-inner p {
    font-family: var(--serif);
    font-size: clamp(1.55rem, 2.6vw, 2.15rem);
    line-height: 1.3;
    letter-spacing: -0.02em;
    margin: 0 0 1rem;
}

.page-head {
    padding: 3.2rem 0 2rem;
}

.page-head h1 {
    font-size: clamp(2rem, 3.4vw, 3.35rem);
    max-width: 16em;
}

.page-intro {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(220px, 0.6fr);
    gap: 2.5rem;
    align-items: start;
}

.question {
    font-family: var(--serif);
    font-weight: 400;
    font-style: italic;
    font-size: clamp(1.45rem, 2.4vw, 1.9rem);
    line-height: 1.3;
    margin: 1.5rem 0;
    max-width: 28ch;
}

.concepts {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    list-style: none;
    margin: 1rem 0 0;
    padding: 0;
}

.concepts a,
.concepts li {
    border: 1px solid var(--line);
    background: var(--paper-2);
    padding: 0.3rem 0.6rem;
    font-size: 0.95rem;
    text-decoration: none;
}

.crumbs {
    padding-top: 1.2rem;
}

.crumbs ol {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 0.3rem;
    list-style: none;
    margin: 0;
    padding: 0;
    color: var(--muted);
    font-size: 0.92rem;
}

.crumbs li:not(:last-child)::after {
    content: "/";
    margin-left: 0.3rem;
    color: var(--line);
}

.crumbs a {
    color: var(--ink-soft);
}

.stage-list {
    display: grid;
    gap: 0;
}

.stage-block {
    display: grid;
    grid-template-columns: 5rem 1fr;
    gap: 1rem;
    padding: 1.8rem 0;
    border-top: 1px solid var(--line);
}

.stage-block h2 {
    margin: 0 0 0.4rem;
    font-size: clamp(1.7rem, 3vw, 2.3rem);
}

.stage-block h2 a {
    text-decoration: none;
}

.meta-line {
    color: var(--muted);
    margin-top: 0.8rem;
}

.note {
    background: var(--shade);
    border-left: 3px solid var(--accent);
    padding: 1rem 1.1rem;
    max-width: 68ch;
}

.note p:last-child {
    margin-bottom: 0;
}

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
}

.card {
    background: var(--paper-2);
    border: 1px solid var(--line);
    padding: 1.2rem 1.15rem 1.3rem;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

.card h2,
.card h3 {
    font-size: 1.45rem;
    margin: 0 0 0.7rem;
}

.card p {
    margin: 0;
    color: var(--ink-soft);
}

.card .more {
    margin-top: auto;
    padding-top: 1rem;
    font-weight: 700;
}

.toc a,
.chapter-row {
    display: grid;
    grid-template-columns: 4.5rem 1fr;
    gap: 0.8rem;
    padding: 0.95rem 0;
    border-top: 1px solid var(--line);
    text-decoration: none;
}

.toc .num,
.chapter-num {
    font-family: var(--mono);
    color: var(--accent);
}

.chapter {
    padding: 1.4rem 0;
    border-top: 1px solid var(--line);
    max-width: 70ch;
}

.chapter h3 {
    margin: 0.2rem 0 0.6rem;
    font-size: 1.55rem;
}

.tag {
    font-family: var(--mono);
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
}

.sources,
.plain-list,
.journey {
    margin: 0;
    padding: 0;
    list-style: none;
}

.sources li,
.plain-list li {
    padding: 0.9rem 0;
    border-top: 1px solid var(--line);
}

.sources h3,
.plain-list strong {
    font-family: var(--serif);
    font-size: 1.25rem;
    font-weight: 600;
}

.journey li {
    font-family: var(--serif);
    font-size: 1.35rem;
    padding: 0.35rem 0;
}

.journey li::before {
    content: "→ ";
    color: var(--accent);
    font-family: var(--sans);
}

.journey li:first-child::before {
    content: "";
}

.dimension-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.dimension {
    border: 1px solid var(--line);
    background: var(--paper-2);
    padding: 1.1rem 1.15rem;
}

.dimension h3 {
    margin: 0 0 0.45rem;
    font-size: 1.4rem;
}

.faq details {
    border-top: 1px solid var(--line);
    padding: 0.85rem 0;
}

.faq summary {
    cursor: pointer;
    font-family: var(--serif);
    font-size: 1.35rem;
    letter-spacing: -0.02em;
    line-height: 1.3;
}

.faq details p {
    max-width: var(--measure);
    margin: 0.75rem 0 0.3rem;
}

.idea-block {
    padding: 1.6rem 0;
    border-top: 1px solid var(--line);
}

.idea-block h2 {
    margin: 0 0 0.6rem;
    font-size: 1.8rem;
}

.idea-block ul {
    margin: 0.4rem 0 0;
    padding-left: 1.1rem;
}

.site-footer {
    background: var(--night);
    color: var(--night-text);
    margin-top: 1rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2rem;
    padding: 2.4rem 0 1.6rem;
}

.footer-statement p:last-child {
    font-family: var(--serif);
    font-size: 1.45rem;
    line-height: 1.3;
    letter-spacing: -0.02em;
    max-width: 28ch;
}

.site-footer a {
    color: var(--night-text);
    text-decoration: none;
}

.site-footer a:hover {
    color: #f0c7c1;
}

.site-footer ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.site-footer li + li {
    margin-top: 0.35rem;
}

.footer-label {
    color: #e7b2ab;
}

.footer-base {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    border-top: 1px solid rgba(246, 241, 231, 0.18);
    padding: 1rem 0 1.4rem;
    color: var(--night-muted);
}

.pager {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    border-top: 1px solid var(--line);
    padding: 1.3rem 0 2.5rem;
}

.pager a {
    text-decoration: none;
    font-weight: 700;
}

@media (max-width: 900px) {
    .hero,
    .page-intro,
    .cards,
    .dimension-grid,
    .footer-grid,
    .sequence a,
    .stage-block {
        grid-template-columns: 1fr;
    }

    .hero-index {
        border-left: 0;
        padding-left: 0;
        border-top: 1px solid var(--line);
        padding-top: 1.4rem;
    }

    .js .nav-toggle {
        display: inline-flex;
    }

    .js #site-nav {
        display: none;
        position: absolute;
        left: 0;
        right: 0;
        top: 100%;
        background: var(--paper-2);
        border-bottom: 1px solid var(--line);
        z-index: 5;
    }

    .js #site-nav.is-open {
        display: block;
    }

    #site-nav ul {
        flex-direction: column;
        gap: 0;
        padding: 0.4rem 1.25rem 0.9rem;
    }

    #site-nav a {
        display: block;
        padding: 0.7rem 0;
    }
}

@media (max-width: 640px) {
    .shell {
        width: min(var(--shell), calc(100% - 1.5rem));
    }

    .footer-base,
    .pager,
    .actions {
        flex-direction: column;
        align-items: flex-start;
    }
}

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

@media print {
    .stripe,
    .site-header,
    .site-footer,
    .actions,
    .skip {
        display: none;
    }

    body {
        background: #fff;
        color: #000;
    }

    a {
        text-decoration: underline;
    }
}
