:root {
    --wiki-primary: #183237;
    --wiki-accent: #eeb30a;
    --wiki-accent-dark: #c9950a;
    --wiki-green: #508503;
    --wiki-green-light: #98c03a;
    --wiki-ink: #1f2b2e;
    --wiki-muted: #5a6b6e;
    --wiki-line: #e7ecec;
    --wiki-bg: #f6f8f8;
    --wiki-sidebar-w: 288px;
    --wiki-content-max: 820px;
}

html, body {
    background: var(--wiki-bg);
    color: var(--wiki-ink);
    scroll-behavior: smooth;
}

body {
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* ============ Shell / layout ============ */
.wiki-shell {
    min-height: 100vh;
}

.wiki-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--wiki-sidebar-w);
    background: var(--wiki-primary);
    color: #dbe6e6;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    z-index: 40;
    padding-bottom: 2rem;
}

.wiki-main {
    margin-left: var(--wiki-sidebar-w);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.wiki-content {
    width: 100%;
    max-width: var(--wiki-content-max);
    margin: 0 auto;
    padding: 2.6rem 1.6rem 3rem;
    flex: 1 0 auto;
}

/* ============ Sidebar brand ============ */
.wiki-sidebar-head {
    padding: 1.4rem 1.25rem 1rem;
    border-bottom: 1px solid rgba(255,255,255,.08);
}

.wiki-brand {
    display: flex;
    align-items: center;
    gap: .7rem;
    color: #fff;
}

    .wiki-brand:hover {
        color: #fff;
    }

    .wiki-brand img {
        width: 40px;
        height: 40px;
    }

.wiki-brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

    .wiki-brand-text strong {
        color: #fff;
        font-size: 1rem;
    }

    .wiki-brand-text small {
        color: #9fb3b3;
        font-size: .72rem;
    }

.wiki-sidebar-lang {
    margin-top: 1rem;
}

/* ============ Sidebar menu ============ */
.wiki-menu {
    padding: 1rem 0.9rem 0;
    font-size: .92rem;
}

    .wiki-menu .menu-label {
        color: var(--wiki-accent);
        letter-spacing: .04em;
        font-weight: 700;
        margin-top: 1.4rem;
        margin-bottom: .4rem;
        display: flex;
        align-items: center;
        gap: .55rem;
        font-size: .74rem;
        text-transform: uppercase;
    }

        .wiki-menu .menu-label .fas {
            width: 1rem;
            text-align: center;
        }

    .wiki-menu .menu-list a,
    .wiki-menu .wiki-menu-soon {
        display: flex;
        align-items: center;
        gap: .6rem;
        padding: .42rem .6rem;
        border-radius: 7px;
        background: rgba(255,255,255,.07);
        color: #fff;
    }

    .wiki-menu .wiki-menu-soon {
        background: none;
    }

        .wiki-menu .menu-list a .fas,
        .wiki-menu .wiki-menu-soon .fas {
            width: 1.05rem;
            text-align: center;
            opacity: .85;
        }

    .wiki-menu .menu-list a:hover {
        background: none;
        color: #cdd9d9;
    }

    .wiki-menu .menu-list a.active {
        background: var(--wiki-accent);
        color: var(--wiki-primary);
        font-weight: 600;
    }

        .wiki-menu .menu-list a.active .fas {
            opacity: 1;
        }

.wiki-home-link {
    font-weight: 600;
}

.wiki-menu-soon {
    color: #7f9494;
    cursor: default;
}

.wiki-soon-tag {
    margin-left: auto;
    font-size: .6rem !important;
    height: auto;
    padding: .1rem .4rem;
    background: rgba(255,255,255,.12);
    color: #b9c9c9;
}

/* ============ Top bar (mobile only) ============ */
.wiki-topbar {
    display: none;
    position: sticky;
    top: 0;
    z-index: 30;
    align-items: center;
    gap: .75rem;
    padding: .6rem .9rem;
    background: var(--wiki-primary);
    color: #fff;
}

.wiki-burger {
    background: transparent;
    border: 0;
    color: #fff;
    font-size: 1.25rem;
    cursor: pointer;
    padding: .25rem .4rem;
}

.wiki-topbar-brand {
    display: flex;
    align-items: center;
    gap: .5rem;
    color: #fff;
    font-weight: 600;
    margin-right: auto;
}

    .wiki-topbar-brand img {
        width: 28px;
        height: 28px;
    }

.wiki-topbar .wiki-lang-label {
    display: none;
}

.wiki-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    z-index: 35;
}

/* ============ Footer ============ */
.wiki-footer {
    flex-shrink: 0;
    text-align: center;
    padding: 1.4rem;
    color: var(--wiki-muted);
    font-size: .82rem;
    border-top: 1px solid var(--wiki-line);
}

/* ============ Content typography ============ */
.wiki-content h1 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--wiki-primary);
    margin-bottom: .6rem;
    line-height: 1.15;
}

.wiki-content h2, .wiki-h2 {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--wiki-primary);
    margin: 2.2rem 0 .8rem;
    padding-bottom: .35rem;
    border-bottom: 2px solid var(--wiki-line);
}

.wiki-content h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--wiki-primary);
    margin: 1.5rem 0 .5rem;
}

.wiki-content p {
    line-height: 1.7;
    margin-bottom: 1rem;
    color: #33403f;
}

.wiki-content ul, .wiki-content ol {
    margin: 0 0 1rem 1.4rem;
    line-height: 1.7;
}

.wiki-content ul {
    list-style: disc;
}

.wiki-content ol {
    list-style: decimal;
}

.wiki-content li {
    margin-bottom: .35rem;
}

.wiki-content a {
    color: var(--wiki-green);
    font-weight: 600;
}

    .wiki-content a:hover {
        text-decoration: underline;
    }

.wiki-content code {
    background: #eef2f2;
    color: #0f4c3a;
    padding: .1rem .35rem;
    border-radius: 4px;
    font-size: .85em;
}

/* Callout notes (e.g. "in the native app…") */
.wiki-note {
    border-left: 4px solid var(--wiki-accent);
    background: #fff9e8;
    padding: .9rem 1rem;
    border-radius: 0 8px 8px 0;
    margin: 1.2rem 0;
}

    .wiki-note.is-native {
        border-left-color: var(--wiki-green);
        background: #f0f7e6;
    }

    .wiki-note .wiki-note-title {
        font-weight: 700;
        color: var(--wiki-primary);
        display: block;
        margin-bottom: .25rem;
    }

/* ============ Buttons ============ */
.wiki-btn.button {
    background: var(--wiki-accent);
    border-color: transparent;
    color: var(--wiki-primary);
    font-weight: 600;
}

    .wiki-btn.button:hover {
        background: var(--wiki-accent-dark);
        color: #fff;
    }

/* ============ Home hero + cards ============ */
.wiki-hero {
    background: linear-gradient(135deg, var(--wiki-primary), #24484f);
    color: #fff;
    border-radius: 16px;
    padding: 2.6rem 2rem;
    margin-bottom: 1rem;
}

    .wiki-hero h1 {
        color: #fff;
        font-size: 2.2rem;
    }

    .wiki-hero .wiki-hero-sub {
        color: #eef6f6;
        font-size: 1.05rem;
        max-width: 640px;
        opacity: 0.92;
    }

.wiki-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.1rem;
}

.wiki-card {
    background: #fff;
    border: 1px solid var(--wiki-line);
    border-radius: 12px;
    padding: 1.3rem;
    display: flex;
    flex-direction: column;
    transition: box-shadow .15s ease, transform .15s ease;
}

    .wiki-card:hover {
        box-shadow: 0 8px 24px rgba(24,50,55,.10);
        transform: translateY(-2px);
    }

.wiki-card-icon {
    width: 46px;
    height: 46px;
    border-radius: 10px;
    background: #fff4d6;
    color: var(--wiki-accent-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    margin-bottom: .8rem;
}

.wiki-card h3 {
    margin: 0 0 .35rem;
}

.wiki-card p {
    color: var(--wiki-muted);
    font-size: .9rem;
    line-height: 1.55;
    flex: 1 0 auto;
}

.wiki-card-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 1rem;
}

.wiki-card-count {
    font-size: .8rem;
    color: var(--wiki-muted);
}

/* ============ Screenshot slot ============ */
.wiki-shot {
    margin: 1.5rem 0;
}

.wiki-shot-img {
    width: 100%;
    border-radius: 10px;
    border: 1px solid var(--wiki-line);
    box-shadow: 0 6px 20px rgba(24,50,55,.10);
    display: block;
}

.wiki-shot-caption, .wiki-shot-ph-caption {
    text-align: center;
    color: var(--wiki-muted);
    font-size: .85rem;
    margin-top: .55rem;
    font-style: italic;
}

.wiki-shot-skeleton {
    width: 100%;
    height: 220px;
    border-radius: 10px;
    background: linear-gradient(90deg, #eef2f2 25%, #e2e8e8 37%, #eef2f2 63%);
    background-size: 400% 100%;
    animation: wiki-shimmer 1.3s ease infinite;
}

@keyframes wiki-shimmer {
    0% {
        background-position: 100% 0;
    }

    100% {
        background-position: 0 0;
    }
}

.wiki-shot-ph {
    border: 2px dashed var(--wiki-accent);
    background: repeating-linear-gradient(45deg, #fffdf5, #fffdf5 12px, #fff8e3 12px, #fff8e3 24px);
    border-radius: 12px;
    padding: 1.6rem 1.2rem;
    text-align: center;
    color: var(--wiki-primary);
}

.wiki-shot-ph-icon {
    display: inline-flex;
    width: 46px;
    height: 46px;
    align-items: center;
    justify-content: center;
    background: var(--wiki-accent);
    color: var(--wiki-primary);
    border-radius: 50%;
    font-size: 1.2rem;
    margin-bottom: .6rem;
}

.wiki-shot-ph-title {
    font-weight: 700;
    margin-bottom: .35rem;
}

.wiki-shot-ph-path {
    font-size: .9rem;
    margin-bottom: .35rem;
}

    .wiki-shot-ph-path code {
        background: #fff;
        border: 1px solid var(--wiki-accent);
    }

.wiki-shot-ph-hint {
    font-size: .78rem;
    color: var(--wiki-muted);
    margin-top: .4rem;
}

/* ============ Not found ============ */
.wiki-notfound {
    text-align: center;
    padding: 4rem 1rem;
}

.wiki-notfound-icon {
    font-size: 3rem;
    color: var(--wiki-accent);
    display: block;
    margin-bottom: 1rem;
}

/* ============ Language selector ============ */
.wiki-lang {
    position: relative;
    display: inline-block;
}

.wiki-lang-trigger {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.14);
    color: #e6efef;
    padding: .4rem .7rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: .85rem;
    width: 100%;
    justify-content: flex-start;
}

    .wiki-lang-trigger:hover {
        background: rgba(255,255,255,.14);
    }

    .wiki-lang-trigger img {
        border-radius: 2px;
    }

.wiki-lang-label {
    flex: 1 0 auto;
    text-align: left;
}

.wiki-lang-trigger .fa-angle-down {
    margin-left: auto;
}

.wiki-lang-menu {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid var(--wiki-line);
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,.18);
    z-index: 60;
    overflow: hidden;
    min-width: 170px;
}

.wiki-lang-item {
    display: flex;
    align-items: center;
    gap: .6rem;
    width: 100%;
    padding: .55rem .8rem;
    background: transparent;
    border: 0;
    cursor: pointer;
    color: var(--wiki-ink);
    font-size: .88rem;
    text-align: left;
}

    .wiki-lang-item:hover {
        background: #f3f6f6;
    }

    .wiki-lang-item.is-active {
        background: #fff4d6;
        font-weight: 600;
    }

.wiki-lang-backdrop {
    position: fixed;
    inset: 0;
    z-index: 55;
}

/* ============ FAQ accordion ============ */
.wiki-faq {
    margin: 1.5rem 0;
    display: flex;
    flex-direction: column;
    gap: .6rem;
}

.wiki-faq-item {
    padding: 0;
    border: 1px solid var(--wiki-line);
}

.wiki-faq-question {
    cursor: pointer;
    padding: .9rem 1.1rem;
    font-weight: 600;
    list-style: none;
}

    .wiki-faq-question::-webkit-details-marker {
        display: none;
    }

    .wiki-faq-question::before {
        content: "\f078";
        font-family: "Font Awesome 6 Free";
        font-weight: 900;
        float: right;
        transition: transform .15s ease;
    }

.wiki-faq-item[open] .wiki-faq-question::before {
    transform: rotate(180deg);
}

.wiki-faq-answer {
    padding: 0 1.1rem 1rem;
}

/* ============ Responsive ============ */
@media (max-width: 1023px) {
    .wiki-topbar {
        display: flex;
    }

    .wiki-sidebar {
        transform: translateX(-100%);
        transition: transform .22s ease;
        box-shadow: 2px 0 24px rgba(0,0,0,.25);
    }

    .wiki-shell.is-menu-open .wiki-sidebar {
        transform: translateX(0);
    }

    .wiki-main {
        margin-left: 0;
    }

    .wiki-content {
        padding: 1.6rem 1.1rem 2.4rem;
    }

    .wiki-hero {
        padding: 1.8rem 1.3rem;
    }

        .wiki-hero h1 {
            font-size: 1.7rem;
        }
    /* On mobile the top bar carries the language selector; hide the sidebar copy. */
    .wiki-sidebar-lang {
        display: none;
    }
}
