/* platform-fix.css — vá hệ thống dùng chung, nạp SAU cùng để thắng CSS trang.
   Rà soát 2026-12-01. Chỉ chứa fix an toàn áp được toàn nền tảng:
   - #1 focus bàn phím (WCAG 2.4.7): vòng focus hiện lại cho mọi control.
   - #7 reduced-motion: gỡ nội dung ẩn (.reveal opacity:0) cho người tắt chuyển động.
   Các fix per-page (màu chọn, ✓/✗, tap target, brand, hamburger) nằm trong từng trang. */

:where(a, button, input, select, textarea, summary, [tabindex], [role="button"], [role="radio"], [role="tab"]):focus-visible {
  outline: 3px solid #155a96 !important;
  outline-offset: 2px !important;
  border-radius: 4px;
}
@media (prefers-color-scheme: dark) {
  :where(a, button, input, select, textarea, summary, [tabindex], [role="button"], [role="radio"], [role="tab"]):focus-visible {
    outline-color: #5aa6e8 !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1 !important; transform: none !important; }
}

/* Switch phiên bản bài thi (cũ ↔ mới) — pill nhỏ gọn trên cùng, dùng chung 2 trang. */
.ts-switch {
  position: fixed; top: calc(env(safe-area-inset-top, 0px) + 10px); left: 50%; transform: translateX(-50%);
  z-index: 1000; display: inline-flex; gap: 2px; padding: 3px;
  background: rgba(255,255,255,.92); backdrop-filter: saturate(160%) blur(10px);
  border: 1px solid rgba(20,21,25,.08); border-radius: 999px;
  box-shadow: 0 6px 20px rgba(20,21,25,.16);
  font: 600 13px/1 'Inter', system-ui, 'Segoe UI', sans-serif;
}
.ts-switch a {
  text-decoration: none; color: #5c5e66; padding: 7px 14px; border-radius: 999px;
  min-height: 32px; display: inline-flex; align-items: center; white-space: nowrap; transition: background .15s, color .15s;
}
.ts-switch a.is-on { background: #c8102e; color: #fff; }
.ts-switch a:not(.is-on):hover { background: rgba(20,21,25,.06); }
@media (prefers-color-scheme: dark) {
  .ts-switch { background: rgba(30,32,38,.92); border-color: rgba(255,255,255,.12); box-shadow: 0 6px 20px rgba(0,0,0,.4); }
  .ts-switch a { color: #a7aab4; }
  .ts-switch a:not(.is-on):hover { background: rgba(255,255,255,.08); }
}
