/* Artypedia – Vector 2022 Style
   Mimics the Wikipedia Vector 2022 skin layout and typography.
   CC-BY-SA licensed content styles derived from MediaWiki. */

/* ============ Reset & Base ============ */
*, *::before, *::after { box-sizing: border-box; }

html {
    font-size: 100%;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    color: #202122;
    background: #f8f9fa;
}

a { color: #3366cc; text-decoration: none; }
a:hover { text-decoration: underline; }
a:visited { color: #795cb2; }

/* ============ Overall Layout ============ */
.mw-page-container {
    max-width: 99.75rem;
    margin: 0 auto;
    display: flex;
    min-height: 100vh;
}

/* ============ Sidebar ============ */
.mw-sidebar {
    width: 12.25rem;
    flex-shrink: 0;
    padding: 1.5rem 0.75rem 2rem 1.5rem;
    font-size: 1rem;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
}

.mw-logo {
    display: block;
    margin-bottom: 1.5rem;
    text-decoration: none;
    color: inherit;
    text-align: center;
}

.mw-logo img {
    display: block;
    margin: 0 auto 0.25rem;
    max-width: 120px;
    height: auto;
}

.mw-logo-wordmark {
    display: block;
    font-family: 'Linux Libertine', Georgia, Times, serif;
    font-size: 1rem;
    font-variant: small-caps;
    letter-spacing: 2px;
    color: #000;
    text-align: center;
}

.mw-logo-tagline {
    display: block;
    font-size: 0.6875rem;
    color: #54595d;
    text-align: center;
    margin-top: 0.125rem;
}

.mw-sidebar-heading {
    font-size: 1rem;
    color: #54595d;
    font-weight: normal;
    margin: 1.25rem 0 0.25rem;
    padding: 0;
    border: none;
}

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

.mw-sidebar li {
    margin: 0;
    padding: 0;
}

.mw-sidebar li a {
    display: block;
    padding: 0.35rem 0;
    color: #3366cc;
    font-size: 1rem;
    line-height: 1.375;
}

.mw-sidebar li a:hover {
    background: rgba(0,0,0,0.03);
}

/* ============ Content Area ============ */
.mw-content-container {
    flex: 1;
    min-width: 0;
    max-width: 60rem;
    padding: 1.5rem 1.5rem 3rem;
    background: #fff;
    border-left: 1px solid #eaecf0;
}

/* ============ Article Header ============ */
.mw-first-heading {
    font-family: 'Linux Libertine', Georgia, Times, serif;
    font-size: 1.8rem;
    font-weight: normal;
    line-height: 1.2;
    margin: 0 0 0.25rem;
    padding: 0;
    border-bottom: 1px solid #eaecf0;
    padding-bottom: 0.15rem;
    color: #000;
}

/* ============ Article Content (mw-parser-output) ============ */
.mw-parser-output {
    font-size: 1rem;
    line-height: 1.6;
}

.mw-parser-output p {
    margin: 0.5em 0;
}

.mw-parser-output h2 {
    font-family: 'Linux Libertine', Georgia, Times, serif;
    font-size: 1.5rem;
    font-weight: normal;
    border-bottom: 1px solid #eaecf0;
    margin: 1em 0 0.25em;
    padding-bottom: 0.15rem;
    color: #000;
}

.mw-parser-output h3 {
    font-size: 1.2rem;
    font-weight: bold;
    margin: 1em 0 0.25em;
    color: #000;
}

.mw-parser-output h4 {
    font-size: 1rem;
    font-weight: bold;
    margin: 1em 0 0.25em;
}

.mw-parser-output ul, .mw-parser-output ol {
    margin: 0.3em 0 0.3em 1.6em;
    padding: 0;
}

.mw-parser-output li {
    margin-bottom: 0.1em;
}

.mw-parser-output b {
    font-weight: bold;
}

/* ============ Infobox ============ */
.mw-parser-output .infobox {
    border: 1px solid #a2a9b1;
    border-spacing: 3px;
    background: #f8f9fa;
    color: #202122;
    margin: 0.5em 0 0.5em 1em;
    padding: 0.2em;
    float: right;
    clear: right;
    font-size: 88%;
    line-height: 1.5em;
    width: 22em;
}

.mw-parser-output .infobox th,
.mw-parser-output .infobox td {
    vertical-align: top;
    padding: 0.2em 0.4em;
}

.mw-parser-output .infobox-above,
.mw-parser-output th.infobox-above {
    font-size: 125%;
    font-weight: bold;
    text-align: center;
    padding: 0.25em;
}

.mw-parser-output .infobox-image {
    text-align: center;
}

.mw-parser-output .infobox-image img {
    max-width: 100%;
    height: auto;
}

.mw-parser-output .infobox-caption {
    font-size: 88%;
    text-align: center;
    padding: 0.2em;
}

.mw-parser-output .infobox-label {
    font-weight: bold;
    text-align: right;
}

/* ============ Images / Thumbnails ============ */
.mw-parser-output figure,
.mw-parser-output .thumb {
    margin: 0.5em 0 0.5em 1em;
    padding: 3px;
    border: 1px solid #c8ccd1;
    background: #f8f9fa;
    float: right;
    clear: right;
    max-width: 300px;
}

.mw-parser-output .thumb.tmulti {
    max-width: none;
}

.mw-parser-output figure.mw-halign-left,
.mw-parser-output .tleft {
    float: left;
    clear: left;
    margin: 0.5em 1em 0.5em 0;
}

.mw-parser-output figure img,
.mw-parser-output .thumb img {
    max-width: 100%;
    height: auto;
    display: block;
}

.mw-parser-output figcaption,
.mw-parser-output .thumbcaption {
    font-size: 88%;
    line-height: 1.4;
    padding: 3px;
    color: #54595d;
}

/* ============ Galleries ============ */
ul.gallery {
    list-style: none;
    margin: 1em auto;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5em;
    float: none;
    clear: both;
    max-width: none;
    border: none;
    background: none;
}

ul.gallery .gallerybox {
    display: inline-block;
    vertical-align: top;
    text-align: center;
    float: none;
    clear: none;
    margin: 0;
    padding: 0;
    border: none;
    background: none;
    max-width: none;
}

ul.gallery .gallerybox .thumb {
    float: none;
    clear: none;
    margin: 2px auto;
    padding: 0;
    border: 1px solid #c8ccd1;
    background: #f8f9fa;
    overflow: hidden;
    max-width: none;
}

ul.gallery .gallerybox .thumb img {
    display: block;
}

ul.gallery .gallerybox .gallerytext {
    font-size: 88%;
    line-height: 1.4;
    padding: 4px;
    color: #54595d;
    overflow: hidden;
    word-wrap: break-word;
}

/* ============ Hatnote ============ */
.mw-parser-output .hatnote {
    font-style: italic;
    padding-left: 1.6em;
    margin-bottom: 0.5em;
}

/* ============ Table of Contents ============ */
.mw-parser-output .toc,
.mw-parser-output [property="mw:PageProp/toc"] {
    display: none; /* Hide TOC for cleaner look */
}

/* ============ References ============ */
.mw-parser-output .reflist {
    font-size: 90%;
    margin-bottom: 0.5em;
}

.mw-parser-output .reflist-columns-2 {
    column-width: 30em;
}

.mw-parser-output .references {
    font-size: 90%;
    list-style-type: decimal;
}

.mw-parser-output .reference {
    font-size: 80%;
    vertical-align: super;
    line-height: 0;
}

.mw-parser-output sup.reference {
    font-size: 80%;
}

.mw-parser-output sup.reference a {
    color: #3366cc;
}

/* ============ Navbox ============ */
.mw-parser-output .navbox {
    border: 1px solid #a2a9b1;
    width: 100%;
    clear: both;
    font-size: 88%;
    text-align: center;
    padding: 1px;
    margin: 1em auto 0;
}

.mw-parser-output .navbox-title {
    background: #ccf;
    padding: 0.25em 1em;
    font-weight: bold;
}

.mw-parser-output .navbox-group {
    background: #ddf;
    padding: 0.25em 1em;
    white-space: nowrap;
    text-align: right;
    font-weight: bold;
}

.mw-parser-output .navbox-list {
    padding: 0.25em 1em;
}

.mw-parser-output .navbox-even {
    background: #f7f7f7;
}

.mw-parser-output .navbox .navbar {
    font-size: 100%;
}

/* ============ Short description ============ */
.mw-parser-output .shortdescription {
    display: none;
}

/* ============ Side boxes ============ */
.mw-parser-output .side-box {
    margin: 4px 0;
    border: 1px solid #aaa;
    font-size: 88%;
    line-height: 1.25em;
    background: #f8f9fa;
}

.mw-parser-output .side-box-right {
    float: right;
    clear: right;
    margin-left: 1em;
    width: 238px;
}

.mw-parser-output .sistersitebox {
    font-size: 88%;
}

/* ============ HList (horizontal lists) ============ */
.mw-parser-output .hlist dl,
.mw-parser-output .hlist ol,
.mw-parser-output .hlist ul {
    margin: 0;
    padding: 0;
}

.mw-parser-output .hlist dd,
.mw-parser-output .hlist dt,
.mw-parser-output .hlist li {
    margin: 0;
    display: inline;
}

.mw-parser-output .hlist dd::after,
.mw-parser-output .hlist li::after {
    content: " · ";
    font-weight: bold;
}

.mw-parser-output .hlist dd:last-child::after,
.mw-parser-output .hlist li:last-child::after {
    content: none;
}

/* ============ Fractions ============ */
.mw-parser-output .frac .num,
.mw-parser-output .frac .den {
    font-size: 80%;
    line-height: 0;
    vertical-align: super;
}

.mw-parser-output .frac .den {
    vertical-align: sub;
}

/* ============ Authority control ============ */
.mw-parser-output .authority-control {
    font-size: 88%;
}

/* ============ Cite/Citation styles ============ */
.mw-parser-output cite.citation {
    font-style: inherit;
    word-wrap: break-word;
}

.mw-parser-output .citation:target {
    background-color: rgba(0, 127, 255, 0.133);
}

/* ============ Footer ============ */
.mw-footer {
    border-top: 1px solid #eaecf0;
    padding: 1rem 0;
    margin-top: 2rem;
    font-size: 0.75rem;
    color: #54595d;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.mw-footer a {
    color: #3366cc;
}

.mw-footer-attribution {
    margin-bottom: 0.5rem;
}

/* ============ Mobile Header ============ */
.mw-mobile-header {
    display: none;
}

/* ============ Sidebar Overlay ============ */
.mw-sidebar-overlay {
    display: none;
}

/* ============ Responsive ============ */
@media screen and (max-width: 1000px) {
    .mw-mobile-header {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        position: sticky;
        top: 0;
        z-index: 100;
        background: #fff;
        border-bottom: 1px solid #eaecf0;
        padding: 0.5rem 1rem;
        height: 3rem;
    }

    .mw-mobile-logo {
        font-family: 'Linux Libertine', Georgia, Times, serif;
        font-size: 1.25rem;
        font-variant: small-caps;
        letter-spacing: 1px;
        color: #000;
        text-decoration: none;
    }

    /* Hamburger button */
    .mw-menu-toggle {
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 4px;
        width: 2rem;
        height: 2rem;
        padding: 4px;
        background: none;
        border: 1px solid #a2a9b1;
        border-radius: 2px;
        cursor: pointer;
    }
    .mw-menu-toggle span {
        display: block;
        height: 2px;
        background: #202122;
        border-radius: 1px;
        transition: transform 0.2s, opacity 0.2s;
    }
    .mw-menu-toggle[aria-expanded="true"] span:nth-child(1) {
        transform: translateY(6px) rotate(45deg);
    }
    .mw-menu-toggle[aria-expanded="true"] span:nth-child(2) {
        opacity: 0;
    }
    .mw-menu-toggle[aria-expanded="true"] span:nth-child(3) {
        transform: translateY(-6px) rotate(-45deg);
    }

    /* Sidebar as slide-in drawer */
    .mw-page-container {
        flex-direction: column;
    }
    .mw-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: 16rem;
        max-width: 80vw;
        z-index: 200;
        background: #fff;
        padding: 1.5rem 1rem 2rem 1.5rem;
        border-right: 1px solid #eaecf0;
        transform: translateX(-100%);
        transition: transform 0.25s ease;
        overflow-y: auto;
    }
    .mw-sidebar.mw-sidebar--open {
        transform: translateX(0);
    }

    /* Overlay */
    .mw-sidebar-overlay {
        display: none;
        position: fixed;
        inset: 0;
        z-index: 150;
        background: rgba(0, 0, 0, 0.5);
    }
    .mw-sidebar-overlay.mw-sidebar-overlay--visible {
        display: block;
    }

    .mw-content-container {
        border-left: none;
    }
}

/* ============ Homepage Styles ============ */
.artypedia-welcome {
    text-align: center;
    padding: 1rem 0 1.5rem;
    border-bottom: 1px solid #eaecf0;
    margin-bottom: 1.5rem;
}

.artypedia-welcome h2 {
    font-family: 'Linux Libertine', Georgia, Times, serif;
    font-size: 1.6rem;
    font-weight: normal;
    margin: 0 0 0.25rem;
    border: none;
}

.artypedia-welcome .tagline {
    font-size: 0.9rem;
    color: #54595d;
}

.artypedia-welcome .article-count {
    font-size: 0.85rem;
    color: #54595d;
    margin-top: 0.25rem;
}

.artypedia-motto {
    font-family: 'Linux Libertine', Georgia, Times, serif;
    font-size: 1.3rem;
    font-style: italic;
    color: #54595d;
    text-align: center;
    margin: 1rem 0;
}

/* Category grid */
.artypedia-categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.artypedia-category {
    border: 1px solid #a2a9b1;
    background: #fff;
}

.artypedia-category h3 {
    margin: 0;
    padding: 0.4em 0.6em;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 0.9rem;
    font-weight: bold;
    border-bottom: 1px solid #a2a9b1;
}

.artypedia-category.cat-seen-as h3 { background: #cef2e0; }
.artypedia-category.cat-media h3 { background: #cedff2; }
.artypedia-category.cat-human h3 { background: #f2e6ce; }

.artypedia-category ul {
    list-style: none;
    margin: 0;
    padding: 0.5em 0.6em;
}

.artypedia-category li {
    padding: 0.15em 0;
}

.artypedia-category li::before {
    content: "■ ";
    color: #54595d;
    font-size: 0.5em;
    vertical-align: middle;
    margin-right: 0.3em;
}

/* Did you know */
.artypedia-dyk {
    border: 1px solid #a2a9b1;
    margin: 1.5rem 0;
    background: #fff;
}

.artypedia-dyk h3 {
    margin: 0;
    padding: 0.4em 0.6em;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 0.9rem;
    font-weight: bold;
    background: #f0e8f8;
    border-bottom: 1px solid #a2a9b1;
}

.artypedia-dyk ul {
    list-style: none;
    margin: 0;
    padding: 0.75em 1em;
}

.artypedia-dyk li {
    padding: 0.3em 0;
    line-height: 1.5;
}

.artypedia-dyk li::before {
    content: "■ ";
    font-size: 0.5em;
    vertical-align: middle;
    margin-right: 0.3em;
}

/* All pages list */
.artypedia-all-pages {
    column-width: 15em;
    column-gap: 2em;
}

.artypedia-all-pages ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.artypedia-all-pages li {
    padding: 0.2em 0;
}

/* Print */
@media print {
    .mw-sidebar { display: none; }
    .mw-content-container { border: none; max-width: 100%; }
}
