:root{
    --bg:#111;
    --text:#e8e8e8;
    --card:#1b1b1b;
    --card-border:#2a2a2a;
    --link:#8ab4ff;
    --link-hover:#c3d6ff;
    --panel:#151518;
    --accent:#8ab4ff;
    --muted:#a8a8a8; 
    --border:#25252a; 
    --hover:#1d1d22;
    --text-light: black;
    --panel-bg: #f9f9f9;
    --panel-border: #ccc;
}

html, body { 
    height: 100%; 
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;
}

footer {
    color: var(--muted);
    text-align: center;
    margin: 0;
    font-size: 12px;
}

.app {
    display: grid;
    grid-template-columns: 280px 1fr;
    grid-template-rows: 56px 1fr;
    grid-template-areas:
        "topbar topbar"
        "sidebar main";
    height: 100vh;
}

.topbar {
    grid-area: topbar;
    display: flex; 
    align-items: center; 
    gap: .75rem;
    padding: 0 .75rem;
    background: var(--panel); 
    border-bottom: 1px solid var(--border);
}

.brand {
    display: flex; 
    align-items: center; 
    gap: .6rem; 
    line-height: 1;
    font-weight: 700; letter-spacing: .2px;
}

.brand img { 
    height: 28px; 
    width: 28px; 
    object-fit: contain; 
}

.spacer { 
    flex: 1; 
}

.toggle {
    display: none;
    background: transparent; 
    border: 1px solid var(--border);
    color: var(--text); 
    padding: .35rem .6rem; 
    border-radius: .5rem; 
    cursor: pointer;
}

.sidebar {
    grid-area: sidebar;
    background: var(--panel); 
    border-right: 1px solid var(--border);
    padding: .75rem; overflow: auto;
}

nav { 
    display: grid; 
    gap: .25rem; 
}

.group-title {
    text-transform: uppercase; 
    font-size: .75rem; 
    color: var(--muted);
    margin: .5rem .25rem;
}

a.navlink {
    display: flex; 
    align-items: center; 
    gap: .6rem;
    padding: .55rem .6rem; 
    border-radius: .5rem; 
    color: var(--text);
    text-decoration: none; 
    border: 1px solid transparent;
}

a.navlink:hover { 
    background: var(--hover); 
    border-color: var(--border); 
    text-decoration: none;
}

a.navlink.active {
    background: rgba(138,180,255,.12);
    border-color: rgba(138,180,255,.35);
    color: var(--accent);
    text-decoration: none;
}

.main {
    grid-area: main; 
    height: 100%; 
    overflow: hidden;
}

iframe#page {
    width: 100%; 
    height: 100%; 
    border: 0; 
    background: #111;
}

/* Mobile */
@media (max-width: 880px) {
    .app {
        grid-template-columns: 1fr;
        grid-template-rows: 56px auto 1fr;
        grid-template-areas:
        "topbar"
        "sidebar"
        "main";
    }

    .toggle { 
        display: inline-block; 
    }

    .sidebar { 
        display: none; 
    }

    .sidebar.open { 
        display: block; 
    }
}

.rw-center { 
    text-align: center; 
}

.welcome-headline {
    font-family: "Times New Roman", serif;
    font-size: 2rem;
    margin-top: 1rem;
}

.welcome-sub {
    font-family: "Times New Roman", serif;
    font-size: 1rem;
    line-height: 1.5;
}

#data {
    display: none;
    color: var(--text-light);
    margin: 20px auto 0;
    padding: 10px;
    border: 1px solid var(--panel-border);
    background: var(--panel-bg);
    border-radius: .25rem;
    width: max-content;
    max-width: 92vw;
    text-align: left;
    box-shadow: 0 2px 5px rgba(0,0,0,.3);
}

.caption-background {
    background: rgba(0,0,0,.55);
    padding: .25rem .5rem;
    border-radius: .25rem;
    display: inline-block;
}

.rw-hr {
    width: 400px;
    border: 0;
    border-top: 1px solid rgba(255,255,255,.3);
    margin: 2rem auto;
}

.credit {
    color: #ffffff;
    font-size: 10px;
    font-style: italic;
}

.slideshowcontainer img { 
    object-fit: cover; 
}

.rw-button {
    background: #fff;
    color: #000;
    border: 0;
    padding: .5rem .75rem;
    border-radius: .25rem;
    cursor: pointer;
}

.rw-button:focus { 
    outline: 2px solid #88aaff; 
    outline-offset: 2px; 
}

.container {
    width: min(900px, 92vw);
    margin: 0 auto;
    padding: 2.5rem 1rem 3rem;
}

h1 {
    margin: 0 0 1rem;
    text-align: center;
    font-size: 2rem;
    letter-spacing: .2px;
}

h2, h3 {
    margin: 1.5rem 0 .5rem;
    font-size: 1.15rem;
}

.card {
    background: var(--card);
    border: 1px solid var(--card-border);
    border-radius: .5rem;
    border-radius: .5rem;
    padding: 1rem;
}

a { 
    color: var(--link);
}

a:hover, a:focus { 
    color: var(--link-hover); 
    text-decoration: underline; 
}

ul { 
    margin: .25rem 0 .75rem 1.25rem; 
}

.spacer { 
    height: 2rem; 
}

ul.link-list {
    list-style: none;
    padding: 0;
    margin: .25rem 0 0;
    text-align: center;
}

ul.link-list li {
    margin: .35rem 0;
}

.wiki-note {
    opacity: .8;
    font-size: .95rem;
    margin-top: .75rem;
}