/* Base, layout and components. Plain CSS on the tokens; no framework.
   Air between blocks, rules instead of boxes, figures with tabular digits;
   labels are plain sentences, never letter-spaced capitals. */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font: 400 var(--step-0)/1.5 var(--font-sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible, input:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 2px;
  border-radius: var(--radius-s);
}
img { display: block; max-width: 100%; }
button, input { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; }

/* Type roles */
.display { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.015em; line-height: 1.02; }
.h1 { font-size: var(--step-4); }
.h2 { font-size: var(--step-3); }
.h3 { font-size: var(--step-2); letter-spacing: -0.02em; }
.label { font: 500 var(--step--1)/1.3 var(--font-sans); color: var(--muted); }
/* Labels and column heads start with a capital, as Russian interface text does. */
div.label::first-letter, .table th::first-letter { text-transform: uppercase; }
.muted { color: var(--muted); }
.mono { font-family: var(--font-mono); font-size: max(var(--step--2), 0.92em); }
.num { font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; }
.strong { font-weight: 600; }

/* Layout */
.shell { max-width: var(--page); margin: 0 auto; padding: 0 var(--space-5); }
@media (max-width: 620px) { .shell { padding: 0 var(--space-4); } }
.topbar {
  height: 56px; position: sticky; top: 0; z-index: 40;
  /* An opaque bar: a backdrop blur repaints on every scrolled frame. */
  background: color-mix(in oklab, var(--bg) 96%, var(--ink));
  border-bottom: 1px solid var(--rule);
}
.topbar .shell { display: flex; align-items: center; gap: var(--space-5); height: 56px; }
.brand { display: flex; align-items: center; gap: 10px; font: 600 var(--step-0)/1 var(--font-display); letter-spacing: -0.01em; }
.brand-mark { width: 18px; height: 18px; border-radius: 5px; background: var(--ink); position: relative; flex: none; }
.brand-mark::after { content: ""; position: absolute; inset: 5px 5px auto auto; width: 4px; height: 4px; border-radius: 1px; background: var(--signal); }
.brand-tag { font: 500 var(--step--1)/1.3 var(--font-sans); color: var(--muted); max-width: 22ch; }
.nav { display: flex; gap: var(--space-4); margin-left: auto; align-items: center; }
.nav a { color: var(--ink-2); font-size: var(--step--1); }
.nav a:hover { color: var(--ink); }
.kbd {
  font: 500 var(--step--2)/1 var(--font-mono);
  padding: 3px 5px; border: 1px solid var(--rule-strong); border-radius: 4px; color: var(--muted);
}
/* The content holds the first screen, so the footer never jumps while it loads. */
.page { padding-top: var(--space-7); padding-bottom: var(--space-8); min-height: 100vh; }
.page:has(.hello) { padding-top: var(--space-5); }
.grid { display: grid; gap: var(--space-4); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } .h1 { font-size: var(--step-3); } }
.stack > * + * { margin-top: var(--space-3); }
.row { display: flex; align-items: center; gap: var(--space-3); }
.row.wrap { flex-wrap: wrap; }
.spread { justify-content: space-between; }
.section { margin-top: var(--space-8); }
.section.tight { margin-top: var(--space-6); }

/* Section head: a title, controls on the right */
.section-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3) var(--space-4); flex-wrap: wrap; padding-bottom: var(--space-3); margin-bottom: var(--space-4); border-bottom: 1px solid var(--ink); }
.section-head .title { display: flex; align-items: baseline; gap: var(--space-3); flex-wrap: wrap; }
.section-head h2 { font: 700 var(--step-2)/1.1 var(--font-display); letter-spacing: -0.01em; }
.controls { display: flex; align-items: center; justify-content: flex-end; gap: var(--space-2); flex-wrap: wrap; margin-left: auto; }

/* Surfaces: one quiet layer, a hairline, no drop shadow */
.card { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius-l); padding: var(--space-5); }
.card.pad-s { padding: var(--space-2) var(--space-3); }
.card.link { transition: border-color var(--fast); cursor: pointer; }
.card.link:hover { border-color: var(--rule-strong); }

/* Key figures in one ruled strip */
.kpis { display: grid; grid-template-columns: repeat(var(--n, 4), minmax(0, 1fr)); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.kpi { padding: var(--space-4) var(--space-4) var(--space-4) 0; }
.kpi + .kpi { padding-left: var(--space-4); border-left: 1px solid var(--rule); }
.kpi .value { font: 700 var(--step-3)/1 var(--font-display); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; margin-top: var(--space-2); }
.kpi .value.words { font: 600 var(--step-1)/1.25 var(--font-sans); letter-spacing: -0.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kpi .sub { font-size: var(--step--1); color: var(--muted); margin-top: 2px; }
.kpi.card { padding: var(--space-4) var(--space-5); border: 1px solid var(--rule); }
@media (max-width: 900px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .kpi:nth-child(3) { border-left: 0; padding-left: 0; } .kpi:nth-child(n + 3) { border-top: 1px solid var(--rule); } }

/* Intro block */
.intro { position: relative; padding: var(--space-6) 0 var(--space-6); }
.intro h1 { max-width: 24ch; }
/* Home's first screen: what the site does and the search; beside it, your recent profiles */
.hello { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(300px, 1fr); gap: var(--space-5); align-items: start; }
.intro.hello { padding-top: 0; }
.hello h1 { font-size: clamp(2rem, 4vw, 2.75rem); }
@media (max-width: 900px) { .hello { grid-template-columns: 1fr; gap: var(--space-5); } }
.hello-text > * + * { margin-top: var(--space-4); }
.intro .hello-text p { margin: var(--space-4) 0 0; }
.fresh { font-size: var(--step--1); }
.footer-sample { margin-top: var(--space-2); }
.footer-sample:empty { display: none; }
.recent { display: grid; gap: var(--space-3); align-content: start; }
.intro .recent p { margin: 0; max-width: none; font-size: var(--step-0); }
.recent-list { display: grid; }
.recent-list a { display: flex; justify-content: space-between; gap: var(--space-3); padding: 10px 0; border-top: 1px solid color-mix(in oklab, var(--signal) 18%, transparent); font-weight: 500; }
.recent-list a:hover span:first-child { text-decoration: underline; text-decoration-color: var(--signal); text-underline-offset: 3px; }
a.link { font-weight: 500; text-decoration: underline; text-decoration-color: var(--signal); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.intro p { margin: var(--space-3) 0 var(--space-5); color: var(--ink-2); max-width: 52ch; font-size: var(--step-1); }

/* Inputs */
.search {
  display: flex; align-items: center; gap: var(--space-2);
  background: var(--surface); border: 1px solid var(--rule-strong); border-radius: var(--radius-m);
  padding: 6px 6px 6px var(--space-4); max-width: 620px;
  transition: border-color var(--fast), box-shadow var(--fast);
}
.search:focus-within { border-color: var(--signal); box-shadow: 0 0 0 4px var(--signal-soft); }
.search input { flex: 1; border: 0; outline: 0; background: transparent; font: 400 var(--step-1)/1.4 var(--font-sans); min-width: 0; padding: 6px 0; }
.search input::placeholder, .field input::placeholder { color: var(--muted); }
.field { display: inline-flex; align-items: center; gap: var(--space-2); height: 32px; width: 176px; min-width: 140px; flex: none; padding: 0 var(--space-3); border: 1px solid var(--rule-strong); border-radius: var(--radius-m); background: var(--surface); }
.field:focus-within { border-color: var(--signal); }
.field input { border: 0; outline: 0; background: transparent; font: 400 var(--step--1)/1 var(--font-sans); width: 100%; }
.field svg { flex: none; stroke: var(--muted); }
.btn {
  border: 1px solid transparent; background: var(--signal); color: var(--on-signal);
  border-radius: var(--radius-s); padding: 9px 16px; cursor: pointer;
  font: 500 var(--step--1)/1 var(--font-sans); transition: background var(--fast), opacity var(--fast);
}
.btn:hover { background: color-mix(in oklab, var(--signal) 82%, var(--ink)); color: var(--on-signal); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--rule-strong); }
.btn.ghost:hover { border-color: var(--ink); background: transparent; color: var(--ink); }
.chips { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-4); }
.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 32px;
  font: 500 var(--step--1)/1 var(--font-sans); padding: 0 12px;
  border: 1px solid var(--rule-strong); border-radius: var(--radius-m); background: var(--surface);
  color: var(--ink-2); cursor: pointer; transition: border-color var(--fast), background var(--fast), color var(--fast);
}
.chip:hover { border-color: var(--ink-2); color: var(--ink); }
.chip.on { background: var(--signal); color: var(--on-signal); border-color: var(--signal); }
.nav .short { display: none; }
@media (max-width: 620px) { .nav .short { display: inline; } }
.chip .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--signal); }
.chip.mono { font-family: var(--font-mono); font-size: var(--step--2); }
.team-mark { flex: none; width: 0.32em; height: 0.32em; border-radius: 50%; }
.chip .caret { width: 8px; height: 8px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-2px) rotate(45deg); margin-left: 2px; }

/* Segmented control */
.seg { display: inline-flex; padding: 2px; height: 32px; border-radius: var(--radius-s); background: var(--surface-2); border: 1px solid var(--rule); }
.seg button {
  border: 0; background: transparent; padding: 0 12px; border-radius: var(--radius-s); cursor: pointer;
  font: 500 var(--step--1)/1 var(--font-sans); color: var(--ink-2);
}
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: 0 0 0 1px var(--rule-strong); }

/* Game art: small, square-ish, a touch quieter than the data */
.plate {
  --tint: var(--even);
  position: relative; overflow: hidden; flex: none;
  border-radius: var(--radius-s);
  background: color-mix(in oklab, var(--tint) 16%, var(--surface-2));
}
/* No CSS filter on art: dozens of filtered images make every scrolled frame
   re-raster them. */
.plate img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.plate.xs { width: 24px; height: 24px; border-radius: 5px; }
.plate.s { width: 32px; height: 32px; }
.plate.m { width: 44px; height: 44px; border-radius: var(--radius-m); }
.plate.l { width: 88px; height: 88px; border-radius: var(--radius-l); }
.item-chip { width: 30px; height: 30px; border-radius: var(--radius-s); background: var(--surface-2); border: 1px solid var(--rule); overflow: hidden; flex: none; }
.item-chip img { width: 100%; height: 100%; object-fit: cover; }
.rank-badge { display: inline-flex; align-items: center; gap: 6px; font: 500 var(--step--1)/1 var(--font-sans); }
.rank-badge img { width: 20px; height: 20px; object-fit: contain; }

/* Above / below even */
.up { color: var(--up); }
.down { color: var(--down); }
.win { color: var(--up); }
.loss { color: var(--down); }
/* A short status said as a word: colour on the text, no box around it */
.pill { display: inline; font: 500 var(--step--1)/1.3 var(--font-sans); white-space: nowrap; }
.pill.win { color: var(--up); font-weight: 600; }
.pill.loss { color: var(--down); }
.pill.neutral { color: var(--muted); }
.pill.signal { color: var(--signal); font-weight: 600; }
.pill + .pill::before { content: "· "; color: var(--muted); font-weight: 400; }
.streak { display: flex; gap: 2px; }
/* Form: wins filled in the accent, losses as empty marks */
.streak i { width: 7px; height: 16px; border-radius: 2px; background: transparent; box-shadow: inset 0 0 0 1.5px var(--rule-strong); }
.streak i.w { background: var(--signal); box-shadow: none; }
.streak i.l { background: transparent; }

/* Deviation meter: a ruler centred on 50 %, the fill grows toward the result */
.dev { position: relative; height: 18px; min-width: 120px; }
.dev .track { position: absolute; left: 0; right: 0; top: 8px; height: 2px; background: var(--rule); }
.dev .tick { position: absolute; top: 5px; width: 1px; height: 8px; background: var(--rule-strong); }
.dev .tick.mid { top: 2px; height: 14px; background: var(--ink-2); }
.dev .fill { position: absolute; top: 6px; height: 6px; border-radius: 1px; }
.dev .fill.up { background: var(--up); transform-origin: left; }
.dev .fill.down { background: var(--down); transform-origin: right; }
.dev.large { height: 34px; }
.dev.large .track { top: 13px; }
.dev.large .tick { top: 9px; height: 10px; }
.dev.large .tick.mid { top: 4px; height: 20px; }
.dev.large .fill { top: 10px; height: 8px; }
.dev .scale { position: absolute; top: 28px; transform: translateX(-50%); font: 500 var(--step--2)/1 var(--font-sans); font-variant-numeric: tabular-nums; color: var(--muted); }
.wr { display: grid; grid-template-columns: 64px minmax(90px, 1fr); align-items: center; gap: var(--space-3); }

/* A headline figure: number, deviation, context */
.figure .value { font: 700 var(--step-4)/1 var(--font-display); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.figure .delta { font: 600 var(--step-1)/1 var(--font-sans); font-variant-numeric: tabular-nums; margin-left: var(--space-3); }
.figure .dev { margin-top: var(--space-4); max-width: 520px; }

/* Bars for shares (gold sources, ...) */
.bar { height: 4px; border-radius: 2px; background: var(--surface-2); overflow: hidden; }
.bar > span { display: block; height: 100%; background: var(--ink-2); }
.bar > span.up { background: var(--up); }
.bar > span.down { background: var(--down); }
.bar > span.signal { background: var(--signal); }
.stacked { display: flex; height: 6px; border-radius: 2px; overflow: hidden; background: var(--surface-2); gap: 1px; }
.stacked span { height: 100%; }

/* Tables: rules, tabular numbers, generous rows */
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--rule-strong); font: 500 var(--step--1)/1.2 var(--font-sans); color: var(--muted); white-space: nowrap; }
.table th.sort { cursor: pointer; user-select: none; }
.table th.sort:hover, .table th.sorted { color: var(--ink); }
.table th.sorted::after { content: " ↓"; }
.table td { padding: 8px 10px; border-bottom: 1px solid var(--rule); vertical-align: middle; }
.table tr.click { cursor: pointer; transition: background var(--fast); }
.table tr.click:hover { background: var(--surface-2); }
.table td.r, .table th.r { text-align: right; }
.table td.rank { width: 32px; color: var(--muted); font: 500 var(--step--1)/1 var(--font-sans); font-variant-numeric: tabular-nums; }

/* Hero board: two ruled columns of compact rows on wide screens */
.board { display: grid; grid-template-columns: 1fr 1fr; column-gap: var(--space-6); }
@media (max-width: 1000px) { .board { grid-template-columns: 1fr; } }
.board .head, .board .hero-row { display: grid; grid-template-columns: 26px minmax(130px, 1.3fr) minmax(200px, 2fr) 56px; align-items: center; gap: var(--space-3); }
.board .head { padding: 0 6px 8px; border-bottom: 1px solid var(--rule-strong); }
.board .head .label { cursor: pointer; }
.board .head .label.sorted { color: var(--ink); }
.board .hero-row { padding: 6px; border-bottom: 1px solid var(--rule); transition: background var(--fast); }
.board .hero-row:hover { background: var(--surface); }
.board .hero-row .who { display: flex; align-items: center; gap: var(--space-3); min-width: 0; }
.board .hero-row .who span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 500; }
.board .hero-row .pick { display: grid; justify-items: end; gap: 3px; text-align: right; font: 400 var(--step--1)/1 var(--font-sans); font-variant-numeric: tabular-nums; color: var(--ink-2); }
@media (max-width: 1000px) { .board .head.second { display: none; } }
@media (max-width: 620px) {
  .board .head, .board .hero-row { grid-template-columns: 22px minmax(0, 1fr) 110px 40px; gap: var(--space-2); }
  .wr { grid-template-columns: 1fr; gap: 2px; }
  .wr .dev { min-width: 68px; height: 12px; }
  .wr .dev .track { top: 5px; }
  .wr .dev .tick { top: 3px; height: 6px; }
  .wr .dev .tick.mid { top: 1px; height: 10px; }
  .wr .dev .fill { top: 4px; height: 4px; }
  .nav > a, .nav .long { display: none; }
  .intro { padding-top: var(--space-5); }
  .kpi .value { font-size: var(--step-1); }
  .table td, .table th { padding: 8px 6px; }
  /* Wide tables scroll inside themselves; the page never does. */
  .table { display: block; overflow-x: auto; white-space: nowrap; -webkit-overflow-scrolling: touch; }
  .mini-row { grid-template-columns: 24px minmax(0, 1fr) 56px 48px; }
  .rank-badge { white-space: nowrap; }
  .table td.rank-cell { min-width: 118px; }
  .table .go { display: none; }
  .chart.trend { min-width: 0; }
}
/* Grid children may shrink below their content. */
.grid > *, .split > *, .board > *, .kpis > * { min-width: 0; }

/* Charts */
.chart { width: 100%; height: auto; overflow: visible; }
.chart .axis { stroke: var(--rule-strong); }
.chart .grid-line { stroke: var(--rule); }
.chart text { font: 500 var(--step--2) var(--font-sans); font-variant-numeric: tabular-nums; fill: var(--muted); }
.chart .band { fill: var(--band-fill); stroke: var(--band-stroke); }
.chart .ref { stroke: var(--ink-2); stroke-width: 1.25; fill: none; stroke-dasharray: 3 3; }
.chart .mine { stroke: var(--signal); stroke-width: 2.25; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.chart .mine-dot { fill: var(--signal); }

/* Lists that show a part first */
.btn.more { display: block; margin: var(--space-4) auto 0; }
.history-controls { margin-bottom: var(--space-3); }
.chip.reset { border-style: dashed; color: var(--muted); }

/* Match page */
.player-row { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: var(--space-3); align-items: center; width: 100%; text-align: left; background: transparent; border: 0; border-top: 1px solid var(--rule); padding: 12px 6px; cursor: pointer; border-radius: var(--radius-s); transition: background var(--fast); }
.player-row:hover { background: var(--bg); }
.player-row.on { background: var(--signal-soft); }
.player-row a { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.player-row a:hover { text-decoration: underline; }
.match-rank { margin-top: var(--space-4); }
.player-meta { gap: 4px 10px; font-size: 0.8rem; }
.match-player-rank { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.player-numbers { text-align: right; }
.player-numbers > .bar { margin-left: auto; }
@media (max-width: 1000px) { .match-teams { grid-template-columns: 1fr; } }
@media (max-width: 620px) {
  .player-row { grid-template-columns: 32px minmax(0, 1fr); gap: 6px var(--space-3); }
  .player-row > .plate { align-self: start; }
  .player-numbers { grid-column: 2; text-align: left; }
  .player-numbers > .bar { margin-left: 0; }
}

/* Hero page */
.hero-head { display: flex; gap: var(--space-5); align-items: center; flex-wrap: wrap; }
.switch-wrap { display: grid; gap: 6px; }
.switch { height: 34px; border: 1px solid var(--rule-strong); border-radius: 999px; padding: 0 14px; background: var(--surface); font: 500 var(--step--1)/1 var(--font-sans); color: var(--ink); cursor: pointer; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-7); }
@media (max-width: 1000px) { .split { grid-template-columns: 1fr; } }
.chart-card { padding: var(--space-4) var(--space-4) var(--space-2); }
.matchups { display: grid; gap: var(--space-5); }
.mini-row { display: grid; grid-template-columns: 24px 1fr 60px 56px; align-items: center; gap: var(--space-3); padding: 7px 4px; border-bottom: 1px solid var(--rule); }
.mini-row:hover { background: var(--surface); }
.mini-row .delta, .item-row .delta { font: 600 var(--step--1)/1 var(--font-sans); font-variant-numeric: tabular-nums; text-align: right; }
.item-tiers { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: var(--space-5) var(--space-6); align-items: start; }
.item-tier { display: flex; justify-content: space-between; padding-bottom: 6px; border-bottom: 1px solid var(--ink); }
.item-rest { padding: 8px 0; font-size: var(--step--2); }
.item-row { display: grid; grid-template-columns: 30px 1fr auto; align-items: center; gap: var(--space-3); padding: 8px 0; border-bottom: 1px solid var(--rule); }
button.item-row { width: 100%; background: none; border: 0; border-bottom: 1px solid var(--rule); color: inherit; font: inherit; text-align: left; cursor: pointer; }
button.item-row:hover, button.item-row[aria-expanded="true"] { background: var(--surface); }
.item-row .effect { text-align: right; }
.item-row .effect .num { font: 600 var(--step-0)/1.1 var(--font-sans); }
.num.flat { color: var(--muted); }
.item-window { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: var(--space-2) var(--space-5); }
.item-choice { display: flex; align-items: center; gap: var(--space-3); }
.item-choice .seg button { white-space: nowrap; }
@media (max-width: 480px) {
  .item-window { justify-content: flex-start; }
  .item-choice.days > .label { display: none; }
  .item-choice .seg button { padding-left: 7px; padding-right: 7px; }
}
.item-note { margin: 0 0 var(--space-4); font-size: var(--step--1); max-width: 92ch; }
.build-chips { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-bottom: var(--space-5); }
.build-chip { display: inline-flex; align-items: center; gap: var(--space-2); padding: 6px 12px 6px 6px; border: 1px solid var(--rule); border-radius: var(--radius-l); background: var(--surface); color: var(--ink-2); font: inherit; cursor: pointer; max-width: 100%; }
.build-chip:hover { border-color: var(--ink-2); color: var(--ink); }
.build-chip.on { border-color: var(--ink); color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.build-chip .build-icons { display: flex; gap: 2px; }
.build-chip .build-icons .item-chip { width: 24px; height: 24px; }
.build-chip .build-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.build-chip .num { font: 500 var(--step--1)/1 var(--font-sans); color: var(--muted); }
.build-chip .num.up { color: var(--up); }
.build-chip .num.down { color: var(--down); }
.path-block { margin-bottom: var(--space-5); }
.path-title { margin-bottom: var(--space-2); padding-bottom: 6px; border-bottom: 1px solid var(--ink); }
.path-window { display: grid; grid-template-columns: 96px 1fr; gap: var(--space-3); padding: 10px 0; border-bottom: 1px solid var(--rule); align-items: start; }
.path-time { padding-top: 8px; }
.path-tiers { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--space-2) var(--space-5); }
.path-step { display: grid; grid-template-columns: 30px 1fr auto; gap: var(--space-3); align-items: center; }
.path-step .effect { text-align: right; }
.path-step .effect .num { font: 600 var(--step-0)/1.1 var(--font-sans); }
.path-alt { font-size: var(--step--2); margin-top: 2px; }
.path-stages { display: grid; gap: var(--space-3); }
.path-stage .path-tiers { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.path-stage + .path-stage { padding-top: var(--space-3); border-top: 1px dashed var(--rule); }
.path-facts { margin-bottom: 4px; }
.path-end { margin-top: var(--space-2); }
.path-sell { font-size: var(--step--2); font-weight: 600; }
.path-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); }
button.path-step { font: inherit; color: inherit; text-align: left; background: none; border: 1px solid transparent; border-radius: var(--radius-m, 8px); padding: 4px; cursor: pointer; width: 100%; }
button.path-step:hover { border-color: var(--rule); }
.path-step.picked { background: var(--signal-soft); }
.label.path-rare { display: none; }
@media (max-width: 480px) {
  .path-window { grid-template-columns: 1fr; gap: 4px; }
  .path-time { padding-top: 0; }
  /* A step: the pick across, the other options as small tiles in one row. */
  .path-stage .path-tiers { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-2); }
  .path-stage .path-tiers > .picked { grid-column: 1 / -1; }
  .path-stage .path-tiers > .choosable { grid-template-columns: 1fr; justify-items: center; text-align: center; gap: 2px; border-color: var(--rule); }
  .path-stage .path-tiers > .choosable .label { display: none; }
  .path-stage .path-tiers > .choosable .label.path-best,
  .path-stage .path-tiers > .choosable .label.path-rare { display: block; }
  .path-stage .path-tiers > .choosable > div:nth-child(2) { width: 100%; }
  .path-stage .path-tiers > .choosable .strong { white-space: normal; font-size: var(--step--1); line-height: 1.15; }
  .path-stage .path-tiers > .choosable .effect { text-align: center; }
}
.item-detail { display: grid; gap: 6px; padding: var(--space-3) 4px var(--space-4); border-bottom: 1px solid var(--rule); font-size: var(--step--1); }
.item-detail[hidden] { display: none; }
.item-time { display: grid; grid-template-columns: 76px minmax(70px, 1fr) 40px 34px; align-items: center; gap: var(--space-2); }
.item-time .dev { min-width: 70px; }
.item-time .num { font: 500 var(--step--1)/1 var(--font-sans); text-align: right; }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Benchmark rank strip */
.rank-strip { display: grid; grid-template-columns: repeat(11, minmax(0, 1fr)); gap: 6px; }
@media (max-width: 1000px) { .rank-strip { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.rank-pill { display: grid; justify-items: center; gap: 6px; padding: 10px 4px; border: 1px solid var(--rule); border-radius: var(--radius-m); background: var(--surface); cursor: pointer; font: 500 var(--step--2)/1.1 var(--font-sans); color: var(--ink-2); }
.rank-pill img { width: 28px; height: 28px; object-fit: contain; }
.rank-pill:hover { border-color: var(--rule-strong); }
.rank-pill.on { border-color: var(--signal); background: var(--signal); color: var(--on-signal); }
.rank-pill .own { font: 500 var(--step--2)/1 var(--font-sans); color: var(--muted); }
.rank-pill.on .own { color: inherit; opacity: 0.75; }

/* Trend chart */
.chart.trend .even-line { stroke: var(--ink-2); stroke-width: 1; }
.chart.trend .trend-line { stroke: var(--ink); stroke-width: 1.75; fill: none; stroke-linejoin: round; }
.chart.trend .trend-up { fill: var(--up); fill-opacity: 0.16; }
.chart.trend .trend-down { fill: var(--down); fill-opacity: 0.16; }
.chart.trend .pick-bar { fill: var(--rule-strong); }
.chart.trend .pick-bar:hover { fill: var(--signal); }

/* Insight cards (benchmark) */
.insight .delta { font: 700 var(--step-2)/1 var(--font-display); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.insight .meter { margin-top: var(--space-4); }

/* Popover (period picker) */
.popover-anchor { position: relative; }
.popover { position: absolute; top: calc(100% + 6px); right: 0; z-index: 30; width: min(440px, 92vw); background: var(--surface); border: 1px solid var(--rule-strong); border-radius: var(--radius-l); box-shadow: var(--shadow-pop); animation: rise var(--fast) var(--ease) both; overflow: hidden; }
.popover .tabs { display: flex; border-bottom: 1px solid var(--rule); }
.popover .tabs button { flex: 1; border: 0; background: transparent; padding: 12px; cursor: pointer; font: 500 var(--step--1)/1 var(--font-sans); color: var(--muted); border-bottom: 2px solid transparent; }
.popover .tabs button.on { color: var(--ink); border-bottom-color: var(--ink); }
.popover .body { max-height: 420px; overflow: auto; padding: var(--space-2) 0; }
.popover .group { padding: var(--space-3) var(--space-4) var(--space-1); display: flex; align-items: center; gap: var(--space-2); border-top: 1px solid var(--rule); }
.popover .group:first-child { border-top: 0; }
.popover .group .name { font-weight: 600; }
.popover .option { display: grid; grid-template-columns: 18px 1fr auto; align-items: center; gap: var(--space-3); padding: 6px var(--space-4); cursor: pointer; }
.popover .option:hover { background: var(--surface-2); }
.popover input[type="checkbox"] { accent-color: var(--signal); width: 15px; height: 15px; margin: 0; }
.popover .dates { padding: var(--space-4); display: grid; gap: var(--space-3); }
.popover .dates input[type="date"] { height: 34px; border: 1px solid var(--rule-strong); border-radius: var(--radius-s); padding: 0 var(--space-2); background: var(--surface); font: 400 var(--step--1) var(--font-sans); }
.popover .foot { display: flex; justify-content: space-between; gap: var(--space-2); padding: var(--space-3) var(--space-4); border-top: 1px solid var(--rule); background: var(--bg); }

/* Rank picker */
.popover.ranks { width: min(320px, 92vw); }
.popover .hint { padding: var(--space-3) var(--space-4); font-size: var(--step--1); color: var(--muted); border-bottom: 1px solid var(--rule); }
.rank-option { display: grid; grid-template-columns: 24px 1fr auto; align-items: center; gap: var(--space-3); width: 100%; padding: 6px var(--space-4); border: 0; background: transparent; cursor: pointer; text-align: left; font: 400 var(--step-0)/1.2 var(--font-sans); }
.rank-option img { width: 22px; height: 22px; object-fit: contain; }
.rank-option:hover { background: var(--surface-2); }
.rank-option.on { background: var(--signal-soft); color: var(--ink); }

/* Command palette */
.palette-backdrop { position: fixed; inset: 0; background: var(--backdrop); z-index: 50; display: grid; place-items: start center; padding-top: 14vh; animation: fade var(--fast) ease both; }
.palette { width: min(620px, 92vw); background: var(--surface); border: 1px solid var(--rule-strong); border-radius: var(--radius-l); box-shadow: var(--shadow-pop); overflow: hidden; animation: rise var(--fast) var(--ease) both; }
.palette input { width: 100%; border: 0; outline: 0; background: transparent; padding: var(--space-4) var(--space-5); font: 400 var(--step-1) var(--font-sans); border-bottom: 1px solid var(--rule); }
.palette .results { max-height: 52vh; overflow: auto; padding-bottom: var(--space-2); }
.results a.search-result { display: grid; grid-template-columns: 40px minmax(0, 1fr); align-items: center; gap: var(--space-3); padding: 10px var(--space-4); }
.results a.active { background: var(--signal-soft); }
.results .search-caption { display: grid; min-width: 0; gap: 3px; }
.results .title { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.results .sub { font: 400 var(--step--1)/1.3 var(--font-sans); font-variant-numeric: tabular-nums; color: var(--muted); }
.search-avatar { position: relative; width: 40px; height: 40px; display: grid; place-items: center; overflow: hidden; border-radius: 50%; background: var(--surface-2); color: var(--muted); }
.search-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.search-area { position: relative; max-width: 620px; }
.search-results { position: absolute; top: calc(100% + 8px); left: 0; right: 0; max-height: min(440px, 60vh); overflow: auto; z-index: 15; border: 1px solid var(--rule-strong); border-radius: var(--radius-m); background: var(--surface); box-shadow: var(--shadow-pop); }
.palette-group { padding: var(--space-3) var(--space-5) var(--space-1); font: 500 var(--step--1)/1 var(--font-sans); color: var(--muted); }
.palette-empty { padding: var(--space-5); color: var(--muted); }
.palette-foot { display: flex; gap: var(--space-4); padding: 10px var(--space-5); border-top: 1px solid var(--rule); background: var(--bg); font-size: var(--step--1); color: var(--muted); }
@keyframes fade { from { opacity: 0; } }

/* Motion, skeletons and states */
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.skeleton { border-radius: var(--radius-m); background: linear-gradient(90deg, var(--surface-2), var(--surface), var(--surface-2)); background-size: 200% 100%; animation: shimmer 1.4s ease-in-out infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.empty { padding: var(--space-7); text-align: center; color: var(--muted); }
.state { padding: var(--space-8) var(--space-4); text-align: center; max-width: 620px; margin: 0 auto; }
.state p { margin: var(--space-3) 0 var(--space-5); font-size: var(--step-1); }
.notice { font-size: var(--step--1); color: var(--muted); max-width: 92ch; }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: var(--radius-m); font: 500 var(--step--1) var(--font-sans); z-index: 60; animation: rise var(--fast) var(--ease) both; }
.footer { border-top: 1px solid var(--rule); padding: var(--space-6) 0; color: var(--footer-ink); font-size: var(--step--1); }
.live { display: inline-flex; align-items: center; gap: 6px; }
.live::before { content: ""; width: 7px; height: 7px; border-radius: 2px; background: var(--signal); }
.live.stale::before { background: var(--warn); }
.state.compact { padding: var(--space-6) var(--space-4); }
.state.compact p { font-size: var(--step-0); }

/* A section reloading in place: its last content stays, dimmed and inert. */
.holding { opacity: 0.45; pointer-events: none; transition: opacity var(--fast); }
/* Built after the reader acted on the page: no entrance motion. */
.still { animation: none !important; }
.chart .draw.still { stroke-dashoffset: 0; }
[hidden] { display: none !important; }
a.row-link { color: inherit; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-delay: 0ms !important; transition-duration: 1ms !important; }
}

/* Match conditions (benchmark) */
.matchup { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-4); }
@media (max-width: 620px) { .matchup { grid-template-columns: 1fr; } }
.matchup-side { display: grid; gap: var(--space-3); align-content: start; padding: var(--space-4); border: 1px solid var(--rule); border-radius: var(--radius-l); background: var(--surface); min-width: 0; }
.matchup-side .head { display: flex; justify-content: space-between; align-items: baseline; }
.matchup-side .count { font: 500 var(--step--1)/1 var(--font-sans); font-variant-numeric: tabular-nums; color: var(--muted); }
.matchup-side .hint { font-size: var(--step--1); color: var(--muted); }
.matchup-list { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; }
.matchup-chip { display: inline-flex; align-items: center; gap: var(--space-2); height: 34px; padding: 0 3px 0 4px; border: 1px solid var(--rule-strong); border-radius: 999px; background: var(--bg); font: 500 var(--step--1)/1 var(--font-sans); max-width: 100%; }
.matchup-chip .plate.xs { border-radius: 50%; }
.matchup-chip .name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.matchup-chip .lane { height: 24px; padding: 0 9px; border: 1px solid var(--rule-strong); border-radius: 999px; background: transparent; color: var(--muted); font: 500 var(--step--1)/1 var(--font-sans); cursor: pointer; }
.matchup-chip .lane:hover:not(:disabled) { color: var(--ink); border-color: var(--ink-2); }
.matchup-chip .lane.on { background: var(--signal); border-color: var(--signal); color: var(--surface); }
.matchup-chip .lane:disabled { opacity: 0.4; cursor: default; }
.matchup-chip .remove { width: 26px; height: 26px; border: 0; border-radius: 50%; background: transparent; color: var(--muted); font-size: 16px; line-height: 1; cursor: pointer; }
.matchup-chip .remove:hover { background: var(--surface-2); color: var(--ink); }
.chip.add { border-style: dashed; height: 34px; }
/* The picker hangs from its panel, so it never leaves a narrow screen. */
.matchup-side { position: relative; }
.matchup .popover-anchor { position: static; }
.popover.heroes { top: calc(100% - 8px); left: var(--space-3); right: auto; width: min(280px, calc(100% - 2 * var(--space-3))); }
.popover.heroes .search-row { padding: var(--space-3); border-bottom: 1px solid var(--rule); }
.popover.heroes .field { width: 100%; min-width: 0; }
.popover.heroes .body { max-height: 320px; }
.hero-option { display: flex; align-items: center; gap: var(--space-3); width: 100%; padding: 6px var(--space-4); border: 0; background: transparent; color: var(--ink); font: 400 var(--step--1)/1.2 var(--font-sans); text-align: left; cursor: pointer; }
.hero-option:hover, .hero-option:focus-visible { background: var(--surface-2); outline: 0; }

/* The method behind a section: «?» opens its explanation, closed by default. */
details.help { position: relative; display: inline-block; flex: none; }
details.help > summary { list-style: none; display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--rule-strong); font: 600 var(--step--1)/1 var(--font-sans); color: var(--ink-2); cursor: pointer; user-select: none; }
details.help > summary::-webkit-details-marker { display: none; }
details.help > summary:hover { border-color: var(--ink-2); color: var(--ink); }
details.help[open] > summary { background: var(--ink); color: var(--bg); border-color: var(--ink); }
details.help > .help-body { white-space: normal; overflow-wrap: anywhere; position: absolute; z-index: 20; top: 30px; left: 0; width: min(560px, calc(100vw - 32px)); padding: var(--space-4); border: 1px solid var(--rule-strong); border-radius: 10px; background: var(--surface); box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18); font: 400 var(--step--1)/1.55 var(--font-sans); color: var(--ink-2); display: grid; gap: var(--space-2); text-align: left; text-transform: none; letter-spacing: 0; }
details.help .help-body p { margin: 0; }
.item-note { gap: var(--space-2); align-items: center; }
/* The build path's 12 inventory slots. */
.inventory { display: inline-flex; gap: 2px; vertical-align: middle; }
.inventory i { width: 7px; height: 7px; border-radius: 1.5px; box-shadow: inset 0 0 0 1px var(--rule-strong); }
.inventory i.on { background: var(--ink-2); box-shadow: none; }
.path-facts { gap: var(--space-3); align-items: center; }
/* A personal rate's bases: the player's own recent games and their rank. */
.bases { display: grid; gap: 6px; margin-top: var(--space-4); }
.bases .base { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-3); font-size: var(--step--1); }
@media (max-width: 560px) { .phone-hide { display: none; } }
/* Long rank-group names wrap on phones instead of running off the screen. */
@media (max-width: 560px) {
  .seg { flex-wrap: wrap; height: auto; border-radius: var(--radius-s); }
  .item-choice { flex-wrap: wrap; }
  .item-choice .seg button { white-space: normal; }
  .seg button { min-height: 26px; }
}

/* «Вы»: your own figure on the accent field, your own block on the pale accent */
.mine:not(svg *) { display: inline-block; background: var(--signal); color: var(--on-signal); padding: 0 0.14em; border-radius: 4px; }
.card.own { background: var(--surface); border-color: var(--rule-strong); border-left: 3px solid var(--signal); }

/* Verdict against the rank: the distance in words and a small ruler — the rank a
   tick in the middle, you a dot, right is better, the gap in the verdict's colour. */
.verdict { display: inline-flex; align-items: center; gap: 10px; font: 500 var(--step--1)/1.3 var(--font-sans); color: var(--ink-2); }
.verdict b { font-weight: 600; }
.verdict.worse b, .verdict.worse .ruler .gap { color: var(--down); }
.verdict.better b, .verdict.better .ruler .gap { color: var(--up); }
.verdict.even b { color: var(--ink-2); }
.ruler { position: relative; width: 72px; height: 12px; flex: none; }
.ruler::before { content: ""; position: absolute; left: 0; right: 0; top: 5.5px; height: 1px; background: var(--rule-strong); }
.ruler .gap { position: absolute; top: 4.5px; height: 3px; border-radius: 2px; background: currentColor; }
.ruler .rk { position: absolute; left: 50%; top: 0; width: 1.5px; height: 12px; margin-left: -0.75px; background: var(--ink-2); }
.ruler .me { position: absolute; top: 2px; width: 8px; height: 8px; margin-left: -4px; border-radius: 50%; background: var(--signal); }

/* Player: who and how right now, the last game against your usual, your heroes
   against your rank, the matches, the detailed pattern behind a disclosure. */
.who-band { display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(0, 380px); gap: var(--space-6); align-items: center; }
.who-band > .plate { width: 128px; height: 128px; border-radius: 18px; }
.who-band > .plate img { object-position: 50% 18%; }
.who-text .meta { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; margin-top: var(--space-3); color: var(--ink-2); font-size: var(--step--1); }
.who-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: var(--space-5); }
.estimated-rank { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.form-card { display: grid; gap: 14px; }
.form-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 6px var(--space-3); }
.form-row .muted { font-size: var(--step--1); }
.form-change { font: 600 var(--step-0)/1 var(--font-sans); font-variant-numeric: tabular-nums; }
.form-row .big { white-space: nowrap; font: 700 var(--step-4)/1 var(--font-display); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.form-row .big .of { font: 600 var(--step-1)/1 var(--font-sans); letter-spacing: 0; color: var(--muted); }
.strip { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 3px; }
.strip i { height: 22px; border-radius: 3px; box-shadow: inset 0 0 0 1.5px var(--rule-strong); }
.strip i.w { background: var(--signal); box-shadow: none; }
.strip-axis { display: flex; justify-content: space-between; font: 500 var(--step--2)/1.2 var(--font-sans); color: var(--muted); }
.two { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); column-gap: var(--space-6); align-items: stretch; }
.two > .last-block, .two > .heroes-block { display: grid; grid-template-rows: subgrid; grid-row: span 2; min-width: 0; }
.last-block > .last { align-content: start; }
.heroes-body { display: grid; }
.last { display: grid; gap: 18px; color: inherit; }
.last:hover { border-color: var(--rule-strong); }
.last-top { display: flex; gap: var(--space-4); align-items: center; }
.last-top .plate, .hcard .plate { width: 56px; height: 56px; border-radius: 10px; }
.last .small { margin-top: 4px; font-size: var(--step--1); }
.kda { font: 700 var(--step-4)/1 var(--font-display); letter-spacing: -0.02em; }
.versus { display: grid; gap: 10px; }
.versus > div { display: grid; grid-template-columns: 1fr auto; gap: var(--space-3); font-size: var(--step--1); padding-bottom: 10px; border-bottom: 1px solid var(--rule); }
.versus > div:last-child { border-bottom: 0; padding-bottom: 0; }
.last .versus > div { grid-template-columns: minmax(0, 1fr); gap: 4px; }
.versus b { font-weight: 600; }
.last .link, .link-button { justify-self: start; font: 500 var(--step--1)/1.3 var(--font-sans); color: var(--ink); text-decoration: underline; text-decoration-color: var(--signal); text-decoration-thickness: 2px; text-underline-offset: 4px; }
/* A text link that is a button: 24 px tall to touch, like every control. */
.link-button { border: 0; background: none; padding: 4px 0; min-height: 24px; cursor: pointer; }
.hero-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-3); }
.hcard { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 4px var(--space-4); padding: 18px; border-radius: var(--radius-l); background: var(--surface); border: 1px solid var(--rule); align-items: center; color: inherit; }
.hcard:hover { border-color: var(--rule-strong); }
.hcard .plate { grid-row: span 2; }
.hcard .n { font: 700 var(--step-1)/1.1 var(--font-display); align-self: end; }
.hcard .s { font-size: var(--step--1); color: var(--ink-2); align-self: start; }
.hcard .cmp { grid-column: 1 / -1; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px var(--space-3); margin-top: var(--space-3); padding-top: var(--space-3); border-top: 1px solid var(--rule); font-size: var(--step--1); color: var(--muted); }
.hcard .cmp b { font-weight: 600; }
.matches { display: grid; margin-top: var(--space-3); border-top: 1px solid var(--rule-strong); }
.match { display: grid; grid-template-columns: 32px minmax(110px, 1.2fr) 112px minmax(80px, 0.7fr) minmax(90px, 0.7fr) minmax(80px, auto); gap: var(--space-4); align-items: center; padding: 10px; border-bottom: 1px solid var(--rule); color: inherit; }
.match:hover { background: var(--surface-2); }
.match .who { display: grid; gap: 2px; min-width: 0; }
.match .who b { font-weight: 600; }
.match .who .small { font-size: var(--step--1); }
.match .k { font-size: var(--step--1); }
.match .souls, .match .when { font-size: var(--step--1); color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.match .when { text-align: right; }
details.more { border-top: 1px solid var(--ink); }
details.more > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: var(--space-4); padding: 18px 0; font: 700 var(--step-2)/1.1 var(--font-display); letter-spacing: -0.01em; }
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary span { margin-left: auto; font: 500 var(--step--1)/1 var(--font-sans); letter-spacing: 0; color: var(--muted); }
details.more > summary::after { content: "+"; font: 400 1.5rem/1 var(--font-sans); color: var(--muted); }
details.more[open] > summary::after { content: "−"; }
details.more .section:first-child { margin-top: var(--space-3); }
/* «Главное о вашей игре»: a card per conclusion — the kind and the verdict, the
   sentence, your figure on the accent field against the base, what to do. */
.findings { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-4); margin-top: var(--space-4); }
.finding { display: grid; gap: var(--space-4); align-content: start; }
.finding-tag { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px var(--space-3); font: 500 var(--step--1)/1.3 var(--font-sans); color: var(--muted); }
.finding-text { font: 700 var(--step-1)/1.3 var(--font-display); max-width: 46ch; }
.pair { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px var(--space-4); }
.pair .you { font: 700 var(--step-3)/1 var(--font-display); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.pair .ref { font-size: var(--step--1); color: var(--ink-2); }
.finding-more { font-size: var(--step--1); color: var(--ink-2); }
.advice { font-size: var(--step--1); color: var(--ink-2); padding-top: var(--space-4); border-top: 1px solid var(--rule); }
.advice b { color: var(--ink); font-weight: 600; }
p.lead { margin: 0; color: var(--ink-2); max-width: 70ch; }
@media (max-width: 900px) {
  .who-band { grid-template-columns: auto minmax(0, 1fr); }
  .who-band .form-card { grid-column: 1 / -1; }
  .who-band > .plate { width: 96px; height: 96px; border-radius: 14px; }
  .two { grid-template-columns: 1fr; row-gap: var(--space-6); }
  .two > .last-block, .two > .heroes-block { display: block; grid-row: auto; }
  .findings { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .who-band { gap: var(--space-4); }
  .who-band > .plate { width: 64px; height: 64px; border-radius: 12px; align-self: start; }
  .match { grid-template-columns: 32px minmax(0, 1fr) auto auto; grid-template-areas: "face who who res" "face k souls when"; gap: 2px var(--space-3); padding: 10px 0; }
  .match .plate { grid-area: face; align-self: start; }
  .match .who { grid-area: who; }
  .match .pill { grid-area: res; justify-self: end; }
  .match .k { grid-area: k; }
  .match .souls { grid-area: souls; }
  .match .when { grid-area: when; }
}
@media (max-width: 480px) { .hero-cards { grid-template-columns: 1fr; } }

/* Hero: the band with the build that works now, the path as columns by game time,
   key items and traps by price, rivals and allies in three columns. */
.hero-band { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: var(--space-6); align-items: center; }
.hero-band > .plate { width: 128px; height: 128px; border-radius: 18px; }
.hero-band > .plate img { object-position: 50% 18%; }
.hero-lead { margin-top: var(--space-3); font-size: var(--step-1); }
.selection-note { margin-top: var(--space-3); font-size: var(--step--1); }
.path-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: var(--space-4); align-items: start; }
.path-cols .path-window { display: grid; grid-template-columns: 1fr; gap: var(--space-2); padding: 0; border-bottom: 0; }
.path-cols .path-time { padding: 0 0 6px; border-bottom: 1px solid var(--ink); display: flex; justify-content: space-between; gap: var(--space-2); }
.path-cols .path-stage + .path-stage { border-top: 1px solid var(--rule); }
.path-cols .path-step.picked { padding: 8px; border-radius: var(--radius-m); }
/* Desktops: every window in one row, as in the mock-up; a step's options stack inside
   its column. */
@media (min-width: 1100px) {
  .path-cols { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
  .path-cols .path-stage .path-tiers { grid-template-columns: minmax(0, 1fr); }
  /* A narrow column: the estimate goes under the name, which keeps the width. */
  .path-cols .path-step { grid-template-columns: 30px minmax(0, 1fr); }
  .path-cols .path-step > .effect { grid-column: 2; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 var(--space-2); text-align: left; }
  .path-cols .path-step .ellipsis { white-space: normal; overflow-wrap: anywhere; }
}
.path-pick { grid-template-columns: 30px minmax(0, 1fr); align-items: start; }
.pick-line { font-size: var(--step--1); color: var(--ink-2); margin: 2px 0; }
.pick-line b { font-weight: 600; }
.path-others > summary { min-height: 24px; display: flex; align-items: center; cursor: pointer; font-size: var(--step--1); color: var(--ink-2); }
.path-others[open] > summary { margin-bottom: var(--space-2); }
.path-others .path-tiers { grid-template-columns: 1fr; }
.rare { display: grid; gap: var(--space-3); margin-top: var(--space-5); }
.rare p { margin: 0; }
.rare-list { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-4); }
.rare-opt { display: inline-flex; align-items: center; gap: var(--space-2); font-size: var(--step--1); }
.costs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-5); margin-top: var(--space-4); }
.cost { display: grid; gap: var(--space-3); align-content: start; }
.cost-head { padding-bottom: 6px; border-bottom: 1px solid var(--ink); font-size: var(--step--1); }
.it { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; gap: 4px var(--space-3); align-items: center; padding: 8px 10px; border-radius: var(--radius-s); background: var(--surface); border: 1px solid var(--rule); }
.it-main { display: grid; gap: 3px; min-width: 0; }
.it-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.it-sub { font-size: var(--step--2); color: var(--muted); }
.it-bar { display: block; height: 3px; border-radius: 2px; background: var(--surface-2); overflow: hidden; margin-top: 2px; }
.it-bar > i { display: block; height: 100%; background: var(--rule-strong); }
.it-effect { text-align: right; font-size: var(--step-0); white-space: nowrap; }
.it-none { font-size: var(--step--1); }
.traps-block { margin-top: var(--space-5); display: grid; gap: var(--space-3); }
.traps-block p { margin: 0; }
.traps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-4); }
.note-units { margin-top: var(--space-4); font-size: var(--step--1); }
.mates { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-5); margin-top: var(--space-4); }
.mates-title { font: 700 var(--step-1)/1.2 var(--font-display); padding-bottom: 6px; border-bottom: 1px solid var(--ink); }
.mate { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: var(--space-3); align-items: center; padding: 10px 0; border-bottom: 1px solid var(--rule); color: inherit; }
.mate:hover { background: var(--surface); }
.mate-who { display: grid; gap: 2px; min-width: 0; }
.mate-who .muted { font-size: var(--step--1); }
.mate-rate { display: grid; justify-items: end; gap: 2px; font-size: var(--step--1); }
.mate-rate .num:first-child { font-weight: 600; font-size: var(--step-0); }
@media (max-width: 900px) {
  .hero-band { grid-template-columns: auto minmax(0, 1fr); }
  .hero-band > .switch-wrap { grid-column: 1 / -1; }
  .hero-band > .plate { width: 96px; height: 96px; border-radius: 14px; }
  .costs, .traps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mates { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .hero-band > .plate { width: 64px; height: 64px; border-radius: 12px; align-self: start; }
  .costs, .traps { grid-template-columns: 1fr; }
}

/* Account: sign-in by a letter, the account page */
.account-link a { color: var(--ink-2); font-size: var(--step--1); white-space: nowrap; }
.account-link a:hover { color: var(--ink); }
.account-page { max-width: 640px; display: grid; gap: var(--space-4); align-content: start; }
.account-page .lead { margin: 0; }
.account-form { display: flex; flex-wrap: wrap; gap: var(--space-3); }
.account-form .field { flex: 1 1 260px; width: auto; height: auto; min-height: 44px; padding: 10px 14px; border: 1px solid var(--rule-strong); border-radius: var(--radius-m); background: var(--surface); color: var(--ink); font: 400 var(--step-0)/1.3 var(--font-sans); }
.account-form .field:focus { outline: 2px solid var(--signal); outline-offset: 1px; border-color: var(--signal); }
.account-note { margin: 0; font-size: var(--step--1); }
.account-head { font: 700 var(--step-1)/1.2 var(--font-display); margin-top: var(--space-4); padding-bottom: 6px; border-bottom: 1px solid var(--ink); }
.devices { display: grid; }
.device { display: flex; justify-content: space-between; align-items: center; gap: var(--space-3); padding: 12px 0; border-bottom: 1px solid var(--rule); }
.account-danger { margin-top: var(--space-5); display: grid; gap: var(--space-3); }
.account-danger p { margin: 0; color: var(--ink-2); }
.account-page > .btn, .account-page > .link, .account-danger > .btn, .account-steam > .btn { justify-self: start; }
.account-notice { margin: 0; padding: var(--space-3) var(--space-4); border-radius: 8px; background: var(--surface-2); color: var(--ink); }
.account-steam { display: grid; gap: var(--space-3); }
.account-steam .row { gap: var(--space-4); align-items: center; }
.account-link { display: inline-flex; gap: var(--space-4); }
.btn.steam-link { display: inline-flex; align-items: center; justify-content: center; gap: 12px; padding: 12px 20px; background: var(--steam-bg); color: var(--steam-ink); border: 1px solid var(--steam-rule); }
.btn.steam-link:hover { background: var(--steam-hover); border-color: var(--steam-hover-rule); }
.steam-link img { flex: none; filter: invert(1); }
.steam-prompt { display: flex; align-items: center; gap: var(--space-3); flex-wrap: wrap; font-size: var(--step--1); }
.steam-prompt:empty { display: none; }
.nav .header-steam { flex: none; }
.nav .header-steam .steam-link { padding: 8px 12px; gap: 8px; }
.header-steam .steam-link img { width: 20px; height: 20px; }
@media (max-width: 620px) {
  .topbar .shell { gap: var(--space-3); }
  .nav { gap: 10px; }
  .nav .header-steam .steam-link { padding: 6px 8px; gap: 6px; }
  .header-steam .steam-link span { max-width: 80px; line-height: 1.15; }
}
.account-form .field-label { flex: 1 0 100%; margin-bottom: calc(-1 * var(--space-2)); font: 500 var(--step--1)/1.3 var(--font-sans); color: var(--ink-2); }
.account-form .account-terms { flex: 1 0 100%; }
.account-terms { display: flex; gap: var(--space-3); align-items: flex-start; font-size: var(--step--1); color: var(--ink-2); cursor: pointer; }
.account-terms input { flex: none; width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--signal); }
.account-form .code-field { flex: 0 1 200px; font: 600 var(--step-1)/1.2 var(--font-sans); font-variant-numeric: tabular-nums; letter-spacing: 0.15em; }
/* Legal documents: the owner's texts as a readable column */
.legal { max-width: 76ch; display: grid; gap: var(--space-3); }
.legal > a.chip { justify-self: start; width: fit-content; }
.legal p { margin: 0; line-height: 1.55; }
.legal .legal-head { font: 700 var(--step-1)/1.25 var(--font-display); margin: var(--space-5) 0 0; }
.legal-table { overflow-x: auto; }
.legal-table td { padding: 8px 10px; border-bottom: 1px solid var(--rule); vertical-align: top; }
.footer-links { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-5); margin-top: var(--space-3); }
.footer-links a { color: var(--footer-ink); }
.footer-links a:hover { color: var(--ink); }
/* Phones: the header keeps whole links — no tag or key hint, and with Steam
   linked the profile link moves to the account page below 480 px. */
@media (max-width: 620px) { .brand-tag, .topbar .kbd { display: none; } .account-link { gap: var(--space-3); } }
@media (max-width: 480px) { .account-link .profile-link { display: none; } }

/* Farm conversion: coordinates stay exact; overlapping heroes remain in the table. */
.farm-filters { position: relative; display: grid; gap: 16px; margin-bottom: 24px; }
.farm-filters .popover { left: 0; right: auto; }
.farm-outcomes { gap: 12px; }
.farm-coverage { padding: 10px 14px; margin-top: 10px; border: 1px solid var(--rule); border-radius: var(--radius-m); background: var(--surface-2); color: var(--muted); font-size: var(--step--1); line-height: 1.6; }
.farm-controls { justify-content: space-between; gap: 16px; margin: 32px 0 20px; }
.farm-chart { padding: 24px; }
.farm-plot { isolation: isolate; position: relative; height: 440px; margin: 12px 0 36px 48px; border-left: 1px solid var(--rule-strong); border-bottom: 1px solid var(--rule-strong); }
.farm-grid { position: absolute; width: 100%; border-top: 1px solid var(--rule); }
.farm-grid > span { position: absolute; right: calc(100% + 10px); transform: translateY(-50%); color: var(--muted); font-size: var(--step--2); white-space: nowrap; }
.farm-tick { position: absolute; top: calc(100% + 10px); transform: translateX(-50%); color: var(--muted); font-size: var(--step--2); }
.farm-reference { position: absolute; height: 100%; border-left: 1px dashed var(--rule-strong); }
.farm-point { position: absolute; transform: translate(-50%, -50%); padding: 2px; border: 2px solid var(--rule-strong); background: var(--surface); border-radius: 50%; cursor: pointer; z-index: 1; }
.farm-point .plate, .farm-hero .plate, .farm-picker-list .plate { width: 30px; height: 30px; min-width: 30px; border-radius: 50%; display: grid; place-items: center; font-size: var(--step--2); }
.farm-point.low { border-style: dashed; }
.farm-point:hover, .farm-point:focus-visible, .farm-point.selected, .farm-outcome-point:focus-visible { z-index: 4; outline: 2px solid var(--ink); outline-offset: 3px; }
.farm-x-label { text-align: center; color: var(--ink-2); }
.farm-detail { margin-top: 24px; scroll-margin-top: 96px; }
.farm-detail > .card { padding: 24px; }
.farm-table { width: 100%; border-collapse: collapse; }
.farm-table th, .farm-table td { padding: 12px 16px; text-align: right; border-bottom: 1px solid var(--rule); white-space: nowrap; }
.farm-table th:first-child, .farm-table td:first-child { text-align: left; }
.farm-table th { color: var(--muted); font-size: var(--step--1); font-weight: 500; }
.farm-hero { display: flex; align-items: center; gap: 12px; border: 0; padding: 0; background: transparent; color: var(--signal); cursor: pointer; font: inherit; }
.farm-active { background: var(--signal-soft); }
.farm-picker { position: relative; }
.farm-picker-list { position: absolute; right: 0; top: calc(100% + 8px); width: min(300px, 80vw); max-height: 360px; overflow-y: auto; padding: 16px; background: var(--surface); border: 1px solid var(--rule-strong); border-radius: var(--radius-m); box-shadow: var(--shadow-pop); z-index: 5; }
.farm-picker-list label { gap: 10px; padding: 6px 0; cursor: pointer; }
.farm-picker-list input { width: 18px; height: 18px; accent-color: var(--signal); }
@media (max-width: 600px) {
  .farm-filters .popover-anchor { position: static; }
  .farm-chart, .farm-detail > .card { padding: 16px; }
  .farm-plot { height: 300px; margin-left: 34px; }
  .farm-point .plate { width: 24px; height: 24px; min-width: 24px; }
  .farm-table th, .farm-table td { padding: 10px; }
  .farm-picker-list { left: 0; right: auto; }
}
.farm-detail, .farm-chart, .farm-table { min-width: 0; }
.table-scroll { max-width: 100%; overflow-x: auto; }

.farm-reference.horizontal { left: 0; width: 100%; height: 0; border-left: 0; border-top: 1px dashed var(--rule-strong); }
.farm-point.wr-up, .farm-outcome-point.win { border-color: var(--up); }
.farm-point.wr-down, .farm-outcome-point.loss { border-color: var(--down); }
.farm-point.wr-even { border-color: var(--even); }
.farm-point.budget-low { border-color: var(--cat-1); }
.farm-point.budget-middle { border-color: var(--farm-budget-color, var(--even)); }
.farm-point.budget-unknown { border-color: var(--even); }
.farm-point.budget-high { border-color: var(--cat-4); }
.farm-point.dimmed { opacity: .3; filter: grayscale(.6); }
.farm-point.dimmed:hover, .farm-point.dimmed:focus-visible { opacity: 1; filter: none; }
.farm-point.selected, .farm-point.selected:hover, .farm-point:focus-visible { z-index: 22; }
.farm-reference.strong { border-color: var(--ink-2); border-width: 1.5px; }
.farm-grid.zero > span, .farm-tick.zero { color: var(--ink); font-weight: 700; }
.farm-point-label { position: absolute; left: 50%; bottom: calc(100% + 7px); transform: translateX(-50%); display: grid; gap: 2px; padding: 3px 6px; border: 1px solid var(--ink-2); border-radius: 5px; background: var(--surface); color: var(--ink); font-size: var(--step--2); line-height: 1.3; box-shadow: var(--shadow-pop); pointer-events: none; }
.farm-point-label { width: max-content; white-space: nowrap; }
.farm-point-label.below { top: calc(100% + 7px); bottom: auto; }
.farm-focus-label { border-color: var(--signal); }
.farm-focus-label > span:first-child { font-weight: 700; }
.farm-benefits { margin-top: 20px; gap: 12px; }
.farm-coach { padding: 12px 16px; margin: 16px 0; border-left: 3px solid var(--signal); background: var(--signal-soft); font-size: var(--step--1); line-height: 1.6; }
.farm-leaders { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.farm-leaders g { stroke: var(--muted); fill: var(--muted); stroke-width: 1; opacity: .55; }
.farm-leaders g.active { stroke: var(--signal); fill: var(--signal); opacity: 1; }
.farm-plot.focused .farm-leaders g:not(.active) { opacity: .15; }
.budget-key::before { content: ""; display: inline-block; width: 9px; height: 9px; margin-right: 7px; border: 2px solid; border-radius: 50%; vertical-align: -1px; }
.budget-key.low::before { border-color: var(--cat-1); }
.budget-key.middle::before { border-color: color-mix(in oklab, var(--cat-1), var(--cat-4)); }
.budget-key.high::before { border-color: var(--cat-4); }
.farm-zone { position: absolute; max-width: 43%; font-size: var(--step--2); color: var(--muted); pointer-events: none; }
.farm-zone.top-left { top: 0; left: 4px; }
.farm-zone.top-right { top: 0; right: 4px; text-align: right; }
.farm-zone.bottom-left { bottom: 2px; left: 4px; }
.farm-zone.bottom-right { bottom: 2px; right: 4px; text-align: right; }
.farm-connector { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 20; }
.farm-connector line { stroke: var(--signal); stroke-width: 2.2; stroke-dasharray: 5 3; }
.farm-outcome-point, .farm-outcome-point:focus-visible { position: absolute; transform: translate(-50%, -50%); padding: 2px; border: 2px solid; border-radius: 50%; background: var(--surface); cursor: pointer; z-index: 23; box-shadow: 0 0 0 3px var(--surface); }
.farm-outcome-point .plate { width: 26px; height: 26px; min-width: 26px; border-radius: 50%; }
.farm-symbol { position: absolute; right: -7px; bottom: -6px; padding: 0 3px; border-radius: 3px; background: var(--surface); color: var(--ink); font-size: 12px; font-weight: 700; }
.farm-legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; margin: 16px 0; font-size: var(--step--1); }
.wr-key::before { content: ""; display: inline-block; width: 10px; height: 10px; border: 2px solid currentColor; border-radius: 50%; margin-right: 6px; }
.wr-key.up { color: var(--up); }
.wr-key.even { color: var(--muted); }
.wr-key.down { color: var(--down); }
@media (max-width: 600px) {
  .farm-plot { height: 420px; margin-left: 38px; }
  .farm-zone { font-size: var(--step--2); }
  .farm-legend { gap: 10px; font-size: var(--step--2); }
  .farm-outcome-point .plate { width: 22px; height: 22px; min-width: 22px; }
}

/* Item branches describe the shop category, independently of result tone. */
.slot-weapon { --item-slot: var(--slot-weapon); --item-slot-soft: var(--slot-weapon-soft); }
.slot-vitality { --item-slot: var(--slot-vitality); --item-slot-soft: var(--slot-vitality-soft); }
.slot-spirit { --item-slot: var(--slot-spirit); --item-slot-soft: var(--slot-spirit-soft); }
.item-chip[data-slot] { border: 1px solid var(--item-slot); background: var(--item-slot-soft); }
.it[data-slot], .path-step[data-slot], .item-row[data-slot] { border-left: 3px solid var(--item-slot); }
.it[data-slot] .it-bar > i { background: var(--item-slot); }
.pick-bar { width: 100%; max-width: 48px; height: 3px; border-radius: 2px; background: var(--surface-2); overflow: hidden; }
.pick-bar > i { display: block; height: 100%; background: var(--signal); opacity: .75; }
details.filter-more { position: relative; }
details.filter-more > summary { list-style: none; }
details.filter-more > summary::-webkit-details-marker { display: none; }
.filter-more-pop { position: absolute; right: 0; top: calc(100% + 6px); z-index: 25; padding: var(--space-3); background: var(--surface); border: 1px solid var(--rule-strong); border-radius: var(--radius-m); box-shadow: var(--shadow-pop); width: max-content; max-width: calc(100vw - 32px); }
.filter-more-pop .seg { flex-wrap: wrap; height: auto; }
.fate-bar { height: 6px; margin: 4px 0 2px; gap: 0; }
.fate-bar > span { flex: none; }
.fate-bar > span.up { background: var(--up); }
.fate-bar > span.signal { background: var(--signal); }
.fate-bar > span.down { background: var(--down); }
.path-others .path-tiers { grid-template-columns: repeat(auto-fill, minmax(min(140px, 100%), 1fr)); gap: var(--space-2); }
.path-others .choosable { min-width: 0; padding: 6px; }
@media (max-width: 620px) {
  details.filter-more[open] { flex-basis: 100%; min-width: 0; }
  .filter-more-pop { position: static; max-width: 100%; margin-top: 6px; }
  .filter-more-pop .item-choice { flex-wrap: wrap; }
  .it-effect { font-size: var(--step--1); }
}

/* Short routes back to the player's evidence. */
.finding-go { margin-top: auto; padding-top: var(--space-2); font-size: var(--step--1); }
.hero-actions { margin-top: var(--space-3); gap: var(--space-3); }
details.more.compact > summary { padding: 12px 0; font-size: var(--step-1); }
.findings + .more { margin-top: var(--space-4); }
.recent-resume { display: block; margin-top: var(--space-3); overflow-wrap: anywhere; }
.recent-player-slot { display: contents; }
.nav .recent-player { display: block; max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--signal); }
@media (max-width: 900px) {
  .topbar .shell { height: auto; min-height: 56px; flex-wrap: wrap; padding-top: var(--space-2); padding-bottom: var(--space-2); }
  .nav { flex-wrap: wrap; justify-content: flex-end; min-width: 0; }
}
@media (max-width: 620px) {
  .nav { flex: 1 0 100%; justify-content: flex-start; }
  .nav .recent-player { max-width: min(240px, 100%); }
  .matchup-details > summary { flex-wrap: wrap; gap: var(--space-2); }
}

.recent-short { display: none; }
/* Release 1: predictable header and actionable personal summaries. */
.nav .recent-player { display: inline-flex; align-items: center; }
.hero-lead { min-height: 2.8em; }
.path-cols > *, .path-cols .path-step { min-width: 0; }
.path-cols .ellipsis { white-space: normal; overflow-wrap: anywhere; }
.farm-zone { font-size: max(12px, var(--step--2)); }
.results a.active .muted, .results a.active .sub { color: var(--ink); opacity: 1; }
.match-focus-strip { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin: 16px 0; padding: 12px 16px; border: 1px solid var(--signal); border-radius: var(--radius-m); }
.postmatch-summary { margin: 16px 0; }
.steam-steps { display: flex; flex-wrap: wrap; gap: 12px 32px; padding-left: 20px; }
@media (max-width: 620px) {
  .topbar .shell { display: grid; grid-template-columns: 1fr; height: 83px; min-height: 0; gap: 2px; padding-top: 4px; padding-bottom: 4px; }
  .topbar .brand { font-size: 17px; height: 26px; }
  .topbar .nav { display: flex; flex-wrap: nowrap; width: 100%; gap: 5px; height: 42px; margin: 0; justify-content: flex-start; }
  .topbar .nav > a { display: inline-flex; }
  .topbar .nav a, .topbar .nav button { font-size: var(--step--2); }
  .topbar .nav .recent-player { max-width: none; flex: none; display: inline-flex; align-items: center; padding: 5px; }
  .topbar .header-steam { position: absolute; top: 5px; right: 16px; }
  .topbar .header-steam .steam-link { padding: 4px 8px; }
  .topbar .recent-long { display: none; }
  .topbar .recent-short { display: inline; }
  .topbar .account-link { gap: 4px; margin-left: auto; }
  .topbar .search-trigger { flex: none; padding: 5px; }
  .rank-strip { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .farm-zone { font-size: var(--step--2); }
}

.curve-svg .band { fill: var(--band-fill); stroke: var(--band-stroke); }

.steam-steps .active { color: var(--signal); font-weight: 700; }

/* Five independent match metrics; labels remain readable on narrow screens. */
.postmatch-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: var(--space-3); margin-bottom: var(--space-3); }
.postmatch-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--space-3); margin-top: var(--space-3); }
.postmatch-cell { padding: var(--space-3); border: 1px solid var(--rule); border-radius: var(--radius-s); background: var(--surface-2); display: grid; grid-template-rows: minmax(2.5em, auto) auto 18px auto; gap: 6px; }
.postmatch-val-row { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-2); flex-wrap: wrap; }
.postmatch-val-row .num { font-size: var(--step-2); font-variant-numeric: tabular-nums; }
@media (max-width: 960px) { .postmatch-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 620px) {
  .postmatch-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .postmatch-cell:last-child:nth-child(odd) { grid-column: 1 / -1; }
}
@media (max-width: 360px) {
  .postmatch-grid { grid-template-columns: 1fr; }
  .postmatch-cell { grid-template-rows: auto auto 18px auto; }
}
.postmatch-caption { grid-row: 4; }
.bullet { position: relative; height: 16px; }
.bullet::before { content: ""; position: absolute; inset: 7px 0; background: var(--rule-strong); }
.bullet i { position: absolute; display: block; }
.bullet-band { left: var(--low); width: var(--band); top: 4px; height: 8px; border-radius: 2px; background: var(--rule-strong); }
.bullet-change { left: var(--start); width: var(--change); top: 6px; height: 4px; background: var(--ink-2); }
.bullet.win .bullet-change { background: var(--up); }
.bullet.loss .bullet-change { background: var(--down); }
.bullet-centre { left: var(--centre); top: 1px; width: 2px; height: 14px; background: var(--ink); transform: translateX(-50%); }
.bullet-player { left: var(--dot); top: 3px; width: 9px; height: 9px; background: var(--signal); border: 2px solid var(--surface-2); border-radius: 50%; transform: translateX(-50%); }


.heroes-body, .hero-cards { align-content: start; }
#seo-prerender { max-width: 1160px; margin: 0 auto; padding: 24px clamp(12px, 3vw, 36px); overflow-wrap: anywhere; }
#seo-prerender p { max-width: 72ch; }
#seo-prerender nav { display: flex; flex-wrap: wrap; gap: .5em; margin-block: 1em; }
#seo-prerender .legal { min-width: 0; }
@media (max-width: 620px) {
  #seo-prerender .table { display: block; max-width: 100%; overflow-x: auto; }
}

.night-note,.hydration-status { background:var(--surface-2); border:1px solid var(--rule); color:var(--ink-2); padding:var(--space-3); margin-bottom:var(--space-3); }
.night-note::before { content:""; display:inline-block; width:7px; height:7px; border-radius:50%; background:var(--warn); margin-right:.6em; }
main[hidden] { display:none; }

.row.night-actions { gap: 12px; margin-top: 16px; align-items: center; }

.skip-link { position: absolute; z-index: 50; inset: 0 auto auto 0; transform: translateY(-110%); padding: 12px; background: var(--surface); }
.skip-link:focus { transform: none; }
.guest-strip { min-height: 56px; padding-block: var(--space-2); gap: var(--space-3); border-block: 1px solid var(--rule); }
.hero-context-bar { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-3); margin-block-end: var(--space-3); }
.it .item-name, .item-row .item-name { white-space: normal; overflow-wrap: anywhere; }
@media (max-width: 620px) {
  input, select, textarea { font-size: 16px; }
  .chip, .btn, .segmented button, .nav a { min-height: 40px; }
  .board .hero-row, .board .head { grid-template-columns: 24px minmax(0, 1fr) auto; }
  .board .hero-row .who { grid-column: 2 / 4; }
  .board .hero-row .who span { white-space: normal; overflow: visible; }
  .board .hero-row > :nth-child(3) { grid-column: 2; }
  .board .hero-row > :nth-child(4) { grid-column: 3; }
}
@media (max-width: 380px) {
  .rank-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}


.topbar .shell { display: flex; flex-wrap: nowrap; align-items: center; height: 55px; min-height: 55px; }
.mobile-menu { display: none; }
body:has(#seo-prerender):not(:has(.topbar))::before { display: block; content: ""; height: 56px; }
#seo-prerender { min-height: 100vh; padding-top: var(--space-7); }
.wr .range { grid-column: 1 / -1; white-space: nowrap; font-size: var(--step--2); color: var(--muted); }
.chip.secondary.on { background: var(--surface-2); color: var(--ink); border-color: var(--rule-strong); }
.rank-page .rank-lead { max-width: 62ch; }
.rank-page .kpi { min-width: 0; }
.rank-page .kpi .value { font-family: var(--font-display); font-size: var(--step-2); overflow-wrap: anywhere; }
.rank-chart-panel { margin-block: var(--space-5); min-width: 0; }
.rank-chart { position: relative; padding-top: 40px; }
.rank-flag { position: absolute; top: 0; left: clamp(0px, calc(var(--selected) - 13rem), calc(100% - 26rem)); max-width: 100%; color: var(--signal); font-size: var(--step--1); font-weight: 600; }
.rank-bars { position: relative; display: flex; gap: 2px; height: 196px; border-bottom: 1px solid var(--rule-strong); }
.rank-column { display: flex; align-items: flex-end; flex: 1; min-width: 0; padding: 0; border: 0; background: transparent; cursor: pointer; }
.rank-column span { height: var(--fill); width: 100%; background: var(--rank); border-radius: 2px 2px 0 0; pointer-events: none; }
.rank-column.before span { opacity: .68; }
.rank-column.on { position: relative; background: color-mix(in oklab, var(--signal) 10%, transparent); }
.rank-column.on span { background: var(--signal); }
.rank-column.on::before { content: ""; position: absolute; top: 0; left: 50%; height: 100%; width: 1px; background: var(--signal); pointer-events: none; }
.rank-axis { display: grid; grid-template-columns: repeat(11, minmax(0, 1fr)); margin-block: var(--space-2); text-align: center; }
.rank-axis > div { display: grid; align-content: start; justify-items: center; gap: 3px; font-size: var(--step--2); min-width: 0; }
.rank-axis img { object-fit: contain; }
.rank-dot { display: inline-block; flex: none; width: 14px; height: 14px; border-radius: 50%; }
.rank-label { gap: var(--space-2); }
.rank-control { display: flex; align-items: center; gap: var(--space-3); font-size: var(--step--1); color: var(--muted); }
.rank-slider { flex: 1; max-width: 36rem; min-width: 0; height: 38px; accent-color: var(--signal); }
.rank-tooltip, .dumbbell-tip { position: absolute; z-index: 2; background: var(--surface); color: var(--ink); border: 1px solid var(--rule-strong); border-radius: var(--radius-s); padding: 4px 8px; font-size: var(--step--2); pointer-events: none; }
.rank-tooltip { bottom: 10px; left: 0; max-width: 100%; }
.rank-reference { columns: 2; column-gap: var(--space-5); }
.rank-heroes { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-3); }
.rank-heroes a { display: grid; grid-template-columns: auto auto; align-items: center; gap: 0 4px; }
.rank-heroes small { grid-column: 2; }
.rank-tiers th, .rank-tiers td { text-align: left; }
.plate.xs { width: 22px; height: 22px; flex: none; }
.patch-movers { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-4); margin-block: var(--space-3); }
.patch-hero { gap: 6px; min-width: 0; overflow-wrap: anywhere; }
.patch-shifts { margin-block: var(--space-4); }
.patch-shifts h2, .patch-collecting h2 { font-size: var(--step-1); }
.patch-cutoff, .shift-rate, .shift-pr { white-space: nowrap; }
.patch-collecting { margin-block: var(--space-4); }
.shift-row, .shift-chart-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(12rem, .9fr) minmax(8rem, 1fr) minmax(6rem, .6fr); align-items: center; gap: var(--space-3); }
.shift-row { padding-block: 8px; border-top: 1px solid var(--rule); font-size: var(--step--1); }
.shift-rate { display: flex; gap: 8px; align-items: baseline; }
.shift-pr { text-align: right; }
.dumbbell-scale { display: grid; grid-template-columns: repeat(3, auto); justify-content: space-between; grid-column: 3; margin: 6px 5px; font-size: var(--step--2); color: var(--muted); }
.dumbbell { position: relative; height: 24px; margin-inline: 5px; --move: var(--up); }
.dumbbell.down { --move: var(--down); }
.dumbbell-axis { position: absolute; left: 50%; height: 100%; border-left: 1px solid var(--rule-strong); }
.dumbbell-track { position: absolute; top: 11px; height: 2px; left: min(var(--before), var(--after)); right: calc(100% - max(var(--before), var(--after))); background: var(--move); }
.dumbbell-before, .dumbbell-after { position: absolute; top: 7px; width: 10px; height: 10px; transform: translateX(-50%); border-radius: 50%; border: 2px solid var(--move); }
.dumbbell-before { left: var(--before); background: var(--surface); }
.dumbbell-after { left: var(--after); background: var(--move); }
.dumbbell-tip { right: 0; bottom: 100%; visibility: hidden; width: max-content; max-width: 100%; }
.dumbbell:hover .dumbbell-tip, .dumbbell:focus .dumbbell-tip { visibility: visible; }
.patch-notes p { max-width:72ch; }
article.legal { max-width:68ch; }
.legal > .row { border-top:1px solid var(--rule); padding-top:var(--space-4); }
@media (max-width:760px) {
  .topbar .shell { gap:8px; padding-block:0; justify-content:space-between; }
  .topbar .nav { flex: 0 0 auto; width: auto; margin-left: auto; height: auto; flex-wrap: nowrap; justify-content: flex-end; gap: 4px; }
  .topbar .nav > .desktop-nav, .topbar .nav > .account-link, .search-trigger .nav-long { display:none; }
  .topbar .nav > a[href="/"] { display:inline-flex; align-items:center; padding-inline:8px; min-height:44px; }
  .topbar .search-trigger,.mobile-menu summary { width:44px; height:44px; display:grid; place-items:center; cursor:pointer; }
  .mobile-menu { display:block; position:relative; }
  .mobile-menu nav { position:absolute; right:0; min-width:190px; background:var(--surface); padding:8px; border:1px solid var(--rule); box-shadow:var(--shadow-pop); }
  .mobile-menu nav > * { display:flex; align-items:center; min-height:44px; }
 .topbar .nav .search-trigger::before {content:"";width:20px;height:20px;background:currentColor;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Ccircle cx='10' cy='10' r='7'/%3E%3Cpath d='m15 15 7 7'/%3E%3C/svg%3E") center/contain;}
}
@media (max-width: 900px) {
  .rank-tiers, .rank-tiers thead, .rank-tiers tbody { display: block; white-space: normal; }
  .rank-tiers thead { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); }
  .rank-tiers tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; border-bottom: 1px solid var(--rule-strong); padding-block: var(--space-2); }
  .rank-tiers td, .rank-tiers th { border: 0; min-width: 0; }
  .rank-tiers td::before { content: attr(data-label); display: block; color: var(--muted); font-size: var(--step--2); }
  .rank-tiers td:nth-child(3), .rank-tiers td:nth-child(n+5) { grid-column: 1 / -1; }
  .shift-row, .shift-chart-head { grid-template-columns: minmax(0, 1fr) minmax(0, 1.22fr); gap: 4px 8px; }
  .dumbbell-scale { grid-column: 1; }
  .shift-rate { justify-content: flex-end; flex-wrap: wrap; }
}
@media (max-width: 620px) {
  .rank-page .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rank-page .kpi:first-child { grid-column: span 2; }
  .rank-bars { gap: 1px; }
  .rank-flag { left: 0; }
  .rank-axis-name { display: none; }
  .rank-axis img { width: 20px; height: 20px; }
  .rank-axis .num { font-size: .56rem; }
  .rank-reference { columns: 1; }
  .rank-subtable { font-size: var(--step--2); }
  .rank-subtable th, .rank-subtable td { padding-inline: 3px; white-space: normal; }
  .rank-subtable .rank-label { gap: 3px; }
  .rank-subtable .rank-label img { width: 15px; height: 15px; }
  .pulse-filters .seg { max-width: 100%; flex-wrap: wrap; height: auto; }
  .patch-detail { padding-top: var(--space-4); }
  .patch-detail h1 { font-size: var(--step-2); line-height: 1.12; margin-block: var(--space-2); }
  .patch-detail .section-head { margin: var(--space-3) 0; gap: var(--space-2); }
  .patch-detail .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-block: var(--space-2); }
  .patch-detail .kpi { padding: var(--space-2) 4px; }
  .patch-detail .kpi .value { font-size: var(--step-0); overflow-wrap: anywhere; }
  .patch-shifts { padding: var(--space-3); }
  .shift-rate { gap: 2px 6px; }
  .shift-row .plate { width: 22px; height: 22px; min-width: 22px; }
}

.home-kpi-hero { font-family: var(--font-display); gap: var(--space-2); overflow-wrap: anywhere; }
.home-kpi-hero .plate { flex: 0 0 30px; width: 30px; height: 30px; }
@media (min-width: 1200px) {
  .hello { grid-template-columns: minmax(0, 1fr) minmax(350px, 384px); }
  .hello h1 { font-size: clamp(1.9rem, 3.05vw, 2.5rem); max-width: none; }
}
@media (max-width: 340px) {
  .search { gap: var(--space-2); padding-inline: var(--space-2); }
  .search .btn { padding-inline: var(--space-2); }
}

.hero-context-bar { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; }
.hero-context-bar .controls { min-width: 0; }
.hero-mode { gap: 5px; }
.hero-mode select { min-width: 0; border: 0; background: transparent; padding: 2px; }
.slice-settings > button { white-space: nowrap; }
.slice-panel { display: grid; gap: var(--space-3); padding: var(--space-3); width: min(390px, calc(100vw - 32px)); max-height: 65vh; overflow-y: auto; }
.slice-panel .seg { flex-wrap: wrap; height: auto; }
.slice-choice { display: grid; gap: 4px; justify-items: start; }
.it-name { white-space: normal; overflow-wrap: anywhere; overflow: visible; text-overflow: clip; min-height: 2.4em; line-height: 1.2; }
.it-uncertainty { grid-column: 2 / -1; font-size: var(--step--2); }
@media (max-width: 760px) {
  .hero-context-bar { grid-template-columns: minmax(0, 1fr); }
  .slice-settings { justify-self: end; }
  .hero-context-bar .section-head { margin-bottom: 0; }
}

/* Coaching example */
.focal-card { background: var(--focal-bg); color: var(--focal-ink); border-color: var(--focal-rule); }
.focal-card .label, .focal-card .muted { color: var(--focal-muted); }
.focal-card :focus-visible { outline: 2px solid var(--focal-signal); outline-offset: 2px; }
.focal-card .help > summary { background: var(--focal-surface-2); color: var(--focal-ink); border: 1px solid var(--focal-rule); }
.focal-card .help-body { background: var(--focal-surface-2); color: var(--focal-ink); border-color: var(--focal-rule); }
:root:not([data-theme="dark"]) .focal-card :is(.label, .verdict-cohort, .home-preview-links) { letter-spacing: .005em; }
.focal-grade { width: 32px; height: 32px; display: inline-grid; place-items: center; flex: none; border: 1px solid var(--focal-rule); border-radius: var(--radius-s); background: var(--focal-surface-2); font: 700 var(--step-1)/1 var(--font-display); color: var(--focal-ink); }
.match-selected { flex-wrap: wrap; }
.match-verdict { display: grid; gap: var(--space-4); }
.match-verdict p { margin: 4px 0 0; color: var(--focal-ink-2); }
.match-verdict p.focal-warning { color: var(--focal-warn); }
.verdict-top { flex-wrap: wrap; }
.verdict-priority { font-size: var(--step--1); }
.verdict-body { display: grid; gap: var(--space-4); }
.verdict-action { border-top: 1px solid var(--focal-rule); padding-top: var(--space-3); }
.verdict-cohort { font-size: var(--step--1); }
.verdict-positive h2 { color: var(--focal-up); }
.verdict-evidence { border-top: 1px solid var(--focal-rule); padding-top: var(--space-3); }
.verdict-evidence summary { cursor: pointer; }
.verdict-moments { margin-top: var(--space-3); }
.verdict-moments .chip { background: var(--focal-surface-2); border-color: var(--focal-rule); color: var(--focal-ink); }
@media (min-width: 900px) {
  .verdict-body { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); }
  .verdict-action { border: 0; border-left: 1px solid var(--focal-rule); padding: 0 0 0 var(--space-4); }
}

.match-deaths { margin: var(--space-4) 0; }
.death-clean { color: var(--up); }
.death-summary { margin-block: var(--space-2); }
.death-filters button[aria-pressed="true"] { color: var(--ink); background: var(--surface); border-radius: var(--radius-s); }
.death-timeline { height: 28px; margin: var(--space-4) 16px var(--space-3); position: relative; }
.death-timeline::before { content: ""; position: absolute; top: 8px; inset-inline: 0; border-top: 1px solid var(--rule-strong); }
.death-tick { position: absolute; top: 13px; transform: translateX(-50%); color: var(--muted); font-size: var(--step--2); white-space: nowrap; }
.death-dot { position: absolute; z-index: 1; top: -3px; width: 22px; height: 22px; border: 0; padding: 0; transform: translateX(-50%); background: transparent; cursor: pointer; }
.death-dot::before { content: ""; display: block; margin: auto; width: 8px; height: 8px; background: var(--ink-2); border: 1px solid var(--surface); border-radius: 50%; }
.death-dot.marked::before { background: var(--down); }
.death-list { padding: 0; margin: 0; list-style: none; }
.death-row { display: grid; grid-template-columns: minmax(84px, .7fr) minmax(90px, 1fr) minmax(0, 2fr) minmax(0, 1fr); gap: 8px; align-items: center; padding: 8px 0; border-top: 1px solid var(--rule); scroll-margin-top: 70px; }
.death-row.highlighted { background: var(--up-soft); }
.death-time { display: grid; }
.death-killer { gap: 6px; overflow-wrap: anywhere; }
.death-tag { border-radius: var(--radius-s); padding-inline: 6px; background: var(--down-soft); color: var(--down); font-size: var(--step--1); }
.death-tag.context { background: var(--surface-2); color: var(--ink-2); }
.death-pocket { color: var(--ink-2); font-size: var(--step--1); }
.match-deaths .more { margin-top: var(--space-3); }
@media (max-width: 620px) {
  .death-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); }
  .death-tick { font-size: .625rem; }
}

.home-preview-hold { min-height: 218px; }
.home-preview-host { min-width: 0; }
@media (max-width: 620px) {
  .home-kpis { min-height: 225px; }
}
.home-preview { display: grid; gap: 8px; align-content: start; min-height: 218px; padding: 16px 20px; }
.home-preview-top, .home-preview-hero { gap: 6px; }
.home-preview-top .rank-badge { color: var(--focal-muted); border-color: var(--focal-rule); }
.home-preview-hero strong:not(.focal-grade) { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.home-preview-hero .num { color: var(--focal-ink-2); white-space: nowrap; }
.home-preview-copy { min-width: 0; }
.home-preview-copy :is(h2,p) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin: 0; }
.home-preview-copy h2 { font-size: var(--step-0); }
.home-preview-copy p { font-size: var(--step--1); color: var(--focal-ink-2); }
.home-preview-axes { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 8px; }
.preview-axis { font-size: 11px; white-space: nowrap; color: var(--focal-muted); }
.preview-track { height: 4px; background: var(--focal-surface-2); border-radius: 2px; outline: 1px solid var(--focal-rule); }
.preview-track i { display: block; height: 100%; background: var(--focal-signal); border-radius: 2px; }
.home-preview-links { flex-wrap: nowrap; gap: 6px; font-size: var(--step--1); white-space: nowrap; color: var(--focal-muted); }
.focal-card .focal-cta { min-height: 32px; padding: 5px 9px; background: var(--focal-signal); border-color: var(--focal-signal); color: var(--focal-on-signal); }
.home-preview-host .recent > .link { display: inline-block; margin-top: 6px; }
@media (max-width: 900px) {
  .home-preview-hold { min-height: 208px; }
  .home-preview { min-height: 208px; padding: 14px 16px; }
}
@media (max-width: 360px) {
  .home-preview-top .rank-badge, .home-preview-links { font-size: var(--step--2); }
}
