/* BASE: đặt lại tối thiểu, html và body, nền tranh, liên kết, tiêu điểm. Chỉ bộ chọn phần tử; quy tắc giao diện ở các lớp sau. */

*, *::before, *::after { box-sizing: border-box; }

html {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
  scroll-padding-top: 76px;
  scrollbar-color: var(--rule) transparent;
  scrollbar-width: thin;
  accent-color: var(--ink);
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: clip;
  position: relative;
}

header, main, footer {
  position: relative;
  z-index: 1;
}

::selection { background: var(--ink); color: var(--paper); }
input, textarea { caret-color: var(--ink); }

h1, h2, h3 { text-wrap: balance; }
p, li { text-wrap: pretty; }
/* Polish (2026-11-06): liên kết không có màu riêng thì mang màu chữ quanh nó (nét gạch dưới vẫn còn), không rơi về xanh mặc định của trình duyệt */
a { color: inherit; text-underline-offset: 3px; }
button:disabled { opacity: 0.4; cursor: not-allowed; }

:focus-visible { outline-color: var(--cinnabar); }
a:focus-visible,
button:focus-visible,
summary:focus-visible,
[tabindex]:not([tabindex="-1"]):focus-visible { outline: 2px solid var(--cinnabar); outline-offset: 3px; border-radius: 1px; }
/* Phần tử chỉ nhận tiêu điểm bằng mã (tabindex=-1, như tiêu đề trang sau khi đổi route) không vẽ khung */
[tabindex="-1"]:focus,
[tabindex="-1"]:focus-visible { outline: none; }

/* Typeset (2026-11-05): chữ đậm trong bài là 600, cùng độ đậm với nhãn và tên; 700 của trình duyệt nặng hơn mọi vai khác của Newsreader */
strong, b { font-weight: 600; }
