/* Pixelfish Club — 2027 site stylesheet.
 * Dark and neutral at the base, with colour coming from game art and two
 * brand colours taken from the pufferfish logo (yellow body, teal fins).
 * All colours are tokens on :root so the palette can be tuned in one place.
 */

/* ---------------------------------------------------------------- Fonts (self-hosted, OFL) */

@font-face {
    font-family: "Poppins";
    src: url("../fonts/poppins-latin-400-normal.woff2") format("woff2");
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: "Poppins";
    src: url("../fonts/poppins-latin-400-italic.woff2") format("woff2");
    font-weight: 400;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: "Poppins";
    src: url("../fonts/poppins-latin-500-normal.woff2") format("woff2");
    font-weight: 500;
    font-display: swap;
}

@font-face {
    font-family: "Poppins";
    src: url("../fonts/poppins-latin-600-normal.woff2") format("woff2");
    font-weight: 600;
    font-display: swap;
}

@font-face {
    font-family: "Poppins";
    src: url("../fonts/poppins-latin-700-normal.woff2") format("woff2");
    font-weight: 700;
    font-display: swap;
}

@font-face {
    font-family: "Oswald";
    src: url("../fonts/oswald-latin-wght-normal.woff2") format("woff2");
    font-weight: 200 700;
    font-display: swap;
}

/* ---------------------------------------------------------------- Tokens */

:root {
    /* Surfaces, darkest to lightest */
    --basalt: #141619;   /* page */
    --slate: #1b1e22;    /* panels */
    --ridge: #23272c;    /* raised: inputs, hover */
    --seam: #31363c;     /* borders, rules */
    --abyss: #0e0f11;    /* deepest band, between the tiles and the history image */

    /* Glass: translucent slate used over imagery */
    --glass: rgb(24 27 31 / 0.72);
    --glass-strong: rgb(20 22 25 / 0.82);
    --glass-blur: 10px;

    /* Text */
    --bone: #e6e3dc;     /* primary text, primary button fill */
    --ash: #a5a39c;      /* secondary text */
    --dust: #75746f;     /* tertiary text, placeholders */

    /* Brand (from the pufferfish logo) */
    --puffer: #ebd21f;        /* body yellow: borders, markers, years */
    --puffer-soft: rgb(235 210 31 / 0.55);
    --fin: #427570;           /* fin teal: section tints */
    --fin-deep: #183332;

    /* Signals */
    --verdigris: #7ea898; /* links, online */
    --amber: #cfa865;     /* maintenance, warnings */
    --rust: #c9806f;      /* offline, errors */

    --font-body: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
    --font-display: "Oswald", "Arial Narrow", Impact, sans-serif;

    --radius-tile: 10px;
    --radius-control: 6px;
    --measure: 66ch;
    --page: 1120px;
    --gutter: clamp(16px, 4vw, 32px);

    color-scheme: dark;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    scroll-padding-top: 80px;
}

body {
    margin: 0;
    background: var(--basalt);
    color: var(--bone);
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

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

.pixelated {
    image-rendering: pixelated;
}

a {
    color: var(--verdigris);
    text-decoration-thickness: 1px;
    text-underline-offset: 0.2em;
}

a:hover {
    color: var(--bone);
}

:focus-visible {
    outline: 2px solid var(--puffer);
    outline-offset: 3px;
    border-radius: 2px;
}

h1,
h2 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.08;
    letter-spacing: 0.005em;
    margin: 0 0 0.45em;
    text-transform: uppercase;
    text-wrap: balance;
}

h2 {
    font-size: clamp(1.9rem, 1.4rem + 1.8vw, 2.7rem);
}

h3,
h4 {
    margin: 0 0 0.4em;
    font-weight: 600;
    line-height: 1.3;
    text-wrap: balance;
}

h3 {
    font-size: 1.12rem;
}

p {
    margin: 0 0 1em;
    text-wrap: pretty;
}

.visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.skip-link {
    position: absolute;
    left: var(--gutter);
    top: -100px;
    z-index: 100;
    background: var(--bone);
    color: var(--basalt);
    padding: 8px 14px;
    border-radius: var(--radius-control);
}

.skip-link:focus {
    top: 12px;
}

.wrap {
    width: min(100% - 2 * var(--gutter), var(--page));
    margin-inline: auto;
}

.prose {
    max-width: var(--measure);
}

.muted {
    color: var(--ash);
}

/* ---------------------------------------------------------------- Nav */

.site-nav {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgb(20 22 25 / 0.8);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--seam);
}

.site-nav .wrap {
    display: flex;
    align-items: center;
    gap: 24px;
    min-height: 64px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--bone);
    text-decoration: none;
    margin-right: auto;
}

.brand img {
    /* logo.png is a 16x16 pixel grid: keep sizes at whole multiples of 16 (48 = 3x) */
    width: 48px;
    height: 48px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.nav-links a {
    display: block;
    padding: 6px 12px;
    color: var(--ash);
    text-decoration: none;
    border-radius: var(--radius-control);
    font-size: 0.95rem;
    font-weight: 500;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
    color: var(--bone);
    background: var(--ridge);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-actions .nav-toggle {
    display: none;
}

@media (max-width: 820px) {
    .nav-actions .nav-toggle {
        display: inline-flex;
    }

    .site-nav .wrap {
        flex-wrap: wrap;
        gap: 8px 16px;
    }

    .nav-links {
        display: none;
        order: 3;
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        padding-bottom: 12px;
    }

    .site-nav[data-open] .nav-links {
        display: flex;
    }

    .nav-actions .btn-quiet {
        display: none;
    }
}

/* ---------------------------------------------------------------- Buttons */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 20px;
    border: 1px solid transparent;
    border-radius: var(--radius-control);
    font: inherit;
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease;
}

.btn-primary {
    position: relative;
    background:
        linear-gradient(135deg, rgb(235 210 31 / 0.22) 0%, rgb(235 210 31 / 0.06) 55%, rgb(235 210 31 / 0.02) 100%),
        rgb(20 22 25 / 0.75);
    color: var(--bone);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    box-shadow: 0 3px 0 rgb(0 0 0 / 0.85);
}

/* Same gradient border as the game tiles: yellow at the top-left, fading to a hairline. */
.btn-primary::before {
    content: "";
    position: absolute;
    inset: 0;
    padding: 1px;
    border-radius: inherit;
    background: linear-gradient(135deg, var(--puffer) 0%, var(--puffer-soft) 35%, rgb(235 210 31 / 0.25) 100%);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
    pointer-events: none;
}

.btn-primary:hover {
    background:
        linear-gradient(135deg, rgb(235 210 31 / 0.34) 0%, rgb(235 210 31 / 0.12) 55%, rgb(235 210 31 / 0.05) 100%),
        rgb(20 22 25 / 0.75);
    color: #fff;
}

.btn-secondary {
    background: rgb(20 22 25 / 0.35);
    color: var(--bone);
    border-color: rgb(230 227 220 / 0.35);
}

.btn-secondary:hover {
    background: var(--ridge);
    border-color: var(--bone);
    color: var(--bone);
}

.btn-quiet {
    background: transparent;
    color: var(--ash);
}

.btn-quiet:hover {
    color: var(--bone);
}

.btn-small {
    min-height: 36px;
    padding: 0 14px;
    font-size: 0.9rem;
}

/* ---------------------------------------------------------------- Hero */

.hero {
    position: relative;
    isolation: isolate;
    display: grid;
    place-items: center;
    min-height: min(80vh, 700px);
    padding: 96px 0 140px;
    text-align: center;
    overflow: hidden;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -2;
    background: var(--hero-image) center 40% / cover no-repeat;
    filter: saturate(0.7) brightness(0.62);
}

.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(to bottom, rgb(20 22 25 / 0.35) 0%, rgb(20 22 25 / 0.1) 40%, var(--basalt) 100%),
        radial-gradient(ellipse at center, transparent 40%, rgb(20 22 25 / 0.55) 100%);
}

.hero h1 {
    font-size: clamp(2.6rem, 1.3rem + 5.4vw, 5.6rem);
    line-height: 0.98;
    letter-spacing: 0.01em;
    margin-bottom: 0.4em;
    text-shadow: 0 2px 0 rgb(0 0 0 / 0.6), 0 12px 40px rgb(0 0 0 / 0.45);
}

.hero p {
    max-width: 48ch;
    margin: 0 auto 2rem;
    font-size: clamp(1rem, 0.95rem + 0.35vw, 1.15rem);
    color: #dcd9d1;
}

.hero .actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

/* ---------------------------------------------------------------- Sections */

.section {
    padding: clamp(56px, 8vw, 104px) 0;
}

.section + .section {
    border-top: 1px solid var(--seam);
}

.section-head {
    max-width: 760px;
    margin-bottom: 40px;
}

.section-head h2 {
    margin-bottom: 0.25em;
}

.section-head p {
    margin: 0;
    color: var(--ash);
}

.page-head {
    padding: clamp(48px, 7vw, 80px) 0 8px;
}

.page-head h1 {
    font-size: clamp(2.3rem, 1.6rem + 2.6vw, 3.4rem);
    margin-bottom: 0.25em;
}

.page-head p {
    color: var(--ash);
    max-width: var(--measure);
    font-size: 1.08rem;
}

.wrap:has(> .page-head) + .section {
    padding-top: 16px;
    border-top: 0;
}

/* ---------------------------------------------------------------- Game tiles */

.games {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-top: -96px; /* tuck the grid up into the hero fade */
    margin-bottom: clamp(56px, 8vw, 96px);
    position: relative;
}

/* Three games: the first (Minecraft, with two servers) runs down the left. */
@media (min-width: 761px) {
    .games:has(> .game:nth-child(3):last-child) > .game:first-child {
        grid-row: span 2;
    }
}

@media (max-width: 760px) {
    .games {
        grid-template-columns: 1fr;
        margin-top: -56px;
    }
}

.game {
    --accent: var(--fin);
    position: relative;
    isolation: isolate;
    overflow: hidden;
    display: grid;
    grid-template-columns: 64px 1fr;
    gap: 4px 18px;
    align-content: start;
    padding: 24px;
    background: var(--glass);
    -webkit-backdrop-filter: blur(var(--glass-blur));
    backdrop-filter: blur(var(--glass-blur));
    border-radius: var(--radius-tile);
    box-shadow: 0 18px 40px -24px rgb(0 0 0 / 0.8);
}

/* Brand border: pufferfish yellow at the top-left corner fading into a hairline. */
.game::before,
.card-edge::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;
    padding: 1px;
    border-radius: inherit;
    background: linear-gradient(135deg, var(--puffer) 0%, var(--puffer-soft) 18%, rgb(255 255 255 / 0.09) 45%, rgb(255 255 255 / 0.06) 100%);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
    pointer-events: none;
}

/* Artwork: the game's banner bleeding in from the right, or its accent colour. */
.game::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: radial-gradient(120% 90% at 100% 0%, color-mix(in srgb, var(--accent) 34%, transparent) 0%, transparent 60%);
}

.game.has-banner::after {
    background: var(--banner) right center / cover no-repeat;
    opacity: 0.5;
    -webkit-mask-image: linear-gradient(to left, #000 0%, rgb(0 0 0 / 0.55) 40%, transparent 80%);
    mask-image: linear-gradient(to left, #000 0%, rgb(0 0 0 / 0.55) 40%, transparent 80%);
}

.game-icon {
    grid-row: span 2;
    width: 64px;
    height: 64px;
    border-radius: 8px;
    background: rgb(0 0 0 / 0.35);
    border: 1px solid rgb(255 255 255 / 0.08);
    object-fit: contain;
    padding: 4px;
}

.game-icon-blank {
    display: grid;
    place-items: center;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.9rem;
    color: color-mix(in srgb, var(--accent) 70%, var(--bone));
    background: color-mix(in srgb, var(--accent) 18%, rgb(0 0 0 / 0.4));
}

.game h3 {
    margin: 0;
    font-family: var(--font-display);
    font-size: 1.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.01em;
    align-self: end;
    line-height: 1.1;
}

.game-desc {
    margin: 0;
    color: #c4c1b9;
    font-size: 0.93rem;
    max-width: 42ch;
}

.game-servers {
    grid-column: 1 / -1;
    margin: 18px 0 0;
    padding: 0;
    list-style: none;
    border-top: 1px solid rgb(255 255 255 / 0.1);
}

.game-servers > li {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 6px 12px;
    padding: 14px 0 0;
}

.game-servers > li + li {
    margin-top: 14px;
    border-top: 1px dashed rgb(255 255 255 / 0.1);
}

.game-servers > li:not(:has(.server-icon)) {
    grid-template-columns: 1fr;
}

.game-servers > li:not(:has(.server-icon)) .status {
    justify-self: start;
}

.server-icon {
    width: 44px;
    height: 44px;
    border-radius: 6px;
    grid-row: span 2;
}

.server-name {
    font-weight: 600;
}

.game-servers .status {
    justify-self: end;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
    grid-column: 2 / -1;
}

.game-servers > li:not(:has(.server-icon)) .tags {
    grid-column: 1 / -1;
}

.tags li {
    padding: 1px 9px;
    border: 1px solid rgb(255 255 255 / 0.14);
    background: rgb(0 0 0 / 0.25);
    border-radius: 999px;
    color: #c4c1b9;
    font-size: 0.78rem;
}

@media (max-width: 520px) {
    .game {
        padding: 20px;
    }

    .game-servers > li:has(.server-icon) {
        grid-template-columns: auto 1fr;
    }

    .game-servers > li:has(.server-icon) .status {
        grid-column: 2;
        justify-self: start;
    }

    .game-servers > li:has(.server-icon) .tags {
        grid-column: 1 / -1;
    }

    .server-icon {
        grid-row: span 2;
    }
}

/* Status: a coloured block plus plain words. */
.status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.88rem;
    color: var(--ash);
    white-space: nowrap;
}

.status::before {
    content: "";
    width: 9px;
    height: 9px;
    background: var(--dust);
}

.status[data-state="online"] {
    color: var(--bone);
}

.status[data-state="online"]::before {
    background: var(--verdigris);
    box-shadow: 0 0 0 3px rgb(126 168 152 / 0.18);
}

.status[data-state="offline"]::before {
    background: var(--rust);
}

.status[data-state="maintenance"]::before {
    background: var(--amber);
}

.status[data-state="coming_soon"]::before {
    background: transparent;
    outline: 1px solid var(--ash);
    outline-offset: -1px;
}

/* ---------------------------------------------------------------- Why here (textured band) */

.band {
    position: relative;
    z-index: 1;
    background: var(--abyss);
    border-top: 1px solid rgb(255 255 255 / 0.04);
}

.band + .history {
    border-top: 0;
    padding-top: clamp(24px, 4vw, 48px);
}

.pillars {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(24px, 4vw, 56px);
    margin: 0;
    padding: 0;
    list-style: none;
}

@media (max-width: 760px) {
    .pillars {
        grid-template-columns: 1fr;
    }
}

.pillars h3 {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.3rem;
    text-transform: uppercase;
    letter-spacing: 0.01em;
    margin: 0 0 0.3em;
}

.pillars p {
    color: var(--ash);
    margin: 0;
    font-size: 0.95rem;
}

/* ---------------------------------------------------------------- History (blue-green wash + interleaved timeline) */

/* The band's dark fades into the club's deep blue-green, then back to the page
   colour at the bottom. */
.history {
    position: relative;
    background: linear-gradient(to bottom,
        var(--abyss) 0,
        var(--fin-deep) clamp(200px, 24vw, 340px),
        var(--fin-deep) calc(100% - 160px),
        var(--basalt) 100%);
}

.history .section-head {
    margin-bottom: 56px;
}

.history .section-head h2 {
    font-size: clamp(2.4rem, 1.6rem + 3vw, 4rem);
    text-shadow: 0 2px 0 rgb(0 0 0 / 0.55), 0 10px 30px rgb(0 0 0 / 0.5);
}

.history .section-head p {
    color: #e6ebe8;
    text-shadow: 0 1px 12px rgb(0 0 0 / 0.8);
    max-width: 52ch;
}

/* Two columns; each card spans two grid rows and starts one row after the
   previous card, so the columns interleave around the spine. */
.timeline {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 64px;
    row-gap: 0;
    margin: 0;
    padding: 0;
    list-style: none;
}

.timeline::before {
    content: "";
    position: absolute;
    top: 8px;
    bottom: 8px;
    left: 50%;
    width: 2px;
    margin-left: -1px;
    background: linear-gradient(to bottom, transparent, var(--puffer-soft) 3%, var(--puffer-soft) 97%, transparent);
}

.timeline > li {
    position: relative;
    grid-row: var(--row) / span 2;
    padding-bottom: 20px;
}

.timeline > li:nth-child(odd) {
    grid-column: 1;
}

.timeline > li:nth-child(even) {
    grid-column: 2;
}

/* the marker: a yellow block on the spine, level with the card's year */
.timeline > li::before {
    content: "";
    position: absolute;
    top: 26px;
    width: 12px;
    height: 12px;
    background: var(--puffer);
    outline: 3px solid var(--fin-deep);
}

.timeline > li:nth-child(odd)::before {
    right: -38px;
}

.timeline > li:nth-child(even)::before {
    left: -38px;
}

.era {
    display: grid;
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
    overflow: hidden;
    background: var(--glass-strong);
    -webkit-backdrop-filter: blur(var(--glass-blur));
    backdrop-filter: blur(var(--glass-blur));
    border: 1px solid rgb(255 255 255 / 0.1);
    border-radius: var(--radius-tile);
    box-shadow: 0 18px 40px -26px rgb(0 0 0 / 0.9);
}

.era img {
    width: 100%;
    height: 100%;
    min-height: 150px;
    object-fit: cover;
    border-right: 1px solid rgb(255 255 255 / 0.08);
}

.era-body {
    padding: 16px 18px 18px;
}

.era-year {
    display: block;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.45rem;
    line-height: 1;
    color: var(--puffer);
    margin-bottom: 6px;
}

.era h3 {
    font-size: 1rem;
    margin-bottom: 0.35em;
}

.era p {
    color: var(--ash);
    margin: 0;
    font-size: 0.86rem;
    line-height: 1.6;
}

.timeline > li.is-latest .era {
    border-color: var(--puffer-soft);
    box-shadow: 0 0 0 1px var(--puffer-soft), 0 20px 50px -20px rgb(235 210 31 / 0.3);
}

@media (max-width: 899px) {
    .timeline {
        grid-template-columns: 1fr;
        padding-left: 30px;
    }

    .timeline::before {
        left: 6px;
    }

    .timeline > li,
    .timeline > li:nth-child(odd),
    .timeline > li:nth-child(even) {
        grid-column: 1;
        grid-row: auto;
    }

    .timeline > li:nth-child(odd)::before,
    .timeline > li:nth-child(even)::before {
        left: -30px;
        right: auto;
    }
}

@media (max-width: 520px) {
    .era {
        grid-template-columns: 1fr;
    }

    .era img {
        aspect-ratio: 16 / 9;
        border-right: 0;
        border-bottom: 1px solid rgb(255 255 255 / 0.08);
    }
}

/* ---------------------------------------------------------------- Page banner (inner pages) */

/* A short scenic strip behind an inner page's title, fading into the page. */
.page-banner {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    padding: clamp(88px, 12vw, 160px) 0 clamp(28px, 4vw, 48px);
}

.page-banner::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -2;
    background: var(--page-image) var(--page-image-pos, center 45%) / cover no-repeat;
    filter: saturate(0.75) brightness(var(--page-image-brightness, 0.55));
}

.page-banner::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(to right, rgb(20 22 25 / var(--page-image-shade, 0.7)) 0%, rgb(20 22 25 / 0.1) 60%),
        linear-gradient(to bottom,
            rgb(20 22 25 / 0.2) 0,
            rgb(20 22 25 / 0.15) 40%,
            rgb(20 22 25 / 0.6) 75%,
            var(--basalt) 100%);
}

.page-banner h1 {
    font-size: clamp(2.6rem, 1.6rem + 3.4vw, 4.4rem);
    margin-bottom: 0.2em;
    text-shadow: 0 2px 0 rgb(0 0 0 / 0.55), 0 10px 30px rgb(0 0 0 / 0.5);
}

.page-banner p {
    max-width: 52ch;
    margin: 0;
    font-size: 1.08rem;
    color: #e0ddd5;
    text-shadow: 0 1px 12px rgb(0 0 0 / 0.8);
}

.section-tight {
    padding-top: clamp(24px, 4vw, 40px);
}

.lede {
    color: #cfccc4;
    margin-bottom: 1.6em;
}

/* Main column plus a sticky side column of cards. */
.with-aside {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 380px);
    gap: clamp(32px, 5vw, 64px);
    align-items: start;
}

.aside-stack {
    display: grid;
    gap: 18px;
    position: sticky;
    top: 88px;
}

@media (max-width: 899px) {
    .with-aside {
        grid-template-columns: 1fr;
    }

    .aside-stack {
        position: static;
    }
}

/* ---------------------------------------------------------------- Cards */

.card {
    position: relative;
    padding: 22px 24px;
    background: var(--slate);
    border: 1px solid var(--seam);
    border-radius: var(--radius-tile);
}

.card-edge {
    border-color: transparent;
    background:
        radial-gradient(120% 80% at 0% 0%, rgb(235 210 31 / 0.08) 0%, transparent 60%),
        var(--slate);
}

.card-title {
    font-size: 1.45rem;
    font-weight: 600;
    margin-bottom: 0.4em;
}

.card p {
    font-size: 0.94rem;
}

.card p:last-child {
    margin-bottom: 0;
}

/* Minecraft item sprites at 3x their 16px grid, beside short lines of text. */
.sprite-list {
    display: grid;
    gap: 14px;
    margin: 18px 0 0;
    padding: 0;
    list-style: none;
}

.sprite-list li {
    display: grid;
    grid-template-columns: 48px 1fr;
    gap: 14px;
    align-items: center;
    font-size: 0.94rem;
}

.sprite-list img {
    width: 48px;
    height: 48px;
    image-rendering: pixelated;
    filter: drop-shadow(3px 3px 0 rgb(0 0 0 / 0.6));
}

/* ---------------------------------------------------------------- Rules */

.rules {
    counter-reset: rule;
    margin: 0;
    padding: 0;
    list-style: none;
    border-top: 1px solid var(--seam);
}

.rules li {
    counter-increment: rule;
    display: grid;
    grid-template-columns: 3.2rem 1fr;
    align-items: baseline;
    padding: 16px 0;
    border-bottom: 1px solid var(--seam);
}

.rules li::before {
    content: counter(rule, decimal-leading-zero);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.35rem;
    line-height: 1;
    color: var(--puffer);
}

/* ---------------------------------------------------------------- Staff */

.staff {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.staff li {
    display: grid;
    align-content: start;
    justify-items: center;
    text-align: center;
    padding: 28px 20px 24px;
}

/* Minecraft skin faces (8x8 grid), scaled up with hard pixel edges. */
.staff img {
    width: 96px;
    height: 96px;
    margin-bottom: 16px;
    image-rendering: pixelated;
    filter: drop-shadow(4px 4px 0 rgb(0 0 0 / 0.6));
}

.staff strong {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: 0.01em;
}

.staff span {
    color: var(--ash);
    font-size: 0.92rem;
}

@media (max-width: 899px) {
    .staff {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .staff li {
        padding: 20px 12px 18px;
    }

    .staff img {
        width: 72px;
        height: 72px;
        margin-bottom: 12px;
    }

    .staff strong {
        font-size: 1.15rem;
        overflow-wrap: anywhere;
    }
}

.section-tight + .section-tight {
    border-top: 0;
    padding-top: 0;
}

/* ---------------------------------------------------------------- Long-form (privacy) */

.doc h2 {
    font-size: 1.55rem;
    font-weight: 600;
    margin: 1.8em 0 0.6em;
    padding-top: 1.2em;
    border-top: 1px solid var(--seam);
}

.doc h2:first-child {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
}

.doc ul {
    margin: 0 0 1em;
    padding: 0;
    list-style: none;
}

.doc li {
    position: relative;
    margin-bottom: 0.7em;
    padding-left: 22px;
}

/* small yellow block, echoing the timeline markers */
.doc li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.62em;
    width: 7px;
    height: 7px;
    background: var(--puffer);
}

.doc strong {
    color: #fff;
}

/* "On this page" links */
.toc ul {
    display: grid;
    gap: 2px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.toc a {
    display: block;
    padding: 5px 10px;
    margin-inline: -10px;
    border-radius: var(--radius-control);
    color: var(--ash);
    text-decoration: none;
    font-size: 0.94rem;
}

.toc a:hover,
.toc a[aria-current="true"] {
    background: var(--ridge);
    color: var(--bone);
}

.toc a[aria-current="true"] {
    box-shadow: inset 2px 0 0 var(--puffer);
}

@media (max-width: 899px) {
    /* on phones the contents would land after the policy, where it's no use */
    .with-aside:not(.guide-layout) > .doc + .aside-stack:has(.toc) {
        display: none;
    }
}

/* ---------------------------------------------------------------- Forms */

.form-panel {
    position: relative;
    max-width: 560px;
    padding: clamp(20px, 4vw, 32px);
    background: var(--slate);
    border: 1px solid var(--seam);
    border-radius: var(--radius-tile);
}

.form-panel.card-edge {
    border-color: transparent;
    background:
        radial-gradient(120% 60% at 0% 0%, rgb(235 210 31 / 0.07) 0%, transparent 60%),
        var(--slate);
}

.with-aside .form-panel {
    max-width: none;
}

/* Numbered steps for a real sequence: number in a yellow-edged block. */
.steps {
    counter-reset: step;
    display: grid;
    gap: 16px;
    margin: 16px 0 0;
    padding: 0;
    list-style: none;
}

.steps li {
    counter-increment: step;
    display: grid;
    grid-template-columns: 32px 1fr;
    gap: 14px;
    align-items: start;
    font-size: 0.94rem;
    color: #cfccc4;
}

.steps li::before {
    content: counter(step);
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--puffer);
    background: rgb(235 210 31 / 0.08);
    border: 1px solid rgb(235 210 31 / 0.4);
    border-radius: 4px;
}

.form-panel.narrow {
    max-width: 420px;
}

.field {
    margin-bottom: 20px;
}

.field label,
.field .label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    font-size: 0.95rem;
}

.field .hint {
    display: block;
    margin-top: 6px;
    color: var(--ash);
    font-size: 0.86rem;
}

.field .optional {
    color: var(--dust);
    font-weight: 400;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="url"],
input[type="number"],
input[type="date"],
input[type="search"],
select,
textarea {
    width: 100%;
    padding: 11px 13px;
    background: var(--ridge);
    color: var(--bone);
    border: 1px solid var(--seam);
    border-radius: var(--radius-control);
    font: inherit;
}

textarea {
    min-height: 160px;
    resize: vertical;
}

input::placeholder,
textarea::placeholder {
    color: var(--dust);
}

input:hover,
textarea:hover {
    border-color: #454b52;
}

input:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--puffer);
    outline-offset: 0;
    border-color: transparent;
}

[aria-invalid="true"] {
    border-color: var(--rust) !important;
}

.field-error {
    display: block;
    margin-top: 6px;
    color: var(--rust);
    font-size: 0.88rem;
}

.field .check,
.check {
    display: grid;
    grid-template-columns: 22px 1fr;
    gap: 10px;
    align-items: start;
    margin-bottom: 14px;
    font-weight: 400;
}

.check input {
    width: 18px;
    height: 18px;
    margin: 4px 0 0;
    accent-color: var(--puffer);
}

.form-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    margin-top: 28px;
}

.notice {
    margin-bottom: 20px;
    padding: 12px 14px;
    border-radius: var(--radius-control);
    border: 1px solid var(--seam);
    background: var(--ridge);
}

.notice-error {
    border-color: rgb(201 128 111 / 0.5);
}

.notice > p {
    margin: 0;
}

.notice > p + p {
    margin-top: 4px;
}

.notice-success {
    border-color: rgb(126 168 152 / 0.5);
}

/* ---------------------------------------------------------------- Sign-in scene */

/* One backdrop filling the space under the nav, with a single centred card. */
.auth-scene {
    position: relative;
    isolation: isolate;
    display: grid;
    place-items: center;
    min-height: calc(100svh - 65px);
    padding: clamp(32px, 6vw, 72px) var(--gutter);
    overflow: hidden;
}

.auth-scene::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -2;
    background: var(--page-image) center 60% / cover no-repeat;
    filter: saturate(0.8) brightness(0.6);
}

.auth-scene::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(ellipse at center, rgb(20 22 25 / 0.15) 0%, rgb(20 22 25 / 0.6) 75%),
        linear-gradient(to bottom, transparent 70%, var(--basalt) 100%);
}

.auth-card {
    width: min(100%, 440px);
    padding: clamp(24px, 4vw, 36px);
    background:
        radial-gradient(120% 60% at 0% 0%, rgb(235 210 31 / 0.07) 0%, transparent 60%),
        var(--glass-strong);
    -webkit-backdrop-filter: blur(var(--glass-blur));
    backdrop-filter: blur(var(--glass-blur));
    box-shadow: 0 24px 60px -24px rgb(0 0 0 / 0.9);
}

.auth-card-wide {
    width: min(100%, 660px);
}

/* Paired fields in the wide card; one column on phones. */
.auth-card .field-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
    gap: 0 18px;
}

.auth-card h1 {
    font-size: clamp(2rem, 1.6rem + 1.6vw, 2.6rem);
    margin-bottom: 0.25em;
}

.auth-intro {
    color: var(--ash);
    margin-bottom: 1.5em;
}

.auth-card .form-actions {
    margin-top: 24px;
}

.auth-card .btn-primary {
    flex: 1 1 auto;
}

.field .input-short {
    max-width: 8rem;
}

/* ---------------------------------------------------------------- Members area */

.members-banner {
    padding: clamp(56px, 8vw, 104px) 0 clamp(20px, 3vw, 32px);
}

.members-banner h1 {
    font-size: clamp(2.2rem, 1.5rem + 2.6vw, 3.6rem);
}

/* Section tabs under the banner */
.subnav {
    border-bottom: 1px solid var(--seam);
}

.subnav ul {
    display: flex;
    gap: 4px;
    margin: 0;
    padding: 0;
    list-style: none;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
}

.subnav a {
    display: block;
    padding: 12px 16px;
    color: var(--ash);
    text-decoration: none;
    font-weight: 500;
    box-shadow: inset 0 -2px 0 transparent;
    white-space: nowrap;
}

.subnav a:hover {
    color: var(--bone);
}

.subnav a[aria-current="page"] {
    color: var(--bone);
    box-shadow: inset 0 -2px 0 var(--puffer);
}

.pinned-news {
    display: grid;
    gap: 2px;
    margin-bottom: 24px;
    color: var(--bone);
    text-decoration: none;
}

.pinned-news strong {
    font-size: 1.1rem;
}

.pinned-news .muted {
    font-size: 0.85rem;
}

.pinned-news:hover strong {
    text-decoration: underline;
}

.pinned-label {
    display: inline-block;
    justify-self: start;
    padding: 0 8px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--puffer);
    border: 1px solid rgb(235 210 31 / 0.45);
    border-radius: 999px;
}

/* Servers, grouped by game */
.game-group + .game-group {
    margin-top: 36px;
}

.game-group-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.01em;
}

.game-group-title img {
    width: 32px;
    height: 32px;
    border-radius: 6px;
}

.server-card + .server-card {
    margin-top: 14px;
}

.server-card-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    margin-bottom: 16px;
}

.server-card-head img {
    width: 40px;
    height: 40px;
    border-radius: 6px;
}

.server-card-head h4 {
    margin: 0 auto 0 0;
    font-size: 1.1rem;
}

.server-card-head .status:first-child,
.server-card-head .visually-hidden + .status {
    margin-right: auto;
}

.server-facts {
    display: grid;
    gap: 12px;
    margin: 0;
}

.server-facts > div {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 4px 16px;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid var(--seam);
}

.server-facts dt {
    color: var(--ash);
    font-size: 0.9rem;
}

.server-facts dd {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    margin: 0;
}

@media (max-width: 560px) {
    .server-facts > div {
        grid-template-columns: 1fr;
    }
}

.server-facts code,
.secret {
    padding: 4px 10px;
    background: var(--abyss);
    border: 1px solid var(--seam);
    border-radius: 4px;
    font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
    font-size: 0.95rem;
    color: var(--bone);
}

.secret {
    letter-spacing: 0.08em;
    color: var(--dust);
}

.secret.is-revealed {
    color: var(--puffer);
    letter-spacing: 0.04em;
}

.code-dates {
    flex-basis: 100%;
    color: var(--ash);
    font-size: 0.85rem;
}

.code-warning {
    margin: 14px 0 0;
    padding: 10px 12px;
    font-size: 0.86rem;
    color: #d8c89a;
    background: rgb(207 168 101 / 0.07);
    border-left: 2px solid var(--amber);
    border-radius: 0 4px 4px 0;
}

.server-notes {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--seam);
    font-size: 0.92rem;
    color: #cfccc4;
}

.server-notes > :last-child {
    margin-bottom: 0;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    padding: 2px 10px;
    font-size: 0.82rem;
    font-weight: 600;
    border-radius: 999px;
    border: 1px solid;
}

.badge-ok {
    color: var(--verdigris);
    border-color: rgb(126 168 152 / 0.5);
    background: rgb(126 168 152 / 0.08);
}

.badge-wait {
    color: var(--amber);
    border-color: rgb(207 168 101 / 0.5);
    background: rgb(207 168 101 / 0.08);
}

/* News */
.news-list {
    display: grid;
    gap: 10px;
    margin: 0 0 14px;
    padding: 0;
    list-style: none;
}

.news-list li {
    display: grid;
    font-size: 0.94rem;
}

.news-list span {
    color: var(--dust);
    font-size: 0.82rem;
}

.news-index .news-excerpt {
    max-width: 90ch;
}

.news-index {
    display: grid;
    gap: 14px;
    margin: 0 0 24px;
    padding: 0;
    list-style: none;
}

.news-index a {
    display: grid;
    gap: 4px;
    color: var(--bone);
    text-decoration: none;
}

.news-index a:hover strong {
    text-decoration: underline;
}

.news-index strong {
    font-size: 1.15rem;
}

.news-meta {
    display: flex;
    gap: 10px;
    align-items: center;
    color: var(--dust);
    font-size: 0.85rem;
}

.news-excerpt {
    color: var(--ash);
    font-size: 0.93rem;
}

.news-body {
    max-width: 72ch;
}

.news-body h2 {
    border-top: 0;
    padding-top: 0;
}

.news-back {
    margin-top: 32px;
}

.pagination {
    display: flex;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.pagination a {
    display: block;
    padding: 6px 12px;
    border: 1px solid var(--seam);
    border-radius: var(--radius-control);
    color: var(--ash);
    text-decoration: none;
}

.pagination .active a {
    color: var(--bone);
    border-color: var(--puffer-soft);
}

/* Account */
.account-forms {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    align-items: start;
}

.account-forms .form-panel {
    max-width: none;
}

.account-forms .form-panel:first-child,
.account-forms .form-panel:last-child {
    grid-column: 1 / -1;
}

@media (max-width: 760px) {
    .account-forms {
        grid-template-columns: 1fr;
    }
}

.readonly-value {
    margin: 0;
    font-weight: 600;
    color: var(--bone);
    overflow-wrap: anywhere;
}

.auth-card form {
    margin: 0;
}

/* Donate */
.wrap.narrow {
    max-width: 640px;
}

/* Radio buttons drawn as a row of toggle buttons. */
.choice-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.choice {
    position: relative;
}

.choice input {
    position: absolute;
    opacity: 0;
    inset: 0;
    margin: 0;
    cursor: pointer;
}

.choice span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 76px;
    min-height: 44px;
    padding: 0 16px;
    font-weight: 600;
    color: var(--ash);
    background: var(--ridge);
    border: 1px solid var(--seam);
    border-radius: var(--radius-control);
}

.choice input:hover + span {
    color: var(--bone);
}

.choice input:checked + span {
    color: var(--bone);
    border-color: var(--puffer);
    background:
        linear-gradient(135deg, rgb(235 210 31 / 0.18) 0%, rgb(235 210 31 / 0.04) 70%),
        var(--ridge);
}

.choice input:focus-visible + span {
    outline: 2px solid var(--puffer);
    outline-offset: 2px;
}

.choice input:disabled + span {
    opacity: 0.45;
    cursor: not-allowed;
}

.donate-form .field .hint {
    display: block;
    margin-top: 8px;
}

.donate-form > .hint {
    margin: 14px 0 0;
    color: var(--ash);
    font-size: 0.86rem;
}

/* The custom amount only shows once "Other" is picked. */
.other-amount {
    display: none;
    margin-top: 14px;
}

.amount-row:has(input[value="other"]:checked) + .other-amount {
    display: block;
}

.other-amount label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    font-size: 0.95rem;
}

.money-input {
    display: flex;
    align-items: center;
    gap: 8px;
}

.money-input span {
    color: var(--ash);
    font-weight: 600;
}

.donation-list {
    display: grid;
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 0.93rem;
}

.donation-list li {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0 12px;
    padding: 8px 0;
    border-bottom: 1px solid var(--seam);
}

.donation-list li:last-child {
    border-bottom: 0;
}

.donation-list .muted {
    grid-column: 1 / -1;
    font-size: 0.84rem;
}

/* ---------------------------------------------------------------- Guides */

/* On phones, the contents list comes before the long guide rather than after it. */
@media (max-width: 899px) {
    .guide-layout > .aside-stack {
        order: -1;
    }

    .guide-layout .keys-card {
        display: none;
    }
}

@media (max-width: 420px) {
    .subnav a {
        padding-inline: 10px;
    }
}


.guide-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
    gap: 18px;
}

.guide-card {
    display: grid;
    padding: 0;
    overflow: hidden;
    color: var(--bone);
    text-decoration: none;
}

.guide-card img {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 7;
    object-fit: cover;
}

.guide-card-body {
    display: grid;
    gap: 6px;
    padding: 20px 24px 24px;
}

.guide-card-body strong {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 600;
    text-transform: uppercase;
}

.guide-card-body span {
    color: var(--ash);
}

.guide-card .guide-card-cta {
    margin-top: 8px;
    color: var(--puffer);
    font-weight: 600;
}

.guide-card:hover .guide-card-cta {
    text-decoration: underline;
}

.guide {
    max-width: 78ch;
}

.guide h3 {
    margin: 1.8em 0 0.5em;
    font-size: 1.15rem;
    font-weight: 600;
}

.guide h2 + .mod-links,
.guide h3 + .mod-links {
    margin-top: -0.2em;
}

.guide .mod-links {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 18px;
    margin: 0 0 1em;
    font-size: 0.88rem;
}

.guide .mod-links li {
    margin: 0;
    padding: 0;
}

.guide .mod-links li::before {
    content: none;
}

.guide .commands li::before {
    content: none;
}

.guide .commands li {
    padding-left: 0;
    color: var(--ash);
}

.guide .commands code {
    margin-right: 8px;
    color: var(--bone);
}

.guide code,
kbd {
    padding: 1px 6px;
    font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
    font-size: 0.88em;
    background: var(--abyss);
    border: 1px solid var(--seam);
    border-radius: 4px;
}

kbd {
    display: inline-block;
    min-width: 1.9em;
    text-align: center;
    color: var(--bone);
    border-bottom-width: 2px;
}

.video {
    margin: 1.2em 0 1.6em;
    aspect-ratio: 16 / 9;
    background: var(--abyss);
    border: 1px solid var(--seam);
    border-radius: var(--radius-card, 8px);
    overflow: hidden;
}

.video iframe {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
}

.shot {
    margin: 1.2em 0 1.4em;
}

.shot img {
    display: block;
    max-width: 100%;
    height: auto;
    border: 1px solid var(--seam);
    border-radius: 6px;
}

.shot figcaption {
    margin-top: 8px;
    color: var(--ash);
    font-size: 0.86rem;
}

.shot-narrow img {
    max-width: min(100%, 420px);
}

.shot-logo img {
    max-width: min(100%, 380px);
    border: 0;
    border-radius: 0;
}

.shot-pair {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.shot-pair .shot {
    margin: 0.6em 0 1.2em;
}

@media (max-width: 560px) {
    .shot-pair {
        grid-template-columns: 1fr;
    }
}

/* "Keys to know" */
.keys {
    display: grid;
    gap: 10px;
    margin: 0;
}

.keys div {
    display: grid;
    grid-template-columns: 2.6em 1fr;
    gap: 12px;
    align-items: center;
}

.keys dd {
    margin: 0;
    color: var(--ash);
    font-size: 0.94rem;
}

.keys-note {
    margin: 14px 0 0;
    font-size: 0.82rem;
}

/* Changelog: one collapsible block per version */
.changelog {
    display: grid;
    gap: 10px;
}

.changelog details {
    background: var(--slate);
    border: 1px solid var(--seam);
    border-radius: 8px;
}

.changelog details[open] {
    padding-bottom: 6px;
}

.changelog summary {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 12px;
    padding: 14px 18px;
    cursor: pointer;
    list-style: none;
}

.changelog summary::-webkit-details-marker {
    display: none;
}

.changelog summary::before {
    content: "";
    align-self: center;
    width: 0;
    height: 0;
    border-left: 6px solid var(--dust);
    border-block: 5px solid transparent;
    transition: transform 0.15s;
}

.changelog details[open] summary::before {
    transform: rotate(90deg);
}

.changelog-version {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 600;
    color: #fff;
}

.changelog-name {
    font-weight: 500;
}

.changelog-kind {
    padding: 0 8px;
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid var(--seam);
    border-radius: 999px;
    color: var(--ash);
}

.changelog-hotfix {
    color: var(--amber);
    border-color: rgb(207 168 101 / 0.45);
}

.changelog-date {
    margin-left: auto;
    color: var(--dust);
    font-size: 0.85rem;
}

.changelog details > :not(summary) {
    margin-inline: 18px;
}

.changelog h4 {
    margin: 1em 18px 0.5em;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--ash);
}

.changelog-note {
    padding: 10px 12px;
    font-size: 0.92rem;
    color: #d8c89a;
    background: rgb(207 168 101 / 0.07);
    border-left: 2px solid var(--amber);
    border-radius: 0 4px 4px 0;
}

.changelog .changelog-mods {
    columns: 2 220px;
    column-gap: 24px;
    font-size: 0.92rem;
}

.changelog .changelog-mods li {
    break-inside: avoid;
    margin-bottom: 0.4em;
}

@media (prefers-reduced-motion: reduce) {
    .changelog summary::before {
        transition: none;
    }
}

/* ---------------------------------------------------------------- Admin */

/* Admin is a working tool: no banner, a side menu, dense tables. */
.admin-shell {
    display: grid;
    grid-template-columns: 210px minmax(0, 1fr);
    gap: clamp(24px, 4vw, 48px);
    align-items: start;
    padding-block: 32px 64px;
}

.admin-nav {
    position: sticky;
    top: 88px;
}

.admin-nav-title {
    margin: 0 0 10px;
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--puffer);
}

.admin-nav ul {
    display: grid;
    gap: 2px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.admin-nav a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 7px 10px;
    border-radius: var(--radius-control);
    color: var(--ash);
    text-decoration: none;
    font-size: 0.94rem;
}

.admin-nav a:hover {
    color: var(--bone);
    background: var(--slate);
}

.admin-nav a[aria-current="page"] {
    color: var(--bone);
    background: var(--slate);
    box-shadow: inset 2px 0 0 var(--puffer);
}

.admin-nav .count {
    min-width: 1.6em;
    padding: 0 6px;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1.6;
    text-align: center;
    color: #1a1600;
    background: var(--puffer);
    border-radius: 999px;
}

.admin-nav-exit {
    margin: 18px 0 0;
    padding-top: 14px;
    border-top: 1px solid var(--seam);
    font-size: 0.9rem;
}

@media (max-width: 899px) {
    .admin-shell {
        grid-template-columns: minmax(0, 1fr);
        padding-top: 20px;
    }

    .admin-nav {
        position: static;
        margin-inline: -16px;
        padding-inline: 16px;
        border-bottom: 1px solid var(--seam);
    }

    .admin-nav-title,
    .admin-nav-exit {
        display: none;
    }

    .admin-nav ul {
        display: flex;
        overflow-x: auto;
        scrollbar-width: none;
    }

    .admin-nav a {
        white-space: nowrap;
        border-radius: 0;
    }

    .admin-nav a[aria-current="page"] {
        background: none;
        box-shadow: inset 0 -2px 0 var(--puffer);
    }
}

.admin-back {
    margin: 0 0 6px;
    font-size: 0.9rem;
}

.admin-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 20px;
    margin-bottom: 24px;
}

.admin-head h1 {
    margin: 0;
    font-size: clamp(1.8rem, 1.4rem + 1.4vw, 2.5rem);
}

.admin-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 18px;
    align-items: start;
    margin-bottom: 28px;
}

.admin-grid-wide {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
}

@media (max-width: 1100px) {
    .admin-grid-wide {
        grid-template-columns: 1fr;
    }
}

.admin-section {
    margin-top: 32px;
}

.admin-section-title {
    margin: 0 0 12px;
    font-size: 1.25rem;
}

.section-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
}

.section-head .admin-section-title {
    margin: 0;
}

.lede-admin {
    max-width: 75ch;
    margin: -8px 0 24px;
    color: var(--ash);
}

.card-subtitle {
    margin: 24px 0 10px;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    text-transform: none;
}

.empty {
    padding: 28px;
    text-align: center;
    color: var(--ash);
    border: 1px dashed var(--seam);
    border-radius: var(--radius-tile);
}

/* Key/value lists */
.facts {
    display: grid;
    gap: 10px;
    margin: 0;
}

.facts > div {
    display: grid;
    grid-template-columns: 130px minmax(0, 1fr);
    gap: 4px 14px;
    align-items: baseline;
}

.facts dt {
    color: var(--ash);
    font-size: 0.9rem;
}

.facts dd {
    margin: 0;
    overflow-wrap: anywhere;
}

.facts dd .hint {
    display: block;
    margin-top: 4px;
    color: var(--ash);
    font-size: 0.85rem;
}

@media (max-width: 480px) {
    .facts > div {
        grid-template-columns: 1fr;
    }
}

/* Tables */
.table-wrap {
    overflow-x: auto;
    border: 1px solid var(--seam);
    border-radius: var(--radius-tile);
    background: var(--slate);
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.93rem;
}

.table th,
.table td {
    padding: 11px 14px;
    text-align: left;
    vertical-align: middle;
    border-bottom: 1px solid var(--seam);
}

.table th {
    color: var(--ash);
    font-size: 0.82rem;
    font-weight: 600;
    white-space: nowrap;
    background: var(--ridge);
}

.table tbody tr:last-child td {
    border-bottom: 0;
}

.table tbody tr:hover {
    background: rgb(255 255 255 / 0.02);
}

.table-compact th,
.table-compact td {
    padding: 8px 12px;
}

.card .table-wrap {
    margin-top: 10px;
    background: var(--basalt);
}

.cell-sub {
    display: block;
    color: var(--ash);
    font-size: 0.84rem;
}

.cell-actions {
    text-align: right;
    white-space: nowrap;
}

.cell-actions > * + * {
    margin-left: 6px;
}

.table code,
.facts code,
.copy-row code {
    padding: 1px 6px;
    font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
    font-size: 0.88em;
    background: var(--abyss);
    border: 1px solid var(--seam);
    border-radius: 4px;
}

.inline-form {
    display: inline;
}

/* Filter tabs above lists */
.filter-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 16px;
}

.filter-tabs a {
    padding: 5px 12px;
    color: var(--ash);
    font-size: 0.9rem;
    text-decoration: none;
    border: 1px solid var(--seam);
    border-radius: 999px;
}

.filter-tabs a:hover {
    color: var(--bone);
}

.filter-tabs a[aria-current="page"] {
    color: var(--bone);
    border-color: var(--puffer-soft);
    background: rgb(235 210 31 / 0.06);
}

.count-quiet {
    margin-left: 2px;
    color: var(--dust);
    font-size: 0.82rem;
}

.list-tools {
    display: flex;
    flex-wrap: wrap;
    align-items: start;
    justify-content: space-between;
    gap: 10px 20px;
}

.search {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.search input {
    width: min(280px, 60vw);
    padding-block: 6px;
}

.pager-simple {
    display: flex;
    gap: 8px;
    margin-top: 14px;
}

/* Status pills beyond the members-area ones */
.badge-bad {
    color: #e0a090;
    border-color: rgb(201 128 111 / 0.5);
    background: rgb(201 128 111 / 0.08);
}

.badge-quiet {
    color: var(--ash);
    border-color: var(--seam);
}

.btn-danger {
    color: #f0c2b6;
    background: rgb(201 128 111 / 0.12);
    border: 1px solid rgb(201 128 111 / 0.55);
    box-shadow: 0 3px 0 rgb(0 0 0 / 0.85);
}

.btn-danger:hover {
    background: rgb(201 128 111 / 0.22);
}

.card-danger {
    border-color: rgb(201 128 111 / 0.35);
}

/* Donations totals */
.stat-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr));
    align-items: stretch;
}

.stat .stat-label {
    margin: 0 0 4px;
    color: var(--ash);
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 400;
    text-transform: none;
}

.stat .stat-value {
    margin: 0;
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 600;
    line-height: 1.1;
}

.stat .hint {
    margin: 6px 0 0;
}

/* Overview */
.todo {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.todo li {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 14px;
    padding: 10px 12px;
    background: var(--basalt);
    border: 1px solid var(--seam);
    border-left: 3px solid var(--amber);
    border-radius: var(--radius-control);
}

.todo-bad {
    border-left-color: var(--rust) !important;
}

.activity {
    display: grid;
    gap: 0;
    margin: 0 0 12px;
    padding: 0;
    list-style: none;
}

.activity li {
    display: grid;
    grid-template-columns: 110px minmax(0, 1fr);
    gap: 2px 14px;
    padding: 8px 0;
    border-bottom: 1px solid var(--seam);
    font-size: 0.93rem;
    overflow-wrap: anywhere;
}

@media (max-width: 560px) {
    .activity li {
        grid-template-columns: minmax(0, 1fr);
    }
}

.activity time {
    color: var(--dust);
    font-size: 0.85rem;
}

/* Forms */
.admin-form {
    max-width: none;
}

.admin-form .card-title:not(:first-of-type) {
    margin-top: 28px;
    padding-top: 22px;
    border-top: 1px solid var(--seam);
}

.field-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 0 16px;
}

textarea[rows] {
    min-height: 0;
}

.mono-input {
    font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
    font-size: 0.92rem;
    line-height: 1.55;
}

.input-medium {
    max-width: 16rem;
}

fieldset.field {
    margin: 0 0 18px;
    padding: 0;
    border: 0;
}

fieldset.field legend {
    margin-bottom: 6px;
    font-weight: 600;
    font-size: 0.95rem;
}

.stack-actions {
    display: grid;
    gap: 6px;
    justify-items: start;
}

.stack-actions .hint {
    margin: 0 0 10px;
    color: var(--ash);
    font-size: 0.85rem;
}

.card .hint {
    color: var(--ash);
    font-size: 0.86rem;
}

.quote {
    margin: 0;
    padding: 14px 16px;
    background: var(--basalt);
    border-left: 3px solid var(--puffer-soft);
    border-radius: 0 var(--radius-control) var(--radius-control) 0;
    white-space: normal;
}

.plain-list {
    margin: 0;
    padding-left: 1.2em;
}

.copy-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.big-code {
    font-size: 1.15rem !important;
    color: var(--puffer);
}

/* Access codes */
.code-card + .code-card {
    margin-top: 18px;
}

.code-card-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

.code-card-head .card-title {
    margin: 0 auto 0 0;
}

.secret-local .real {
    display: none;
}

.is-shown .secret-local .real {
    display: inline;
}

.is-shown .secret-local .mask {
    display: none;
}

.code-card details {
    margin-top: 18px;
}

.rotate > summary {
    list-style: none;
    cursor: pointer;
}

.rotate > summary::-webkit-details-marker,
.code-history > summary::-webkit-details-marker {
    display: none;
}

.rotate[open] > summary {
    display: none;
}

.rotate form {
    padding: 18px;
    background: var(--basalt);
    border: 1px solid var(--seam);
    border-radius: var(--radius-control);
}

.rotate .check {
    margin-bottom: 8px;
}

.code-history > summary {
    cursor: pointer;
    color: var(--ash);
    font-size: 0.92rem;
}

/* Games & servers */
.game-admin + .game-admin {
    margin-top: 18px;
}

.game-admin.is-retired {
    opacity: 0.6;
}

.game-admin-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 14px;
}

.game-admin-head img {
    border-radius: 6px;
}

.game-admin-head .card-title {
    margin: 0;
}

.game-admin-actions {
    display: flex;
    gap: 8px;
    margin-left: auto;
}

/* News editor */
.news-preview .preview-title {
    margin: 6px 0 12px;
    font-size: 1.4rem;
}

.news-preview .pinned-label {
    margin: 0;
}

/* ---------------------------------------------------------------- Footer */

.site-footer {
    border-top: 1px solid var(--seam);
    padding: 36px 0 48px;
    color: var(--ash);
    font-size: 0.9rem;
}

.site-footer .wrap {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px 32px;
}

.site-footer p {
    margin: 0;
}

.site-footer nav ul {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 20px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-footer a {
    color: var(--ash);
    text-decoration: none;
}

.site-footer a:hover {
    color: var(--bone);
    text-decoration: underline;
}

/* ---------------------------------------------------------------- System pages (404, errors, offline) */

/* The sign-in scene with a logo-only header: same card, a different backdrop. */
.system-scene > div {
    width: min(100%, 440px);
}

.system-code {
    margin: 22px 0 0;
    padding-top: 14px;
    border-top: 1px solid var(--seam);
    color: var(--dust);
    font-size: 0.85rem;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        transition: none !important;
        animation: none !important;
        scroll-behavior: auto !important;
    }
}
