* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
}

html {
    min-height: 100%;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 15px;
    line-height: 1.6;
    min-height: 100vh;
}

a {
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

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

/* Header shell */

.site-header {
    border-bottom: 1px solid;
}

.site-header-inner {
    max-width: 1120px;
    margin: 0 auto;
    padding: 18px 20px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 28px;
}

.brand-block {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
}

.logo a {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 0.2px;
}

.tagline {
    font-size: 13px;
    line-height: 1.35;
}

.header-tools {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.search-form {
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-form input {
    width: 255px;
    padding: 10px 12px;
    border: 1px solid;
    border-radius: 2px;
    font-size: 14px;
    outline: none;
}

.search-form button,
.theme-switcher select {
    padding: 10px 12px;
    border: 1px solid;
    border-radius: 2px;
    font-size: 14px;
    background: transparent;
    cursor: pointer;
}

.theme-switcher {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    white-space: nowrap;
}

/* Nav */

.main-nav {
    border-top: 1px solid;
}

.main-nav-inner {
    max-width: 1120px;
    margin: 0 auto;
    padding: 12px 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 26px;
}

.main-nav a {
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
}

/* Page frame */

.page-wrap {
    padding: 24px 20px 46px;
}

.page-inner {
    max-width: 1120px;
    margin: 0 auto;
}

.page-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 22px;
    font-size: 13px;
}

.page-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

#wikitext {
    min-width: 0;
}

/* Content defaults */

#wikitext h1 {
    margin: 0 0 16px;
    font-size: 38px;
    line-height: 1.08;
    font-weight: 700;
}

#wikitext h2 {
    margin: 28px 0 12px;
    font-size: 26px;
    line-height: 1.15;
    font-weight: 700;
}

#wikitext h3 {
    margin: 22px 0 10px;
    font-size: 20px;
    line-height: 1.2;
    font-weight: 700;
}

#wikitext h4 {
    margin: 18px 0 8px;
    font-size: 16px;
    line-height: 1.25;
    font-weight: 700;
}

#wikitext p {
    margin: 0 0 18px;
    max-width: 78ch;
}

#wikitext ul,
#wikitext ol {
    margin: 0 0 18px 22px;
    padding: 0;
    max-width: 78ch;
}

#wikitext li {
    margin-bottom: 8px;
}

#wikitext table {
    width: 100%;
    border-collapse: collapse;
    margin: 0 0 24px;
}

#wikitext th,
#wikitext td {
    padding: 11px 12px;
    border: 1px solid;
    text-align: left;
    vertical-align: top;
}

#wikitext pre,
#wikitext code {
    font-family: Consolas, Monaco, monospace;
}

#wikitext pre {
    padding: 14px 16px;
    border: 1px solid;
    border-radius: 2px;
    overflow: auto;
    margin: 0 0 20px;
}

#wikitext blockquote {
    margin: 0 0 20px;
    padding-left: 14px;
    border-left: 3px solid;
    max-width: 78ch;
}

#wikitext hr {
    border: 0;
    border-top: 1px solid;
    margin: 30px 0;
}

/* Footer */

.site-footer {
    border-top: 1px solid;
}

.site-footer-inner {
    max-width: 1120px;
    margin: 0 auto;
    padding: 18px 20px 24px;
    text-align: center;
    font-size: 12px;
}

/* Homepage */

.home-welcome {
    display: grid;
    grid-template-columns: 1.8fr 1fr;
    gap: 24px;
    margin-bottom: 18px;
    padding: 18px 20px;
    border: 1px solid;
    border-radius: 2px;
}

.home-welcome h1,
.home-welcome h2 {
    margin: 0 0 10px 0;
    font-size: 26px;
    line-height: 1.15;
}

.home-welcome p {
    margin: 0 0 8px 0;
    max-width: none;
}

.home-stats ul,
.home-stats ol {
    list-style: none;
    margin: 0;
    padding: 0;
    max-width: none;
}

.home-stats li {
    margin-bottom: 6px;
    font-size: 14px;
}

.featured-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-bottom: 18px;
}

.featured-card,
.popular-panel,
.announcements-panel,
.skills-panel,
.sidebar-card,
.category-box {
    border: 1px solid;
    border-radius: 2px;
    overflow: hidden;
}

.featured-card {
    padding: 0;
}

.featured-card-image {
    aspect-ratio: 16 / 8;
    border-bottom: 1px solid;
    overflow: hidden;
}

.featured-card-image img,
.category-box img {
    width: 100%;
    display: block;
}

.featured-card-image img {
    height: 220px;
    object-fit: cover;
}

.featured-card-body {
    padding: 12px 14px 14px;
}

.featured-meta {
    font-size: 12px;
    margin-bottom: 6px;
}

.featured-card h2,
.featured-card h3 {
    margin: 0 0 8px 0;
    font-size: 16px;
    line-height: 1.25;
}

.featured-card p {
    margin: 0;
    max-width: none;
    font-size: 14px;
}

.home-layout {
    display: grid;
    grid-template-columns: minmax(0, 2.1fr) 300px;
    gap: 18px;
    align-items: start;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
    margin-bottom: 18px;
}

.category-box {
    text-align: center;
}

.category-box p {
    margin: 0;
    max-width: none;
}

.category-box img {
    height: 112px;
    object-fit: cover;
    border-bottom: 1px solid;
}

.category-box strong {
    display: block;
    padding: 12px 8px;
    font-size: 14px;
    line-height: 1.2;
}

.popular-panel h2,
.announcements-panel h2,
.skills-panel h2,
.help-card h2 {
    margin: 0;
    padding: 12px 14px;
    font-size: 18px;
    border-bottom: 1px solid;
}

.popular-links {
    padding: 14px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.popular-links a {
    display: block;
    padding: 10px 8px;
    text-align: center;
    font-size: 13px;
    font-weight: 700;
    border: 1px solid;
    border-radius: 2px;
}

.popular-panel > ul,
.announcements-panel > ul,
.skills-panel > ul,
.popular-links ul,
.announcement-list ul,
.skills-grid ul {
    padding: 14px 18px 14px 30px;
    margin: 0;
    max-width: none;
}

.announcement-list {
    margin: 0;
    padding: 14px 14px 14px 30px;
    max-width: none;
}

.announcement-list li,
.popular-links li,
.skills-grid li {
    margin-bottom: 8px;
}

.skills-grid {
    padding: 14px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px 18px;
}

.skills-grid a {
    display: block;
    font-size: 14px;
    font-weight: 700;
}

.panel-footer-link {
    padding: 0 14px 14px;
    text-align: right;
    font-size: 13px;
    font-weight: 700;
}

.sidebar-card {
    margin-bottom: 18px;
}

.community-card {
    padding: 18px 16px;
    min-height: 74px;
}

.community-card p {
    margin: 0;
    max-width: none;
}

.home-sidebar .sidebar-card {
    padding: 14px 16px;
}

.help-card-body {
    padding: 14px;
}

.help-card-body p {
    margin: 0 0 12px 0;
    max-width: none;
}

.help-card-body ul {
    margin: 0 0 0 18px;
    max-width: none;
}

@media (max-width: 1100px) {
    .category-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .home-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    .home-welcome,
    .featured-grid,
    .popular-links,
    .skills-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .category-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .home-welcome h1,
    .home-welcome h2 {
        font-size: 22px;
    }
}

.home-welcome-table,
.home-featured-table,
.home-main-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 14px;
    margin: 0 0 18px;
}

.home-welcome-table td,
.home-featured-table td,
.home-main-table td {
    border: 1px solid;
    vertical-align: top;
    padding: 16px 18px;
}

.home-featured-cell {
    width: 33.333%;
}

.home-main-left {
    width: 72%;
}

.home-main-right {
    width: 28%;
}

@media (max-width: 900px) {
    .home-welcome-table,
    .home-featured-table,
    .home-main-table,
    .home-welcome-table tbody,
    .home-featured-table tbody,
    .home-main-table tbody,
    .home-welcome-table tr,
    .home-featured-table tr,
    .home-main-table tr,
    .home-welcome-table td,
    .home-featured-table td,
    .home-main-table td {
        display: block;
        width: 100%;
    }

    .home-welcome-table,
    .home-featured-table,
    .home-main-table {
        border-spacing: 0;
    }

    .home-welcome-table td,
    .home-featured-table td,
    .home-main-table td {
        margin-bottom: 14px;
    }
}
/* Homepage shell from template */
.homepage-shell {
    display: none;
}

body.group-Main.page-HomePage .homepage-shell {
    display: block;
}

body.group-Main.page-HomePage #wikitext {
    display: none;
}

body.group-Main.page-HomePage .page-meta {
    display: none;
}