/* Тренажёр по темам: список тем, тест, разбор и банк задач. */

.btn-sm { font-size: 12px; padding: 6px 13px; }

/* ─── шапка сводки ─── */

.tt-summary {
  display: flex; flex-wrap: wrap; gap: 10px 28px; align-items: center;
}
.tt-fact { display: flex; flex-direction: column; gap: 2px; min-width: 110px; }
.tt-fact span { font-size: 12px; color: var(--ink-3); }
.tt-fact b { font-size: 20px; font-weight: 700; letter-spacing: -.01em; }
.tt-fact em { font-size: 11.5px; color: var(--ink-3); font-style: normal; }
.tt-fact.accent b { color: var(--green); }
.tt-fact b.src { font-size: 13px; font-weight: 600; color: var(--ink-2); }

/* ─── таблица тем ─── */

.tt-table td { white-space: normal; vertical-align: middle; }
.tt-table .tt-n { color: var(--ink-3); width: 34px; text-align: right; }
.tt-table .c { text-align: center; }
.tt-table .c.good { color: var(--ok); font-weight: 600; }
.tt-table .c.bad  { color: var(--low); font-weight: 600; }

/* Название тянет на себя всю лишнюю ширину, полоса держит свою:
   иначе таблица растягивает именно её, и процент уезжает от полосы. */
.tt-name { width: 100%; }
.tt-name b { display: block; font-weight: 600; }
.tt-name small { display: block; color: var(--ink-3); font-size: 11.5px; line-height: 1.35; }

/* Тема без задач видна, но не тянет на себя внимание: это дырка в банке,
   а не ошибка — её закрывают следующей выгрузкой вариантов. */
.tt-table tr.tt-empty td { background: var(--surface-2); color: var(--ink-3); }
.tt-table tr.on td { background: var(--green-soft); }
/* Тему ещё не открывали — приглушаем, чтобы взгляд цеплялся за начатые. */
.tt-table tr.tt-untouched .tt-name b { font-weight: 500; color: var(--ink-2); }
.tt-table .dt { color: var(--ink-3); font-size: 12px; }

.tt-pct { width: 170px; display: flex; align-items: center; gap: 8px; }
.tt-pct span { font-size: 12.5px; font-variant-numeric: tabular-nums; color: var(--ink-2); }
.tt-bar {
  flex: 1; height: 8px; border-radius: 999px; background: var(--line-2); overflow: hidden;
}
.tt-bar i { display: block; height: 100%; border-radius: 999px; }
.tt-bar i.ok   { background: var(--ok); }
.tt-bar i.mid  { background: #e0a94a; }
.tt-bar i.low  { background: var(--low); }
.tt-bar i.zero { background: transparent; }

/* ─── банк: карточки задач под темой ─── */

.tt-tasks td { background: var(--surface-2); padding: 12px 14px; }
.tt-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 14px; padding: 12px 14px; margin-bottom: 10px;
}
.tt-card:last-child { margin-bottom: 0; }
.tt-card-h {
  display: flex; justify-content: space-between; gap: 12px;
  font-size: 12px; color: var(--ink-3); margin-bottom: 6px;
}
.tt-card-h b { color: var(--ink-2); }

.tt-q { font-size: 14px; line-height: 1.5; }
.tt-q.kk { font-weight: 500; }
.tt-q.ru { color: var(--ink-2); margin-top: 2px; }

.tt-opts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.tt-opt {
  font-size: 12.5px; padding: 4px 10px; border-radius: 999px;
  background: var(--surface-2); color: var(--ink-2); border: 1px solid transparent;
}
.tt-opt.right { background: var(--ok-bg); color: var(--ok); border-color: var(--green-line); font-weight: 600; }
.tt-opt.wrong { background: var(--low-bg); color: var(--low); border-color: #f2d9d5; font-weight: 600; }

.tt-src { margin-top: 8px; font-size: 11.5px; color: var(--ink-3); }

/* ─── тест ─── */

.tt-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.tt-head-t b { display: block; font-size: 16px; font-weight: 700; }
.tt-head-t small { color: var(--ink-3); font-size: 12px; }

.tt-q-block {
  display: flex; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line-2);
}
.tt-q-block:last-of-type { border-bottom: 0; }
.tt-q-n {
  flex: none; width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface-2); color: var(--ink-2); font-size: 13px; font-weight: 600;
}
.tt-q-block.ok .tt-q-n { background: var(--ok-bg); color: var(--ok); }
.tt-q-block.no .tt-q-n { background: var(--low-bg); color: var(--low); }
.tt-q-body { flex: 1; min-width: 0; }

.tt-choices { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.tt-choice {
  display: flex; align-items: center; gap: 10px; text-align: left;
  font: inherit; font-size: 13.5px; cursor: pointer;
  padding: 8px 12px; border-radius: var(--r-ctl);
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
}
.tt-choice:hover { background: var(--surface-2); }
.tt-choice i {
  flex: none; width: 22px; height: 22px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface-2); color: var(--ink-2);
  font-style: normal; font-size: 12px; font-weight: 700;
}
.tt-choice.on { border-color: var(--green); background: var(--green-soft); }
.tt-choice.on i { background: var(--green); color: #fff; }

.tt-foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; padding-top: 14px; border-top: 1px solid var(--line);
}
.tt-foot span { font-size: 13px; color: var(--ink-2); }

.tt-warn {
  background: var(--low-bg); color: var(--low); border-radius: var(--r-ctl);
  padding: 10px 14px; font-size: 13px; margin: 0 0 14px;
}
.tt-warn code { font-size: 12px; }

@media (max-width: 720px) {
  .tt-pct { min-width: 90px; }
  .tt-name small { display: none; }
}
