body {
    /* Readable serif stack for English prose */
    font-family: Georgia, "Times New Roman", Times, serif;
    margin: 0;
    font-size: 17px;
    line-height: 1.7;
    background: #fafafa;
    color: #333;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

/* Clean sans-serif for headings and nav/UI */
h1, h2, h3, h4, h5, h6,
.site-title, .site-nav {
    font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;
}

.container {
    max-width: 1100px;
    padding: 0 1rem;
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    background: #fafafa;
    z-index: 10;
    border-bottom: 1px solid #eee;
}

.header-inner {
    display: flex;
    align-items: center;
    height: 56px;
}

.site-title { font-weight: 700; }

.site-nav { margin-left: auto; display: flex; gap: 1rem; }

.site-nav a { color: #333; }

.site-nav a:hover { color: #0070f3; }

.site-nav a[aria-current="page"] {
    color: #0070f3;
    font-weight: 600;
}

a {
    text-decoration: none;
    color: #0070f3;
}

/* Layout for single page with left TOC */
.list main.container,
.single main.container {
    padding-top: 1.5rem;
}

body.single .page {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 2rem;
    align-items: start;
}

body.single .toc {
    position: sticky;
    top: 1rem;
    max-height: calc(100vh - 2rem);
    overflow: auto;
    padding-right: 0.5rem;
    font-size: 0.9rem;
    color: #555;
}

body.single .toc nav,
body.single .toc ul {
    list-style: none;
    padding-left: 0;
}

body.single .toc a {
    color: inherit;
}

body.single main article {
    /* Keep line length comfortable for reading */
    max-width: 65ch;
    margin: 0 auto;
}

/* Hide TOC on small screens */
@media (max-width: 900px) {
    body.single .page { display: block; }
    body.single .toc {
        display: none;
    }
}