/* ============================================================
   Sổ tay sinh viên theo năm — module student-handbook.
   Nạp CHỈ trên Page khung (templates/student-handbook.php — hf_hb_assets(), priority 22,
   SAU mega-menu.css).

   Phong cách bám BỐ CỤC 2 sổ tay gốc của Phòng CTSV (user yêu cầu 2026-11-10 —
   docs/modules/student-handbook/source/so-tay-{2025,2026}.html):
     · mỗi mục là một "trang" — thẻ trắng bo góc, đổ bóng, đặt giữa nền xám nhạt;
     · tiêu đề mục = dải ĐỎ chữ trắng in hoa căn giữa; mục nền đỏ / xanh: tiêu đề trắng / vàng
       căn giữa, nội dung đặt trong ô TRẮNG bên trong (không để chữ màu trên nền màu);
     · tiêu đề con đỏ có vạch trái, chấm danh sách đỏ, bảng đầu đỏ – thân hồng;
     · dòng thời gian so le 2 bên trục giữa; thẻ viền trên đổi màu xanh / đỏ / cam / lục.
   Font giữ Mulish của site (header/footer chung) — chỉ bố cục + màu theo bản gốc.

   ⚠ SCOPE BẮT BUỘC: mọi rule nằm dưới `.hf-handbook` (wrapper <main>). `.hf-shell` cũng do
   header/mega-menu + footer dùng; file này load sau mega-menu.css nên rule TRẦN sẽ đè gốc,
   làm mega/footer co lại CHỈ trên trang này (bài học why-huflit-page 2026-07-22).

   Breakpoint theo theme: 1023 / 767 / 599.
   ============================================================ */

/* ══════════ A. Token + base ══════════ */
.hf-handbook {
  /* Màu lấy từ CSS của sổ tay gốc */
  --hb-red: #d63a2f;
  --hb-red-deep: #c62828;
  --hb-navy: #003366;
  --hb-navy-2: #004080;
  --hb-blue: #0055a5;
  --hb-orange: #ff6600;
  --hb-green: #2e7d32;
  --hb-gold: #ffcc00;
  --hb-pink: #fbe9e9;
  --hb-text: #333;
  --hb-muted: #5f6b7a;
  --hb-line: #e3e8ef;
  --hb-page-bg: #f3f5f8;
  --radius: 12px;
  --hf-page-max: 1360px;
  --hf-page-side: 36px;
  --hf-hb-read: 1080px;
  /* Đo lại bằng assets/js/student-handbook.js; giá trị dưới là dự phòng khi tắt JS. */
  --hf-hb-top: 134px;
  --hf-hb-bar: 60px;

  display: block;
  overflow: clip;
  font-family: 'Mulish', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  color: var(--hb-text);
  background: var(--hb-page-bg);
  -webkit-font-smoothing: antialiased;
}

.hf-handbook,
.hf-handbook *,
.hf-handbook *::before,
.hf-handbook *::after { box-sizing: border-box; }

.hf-handbook h1,
.hf-handbook h2,
.hf-handbook h3,
.hf-handbook h4 { margin: 0; font-weight: 800; line-height: 1.25; letter-spacing: 0; color: inherit; }
.hf-handbook p { margin: 0; }
.hf-handbook img { max-width: 100%; height: auto; display: block; }
.hf-handbook figure { margin: 0; }
.hf-handbook a { color: var(--hb-blue); }

.hf-handbook .hf-shell {
  width: calc(100% - (var(--hf-page-side) * 2));
  max-width: var(--hf-page-max);
  margin-right: auto;
  margin-left: auto;
  padding-right: 0;
  padding-left: 0;
}
/* Hero, thanh công cụ và các "trang" canh cùng một cột. */
.hf-handbook .hf-hb-shell,
.hf-handbook .hf-hb-cover-in,
.hf-handbook .hf-hb-toolbar-in { max-width: var(--hf-hb-read); }

/* Mục cuộn tới (Xem nhanh) không bị header sticky + thanh công cụ che (AC #4). */
.hf-handbook .hf-hb-sec[id],
.hf-handbook .hf-hb-cover[id] { scroll-margin-top: calc(var(--hf-hb-top) + var(--hf-hb-bar) + 12px); }

.hf-handbook .hf-hb-icon { display: block; flex-shrink: 0; }

/* ══════════ B. Bìa / hero (bản gốc: dải xanh tràn viền, chữ căn giữa) ══════════ */
.hf-handbook .hf-hb-cover {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 340px;
  padding: 56px 0 64px;
  color: #fff;
  text-align: center;
  background: linear-gradient(135deg, var(--hb-navy), var(--hb-navy-2));
  isolation: isolate;
}
.hf-handbook .hf-hb-cover.hf-hb-bg--red { background: var(--hb-red-deep); }
.hf-handbook .hf-hb-cover.hf-hb-bg--white,
.hf-handbook .hf-hb-cover.hf-hb-bg--light { background: #fff; color: var(--hb-navy); }
.hf-handbook .hf-hb-cover--plain { min-height: 220px; }
.hf-handbook .hf-hb-cover-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
}
.hf-handbook .hf-hb-cover-shade {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(0, 51, 102, .55) 0%, rgba(0, 51, 102, .85) 100%);
}
.hf-handbook .hf-hb-cover.has-image { color: #fff; }
.hf-handbook .hf-hb-cover-in { position: relative; }
.hf-handbook .hf-hb-cover-title {
  font-size: clamp(36px, 5.6vw, 64px);
  font-weight: 900;
  letter-spacing: .01em;
  line-height: 1.08;
}
.hf-handbook .hf-hb-cover-sub {
  margin-top: 16px;
  font-size: clamp(18px, 2.4vw, 28px);
  font-weight: 800;
  text-transform: uppercase;
  color: var(--hb-gold);
}
.hf-handbook .hf-hb-cover.hf-hb-bg--white .hf-hb-cover-sub,
.hf-handbook .hf-hb-cover.hf-hb-bg--light .hf-hb-cover-sub { color: var(--hb-red); }
.hf-handbook .hf-hb-cover-desc {
  margin: 14px auto 0;
  max-width: 700px;
  font-size: 18px;
  opacity: .92;
}

/* Breadcrumb */
.hf-handbook .hf-hb-crumb {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 6px 8px;
  margin-bottom: 22px;
  font-size: 13.5px;
  font-weight: 700;
  color: rgba(255, 255, 255, .78);
}
.hf-handbook .hf-hb-crumb a { color: inherit; text-decoration: none; }
.hf-handbook .hf-hb-crumb a:hover { color: #fff; text-decoration: underline; }
.hf-handbook .hf-hb-crumb .hf-hb-chev { opacity: .55; }
.hf-handbook .hf-hb-cover.hf-hb-bg--white .hf-hb-crumb,
.hf-handbook .hf-hb-cover.hf-hb-bg--light .hf-hb-crumb { color: var(--hb-muted); }

.hf-handbook .hf-hb-preview-bar {
  padding: 8px 16px;
  background: var(--hb-orange);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  text-align: center;
}

/* ══════════ C. Thanh công cụ (bản gốc: thanh đỏ có ô "Xem nhanh") — nền ĐẶC ══════════ */
.hf-handbook .hf-hb-toolbar {
  position: sticky;
  top: var(--hf-hb-top);
  z-index: 40;
  background: var(--hb-red);
  box-shadow: 0 6px 18px -10px rgba(0, 0, 0, .45);
}
.hf-handbook .hf-hb-toolbar-in {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  min-height: 60px;
  padding: 10px 0;
}
.hf-handbook .hf-hb-dd { position: relative; }
.hf-handbook .hf-hb-dd > summary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px 14px;
  border: 2px solid #fff;
  border-radius: 8px;
  background: #fff;
  color: var(--hb-red);
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.hf-handbook .hf-hb-dd > summary::-webkit-details-marker { display: none; }
.hf-handbook .hf-hb-dd > summary:hover { border-color: var(--hb-gold); }
.hf-handbook .hf-hb-dd > summary:focus-visible { outline: 3px solid var(--hb-gold); outline-offset: 2px; }
.hf-handbook .hf-hb-dd-label { color: var(--hb-red); }
.hf-handbook .hf-hb-dd-value { color: var(--hb-navy); font-weight: 900; }
.hf-handbook .hf-hb-dd > summary .hf-hb-chev { color: var(--hb-text); transform: rotate(90deg); transition: transform .2s; }
.hf-handbook .hf-hb-dd[open] > summary { border-color: var(--hb-gold); }
.hf-handbook .hf-hb-dd[open] > summary .hf-hb-chev { transform: rotate(-90deg); }
.hf-handbook .hf-hb-dd-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 41;
  min-width: 160px;
  max-height: min(60vh, 520px);
  overflow: auto;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: #fff;
  border: 1px solid var(--hb-line);
  border-radius: 10px;
  box-shadow: 0 18px 40px -16px rgba(16, 35, 66, .45);
}
.hf-handbook .hf-hb-dd--toc .hf-hb-dd-menu { width: min(420px, calc(100vw - 32px)); }
.hf-handbook .hf-hb-dd-menu li { margin: 0; }
.hf-handbook .hf-hb-dd-menu a {
  display: block;
  padding: 8px 12px;
  border-radius: 6px;
  color: var(--hb-text);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
  text-decoration: none;
}
.hf-handbook .hf-hb-dd-menu a:hover,
.hf-handbook .hf-hb-dd-menu a:focus-visible { background: var(--hb-pink); color: var(--hb-red-deep); outline: none; }
.hf-handbook .hf-hb-dd-menu a[aria-current] { background: var(--hb-red); color: #fff; }

/* ══════════ D. "Trang" — mỗi mục là một thẻ trắng giữa nền xám ══════════ */
.hf-handbook .hf-hb-body { padding: 28px 0 56px; }
.hf-handbook .hf-hb-sec { padding: 14px 0; }
.hf-handbook .hf-hb-sec > .hf-hb-shell {
  padding: 40px 40px 44px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 6px 24px rgba(16, 35, 66, .07);
  color: var(--hb-text);
}
.hf-handbook .hf-hb-bg--light > .hf-hb-shell { background: #fafbfc; }
/* Nền xanh ĐẶC (không gradient): các mục nối tiếp cùng nền ghép thành một khung — gradient
   riêng từng mục làm lệch màu ở mép nối, thành vệt ngang. Màu = giữa dải #003366 → #004080. */
.hf-handbook .hf-hb-bg--navy > .hf-hb-shell { background: #003a73; color: #fff; }
/* Phủ khe hở dưới-pixel giữa 2 mục nối. */
.hf-handbook .hf-hb-sec.is-join > .hf-hb-shell { margin-top: -1px; }
.hf-handbook .hf-hb-bg--red > .hf-hb-shell { background: var(--hb-red-deep); color: #fff; }

/* Mục con nối tiếp cùng nền (renderer gắn .is-join) → liền MỘT khung với mục trước. */
.hf-handbook .hf-hb-sec.is-join { padding-top: 0; }
.hf-handbook .hf-hb-sec.is-join > .hf-hb-shell { padding-top: 8px; border-top-left-radius: 0; border-top-right-radius: 0; }
.hf-handbook .hf-hb-sec:has(+ .hf-hb-sec.is-join) { padding-bottom: 0; }
.hf-handbook .hf-hb-sec:has(+ .hf-hb-sec.is-join) > .hf-hb-shell { padding-bottom: 24px; border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
/* Cắt bóng đổ ở MÉP NỐI để 2 mục trông như một khung liền (không có vệt bóng ngang). */
.hf-handbook .hf-hb-sec.is-join > .hf-hb-shell { clip-path: inset(0 -40px -40px -40px); }
.hf-handbook .hf-hb-sec:has(+ .hf-hb-sec.is-join) > .hf-hb-shell { clip-path: inset(-40px -40px 0 -40px); }
.hf-handbook .hf-hb-sec.is-join:has(+ .hf-hb-sec.is-join) > .hf-hb-shell { clip-path: inset(0 -40px 0 -40px); }

/* Tiêu đề mục: dải đỏ chữ trắng in hoa căn giữa (bản gốc `.page h1`). */
.hf-handbook .hf-hb-sec-head { margin-bottom: 26px; text-align: center; }
.hf-handbook .hf-hb-sec-title {
  display: block;
  padding: 16px 24px;
  border-radius: 8px;
  background: var(--hb-red);
  color: #fff;
  font-size: clamp(20px, 2.4vw, 30px);
  font-weight: 900;
  text-transform: uppercase;
  line-height: 1.25;
}
.hf-handbook .hf-hb-intro { margin: 14px auto 0; max-width: 860px; font-size: 16.5px; color: var(--hb-text); }

/* Nền xanh / đỏ: tiêu đề vàng / trắng căn giữa, không dải nền. */
.hf-handbook .hf-hb-bg--navy .hf-hb-sec-title,
.hf-handbook .hf-hb-bg--red .hf-hb-sec-title { padding: 0; background: none; font-size: clamp(22px, 2.6vw, 32px); }
.hf-handbook .hf-hb-bg--navy .hf-hb-sec-title { color: var(--hb-gold); }
.hf-handbook .hf-hb-bg--red .hf-hb-sec-title { color: #fff; }
/* Mục nối tiếp trên nền màu: tiêu đề cùng cỡ với tiêu đề hộp lưu ý cạnh nó (Triết lý, Khẩu hiệu…). */
.hf-handbook .hf-hb-bg--navy.is-join .hf-hb-sec-title,
.hf-handbook .hf-hb-bg--red.is-join .hf-hb-sec-title { font-size: clamp(20px, 2.2vw, 26px); }
.hf-handbook .hf-hb-bg--navy.is-join .hf-hb-sec-head,
.hf-handbook .hf-hb-bg--red.is-join .hf-hb-sec-head { margin-bottom: 18px; }
.hf-handbook .hf-hb-bg--navy .hf-hb-intro,
.hf-handbook .hf-hb-bg--red .hf-hb-intro { color: rgba(255, 255, 255, .92); }

/* Mục nối tiếp trên nền trắng: tiêu đề con đỏ có vạch trái (bản gốc `h2` trong trang). */
.hf-handbook .hf-hb-bg--white.is-join .hf-hb-sec-head,
.hf-handbook .hf-hb-bg--light.is-join .hf-hb-sec-head { text-align: left; }
.hf-handbook .hf-hb-bg--white.is-join .hf-hb-sec-title,
.hf-handbook .hf-hb-bg--light.is-join .hf-hb-sec-title {
  padding: 2px 0 2px 14px;
  border-left: 6px solid var(--hb-red);
  border-radius: 0;
  background: none;
  color: var(--hb-red);
  font-size: clamp(18px, 2vw, 22px);
}
.hf-handbook .hf-hb-empty p { font-size: 18px; text-align: center; }

/* ══════════ E. Nội dung soạn thảo (WYSIWYG) ══════════ */
.hf-handbook .hf-hb-prose { font-size: 16px; line-height: 1.75; overflow-wrap: anywhere; }
.hf-handbook .hf-hb-prose * { font-family: inherit !important; }
/* Thứ tự 2 rule dưới là CÓ CHỦ Ý: cùng độ ưu tiên, rule sau thắng → phần tử đầu không có lề
   trên, các khối kế tiếp cách nhau .8em (kể cả 2 <p> liền nhau). */
.hf-handbook .hf-hb-prose > *,
.hf-handbook .hf-hb-prose li > * { margin-top: 0; margin-bottom: 0; }
.hf-handbook .hf-hb-prose > * + *,
.hf-handbook .hf-hb-prose li > * + * { margin-top: .8em; }
/* Tiêu đề con: đỏ, vạch trái (bản gốc `.page h2`). */
.hf-handbook .hf-hb-prose > h2,
.hf-handbook .hf-hb-prose > h3 {
  padding: 2px 0 2px 14px;
  border-left: 6px solid var(--hb-red);
  color: var(--hb-red);
  font-size: 20px;
  line-height: 1.3;
}
.hf-handbook .hf-hb-prose > h4 { color: var(--hb-red-deep); font-size: 17px; }
.hf-handbook .hf-hb-prose > * + h2,
.hf-handbook .hf-hb-prose > * + h3 { margin-top: 1.6em; }
.hf-handbook .hf-hb-prose > * + h4 { margin-top: 1.2em; }
.hf-handbook .hf-hb-prose > h2 + *,
.hf-handbook .hf-hb-prose > h3 + *,
.hf-handbook .hf-hb-prose > h4 + * { margin-top: .7em; }
/* Theme reset list-style toàn site — khai lại; chấm đầu dòng ĐỎ như bản gốc. */
.hf-handbook .hf-hb-prose ul,
.hf-handbook .hf-hb-prose ol { padding-left: 1.5em; }
.hf-handbook .hf-hb-prose ul { list-style: disc outside; }
.hf-handbook .hf-hb-prose ol { list-style: decimal outside; }
.hf-handbook .hf-hb-prose ul ul { list-style-type: circle; }
.hf-handbook .hf-hb-prose li { display: list-item; }
.hf-handbook .hf-hb-prose li::marker { color: var(--hb-red); }
.hf-handbook .hf-hb-prose li + li { margin-top: .4em; }
.hf-handbook .hf-hb-prose li > ul,
.hf-handbook .hf-hb-prose li > ol { margin-top: .4em; }
.hf-handbook .hf-hb-prose strong { font-weight: 800; }
.hf-handbook .hf-hb-prose a { text-decoration: underline; text-underline-offset: 2px; }
.hf-handbook .hf-hb-prose blockquote { margin-left: 0; padding: 14px 20px; border-left: 5px solid var(--hb-orange); background: #fff7f0; font-style: italic; }

/* Văn bản tự do trên nền xanh / đỏ: nội dung nằm trong ô TRẮNG (bản gốc: khung đỏ bọc hộp trắng). */
.hf-handbook .hf-hb-bg--navy .hf-hb-prose--doc,
.hf-handbook .hf-hb-bg--red .hf-hb-prose--doc {
  padding: 30px 34px;
  border-radius: var(--radius);
  background: #fff;
  color: var(--hb-text);
  box-shadow: 0 4px 14px rgba(0, 0, 0, .12);
}

/* Bảng — bọc .hf-hb-table (hf_hb_prose) để cuộn ngang trong khung, trang không cuộn (AC #5).
   Bản gốc: đầu bảng đỏ chữ trắng in hoa, thân hồng nhạt, kẻ trắng. */
.hf-handbook .hf-hb-table {
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 8px;
  background: #fff;
  color: var(--hb-text);
}
.hf-handbook .hf-hb-table table { width: 100%; min-width: 480px; border-collapse: collapse; font-size: 15px; }
/* Bề rộng tối thiểu theo SỐ CỘT: màn hẹp thì bảng cuộn ngang trong khung thay vì ép mỗi cột còn
   1–2 chữ/dòng (bảng TESOL 6 cột). Cùng độ ưu tiên → rule sau thắng: 6 cột khớp cả 3, lấy 880px. */
.hf-handbook .hf-hb-table table:has(tr > :nth-child(4)) { min-width: 620px; }
.hf-handbook .hf-hb-table table:has(tr > :nth-child(5)) { min-width: 760px; }
.hf-handbook .hf-hb-table table:has(tr > :nth-child(6)) { min-width: 880px; }
/* Ô bảng KHÔNG dùng overflow-wrap:anywhere của .hf-hb-prose: "anywhere" hạ bề rộng tối thiểu của
   chữ xuống 1 ký tự → bảng tự co cột, cắt ngang chữ ("S T T", "TESO L", "KHÓ A"). break-word chỉ
   bẻ khi MỘT từ dài hơn cả cột (email, URL) và không làm cột co lại; bảng quá rộng thì cuộn ngang
   trong khung .hf-hb-table. */
.hf-handbook .hf-hb-table th,
.hf-handbook .hf-hb-table td {
  padding: 12px 14px;
  border: 2px solid #fff;
  vertical-align: middle;
  overflow-wrap: break-word;
  word-break: normal;
  hyphens: none;
}
.hf-handbook .hf-hb-table th { background: var(--hb-red); color: #fff; font-weight: 800; text-transform: uppercase; text-align: center; }
.hf-handbook .hf-hb-table td { background: var(--hb-pink); }

/* ══════════ F. Dòng thời gian — so le 2 bên trục giữa ══════════ */
.hf-handbook .hf-hb-timeline {
  position: relative;
  max-width: 980px;
  margin: 0 auto;
  padding: 0;
  list-style: none;
}
.hf-handbook .hf-hb-timeline::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 19px;
  width: 4px;
  border-radius: 2px;
  background: var(--hb-blue);
}
.hf-handbook .hf-hb-tl-item { position: relative; padding-left: 58px; }
.hf-handbook .hf-hb-tl-item + .hf-hb-tl-item { margin-top: 20px; }
.hf-handbook .hf-hb-tl-dot {
  position: absolute;
  top: 16px;
  left: 1px;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 4px solid var(--hb-blue);
  border-radius: 50%;
  background: var(--hb-orange);
  color: #fff;
}
.hf-handbook .hf-hb-tl-card {
  padding: 18px 22px;
  border-radius: var(--radius);
  background: #fff;
  color: var(--hb-text);
  box-shadow: 0 3px 14px rgba(0, 0, 0, .08);
}
.hf-handbook .hf-hb-tl-when { font-size: 20px; font-weight: 900; color: var(--hb-navy); }
.hf-handbook .hf-hb-tl-text { margin-top: 8px; }
.hf-handbook .hf-hb-bg--navy .hf-hb-timeline::before,
.hf-handbook .hf-hb-bg--red .hf-hb-timeline::before { background: rgba(255, 255, 255, .6); }

@media (min-width: 900px) {
  .hf-handbook .hf-hb-timeline::before { left: 50%; margin-left: -2px; }
  .hf-handbook .hf-hb-tl-item { width: 50%; padding-left: 0; }
  .hf-handbook .hf-hb-tl-item:nth-child(odd) { padding-right: 44px; text-align: right; }
  .hf-handbook .hf-hb-tl-item:nth-child(even) { margin-left: 50%; padding-left: 44px; }
  .hf-handbook .hf-hb-tl-item:nth-child(odd) .hf-hb-tl-dot { left: auto; right: -20px; }
  .hf-handbook .hf-hb-tl-item:nth-child(even) .hf-hb-tl-dot { left: -20px; }
  /* So le: mỗi thẻ lùi lên nửa chiều cao để 2 cột đan nhau như bản gốc. */
  .hf-handbook .hf-hb-tl-item + .hf-hb-tl-item { margin-top: -28px; }
}

/* ══════════ G. Lưới thẻ — viền trên đổi màu xanh / đỏ / cam / lục ══════════ */
/* Flex + căn giữa (không grid): hàng cuối thiếu thẻ nằm GIỮA như bản gốc (vd 5 giá trị cốt lõi
   ở lưới 3 cột → 3 + 2 căn giữa). Bề rộng thẻ tính từ số cột (--cols). */
.hf-handbook .hf-hb-cards { --cols: 3; --gap: 22px; display: flex; flex-wrap: wrap; justify-content: center; gap: var(--gap); }
.hf-handbook .hf-hb-cards.hf-hb-cols-2 { --cols: 2; }
.hf-handbook .hf-hb-cards.hf-hb-cols-4 { --cols: 4; }
.hf-handbook .hf-hb-cards > .hf-hb-card { flex: 0 1 calc((100% - (var(--cols) - 1) * var(--gap)) / var(--cols)); min-width: 0; }
.hf-handbook .hf-hb-card {
  --c: var(--hb-blue);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-top: 6px solid var(--c);
  border-radius: var(--radius);
  background: #fff;
  color: var(--hb-text);
  text-align: center;
  box-shadow: 0 3px 14px rgba(0, 0, 0, .09);
}
.hf-handbook .hf-hb-card:nth-child(4n+2) { --c: var(--hb-red-deep); }
.hf-handbook .hf-hb-card:nth-child(4n+3) { --c: var(--hb-orange); }
.hf-handbook .hf-hb-card:nth-child(4n+4) { --c: var(--hb-green); }
.hf-handbook .hf-hb-card-body { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 22px 22px 24px; }
.hf-handbook .hf-hb-card-icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--c) 12%, #fff);
  color: var(--c);
}
.hf-handbook .hf-hb-card-title { font-size: 20px; color: var(--c); }
.hf-handbook .hf-hb-card-title a { color: inherit; text-decoration: none; }
.hf-handbook .hf-hb-card-title a:hover { text-decoration: underline; }
.hf-handbook .hf-hb-card .hf-hb-prose { width: 100%; }
/* Thẻ có ảnh (Cuộc sống sinh viên…): chữ canh trái cho dễ đọc. */
.hf-handbook .hf-hb-card.has-media { text-align: left; }
.hf-handbook .hf-hb-card.has-media .hf-hb-card-body { align-items: stretch; }
.hf-handbook .hf-hb-card-media { display: grid; gap: 4px; background: var(--hb-page-bg); }
.hf-handbook .hf-hb-card-media img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.hf-handbook .hf-hb-media-2,
.hf-handbook .hf-hb-media-4 { grid-template-columns: 1fr 1fr; }
.hf-handbook .hf-hb-media-3 { grid-template-columns: 1fr 1fr 1fr; }
.hf-handbook .hf-hb-media-2 img,
.hf-handbook .hf-hb-media-3 img,
.hf-handbook .hf-hb-media-4 img { aspect-ratio: 4 / 3; }

/* ══════════ H. Lời ngỏ — thẻ trắng viền trái vàng / xanh trên nền đỏ ══════════ */
.hf-handbook .hf-hb-greeting { margin: -10px 0 26px; font-size: 18px; font-weight: 700; text-align: center; }
.hf-handbook .hf-hb-letters { display: grid; gap: 26px; max-width: 920px; margin: 0 auto; }
.hf-handbook .hf-hb-letter {
  padding: 26px 30px;
  border-left: 6px solid var(--hb-gold);
  border-radius: var(--radius);
  background: #fff;
  color: var(--hb-text);
  box-shadow: 0 4px 16px rgba(0, 0, 0, .15);
}
.hf-handbook .hf-hb-letter:nth-child(even) { border-left-color: var(--hb-blue); }
.hf-handbook .hf-hb-letter-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 .35em; margin-bottom: 14px; color: var(--hb-red-deep); }
.hf-handbook .hf-hb-letter-author { font-size: 19px; }
.hf-handbook .hf-hb-letter-role { font-size: 19px; font-weight: 800; }
.hf-handbook .hf-hb-letter-role::before { content: "– "; }
.hf-handbook .hf-hb-letter .hf-hb-prose { text-align: justify; }

/* ══════════ I. Hỏi – đáp — hộp viền trái xanh ══════════ */
.hf-handbook .hf-hb-faq { display: grid; gap: 16px; }
.hf-handbook .hf-hb-faq-item {
  padding: 20px 24px;
  border-left: 5px solid var(--hb-blue);
  border-radius: 10px;
  background: #f7f9fc;
  color: var(--hb-text);
}
.hf-handbook .hf-hb-bg--navy .hf-hb-faq-item,
.hf-handbook .hf-hb-bg--red .hf-hb-faq-item { background: #fff; }
.hf-handbook .hf-hb-faq-q { font-size: 18px; color: var(--hb-navy); }
.hf-handbook .hf-hb-faq-q + .hf-hb-prose { margin-top: 10px; }

/* ══════════ J. Hình ảnh ══════════ */
.hf-handbook .hf-hb-gallery { display: grid; gap: 18px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.hf-handbook .hf-hb-gallery.hf-hb-cols-1 { grid-template-columns: minmax(0, 1fr); max-width: 980px; margin: 0 auto; }
.hf-handbook .hf-hb-gallery.hf-hb-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.hf-handbook .hf-hb-figure img { width: 100%; border-radius: 10px; box-shadow: 0 3px 14px rgba(0, 0, 0, .12); background: #fff; }
.hf-handbook .hf-hb-figure-link { display: block; border-radius: 10px; }
.hf-handbook .hf-hb-figure-link:focus-visible { outline: 3px solid var(--hb-gold); outline-offset: 3px; }
.hf-handbook .hf-hb-figure figcaption { margin-top: 8px; font-size: 14px; color: var(--hb-muted); text-align: center; }
.hf-handbook .hf-hb-bg--navy .hf-hb-figure figcaption,
.hf-handbook .hf-hb-bg--red .hf-hb-figure figcaption { color: rgba(255, 255, 255, .88); }

/* ── J2. Bản đồ nhúng (Google Maps) — chiều cao từ field, màn nhỏ không quá 70% màn hình ── */
.hf-handbook .hf-hb-map { max-width: 980px; margin: 0 auto; }
.hf-handbook .hf-hb-map-frame {
  display: block;
  width: 100%;
  height: var(--hf-hb-map-h, 520px);
  border: 0;
  border-radius: 10px;
  box-shadow: 0 3px 14px rgba(0, 0, 0, .12);
  background: #e9edf2;
}
.hf-handbook .hf-hb-map figcaption { margin-top: 8px; font-size: 14px; color: var(--hb-muted); text-align: center; }
.hf-handbook .hf-hb-bg--navy .hf-hb-map figcaption,
.hf-handbook .hf-hb-bg--red .hf-hb-map figcaption { color: rgba(255, 255, 255, .88); }
/* Lớp phủ "Đang tải bản đồ…" (hotfix prod 12/11): ẩn khi iframe onload (.is-loaded), hoặc tự ẩn sau 3s để Google vẽ dần. */
.hf-handbook .hf-hb-map-box { position: relative; }
.hf-handbook .hf-hb-map-loading {
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border-radius: 10px;
  background: #e9edf2;
  color: var(--hb-muted);
  font-size: 15px;
  font-weight: 500;
  pointer-events: none;
  animation: hfHbMapFallback .4s ease 3s forwards;
}
.hf-handbook .hf-hb-map-box.is-loaded .hf-hb-map-loading { animation: hfHbMapLoaded .4s ease .3s forwards; }
.hf-handbook .hf-hb-map-spinner {
  width: 38px;
  height: 38px;
  border: 4px solid rgba(214, 58, 47, .2);
  border-top-color: var(--hb-red);
  border-radius: 50%;
  animation: hfHbMapSpin .9s linear infinite;
}
@keyframes hfHbMapSpin { to { transform: rotate(360deg); } }
@keyframes hfHbMapFallback { to { opacity: 0; visibility: hidden; } }
@keyframes hfHbMapLoaded { to { opacity: 0; visibility: hidden; } }
@media (max-width: 767px) {
  .hf-handbook .hf-hb-map-frame { height: min(var(--hf-hb-map-h, 520px), 70vh); }
}

/* ══════════ K. Hộp lưu ý ══════════ */
.hf-handbook .hf-hb-sec--callout > .hf-hb-shell { padding-top: 30px; padding-bottom: 30px; }
.hf-handbook .hf-hb-callout {
  padding: 22px 26px;
  border-left: 6px solid var(--hb-orange);
  border-radius: 10px;
  background: #fff7f0;
  color: var(--hb-text);
}
.hf-handbook .hf-hb-callout-title { font-size: 19px; color: var(--hb-red); }
.hf-handbook .hf-hb-callout-title + .hf-hb-prose { margin-top: 10px; font-size: 17px; }
/* Trên nền xanh / đỏ (Triết lý giáo dục, Khẩu hiệu…): tiêu đề vàng căn giữa + ô trắng chữ đậm. */
.hf-handbook .hf-hb-bg--navy .hf-hb-callout,
.hf-handbook .hf-hb-bg--red .hf-hb-callout { padding: 0; border: 0; background: none; text-align: center; }
.hf-handbook .hf-hb-bg--navy .hf-hb-callout-title,
.hf-handbook .hf-hb-bg--red .hf-hb-callout-title { font-size: clamp(20px, 2.2vw, 26px); text-transform: uppercase; }
.hf-handbook .hf-hb-bg--navy .hf-hb-callout-title { color: var(--hb-gold); }
.hf-handbook .hf-hb-bg--red .hf-hb-callout-title { color: #fff; }
.hf-handbook .hf-hb-bg--navy .hf-hb-callout .hf-hb-prose,
.hf-handbook .hf-hb-bg--red .hf-hb-callout .hf-hb-prose {
  max-width: 860px;
  margin: 16px auto 0;
  padding: 22px 26px;
  border-radius: var(--radius);
  background: #fff;
  color: var(--hb-red-deep);
  font-size: 18px;
  font-weight: 800;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .15);
}

/* ══════════ L. Liên hệ ══════════ */
.hf-handbook .hf-hb-contacts {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
}
.hf-handbook .hf-hb-contact {
  padding: 18px 20px;
  border-top: 5px solid var(--hb-blue);
  border-radius: 10px;
  background: #fff;
  color: var(--hb-text);
  box-shadow: 0 3px 12px rgba(0, 0, 0, .08);
}
.hf-handbook .hf-hb-contact:nth-child(even) { border-top-color: var(--hb-red-deep); }
.hf-handbook .hf-hb-contact-name { margin-bottom: 8px; font-size: 17px; color: var(--hb-navy); }
.hf-handbook .hf-hb-contact-line { display: flex; gap: 8px; align-items: flex-start; font-size: 15px; }
.hf-handbook .hf-hb-contact-line + .hf-hb-contact-line { margin-top: 6px; }
.hf-handbook .hf-hb-contact-line .hf-hb-icon { margin-top: 3px; color: var(--hb-red); }
.hf-handbook .hf-hb-contact-line a { overflow-wrap: anywhere; }

/* ══════════ M. Responsive ══════════ */
@media (max-width: 1023px) {
  .hf-handbook .hf-hb-cards,
  .hf-handbook .hf-hb-cards.hf-hb-cols-4 { --cols: 2; }
  .hf-handbook .hf-hb-gallery.hf-hb-cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hf-handbook .hf-hb-sec > .hf-hb-shell { padding: 32px 28px 36px; }
}

@media (max-width: 767px) {
  .hf-handbook { --hf-page-side: 16px; }
  .hf-handbook .hf-hb-cards,
  .hf-handbook .hf-hb-cards.hf-hb-cols-2,
  .hf-handbook .hf-hb-cards.hf-hb-cols-4 { --cols: 1; }
  .hf-handbook .hf-hb-gallery,
  .hf-handbook .hf-hb-gallery.hf-hb-cols-3,
  .hf-handbook .hf-hb-contacts { grid-template-columns: minmax(0, 1fr); }
  .hf-handbook .hf-hb-cover { min-height: 280px; padding: 40px 0 44px; }
  .hf-handbook .hf-hb-body { padding: 16px 0 40px; }
  .hf-handbook .hf-hb-sec { padding: 10px 0; }
  .hf-handbook .hf-hb-sec > .hf-hb-shell { padding: 24px 18px 28px; border-radius: 12px; }
  .hf-handbook .hf-hb-sec-title { padding: 12px 14px; }
  .hf-handbook .hf-hb-bg--navy .hf-hb-prose--doc,
  .hf-handbook .hf-hb-bg--red .hf-hb-prose--doc { padding: 20px 18px; }
  .hf-handbook .hf-hb-letter,
  .hf-handbook .hf-hb-callout { padding: 20px; }
  .hf-handbook .hf-hb-letter .hf-hb-prose { text-align: left; }
}

@media (max-width: 599px) {
  .hf-handbook .hf-hb-toolbar-in { position: relative; gap: 8px; }
  .hf-handbook .hf-hb-dd { flex: 1 1 0; min-width: 0; position: static; }
  .hf-handbook .hf-hb-dd > summary { width: 100%; justify-content: space-between; }
  .hf-handbook .hf-hb-dd-menu,
  .hf-handbook .hf-hb-dd--toc .hf-hb-dd-menu { left: 0; right: 0; width: auto; }
  .hf-handbook .hf-hb-faq-item,
  .hf-handbook .hf-hb-contact { padding: 16px; }
  .hf-handbook .hf-hb-tl-card { padding: 14px 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .hf-handbook .hf-hb-dd > summary .hf-hb-chev { transition: none; }
  .hf-handbook .hf-hb-map-spinner { animation-duration: 2.4s; }
}
