/* Тренажёр профотбора — мини-приложение. Mobile-first, 360–430 px; «бланковая» эстетика:
   бумажный фон, пунктирные линейки, моноширинные цифры. Цвета Telegram — через --tg-theme-*. */

:root {
  /* своя светлая тема («бумага») */
  --paper: #ecefe8; --sheet: #f8f9f5; --ink: #1c2219; --muted: #5d6658;
  --rule: #cbd2c3; --rule-strong: #aeb7a5;
  --pen: #2b47a8; --pen-ink: #ffffff; --pen-soft: #dfe5f7;
  --ok: #2c7440; --ok-soft: #dceedf; --bad: #b42318; --bad-soft: #f7dfdb; --warn: #9a5800; --warn-soft: #f5e8d0;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #111612; --sheet: #192019; --ink: #e2e8de; --muted: #9aa595;
    --rule: #2e3a2f; --rule-strong: #46543f;
    --pen: #93a9ff; --pen-ink: #0e1430; --pen-soft: #222b48;
    --ok: #77c68a; --ok-soft: #1b3222; --bad: #ff8e7e; --bad-soft: #3a1f1b; --warn: #e6b04e; --warn-soft: #382b13;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #111612; --sheet: #192019; --ink: #e2e8de; --muted: #9aa595;
  --rule: #2e3a2f; --rule-strong: #46543f;
  --pen: #93a9ff; --pen-ink: #0e1430; --pen-soft: #222b48;
  --ok: #77c68a; --ok-soft: #1b3222; --bad: #ff8e7e; --bad-soft: #3a1f1b; --warn: #e6b04e; --warn-soft: #382b13;
  color-scheme: dark;
}

/* итоговые токены: сначала Telegram, потом своя тема */
:root {
  --bg: var(--tg-theme-secondary-bg-color, var(--paper));
  --card: var(--tg-theme-section-bg-color, var(--tg-theme-bg-color, var(--sheet)));
  --text: var(--tg-theme-text-color, var(--ink));
  --hint: var(--tg-theme-hint-color, var(--muted));
  --accent: var(--tg-theme-button-color, var(--pen));
  --accent-ink: var(--tg-theme-button-text-color, var(--pen-ink));
  --link: var(--tg-theme-link-color, var(--pen));
  --danger: var(--tg-theme-destructive-text-color, var(--bad));
  --line: var(--rule);
  --line-strong: var(--rule-strong);
  --accent-soft: var(--pen-soft);
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Roboto Mono", "Liberation Mono", monospace;
  --r: 14px;
}
@supports (color: color-mix(in srgb, red 50%, blue)) {
  :root {
    --line: color-mix(in srgb, var(--text) 14%, var(--card));
    --line-strong: color-mix(in srgb, var(--text) 30%, var(--card));
    --accent-soft: color-mix(in srgb, var(--accent) 14%, var(--card));
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.45 var(--sans);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p { margin: 0; }
h1 { font-size: 1.55rem; line-height: 1.15; font-weight: 700; letter-spacing: -0.01em; text-wrap: balance; }
h2 { font-size: 1.1rem; line-height: 1.25; font-weight: 700; }
b, strong { font-weight: 700; }
small { font-size: 0.82rem; }
button { font: inherit; color: inherit; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }
svg { color: var(--text); }

.app {
  max-width: 560px;
  margin: 0 auto;
  padding: calc(14px + env(safe-area-inset-top, 0px)) 16px calc(32px + env(safe-area-inset-bottom, 0px));
  min-height: 100vh;
}
.boot { color: var(--hint); padding: 40px 0; text-align: center; }
.stack { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.head { display: flex; flex-direction: column; gap: 4px; padding-top: 4px; }
.eyebrow { font: 500 0.72rem/1.2 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--hint); }
.muted { color: var(--hint); }
.small { font-size: 0.85rem; }
.center { text-align: center; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}
.card.sheet { border-style: dashed; border-color: var(--line-strong); }
.notice { color: var(--text); background: var(--warn-soft); border-color: transparent; }

/* ---------- кнопки ---------- */
.btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: var(--card);
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
}
.btn:disabled { opacity: 0.45; cursor: default; }
.btn-primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--hint); }
.btn-block { width: 100%; }
.btn-lg { min-height: 56px; font-size: 1.05rem; }
.btn-sm { min-height: 40px; padding: 8px 12px; font-size: 0.9rem; }
.btn:not(:disabled):active, .nav-row:not(:disabled):active, .hero:not(:disabled):active { transform: scale(0.985); }
@media (hover: hover) {
  .btn:not(:disabled):hover { border-color: var(--accent); }
  .btn-primary:not(:disabled):hover { filter: brightness(1.06); }
  .btn-ghost:not(:disabled):hover { color: var(--text); border-color: transparent; }
}
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.row2 > :only-child { grid-column: 1 / -1; }

/* ---------- главная ---------- */
.hero {
  appearance: none;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  width: 100%;
  min-height: 84px;
  padding: 16px 18px;
  border: 0;
  border-radius: 16px;
  background: var(--accent);
  color: var(--accent-ink);
  text-align: left;
  cursor: pointer;
}
.hero b { font-size: 1.35rem; line-height: 1.2; }
.hero span { opacity: 0.88; font-size: 0.95rem; }
.hero:disabled { opacity: 0.45; cursor: default; }

.nav-list { display: flex; flex-direction: column; gap: 8px; }
.nav-row {
  appearance: none;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 64px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--card);
  text-align: left;
  cursor: pointer;
}
.nav-row:disabled { opacity: 0.45; cursor: default; }
.nav-row.done .nav-main b { color: var(--hint); }
@media (hover: hover) { .nav-row:not(:disabled):hover { border-color: var(--accent); } }
.nav-ico { font-size: 1.3rem; width: 1.6rem; text-align: center; line-height: 1; }
.nav-ico:empty { display: none; }
.nav-row:has(.nav-ico:empty) { grid-template-columns: 1fr auto; }
.nav-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.nav-main b { font-size: 1.02rem; line-height: 1.25; }
.nav-main small { color: var(--hint); line-height: 1.3; }
.chev { color: var(--hint); font-size: 1.5rem; line-height: 1; }
.chip {
  display: inline-block;
  font: 600 0.85rem/1 var(--mono);
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px dashed var(--line-strong);
  color: var(--hint);
  font-variant-numeric: tabular-nums;
}
.chip.ok { border-style: solid; border-color: transparent; background: var(--ok-soft); color: var(--ok); }

.settings { gap: 12px; }
.set-head { display: flex; flex-direction: column; gap: 2px; }
.set-head small, .set-text small { color: var(--hint); line-height: 1.35; }
.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 4px; border-radius: 12px; background: var(--bg); }
.seg button {
  appearance: none;
  min-height: 52px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  line-height: 1.1;
  cursor: pointer;
  padding: 4px;
}
.seg button b { font: 700 1.1rem/1 var(--mono); }
.seg button small { font-size: 0.72rem; color: var(--hint); }
.seg button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
.seg button[aria-pressed="true"] small { color: inherit; opacity: 0.85; }
.set-row { display: flex; align-items: center; gap: 12px; padding-top: 10px; border-top: 1px dashed var(--line); }
.set-text { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.switch {
  appearance: none;
  flex: none;
  position: relative;
  width: 56px;
  height: 34px;
  border-radius: 17px;
  border: 0;
  background: var(--line-strong);
  cursor: pointer;
  transition: background 0.15s;
}
.switch::before { content: ""; position: absolute; inset: -7px -2px; } /* зона касания ≥ 48 px */
.switch i { position: absolute; top: 3px; left: 3px; width: 28px; height: 28px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgb(0 0 0 / 0.3); transition: transform 0.15s; }
.switch[aria-checked="true"] { background: var(--accent); }
.switch[aria-checked="true"] i { transform: translateX(22px); }

.status { display: flex; gap: 8px; align-items: center; font-size: 0.8rem; color: var(--hint); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--line-strong); flex: none; }
.dot.on { background: var(--ok); }
.update { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 12px; border-radius: 12px; background: var(--accent-soft); font-size: 0.9rem; }

/* ---------- правила ---------- */
.rules { white-space: pre-line; font-size: 1.05rem; }
.timing { font: 600 1rem/1.4 var(--mono); }
.blank-note { padding: 8px 10px; border-radius: 8px; background: var(--accent-soft); font-size: 0.92rem; }

/* ---------- прогон ---------- */
.run { gap: 12px; }
.run-head {
  position: sticky;
  top: 0;
  z-index: 5;
  margin: calc(-14px - env(safe-area-inset-top, 0px)) -16px 0;
  padding: calc(10px + env(safe-area-inset-top, 0px)) 16px 8px;
  background: var(--bg);
  border-bottom: 1px dashed var(--line-strong);
}
.run-row { display: flex; align-items: center; gap: 10px; min-height: 36px; }
.run-title { flex: 1; min-width: 0; font-weight: 600; font-size: 0.95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.counter { font: 500 0.95rem/1 var(--mono); color: var(--hint); font-variant-numeric: tabular-nums; }
.clock { font: 700 1.6rem/1 var(--mono); font-variant-numeric: tabular-nums; letter-spacing: 0.02em; }
.clock.low { color: var(--danger); }
.clock.paused { opacity: 0.5; }
.bar { display: block; height: 4px; margin-top: 8px; background: var(--line); border-radius: 2px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--accent); border-radius: 2px; transition: width 0.2s; }
.bar.thin { margin-top: 0; }

.qcard {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 96px;
  justify-content: center;
}
.q { font-size: 1.4rem; line-height: 1.4; font-weight: 600; white-space: pre-wrap; overflow-wrap: anywhere; }
.q.mono { font-family: var(--mono); font-size: 1.22rem; font-variant-numeric: tabular-nums; }
.q.long { font-size: 1.12rem; }
.qfig { display: flex; justify-content: center; }
.qfig svg { width: min(260px, 100%); height: auto; max-height: 260px; display: block; }
.qfig.sm svg { width: min(160px, 60%); }

.opts { display: grid; grid-template-columns: repeat(var(--cols, 2), minmax(0, 1fr)); gap: 10px; }
.opts.c1 .opt { min-height: 56px; justify-content: center; align-items: flex-start; text-align: left; padding: 14px 14px 14px 40px; font-size: 1.08rem; }
.opts.c1 .opt .lbl { top: 50%; left: 12px; transform: translateY(-50%); }
.opts.c3 .opt, .opts.c5 .opt { font-size: 1.08rem; padding-left: 6px; padding-right: 6px; }
.opts.c5 { gap: 6px; }
.opt {
  appearance: none;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 68px;
  padding: 14px 12px;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--r);
  background: var(--card);
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1.25;
  text-align: center;
  overflow-wrap: anywhere;
  hyphens: auto;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
}
.opt.has-fig { padding: 10px 8px 8px; }
.opt .fig { display: flex; align-items: center; justify-content: center; }
.opt .fig { width: 100%; }
.opt .fig svg { width: 100%; max-width: 110px; min-width: 56px; height: auto; aspect-ratio: 1; display: block; margin: 0 auto; }
.opt .cap { font: 500 0.8rem/1 var(--mono); color: var(--hint); }
.opt-none {
  appearance: none;
  position: relative;
  width: 100%;
  min-height: 52px;
  padding: 12px;
  border: 1.5px dashed var(--line-strong);
  border-radius: var(--r);
  background: transparent;
  font-weight: 600;
  cursor: pointer;
}
.lbl { position: absolute; top: 6px; left: 8px; font: 600 0.75rem/1 var(--mono); color: var(--hint); }
.lbl.graf {
  top: 6px; left: 6px;
  min-width: 22px;
  padding: 3px 4px;
  border: 1.5px solid var(--text);
  border-radius: 4px;
  font-size: 0.85rem;
  color: var(--text);
  text-align: center;
}
.opt-none .lbl.graf { top: 50%; left: 10px; transform: translateY(-50%); }
@media (hover: none), (pointer: coarse) { .lbl.kbd { display: none; } }
@media (hover: hover) {
  .opt:not(:disabled):hover, .opt-none:not(:disabled):hover { border-color: var(--accent); }
}
.opt:not(:disabled):active, .opt-none:not(:disabled):active { background: var(--accent-soft); }
.opt:disabled, .opt-none:disabled { cursor: default; }
.opt.good, .opt-none.good { border-color: var(--ok); border-style: solid; background: var(--ok-soft); opacity: 1; }
.opt.bad, .opt-none.bad { border-color: var(--bad); border-style: solid; background: var(--bad-soft); opacity: 1; }
.opt.dim, .opt-none.dim { opacity: 0.5; }
.opt.good::after, .opt-none.good::after { content: "✓"; position: absolute; top: 6px; right: 8px; color: var(--ok); font-size: 0.9rem; }
.opt.bad::after, .opt-none.bad::after { content: "✗"; position: absolute; top: 6px; right: 8px; color: var(--bad); font-size: 0.9rem; }

.fb { border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.fb.good { background: var(--ok-soft); }
.fb.bad { background: var(--bad-soft); }
.fb .verdict { font-weight: 700; }
.fb.good .verdict { color: var(--ok); }
.fb.bad .verdict { color: var(--bad); }
.run-foot { display: flex; justify-content: center; }

.study-words { display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-flow: column; gap: 4px 8px; }
.study-words span {
  font: 600 0.98rem/1.2 var(--mono);
  padding: 9px 2px;
  text-align: center;
  border-bottom: 1px dashed var(--line-strong);
  overflow-wrap: anywhere;
}
.study-figs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.study-figs .cell { aspect-ratio: 1; border: 1px solid var(--line); border-radius: 8px; background: var(--card); display: flex; align-items: center; justify-content: center; padding: 5px; }
.study-figs .cell svg { width: 100%; height: 100%; }
@media (min-width: 420px) { .study-figs { grid-template-columns: repeat(6, 1fr); } }

/* ---------- итог ---------- */
.score-card { gap: 14px; }
.score { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.score b { font: 700 3rem/1 var(--mono); font-variant-numeric: tabular-nums; }
.score .of { font: 600 1.2rem/1 var(--mono); color: var(--hint); }
.score .pct { margin-left: auto; font: 700 1.3rem/1 var(--mono); padding: 6px 10px; border-radius: 8px; background: var(--accent-soft); }
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.tile { display: flex; flex-direction: column; gap: 2px; padding: 10px; border: 1px dashed var(--line-strong); border-radius: 10px; background: var(--card); min-width: 0; }
.tile span { font-size: 0.75rem; color: var(--hint); }
.tile b { font: 700 1.02rem/1.25 var(--mono); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.tile small { font-size: 0.72rem; color: var(--hint); }
.tile.warn { background: var(--warn-soft); border-color: transparent; }
.lose, .gen-list, .pt-list, .weak { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.lose li { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; align-items: center; }
.lose li .bar { grid-column: 1 / -1; }
.gen-list li { display: flex; justify-content: space-between; gap: 10px; padding-bottom: 6px; border-bottom: 1px dashed var(--line); }
.gen-total { font-weight: 700; }
.errs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.err {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 14px;
  border-left: 3px solid var(--bad);
  border-radius: 0 12px 12px 0;
  background: var(--card);
  overflow-wrap: anywhere;
}
.err-k { font: 500 0.78rem/1.2 var(--mono); color: var(--hint); }
.err-q { font-weight: 600; white-space: pre-wrap; }
.err-q.mono { font-family: var(--mono); }
.err-ans { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ans { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 8px 10px; border-radius: 10px; font-size: 0.95rem; min-width: 0; }
.ans.bad { background: var(--bad-soft); }
.ans.good { background: var(--ok-soft); }
.ans-k { font-size: 0.72rem; color: var(--hint); text-transform: uppercase; letter-spacing: 0.06em; }
.ans-fig svg { width: 64px; height: 64px; display: block; }
.ans-t { font-weight: 600; }
.err-x { color: var(--hint); font-size: 0.93rem; }

/* ---------- теория ---------- */
.dots { display: flex; gap: 6px; }
.dots i { flex: 1; height: 4px; border-radius: 2px; background: var(--line); }
.dots i.past { background: var(--line-strong); }
.dots i.on { background: var(--accent); }
.lesson-card { padding: 18px; gap: 12px; }
.rich { white-space: pre-line; font-size: 1.04rem; line-height: 1.55; overflow-wrap: break-word; }
.done-badge { font-weight: 700; color: var(--ok); text-align: center; padding: 8px; border-radius: 10px; background: var(--ok-soft); }

/* ---------- прогресс ---------- */
.pt-row { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; align-items: center; padding-bottom: 10px; border-bottom: 1px dashed var(--line); }
.pt-row:last-child { border-bottom: 0; padding-bottom: 0; }
.pt-row .bar, .pt-row small { grid-column: 1 / -1; }
.pt-row small { color: var(--hint); }
.pt-row.none b { color: var(--hint); font-weight: 600; }
.weak li { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.weak li > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.weak small { color: var(--hint); }
.raw { width: 100%; font: 0.8rem/1.4 var(--mono); padding: 10px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--card); color: var(--text); }

/* ---------- диалог и всплывашка ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom, 0px));
  background: rgb(0 0 0 / 0.45);
}
.modal-box { width: 100%; max-width: 480px; display: flex; flex-direction: column; gap: 12px; padding: 18px; border-radius: 16px; background: var(--card); box-shadow: 0 10px 40px rgb(0 0 0 / 0.25); }
.modal-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (min-width: 600px) { .modal { align-items: center; } }
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  z-index: 60;
  width: max-content;
  max-width: calc(100vw - 32px);
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--text);
  color: var(--bg);
  font-size: 0.92rem;
  box-shadow: 0 6px 20px rgb(0 0 0 / 0.2);
}
.svg-bad { font: 700 1.4rem/1 var(--mono); color: var(--hint); }

@media (max-width: 360px) {
  .app { padding-left: 12px; padding-right: 12px; }
  .run-head { margin-left: -12px; margin-right: -12px; padding-left: 12px; padding-right: 12px; }
  .q { font-size: 1.25rem; }
  .opt { font-size: 1.08rem; }
  .tiles { gap: 6px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }

/* группы субтестов («Военкомат», «Батарея ОИР») */
.stack.tight { gap: 8px; }
.group { font: 600 0.78rem/1.2 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--hint); padding-top: 4px; }

/* 3 и 5 вариантов в ряд: подпись не наезжает на текст — стоит над ним */
.opts.c3 .opt .lbl, .opts.c5 .opt .lbl { position: static; transform: none; margin-bottom: 2px; }
.opts.c3 .opt, .opts.c5 .opt { min-height: 72px; }

/* ---------- условие и разбор в три слоя ---------- */
.ask { font-size: 0.88rem; line-height: 1.35; color: var(--hint); }
.ly { display: flex; gap: 8px; align-items: flex-start; line-height: 1.4; }
.ly-i { flex: none; width: 1.3em; text-align: center; }
.ly-good { color: var(--text); }
.ly-hint { color: var(--text); font-size: 0.95rem; }
.fb.skip { background: var(--warn-soft); }
.fb .ly + .ly { padding-top: 6px; border-top: 1px dashed var(--line-strong); }
.errs-n { font-weight: 700; }
.trap { display: flex; flex-direction: column; gap: 6px; }
.traps li { display: grid; grid-template-columns: 1fr auto; gap: 6px 10px; align-items: start; padding-bottom: 10px; border-bottom: 1px dashed var(--line); }
.traps li:last-child { border-bottom: 0; padding-bottom: 0; }
.traps li .ly { grid-column: 1 / -1; }
.rv .opt, .rv .opt-none { cursor: default; }
.opt-none.skip { border-style: dashed; color: var(--hint); }

/* ---------- S-тест: скорость ---------- */
.speed .bar i, .speed * { transition: none !important; animation: none !important; }
.st-samples { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 8px; }
.st-sample { display: flex; align-items: center; gap: 8px; padding: 4px 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); }
.st-sample b { font: 700 1.1rem/1 var(--mono); min-width: 1ch; }
.st-sample svg { width: 46px; height: 46px; display: block; margin: 0 auto; }
.st-q { font-size: 0.85rem; color: var(--hint); text-align: center; }
.st-frag { display: flex; justify-content: center; align-items: center; min-height: 150px; }
.st-frag svg { width: min(150px, 42vw); height: auto; aspect-ratio: 1; display: block; }
.st-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.st-btn {
  appearance: none;
  min-height: 76px;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--r);
  background: var(--card);
  font: 700 1.9rem/1 var(--mono);
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
}
.st-btn:not(:disabled):active { background: var(--accent-soft); }
@media (hover: hover) { .st-btn:not(:disabled):hover { border-color: var(--accent); } }
.st-btn.good { border-color: var(--ok); background: var(--ok-soft); }
.st-btn.bad { border-color: var(--bad); background: var(--bad-soft); }
.st-btn.dim { opacity: 0.5; }
.st-skip { appearance: none; min-height: 48px; border: 1.5px dashed var(--line-strong); border-radius: var(--r); background: transparent; color: var(--hint); font-weight: 600; cursor: pointer; }
.st-skip.bad { border-color: var(--bad); color: var(--bad); }
.speed .run-foot .btn { min-height: 44px; }
