/* ---------- Variables ---------- */
:root {
    --bg: #0a0d14;
    --bg-alt: #0f141d;
    --bg-card: #151b27;
    --border: #1f2636;
    --text: #e8ecf4;
    --text-dim: #8a94a8;
    --accent: #a855f7;
    --accent-hover: #c084fc;
    --accent-rgb: 168, 85, 247;
    --accent-glow: rgba(var(--accent-rgb), 0.4);
    --success: #22c55e;
    --font-display: 'Orbitron', 'Rajdhani', sans-serif;
    --font-body: 'Rajdhani', system-ui, sans-serif;
    --font-read: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --max-width: 1200px;
}

/* Red theme — applied to Bandit RP pages (body) and to the Bandit tile on the
   network landing (`.theme-red` class). Overrides --accent vars; everything in
   the stylesheet that uses `var(--accent*)` or `rgba(var(--accent-rgb), ...)`
   automatically picks up the new color. */
body.theme-red,
.theme-red,
html:has(body.theme-red) {
    --accent: #ef4444;
    --accent-hover: #f87171;
    --accent-rgb: 239, 68, 68;
    --accent-glow: rgba(var(--accent-rgb), 0.45);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
    scroll-behavior: smooth;
    background:
        /* Police strobe — crimson on the left edge */
        radial-gradient(ellipse 520px 1100px at -8% 50%, rgba(255, 40, 90, 0.06), transparent 55%),
        /* Police strobe — electric blue on the right edge */
        radial-gradient(ellipse 520px 1100px at 108% 50%, rgba(40, 110, 255, 0.06), transparent 55%),
        /* Sodium streetlight pool — top */
        radial-gradient(ellipse 1000px 280px at 50% -10%, rgba(255, 195, 90, 0.04), transparent 60%),
        /* Purple ambient haze */
        radial-gradient(ellipse at 50% 50%, rgba(var(--accent-rgb), 0.12), transparent 60%),
        linear-gradient(180deg, var(--bg) 0%, var(--bg-alt) 100%);
}
body {
    font-family: var(--font-body);
    color: var(--text);
    line-height: 1.6;
    font-size: 17px;
    overflow-x: hidden;
    background: transparent;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
}
body > main { flex: 1 0 auto; }
body > .site-footer { flex-shrink: 0; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 1.5rem; }
.accent { color: var(--accent); }
.eyebrow {
    display: inline-block;
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 1rem;
}

h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; line-height: 1.15; }
h2 { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 1rem; }
h3 { font-size: 1.35rem; margin-bottom: 0.75rem; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-block;
    padding: 0.85rem 1.75rem;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    border-radius: 4px;
    transition: all 0.25s ease;
    cursor: pointer;
    border: 2px solid transparent;
}
.btn-primary {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 4px 20px var(--accent-glow);
}
.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 28px var(--accent-glow);
}
.btn-outline {
    border-color: var(--accent);
    color: var(--accent);
}
.btn-outline:hover {
    background: var(--accent);
    color: #fff;
}
.btn-ghost {
    border-color: var(--border);
    color: var(--text);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-block { display: block; width: 100%; text-align: center; }
.btn-large { padding: 1.1rem 2.5rem; font-size: 1rem; }

/* ---------- Header ---------- */
.site-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    background: rgba(10, 13, 20, 0.92);
    backdrop-filter: blur(20px) saturate(140%);
    -webkit-backdrop-filter: blur(20px) saturate(140%);
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s ease;
}
.site-header.scrolled { border-bottom-color: var(--border); }
.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}
.logo { display: flex; align-items: center; gap: 0.65rem; }
.logo-back-arrow {
    display: inline-block;
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 900;
    color: var(--text-dim);
    line-height: 1;
    transition: color 0.25s ease, transform 0.25s ease;
}
.logo:hover .logo-back-arrow {
    color: var(--accent);
    transform: translateX(-3px);
}
.logo-image {
    height: clamp(24px, 3.6vh, 36px);
    width: auto;
    max-width: min(32vw, 180px);
    display: block;
    object-fit: contain;
    filter: drop-shadow(0 0 10px rgba(var(--accent-rgb), 0.45));
    transition: filter 0.25s ease, transform 0.25s ease;
}
.logo:hover .logo-image {
    filter: drop-shadow(0 0 16px rgba(var(--accent-rgb), 0.75));
    transform: translateY(-1px);
}
.logo-mark {
    display: grid;
    place-items: center;
    width: 36px; height: 36px;
    background: var(--accent);
    color: #fff;
    font-family: var(--font-display);
    font-weight: 900;
    border-radius: 4px;
    box-shadow: 0 0 20px var(--accent-glow);
}
.logo-text {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 1.25rem;
    letter-spacing: 0.05em;
}
.logo-text-sub {
    font-size: 0.95rem;
    color: var(--text-dim);
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding-left: 0.1rem;
}
@media (max-width: 480px) {
    .logo-text-sub { display: none; }
}

/* On subpages (any nav containing a back button), make the nav full-width
   so items sit at the viewport edges instead of inside the centered 1200px
   container. The home page nav (no .nav-back) keeps its centered layout. */
.site-header .nav.container:has(.nav-back),
.site-header .nav.container:not(:has(.nav-back, .logo, .nav-logo-center)) {
    max-width: none;
    padding: 0 1.75rem;
}

/* No left-anchored element (LA home, back button removed) — push nav links right. */
.site-header .nav.container:not(:has(.nav-back, .logo, .nav-logo-center)) .nav-links {
    margin-left: auto;
}

/* Back link — bare text by default. On hover, the word lights up
   inside a soft purple highlighted box. */
.nav-back {
    display: inline-flex;
    align-items: center;
    margin-right: auto;
    padding: 0.45rem 0.85rem;
    color: rgba(255, 255, 255, 0.78);
    text-decoration: none;
    font-family: 'Rajdhani', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 6px;
    transition: color 0.2s ease, background 0.2s ease,
                border-color 0.2s ease, box-shadow 0.2s ease;
}
.nav-back:hover {
    color: #fff;
    background: rgba(var(--accent-rgb), 0.16);
    border-color: rgba(var(--accent-rgb), 0.45);
    box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.1);
}
/* Icon no longer used in this style — keep markup intact, just hide it */
.nav-back-icon { display: none; }
.nav-back-text { display: inline; }

@media (max-width: 540px) {
    .nav-back { padding: 0.4rem 0.65rem; font-size: 0.9rem; }
}


.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}
.nav-links a {
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    transition: color 0.2s;
}
.nav-links a:not(.btn):hover { color: var(--accent); }

/* Active page indicator — small glowing underline beneath the current page link */
.nav-links a[aria-current="page"] {
    color: var(--accent);
    position: relative;
}
.nav-links a[aria-current="page"]::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -6px;
    width: 18px;
    height: 2px;
    background: var(--accent);
    border-radius: 2px;
    transform: translateX(-50%);
    box-shadow: 0 0 8px rgba(var(--accent-rgb), 0.65);
}

.nav-toggle { display: none; flex-direction: column; gap: 5px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--text); transition: 0.3s; }

/* ---------- Nav dropdown (Discords) ---------- */
.nav-dropdown { position: relative; }
.nav-dropdown-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-family: inherit;
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text);
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: color 0.2s;
}
.nav-dropdown-toggle:hover { color: var(--accent); }
.nav-dropdown-chevron {
    display: inline-block;
    font-size: 0.75rem;
    line-height: 1;
    transition: transform 0.25s ease;
}
.nav-dropdown.open .nav-dropdown-chevron { transform: rotate(-180deg); }
.nav-dropdown.open .nav-dropdown-toggle { color: var(--accent); }

.nav-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 220px;
    padding: 0.35rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 24px 48px -24px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(var(--accent-rgb), 0.1);
    display: flex;
    flex-direction: column;
    gap: 2px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-14px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
    z-index: 200;
}
.nav-dropdown-menu::before {
    content: '';
    position: absolute;
    top: -6px;
    right: 1.25rem;
    width: 10px;
    height: 10px;
    background: var(--bg-card);
    border-left: 1px solid var(--border);
    border-top: 1px solid var(--border);
    transform: rotate(45deg);
}
.nav-dropdown.open .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}
.nav-dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.65rem 0.85rem;
    font-family: var(--font-display);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text);
    border-radius: 5px;
    transition: background 0.2s ease, color 0.2s ease;
}
.nav-dropdown-menu a:hover {
    background: rgba(88, 101, 242, 0.12);
    color: #fff;
}
.nav-dropdown-menu svg {
    width: 16px; height: 16px;
    color: var(--accent);
    flex-shrink: 0;
}
.nav-dropdown-menu .dropdown-emoji {
    width: 18px;
    font-size: 1rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.nav-dropdown-menu a:hover { background: rgba(var(--accent-rgb), 0.12); }

/* ---------- Hero ---------- */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 8rem 0 4rem;
    overflow: hidden;
}
/* Per-section bg disabled — site-wide minimap backdrop on body handles this */
.hero-bg { display: none; }
.hero-content { position: relative; max-width: 820px; }
.hero-title {
    font-size: clamp(2.5rem, 6vw, 4.75rem);
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}
.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-dim);
    margin-bottom: 2.5rem;
    max-width: 600px;
}
.hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 4rem;
}
.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, auto);
    gap: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    max-width: 560px;
}
.stat { display: flex; flex-direction: column; }
.stat-figure { display: flex; align-items: baseline; gap: 2px; }
.stat-value {
    font-family: var(--font-display);
    font-size: 2.25rem;
    font-weight: 900;
    color: var(--text);
    line-height: 1;
}
.stat-suffix {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent);
    margin-left: 2px;
}
.stat-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--text-dim);
    margin-top: 0.5rem;
}
.scroll-hint {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    width: 22px; height: 38px;
    border: 2px solid var(--text-dim);
    border-radius: 12px;
}
.scroll-hint span {
    display: block;
    width: 3px; height: 8px;
    background: var(--accent);
    border-radius: 2px;
    margin: 6px auto 0;
    animation: scrollDot 1.8s ease-in-out infinite;
}
@keyframes scrollDot {
    0%, 100% { transform: translateY(0); opacity: 1; }
    50% { transform: translateY(10px); opacity: 0.3; }
}

/* ---------- Sections ---------- */
section { padding: 6rem 0; position: relative; }
.section-header { text-align: center; max-width: 640px; margin: 0 auto 4rem; }
.section-header p { color: var(--text-dim); font-size: 1.1rem; }

/* ---------- Features ---------- */
.features { background: var(--bg-alt); }
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}
.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 2rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}
.feature-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 3px; height: 100%;
    background: var(--accent);
    transform: scaleY(0);
    transform-origin: top;
    transition: transform 0.3s ease;
}
.feature-card:hover {
    transform: translateY(-4px);
    border-color: rgba(var(--accent-rgb), 0.3);
}
.feature-card:hover::before { transform: scaleY(1); }
.feature-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--accent);
}
.feature-card p { color: var(--text-dim); }

/* ---------- Server Info ---------- */
.server-grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 4rem;
    align-items: center;
}
.server-text p {
    color: var(--text-dim);
    font-size: 1.1rem;
    margin-bottom: 2rem;
}
.server-list { display: grid; gap: 0.75rem; }
.server-list li {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
    font-size: 1rem;
}
.server-list strong { color: var(--accent); margin-right: 0.5rem; }
.server-list code {
    background: var(--bg-card);
    padding: 0.2rem 0.55rem;
    border-radius: 3px;
    font-size: 0.9rem;
    color: var(--text);
    border: 1px solid var(--border);
}
.server-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}
.server-status {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.85rem;
}
.status-dot {
    width: 10px; height: 10px;
    background: var(--success);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--success);
    animation: pulse 2s infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}
.server-meta {
    display: grid;
    gap: 0.75rem;
    margin-bottom: 1.75rem;
    padding: 1rem 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}
.server-meta > div {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.server-meta .label {
    color: var(--text-dim);
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.1em;
}
.server-meta .value {
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--text);
}

/* ---------- Community ---------- */
.community { background: var(--bg-alt); }
.community-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
}
.community-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 2rem;
    transition: all 0.3s ease;
    display: block;
}
.community-card:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
}
.community-card p { color: var(--text-dim); margin-bottom: 1rem; }
.link-arrow {
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--accent);
    letter-spacing: 0.1em;
    font-size: 0.9rem;
}

/* ---------- CTA ---------- */
.cta {
    background:
        linear-gradient(135deg, rgba(var(--accent-rgb), 0.1), rgba(var(--accent-rgb), 0.02)),
        var(--bg);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}
.cta-inner { text-align: center; max-width: 640px; margin: 0 auto; }
.cta p { color: var(--text-dim); font-size: 1.15rem; margin-bottom: 2rem; }

/* ---------- Footer ---------- */
.site-footer {
    background: var(--bg-alt);
    padding: 4rem 0 1.5rem;
    border-top: 1px solid var(--border);
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}
.footer-brand p { color: var(--text-dim); margin-top: 0.75rem; }
.footer-col h4 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--accent);
    margin-bottom: 1rem;
}
.footer-col ul { display: grid; gap: 0.5rem; }
.footer-col a { color: var(--text-dim); transition: color 0.2s; }
.footer-col a:hover { color: var(--accent); }
.footer-bottom {
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
    text-align: center;
    color: var(--text-dim);
    font-size: 0.9rem;
}

/* Social icon row (server page footers) */
.social-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}
.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px; height: 42px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-dim);
    transition: color 0.25s ease, border-color 0.25s ease, background 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}
.social-link svg {
    width: 18px; height: 18px;
    display: block;
    fill: currentColor;
}
.social-link:hover { transform: translateY(-2px); }
.social-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.social-discord:hover {
    color: #fff;
    background: #5865F2;
    border-color: #5865F2;
    box-shadow: 0 6px 18px rgba(88, 101, 242, 0.4);
}
.social-twitter:hover {
    color: #fff;
    background: #0a0a0a;
    border-color: #333;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5);
}
.social-tiktok:hover {
    color: #fff;
    background: #000;
    border-color: #fe2c55;
    box-shadow: 0 6px 18px rgba(254, 44, 85, 0.4);
}
.social-youtube:hover {
    color: #fff;
    background: #ff0000;
    border-color: #ff0000;
    box-shadow: 0 6px 18px rgba(255, 0, 0, 0.4);
}

/* Mastodon feed strip (below CTA footer) */
.mastodon-feed {
    margin-top: 2rem;
    display: none;
}
.mastodon-feed.loaded { display: block; }
.mastodon-feed-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.9rem;
}
.mastodon-feed-label {
    font-family: var(--font-display);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--accent);
}
.mastodon-feed-link {
    font-family: var(--font-display);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--text-dim);
    transition: color 0.2s;
}
.mastodon-feed-link:hover { color: var(--accent); }
.mastodon-feed-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}
.mastodon-feed-item {
    display: block;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    padding: 0;
    cursor: pointer;
    font: inherit;
    color: inherit;
    transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}
.mastodon-feed-item:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(var(--accent-rgb), 0.22);
}
.mastodon-feed-item img {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}
.mastodon-feed-item:hover img { transform: scale(1.05); }
@media (max-width: 480px) {
    .mastodon-feed-grid { gap: 0.4rem; }
}

/* Mastodon image lightbox */
.mastodon-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.88);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    z-index: 1000;
    backdrop-filter: blur(4px);
}
.mastodon-lightbox.open { display: flex; }
.mastodon-lightbox-figure {
    margin: 0;
    max-width: min(95vw, 1400px);
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}
.mastodon-lightbox-figure img {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}
.mastodon-lightbox-figure figcaption a {
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.75);
    transition: color 0.2s;
}
.mastodon-lightbox-figure figcaption a:hover { color: var(--accent); }
.mastodon-lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1.25rem;
    background: transparent;
    border: 0;
    color: rgba(255, 255, 255, 0.85);
    font-size: 2.5rem;
    line-height: 1;
    cursor: pointer;
    padding: 0.25rem 0.6rem;
    transition: color 0.2s;
}
.mastodon-lightbox-close:hover { color: var(--accent); }

/* Legal row (terms / privacy) */
.legal-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}
.legal-link {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1.1rem;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--text-dim);
    font-family: var(--font-display);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    transition: color 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}
.legal-link:hover {
    color: var(--accent);
    border-color: var(--accent);
    background: rgba(var(--accent-rgb), 0.08);
}

/* ---------- Tutorial cards grid ---------- */
.tutorial-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.25rem;
    max-width: 1140px;
    margin: 0 auto 3rem;
}
.tutorial-card {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 1.75rem 1.5rem 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: inherit;
    text-decoration: none;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
    isolation: isolate;
}
.tutorial-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), transparent);
    opacity: 0.6;
    transition: opacity 0.3s ease;
}
.tutorial-card:hover {
    transform: translateY(-4px);
    border-color: rgba(var(--accent-rgb), 0.4);
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(var(--accent-rgb), 0.18);
}
.tutorial-card:hover::before { opacity: 1; }
.tutorial-card-num {
    font-family: var(--font-display);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 0.85rem;
}
.tutorial-card h3 {
    font-size: 1.2rem;
    margin-bottom: 0.65rem;
    letter-spacing: 0.01em;
}
.tutorial-card p {
    color: var(--text-dim);
    font-size: 0.95rem;
    margin-bottom: 1.25rem;
    flex: 1;
    line-height: 1.5;
}
.tutorial-card code {
    background: var(--bg);
    padding: 0.1rem 0.4rem;
    border-radius: 3px;
    font-size: 0.85em;
    color: var(--accent);
    border: 1px solid var(--border);
}
.tutorial-card-arrow {
    font-family: var(--font-display);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--accent);
    transition: transform 0.3s ease;
    display: inline-block;
}
.tutorial-card:hover .tutorial-card-arrow { transform: translateX(4px); }

.tutorial-back {
    display: flex;
    justify-content: center;
    margin-top: 1rem;
}

/* ---------- Tutorial content sections (keybinds / commands / FAQ) ---------- */
.tut-section {
    max-width: 1140px;
    padding: 0;
    margin: 0 auto 1.5rem;
}
.tut-section-head {
    position: relative;
    padding-bottom: 0.65rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border);
    text-align: left;
}
.tut-section-head::after {
    content: '';
    position: absolute;
    left: 0; bottom: -1px;
    width: 72px;
    height: 1px;
    background: var(--accent);
}
.tut-section-num {
    display: inline-block;
    font-family: var(--font-display);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.26em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 0.5rem;
}
.tut-section-head h2 {
    font-size: clamp(1.35rem, 2.4vw, 1.7rem);
    margin-bottom: 0.35rem;
    letter-spacing: 0.01em;
    color: var(--text);
}
.tut-section-head p {
    color: var(--text-dim);
    font-size: 0.92rem;
    margin: 0;
}

/* Cards — minimal chrome, quiet background */
.tut-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
}
.tut-card {
    padding: 1.35rem 1.5rem 1.1rem;
    background: rgba(21, 27, 39, 0.45);
    border: 1px solid var(--border);
    border-radius: 8px;
}
.tut-card h3 {
    font-family: var(--font-display);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--text-dim);
    margin: 0 0 0.9rem;
    padding-bottom: 0.7rem;
    border-bottom: 1px solid var(--border);
}

/* Key/command rows */
.kb-list {
    display: flex;
    flex-direction: column;
    margin: 0;
}
.kb-row {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 0.55rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.kb-row:first-child { padding-top: 0.2rem; }
.kb-row:last-child {
    padding-bottom: 0;
    border-bottom: none;
}
.kb-row dt {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    flex-shrink: 0;
    min-width: 3.25rem;
}
.kb-list-wide .kb-row { align-items: baseline; }
.kb-list-wide .kb-row dt { min-width: 13rem; }
.kb-row dd {
    color: var(--text);
    font-size: 0.92rem;
    margin: 0;
    line-height: 1.45;
}
.kb-note {
    color: var(--text-dim);
    opacity: 0.7;
    font-size: 0.82rem;
}
.kb-sep {
    color: var(--text-dim);
    opacity: 0.5;
    font-size: 0.85rem;
    padding: 0 0.1rem;
}

/* Keyboard key — light-on-dark physical key feel */
.kbd {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2rem;
    padding: 0.3rem 0.6rem;
    background: #232a3b;
    color: #e8ecf4;
    border: 1px solid #2e3750;
    border-bottom: 2px solid #1a2033;
    border-radius: 5px;
    font-family: var(--font-display);
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    line-height: 1;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 1px 0 rgba(0, 0, 0, 0.35);
    white-space: nowrap;
}

/* Commands — clean monospace, no chip */
.cmd {
    display: inline-block;
    font-family: monospace;
    font-size: 0.86rem;
    font-weight: 500;
    color: var(--accent);
    letter-spacing: 0.01em;
    white-space: nowrap;
}

/* FAQ accordion — softer */
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}
.faq-item {
    background: rgba(21, 27, 39, 0.4);
    border: 1px solid var(--border);
    border-radius: 6px;
    overflow: hidden;
    transition: border-color 0.25s ease, background 0.25s ease;
}
.faq-item:hover { border-color: rgba(var(--accent-rgb), 0.22); }
.faq-item[open] {
    border-color: rgba(var(--accent-rgb), 0.3);
    background: rgba(var(--accent-rgb), 0.04);
}
.faq-item summary {
    list-style: none;
    cursor: pointer;
    padding: 0.9rem 1.15rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text);
    transition: color 0.2s ease;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
    content: '+';
    color: var(--accent);
    font-size: 1.2rem;
    font-weight: 500;
    line-height: 1;
    transition: transform 0.25s ease;
    flex-shrink: 0;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item summary:hover { color: var(--accent); }
.faq-body {
    padding: 0.8rem 1.15rem 1rem;
    color: var(--text-dim);
    font-size: 0.92rem;
    line-height: 1.55;
    border-top: 1px solid var(--border);
}
.faq-body p { margin: 0 0 0.5rem; }
.faq-body p:last-child { margin-bottom: 0; }
.faq-body a {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color 0.2s ease;
}
.faq-body a:hover { color: var(--accent-hover); }
.faq-links {
    margin: 0.4rem 0 0;
    padding-left: 1.1rem;
    list-style: disc;
}
.faq-links li { margin: 0.25rem 0; }
.faq-links li::marker { color: var(--accent); }
.faq-links ul {
    margin: 0.4rem 0 0.35rem;
    padding-left: 1.1rem;
    list-style: circle;
}
.faq-links ul li { margin: 0.15rem 0; }
.faq-links ul li::marker { color: rgba(var(--accent-rgb), 0.55); }
.tut-card > p + ul.faq-links,
.tut-card > ul.faq-links + p { margin-top: 0.6rem; }

/* Long-form paragraphs inside rule sections — match the rule list's readable
   font/contrast/leading so prose and lists feel consistent. */
.rule-content .tut-card > p,
.rule-content .tut-card > .rule-subsection + p {
    font-family: var(--font-read);
    color: rgba(255, 255, 255, 0.88);
    font-size: 0.98rem;
    line-height: 1.7;
    max-width: none;
}

/* "Example walkthrough" — used in Misc strikes to chain narrative steps and
   visually distinguish them from regular rule paragraphs. */
.example-walkthrough {
    margin-top: 1.5rem;
    padding: 1.4rem 1.5rem;
    border: 1px solid rgba(var(--accent-rgb), 0.18);
    border-left: 3px solid var(--accent);
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.04), transparent 60%);
}
.example-walkthrough .example-step {
    margin: 0;
    padding: 0.55rem 0;
    font-family: var(--font-read);
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.95rem;
    line-height: 1.6;
}
.example-walkthrough .example-step-intro {
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-size: 0.72rem;
    color: rgba(var(--accent-rgb), 0.95);
    padding-bottom: 0.6rem;
    margin-bottom: 0.4rem;
    border-bottom: 1px dashed rgba(var(--accent-rgb), 0.25);
}
.example-walkthrough .example-def {
    margin: 0.6rem 0 0.4rem;
}
.strike-record {
    margin-top: 1rem;
    padding: 1.1rem 1.3rem;
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(var(--accent-rgb), 0.35);
    border-radius: 6px;
    box-shadow: inset 0 0 24px rgba(var(--accent-rgb), 0.08), 0 6px 22px -10px rgba(0, 0, 0, 0.55);
    font-family: 'JetBrains Mono', 'Consolas', 'Courier New', monospace;
    color: rgba(255, 255, 255, 0.92);
}
.strike-record-headline {
    font-size: 1.05rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.55rem;
    letter-spacing: 0.02em;
    text-shadow: 0 0 14px rgba(var(--accent-rgb), 0.45);
}
.strike-record-line {
    font-size: 0.92rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.78);
}

/* Clothing — categorical info as side-by-side cards, with a separated note */
.clothing-categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem;
    margin-bottom: 1.1rem;
}
.clothing-cat {
    padding: 1.05rem 1.2rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-left: 3px solid rgba(var(--accent-rgb), 0.55);
    border-radius: 6px;
    transition: border-color 0.25s, background 0.25s;
}
.clothing-cat:hover {
    border-color: rgba(var(--accent-rgb), 0.35);
    border-left-color: var(--accent);
    background: rgba(var(--accent-rgb), 0.04);
}
.clothing-cat > p {
    margin: 0;
    font-family: var(--font-read);
    color: rgba(255, 255, 255, 0.86);
    font-size: 0.95rem;
    line-height: 1.65;
}
.clothing-note {
    padding: 0.85rem 1.1rem;
    background: rgba(245, 158, 11, 0.06);
    border: 1px solid rgba(245, 158, 11, 0.2);
    border-left: 3px solid rgba(245, 158, 11, 0.85);
    border-radius: 6px;
}
.clothing-note > p {
    margin: 0;
    font-family: var(--font-read);
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.92rem;
    line-height: 1.6;
    font-style: italic;
}
.rule-subsection-hint {
    font-family: var(--font-read);
}


/* Slim footer variant (server pages) */
.site-footer-slim {
    padding: 1.5rem 0 1rem;
    position: relative;
    border-top: none;
}
.site-footer-slim::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, var(--accent) 50%, transparent 100%);
    opacity: 0.6;
}
.site-footer-slim .footer-bottom {
    padding-top: 1.1rem;
    border-top: none;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 2rem;
    text-align: left;
}
.site-footer-slim .footer-brand .social-row {
    margin-bottom: 0;
    gap: 1.1rem;
    justify-self: flex-start;
}
.site-footer-slim .social-link {
    width: auto; height: auto;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 0;
    color: var(--text-dim);
    transition: color 0.25s ease, transform 0.25s ease;
}
.site-footer-slim .social-link:hover {
    background: transparent;
    border-color: transparent;
    box-shadow: none;
    transform: translateY(-2px);
}
.site-footer-slim .social-link svg {
    width: 17px; height: 17px;
}
.site-footer-slim .social-discord:hover { color: #5865F2; }
.site-footer-slim .social-twitter:hover { color: var(--text); }
.site-footer-slim .social-tiktok:hover { color: #fe2c55; }
.site-footer-slim .social-youtube:hover { color: #ff0000; }
.site-footer-slim .social-play:hover { color: var(--accent); }
.site-footer-slim .social-mastodon:hover { color: #6364FF; }

/* Bandit RP (theme-red) — kill the hardcoded purple in the active rule tab gradient */
body.theme-red .rule-stripe-tab.is-active {
    background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.95), rgba(185, 28, 28, 0.85));
}

/* Brand column (left) */
.footer-brand {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.85rem;
    justify-self: start;
}
.footer-brand-mark {
    height: 2.2rem;
    width: auto;
    display: block;
    filter: drop-shadow(0 4px 12px rgba(var(--accent-rgb), 0.4));
}
.footer-brand-title {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 900;
    letter-spacing: 0.02em;
    line-height: 1;
    color: var(--text);
}
.footer-brand-title .accent { color: var(--accent); }
.footer-brand-tag {
    font-family: var(--font-display);
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--text-dim);
    line-height: 1;
}

/* Meta column (right) */
.footer-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
    justify-self: end;
}
.footer-legal {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    font-family: var(--font-display);
    font-size: 0.66rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text-dim);
    font-weight: 700;
}
.footer-legal a {
    color: var(--text-dim);
    transition: color 0.2s;
}
.footer-legal a:hover { color: var(--accent); }
.footer-legal-sep {
    display: inline-block;
    width: 3px; height: 3px;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.45;
}
.footer-copyright {
    font-size: 0.7rem;
    color: var(--text-dim);
    opacity: 0.7;
    letter-spacing: 0.02em;
    margin: 0;
    line-height: 1;
}

/* Responsive — stack to single column */
@media (max-width: 760px) {
    .site-footer-slim .footer-bottom {
        grid-template-columns: 1fr;
        gap: 1rem;
        text-align: center;
    }
    .footer-brand { align-items: center; justify-self: center; }
    .footer-meta { align-items: center; justify-self: center; }
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
    .nav-toggle { display: flex; }
    .nav-links {
        position: fixed;
        top: 72px; left: 0; right: 0;
        background: var(--bg-alt);
        flex-direction: column;
        padding: 2rem;
        gap: 1.5rem;
        border-bottom: 1px solid var(--border);
        transform: translateY(-120%);
        transition: transform 0.3s ease;
    }
    .nav-links.open { transform: translateY(0); }
    .nav-dropdown { width: 100%; text-align: center; }
    .nav-dropdown-toggle { justify-content: center; }
    .nav-dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        background: transparent;
        border: none;
        padding: 0.75rem 0 0;
        display: none;
        min-width: 0;
    }
    .nav-dropdown-menu::before { display: none; }
    .nav-dropdown.open .nav-dropdown-menu { display: flex; }
    .nav-dropdown-menu a { justify-content: center; background: rgba(88, 101, 242, 0.08); }
    .server-grid { grid-template-columns: 1fr; gap: 2.5rem; }
    .hero-stats { gap: 1.5rem; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
}
@media (max-width: 480px) {
    .hero-stats { grid-template-columns: 1fr 1fr; }
    .stat:last-child { grid-column: span 2; }
    .footer-grid { grid-template-columns: 1fr; }
}

/* Sub-page nav (rules / tutorials / punishments) shrinks instead of
   collapsing to hamburger. The centered logo is position:absolute so
   flex items don't avoid it — kill it as soon as the bar tightens. */
@media (max-width: 1180px) {
    body:has(.nav-back) .nav-logo-center { display: none; }
    body:has(.nav-back) .nav { gap: 0.75rem; }
    body:has(.nav-back) .nav-links { gap: 1rem; }
    body:has(.nav-back) .nav-links a,
    body:has(.nav-back) .nav-dropdown-toggle { font-size: 0.85rem; padding: 0; }
    body:has(.nav-back) .nav-back { padding: 0.4rem 0.65rem; font-size: 0.85rem; }
    body:has(.nav-back) .nav-search { width: 150px; margin-right: 0.75rem; }
    body:has(.nav-back) .nav-search:focus-within { width: 180px; }
}
@media (max-width: 1000px) {
    body:has(.nav-back) .nav { gap: 0.5rem; }
    body:has(.nav-back) .nav-links { gap: 0.6rem; }
    body:has(.nav-back) .nav-links a,
    body:has(.nav-back) .nav-dropdown-toggle { font-size: 0.75rem; letter-spacing: 0.02em; }
    body:has(.nav-back) .nav-back { padding: 0.3rem 0.5rem; font-size: 0.78rem; }
    body:has(.nav-back) .nav-page-title { display: none; }
    body:has(.nav-back) .nav-search { width: 110px; }
    body:has(.nav-back) .nav-search:focus-within { width: 140px; }
    body:has(.nav-back) .nav-dropdown-chevron { font-size: 0.7em; }
}

/* ---------- Multi-server hub ---------- */
.hero-compact { min-height: 80vh; padding: 7rem 0 3rem; }
.hero-compact .hero-content {
    text-align: center;
    margin: 0 auto;
}
.hero-compact .hero-subtitle { margin-left: auto; margin-right: auto; }
.hero-compact .hero-actions {
    justify-content: center;
    margin-bottom: 3rem;
}
.hero-compact .hero-stats {
    margin-left: auto;
    margin-right: auto;
    justify-content: center;
}

.servers-section { padding: 5rem 0; }

.server-grid-v2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
}

.server-tile {
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    color: inherit;
    cursor: pointer;
}
.server-tile::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), transparent);
    opacity: 0.6;
    transition: opacity 0.3s ease;
}
.server-tile:hover {
    transform: translateY(-4px);
    border-color: rgba(var(--accent-rgb), 0.4);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(var(--accent-rgb), 0.15);
}
.server-tile:hover::before { opacity: 1; }
.server-tile[data-theme="drift"]::before { background: linear-gradient(90deg, #3b82f6, transparent); }
.server-tile[data-theme="hoods"]::before { background: linear-gradient(90deg, #dc2626, transparent); }
.server-tile[data-theme="freeroam"]::before { background: linear-gradient(90deg, #22c55e, transparent); }

.server-tile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem 0.75rem;
}
.server-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 700;
    color: var(--text-dim);
}
.status-dot.online {
    background: var(--success);
    box-shadow: 0 0 10px var(--success);
    animation: pulse 2s infinite;
}
.status-dot.offline {
    background: #f59e0b;
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.6);
}
.server-tag {
    font-family: var(--font-display);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    padding: 0.35rem 0.7rem;
    background: rgba(var(--accent-rgb), 0.12);
    color: var(--accent);
    border-radius: 3px;
    border: 1px solid rgba(var(--accent-rgb), 0.2);
}
.server-tile[data-theme="drift"] .server-tag {
    background: rgba(59, 130, 246, 0.12);
    color: #60a5fa;
    border-color: rgba(59, 130, 246, 0.2);
}
.server-tile[data-theme="hoods"] .server-tag {
    background: rgba(220, 38, 38, 0.12);
    color: #f87171;
    border-color: rgba(220, 38, 38, 0.2);
}
.server-tile[data-theme="freeroam"] .server-tag {
    background: rgba(34, 197, 94, 0.12);
    color: #4ade80;
    border-color: rgba(34, 197, 94, 0.2);
}

.server-tile-body { padding: 0.5rem 1.5rem 1.25rem; flex: 1; }
.server-tile h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    letter-spacing: 0.02em;
}
.server-tile-title-img {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 0.75rem;
    min-height: 2.25rem;
}
.server-tile-logo {
    display: block;
    width: auto;
    max-width: 70%;
    max-height: 56px;
    height: auto;
}
.server-tagline {
    color: var(--text-dim);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    min-height: 2.5em;
}

.stat-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    padding: 1.25rem 0 0.25rem;
    border-top: 1px solid var(--border);
}
.stat-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    padding: 0 0.5rem;
    text-align: center;
}
.stat-cell + .stat-cell {
    border-left: 1px solid var(--border);
}
.stat-cell-value {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--text);
    letter-spacing: 0.02em;
}
.stat-cell-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--text-dim);
    font-weight: 600;
}
.server-meta-row > div { display: flex; flex-direction: column; gap: 0.25rem; }
.mini-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-dim);
}
.mini-value {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text);
}

.progress {
    height: 6px;
    background: var(--bg);
    border-radius: 3px;
    overflow: hidden;
}
.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--accent-hover));
    border-radius: 3px;
    transition: width 0.6s ease;
}

.server-tile-footer {
    display: flex;
    align-items: stretch;
    border-top: 1px solid var(--border);
    background: rgba(22, 17, 34, 0.5);
    font-family: var(--font-display);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.85rem;
}
.server-tile-footer a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    text-decoration: none;
    transition: background 0.25s ease, color 0.25s ease;
}
.footer-view {
    flex: 1;
    color: #9a8bc4;
    justify-content: flex-start;
}
.footer-view:hover { color: #d8c9ff; }
.server-tile:hover .footer-view { color: #d8c9ff; }
.footer-view .arrow { transition: transform 0.3s ease; }
.server-tile:hover .footer-view .arrow { transform: translateX(6px); }

.footer-join {
    flex: 0 0 45%;
    background: linear-gradient(135deg, #a855f7 0%, #8b3ddb 100%);
    color: #fff;
    justify-content: center;
    font-size: 0.95rem;
    letter-spacing: 0.15em;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}
.footer-join::before {
    content: '';
    position: absolute;
    top: 0;
    left: -75%;
    width: 55%;
    height: 100%;
    background: linear-gradient(100deg, transparent 0%, rgba(255, 255, 255, 0.22) 50%, transparent 100%);
    transform: skewX(-22deg);
    transition: left 0.6s ease;
}
.footer-join:hover::before { left: 130%; }
.footer-join:hover {
    background: linear-gradient(135deg, #b870ff 0%, #9747e8 100%);
    color: #fff;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.25),
        0 0 18px rgba(var(--accent-rgb), 0.35);
}

/* ---------- Network section ---------- */
.network-section {
    background: var(--bg-alt);
    padding: 6rem 0;
}
.network-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 4rem;
    align-items: center;
}
.feature-list {
    display: grid;
    gap: 0.85rem;
    margin-top: 1.5rem;
}
.feature-list li {
    padding-left: 1.5rem;
    position: relative;
    color: var(--text-dim);
}
.feature-list li::before {
    content: '';
    position: absolute;
    left: 0; top: 0.6em;
    width: 8px; height: 8px;
    background: var(--accent);
    transform: rotate(45deg);
}
.feature-list strong { color: var(--text); }

.network-panel {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1.75rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}
.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}
.panel-title {
    font-family: var(--font-display);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.9rem;
}
.status-list { display: grid; gap: 0.85rem; }
.status-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.95rem;
}
.status-ok, .status-warn {
    font-family: var(--font-display);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 0.25rem 0.6rem;
    border-radius: 3px;
}
.status-ok {
    color: var(--success);
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.25);
}
.status-warn {
    color: #f59e0b;
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.25);
}

@media (max-width: 860px) {
    .network-grid { grid-template-columns: 1fr; gap: 2.5rem; }
}

/* ---------- Server detail page ---------- */
.server-detail {
    padding: 7rem 0 1.5rem;
    position: relative;
    overflow: hidden;
}
/* Per-section bg disabled — site-wide minimap backdrop on body handles this */
.server-detail-bg { display: none; }
.breadcrumb {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    color: var(--text-dim);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
}
.breadcrumb a { color: var(--text-dim); transition: color 0.2s; }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb .sep { opacity: 0.5; }

.detail-header {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 3rem;
    align-items: start;
    margin-bottom: 4rem;
}
.detail-title { font-size: clamp(2.25rem, 5vw, 3.75rem); margin-bottom: 1rem; }
.detail-tagline {
    font-size: 1.2rem;
    color: var(--text-dim);
    margin-bottom: 2rem;
}
.detail-tagline p { margin-bottom: 0.75rem; }
.detail-tagline p:last-child { margin-bottom: 0; }
.detail-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 2rem; }

.connect-panel {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1.75rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    position: sticky;
    top: 100px;
}
.connect-panel h3 { font-size: 1.1rem; margin-bottom: 1.25rem; }
.connect-row {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.95rem;
}
.connect-row:last-of-type { border-bottom: none; }
.connect-row span:first-child {
    color: var(--text-dim);
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.1em;
}
.connect-row span:last-child { font-family: var(--font-display); font-weight: 700; }
.connect-cmd {
    margin: 1rem 0;
    padding: 0.9rem 1rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 5px;
    font-family: monospace;
    font-size: 0.9rem;
    color: var(--accent);
    word-break: break-all;
}

.detail-sections {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    max-width: 900px;
}
.detail-block h2 { font-size: 1.75rem; margin-bottom: 1.25rem; }
.detail-block p { color: var(--text-dim); margin-bottom: 1rem; }
.detail-block ul { display: grid; gap: 0.65rem; margin-top: 1rem; }
.detail-block ul li {
    padding-left: 1.5rem;
    position: relative;
    color: var(--text-dim);
}
.detail-block ul li::before {
    content: '\25B8';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: 700;
}
.detail-block strong { color: var(--text); }

.rules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}
.rule-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 1.25rem;
}
.rule-card h4 {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent);
    margin-bottom: 0.5rem;
}
.rule-card p { font-size: 0.95rem; color: var(--text-dim); margin: 0; }

@media (max-width: 860px) {
    .detail-header { grid-template-columns: 1fr; }
    .connect-panel { position: static; }
}

/* ---------- Server hero (full-width, un-boxed, centered) ---------- */
.server-hero {
    margin: 0 auto 1.5rem;
    max-width: 1140px;
    text-align: center;
}
.server-hero .detail-title,
.server-hero .detail-tagline {
    max-width: 820px;
    margin-left: auto;
    margin-right: auto;
}
.server-hero .detail-tagline { text-align: center; }
.server-hero .detail-tags { margin-bottom: 1.75rem; justify-content: center; }

/* ---------- Server panel: flows as a page section, not a card ---------- */
.server-panel {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
    max-width: none;
    margin: 2.25rem 0 0;
    position: relative;
    overflow: visible;
    isolation: isolate;
}
.server-panel-body { padding: 0; }

/* No card halo — let the section background show through */
.server-panel > .server-panel-bg { display: none; }
.server-panel > *:not(.server-panel-bg) { position: relative; }

/* Title row */
.detail-title-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
    text-align: center;
}
.detail-title-row .detail-title { margin-bottom: 0; }

/* Image-based title (centered wordmark) */
.detail-title-img {
    line-height: 0;
    padding: 0;
    margin-left: auto;
    margin-right: auto;
}
.detail-title-image {
    display: block;
    height: clamp(5.5rem, 13vw, 10rem);
    width: auto;
    max-width: 100%;
    margin: 0 auto;
    filter: drop-shadow(0 10px 36px rgba(var(--accent-rgb), 0.45));
    animation: wordmark-float 5s ease-in-out infinite;
    transform-origin: center center;
}
@keyframes wordmark-float {
    0%, 100% { transform: translateY(0) scale(1); filter: drop-shadow(0 10px 36px rgba(var(--accent-rgb), 0.45)); }
    50%      { transform: translateY(-4px) scale(1.04); filter: drop-shadow(0 14px 44px rgba(var(--accent-rgb), 0.6)); }
}
@media (prefers-reduced-motion: reduce) {
    .detail-title-image { animation: none; }
}

.live-dot {
    width: 9px; height: 9px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 10px var(--success), 0 0 0 3px rgba(34, 197, 94, 0.15);
    animation: pulse 2s infinite;
    flex-shrink: 0;
}
.live-dot.offline {
    background: #ef4444;
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.75), 0 0 0 3px rgba(239, 68, 68, 0.15);
}

/* ----- Bare full-width metrics strip ----- */
.server-panel-metrics {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    padding: 0 0 2.5rem;
    margin-bottom: 0;
}
.metric {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 0 1.5rem;
    min-width: 0;
    position: relative;
}
.metric + .metric { border-left: 1px solid var(--border); }
.metric-value {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: clamp(1.5rem, 3.4vw, 2.2rem);
    color: var(--text);
    line-height: 1;
    letter-spacing: 0.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}
.metric-value-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    color: var(--success);
    overflow: visible;
}
.metric-value-status:has(.live-dot.offline) { color: #ef4444; }
.metric-value-status .live-dot {
    width: 11px; height: 11px;
}
.metric-label {
    font-family: var(--font-display);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.22em;
    color: var(--text-dim);
    font-weight: 700;
    margin-top: 0.75rem;
}
.metric-bar {
    width: 100%;
    max-width: 160px;
    margin-top: 0.9rem;
    height: 3px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
    overflow: hidden;
}
.metric-bar-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--accent), var(--accent-hover));
    border-radius: 3px;
    box-shadow: 0 0 10px var(--accent-glow);
    transition: width 0.6s ease;
}

@media (max-width: 860px) {
    .server-panel-metrics { grid-template-columns: repeat(2, 1fr); row-gap: 1.5rem; padding-bottom: 2rem; }
    .metric { padding: 0 1rem; }
    .metric:nth-child(odd) { border-left: none; }
}
@media (max-width: 480px) {
    .server-panel-metrics { grid-template-columns: 1fr; row-gap: 0; padding: 0 0 1.5rem; }
    .metric { padding: 1.25rem 0; border-top: 1px solid var(--border); border-left: none !important; }
    .metric:first-child { border-top: none; }
}

/* ----- CTA button group (Connect primary + Discord/Store outlined) ----- */
.server-panel-footer {
    --spring: cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.65rem;
    margin-top: 1.5rem;
    font-family: var(--font-display);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.82rem;
}
.server-panel-footer a {
    flex: 1 1 180px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 0.95rem 1.4rem;
    border-radius: 6px;
    border: 1px solid transparent;
    background-clip: padding-box;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    isolation: isolate;
    cursor: pointer;
    transition:
        color 0.25s ease,
        background-color 0.3s ease,
        border-color 0.3s ease,
        transform 0.35s var(--spring),
        box-shadow 0.3s ease,
        opacity 0.25s ease,
        filter 0.25s ease;
    will-change: transform;
}
/* Subtle shine sweep */
.server-panel-footer a::before {
    content: '';
    position: absolute;
    top: 0; left: -75%;
    width: 55%; height: 100%;
    background: linear-gradient(100deg, transparent 0%, rgba(255, 255, 255, 0.18) 50%, transparent 100%);
    transform: skewX(-22deg);
    transition: left 0.7s ease;
    z-index: 2;
    pointer-events: none;
    opacity: 0;
}
.server-panel-footer a:hover::before { left: 130%; opacity: 1; }
/* Cursor-tracked soft glow */
.server-panel-footer a::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle 110px at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, 0.18), transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
    pointer-events: none;
    mix-blend-mode: soft-light;
}
.server-panel-footer a:hover::after { opacity: 1; }
.server-panel-footer a > * { position: relative; z-index: 3; }
.server-panel-footer a:hover {
    transform: translateY(-2px);
    z-index: 2;
}
.server-panel-footer a:active {
    transform: translateY(0);
    transition-duration: 0.1s;
}
.server-panel-footer a:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}
.server-panel-footer:hover a:not(:hover) {
    opacity: 0.5;
    filter: saturate(0.7);
}
.server-panel-footer .btn-icon {
    width: 16px; height: 16px;
    display: block;
    transition: transform 0.35s var(--spring), filter 0.3s ease;
    transform-origin: center;
    will-change: transform;
}
.server-panel-footer .btn-emoji {
    width: auto; height: auto;
    font-size: 1.05rem;
    line-height: 1;
    display: inline-block;
}

/* --- Connect: outlined purple by default, fills on hover --- */
.footer-connect {
    flex: 1.7 1 260px;
    color: #d9b8ff;
    background: rgba(var(--accent-rgb), 0.06);
    border-color: rgba(var(--accent-rgb), 0.4);
}
.footer-connect:hover {
    color: #fff;
    background: linear-gradient(135deg, var(--accent) 0%, #8b3ddb 100%);
    border-color: var(--accent);
    box-shadow: 0 10px 28px rgba(var(--accent-rgb), 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.25);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}
.footer-connect:hover .btn-icon {
    animation: iconPulse 0.9s ease-in-out infinite;
    filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.6));
}
.footer-connect .arrow {
    font-size: 1.05rem;
    display: inline-block;
    position: relative;
    transition: transform 0.35s var(--spring);
}
.footer-connect .arrow::before {
    content: '\2192';
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: transform 0.45s ease, opacity 0.45s ease;
}
.footer-connect:hover .arrow { transform: translateX(8px); }
.footer-connect:hover .arrow::before { opacity: 0.45; transform: translateX(-10px); }

/* --- Discord: outlined blurple (secondary) --- */
.footer-discord {
    color: #a5b4fc;
    background: rgba(88, 101, 242, 0.06);
    border-color: rgba(88, 101, 242, 0.35);
}
.footer-discord:hover {
    color: #fff;
    background: #5865F2;
    border-color: #5865F2;
    box-shadow: 0 10px 28px rgba(88, 101, 242, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.18);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}
.footer-discord:hover .btn-icon {
    animation: iconWiggle 0.7s ease-in-out;
    filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.5));
}

/* --- Store: outlined amber (secondary) --- */
.footer-store {
    color: #fcd34d;
    background: rgba(245, 158, 11, 0.06);
    border-color: rgba(245, 158, 11, 0.35);
}
.footer-store:hover {
    color: #fff;
    background: #f59e0b;
    border-color: #f59e0b;
    box-shadow: 0 10px 28px rgba(245, 158, 11, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.18);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}
.footer-store .btn-icon { transform-origin: 50% 15%; }
.footer-store:hover .btn-icon {
    animation: iconSway 1.1s ease-in-out infinite;
    filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.5));
}

/* Icon keyframes */
@keyframes iconPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.22); }
}
@keyframes iconWiggle {
    0% { transform: rotate(0deg); }
    20% { transform: rotate(-14deg); }
    40% { transform: rotate(14deg); }
    60% { transform: rotate(-8deg); }
    80% { transform: rotate(6deg); }
    100% { transform: rotate(0deg); }
}
@keyframes iconSway {
    0%, 100% { transform: rotate(-8deg); }
    50% { transform: rotate(8deg); }
}
@media (prefers-reduced-motion: reduce) {
    .server-panel-footer a,
    .server-panel-footer .btn-icon,
    .footer-connect .arrow { transition: none; animation: none !important; }
    .server-panel-footer a:hover { transform: none; }
}

@media (max-width: 620px) {
    .footer-connect { flex: 1 1 100%; }
    .footer-discord, .footer-store { flex: 1 1 calc(50% - 0.325rem); }
}
@media (max-width: 420px) {
    .footer-discord, .footer-store { flex: 1 1 100%; }
}


/* ---------- Quick links grid ---------- */
.server-quick-links { margin-bottom: 3.5rem; }
.server-quick-links > h2 { font-size: 1.75rem; margin-bottom: 1.5rem; }
.quick-link-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
}
.quick-link-card {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.4rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    text-align: center;
    transition: transform 0.25s ease, border-color 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
    position: relative;
    overflow: hidden;
}
.quick-link-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 2px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}
.quick-link-card:hover {
    transform: translateY(-3px);
    border-color: rgba(var(--accent-rgb), 0.4);
    color: var(--accent);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}
.quick-link-card:hover::before { transform: scaleX(1); }

/* ---------- Discord module ---------- */
.server-discord-module { margin-bottom: 3.5rem; }
.server-discord-module > h2 { font-size: 1.75rem; margin-bottom: 1.5rem; }

.discord-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.95rem 1.75rem;
    background: #5865F2;
    color: #fff;
    border-radius: 5px;
    font-family: var(--font-display);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.9rem;
    transition: background 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
    box-shadow: 0 4px 18px rgba(88, 101, 242, 0.35);
}
.discord-toggle:hover {
    background: #4752C4;
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(88, 101, 242, 0.5);
}
.discord-toggle .arrow { transition: transform 0.3s ease; display: inline-block; }
.discord-toggle[aria-expanded="true"] .arrow { transform: rotate(180deg); }

.discord-list {
    display: grid;
    gap: 0.75rem;
    margin-top: 1.25rem;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, margin-top 0.4s ease;
}
.server-discord-module.open .discord-list {
    max-height: 800px;
}
.discord-entry {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 1.1rem 1.35rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 6px;
    transition: border-color 0.25s ease, transform 0.25s ease;
}
.discord-entry:hover {
    border-color: #5865F2;
    transform: translateX(4px);
}
.discord-entry-body { display: flex; flex-direction: column; }
.discord-entry-body strong {
    font-family: var(--font-display);
    font-size: 1rem;
    color: var(--text);
    letter-spacing: 0.02em;
}
.discord-entry-body span {
    color: var(--text-dim);
    font-size: 0.85rem;
    margin-top: 0.2rem;
}
.discord-cta {
    color: #5865F2;
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: 0.12em;
    font-size: 0.85rem;
    text-transform: uppercase;
    white-space: nowrap;
}

/* ---------- Entry mode: direct link ---------- */
body.entry-direct .breadcrumb { display: none; }
body.entry-direct .logo {
    pointer-events: none;
    cursor: default;
}
body.entry-direct .logo:hover .logo-image { filter: drop-shadow(0 0 10px rgba(var(--accent-rgb), 0.45)); transform: none; }

/* ==================================================================
   Rules — Chooser, layout with sticky ToC, pager
   ================================================================== */
html { scroll-behavior: smooth; }

.rule-chooser {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}
.rule-card {
    display: flex;
    flex-direction: column;
    padding: 1.75rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    color: #fff;
    text-decoration: none;
    transition: transform 0.15s, border-color 0.15s, background 0.15s;
}
.rule-card:hover {
    transform: translateY(-3px);
    border-color: rgba(var(--accent-rgb), 0.55);
    background: rgba(var(--accent-rgb), 0.08);
}
.rule-card h3 {
    font-family: 'Orbitron', sans-serif;
    margin: 0 0 0.5rem;
    font-size: 1.5rem;
    letter-spacing: 0.02em;
}
.rule-card p {
    margin: 0;
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.95rem;
    line-height: 1.45;
}
.rule-card-list {
    list-style: none;
    padding: 0;
    margin: 1.25rem 0 0;
    display: grid;
    gap: 0.4rem;
}
.rule-card-list li {
    padding: 0.4rem 0.8rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    border-left: 2px solid rgba(var(--accent-rgb), 0.6);
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.9rem;
}
.rule-card-arrow {
    display: inline-block;
    margin-top: 1.5rem;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(var(--accent-rgb), 0.9);
}

/* Long rule page layout */
.rule-layout {
    display: grid;
    gap: 2rem;
    grid-template-columns: minmax(180px, 220px) 1fr;
    align-items: start;
    margin-top: 1.5rem;
}

.rule-layout-rhs { position: relative; }

/* Legacy left-rail TOC (kept for any other page) */
.rule-toc {
    position: sticky;
    top: 6rem;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
}
.rule-toc-label {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.22em;
    color: rgba(var(--accent-rgb), 0.85);
    padding: 0.25rem 0.75rem 0.5rem;
}
.rule-toc a {
    padding: 0.55rem 0.75rem;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.95rem;
    border-radius: 8px;
    border-left: 2px solid transparent;
    transition: color 0.15s, background 0.15s, border-color 0.15s;
}
.rule-toc a:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.04);
}
.rule-toc a.is-active {
    color: #fff;
    background: rgba(var(--accent-rgb), 0.15);
    border-left-color: rgba(var(--accent-rgb), 0.9);
}

/* Reset chapter counter per visible ruleset */
.rule-content,
.rule-ruleset { counter-reset: rb-chapter; }

/* Sections separated by a small breathing gap */
.rule-ruleset {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}
.rule-sections { display: flex; flex-direction: column; gap: 1.5rem; }

.rule-section {
    counter-increment: rb-chapter;
    scroll-margin-top: 5.25rem;
    position: relative;
    margin: 0;
    padding: 0;
}
/* Zero out the trailing margin of whatever ends a section so the next
   section's heading sits flush. */
.rule-section > :last-child,
.rule-section .tut-card > :last-child { margin-bottom: 0; }

/* Section heading — bigger, accented, with a left bar for stronger anchor */
.rule-section h2 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.55rem;
    margin: 0 0 0.85rem;
    padding: 0.2rem 0 0.2rem 0.95rem;
    letter-spacing: 0.01em;
    display: flex;
    align-items: center;
    gap: 0.85rem;
    flex-wrap: wrap;
    position: relative;
    color: #fff;
}
.rule-section h2::before {
    content: '';
    position: absolute;
    left: 0;
    top: 12%;
    bottom: 12%;
    width: 3px;
    background: var(--accent);
    border-radius: 2px;
    box-shadow: 0 0 12px rgba(var(--accent-rgb), 0.55);
}
.rule-section h2::after {
    content: '';
    flex: 1;
    height: 1px;
    min-width: 40px;
    background: linear-gradient(90deg, rgba(var(--accent-rgb), 0.32), transparent 85%);
    align-self: center;
}

.rule-section-sub {
    font-family: var(--font-read);
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
    margin: 0 0 1.1rem;
    line-height: 1.7;
    padding-left: 0.1rem;
    max-width: none;
}

/* Subsection — clean underlined heading, sits below the main h2 in hierarchy */
.rule-subsection {
    display: block;
    font-family: 'Rajdhani', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: none;
    color: rgba(var(--accent-rgb), 1);
    margin: 1.85rem 0 0.7rem;
    padding: 0 0 0.5rem;
    background: transparent;
    border: 0;
    border-bottom: 1px solid rgba(var(--accent-rgb), 0.28);
    border-radius: 0;
    scroll-margin-top: 5.25rem;
    text-shadow: 0 0 16px rgba(var(--accent-rgb), 0.25);
}
.rule-subsection::before { content: none; }
.tut-card > .rule-subsection:first-child { margin-top: 0.25rem; }
.rule-subsection-hint {
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.88rem;
    margin: -0.25rem 0 0.6rem;
    font-style: italic;
    padding-left: 0.25rem;
}

/* Rulebook intro — welcome blurb above the first chapter, ties into the
   codex aesthetic via a chapter-pill-style eyebrow. */
.rule-intro {
    margin: 0 0 1.75rem;
    padding: 0.25rem 0 1.4rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    width: 100%;
    max-width: none;
}
.rule-intro p { max-width: none; width: 100%; }
.rule-intro-heading {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    flex-wrap: wrap;
    margin: 0 0 1rem;
}
.rule-intro-heading::after {
    content: '';
    flex: 1;
    height: 1px;
    min-width: 40px;
    background: linear-gradient(90deg, rgba(var(--accent-rgb), 0.32), transparent 85%);
    align-self: center;
}
.rule-intro-eyebrow {
    display: inline-block;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: rgba(var(--accent-rgb), 0.95);
    background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.18), rgba(var(--accent-rgb), 0.04));
    border: 1px solid rgba(var(--accent-rgb), 0.36);
    border-radius: 4px;
    padding: 0.4rem 0.6rem;
    line-height: 1;
    text-shadow: 0 0 14px rgba(var(--accent-rgb), 0.45);
    flex: none;
}
.rule-intro-lead {
    font-family: var(--font-read);
    color: rgba(255, 255, 255, 0.95);
    font-size: 1.05rem;
    line-height: 1.7;
    margin: 0 0 0.8rem;
}
.rule-intro-body {
    font-family: var(--font-read);
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.98rem;
    line-height: 1.7;
    margin: 0;
}
.rule-intro-link {
    color: var(--accent);
    text-decoration: none;
    border-bottom: 1px solid rgba(var(--accent-rgb), 0.4);
    transition: color 0.18s ease, border-color 0.18s ease;
}
.rule-intro-link:hover {
    color: #fff;
    border-bottom-color: var(--accent);
}

/* "Codex" — boxless rule body. The .tut-card is now a transparent
   semantic wrapper; rules sit on a vertical accent rail (.faq-links) below. */
.rule-content .tut-card {
    position: relative;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    overflow: visible;
    isolation: auto;
}
.rule-content .tut-card:hover {
    border-color: transparent;
    box-shadow: none;
    transform: none;
}
.rule-content .tut-card::before,
.rule-content .tut-card::after { content: none; display: none; }

/* Chapter divider between sections */
.rule-sections > .rule-section + .rule-section {
    position: relative;
    padding-top: 0.5rem;
}
.rule-sections > .rule-section + .rule-section::before {
    content: '';
    position: absolute;
    top: -1.65rem;
    left: 50%;
    width: 28%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(var(--accent-rgb), 0.35), transparent);
    transform: translateX(-50%);
    pointer-events: none;
}
.rule-sections > .rule-section + .rule-section::after {
    content: '';
    position: absolute;
    top: calc(-1.65rem - 3px);
    left: 50%;
    width: 7px;
    height: 7px;
    background: var(--accent);
    border-radius: 50%;
    box-shadow: 0 0 12px rgba(var(--accent-rgb), 0.85);
    transform: translateX(-50%);
    pointer-events: none;
}

/* === Boxless rule rows — no spine, just numbered hairlines === */
.rule-content .faq-links {
    list-style: none;
    margin: 0;
    padding: 0;
    counter-reset: rb-rule;
    position: relative;
}
.rule-content .faq-links > li {
    counter-increment: rb-rule;
    position: relative;
    padding: 0.7rem 0.6rem 0.7rem 3.4rem;
    margin: 0;
    border: 0;
    border-radius: 6px;
    font-family: var(--font-read);
    font-size: 0.96rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.93);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06);
    transition: color 0.18s ease, background 0.18s ease;
}
.rule-content .faq-links > li:last-child { box-shadow: none; }
.rule-content .faq-links > li::marker { content: ''; }
.rule-content .faq-links > li::before {
    content: counter(rb-rule, decimal);
    position: absolute;
    top: 0.9rem;
    left: 0.6rem;
    min-width: 1.9rem;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: rgba(var(--accent-rgb), 0.85);
    background: transparent;
    border: 0;
    padding: 0;
    line-height: 1;
    text-align: center;
    transition: color 0.18s ease, text-shadow 0.18s ease;
}
.rule-content .faq-links > li:hover {
    color: #fff;
    background: transparent;
}
.rule-content .faq-links > li:hover::before {
    color: var(--accent);
    text-shadow: 0 0 12px rgba(var(--accent-rgb), 0.7);
}

/* Nested ul inside a rule li — keep simple bullets, skip number badge */
.rule-content .faq-links ul {
    list-style: disc;
    padding-left: 1.15rem;
    margin: 0.55rem 0 0.15rem;
}
.rule-content .faq-links ul li {
    counter-increment: none;
    display: list-item;
    padding: 0.05rem 0;
    border: 0;
    margin: 0.18rem 0;
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.93rem;
}
.rule-content .faq-links ul li::before {
    content: none;
    display: none;
}
.rule-content .faq-links ul li::marker { color: rgba(var(--accent-rgb), 0.55); }
.rule-content .faq-links ul li:hover {
    background: transparent;
    border-color: transparent;
}

/* Inline <code class="cmd"> chip */
.rule-content code.cmd,
.rule-content .faq-links code {
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 0.85em;
    padding: 0.05em 0.4em;
    color: #f0e6ff;
    background: rgba(var(--accent-rgb), 0.14);
    border: 1px solid rgba(var(--accent-rgb), 0.28);
    border-radius: 4px;
}

/* Glossary-style kb-list inside rules — hairline rows, no rail */
.rule-content .kb-list {
    margin: 0;
    border-radius: 0;
    overflow: visible;
    padding-left: 0;
}
.rule-content .kb-row {
    padding: 0.55rem 0;
    gap: 1.1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 0;
    transition: color 0.18s ease;
}
.rule-content .kb-row:hover {
    background: transparent;
    color: #fff;
}
.rule-content .kb-row:first-child { padding-top: 0.4rem; }
.rule-content .kb-row:last-child {
    padding-bottom: 0.4rem;
    border-bottom: 0;
}
.rule-content .kb-row dt {
    color: rgba(var(--accent-rgb), 0.95);
    font-weight: 600;
    letter-spacing: 0.01em;
}
.rule-content .kb-row dd {
    color: rgba(255, 255, 255, 0.85);
}

.rule-pager {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    margin: 2.75rem 0 1rem;
    flex-wrap: wrap;
}
.rule-pager > * { flex: 1; min-width: 160px; }
.rule-pager .rule-pager-next { text-align: right; }
.rule-pager a.is-disabled { opacity: 0.35; pointer-events: none; }

@media (max-width: 780px) {
    .rule-layout { grid-template-columns: 1fr; }
    .rule-toc {
        position: sticky;
        top: 5rem;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.35rem;
        z-index: 10;
        padding: 0.6rem;
        background: rgba(10, 10, 15, 0.85);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
    }
    .rule-toc-label { display: none; }
    .rule-toc a {
        padding: 0.35rem 0.85rem;
        font-size: 0.85rem;
        border: 1px solid rgba(255, 255, 255, 0.08);
        border-left: 1px solid rgba(255, 255, 255, 0.08);
        border-radius: 999px;
    }
    .rule-toc a.is-active {
        background: rgba(var(--accent-rgb), 0.2);
        border-color: rgba(var(--accent-rgb), 0.5);
    }
}

/* Sidebar nav — flat / Twitch-style left rail (no surrounding box) */
.rule-panel {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    padding: 0;
    background: none;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    overflow: visible;
}
.rule-panel::before { content: none; }

.rule-panel-head {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    padding: 0 0.5rem 0.55rem;
    border-bottom: 0;
}
.rule-panel-eyebrow {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.6rem;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: rgba(var(--accent-rgb), 0.9);
}
.rule-panel-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: #fff;
}

.rule-switch {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    padding: 0.25rem;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 11px;
    isolation: isolate;
}
.rule-switch-thumb {
    position: absolute;
    top: 0.25rem;
    bottom: 0.25rem;
    left: 0.25rem;
    width: calc(50% - 0.25rem);
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.38), rgba(var(--accent-rgb), 0.16));
    box-shadow: 0 6px 18px -8px rgba(var(--accent-rgb), 0.55), inset 0 0 0 1px rgba(var(--accent-rgb), 0.45);
    transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 0;
}
.rule-switch[data-active="faction"] .rule-switch-thumb { transform: translateX(100%); }
.rule-switch button {
    position: relative;
    z-index: 1;
    appearance: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.55);
    border: 0;
    padding: 0.55rem 0.6rem;
    font-family: 'Rajdhani', sans-serif;
    font-size: 0.88rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    cursor: pointer;
    transition: color 0.2s;
}
.rule-switch button:hover { color: rgba(255, 255, 255, 0.85); }
.rule-switch button.is-active { color: #fff; }

/* Centered 3-segment pill switcher (Server / Gang / Wager) — sits above rule-layout */
.rule-pills {
    position: relative;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    width: fit-content;
    max-width: 100%;
    margin: 0 auto 2rem;
    padding: 0.3rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    backdrop-filter: blur(6px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.rule-pills-thumb {
    position: absolute;
    top: 0.3rem;
    bottom: 0.3rem;
    left: 0.3rem;
    width: calc((100% - 0.6rem) / 3);
    background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.95), rgba(124, 58, 237, 0.85));
    border-radius: 999px;
    box-shadow: 0 6px 20px -6px rgba(var(--accent-rgb), 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.18);
    transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
}
.rule-pills[data-active="faction"] .rule-pills-thumb { transform: translateX(100%); }
.rule-pills[data-active="wager"] .rule-pills-thumb { transform: translateX(200%); }
.rule-pills button {
    position: relative;
    z-index: 1;
    background: transparent;
    border: 0;
    padding: 0.7rem 1.6rem;
    color: var(--text-dim);
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    cursor: pointer;
    white-space: nowrap;
    transition: color 0.25s;
}
.rule-pills button:hover { color: rgba(255, 255, 255, 0.85); }
.rule-pills button.is-active { color: #fff; }
@media (max-width: 600px) {
    .rule-pills button { padding: 0.6rem 1rem; font-size: 0.78rem; letter-spacing: 0.1em; }
}

/* Skewed "stripe" tabs in the nav (Server / Gang / Wager) — hi-tech parallelogram style */
.rule-stripe {
    display: inline-flex;
    align-items: stretch;
    gap: 0.35rem;
    margin-left: 1rem;
    padding-left: 1rem;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    height: 32px;
}
.rule-stripe-tab {
    position: relative;
    padding: 0 1.15rem;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 3px;
    transform: skewX(-16deg);
    cursor: pointer;
    transition: background 0.25s, border-color 0.25s, box-shadow 0.25s, transform 0.25s;
    overflow: hidden;
}
.rule-stripe-tab > span {
    display: inline-block;
    transform: skewX(16deg);
    color: var(--text-dim);
    font-family: 'Orbitron', sans-serif;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    line-height: 30px;
    transition: color 0.25s, text-shadow 0.25s;
}
.rule-stripe-tab::after {
    content: '';
    position: absolute;
    top: 0; left: -50%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.12), transparent);
    transition: left 0.5s ease;
    pointer-events: none;
}
.rule-stripe-tab:hover {
    background: rgba(var(--accent-rgb), 0.08);
    border-color: rgba(var(--accent-rgb), 0.25);
}
.rule-stripe-tab:hover > span { color: rgba(255, 255, 255, 0.9); }
.rule-stripe-tab:hover::after { left: 150%; }
.rule-stripe-tab.is-active {
    background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.95), rgba(124, 58, 237, 0.8));
    border-color: rgba(var(--accent-rgb), 0.55);
    box-shadow: 0 4px 18px -4px rgba(var(--accent-rgb), 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
.rule-stripe-tab.is-active > span {
    color: #fff;
    text-shadow: 0 0 12px rgba(255, 255, 255, 0.35);
}
@media (max-width: 900px) {
    .rule-stripe { gap: 0.25rem; height: 28px; margin-left: 0.6rem; padding-left: 0.6rem; }
    .rule-stripe-tab { padding: 0 0.85rem; }
    .rule-stripe-tab > span { font-size: 0.62rem; letter-spacing: 0.12em; line-height: 26px; }
}
@media (max-width: 720px) {
    .rule-stripe { display: none; }
}


/* Vertical rulebook list (deprecated — kept for compatibility) */
.rule-book-list {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    padding-bottom: 1.1rem;
    margin-bottom: 1.1rem;
    border-bottom: 1px solid var(--border);
}
.rule-book-list-label {
    font-family: var(--font-display);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--text-dim);
    margin-bottom: 0.5rem;
    padding: 0 0.4rem;
}
.rule-book-item {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.55rem 0.75rem;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 6px;
    color: var(--text-dim);
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    cursor: pointer;
    text-align: left;
    transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.2s;
}
.rule-book-item:hover {
    background: rgba(var(--accent-rgb), 0.06);
    color: rgba(255, 255, 255, 0.85);
}
.rule-book-item.is-active {
    color: #fff;
    background: linear-gradient(90deg, rgba(var(--accent-rgb), 0.2), rgba(var(--accent-rgb), 0.04));
    border-color: rgba(var(--accent-rgb), 0.35);
}
.rule-book-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
    transition: background 0.25s, box-shadow 0.25s, transform 0.25s;
    flex: none;
}
.rule-book-item:hover .rule-book-dot { background: rgba(255, 255, 255, 0.35); }
.rule-book-item.is-active .rule-book-dot {
    background: var(--accent);
    box-shadow: 0 0 12px rgba(var(--accent-rgb), 0.7);
    transform: scale(1.15);
}
.rule-book-name { flex: 1; }

.rule-search {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0 0.75rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 10px;
    transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}
.rule-search:focus-within {
    border-color: rgba(var(--accent-rgb), 0.5);
    background: rgba(var(--accent-rgb), 0.05);
    box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.12);
}
.rule-search svg {
    width: 14px; height: 14px;
    flex: none;
    color: rgba(255, 255, 255, 0.45);
    transition: color 0.15s;
}
.rule-search:focus-within svg { color: rgba(var(--accent-rgb), 0.9); }
.rule-search input {
    flex: 1;
    min-width: 0;
    background: transparent;
    border: 0;
    outline: 0;
    color: #fff;
    font: inherit;
    font-size: 0.9rem;
    padding: 0.55rem 0;
}
.rule-search input::placeholder { color: rgba(255, 255, 255, 0.35); }
.rule-search input::-webkit-search-cancel-button { filter: invert(1) opacity(0.5); }

.rule-panel-sections {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-top: 0.1rem;
}
.rule-panel-label {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.6rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.35);
    padding: 0 0.25rem 0.15rem;
}

.rule-toc-list { display: flex; flex-direction: column; gap: 0; }

.rule-toc-group {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}
.rule-toc-group + .rule-toc-group {
    margin-top: 1rem;
    padding-top: 0.85rem;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}
.rule-toc-group-label {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.58rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: rgba(var(--accent-rgb), 0.75);
    padding: 0.15rem 0.25rem 0.4rem;
}
.rule-toc-group[hidden] { display: none !important; }

/* Channel-list nav: full-height edge bar + soft slide-right on hover/active */
.rule-toc-dot { display: none; }
.rule-toc-list a {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0;
    padding: 0.5rem 0.85rem 0.5rem 1rem;
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    border-radius: 0 4px 4px 0;
    transition: color 0.18s ease, background 0.18s ease, padding-left 0.18s ease;
}
.rule-toc-list a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 2px;
    height: 100%;
    background: var(--accent);
    border-radius: 0;
    transform: scaleY(0);
    transform-origin: center;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.rule-toc-list a:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.035);
    padding-left: 1.15rem;
}
.rule-toc-list a:hover::before { transform: scaleY(0.5); }
.rule-toc-list a.is-active {
    color: #fff;
    background: linear-gradient(90deg, rgba(var(--accent-rgb), 0.18), rgba(var(--accent-rgb), 0.04) 75%, transparent);
    font-weight: 600;
    padding-left: 1.2rem;
}
.rule-toc-list a.is-active::before {
    transform: scaleY(1);
    box-shadow: 0 0 12px rgba(var(--accent-rgb), 0.65);
}

.rule-empty {
    position: relative;
    margin: 1.5rem 0 0;
    padding: 2.5rem 1.5rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.62);
    font-size: 0.95rem;
    background:
        radial-gradient(circle at 50% 0%, rgba(var(--accent-rgb), 0.08), transparent 65%),
        rgba(255, 255, 255, 0.025);
    border: 1px dashed rgba(var(--accent-rgb), 0.28);
    border-radius: 14px;
}
.rule-empty::before {
    content: '\2715';
    display: block;
    margin: 0 auto 0.6rem;
    width: 38px;
    height: 38px;
    line-height: 38px;
    font-size: 0.95rem;
    color: rgba(var(--accent-rgb), 0.85);
    background: rgba(var(--accent-rgb), 0.12);
    border: 1px solid rgba(var(--accent-rgb), 0.35);
    border-radius: 50%;
}

/* Search-match highlight inside rule items */
mark.rule-search-match {
    background: rgba(var(--accent-rgb), 0.32);
    color: #fff;
    padding: 0 0.18em;
    border-radius: 3px;
    box-shadow: 0 0 0 1px rgba(var(--accent-rgb), 0.45);
    transition: background 0.18s ease, box-shadow 0.18s ease;
}
mark.rule-search-match.is-current {
    background: rgba(var(--accent-rgb), 0.65);
    box-shadow: 0 0 0 1px rgba(var(--accent-rgb), 0.9), 0 0 14px rgba(var(--accent-rgb), 0.55);
}

/* TOC link click flash — confirms the click even when scroll position doesn't
   change (e.g., user clicks the section they're already on). */
@keyframes rule-toc-flash-kf {
    0%   { box-shadow: 0 0 0 0 rgba(var(--accent-rgb), 0.55); background: rgba(var(--accent-rgb), 0.32); }
    100% { box-shadow: 0 0 0 10px rgba(var(--accent-rgb), 0); }
}
.rule-toc-list a.rule-toc-flash {
    animation: rule-toc-flash-kf 0.55s ease-out;
}

/* [hidden] overrides for elements whose class sets an explicit display */
.rule-ruleset[hidden],
.rule-toc-list[hidden],
.rule-section[hidden],
.kb-row[hidden],
.faq-links > li[hidden],
.rule-toc-list a[hidden],
.rule-empty[hidden] { display: none !important; }

/* Anchor the rules layout to the viewport's left edge — break out of the
   centered container so the sidebar and rules sit flush left. */
.server-detail:has(.rule-layout-rhs) > .container {
    max-width: none;
    margin-left: 0;
    margin-right: 0;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}
.rule-layout-rhs .rule-content {
    max-width: 1500px;
}

/* Desktop: 2-column grid with sticky sidebar on the LEFT (Twitch-style rail) */
@media (min-width: 781px) {
    .rule-layout-rhs {
        display: grid;
        grid-template-columns: 240px minmax(0, 1fr);
        grid-template-areas: "panel content";
        gap: 2.5rem;
        align-items: start;
        margin-top: 1.5rem;
    }
    .rule-layout-rhs .rule-panel { grid-area: panel; }
    .rule-layout-rhs .rule-content {
        grid-area: content;
        padding-left: 0;
        min-width: 0;
    }

    .rule-panel {
        position: sticky;
        /* matches section padding-top (6.25rem) so the panel's natural Y
           equals its pinned Y — no bounce on scroll. */
        top: 6.25rem;
        max-height: calc(100vh - 7rem);
        display: flex;
        flex-direction: column;
        overflow: hidden;
        z-index: 10;
        padding-right: 1.25rem;
    }
    /* Server/Faction toggle stays pinned at the top of the panel */
    .rule-layout-rhs .rule-panel > .rule-switch { flex: none; }
    /* Only the TOC list below it scrolls — hidden scrollbar */
    .rule-layout-rhs .rule-panel > .rule-panel-sections {
        flex: 1;
        min-height: 0;
        overflow-y: auto;
        overflow-x: hidden;
        overscroll-behavior: contain;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    .rule-layout-rhs .rule-panel > .rule-panel-sections::-webkit-scrollbar {
        width: 0; height: 0; display: none;
    }
    /* Vertical divider — full viewport height, fades at top and bottom so it
       doesn't read as "connected" to the nav or footer. Pinned to viewport so
       it stays put no matter how deep you scroll. */
    .rule-layout-rhs .rule-panel::after {
        content: '';
        position: fixed;
        top: 0;
        bottom: 0;
        /* container padding-left (1.5rem) + panel column width (240px) */
        left: calc(1.5rem + 240px);
        width: 1px;
        background: linear-gradient(180deg,
            transparent 0%,
            rgba(255, 255, 255, 0.08) 8%,
            rgba(255, 255, 255, 0.08) 70%,
            transparent 88%);
        pointer-events: none;
        z-index: 5;
    }
}

/* Desktop: slightly larger rule text + roomier rows */
@media (min-width: 781px) {
    .rule-content .tut-card { padding: 0; }
    .rule-content .faq-links > li {
        font-size: 1.02rem;
        padding: 0.85rem 0.85rem 0.85rem 3.9rem;
        line-height: 1.7;
        max-width: none;
    }
    .rule-content .faq-links > li::before {
        top: 1.05rem;
        left: 0.8rem;
        min-width: 2.1rem;
        font-size: 0.76rem;
    }
    .rule-section h2 {
        font-size: 1.78rem;
        padding-left: 1.1rem;
    }
    .rule-section-sub { font-size: 1rem; }
    .rule-content .kb-row dt { min-width: 14rem; }
    .rule-content .tut-card > p { font-size: 1rem; }
}

/* Mobile: panel becomes a compact in-flow block above the content. */
@media (max-width: 780px) {
    .rule-layout-rhs { margin-top: 1.5rem; }
    .rule-panel { order: -1; }
    .rule-panel-head { padding-bottom: 0.5rem; }
    .rule-panel-sections { margin-top: 0; }
    .rule-toc-list { flex-direction: row; flex-wrap: wrap; gap: 0.35rem; }
    .rule-toc-list a {
        padding: 0.35rem 0.75rem;
        font-size: 0.85rem;
        border: 1px solid rgba(255, 255, 255, 0.08);
        border-radius: 999px;
    }
    .rule-toc-list a::before { display: none; }
    .rule-toc-list a.is-active {
        background: rgba(var(--accent-rgb), 0.2);
        border-color: rgba(var(--accent-rgb), 0.5);
    }

    /* Header reflows on mobile: back + title on row 1, search full-width row 2 */
    .rule-content-header {
        grid-template-columns: auto minmax(0, 1fr);
        grid-template-rows: auto auto;
        gap: 0.6rem 0.85rem;
        margin: 0 -1rem 1.25rem;
        padding: 0.6rem 0.85rem;
        min-height: 0;
    }
    .rule-content-header-spacer { display: none; }
    .rule-back-btn {
        grid-column: 1;
        grid-row: 1;
        padding: 0.4rem 0.7rem 0.4rem 0.55rem;
        font-size: 0.85rem;
    }
    .rule-back-label { display: none; } /* keep just the arrow on mobile */
    .rule-page-title {
        grid-column: 2;
        grid-row: 1;
        justify-self: end;
        font-size: 0.95rem;
        letter-spacing: 0.18em;
    }
    .rule-page-title::before,
    .rule-page-title::after { display: none; }
    .rule-content-header .rule-search {
        grid-column: 1 / -1;
        grid-row: 2;
        justify-self: stretch;
        width: 100%;
    }
    .rule-search-kbd { display: none; }

    /* Tighter rule-item layout on small screens */
    .rule-content .tut-card { padding: 0; }
    .rule-content .faq-links > li {
        padding: 0.4rem 0 0.4rem 2.7rem;
        font-size: 0.93rem;
    }
    .rule-content .faq-links > li::before {
        left: 0.55rem;
        font-size: 0.66rem;
    }
    .rule-section h2 { font-size: 1.3rem; gap: 0.6rem; }
    .rule-section h2::after { display: none; }
}

/* .server-detail uses overflow:hidden to clip its decorative bg — that also
   clips a sticky sidebar. Opt out for the rules page (fixed positioning on
   desktop already escapes it; this keeps things consistent). */
.server-detail:has(.rule-layout-rhs) { overflow: visible; }

/* Section starts below the fixed nav with breathing room (nav 4.5rem + 1.75rem). */
.server-detail:has(.rule-layout-rhs) {
    padding-top: 6.25rem;
}
.rule-layout-rhs { margin-top: 0 !important; }

/* Restore the nav's bottom border on rules pages — it now acts as the seam
   above the sticky panel. */
body:has(.rule-layout-rhs) .site-header {
    border-bottom-color: var(--border);
}

/* ==================================================================
   Inline nav: page title + search (replaces the old rule-content-header bar)
   ================================================================== */
body:has(.rule-layout-rhs) .nav-back { margin-right: 0; }

.nav-page-title {
    display: inline-flex;
    align-items: center;
    gap: 0.85rem;
    margin-left: 1rem;
    padding-left: 1rem;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: rgba(var(--accent-rgb), 0.95);
    text-shadow: 0 0 14px rgba(var(--accent-rgb), 0.25);
    white-space: nowrap;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-search {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    width: 240px;
    margin-left: auto;
    margin-right: 1.5rem;
    padding: 0 0.85rem;
    background: rgba(20, 18, 28, 0.55);
    border: 1px solid rgba(var(--accent-rgb), 0.18);
    border-radius: 6px;
    transition: width 0.25s ease, border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.nav-search:hover {
    border-color: rgba(var(--accent-rgb), 0.4);
    background: rgba(20, 18, 28, 0.72);
}
.nav-search:focus-within {
    width: 300px;
    border-color: rgba(var(--accent-rgb), 0.65);
    background: rgba(20, 18, 28, 0.92);
    box-shadow:
        0 0 0 3px rgba(var(--accent-rgb), 0.15),
        0 14px 32px -16px rgba(var(--accent-rgb), 0.45);
}
.nav-search svg { width: 14px; height: 14px; color: rgba(var(--accent-rgb), 0.75); flex: none; }
.nav-search:focus-within svg { color: rgba(var(--accent-rgb), 1); }
.nav-search input {
    flex: 1;
    min-width: 0;
    background: transparent;
    border: 0;
    outline: 0;
    color: #fff;
    font: inherit;
    font-size: 0.85rem;
    padding: 0.45rem 0;
}
.nav-search input::placeholder { color: rgba(255, 255, 255, 0.4); }
.nav-search input::-webkit-search-cancel-button { filter: invert(1) opacity(0.5); }
.nav-search:focus-within .rule-search-kbd { opacity: 0.4; }

@media (max-width: 980px) {
    .nav-page-title { display: none; }
    .nav-search { width: 180px; }
    .nav-search:focus-within { width: 220px; }
}
@media (max-width: 780px) {
    .nav-search { display: none; }
}

/* Full-bleed bar that sits flush under the fixed nav and spans the entire
   viewport width (over both the sidebar and the rule cards). */
.rule-content-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 1.25rem;
    position: sticky;
    top: 4.5rem; /* nav height = 72px */
    z-index: 15;
    /* extend left/right past the container's 1.5rem padding to viewport edges */
    margin: 0 -1.5rem 1.75rem;
    padding: 0.85rem 1.5rem;
    background: rgba(10, 13, 20, 0.85);
    border-top: 1px solid rgba(var(--accent-rgb), 0.18);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(12px) saturate(120%);
    -webkit-backdrop-filter: blur(12px) saturate(120%);
}
.rule-content-header::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(var(--accent-rgb), 0.45), transparent);
    pointer-events: none;
}
.rule-content-header::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(var(--accent-rgb), 0.45), transparent);
    pointer-events: none;
}
.rule-content-header-spacer { display: block; }

.rule-page-title {
    display: inline-flex;
    align-items: center;
    gap: 0.85rem;
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(1.25rem, 2.2vw, 1.65rem);
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #fff;
    text-shadow: 0 0 24px rgba(var(--accent-rgb), 0.35);
    margin: 0;
    padding: 0;
    position: relative;
    grid-column: 2;
    justify-self: center;
    white-space: nowrap;
}
.rule-page-title::before,
.rule-page-title::after {
    content: '';
    width: 28px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent));
    border-radius: 1px;
}
.rule-page-title::after { background: linear-gradient(90deg, var(--accent), transparent); }

.rule-content-header .rule-search {
    grid-column: 3;
    justify-self: end;
    width: 260px;
    margin: 0;
    padding: 0 0.85rem;
    background: rgba(20, 18, 28, 0.55);
    border: 1px solid rgba(var(--accent-rgb), 0.18);
    border-radius: 6px;
    transition: width 0.25s ease, border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.rule-content-header .rule-search:hover {
    border-color: rgba(var(--accent-rgb), 0.4);
    background: rgba(20, 18, 28, 0.7);
}
.rule-content-header .rule-search:focus-within {
    width: 320px;
    border-color: rgba(var(--accent-rgb), 0.65);
    background: rgba(20, 18, 28, 0.92);
    box-shadow:
        0 0 0 3px rgba(var(--accent-rgb), 0.15),
        0 14px 32px -16px rgba(var(--accent-rgb), 0.45);
}
.rule-content-header .rule-search svg { color: rgba(var(--accent-rgb), 0.75); }
.rule-content-header .rule-search:focus-within svg { color: rgba(var(--accent-rgb), 1); }
.rule-content-header .rule-search input { padding: 0.55rem 0; font-size: 0.9rem; }

.rule-search-kbd {
    flex: none;
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 0.72rem;
    line-height: 1;
    padding: 0.32rem 0.5rem;
    color: rgba(var(--accent-rgb), 0.85);
    background: rgba(var(--accent-rgb), 0.1);
    border: 1px solid rgba(var(--accent-rgb), 0.28);
    border-radius: 5px;
    margin-left: 0.5rem;
    transition: opacity 0.15s;
}
.rule-content-header .rule-search:focus-within .rule-search-kbd { opacity: 0.4; }

/* ==================================================================
   Rules — Phone UI (legacy, unused)
   ================================================================== */
.phone-stage {
    padding: 2rem 1rem 3rem;
    display: flex;
    justify-content: center;
}
.phone-shell {
    position: relative;
    width: 100%;
    max-width: 420px;
    min-height: 760px;
    background: linear-gradient(180deg, #0b0912 0%, #14101f 100%);
    border-radius: 2.5rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow:
        0 40px 90px rgba(0, 0, 0, 0.7),
        0 0 0 8px #1a1625,
        0 0 0 9px rgba(255, 255, 255, 0.06),
        inset 0 0 0 1px rgba(var(--accent-rgb), 0.08);
    overflow: hidden;
    isolation: isolate;
}
.phone-shell::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 15% 0%, rgba(var(--accent-rgb), 0.28), transparent 50%),
        radial-gradient(circle at 85% 100%, rgba(99, 102, 241, 0.22), transparent 55%);
    pointer-events: none;
    z-index: 0;
}
.phone-notch {
    position: absolute;
    top: 0.6rem;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 22px;
    background: #000;
    border-radius: 0 0 14px 14px;
    z-index: 20;
}
.phone-status {
    position: relative;
    z-index: 10;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.85rem 1.75rem 0.5rem;
    font-family: var(--font-display, 'Rajdhani'), sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    color: #fff;
}
.phone-status-time { font-variant-numeric: tabular-nums; letter-spacing: 0.02em; }
.phone-status-icons {
    display: inline-flex;
    gap: 0.4rem;
    align-items: center;
    color: #fff;
}
.phone-status-icons svg { width: 14px; height: 14px; }

/* Home screen */
.phone-screen {
    position: relative;
    z-index: 5;
    padding: 1rem 1.25rem 9rem;
    color: #fff;
    min-height: 680px;
}
.phone-greeting {
    text-align: center;
    margin: 1rem 0 1.5rem;
}
.phone-greeting-time {
    font-family: 'Orbitron', sans-serif;
    font-size: 3rem;
    font-weight: 900;
    letter-spacing: -0.02em;
    line-height: 1;
    text-shadow: 0 0 30px rgba(var(--accent-rgb), 0.5);
}
.phone-greeting-date {
    margin-top: 0.5rem;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: rgba(255, 255, 255, 0.55);
}

.phone-tabs {
    display: flex;
    justify-content: center;
    gap: 0.4rem;
    margin-bottom: 1.25rem;
    padding: 0.3rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}
.phone-tab {
    padding: 0.45rem 1rem;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: rgba(255, 255, 255, 0.6);
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s;
}
.phone-tab:hover { color: rgba(255, 255, 255, 0.9); }
.phone-tab.is-active {
    background: linear-gradient(135deg, #a855f7, #6366f1);
    color: #fff;
    box-shadow: 0 4px 14px rgba(var(--accent-rgb), 0.4);
}

.phone-os-label {
    text-align: center;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.3em;
    color: rgba(var(--accent-rgb), 0.75);
    margin-bottom: 1rem;
}

.phone-tab-page { display: none; }
.phone-tab-page.is-active { display: block; animation: phone-fade 0.35s ease; }
@keyframes phone-fade {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.phone-app-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem 0.5rem;
    padding: 0.25rem;
}
.phone-app {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: #fff;
    text-decoration: none;
    transition: transform 0.15s ease;
}
.phone-app:hover { transform: translateY(-3px); }
.phone-app-icon {
    width: 62px;
    height: 62px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.9rem;
    box-shadow:
        0 6px 16px rgba(0, 0, 0, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transition: box-shadow 0.2s, transform 0.2s;
}
.phone-app:hover .phone-app-icon {
    box-shadow:
        0 10px 24px rgba(var(--accent-rgb), 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.phone-app-name {
    font-size: 0.72rem;
    font-weight: 600;
    text-align: center;
    line-height: 1.15;
    letter-spacing: 0.02em;
}

/* Icon color themes */
.ic-general  { background: linear-gradient(135deg, #6366f1, #3b82f6); }
.ic-roleplay { background: linear-gradient(135deg, #a855f7, #7c3aed); }
.ic-combat   { background: linear-gradient(135deg, #ef4444, #991b1b); }
.ic-vehicle  { background: linear-gradient(135deg, #f59e0b, #d97706); }
.ic-faction  { background: linear-gradient(135deg, #10b981, #047857); }
.ic-turf     { background: linear-gradient(135deg, #eab308, #a16207); }
.ic-war      { background: linear-gradient(135deg, #dc2626, #450a0a); }
.ic-crime    { background: linear-gradient(135deg, #a21caf, #581c87); }
.ic-home     { background: linear-gradient(135deg, #64748b, #334155); }

.phone-pager-dots {
    position: absolute;
    bottom: 6.25rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.4rem;
    z-index: 9;
}
.phone-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
    transition: background 0.2s, transform 0.2s;
}
.phone-dot.is-active {
    background: #fff;
    transform: scale(1.3);
}

/* Dock */
.phone-dock {
    position: absolute;
    bottom: 1rem;
    left: 1rem;
    right: 1rem;
    padding: 0.65rem 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 22px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
    z-index: 10;
}
.phone-dock .phone-app-icon {
    width: 48px;
    height: 48px;
    font-size: 1.4rem;
    border-radius: 14px;
    margin: 0 auto;
}
.phone-dock .phone-app-name { display: none; }

/* Home indicator bar (purely decorative) */
.phone-home-bar {
    position: absolute;
    bottom: 0.4rem;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.35);
    z-index: 12;
}

/* ---------- Sub-page (rule app) ---------- */
.phone-app-bar {
    position: relative;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.25rem 1rem 0.85rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.phone-back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #fff;
    text-decoration: none;
    font-size: 1.1rem;
    line-height: 1;
    transition: background 0.15s;
}
.phone-back:hover { background: rgba(var(--accent-rgb), 0.25); }
.phone-app-title {
    flex: 1;
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    font-size: 1.05rem;
    color: #fff;
    letter-spacing: 0.01em;
}
.phone-app-bar .phone-app-icon {
    width: 38px;
    height: 38px;
    font-size: 1.1rem;
    border-radius: 11px;
}

.phone-app-content {
    position: relative;
    z-index: 5;
    padding: 1.25rem 1.25rem 11rem;
    color: rgba(255, 255, 255, 0.92);
}
.phone-app-eyebrow {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.3em;
    color: rgba(var(--accent-rgb), 0.8);
    margin-bottom: 0.4rem;
}
.phone-app-heading {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.5rem;
    margin: 0 0 0.5rem;
    letter-spacing: 0.01em;
}
.phone-app-sub {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
    margin: 0 0 1.25rem;
    line-height: 1.5;
}
.phone-rule-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 0.6rem;
}
.phone-rule-list li {
    position: relative;
    padding: 0.8rem 0.9rem 0.8rem 2.3rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 12px;
    font-size: 0.9rem;
    line-height: 1.5;
    counter-increment: rule-counter;
}
.phone-rule-list {
    counter-reset: rule-counter;
}
.phone-rule-list li::before {
    content: counter(rule-counter, decimal);
    position: absolute;
    left: 0.8rem;
    top: 0.85rem;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.7rem;
    font-weight: 700;
    color: rgba(var(--accent-rgb), 0.8);
    letter-spacing: 0.05em;
}

.phone-rule-defs {
    display: grid;
    gap: 0.6rem;
    margin: 0;
}
.phone-rule-def {
    padding: 0.8rem 0.9rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 12px;
}
.phone-rule-def dt {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #c4b5fd;
    margin-bottom: 0.3rem;
}
.phone-rule-def dd {
    margin: 0;
    font-size: 0.88rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.85);
}

.phone-pager-nav {
    position: absolute;
    bottom: 6rem;
    left: 1rem;
    right: 1rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    z-index: 9;
}
.phone-pager-nav a {
    padding: 0.55rem 0.85rem;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    color: #fff;
    text-decoration: none;
    font-size: 0.78rem;
    display: flex;
    flex-direction: column;
    gap: 0.05rem;
    transition: background 0.15s, transform 0.15s;
}
.phone-pager-nav a:hover { background: rgba(var(--accent-rgb), 0.22); transform: translateY(-1px); }
.phone-pager-nav a.is-disabled { opacity: 0.3; pointer-events: none; }
.phone-pager-nav .pager-label {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: rgba(255, 255, 255, 0.45);
}
.phone-pager-nav .pager-next { text-align: right; }

/* Mobile tweaks */
@media (max-width: 520px) {
    .phone-stage { padding: 0.75rem 0.5rem 2rem; }
    .phone-shell {
        border-radius: 1.5rem;
        min-height: calc(100vh - 8rem);
        box-shadow:
            0 20px 40px rgba(0, 0, 0, 0.5),
            0 0 0 4px #1a1625;
    }
    .phone-notch { width: 100px; }
    .phone-screen { padding-bottom: 10rem; }
    .phone-app-content { padding-bottom: 12rem; }
}


/* ==================================================================
   Punishments page — centered single-column layout, no sidebar
   ================================================================== */
.punishment-page .punish-wrap {
    max-width: 880px;
    margin: 0 auto;
    padding: 1rem 0 2rem;
}
.punishment-page .punish-header {
    text-align: center;
    margin: 0 auto 2.5rem;
    padding: 1rem 0 2rem;
    max-width: 720px;
    position: relative;
}
.punishment-page .punish-header::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 80px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(var(--accent-rgb), 0.6), transparent);
    transform: translateX(-50%);
}
.punishment-page .punish-statement {
    font-family: var(--font-read);
    color: rgba(255, 255, 255, 0.78);
    font-size: 1rem;
    line-height: 1.65;
    margin: 0.4rem auto 0;
    max-width: 600px;
}
/* Strip the section heading's left bar + indent on the punishments page so
   it reads as a centered list of categories rather than a codex with rails. */
.punishment-page .rule-section h2 {
    padding-left: 0;
    text-align: center;
    justify-content: center;
}
.punishment-page .rule-section h2::before { display: none !important; }
.punishment-page .rule-section h2::after { display: none !important; }
.punishment-page .rule-section { margin-bottom: 1.5rem; }
.punishment-page .rule-subsection {
    text-align: center;
    width: 100%;
}
.punishment-page .rule-subsection-hint { text-align: center; }
.punishment-page .rule-section-sub { text-align: center; }

/* Center the page title in the nav on the punishments page */
.punishment-page .site-header .nav { position: relative !important; }
.punishment-page .site-header .nav .nav-page-title {
    position: absolute !important;
    left: 50% !important;
    top: 50% !important;
    transform: translate(-50%, -50%) !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    pointer-events: none;
    z-index: 2;
}

/* Punishments page hero title */
.punishment-page .punish-title {
    font-family: 'Orbitron', sans-serif;
    font-weight: 900;
    font-size: clamp(1.8rem, 3.6vw, 2.6rem);
    line-height: 1.1;
    letter-spacing: 0.01em;
    margin: 0;
    color: #fff;
    text-align: center;
    text-transform: uppercase;
}
.punishment-page .punish-title .accent {
    color: var(--accent);
    text-shadow: 0 0 24px rgba(var(--accent-rgb), 0.4);
}

/* ============================================================
   Punishments — flat card grid, one styled box per offense.
   Each card carries its own severity color via .punish-entry-{type}.
   ============================================================ */
.punishment-page .punish-doc {
    max-width: 1080px;
    margin: 0 auto;
    padding: 1rem 0 3rem;
}

.punishment-page .punish-entries {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.1rem;
    margin-top: 1.5rem;
}
@media (min-width: 740px) {
    .punishment-page .punish-entries {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1.2rem;
    }
    .punishment-page .punish-entry:has(.punish-ladder) {
        grid-column: 1 / -1;
    }
}

/* Per-card severity tokens */
.punishment-page .punish-entry-tiered { --tier-color: 168, 85, 247; }
.punishment-page .punish-entry-perm   { --tier-color: 220, 38, 38; }
.punishment-page .punish-entry-month  { --tier-color: 239, 68, 68; }
.punishment-page .punish-entry-week   { --tier-color: 249, 115, 22; }
.punishment-page .punish-entry-day    { --tier-color: 245, 158, 11; }
.punishment-page .punish-entry-cs     { --tier-color: 34, 197, 94; }

/* Card */
.punishment-page .punish-entry {
    position: relative;
    padding: 1.3rem 1.4rem 1.3rem 1.9rem;
    isolation: isolate;
    overflow: hidden;
    border-radius: 4px;
    border: 1px solid rgba(var(--tier-color), 0.22);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.punishment-page .punish-entry::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -2;
    pointer-events: none;
    background:
        repeating-linear-gradient(
            135deg,
            transparent 0,
            transparent 10px,
            rgba(var(--tier-color), 0.025) 10px,
            rgba(var(--tier-color), 0.025) 11px
        ),
        radial-gradient(ellipse 70% 90% at 0% 0%,
            rgba(var(--tier-color), 0.13),
            transparent 65%),
        linear-gradient(180deg,
            rgba(var(--tier-color), 0.06),
            rgba(0, 0, 0, 0.18) 80%);
}
.punishment-page .punish-entry:hover {
    border-color: rgba(var(--tier-color), 0.45);
    transform: translateY(-2px);
    box-shadow:
        0 14px 36px -22px rgba(0, 0, 0, 0.7),
        0 0 0 1px rgba(var(--tier-color), 0.15);
}

.punishment-page .punish-entry-bar {
    position: absolute;
    left: 0; top: 0.9rem; bottom: 0.9rem;
    width: 3px;
    background: linear-gradient(180deg,
        rgb(var(--tier-color)) 0%,
        rgba(var(--tier-color), 0.5) 60%,
        transparent 100%);
    box-shadow: 0 0 12px rgba(var(--tier-color), 0.5);
    z-index: 0;
}

.punishment-page .punish-entry-title {
    font-family: 'Orbitron', sans-serif;
    font-weight: 800;
    font-size: 0.95rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #fff;
    margin: 0 0 0.7rem;
    line-height: 1.3;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}
.punishment-page .punish-entry-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg,
        rgba(var(--tier-color), 0.5),
        transparent 80%);
}

.punishment-page .punish-entry-note {
    margin: 0 0 0.85rem;
    padding-left: 0.75rem;
    border-left: 1px solid rgba(var(--tier-color), 0.4);
    font-family: var(--font-read);
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.65);
    font-style: italic;
    line-height: 1.55;
}

/* Penalty stamp — block-level pill below title/note */
.punishment-page .punish-entry > .punish-tag {
    display: inline-block;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgb(var(--tier-color));
    padding: 0.45rem 0.85rem;
    border: 1px solid rgba(var(--tier-color), 0.5);
    background:
        linear-gradient(180deg, rgba(var(--tier-color), 0.18), rgba(var(--tier-color), 0.05)),
        rgba(0, 0, 0, 0.2);
    border-radius: 3px;
    text-shadow: 0 0 12px rgba(var(--tier-color), 0.4);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        0 2px 10px rgba(var(--tier-color), 0.15);
}
.punishment-page .punish-entry > .punish-tag-wipe {
    color: #ff8a8a;
    border-color: rgba(255, 90, 90, 0.6);
    background:
        linear-gradient(180deg, rgba(220, 38, 38, 0.22), rgba(220, 38, 38, 0.06)),
        rgba(0, 0, 0, 0.2);
    text-shadow: 0 0 14px rgba(220, 38, 38, 0.5);
}

/* ====== legacy tier-section CSS (unused, kept for reference) ====== */
.punishment-page .punish-tier-legacy-marker {
    position: relative;
    padding: 3rem 1.5rem 2rem 2.6rem;
    margin: 1.2rem 0;
    isolation: isolate;
    overflow: hidden;
    border-radius: 2px;
}

/* Backdrop: gradient bleed + diagonal hatch + tinted base. */
.punishment-page .punish-tier::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: -2;
    background:
        repeating-linear-gradient(
            135deg,
            transparent 0,
            transparent 10px,
            rgba(var(--tier-color), 0.025) 10px,
            rgba(var(--tier-color), 0.025) 11px
        ),
        radial-gradient(ellipse 70% 90% at 0% 0%,
            var(--tier-glow, rgba(var(--accent-rgb), 0.08)),
            transparent 65%),
        linear-gradient(180deg,
            rgba(var(--tier-color), 0.04),
            transparent 80%);
}

/* Massive watermark of the tier name in the background. */
.punishment-page .punish-tier::after {
    content: var(--tier-watermark, '');
    position: absolute;
    top: 0.4rem;
    right: -0.4rem;
    z-index: -1;
    pointer-events: none;
    user-select: none;
    font-family: 'Orbitron', sans-serif;
    font-weight: 900;
    font-size: clamp(5rem, 13vw, 10rem);
    line-height: 0.78;
    letter-spacing: -0.04em;
    color: transparent;
    -webkit-text-stroke: 1px rgba(var(--tier-color), 0.14);
    white-space: nowrap;
    opacity: 0.95;
}

/* Vertical accent bar pinned to the left edge of each tier. */
.punishment-page .punish-tier-bar {
    position: absolute;
    left: 0; top: 1.5rem; bottom: 1.5rem;
    width: 3px;
    background: linear-gradient(180deg,
        rgb(var(--tier-color)) 0%,
        rgba(var(--tier-color), 0.5) 60%,
        transparent 100%);
    box-shadow: 0 0 14px rgba(var(--tier-color), 0.5);
    z-index: 0;
}

/* Per-tier color tokens + watermark labels. */
.punishment-page .punish-tier-graded {
    --tier-color: 168, 85, 247;
    --tier-glow: rgba(var(--accent-rgb), 0.1);
    --tier-watermark: 'TIER';
}
.punishment-page .punish-tier-perm {
    --tier-color: 220, 38, 38;
    --tier-glow: rgba(220, 38, 38, 0.13);
    --tier-watermark: 'PERMA';
}
.punishment-page .punish-tier-month {
    --tier-color: 239, 68, 68;
    --tier-glow: rgba(239, 68, 68, 0.1);
    --tier-watermark: 'MONTH';
}
.punishment-page .punish-tier-week {
    --tier-color: 249, 115, 22;
    --tier-glow: rgba(249, 115, 22, 0.1);
    --tier-watermark: 'WEEK';
}
.punishment-page .punish-tier-day {
    --tier-color: 245, 158, 11;
    --tier-glow: rgba(245, 158, 11, 0.09);
    --tier-watermark: 'DAYS';
}
.punishment-page .punish-tier-cs {
    --tier-color: 34, 197, 94;
    --tier-glow: rgba(34, 197, 94, 0.09);
    --tier-watermark: 'C/S';
}

/* Tier banner — stamped mark + heavy title + striped accent underline. */
.punishment-page .punish-tier-banner {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.85rem 1.2rem;
    margin-bottom: 1.6rem;
    padding-bottom: 1.1rem;
    position: relative;
}
.punishment-page .punish-tier-banner::after {
    content: '';
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 6px;
    background: repeating-linear-gradient(
        -45deg,
        rgba(var(--tier-color), 0.32) 0,
        rgba(var(--tier-color), 0.32) 6px,
        transparent 6px,
        transparent 12px
    );
    -webkit-mask: linear-gradient(90deg, #000 0%, #000 55%, transparent 100%);
            mask: linear-gradient(90deg, #000 0%, #000 55%, transparent 100%);
}

/* Stamped severity mark — beefier badge with diamond tick decorations. */
.punishment-page .punish-tier-mark {
    font-family: 'Orbitron', sans-serif;
    font-weight: 900;
    font-size: 0.95rem;
    letter-spacing: 0.16em;
    padding: 0.7rem 1rem;
    border: 2px solid rgba(var(--tier-color), 0.7);
    color: rgb(var(--tier-color));
    background:
        linear-gradient(180deg, rgba(var(--tier-color), 0.18), rgba(var(--tier-color), 0.06)),
        rgba(0, 0, 0, 0.25);
    border-radius: 3px;
    text-shadow: 0 0 14px rgba(var(--tier-color), 0.6);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.06),
        0 4px 18px rgba(var(--tier-color), 0.18),
        0 0 0 1px rgba(0, 0, 0, 0.35);
    position: relative;
}
.punishment-page .punish-tier-mark::before,
.punishment-page .punish-tier-mark::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 6px; height: 6px;
    background: rgb(var(--tier-color));
    box-shadow: 0 0 8px rgba(var(--tier-color), 0.7);
    transform: translateY(-50%) rotate(45deg);
}
.punishment-page .punish-tier-mark::before { left: -10px; }
.punishment-page .punish-tier-mark::after  { right: -10px; }

.punishment-page .punish-tier-label {
    font-family: 'Orbitron', sans-serif;
    font-weight: 900;
    font-size: clamp(1.4rem, 2.6vw, 1.85rem);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #fff;
    margin: 0;
    line-height: 1;
    text-shadow: 0 2px 18px rgba(0, 0, 0, 0.4);
}

.punishment-page .punish-tier-sub {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    margin-left: auto;
    padding: 0.32rem 0.6rem;
    border: 1px dashed rgba(255, 255, 255, 0.14);
    border-radius: 3px;
}

/* Offense list — counter-numbered rows, dramatic hover reveal. */
.punishment-page .punish-list {
    list-style: none;
    margin: 0;
    padding: 0;
    counter-reset: punish-row;
}
.punishment-page .punish-list > li {
    display: grid;
    grid-template-columns: 2.5rem 1fr auto;
    column-gap: 1rem;
    align-items: baseline;
    padding: 1rem 0.4rem;
    position: relative;
    counter-increment: punish-row;
    transition: padding 0.2s ease;
}
.punishment-page .punish-list > li::before {
    content: counter(punish-row, decimal-leading-zero);
    grid-column: 1;
    grid-row: 1;
    align-self: center;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    color: rgba(var(--tier-color), 0.85);
    text-shadow: 0 0 12px rgba(var(--tier-color), 0.5);
    text-align: right;
    padding-right: 0.6rem;
    border-right: 1px solid rgba(var(--tier-color), 0.35);
    line-height: 1.6;
}
.punishment-page .punish-list > li::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg,
        rgba(var(--tier-color), 0.12) 0%,
        rgba(var(--tier-color), 0.04) 40%,
        transparent 80%);
    z-index: -1;
    pointer-events: none;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.28s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.punishment-page .punish-list > li + li {
    border-top: 1px dashed rgba(255, 255, 255, 0.06);
}
.punishment-page .punish-list > li:hover {
    padding-left: 0.9rem;
}
.punishment-page .punish-list > li:hover::after {
    transform: scaleX(1);
}
.punishment-page .punish-list > li:hover .punish-name {
    color: rgb(var(--tier-color));
    text-shadow: 0 0 14px rgba(var(--tier-color), 0.4);
}

.punishment-page .punish-name {
    grid-column: 2;
    grid-row: 1;
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #fff;
    line-height: 1.35;
    transition: color 0.2s ease, text-shadow 0.2s ease;
}
.punishment-page .punish-note {
    grid-column: 2;
    grid-row: 2;
    margin-top: 0.45rem;
    padding-left: 0.7rem;
    border-left: 1px solid rgba(var(--tier-color), 0.35);
    font-family: var(--font-read);
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.62);
    font-style: italic;
    line-height: 1.55;
}
.punishment-page .punish-tag {
    grid-column: 3;
    grid-row: 1;
    align-self: center;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgb(var(--tier-color));
    padding: 0.4rem 0.8rem;
    border: 1px solid rgba(var(--tier-color), 0.5);
    background:
        linear-gradient(180deg, rgba(var(--tier-color), 0.18), rgba(var(--tier-color), 0.05)),
        rgba(0, 0, 0, 0.2);
    border-radius: 3px;
    white-space: nowrap;
    text-shadow: 0 0 12px rgba(var(--tier-color), 0.4);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        0 2px 10px rgba(var(--tier-color), 0.15);
}
.punishment-page .punish-tag-wipe {
    color: #ff8a8a;
    border-color: rgba(255, 90, 90, 0.6);
    background:
        linear-gradient(180deg, rgba(220, 38, 38, 0.22), rgba(220, 38, 38, 0.06)),
        rgba(0, 0, 0, 0.2);
    text-shadow: 0 0 14px rgba(220, 38, 38, 0.5);
}

/* Escalating offenses — connected step ladders. */
.punishment-page .punish-graded-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.8rem 2.4rem;
    margin-top: 0.4rem;
}
@media (min-width: 760px) {
    .punishment-page .punish-graded-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
.punishment-page .punish-graded {
    position: relative;
    padding: 0.6rem 1rem 0.8rem 1.6rem;
    background: linear-gradient(180deg,
        rgba(var(--tier-color), 0.05),
        rgba(0, 0, 0, 0.12) 80%);
    border-left: 2px solid rgba(var(--tier-color), 0.35);
    border-radius: 0 6px 6px 0;
}
.punishment-page .punish-graded::before {
    content: '';
    position: absolute;
    left: -2px; top: 0;
    width: 2px; height: 2.4rem;
    background: rgb(var(--tier-color));
    box-shadow: 0 0 14px rgba(var(--tier-color), 0.6);
}
.punishment-page .punish-graded-title {
    font-family: 'Orbitron', sans-serif;
    font-weight: 800;
    font-size: 1rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #fff;
    margin: 0 0 0.3rem;
    line-height: 1.3;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}
.punishment-page .punish-graded-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg,
        rgba(var(--tier-color), 0.5),
        transparent 80%);
}
.punishment-page .punish-graded-desc {
    margin: 0 0 0.7rem;
    font-family: var(--font-read);
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.55);
    font-style: italic;
}
.punishment-page .punish-ladder {
    list-style: none;
    margin: 0.4rem 0 0;
    padding: 0;
    counter-reset: punish-rung;
}
.punishment-page .punish-ladder > li {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 0.7rem;
    padding: 0.55rem 0;
    counter-increment: punish-rung;
    position: relative;
}
.punishment-page .punish-ladder > li + li {
    border-top: 1px dashed rgba(255, 255, 255, 0.07);
}
.punishment-page .punish-ladder > li::before {
    content: counter(punish-rung);
    grid-column: 1;
    width: 1.5rem; height: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.7rem;
    font-weight: 800;
    color: rgba(var(--tier-color), 0.95);
    border: 1px solid rgba(var(--tier-color), 0.5);
    background: rgba(var(--tier-color), 0.1);
    border-radius: 50%;
    text-shadow: 0 0 8px rgba(var(--tier-color), 0.5);
    flex-shrink: 0;
}
.punishment-page .rung-label {
    grid-column: 2;
    font-family: var(--font-read);
    font-size: 0.92rem;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.4;
}
.punishment-page .rung-pen {
    grid-column: 3;
    font-family: 'Orbitron', sans-serif;
    font-weight: 800;
    font-size: 0.68rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 0.3rem 0.65rem;
    border-radius: 3px;
    border: 1px solid rgba(var(--accent-rgb), 0.5);
    color: var(--accent);
    background:
        linear-gradient(180deg, rgba(var(--accent-rgb), 0.18), rgba(var(--accent-rgb), 0.04)),
        rgba(0, 0, 0, 0.18);
    white-space: nowrap;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.punishment-page .rung-pen.is-cs {
    color: #7be3a4;
    border-color: rgba(34, 197, 94, 0.5);
    background:
        linear-gradient(180deg, rgba(34, 197, 94, 0.2), rgba(34, 197, 94, 0.05)),
        rgba(0, 0, 0, 0.18);
    text-shadow: 0 0 10px rgba(34, 197, 94, 0.4);
}
.punishment-page .rung-pen.is-kick {
    color: #facc6a;
    border-color: rgba(250, 204, 21, 0.5);
    background:
        linear-gradient(180deg, rgba(250, 204, 21, 0.18), rgba(250, 204, 21, 0.04)),
        rgba(0, 0, 0, 0.18);
    text-shadow: 0 0 10px rgba(250, 204, 21, 0.4);
}
.punishment-page .rung-pen.is-day {
    color: #f59e6e;
    border-color: rgba(245, 158, 11, 0.55);
    background:
        linear-gradient(180deg, rgba(245, 158, 11, 0.2), rgba(245, 158, 11, 0.05)),
        rgba(0, 0, 0, 0.18);
    text-shadow: 0 0 10px rgba(245, 158, 11, 0.4);
}
.punishment-page .rung-pen.is-week {
    color: #f97373;
    border-color: rgba(249, 115, 22, 0.55);
    background:
        linear-gradient(180deg, rgba(249, 115, 22, 0.22), rgba(249, 115, 22, 0.05)),
        rgba(0, 0, 0, 0.18);
    text-shadow: 0 0 10px rgba(249, 115, 22, 0.4);
}

@media (max-width: 540px) {
    .punishment-page .punish-tier {
        padding: 2.2rem 1rem 1.4rem 1.5rem;
    }
    .punishment-page .punish-tier::after {
        right: -0.3rem;
        font-size: 4.6rem;
    }
    .punishment-page .punish-tier-banner {
        gap: 0.6rem 0.7rem;
    }
    .punishment-page .punish-tier-mark {
        font-size: 0.8rem;
        padding: 0.55rem 0.8rem;
    }
    .punishment-page .punish-tier-mark::before,
    .punishment-page .punish-tier-mark::after { display: none; }
    .punishment-page .punish-tier-sub {
        margin-left: 0;
        flex-basis: 100%;
    }
    .punishment-page .punish-list > li {
        grid-template-columns: 2rem 1fr;
        column-gap: 0.7rem;
    }
    .punishment-page .punish-tag {
        grid-column: 2;
        grid-row: auto;
        justify-self: start;
        margin-top: 0.5rem;
    }
}

/* Centered logo in the top nav (rules + tutorials pages) */
.site-header .nav:has(> .nav-logo-center) { position: relative; }
.nav-logo-center {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 120px;
    height: 40px;
    overflow: hidden;
    pointer-events: auto;
    z-index: 1;
}
.nav-logo-center img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    filter: drop-shadow(0 0 14px rgba(var(--accent-rgb), 0.3));
    transition: transform 0.2s ease, filter 0.2s ease;
}
.nav-logo-center:hover img {
    transform: scale(1.04);
    filter: drop-shadow(0 0 18px rgba(var(--accent-rgb), 0.5));
}
body.theme-red .nav-logo-center img,
body.theme-red .nav-logo-center:hover img {
    filter: none;
}
@media (max-width: 980px) {
    .nav-logo-center { width: 100px; height: 32px; }
}
@media (max-width: 700px) {
    .nav-logo-center { display: none; }
}

/* ---------- Bandit RP (theme-red) — override hardcoded purples ---------- */
/* Index landing tile: "View server" + "Join Now" */
.server-tile.theme-red .footer-view { color: #c98b8b; }
.server-tile.theme-red .footer-view:hover,
.server-tile.theme-red:hover .footer-view { color: #ffd2d2; }
.server-tile.theme-red .footer-join {
    background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
}
.server-tile.theme-red .footer-join:hover {
    background: linear-gradient(135deg, #f87171 0%, #dc2626 100%);
}

/* Bandit detail page: "Play" / connect button */
body.theme-red .footer-connect { color: #ffc8c8; }
body.theme-red .footer-connect:hover {
    background: linear-gradient(135deg, var(--accent) 0%, #b91c1c 100%);
}

/* All-red ambient background on Bandit pages — drop blue/yellow strobes */
html:has(body.theme-red) {
    background:
        radial-gradient(ellipse 520px 1100px at -8% 50%, rgba(255, 40, 60, 0.10), transparent 55%),
        radial-gradient(ellipse 520px 1100px at 108% 50%, rgba(220, 38, 38, 0.08), transparent 55%),
        radial-gradient(ellipse 1000px 280px at 50% -10%, rgba(248, 113, 113, 0.05), transparent 60%),
        linear-gradient(180deg, var(--bg) 0%, var(--bg-alt) 100%);
}

