:root {
  --bg: #121a24;
  --bg-deep: #0e141c;
  --panel: #1d2735;
  --panel-2: #263345;
  --line: #34445a;
  --text: #ece6d8;
  --muted: #a1acbb;
  --faint: #8794a6;
  --t: #e3a84e;
  --ct: #7398db;
  --kick: #e0503f;
  --yes: #7cc47f;

  --font-display: 'Fira Sans Extra Condensed', 'Arial Narrow', sans-serif;
  --font-body: 'Golos Text', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --step--1: 0.9375rem;
  --step-0: 1.0625rem;
  --step-1: 1.3rem;
  --step-2: 1.6rem;
  --step-3: 2.1rem;

  --wrap: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 10px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  /* Без WebGL дым заменяет этот статичный градиент */
  background:
    radial-gradient(60% 55% at 78% 42%, rgba(160, 172, 188, 0.16), transparent 70%),
    radial-gradient(90% 60% at 0% 0%, #1c2a3c 0%, transparent 60%),
    var(--bg);
  color: var(--text);
  font: 400 var(--step-0)/1.55 var(--font-body);
  min-height: 100vh;
  overflow-x: hidden;
}

.smoke {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.top, main, .foot { position: relative; z-index: 1; }

/* Гранаты поверх всего сайта: HE пробивает «экран», смок закрывает текст */
.fx {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 60;
  pointer-events: none;
}
.flashbang {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: #fff;
  opacity: 0;
  pointer-events: none;
}

a { color: var(--text); text-underline-offset: 3px; text-decoration-color: color-mix(in srgb, var(--text) 40%, transparent); }
a:hover { text-decoration-color: currentColor; }

:focus-visible { outline: 2px solid var(--t); outline-offset: 3px; border-radius: 4px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.top, main, .foot {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* Шапка */
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 22px 0;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font: 800 1.5rem/1 var(--font-display);
  text-decoration: none;
  white-space: nowrap;
}
.brand-game {
  font: 700 0.8rem/1 var(--font-display);
  color: var(--bg-deep);
  background: var(--t);
  padding: 3px 6px 2px;
  border-radius: 3px;
}
.top-nav { display: flex; align-items: center; gap: 18px; }
/* Шапка лежит поверх дыма: тень держит текст читаемым даже на светлом облаке */
.top-link { color: var(--muted); text-decoration: none; font-size: var(--step--1); text-shadow: 0 0 10px var(--bg-deep), 0 0 4px var(--bg-deep); }
.top-link:hover { color: var(--text); }
.top-tg {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border-radius: 999px;
  background: #2aa3df;
  color: #fff;
  font: 600 var(--step--1)/1 var(--font-body);
  text-decoration: none;
}
.top-tg:hover { background: #3cb2ec; }
.top-tg svg { width: 16px; height: 16px; fill: currentColor; }

.lang { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; background: color-mix(in srgb, var(--bg-deep) 80%, transparent); }
.lang button {
  padding: 6px 11px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: 600 var(--step--1)/1 var(--font-body);
  cursor: pointer;
}
.lang button:hover { color: var(--text); }
.lang button[aria-pressed="true"] { background: var(--text); color: var(--bg-deep); }

/* Первый экран */
.hero {
  min-height: min(88vh, 860px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-block: 56px 40px;
}
.hero > button, .hero > p { align-self: flex-start; }

h1 {
  font: 800 clamp(3.6rem, 12vw, 8.5rem)/0.86 var(--font-display);
  letter-spacing: -0.012em;
  margin: 0 0 24px;
  max-width: 8ch;
  text-shadow: 0 2px 40px rgba(18, 26, 36, 0.6);
}

.lead {
  max-width: 50ch;
  color: var(--muted);
  text-shadow: 0 1px 18px rgba(18, 26, 36, 0.9);
  font-size: var(--step-1);
  line-height: 1.45;
  margin: 0 0 32px;
}

.search {
  display: flex;
  align-items: stretch;
  max-width: 780px;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--bg-deep) 88%, transparent);
  backdrop-filter: blur(6px);
  overflow: hidden;
  transition: border-color 0.15s;
}
.search:focus-within { border-color: var(--t); }

.search input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: 0;
  color: var(--text);
  font: 500 var(--step-0)/1 var(--font-body);
  padding: 18px;
}
.search input::placeholder { color: var(--faint); }
.search input:focus { outline: none; }

.search-file {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 14px;
  border: 0;
  border-left: 1px solid var(--line);
  background: color-mix(in srgb, var(--panel) 70%, transparent);
  color: var(--text);
  font: 600 var(--step--1)/1 var(--font-body);
  white-space: nowrap;
  cursor: pointer;
}
.search-file svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.search-file:hover { background: var(--panel-2); }
.search-file:disabled { opacity: 0.6; cursor: progress; }

.search-go {
  border: 0;
  background: var(--t);
  color: var(--bg-deep);
  font: 700 1.2rem/1 var(--font-display);
  letter-spacing: 0.02em;
  padding: 0 24px;
  cursor: pointer;
}
.search-go:hover { background: #efb860; }
.search-go:disabled { opacity: 0.6; cursor: progress; }

.input-hint { max-width: 780px; min-height: 1.5em; margin: 8px 0 0; color: var(--muted); font-size: var(--step--1); }
.input-hint.is-ok { color: var(--yes); }
.input-hint.is-warn { color: var(--t); }

.status { max-width: 780px; margin-top: 6px; }
.status-text:empty { display: none; }
.status-text { margin: 0; color: var(--muted); max-width: 70ch; }
.status.is-error .status-text { color: #ff9b8c; }
.status-bar {
  height: 6px;
  margin-top: 10px;
  border-radius: 999px;
  background: var(--bg-deep);
  overflow: hidden;
}
.status-bar span {
  display: block;
  height: 100%;
  width: var(--p, 0%);
  background: var(--t);
  border-radius: inherit;
  transition: width 0.2s linear;
}

.status-bar.is-busy span { width: 30%; animation: busy 1.1s ease-in-out infinite alternate; }
@keyframes busy { from { transform: translateX(-10%); } to { transform: translateX(250%); } }

.formats { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 18px; }
.formats-label { color: var(--muted); font-size: var(--step--1); }
.formats-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.fmt {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 70%, transparent);
  color: var(--muted);
  font: 500 var(--step--1)/1.2 var(--font-body);
  cursor: pointer;
}
.fmt:hover { color: var(--text); border-color: var(--muted); }
.fmt[aria-selected="true"] { color: var(--bg-deep); background: var(--text); border-color: var(--text); }

.help-toggle {
  margin-top: 14px;
  padding: 2px 0;
  border: 0;
  background: none;
  color: var(--t);
  font: 500 var(--step--1)/1.3 var(--font-body);
  text-decoration: underline dotted;
  text-underline-offset: 4px;
  cursor: pointer;
}
.help-toggle:hover { text-decoration-style: solid; }

.help {
  max-width: 780px;
  margin-top: 12px;
  padding: 16px 20px;
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--panel) 94%, transparent);
  color: var(--muted);
}
.help[hidden] { display: none; }
.help-body > :first-child { margin-top: 0; }
.help-body ol, .help-body ul { margin: 0; padding-left: 1.3em; }
.help-body li + li { margin-top: 4px; }
.help-body p { margin: 10px 0 0; }
.help-body strong { color: var(--text); font-weight: 600; }
.help-note { margin: 12px 0 0; color: var(--faint); font-size: var(--step--1); }
.help code, .where code {
  font: 500 0.92em/1.3 var(--font-body);
  color: var(--text);
  background: var(--bg-deep);
  padding: 1px 6px;
  border-radius: 4px;
  overflow-wrap: anywhere;
}

.small-head { font: 700 var(--step-1)/1.2 var(--font-display); margin: 0 0 10px; }

.history { margin-top: 30px; }
.history ul, .picker ul { list-style: none; margin: 0; padding: 0; }
.history ul { display: flex; flex-wrap: wrap; gap: 8px; }
.history a {
  display: inline-block;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--bg) 70%, transparent);
  text-decoration: none;
  font-size: var(--step--1);
}
.history a:hover { border-color: var(--muted); }
.history .h-date { color: var(--faint); }

.example { margin: 26px 0 0; color: var(--muted); }
.grenade-hint { margin: 10px 0 0; color: var(--faint); font-size: var(--step--1); }
.no-grenades .grenade-hint { display: none; }

/* После поиска первый экран сжимается до заголовка и строки поиска */
.hero.is-compact { min-height: 0; padding-block: 26px 22px; }
.hero.is-compact h1 { font-size: clamp(2rem, 6vw, 3rem); max-width: none; margin-bottom: 14px; }
.hero.is-compact :is(.lead, .formats, .help-toggle, .help, .history, .example, .grenade-hint) { display: none; }

/* Матча нет на Leetify */
.missing, .picker {
  margin-bottom: 48px;
  padding: clamp(20px, 4vw, 32px);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--panel) 94%, transparent);
}
.missing h2, .picker h2 { font: 800 var(--step-3)/1 var(--font-display); margin: 0 0 12px; }
.missing > p { color: var(--muted); max-width: 64ch; margin: 0 0 20px; }

.dropzone {
  display: grid;
  gap: 6px;
  place-items: center;
  text-align: center;
  padding: 34px 18px;
  border: 2px dashed var(--line);
  border-radius: var(--radius);
  background: var(--bg-deep);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.dropzone span { color: var(--muted); font-size: var(--step--1); }
.dropzone:hover, .dropzone.is-over { border-color: var(--t); background: color-mix(in srgb, var(--t) 8%, var(--bg-deep)); }

.where { margin: 22px 0 0; color: var(--muted); max-width: 72ch; }
.where ul { margin: 0; padding-left: 1.3em; }
.where li + li { margin-top: 6px; }
.where p { margin: 12px 0 0; }
.where strong { color: var(--text); font-weight: 600; }

.drop-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  background: rgba(14, 20, 28, 0.82);
  backdrop-filter: blur(4px);
}
.drop-overlay[hidden] { display: none; }
.drop-overlay p {
  margin: 0;
  padding: 40px 48px;
  border: 3px dashed var(--t);
  border-radius: 16px;
  font: 800 var(--step-3)/1.1 var(--font-display);
  text-align: center;
}

/* Выбор матча из профиля */
.picker-head { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.picker-head:empty { display: none; }
.picker-head img { width: 52px; height: 52px; border-radius: 8px; object-fit: cover; background: var(--bg-deep); }
.picker-head b { display: block; font: 800 var(--step-2)/1 var(--font-display); }
.picker-head span { color: var(--muted); font-size: var(--step--1); }
.picker li + li { border-top: 1px solid var(--line); }
.picker button {
  width: 100%;
  display: grid;
  grid-template-columns: 5.5rem 1fr auto auto;
  gap: 16px;
  align-items: baseline;
  padding: 12px 6px;
  background: none;
  border: 0;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.picker button:hover { background: var(--panel-2); }
.pk-res { font: 700 var(--step-1)/1 var(--font-display); font-variant-numeric: tabular-nums; }
.pk-res.win { color: var(--yes); }
.pk-res.loss { color: var(--kick); }
.pk-map { font-weight: 600; }
.pk-meta { color: var(--muted); font-size: var(--step--1); }

/* Вердикт: панель голосования за кик, главный элемент страницы */
.result { padding-bottom: 64px; scroll-margin-top: 16px; }

.vote {
  position: relative;
  background: linear-gradient(180deg, color-mix(in srgb, var(--panel-2) 96%, transparent), color-mix(in srgb, var(--panel) 96%, transparent));
  border-left: 6px solid var(--kick);
  border-radius: 4px var(--radius) var(--radius) 4px;
  padding: clamp(20px, 4vw, 34px) clamp(18px, 4vw, 38px);
  box-shadow: 0 24px 60px -30px rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
}
.vote--clear { border-left-color: var(--yes); }

.vote-head { margin: 0; color: var(--muted); font: 500 var(--step-1)/1.2 var(--font-display); }
.vote-name {
  margin: 4px 0 6px;
  font: 800 clamp(3rem, 12vw, 7rem)/0.95 var(--font-display);
  letter-spacing: -0.01em;
  overflow-wrap: anywhere;
}
.vote-match { margin: 0; color: var(--muted); }
/* Формат ссылки задан правилами Leetify: жирный и/или их розовый */
.view-leetify { color: #f84982; font-weight: 600; margin-left: 8px; white-space: nowrap; }
.vote-own { margin: 14px 0 0; color: var(--faint); font-size: var(--step--1); max-width: 72ch; }

.vote-stats { display: flex; flex-wrap: wrap; gap: 14px 40px; margin: 22px 0 0; }
.vote-stats[hidden] { display: none; }
.vote-stats dt { color: var(--muted); font-size: var(--step--1); }
.vote-stats dd { margin: 0; }
.vote-stats dd:not(.sub) { font: 800 var(--step-3)/1.05 var(--font-display); font-variant-numeric: tabular-nums; }
.vote-stats dd.neg { color: #ff8f80; }
.vote-stats dd.sub { color: var(--faint); font-size: var(--step--1); }

.vote-gauges {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 18px 32px;
  margin-top: 26px;
  max-width: 720px;
}
.gauge-label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: var(--step--1);
}
.gauge-label b { color: var(--text); font: 800 var(--step-3)/1 var(--font-display); font-variant-numeric: tabular-nums; }
.gauge-track { height: 10px; border-radius: 999px; background: var(--bg-deep); overflow: hidden; }
.gauge-track span {
  display: block;
  height: 100%;
  width: var(--fill, 0%);
  background: var(--kick);
  border-radius: inherit;
  transition: width 0.9s cubic-bezier(.2, .7, .2, 1) 0.25s;
}
.gauge-track--quiet span { background: var(--muted); }
/* Уверенность — свойство вывода, а не вина игрока: свой цвет, чтобы не читалась как вторая «доля» */
.gauge-track--conf span { background: var(--ct); }
.gauge-track { cursor: help; }

.vote-keys { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.key {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px 10px 10px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--bg-deep);
  color: var(--text);
  font: 600 var(--step-0)/1 var(--font-body);
  cursor: pointer;
}
.key kbd { font: 700 0.95rem/1 var(--font-display); padding: 5px 7px 4px; border-radius: 5px; color: var(--bg-deep); }
.key--yes kbd { background: var(--kick); }
.key--no kbd { background: var(--yes); }
.key:hover { border-color: var(--muted); }
.key[aria-expanded="true"] { border-color: var(--text); }

.summary {
  font-size: var(--step-2);
  line-height: 1.35;
  max-width: 36ch;
  margin: 30px 0 8px;
  text-shadow: 0 1px 24px rgba(18, 26, 36, 0.8);
}
.near, .source-note { color: var(--muted); margin: 0; max-width: 70ch; }
.source-note { font-size: var(--step--1); margin-top: 6px; }
.source-note:empty { display: none; }

.panel {
  margin-top: 26px;
  padding: 22px 24px;
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--panel) 96%, transparent);
  max-width: 760px;
}
.panel h3 { font: 700 var(--step-2)/1.1 var(--font-display); margin: 0 0 14px; }
.panel--why { border-top: 3px solid var(--kick); }
.panel--defense { border-top: 3px solid var(--yes); }

.reasons { list-style: none; margin: 0; padding: 0; }
.reasons li {
  display: grid;
  grid-template-columns: 3.4rem 1fr;
  gap: 4px 14px;
  align-items: center;
  padding: 8px 0;
}
.reasons .r-weight { font: 800 var(--step-1)/1 var(--font-display); color: var(--kick); font-variant-numeric: tabular-nums; }
.reasons .r-bar { grid-column: 2; height: 4px; border-radius: 999px; background: var(--bg-deep); overflow: hidden; }
.reasons .r-bar span { display: block; height: 100%; background: var(--kick); opacity: 0.75; }

.defense { margin: 0; padding-left: 1.2em; }
.defense li { padding: 5px 0; }
.defense li::marker { color: var(--yes); }

.note { color: var(--muted); font-size: var(--step--1); margin: 14px 0 0; }

.share { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 30px; }
.share > button, .share-more > button {
  padding: 11px 16px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  color: var(--text);
  font: 500 var(--step--1)/1 var(--font-body);
  cursor: pointer;
}
.share > button:hover, .share-more > button:hover { border-color: var(--muted); background: var(--panel); }
.share-more { position: relative; }
.share-more > button { font-size: 1.1rem; padding: 8px 14px; letter-spacing: 0.08em; }
.share-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  min-width: 220px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 16px 40px -16px rgba(0, 0, 0, 0.8);
}
.share-menu[hidden] { display: none; }
.share-menu button {
  padding: 10px 12px;
  border: 0;
  border-radius: 6px;
  background: none;
  color: var(--text);
  font: 500 var(--step--1)/1.2 var(--font-body);
  text-align: left;
  cursor: pointer;
}
.share-menu button:hover { background: var(--panel-2); }
.share-menu a {
  padding: 10px 12px;
  border-radius: 6px;
  color: var(--text);
  font: 500 var(--step--1)/1.2 var(--font-body);
  text-decoration: none;
}
.share-menu a:hover { background: var(--panel-2); }
.share-wrong { margin-left: auto; color: var(--muted); font-size: var(--step--1); }
.share-wrong:hover { color: var(--text); }
.share-tg {
  padding: 11px 16px;
  border-radius: 8px;
  background: #2aa3df;
  color: #fff;
  font: 600 var(--step--1)/1 var(--font-body);
  text-decoration: none;
}
.share-tg:hover { background: #3cb2ec; }
.share-note { color: var(--yes); font-size: var(--step--1); }

/* Номинации */
.awards, .board { margin-top: 52px; }
.awards h3, .board h3 { font: 800 var(--step-3)/1 var(--font-display); margin: 0 0 18px; }
/* Флекс вместо сетки: последний ряд растягивается, пустых ячеек не бывает */
.awards ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 1px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--line);
}
.awards li {
  flex: 1 1 250px;
  padding: 14px 16px;
  background: color-mix(in srgb, var(--bg) 96%, black);
}
.aw-title { display: block; color: var(--t); font: 700 var(--step-0)/1.2 var(--font-display); }
.aw-name { display: block; font-weight: 600; margin-top: 2px; overflow-wrap: anywhere; }
.aw-text { display: block; color: var(--muted); font-size: var(--step--1); }

/* Таблица матча */
.team + .team { margin-top: 30px; }
.team-head { display: flex; align-items: baseline; gap: 14px; margin-bottom: 8px; }
.team-score { font: 800 var(--step-3)/1 var(--font-display); font-variant-numeric: tabular-nums; }
.team-title { font-weight: 600; }
.team-side { color: var(--muted); font-size: var(--step--1); }
.team--T .team-score { color: var(--t); }
.team--CT .team-score { color: var(--ct); }

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--bg) 92%, transparent);
}
.board-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 20px; margin-bottom: 18px; }
.board-head h3 { margin: 0; }
.board-hint { color: var(--faint); font-size: var(--step--1); }

/* Фиксированные ширины колонок, чтобы цифры двух команд стояли друг под другом */
table { width: 100%; border-collapse: collapse; table-layout: fixed; min-width: 1060px; }
col.c-num { width: 96px; }
col.c-rating { width: 160px; }
col.c-share { width: 184px; }
th, td { padding: 10px 12px; text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
th:first-child, td:first-child { text-align: left; }
thead th { font: 500 var(--step--1)/1.2 var(--font-body); color: var(--muted); background: var(--bg-deep); }
thead th[aria-sort] { color: var(--text); }
.sort {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  max-width: 100%;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
}
.sort:hover { color: var(--text); }
tbody tr + tr td { border-top: 1px solid color-mix(in srgb, var(--line) 60%, transparent); }
td { font-variant-numeric: tabular-nums; }
td.num-strong { font-weight: 700; }
.pl-name { display: inline-block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; vertical-align: bottom; font-weight: 600; text-decoration: none; }
.pl-name:hover { text-decoration: underline; }
tr.is-culprit td { background: color-mix(in srgb, var(--kick) 16%, transparent); }
tr.is-culprit .pl-name { max-width: calc(100% - 7.5em); }
.culprit-badge {
  margin-left: 6px;
  font: 700 0.875rem/1 var(--font-display);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--bg-deep);
  background: var(--kick);
  padding: 3px 7px 2px;
  border-radius: 4px;
  vertical-align: 2px;
}
.pos { color: var(--yes); }
.neg { color: #ff8f80; }
.dash { color: var(--faint); }
.share-mini { display: flex; align-items: center; gap: 8px; justify-content: flex-end; }
.share-mini i { display: block; height: 6px; border-radius: 999px; background: var(--kick); opacity: 0.8; }

/* Частые вопросы: свёрнуты, чтобы не мешать, но текст есть в разметке для поисковиков */
.faq { margin: 0 0 40px; scroll-margin-top: 16px; }
.faq h2 { font: 800 var(--step-3)/1 var(--font-display); margin: 0 0 14px; }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-of-type { border-bottom: 1px solid var(--line); }
.faq summary {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 2px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--muted); font: 700 1.2rem/1 var(--font-display); }
.faq details[open] summary::after { content: '−'; }
.faq details > div { padding: 0 2px 14px; color: var(--muted); max-width: 75ch; }
.faq details p { margin: 0; }
.faq code { font: 500 0.92em/1.3 var(--font-body); color: var(--text); background: var(--bg-deep); padding: 1px 6px; border-radius: 4px; overflow-wrap: anywhere; }

/* Как считаем */
.how {
  margin: 24px 0 40px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
  scroll-margin-top: 16px;
}
.how h2 { font: 800 var(--step-3)/1 var(--font-display); margin: 0 0 18px; }
.how-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 40px; color: var(--muted); }
.how-grid p { margin: 0 0 12px; max-width: 60ch; }
.how-grid ul { margin: 0; padding-left: 1.2em; }
.how-grid li + li { margin-top: 4px; }

.foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
  padding-block: 0 40px;
  color: var(--faint);
  font-size: var(--step--1);
}
.foot p { max-width: 70ch; margin: 0; }
.foot-main { display: grid; gap: 12px; }
.foot-contacts { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; color: var(--muted); }
.foot-contacts a { color: var(--text); font-weight: 600; }
.leetify-badge img { display: block; width: 135px; height: auto; }

/* Появление вердикта — единственная постановочная анимация на странице */
.result.is-new .vote { animation: vote-in 0.5s cubic-bezier(.2, .7, .2, 1) 0.15s both; }
@keyframes vote-in {
  from { opacity: 0; transform: translateX(-22px); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 760px) {
  .hero { min-height: auto; padding-top: 40px; }
  .top-nav { gap: 12px; }
  .brand { font-size: 1.3rem; }
  .search { flex-wrap: wrap; }
  .search input { flex-basis: 100%; }
  .search-file { flex: 1; justify-content: center; padding: 14px; border-left: 0; border-top: 1px solid var(--line); }
  .search-go { flex: 2; padding: 14px; }
  .vote-gauges { grid-template-columns: 1fr; }
  .picker button { grid-template-columns: 4.5rem 1fr; }
  .picker .pk-meta:nth-child(n + 3) { grid-column: 2; }
  .summary { font-size: var(--step-1); }
  .how-grid { grid-template-columns: 1fr; }
  .vote-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; }
  /* Таблица листается вбок, а имя игрока остаётся на месте */
  table { min-width: 940px; }
  th:first-child, td:first-child { position: sticky; left: 0; z-index: 1; background: var(--bg); box-shadow: 1px 0 0 var(--line); }
  thead th:first-child { background: var(--bg-deep); }
  tr.is-culprit td:first-child { background: color-mix(in srgb, var(--kick) 16%, var(--bg)); }
  tr.is-culprit .pl-name { max-width: 100%; }
  .culprit-badge { display: block; width: fit-content; margin: 4px 0 0; }
  .vote-stats dd:not(.sub) { font-size: var(--step-2); }
}

/* На телефоне «Как считаем» не влезает в шапку, а сам раздел и так в конце страницы */
@media (max-width: 420px) {
  .top-link { display: none; }
  .top-tg { padding: 7px; }
  .top-tg span { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .result.is-new .vote { animation: none; }
  .gauge-track span, .status-bar span { transition: none; }
  .status-bar.is-busy span { animation: none; width: 100%; opacity: 0.5; }
}
