
* {
    box-sizing: border-box;
}

:root {
    font-family: Arial, Helvetica, sans-serif;
    color: #f4f3f7;
    --cos-yellow: #FFD54A;
    background: #111116;
}

body {
    margin: 0;
    min-height: 100vh;
    background: #111116;
    color: #f4f3f7;
    transition: background 0.3s, color 0.3s;
}

.navbar {
    min-height: 76px;
    padding: 20px 7%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    border-bottom: 1px solid #34333b;
}

.logo {
    font-family: Georgia, serif;
    font-size: 28px;
    font-weight: bold;
    color: inherit;
    text-decoration: none;
}

.logo span {
    color: var(--cos-yellow);
}

nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

nav button {
    border: 0;
    background: transparent;
    color: inherit;
    padding: 10px 12px;
    cursor: pointer;
    transition: color 0.2s;
}

nav button:hover {
    color: var(--cos-yellow);
}

main {
    max-width: 1440px;
    margin: auto;
    padding: 70px 7%;
}

.page {
    display: none;
    animation: appear 0.3s ease;
}

.page.active {
    display: block;
}

@keyframes appear {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.eyebrow {
    font-size: 12px;
    letter-spacing: 4px;
    color: var(--cos-yellow);
}

h1 {
    font-family: Georgia, serif;
    font-size: clamp(42px, 7vw, 84px);
    line-height: 1.05;
    letter-spacing: -2px;
    margin: 24px 0;
}

h1 span {
    color: var(--cos-yellow);
}

h1 em {
    font-weight: normal;
    color: #c7b8a7;
}

.intro {
    max-width: 600px;
    color: #aaa8b5;
    font-size: 17px;
    line-height: 1.8;
}

.home-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin-top: 55px;
}

.feature {
    min-height: 280px;
    padding: 28px;
    text-align: left;
    color: #fff;
    border: 1px solid #42404c;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s, border-color 0.2s;
}

.feature:hover {
    transform: translateY(-5px);
    border-color: var(--cos-yellow);
}

.feature span {
    font-size: 11px;
    letter-spacing: 2px;
}

.feature h2 {
    font-family: Georgia, serif;
    font-size: 30px;
    margin-top: 42px;
}

.feature p {
    color: #d0ced8;
    line-height: 1.6;
}

.feature b {
    display: inline-block;
    margin-top: 15px;
    color: var(--cos-yellow);
}

.photo-card {
    background: linear-gradient(145deg, #3e3439, #19191f 75%);
}

.code-card {
    background: linear-gradient(145deg, #242047, #10121e 75%);
    font-family: monospace;
}

.code-card h2 {
    font-family: monospace;
}

.wiki-card {
    background: linear-gradient(145deg, #46464a, #202025 75%);
}

.notice {
    margin-top: 35px;
    padding: 28px;
    border: 1px solid #41404a;
    border-radius: 8px;
    color: #aaa8b5;
    line-height: 1.7;
}

#wiki-search {
    width: 100%;
    max-width: 600px;
    margin: 20px 0;
    padding: 15px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 16px;
}

.wiki-article {
    max-width: 850px;
    padding: 20px 0;
    border-bottom: 1px solid #dedee3;
}

.wiki-article p {
    line-height: 1.7;
}

footer {
    padding: 25px 7%;
    border-top: 1px solid #34333b;
    color: #92909c;
    font-size: 13px;
}

body.photo-theme {
    background: #171513;
    font-family: Georgia, serif;
}

body.photo-theme .eyebrow {
    color: #c7b8a7;
}

body.photo-theme h1 span {
    color: var(--cos-yellow);
}

body.code-theme {
    background: #0b0d18;
    font-family: monospace;
}

body.code-theme .eyebrow,
body.code-theme h1 span {
    color: var(--cos-yellow);
}

body.wiki-theme {
    background: #f7f7f5;
    color: #242833;
}

body.wiki-theme .intro,
body.wiki-theme footer {
    color: #656875;
}

body.wiki-theme .navbar,
body.wiki-theme footer {
    border-color: #dedee3;
}

body.wiki-theme .wiki-article {
    border-color: #dedee3;
}

body.wiki-theme .eyebrow {
    color: #987000;
}

body.wiki-theme h1 span {
    color: #987000;
}

body.wiki-theme nav button:hover {
    color: #987000;
}

body.wiki-theme .feature b {
    color: #987000;
}

@media (max-width: 800px) {
    .navbar {
        align-items: flex-start;
        flex-direction: column;
    }

/* Cospedia category heading */
.gatepedia-section-heading {
    margin-top: 30px;
    margin-bottom: 20px;
}

.gatepedia-section-heading h2 {
    margin-top: 8px;
    font-size: 28px;
}

/* Large Gatepedia button */
.gatepedia-category-card {
    width: 100%;
    min-height: 130px;
    padding: 28px;
    display: flex;
    align-items: center;
    gap: 24px;
    text-align: left;
    cursor: pointer;
}

/* Category number */
.gatepedia-category-number {
    font-size: 38px;
    font-weight: bold;
}

/* Category title and description */
.gatepedia-category-info {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 10px;
}

.gatepedia-category-info strong {
    font-size: 26px;
}

.gatepedia-category-description {
    font-size: 15px;
}

/* Arrow */
.gatepedia-category-arrow {
    font-size: 30px;
}

    main {
        padding: 45px 6%;
    }

    .home-grid {
        grid-template-columns: 1fr;
    }

    .feature {
        min-height: 230px;
    }
}
