/* Novus Modern owns its presentation. No imports from other templates. */

:root {
    color-scheme: dark;
    --bg: var(--color-bg);
    --accent: var(--color-font-primary);
    --text: var(--color-font-secondary);
    --muted: var(--color-muted);
    --line: var(--color-border);
    --panel: var(--color-panel);
}

/* =========================================================
   BASE
   ========================================================= */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body.site {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 500 16px/1.6 'Rajdhani', 'Segoe UI', Arial, sans-serif;
}

button,
input,
select {
    font: inherit;
}

button,
a,
select {
    -webkit-tap-highlight-color: transparent;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    cursor: pointer;
    border: 0;
    background: transparent;
}

button,
select {
    color: inherit;
}

img {
    max-width: 100%;
}

[hidden] {
    display: none !important;
}

a:focus-visible,
button:focus-visible,
select:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 4px;
}

h1,
h2,
h3,
p {
    margin: 0;
}

h1,
h2,
h3 {
    font-family: 'Orbitron', 'Rajdhani', sans-serif;
    line-height: 1.25;
}

select {
    background: color-mix(in srgb, var(--color-panel) 82%, var(--color-font-secondary));
    border: 1px solid var(--line);
    border-radius: 7px;
    padding: 5px;
    font-size: 12px;
    max-width: 100%;
}


/* =========================================================
   NAVIGATION
   ========================================================= */

.menu-bar {
    position: relative;
    z-index: 30;
    margin: 0;
    background: color-mix(in srgb, var(--color-navigation-bg) 96%, transparent);
    border-bottom: 1px solid color-mix(in srgb, var(--color-navigation-border) 20%, transparent);
}

.site[data-custom-sticky-navigation="1"] .menu-bar {
    position: sticky;
    top: 0;
}

.menu-inner {
    max-width: calc(var(--custom-content-width, 1320) * 1px);
    margin: auto;
    min-height: 76px;
    padding: 0 24px;
}
.menu {
    display: flex;
    align-items: stretch;
    justify-content: center;
    gap: 2px;
    list-style: none;
    padding: 0;
    margin: 0;
    min-height: 76px;
}

.menu-item {
    position: relative;
    display: flex;
}

.menu-item > a,
.submenu-toggle {
    position: relative;
    display: flex;
    gap: 9px;
    align-items: center;
    padding: 0 20px;
    border-radius: 0;
    font-family: 'Orbitron', 'Rajdhani', sans-serif;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .055em;
}

.menu-item > a:after,
.submenu-toggle:after {
    content: '';
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 0;
    height: 2px;
    background: var(--accent);
    transform: scaleX(0);
    transition: transform .2s;
}

.menu-item > a:hover,
.submenu-toggle:hover,
.current > a,
.current > .submenu-toggle {
    color: var(--accent);
    background: color-mix(in srgb, var(--color-font-secondary) 2%, transparent);
}

.menu-item > a:hover:after,
.submenu-toggle:hover:after,
.current > a:after,
.current > .submenu-toggle:after {
    transform: scaleX(1);
}

.nav-icon {
    display: none;
    font-size: 15px;
    color: var(--accent);
}

.site[data-custom-navigation-icons="always"] .nav-icon,
.site[data-custom-navigation-icons="active"] .current > a > .nav-icon,
.site[data-custom-navigation-icons="active"] .current > .submenu-toggle > .nav-icon {
    display: inline-block;
}

.submenu {
    position: absolute;
    inset-block-start: 100%;
    inset-inline-start: 0;
    min-width: 215px;
    max-width: min(290px, 85vw);
    list-style: none;
    background: var(--color-submenu-bg);
    border: 1px solid color-mix(in srgb, var(--color-navigation-border) 17%, transparent);
    box-shadow: 0 18px 45px color-mix(in srgb, var(--color-shadow) 53%, transparent);
    border-radius: 0;
    padding: 8px;
    display: none;
}

.menu-item.open > .submenu {
    display: block;
}

.submenu .submenu {
    inset-block-start: 0;
    inset-inline-start: 100%;
}

.submenu .menu-item {
    display: block;
}

.submenu a,
.submenu-toggle {
    width: 100%;
    min-height: 44px;
    text-align: start;
}

.menu-toggle {
    display: none;
    padding: 18px;
    width: 100%;
    text-align: start;
    font-family: 'Orbitron', 'Rajdhani', sans-serif;
}


/* =========================================================
   HERO
   ========================================================= */

.hero {
    height: calc(var(--custom-hero-height, 530) * 1px);
    min-height: 300px;
    position: relative;
    isolation: isolate;
    overflow: hidden;

    background-size: cover;
    background-position: center top;

    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;

    padding: 45px 20px;
}

.hero:before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;

    background:
            radial-gradient(
                    circle at center,
                    color-mix(in srgb, var(--color-hero-overlay) 6%, transparent) 0%,
                    color-mix(in srgb, var(--color-hero-overlay) 31%, transparent) 52%,
                    var(--bg) 100%
            ),
            linear-gradient(
                    180deg,
                    color-mix(in srgb, var(--color-hero-overlay) 8%, transparent),
                    var(--bg)
            );
}

.brand {
    display: block;
    filter: drop-shadow(0 10px 35px color-mix(in srgb, var(--color-shadow) 60%, transparent));
    transform: scale(1);
    transform-origin: center;
    transition: transform .25s ease, filter .25s ease;
}

.brand:hover,
.brand:focus-visible {
    transform: scale(1.04);
    filter:
        drop-shadow(0 10px 35px color-mix(in srgb, var(--color-shadow) 60%, transparent))
        drop-shadow(0 0 24px color-mix(in srgb, var(--color-font-primary) 62%, transparent));
}


/* =========================================================
   LOGO
   =========================================================
   IMPORTANT:
   Logo is now treated as ONE normal image.
   No more 2-frame / horizontal sprite behavior.
   ========================================================= */

.logo {
    display: block;

    width: min(
            calc(var(--custom-logo-width, 400) * 1px),
            70vw
    );

    aspect-ratio:
            var(--custom-logo-width, 400) /
        var(--custom-logo-height, 352);

    background-repeat: no-repeat;

    /* Always show the whole logo */
    background-size: contain;

    /* Always center the logo */
    background-position: center;

    flex-shrink: 0;
}


/* Uploaded logo uses exactly the same behavior */
.site[data-logo-uploaded="1"] .logo {
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
}


/* HERO CAPTION */

.hero-caption {
    margin-top: 28px;
    font-family: 'Orbitron', 'Rajdhani', sans-serif;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .24em;
    text-align: center;
    color: var(--color-hero-caption);
    text-shadow: 0 2px 12px var(--color-shadow);
}

.hero-caption:empty {
    display: none;
}

.site[data-custom-show-hero="0"] .hero {
    display: none;
}


/* =========================================================
   MAIN LAYOUT
   ========================================================= */

.layout {
    max-width: calc(var(--custom-content-width, 1320) * 1px);
    padding: 0 24px;

    display: grid;
    grid-template-columns: minmax(0, 1fr) 315px;
    gap: 28px;

    margin: 0 auto 80px;

    direction: ltr;
    position: relative;
}

.main,
.sidebar {
    min-width: 0;
    direction: ltr;
}

html[dir="rtl"] .main,
html[dir="rtl"] .sidebar {
    direction: rtl;
}

.main {
    grid-column: 1;
    grid-row: 1;
}

.sidebar {
    grid-column: 2;
    grid-row: 1;

    display: flex;
    flex-direction: column;
    gap: 18px;
}

.site.sidebar-left .layout {
    grid-template-columns: 315px minmax(0, 1fr);
}

.site.sidebar-left .main {
    grid-column: 2;
}

.site.sidebar-left .sidebar {
    grid-column: 1;
}

.home {
    display: flex;
    flex-direction: column;
    gap: 34px;
}

.site[data-custom-section-order="news-first"] .news {
    order: -1;
}


/* =========================================================
   CARDS
   ========================================================= */

.card {
    background: linear-gradient(135deg, color-mix(in srgb, var(--color-panel) 88%, var(--color-font-secondary)), var(--color-panel));
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 22px;
}

.card-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.card-heading h2 {
    font-size: 15px;
    font-weight: 600;
}

.card-heading > span {
    font-size: 11px;
    color: var(--muted);
}

.status-badge {
    border: 1px solid var(--line);
    border-radius: 30px;
    padding: 3px 8px;
}

.status-badge[data-state="online"] {
    color: var(--color-success);
    background: color-mix(in srgb, var(--color-success) 8%, transparent);
}

.online-number {
    font-size: 48px;
    line-height: 1;
    font-weight: 700;
    letter-spacing: -.04em;
    color: var(--accent);
}

.status > p {
    margin-top: 9px;
    font-size: 12px;
    color: var(--muted);
}


/* =========================================================
   FACTS
   ========================================================= */

.facts {
    margin: 0;
    font-size: 12px;
}

.facts > div {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
}

.facts > div:last-child {
    border: 0;
    padding-bottom: 0;
}

.facts dt {
    color: var(--muted);
}

.facts dd {
    margin: 0;
    text-align: end;
    overflow-wrap: anywhere;
}


/* =========================================================
   CHIP / RACE STATUS
   ========================================================= */

.chip {
    margin-bottom: 13px;
}

.chip-label {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    margin-bottom: 6px;
    color: var(--muted);
}

.chip progress {
    appearance: none;
    display: block;
    width: 100%;
    height: 5px;
    border: 0;
    border-radius: 20px;
    overflow: hidden;
    background: color-mix(in srgb, var(--color-font-secondary) 4%, transparent);
    accent-color: var(--race-color);
}

.chip progress::-webkit-progress-bar {
    background: color-mix(in srgb, var(--color-font-secondary) 4%, transparent);
}

.chip progress::-webkit-progress-value {
    background: var(--race-color);
    border-radius: 20px;
}

.chip progress::-moz-progress-bar {
    background: var(--race-color);
}

.chip:nth-child(1) {
    --race-color: var(--color-accretia);
}

.chip:nth-child(2) {
    --race-color: var(--color-bellato);
}

.chip:nth-child(3) {
    --race-color: var(--color-cora);
}


/* =========================================================
   COMMUNITY / DISCORD
   ========================================================= */

.community {
    background:
            radial-gradient(
                    ellipse at top right,
                    color-mix(in srgb, var(--color-discord-accent) 23%, transparent),
                    transparent 85%
            ),
            var(--color-discord-panel);
}

.community h2 {
    margin: 10px 0;
    font-size: 21px;
}

.community p {
    font-size: 12px;
    color: var(--muted);
}

.live-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    background: var(--color-success);
    border-radius: 50%;
    margin-inline-end: 5px;
}

.discord-members {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 18px 0;
    gap: 0;
}

.discord-members li {
    margin-inline-end: -7px;
}

.discord-members img {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 3px solid color-mix(in srgb, var(--color-discord-panel) 85%, var(--color-font-secondary));
    object-fit: cover;
}


/* =========================================================
   BUTTON
   ========================================================= */

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;

    background: var(--accent);
    color: var(--color-button-text);

    border-radius: 8px;
    padding: 10px 18px;

    font-size: 12px;
    font-weight: 700;

    margin-top: 16px;
}

.community .button {
    background: var(--color-discord-accent);
    color: var(--color-discord-button-text);
    width: 100%;
}

.button:hover {
    filter: brightness(1.12);
}


/* =========================================================
   LEADERBOARD
   ========================================================= */

.leaderboard {
    list-style: none;
    padding: 0;
    margin: 0;
    counter-reset: rank;
}

.leaderboard li {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
    font-size: 12px;
}

.leaderboard li:last-child {
    border: 0;
    padding-bottom: 0;
}

.rank-number {
    color: var(--accent);
    width: 16px;
    font-weight: 700;
}

.rank-name {
    flex: 1;
    min-width: 0;
    overflow-wrap: anywhere;
}

.rank-name small {
    display: block;
    color: var(--muted);
    font-size: 10px;
}

.rank-meta {
    min-height: 18px;
    margin-top: 3px;
}

.rank-meta img {
    display: inline-block;
    width: auto;
    height: 18px;
    margin-inline-end: 5px;
    object-fit: contain;
    vertical-align: middle;
}

.ranking-loading {
    color: var(--muted);
    justify-content: center;
}

.leaderboard[aria-busy="true"] {
    opacity: .72;
}

.rank-value {
    font-variant-numeric: tabular-nums;
    color: var(--muted);
    font-size: 11px;
}


/* =========================================================
   SLIDESHOW
   ========================================================= */

.slideshow {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid var(--line);
    background: var(--panel);
}

.slide {
    display: block;
    width: 100%;
    aspect-ratio: 3.4;
    object-fit: cover;
}

.slide-prev,
.slide-next {
    position: absolute;
    top: 45%;
    background: color-mix(in srgb, var(--color-shadow) 53%, transparent);
    width: 30px;
    height: 38px;
    border-radius: 6px;
    font-size: 25px;
    line-height: 1;
}

.slide-prev {
    left: 12px;
}

.slide-next {
    right: 12px;
}

.slide-dots {
    position: absolute;
    bottom: 14px;
    left: 0;
    right: 0;

    display: flex;
    justify-content: center;
    gap: 6px;
}

.slide-dots button {
    height: 5px;
    width: 18px;
    background: color-mix(in srgb, var(--color-font-secondary) 38%, transparent);
    border-radius: 8px;
    padding: 0;
}

.slide-dots button[aria-pressed="true"] {
    background: var(--accent);
    width: 28px;
}


/* =========================================================
   SECTIONS / NEWS
   ========================================================= */

.section-heading > span,
.footer-kicker {
    color: var(--accent);
    font-size: 10px;
    letter-spacing: .2em;
    font-weight: 600;
}

.section-heading h1 {
    font-size: 30px;
    margin: 8px 0 22px;
    letter-spacing: -.025em;
}

.news-tabs {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;

    margin-bottom: 22px;
    padding-bottom: 18px;

    border-bottom: 1px solid var(--line);
}

.news-tabs button {
    padding: 7px 17px;
    border-radius: 7px;
    color: var(--muted);
    font-size: 12px;
}

.news-tabs button[aria-pressed="true"] {
    background: var(--accent);
    color: var(--color-button-text);
    font-weight: 650;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.news-card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 12px;
    overflow: hidden;
}

.news-cover {
    display: block;
    position: relative;
    overflow: hidden;
}

.news-cover img {
    width: 100%;
    aspect-ratio: 1.9;
    object-fit: cover;
    display: block;
    transition: transform .3s;
}

.news-cover .news-image-template {
    display: none;
}

.news-card:not(.has-post-cover) .news-image-template,
.site[data-custom-news-image-source="template"] .news-cover .news-image-template {
    display: block;
}

.site[data-custom-news-image-source="template"] .news-cover .news-image-post {
    display: none;
}

.news-card:hover .news-cover img {
    transform: scale(1.03);
}

.news-cover:after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(transparent, color-mix(in srgb, var(--color-shadow) 53%, transparent));
}

.news-cover time,
.news-cover > span {
    position: absolute;
    bottom: 13px;
    z-index: 1;
    font-size: 10px;
    letter-spacing: .06em;
}

.news-cover time {
    inset-inline-end: 16px;
}

.news-cover > span {
    inset-inline-start: 16px;
    color: var(--color-news-category);
    text-transform: uppercase;
}

.news-copy {
    padding: 20px;
}

.news-copy h2 {
    font-size: 17px;
}

.news-copy p {
    font-size: 12px;
    color: var(--muted);
    margin: 12px 0 18px;

    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;

    overflow: hidden;
}

.read-more {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--accent);
}

.news-more {
    text-align: center;
    padding-bottom: 16px;
}

.news-load-more {
    position: relative;
}

.news-load-more.is-loading {
    color: transparent;
    pointer-events: none;
}

.news-load-more.is-loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 14px;
    height: 14px;
    margin: -7px 0 0 -7px;
    border: 2px solid color-mix(in srgb, var(--color-button-text) 35%, transparent);
    border-top-color: var(--color-button-text);
    border-radius: 50%;
    animation: news-spin .6s linear infinite;
}

@keyframes news-spin {
    to { transform: rotate(360deg); }
}

.site[data-custom-news-layout="list"] .news-grid {
    grid-template-columns: 1fr;
}

.site[data-custom-news-layout="list"] .news-card {
    display: grid;
    grid-template-columns: 35% 1fr;
}

.site[data-custom-news-layout="list"] .news-cover img {
    height: 100%;
}

.empty {
    color: var(--muted);
    padding: 22px;
    text-align: center;
}


/* =========================================================
   FOOTER
   ========================================================= */

.footer {
    border-top: 1px solid color-mix(in srgb, var(--color-font-primary) 25%, transparent);

    background:
            radial-gradient(
                    ellipse at bottom left,
                    color-mix(in srgb, var(--color-font-primary) 8%, transparent),
                    transparent 65%
            ),
            var(--color-footer-bg);
}

.footer-inner {
    max-width: calc(var(--custom-content-width, 1320) * 1px);
    margin: auto;
    padding: 54px 24px;

    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr);
    gap: 70px;
}

.footer-inner > div,
.footer-bottom > span {
    min-width: 0;
    overflow-wrap: anywhere;
}

.footer h2 {
    font-size: 27px;
    margin: 12px 0;
}

.footer p {
    font-size: 12px;
    color: var(--muted);
    max-width: 340px;
}

.footer h3 {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .15em;
    margin-bottom: 18px;
}

.footer-links nav,
.footer-social {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
}

.footer-social h3 {
    margin-bottom: 8px;
}

.footer a {
    font-size: 12px;
    color: var(--muted);
}

.footer a:hover {
    color: var(--accent);
}

.footer-bottom {
    position: relative;

    border-top: 1px solid var(--line);

    max-width: calc(var(--custom-content-width, 1320) * 1px);
    padding: 23px 64px 23px 24px;
    margin: auto;

    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 20px;

    font-size: 10px;
    color: var(--color-footer-muted);
}

.footer-language {
    display: inline-flex;
    flex-shrink: 0;
    max-width: 100%;
    align-items: center;
    gap: .45rem;
    color: var(--accent);
}

.footer-language select {
    min-width: 7rem;
    max-width: 100%;
    padding: .35rem 1.7rem .35rem .6rem;
    color: var(--text);
    background: color-mix(in srgb, var(--bg) 92%, transparent);
    border: 1px solid var(--line);
    border-radius: 4px;
    font: 600 .75rem Rajdhani, sans-serif;
}

.back-top {
    position: absolute;
    right: 24px;
    top: 17px;

    border: 1px solid var(--line);
    padding: 4px 10px;
    border-radius: 6px;
}


/* =========================================================
   PAGE
   ========================================================= */

.page {
    padding: 28px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 14px;
}

.page h1 {
    font-size: 30px;
    margin: 8px 0 24px;
}

.page h2 {
    font-size: 20px;
    margin: 28px 0 15px;
}

.page h3 {
    font-size: 16px;
    margin: 22px 0 12px;
}

.ranking-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 22px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--line);
}

.ranking-tabs button {
    padding: 8px 17px;
    border-radius: 7px;
    color: var(--muted);
    font-family: 'Orbitron', 'Rajdhani', sans-serif;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.ranking-tabs button[aria-selected="true"] {
    background: var(--accent);
    color: var(--color-button-text);
}

.ranking-panel[hidden] {
    display: none;
}

.player-name {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    white-space: nowrap;
}

.player-name img {
    width: auto;
    height: 12px;
}

.race-icon,
.class-icon {
    display: inline-block;
    width: auto;
    height: 22px;
    object-fit: contain;
    vertical-align: middle;
}

.class-icon {
    height: 19px;
}

.prose {
    overflow-wrap: anywhere;
}

.prose p {
    margin: 0 0 18px;
}

.prose a {
    color: var(--accent);
    text-decoration: underline;
}

.prose img,
.prose video,
.prose iframe {
    max-width: 100%;
}

.prose table {
    display: block;
    max-width: 100%;
    overflow: auto;
}

.article-meta {
    color: var(--muted);
    font-size: 12px;
    margin-bottom: 24px;
}


/* =========================================================
   TABLE
   ========================================================= */

.table-scroll {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    text-align: start;
}

.table th {
    color: var(--accent);
    font-weight: 600;
    background: color-mix(in srgb, var(--color-font-secondary) 1%, transparent);
}

.table th,
.table td {
    padding: 12px;
    border-bottom: 1px solid var(--line);
    text-align: start;
}

.table .button {
    margin: 0;
    white-space: nowrap;
}


/* =========================================================
   REQUIREMENTS / GUIDES
   ========================================================= */

.requirements {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
}

.guide {
    padding-inline-start: 20px;
    font-size: 13px;
    color: var(--muted);
}

.guide li {
    padding: 8px;
}


/* =========================================================
   404
   ========================================================= */

.not-found {
    min-height: 460px;

    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;

    text-align: center;

    background:
            radial-gradient(
                    circle at center,
                    color-mix(in srgb, var(--color-not-found-glow) 14%, transparent),
                    transparent 62%
            ),
            var(--panel);
}

.not-found-code {
    font-family: 'Orbitron', 'Rajdhani', sans-serif;
    font-size: clamp(82px, 15vw, 170px);
    font-weight: 700;
    line-height: .9;

    color: transparent;
    -webkit-text-stroke: 1px var(--accent);

    opacity: .72;
}

.not-found h1 {
    margin: 14px 0 12px;
}

.not-found > p:not(.footer-kicker) {
    max-width: 480px;
    color: var(--muted);
}


/* =========================================================
   DESKTOP
   ========================================================= */

@media (min-width: 901px) {

    .menu-item:hover > .submenu {
        display: block;
    }

}


/* =========================================================
   TABLET / SMALL DESKTOP
   ========================================================= */

@media (max-width: 1100px) {

    .menu {
        gap: 0;
    }

    .menu-item > a,
    .submenu-toggle {
        padding: 13px;
    }

    .layout {
        gap: 20px;
        grid-template-columns: minmax(0, 1fr) 290px;
    }

    .site.sidebar-left .layout {
        grid-template-columns: 290px minmax(0, 1fr);
    }

    .card {
        padding: 18px;
    }

    .footer-inner {
        gap: 30px;
    }

}


/* =========================================================
   TABLET / MOBILE
   ========================================================= */

@media (max-width: 900px) {

    .menu-inner {
        min-height: 58px;
        padding: 0 16px;
    }

    .menu-toggle {
        display: block;
    }

    #navigation {
        display: none;
        max-height: 70vh;
        overflow: auto;
        border-top: 1px solid var(--line);
    }

    #navigation.expanded {
        display: block;
    }

    .menu {
        display: block;
        padding: 0 8px 10px;
        min-height: 0;
    }

    .menu-item {
        display: block;
    }

    .menu-item > a,
    .submenu-toggle {
        padding: 12px;
    }

    .submenu,
    .submenu .submenu {
        position: static;
        box-shadow: none;
        max-width: none;
        min-width: 0;
        margin: 0 10px;
        background: color-mix(in srgb, var(--color-font-secondary) 2%, transparent);
    }

    .hero {
        height: 430px;
    }

    /* Responsive single-image logo */
    .logo {
        width: min(
                calc(var(--custom-logo-width, 400) * 1px),
                55vw,
                250px
        );

        background-size: contain;
        background-position: center;
    }

    .layout,
    .site.sidebar-left .layout {
        display: flex;
        flex-direction: column;
        padding: 0 16px;
    }

    .sidebar {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 16px;
    }

    .footer-inner {
        padding: 36px 20px;
        gap: 28px;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 6px;
    }

    .main {
        width: 100%;
    }

}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 550px) {

    .hero {
        height: 360px;
        padding: 24px 20px;
    }

    .logo {
        width: min(
                calc(var(--custom-logo-width, 400) * 1px),
                60vw,
                210px
        );

        background-size: contain;
        background-position: center;
    }

    .hero-caption {
        font-size: 10px;
        letter-spacing: .13em;
    }

    .news-grid {
        grid-template-columns: 1fr;
    }

    .sidebar {
        display: flex;
    }

    .section-heading h1 {
        font-size: 26px;
    }

    .card {
        padding: 22px;
    }

    .footer-inner {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }

    .footer-inner > div:first-child {
        grid-column: 1 / -1;
    }

    .site[data-custom-news-layout="list"] .news-card {
        display: block;
    }

    .slide {
        aspect-ratio: 2.3;
    }

    .page {
        padding: 20px;
    }

    .requirements {
        grid-template-columns: 1fr;
    }

}


/* =========================================================
   REDUCED MOTION
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

    html {
        scroll-behavior: auto;
    }

    *,
    *:before,
    *:after {
        transition: none !important;
        animation: none !important;
    }

}

/* =========================================================
   PITBOSS STATUS
   ========================================================= */
.pb-page {
    display: grid;
    gap: 28px;
}

.pb-intro {
    max-width: 680px;
    color: var(--muted);
}

.pb-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.pb-summary article {
    position: relative;
    display: flex;
    min-height: 112px;
    padding: 22px;
    align-items: flex-end;
    justify-content: space-between;
    overflow: hidden;
    border: 1px solid var(--line);
    background: color-mix(in srgb, var(--panel) 92%, var(--color-font-secondary));
}

.pb-summary article:before {
    content: '';
    position: absolute;
    inset-inline: 0;
    top: 0;
    height: 2px;
    background: var(--accent);
}

.pb-summary .is-alive:before { background: var(--color-success); }
.pb-summary .is-dead:before { background: var(--color-danger); }

.pb-summary span,
.pb-map-heading span,
.pb-territory-heading span {
    color: var(--muted);
    font: 600 10px/1.2 'Orbitron', 'Rajdhani', sans-serif;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.pb-summary strong {
    color: var(--text);
    font: 700 42px/1 'Orbitron', 'Rajdhani', sans-serif;
}

.pb-summary .is-alive strong,
.pb-territory-total strong,
.pb-boss-list .is-alive b {
    color: var(--color-success);
}

.pb-summary .is-dead strong,
.pb-boss-list .is-dead b {
    color: var(--color-danger);
}

.pb-notice,
.pb-map-error {
    margin: 0;
    padding: 13px 15px;
    color: var(--color-danger);
    border: 1px solid color-mix(in srgb, var(--color-danger) 42%, transparent);
    background: color-mix(in srgb, var(--color-danger) 8%, transparent);
}

.pb-territory {
    display: grid;
    gap: 16px;
}

.pb-territory-heading,
.pb-map-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.pb-territory-heading h2,
.pb-map-heading h3 {
    margin-top: 4px;
}

.pb-territory-heading h2 {
    font-size: clamp(20px, 3vw, 30px);
}

.pb-territory-total {
    display: flex;
    align-items: baseline;
    gap: 6px;
    font-family: 'Orbitron', 'Rajdhani', sans-serif;
}

.pb-territory-total strong { font-size: 31px; }
.pb-territory-total span { color: var(--muted); }

.pb-territory-progress,
.pb-map-progress {
    overflow: hidden;
    background: color-mix(in srgb, var(--line) 65%, transparent);
}

.pb-territory-progress { height: 3px; }
.pb-map-progress { height: 2px; margin: 14px 0; }

.pb-territory-progress span,
.pb-map-progress span {
    display: block;
    height: 100%;
    background: var(--color-success);
    box-shadow: 0 0 12px color-mix(in srgb, var(--color-success) 55%, transparent);
}

.pb-map-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.pb-map-card {
    min-width: 0;
    padding: 20px;
    border: 1px solid var(--line);
    background: color-mix(in srgb, var(--panel) 96%, var(--color-font-secondary));
}

.pb-map-card:hover {
    border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
}

.pb-map-heading > strong {
    color: var(--color-success);
    font: 700 19px/1 'Orbitron', 'Rajdhani', sans-serif;
}

.pb-boss-list {
    display: grid;
    gap: 3px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.pb-boss-list li {
    display: grid;
    grid-template-columns: 9px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    padding: 9px 0;
    border-bottom: 1px solid color-mix(in srgb, var(--line) 65%, transparent);
}

.pb-boss-list li:last-child { border: 0; }

.pb-boss-name strong {
    display: block;
    overflow-wrap: anywhere;
}

.pb-boss-name small {
    display: block;
    color: var(--muted);
    font-size: 10px;
    letter-spacing: .09em;
}

.pb-boss-list b {
    font: 600 9px/1 'Orbitron', 'Rajdhani', sans-serif;
    letter-spacing: .07em;
    text-transform: uppercase;
}

.pb-state-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--color-danger);
    box-shadow: 0 0 9px color-mix(in srgb, var(--color-danger) 65%, transparent);
}

.pb-boss-list .is-alive .pb-state-dot {
    background: var(--color-success);
    box-shadow: 0 0 9px color-mix(in srgb, var(--color-success) 65%, transparent);
}

.pb-map-card.is-unavailable { opacity: .72; }

@media (max-width: 800px) {
    .pb-map-grid { grid-template-columns: 1fr; }
}

@media (max-width: 550px) {
    .pb-summary { grid-template-columns: 1fr; }
    .pb-summary article { min-height: 82px; }
}
