:root {
  --bg: #0a0a0b;
  --ink: #ece6dc;
  --ink-2: #b4ada3;
  --ink-3: #8a847b;
  --red: #c8102e;

  --font-display: "Big Shoulders Display", "Arial Narrow", sans-serif;
  --font-body: "IBM Plex Sans", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;

  --ease-out: cubic-bezier(.16, 1, .3, 1);
  /* a damped spring: overshoots about 6%, then settles */
  --spring: linear(0, 0.083, 0.266, 0.477, 0.672, 0.829, 0.942, 1.012, 1.05, 1.063, 1.061, 1.05, 1.037, 1.024, 1.013, 1.005, 1, 0.997, 0.996, 0.996, 0.997, 0.997, 0.998, 0.999, 1);
  --gutter: clamp(16px, 4vw, 48px);
  --max: 1360px;
  --header-h: 72px;
  --bleed: 12px; /* Stats bars and Store cards reach this far past the header's text on each side */

  color-scheme: dark;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.6 var(--font-body);
  -webkit-font-smoothing: antialiased;
}

/* No page scroll: sections stack in a clipped track and the header links jump between them */
html, body { height: 100%; overflow: hidden; }
main {
  position: relative; /* keeps absolutely placed hidden text inside the clip */
  height: calc(100svh - var(--header-h));
  margin-top: var(--header-h);
  overflow: hidden;
  scroll-snap-type: y mandatory; /* keeps the track lined up when the window is resized */
}
.hero, .board, .store { height: 100%; scroll-snap-align: start; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

::selection { background: var(--red); color: var(--ink); }

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

svg { fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }

.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 100;
  padding: 12px 16px;
  background: var(--ink);
  color: var(--bg);
  font-weight: 600;
}
.skip:focus { top: 16px; }

/* Header */

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 40;
  height: var(--header-h);
  background: var(--bg);
}

.header-nav { display: flex; align-items: center; gap: clamp(20px, 3vw, 36px); }

/* Logo left, links in the true middle of the bar, login icon right. */
.header-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: 100%;
}

.brand {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  color: var(--ink);
  text-decoration: none;
  font: 800 22px/1 var(--font-display);
  letter-spacing: .05em;
  text-transform: uppercase;
}

.header-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  color: var(--ink-2);
  text-decoration: none;
  font: 500 13px/1 var(--font-mono);
  letter-spacing: .1em;
  text-transform: uppercase;
  transition: color .25s var(--ease-out);
}
/* Login: an icon, the choices appear on hover. A tap counts as hover on phones, and focus covers the keyboard. */
.auth { position: relative; justify-self: end; }
.auth-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink-2);
  cursor: pointer;
  transition: color .15s;
}
.auth-btn svg { fill: currentColor; stroke: none; }
.auth:hover .auth-btn, .auth:focus-within .auth-btn { color: var(--ink); }
.auth-menu {
  position: absolute;
  top: 100%;
  right: 0;
  min-width: 140px;
  padding: 6px;
  border-radius: 6px;
  background: #16181f;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity .15s, transform .15s, visibility .15s;
}
.auth:hover .auth-menu, .auth:focus-within .auth-menu { opacity: 1; visibility: visible; transform: none; }
.auth-item {
  display: block;
  padding: 12px;
  border-radius: 4px;
  color: var(--ink);
  font: 500 13px/1 var(--font-mono);
  letter-spacing: .1em;
  text-transform: uppercase;
}
@media (hover: hover) { .auth-item:hover { background: #20232c; } }
.header-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 10px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .45s var(--ease-out);
}
@media (hover: hover) {
  .header-link:hover { color: var(--ink); }
  .header-link:hover::after { transform: scaleX(1); transform-origin: left; }
}

/* Hero */

.hero {
  --u: min(1vw, 1.3svh);
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px var(--gutter);
  overflow: hidden auto; /* scrolls inside itself on phones and at extreme browser zoom */
}

.field { position: absolute; inset: 0; z-index: -1; background: #d00c0c; } /* the tint colour, already baked into the video */

/* hero-loop-red.mp4/.webp are hero-loop.mp4/.webp with the old CSS look baked in by ffmpeg:
   grayscale(1) contrast(1.2) brightness(1.5) at opacity .72, multiply over #d00c0c.
   Done live, those effects made the intro stutter once the video played during it. */
.hero-video { display: block; width: 100%; height: 100%; object-fit: cover; }

.hero-title {
  margin: auto 0 0; /* with .hero-info's bottom auto this centres the page, and unlike justify-content the top stays reachable when it scrolls */
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 900;
  text-align: center;
  /* the scratches: the picture is in title-scratches.css (tools/gen-title-scratches.py), the video shows through them */
  mask-position: center;
  mask-size: cover;
}
.hero-line { display: block; white-space: nowrap; letter-spacing: .085em; line-height: .92; }
.hero-line--one { font-size: calc(var(--u) * 10.4); }
.hero-line--two { margin-top: .1em; font-size: calc(var(--u) * 14.1); }

.hero-foot {
  display: flex;
  flex-direction: column;
  width: fit-content; /* as wide as the two buttons, so the social row lines up under them */
  max-width: 100%;
  margin-top: clamp(14px, 3svh, 28px);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 22px;
  border-radius: 6px;
  background: var(--bg);
  color: var(--ink);
  font: 800 18px/1 var(--font-display);
  letter-spacing: .03em;
  text-decoration: none;
  text-transform: uppercase;
  transition: background-color .15s, color .15s;
}
@media (hover: hover) { .btn:hover { background: var(--ink); color: var(--bg); } }

.ip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: 6px;
  background: var(--bg); /* solid, the footage moves behind this text */
  color: var(--ink);
  font: 500 13px/1 var(--font-mono);
  letter-spacing: .04em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color .15s, color .15s;
}
.ip-icon { flex: none; }
.ip-icon--done, .ip[data-state="copied"] .ip-icon { display: none; }
.ip[data-state="copied"] .ip-icon--done { display: block; }
@media (hover: hover) { .ip:hover { background: var(--ink); color: var(--bg); } }

.socials { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 10px; }
.social {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 6px;
  background: var(--bg);
  color: var(--ink);
  transition: background-color .15s, color .15s;
}
.social svg { width: 22px; height: 22px; fill: currentColor; stroke: none; }
@media (hover: hover) { .social[href]:hover { background: var(--ink); color: var(--bg); } }

/* Server card and Discord card: solid black like the buttons, because the footage moves behind them */
.hero-info {
  display: grid;
  flex: none;
  grid-template-columns: minmax(0, 1fr) clamp(220px, 34%, 280px);
  gap: 10px;
  width: min(100%, 820px);
  margin-block: clamp(14px, 3svh, 28px) auto;
}
.server, .discord { display: flex; flex-direction: column; min-width: 0; overflow: hidden; border-radius: 6px; background: var(--bg); }
.server { flex-direction: row; }

.server-map { position: relative; flex: 0 0 clamp(130px, 44%, 240px); margin: 0; }
.server-map img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.server-map figcaption { position: absolute; inset: auto 0 0; padding: 22px 12px 8px; background: linear-gradient(transparent, rgba(0, 0, 0, .85)); font: 800 18px/1 var(--font-display); letter-spacing: .03em; text-transform: uppercase; }

.server-about { display: flex; flex: 1; flex-direction: column; justify-content: space-between; gap: 6px; min-width: 0; padding: 12px 14px; }
.server-name { display: flex; gap: 8px; margin: 0; font: 800 26px/1.1 var(--font-display); letter-spacing: .03em; text-transform: uppercase; }
.server-dot { flex: none; width: 9px; height: 9px; border-radius: 50%; background: #3ddc84; }
.server-name .server-dot { margin-top: .32em; }
.server-addr { margin: 0; color: var(--ink-2); font: 400 15px/1.4 var(--font-mono); }
.server-count { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 8px; margin: 0; color: var(--ink-2); font-size: 16px; line-height: 1.2; }
.server-count b { color: var(--ink); font: 800 36px/1 var(--font-display); letter-spacing: .03em; }
.sample { margin: 0; color: var(--ink-3); font-size: 12px; }
.server-count .sample { margin-left: auto; }

.discord-about { display: flex; flex: 1; flex-direction: column; align-items: center; justify-content: center; padding: 8px 12px; text-align: center; }
.discord-head { display: flex; align-items: center; gap: 8px; }
.discord-about img { width: 30px; height: 30px; }
.discord-name { margin: 0; font: 800 22px/1.1 var(--font-display); letter-spacing: .03em; text-transform: uppercase; }
.discord-counts { display: flex; align-items: center; gap: 6px; margin: 4px 0 0; font-size: 14px; line-height: 1.4; }
.discord-members { margin-left: 8px; color: var(--ink-2); }
.discord-join { display: flex; flex: none; align-items: center; justify-content: center; gap: 10px; min-height: 44px; background: #5865f2; color: #fff; font: 800 18px/1 var(--font-display); letter-spacing: .03em; text-decoration: none; text-transform: uppercase; transition: background-color .15s; }
.discord-join svg { width: 20px; height: 20px; fill: currentColor; stroke: none; }
@media (hover: hover) { .discord-join:hover { background: #4752c4; } }

@media (max-height: 639px) { .hero { padding-block: 8px; } } /* short laptop windows: it still fits */

/* The one moment of unprompted motion: red spreads out of a single point, then the text fades in over it */
.js .field { animation: spread 1.3s cubic-bezier(.5, 0, .15, 1) both; }
.js .hero-title, .js .hero-foot, .js .hero-info { animation: appear .4s linear .75s both; }
@keyframes spread {
  from { clip-path: circle(0 at 50% 46%); }
  to { clip-path: circle(120vmax at 50% 46%); }
}
@keyframes appear { from { opacity: 0; } to { opacity: 1; } }

/* Leaderboard: each row is a bar across the page column, as long as that score against first place. Together they make one red staircase. */

.board { display: flex; flex-direction: column; overflow-y: auto; /* only on screens too short to fit it */ }

.board-panel {
  flex: 1 1 0;
  display: grid;
  grid-template-rows: minmax(0, 12.15fr) minmax(0, 1.25fr);
  row-gap: 8px;
  width: calc(min(100%, var(--max)) - 2 * var(--gutter) + 2 * var(--bleed));
  min-height: 340px;
  margin: 0 auto clamp(10px, 2svh, 22px);
  container-type: size;
}

.board-rows {
  display: grid;
  grid-template-rows: 2.4fr 1.5fr 1.25fr repeat(7, 1fr);
  min-height: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.board-row {
  --fr: calc((100cqh - 8px) / 13.4); /* one 1fr row: all the rows add up to 13.4fr, plus the 8px gap */
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: clamp(30px, 6vw, 88px) minmax(0, 1fr) auto;
  column-gap: 12px;
  align-items: center;
  padding-inline: var(--bleed);
  font: 800 min(calc(var(--fr) * .74), 7vw)/1 var(--font-display);
  letter-spacing: .03em;
  text-transform: uppercase;
}
.board-row[hidden] { display: none; }
li.board-row:nth-child(1) { font-size: min(calc(var(--fr) * 1.85), 12vw); font-weight: 900; }
li.board-row:nth-child(2) { font-size: min(calc(var(--fr) * 1.15), 9vw); }
li.board-row:nth-child(3) { font-size: min(calc(var(--fr) * .95), 8vw); }
.board-you { margin: 0; background: #16181f; } /* an empty track: no score to draw a bar for yet */
li.board-row::before {
  content: "";
  position: absolute;
  inset: 0 0 -1px; /* overlaps the next row so no dark seam shows between bars */
  z-index: -1;
  background: var(--red);
  transform: scaleX(var(--w));
  transform-origin: left;
  transition: transform .7s var(--ease-out) calc(var(--i, 0) * 35ms); /* one after another, down the staircase */
}
/* While Stats is off screen the bars wait at nothing, so they grow as it opens */
.is-waiting li.board-row::before { transform: scaleX(0); transition: none; }

.board-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board-value { font-variant-numeric: tabular-nums; }

/* Store: rank cards after the user's reference, checks and crown drawn in CSS. Perks and models use the game's renders. */

.store { display: flex; flex-direction: column; overflow-y: auto; /* only on screens too short to fit it */ }

.store-top {
  display: flex;
  flex: none;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px clamp(16px, 2.4vw, 36px);
  padding-block: clamp(10px, 2svh, 22px);
}

.store-title {
  margin: 0;
  font: 800 clamp(1.75rem, 3.2vw, 2.75rem)/1 var(--font-display);
  letter-spacing: .01em;
  text-transform: uppercase;
}

.store-tabs { display: none; flex-wrap: wrap; gap: 4px clamp(12px, 1.8vw, 26px); }
.js .store-tabs { display: flex; }

.store-tab {
  position: relative;
  min-height: 44px;
  padding: 0;
  border: 0;
  border-bottom: 3px solid transparent;
  background: none;
  color: var(--ink-3);
  font: 800 clamp(18px, 1.7vw, 23px)/1 var(--font-display);
  letter-spacing: .03em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color .15s;
}
.store-tab[aria-selected="true"] { color: var(--ink); }
.store-tab[aria-selected="true"]::after { content: ""; position: absolute; inset: auto 0 -3px; height: 3px; background: var(--red); }
@media (hover: hover) { .store-tab:hover { color: var(--ink); } }

.store-term { position: relative; isolation: isolate; display: none; flex-wrap: wrap; gap: 6px; margin: 0 0 0 auto; padding: 0; border: 0; }
.js .store-term { display: flex; }
.js .store-term[hidden] { display: none; }
.store-term label { position: relative; cursor: pointer; }
.store-term input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.store-term span {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 0 14px;
  border: 1.5px solid var(--ink-3);
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  transition: border-color .2s, color .15s .04s, scale .35s var(--spring);
}
.store-term input:checked + span { border-color: transparent; color: var(--bg); }
.store-term input:active + span { scale: .96; }
.store-term input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 3px; }
/* The chosen term's fill: one shape that glides between the terms, placed by main.js */
.store-term-pill { position: absolute; top: 0; left: 0; z-index: -1; border-radius: 6px; background: var(--ink); }
.store-term-pill.is-live { transition: translate .45s var(--spring), width .45s var(--spring); }
.board-period span { border: 0; } /* the user's call: Stats period buttons have no outline */

.store-panels { padding-inline: calc(var(--gutter) - var(--bleed)); }
.js .store-panels { flex: 1 1 0; min-height: 0; margin-bottom: clamp(10px, 2svh, 22px); }
.js .store-panel { height: 100%; }
.js .store-panel:not(.is-active) { display: none; }
.store-panel:focus-visible { outline-offset: 4px; }

/* Tab changes. Only these named parts move: the rest of the page stays live under them, and a click during a blend lands on it.
   :target = the section on screen, so the ones off screen aren't captured for nothing, and one name serves every tab row. */
:root { view-transition-name: none; }
::view-transition { pointer-events: none; }
#store:target .store-panels { view-transition-name: store-panels; }
#store:target .store-term { view-transition-name: store-term; }
/* One red line that travels from tab to tab */
:target .store-tab[aria-selected="true"]::after { view-transition-name: tab-line; }
::view-transition-group(tab-line) { animation-duration: .5s; animation-timing-function: var(--spring); }
::view-transition-old(tab-line) { display: none; }
::view-transition-new(tab-line) { height: 100%; animation: none; } /* keeps the line 3 px thick while its width changes */
/* The old panel leaves quickly, the new one arrives from the side you moved towards. --store-move is set by main.js. */
::view-transition-old(store-panels) { animation: store-panel-out .14s ease-in both; }
::view-transition-new(store-panels) { animation: store-panel-in .38s var(--ease-out) both; }
@keyframes store-panel-out { to { opacity: 0; translate: calc(var(--store-move) * -16px) 0; } }
@keyframes store-panel-in { from { opacity: 0; translate: calc(var(--store-move) * 26px) 0; } }

/* Information: a card grows into its section, Back shrinks the section into that card. main.js names the two ends info-open. */
#information:target .store-panels { view-transition-name: info-panels; }
#information:target .store-title { view-transition-name: info-title; }
::view-transition-group(info-open) { animation-duration: .42s; animation-timing-function: var(--ease-out); }
/* Nothing stretches: the card's surface grows and clips, the contents swap inside it at their real size */
::view-transition-image-pair(info-open) { overflow: clip; animation: info-surface .42s ease-out both; }
.info-closing::view-transition-image-pair(info-open) { animation-direction: reverse; }
@keyframes info-surface { from { background: #16181f; } to { background: transparent; } }
::view-transition-old(info-open), ::view-transition-new(info-open) { width: 100%; height: 100%; object-fit: none; object-position: 50% 0; mix-blend-mode: normal; }
::view-transition-old(info-open) { animation: info-old-out .16s ease-out both; }
::view-transition-new(info-open) { animation: info-new-in .3s ease-out .06s both; }
@keyframes info-old-out { to { opacity: 0; } }
@keyframes info-new-in { from { opacity: 0; } }
/* The other cards and the title get out of the way quickly; the title blends in place, without stretching as its width changes */
::view-transition-old(info-panels), ::view-transition-old(info-title) { animation: info-old-out .12s ease-out both; }
::view-transition-new(info-panels), ::view-transition-new(info-title) { animation: info-new-in .24s ease-out .08s both; }
::view-transition-old(info-title), ::view-transition-new(info-title) { width: auto; height: 100%; object-fit: none; object-position: left center; }

/* Cards answer the mouse, buttons answer the press */
#store .rank-card, #store .shop-card, #store .case-card { transition: translate .5s var(--spring), box-shadow .3s, border-color .2s; }
#information .shop-card { transition: border-color .2s, scale .35s var(--spring); }
.shop-media img, #store .case-card img { transition: scale .5s var(--spring); }
#store .rank-buy, #store .shop-price, .info-back { transition: scale .35s var(--spring), background-color .15s, border-color .15s, color .15s, opacity .25s; }
@starting-style { .info-back { opacity: 0; } } /* fades in as it appears, and can be clicked straight away */
#store .rank-buy:active, #store .shop-price:active, .info-back:active { scale: .97; }
#information .info-card:active { scale: .98; }
#store .rank-buy { font-variant-numeric: tabular-nums; } /* the rolling price must not shake the button's text */
@media (hover: hover) {
  #store .rank-card:hover, #store .shop-card:not(.shop-soon):hover, #store .case-card:hover { translate: 0 -5px; }
  .shop-card:not(.shop-soon):hover, #store .case-card:hover { border-color: rgba(236, 230, 220, .7); }
  .shop-card:hover .shop-media img, #store .case-card:hover img { scale: 1.06; }
}

.rank-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(12px, 1.6vw, 22px); min-height: 100%; } /* min, not height: on short screens the cards grow and the Store scrolls instead of rows spilling out */

:root { --bronze: #cd8b55; --silver: #b0c3d9; --gold: #ffc532; } /* silver and gold are the in-game rank colours */
.rank-bronze { --c: var(--bronze); --glint-delay: 0s; }
.rank-silver { --c: var(--silver); --glint-delay: .25s; }
.rank-gold { --c: var(--gold); --glint-delay: .5s; } /* the glint runs across the three cards, left to right */
.m-bronze { color: var(--bronze); }
.m-silver { color: var(--silver); }
.m-gold { color: var(--gold); }
.rank-perks .off b { color: inherit; } /* a skin you don't get stays grey */

.rank-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 10px;
  overflow: hidden;
  background: radial-gradient(120% 45% at 50% 0, color-mix(in srgb, var(--c) 16%, transparent), transparent 75%), #16181f;
}
.rank-gold { box-shadow: 0 0 0 2px var(--c), 0 0 34px -8px color-mix(in srgb, var(--c) 70%, transparent); } /* the top rank is lit before you point at it */
@media (hover: hover) {
  .rank-card:hover { box-shadow: 0 0 0 2px var(--c), 0 16px 44px -10px color-mix(in srgb, var(--c) 60%, transparent); }
}

.rank-banner {
  flex: none;
  margin: 0;
  padding: clamp(8px, 1.5svh, 16px) 12px;
  background:
    radial-gradient(60% 90% at 50% 45%, color-mix(in srgb, var(--c) 30%, transparent), transparent 70%),
    linear-gradient(135deg, color-mix(in srgb, var(--c) 26%, #16181f), #20232c);
  text-align: center;
}
/* polished metal letters: light at the top, the rank colour, darker at the foot; a glint crosses them every few seconds */
.rank-name, #store :is(.shop-card, .case-card) .item-name {
  background:
    linear-gradient(105deg, transparent 42%, rgba(255, 255, 255, .9) 50%, transparent 58%) 117% 0 / 220% 100% no-repeat, /* 117% to -17% walks the bright band from just left of the word to just right of it */
    linear-gradient(180deg, color-mix(in srgb, var(--c) 45%, #fff) 10%, var(--c) 50%, color-mix(in srgb, var(--c) 72%, #000) 95%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.rank-name {
  display: block;
  font: 900 clamp(1.875rem, 3.2vw, 2.875rem)/1 var(--font-display);
  letter-spacing: .05em;
  text-transform: uppercase;
}
.rank-sub {
  display: block;
  margin-top: 2px;
  font: 800 clamp(.8125rem, 1.1vw, 1rem)/1 var(--font-display);
  letter-spacing: .12em;
  text-transform: uppercase;
}

.rank-ribbon {
  position: absolute;
  top: 18px;
  left: -36px;
  width: 130px;
  padding: 3px 0;
  background: var(--c);
  color: var(--bg);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.3;
  text-align: center;
  transform: rotate(-45deg);
}

.rank-perks {
  display: flex;
  flex: 1 0 auto; /* fills a tall card, never shrinks below its rows */
  flex-direction: column;
  justify-content: space-between;
  margin: clamp(6px, 1.4svh, 14px) 0;
  padding: 0 10px;
  font-size: clamp(13px, 1vw, 14.5px);
  line-height: 1.2;
  list-style: none;
}
.rank-perks li { display: flex; align-items: center; gap: 11px; }
.rank-perks b { font-weight: 600; }
.rank-perks li::before { /* the check mark */
  content: "";
  flex: none;
  width: 6px;
  height: 11px;
  margin: 0 3px 3px;
  border: solid var(--c);
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg);
}
.rank-perks li.off { color: var(--ink-3); }
.rank-perks li.off::before { border-color: #5a5c66; }

.rank-buy, #store .shop-price {
  position: relative;
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  gap: .35em;
  min-height: clamp(44px, 7svh, 56px);
  overflow: hidden;
  isolation: isolate; /* the glint below slides under the price, not over it */
  background: linear-gradient(180deg, color-mix(in srgb, var(--c) 70%, #fff), var(--c) 55%, color-mix(in srgb, var(--c) 82%, #000));
  color: var(--bg);
  font: 800 clamp(19px, 1.7vw, 23px)/1 var(--font-display);
  letter-spacing: .02em;
  text-decoration: none;
}
.rank-buy::after, #store .shop-price::after { /* the same glint as the rank name, a moment later */
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, .6) 50%, transparent 70%);
  z-index: -1;
  translate: -101% 0;
  pointer-events: none;
}

/* Glints only while the Store is on screen, so they cost the other sections nothing */
#store:target .rank-name, #store:target :is(.shop-card, .case-card) .item-name { animation: name-glint 4.5s ease-in-out var(--glint-delay) infinite; }
#store:target .rank-buy::after, #store:target .shop-price::after { animation: buy-glint 4.5s ease-in-out calc(var(--glint-delay) + .35s) infinite; }
@keyframes name-glint { 0% { background-position: 117% 0, 0 0; } 22%, 100% { background-position: -17% 0, 0 0; } }
@keyframes buy-glint { 0% { translate: -101% 0; } 22%, 100% { translate: 101% 0; } }
.rank-buy::before { /* the crown */
  content: "";
  width: 21px;
  height: 15px;
  margin-right: 4px;
  background: currentColor;
  clip-path: polygon(0 18%, 26% 56%, 50% 0, 74% 56%, 100% 18%, 90% 100%, 10% 100%);
}
@media (hover: hover) { .rank-buy[href]:hover { filter: brightness(1.12); } }

/* Perks and models: picture on top, name and price under it, after the user's reference. Two rows of five fit one screen. */

.js .shop-panel.is-active { display: flex; flex-direction: column; }

.shop-grid { display: grid; flex: 1 1 0; grid-template: repeat(2, minmax(0, 1fr)) / repeat(5, minmax(0, 1fr)); gap: clamp(10px, 1.2vw, 16px); min-height: 0; }

.shop-card { display: flex; flex-direction: column; min-height: 0; overflow: hidden; border: 1px solid rgba(236, 230, 220, .3); background: #16181f; text-align: center; }
.shop-media { position: relative; flex: 1 1 0; min-height: 0; background: radial-gradient(closest-side, #3b0a13, #070100); }
/* lighten drops the pictures' own near-black backgrounds, so the glow shows behind them */
.shop-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; mix-blend-mode: lighten; }
/* the perk pictures have empty margins and sit high, so zoom in to cut them; their edges are brighter than the glow, so fade those */
#panel-perks .shop-media img { mask-image: radial-gradient(closest-side, #000 86%, transparent); transform: translateY(6%) scale(1.25); }
.shop-info { display: flex; flex: none; flex-direction: column; align-items: center; gap: 6px; padding: 10px 12px 12px; }
.item-name { margin: 0; font: 800 clamp(1.25rem, 1.9vw, 1.75rem)/1 var(--font-display); letter-spacing: .02em; text-transform: uppercase; }
.shop-text { min-height: 4.05em; margin: 0; color: var(--ink-2); font-size: 13px; line-height: 1.35; } /* three lines, so the pictures stay one size */
.shop-price {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 20px;
  border-radius: 6px;
  background: var(--red);
  color: var(--ink);
  font: 800 18px/1 var(--font-display);
  letter-spacing: .02em;
  text-decoration: none;
}
@media (hover: hover) { .shop-price[href]:hover { filter: brightness(1.12); } }
/* Store perks, models and crates wear the rank cards' finish: a tinted glow, metal name and price button, the same glint (rules shared with the ranks above).
   Red unless a crate names its own colour. */
#store :is(.shop-card:not(.shop-soon), .case-card) {
  --c: #e3242b;
  --glint-delay: 0s;
  border-color: transparent; /* plain at rest like Bronze and Silver: only the Gold rank is lit before you point at it (user 2026-11-06) */
  background: radial-gradient(120% 60% at 50% 100%, color-mix(in srgb, var(--c) 16%, transparent), transparent 75%), #16181f;
}
/* the glint runs along each row, left to right */
#store .case-card.case-perk { --c: #ff7a14; }
#store .case-card.case-model { --c: #2f7dff; }
#store .case-card.case-daily { --c: #22d63c; }
#store :is(.shop-card, .case-card):nth-child(5n+2) { --glint-delay: .15s; }
#store :is(.shop-card, .case-card):nth-child(5n+3) { --glint-delay: .3s; }
#store :is(.shop-card, .case-card):nth-child(5n+4) { --glint-delay: .45s; }
#store :is(.shop-card, .case-card):nth-child(5n) { --glint-delay: .6s; }
#store :is(.shop-card, .case-card) .item-name { font-size: clamp(1.375rem, 2.1vw, 2rem); }
#store .shop-price { align-self: stretch; min-height: 42px; color: var(--ink); }
#store .case-card .shop-price { color: var(--bg); } /* dark on the bright crate colours, like the rank buttons */
/* the empty slots join the set, a shade dimmer, so the tab reads as one red shelf instead of grey boxes */
#store .shop-soon {
  border-color: transparent;
  background: radial-gradient(120% 60% at 50% 100%, color-mix(in srgb, var(--red) 8%, transparent), transparent 75%), #16181f;
  color: color-mix(in srgb, var(--red) 55%, #16181f); /* deep red: mixed with grey it turned dusty pink */
}
@media (hover: hover) {
  #store :is(.shop-card:not(.shop-soon), .case-card):hover { border-color: transparent; box-shadow: 0 0 0 2px var(--c), 0 16px 44px -10px color-mix(in srgb, var(--c) 60%, transparent); } /* the rank cards' hover */
}
/* Information: four cards, each opens its section, built from the Store's cards. Classes are one row; items and weapons fill the screen with their icons. */
html:not(.js) .info-home { display: none; }
.info-cards { display: grid; flex: 0 1 480px; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: clamp(10px, 1.2vw, 16px); min-height: 0; }
.info-card { padding: 0; color: var(--ink); font: inherit; cursor: pointer; transition: border-color .15s; }
.info-card .item-name { display: block; font-size: clamp(1.25rem, 2.1vw, 2rem); }
.info-card--icon img { box-sizing: border-box; padding: 16%; }
@media (hover: hover) { .info-card:hover { border-color: var(--ink); } }
.info-back { min-height: 40px; margin-left: auto; padding: 0 18px; border: 1.5px solid var(--ink-3); border-radius: 6px; background: none; color: var(--ink); font: 600 13px/1 var(--font-body); cursor: pointer; transition: background-color .15s, color .15s; }
.info-back[hidden] { display: none; }
@media (hover: hover) { .info-back:hover { border-color: var(--ink); background: var(--ink); color: var(--bg); } }
.class-panel.is-active { justify-content: safe center; } /* safe: when the panel scrolls (under 1180px) plain center pushed the top cards out of reach */
.class-row { flex: 0 1 540px; grid-template: minmax(0, 1fr) / repeat(5, minmax(0, 1fr)); }
.special-row { flex-basis: 580px; grid-template-columns: repeat(3, minmax(0, 290px)); justify-content: center; }
.class-card .shop-media img, .info-card:not(.info-card--icon) .shop-media img { object-fit: cover; object-position: 50% 12%; } /* fill the frame: the pictures' own edges are brighter than the glow */
.class-card .item-name { color: var(--c, var(--ink)); }
.class-card .shop-text { min-height: 2.7em; }
.class-level { position: absolute; top: 8px; left: 8px; padding: 5px 8px; border-radius: 6px; background: var(--bg); font: 500 12px/1 var(--font-mono); letter-spacing: .06em; text-transform: uppercase; }
.class-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 8px; width: 100%; margin: 0; font-size: 13px; line-height: 1.35; }
.class-stats div { display: flex; justify-content: space-between; gap: 4px; white-space: nowrap; }
.class-stats dt { color: var(--ink-2); }
.class-stats dd { margin: 0; font-weight: 600; }

.class-group { flex: none; margin: 0 0 6px; color: var(--ink-2); font: 800 clamp(1rem, 1.3vw, 1.25rem)/1 var(--font-display); letter-spacing: .04em; text-transform: uppercase; }
.item-groups { display: grid; flex: 1 1 0; grid-template-columns: 4fr 3fr; gap: clamp(10px, 1.2vw, 16px); min-height: 0; }
.item-group { display: flex; flex-direction: column; min-height: 0; }
.item-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.item-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.weapon-grid { grid-template: repeat(3, minmax(0, 1fr)) / repeat(5, minmax(0, 1fr)); }
.icon-card .shop-media img { box-sizing: border-box; padding: 10% 16%; }
.icon-card .item-name { font-size: clamp(1.0625rem, 1.4vw, 1.375rem); }
.weapon-grid .shop-media img { padding: 6px 10%; } /* the guns need all the height they can get on a laptop */
.info-cost { margin: 0; font: 800 16px/1.1 var(--font-display); letter-spacing: .02em; }

.shop-soon { align-items: center; justify-content: center; color: var(--ink-3); font: 900 clamp(3rem, 5vw, 4.5rem)/1 var(--font-display); }

/* Same place and size as the Models grid: fills the panel, two by two */
.case-grid { display: grid; grid-template: repeat(2, minmax(0, 1fr)) / repeat(2, minmax(0, 1fr)); gap: clamp(10px, 1.2vw, 16px); height: 100%; }
/* The crate shrinks to whatever the name and price under it leave */
.case-card { display: flex; flex-direction: column; min-height: 0; overflow: hidden; border: 1px solid rgba(236, 230, 220, .3); background: #16181f; text-align: center; }
html:not(.js) .case-card { min-height: 280px; }
.case-card img { flex: 1 1 0; box-sizing: border-box; width: 100%; height: 0; min-height: 0; padding: 6px 6px 0; object-fit: contain; }

.store-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; min-height: 100%; text-align: center; }
.store-empty p { margin: 0; color: var(--ink-2); }
.store-empty-title { margin: 0; font: 900 clamp(2.5rem, 6vw, 5.5rem)/1 var(--font-display); letter-spacing: .03em; text-transform: uppercase; }

/* Two stats side by side stop fitting a narrow card */
@media (max-width: 1349px) { .class-stats { grid-template-columns: minmax(0, 1fr); } }
@media (min-width: 900px) and (max-width: 1179px) { .class-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Five across gets too narrow here: fewer columns, and the panel scrolls inside itself */
@media (max-width: 1179px) {
  .js .shop-panel.is-active { overflow-y: auto; }
  .shop-grid { flex: none; grid-template: none / repeat(3, minmax(0, 1fr)); grid-auto-rows: 1fr; } /* 1fr: the ? rows match the tallest real card */
  .shop-media { flex: none; aspect-ratio: 1; }
  .icon-card .shop-media { aspect-ratio: 2; }
  .info-cards { flex: none; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .item-groups { display: block; flex: none; }
  .item-group + .item-group { margin-top: 12px; }
}

/* Small screens */

@media (max-width: 899px) {
  :root { --header-h: 60px; }

  .hero-line--one { font-size: calc(var(--u) * 17.2); white-space: normal; }
  .hero-line--two { font-size: calc(var(--u) * 14.9); }
  .hero { padding-block: 10px; }
  .hero-title { mask-size: auto 150%; } /* smaller letters: dense scratches would make them hard to read */
  .hero-actions { flex-direction: column; }
  .hero-info { grid-template-columns: minmax(0, 1fr); }
  .server-name { font-size: 19px; }
  .server-addr { font-size: 13px; }
  .server-count { font-size: 14px; }
  .server-count b { font-size: 26px; }
  .server-count .sample { margin-left: 0; }

  .store-title { display: none; } /* the header already says Store */
  #information .store-title { display: block; } /* it names the open section */
  .store-top { padding-block: 6px 8px; }
  .js .store-tabs { justify-content: space-between; width: 100%; }
  .store-tab { font-size: 16px; }
  .js .store-term { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; width: 100%; margin: 0; }
  .js .store-term[hidden] { display: none; }
  .store-term span { justify-content: center; padding: 0 4px; line-height: 1.15; text-align: center; }

  /* three cards don't fit one phone screen: swipe sideways, the next card peeks in */
  .rank-cards {
    display: flex;
    margin-inline: calc(var(--bleed) - var(--gutter));
    padding-inline: calc(var(--gutter) - var(--bleed));
    overflow-x: auto;
    scroll-padding-inline: calc(var(--gutter) - var(--bleed));
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }
  .rank-card { flex: 0 0 88%; scroll-snap-align: center; }

  .shop-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Four links don't fit around a true middle here */
@media (max-width: 699px) {
  .header-row { grid-template-columns: auto 1fr auto; column-gap: 10px; }
  .header-nav { justify-self: center; gap: 14px; }
  .header-link { font-size: 12px; letter-spacing: .06em; }
}

@media (max-width: 519px) { .brand span { display: none; } } /* the logo alone still links home */

@media (max-width: 479px) { .board-value { font-size: .72em; } } /* a long name needs the room more */

@media (max-width: 359px) {
  .header-nav { gap: 8px; }
  .header-link { font-size: 11px; letter-spacing: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .js .field, .js .hero-title, .js .hero-foot, .js .hero-info { animation: none; }
  li.board-row::before { transition: none; }
  .store-term span, .store-term-pill.is-live, #store .rank-card, .shop-media img, #store .case-card img, #store .rank-buy, #store .shop-price, .info-back, #information .shop-card { transition: none; }
  #store .rank-card:hover, #store .shop-card:hover, #store .case-card:hover { translate: none; }
  #store:target .rank-name, #store:target .rank-buy::after, #store:target :is(.shop-card, .case-card) .item-name, #store:target .shop-price::after { animation: none; }
  .shop-card:hover .shop-media img, #store .case-card:hover img { scale: none; }
}
