/* Scrolls SMP tier list
   Layout of the big Minecraft PvP tier lists; dark charcoal, neutral cards, green accents from the Scrolls SMP logo.
   Tier colours are NOT defined here: they come from /tiers.css, generated from app/tiers.py (one source for every
   badge, emblem and header). Fonts are self-hosted (no Google requests). */

@font-face {
  font-family: "Geist";
  src: url("/static/fonts/geist-latin-wght.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Silkscreen";
  src: url("/static/fonts/silkscreen-latin-700.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

:root {
  --bg: #0f1012;
  --card: #16171a;
  --card-2: #1b1d20;
  --card-3: #222428;
  --line: #222428;
  --line-2: #2e3136;
  --text: #f4f5f6;
  --text-2: #c8ccd2;
  --muted: #8c9199;
  --dim: #6c7178;
  --btn: #23262a;
  --btn-hover: #2c3035;
  --accent: #63b83f;         /* green of the Scrolls SMP logo */
  --accent-text: #8fd866;
  --accent-bg: #1b2b15;
  --eu: #7fa6ff;             /* EU badge: blue, so it is never mistaken for the green accent */
  --eu-bg: #172443;
  --ok: #4ade80;
  --warn: #f2a640;
  --radius: 14px;
  --wrap: 1100px;
  --gutter: clamp(16px, 4vw, 28px);
  --f-body: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-pixel: "Silkscreen", ui-monospace, monospace;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 24px; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.55 var(--f-body);
  overflow-x: hidden;
}
main { flex: 1; outline: none; padding-bottom: 24px; }
img { max-width: 100%; }
a { color: inherit; }
p { margin: 0 0 0.75em; }
h1, h2, h3 { margin: 0; }
button { font: inherit; color: inherit; }
svg { flex: none; }
kbd {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border: 1px solid var(--line-2);
  border-radius: 6px;
  font: 500 12px/1 var(--f-body);
  color: var(--muted);
}
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 60; background: var(--text); color: var(--bg); padding: 8px 14px; border-radius: 8px; }
.skip:focus { top: 12px; }
.muted { color: var(--muted); }
.small { font-size: 0.875rem; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.pad { padding: clamp(18px, 2.4vw, 24px); }
.h2 { font-size: 1.45rem; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 6px; }
.h3 { font-size: 1.25rem; font-weight: 700; letter-spacing: -0.01em; margin-bottom: 12px; }
.label { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.label svg { width: 16px; height: 16px; color: var(--accent); }
.label--xs { font-size: 0.66rem; }
.link-sm { font-size: 0.85rem; color: var(--text-2); text-decoration: none; white-space: nowrap; }
.link-sm:hover { color: var(--text); }
.notice { margin: 16px 0 0; padding: 12px 16px; border: 1px solid color-mix(in srgb, var(--warn) 45%, var(--line)); border-radius: 12px; color: var(--warn); }

/* ------------------------------------------------------------ logo: the original Scrolls SMP logo + wordmark */
.logo-link { text-decoration: none; display: inline-flex; }
.logo { display: inline-flex; align-items: center; gap: 10px; line-height: 1; }
.logo__mark { display: block; width: 34px; height: 34px; border-radius: 9px; box-shadow: 0 4px 14px -6px rgb(99 184 63 / 0.6); }
.logo__text { font-size: 1.2rem; font-weight: 800; letter-spacing: -0.035em; color: var(--text); white-space: nowrap; }
.logo__text span {
  background: linear-gradient(180deg, #c9ef5c, #5aa834);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.logo--xl { gap: 18px; }
.logo--xl .logo__mark { width: clamp(60px, 6.4vw, 80px); height: clamp(60px, 6.4vw, 80px); border-radius: 18px; box-shadow: 0 16px 36px -14px rgb(99 184 63 / 0.55); }
.logo--xl .logo__text { font-size: clamp(2.6rem, 5.2vw, 4rem); letter-spacing: -0.05em; }
.hero__brand { margin: 0 0 18px; }
.lost__code { margin: 0 0 6px; font-size: clamp(4rem, 10vw, 6.5rem); font-weight: 800; letter-spacing: -0.06em; line-height: 1; background: linear-gradient(180deg, #c9ef5c, #4f9a2d); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ------------------------------------------------------------ header */
.topbar { position: relative; z-index: 30; padding-top: 18px; }
.topbar__bar {
  position: relative;
  display: flex;
  align-items: center;
  gap: 20px;
  height: 60px;
  padding: 0 14px 0 20px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.nav { display: flex; align-items: center; gap: 4px; margin: 0 auto; }
.nav a, .mobile-nav a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 10px;
  text-decoration: none;
  color: var(--text-2);
  font-size: 0.97rem;
}
.nav svg, .mobile-nav svg { width: 18px; height: 18px; }
.nav a:hover, .mobile-nav a:hover { color: var(--text); background: var(--card-2); }
.nav a[aria-current="page"], .mobile-nav a[aria-current="page"] { color: var(--text); font-weight: 600; }
.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  background: var(--card-2);
  color: var(--text-2);
  cursor: pointer;
}
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn:hover { color: var(--text); background: var(--btn-hover); }
.icon-btn--accent { background: #5865f2; border-color: #5865f2; color: #fff; }
.icon-btn--accent:hover { background: #4752c4; }
.nav-toggle, .search-toggle { display: none; }
.mobile-nav { display: grid; gap: 2px; margin-top: 8px; padding: 8px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.mobile-nav[hidden] { display: none; }

/* search in the header */
.search { position: relative; }
.search__box {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 230px;
  height: 38px;
  padding: 0 8px 0 12px;
  background: var(--card-2);
  border: 1px solid var(--line-2);
  border-radius: 10px;
  color: var(--muted);
}
.search__box:focus-within { border-color: color-mix(in srgb, var(--accent) 55%, var(--line-2)); }
.search__box svg { width: 16px; height: 16px; }
.search__box input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--text); font: 400 0.93rem var(--f-body); outline: none; }
.search__box input::placeholder { color: var(--dim); }
.search__box input::-webkit-search-cancel-button { display: none; }
.search__panel {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: 360px;
  max-width: calc(100vw - 32px);
  padding: 6px;
  background: var(--card);
  border: 1px solid var(--line-2);
  border-radius: 12px;
  box-shadow: 0 24px 60px -16px rgb(0 0 0 / 0.65);
}
.search__panel[hidden] { display: none; }
.search__results { list-style: none; margin: 0; padding: 0; max-height: 60vh; overflow: auto; }
.search__results:empty { display: none; }
.search__results a { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 9px; text-decoration: none; }
.search__results a[aria-selected="true"], .search__results a:hover { background: var(--card-2); }
.search__name { flex: 1; display: grid; min-width: 0; font-weight: 600; }
.search__name small { font-weight: 400; color: var(--muted); font-size: 0.8rem; }
.search__state { margin: 0; padding: 12px 10px; color: var(--muted); font-size: 0.9rem; }
.search__state:empty { display: none; }

/* ------------------------------------------------------------ buttons */
.actions { display: flex; flex-wrap: wrap; gap: 10px; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 18px;
  border-radius: 10px;
  border: 0;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.15s ease, transform 0.1s ease;
}
.btn:active { transform: scale(0.95); }
.btn svg { width: 16px; height: 16px; }
.btn--light { background: var(--text); color: var(--bg); }
.btn--light:hover { background: #e2e8f0; }
.btn--dark { background: var(--btn); color: var(--text); }
.btn--dark:hover { background: var(--btn-hover); }
.btn--sm { height: 34px; padding: 0 12px; font-size: 0.87rem; }

.ip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 36px;
  padding: 0 10px 0 12px;
  background: var(--card-2);
  border: 1px solid var(--line-2);
  border-radius: 9px;
  cursor: pointer;
  font-size: 0.95rem;
}
.ip svg { width: 15px; height: 15px; color: var(--muted); }
.ip:hover svg { color: var(--text); }
.ip--sm { height: 28px; font-size: 0.8rem; padding: 0 8px; }
.ip.is-copied svg { color: var(--ok); }

/* ------------------------------------------------------------ tier badges + emblems
   Every tier class (.tier--s-plus, .tier--a-minus, .tier--b …) only sets colour variables (see /tiers.css);
   the components below read them, so one tier looks the same everywhere. */
.tier {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 26px;
  padding: 0 8px 0 5px;
  border-radius: 8px;
  border: 1px solid color-mix(in srgb, var(--t-bd) 55%, transparent);
  background: var(--t-bg);
  color: var(--t-fg);
  font-size: 0.8rem;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}
.tier .em { width: 18px; height: 18px; flex: none; }
.tier--sm { height: 22px; padding: 0 6px 0 4px; gap: 4px; font-size: 0.72rem; }
.tier--sm .em { width: 14px; height: 14px; }
.tier--lg { height: 32px; padding: 0 10px 0 6px; font-size: 0.95rem; }
.tier--lg .em { width: 22px; height: 22px; }
.tier--xl { height: 46px; padding: 0 14px 0 8px; gap: 8px; border-radius: 11px; font-size: 1.3rem; }
.tier--xl .em { width: 32px; height: 32px; }
.tier.tier--s-plus { box-shadow: 0 0 0 1px rgb(255 210 77 / 0.2), 0 0 16px -5px rgb(255 210 77 / 0.6); }

.em .m { fill: var(--em-1); }
.em .d { fill: var(--em-2); }
.em .l { fill: var(--em-3); }
.em .o { stroke: #0a0b0c; stroke-width: 1.6; stroke-linejoin: round; paint-order: stroke; }
.em .v { fill: none; stroke: var(--em-3); stroke-width: 0.9; stroke-linecap: round; }
.em .dash { fill: none; stroke: var(--em-1); stroke-width: 2; stroke-dasharray: 3 2.6; }
.tier--s-plus .em { filter: drop-shadow(0 0 3px rgb(255 210 77 / 0.55)); }

.region { display: inline-grid; place-items: center; width: 44px; height: 40px; border-radius: 8px; background: var(--eu-bg); color: var(--eu); font-size: 1.05rem; font-weight: 800; }
.region--sm { width: 34px; height: 28px; font-size: 0.8rem; border-radius: 7px; }

/* tier cell of a leaderboard row: big emblem + exact label */
.tcell { display: inline-grid; justify-items: center; gap: 2px; }
.tcell .em { width: 38px; height: 38px; filter: drop-shadow(0 2px 3px rgb(0 0 0 / 0.5)); }
.tcell.tier--s-plus .em { filter: drop-shadow(0 0 6px rgb(255 210 77 / 0.65)) drop-shadow(0 2px 3px rgb(0 0 0 / 0.5)); }
.tcell__label { min-width: 36px; height: 20px; display: grid; place-items: center; padding: 0 6px; border-radius: 6px; font-size: 0.75rem; font-weight: 800; background: var(--t-bg); color: var(--t-fg); border: 1px solid color-mix(in srgb, var(--t-bd) 45%, transparent); }

/* title line: emblem + name + (points) */
.tline { display: inline-flex; align-items: center; gap: 6px; min-width: 0; color: var(--text-2); font-size: 0.95rem; }
.tline svg { width: 18px; height: 18px; color: var(--title); }
.tline__name { white-space: nowrap; }
.tline__pts { color: var(--dim); white-space: nowrap; }
.title-chip { display: inline-flex; align-items: center; height: 28px; padding: 0 10px; border-radius: 8px; font-size: 0.85rem; font-weight: 700; color: var(--title); background: color-mix(in srgb, var(--title) 20%, var(--card-2)); }
.flag { display: inline-block; padding: 2px 6px; border-radius: 6px; font-size: 0.68rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; color: var(--warn); background: color-mix(in srgb, var(--warn) 16%, transparent); vertical-align: 2px; }
.flag--lg { font-size: 0.75rem; padding: 5px 8px; }

/* rank ribbon with bust */
.ribbon {
  position: relative;
  display: block;
  width: 150px;
  height: 56px;
  flex: none;
  overflow: hidden;
  background: var(--card-3);
  clip-path: polygon(0 0, 100% 0, 86% 100%, 0 100%);
}
.ribbon--1 { background: linear-gradient(90deg, #e9b949, #f0c75d); }
.ribbon--2 { background: linear-gradient(90deg, #9eadbd, #b5c2cf); }
.ribbon--3 { background: linear-gradient(90deg, #b9703a, #cd8549); }
.ribbon__num {
  position: absolute;
  left: 12px;
  top: 50%;
  translate: 0 -52%;
  z-index: 1;
  font-size: 2.1rem;
  font-weight: 800;
  font-style: italic;
  letter-spacing: -0.04em;
  color: #fff;
  text-shadow: 0 2px 0 rgb(0 0 0 / 0.35);
}
.ribbon--x .ribbon__num { font-size: 1.7rem; color: var(--text-2); }
.bust { position: absolute; right: 26px; bottom: -6px; width: 66px; height: 66px; object-fit: cover; object-position: top; image-rendering: auto; }

/* ------------------------------------------------------------ home: hero */
.hero { margin-top: 26px; overflow: hidden; background: linear-gradient(135deg, #1a1c1f 0%, var(--card) 45%, #151a14 100%); }
.hero__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.hero__copy { padding: clamp(28px, 4vw, 48px); display: flex; flex-direction: column; justify-content: center; }
.hero__title { font-size: clamp(1.8rem, 3vw, 2.25rem); font-weight: 700; letter-spacing: -0.03em; line-height: 1.12; margin-bottom: 12px; }
.hero__text { color: var(--text-2); max-width: 46ch; margin-bottom: 24px; }
.hero__top { padding: 28px clamp(18px, 2.6vw, 28px); border-left: 1px solid var(--line); background: rgb(13 18 24 / 0.35); }
.label-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.top-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.top-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  grid-template-areas: "rib main tiers region";
  align-items: center;
  column-gap: 14px;
  padding: 6px 12px 6px 6px;
  border-radius: 12px;
  background: var(--card-2);
  border: 1px solid var(--line);
  text-decoration: none;
}
.top-row:hover { border-color: var(--line-2); background: var(--card-3); }
.top-row--open { grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "rib main tiers"; border-style: dashed; background: transparent; }
.top-row--open .ribbon { opacity: 0.35; }
.top-row--open .top-row__name { color: var(--muted); }
.top-row .ribbon { grid-area: rib; width: 132px; height: 52px; }
.top-row__main { grid-area: main; display: grid; min-width: 0; }
.top-row__name { font-size: 1.25rem; font-weight: 700; letter-spacing: -0.02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top-row .region { grid-area: region; }
.top-row .tline { font-size: 0.88rem; }
.top-row .tline__name { overflow: hidden; text-overflow: ellipsis; }
.top-row .tline__pts { display: none; }
.top-row__tiers { grid-area: tiers; }
.hero__strip {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 22px;
  padding: 16px clamp(20px, 3vw, 40px);
  border-top: 1px solid var(--line);
  background: rgb(10 14 19 / 0.35);
}
.strip-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 10px; background: var(--accent-bg); color: var(--accent); }
.strip-icon svg { width: 22px; height: 22px; }
.strip-ip { display: grid; gap: 4px; }
.strip-status { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0; font-size: 0.9rem; }
.strip-status .muted { font-size: 0.85rem; }
.strip-meta { margin: 0; font-size: 0.85rem; }
.strip-link { margin-left: auto; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--dim); }
.dot--on { position: relative; background: var(--ok); }

/* sections */
.section { margin-top: clamp(36px, 5vw, 56px); }
.section__title { font-size: 1.45rem; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 16px; }
.section__sub { margin: -10px 0 16px; font-size: 0.92rem; }
.split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }

.tiles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.tile {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 18px 10px 16px;
  border-radius: 12px;
  background: var(--card);
  border: 1px solid var(--line);
  text-decoration: none;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.tile:hover { border-color: var(--line-2); transform: translateY(-2px); }
.tile .em { width: 48px; height: 48px; filter: drop-shadow(0 3px 4px rgb(0 0 0 / 0.5)); }
.tile.tier--s .em { filter: drop-shadow(0 0 6px rgb(227 174 56 / 0.45)) drop-shadow(0 3px 4px rgb(0 0 0 / 0.5)); }
.tile__name { color: var(--t-fg); }
.tile__name { font-weight: 700; }
.tile__name { color: var(--t-fg); }
.tile__count { font-size: 0.8rem; color: var(--muted); margin-top: -6px; }

.steps-card { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.3fr); gap: clamp(24px, 4vw, 48px); padding: clamp(24px, 3.5vw, 40px); background: linear-gradient(120deg, #182016 0%, var(--card) 55%, #17181a 100%); }
.steps-card__intro { align-self: center; }
.steps-card__intro .h2 { font-size: 1.75rem; margin-bottom: 12px; }
.steps-card__intro p { margin-bottom: 20px; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; position: relative; }
.steps::before { content: ""; position: absolute; left: 15px; top: 16px; bottom: 16px; width: 1px; background: var(--line-2); }
.steps li { position: relative; display: grid; grid-template-columns: 32px 1fr; gap: 16px; align-items: start; }
.steps__n {
  position: relative;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--card-2);
  border: 1px solid var(--line-2);
  font-size: 0.85rem;
  font-weight: 700;
}
.steps li:last-child .steps__n { border: 2px solid var(--accent); color: var(--accent-text); background: var(--accent-bg); }
.steps p { margin: 5px 0 0; color: var(--text-2); font-size: 0.95rem; }
.steps strong { color: var(--text); font-weight: 600; }
.steps--article { margin: 4px 0 8px; }

.tier-rows { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 8px; }
.tier-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; min-height: 48px; padding: 8px 12px; border-radius: 10px; background: color-mix(in srgb, var(--t-bg) 80%, var(--card-2)); color: var(--t-fg); border: 1px solid color-mix(in srgb, var(--t-bd) 25%, transparent); }
.tier-row__name { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.05rem; }
.tier-row__name .em { width: 26px; height: 26px; }
.tier-row__chips { display: flex; flex-wrap: wrap; gap: 6px; }
.tier-row__pts { font-size: 0.75rem; font-weight: 700; color: var(--text-2); margin-left: 2px; }

.titles { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 14px; }
.titles li { display: grid; grid-template-columns: 22px 1fr auto; column-gap: 10px; row-gap: 6px; align-items: center; }
.titles__icon { width: 22px; height: 22px; color: var(--title); grid-row: span 2; }
.titles__name { font-weight: 700; color: var(--title); }
.titles__min { font-size: 0.8rem; color: var(--muted); }
.titles__bar { grid-column: 2 / -1; height: 6px; border-radius: 6px; background: var(--card-3); overflow: hidden; }
.titles__bar span { display: block; height: 100%; border-radius: 6px; background: var(--title); }

/* latest results, in the card style of an events list */
.label-row--section { margin-bottom: 16px; }
.label-row--section .section__title { margin: 0; }
.results { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.result { display: grid; grid-template-columns: 76px minmax(0, 1fr); height: 100%; overflow: hidden; text-decoration: none; transition: border-color 0.15s ease; }
.result:hover { border-color: var(--line-2); }
.result__date { display: grid; align-content: center; justify-items: center; gap: 2px; padding: 12px 6px; background: rgb(10 14 19 / 0.45); border-right: 1px solid var(--line); }
.result__mon { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; color: var(--accent-text); }
.result__day { font-size: 1.7rem; font-weight: 800; line-height: 1.05; }
.result__wd { font-size: 0.75rem; color: var(--muted); }
.result__body { display: grid; gap: 4px; padding: 14px 16px; min-width: 0; }
.result__meta { display: inline-flex; align-items: center; gap: 6px; font-size: 0.75rem; color: var(--muted); }
.result__meta svg { width: 14px; height: 14px; color: var(--accent); }
.result__title { font-size: 1.05rem; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.result__text { font-size: 0.85rem; color: var(--text-2); }
.result__foot { display: flex; align-items: center; gap: 10px; margin-top: 4px; font-size: 0.85rem; }
.result__arrow { width: 14px; height: 14px; margin-left: auto; color: var(--dim); }
.result:hover .result__arrow { color: var(--text); }

/* faq */
.faq { overflow: hidden; }
.faq details { border-top: 1px solid var(--line); }
.faq details:first-child { border-top: 0; }
.faq details[open] { background: linear-gradient(90deg, rgb(99 184 63 / 0.06), transparent 60%); box-shadow: inset 3px 0 0 var(--accent); }
.faq summary { list-style: none; display: grid; grid-template-columns: 40px 1fr 28px; align-items: center; gap: 8px; padding: 18px 20px; cursor: pointer; }
.faq summary::-webkit-details-marker { display: none; }
.faq__n { font-size: 0.85rem; font-weight: 600; color: var(--dim); font-variant-numeric: tabular-nums; }
.faq details[open] .faq__n { color: var(--accent-text); }
.faq__q { font-size: 1.05rem; font-weight: 600; }
.faq__x { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: var(--card-2); color: var(--muted); transition: background-color 0.2s ease; }
.faq__x svg { width: 14px; height: 14px; transition: rotate 0.2s ease; }
.faq details[open] .faq__x { background: var(--accent-bg); color: var(--accent-text); }
.faq details[open] .faq__x svg { rotate: 45deg; }
.faq details > p, .faq__body { margin: 0; padding: 0 20px 20px 68px; color: var(--text-2); max-width: 80ch; }

.more { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; padding: 26px; background: linear-gradient(120deg, #182016 0%, var(--card) 60%); }
.more__intro { display: flex; gap: 18px; align-items: flex-start; }
.more__icon { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 14px; background: var(--accent-bg); color: var(--accent); flex: none; }
.more__icon svg { width: 30px; height: 30px; }
.more__intro p { margin-bottom: 14px; }
.more__links { list-style: none; margin: 0; padding: 0; align-self: center; }
.more__links li + li { border-top: 1px solid var(--line-2); }
.more__links a { display: block; padding: 12px 0; font-weight: 600; text-decoration: none; }
.more__links a:hover { color: var(--accent-text); }

.empty { padding: 26px; text-align: center; color: var(--text-2); border: 1px dashed var(--line-2); border-radius: 12px; }
.empty p { margin-bottom: 14px; }
.empty--inline { padding: 18px; }

/* ------------------------------------------------------------ rankings */
.rank-page { padding-top: 72px; }
.rank-card { position: relative; padding: 22px clamp(14px, 2.6vw, 30px) 26px; }
.tabs { position: absolute; left: 0; bottom: 100%; display: flex; gap: 6px; padding-left: 4px; }
.tab {
  display: grid;
  justify-items: center;
  gap: 2px;
  min-width: 104px;
  padding: 9px 14px 8px;
  border-radius: 12px 12px 0 0;
  background: var(--card-2);
  border: 1px solid var(--line);
  border-bottom: 0;
  text-decoration: none;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
}
.tab svg { width: 22px; height: 22px; }
.tab:hover { color: var(--text); }
.tab[aria-current="page"] { background: var(--card); color: var(--text); }
.tab[aria-current="page"] svg { color: var(--accent); }
.rank-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.rank-head__title { font-size: 1.4rem; font-weight: 700; letter-spacing: -0.02em; }
.rank-head .muted { margin: 2px 0 0; }
.rank-head__tools { display: flex; align-items: center; gap: 12px; }
.mini-ip { display: grid; gap: 3px; }

.info { position: relative; }
.info summary { list-style: none; }
.info summary::-webkit-details-marker { display: none; }
.info summary svg { width: 16px; height: 16px; color: var(--text-2); }
.info__panel {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 20;
  width: 300px;
  padding: 12px;
  background: var(--card);
  border: 1px solid var(--line-2);
  border-radius: 12px;
  box-shadow: 0 24px 60px -16px rgb(0 0 0 / 0.7);
}
.info__tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 3px; background: var(--card-2); border-radius: 9px; margin-bottom: 12px; }
.info__tabs button { height: 30px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); font-size: 0.85rem; font-weight: 600; cursor: pointer; }
.info__tabs button[aria-selected="true"] { background: var(--btn); color: var(--text); }
.info__title { font-weight: 700; margin-bottom: 10px; }
.info__list, .info__points { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.info__list li { display: flex; gap: 8px; align-items: flex-start; }
.info__list svg { width: 16px; height: 16px; color: var(--title); margin-top: 2px; }
.info__list strong { display: block; color: var(--title); font-size: 0.88rem; }
.info__list small { color: var(--muted); font-size: 0.75rem; }
.info__points { grid-template-columns: 1fr 1fr; gap: 6px 12px; }
.info__points li { display: flex; align-items: center; gap: 8px; font-size: 0.82rem; color: var(--text-2); }
.info__note { margin: 12px 0 0; font-size: 0.75rem; color: var(--muted); }

.toolbar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.field { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 10px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--card-2); }
.field:focus-within { border-color: color-mix(in srgb, var(--accent) 55%, var(--line-2)); }
.field--search { flex: 1 1 260px; }
.field svg { width: 16px; height: 16px; color: var(--muted); }
.field input, .field select { border: 0; background: transparent; color: var(--text); font: inherit; font-size: 0.92rem; height: 100%; outline: none; min-width: 0; }
.field input { width: 100%; }
.field select { cursor: pointer; }
.field select option { background: var(--card); }
.field__label { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--dim); }

.board__head { display: grid; grid-template-columns: 160px minmax(0, 1fr) 76px 72px 96px; gap: 14px; padding: 0 0 8px; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--dim); }
.board__head span:first-child { padding-left: 18px; }
.board__head span:nth-child(n+3) { text-align: center; }
.board { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.board__row {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr) 76px 72px 96px;
  align-items: center;
  gap: 14px;
  min-height: 64px;
  border-radius: 12px;
  background: var(--card-2);
  border: 1px solid var(--line);
  overflow: hidden;
  text-decoration: none;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.board__row:hover { border-color: var(--line-2); background: var(--card-3); }
.board__row .ribbon { height: 62px; width: 160px; }
.board__main { display: grid; min-width: 0; gap: 1px; }
.board__name { font-size: 1.35rem; font-weight: 700; letter-spacing: -0.02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board__region { align-self: stretch; display: grid; place-items: center; background: rgb(10 14 19 / 0.4); border-left: 1px solid var(--line); border-right: 1px solid var(--line); }
.board__tiers { display: grid; place-items: center; padding: 6px 0; }
.board__pts { display: grid; justify-items: center; line-height: 1.05; font-variant-numeric: tabular-nums; }
.board__pts strong { font-size: 1.25rem; font-weight: 800; }
.board__pts small { font-size: 0.7rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }
.board .tline__pts { display: none; }
.board__main { overflow: hidden; }
.board .tline { max-width: 100%; }
.board .tline__name { overflow: hidden; text-overflow: ellipsis; }
.pager { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; margin-top: 18px; }
.pager > :last-child { justify-self: end; }

/* tier columns */
.columns { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; align-items: start; }
.column { min-width: 0; }
.column__head {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 48px;
  margin-bottom: 6px;
  border-radius: 10px 10px 4px 4px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--t-bd) 30%, var(--t-bg)), var(--t-bg));
  color: var(--t-fg);
  font-size: 1.1rem;
  font-weight: 700;
}
.column__head .em { width: 24px; height: 24px; }
.column__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.crow {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  height: 32px;
  padding: 0 8px 0 6px;
  border-radius: 6px;
  background: var(--card-2);
  border-left: 2px solid var(--eu);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
}
.crow:hover { background: var(--card-3); }
.crow .head { border-radius: 4px; }
.crow__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.column__empty { margin: 0; padding: 10px; text-align: center; font-size: 0.82rem; color: var(--dim); border: 1px dashed var(--line-2); border-radius: 6px; }

.head { border-radius: 6px; background: var(--card-3); image-rendering: pixelated; flex: none; }

/* ------------------------------------------------------------ profile */
.profile-page { padding-top: 28px; max-width: 920px; }
.profile { display: grid; gap: 0; }
.profile__head { display: flex; align-items: center; gap: 22px; padding: 22px 26px; }
.profile__avatar { position: relative; flex: none; width: 104px; height: 104px; border-radius: 14px; background: var(--card-2); overflow: hidden; }
.profile__avatar .bust { right: 50%; translate: 50% 0; bottom: -4px; width: 104px; height: 104px; }
.profile__line { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px; }
.profile__name { font-size: clamp(2rem, 4.4vw, 2.9rem); font-weight: 800; letter-spacing: -0.035em; line-height: 1.05; overflow-wrap: anywhere; }
.profile__meta { margin: 8px 0 0; color: var(--text-2); font-size: 1.02rem; }
.profile__summary { margin: 0; padding: 26px 2px; color: var(--text-2); font-size: 0.95rem; }
.table-wrap { overflow-x: auto; }
.ptable { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.ptable th { padding: 14px 12px 10px; text-align: left; font-weight: 500; color: var(--muted); white-space: nowrap; }
.ptable th.num { text-align: right; }
.ptable td { padding: 12px; border-top: 1px solid var(--line); vertical-align: middle; }
.ptable tbody tr:hover td { background: rgb(255 255 255 / 0.015); }
.card > .ptable th:first-child, .card > .ptable td:first-child, .table-wrap.card .ptable th:first-child, .table-wrap.card .ptable td:first-child { padding-left: 18px; }
.table-wrap.card .ptable th:last-child, .table-wrap.card .ptable td:last-child { padding-right: 18px; }
.kitname { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.kitname svg { width: 18px; height: 18px; color: var(--accent); }
.state--ready { color: var(--ok); }
.state--cooldown { color: var(--text-2); }
.state--restricted { color: var(--warn); }
.verb { font-weight: 700; }
.verb--promoted, .verb--placed { color: var(--ok); }
.verb--demoted, .verb--failed { color: var(--warn); }
.verb--stays { color: var(--text-2); }
.peers { color: var(--text-2); }
.peers a { color: var(--text); text-underline-offset: 3px; text-decoration-color: var(--line-2); }
.peers a:hover { text-decoration-color: var(--accent); }
.learn { margin: 0; padding-left: 1.1em; color: var(--text-2); }
.learn li { margin-bottom: 6px; }
.learn a { text-underline-offset: 3px; text-decoration-color: var(--line-2); }
.learn a:hover { color: var(--text); text-decoration-color: var(--accent); }

/* ------------------------------------------------------------ guides / articles */
.article { max-width: 780px; padding-top: 34px; }
.article--wide { max-width: var(--wrap); }
.back { display: inline-block; margin-bottom: 18px; color: var(--muted); font-size: 0.9rem; text-decoration: none; }
.back:hover { color: var(--text); }
.article__title { font-size: clamp(1.9rem, 4vw, 2.6rem); font-weight: 800; letter-spacing: -0.035em; line-height: 1.1; margin-bottom: 10px; }
.article__meta { color: var(--muted); font-size: 0.9rem; margin-bottom: 28px; }
.prose { color: var(--text-2); font-size: 1rem; line-height: 1.7; }
.prose h2 { font-size: 1.45rem; font-weight: 700; letter-spacing: -0.02em; color: var(--text); margin: 34px 0 12px; }
.prose h3, .prose h4 { font-size: 1.08rem; font-weight: 700; color: var(--text); margin: 22px 0 8px; }
.prose strong { color: var(--text); }
.prose a:not(.btn) { color: var(--text); text-underline-offset: 3px; text-decoration-color: var(--accent); }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: 6px; }
.prose code { padding: 2px 6px; border-radius: 6px; background: var(--card-2); color: var(--text); font-size: 0.88em; }
.prose u { text-decoration-color: var(--accent); }
.prose .table-wrap { margin: 8px 0 4px; }
.article > .table-wrap { margin-bottom: 8px; }
.md-list { list-style: none; margin: 0 0 14px; padding: 0 !important; display: grid; gap: 7px; }
.md-list li { position: relative; padding-left: 20px; margin: 0; }
.md-list li::before { content: ""; position: absolute; left: 2px; top: 0.66em; width: 6px; height: 6px; border-radius: 2px; rotate: 45deg; background: var(--accent); }
.md-list li[data-mark="🔴"]::before, .md-list li[data-mark="⛔"]::before { background: #ef6b6b; }
.md-list li[data-mark="🟢"]::before, .md-list li[data-mark="✅"]::before { background: var(--ok); }
.md-list li[data-mark="➜"]::before { rotate: 0deg; width: 9px; height: 2px; top: 0.8em; border-radius: 1px; background: var(--muted); }
.md-small { font-size: 0.85rem; color: var(--muted); }
.prose blockquote { margin: 0 0 12px; padding-left: 14px; border-left: 2px solid var(--line-2); }
.doc { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: clamp(24px, 4vw, 48px); }
.doc__toc { position: sticky; top: 100px; align-self: start; }
.doc__toc ul { list-style: none; margin: 10px 0 0; padding: 0; border-left: 1px solid var(--line-2); }
.doc__toc a { display: block; margin-left: -1px; padding: 5px 0 5px 14px; border-left: 2px solid transparent; color: var(--muted); font-size: 0.88rem; text-decoration: none; }
.doc__toc a:hover { color: var(--text); border-left-color: var(--accent); }
.doc__body { max-width: 760px; }
.doc__section { padding-bottom: 26px; margin-bottom: 26px; border-bottom: 1px solid var(--line); }
.doc__section:last-child { border-bottom: 0; }
.doc__section > h2 { margin-top: 0; }
.kit { display: block; margin-top: 16px; max-width: 520px; width: 100%; border-radius: 12px; border: 1px solid var(--line-2); image-rendering: pixelated; }

.discord { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; padding: 20px 22px; margin-bottom: 8px; background: linear-gradient(120deg, rgb(88 101 242 / 0.18), var(--card) 60%); }
.discord__icon { display: grid; place-items: center; width: 50px; height: 50px; border-radius: 14px; background: #5865f2; color: #fff; }
.discord__icon svg { width: 26px; height: 26px; }
.discord > div { flex: 1 1 240px; }
.discord .h3 { margin-bottom: 4px; }
.discord p { margin: 0; }
.testers { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.tester { display: flex; align-items: center; gap: 12px; padding: 14px; }
.tester--active { border-color: color-mix(in srgb, var(--ok) 40%, var(--line)); }
.tester__name { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0; font-weight: 700; }
.tester__name a { text-decoration: none; }
.tester__name a:hover { color: var(--accent-text); }
.tester .small { margin: 0; }
.live { padding: 2px 6px; border-radius: 6px; font-size: 0.68rem; font-weight: 800; text-transform: uppercase; color: var(--ok); background: color-mix(in srgb, var(--ok) 14%, transparent); }

.lost { margin-top: 48px; padding: clamp(32px, 6vw, 64px); text-align: center; }
.lost .actions { justify-content: center; margin-top: 22px; }

/* ------------------------------------------------------------ footer, toast */
.footer { margin-top: clamp(48px, 7vw, 80px); border-top: 1px solid var(--line); background: #0c0d0e; }
.footer__grid { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 0.8fr)); gap: 32px; padding: 40px 0 30px; }
.footer__brand p { max-width: 42ch; margin: 14px 0 14px; color: var(--muted); font-size: 0.93rem; }
.footer__small { font-size: 0.75rem !important; margin-top: 8px !important; }
.footer__col h2 { margin-bottom: 12px; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; color: var(--muted); }
.footer__col a { display: flex; align-items: center; gap: 8px; padding: 4px 0; color: var(--text-2); font-size: 0.93rem; text-decoration: none; }
.footer__col a:hover { color: var(--text); }
.footer__col svg { width: 16px; height: 16px; color: var(--accent); }
.footer__col .em { width: 16px; height: 16px; }
.footer__legal { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding: 18px 0 26px; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.82rem; }
.toasts { position: fixed; right: 18px; bottom: 18px; z-index: 70; display: grid; gap: 8px; justify-items: end; pointer-events: none; }
.toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 260px;
  max-width: min(360px, calc(100vw - 36px));
  padding: 12px 12px 12px 14px;
  border-radius: 12px;
  background: var(--card);
  border: 1px solid var(--line-2);
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 500;
  box-shadow: 0 18px 44px -14px rgb(0 0 0 / 0.75);
  animation: toast-in 0.28s cubic-bezier(0.21, 1.02, 0.73, 1) both;
}
.toast.is-leaving { animation: toast-out 0.2s ease forwards; }
.toast svg { width: 18px; height: 18px; color: var(--ok); }
.toast button { margin-left: auto; height: 30px; padding: 0 12px; border: 0; border-radius: 8px; background: var(--text); color: var(--bg); font-weight: 700; cursor: pointer; }

/* ------------------------------------------------------------ responsive */
@media (max-width: 1040px) {
  .nav { display: none; }
  .nav-toggle { display: inline-grid; }
  .search { margin-left: auto; }
  .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .columns { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 16px; }
}
@media (max-width: 880px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__top { border-left: 0; border-top: 1px solid var(--line); }
  .steps-card, .split, .more, .results { grid-template-columns: 1fr; }
  .doc { grid-template-columns: 1fr; }
  .doc__toc { position: static; }
  .doc__toc ul { columns: 2; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .footer__brand { grid-column: 1 / -1; }
  .board__head, .board__row { grid-template-columns: 130px minmax(0, 1fr) 64px 60px 84px; gap: 10px; }
  .board__row .ribbon { width: 130px; }
  .board__name { font-size: 1.15rem; }
  .strip-link { margin-left: 0; }
}
@media (max-width: 640px) {
  .topbar__bar { gap: 8px; padding: 0 10px 0 14px; }
  .search { position: static; margin-left: auto; }
  .search__box { display: none; }
  .search.is-open .search__box { display: flex; position: absolute; left: 10px; right: 10px; top: 10px; width: auto; z-index: 2; }
  .search__panel { left: 0; right: 0; width: auto; max-width: none; }
  .search-toggle { display: inline-grid; }
  .logo__text { font-size: 1.1rem; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .top-row { grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "rib main tiers"; }
  .top-row .region { display: none; }
  .top-row--open .link-sm { display: none; }
  .top-row .ribbon { width: 104px; height: 46px; }
  .top-row .ribbon__num { font-size: 1.6rem; }
  .top-row .bust { right: 14px; width: 54px; height: 54px; }
  .tline__pts { display: none; }
  .board__head { display: none; }
  .board__row { grid-template-columns: 96px minmax(0, 1fr) auto auto; gap: 10px; min-height: 58px; }
  .board__pts strong { font-size: 1rem; }
  .board__row .ribbon { width: 96px; height: 58px; }
  .board__row .ribbon__num { font-size: 1.4rem; left: 8px; }
  .board__row .bust { right: 12px; width: 50px; height: 50px; }
  .board__region { display: none; }
  .board__tiers { padding-right: 10px; }
  .board__name { font-size: 1.05rem; }
  .profile__head { flex-direction: column; align-items: flex-start; }
  .ptable--kit th:nth-child(3), .ptable--kit td:nth-child(3), .ptable--kit th:nth-child(4), .ptable--kit td:nth-child(4) { display: none; }
  .ptable--history th:nth-child(2), .ptable--history td:nth-child(2), .ptable--history th:nth-child(4), .ptable--history td:nth-child(4) { display: none; }
  .ptable--history { font-size: 0.85rem; }
  .ptable th, .ptable td { padding-left: 10px; padding-right: 10px; }
  .faq summary { grid-template-columns: 30px 1fr 28px; padding: 16px 14px; }
  .faq details > p, .faq__body { padding: 0 14px 18px 52px; }
  .footer__grid { grid-template-columns: 1fr; }
  .rank-page { padding-top: 66px; }
  .rank-head__tools { width: 100%; justify-content: space-between; }
  .mini-ip { display: none; }
  .info__panel { right: auto; left: 0; }
}
/* ------------------------------------------------------------ leaderboard tabs, tier lists */
.tab { min-width: 76px; }
.tab .em { width: 22px; height: 22px; }
.tab small { font-size: 0.66rem; font-weight: 600; color: var(--dim); }
.tab[aria-current="page"] { box-shadow: inset 0 2px 0 var(--accent); }
.tab[class*="tier--"][aria-current="page"] { color: var(--t-fg); box-shadow: inset 0 2px 0 var(--t-bd); }
.tab:hover .em { transform: scale(1.12); }
.tab .em { transition: transform 0.12s ease; }

.sub { margin-top: 18px; }
.sub:first-of-type { margin-top: 6px; }
.sub__head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 8px;
  padding: 12px 16px;
  border-radius: 12px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--t-bd) 26%, var(--t-bg)), var(--t-bg) 72%);
  border: 1px solid color-mix(in srgb, var(--t-bd) 40%, transparent);
  color: var(--t-fg);
}
.sub__head .em { width: 46px; height: 46px; flex: none; filter: drop-shadow(0 2px 4px rgb(0 0 0 / 0.5)); }
.sub.tier--s-plus .sub__head .em { filter: drop-shadow(0 0 9px rgb(255 210 77 / 0.6)) drop-shadow(0 2px 4px rgb(0 0 0 / 0.5)); }
.sub__text { flex: 1; min-width: 0; }
.sub__head h2 { margin: 0; font-size: 1.25rem; font-weight: 800; letter-spacing: -0.02em; }
.sub__head p { margin: 2px 0 0; font-size: 0.85rem; color: color-mix(in srgb, var(--t-fg) 65%, var(--muted)); }
.sub__count { display: grid; justify-items: end; font-size: 1.5rem; font-weight: 800; line-height: 1; }
.sub__count small { font-size: 0.66rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.sub__empty { margin: 0; padding: 12px; text-align: center; font-size: 0.9rem; color: var(--dim); border: 1px dashed var(--line-2); border-radius: 10px; }
.board--sub .board__row { border-left: 3px solid var(--t-bd); }
.board__sub { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 12px; min-width: 0; }
.board__global { font-size: 0.75rem; font-weight: 600; color: var(--dim); white-space: nowrap; }

.compact { list-style: none; margin: 4px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 10px; }
.compact__row {
  display: grid;
  grid-template-columns: 26px 28px minmax(0, 1fr) auto auto auto;
  align-items: center;
  gap: 10px;
  height: 46px;
  padding: 0 10px;
  border-radius: 10px;
  background: var(--card-2);
  border: 1px solid var(--line);
  border-left: 3px solid var(--t-bd);
  text-decoration: none;
  transition: background-color 0.12s ease, transform 0.12s ease;
}
.compact__row:hover { background: var(--card-3); transform: translateX(3px); }
.compact__pos { font-weight: 800; color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
.compact__name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.compact__global { font-size: 0.72rem; color: var(--dim); white-space: nowrap; }
.compact__pts { font-size: 0.8rem; font-weight: 700; color: var(--text-2); white-space: nowrap; }

.tier-chip { display: inline-flex; align-items: center; gap: 6px; padding-right: 4px; }
a.tier-row__name { color: inherit; text-decoration: none; }
a.tier-row__name:hover { text-decoration: underline; text-underline-offset: 3px; }
.column__head a { display: inline-flex; align-items: center; gap: 8px; color: inherit; text-decoration: none; }
.crow .tier { justify-self: end; }

@media (max-width: 880px) {
  .compact { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .rank-page { padding-top: 14px !important; }
  .tabs { position: static; overflow-x: auto; margin: -8px 0 14px; padding: 0 0 4px; scrollbar-width: none; }
  .tabs::-webkit-scrollbar { display: none; }
  .tab { min-width: 60px; border-radius: 10px; border-bottom: 1px solid var(--line); flex: none; }
  .sub__head { padding: 10px 12px; gap: 10px; }
  .sub__head .em { width: 38px; height: 38px; }
  .compact__global { display: none; }
  .compact__row { grid-template-columns: 22px 28px minmax(0, 1fr) auto auto; }
  .board__global { display: none; }
}

/* ------------------------------------------------------------ numbers, spotlight, results, profile stats */
.numbers { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.number { display: grid; gap: 2px; padding: 18px 20px; }
.number__value { font-size: clamp(1.7rem, 3vw, 2.3rem); font-weight: 800; letter-spacing: -0.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.number__label { font-size: 0.82rem; font-weight: 600; color: var(--muted); }
.number:first-child .number__value { color: var(--accent-text); }

.spotlight { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.spot { padding: 0; overflow: hidden; border-top: 3px solid var(--t-bd); }
.spot__head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; text-decoration: none; color: var(--t-fg); background: linear-gradient(90deg, color-mix(in srgb, var(--t-bd) 18%, var(--t-bg)), transparent); }
.spot__head .em { width: 30px; height: 30px; transition: transform 0.12s ease; }
.spot__head:hover .em { transform: scale(1.12); }
.spot__name { font-weight: 800; flex: 1; }
.spot__count { font-size: 0.8rem; font-weight: 700; color: var(--muted); }
.spot__list { list-style: none; margin: 0; padding: 6px; }
.spot__list a { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 8px; text-decoration: none; }
.spot__list a:hover { background: var(--card-2); }
.spot__player { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.spot__empty { margin: 0; padding: 14px; color: var(--dim); font-size: 0.88rem; }

.rank-page--plain { padding-top: 28px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 16px; }
.chip-link { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 10px 0 6px; border-radius: 9px; border: 1px solid var(--line-2); background: var(--card-2); text-decoration: none; font-size: 0.85rem; font-weight: 600; color: var(--text-2); }
.chip-link:first-child { padding-left: 10px; }
.chip-link small { color: var(--dim); font-weight: 600; }
.chip-link:hover { color: var(--text); border-color: var(--muted); }
.chip-link[aria-current="true"] { color: var(--text); border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.chip-link .head { border-radius: 4px; }
.feedlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.feedrow {
  display: grid;
  grid-template-columns: 52px minmax(0, 1.4fr) auto 92px minmax(0, 1fr) 54px 108px;
  align-items: center;
  gap: 12px;
  padding: 8px 14px 8px 8px;
  border-radius: 12px;
  background: var(--card-2);
  border: 1px solid var(--line);
}
.feedrow:hover { border-color: var(--line-2); }
.feedrow__date { display: grid; justify-items: center; line-height: 1.05; }
.feedrow__day { font-size: 1.25rem; font-weight: 800; }
.feedrow__player { display: inline-flex; align-items: center; gap: 10px; min-width: 0; font-weight: 700; text-decoration: none; }
.feedrow__player span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feedrow__player:hover span { text-decoration: underline; text-underline-offset: 3px; }
.feedrow__change { display: inline-flex; align-items: center; gap: 6px; }
.feedrow__change svg { width: 14px; height: 14px; color: var(--dim); }
.feedrow__tester { font-size: 0.9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feedrow__tester a { text-decoration: none; color: var(--text-2); }
.feedrow__tester a:hover { color: var(--accent-text); }
.feedrow__score { font-variant-numeric: tabular-nums; text-align: center; }
.feedrow__ago { font-size: 0.82rem; color: var(--muted); text-align: right; white-space: nowrap; }
.feed__note { margin: 12px 2px 0; }

.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 0 0 12px; }
.kpi { display: grid; align-content: start; gap: 4px; padding: 16px 18px; }
.kpi dt { font-size: 0.8rem; font-weight: 600; color: var(--muted); }
.kpi dd { margin: 0; font-size: 1.9rem; font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpi__sub { font-size: 0.8rem; color: var(--dim); }
.kpi__bar { display: block; height: 6px; margin: 4px 0 2px; border-radius: 6px; background: color-mix(in srgb, #ef6b6b 45%, var(--card-3)); overflow: hidden; }
.kpi__bar span { display: block; height: 100%; border-radius: 6px; background: var(--accent); }
.kpi__bar--0 { width: 3%; }
.kpi__bar--10 { width: 10%; }
.kpi__bar--20 { width: 20%; }
.kpi__bar--30 { width: 30%; }
.kpi__bar--40 { width: 40%; }
.kpi__bar--50 { width: 50%; }
.kpi__bar--60 { width: 60%; }
.kpi__bar--70 { width: 70%; }
.kpi__bar--80 { width: 80%; }
.kpi__bar--90 { width: 90%; }
.kpi__bar--100 { width: 100%; }
.win { color: var(--accent-text); font-weight: 700; }
.loss { color: #ef8080; font-weight: 700; }
.chart-card { padding: 16px 18px 10px; }
.chart-card__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; }
.chart-card__head h3 { margin: 0; font-size: 1rem; font-weight: 700; }
.chart { display: block; width: 100%; height: auto; }
.chart__grid { stroke: var(--line); stroke-width: 1; }
.chart__axis { fill: var(--t-fg); font: 700 11px var(--f-body); text-anchor: end; }
.chart__line { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linejoin: round; }
.chart__pt circle { fill: var(--em-1); stroke: #0a0b0c; stroke-width: 2.5; }
.chart__pt:hover circle { r: 8; }
.chart__date { fill: var(--muted); font: 600 11px var(--f-body); }
.chart__date--end { text-anchor: end; }

@media (max-width: 880px) {
  .numbers, .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .spotlight { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .feedrow { grid-template-columns: 46px minmax(0, 1fr) auto 80px; }
  .feedrow__tester, .feedrow__score, .feedrow__ago { display: none; }
}
@media (max-width: 640px) {
  .spotlight { grid-template-columns: 1fr; }
  .feedrow { grid-template-columns: 40px minmax(0, 1fr) auto; row-gap: 4px; }
  .feedrow .verb { display: none; }
}

/* ------------------------------------------------------------ motion */
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes pop { from { opacity: 0; transform: translateY(-6px) scale(0.97); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes ping { 75%, 100% { transform: scale(2.4); opacity: 0; } }
@keyframes spin { to { rotate: 360deg; } }
@keyframes toast-in { from { opacity: 0; transform: translateY(14px) scale(0.97); } to { opacity: 1; transform: none; } }
@keyframes toast-out { to { opacity: 0; transform: translateX(24px); } }
@keyframes progress { 0% { width: 0; } 30% { width: 45%; } 70% { width: 75%; } 100% { width: 92%; } }
@keyframes sheen { 0%, 70% { transform: translateX(-120%) skewX(-18deg); } 100% { transform: translateX(260%) skewX(-18deg); } }

/* hover + press, the same rhythm as the reference (fast colour changes, rows slide to the left) */
.board__row, .top-row { transition: transform 0.15s ease, background-color 0.15s ease, border-color 0.15s ease; }
@media (hover: hover) {
  .board__row:hover, .top-row:not(.top-row--open):hover { transform: translateX(-12px); }
  .board__row:active, .top-row:active { transform: translateX(-12px) scale(0.99); }
}
.tcell .em, .tile .em, .tline svg { transition: transform 0.12s ease; }
.board__row:hover .tcell .em, .top-row:hover .tcell .em { transform: scale(1.15); }
.tile { transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.15s ease; }
.tile:hover { background: var(--card-2); border-color: rgb(100 116 139 / 0.3); transform: none; }
.tile:hover .em { transform: scale(1.2); }
.crow { transition: background-color 0.12s ease, transform 0.12s ease; }
.crow:hover { transform: translateX(3px); }
.arr { display: inline-block; transition: transform 0.15s ease; }
a:hover > .arr { transform: translateX(3px); }
a:hover > .arr--back { transform: translateX(-3px); }
.btn svg { transition: transform 0.15s ease; }
.btn:hover svg { transform: translateX(2px); }
.info summary svg, .info .btn:hover svg { transform: none; }
.tab { transition: color 0.12s ease, background-color 0.12s ease; }
.tab:hover svg { transform: scale(1.12); }
.tab svg { transition: transform 0.12s ease; }
.faq summary { transition: background-color 0.1s ease; }
.faq summary:hover { background: rgb(255 255 255 / 0.02); }
.more__links a { transition: color 0.12s ease, padding-left 0.15s ease; }
.more__links a:hover { padding-left: 4px; }
.result { transition: border-color 0.15s ease, transform 0.15s ease; }
.result:hover { transform: translateY(-2px); }

/* the queue dot pulses while the queue is open */
.dot--on::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--ok); opacity: 0.6; animation: ping 1s cubic-bezier(0, 0, 0.2, 1) infinite; }

/* a light sweep over the gold #1 plate now and then */
.ribbon--1::after { content: ""; position: absolute; inset: 0 auto 0 0; width: 40%; background: linear-gradient(90deg, transparent, rgb(255 255 255 / 0.45), transparent); animation: sheen 4.5s ease-in-out infinite; pointer-events: none; }

/* popovers open like the reference (fade + slight zoom) */
.info[open] .info__panel, .search__panel:not([hidden]), .mobile-nav:not([hidden]) { animation: pop 0.16s ease-out both; transform-origin: top right; }
.faq details[open] > p, .faq details[open] .faq__body { animation: rise 0.25s ease both; }
.info__tabs + div, [data-info-pane]:not([hidden]) { animation: fade 0.18s ease both; }

/* page load: the main blocks rise in one after another, rows of the leaderboard too */
.hero, .rank-card, .profile__head, .article > *, .lost { animation: rise 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.hero__top .top-list > li, .board > li, .column { animation: rise 0.42s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.top-list > li:nth-child(1) { animation-delay: 0.12s; } .top-list > li:nth-child(2) { animation-delay: 0.19s; } .top-list > li:nth-child(3) { animation-delay: 0.26s; }
.board > li:nth-child(1) { animation-delay: 0.08s; } .board > li:nth-child(2) { animation-delay: 0.12s; }
.board > li:nth-child(3) { animation-delay: 0.16s; } .board > li:nth-child(4) { animation-delay: 0.2s; }
.board > li:nth-child(5) { animation-delay: 0.24s; } .board > li:nth-child(6) { animation-delay: 0.28s; }
.board > li:nth-child(7) { animation-delay: 0.32s; } .board > li:nth-child(8) { animation-delay: 0.36s; }
.board > li:nth-child(n+9) { animation-delay: 0.4s; }
.column:nth-child(1) { animation-delay: 0.06s; } .column:nth-child(2) { animation-delay: 0.11s; } .column:nth-child(3) { animation-delay: 0.16s; }
.column:nth-child(4) { animation-delay: 0.21s; } .column:nth-child(5) { animation-delay: 0.26s; } .column:nth-child(6) { animation-delay: 0.31s; }
.article > :nth-child(2) { animation-delay: 0.05s; } .article > :nth-child(3) { animation-delay: 0.1s; } .article > :nth-child(n+4) { animation-delay: 0.15s; }
.profile__summary, .profile .table-wrap { animation: rise 0.5s 0.1s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
/* sections below the fold rise when they scroll into view (browsers that support scroll timelines) */
@supports (animation-timeline: view()) {
  .section, .tiles > li, .results > li, .spotlight > li, .numbers > div {
    animation: rise linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 40%;
  }
}

/* top loading bar while the next page loads */
.progress { position: fixed; top: 0; left: 0; z-index: 80; height: 3px; width: 0; background: var(--accent); box-shadow: 0 0 10px var(--accent), 0 0 5px var(--accent); animation: progress 6s cubic-bezier(0.1, 0.6, 0.2, 1) forwards; }
.progress.is-done { width: 100% !important; animation: none; opacity: 0; transition: width 0.2s ease, opacity 0.3s 0.2s ease; }

/* search loading spinner */
.search__state.is-loading { display: flex; align-items: center; gap: 10px; }
.search__state.is-loading::before { content: ""; width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--line-2); border-top-color: var(--accent); animation: spin 0.7s linear infinite; }

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