/* Giao diện chung của site hỏi đáp — phương án "A theo logo", Duy chốt 27/09/2026.
   Màu lấy từ logo BitCar: xanh #204286, đỏ #B82228 (khoảng giữa dải đỏ #EE282F→#761518
   của nét chữ B). Nền ngà, chữ gần đen. Đỏ chỉ dùng để báo điều MỚI, không dùng trang trí.
   Mọi trang đọc file này; đổi màu thì sửa ở đây, đừng khai lại :root trong từng trang. */

:root {
  --nen: #f7f5f0;
  --the: #ffffff;
  --muc: #151a22;
  --muc-nhat: #5b616b;
  --vien: #e3ded4;
  --chinh: #204286;
  --chinh-nhat: #e6ebf4;
  --tren-chinh: #ffffff;      /* chữ đặt trên nền --chinh */
  --do: #b82228;
  --loi: #a32017;
  --loi-nhat: #fbe9e7;
  --bong: 0 1px 2px rgba(20,25,35,0.04), 0 8px 24px rgba(20,25,35,0.05);
  color-scheme: light;

  /* Thang cỡ chữ (Duy yêu cầu cân đối lại 28/09/2026). Mọi trang CHỈ dùng các bậc này;
     trước đó riêng trang hỏi đáp có hơn 20 cỡ lệch nhau nửa pixel, nhỏ nhất 9,6px.
     Không bậc nào dưới 12px: người đọc chủ yếu dùng điện thoại. */
  --co-nhan: 12px;        /* nhãn viết hoa, ngày, dòng thời gian */
  --co-phu: 13px;         /* chữ phụ, chú thích, trạng thái */
  --co-nho: 14px;         /* bảng số, nút nhỏ, chip, mô tả */
  --co-vua: 15px;         /* tab, mục menu, tiêu đề mục */
  --co-than: 16px;        /* chữ thân, ô nhập (dưới 16px iPhone tự phóng to khi gõ) */
  --co-nhan-manh: 18px;   /* dòng con số đầu câu trả lời, tiêu đề hộp */
  --co-tieu-de: 22px;     /* tiêu đề trang đăng nhập, đăng ký */
  --co-lon: 28px;         /* câu hỏi lớn ở màn đầu */
}
@media (prefers-color-scheme: dark) {
  :root {
    --nen: #0f1217; --the: #171b22; --muc: #e8eaee; --muc-nhat: #9aa1ac;
    --vien: #2a303b; --chinh: #8fb0ee; --chinh-nhat: #1b2540; --tren-chinh: #0f1217;
    --do: #f07077; --loi: #ff8577; --loi-nhat: #331715;
    --bong: 0 1px 2px rgba(0,0,0,0.3);
    color-scheme: dark;
  }
}
body {
  font-family: 'Be Vietnam Pro', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-feature-settings: 'tnum' 1;   /* chữ số đều nhau: cột số thẳng hàng */
}
/* Logo: bản xanh cho nền sáng, bản chữ trắng (giữ nét đỏ) cho nền tối — dùng <picture> */
.logo { display: block; line-height: 0; }
.logo img { height: 19px; width: auto; display: block; }

/* Be Vietnam Pro — tự host, tải từ Google Fonts 27/09/2026 (SIL Open Font License).
   Tự host để trang không phụ thuộc máy chủ ngoài và không lộ lượt xem cho bên thứ ba. */
@font-face{font-family:'Be Vietnam Pro';font-style:normal;font-weight:400;font-display:swap;src:url(bvp-400-vietnamese.woff2) format('woff2');unicode-range:U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB}
@font-face{font-family:'Be Vietnam Pro';font-style:normal;font-weight:400;font-display:swap;src:url(bvp-400-latin-ext.woff2) format('woff2');unicode-range:U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF}
@font-face{font-family:'Be Vietnam Pro';font-style:normal;font-weight:400;font-display:swap;src:url(bvp-400-latin.woff2) format('woff2');unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD}
@font-face{font-family:'Be Vietnam Pro';font-style:normal;font-weight:500;font-display:swap;src:url(bvp-500-vietnamese.woff2) format('woff2');unicode-range:U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB}
@font-face{font-family:'Be Vietnam Pro';font-style:normal;font-weight:500;font-display:swap;src:url(bvp-500-latin-ext.woff2) format('woff2');unicode-range:U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF}
@font-face{font-family:'Be Vietnam Pro';font-style:normal;font-weight:500;font-display:swap;src:url(bvp-500-latin.woff2) format('woff2');unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD}
@font-face{font-family:'Be Vietnam Pro';font-style:normal;font-weight:600;font-display:swap;src:url(bvp-600-vietnamese.woff2) format('woff2');unicode-range:U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB}
@font-face{font-family:'Be Vietnam Pro';font-style:normal;font-weight:600;font-display:swap;src:url(bvp-600-latin-ext.woff2) format('woff2');unicode-range:U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF}
@font-face{font-family:'Be Vietnam Pro';font-style:normal;font-weight:600;font-display:swap;src:url(bvp-600-latin.woff2) format('woff2');unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD}
@font-face{font-family:'Be Vietnam Pro';font-style:normal;font-weight:700;font-display:swap;src:url(bvp-700-vietnamese.woff2) format('woff2');unicode-range:U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB}
@font-face{font-family:'Be Vietnam Pro';font-style:normal;font-weight:700;font-display:swap;src:url(bvp-700-latin-ext.woff2) format('woff2');unicode-range:U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF}
@font-face{font-family:'Be Vietnam Pro';font-style:normal;font-weight:700;font-display:swap;src:url(bvp-700-latin.woff2) format('woff2');unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD}

/* Màn hẹp (điện thoại): đầu trang có logo + ba tab + nút — thu một bậc cho vừa 360–440px */
@media (max-width: 440px) {
  header .hang { gap: 0.7rem !important; }
  .logo img { height: 16px; }
  nav.tab { gap: 0.65rem !important; }
  nav.tab a { font-size: var(--co-nho) !important; }
}
@media (max-width: 380px) {
  header { padding-left: 0.75rem !important; padding-right: 0.75rem !important; }
  header .hang { gap: 0.55rem !important; }
  .logo img { height: 14px; }
  nav.tab { gap: 0.5rem !important; }
}

/* Chuyển tab mượt (View Transitions giữa các trang — Chrome/Edge 126+, Safari 18.2+;
   trình duyệt cũ thì chuyển trang như thường, không hỏng gì). Đầu trang giữ nguyên
   chỗ và đổi màu nền mượt; tab đang chọn trượt từ vị trí cũ sang vị trí mới; phần
   thân mờ dần sang trang mới. */
@view-transition { navigation: auto; }
header { view-transition-name: dau-trang; }
nav.tab a.dang { view-transition-name: tab-dang; }
.logo { view-transition-name: logo; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 0.28s; }
::view-transition-group(dau-trang), ::view-transition-group(tab-dang), ::view-transition-group(logo) {
  animation-duration: 0.32s; animation-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1);
}
@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}
