html {
    height: 100%;
    overflow-y: scroll;
}

body {
    height: auto;
    min-height: 100%;
}

.wiki-page {
    justify-content: flex-start;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.wiki-shell {
    width: 100%;
    max-width: 1080px;
    margin: 0 auto;
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
}

.wiki-menu-toggle {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.wiki-sidebar {
    flex: 0 0 230px;
    position: sticky;
    top: 1.5rem;
    background: rgba(36, 36, 36, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 1.25rem 1rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
    max-height: calc(100vh - 3rem);
    overflow-y: auto;
}

.wiki-side-head {
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.wiki-side-logo {
    font-size: 1.4rem;
    margin: 0;
    display: inline-block;
}

.wiki-side-sub {
    color: #999;
    font-size: 0.78rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-top: 0.2rem;
}

.wiki-side-nav { display: flex; flex-direction: column; }

.wiki-side-cat {
    color: #777;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin: 0.9rem 0 0.3rem 0;
}

.wiki-side-nav a {
    display: block;
    padding: 0.45rem 0.6rem;
    border-radius: 6px;
    color: #ccc;
    text-decoration: none;
    font-size: 0.85rem;
    border-left: 2px solid transparent;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.wiki-side-nav a:hover { background: rgba(255, 255, 255, 0.05); color: #fff; }

.wiki-side-nav a.active {
    color: #f0b15f;
    background: rgba(240, 177, 95, 0.1);
    border-left-color: #f0b15f;
    font-weight: bold;
}

.wiki-wrapper {
    max-width: none;
    flex: 1;
    min-width: 0;
}

.wiki-topbar { display: none; }
.wiki-hamburger { display: none; }
.wiki-backdrop { display: none; }

.wiki-title {
    color: #f0b15f;
    margin: 0 0 0.25rem 0;
    font-size: 1.4rem;
}

.wiki-subtitle {
    color: #999;
    font-size: 0.85rem;
    margin: 0 0 1.25rem 0;
}

.wiki-content h2 {
    color: #f0b15f;
    font-size: 1.05rem;
    font-weight: bold;
    margin: 1.6rem 0 0.5rem 0;
}

.wiki-content h3 {
    color: #e0e0e0;
    font-size: 0.92rem;
    font-weight: bold;
    margin: 1.1rem 0 0.35rem 0;
}

.wiki-content p {
    color: #aaa;
    font-size: 0.85rem;
    line-height: 1.65;
    margin: 0 0 0.65rem 0;
}

.wiki-content ul,
.wiki-content ol {
    color: #aaa;
    font-size: 0.85rem;
    line-height: 1.65;
    padding-left: 1.25rem;
    margin: 0.25rem 0 0.7rem 0;
}

.wiki-content li { margin-bottom: 0.3rem; }
.wiki-content b,
.wiki-content strong { color: #ccc; }
.wiki-content a { color: #A9D2D5; text-decoration: underline; }
.wiki-content a:hover { color: #fff; }

.wiki-cat-title {
    color: #f0b15f;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin: 1.5rem 0 0.4rem 0;
}

.wiki-index-item {
    display: block;
    padding: 0.8rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    text-decoration: none;
}

.wiki-index-item:last-child { border-bottom: none; }

.wiki-index-item .t {
    color: #f0b15f;
    font-weight: bold;
    font-size: 0.92rem;
    display: block;
    margin-bottom: 0.2rem;
}

.wiki-index-item .d {
    color: #999;
    font-size: 0.82rem;
    line-height: 1.5;
}

.wiki-index-item:hover .t { color: #fff; }

.wiki-cta {
    text-align: center;
    margin: 1.75rem 0 0.5rem 0;
}

.wiki-cta a {
    display: inline-block;
    background: linear-gradient(135deg, #f0b15f, #d4943f);
    color: #1a1a1a;
    padding: 0.7rem 1.75rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.9rem;
}

.wiki-footer {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    text-align: center;
    color: #777;
    font-size: 0.75rem;
    line-height: 1.6;
}

.wiki-footer a { color: #999; text-decoration: none; }
.wiki-footer a:hover { color: #fff; text-decoration: underline; }

@media (max-width: 900px) {
    .wiki-shell {
        display: block;
        max-width: 700px;
    }

    .wiki-topbar {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        margin: -0.25rem 0 1rem 0;
        padding-bottom: 0.75rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }

    .wiki-topbar-logo {
        color: #f0b15f;
        font-weight: 900;
        text-transform: uppercase;
        letter-spacing: 0.06em;
        text-decoration: none;
        font-size: 1.1rem;
    }

    .wiki-hamburger {
        display: inline-flex;
        flex-direction: column;
        justify-content: center;
        gap: 4px;
        width: 40px;
        height: 36px;
        padding: 8px 8px;
        cursor: pointer;
        background: rgba(255, 255, 255, 0.05);
        border: 1px solid rgba(255, 255, 255, 0.12);
        border-radius: 6px;
    }

    .wiki-hamburger span {
        display: block;
        height: 2px;
        background: #f0b15f;
        border-radius: 2px;
    }

    .wiki-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: 270px;
        max-width: 82vw;
        max-height: none;
        border-radius: 0;
        transform: translateX(-100%);
        transition: transform 0.25s ease;
        z-index: 1001;
        background: #1c1c1c;
    }

    .wiki-menu-toggle:checked ~ .wiki-shell .wiki-sidebar {
        transform: translateX(0);
    }

    .wiki-backdrop {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.6);
        z-index: 1000;
    }

    .wiki-menu-toggle:checked ~ .wiki-backdrop {
        display: block;
    }
}
