/* Тир-лист танков (/tierlist). Разметку строит public/tierlist.js. */
.tl-layout { display: block; }
.tl-layout .feed-col { max-width: 1180px; margin: 0 auto; width: 100%; }

.tl-head { padding: 28px 0 8px; }
.tl-crumb { color: var(--text-faint); font-size: 13px; text-transform: uppercase; letter-spacing: .06em; }
.tl-head h1 { margin: 6px 0 8px; font-size: 32px; line-height: 1.15; }
.tl-lead { margin: 0; color: var(--text-dim); max-width: 760px; line-height: 1.5; }

.tl-controls { display: flex; flex-wrap: wrap; gap: 10px 18px; margin: 18px 0; }
.tl-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.tl-tab {
  background: var(--surface); color: var(--text-dim); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 7px 14px; font: inherit; font-weight: 600; cursor: pointer;
}
.tl-tab:hover { color: var(--text); border-color: var(--border-strong); }
.tl-tab.active { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }

.tl-row {
  --tl-c: #ffd84d;
  display: grid; grid-template-columns: 96px 1fr; gap: 0;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  margin-bottom: 10px; overflow: hidden;
}
.tl-S { --tl-c: #ff6b5a; }
.tl-A { --tl-c: #ffa94d; }
.tl-B { --tl-c: #ffd84d; }
.tl-C { --tl-c: #9bd15a; }
.tl-D { --tl-c: #6fb7ff; }
.tl-letter {
  background: color-mix(in srgb, var(--tl-c) 22%, transparent); border-right: 3px solid var(--tl-c);
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 10px 6px;
}
.tl-letter b { font-size: 40px; line-height: 1; color: var(--tl-c); }
.tl-letter small { margin-top: 6px; font-size: 11px; color: var(--text-dim); line-height: 1.25; }
.tl-cards { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px; }

.tl-card {
  width: 148px; display: flex; flex-direction: column; align-items: stretch; gap: 2px;
  background: rgba(255, 255, 255, .03); border: 1px solid var(--line-soft); border-radius: var(--radius-sm);
  padding: 6px 8px 8px; color: var(--text); font: inherit; text-align: left; cursor: pointer;
}
.tl-card:hover { border-color: var(--border-strong); background: rgba(255, 255, 255, .06); }
.tl-card.is-open { border-color: var(--tl-c); box-shadow: 0 0 0 1px var(--tl-c) inset; }
.tl-img { width: 100%; height: 70px; object-fit: contain; }
.tl-img-none { display: block; }
.tl-name { font-size: 13px; font-weight: 600; line-height: 1.25; display: flex; gap: 4px; align-items: flex-start; min-height: 2.5em; }
.tl-prem .tl-name { color: var(--tank-prem); }
.tl-coll .tl-name { color: var(--tank-coll); }
.tl-cls { width: 14px; height: 14px; margin-top: 1px; flex: none; }
.tl-wr { font-size: 15px; font-weight: 700; display: flex; align-items: baseline; gap: 6px; }
.tl-wr small { font-size: 12px; font-weight: 600; }
.tl-wr .up { color: var(--green); }
.tl-wr .down { color: #ff8a7a; }

.tl-detail { grid-column: 1 / -1; border-top: 1px solid var(--line); padding: 14px 16px 16px; background: rgba(0, 0, 0, .18); }
.tl-d-head { margin-bottom: 12px; color: var(--text-dim); }
.tl-d-head b { color: var(--text); }
.tl-d-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.tl-d-grid > div { display: flex; flex-direction: column; gap: 2px; }
.tl-d-grid span, .tl-d-maps span { color: var(--text-faint); font-size: 12px; }
.tl-d-grid b { font-size: 20px; }
.tl-d-grid em { font-style: normal; font-size: 12px; color: var(--text-dim); line-height: 1.35; }
.tl-d-sub { margin-top: 12px; font-size: 13px; color: var(--text-dim); }
.tl-d-maps { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.tl-d-maps ul { list-style: none; margin: 4px 0 0; padding: 0; font-size: 13px; }
.tl-d-maps li { padding: 2px 0; }
.tl-d-maps i, .tl-few i { color: var(--text-faint); font-style: normal; font-size: 12px; }
.tl-d-note { margin-top: 8px; font-size: 12px; color: var(--text-faint); }

.tl-few, .tl-how { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 16px; margin: 10px 0; }
.tl-few summary, .tl-how summary { cursor: pointer; font-weight: 600; }
.tl-few p, .tl-how p { color: var(--text-dim); line-height: 1.55; margin: 10px 0 0; }
.tl-empty { color: var(--text-dim); padding: 20px 0; }

@media (max-width: 720px) {
  .tl-head h1 { font-size: 26px; }
  .tl-row { grid-template-columns: 1fr; }
  .tl-letter { flex-direction: row; gap: 10px; justify-content: flex-start; border-right: 0; border-bottom: 3px solid var(--tl-c); padding: 8px 12px; }
  .tl-letter b { font-size: 28px; }
  .tl-letter small { margin: 0; text-align: left; }
  .tl-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
  .tl-card { width: auto; }
  .tl-d-grid { grid-template-columns: 1fr 1fr; }
}
