/* phpdead.com — editorial one-pager. Fonts: Instrument Serif (display), IBM Plex Sans (body), IBM Plex Mono (labels). */

:root {
    --paper: #f5f1ea;
    --paper-deep: #ebe5da;
    --ink: #1d1b19;
    --ink-soft: #57524b;
    --rule: #d6cfc3;
    --purple: #4f5b93;
    --purple-soft: #777bb4;
    --purple-tint: #e6e7f2;
    --font-display: "Instrument Serif", "Iowan Old Style", "Times New Roman", serif;
    --font-body: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
    --font-mono: "IBM Plex Mono", "SFMono-Regular", Menlo, Consolas, monospace;
    --measure: 66ch;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 1.0625rem;
    line-height: 1.6;
    text-rendering: optimizeLegibility;
}

a {
    color: var(--purple);
    text-decoration-thickness: 1px;
    text-underline-offset: 0.18em;
}

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

h1, h2, h3 {
    font-family: var(--font-display);
    font-weight: 400;
    line-height: 1.05;
    letter-spacing: -0.01em;
    margin: 0;
}

p {
    margin: 0 0 1.1em;
    max-width: var(--measure);
    text-wrap: pretty;
}

.mono {
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--ink-soft);
}

.wrap {
    width: min(100% - 2.5rem, 1120px);
    margin-inline: auto;
}

/* ---------- top bar ---------- */

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    padding: 1.25rem 0;
    border-bottom: 1px solid var(--rule);
}

.topbar .brand {
    font-family: var(--font-mono);
    font-size: 0.9375rem;
    color: var(--ink);
    text-decoration: none;
}

.topbar .brand b {
    color: var(--purple);
    font-weight: 600;
}

.topbar nav {
    display: flex;
    gap: 1.5rem;
}

.topbar nav a {
    text-decoration: none;
}

/* ---------- hero ---------- */

.hero {
    padding: 4.5rem 0 3rem;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 2rem 4rem;
}

.hero h1 {
    font-size: clamp(3rem, 7.5vw, 6.5rem);
}

.hero .answer {
    font-family: var(--font-display);
    font-style: italic;
    color: var(--purple);
    font-size: clamp(9rem, 26vw, 24rem);
    line-height: 0.78;
    letter-spacing: -0.04em;
    margin: 0;
    padding-right: 0.05em;
}

.hero .lede {
    font-size: 1.25rem;
    line-height: 1.5;
    max-width: 44ch;
    margin: 1.75rem 0 0;
}

.hero .eyebrow {
    display: block;
    margin-bottom: 1.5rem;
}

/* ---------- status board ---------- */

.board {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    border-top: 1px solid var(--ink);
    border-bottom: 1px solid var(--rule);
}

.board > div {
    padding: 1.25rem 1.25rem 1.25rem 0;
    border-right: 1px solid var(--rule);
}

.board > div + div {
    padding-left: 1.25rem;
}

.board > div:last-child {
    border-right: 0;
}

.board .value {
    font-family: var(--font-display);
    font-size: 2.75rem;
    line-height: 1;
    margin: 0.35rem 0 0.5rem;
}

.board .note {
    font-size: 0.875rem;
    color: var(--ink-soft);
    margin: 0;
}

.board .note a {
    color: inherit;
}

/* ---------- sections ---------- */

.section {
    padding: 4.5rem 0 1rem;
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 2rem 4rem;
}

.section > header {
    position: sticky;
    top: 1.5rem;
    align-self: start;
}

.section > header h2 {
    font-size: 2.25rem;
    margin-top: 0.35rem;
}

.section > header .mono {
    display: block;
}

.prose h3 {
    font-size: 1.75rem;
    margin: 2.25rem 0 0.6rem;
    scroll-margin-top: 1.5rem;
}

.prose h3:first-child {
    margin-top: 0;
}

.prose h3 a {
    color: inherit;
    text-decoration: none;
}

.prose h3 a:hover::after {
    content: " #";
    color: var(--purple-soft);
}

.prose .first {
    font-size: 1.25rem;
    line-height: 1.5;
}

/* question index */

.toc {
    list-style: none;
    margin: 0;
    padding: 0;
    columns: 2;
    column-gap: 3rem;
}

.toc li {
    break-inside: avoid;
    padding: 0.55rem 0;
    border-bottom: 1px solid var(--rule);
}

.toc a {
    text-decoration: none;
    display: flex;
    gap: 0.75rem;
    align-items: baseline;
}

.toc a:hover {
    text-decoration: underline;
}

.toc .n {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--purple-soft);
    flex: 0 0 1.5rem;
}

/* timeline */

.timeline {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1px;
    background: var(--rule);
    border: 1px solid var(--rule);
}

.timeline li {
    background: var(--paper);
    padding: 1.25rem;
}

.timeline .v {
    font-family: var(--font-display);
    font-size: 2.25rem;
    line-height: 1;
    color: var(--purple);
}

.timeline .d {
    display: block;
    margin: 0.4rem 0 0.6rem;
}

.timeline p {
    font-size: 0.9375rem;
    margin: 0;
    color: var(--ink-soft);
}

/* who runs it */

.roster {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 3rem;
}

.roster li {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--rule);
}

.roster li span:last-child {
    color: var(--ink-soft);
    font-size: 0.9375rem;
    text-align: right;
}

/* ---------- books ---------- */

.books {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 2rem 1.5rem;
}

.book {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.book .cover {
    aspect-ratio: 5 / 6.5;
    display: block;
    text-decoration: none;
    overflow: hidden;
    background: var(--paper-deep);
    border: 1px solid var(--rule);
    box-shadow: 0 12px 24px -16px rgba(29, 27, 25, 0.45);
}

.book .cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.book .cover.typo {
    background: var(--purple);
    color: var(--paper);
    padding: 1.1rem 1rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.book .cover.typo .t {
    font-family: var(--font-display);
    font-size: 1.5rem;
    line-height: 1.05;
    text-wrap: balance;
}

.book .cover.typo .a {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    opacity: 0.85;
}

.book h3 {
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.35;
    letter-spacing: 0;
}

.book h3 a {
    color: inherit;
    text-decoration: none;
}

.book h3 a:hover {
    text-decoration: underline;
}

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

.book .buy {
    margin-top: auto;
    align-self: flex-start;
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    text-decoration: none;
    border: 1px solid var(--ink);
    padding: 0.5rem 0.9rem;
    color: var(--ink);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 44px;
}

.book .buy:hover {
    background: var(--ink);
    color: var(--paper);
}

.book .buy svg {
    width: 14px;
    height: 14px;
}

.disclosure {
    font-size: 0.875rem;
    color: var(--ink-soft);
    max-width: var(--measure);
}

/* ---------- footer ---------- */

footer {
    margin-top: 5rem;
    border-top: 1px solid var(--ink);
    padding: 2rem 0 3rem;
    display: flex;
    justify-content: space-between;
    gap: 2rem;
    flex-wrap: wrap;
}

footer p {
    margin: 0;
    font-size: 0.875rem;
    color: var(--ink-soft);
}

/* ---------- responsive ---------- */

@media (max-width: 900px) {
    .hero {
        grid-template-columns: 1fr;
        padding-top: 3rem;
    }

    .hero .answer {
        font-size: clamp(9rem, 38vw, 16rem);
        line-height: 0.85;
    }

    .board {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .board > div:nth-child(2) {
        border-right: 0;
    }

    .board > div:nth-child(3) {
        padding-left: 0;
        border-top: 1px solid var(--rule);
    }

    .board > div:nth-child(4) {
        border-top: 1px solid var(--rule);
    }

    .section {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding-top: 3.5rem;
    }

    .section > header {
        position: static;
    }

    .books {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .timeline {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

@media (max-width: 560px) {
    body {
        font-size: 1rem;
    }

    .topbar nav {
        display: none;
    }

    .toc {
        columns: 1;
    }

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

    .board .value {
        font-size: 2.25rem;
    }
}

/* ---------- sharing ---------- */

.share {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

.share .mono {
    margin-right: 0.5rem;
}

.share a,
.share button {
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    letter-spacing: 0.03em;
    text-decoration: none;
    color: var(--ink);
    background: transparent;
    border: 1px solid var(--ink);
    padding: 0 0.85rem;
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    cursor: pointer;
}

.share a:hover,
.share button:hover {
    background: var(--ink);
    color: var(--paper);
}

.share svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

.share [data-native] {
    display: none;
}

.prose h3 .share-answer {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--purple-soft);
    margin-left: 0.75rem;
    vertical-align: middle;
    text-decoration: none;
    opacity: 0;
    transition: opacity 0.15s;
}

.prose h3:hover .share-answer,
.prose h3 .share-answer:focus {
    opacity: 1;
}

.prose h3 .share-answer:hover {
    text-decoration: underline;
}

.pull {
    margin: 0;
    padding: 1.5rem 0 1.5rem 1.75rem;
    border-left: 2px solid var(--purple);
}

.pull p {
    font-family: var(--font-display);
    font-size: 1.75rem;
    line-height: 1.2;
    margin: 0 0 0.75rem;
    max-width: 30ch;
    text-wrap: balance;
}

.pull .share {
    margin-top: 0.5rem;
}

.comeback {
    background: var(--paper-deep);
    border: 1px solid var(--rule);
    padding: 1.25rem 1.5rem;
    margin: 0 0 1rem;
}

.comeback pre {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.55;
    white-space: pre-wrap;
    margin: 0 0 1rem;
    max-width: var(--measure);
}

.embed {
    margin-top: 2.5rem;
}

.embed img {
    display: block;
    margin: 0.75rem 0 1rem;
}

.embed code {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    background: var(--paper-deep);
    border: 1px solid var(--rule);
    padding: 0.85rem 1rem;
    overflow-x: auto;
    white-space: pre;
    margin-bottom: 0.75rem;
}

@media (max-width: 560px) {
    .share a span,
    .share button span {
        display: none;
    }

    .share a,
    .share button {
        padding: 0 0.7rem;
    }

    .share [data-native] {
        display: inline-flex;
    }

    .prose h3 .share-answer {
        opacity: 1;
        display: block;
        margin: 0.25rem 0 0;
    }
}
