/* Пикрейт — стили. Без внешних зависимостей и шрифтов. */

:root {
  --bg: #0f1319;
  --surface: #171d26;
  --surface-2: #1e2632;
  --line: #2a3442;
  --ink: #e8edf4;
  --ink-soft: #b3c0d1;
  --muted: #7d8b9e;
  --accent: #d94f3d;
  --accent-soft: #7a2b21;
  --good: #4caf7d;
  --bad: #e0574a;
  --gold: #d8a33a;
  --radius: 12px;
  --radius-sm: 8px;
  --maxw: 1120px;
}

* { box-sizing: border-box; }

/* Карточки задают display: flex, а это перебивает служебное правило браузера
   [hidden] { display: none } — авторские стили всегда сильнее пользовательских.
   Без этой строки фильтр по героям молча не работает. */
[hidden] { display: none !important; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

a { color: #77b6ff; text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { line-height: 1.25; margin: 0 0 .5em; color: #fff; }
h1 { font-size: clamp(1.55rem, 1.2rem + 1.5vw, 2.2rem); letter-spacing: -.01em; }
h2 { font-size: clamp(1.2rem, 1rem + .8vw, 1.5rem); margin-top: 0; }

p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 1.25em; }
li { margin-bottom: .35em; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 16px; }

.skip { position: absolute; left: -9999px; background: var(--accent); color: #fff; padding: 10px 16px; z-index: 10; }
.skip:focus { left: 8px; top: 8px; }

/* ---------- Шапка ---------- */

.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 5;
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding-top: 10px; padding-bottom: 10px; flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 10px; color: inherit; }
.brand:hover { text-decoration: none; }
.brand-mark { font-size: 1.5rem; line-height: 1; color: var(--accent); }
.brand-text { display: flex; flex-direction: column; }
.brand-text strong { color: #fff; font-size: 1.12rem; letter-spacing: .02em; }
.brand-text small { color: var(--muted); font-size: .78rem; }

.main-nav { display: flex; gap: 16px; flex-wrap: wrap; }
.main-nav a { color: var(--ink-soft); font-weight: 500; font-size: .94rem; }
.main-nav a:hover { color: var(--accent); text-decoration: none; }

/* ---------- Крошки ---------- */

.crumbs { margin: 14px auto 0; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0; font-size: .84rem; color: var(--muted); }
.crumbs li.sep { color: var(--line); }
.crumbs a { color: var(--muted); }

main { padding: 22px 16px 56px; }
main > section { margin-bottom: 34px; }

/* ---------- Главная ---------- */

.hero {
  background: linear-gradient(150deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 24px 22px;
}
.lead { font-size: 1.05rem; color: var(--ink-soft); max-width: 74ch; }
.hero-meta { color: var(--muted); font-size: .86rem; margin: 0; }

.steps { counter-reset: step; list-style: none; padding: 0; }
.steps li { position: relative; padding-left: 44px; margin-bottom: 14px; counter-increment: step; }
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: 0;
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--accent-soft); color: #fff;
  font-weight: 700; display: grid; place-items: center; font-size: .88rem;
}

/* ---------- Поля и кнопки ---------- */

.filter-input {
  width: 100%; max-width: 460px; padding: 11px 14px; font-size: 1rem;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--ink); margin-bottom: 18px;
}
.filter-input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }

.button {
  display: inline-block; padding: 10px 18px; border-radius: var(--radius-sm);
  background: var(--surface-2); border: 1px solid var(--line); color: var(--ink); font-weight: 600;
}
.button:hover { text-decoration: none; border-color: var(--accent); color: #fff; }

/* ---------- Тир-лист ---------- */

.tier-row {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 16px;
  padding: 16px;
  margin-bottom: 12px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--line);
}

.tier-row.tier-s { border-left-color: #e0574a; }
.tier-row.tier-a { border-left-color: #e08a3c; }
.tier-row.tier-b { border-left-color: #4a90d9; }
.tier-row.tier-c { border-left-color: #6b7a8f; }
.tier-row.tier-d { border-left-color: #3f4a58; }

.tier-label { display: flex; flex-direction: column; gap: 2px; }

.tier-letter {
  font-size: 42px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.02em;
}
.tier-s .tier-letter { color: #e0574a; }
.tier-a .tier-letter { color: #e08a3c; }
.tier-b .tier-letter { color: #4a90d9; }
.tier-c .tier-letter { color: #8b98a8; }
.tier-d .tier-letter { color: #6b7a8f; }

.tier-title { font-weight: 600; font-size: 15px; }
.tier-note { font-size: 12px; color: var(--muted); line-height: 1.35; }
.tier-count { font-size: 12px; color: var(--muted); margin-top: 4px; }

.tier-heroes { display: flex; flex-wrap: wrap; gap: 8px; align-content: flex-start; }

.tier-hero {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px 5px 5px;
  border-radius: 7px;
  background: var(--surface-2);
  border: 1px solid transparent;
  text-decoration: none;
  color: var(--ink);
  font-size: 13px;
  transition: border-color .13s ease, transform .13s ease;
}
.tier-hero:hover { border-color: var(--accent); transform: translateY(-1px); }
.tier-hero .hero-img.is-icon { width: 24px; height: 24px; margin-right: 0; }
.tier-hero-name { font-weight: 500; }
.tier-hero-wr { font-variant-numeric: tabular-nums; font-size: 12px; }

.tier-legend { margin-bottom: 20px; }

@media (max-width: 720px) {
  .tier-row { grid-template-columns: 1fr; gap: 12px; }
  .tier-label { flex-direction: row; align-items: baseline; flex-wrap: wrap; gap: 8px; }
  .tier-letter { font-size: 30px; }
  .tier-count { margin-top: 0; }
}

details.faq {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 8px;
  background: var(--surface);
}
details.faq summary { cursor: pointer; font-weight: 600; }
details.faq p { margin: 10px 0 0; color: var(--ink-soft); }

/* ---------- Изображения героев ---------- */

.hero-img { display: block; }

.hero-img.is-portrait {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 6px;
  margin-bottom: 10px;
  background: var(--surface-2);
  transition: transform .15s ease;
}

.hero-card:hover .hero-img.is-portrait { transform: scale(1.02); }

.hero-img.is-icon {
  width: 32px;
  height: 32px;
  border-radius: 4px;
  display: inline-block;
  vertical-align: middle;
  margin-right: 7px;
  background: var(--surface-2);
}

/* Шапка страницы героя: портрет слева, текст справа. */
.hero-head {
  display: grid;
  grid-template-columns: 256px 1fr;
  gap: 20px;
  align-items: start;
  margin-bottom: 24px;
}
.hero-head .hero-img.is-portrait { margin-bottom: 0; }
.hero-head .lead { margin-bottom: 0; }

@media (max-width: 640px) {
  .hero-head { grid-template-columns: 1fr; gap: 12px; }
  .hero-head .hero-img.is-portrait { max-width: 256px; }
}

/* ---------- Карточки героев ---------- */

.hero-grid {
  display: grid; gap: 10px;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  margin-bottom: 16px;
}
.hero-card {
  display: flex; flex-direction: column; gap: 2px;
  background: var(--surface); border: 1px solid var(--line);
  border-left: 3px solid var(--line);
  border-radius: var(--radius-sm); padding: 12px 14px;
  color: inherit; transition: border-color .12s, transform .12s;
}
.hero-card:hover { text-decoration: none; border-color: var(--accent); transform: translateY(-1px); }
.hero-card.top { border-left-color: var(--good); }
.hero-card.above { border-left-color: #2f7d5b; }
.hero-card.below { border-left-color: #a8712f; }
.hero-card.bottom { border-left-color: var(--bad); }
.hero-name { font-weight: 700; color: #fff; }
.hero-en { font-size: .82rem; color: var(--muted); }
.hero-wr { font-size: 1.02rem; font-weight: 600; margin-top: 4px; }
.hero-meta-line { font-size: .78rem; color: var(--muted); }

.two-col { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

/* ---------- Статусные карточки ---------- */

.status-grid {
  display: grid; gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  margin-bottom: 16px;
}
.status-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 13px 15px;
  display: flex; flex-direction: column; gap: 3px;
}
.status-label { font-size: .76rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.status-value { font-size: 1.3rem; color: #fff; }
.status-hint { font-size: .82rem; color: var(--muted); }

/* ---------- Таблицы ---------- */

.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin-bottom: 12px; }

.data-table {
  width: 100%; border-collapse: collapse; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  font-size: .92rem; min-width: 520px;
}
.data-table th, .data-table td { padding: 9px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.data-table thead th { background: var(--surface-2); color: var(--ink-soft); font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; }
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover { background: #1b2230; }

.dev-good { color: var(--good); }
.dev-bad { color: var(--bad); }
.dev-even { color: var(--ink-soft); }

/* ---------- Чипы ---------- */

.chips { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 12px; }
.chip {
  display: inline-block; padding: 6px 12px; font-size: .88rem;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 999px; color: var(--ink);
}
.chip:hover { text-decoration: none; border-color: var(--accent); }
.chip.static { color: var(--ink-soft); }
.chip-extra { color: var(--muted); font-size: .82rem; }

.muted { color: var(--muted); }

/* ---------- FAQ ---------- */

.faq {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 12px 15px; margin-bottom: 8px;
}
.faq summary { cursor: pointer; font-weight: 600; color: #fff; }
.faq p { margin: 10px 0 0; color: var(--ink-soft); }

/* ---------- Подвал ---------- */

.site-footer { background: #0b0e13; border-top: 1px solid var(--line); margin-top: 40px; padding: 30px 0 22px; font-size: .9rem; color: var(--ink-soft); }
.site-footer strong { color: #fff; display: block; margin-bottom: 6px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.footer-grid { display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); margin-bottom: 20px; }
.footer-meta { border-top: 1px solid var(--line); padding-top: 14px; margin: 0; color: var(--muted); font-size: .84rem; }

/* ---------- Мобильные ---------- */

@media (max-width: 640px) {
  .brand-text small { display: none; }
  .main-nav { gap: 12px; font-size: .88rem; }
  main { padding: 16px 14px 40px; }
  .hero { padding: 18px 15px; }
  .data-table { font-size: .86rem; }
  .data-table th, .data-table td { padding: 8px 9px; }
}
