/* Steppe design layer (loaded on every page from includes/head.php).
 *
 * "Steppe Horizon" — the Steppe identity:
 *   - cool layered dark surfaces, one gold accent (--red alias), CS2 rarity colours
 *   - Rajdhani for display, Inter for body, tabular numbers everywhere
 *   - a topographic contour motif (assets/contours.svg) + a faint dawn glow
 *   - cut corners with the border following the cut (corner-shape, where supported)
 *   - motion only where someone did something; everything switches off for
 *     people who ask for reduced motion
 *
 * Page stylesheets load after this file, so overrides here are prefixed with `html`.
 */

/* ---------- Fonts (self-hosted) ---------- */
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/inter-latin-400-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 500; font-display: swap; src: url(fonts/inter-latin-500-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 600; font-display: swap; src: url(fonts/inter-latin-600-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/inter-latin-ext-400-normal.woff2) format('woff2'); unicode-range: U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 500; font-display: swap; src: url(fonts/inter-latin-ext-500-normal.woff2) format('woff2'); unicode-range: U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 600; font-display: swap; src: url(fonts/inter-latin-ext-600-normal.woff2) format('woff2'); unicode-range: U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/inter-cyrillic-400-normal.woff2) format('woff2'); unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 500; font-display: swap; src: url(fonts/inter-cyrillic-500-normal.woff2) format('woff2'); unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 600; font-display: swap; src: url(fonts/inter-cyrillic-600-normal.woff2) format('woff2'); unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/inter-cyrillic-ext-400-normal.woff2) format('woff2'); unicode-range: U+0460-052F,U+1C80-1C88,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 500; font-display: swap; src: url(fonts/inter-cyrillic-ext-500-normal.woff2) format('woff2'); unicode-range: U+0460-052F,U+1C80-1C88,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 600; font-display: swap; src: url(fonts/inter-cyrillic-ext-600-normal.woff2) format('woff2'); unicode-range: U+0460-052F,U+1C80-1C88,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F; }
@font-face { font-family: 'Rajdhani'; font-style: normal; font-weight: 500; font-display: swap; src: url(fonts/rajdhani-latin-500-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Rajdhani'; font-style: normal; font-weight: 600; font-display: swap; src: url(fonts/rajdhani-latin-600-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Rajdhani'; font-style: normal; font-weight: 700; font-display: swap; src: url(fonts/rajdhani-latin-700-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Rajdhani'; font-style: normal; font-weight: 500; font-display: swap; src: url(fonts/rajdhani-latin-ext-500-normal.woff2) format('woff2'); unicode-range: U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'Rajdhani'; font-style: normal; font-weight: 600; font-display: swap; src: url(fonts/rajdhani-latin-ext-600-normal.woff2) format('woff2'); unicode-range: U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'Rajdhani'; font-style: normal; font-weight: 700; font-display: swap; src: url(fonts/rajdhani-latin-ext-700-normal.woff2) format('woff2'); unicode-range: U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }

/* ---------- Tokens (declared in head.php; timing + motion helpers live here) ---------- */
:root {
  --t-fast: 140ms;
  --t: 220ms;
  --t-slow: 360ms;
  --ease-io: cubic-bezier(0.65, 0, 0.35, 1);
  --head-h: 72px;
  color-scheme: dark;
  interpolate-size: allow-keywords;             /* lets <details> animate to auto height */
  scrollbar-color: #333 transparent;
}

html { -webkit-text-size-adjust: 100%; text-rendering: optimizeLegibility; scroll-padding-top: calc(var(--head-h) + 16px); }
html body { font-feature-settings: 'cv11', 'ss01'; }  /* Inter: single-storey a, open digits */

/* Numbers line up in tables, scores and balances */
html table, html .stat-n, html .wpill b, html .cs-chip b, html .cs-price, html [class*="score"], html .lp-float { font-variant-numeric: tabular-nums; }

/* Thin dark scrollbar that fits the theme */
html::-webkit-scrollbar { width: 12px; height: 12px; }
html::-webkit-scrollbar-thumb { background: #2b303a; border: 3px solid var(--bg); border-radius: 8px; }
html::-webkit-scrollbar-thumb:hover { background: #3a4150; }

/* ---------- Page changes ----------
 * Same-site page loads cross-fade instead of flashing. The header is its own layer so it
 * never blinks, the gold marker under the current nav item slides to the new item, and
 * the active tab of a tab bar glides to the tab you clicked. Browsers without support
 * just load the page normally. */
@view-transition { navigation: auto; }

html body > header { view-transition-name: site-header; }
html .nav-ind { view-transition-name: nav-ind; }
html .mtabs a.active,
html .staff-tabs a.active,
html .ctabs a.active,
html .btabs a.active,
html .lp-tab[aria-current="page"],
html .cs-tabs .btn-tab.on { view-transition-name: tab-on; }
html .pm-views a.on { view-transition-name: subtab-on; }

::view-transition-group(*) { animation-duration: var(--t-slow); animation-timing-function: var(--ease); }
::view-transition-old(root) { animation: vt-out var(--t-fast) ease-in both; }
::view-transition-new(root) { animation: vt-in var(--t-slow) var(--ease) both; }
::view-transition-old(site-header), ::view-transition-new(site-header) { animation: none; mix-blend-mode: normal; }
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in  { from { opacity: 0; transform: translateY(6px); } }

/* ---------- Header ----------
 * Sticky glass bar: it stays put on scroll, the page slides under it, and the
 * gold active marker glides between items across page changes. */
html body > header {
  position: sticky;
  top: 0;
  z-index: 50;
  min-height: var(--head-h);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
html body > header::after {
  /* a hair of the dawn glow bleeding through the header edge */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(680px 130px at 18% 0%, rgba(232,178,58,0.05), transparent 70%);
}
html #mainNav { gap: 22px; }
html #mainNav a {
  position: relative;
  padding: 6px 0;
  font-size: 14px;
  transition: color var(--t-fast) ease;
}
html #mainNav a.on { color: var(--text); }
/* hover: a thin line draws in from the left */
html #mainNav a::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: -2px; height: 1px;
  background: var(--text-dim);
  transform: scaleX(0); transform-origin: left;
  transition: transform var(--t) var(--ease);
}
html #mainNav a:hover::after { transform: scaleX(1); }
html #mainNav a.on::after { display: none; }
/* the current page: a solid gold bar (slides between items on page change) */
html .nav-ind {
  position: absolute; left: 0; right: 0; bottom: -3px; height: 2px;
  background: var(--red);
  box-shadow: 0 0 12px color-mix(in srgb, var(--red) 60%, transparent);
  clip-path: polygon(0 0, 100% 0, calc(100% - 2px) 100%, 2px 100%);
  pointer-events: none;
}

/* One control height in the header: 34px, square with a cut corner */
html .chip-btn, html .wpill, html .lang-switch, html .bell { height: 34px; }

/* Live-server chip: a quiet status read of the whole network, next to the lang switch */
html .srv-chip {
  display: none; align-items: center; height: 34px; padding: 0 12px;
  border: 1px solid var(--line); background: var(--surface);
  font-family: 'Rajdhani', 'Inter', sans-serif; font-weight: 700; font-size: 12.5px;
  letter-spacing: 0.09em; text-transform: uppercase; color: var(--text-dim); white-space: nowrap;
  clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px);
}
html .srv-chip.on { display: inline-flex; }
html .srv-chip b, html .srv-chip #srvChipTxt { color: var(--text); font-size: 13.5px; }
html .srv-chip .srv-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--text-faint); margin-right: 8px; }
html .srv-chip.has-live .srv-dot {
  background: var(--ok); box-shadow: 0 0 10px rgba(95, 211, 138, 0.75);
  animation: live-pulse 1.6s ease-in-out infinite;
}
@media (max-width: 1340px) { html .srv-chip { display: none !important; } }
html .lang-switch button { padding: 0 13px; height: 100%; transition: color var(--t-fast), background var(--t-fast); }
html .lang-switch button:not(.active):hover { color: var(--text); }
html .wpill { border-radius: 0; background: var(--surface); transition: border-color var(--t-fast), background var(--t-fast), color var(--t-fast); }
html .wpill:hover { background: var(--surface-2); }
html .chip-btn { clip-path: none; }
html .bell { align-items: center; padding: 0 6px; transition: color var(--t-fast); }
html .user-chip img { width: 32px; height: 32px; transition: border-color var(--t-fast); }
html .user-chip a.me:hover img { border-color: var(--red); }

/* Bordered controls get the Steppe cut corner with the border following the cut
   (corner-shape). Browsers without it keep plain square corners rather than a
   clipped border with gaps. */
@supports (corner-shape: bevel) {
  html :is(.ghost-btn, .lang-switch, .chip-btn, .wpill, .btn-tab, .cs-chip, .menu-btn) {
    clip-path: none;
    border-radius: 8px 0 8px 0;
    corner-shape: bevel;
  }
  html .chip-btn, html .menu-btn { border-radius: 7px 0 7px 0; }
  html .ghost-btn { border-radius: 10px 0 10px 0; }
  html .lang-switch { overflow: hidden; }
}

/* Header items that live in the menu on small screens */
html .nav-m-only { display: none; }
@media (max-width: 1240px) { html .panel-btn { display: none; } html #mainNav .nav-panel-m { display: block; } }
@media (max-width: 560px) {
  html .discord-btn, html .logout-btn { display: none; }
  html #mainNav .nav-m-only { display: block; }
  html body > header { flex-wrap: wrap; }
  html .brand .wordmark.sm { font-size: 19px; letter-spacing: 0.22em; }
}

/* Phone menu: slides down instead of popping in */
@media (max-width: 1240px) {
  html #mainNav.open { animation: menu-in var(--t) var(--ease) both; }
  html #mainNav { gap: 0; }
  html #mainNav a { padding: 13px 4px; }
  html #mainNav a::after, html .nav-ind { display: none; }
  html #mainNav a.on { color: var(--text); font-weight: 700; }
  html #mainNav a.on::before { content: ""; display: inline-block; width: 6px; height: 6px; background: var(--red); margin-right: 10px; vertical-align: middle; }
}
@keyframes menu-in { from { opacity: 0; transform: translateY(-6px); } }

/* ---------- Type rhythm ---------- */
html .market-wrap h1, html .bans-wrap h1, html .clans-wrap h1,
html .staff-wrap h1, html .wrap > h1, html main h1 { letter-spacing: 0.01em; font-size: clamp(30px, 4vw, 40px); }
/* Page subtitles were small tracked capitals; plain sentence case reads faster */
html .ladder-top .meta {
  font-size: 14px; letter-spacing: 0; text-transform: none; margin-top: 10px; max-width: 70ch; line-height: 1.5;
}
html .section-h h2 { letter-spacing: 0.02em; }

/* Kicker: the gold eyebrow line that opens every page and hero */
html .pg-kicker, html .lp-eyebrow, html .tm-eyebrow, html .champ-kicker {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: 'Rajdhani', 'Inter', sans-serif; font-weight: 700; font-size: 11.5px;
  letter-spacing: 0.22em; text-transform: uppercase; color: var(--red);
}
html .pg-kicker::before, html .lp-eyebrow::before, html .tm-eyebrow::before {
  content: ""; width: 22px; height: 1px; background: var(--red); opacity: 0.55;
}

/* ---------- Controls ----------
 * Every button-like thing reacts to a press and eases its colour changes */
html :is(.steam-btn, .ghost-btn, .btn-main, .btn-sm, .btn-tab, .cs-btn, .cs-mini, .lp-btn, .buy-btn,
         .connect-copy, .chip-btn, .menu-btn, .car-arrow, button[type="submit"], .pm-views a, .pager a) {
  transition: background-color var(--t-fast) ease, border-color var(--t-fast) ease, color var(--t-fast) ease,
              transform var(--t-fast) var(--ease), opacity var(--t-fast) ease;
}
html :is(.steam-btn, .ghost-btn, .btn-main, .btn-sm, .btn-tab, .cs-btn, .cs-mini, .lp-btn, .buy-btn,
         .connect-copy, .chip-btn, .car-arrow, button[type="submit"], .pager a):active:not(:disabled) {
  transform: scale(0.97);
}
html .car-arrow:active { transform: translateY(-50%) scale(0.94); }

/* Fields: calm by default, clearly lit when you're typing in them */
html :is(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="file"]), select, textarea) {
  transition: border-color var(--t-fast) ease, background-color var(--t-fast) ease;
}
html :is(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]), select, textarea):focus {
  border-color: color-mix(in srgb, var(--red) 55%, var(--line-strong)); outline: none;
}

/* Keyboard focus is always visible */
html :focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
html :is(input, select, textarea):focus-visible { outline: none; }

/* Tab bars: one visual language everywhere — tracked capitals, gold marker */
html :is(.mtabs, .staff-tabs, .ctabs, .btabs) a {
  font-family: 'Rajdhani', 'Inter', sans-serif; font-weight: 700; font-size: 14.5px;
  letter-spacing: 0.07em; text-transform: uppercase;
  transition: color var(--t-fast) ease, border-color var(--t-fast) ease;
}
html :is(.mtabs, .staff-tabs, .ctabs, .btabs) a:not(.active):hover { color: var(--text); border-bottom-color: var(--line-strong); }
html :is(.mtabs, .staff-tabs, .ctabs, .btabs) a.active { border-bottom-color: var(--red); }

/* ---------- Tables ---------- */
html table tr { transition: background-color var(--t-fast) ease; }
html table tbody tr:hover, html table tr:has(td):hover { background-color: rgba(232, 178, 58, 0.035); }

/* ---------- Open / close / expand ---------- */
/* <details>: the content unfolds instead of jumping (Chrome/Edge 131+; others just open) */
html details::details-content {
  block-size: 0;
  overflow: clip;
  opacity: 0;
  transition: block-size var(--t) var(--ease), opacity var(--t) ease, content-visibility var(--t) allow-discrete;
}
html details[open]::details-content { block-size: auto; opacity: 1; }
html summary { cursor: pointer; }

/* Dialogs (Use this set, case results…) grow in and fade out */
html dialog { transition: opacity var(--t) ease, transform var(--t) var(--ease), overlay var(--t) allow-discrete, display var(--t) allow-discrete; }
html dialog:not([open]) { opacity: 0; transform: translateY(8px) scale(0.98); }
html dialog[open] { opacity: 1; transform: none; }
@starting-style { html dialog[open] { opacity: 0; transform: translateY(8px) scale(0.98); } }
html dialog::backdrop { transition: background-color var(--t) ease, overlay var(--t) allow-discrete, display var(--t) allow-discrete; }
@starting-style { html dialog[open]::backdrop { background-color: rgba(0, 0, 0, 0); } }

/* Result messages after you do something slide in under the title */
html :is(.cs-flash, .pm-flash, .flash, .lp-flash, .link-flash) { animation: flash-in var(--t-slow) var(--ease) both; }
@keyframes flash-in { from { opacity: 0; transform: translateY(-6px); } }

/* Case drop reveal: the one big moment on the site. The result card lands with a
   short scale-in and its rarity glow swells once. */
html .cs-modal:not([hidden]) { animation: modal-fade var(--t) ease both; }
html .cs-modal:not([hidden]) .cs-modal-box { animation: drop-land 520ms var(--ease) both, drop-glow 1200ms ease-out 120ms both; }
@keyframes modal-fade { from { opacity: 0; } }
@keyframes drop-land { from { opacity: 0; transform: translateY(14px) scale(0.92); } }
@keyframes drop-glow {
  0%   { box-shadow: 0 0 0 color-mix(in srgb, var(--rc, #fff) 0%, transparent); }
  35%  { box-shadow: 0 0 90px color-mix(in srgb, var(--rc, #fff) 60%, transparent); }
  100% { box-shadow: 0 0 40px color-mix(in srgb, var(--rc, #fff) 35%, transparent); }
}

/* ---------- Cards ---------- */
/* Item cards: same height in a row, action button pinned to the bottom */
html .cs-item { display: flex; flex-direction: column; align-items: center; }
html .cs-item > .cs-act, html .cs-item > .cs-item-actions, html .cs-item > .cs-pending:last-child { margin-top: auto; padding-top: 10px; }
html .cs-item, html .cs-shop-card, html .match-card, html .skin-card, html .panel, html .hb-card {
  transition: border-color var(--t) ease, transform var(--t) var(--ease), background var(--t) ease;
}

/* Cut corners drawn with clip-path lose their border on the diagonal; draw it back */
html .match-card::after {
  content: ""; position: absolute; z-index: 3; pointer-events: none;
  width: calc(var(--cc) * 1.4142); height: 2px; background: var(--line);
  right: calc(var(--cc) * -0.2071); bottom: calc(var(--cc) * 0.5 - 1px);
  transform: rotate(-45deg);
}
html .match-card {
  --cc: 18px;
  position: relative;
  height: 340px;
  overflow: hidden;
  clip-path: polygon(18px 0, 100% 0, 100% calc(100% - 18px), calc(100% - 18px) 100%, 0 100%, 0 18px);
  border: 1px solid var(--line);
  background: var(--surface);
}
html .match-card:hover::after { background: var(--red); }

/* Corner tick: the small gold mark on feature panels — the Steppe signature */
html .panel, html .hb-card, html .cs-panel, html .cs-shop-card, html .champ {
  position: relative;
}
html .panel::before, html .hb-card::before {
  content: ""; position: absolute; top: -1px; left: -1px; width: 18px; height: 18px;
  border-top: 2px solid var(--red); border-left: 2px solid var(--red);
  opacity: 0.65; pointer-events: none;
}

/* ---------- Home: hero ---------- */
html .hero { position: relative; z-index: 1; overflow: hidden; border-bottom: 1px solid var(--line); }
html .hero::before {
  /* dawn over the steppe */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(900px 420px at 50% -120px, rgba(232,178,58,0.10), transparent 72%),
    radial-gradient(1400px 500px at 50% 115%, rgba(232,178,58,0.04), transparent 70%);
}
html .hero-inner {
  position: relative; max-width: 1160px; margin: 0 auto;
  padding: clamp(58px, 10vh, 104px) 28px clamp(52px, 9vh, 92px);
  text-align: center;
}
html .hero-emblem { width: clamp(64px, 9vw, 88px); height: auto; margin: 0 auto 20px; display: block; }
html .hero-kicker { justify-content: center; }
html .hero-kicker::after { content: ""; width: 22px; height: 1px; background: var(--red); opacity: 0.55; }
html .hero-wordmark {
  font-family: 'Rajdhani', 'Inter', sans-serif; font-weight: 700; text-transform: uppercase;
  font-size: clamp(54px, 10.5vw, 128px); letter-spacing: 0.14em; line-height: 1;
  margin-top: 14px; color: var(--text);
}
html .hero-wordmark .dot { color: var(--red); }
html .hero-lede { max-width: 62ch; margin: 18px auto 0; color: var(--text-dim); font-size: 15.5px; line-height: 1.65; }
html .hero-ctas { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; margin-top: 30px; }
/* ---------- Home: servers ---------- */
html .matches { padding: 64px 28px 34px; }
html .matches .section-head h2 { font-size: 30px; }
html .home-boards { padding-top: 26px; }

/* Server cards: map duotone under a scrim, live pill with a breathing dot,
   copy-able connect line pinned to the bottom */
html .match-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
  gap: 16px;
}
html .match-thumb {
  position: absolute; inset: 0;
  opacity: 0.9;
  background: var(--map-grad, linear-gradient(135deg, #262a31, #14161b));
  transition: transform .6s var(--ease), opacity .2s ease;
}
html .match-card:hover .match-thumb { transform: scale(1.05); opacity: 1; }
html .map-dust2    { --map-grad: linear-gradient(135deg, #3d3524, #191510); }
html .map-mirage   { --map-grad: linear-gradient(135deg, #2c3642, #151a20); }
html .map-inferno  { --map-grad: linear-gradient(135deg, #3c2c22, #1a130e); }
html .map-nuke     { --map-grad: linear-gradient(135deg, #2b3a41, #131c20); }
html .map-overpass { --map-grad: linear-gradient(135deg, #2f3a2e, #141a13); }
html .map-vertigo  { --map-grad: linear-gradient(135deg, #35313d, #18151d); }
html .map-ancient  { --map-grad: linear-gradient(135deg, #2d3a33, #131a16); }
html .map-anubis   { --map-grad: linear-gradient(135deg, #3a3325, #171410); }
html .map-train    { --map-grad: linear-gradient(135deg, #2e3540, #141920); }
html .map-office   { --map-grad: linear-gradient(135deg, #26313c, #10161c); }
html .map-cache    { --map-grad: linear-gradient(135deg, #3a3a2c, #191912); }

html .match-scrim {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(180deg, rgba(6,7,9,0.2) 0%, rgba(6,7,9,0.55) 55%, rgba(6,7,9,0.94) 100%);
}
html .match-card-top {
  position: absolute; top: 0; left: 0; right: 0; z-index: 2;
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 16px 10px;
}
html .match-title {
  font-family: 'Rajdhani', 'Inter', sans-serif; font-weight: 700; font-size: 19px; letter-spacing: .04em;
}
html .tag-5k {
  font-size: 10px; font-weight: 700; letter-spacing: .08em;
  background: var(--red); color: #14100a; padding: 2px 7px; margin-left: 8px; vertical-align: 2px;
}
html .match-play {
  width: 40px; height: 40px; display: grid; place-items: center; font-size: 13px;
  border: 1px solid rgba(255,255,255,0.35); color: #fff; background: rgba(6,7,9,0.4);
  border-radius: 50%; flex-shrink: 0;
  transition: background var(--t-fast) ease, color var(--t-fast) ease, border-color var(--t-fast) ease;
}
html .match-card:hover .match-play { background: var(--red); color: #14100a; border-color: var(--red); }
html .match-card-bottom {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  padding: 16px; display: flex; flex-direction: column; gap: 8px;
}
html .match-status-pill {
  display: inline-flex; align-items: center; align-self: flex-start;
  font-family: 'Rajdhani', 'Inter', sans-serif; font-weight: 700; font-size: 12px;
  letter-spacing: .12em; text-transform: uppercase;
  padding: 4px 10px; border: 1px solid; background: rgba(6,7,9,0.55);
  border-color: color-mix(in srgb, currentColor 45%, transparent);
}
html .match-sub { font-size: 13px; color: #cfd4da; }
html .match-round { font-size: 12.5px; color: var(--text-dim); }
html .connect-row { display: flex; gap: 8px; align-items: stretch; margin-top: 6px; }
html .connect-ip {
  flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  display: flex; align-items: center; padding: 8px 10px;
  background: rgba(6,7,9,0.6); border: 1px solid var(--line);
  font-family: 'Inter', sans-serif; font-size: 12px; color: #b8bfc7;
}
html .connect-copy {
  background: var(--red); color: #14100a; border: none; padding: 8px 13px;
  font-family: 'Rajdhani', 'Inter', sans-serif; font-weight: 700; font-size: 12.5px;
  letter-spacing: .07em; text-transform: uppercase; cursor: pointer;
}
html .connect-copy:hover { background: var(--red-bright); }
html .connect-copy.copied { background: var(--ok); }

html .match-status-pill.live::before {
  content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  background: currentColor; margin-right: 8px; vertical-align: 2px;
  animation: live-pulse 1.6s ease-in-out infinite;
}
@keyframes live-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
html .match-status-pill.live  { color: var(--ok); }
html .match-status-pill.waiting { color: var(--warn); }
html .match-status-pill.offline { color: var(--text-faint); }
html .match-status-pill.over  { color: var(--text-dim); }
html .match-card:hover { border-color: var(--line-strong); transform: translateY(-3px); }

/* ---------- Footer ---------- */
html footer.site-foot { margin-top: 56px; padding: 0; }
html .foot-grid {
  max-width: 1160px; margin: 0 auto; padding: 48px 28px 40px;
  display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 34px;
}
html .foot-brand p { color: var(--text-dim); font-size: 13.5px; margin-top: 12px; max-width: 34ch; line-height: 1.6; }
html .foot-col h3 {
  font-size: 11.5px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--text-faint); margin-bottom: 14px; font-weight: 600;
}
html .foot-col a {
  display: block; color: var(--text-dim); text-decoration: none; font-size: 13.5px;
  padding: 5px 0; transition: color var(--t-fast) ease;
}
html .foot-col a:hover { color: var(--red-bright); }
html .foot-bar {
  border-top: 1px solid var(--line);
  max-width: 1160px; margin: 0 auto; padding: 18px 28px 26px;
  display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap;
}
html .foot-bar .fine { color: var(--text-faint); font-size: 12.5px; }
html .foot-bar .fine a { color: var(--text-dim); text-decoration: none; }
html .foot-bar .fine a:hover { color: var(--text); }
@media (max-width: 900px) { html .foot-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { html .foot-grid { grid-template-columns: 1fr; gap: 26px; } }

/* ---------- Text wordmark ---------- */
.wordmark {
  font-family: 'Rajdhani', 'Inter', sans-serif;
  font-weight: 700;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: #fff;
  line-height: 1;
  user-select: none;
}
.wordmark.sm { font-size: 22px; }
.wordmark.lg { font-size: clamp(38px, 9vw, 72px); letter-spacing: 0.3em; }
.wordmark .dot { color: var(--red); }

/* Circular Steppe logo */
.logo-img { display: block; border-radius: 50%; }

/* Clan color picker (assets/color-pick.js) */
.cp-wrap { display: flex; flex-direction: column; gap: 8px; max-width: 420px; }
.cp-slider { -webkit-appearance: none; appearance: none; width: 100%; height: 10px; border-radius: 5px; outline: none; }
.cp-slider::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 2px solid #0a0a0a; cursor: pointer; }
.cp-slider::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 2px solid #0a0a0a; cursor: pointer; }
.cp-swatches { display: flex; flex-wrap: wrap; gap: 6px; }
.cp-sw { width: 24px; height: 24px; border: 2px solid transparent; border-radius: 4px; cursor: pointer; padding: 0; }
.cp-sw.on { border-color: #fff; box-shadow: 0 0 0 2px #0a0a0a inset; }
.cp-label { font-size: 13px; font-weight: 600; }
.brand .logo-img { width: 40px; height: 40px; }
footer .brand .logo-img { width: 30px; height: 30px; }

/* ---------- Empty states ---------- */
html .empty-note {
  color: var(--text-dim); font-size: 14px; padding: 26px 0;
}
html .empty-page { max-width: 700px; margin: 80px auto; padding: 0 24px; text-align: center; }
html .empty-page::before {
  content: ""; display: block; width: 44px; height: 2px; background: var(--red);
  margin: 0 auto 22px; opacity: 0.6;
}
html .empty-page h1 { font-size: clamp(30px, 5vw, 44px); }
html .empty-page p { color: var(--text-dim); margin-top: 10px; }

/* ---------- Pager ---------- */
html .pager a, html .pager span.cur, html .pager2 a {
  min-width: 34px; text-align: center; padding: 6px 12px; text-decoration: none; font-size: 13px;
}
html .pager span.cur { background: var(--red); color: #14100a; border-color: var(--red); font-weight: 700; }
html .pager a:hover, html .pager2 a:hover { border-color: var(--line-strong); }

/* ---------- Footer margin on plain pages ---------- */
html footer { margin-top: 48px; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
  html *, html *::before, html *::after, html details::details-content {
    animation-duration: 1ms !important; animation-delay: 0ms !important;
    transition-duration: 1ms !important; scroll-behavior: auto !important;
  }
}

/* ---------- Small phones (<=460px): tighten the hero and shared composites ---------- */
@media (max-width: 460px) {
  html .hero-inner { padding: 44px 18px 50px; }
  html .hero-emblem { width: 58px; }
  html .hero-wordmark { font-size: clamp(38px, 11.5vw, 64px); letter-spacing: 0.08em; }
  html .hero-lede { font-size: 14.5px; padding: 0 6px; }
  html .hero-ctas { flex-direction: column; align-items: center; gap: 10px; margin-top: 24px; }
  html .hero-ctas .steam-btn, html .hero-ctas .ghost-btn { width: min(300px, 100%); text-align: center; }
  html .matches { padding: 46px 16px 28px; }
  html .section-head h2 { font-size: 25px; }
  html .home-boards { padding: 40px 14px 44px; }
}


/* =====================================================================
 * Merged from Grey's branch (Oct 2026): page kit and sidebar,
 * recoloured for the Horizon theme.
 * ===================================================================== */

/* =====================================================================
 * Page kit — the same header, tabs, tiles and badges on every public page
 * (includes/ui.php prints the markup). Horizon theme: dark layers, one gold
 * accent (--red), Rajdhani titles, cut corners.
 * ===================================================================== */
html .pg { max-width: 1240px; margin: 36px auto 70px; padding: 0 24px; }
html .pg > * { min-width: 0; }
html .pg-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px 28px; flex-wrap: wrap;
  padding-bottom: 22px; margin-bottom: 26px; border-bottom: 1px solid var(--line); }
html .pg-head:has(+ .pg-tabs) { border-bottom: 0; padding-bottom: 14px; margin-bottom: 0; }
html .pg-title { min-width: 0; max-width: 760px; }
html .pg-eyebrow { display: flex; align-items: center; gap: 12px; font-family: 'Rajdhani', 'Inter', sans-serif; font-weight: 700; font-size: 12px; letter-spacing: .26em; text-transform: uppercase; color: var(--red); margin-bottom: 10px; }
html .pg-eyebrow::before { content: ''; width: 22px; height: 1px; background: var(--red); opacity: .8; }
html .pg-head h1 { font-family: 'Rajdhani', 'Inter', sans-serif; font-weight: 700; font-size: clamp(34px, 5vw, 50px); line-height: 1; letter-spacing: .01em; }
html .pg-sub { color: var(--text-dim); font-size: 14px; line-height: 1.55; margin-top: 10px; max-width: 70ch; }
html .pg-sub a { color: var(--red-bright); }
html .pg-right { display: flex; align-items: flex-end; gap: 16px 26px; flex-wrap: wrap; }
html .pg-stats { display: flex; gap: 26px; }
html .pg-stat { text-align: right; }
html .pg-stat b { display: block; font-family: 'Rajdhani', 'Inter', sans-serif; font-weight: 700; font-size: 38px; line-height: 1; color: var(--sc, var(--text)); font-variant-numeric: tabular-nums; }
html .pg-stat span { font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--text-dim); }
html .pg-search { display: flex; gap: 0; }
html .pg-search input { width: 300px; max-width: 100%; background: var(--surface); border: 1px solid var(--line); color: var(--text); padding: 10px 13px; font-size: 13.5px; font-family: 'Inter', sans-serif; }
html .pg-search button { background: var(--surface-2); border: 1px solid var(--line); border-left: 0; color: var(--text); padding: 0 16px; cursor: pointer; font-size: 13.5px; }
html .pg-search button { font-family: 'Rajdhani', 'Inter', sans-serif; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; font-size: 13px; }
html .pg-search button:hover { background: var(--red); border-color: var(--red); color: #14100a; }
html .pg-search input:focus { outline: none; border-color: var(--red-dark); }

html .pg-tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 26px; overflow-x: auto; scrollbar-width: none; }
html .pg-tabs::-webkit-scrollbar { display: none; }
html .pg-tabs a { position: relative; padding: 13px 16px 12px; color: var(--text-dim); text-decoration: none; font-family: 'Rajdhani', 'Inter', sans-serif; font-size: 14px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
  white-space: nowrap; border-bottom: 2px solid transparent; margin-bottom: -1px; transition: color var(--t-fast), border-color var(--t-fast); }
html .pg-tabs a:hover { color: var(--text); border-bottom-color: var(--line-strong); }
html .pg-tabs a.on { color: var(--text); border-bottom-color: var(--red); view-transition-name: tab-on; }
html :is(.pg-tabs, .pg-sub-tabs) a i { font-style: normal; font-size: 11px; font-weight: 600; margin-left: 7px; padding: 1px 6px; background: var(--surface-2); border: 1px solid var(--line); color: var(--text-dim); }
html .pg-tabs a.on i { color: var(--red-bright); border-color: var(--red-dark); }

html .pg-sub-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 20px; }
html .pg-sub-tabs a { padding: 8px 15px; border: 1px solid var(--line); background: var(--surface); color: var(--text-dim); text-decoration: none; font-size: 13.5px;
  transition: color var(--t-fast), border-color var(--t-fast), background-color var(--t-fast); }
html .pg-sub-tabs a:hover { color: var(--text); border-color: var(--line-strong); }
html .pg-sub-tabs a.on { background: var(--red); border-color: var(--red); color: #14100a; font-weight: 600; view-transition-name: subtab-on; }
html .pg-sub-tabs a.on i { background: #14100a; color: var(--red-bright); border-color: #14100a; }

/* Stat tiles (Punishments, Staff, Leaderboard) */
html .pg-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 26px; }
html .pg-tile { position: relative; background: var(--hz-surface, var(--surface)); border: 1px solid var(--line); padding: 16px 18px 15px; overflow: hidden; --tc: var(--red); }
html .pg-tile::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--tc); }
html .pg-tile b { display: block; font-family: 'Rajdhani', 'Inter', sans-serif; font-weight: 700; font-size: 34px; line-height: 1; font-variant-numeric: tabular-nums; }
html .pg-tile span { display: block; margin-top: 6px; font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--text-dim); }
html .pg-tile small { display: block; margin-top: 4px; font-size: 12px; color: var(--text-dim); }
html .pg-tile svg { position: absolute; right: 14px; top: 14px; width: 22px; height: 22px; color: var(--tc); opacity: .7; }

/* Cards, badges, chips, avatars */
html .pg-card { background: var(--surface); border: 1px solid var(--line); }
html .pg-h2 { display: flex; align-items: center; gap: 14px; margin: 34px 0 14px; }
html .pg-h2 h2 { font-family: 'Rajdhani', 'Inter', sans-serif; font-weight: 700; font-size: 22px; letter-spacing: .03em; white-space: nowrap; border-left: 3px solid var(--gc, var(--red)); padding-left: 10px; line-height: 1.1; }
html .pg-h2::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, var(--line), transparent); }
html .pg-h2 .dim { color: var(--text-dim); font-size: 13px; }
html .pg-badge { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  padding: 3px 8px; color: var(--bc, var(--text-dim)); border: 1px solid color-mix(in srgb, var(--bc, #8e8e8e) 55%, transparent);
  background: color-mix(in srgb, var(--bc, #8e8e8e) 12%, transparent); white-space: nowrap; }
html .pg-badge.dot::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
html .pg-chip { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; padding: 3px 9px; background: var(--surface-2); border: 1px solid var(--line); color: var(--text); white-space: nowrap; font-variant-numeric: tabular-nums; }
html .pg-av { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; flex-shrink: 0; background: var(--surface-2); }
html .pg-av-none { display: inline-flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 600; color: var(--text-dim); border: 1px solid var(--line); }
html .pg-empty { color: var(--text-dim); padding: 46px 20px; text-align: center; border: 1px dashed var(--line); font-size: 14px; }
html .pg-note { color: var(--text-dim); font-size: 13px; line-height: 1.65; }
html .pg-note a { color: var(--red-bright); }
html .pg-pager { display: flex; gap: 8px; align-items: center; margin-top: 18px; font-size: 13px; color: var(--text-dim); }
html .pg-pager a { color: var(--text); text-decoration: none; border: 1px solid var(--line); padding: 7px 13px; background: var(--surface); }
html .pg-pager a:hover { border-color: var(--red); color: var(--red-bright); }
html .pg-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--red); color: #14100a; border: 1px solid var(--red); padding: 11px 20px;
  font-family: 'Rajdhani', 'Inter', sans-serif; font-weight: 700; font-size: 14px; letter-spacing: .07em; text-transform: uppercase; text-decoration: none; cursor: pointer;
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
  transition: background-color var(--t-fast), transform var(--t-fast) var(--ease); }
html .pg-btn:hover { background: var(--red-bright); border-color: var(--red-bright); }
html .pg-btn:active:not(:disabled) { transform: scale(.97); }
html .pg-btn:disabled { opacity: .35; cursor: not-allowed; }
html .pg-btn.ghost { background: transparent; color: var(--text); border-color: var(--line-strong); }
html .pg-btn.ghost:hover { border-color: var(--red); color: var(--red-bright); background: transparent; }
@supports (corner-shape: bevel) {
  html :is(.pg-sub-tabs a, .pg-tile, .pg-search input) { border-radius: 8px 0 8px 0; corner-shape: bevel; }
  html .pg-search input { border-radius: 8px 0 0 0; }
  html .pg-search button { border-radius: 0 0 8px 0; corner-shape: bevel; }
}
@media (max-width: 640px) {
  html .pg { padding: 0 16px; margin-top: 24px; }
  html .pg-right, html .pg-stats { width: 100%; }
  html .pg-stat { text-align: left; }
  html .pg-stat b { font-size: 30px; }
  html .pg-search { width: 100%; }
  html .pg-search input { width: auto; flex: 1; min-width: 0; }
  html .pg-tabs a { padding: 12px 13px 11px; }
}

/* Older tab bars on pages not yet moved to the kit look the same */
html :is(.mtabs, .ctabs, .btabs) a.active { border-bottom-color: var(--red); }

/* =====================================================================
 * Sidebar navigation (includes/sidebar.php) — replaces the old top nav.
 * Desktop: fixed on the left, can fold down to icons. Phones/tablets:
 * slides in from the left with the menu button.
 * ===================================================================== */
:root { --sb-w: 264px; --sb-mini: 78px; }
html .sb { position: fixed; top: 0; left: 0; bottom: 0; width: var(--sb-w); z-index: 50; display: flex; flex-direction: column;
  background: linear-gradient(180deg, #0d0f13 0%, #0a0b0e 100%); border-right: 1px solid var(--line); padding: 16px 14px 14px; overflow: hidden;
  transition: width var(--t) var(--ease), transform var(--t-slow) var(--ease), padding var(--t) var(--ease); }
html .sb-top { display: flex; align-items: center; gap: 10px; padding: 2px 2px 16px; margin-bottom: 14px; border-bottom: 1px solid var(--line); }
html .sb-brand { display: flex; align-items: center; gap: 12px; min-width: 0; flex: 1; color: #fff; text-decoration: none; }
html .sb-brand img { width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0; display: block; }
html .sb-brand span { font-family: 'Rajdhani', 'Inter', sans-serif; font-weight: 700; font-size: 21px; letter-spacing: .14em; text-transform: uppercase; white-space: nowrap; }
html .sb-brand span em { font-style: normal; color: var(--red); }
html .sb-brand:hover span { color: var(--red-bright); }
html .sb-fold { width: 38px; height: 38px; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--text-dim); transition: color var(--t-fast), border-color var(--t-fast); }
html .sb-fold:hover { color: var(--red-bright); border-color: var(--red-dark); }
html .sb-fold svg { width: 18px; height: 18px; }

html .sb-nav { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; display: flex; flex-direction: column; gap: 4px;
  margin: 0 -6px; padding: 0 6px; scrollbar-width: thin; }
html .sb-item { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 46px; padding: 0 14px; margin: 0;
  background: transparent; border: 1px solid transparent; color: var(--text-dim); text-decoration: none; text-align: left; cursor: pointer;
  font-family: 'Rajdhani', 'Inter', sans-serif; font-size: 15px; font-weight: 700; letter-spacing: .035em; text-transform: uppercase; white-space: nowrap;
  transition: color var(--t-fast), background-color var(--t-fast), border-color var(--t-fast); }
html .sb-item:hover { color: var(--text); background: rgba(232,178,58,.05); }
html .sb-item:focus-visible { outline: 2px solid var(--red); outline-offset: -2px; }
html .sb-item.on, html .sb-group.has-on > .sb-head { color: var(--text); background: linear-gradient(90deg, rgba(232,178,58,.14), rgba(232,178,58,.03)); border-color: rgba(232,178,58,.28); }
html .sb-item.on .sb-ico, html .sb-group.has-on > .sb-head .sb-ico { color: var(--red); }
html .sb-ico { width: 21px; height: 21px; flex-shrink: 0; }
html .sb-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
html .sb-chev { width: 16px; height: 16px; flex-shrink: 0; opacity: .7; transition: transform var(--t) var(--ease); }
html .sb-group.open > .sb-head .sb-chev { transform: rotate(180deg); }
html .sb-kids { display: grid; grid-template-rows: 0fr; transition: grid-template-rows var(--t) var(--ease); }
html .sb-group.open > .sb-kids { grid-template-rows: 1fr; }
html .sb-kids > div { min-height: 0; overflow: hidden; display: flex; flex-direction: column; margin-left: 24px; border-left: 1px solid var(--line); }
html .sb-group.open > .sb-kids > div { padding: 4px 0 6px; }
html .sb-kid { position: relative; display: block; padding: 8px 12px 8px 20px; color: var(--text-dim); text-decoration: none; font-size: 14px; white-space: nowrap;
  transition: color var(--t-fast); }
html .sb-kid:hover { color: var(--text); }
html .sb-kid.on { color: var(--red-bright); font-weight: 600; }
html .sb-kid.on::before { content: ''; position: absolute; left: -1px; top: 7px; bottom: 7px; width: 2px; background: var(--red); }
html .sb-bottom { display: flex; flex-direction: column; gap: 4px; margin-top: 10px; padding-top: 12px; border-top: 1px solid var(--line); }
html .sb-discord:hover { color: #8c9eff; }
html .sb-badge { flex-shrink: 0; min-width: 22px; height: 20px; padding: 0 6px; display: inline-flex; align-items: center; justify-content: center;
  background: #5fd38a; color: #06210f; font-size: 11.5px; font-weight: 700; font-variant-numeric: tabular-nums; }
html .sb-kid { display: flex; align-items: center; gap: 8px; }
html .sb-kbadge { margin-left: auto; min-width: 20px; height: 18px; font-size: 11px; }
html.sb-mini .sb-item { position: relative; }
html.sb-mini .sb-badge { position: absolute; top: 4px; right: 4px; min-width: 16px; height: 16px; padding: 0 4px; font-size: 10px; }
@supports (corner-shape: bevel) {
  html :is(.sb-item, .sb-fold) { border-radius: 9px 0 9px 0; corner-shape: bevel; }
}

/* Top bar: wallet, bell, profile on the right */
html body > header.topbar { max-width: none; margin: 0; min-height: 72px; padding: 14px 28px; justify-content: flex-end; flex-wrap: nowrap;
  border-bottom: 1px solid var(--line); background: rgba(10,11,14,.72); backdrop-filter: blur(8px); position: sticky; top: 0; z-index: 40; }
html body > header.topbar .tb-brand { display: none; margin-right: auto; }
html body > header.topbar .menu-btn { display: none; }
html .sb-scrim { position: fixed; inset: 0; z-index: 49; background: rgba(0,0,0,.6); backdrop-filter: blur(2px); }
html .sb-scrim[hidden] { display: none; }

@media (min-width: 1101px) {
  html body { padding-left: var(--sb-w); }
  html.sb-anim body { transition: padding-left var(--t) var(--ease); }
  html .sb-scrim { display: none; }
  html.sb-mini body { padding-left: var(--sb-mini); }
  html.sb-mini .sb { width: var(--sb-mini); padding-left: 12px; padding-right: 12px; }
  html.sb-mini .sb-top { flex-direction: column; gap: 12px; }
  html.sb-mini .sb-brand { flex: none; }
  html.sb-mini :is(.sb-brand span, .sb-label, .sb-chev, .sb-kids) { display: none; }
  html.sb-mini .sb-item { justify-content: center; padding: 0; }
  html.sb-mini .sb-fold svg { transform: scaleX(-1); }
  /* links that are in the sidebar don't need a second copy above the page */
  html :is(.pg-tabs, .pg-sub-tabs).pg-dup { display: none; }
  html .pg-head:has(+ .pg-tabs.pg-dup) { border-bottom: 1px solid var(--line); padding-bottom: 22px; margin-bottom: 26px; }
}
@media (max-width: 1100px) {
  html .sb { width: min(300px, 86vw); transform: translateX(-102%); box-shadow: 20px 0 50px rgba(0,0,0,.5); }
  html.sb-open .sb { transform: none; }
  html.sb-open body { overflow: hidden; }
  html body > header.topbar { padding: 12px 16px; gap: 12px; }
  html body > header.topbar .menu-btn { display: inline-flex; order: -2; }
  html body > header.topbar .tb-brand { display: flex; order: -1; }
  html body > header.topbar .header-right { margin-left: auto; }
}
@media (max-width: 560px) { html body > header.topbar .tb-brand .wordmark { display: none; } }
@media (prefers-reduced-motion: reduce) { html .sb, html .sb-kids, html body { transition: none; } }

/* Home hero wordmark: size it to the space next to the sidebar, and keep it on phones */
@media (min-width: 1101px) {
  html body .hero-wordmark { font-size: clamp(56px, calc((100vw - var(--sb-w)) * 0.105), 148px); }
  html.sb-mini body .hero-wordmark { font-size: clamp(56px, calc((100vw - var(--sb-mini)) * 0.105), 148px); }
}
@media (max-width: 560px) { html body .hero-wordmark { font-size: 12.5vw; letter-spacing: .07em; } }

/* Home: live servers show the map's picture; offline ones go to a compact list underneath */
html .match-grid[hidden] { display: none; }
html .match-thumb { background-size: cover; background-position: center; }
html .match-thumb.has-map { animation: map-in 500ms ease both; filter: saturate(0.9) brightness(0.72); opacity: 1; }
html .match-card:hover .match-thumb.has-map { filter: saturate(1) brightness(0.85); }
@keyframes map-in { from { opacity: 0; } }
html .match-card.has-map .mc-water { opacity: 0; }
html .match-card :is(.match-title, .match-status-pill, .match-sub, .match-round) { text-shadow: 0 1px 3px rgba(0,0,0,0.85); }
html .match-offline { margin-top: 28px; }
html .match-offline[hidden] { display: none; }
html .match-offline-h { font-family: 'Rajdhani', 'Inter', sans-serif; font-weight: 700; font-size: 13px; letter-spacing: .16em; text-transform: uppercase; color: var(--text-dim); margin-bottom: 12px; }
html .match-offline-h .n { color: var(--text-faint, #646c78); letter-spacing: .05em; }
html body .offline-grid { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
html body .offline-grid .match-card { min-height: 0; height: 88px; --cc: 12px; clip-path: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px); }
html .offline-grid .match-card :is(.match-thumb, .mc-sweep, .mc-water, .connect-row, .js-round, .js-sub) { display: none; }
html .offline-grid .match-card-top { padding: 12px 14px 0; align-items: center; }
html .offline-grid .match-title { font-size: 15px; color: var(--text-dim); }
html .offline-grid .match-card-bottom { padding: 6px 14px 12px; }
html .offline-grid .match-status-pill { font-size: 10.5px; padding: 3px 8px; }
html .offline-grid .match-play { width: 28px; height: 28px; font-size: 10px; opacity: .45; }
@media (max-width: 560px) { html body .offline-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Paid rank chip (leaderboard, profiles) when clans.css isn't on the page */
html .pos-chip { font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; padding: 2px 7px; border: 1px solid var(--line); color: var(--text-dim); margin-left: 6px; white-space: nowrap; }
