:root {
    --text: #d3d3d3;
    --muted: #939393;
    --light: #f5f5f5;
    --border: #ddd;
    --link: #477ef5;
    --link-hover: #9eb8ff;
    --background: #2b2b2b;
    --code-bg: #000000;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    background: var(--background);
    color: var(--text);
    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        Helvetica,
        Arial,
        sans-serif;
    font-size: 17px;
    line-height: 1.7;
}

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

a:hover {
    color: var(--link-hover);
    text-decoration: underline;
}

.container {
    width: min(900px, calc(100% - 40px));
    margin: 0 auto;
}

.top-nav {
    padding: 24px 0 10px;
}

.top-nav a {
    font-size: 15px;
    color: var(--muted);
}

.article-header {
    padding: 30px 0 20px;
    border-bottom: 1px solid var(--border);
}

h1 {
    margin: 0 0 12px;
    font-size: clamp(2rem, 5vw, 3rem);
    line-height: 1.15;
    letter-spacing: -0.025em;
}

.subtitle {
    margin: 0;
    color: var(--muted);
    font-size: 1.1rem;
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    margin-top: 22px;
    color: var(--muted);
    font-size: 14px;
}

.article {
    padding: 35px 0 60px;
}

.article h2 {
    margin: 45px 0 15px;
    font-size: 1.65rem;
    line-height: 1.3;
}

.article h3 {
    margin: 30px 0 10px;
    font-size: 1.25rem;
    line-height: 1.35;
}

.article p {
    margin: 0 0 20px;
}

.article ul {
    margin: 0 0 25px;
    padding-left: 28px;
}

.article li {
    margin-bottom: 7px;
}

.lead {
    font-size: 1.15rem;
    line-height: 1.75;
}

.callout {
    margin: 30px 0;
    padding: 22px 25px;
    background: var(--code-bg);
    border-left: 4px solid var(--border);
}

.callout p:last-child {
    margin-bottom: 0;
}

.architecture {
    margin: 30px 0;
    padding: 20px;
    background: var(--code-bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    overflow-x: auto;
    font-family:
        ui-monospace,
        SFMono-Regular,
        Menlo,
        Monaco,
        Consolas,
        monospace;
    font-size: 14px;
    line-height: 1.6;
    text-align: center;
}

.section-list {
    margin: 25px 0 35px;
    padding: 20px 25px;
    border: 1px solid var(--border);
    border-radius: 6px;
}

.section-list strong {
    display: block;
    margin-bottom: 8px;
}

.back-link {
    display: inline-block;
    margin-top: 15px;
}

footer {
    padding: 25px 0 40px;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: 14px;
}

.print-button {
    display: inline-block;
    margin-top: 18px;
    padding: 7px 13px;
    background: white;
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 5px;
    cursor: pointer;
    font: inherit;
}

.print-button:hover {
    background: var(--light);
}

@media (max-width: 600px) {
    body {
        font-size: 16px;
    }

    .container {
        width: min(100% - 28px, 900px);
    }

    .article-header {
        padding-top: 20px;
    }

    .article {
        padding-top: 25px;
    }

    .article h2 {
        margin-top: 38px;
        font-size: 1.45rem;
    }
}

@media print {
    body {
        font-size: 12pt;
        color: #000;
    }

    .top-nav,
    .print-button {
        display: none;
    }

    .container {
        width: 100%;
    }

    .article-header {
        border-bottom: 1px solid #999;
    }

    a {
        color: #000;
        text-decoration: none;
    }

    footer {
        margin-top: 30px;
    }
}