/* =======================================================================
   BẢNG MÀU CHUNG — Aqua Splash 2027 (mặc định) và Đất sét (tùy chọn), 04/12/2026.

   Chị chọn hướng A: màu của năm 2027 PANTONE 14-4812 Aqua Splash, theo lối «chỉ hai màu»
   (xanh nước + mực xanh đậm trên nền rất nhạt). Mã hex chính thức chỉ có trong Pantone Connect
   (trả phí); #85CED1 là giá trị gần đúng tính từ thông số công bố (sắc 182°, bão hòa 45%, sáng 67%).
   Bảng màu đất sét cũ giữ làm tùy chọn: menu «···» → Giao diện → Đất sét
   (lưu ở localStorage 'huong_bang_mau' = 'dat-set'; đoạn script đầu trang gắn
   <html data-bang-mau="dat-set"> trước khi vẽ để không chớp màu).

   Cách đè: mỗi trang tự khai bảng màu đất sét trong :root (độ ưu tiên 0,1,0; tối 0,2,0).
   Ở đây dùng html:not([data-bang-mau="dat-set"]) (0,1,1) và thêm một điều kiện cho chế độ tối
   (0,2,1), nên luôn thắng mà không cần !important. Chọn Đất sét thì các luật này tắt, trang
   trở về đúng bảng màu cũ của nó.

   Chữ: chữ không đều vì phông hệ thống (Georgia, Iowan…) thiếu chữ có dấu như ư, ơ, ỗ; trình
   duyệt mượn chữ từ phông khác giữa dòng. Cả hai giao diện dùng Be Vietnam Pro (assets/css/fonts.css,
   đủ tiếng Việt) cho chữ thường; Aqua dùng luôn cho tiêu đề; Đất sét dùng Lora (có chân, đủ dấu; 400, 400 nghiêng, 600) thay chỗ Iowan/Georgia.
   Phông tự chứa trong kho, không gọi Google Fonts. Giấy phép SIL OFL 1.1: assets/fonts/OFL-*.txt.
   ===================================================================== */

@font-face{font-family:'Lora';font-style:normal;font-weight:600;font-display:swap;src:url(../fonts/lora-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:'Lora';font-style:normal;font-weight:600;font-display:swap;src:url(../fonts/lora-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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF}
@font-face{font-family:'Lora';font-style:normal;font-weight:600;font-display:swap;src:url(../fonts/lora-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:'Lora';font-style:italic;font-weight:400;font-display:swap;src:url(../fonts/lora-400i-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:'Lora';font-style:italic;font-weight:400;font-display:swap;src:url(../fonts/lora-400i-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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF}
@font-face{font-family:'Lora';font-style:italic;font-weight:400;font-display:swap;src:url(../fonts/lora-400i-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:'Lora';font-style:normal;font-weight:400;font-display:swap;src:url(../fonts/lora-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:'Lora';font-style:normal;font-weight:400;font-display:swap;src:url(../fonts/lora-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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF}
@font-face{font-family:'Lora';font-style:normal;font-weight:400;font-display:swap;src:url(../fonts/lora-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}

/* ---------- Aqua Splash 2027: sáng ----------
   :not([data-theme=dark]) để thắng cả :root[data-theme=light] (0,2,0) mà vài trang khai riêng (blog, âm nhạc…).
   Ở chế độ tối theo máy, luật tối bên dưới cùng độ ưu tiên và đứng sau nên thắng. */
html:not([data-bang-mau="dat-set"]):not([data-theme=dark]){
  --paper:#F2F9F9;--surface:#FFFFFF;--sunk:#E2F2F2;
  --ink:#0F2E30;--muted:#4A6668;--line:#CBE5E5;
  --clay:#85CED1;--clay-ink:#0E6A6F;--on-clay:#FFFFFF;--clay-soft:#E2F2F2;
  --river:#0E6A6F;--amber:#0E6A6F;
  --accent:#0E6A6F;--accent-soft:#E2F2F2;--accent2:#0E6A6F;--gold:#0E6A6F;--text:#0F2E30;
  /* bốn mạch chương trình ở khối Giảng dạy: bốn sắc của cùng một màu */
  --mach-1:#0E6A6F;--mach-2:#3C9DA2;--mach-3:#85CED1;--mach-4:#1F4E51;--gd-hp:#3C9DA2;
  --lift:0 1px 1px rgba(15,46,48,.05),0 10px 22px rgba(15,46,48,.08);
  --press:inset 0 2px 0 rgba(255,255,255,.72),inset 0 -2px 0 rgba(15,46,48,.05);
}
/* ---------- Aqua Splash 2027: tối (theo máy, hoặc chọn Tối) ---------- */
@media (prefers-color-scheme:dark){
  html:not([data-bang-mau="dat-set"]):not([data-theme=light]){
    --paper:#0B1C1E;--surface:#10272A;--sunk:#081517;
    --ink:#E4F2F2;--muted:#93B3B4;--line:#1F3A3D;
    --clay:#85CED1;--clay-ink:#85CED1;--on-clay:#0B1C1E;--clay-soft:#143235;
    --river:#85CED1;--amber:#85CED1;
    --accent:#85CED1;--accent-soft:#143235;--accent2:#85CED1;--gold:#85CED1;--text:#E4F2F2;
    --mach-1:#85CED1;--mach-2:#5FB4B8;--mach-3:#A9DEE0;--mach-4:#3C9DA2;--gd-hp:#5FB4B8;
    --lift:0 1px 1px rgba(0,0,0,.4),0 10px 24px rgba(0,0,0,.42);
    --press:inset 0 2px 0 rgba(255,255,255,.05),inset 0 -2px 0 rgba(0,0,0,.28);
  }
}
html:not([data-bang-mau="dat-set"])[data-theme=dark]{
  --paper:#0B1C1E;--surface:#10272A;--sunk:#081517;
  --ink:#E4F2F2;--muted:#93B3B4;--line:#1F3A3D;
  --clay:#85CED1;--clay-ink:#85CED1;--on-clay:#0B1C1E;--clay-soft:#143235;
  --river:#85CED1;--amber:#85CED1;
  --accent:#85CED1;--accent-soft:#143235;--accent2:#85CED1;--gold:#85CED1;--text:#E4F2F2;
  --mach-1:#85CED1;--mach-2:#5FB4B8;--mach-3:#A9DEE0;--mach-4:#3C9DA2;--gd-hp:#5FB4B8;
  --lift:0 1px 1px rgba(0,0,0,.4),0 10px 24px rgba(0,0,0,.42);
  --press:inset 0 2px 0 rgba(255,255,255,.05),inset 0 -2px 0 rgba(0,0,0,.28);
}
/* phông Aqua: khai riêng, độ ưu tiên (0,2,1) như các luật màu nên thắng :root[data-theme=…] của trang ở cả sáng lẫn tối */
html:not([data-bang-mau="dat-set"]):not([data-theme=x]){
  --sans:'Be Vietnam Pro',system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;
  --serif:'Be Vietnam Pro',system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;
}

/* ---------- Đất sét (tùy chọn): giữ màu cũ, chỉ đổi phông cho đủ dấu ---------- */
html[data-bang-mau="dat-set"]:not([data-theme=x]){
  --sans:'Be Vietnam Pro',system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;
  --serif:'Lora',"Iowan Old Style",Georgia,serif;
}

/* cả hai: chữ thường dùng --sans (vài trang viết cứng phông hệ thống trên body) */
body{font-family:var(--sans)}

/* nút ngôn ngữ đang chọn: site-chrome.css tô cứng #b45535 ở chế độ sáng; Aqua dùng màu chữ nhấn */
html:not([data-bang-mau="dat-set"]):not([data-theme=dark]) :is(.lang button.on,.langtog button.active){background:var(--clay-ink);color:var(--on-clay)}

/* nhãn mạch học phần (chữ in hoa rất nhỏ) ở khối Giảng dạy: --m giờ là các sắc Aqua, có sắc quá nhạt
   cho chữ; chữ dùng màu nhấn đủ tương phản, --m chỉ còn cho vạch màu và nền nhạt */
html:not([data-bang-mau="dat-set"]) .gd-mach{color:var(--clay-ink)}

/* ---------- ngắt dòng không để chữ lẻ (cả hai giao diện) — 04/12/2026 ----------
   Chị thấy vài đoạn rớt một chữ xuống dòng cuối (vd. «Nam.» dưới chú thích bản đồ BizOn).
   text-wrap:pretty: trình duyệt cân lại vài dòng cuối để dòng chót không chỉ một chữ.
   text-wrap:balance: chú thích, tiêu đề, trích dẫn ngắn chia đều các dòng.
   :where() giữ độ ưu tiên bằng 0 nên trang nào tự đặt text-wrap vẫn thắng.
   Trình duyệt chưa hỗ trợ thì bỏ qua, chữ ngắt như cũ. */
:where(p,li,dd,td,blockquote,.lead,.statement){text-wrap:pretty}
:where(h1,h2,h3,h4,figcaption,caption,.eyebrow,.k){text-wrap:balance}
