/* ================================================
   BDIedu v2 – giao diện chung cho mọi trang
   Màu theo logo BDIedu (plan-doi-thuong-hieu-bdiedu.md): đỏ #D20814 chủ đạo, vàng #F8A404 chỉ để nhấn
   (đường kẻ, nền nhạt, biểu tượng – không làm chữ), đen #111111. Bố cục, phông chữ giữ như DESIGN.md.
   Mọi cặp chữ – nền đạt WCAG AA (≥ 4,5:1; chữ lớn, viền, vòng focus ≥ 3:1).
   3 mốc màn hình: < 640px · 640–1023px · ≥ 1024px
   ================================================ */

:root {
  /* Đỏ của logo + các sắc suy ra (hover / nhấn / khối đậm / nền nhạt) */
  --primary: #D20814;
  --primary-hover: #B0060F;
  --primary-pressed: #8E040B;
  --primary-deep: #8E040B;
  --primary-subtle: #FDF0F0;
  --on-primary: #FFFFFF;
  --on-primary-muted: #FFE8E9;
  /* Đen của logo (mực: tiêu đề, chân trang) */
  --ink: #111111;
  --on-ink: #FFFFFF;
  --on-ink-muted: #D6D6D6;
  /* Vàng của logo – chỉ để nhấn: đường kẻ, nền nhạt, biểu tượng; không bao giờ làm màu chữ */
  --accent: #F8A404;
  --accent-light: #FFC94A;
  --accent-strong: #B87500; /* biểu tượng trên nền sáng (≥ 3:1) */
  --accent-subtle: #FEF3DA;
  /* Chữ & bề mặt */
  --text: #333333;
  --text-muted: #5C5C5C;
  --surface: #FFFFFF;
  --surface-rose: #FBF1F1;
  --placeholder: #F6E3E4;
  --border: #EADEDE;
  --border-strong: #8A8478;
  /* Nút không bấm được (đang gửi / tắt): xám, chữ vẫn đọc được */
  --disabled-bg: #E8E8E8;
  --disabled-text: #555555;
  /* Trạng thái */
  --success: #1F7A3A;  --success-subtle: #EAF6EE;
  --warning: #8A6100;  --warning-subtle: #FFF4DB;
  --error: #B42318;    --error-subtle: #FDECEC;
  --info: #2C55A8;     --info-subtle: #E7EEFC;

  --r-sm: 8px; --r-md: 12px; --r-lg: 16px; --r-xl: 24px; --r-full: 9999px;
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 64px; --s9: 96px;
  --container: 1200px;
  --prose: 720px;
  --gutter: 24px;
  --section-y: 96px;
  --nav-h: 72px;
  --shadow: 0 8px 24px rgba(17, 17, 17, 0.10);
  --font: 'Be Vietnam Pro', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
}
@media (max-width: 1023px) { :root { --nav-h: 64px; } }
@media (max-width: 639px)  { :root { --section-y: 64px; --gutter: 20px; } }

/* ── Nền tảng ─────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0; background: var(--surface); color: var(--text);
  font-family: var(--font); font-size: 16px; line-height: 1.65; font-weight: 400;
  overflow-x: hidden;
}
img, svg { max-width: 100%; }
img { display: block; height: auto; }
h1, h2, h3, h4 { margin: 0; color: var(--ink); font-weight: 700; }
h1 { font-size: 44px; line-height: 1.15; letter-spacing: -0.015em; }
h2 { font-size: 36px; line-height: 1.2; letter-spacing: -0.01em; }
h3 { font-size: 22px; line-height: 1.35; font-weight: 600; }
h4 { font-size: 18px; line-height: 1.4; font-weight: 600; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; }
a { color: var(--primary); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--primary-hover); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
strong { font-weight: 600; }
@media (max-width: 639px) {
  h1 { font-size: 32px; line-height: 1.2; }
  h2 { font-size: 28px; line-height: 1.25; }
}

/* Viền focus nhìn rõ: đỏ cách 2px; trên nền đen / đỏ đậm dùng vàng (đường nhấn), trên nền đỏ dùng trắng (vàng trên đỏ chỉ 2,7:1) */
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.on-dark :focus-visible, .site-footer :focus-visible, .highlight :focus-visible { outline-color: var(--accent); }
.cta-band :focus-visible, .stat-strip :focus-visible { outline-color: var(--on-primary); }
/* Khung sáng (xác nhận / lỗi form) nằm trong dải CTA: giữ viền focus đỏ */
.cta-band .form-success :focus-visible, .cta-band .form-alert :focus-visible { outline-color: var(--primary); }
/* reCAPTCHA v3: ẩn huy hiệu (nằm dưới nút chat); mỗi form có dòng thông báo reCAPTCHA thay thế */
.grecaptcha-badge { visibility: hidden; }

[hidden] { display: none !important; }
.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;
}
.skip-link {
  position: absolute; left: 16px; top: -100px; z-index: 2000;
  padding: 10px 18px; border-radius: var(--r-full); background: var(--surface); color: var(--primary);
  font-weight: 600; box-shadow: var(--shadow);
}
.skip-link:focus { top: 12px; }

/* Neo: trừ hao menu dính */
[id] { scroll-margin-top: calc(var(--nav-h) + 16px); }

.icon { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
.icon-sm { width: 16px; height: 16px; }
.icon-lg { width: 24px; height: 24px; }

/* ── Bố cục ───────────────────────────────────── */
.container { width: 100%; max-width: calc(var(--container) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: var(--section-y) 0; }
.section-rose { background: var(--surface-rose); }
.prose { max-width: var(--prose); }
.eyebrow {
  margin: 0 0 12px; color: var(--primary);
  font-size: 13px; line-height: 1.3; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
}
.lead { margin-top: 16px; max-width: var(--prose); color: var(--text-muted); font-size: 18px; line-height: 1.65; }
.section-head { margin-bottom: var(--s7); }
.section-head-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px 32px; flex-wrap: wrap; margin-bottom: var(--s7); }
.link-arrow { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; text-decoration: none; min-height: 44px; }
.link-arrow:hover { text-decoration: underline; }
@media (max-width: 639px) {
  .section-head, .section-head-row { margin-bottom: var(--s6); }
  .lead { font-size: 17px; }
}

/* ── Nút ──────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 28px; border-radius: var(--r-full); border: 1.5px solid transparent;
  font-size: 15px; line-height: 1.2; font-weight: 600; text-decoration: none; white-space: nowrap;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.btn-primary { background: var(--primary); color: var(--on-primary); }
.btn-primary:hover { background: var(--primary-hover); color: var(--on-primary); }
.btn-primary:active { background: var(--primary-pressed); }
.btn-secondary { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-secondary:hover { background: var(--primary-subtle); color: var(--ink); }
.btn-on-primary { background: var(--surface); color: var(--primary); }
.btn-on-primary:hover { background: var(--primary-subtle); color: var(--primary-hover); }
.btn-outline-light { background: transparent; color: var(--on-primary); border-color: var(--on-primary); }
.btn-outline-light:hover { background: rgba(255, 255, 255, .12); color: var(--on-primary); }
.btn-sm { min-height: 44px; padding: 0 20px; font-size: 14px; }
.btn-block { width: 100%; }
/* Đang gửi / tắt: nền xám, chữ xám đậm (đạt 4,5:1) thay cho làm mờ – chữ trên nút mờ không đủ tương phản */
.btn[disabled], .btn[aria-disabled="true"] { background: var(--disabled-bg); border-color: var(--disabled-bg); color: var(--disabled-text); cursor: progress; }
.spinner {
  width: 18px; height: 18px; border-radius: 50%; flex: none;
  border: 2px solid currentColor; border-right-color: transparent; animation: dz-spin .8s linear infinite;
}
@keyframes dz-spin { to { transform: rotate(360deg); } }

/* ── Menu ─────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 900; background: var(--surface);
  border-bottom: 1px solid transparent; transition: border-color .15s ease, box-shadow .15s ease;
}
.site-header.is-scrolled { border-bottom-color: var(--border); box-shadow: 0 4px 16px rgba(17, 17, 17, 0.06); }
.nav { display: flex; align-items: center; gap: 24px; height: var(--nav-h); }
/* Logo BDIedu: ảnh (images/v2/logo/, 1× + 2×), nền trong suốt, hiện ở mọi bề ngang – cao 40px (điện thoại, máy tính bảng,
   ≥ 1280px), 30px ở 1024–1279px (xem khối @media bên dưới); vùng bấm ≥ 44px */
.nav-logo { display: inline-flex; align-items: center; color: var(--ink); text-decoration: none; flex: none; min-height: 44px; }
.nav-logo:hover { color: var(--ink); }
.nav-logo-img { display: block; width: 130px; height: 40px; }
.nav-toggle {
  display: none; margin-left: auto; width: 44px; height: 44px; border: 0; border-radius: var(--r-full);
  background: transparent; color: var(--ink); align-items: center; justify-content: center;
}
.nav-toggle .icon-close, .nav-toggle[aria-expanded="true"] .icon-open { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }
.nav-panel { display: flex; align-items: center; gap: 24px; flex: 1; }
.nav-menu { display: flex; align-items: center; gap: 8px; list-style: none; flex: 1; }
.nav-item { position: relative; }
.nav-link, .nav-trigger {
  display: inline-flex; align-items: center; gap: 4px; min-height: 44px; padding: 0 12px;
  border: 0; background: transparent; color: var(--ink); font-size: 15px; font-weight: 600; text-decoration: none;
  position: relative;
}
.nav-link:hover, .nav-trigger:hover { color: var(--primary); }
.nav-link[aria-current="page"]::after, .nav-trigger[aria-current="page"]::after {
  content: ''; position: absolute; left: 12px; right: 12px; bottom: 6px; height: 2px; border-radius: 2px; background: var(--primary);
}
.nav-trigger .icon { transition: transform .15s ease; }
.nav-trigger[aria-expanded="true"] .icon { transform: rotate(180deg); }
.nav-sub {
  position: absolute; left: 0; top: calc(100% + 4px); min-width: 240px; padding: 8px; list-style: none;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); box-shadow: var(--shadow);
  display: none; z-index: 10;
}
.nav-sub a {
  display: flex; align-items: center; min-height: 44px; padding: 8px 12px; border-radius: var(--r-sm);
  color: var(--ink); font-size: 15px; font-weight: 600; text-decoration: none;
}
.nav-sub a:hover, .nav-sub a:focus-visible { background: var(--primary-subtle); color: var(--primary); }
.nav-item.is-open > .nav-sub { display: block; }
/* Không có JavaScript: dropdown mở khi rê chuột hoặc focus */
.no-js .nav-item:hover > .nav-sub, .no-js .nav-item:focus-within > .nav-sub { display: block; }

.nav-tools { display: flex; align-items: center; gap: 16px; flex: none; }
.lang-switch { display: flex; align-items: center; gap: 2px; font-size: 14px; font-weight: 600; }
.lang-switch .sep { color: var(--text-muted); }
.lang-btn {
  min-width: 44px; min-height: 44px; padding: 0 6px; border: 0; background: transparent; border-radius: var(--r-sm);
  color: var(--text-muted); font-size: 14px; font-weight: 600;
}
.lang-btn:hover { color: var(--primary); }
.lang-btn[aria-pressed="true"] { color: var(--primary); text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 2px; }
.nav-hotline { display: none; }

/* Menu desktop: nhãn luôn một dòng. Từ GĐ-D menu có thêm mục "Tin tức" (Tin tức & Bài viết, Clip, Trò chơi), nên:
   ≥1280px khoảng cách giữa các mục hẹp hơn một chút; ở 1024–1279px menu thu gọn (vùng bấm vẫn cao 44px).
   Logo ảnh BDIedu hiện ở mọi bề ngang (thay ô chữ "D" + tên chữ của logo cũ). */
@media (min-width: 1024px) {
  .nav-link, .nav-trigger, .nav-cta { white-space: nowrap; }
}
@media (min-width: 1280px) {
  .nav, .nav-panel { gap: 16px; }
  .nav-menu { gap: 4px; }
  .nav-link, .nav-trigger { padding: 0 10px; }
  .nav-link[aria-current="page"]::after, .nav-trigger[aria-current="page"]::after { left: 10px; right: 10px; }
  .nav-tools { gap: 12px; }
}
@media (min-width: 1024px) and (max-width: 1279px) {
  /* logo ảnh rộng hơn ô chữ "D" cũ: logo cao 30px, mục menu / nút sát hơn, bỏ dấu "·" giữa VI EN DE – menu vừa 1024px ở cả 3 ngôn ngữ */
  .nav, .nav-panel { gap: 8px; }
  .nav-menu { gap: 0; }
  .nav-link, .nav-trigger { padding: 0 6px; font-size: 14px; min-width: 44px; justify-content: center; } /* "FAQ" (DE) vẫn rộng ≥ 44px */
  .nav-link[aria-current="page"]::after, .nav-trigger[aria-current="page"]::after { left: 6px; right: 6px; }
  .nav-tools { gap: 8px; }
  .nav-cta { padding: 0 10px; }
  .site-header .nav-logo-img { width: auto; height: 30px; }
  .lang-switch .sep { display: none; }
}

@media (max-width: 1023px) {
  .nav { gap: 12px; }
  .nav-toggle { display: inline-flex; }
  /* Có JavaScript: menu là lớp phủ toàn màn hình, mở bằng nút ☰ */
  .js .nav-panel {
    position: fixed; inset: var(--nav-h) 0 0 0; z-index: 950; display: none;
    flex-direction: column; align-items: stretch; gap: 24px; overflow-y: auto;
    padding: 16px var(--gutter) 40px; background: var(--surface); border-top: 1px solid var(--border);
  }
  .js .nav-panel.is-open { display: flex; }
  /* Không có JavaScript: menu xếp dọc dưới thanh logo */
  .no-js .nav { flex-wrap: wrap; height: auto; min-height: var(--nav-h); }
  .no-js .nav-toggle { display: none; }
  .no-js .nav-panel { flex-basis: 100%; flex-direction: column; align-items: stretch; padding-bottom: 16px; }
  .nav-menu { flex-direction: column; align-items: stretch; gap: 0; flex: none; }
  .nav-item { border-bottom: 1px solid var(--border); }
  .nav-link, .nav-trigger { width: 100%; justify-content: space-between; min-height: 56px; padding: 0 4px; font-size: 18px; }
  .nav-link[aria-current="page"]::after, .nav-trigger[aria-current="page"]::after { left: 4px; right: auto; width: 32px; bottom: 8px; }
  .nav-sub { position: static; display: none; min-width: 0; border: 0; box-shadow: none; padding: 0 0 12px 12px; }
  .no-js .nav-sub { display: block; }
  .nav-sub a { font-size: 16px; font-weight: 400; }
  .nav-tools { flex-direction: column; align-items: stretch; gap: 16px; }
  .nav-tools .nav-link { justify-content: flex-start; }
  .lang-switch { justify-content: flex-start; }
  .nav-hotline { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; color: var(--ink); font-weight: 600; text-decoration: none; }
  body.nav-locked { overflow: hidden; }
}

/* ── Footer ───────────────────────────────────── */
.site-footer { background: var(--ink); color: var(--on-ink-muted); font-size: 16px; }
.site-footer a { color: var(--on-ink-muted); text-decoration: none; }
.site-footer a:hover { color: var(--on-ink); text-decoration: underline; }
.footer-inner { padding-top: 64px; padding-bottom: 32px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 32px; }
/* Chân trang nền đen: chữ "edu" và hình người của logo màu đen → logo nằm trên tấm nền trắng bo góc */
.footer-brand .nav-logo { padding: 10px 16px; border-radius: var(--r-md); background: var(--surface); }
.footer-brand p { margin-top: 12px; max-width: 320px; }
.footer-social { display: flex; gap: 8px; margin-top: 16px; }
.footer-social a {
  width: 44px; height: 44px; border-radius: var(--r-full); border: 1px solid rgba(255, 255, 255, .35);
  display: inline-flex; align-items: center; justify-content: center;
}
.footer-group summary { list-style: none; cursor: default; }
.footer-group summary::-webkit-details-marker { display: none; }
.footer-group h2 { color: var(--on-ink); font-size: 16px; line-height: 1.4; font-weight: 600; margin-bottom: 12px; }
.footer-group ul { list-style: none; display: grid; gap: 4px; }
.footer-group li a { display: inline-flex; align-items: center; min-height: 44px; }
.footer-group .chev { display: none; }
.footer-contact li { display: flex; gap: 8px; align-items: center; min-height: 44px; }
.footer-bottom {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 24px;
  margin-top: 48px; padding-top: 24px; border-top: 1px solid rgba(255, 255, 255, .2); font-size: 14px;
}
.footer-bottom nav { display: flex; gap: 20px; }
@media (max-width: 1023px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 639px) {
  .footer-inner { padding-top: 48px; padding-bottom: 104px; } /* chừa chỗ cho nút chat nổi */
  .footer-grid { grid-template-columns: 1fr; gap: 0; }
  .footer-brand { margin-bottom: 24px; }
  .footer-group { border-top: 1px solid rgba(255, 255, 255, .2); }
  .js .footer-group summary { cursor: pointer; display: flex; align-items: center; justify-content: space-between; min-height: 52px; }
  .js .footer-group h2 { margin: 0; }
  .js .footer-group .chev { display: block; transition: transform .15s ease; }
  .js .footer-group[open] .chev { transform: rotate(180deg); }
  .footer-group ul { padding-bottom: 16px; }
}

/* ── Ảnh & khung giữ chỗ ─────────────────────── */
/* Khung đúng tỷ lệ, nền hồng + icon máy ảnh; ảnh thật (images/v2/…) phủ kín khung khi có file */
.ph {
  position: relative; overflow: hidden; border-radius: var(--r-lg); background-color: var(--placeholder);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 24 24' fill='none' stroke='%238E040B' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14.5 4h-5L7 7H4a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-3l-2.5-3z'/%3E%3Ccircle cx='12' cy='13' r='3'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: center;
}
.ph > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ph-4x5 { aspect-ratio: 4 / 5; }
.ph-4x3 { aspect-ratio: 4 / 3; }
.ph-3x2 { aspect-ratio: 3 / 2; }
.ph-16x9 { aspect-ratio: 16 / 9; }
.ph-1x1 { aspect-ratio: 1 / 1; }
.photo-panel { background: var(--primary); border-radius: var(--r-xl); padding: 20px; }
.photo-panel .ph { border-radius: var(--r-lg); }
.ph > img.focus-top { object-position: 50% 20%; } /* ảnh dọc trong khung ngang: giữ phần trên (mặt người) */

/* ── Hero (trang chủ) ─────────────────────────── */
.hero { padding: 72px 0 96px; }
.hero-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 56px; align-items: center; } /* ảnh hero ngang 3:2 */
.hero-title { font-size: 56px; line-height: 1.1; letter-spacing: -0.02em; }
.hero-title .accent { color: var(--primary); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 40px; }
.hero-trust { display: flex; align-items: center; gap: 8px; margin-top: 24px; color: var(--text-muted); font-size: 15px; font-weight: 600; }
.hero-trust .icon { color: var(--accent-strong); fill: var(--accent-strong); stroke: none; }
/* Trình chiếu ảnh đầu trang chủ (js/noi-dung.js, góp ý 16/11/2026): ảnh mờ dần sang ảnh sau; nút trên nền đen trong suốt
   (chữ / viền trắng ≥ 4,5:1 trên mọi ảnh); vùng bấm 40 × 40 (chấm 28 × 40) */
.hero-track { position: absolute; inset: 0; }
.hero-slide { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity .6s ease, visibility 0s linear .6s; }
.hero-slide.is-active { opacity: 1; visibility: visible; transition: opacity .6s ease; }
.hero-slide > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-controls { position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); display: flex; align-items: center; gap: 2px; padding: 4px; border-radius: var(--r-full); background: rgba(17, 17, 17, .78); }
.hero-controls:empty { display: none; }
.hero-btn, .hero-dot { display: inline-flex; align-items: center; justify-content: center; height: 40px; padding: 0; border: 0; border-radius: var(--r-full); background: transparent; color: var(--on-ink); cursor: pointer; }
.hero-btn { width: 40px; }
.hero-btn:hover { background: rgba(255, 255, 255, .18); }
.hero-btn .icon { width: 20px; height: 20px; }
.hero-dots { display: flex; align-items: center; }
.hero-dot { width: 28px; }
.hero-dot::before { content: ""; width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--on-ink); }
.hero-dot[aria-current="true"]::before { background: var(--on-ink); }
.hero-btn:focus-visible, .hero-dot:focus-visible { outline: 2px solid var(--on-ink); outline-offset: -3px; }
@media (max-width: 1023px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-media { max-width: 720px; }
}
@media (max-width: 639px) {
  .hero { padding: 40px 0 64px; }
  .hero-title { font-size: 36px; line-height: 1.15; letter-spacing: -0.015em; }
  .hero-actions { flex-direction: column; margin-top: 32px; }
  .hero-actions .btn { width: 100%; }
  .photo-panel { padding: 12px; border-radius: var(--r-lg); }
}

/* ── Đầu trang con ─────────────────────────────── */
.page-head { padding: 72px 0 64px; }
.page-head-grid { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 64px; align-items: center; }
.page-head .lead { max-width: 640px; }
.page-head-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
@media (max-width: 1023px) { .page-head-grid { grid-template-columns: 1fr; gap: 32px; } .page-head-grid .photo-panel { max-width: 560px; } }
@media (max-width: 639px) {
  .page-head { padding: 40px 0 48px; }
  .page-head-actions .btn { width: 100%; }
}

/* ── Dải số liệu ──────────────────────────────── */
.stat-strip { background: var(--primary); color: var(--on-primary); padding: 56px 0; }
.stats { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; text-align: center; }
.stat-value { font-size: 44px; line-height: 1; font-weight: 700; letter-spacing: -0.02em; color: var(--on-primary); }
.stat-label { margin-top: 8px; color: var(--on-primary-muted); font-size: 15px; }
@media (max-width: 639px) {
  .stat-strip { padding: 40px 0; }
  .stats { grid-template-columns: 1fr 1fr; gap: 32px 16px; }
  .stat-value { font-size: 36px; }
}

/* ── Card ─────────────────────────────────────── */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: var(--s6); }
.card-grid-3 { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.goal-card {
  display: flex; flex-direction: column; height: 100%; overflow: hidden; color: inherit; text-decoration: none;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.goal-card:hover { border-color: var(--ink); box-shadow: var(--shadow); color: inherit; }
.goal-card .ph { border-radius: 0; }
.goal-card-body { display: flex; flex-direction: column; gap: 8px; flex: 1; padding: 32px; }
.goal-card-body p { color: var(--text-muted); }
.goal-card-more { margin-top: auto; padding-top: 8px; display: inline-flex; align-items: center; gap: 6px; color: var(--primary); font-weight: 600; }
.goal-card:hover .goal-card-more { text-decoration: underline; }
@media (max-width: 1023px) { .card-grid-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 639px) {
  .card-grid-3 { grid-template-columns: 1fr; }
  .goal-card-body { padding: 24px; }
  .card { padding: var(--s5); }
}
/* 4 hướng đi (trang chủ, góp ý 16/11/2026): 4 cột ≥ 1280px, 2 cột 640–1279px, 1 cột < 640px */
.card-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card-grid-4 .goal-card-body { padding: 24px; }
@media (max-width: 1279px) { .card-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 639px) { .card-grid-4 { grid-template-columns: minmax(0, 1fr); } }

/* ── Hàng xen kẽ ảnh – chữ ────────────────────── */
.feature-rows { display: flex; flex-direction: column; gap: 80px; }
.feature-row { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.feature-row.is-flipped > :first-child { order: 2; }
.feature-row h3 { margin-bottom: 12px; }
.feature-row p + p, .feature-row p + .link-arrow { margin-top: 12px; }
.feature-meta { display: flex; align-items: center; gap: 8px; color: var(--text-muted); font-weight: 600; font-size: 15px; }
@media (max-width: 1023px) {
  .feature-rows { gap: 56px; }
  .feature-row { grid-template-columns: 1fr; gap: 24px; }
  .feature-row.is-flipped > :first-child { order: 0; }
}

/* ── Danh sách lớp (Lịch, trang chủ) ──────────── */
.class-list { list-style: none; display: grid; gap: 12px; }
.class-row {
  display: grid; align-items: center; gap: 16px 24px;
  grid-template-columns: 64px minmax(200px, 2fr) minmax(120px, 1fr) minmax(150px, 1.2fr) minmax(110px, 1fr) auto;
  grid-template-areas: "level name start sched dur actions";
  padding: 20px 24px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
}
.class-level { grid-area: level; }
.class-name { grid-area: name; }
.class-start { grid-area: start; }
.class-sched { grid-area: sched; }
.class-dur { grid-area: dur; }
.class-actions { grid-area: actions; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.class-name h3 { font-size: 18px; line-height: 1.4; }
.class-name p, .class-cell-sub { color: var(--text-muted); font-size: 14px; line-height: 1.5; }
.class-cell-label { display: block; color: var(--text-muted); font-size: 13px; line-height: 1.4; }
.class-cell-value { color: var(--ink); font-weight: 600; font-size: 15px; line-height: 1.4; }
.class-price { font-size: 14px; font-weight: 600; min-height: 44px; display: inline-flex; align-items: center; }
.chip-level {
  display: inline-flex; align-items: center; justify-content: center; min-width: 44px; height: 32px; padding: 0 12px;
  border-radius: var(--r-full); background: var(--primary-subtle); color: var(--primary); font-size: 14px; font-weight: 700;
}
.skeleton-row { height: 92px; border-radius: var(--r-lg); background: linear-gradient(90deg, #F2EAEA, #FAF5F5, #F2EAEA); }
@media (max-width: 1023px) {
  .class-row {
    grid-template-columns: auto 1fr;
    grid-template-areas: "level level" "name name" "start sched" "dur dur" "actions actions";
    padding: 24px;
  }
  .class-actions { align-items: stretch; }
  .class-actions .btn { width: 100%; }
  .class-price { justify-content: center; }
}
@media (max-width: 639px) {
  .class-row { grid-template-areas: "level level" "name name" "start start" "sched sched" "dur dur" "actions actions"; gap: 12px; }
}

/* ── Khối kết quả (đỏ đậm, tối đa 1 khối/trang) ─ */
.highlight { background: var(--primary-deep); color: var(--on-primary); padding: var(--section-y) 0; }
.highlight-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.highlight .eyebrow { color: var(--on-primary-muted); }
.highlight h2 { color: var(--on-primary); }
.highlight-num { display: block; font-size: 96px; line-height: 1; letter-spacing: -0.03em; color: var(--on-primary); }
.highlight-num::after { content: ''; display: block; width: 72px; height: 4px; margin-top: 16px; border-radius: 2px; background: var(--accent); } /* đường nhấn vàng */
.highlight-text { display: block; margin-top: 12px; }
.highlight p { color: var(--on-ink-muted); font-size: 18px; }
.highlight .source { margin-top: 16px; font-size: 14px; }
@media (max-width: 1023px) { .highlight-grid { grid-template-columns: 1fr; gap: 24px; } }
@media (max-width: 639px) { .highlight-num { font-size: 72px; } }

/* ── 3 bước / dòng thời gian ─────────────────── */
.steps { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; counter-reset: step; }
.step { padding: 32px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); }
.step-num {
  width: 44px; height: 44px; border-radius: var(--r-full); background: var(--primary); color: var(--on-primary);
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 18px; margin-bottom: 16px;
}
.step h3 { font-size: 20px; margin-bottom: 8px; }
.step p { color: var(--text-muted); }
.step .step-num { color: var(--on-primary); } /* số bước là <p> ở trang chủ: không lấy màu chữ xám của ".step p" (chữ xám trên đỏ chỉ 1,2:1) */
.steps-cta { margin-top: 40px; }
@media (max-width: 1023px) { .steps { grid-template-columns: 1fr; } }

.timeline { list-style: none; max-width: var(--prose); }
.timeline li { position: relative; display: grid; grid-template-columns: 44px 1fr; gap: 20px; padding-bottom: 32px; }
.timeline li::before { content: ''; position: absolute; left: 21px; top: 48px; bottom: 4px; width: 2px; background: var(--border); }
.timeline li:last-child { padding-bottom: 0; }
.timeline li:last-child::before { display: none; }
.timeline .step-num { margin: 0; }
.timeline h3 { font-size: 20px; margin: 8px 0 6px; }
.timeline p { color: var(--text-muted); }

/* ── Cảm nhận học viên ────────────────────────── */
.testimonials { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.testimonial { display: flex; flex-direction: column; gap: 20px; padding: 32px; background: var(--surface-rose); border-radius: var(--r-lg); }
.section-rose .testimonial { background: var(--surface); }
.stars { display: flex; gap: 2px; color: var(--accent-strong); }
.stars .icon { width: 18px; height: 18px; fill: currentColor; stroke: none; }
.testimonial blockquote { margin: 0; color: var(--text); font-size: 18px; line-height: 1.65; flex: 1; }
.testimonial-author { display: flex; align-items: center; gap: 14px; }
.avatar {
  width: 56px; height: 56px; border-radius: var(--r-full); flex: none; position: relative; overflow: hidden;
  background: var(--placeholder); color: var(--primary-deep); font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.testimonial-name { color: var(--ink); font-weight: 600; }
.testimonial-role { color: var(--text-muted); font-size: 14px; }
@media (max-width: 1023px) {
  /* Mobile: vuốt ngang, lộ mép thẻ kế tiếp, không tự chạy */
  .testimonials {
    display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 16px;
    margin: 0 calc(-1 * var(--gutter)); padding: 0 var(--gutter) 8px; scroll-padding-left: var(--gutter);
  }
  .testimonial { flex: 0 0 min(85%, 380px); scroll-snap-align: start; padding: 24px; }
}

/* ── Tab & accordion (FAQ) ────────────────────── */
.faq-home { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 64px; align-items: start; }
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.tab {
  min-height: 44px; padding: 0 18px; border-radius: var(--r-full); border: 1px solid var(--border);
  background: var(--surface); color: var(--ink); font-size: 15px; font-weight: 600;
}
.tab[aria-selected="true"] { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.no-js .tabs { display: none; }
.tab-panel + .tab-panel { margin-top: 24px; }
.js .tab-panel + .tab-panel { margin-top: 0; }
.accordion { border-top: 1px solid var(--border); }
.acc-item { border-bottom: 1px solid var(--border); }
.acc-item h3 { font-size: 18px; line-height: 1.4; font-weight: 600; }
.acc-trigger {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%;
  min-height: 64px; padding: 16px 0; border: 0; background: transparent; text-align: left;
  color: var(--ink); font-size: 18px; line-height: 1.4; font-weight: 600;
}
.acc-trigger:hover { color: var(--primary); }
.acc-sign { position: relative; width: 20px; height: 20px; flex: none; }
.acc-sign::before, .acc-sign::after { content: ''; position: absolute; left: 2px; right: 2px; top: 9px; height: 2px; border-radius: 2px; background: currentColor; transition: transform .15s ease; }
.acc-sign::after { transform: rotate(90deg); }
.acc-trigger[aria-expanded="true"] .acc-sign::after { transform: rotate(0deg); }
.acc-panel { padding: 0 36px 20px 0; color: var(--text); }
.acc-panel p + p { margin-top: 8px; }
.faq-more { margin-top: 24px; }
@media (max-width: 1023px) { .faq-home { grid-template-columns: 1fr; gap: 32px; } }

/* ── Dải CTA ──────────────────────────────────── */
.cta-band {
  background: var(--primary); color: var(--on-primary); border-radius: var(--r-xl);
  padding: 72px 64px; text-align: center;
}
.cta-band h2 { color: var(--on-primary); }
.cta-band p { color: var(--on-primary-muted); }
.cta-band .lead { margin-left: auto; margin-right: auto; color: var(--on-primary-muted); }
.cta-band a:not(.btn) { color: var(--on-primary); }
.cta-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 32px; }
@media (max-width: 639px) {
  .cta-band { padding: 40px 24px; border-radius: var(--r-lg); }
  .cta-actions .btn { width: 100%; }
}

/* ── Form ─────────────────────────────────────── */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 24px; }
.form-grid .full { grid-column: 1 / -1; }
.field label, .field-label { display: block; margin-bottom: 8px; color: var(--ink); font-size: 15px; line-height: 1.3; font-weight: 600; }
.req { color: var(--error); }
.field-hint { margin-top: 6px; color: var(--text-muted); font-size: 14px; }
.input, .select, .textarea {
  display: block; width: 100%; min-height: 48px; padding: 11px 14px;
  border: 1px solid var(--border-strong); border-radius: var(--r-sm); background: var(--surface); color: var(--ink);
  font-size: 16px; line-height: 1.4;
}
.textarea { min-height: 112px; resize: vertical; line-height: 1.6; }
.select {
  appearance: none; padding-right: 44px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23111111' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
}
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); }
.input:focus-visible, .select:focus-visible, .textarea:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.is-invalid .input, .is-invalid .select, .is-invalid .textarea, .input[aria-invalid="true"], .select[aria-invalid="true"] { border-color: var(--error); box-shadow: inset 0 0 0 1px var(--error); }
.field-error { display: flex; align-items: flex-start; gap: 6px; margin-top: 6px; color: var(--error); font-size: 14px; line-height: 1.45; font-weight: 600; }
.field-error .icon { width: 16px; height: 16px; margin-top: 2px; }
.check { display: flex; align-items: flex-start; gap: 12px; }
.check input { width: 20px; height: 20px; margin: 2px 0 0; flex: none; accent-color: var(--primary); }
.check label { margin: 0; font-weight: 400; color: var(--text); font-size: 15px; line-height: 1.55; }
.form-actions { margin-top: 24px; }
.form-note { margin-top: 12px; color: var(--text-muted); font-size: 13px; line-height: 1.5; }
.form-alert {
  display: flex; gap: 12px; align-items: flex-start; margin-top: 20px; padding: 16px;
  border-radius: var(--r-md); background: var(--error-subtle); color: var(--error); border: 1px solid #F1B5AE;
}
.form-alert p { color: var(--text); }
.form-alert strong { color: var(--error); }
.form-alert-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-top: 10px; }
.form-alert .btn { min-height: 44px; }
.form-success { padding: 32px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--border); color: var(--text); text-align: left; }
.form-success:focus { outline: none; }
.form-success-icon {
  width: 56px; height: 56px; border-radius: var(--r-full); background: var(--success-subtle); color: var(--success);
  display: flex; align-items: center; justify-content: center; margin-bottom: 16px;
}
.form-success h2, .form-success h3 { font-size: 24px; line-height: 1.3; color: var(--ink); }
.form-success h4 { margin: 24px 0 12px; font-size: 16px; color: var(--ink); }
.success-class { margin-top: 16px; padding: 16px; border-radius: var(--r-md); background: var(--primary-subtle); }
.success-class p:first-child { color: var(--text-muted); font-size: 14px; }
.success-class .name { color: var(--ink); font-weight: 600; }
.success-class ul { list-style: none; margin-top: 6px; display: grid; gap: 4px; font-size: 15px; }
.success-class li { display: flex; align-items: center; gap: 8px; }
.mini-steps { list-style: none; display: grid; gap: 12px; }
.mini-steps li { display: flex; align-items: flex-start; gap: 12px; }
.mini-steps .n {
  width: 28px; height: 28px; flex: none; border-radius: var(--r-full); background: var(--primary); color: var(--on-primary);
  display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700;
}
.success-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
@media (max-width: 639px) {
  .form-grid { grid-template-columns: 1fr; }
  .success-actions .btn { width: 100%; }
}

/* Form ngắn 3 ô trong dải CTA */
.cta-form { display: grid; grid-template-columns: 1fr 1fr 1fr auto; gap: 16px; align-items: start; max-width: 960px; margin: 40px auto 0; text-align: left; }
.cta-form .field label { color: var(--on-primary); }
.cta-form .req { color: var(--on-primary); }
.cta-form .input, .cta-form .select { border-color: var(--surface); }
.cta-form .field-error { color: var(--on-primary); background: var(--error); border-radius: var(--r-sm); padding: 4px 8px; }
.cta-form .btn { margin-top: 31px; }
.cta-band .form-alert { text-align: left; max-width: 960px; margin-left: auto; margin-right: auto; }
.cta-band .form-alert a:not(.btn) { color: var(--error); }
.cta-band .form-success { max-width: 640px; margin: 40px auto 0; }
.cta-band .form-success a:not(.btn) { color: var(--primary); }
.cta-band .form-success p { color: var(--text); }
.cta-links { margin-top: 24px; display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 15px; }
.cta-links a { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-weight: 600; }
@media (max-width: 1023px) { .cta-form { grid-template-columns: 1fr; } .cta-form .btn { margin-top: 0; width: 100%; } }

/* ── Khóa học ─────────────────────────────────── */
.level-nav { position: sticky; top: var(--nav-h); z-index: 800; background: var(--surface); border-bottom: 1px solid var(--border); }
.level-nav ul { list-style: none; display: flex; gap: 8px; overflow-x: auto; padding: 8px 0; }
.level-nav a {
  display: inline-flex; align-items: center; justify-content: center; min-width: 56px; min-height: 44px; padding: 0 16px;
  border-radius: var(--r-full); border: 1px solid var(--border); color: var(--ink); font-weight: 600; text-decoration: none;
}
.level-nav a:hover { border-color: var(--ink); }
.level-nav a[aria-current="true"] { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.level-blocks { display: grid; gap: 24px; }
.level-block { scroll-margin-top: calc(var(--nav-h) + 76px); padding: 40px; border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface); }
.level-block-grid { display: grid; grid-template-columns: 220px 1fr; gap: 40px; }
.level-badge {
  display: inline-flex; align-items: center; justify-content: center; width: 72px; height: 72px; border-radius: var(--r-lg);
  background: var(--primary-subtle); color: var(--primary); font-size: 28px; font-weight: 700;
}
.level-side h3 { margin-top: 16px; font-size: 20px; }
.level-side p { color: var(--text-muted); font-size: 14px; }
.level-side .btn { margin-top: 20px; }
.level-main h4 { margin-bottom: 8px; }
.level-main h4 + p { color: var(--text); }
.level-main h4:not(:first-child) { margin-top: 24px; }
.can-list { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 24px; }
.can-list li { display: flex; gap: 10px; align-items: flex-start; }
.can-list .icon { color: var(--success); margin-top: 3px; }
.meta-list { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.meta-list li {
  display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 14px;
  border-radius: var(--r-full); background: var(--surface-rose); color: var(--ink); font-size: 14px; font-weight: 600;
}
.special-grid { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.special-card { display: flex; flex-direction: column; gap: 10px; height: 100%; padding: 32px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); }
.special-card.is-featured { border: 2px solid var(--primary); }
.special-card .icon-wrap { display: flex; align-items: center; gap: 10px; color: var(--primary); }
.special-card .badge { display: inline-flex; align-items: center; height: 28px; padding: 0 10px; border-radius: var(--r-full); background: var(--primary); color: var(--on-primary); font-size: 13px; font-weight: 600; }
.special-card p { color: var(--text-muted); }
.special-card .meta { color: var(--ink); font-size: 14px; font-weight: 600; }
.special-card .link-arrow { margin-top: auto; }
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--r-lg); }
.cert-table { width: 100%; border-collapse: collapse; min-width: 560px; }
.cert-table th, .cert-table td { padding: 16px 20px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: top; }
.cert-table thead th { background: var(--surface-rose); color: var(--ink); font-size: 14px; font-weight: 600; }
.cert-table tbody tr:last-child th, .cert-table tbody tr:last-child td { border-bottom: 0; }
.cert-table tbody th { color: var(--ink); }
@media (max-width: 1023px) {
  .special-grid { grid-template-columns: 1fr 1fr; }
  .level-block-grid { grid-template-columns: 1fr; gap: 24px; }
}
@media (max-width: 639px) {
  .special-grid { grid-template-columns: 1fr; }
  .level-block { padding: 24px; }
  .can-list { grid-template-columns: 1fr; }
  .special-card { padding: 24px; }
  .cert-table { min-width: 0; }
  .cert-table th, .cert-table td { padding: 12px; }
}

/* ── Học phí, ca học (Khóa học, Lịch – góp ý 16/11/2026) ── */
.fee-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.fee-card { min-width: 0; padding: 28px; border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface); }
.fee-card h3, .fee-bundles h3 { font-size: 20px; margin-bottom: 16px; }
.fee-table-wrap { overflow-x: auto; }
.fee-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.fee-table th, .fee-table td { padding: 14px 12px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: middle; }
.fee-table thead th { background: var(--surface-rose); color: var(--ink); font-size: 14px; font-weight: 600; vertical-align: bottom; }
.fee-table tbody tr:last-child th, .fee-table tbody tr:last-child td { border-bottom: 0; }
.fee-table tbody th { color: var(--ink); }
.fee-table tbody th .chip-level { display: flex; width: fit-content; }
.fee-sessions { display: block; margin-top: 4px; color: var(--text-muted); font-size: 13px; font-weight: 400; white-space: nowrap; }
.fee-table .fee-num { text-align: right; }
.fee-table td.fee-num { color: var(--ink); font-weight: 600; white-space: nowrap; }
.fee-table thead th.fee-promo { background: var(--success-subtle); color: var(--success); }
.fee-table td.fee-promo { color: var(--success); font-weight: 700; }
.fee-sub { display: block; margin-top: 2px; color: var(--text-muted); font-size: 13px; font-weight: 400; }
.fee-online-note { margin-top: 16px; color: var(--text-muted); font-size: 15px; }
.fee-bundles { margin-top: 24px; padding: 28px; border-radius: var(--r-lg); background: var(--surface-rose); }
.fee-bundle-list { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.fee-bundle { padding: 20px 24px; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); }
.fee-bundle-name { color: var(--ink); font-weight: 700; }
.fee-was { margin-top: 8px; color: var(--text-muted); font-size: 15px; }
.fee-now { margin-top: 4px; color: var(--ink); font-size: 15px; }
.fee-now strong { color: var(--primary); font-size: 28px; font-weight: 700; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.fee-now strong [data-i18n="vnd_unit"] { font-size: 15px; }
.fee-note { margin-top: 16px; color: var(--text-muted); font-size: 15px; }
.fee-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.shift-box { margin-top: 24px; padding: 24px 28px; border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface); }
.shift-box h3, .shift-box .shift-title { margin: 0 0 12px; font-size: 18px; line-height: 1.4; letter-spacing: 0; }
.shift-list { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 24px; }
.shift-list li { display: flex; align-items: flex-start; gap: 10px; color: var(--text); font-size: 15px; }
.shift-list .icon { flex: none; margin-top: 2px; color: var(--accent-strong); }
.shift-list strong { display: block; color: var(--ink); }
.shift-box-head { max-width: 920px; margin-top: 28px; }
@media (max-width: 1023px) {
  .fee-grid { grid-template-columns: minmax(0, 1fr); }
  .shift-list { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 639px) {
  .fee-card, .fee-bundles { padding: 20px 16px; }
  .fee-table th, .fee-table td { padding: 12px 8px; }
  .fee-bundle-list { grid-template-columns: minmax(0, 1fr); }
  .fee-bundle { padding: 16px; }
  .shift-box { padding: 20px; }
  .fee-actions .btn { width: 100%; }
}

/* ── Lịch khai giảng ──────────────────────────── */
.filters { position: sticky; top: var(--nav-h); z-index: 800; background: var(--surface); border-bottom: 1px solid var(--border); }
.filters-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px 32px; padding-top: 12px; padding-bottom: 12px; }
.chip-groups { display: flex; flex-wrap: wrap; gap: 12px 32px; min-width: 0; }
.chip-group { display: flex; align-items: center; gap: 8px; min-width: 0; }
.chip-group-label { color: var(--text-muted); font-size: 14px; font-weight: 600; margin-right: 4px; white-space: nowrap; }
.chips { display: flex; gap: 8px; }
.chip {
  min-height: 44px; padding: 0 16px; border-radius: var(--r-full); border: 1px solid var(--border-strong);
  background: var(--surface); color: var(--ink); font-size: 14px; font-weight: 600; white-space: nowrap;
}
.chip:hover { border-color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.result-count { display: flex; align-items: baseline; gap: 12px; color: var(--ink); font-weight: 600; }
.result-count .sub { color: var(--text-muted); font-size: 14px; font-weight: 400; }
.empty-state { padding: 32px; border-radius: var(--r-lg); background: var(--surface-rose); }
.empty-state h3 { font-size: 22px; }
.empty-state p { margin-top: 8px; color: var(--text); }
.empty-state .btn { margin-top: 20px; }
.notify-form { margin-top: 24px; padding: 32px; border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface); }
.notify-form h3 { font-size: 20px; }
.notify-form > p { margin: 8px 0 20px; color: var(--text-muted); }
.no-js .filters, .no-js .skeleton-row { display: none; }
.load-error { padding: 24px; border-radius: var(--r-lg); background: var(--warning-subtle); color: var(--text); }
.load-error .btn { margin-top: 16px; }
@media (max-width: 1023px) {
  .filters { position: static; }
  .filters-inner, .chip-groups { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .chip-group { display: block; min-width: 0; }
  .chip-group-label { display: block; margin-bottom: 6px; }
  /* hàng chip vuốt ngang khi tràn */
  .chips { overflow-x: auto; margin: 0 calc(-1 * var(--gutter)); padding: 2px var(--gutter); }
}
@media (max-width: 639px) { .notify-form, .empty-state { padding: 24px; } }

/* ── Du học ───────────────────────────────────── */
.reason-grid { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.reason { padding: 28px; border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface); }
.reason .icon { width: 28px; height: 28px; color: var(--primary); }
.reason h3 { margin: 16px 0 8px; font-size: 18px; }
.reason p { color: var(--text-muted); font-size: 16px; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.split.is-flipped > :first-child { order: 2; }
.point-list { list-style: none; display: grid; gap: 20px; margin-top: 28px; }
.point-list li { display: grid; grid-template-columns: 24px 1fr; gap: 14px; }
.point-list .icon { color: var(--primary); margin-top: 3px; width: 22px; height: 22px; }
.point-list h3 { font-size: 17px; line-height: 1.4; margin-bottom: 4px; }
.point-list p { color: var(--text-muted); font-size: 16px; }
.split .btn { margin-top: 32px; }
@media (max-width: 1023px) {
  .reason-grid { grid-template-columns: 1fr 1fr; }
  .split { grid-template-columns: 1fr; gap: 32px; }
  .split.is-flipped > :first-child { order: 0; }
}
@media (max-width: 639px) { .reason-grid { grid-template-columns: 1fr; } .split .btn { width: 100%; } }

/* Chuyển đổi văn bằng §18a / §18b (Du học, góp ý 16/11/2026) */
.point-list h4 { font-size: 17px; line-height: 1.4; margin-bottom: 4px; }
.rec-grid { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.rec-card { padding: 28px; border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface); }
.rec-law { color: var(--primary); font-size: 28px; font-weight: 700; line-height: 1.1; }
.rec-card h3 { margin: 10px 0 8px; font-size: 20px; }
.rec-card p:not(.rec-law) { color: var(--text-muted); }
.rec-detail { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 48px; align-items: start; margin-top: 48px; }
.rec-detail > div > h3 { font-size: 22px; }
.rec-side { display: grid; gap: 16px; }
.rec-box { padding: 24px; border-radius: var(--r-lg); background: var(--surface-rose); }
.rec-box h3 { margin-bottom: 8px; font-size: 18px; }
.rec-side .btn { justify-self: start; }
.rec-note { margin-top: 32px; color: var(--text-muted); font-size: 14px; }
@media (max-width: 1023px) { .rec-detail { grid-template-columns: minmax(0, 1fr); gap: 32px; margin-top: 40px; } }
@media (max-width: 639px) { .rec-grid { grid-template-columns: minmax(0, 1fr); } .rec-card, .rec-box { padding: 20px; } .rec-side .btn { justify-self: stretch; } }

/* ── FAQs ─────────────────────────────────────── */
.chip-nav { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 32px; }
.chip-nav a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: var(--r-full);
  border: 1px solid var(--border-strong); color: var(--ink); font-size: 15px; font-weight: 600; text-decoration: none;
}
.chip-nav a:hover { border-color: var(--ink); background: var(--primary-subtle); }
.faq-group + .faq-group { margin-top: 56px; }
.faq-group > h2 { font-size: 28px; margin-bottom: 16px; }
.faq-page { max-width: var(--prose); }

/* ── Đăng ký ──────────────────────────────────── */
.register-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 48px; align-items: start; }
.register-form-card { padding: 40px; border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface); }
.register-form-card > h2 { font-size: 24px; }
.register-form-card > .form-intro { margin: 6px 0 24px; color: var(--text-muted); font-size: 15px; }
.aside-card { padding: 32px; border-radius: var(--r-lg); background: var(--surface-rose); }
.aside-card h2 { font-size: 22px; margin-bottom: 20px; }
.aside-card h3 { font-size: 17px; margin: 28px 0 12px; padding-top: 24px; border-top: 1px solid var(--border); }
.contact-list { list-style: none; display: grid; gap: 4px; }
.contact-list a { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; color: var(--ink); font-weight: 600; text-decoration: none; }
.contact-list a:hover { color: var(--primary); text-decoration: underline; }
.contact-list .zalo-mark { color: #0068FF; font-weight: 700; font-size: 13px; width: 20px; text-align: center; }
.hours { display: flex; gap: 10px; margin-top: 16px; color: var(--text); font-size: 15px; }
.hours strong { display: block; color: var(--ink); }
@media (max-width: 1023px) { .register-grid { grid-template-columns: 1fr; } }
@media (max-width: 639px) { .register-form-card { padding: 24px; } .aside-card { padding: 24px; } }

/* ================================================
   GĐ-D – Nội dung website: Tin tức & Bài viết (/tin-tuc, trang chủ), Clip, Trò chơi từ vựng
   ================================================ */
.footer-more { flex-wrap: wrap; gap: 0 20px; }
.footer-more a { display: inline-flex; align-items: center; min-height: 44px; }

/* Thẻ bài viết (trang chủ + /tin-tuc): dùng lại .goal-card */
.news-card .goal-card-body { gap: 6px; padding: 24px; }
.news-date { margin: 0; color: var(--text-muted); font-size: 14px; font-weight: 600; }
.news-title { font-size: 20px; line-height: 1.35; font-weight: 700; overflow-wrap: anywhere; }
.news-card .goal-card-body p { overflow-wrap: anywhere; }
.news-head { padding-bottom: 32px; }
.news-section { padding-top: 32px; }
.news-pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 40px; flex-wrap: wrap; }
.news-page-no { color: var(--text-muted); font-weight: 600; }
.news-page { max-width: calc(var(--prose) + 2 * var(--gutter)); }
.news-404-actions, .news-empty-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.news-404-actions .btn, .news-empty-actions .btn { margin-top: 0; }

/* Một bài viết: cột chữ vừa mắt, ảnh và clip rộng hết cột */
.article { padding-top: 56px; }
.article-wrap { max-width: calc(var(--prose) + 2 * var(--gutter)); }
.article-head .eyebrow a { color: inherit; text-decoration: none; }
.article-head .eyebrow a:hover { text-decoration: underline; }
.article-title { font-size: 40px; line-height: 1.2; overflow-wrap: anywhere; }
.article-meta { margin-top: 12px; color: var(--text-muted); font-size: 15px; font-weight: 600; }
.article-lead { margin-top: 16px; }
.article-cover { margin: 32px 0 0; }
.article-cover img, .article-figure img { display: block; width: 100%; height: auto; border-radius: var(--r-lg); background: var(--placeholder); }
.article-body { margin-top: 32px; font-size: 18px; line-height: 1.75; color: var(--text); overflow-wrap: anywhere; }
.article-body > * + * { margin-top: 20px; }
.article-body h2 { font-size: 28px; line-height: 1.3; margin-top: 40px; }
.article-body ul, .article-body ol { padding-left: 28px; }
.article-body li + li { margin-top: 8px; }
.article-body figure { margin-left: 0; margin-right: 0; }
.article-body figcaption, .article-video figcaption { margin-top: 8px; color: var(--text-muted); font-size: 15px; line-height: 1.5; }
.article-link .link-arrow { overflow-wrap: anywhere; }
.article-back { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--border); }
.video-embed { position: relative; aspect-ratio: 16 / 9; border-radius: var(--r-lg); overflow: hidden; background: var(--ink); }
.video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
@media (max-width: 639px) {
  .article { padding-top: 32px; }
  .article-title { font-size: 30px; }
  .article-body { font-size: 17px; }
  .article-body h2 { font-size: 23px; margin-top: 32px; }
  .news-404-actions .btn, .news-empty-actions .btn { width: 100%; }
}

/* Clip: ảnh xem trước + nút phát; bấm mới nhúng YouTube */
.clip-list { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px 24px; }
.clip-card { min-width: 0; }
.clip-frame { position: relative; aspect-ratio: 16 / 9; border-radius: var(--r-lg); overflow: hidden; background: var(--ink); }
.clip-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.clip-play { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; background: var(--ink); cursor: pointer; }
.clip-play img { width: 100%; height: 100%; object-fit: cover; opacity: .92; }
.clip-play:hover img, .clip-play:focus-visible img { opacity: 1; }
.clip-play:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }
.clip-play-icon {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 68px; height: 48px; border-radius: 14px;
  display: inline-flex; align-items: center; justify-content: center; background: var(--primary); color: var(--on-primary);
}
.clip-play-icon .icon { width: 26px; height: 26px; fill: currentColor; stroke: none; }
.clip-title { margin-top: 12px; font-size: 18px; line-height: 1.4; font-weight: 700; overflow-wrap: anywhere; }
.clip-desc { margin-top: 6px; color: var(--text-muted); font-size: 15px; line-height: 1.55; white-space: pre-line; overflow-wrap: anywhere; }
.clip-note { margin-top: 32px; color: var(--text-muted); font-size: 14px; }
.clip-section { padding-top: 32px; }
@media (max-width: 1023px) { .clip-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 639px) { .clip-list { grid-template-columns: minmax(0, 1fr); gap: 28px; } }

/* Trò chơi từ vựng */
.games { padding-top: 32px; }
#tro-choi:focus { outline: none; }
.games-filter { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.games-sets { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.game-set { display: flex; flex-direction: column; gap: 10px; padding: 24px; border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface); min-width: 0; }
.game-set-head { display: flex; align-items: center; gap: 12px; }
.game-set-title { font-size: 20px; line-height: 1.35; overflow-wrap: anywhere; min-width: 0; }
.game-set-meta { color: var(--text-muted); font-size: 15px; overflow-wrap: anywhere; }
.game-set-best { display: flex; align-items: center; gap: 6px; color: var(--text-muted); font-size: 14px; font-weight: 600; }
.game-set-best .icon, .game-record .icon { color: var(--accent-strong); } /* cúp vàng: biểu tượng, chữ giữ màu thường */
.game-set-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.game-set-actions .btn { padding: 0 16px; gap: 6px; }
.game-set-actions .btn[disabled] { cursor: not-allowed; }
.game-set-off { color: var(--text-muted); font-size: 14px; }
.game-top { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 20px; }
.game-back { gap: 6px; padding: 0 16px; }
.game-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.game-tab { display: inline-flex; align-items: center; gap: 6px; }
.game-tab[disabled], .game-tab[disabled]:hover { background: var(--disabled-bg); border-color: var(--disabled-bg); color: var(--disabled-text); cursor: not-allowed; }
.game-heading { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; font-size: 26px; line-height: 1.3; overflow-wrap: anywhere; }
.game-heading:focus { outline: none; }
.game-heading-sub { color: var(--text-muted); font-size: 18px; font-weight: 600; }
.game-area { margin-top: 20px; }
.game-loading { padding: 32px 0; color: var(--text-muted); }
.game-status { min-height: 24px; margin-top: 16px; color: var(--ink); font-weight: 600; }
.game-progress { color: var(--text-muted); font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
.game-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.game-actions .btn { gap: 6px; padding: 0 20px; }
.game-result { padding: 32px; border-radius: var(--r-lg); background: var(--surface-rose); }
.game-result-main { font-size: 22px; font-weight: 700; color: var(--ink); }
.game-record { display: flex; align-items: center; gap: 8px; margin-top: 10px; color: var(--ink); font-weight: 700; }
.game-best { margin-top: 8px; color: var(--text-muted); font-weight: 600; }
.game-best:empty { display: none; }

.fc { max-width: 640px; }
.fc-count { color: var(--text-muted); font-size: 15px; font-weight: 600; margin-bottom: 12px; font-variant-numeric: tabular-nums; }
.fc-card {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 240px;
  padding: 32px 24px; border: 2px solid var(--border); border-radius: var(--r-xl); background: var(--surface); color: var(--ink);
  font: inherit; text-align: center; cursor: pointer; box-shadow: var(--shadow); transition: background-color .2s ease, border-color .2s ease;
}
.fc-card:hover { border-color: var(--primary); }
.fc-card.is-flipped { background: var(--primary-subtle); border-color: var(--primary); }
.fc-side { color: var(--text-muted); font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.fc-word { font-size: 36px; line-height: 1.25; font-weight: 700; overflow-wrap: anywhere; }
.fc-meaning { font-size: 30px; line-height: 1.3; font-weight: 700; overflow-wrap: anywhere; }
.fc-small { color: var(--text-muted); font-size: 17px; font-weight: 600; }
.fc-example { color: var(--text); font-size: 17px; line-height: 1.5; font-style: italic; overflow-wrap: anywhere; }
.fc-hint { margin-top: 10px; color: var(--text-muted); font-size: 14px; }
.fc-art { font-weight: 700; }
.fc-art-der { color: #2C55A8; }
.fc-art-die { color: var(--primary); }
.fc-art-das { color: #1F7A3A; }

.art { max-width: 640px; }
.art-question { margin-top: 12px; color: var(--text-muted); font-weight: 600; }
.art-word { margin-top: 8px; font-size: 40px; line-height: 1.2; font-weight: 700; color: var(--ink); overflow-wrap: anywhere; }
.art-gap { color: var(--border-strong); }
.art-meaning { margin-top: 6px; color: var(--text-muted); font-size: 17px; overflow-wrap: anywhere; }
.art-choices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 24px; }
.art-choice {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 64px; border-radius: var(--r-lg);
  border: 2px solid var(--border-strong); background: var(--surface); color: var(--ink); font: inherit; font-size: 24px; font-weight: 700; cursor: pointer;
}
.art-choice:hover:not([disabled]) { background: var(--primary-subtle); border-color: var(--ink); }
.art-choice[disabled] { cursor: default; }
.art-choice.is-right { border-color: var(--success); background: var(--success-subtle); color: var(--success); }
.art-choice.is-wrong { border-color: var(--error); background: var(--error-subtle); color: var(--error); }
.art-feedback { margin-top: 16px; font-size: 18px; font-weight: 700; }
.art-feedback.is-right { color: var(--success); }
.art-feedback.is-wrong { color: var(--error); }

.match-hint { color: var(--text-muted); }
.match .game-progress { margin-top: 8px; }
.match-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 16px; }
.match-col { list-style: none; display: grid; gap: 10px; align-content: start; }
.match-item {
  width: 100%; min-height: 56px; padding: 10px 14px; border: 2px solid var(--border-strong); border-radius: var(--r-md);
  background: var(--surface); color: var(--ink); font: inherit; font-size: 16px; font-weight: 600; line-height: 1.35; text-align: left; overflow-wrap: anywhere; cursor: pointer;
}
.match-item:hover:not([disabled]) { background: var(--primary-subtle); }
.match-item.is-picked { border-color: var(--primary); background: var(--primary-subtle); box-shadow: inset 0 0 0 1px var(--primary); }
.match-item.is-wrong { border-color: var(--error); background: var(--error-subtle); }
.match-item.is-done { border-color: var(--success); background: var(--success-subtle); color: var(--success); cursor: default; }
@media (max-width: 767px) { .games-sets { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 639px) {
  .game-set { padding: 20px; }
  .game-set-actions .btn { flex: 1 1 auto; justify-content: center; }
  .game-top .game-back { width: 100%; justify-content: center; }
  .fc-card { min-height: 200px; padding: 24px 16px; }
  .fc-word { font-size: 30px; }
  .fc-meaning { font-size: 26px; }
  .art-word { font-size: 32px; }
  .game-actions .btn { flex: 1 1 calc(50% - 10px); justify-content: center; }
  .match-cols { gap: 10px; }
  .match-item { font-size: 15px; padding: 8px 10px; }
  .game-result { padding: 24px; }
}

/* ================================================
   Trắc nghiệm công khai (plan-trac-nghiem-cong-khai.md): /kiem-tra-trinh-do, /trac-nghiem-huong-nghiep,
   khối tự kiểm tra ở trang chủ, link ở Du học
   ================================================ */
.quiz-teaser { margin-top: 48px; }
.quiz-teaser h3 { font-size: 22px; }
.quiz-links { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 16px; }
.quiz-link {
  display: flex; align-items: center; gap: 16px; height: 100%; min-height: 88px; padding: 20px 24px;
  border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface-rose); color: var(--ink); text-decoration: none;
}
.quiz-link:hover { border-color: var(--ink); box-shadow: var(--shadow); color: var(--ink); }
.quiz-link > .icon-lg, .quiz-link-go { color: var(--primary); }
.quiz-link-text { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.quiz-link-text strong { font-size: 18px; line-height: 1.35; font-weight: 700; }
.quiz-link-text span { color: var(--text-muted); font-size: 15px; line-height: 1.5; }
.quiz-link:hover .quiz-link-text strong { text-decoration: underline; }
.quiz-hint { margin-top: 12px; }
.quiz-hint a { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-weight: 600; }

.quiz-howto { list-style: none; display: grid; gap: 8px; margin-top: 24px; max-width: var(--prose); }
.quiz-howto li { display: flex; align-items: flex-start; gap: 10px; }
.quiz-howto .icon { margin-top: 5px; color: var(--success); }
.quiz-lang-note {
  display: flex; align-items: flex-start; gap: 10px; max-width: var(--prose); margin-top: 20px; padding: 12px 16px;
  border-radius: var(--r-md); background: var(--info-subtle); color: var(--text);
}
.quiz-lang-note .icon { margin-top: 3px; color: var(--info); }
.quiz-section { padding-top: 0; }
/* một cột đọc ở giữa, đầu trang thẳng hàng với bài */
.quiz, .quiz-head .container { max-width: calc(848px + 2 * var(--gutter)); }
.quiz:focus { outline: none; }
.quiz-loading { display: flex; align-items: center; gap: 10px; color: var(--text-muted); }
.no-js .quiz-loading { display: none; } /* không JavaScript: chỉ dòng <noscript> */
/* Tiến độ dính dưới menu */
.quiz-progress { position: sticky; top: var(--nav-h); z-index: 10; padding: 12px 0; background: var(--surface); border-bottom: 1px solid var(--border); }
.quiz-progress-text { color: var(--ink); font-size: 15px; font-weight: 600; }
.quiz-bar { height: 8px; margin-top: 6px; border-radius: var(--r-full); background: var(--surface-rose); overflow: hidden; }
.quiz-bar-fill { display: block; width: 0; height: 100%; background: var(--primary); transition: width .2s ease; }
.quiz-part { margin-top: 40px; }
.quiz-part-title { font-size: 28px; }
.quiz-text { margin-top: 24px; padding: 20px 24px; border-radius: var(--r-lg); background: var(--surface-rose); }
.quiz-text-label { color: var(--ink); font-weight: 600; }
.quiz-text blockquote { margin: 8px 0 0; font-size: 17px; line-height: 1.7; overflow-wrap: anywhere; }
.quiz-q {
  min-width: 0; margin: 20px 0 0; padding: 20px 24px; border: 1px solid var(--border); border-radius: var(--r-lg);
  scroll-margin-top: calc(var(--nav-h) + 96px);
}
.quiz-q.is-missing { border-color: var(--error); box-shadow: inset 0 0 0 1px var(--error); }
/* legend nổi (float) để nằm trong khung câu hỏi, không nằm trên viền */
.quiz-q-title { float: left; display: flex; align-items: baseline; gap: 12px; width: 100%; padding: 0; color: var(--ink); font-size: 18px; font-weight: 600; line-height: 1.5; }
.quiz-n {
  display: inline-flex; flex: none; align-items: center; justify-content: center; min-width: 32px; height: 32px; padding: 0 6px;
  border-radius: var(--r-full); background: var(--primary-subtle); color: var(--primary); font-size: 15px; font-weight: 700;
}
.quiz-prompt { min-width: 0; overflow-wrap: anywhere; }
.quiz-gap { display: inline-block; width: 3.5em; border-bottom: 2px solid var(--border-strong); }
.quiz-opts { clear: both; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding-top: 14px; }
.quiz-scale { clear: both; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; padding-top: 14px; }
.quiz-opt, .quiz-choice {
  display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 10px 14px; border: 1px solid var(--border-strong);
  border-radius: var(--r-md); background: var(--surface); color: var(--text); line-height: 1.4; overflow-wrap: anywhere; cursor: pointer;
}
/* trình độ: "Chưa biết" cả hàng, chữ nhạt – bỏ đáp án đã chọn, câu tính là bỏ trống */
.quiz-opt-unknown { grid-column: 1 / -1; border-style: dashed; color: var(--text-muted); }
.quiz-opt input, .quiz-choice input { flex: none; width: 20px; height: 20px; margin: 0; accent-color: var(--primary); }
.quiz-opt:hover, .quiz-choice:hover { background: var(--primary-subtle); }
.quiz-opt:has(input:checked), .quiz-choice:has(input:checked) {
  border-color: var(--primary); background: var(--primary-subtle); box-shadow: inset 0 0 0 1px var(--primary); color: var(--ink); font-weight: 600;
}
.quiz-contact { margin-top: 48px; padding: 40px; border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface); }
.quiz-contact h2 { font-size: 28px; }
.quiz-contact .form-intro { margin-top: 6px; color: var(--text-muted); font-size: 15px; }
.quiz-contact .form-grid { margin-top: 20px; }
.quiz-blank { margin-top: 20px; color: var(--warning); font-size: 15px; font-weight: 600; }
.quiz-missing-links { display: flex; flex-wrap: wrap; gap: 0 16px; margin-top: 4px; }
.quiz-missing-links a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; }
.quiz-done { margin-top: 8px; }
@media (max-width: 767px) { .quiz-links { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 639px) {
  .quiz-link { padding: 16px; gap: 12px; }
  .quiz-q { padding: 16px; }
  .quiz-q-title { gap: 10px; font-size: 17px; }
  .quiz-opts:not(.is-short) { grid-template-columns: minmax(0, 1fr); } /* lựa chọn là từ ngắn: vẫn 2 cột */
  .quiz-scale { gap: 6px; }
  .quiz-choice { flex-direction: column; justify-content: center; gap: 4px; padding: 8px 4px; font-size: 15px; text-align: center; }
  .quiz-text { padding: 16px; }
  .quiz-contact { padding: 24px; }
}

/* ── Giảm chuyển động: tắt mọi chuyển cảnh ───── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0s !important; animation-duration: 0s !important; animation-iteration-count: 1 !important; }
  .spinner { animation: none; border-right-color: currentColor; opacity: .6; }
}
