/* Nền tảng: reset, chữ, liên kết, tiêu đề */

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
/* Giữ trang đứng yên như app trên điện thoại: không kéo ngang được (kể cả khi lỡ có phần tử rộng quá),
   không nảy / kéo-để-tải-lại khi vuốt quá đầu hay cuối trang, chạm hai lần không phóng to */
html { overflow-x: clip; overscroll-behavior: none; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { overflow-x: clip; overscroll-behavior: none; touch-action: manipulation; }
body {
  background-color: var(--bg); background-image: var(--bg-art); background-attachment: fixed;
  color: var(--text); font-family: var(--font); font-size: 15px; line-height: 1.55;
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
}
a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.zh { font-family: var(--font-zh); }
.zh-serif { font-family: var(--font-zh-serif); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; text-wrap: balance; }
h1 { font-family: var(--font); font-weight: 800; font-size: 1.65rem; letter-spacing: -.01em; line-height: 1.3; }
h2 { font-family: var(--font); font-weight: 800; font-size: 1.22rem; letter-spacing: -.005em; line-height: 1.35; }
h3 { font-size: 1.05rem; }
small, .muted { color: var(--muted); }
.faint { color: var(--faint); }
hr { border: 0; border-top: 1px solid var(--border); margin: 18px 0; }
kbd { background: var(--surface-3); border-radius: 5px; padding: 1px 6px; font-size: .85em; }
/* Khối chữ giữ nguyên dòng (thẻ "Ối, có lỗi" của router): xuống dòng khi dài, kể cả đường dẫn liền một mạch,
   để không đẩy trang tràn ngang trên điện thoại */
pre { white-space: pre-wrap; overflow-wrap: anywhere; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
/* chỉ cho trình đọc màn hình (tiêu đề trang không hiện ra) */
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
