:root {
  --bg: #09090b;
  --surface: #111114;
  --surface-2: #17171b;
  --surface-3: #1f1f25;
  --line: rgba(255, 255, 255, 0.07);
  --line-strong: rgba(255, 255, 255, 0.13);
  --text: #ededf0;
  --muted: #8a8a95;
  --faint: #5c5c66;
  --accent: #e5484d;
  --accent-soft: rgba(229, 72, 77, 0.14);
  --win: #46c46b;
  --loss: #e5484d;
  --gold: #f5c542;
  --silver: #c9ced8;
  --bronze: #d6905a;
  --radius: 18px;
  --display: "Archivo Black", "Inter", system-ui, sans-serif;
  --header-h: 111px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 "Inter", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
img { display: block; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.w { color: var(--win); }
.l { color: var(--loss); }
.muted { color: var(--muted); }
.num { font-variant-numeric: tabular-nums; }

.wrap { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 32px; }

/* ----------------------------------------------------------------- header */
.top {
  position: sticky; top: 0; z-index: 20;
  background: rgba(9, 9, 11, 0.86); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.top-in { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(max-content, 1fr); align-items: center; gap: 20px; height: 66px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-size: 16px; line-height: 1.15; justify-self: start; }
.brand img { width: 34px; height: 34px; }
.brand small { display: block; font-family: "Inter", sans-serif; font-size: 10px; font-weight: 800; letter-spacing: 0.14em; color: var(--accent); }

.mode-seg, .seg { display: inline-flex; padding: 4px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); }
.mode-seg a, .seg a, .seg button {
  padding: 7px 18px; border-radius: 999px; border: 0; background: none; cursor: pointer;
  font-size: 13px; font-weight: 700; color: var(--muted);
}
.mode-seg a:hover, .seg a:hover, .seg button:hover { color: var(--text); }
.mode-seg a[aria-current="page"] { background: var(--accent); color: #fff; }
.seg button[aria-pressed="true"] { background: var(--surface-3); color: var(--text); }

.acts { justify-self: end; display: flex; align-items: center; gap: 8px; }
.region {
  appearance: none; -webkit-appearance: none; cursor: pointer;
  padding: 8px 28px 8px 14px; border-radius: 999px; border: 1px solid var(--line-strong);
  background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M0 0h10L5 6z' fill='%23ededf0'/%3E%3C/svg%3E") no-repeat right 12px center / 8px;
  color: var(--text); font: 600 13px "Inter", sans-serif;
}
.region option { background: var(--surface-2); }

/* Live ticker */
.ticker { border-top: 1px solid var(--line); overflow: hidden; font-size: 13px; }
.ticker-in { display: flex; align-items: center; gap: 18px; height: 44px; }
.live {
  flex: none; display: flex; align-items: center; gap: 8px; padding: 4px 11px; border-radius: 999px;
  background: var(--accent-soft); font-size: 11px; font-weight: 800; letter-spacing: 0.14em; color: var(--accent);
}
.live i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { opacity: 0.3; } }
.ticker-track {
  flex: 1; min-width: 0; overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 4%, #000 92%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 4%, #000 92%, transparent);
}
.ticker-row { display: flex; gap: 40px; width: max-content; }
.ticker-row.moving { animation: slide var(--dur, 50s) linear infinite; }
.ticker-track:hover .ticker-row { animation-play-state: paused; }
@keyframes slide { to { transform: translateX(-50%); } }
.tk { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; color: var(--muted); }
.tk a { font-weight: 800; text-transform: uppercase; letter-spacing: 0.02em; font-size: 12.5px; }
.tk a:hover { text-decoration: underline; }
.tk a.lose { opacity: 0.6; }
.tk .sl { width: 2px; height: 16px; border-radius: 2px; background: var(--accent); transform: rotate(20deg); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; border-radius: 12px; border: 1px solid var(--line-strong);
  background: var(--surface-2); font-size: 14px; font-weight: 600; cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.btn:hover { background: var(--surface-3); }
.btn-top { padding: 8px 14px; font-size: 13px; border-radius: 999px; background: transparent; white-space: nowrap; }
.btn-top.active { background: var(--surface-3); border-color: var(--line-strong); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: #d13d42; }
.btn-bnet { background: #148eff; border-color: #148eff; color: #fff; }
.btn-bnet:hover { background: #0a7ae0; }
.bnet-logo { width: 18px; height: 18px; fill: currentColor; flex: none; }
.btn-icon { font-size: 15px; line-height: 1; color: var(--accent); }

/* ------------------------------------------------------------------- main */
.main { padding-top: 28px; padding-bottom: 60px; min-height: 60vh; outline: none; }
.foot { padding: 28px 0 40px; border-top: 1px solid var(--line); font-size: 13px; color: var(--faint); }
.foot-in { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.foot nav { display: flex; gap: 20px; }
.foot a { color: var(--muted); font-weight: 600; }
.foot a:hover { color: var(--text); }

.kicker {
  margin: 0 0 6px; font-size: 12px; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--muted);
}
.kicker .dot { color: var(--accent); margin: 0 6px; }
.page-title {
  display: flex; align-items: center; gap: 14px;
  margin: 0 0 20px; font-family: var(--display); font-weight: 400;
  font-size: clamp(28px, 4vw, 44px); line-height: 1.05; text-transform: uppercase; letter-spacing: 0.01em;
}
.page-title > img { width: 48px; height: 48px; border-radius: 50%; flex: none; box-shadow: 0 0 0 2px var(--line-strong); }
.page-title .cicon { width: 52px; height: 52px; border-radius: 14px; margin: 0; }
.page-title .cicon .class-glyph { width: 32px; height: 32px; }

.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin: 52px 0 16px; flex-wrap: wrap; }
.section-head h2 { margin: 0; font-family: var(--display); font-weight: 400; font-size: 24px; text-transform: uppercase; }
.section-head .aside-note { font-size: 13px; color: var(--muted); }
.section-head:first-child { margin-top: 0; }

/* ------------------------------------------------------------------ stage */
.stage { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 16px; }
.champ, .runner {
  position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end;
  border: 1px solid var(--line); transition: border-color 0.2s;
}
.champ:hover, .runner:hover { border-color: var(--line-strong); }
.champ, .runner { isolation: isolate; } /* keeps .stage-bg's z-index inside the card */
/* Spec art from the in-game talent window, out of focus and shaded so the
   render and text stay on top. Oversized so the blur has no soft edges. */
.stage-bg {
  position: absolute; inset: -24px; z-index: -1; pointer-events: none;
  background: no-repeat 100% 40% / cover;
  filter: blur(2.5px) saturate(1.1) brightness(0.62);
  transition: transform 0.6s ease;
}
.stage-bg::after { /* dark on the text side, class tint behind the character */
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(0deg, rgba(9, 9, 11, 0.75), transparent 55%),
    linear-gradient(90deg, rgba(9, 9, 11, 0.9) 10%, rgba(9, 9, 11, 0.45) 55%, rgba(9, 9, 11, 0.1)),
    radial-gradient(60% 70% at 80% 45%, color-mix(in srgb, var(--cc) 18%, transparent), transparent 70%);
}
.champ:hover .stage-bg, .runner:hover .stage-bg { transform: scale(1.04); }
.champ {
  min-height: 400px; border-radius: 24px; padding: 34px 36px;
  background:
    radial-gradient(520px 420px at 78% 40%, color-mix(in srgb, var(--cc) 26%, transparent), transparent 70%),
    linear-gradient(180deg, var(--surface), var(--bg));
}
/* Blizzard's full-body render (transparent, 1600×1200, character in the middle
   filling ~47% of the height). This size + position fits head to feet in the card. */
.stage-render {
  position: absolute; top: 0; right: 0; bottom: 0; width: 50%;
  background: no-repeat 50% 60% / auto 200%;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 25%);
          mask-image: linear-gradient(90deg, transparent, #000 25%);
  pointer-events: none;
}
.champ .stage-render { width: 40%; right: 0; }
/* Runner cards are short, so tall races (Dracthyr, Tauren…) poked out the top.
   Smaller render, feet kept near the bottom edge, leaves headroom for all races. */
.runner .stage-render { background-size: auto 170%; background-position: 50% 56%; }
.crown {
  position: absolute; top: 28px; left: 36px; display: flex; align-items: center; gap: 10px;
  font-size: 12px; font-weight: 800; letter-spacing: 0.16em; color: var(--gold); text-transform: uppercase;
}
.crown i {
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(245, 197, 66, 0.12); font-style: normal; font-family: var(--display); font-size: 15px;
}
.champ-name {
  position: relative; margin: 0; font-family: var(--display); font-weight: 400;
  font-size: clamp(40px, 6vw, 84px); line-height: 0.9; text-transform: uppercase; overflow-wrap: anywhere;
}
.champ-meta { position: relative; display: flex; align-items: center; gap: 10px; margin: 12px 0 22px; color: var(--muted); font-size: 15px; }
.champ-meta img { width: 22px; height: 22px; border-radius: 50%; }
.champ-nums { position: relative; display: flex; gap: 34px; flex-wrap: wrap; align-items: flex-start; }
.big { display: block; font-family: var(--display); font-size: 44px; line-height: 1; }
.lbl { display: block; margin-top: 6px; font-size: 11px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }

.runners { display: grid; gap: 16px; grid-auto-rows: 1fr; }
.runner {
  border-radius: 24px; padding: 22px 24px; min-height: 150px;
  background: radial-gradient(300px 220px at 85% 50%, color-mix(in srgb, var(--cc) 20%, transparent), transparent 70%), var(--surface);
}
.runner .pos, .pos-outline {
  font-family: var(--display); line-height: 1; color: transparent; -webkit-text-stroke: 1.5px var(--pc, var(--faint));
}
.runner .pos { position: absolute; top: 18px; left: 24px; font-size: 40px; }
.runner h3 { position: relative; margin: 0; font-family: var(--display); font-weight: 400; font-size: 26px; text-transform: uppercase; overflow-wrap: anywhere; }
.runner p { position: relative; margin: 2px 0 0; font-size: 13px; color: var(--muted); }
.runner .rt { position: relative; margin-top: 10px; font-family: var(--display); font-size: 24px; }
.runner .rt span { font-family: "Inter", sans-serif; font-size: 11px; font-weight: 800; letter-spacing: 0.1em; margin-left: 6px; }
.runner.open { border-style: dashed; background: transparent; }
.runner.open h3 { color: var(--faint); }

/* ------------------------------------------------------------ class tiles */
.classgrid { display: grid; grid-template-columns: repeat(13, minmax(0, 1fr)); gap: 8px; }
.ctile {
  position: relative; padding: 14px 6px 12px; border-radius: 16px; text-align: center;
  background: var(--surface); border: 1px solid var(--line);
  transition: transform 0.15s, border-color 0.15s, background 0.15s;
}
.ctile::after { content: ""; position: absolute; left: 30%; right: 30%; bottom: 0; height: 3px; border-radius: 3px 3px 0 0; background: var(--cc); opacity: 0.8; }
.ctile:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--cc) 50%, transparent); background: color-mix(in srgb, var(--cc) 7%, var(--surface)); }
.ctile.active { border-color: var(--cc); background: color-mix(in srgb, var(--cc) 10%, var(--surface)); }
.ctile b { display: block; font-size: 12px; font-weight: 700; line-height: 1.2; min-height: 2.4em; }
.ctile span.top-rating { display: block; margin-top: 2px; font-size: 11px; color: var(--muted); }

/* Tinted class icon (style A). */
.cicon {
  display: grid; place-items: center; width: 42px; height: 42px; margin: 0 auto 8px; border-radius: 12px;
  color: var(--cc); background: color-mix(in srgb, var(--cc) 13%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--cc) 30%, transparent);
}
/* Blizzard class icon filling the same rounded tile, with the class-colour hairline on top. */
.cicon.blz { position: relative; overflow: hidden; background: none; }
.cicon.blz img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cicon.blz::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--cc) 45%, transparent); }
.class-glyph { width: 26px; height: 26px; fill: currentColor; }
.class-glyph .s { fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.class-glyph .s.thin { stroke-width: 1.2; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: -4px 0 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px 6px 6px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--line);
  font-size: 13px; font-weight: 600; color: var(--muted);
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.chip img { width: 22px; height: 22px; border-radius: 50%; }
.chip.no-icon { padding-left: 14px; }
.chip:hover { color: var(--text); border-color: var(--line-strong); }
.chip.active { background: var(--text); color: var(--bg); border-color: var(--text); }

/* ------------------------------------------------------ ladder + side col */
.duo { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 28px; align-items: start; margin-top: 52px; }
.duo .section-head { margin-top: 0; }
.side { position: sticky; top: calc(var(--header-h) + 20px); display: grid; gap: 16px; }

.search {
  width: 240px; max-width: 100%; min-width: 0;
  background: var(--surface); border: 1px solid var(--line); border-radius: 999px;
  padding: 8px 16px; color: var(--text); font-size: 13.5px;
}
.search::placeholder { color: var(--faint); }
.search:focus { outline: none; border-color: var(--line-strong); }
.ladder-note { margin: -4px 0 16px; font-size: 13px; color: var(--muted); }
.ladder-note .badge { margin: 0 4px 0 0; }

.ladder { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.ladder > li { list-style: none; }
.lrow {
  display: grid; grid-template-columns: 62px 44px minmax(0, 1fr) auto auto; gap: 16px; align-items: center;
  padding: 10px 20px 10px 8px; border-radius: 14px; transition: background 0.15s;
  animation: rise 0.35s ease both;
}
.lrow:hover { background: var(--surface); }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } }
.lrow .n { font-family: var(--display); font-size: 30px; line-height: 1; text-align: center; color: transparent; -webkit-text-stroke: 1px var(--faint); }
.lrow.t1 .n { -webkit-text-stroke-color: var(--gold); }
.lrow.t2 .n { -webkit-text-stroke-color: var(--silver); }
.lrow.t3 .n { -webkit-text-stroke-color: var(--bronze); }
.av { width: 44px; height: 44px; border-radius: 12px; object-fit: cover; background: var(--surface-3); flex: none; }
.lrow .nm { display: block; font-family: var(--display); font-size: 16px; text-transform: uppercase; letter-spacing: 0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lrow .sub { display: flex; gap: 6px; align-items: center; font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; }
.lrow .sub img { width: 15px; height: 15px; border-radius: 50%; }
.lrow .rec { font-size: 13px; text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }
.lrow .rt { font-family: var(--display); font-size: 20px; text-align: right; min-width: 64px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.lrow .rt small { display: block; font-family: "Inter", sans-serif; font-size: 10px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }

.more { display: flex; justify-content: center; margin-top: 18px; }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 20px; }
.panel h2 { display: flex; align-items: center; gap: 8px; margin: 0 0 4px; font-family: var(--display); font-weight: 400; font-size: 16px; text-transform: uppercase; }
.panel h2 i { font-style: normal; color: var(--win); }
.panel .sub2 { margin: 0 0 12px; font-size: 12.5px; color: var(--muted); }
.rise { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 11px 0; border-top: 1px solid var(--line); }
.rise:first-of-type { border-top: 0; }
.rise.top { margin: 0 -10px; padding: 12px 10px; border-radius: 14px; border-top: 0; background: rgba(70, 196, 107, 0.07); }
.rise + .rise.top, .rise.top + .rise { border-top: 0; }
.rise .av { width: 38px; height: 38px; border-radius: 11px; }
.rise b { display: block; font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rise small { display: block; font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rise small .to { color: var(--text); font-weight: 700; }
.gain { text-align: right; }
.gain strong { display: block; font-family: var(--display); font-weight: 400; font-size: 18px; color: var(--win); line-height: 1.1; }
.steps { display: flex; gap: 2px; justify-content: flex-end; margin-top: 4px; }
.steps i { width: 5px; height: 5px; border-radius: 1px; background: var(--win); }
.steps i.x { background: var(--loss); opacity: 0.8; }
.panel .empty-note { margin: 8px 0 4px; font-size: 13px; color: var(--muted); }

.appcard { padding: 20px; border-radius: 22px; background: linear-gradient(135deg, rgba(229, 72, 77, 0.22), rgba(229, 72, 77, 0.04)); border: 1px solid rgba(229, 72, 77, 0.35); }
.appcard b { display: block; font-family: var(--display); font-weight: 400; font-size: 17px; text-transform: uppercase; }
.appcard p { margin: 6px 0 14px; font-size: 13px; color: var(--muted); }

.empty {
  padding: 56px 20px; text-align: center; color: var(--muted);
  background: var(--surface); border: 1px dashed var(--line-strong); border-radius: var(--radius);
}
.empty strong { display: block; color: var(--text); font-size: 17px; margin-bottom: 6px; }
.skeleton { height: 64px; border-radius: 14px; background: linear-gradient(90deg, var(--surface) 0%, var(--surface-2) 50%, var(--surface) 100%); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.demo-banner { margin: 0 0 18px; padding: 10px 14px; border-radius: 12px; background: var(--accent-soft); border: 1px solid rgba(229, 72, 77, 0.35); font-size: 13px; }

/* ------------------------------------------------------- spec meta (build) */
.spec-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.spec-card {
  display: flex; align-items: center; gap: 14px; padding: 18px 20px; border-radius: 18px;
  background: radial-gradient(260px 140px at 0% 50%, color-mix(in srgb, var(--cc) 14%, transparent), transparent 70%), var(--surface);
  border: 1px solid var(--line); transition: transform 0.15s, border-color 0.15s;
}
.spec-card:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--cc) 50%, transparent); }
.spec-card img { width: 48px; height: 48px; border-radius: 12px; flex: none; }
.spec-card b { display: block; font-family: var(--display); font-weight: 400; font-size: 18px; text-transform: uppercase; }
.spec-card small { color: var(--muted); font-size: 12.5px; }
.spec-card .go { margin-left: auto; font-size: 13px; font-weight: 700; color: var(--accent); white-space: nowrap; }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 8px 0 0; }
.kpi { padding: 16px 18px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.kpi strong { display: block; font-family: var(--display); font-weight: 400; font-size: 24px; line-height: 1.15; }
.kpi span { font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }

.jump { position: sticky; top: var(--header-h); z-index: 10; display: flex; gap: 6px; padding: 14px 0; margin-top: 16px; background: linear-gradient(var(--bg) 80%, transparent); overflow-x: auto; }
.jump a { padding: 7px 15px; border-radius: 999px; border: 1px solid var(--line); font-size: 13px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.jump a:hover { color: var(--text); border-color: var(--line-strong); }
.meta-section { scroll-margin-top: calc(var(--header-h) + 70px); }
.meta-note { margin: -8px 0 16px; font-size: 13px; color: var(--muted); }

.statbar { display: flex; height: 16px; border-radius: 999px; overflow: hidden; gap: 3px; }
.statbar i { display: block; height: 100%; }
.statkeys { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.statkeys div { padding-left: 12px; border-left: 3px solid var(--k); }
.statkeys b { display: block; font-family: var(--display); font-weight: 400; font-size: 22px; }
.statkeys span { font-size: 13px; color: var(--muted); }

.loadout { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.lcard { padding: 16px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); min-width: 0; }
.lcard .slot { font-size: 11px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); }
.pick { display: flex; gap: 12px; align-items: center; margin: 10px 0 0; }
.pick img, .pick .noimg { width: 48px; height: 48px; border-radius: 10px; border: 2px solid var(--q, #a335ee); flex: none; background: var(--surface-3); }
.pick b { display: block; font-size: 14px; line-height: 1.25; color: var(--q, var(--text)); }
.pick small { font-size: 12.5px; color: var(--muted); }
.pick small em { font-style: normal; color: var(--accent); font-weight: 800; }
.alts { display: flex; gap: 6px; padding-top: 12px; margin-top: 12px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.alt { display: flex; align-items: center; gap: 6px; padding: 3px 9px 3px 3px; border-radius: 999px; background: var(--surface-2); font-size: 12px; font-weight: 700; color: var(--muted); cursor: help; }
.alt img { width: 22px; height: 22px; border-radius: 50%; }
.chipt { display: inline-block; margin-left: 6px; padding: 1px 6px; border-radius: 4px; background: var(--surface-3); font-size: 10px; font-weight: 800; letter-spacing: 0.06em; color: var(--muted); vertical-align: 1px; text-transform: uppercase; }

.tri { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; align-items: start; }
.tcard { padding: 20px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); min-width: 0; }
.tcard h3 { margin: 0 0 12px; font-family: var(--display); font-weight: 400; font-size: 15px; text-transform: uppercase; }
.rankitem { display: grid; grid-template-columns: 18px 32px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 7px 0; font-size: 13.5px; }
.rankitem i { font-style: normal; font-weight: 800; color: var(--faint); font-size: 12px; }
.rankitem img, .rankitem .noimg { width: 32px; height: 32px; border-radius: 8px; background: var(--surface-3); }
.rankitem span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rankitem b { font-weight: 800; }
.rankitem:first-of-type b { color: var(--accent); }
.rankitem small { display: block; font-size: 11px; color: var(--faint); font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.tcard .empty-note { margin: 0; font-size: 13px; color: var(--muted); }

.herosplit { display: flex; height: 44px; border-radius: 12px; overflow: hidden; margin-bottom: 22px; font-size: 13px; font-weight: 700; background: var(--surface-3); }
.herosplit div { display: flex; align-items: center; gap: 8px; padding: 0 14px; white-space: nowrap; overflow: hidden; }
.herosplit div:first-child { background: var(--accent); color: #fff; }
.herosplit div + div { justify-content: flex-end; }
.tabs2 { display: flex; gap: 6px; margin-bottom: 18px; flex-wrap: wrap; }
.tabs2 button { padding: 6px 14px; border-radius: 10px; border: 0; font-size: 13px; font-weight: 700; color: var(--muted); background: var(--surface); cursor: pointer; }
.tabs2 button[aria-pressed="true"] { background: var(--surface-3); color: var(--text); }
.ring-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 16px 8px; }
.ring { text-align: center; font-size: 11.5px; color: var(--muted); }
.ring .r { position: relative; width: 58px; height: 58px; margin: 0 auto 6px; border-radius: 50%; background: conic-gradient(var(--accent) calc(var(--p) * 1%), var(--surface-3) 0); display: grid; place-items: center; }
.ring .r img, .ring .r .noimg { width: 48px; height: 48px; border-radius: 50%; border: 3px solid var(--bg); background: var(--surface-3); }
.ring.low .r img { filter: grayscale(1) brightness(0.6); }
.ring b { display: block; color: var(--text); font-size: 13px; }
.ring span { display: block; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.legend { display: flex; gap: 18px; font-size: 12.5px; color: var(--muted); margin: -6px 0 16px; flex-wrap: wrap; }

@media (max-width: 1100px) {
  .loadout, .tri { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
  .kpis, .statkeys { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .loadout, .tri { grid-template-columns: minmax(0, 1fr); }
}

/* ------------------------------------------------------ talent trees (game layout) */
.trees { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.trees.hero-trees { margin-top: 16px; }
.tree-card { padding: 20px 22px 24px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); min-width: 0; }
.tree-card h3 { display: flex; align-items: center; gap: 10px; margin: 0 0 18px; font-family: var(--display); font-weight: 400; font-size: 15px; text-transform: uppercase; }
.tree-card h3 small { margin-left: auto; font-family: "Inter", sans-serif; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: none; }
.tree-card.dim { opacity: 0.55; }
.tree { --node: 40px; position: relative; margin: 0 auto; }
.tnode {
  position: absolute; width: var(--node); height: var(--node); transform: translate(-50%, 0);
  display: grid; place-items: center; cursor: help;
}
.tnode .ic {
  width: 100%; height: 100%; overflow: hidden; background: var(--surface-3);
  border-radius: 10px; box-shadow: 0 0 0 2px var(--surface-3);
  filter: grayscale(1) brightness(0.45); opacity: 0.55; transition: filter 0.15s, opacity 0.15s;
}
.tnode .ic img { width: 100%; height: 100%; object-fit: cover; }
.tnode.passive .ic { border-radius: 50%; }
.tnode.choice .ic { border-radius: 0; clip-path: polygon(30% 0, 70% 0, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0 70%, 0 30%); }
.tnode.on .ic { filter: none; opacity: 1; box-shadow: 0 0 0 2px var(--accent), 0 0 14px rgba(229, 72, 77, 0.35); }
.tnode.choice.on .ic { box-shadow: none; outline: 2px solid var(--accent); outline-offset: -2px; }
.tnode.mid .ic { filter: none; opacity: 0.9; box-shadow: 0 0 0 2px #f08a8d; }
.tnode.low .ic { filter: grayscale(0.5); opacity: 0.7; box-shadow: 0 0 0 2px var(--line-strong); }
.tnode:hover .ic { filter: none; opacity: 1; }
.tnode .badge-n {
  position: absolute; right: -6px; bottom: -6px; min-width: 18px; padding: 0 4px; border-radius: 6px;
  background: var(--bg); border: 1px solid var(--line-strong); font: 800 10px/16px "Inter", sans-serif; text-align: center; color: var(--text);
}
.tnode.on .badge-n { border-color: var(--accent); }
.tnode.choice .swap { position: absolute; top: -7px; left: 50%; transform: translateX(-50%); font-size: 9px; color: var(--muted); letter-spacing: 1px; }
.tree-legend { display: flex; gap: 18px; flex-wrap: wrap; margin: -6px 0 16px; font-size: 12.5px; color: var(--muted); }
.tree-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 4px; margin-right: 6px; vertical-align: -2px; }
.pvp-row { margin-top: 16px; }

@media (max-width: 1100px) { .trees { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 520px) { .tree { --node: 30px; } .tnode .badge-n { font-size: 9px; min-width: 15px; line-height: 14px; } }

/* ------------------------------------------------------------ player page */
.profile-nums {
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-top: -8px;
}
.profile-nums > div { padding: 18px 20px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); min-width: 0; }
.profile-nums .big { font-size: 34px; white-space: nowrap; }
.mini-nums { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 4px 0 12px; }
.mini-nums > div { padding: 10px 12px; border-radius: 12px; background: var(--surface-2); min-width: 0; }
.mini-nums > div:nth-child(3) { grid-column: 1 / -1; }
.mini-nums strong { display: block; font-family: var(--display); font-weight: 400; font-size: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-nums > div > span { font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.panel h2 .badge { margin-left: 4px; }
.bracket { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); }
.bracket:first-child { border-top: 0; }
.bracket b { display: block; font-size: 13.5px; }
.bracket small { font-size: 12px; color: var(--muted); }
.bracket strong { font-family: var(--display); font-weight: 400; font-size: 22px; }
.history.compact li { grid-template-columns: 28px minmax(0, 1fr); }
.gear-cards .pick { margin-top: 8px; }
.gear-cards .pick img, .gear-cards .pick .noimg { width: 42px; height: 42px; }
.gear-cards .gear-extra { display: block; color: #1eff00; opacity: 0.85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lcard .slot .ilvl { float: right; color: var(--muted); letter-spacing: 0; }
.rankitem.no-rank { grid-template-columns: 32px minmax(0, 1fr) auto; }
.gear-cards .pick small em { color: var(--text); font-weight: 700; }
.ring.full .r { background: color-mix(in srgb, var(--accent) 55%, var(--surface-3)); }
.ring .talent-rank { display: block; }

@media (max-width: 1100px) { .profile-nums { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 820px) {
  .profile-nums { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .profile-nums .big { font-size: 26px; }
  .profile-nums > div:last-child { grid-column: 1 / -1; }
}

/* ---------------------------------------------------------- my duels page */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; margin-bottom: 16px; }
.card h2 { margin: 0 0 12px; font-family: var(--display); font-weight: 400; font-size: 16px; text-transform: uppercase; letter-spacing: 0.03em; }
.main.narrow-page { max-width: 900px; }
.sync-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 2px; }
.hint { margin: 12px 0 0; font-size: 13px; }
.manual { margin: 4px 0 16px; }
.manual summary { cursor: pointer; padding: 6px 2px; font-size: 13.5px; color: var(--muted); }
.manual summary:hover { color: var(--text); }
.manual[open] summary { margin-bottom: 10px; }
.who-text { min-width: 0; }
.who-name { display: block; font-family: var(--display); font-size: 17px; letter-spacing: 0.02em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who-realm { display: block; font-size: 14px; }
.score { text-align: right; }
.score-rating { display: block; font-family: var(--display); font-size: 22px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.score-record { display: block; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.my-chars { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.my-char {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px 12px; text-align: left; cursor: pointer;
  font: inherit; color: inherit; background: var(--surface-2); border: 1px solid transparent; border-radius: 12px;
  transition: border-color 0.15s, background 0.15s;
}
.my-char:hover { background: var(--surface-3); }
.my-char.active { border-color: var(--line-strong); background: var(--surface-3); }
.my-chars .who-text { flex: 1; }

/* Showcase: full character model left, ratings + duel history right. */
.me-show { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 20px; align-items: stretch; margin-bottom: 16px; }
.me-skel { grid-column: 1 / -1; height: 600px; border-radius: 24px; }
.me-model {
  position: relative; overflow: hidden; min-height: 600px; border-radius: 24px; border: 1px solid var(--line);
  background:
    radial-gradient(60% 45% at 50% 42%, color-mix(in srgb, var(--glow) 26%, transparent), transparent 72%),
    linear-gradient(180deg, var(--surface-2), var(--surface));
}
.me-model > img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  /* Blizzard's main-raw has lots of empty space: grow it so the head sits near the top, feet above the name. */
  object-fit: cover; object-position: 50% 50%; transform: scale(1.42); transform-origin: 50% 97%;
}
.me-model-empty { position: absolute; inset: 0; display: grid; place-items: center; padding: 20px; text-align: center; font-size: 14px; }
.me-model-name {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 60px 24px 22px;
  background: linear-gradient(180deg, transparent, rgba(9, 9, 11, 0.92) 55%);
}
.me-model-name .page-title { display: block; margin: 0 0 6px; font-size: clamp(26px, 3vw, 38px); overflow-wrap: anywhere; }
.me-model-name .page-title:hover { text-decoration: underline; }
.me-model-name span { display: block; font-size: 15px; font-weight: 600; }
.me-model-name small { display: block; margin-top: 2px; font-size: 13px; color: var(--muted); }
.me-right { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.me-ratings { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.me-rating { padding: 18px 18px 16px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); min-width: 0; }
.me-rating.duel { grid-column: 1 / -1; background: linear-gradient(135deg, rgba(229, 72, 77, 0.14), var(--surface) 60%); border-color: rgba(229, 72, 77, 0.3); }
.me-rating .lbl { display: block; font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.me-rating .big { margin: 8px 0 6px; font-size: 34px; white-space: nowrap; }
.me-rating.duel .big { font-size: 48px; }
.me-rating .sub { display: block; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.me-history { flex: 1; }
.me-history h2 .aside-note { margin-left: auto; font-family: "Inter", sans-serif; font-size: 13px; text-transform: none; color: var(--muted); }
.me-more { display: inline-block; margin-top: 12px; font-size: 13.5px; color: var(--muted); }
.me-more:hover { color: var(--text); }
@media (max-width: 820px) {
  .me-show { grid-template-columns: minmax(0, 1fr); }
  .me-model { min-height: 460px; }
  .me-rating { padding: 14px; }
  .me-rating .big { font-size: 26px; }
  .me-rating.duel .big { font-size: 38px; }
}
.my-chars img { width: 36px; height: 36px; border-radius: 10px; }
.pending { display: inline-block; margin-top: 12px; font-size: 13px; color: var(--gold); }
.drop {
  display: block; padding: 34px 20px; text-align: center; cursor: pointer;
  border: 1.5px dashed var(--line-strong); border-radius: var(--radius); background: var(--surface-2);
  transition: border-color 0.15s, background 0.15s;
}
.drop:hover, .drop.over { border-color: var(--accent); background: var(--accent-soft); }
.drop input { display: none; }
.drop strong { display: block; font-size: 16px; margin-bottom: 4px; }
.path { display: block; margin-top: 12px; font: 12px ui-monospace, Consolas, monospace; color: var(--muted); word-break: break-all; }
.result { margin-top: 14px; padding: 12px 14px; border-radius: 12px; font-size: 14px; }
.result.ok { background: rgba(70, 196, 107, 0.1); border: 1px solid rgba(70, 196, 107, 0.35); }
.result.err { background: var(--accent-soft); border: 1px solid rgba(229, 72, 77, 0.35); }
.result ul { margin: 6px 0 0; padding-left: 18px; }

/* ----------------------------------------------------------- profile page */
.history a.who-name:hover { text-decoration: underline; }
.profile-hero {
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: 260px minmax(0, 1fr); align-items: end; gap: 24px;
  min-height: 300px; padding: 28px 28px 30px; margin-bottom: 28px;
  background:
    radial-gradient(420px 320px at 130px 60%, color-mix(in srgb, var(--glow) 22%, transparent), transparent 70%),
    var(--surface);
  border: 1px solid var(--line); border-radius: 24px;
  isolation: isolate;
}
/* Render is on the left here, so mirror the spec art (and its shading) to match. */
/* Stretched wide here, so the art gets soft: blur it more than the podium cards. */
.profile-hero .stage-bg { transform: scaleX(-1); background-position: 100% 30%; filter: blur(7px) saturate(1.1) brightness(0.62); }
.profile-hero .stage-bg::after { /* wide card: lighter shading than the podium, or half of it goes black */
  background:
    linear-gradient(0deg, rgba(9, 9, 11, 0.6), transparent 50%),
    linear-gradient(90deg, rgba(9, 9, 11, 0.7), rgba(9, 9, 11, 0.4) 50%, rgba(9, 9, 11, 0.1)),
    radial-gradient(40% 80% at 85% 50%, color-mix(in srgb, var(--cc) 16%, transparent), transparent 70%);
}
/* Blizzard's full-body render has lots of empty space around the character,
   so zoom in on the middle of it. */
.hero-render {
  width: 100%; height: 340px; margin: -28px 0 -30px; object-fit: cover; object-position: center 35%;
  transform: scale(1.9); transform-origin: 50% 38%;
  -webkit-mask-image: linear-gradient(180deg, #000 75%, transparent);
          mask-image: linear-gradient(180deg, #000 75%, transparent);
}
.hero-inset { height: auto; margin: 0; border-radius: 14px; transform: none; }
.hero-text { min-width: 0; padding-bottom: 4px; }
.profile-name { margin-bottom: 6px; overflow-wrap: anywhere; }
.hero-line { margin: 0; font-size: 17px; font-weight: 600; }
.hero-guild { margin: 2px 0 0; color: var(--muted); }
.hero-meta { margin: 10px 0 0; color: var(--muted); font-size: 14px; }

.section-title {
  margin: 30px 0 12px; font-family: var(--display); font-weight: 400; font-size: 18px;
  text-transform: uppercase; letter-spacing: 0.03em;
}
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; margin-bottom: 16px; }
.tile { display: flex; flex-direction: column; gap: 2px; padding: 16px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; }
.tile-label { font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.tile-value { font-size: 28px; font-weight: 700; line-height: 1.2; }
.tile-sub { font-size: 13px; color: var(--muted); }

.chart { position: relative; min-height: 60px; }
.chart svg { display: block; width: 100%; height: auto; touch-action: none; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .tick { fill: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.chart .line { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .area { fill: var(--accent); opacity: 0.1; }
.chart .dot { fill: var(--accent); stroke: var(--surface); stroke-width: 2; }
.chart .cross { stroke: var(--line-strong); stroke-width: 1; }
.chart-tip {
  position: absolute; top: 0; transform: translateX(-50%); pointer-events: none;
  display: flex; flex-direction: column; gap: 1px; padding: 8px 10px; min-width: 130px;
  background: var(--surface-3); border: 1px solid var(--line-strong); border-radius: 10px;
  font-size: 12px; white-space: nowrap;
}
.chart-tip strong { font-size: 15px; }
.chart-tip[hidden] { display: none; }

.two-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.two-col .card { margin-bottom: 0; }
.card-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.card-head h2 { margin: 0; }
.card-actions { display: flex; gap: 8px; }
.card-actions .btn { padding: 7px 12px; font-size: 13px; }

.gear { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.gear li { display: flex; gap: 12px; align-items: center; }
.gear img { width: 40px; height: 40px; border-radius: 8px; border: 2px solid; flex: none; }
.gear-text { display: flex; flex-direction: column; min-width: 0; }
.gear-name { font-weight: 600; font-size: 14px; }
.gear-sub { font-size: 12px; color: var(--muted); }
.gear-extra { font-size: 12px; color: #1eff00; opacity: 0.85; }

.talent-group { border-top: 1px solid var(--line); padding: 10px 0 4px; }
.talent-group summary { cursor: pointer; font-weight: 700; font-size: 13px; color: var(--muted); letter-spacing: 0.04em; text-transform: uppercase; }
.talent-group[open] summary { margin-bottom: 10px; }
.talents { display: flex; flex-wrap: wrap; gap: 6px; }
.talent { display: inline-flex; align-items: center; gap: 7px; padding: 3px 10px 3px 3px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; font-size: 12.5px; }
.talent img, .talent-noicon { width: 24px; height: 24px; border-radius: 50%; flex: none; background: var(--surface-3); }
.talent-rank { color: var(--muted); font-size: 11px; }

.history { list-style: none; margin: 0; padding: 0; }
.history li {
  display: grid; grid-template-columns: 28px 26px minmax(0, 1fr) 48px 56px; gap: 10px; align-items: center;
  padding: 9px 4px; border-bottom: 1px solid var(--line); font-size: 14px;
}
.history li:last-child { border-bottom: 0; }
.history img { width: 26px; height: 26px; border-radius: 50%; }
.history .who-name { display: inline; font-size: 14px; }
.history .meta { display: block; font-size: 12px; color: var(--muted); }
.result-badge { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; font-weight: 800; font-size: 12px; }
.result-badge.won { background: rgba(70, 196, 107, 0.15); color: var(--win); }
.result-badge.lost { background: var(--accent-soft); color: var(--loss); }
.history-delta, .history-rating { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.history-rating { color: var(--muted); }
.badge {
  display: inline-block; vertical-align: middle; margin-left: 6px; padding: 2px 8px; border-radius: 999px;
  font-family: "Inter", sans-serif; font-size: 11px; font-weight: 700; letter-spacing: 0.06em;
  color: var(--muted); border: 1px solid var(--line-strong); cursor: help;
}

/* ------------------------------------------------------------ breakpoints */
@media (max-width: 1100px) {
  .classgrid { grid-template-columns: repeat(7, minmax(0, 1fr)); }
  .duo { grid-template-columns: minmax(0, 1fr); }
  .side { position: static; }
  .two-col { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 820px) {
  :root { --header-h: 104px; }
  .wrap { padding: 0 16px; }
  .top-in { grid-template-columns: auto 1fr; height: 60px; gap: 10px; }
  .brand { font-size: 14px; }
  .brand img { width: 30px; height: 30px; }
  .top .mode-seg { display: none; }
  .acts .hide-sm { display: none; }
  .btn-bnet .bnet-text { display: none; }
  .stage { grid-template-columns: minmax(0, 1fr); }
  .runners { grid-template-columns: 1fr 1fr; }
  .champ { min-height: 320px; padding: 26px 22px; }
  .crown { left: 22px; top: 22px; }
  .big { font-size: 30px; }
  .champ-nums { gap: 22px; }
  .classgrid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .lrow { grid-template-columns: 40px 38px minmax(0, 1fr) auto; gap: 10px; padding-right: 8px; }
  .lrow .rec { display: none; }
  .lrow .n { font-size: 22px; }
  .lrow .av { width: 38px; height: 38px; }
  .search { width: 100%; }
  .profile-hero { grid-template-columns: minmax(0, 1fr); padding: 20px; min-height: 0; }
  .hero-render { height: 260px; margin: -20px 0 0; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tile-value { font-size: 22px; }
  .history li { grid-template-columns: 26px minmax(0, 1fr) 44px 48px; }
  .history li > img, .history li > span:nth-child(2):empty { display: none; }
}
@media (max-width: 520px) {
  .runners { grid-template-columns: minmax(0, 1fr); }
  .runner { padding-top: 64px; }
  .runner .pos { font-size: 32px; }
  .brand > span { display: none; } /* logo only; the header needs the room */
  .acts { gap: 6px; }
  .region { padding-left: 12px; }
}
@media (max-width: 820px) {
  .top-in { grid-template-columns: auto minmax(0, 1fr); }
  .acts { min-width: 0; }
  .champ .stage-render { opacity: 0.45; width: 80%; }
  .side > .section-head { display: none; }
}
body { overflow-x: clip; }
/* The Ranked/Skirmish switch moves into the page on phones. */
.mode-seg-page { display: none; margin-bottom: 18px; }
@media (max-width: 820px) { .mode-seg-page { display: inline-flex; } }

/* ------------------------------------------------------ how it works page */
.info-link {
  display: inline-grid; place-items: center; width: 22px; height: 22px; margin-left: 8px; vertical-align: 3px;
  border-radius: 50%; border: 1px solid var(--line-strong); color: var(--muted);
  font-family: "Inter", sans-serif; font-size: 13px; line-height: 1;
}
.info-link:hover { color: var(--text); border-color: var(--muted); }
.link { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.rules-lead { margin: -8px 0 32px; max-width: 640px; font-size: 16px; color: var(--muted); }
.rules { display: grid; grid-template-columns: 210px minmax(0, 760px); gap: 48px; align-items: start; }
.rules-toc { position: sticky; top: calc(var(--header-h) + 24px); display: flex; flex-direction: column; gap: 2px; }
.rules-toc a { padding: 7px 12px; border-radius: 10px; font-size: 13.5px; font-weight: 600; color: var(--muted); }
.rules-toc a:hover { background: var(--surface); color: var(--text); }
.rules-sec { padding: 28px 0; border-top: 1px solid var(--line); scroll-margin-top: calc(var(--header-h) + 16px); }
.rules-sec:first-child { padding-top: 0; border-top: 0; }
.rules-sec h2 { margin: 0 0 12px; font-family: var(--display); font-weight: 400; font-size: 22px; text-transform: uppercase; }
.rules-sec p { margin: 0 0 12px; line-height: 1.65; }
.rules-sec strong { color: var(--text); font-weight: 700; }
.rules-list { margin: 0 0 14px; padding-left: 20px; line-height: 1.65; }
.rules-list li { margin: 4px 0; }
.rules-list li::marker { color: var(--accent); }
.rules-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.rules-card { padding: 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.rules-card > b { display: block; margin-bottom: 6px; font-family: var(--display); font-weight: 400; font-size: 16px; text-transform: uppercase; }
.rules-card p { margin: 0; font-size: 14px; color: var(--muted); }
.rules-steps { list-style: none; margin: 0 0 16px; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.rules-steps li { padding: 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.rules-steps b { display: block; margin: 10px 0 4px; font-weight: 800; text-transform: uppercase; font-size: 13px; letter-spacing: 0.04em; }
.rules-steps p { margin: 0; font-size: 13px; line-height: 1.5; color: var(--muted); }
.rules-step-n { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: #fff; font-weight: 800; font-size: 13px; }
.rules-table { overflow-x: auto; margin: 4px 0 16px; border: 1px solid var(--line); border-radius: 14px; }
.rules-table table { width: 100%; border-collapse: collapse; font-size: 14px; }
.rules-table th, .rules-table td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
.rules-table th { font-size: 11.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); background: var(--surface); }
.rules-table tr:last-child td { border-bottom: 0; }
.rules-table td:not(:first-child) { font-weight: 700; font-variant-numeric: tabular-nums; }
.rules-decay { display: grid; gap: 6px; margin: 4px 0 16px; }
.rules-decay span {
  width: var(--w); min-width: 64px; padding: 5px 10px; border-radius: 8px;
  background: var(--accent-soft); color: var(--text); font-size: 12.5px; font-weight: 700; font-variant-numeric: tabular-nums;
}
.rules-titles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 4px 0 16px; }
.rules-title { padding: 14px 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--tc); }
.rules-title b { display: block; color: var(--tc); font-weight: 800; text-transform: uppercase; letter-spacing: 0.03em; }
.rules-title span { font-size: 13px; color: var(--muted); }
.rules-faq details { border-bottom: 1px solid var(--line); }
.rules-faq summary { padding: 14px 0; cursor: pointer; font-weight: 700; }
.rules-faq summary::marker { color: var(--accent); }
.rules-faq details p { margin: -4px 0 14px; color: var(--muted); }
@media (max-width: 1100px) { .rules-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 820px) {
  .rules { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .rules-toc {
    top: var(--header-h); z-index: 5; flex-direction: row; overflow-x: auto; margin: 0 -16px; padding: 8px 16px;
    background: rgba(9, 9, 11, 0.92); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); scrollbar-width: none;
  }
  .rules-toc a { flex: none; background: var(--surface); border-radius: 999px; font-size: 12.5px; }
  .rules-sec { scroll-margin-top: calc(var(--header-h) + 64px); }
  .rules-cards, .rules-titles { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 520px) { .rules-steps { grid-template-columns: minmax(0, 1fr); } }

/* ------------------------------------------------------------ past seasons */
.past-seasons { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 14px; }
.past-head { font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-right: 4px; }
.past-season {
  display: inline-flex; align-items: baseline; gap: 8px; padding: 9px 14px; border-radius: 14px; font-size: 13px;
  background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--tc);
}
.past-season b { font-family: var(--display); font-weight: 400; font-size: 17px; }
.past-title { color: var(--tc); font-weight: 800; text-transform: uppercase; font-size: 11.5px; letter-spacing: 0.04em; }

/* ------------------------------------------------ anti-cheat + staff tools */
.banned-tag {
  display: inline-block; margin: 4px 0 8px; padding: 4px 12px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent); font-size: 12px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase;
}
.banned-card { border-color: rgba(229, 72, 77, 0.45); }
.flag-note {
  margin: 14px 0 0; padding: 12px 16px; border-radius: 14px; font-size: 13.5px; color: var(--muted);
  background: rgba(245, 197, 66, 0.07); border: 1px solid rgba(245, 197, 66, 0.3);
}
.flag-note b { color: var(--gold); }
.badge.ban { color: var(--accent); border-color: rgba(229, 72, 77, 0.5); cursor: default; }
.staff-foot { margin-top: 40px; text-align: center; }
.staff-link { border: 0; background: none; cursor: pointer; font-size: 12px; color: var(--faint); }
.staff-link:hover { color: var(--muted); text-decoration: underline; }
.staff-dialog {
  width: min(380px, calc(100vw - 32px)); padding: 22px; border-radius: 20px;
  background: var(--surface); color: var(--text); border: 1px solid var(--line-strong);
}
.staff-dialog::backdrop { background: rgba(0, 0, 0, 0.6); }
.staff-dialog h2 { margin: 0 0 6px; font-family: var(--display); font-weight: 400; font-size: 18px; text-transform: uppercase; }
.staff-dialog p { margin: 0 0 18px; font-size: 13.5px; }
.staff-dialog-btns { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.staff-warn { color: var(--gold); font-weight: 800; }
.staff-season p { margin: 0 0 12px; }
.staff-label { display: block; margin-bottom: 12px; font-size: 12px; font-weight: 700; color: var(--muted); }
.staff-label .search { display: block; width: 100%; margin-top: 6px; }
.staff-dialog .flag-note { margin: 0 0 16px; }
.staff-table { overflow-x: auto; margin-top: 14px; border: 1px solid var(--line); border-radius: 14px; }
.staff-table table { width: 100%; border-collapse: collapse; font-size: 13px; }
.staff-table th, .staff-table td { padding: 9px 12px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
.staff-table th {
  position: sticky; top: 0; background: var(--surface); font-size: 11px; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted);
}
.staff-table th[title] { cursor: help; text-decoration: underline dotted; text-underline-offset: 3px; }
.staff-table tr:last-child td { border-bottom: 0; }
.staff-table tbody tr:hover { background: var(--surface); }
.staff-table tr.is-banned { opacity: 0.55; }
.staff-name { font-weight: 700; }
.staff-name small { margin-left: 6px; font-size: 10px; font-weight: 800; color: var(--faint); }
.staff-top { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.staff-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.staff-facts > div { padding: 14px 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.staff-facts span { display: block; font-size: 11.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.staff-facts b { font-size: 14px; }
.staff-ban h2 { margin-top: 0; }
.staff-ban .region { width: 100%; margin: 8px 0 12px; }
.staff-reason {
  width: 100%; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line-strong);
  background: var(--surface-2); color: var(--text); font: 14px/1.4 "Inter", sans-serif; resize: vertical;
}
@media (max-width: 820px) {
  .staff-top, .staff-facts { grid-template-columns: minmax(0, 1fr); }
}

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