:root {
    --bg: #f6f3ec;
    --paper: #fffdf8;
    --border: #d8cdbb;
    --text: #202122;
    --muted: #6b6257;
    --link: #0645ad;
    --accent: #9a3c9c;
    --sidebar: #eee6d8;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

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

a:hover {
    text-decoration: underline;
}

.site-header {
    background: #fff;
    border-bottom: 1px solid var(--border);
    padding: 14px 24px;
    display: flex;
    align-items: center;
    gap: 18px;
}

.logo {
    font-size: 32px;
    font-weight: bold;
    color: var(--accent);
    white-space: nowrap;
    font-family: Georgia, "Times New Roman", serif;
}

.tagline {
    color: var(--muted);
    font-size: 14px;
}

.menu-toggle {
    display: none;
}

.search {
    margin-left: auto;
}

.search input {
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: 4px;
    min-width: 240px;
}

.layout {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    max-width: 1280px;
    margin: 0 auto;
}

.sidebar {
    background: var(--sidebar);
    border-right: 1px solid var(--border);
    padding: 22px 18px;
}

.sidebar h3 {
    font-size: 15px;
    margin: 20px 0 8px;
    border-bottom: 1px solid var(--border);
}

.sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar li {
    margin: 6px 0;
}

.content {
    background: var(--paper);
    padding: 28px 36px 60px;
    min-height: 100vh;
}

.article-title {
    color: var(--accent);
    font-size: 38px;
    font-weight: normal;
    border-bottom: 1px solid var(--border);
}

.subtitle {
    color: var(--muted);
    font-size: 14px;
    margin: 6px 0 22px;
}

.article-actions {
    display: flex;
    gap: 14px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 24px;
    padding-bottom: 8px;
    font-size: 14px;
}

.intro {
    font-size: 18px;
}

.infobox {
    float: right;
    width: 280px;
    margin: 0 0 20px 28px;
    background: #f8f4ea;
    border: 1px solid var(--border);
    font-size: 14px;
}

.infobox h2 {
    margin: 0;
    padding: 10px;
    background: var(--accent);
    color: white;
    font-size: 19px;
    text-align: center;
}

.image-placeholder {
    height: 170px;
    background: linear-gradient(135deg, #c9b27c, var(--accent));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-style: italic;
}

.infobox-image {
    margin-bottom: 10px;
}

.infobox-image img {
    width: 100%;
    max-width: 100%;
    height: auto;
    display: block;
}

.image-caption {
    font-size: 0.85em;
    color: #54595d;
    padding: 4px 7px;
}

.infobox table {
    width: 100%;
    border-collapse: collapse;
}

.infobox th,
.infobox td {
    padding: 7px 9px;
    border-top: 1px solid var(--border);
    vertical-align: top;
}

.infobox th {
    text-align: left;
    width: 38%;
    color: #3b332c;
}

.toc {
    border: 1px solid var(--border);
    background: #faf7ef;
    display: inline-block;
    padding: 12px 18px;
    margin: 18px 0 26px;
}

.toc strong {
    display: block;
    margin-bottom: 6px;
}

.toc ol {
    margin: 0;
    padding-left: 22px;
}

h2 {
    font-weight: normal;
    border-bottom: 1px solid var(--border);
    margin-top: 34px;
}

.footer {
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: 13px;
    margin-top: 40px;
    padding-top: 16px;
}

@media (max-width: 800px) {

    .site-header {
        flex-wrap: wrap;
        align-items: flex-start;
        position: relative;
        padding: 14px 18px;
        gap: 6px;
    }

    .logo {
        font-size: 28px;
        line-height: 1;
        width: calc(100% - 100px);
    }

    .tagline {
        display: block;
        width: 100%;
        font-size: 13px;
        color: var(--muted);
        margin-top: 2px;
        margin-bottom: 8px;
    }

    .menu-toggle {
        display: block;
        position: absolute;
        right: 15px;
        top: 18px;
        background: var(--accent);
        color: #fff;
        border: 0;
        border-radius: 4px;
        padding: 8px 12px;
        font-family: inherit;
        font-size: 15px;
        cursor: pointer;
    }

    .search {
        width: 100%;
        margin-left: 0;
    }

    .search input {
        width: 100%;
        min-width: 0;
    }

    .layout {
        display: block;
    }

    .sidebar {
        display: none;
        border-right: 0;
        border-bottom: 1px solid var(--border);
    }

    body.menu-open .sidebar {
        display: block;
    }

    .content {
        padding: 20px;
    }

    .article-title {
        font-size: 30px;
    }

    .article-actions {
        overflow-x: auto;
        white-space: nowrap;
    }

    .infobox {
        float: none;
        width: 100%;
        margin: 0 0 20px;
    }
}