/* Zaezzd — тренажёр «Билеты ПДД 2026» (T7).
   Только то, чего нет в main.css. Всё остальное — готовые компоненты
   (.card, .btn, .alert, .badge, .ad, .row-link, .t-*). */

/* ─── Вход: заголовок и раскладка ────────────────────────────────── */
.pdd-head { display: flex; flex-direction: column; gap: 10px; }
.pdd-head .t-lead { max-width: 620px; }

.pdd-cols { display: grid; gap: 22px; }
.pdd-cols__main { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
/* До 1200 карточка прогресса стоит сразу под заголовком — как в прототипе */
.pdd-cols__side { display: flex; flex-direction: column; gap: 16px; min-width: 0; order: -1; }

@media (min-width: 768px) {
  .pdd-cols { gap: 32px; }
  .pdd-cols__main { gap: 32px; }
}
@media (min-width: 1200px) {
  .pdd-cols { grid-template-columns: minmax(0, 1fr) 320px; align-items: start; }
  .pdd-cols__side { order: 0; position: sticky; top: 128px; }
}

/* Крошка в мобильной шапке не должна переносить строку на 360 */
.hdr__crumb { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ─── Карточка прогресса ─────────────────────────────────────────── */
.pdd-prog__head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 11px; }
.pdd-prog__t { font-size: 13px; font-weight: 600; }

.pdd-spark { display: flex; align-items: flex-end; gap: 5px; height: 52px; margin-bottom: 8px; }
.pdd-spark:empty { display: none; }
.pdd-spark span { flex: 1 1 0; min-height: 4px; background: #D7D6D1; border-radius: 3px 3px 0 0; }
.pdd-spark span.is-last { background: var(--acc); }

/* ─── Режимы ─────────────────────────────────────────────────────── */
.pdd-modes { display: flex; flex-direction: column; gap: 9px; }
.pdd-mode {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  width: 100%; min-height: 76px; padding: 15px; text-align: left;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card);
  color: inherit; text-decoration: none;
}
.pdd-mode:hover { border-color: var(--ink); }
.pdd-mode__t { display: block; font-size: 16.5px; font-weight: 700; line-height: 1.25; margin-bottom: 3px; }
.pdd-mode__d { display: block; font-size: 12.5px; line-height: 1.35; color: var(--ink-3); }
.pdd-mode__go { flex: 0 0 auto; font-size: 20px; font-weight: 700; color: var(--acc); }
.pdd-mode--dark { background: var(--ink); border-color: var(--ink); color: #fff; }
.pdd-mode--dark:hover { background: #000; border-color: #000; }
.pdd-mode--dark .pdd-mode__d { color: #A8ACB5; }
.pdd-mode--dark .pdd-mode__go { color: var(--yellow); }
@media (min-width: 768px) {
  .pdd-modes { flex-direction: row; }
  .pdd-mode { flex: 1 1 0; min-height: 96px; align-items: flex-start; }
}

/* ─── Список тем ─────────────────────────────────────────────────── */
button.row-link { width: 100%; font-family: inherit; font-size: 14px; }
.row-link__n { flex: 0 0 auto; font-size: 12.5px; font-weight: 600; color: var(--ink-3); font-variant-numeric: tabular-nums; }
@media (min-width: 768px) { .pdd-topics { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; } }

/* ─── Схема ──────────────────────────────────────────────────────── */
.pdd-scheme { line-height: 0; }
.pdd-scheme svg { display: block; width: 100%; height: auto; border-radius: 10px; }
@media (min-width: 768px) { .pdd-scheme { max-width: 480px; } }

/* ─── Экран вопроса ──────────────────────────────────────────────── */
.pdd-play { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); overflow: hidden; }
.pdd-play__head { padding: 12px 14px 10px; border-bottom: 1px solid var(--line-soft); }
.pdd-play__row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 9px; }
.pdd-play__body { padding: 14px 14px 20px; display: flex; flex-direction: column; gap: 15px; }

.pdd-close {
  width: 44px; height: 44px; flex: 0 0 44px; margin-left: -11px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--r-ctl); color: var(--ink-3);
}
.pdd-close:hover { background: var(--bg); color: var(--ink); }
.pdd-num { font-size: 12.5px; font-weight: 600; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.pdd-mode-tag { font-size: 12.5px; font-weight: 600; color: var(--ink-3); }
.pdd-timer { font-size: 12.5px; font-weight: 700; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.pdd-timer.is-low { color: var(--err); }

.pdd-bar { height: 4px; background: var(--line-soft); border-radius: 2px; overflow: hidden; }
.pdd-bar span { display: block; height: 4px; background: var(--acc); border-radius: 2px; transition: width .2s ease; }

.pdd-q { font-size: 19px; font-weight: 600; line-height: 1.35; }
.pdd-q:focus-visible { outline: 2px solid var(--acc); outline-offset: 4px; }
@media (min-width: 768px) {
  .pdd-play__body { padding: 20px 20px 26px; gap: 18px; }
  .pdd-q { font-size: 22px; }
}

/* ─── Варианты ответа ────────────────────────────────────────────── */
.pdd-opts { display: flex; flex-direction: column; gap: 8px; }
.pdd-opt {
  display: flex; align-items: flex-start; gap: 11px; width: 100%; text-align: left;
  min-height: 52px; padding: 13px;
  background: var(--surface); border: 1.5px solid var(--line); border-radius: 11px;
  color: inherit;
}
.pdd-opt:hover { border-color: var(--ink); }
.pdd-opt__n {
  flex: 0 0 24px; height: 24px; border-radius: 7px;
  background: var(--bg); color: var(--ink-2);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700;
}
.pdd-opt__l { font-size: 14.5px; line-height: 1.4; padding-top: 2px; }
.pdd-opt__tag { display: block; margin-top: 5px; font-size: 11.5px; font-weight: 700; letter-spacing: .02em; }

.pdd-opt[disabled] { cursor: default; opacity: 1; }
.pdd-opt[disabled]:hover { border-color: var(--line); }
.pdd-opt.is-right { background: var(--ok-soft); border-color: #A9D9BF; }
.pdd-opt.is-right:hover { border-color: #A9D9BF; }
.pdd-opt.is-right .pdd-opt__n { background: var(--ok); color: #fff; }
.pdd-opt.is-right .pdd-opt__tag { color: var(--ok); }
.pdd-opt.is-wrong { background: var(--err-soft); border-color: #EFB4AE; }
.pdd-opt.is-wrong:hover { border-color: #EFB4AE; }
.pdd-opt.is-wrong .pdd-opt__n { background: var(--err); color: #fff; }
.pdd-opt.is-wrong .pdd-opt__tag { color: var(--err); }

/* ─── Разбор ─────────────────────────────────────────────────────── */
.pdd-after { display: flex; flex-direction: column; gap: 13px; }
.pdd-why { background: var(--bg); border-radius: var(--r-card); padding: 14px; }
.pdd-why__d { font-size: 14px; line-height: 1.55; color: var(--ink); margin: 7px 0 8px; }
.pdd-why__ref { font-size: 13px; color: var(--ink-2); }
.pdd-why__ref b { font-variant-numeric: tabular-nums; }
.pdd-ref {
  display: inline-flex; align-items: center; min-height: 44px;
  padding: 0 6px; margin-left: -6px;
  font-size: 13px; font-weight: 600; color: var(--acc);
}

/* ─── Итог ───────────────────────────────────────────────────────── */
.pdd-done { display: flex; flex-direction: column; gap: 18px; }
.pdd-score { font-size: 44px; font-weight: 700; line-height: 1; letter-spacing: -.03em; margin: 8px 0 6px; }
.pdd-score:focus-visible { outline: 2px solid var(--acc); outline-offset: 4px; }
.pdd-verdict { font-size: 16px; font-weight: 600; color: var(--ink-2); }

.pdd-break { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 4px 14px; }
.pdd-break__row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 0; border-bottom: 1px solid var(--line-soft);
}
.pdd-break__k { font-size: 13.5px; line-height: 1.3; }
.pdd-break__v { flex: 0 0 auto; font-size: 12.5px; font-weight: 700; text-align: right; }
.pdd-break__v--ok { color: var(--ok); }
.pdd-break__v--warn { color: var(--warn-ink); }
.pdd-break__v--err { color: var(--err); }
.pdd-break__note { padding: 12px 0; font-size: 12px; color: var(--ink-4); }

.pdd-done__actions { display: flex; flex-direction: column; gap: 8px; }
.pdd-cta__t { font-size: 15px; font-weight: 700; line-height: 1.3; margin-bottom: 5px; }
.pdd-cta__d { font-size: 13px; line-height: 1.45; color: #5C5647; margin-bottom: 12px; }
.pdd-cta__link { display: inline-flex; align-items: center; min-height: 44px; font-size: 13px; font-weight: 600; }

@media (min-width: 1200px) {
  #pdd-session { max-width: 820px; margin: 0 auto; width: 100%; }
  .pdd-score { font-size: 56px; letter-spacing: -.035em; }
}

/* ─── Примеры вопросов без JS (SEO-блок) ─────────────────────────── */
.pdd-ex { display: flex; flex-direction: column; gap: 10px; }
.pdd-ex__q { font-size: 16px; font-weight: 700; line-height: 1.35; }
.pdd-ex__opts { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.pdd-ex__opts li { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; line-height: 1.4; }
.pdd-ex__opts li span.pdd-opt__n { margin-top: 1px; }
.pdd-ex__opts li.is-right { font-weight: 600; }
.pdd-ex__opts li.is-right span.pdd-opt__n { background: var(--ok); color: #fff; }
.pdd-ex__why { font-size: 14px; line-height: 1.55; color: var(--ink-2); }
.pdd-ex__ref { font-size: 12.5px; color: var(--ink-4); font-variant-numeric: tabular-nums; }
.pdd-ex-list { display: grid; gap: 12px; }
@media (min-width: 1200px) { .pdd-ex-list { grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; } }

/* ─── Прочее ─────────────────────────────────────────────────────── */
.pdd-faq { display: flex; flex-direction: column; gap: 10px; }
.pdd-note { font-size: 12.5px; color: var(--ink-4); line-height: 1.45; }
