:root {
    --bg: #fbfaf7;
    --text: #23262b;
    --muted: #6b6f76;
    --accent: #c4505f;
    --rule: #e6e2da;
    color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #16181b;
        --text: #e6e4df;
        --muted: #9a9ea6;
        --accent: #ee8a96;
        --rule: #2b2e33;
    }
}

* { box-sizing: border-box; }

html { font-size: 18px; }

body {
    margin: 0 auto;
    max-width: 42rem;
    padding: 0 1.25rem;
    background: var(--bg);
    color: var(--text);
    font-family: Charter, "Iowan Old Style", Georgia, "Times New Roman", serif;
    line-height: 1.65;
}

a { color: var(--accent); text-underline-offset: 0.15em; }

header.site {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.5rem;
    align-items: baseline;
    justify-content: space-between;
    padding: 2rem 0 1rem;
    border-bottom: 1px solid var(--rule);
    font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
}

header.site .brand {
    color: var(--text);
    font-weight: 700;
    text-decoration: none;
    letter-spacing: 0.01em;
}

header.site nav a {
    margin-left: 1.25rem;
    color: var(--muted);
    text-decoration: none;
}

header.site nav a:first-child { margin-left: 0; }
header.site nav a:hover { color: var(--accent); }

main { padding: 1.5rem 0 3rem; }

h1 { font-size: 2rem; line-height: 1.2; margin: 1rem 0 0.75rem; }
h2 { font-size: 1.25rem; margin: 2rem 0 0.5rem; }

.intro p, .lede { color: var(--muted); font-size: 1.1rem; }

ol.notes { list-style: none; padding: 0; margin: 2rem 0 0; }
ol.notes li { padding: 1.25rem 0; border-top: 1px solid var(--rule); }
ol.notes li > a { font-size: 1.2rem; font-weight: 600; text-decoration: none; }
ol.notes li > a:hover { text-decoration: underline; }
ol.notes p { margin: 0.35rem 0 0; color: var(--muted); }

time {
    display: block;
    color: var(--muted);
    font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
    font-size: 0.8rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

article ul { padding-left: 1.2rem; }
article li { margin: 0.25rem 0; }

code {
    font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    font-size: 0.85em;
    background: var(--rule);
    padding: 0.1em 0.35em;
    border-radius: 4px;
}

.back { margin-top: 2.5rem; font-family: system-ui, -apple-system, "Segoe UI", sans-serif; font-size: 0.9rem; }

footer.site {
    padding: 1.5rem 0 2.5rem;
    border-top: 1px solid var(--rule);
    color: var(--muted);
    font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
    font-size: 0.85rem;
}

@media (max-width: 480px) {
    html { font-size: 17px; }
    h1 { font-size: 1.7rem; }
    header.site { padding-top: 1.25rem; }
}
