:root {
    --fg: #000;
    --bg: #fff;
    --muted: #f4f4f4;
    --border: #ddd;
}

* { box-sizing: border-box; }

body {
    background: var(--bg);
    color: var(--fg);
    font-family: ui-monospace, "Cascadia Code", "Source Code Pro",
                 "DejaVu Sans Mono", "Liberation Mono", Menlo, Consolas, monospace;
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
    padding: 2rem;
    display: flex;
    justify-content: center;
}

.container { max-width: 80ch; width: 100%; }

h1, h2, h3, h4, h5, h6, p, ul, ol, li, section,
article, header, footer, div, nav, time {
    margin: 0;
    padding: 0;
}

section { margin-bottom: 1.5em; }
h2, h3 { margin-top: 1.5em; }
h1, h2, h3 {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.man-header,
.man-footer {
    display: flex;
    justify-content: space-between;
    gap: 1em;
    font-weight: bold;
    text-transform: uppercase;
}
.man-header { margin-bottom: 2em; }
.man-footer { margin-top: 3em; margin-bottom: 0; }
.man-header span:nth-child(2),
.man-footer span:nth-child(2) { text-align: center; }

.section-content { margin-left: 4ch; }

a {
    color: var(--fg);
    text-decoration: underline;
    text-underline-offset: 2px;
}
a:hover {
    background: var(--fg);
    color: var(--bg);
    text-decoration: none;
}

nav a {
    text-decoration: none;
    font-weight: bold;
    margin-right: 1.25em;
}
nav a:hover { background: var(--fg); color: var(--bg); }

.man-title { font-size: 14px; text-transform: uppercase; }

.article-text p + p,
.article-text ul,
.article-text ol,
.article-text pre,
.article-text blockquote,
.article-text table { margin-top: 1em; }

.article-text ul,
.article-text ol { margin-left: 2ch; }
.article-text li + li { margin-top: 0.35em; }

time { display: block; color: #666; margin-top: 0.5em; }

code { font-family: inherit; font-style: italic; }

pre {
    background: var(--muted);
    border-left: 3px solid #ccc;
    padding: 1em;
    overflow-x: auto;
    margin-left: 4ch;
}
pre code { font-style: normal; }

blockquote {
    border-left: 3px solid var(--border);
    padding-left: 1em;
    color: #333;
}

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

table {
    border-collapse: collapse;
    width: 100%;
}
th, td {
    text-align: left;
    padding: 0.25em 1em 0.25em 0;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
}

.pagination { margin-top: 2em; }
.pagination a { margin-right: 1.5em; font-weight: bold; }

.article-text article + article { margin-top: 2em; }

@media (max-width: 640px) {
    body { padding: 1rem; }
    .section-content { margin-left: 2ch; }
    .man-header span:nth-child(2) { display: none; }
    pre { margin-left: 0; }
}

@media print {
    body { padding: 0; }
    a { text-decoration: none; }
}
