/*
 * Deliberately minimal placeholder theme (a designed pass comes later).
 * Constraints it must keep satisfying:
 *   - zero JavaScript, zero inline styles (strict CSP: style-src 'self');
 *   - dark/light via prefers-color-scheme only;
 *   - readable measure (~65ch) and accessible contrast in both schemes.
 * Code-token colors live in chroma.css (generated; see ./x chroma-css).
 */

:root {
    color-scheme: light dark;
    --bg: #ffffff;
    --fg: #1c1c1c;
    --muted: #595959;
    --accent: #0b57d0;
    --rule: #d9d9d9;
    /* match chroma.css: style "github" background */
    --code-bg: #f7f7f7;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #121212;
        --fg: #e6e6e6;
        --muted: #a8a8a8;
        --accent: #8ab4f8;
        --rule: #383838;
        /* match chroma.css: style "github-dark" background */
        --code-bg: #0d1117;
    }
}

* {
    box-sizing: border-box;
}

body {
    margin: 0 auto;
    max-width: 65ch;
    padding: 1rem 1rem 3rem;
    background: var(--bg);
    color: var(--fg);
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    line-height: 1.6;
}

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

h1,
h2,
h3,
h4 {
    line-height: 1.25;
}

h1 {
    font-size: 1.7rem;
}

h2 {
    font-size: 1.3rem;
}

.site-header {
    border-bottom: 1px solid var(--rule);
    padding: 0.75rem 0;
    margin-bottom: 1.5rem;
}

.site-title {
    color: var(--fg);
    font-weight: 700;
    text-decoration: none;
}

.meta {
    color: var(--muted);
    font-size: 0.875rem;
}

.meta a {
    color: var(--muted);
}

article.summary {
    border-bottom: 1px solid var(--rule);
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}

.pagination {
    display: flex;
    justify-content: space-between;
    margin: 2rem 0;
}

.site-footer {
    border-top: 1px solid var(--rule);
    padding-top: 0.75rem;
    color: var(--muted);
    font-size: 0.875rem;
}

img {
    max-width: 100%;
    height: auto;
}

blockquote {
    margin: 0;
    padding-left: 1rem;
    border-left: 3px solid var(--rule);
    color: var(--muted);
}

code,
pre {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.875em;
}

/* inline code; fenced blocks get .chroma / chroma.css treatment */
code {
    background: var(--code-bg);
    padding: 0.1em 0.3em;
    border-radius: 3px;
}

pre {
    background: var(--code-bg);
    padding: 0.75rem 1rem;
    border-radius: 6px;
    overflow-x: auto;
}

pre code {
    padding: 0;
    background: none;
}

table {
    border-collapse: collapse;
}

th,
td {
    border: 1px solid var(--rule);
    padding: 0.3rem 0.6rem;
}
