/* TermWire documentation.
 * Visual homage to pid eins / 0pointer.de: monospace everywhere,
 * white page, one red accent, a sticky left column with the logo and
 * links, and no decoration a 2010 hacker blog would not have had. */

:root {
    --fg: #333333;
    --fg-soft: #777777;
    --accent: #a81817;
    --code-bg: #f4f4f4;
    --rule: #dddddd;
}

* {
    box-sizing: border-box;
}

html {
    font-size: 15px;
}

body {
    margin: 0;
    font-family: ui-monospace, "SF Mono", Menlo, Consolas, "DejaVu Sans Mono",
        monospace;
    line-height: 1.65;
    color: var(--fg);
    background: #ffffff;
}

.page {
    display: flex;
    align-items: flex-start;
    gap: 3rem;
    max-width: 66rem;
    margin: 0 auto;
    padding: 2.5rem 1.25rem 4rem;
}

/* -- Sidebar (sticky left column) ----------------------------------- */

.sidebar {
    position: sticky;
    top: 2rem;
    width: 11.5rem;
    flex-shrink: 0;
}

.logo {
    display: block;
    width: 100%;
    max-width: 9.5rem;
    border-radius: 8px;
}

.site-title {
    margin: 0.9rem 0 0;
    font-size: 1.45rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.site-title a {
    color: var(--accent);
    text-decoration: none;
}

.site-tagline {
    margin: 0.2rem 0 0;
    color: var(--fg-soft);
    font-size: 0.85rem;
    line-height: 1.45;
}

.sidebar nav {
    margin-top: 0.4rem;
}

.nav-head {
    margin: 1.5rem 0 0.25rem;
    color: var(--fg-soft);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.09em;
}

.sidebar nav a {
    display: block;
    margin: 0.15rem 0;
    color: var(--accent);
    text-decoration: none;
}

.sidebar nav a:hover {
    text-decoration: underline;
}

/* -- Content -------------------------------------------------------- */

.content {
    min-width: 0;
    max-width: 47rem;
}

a {
    color: var(--accent);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

h1 {
    font-size: 1.55rem;
    line-height: 1.3;
    margin: 0 0 0.2rem;
}

.post-date {
    color: var(--fg-soft);
    margin: 0 0 2.2rem;
}

h2 {
    font-size: 1.15rem;
    margin: 2.6rem 0 0.8rem;
}

h3 {
    font-size: 1rem;
    margin: 1.8rem 0 0.6rem;
}

p {
    margin: 0 0 1.1rem;
}

ul,
ol {
    margin: 0 0 1.1rem;
    padding-left: 1.6rem;
}

li {
    margin-bottom: 0.35rem;
}

blockquote {
    margin: 0 0 1.1rem;
    padding: 0.1rem 0 0.1rem 1.1rem;
    border-left: 3px solid var(--rule);
    color: var(--fg-soft);
}

pre {
    margin: 0 0 1.1rem;
    padding: 0.8rem 1rem;
    background: var(--code-bg);
    overflow-x: auto;
    line-height: 1.45;
}

code {
    background: var(--code-bg);
    padding: 0.08rem 0.3rem;
}

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

table {
    border-collapse: collapse;
    margin: 0 0 1.1rem;
    width: 100%;
}

th,
td {
    text-align: left;
    padding: 0.35rem 0.9rem 0.35rem 0;
    border-bottom: 1px solid var(--rule);
    vertical-align: top;
}

th {
    font-weight: 700;
}

hr {
    border: 0;
    border-top: 1px solid var(--rule);
    margin: 2.5rem 0;
}

dt {
    font-weight: 700;
    margin-top: 1.3rem;
}

dd {
    margin: 0.3rem 0 0 0;
}

/* -- Footer --------------------------------------------------------- */

.site-footer {
    margin-top: 4rem;
    padding-top: 1.2rem;
    border-top: 1px solid var(--rule);
    color: var(--fg-soft);
    font-size: 0.87rem;
}

.site-footer p {
    margin: 0 0 0.4rem;
}

/* -- Narrow screens: sidebar becomes a plain header ------------------ */

@media (max-width: 54rem) {
    .page {
        display: block;
    }

    .sidebar {
        position: static;
        width: auto;
        margin-bottom: 2.5rem;
    }

    .logo {
        max-width: 5.5rem;
    }

    .sidebar nav a {
        display: inline-block;
        margin: 0 1.1rem 0 0;
    }

    .nav-head {
        display: none;
    }
}
