/* Trang chủ landing (thiết kế duyệt 26/10). Ba trang pháp lý + 404 vẫn dùng styles.css.
   CSP không cho style nội tuyến: mọi thứ trên trang lấy lớp từ tệp này. */

@font-face {
  font-family: "Newsreader";
  src: url("/font/newsreader-400.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Newsreader";
  src: url("/font/newsreader-500.woff2") format("woff2");
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Newsreader";
  /* Bản nghiêng: pinyin VÀ câu dịch tiếng Việt in nghiêng, nên cắt theo dải Việt (scripts/cat-font.sh). */
  src: url("/font/newsreader-italic-400.woff2") format("woff2");
  font-weight: 400; font-style: italic; font-display: swap;
}
@font-face {
  font-family: "Noto Serif SC";
  /* Chỉ những chữ trang dùng (scripts/chu-han.txt), giữ trục wght. */
  src: url("/font/noto-serif-sc.woff2") format("woff2");
  font-weight: 200 900; font-style: normal; font-display: swap;
}

:root {
  /* Giấy & mực: token của app, tên tiếng Việt như styles.css. */
  --nen: #efe9dc;
  --nen-sau: #e7dfce;
  --the: #f5f1e8;
  --giay: #fbf8f1;
  --muc: #211e18;
  --muc-mo: #4c473c;
  --muc-nhat: #665e4e;   /* chú thích: đạt AA trên cả --nen-sau (styles.css giải thích vì sao không dùng #8b8270) */
  --chi: #d8cfba;
  --chi-nhat: #e1d8c4;
  --vien: #8b8270;
  --son: #b23529;
  --son-dam: #9c2c21;
  --son-nhat: #f7e6df;
  --ngoc: #4a6655;
  --vang: #a98a52;
  --serif: "Newsreader", "Noto Serif SC", Georgia, "Times New Roman", serif;
  --serif-cn: "Noto Serif SC", "Songti SC", serif;
}

[hidden] { display: none !important; }
/* Pinyin dài hơn chữ Hán thì giữ chữ Hán liền nhau, pinyin căn giữa trên đầu (mặc định trình duyệt giãn từng chữ ra: "成 为"). */
ruby { ruby-align: center; }
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--nen); color: var(--muc); font-family: var(--serif);
  -webkit-font-smoothing: antialiased; font-synthesis: none; overflow-x: hidden;
}
a { color: var(--son); }
a:hover { color: var(--son-dam); }
img, video { max-width: 100%; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--son); outline-offset: 2px; }
.cn { font-family: var(--serif-cn); }

.wrap { max-width: 1180px; margin-inline: auto; padding-inline: 32px; }

/* ---------- chữ ---------- */
.eyebrow { margin: 0; font-size: 13px; letter-spacing: .18em; text-transform: uppercase; color: var(--son); font-weight: 500; }
.h1 { font-size: 68px; line-height: 1.04; font-weight: 500; letter-spacing: -.02em; margin: 18px 0 22px; text-wrap: balance; }
.h2 { font-size: 46px; line-height: 1.1; font-weight: 500; letter-spacing: -.015em; margin: 14px 0 18px; text-wrap: balance; }
.h2-sat { margin-bottom: 0; }
.lead { font-size: 20px; line-height: 1.6; color: var(--muc-mo); margin: 0; text-wrap: pretty; }
.lead-sau { margin-top: 14px; }

/* ---------- nút ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 0 26px;
  border: 0; border-radius: 999px; background: var(--son); color: #fff; text-decoration: none; font-size: 17px;
  font-weight: 500; line-height: 1.2; cursor: pointer; box-shadow: 0 6px 18px rgba(178, 53, 41, .22);
}
.btn:hover { background: var(--son-dam); color: #fff; }
.btn-sm { min-height: 44px; padding: 0 20px; font-size: 15px; }
.btn-ghost {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 22px;
  border-radius: 999px; border: 1px solid var(--vien); color: var(--muc); text-decoration: none; font-size: 17px;
  line-height: 1.2; background: var(--the); cursor: pointer;
}
.btn-ghost:hover { border-color: var(--son); color: var(--son); }
.hang-nut { display: flex; gap: 12px; flex-wrap: wrap; }
.hang-giua { justify-content: center; }

/* ---------- đầu trang ---------- */
.dau-trang { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-block: 18px; }
.hieu { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.hieu-dau { height: 38px; width: auto; }
.hieu-chu { height: 19px; width: auto; }
.nav { display: flex; gap: 28px; align-items: center; }
.nav a:not(.btn) { color: var(--muc-mo); text-decoration: none; font-size: 16px; padding-block: 12px; }
.nav a:not(.btn):hover { color: var(--son); }

/* ---------- hero ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 56px; align-items: center; padding-block: 56px 96px; }
.hero-nut { margin-top: 34px; }
.hero-phu { margin: 18px 0 0; font-size: 15px; line-height: 1.6; color: var(--muc-nhat); }
.hero-phu span, .eyebrow span, .chan-hieu b { white-space: nowrap; }
.chan-hieu b { font-weight: 400; }

.hero-sach { position: relative; }
.book {
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); background: #f7f2e6;
  border-radius: 10px; box-shadow: 0 2px 0 var(--chi), 0 40px 70px -30px rgba(33, 30, 24, .45); padding: 34px 0 40px;
}
.book::before {
  content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 48px; margin-left: -24px;
  background: linear-gradient(90deg, rgba(33, 30, 24, 0), rgba(33, 30, 24, .09), rgba(33, 30, 24, 0));
}
.pg { padding-inline: 28px; container-type: inline-size; }
.pg-head {
  display: flex; justify-content: space-between; align-items: center; font-family: var(--serif-cn); font-size: 11px;
  letter-spacing: .14em; color: var(--muc-nhat); border-bottom: 1px solid var(--chi-nhat); padding-bottom: 10px; margin-bottom: 18px;
}
.pg-dau { width: 18px; height: auto; }
/* Đoạn chảy, chữ cách đều một khoảng, tự xuống dòng; dấu câu dính chữ trước nhờ .k-nhom. */
.doan { margin: 0; font-size: 22px; line-height: 2.6; display: flex; flex-wrap: wrap; column-gap: .5em; }
.doan ruby { ruby-position: over; }
.doan rt { font-family: var(--serif); font-size: 10px; color: var(--muc-nhat); letter-spacing: .02em; }
.k-nhom { white-space: nowrap; }
.hz {
  appearance: none; border: 0; background: none; padding: 0; margin: 0; font: inherit; color: inherit; cursor: pointer;
  border-radius: 4px; transition: background .15s;
}
.hz:hover { background: #f3e3dc; }
.hz.on { background: #efd2c9; }
.hz.on rt { color: var(--muc-mo); }   /* pinyin trên nền hồng: --muc-nhat chỉ 4,49:1 */
/* Chữ một ký tự vẫn đủ vùng chạm 24px (WCAG 2.5.8). */
.hz { min-width: 24px; }

.tra {
  position: absolute; left: 18%; top: 46%; z-index: 5; width: 300px; background: var(--giay); border: 1px solid var(--chi-nhat);
  border-radius: 20px; padding: 22px 24px; box-shadow: 0 30px 60px -20px rgba(33, 30, 24, .4);
}
.tra-dau { display: flex; align-items: center; gap: 14px; }
/* Cỡ chữ, độ đậm, giãn chữ, vạch mảnh: y như thẻ tra từ của app (frontend/src/reader/reader.css `.sheet`), để người xem
   ở đây rồi mở app thấy cùng một thứ. App đổi thì test/noi-dung.test.js đỏ. */
.tra-chu { font-size: 36px; font-weight: 600; line-height: 1; }
.tra-loa {
  appearance: none; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--chi-nhat); background: none;
  display: inline-flex; align-items: center; justify-content: center; color: var(--son); cursor: pointer; padding: 0; flex: none;
}
.tra-loa:hover { background: var(--son-nhat); }
.tra-loa.dang { background: var(--son); color: #fff; border-color: var(--son); }
.tra-loa-nho { width: 28px; height: 28px; cursor: default; }
.tra-doc { margin-top: 8px; display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 9px; font-size: 17px; line-height: 1.4; color: var(--muc-mo); }
.tra-doc-nho { margin-top: 6px; font-size: 14px; }
.tra-hv { font-size: 13.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--son); }
.tra-am { margin-top: 6px; font-size: 13px; color: var(--muc-nhat); }
.tra-nghia { font-size: 23px; line-height: 1.35; border-top: 1px solid var(--chi); margin-top: 14px; padding-top: 14px; }
.tra-luu {
  display: flex; align-items: center; justify-content: center; width: 100%; margin-top: 16px; min-height: 44px;
  background: var(--son); color: #fff; border-radius: 12px; font-size: 16px; text-decoration: none;
}
.tra-luu:hover { background: var(--son-dam); color: #fff; }
.tra-luu-nho { min-height: 44px; border-radius: 10px; font-size: 15px; margin-top: 12px; }

/* ---------- video giới thiệu ---------- */
.khoi-promo { padding-bottom: 96px; }
.promo-dau { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.ghi-nho { margin: 0; font-size: 15px; color: var(--muc-nhat); }
.promo {
  border-radius: 24px; overflow: hidden; border: 10px solid var(--the); outline: 1px solid var(--chi);
  box-shadow: 0 40px 80px -36px rgba(33, 30, 24, .45);
}
.promo video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; background: #e9e6e1; }

/* ---------- mục chung ---------- */
.sec { padding-block: 110px; }
.sec-deep { background: var(--nen-sau); }
/* Hai khối nền sẫm liền nhau đọc thành một dải: khối sau bỏ lề trên, không thì giữa hai khối hở gấp đôi. */
.sec-deep + .sec-deep { padding-top: 0; }
.sec-dau { max-width: 720px; }
.sec-dau-giua { text-align: center; margin-inline: auto; }
.two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 64px; align-items: center; }
.two-tren { align-items: start; }
.three { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin-top: 44px; }
.card {
  background: var(--the); border: 1px solid var(--chi); border-radius: 22px; padding: 30px;
  box-shadow: 0 1px 0 rgba(33, 30, 24, .04), 0 18px 40px -24px rgba(33, 30, 24, .25);
}
.card h3 { font-size: 24px; font-weight: 500; margin: 20px 0 10px; }
.card p { font-size: 17px; line-height: 1.6; color: var(--muc-mo); margin: 0; }
/* Ô chữ như con dấu của logo: nền son, viền kem trong, mép hơi gồ ghề. */
.mark {
  width: 60px; height: 60px; display: flex; align-items: center; justify-content: center; font-size: 33px; font-weight: 700;
  line-height: 1; color: #f2e6d6;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 60'><defs><filter id='r' x='-10%' y='-10%' width='120%' height='120%'><feTurbulence type='fractalNoise' baseFrequency='.045' numOctaves='1' seed='4'/><feDisplacementMap in='SourceGraphic' scale='2.2'/></filter><filter id='g'><feTurbulence type='fractalNoise' baseFrequency='.6' numOctaves='2' seed='7'/><feColorMatrix values='0 0 0 0 .32 0 0 0 0 .07 0 0 0 0 .04 0 0 0 .4 -.16'/><feComposite in2='SourceGraphic' operator='in'/></filter></defs><g filter='url(%23r)'><rect x='2.5' y='2.5' width='55' height='55' rx='9' fill='%23aa2a1b'/><rect x='7.4' y='7.4' width='45.2' height='45.2' rx='5' fill='none' stroke='%23f2e6d6' stroke-width='3'/><rect x='10.2' y='10.2' width='39.6' height='39.6' rx='3.5' fill='%23aa2a1b' filter='url(%23g)'/></g></svg>") center / 100% 100% no-repeat;
}

/* ---------- tủ sách ---------- */
.ts-dau { display: flex; justify-content: space-between; align-items: flex-end; gap: 28px; flex-wrap: wrap; }
.ts-chu { max-width: 640px; }
.caps { display: flex; gap: 8px; flex-wrap: wrap; }
.cap {
  min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--chi); background: var(--the);
  font-size: 16px; color: var(--muc-mo); cursor: pointer;
}
.cap:hover { border-color: var(--son); color: var(--son); }
.cap.on { border-color: var(--son); color: var(--son); background: var(--son-nhat); box-shadow: inset 0 0 0 1px var(--son); }
.shelf { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; margin-top: 40px; }
.ke { display: flex; flex-direction: column; min-width: 0; color: inherit; text-decoration: none; border-radius: 10px; }
.ke-bia {
  display: block; width: 100%; height: auto; aspect-ratio: 3 / 4; object-fit: cover; object-position: top;
  border-radius: 4px 8px 8px 4px; background: var(--nen-sau); transition: transform .25s ease, box-shadow .25s ease;
  box-shadow: 0 1px 0 rgba(33, 30, 24, .08), 0 22px 40px -22px rgba(33, 30, 24, .55), 0 6px 14px -8px rgba(33, 30, 24, .25);
}
.ke:hover .ke-bia, .ke:focus-visible .ke-bia {
  transform: translateY(-6px);
  box-shadow: 0 1px 0 rgba(33, 30, 24, .08), 0 30px 48px -22px rgba(33, 30, 24, .6), 0 8px 18px -8px rgba(33, 30, 24, .3);
}
.ke:hover h3, .ke:focus-visible h3 { color: var(--son); }
.ke:focus-visible { outline: 2px solid var(--son); outline-offset: 6px; }
.ke-tt { flex: 1; display: flex; flex-direction: column; align-items: flex-start; padding: 20px 4px 0; }
.ke-loai { font-size: 12px; line-height: 1; letter-spacing: .12em; text-transform: uppercase; font-weight: 500; color: var(--muc-nhat); }
.ke-tt h3 {
  font-size: 20px; font-weight: 500; line-height: 1.3; margin: 10px 0 6px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.ke-tt p { margin: 0; font-size: 15px; color: var(--muc-nhat); }
.ke-tt p b { color: var(--son); font-weight: 500; }
.ke-doc { margin-top: auto; padding-top: 14px; font-size: 15px; font-weight: 500; color: var(--son); }

/* ---------- video xem thử ---------- */
.vid-dau { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: end; }
.aw {
  margin-top: 48px; background: var(--the); border: 1px solid var(--chi); border-radius: 20px;
  box-shadow: 0 50px 90px -50px rgba(33, 30, 24, .5);
}
.aw-bar { display: flex; align-items: center; gap: 7px; padding: 12px 16px; border-bottom: 1px solid var(--chi-nhat); background: #ede6d6; border-radius: 20px 20px 0 0; }
.aw-bar > span { width: 12px; height: 12px; border-radius: 50%; background: #ff5f57; box-shadow: inset 0 0 0 .5px rgba(0, 0, 0, .12); }
.aw-bar > span:nth-child(2) { background: #febc2e; }
.aw-bar > span:nth-child(3) { background: #28c840; }
.aw-url { margin: 0 auto; padding: 4px 40px; border-radius: 8px; background: var(--the); font-size: 13px; color: var(--muc-nhat); }
.aw-body { padding: 26px 30px 32px; }
.aw-title { margin-bottom: 18px; }
.aw-t1 { font-size: 24px; font-weight: 500; }
.aw-t2 { font-size: 14px; color: var(--muc-nhat); margin-top: 4px; }
.aw-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 32px; align-items: start; }
.aw-pl { position: relative; aspect-ratio: 16 / 9; border-radius: 14px; background: #2b2822; }
/* Chưa bấm phát: tấm giấy của trang, không ảnh của kênh. Bấm phát mới nạp khung YouTube. */
.aw-khung, .aw-khung iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: 14px; }
.aw-pl:not(.dang-xem) { background: radial-gradient(120% 90% at 30% 20%, #f5efe2 0%, #e2d7c1 60%, #cdbf9f 100%); }
.aw-mo {
  position: absolute; inset: 0; border: 0; background: none; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 14px; cursor: pointer; border-radius: 14px;
}
.aw-mo-nut {
  width: 78px; height: 78px; border-radius: 50%; background: var(--son); color: #fff; display: flex; align-items: center;
  justify-content: center; box-shadow: 0 0 0 10px rgba(178, 53, 41, .18), 0 18px 34px -12px rgba(33, 30, 24, .55);
}
.aw-mo-chu { background: rgba(251, 248, 241, .95); border-radius: 999px; padding: 8px 18px; font-size: 16px; color: var(--muc); }
.aw-mo.dang-tai .aw-mo-nut { animation: nhip 1s ease-in-out infinite; }
@keyframes nhip { 50% { transform: scale(.92); } }
.aw-dem {
  position: absolute; top: 14px; right: 14px; background: rgba(251, 248, 241, .95); border-radius: 999px; padding: 6px 14px;
  font-size: 13px; color: var(--son); font-variant-numeric: tabular-nums; font-weight: 500;
}
.aw-pd {
  position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); max-width: 96%; background: rgba(251, 248, 241, .95);
  border-radius: 12px; padding: 4px 22px 10px; text-align: center; white-space: nowrap; pointer-events: none;
  box-shadow: 0 12px 30px -16px rgba(33, 30, 24, .55);
}
.pd-zh { font-size: 26px; line-height: 2.05; }
.pd-zh .k-nhom { margin: 0 3px; }
.pd-zh rt, .co-py rt { font-family: var(--serif); font-size: 11px; color: var(--muc-nhat); letter-spacing: 0; }
.pd-vi { font-size: 15px; font-style: italic; color: var(--muc-mo); }
.khong-py rt { display: none; }
.aw-het {
  position: absolute; inset: 0; border-radius: 14px; background: rgba(245, 241, 232, .96); display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center; padding: 24px; gap: 10px;
}
.aw-het-dau { width: 44px; height: auto; }
.aw-het-t { font-size: 26px; font-weight: 500; }
.aw-het p { margin: 0 0 8px; max-width: 420px; font-size: 16px; line-height: 1.55; color: var(--muc-mo); }
.aw-tua { height: 4px; background: var(--chi-nhat); border-radius: 2px; margin: 18px 0 14px; position: relative; }
.aw-tua i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--son); border-radius: 2px; }
.aw-tua i::after { content: ""; position: absolute; right: -7px; top: -5px; width: 14px; height: 14px; border-radius: 50%; background: var(--son); }
.aw-dk { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.aw-phat {
  width: 48px; height: 48px; border-radius: 50%; border: 0; background: var(--son); color: #fff; display: inline-flex;
  align-items: center; justify-content: center; cursor: pointer;
}
.aw-phat .i-dung, .aw-phat.dang-chay .i-phat { display: none; }
.aw-phat.dang-chay .i-dung { display: block; }
.aw-tron {
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--chi); background: var(--the); color: var(--muc);
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
}
.aw-tron .i-cam, .aw-tron.cam .i-co-tieng { display: none; }
.aw-tron.cam .i-cam { display: inline; }
.aw-gio { font-size: 14px; color: var(--muc-mo); font-variant-numeric: tabular-nums; margin-left: 4px; }
.aw-gian { flex: 1; }
.aw-bat { position: relative; display: inline-flex; gap: 8px; }
.aw-o {
  min-width: 44px; height: 44px; border-radius: 8px; border: 1.5px solid var(--muc); background: transparent;
  font-size: 15px; font-weight: 500; color: var(--muc); cursor: pointer; padding: 0 10px;
}
.aw-o.on { box-shadow: inset 0 -3px 0 var(--son); }
.aw-dk2 { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 14px; }
.aw-toc { position: relative; display: inline-flex; border: 1px solid var(--chi); border-radius: 12px; background: var(--the); }
.aw-toc button {
  min-height: 44px; padding: 0 13px; border: 0; border-right: 1px solid var(--chi-nhat); background: transparent;
  font-size: 14px; color: var(--muc-mo); cursor: pointer;
}
.aw-toc button:last-of-type { border-right: 0; }
.aw-toc button.on { color: var(--son); box-shadow: inset 0 0 0 1.5px var(--son); border-radius: 6px; }
.aw-phai { position: relative; border-left: 1px solid var(--chi-nhat); padding-left: 20px; padding-bottom: 24px; }
.aw-goi {
  display: flex; justify-content: space-between; align-items: center; padding: 4px 12px 14px;
  border-bottom: 1px solid var(--chi-nhat); margin-bottom: 8px; font-size: 16px; font-weight: 500;
}
.aw-goi-tra { position: relative; font-size: 13px; font-weight: 400; color: var(--muc-nhat); font-style: italic; margin-right: 26px; }
.aw-ds {
  position: relative; max-height: 560px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--chi) transparent;
  padding: 4px 4px 4px 0; margin-right: -4px; overscroll-behavior: contain;
}
.cue { display: grid; grid-template-columns: 46px minmax(0, 1fr); gap: 12px; padding: 14px 12px; border-radius: 12px; position: relative; }
.cue.nay { background: var(--giay); box-shadow: 0 10px 26px -16px rgba(33, 30, 24, .4); }
.cue-moc {
  appearance: none; border: 0; background: none; font-size: 13px; color: var(--muc-nhat); padding: 6px 0 0; text-align: left;
  cursor: pointer; font-variant-numeric: tabular-nums; align-self: start; min-height: 44px;
}
.cue-moc:hover, .cue.nay .cue-moc { color: var(--son); }
.cue.nay .cue-moc { font-weight: 500; }
.cue-zh { font-size: 19px; line-height: 1.75; }
.cue-zh > div { white-space: normal; }
.cue-zh .k-nhom { margin-right: .25em; }
.co-py { line-height: 2.45; }
.co-py .k-nhom { margin-right: .4em; }
.cue-vi { font-size: 14.5px; line-height: 1.5; font-style: italic; color: var(--muc-mo); margin-top: 4px; text-wrap: pretty; }
.cue.qua .cue-zh, .cue.qua .cue-vi { color: var(--muc-nhat); }
.k { transition: color .15s; }
.k-da, .k-da rt { color: var(--son); }
.k-nut { appearance: none; border: 0; background: none; padding: 0 1px; margin: 0; font: inherit; color: inherit; cursor: pointer; border-radius: 4px; }
.k-nut:hover { background: #efd2c9; }
.k-nut.k-da { color: var(--son); }
.k-tra { background: #efd2c9; border-radius: 4px; box-shadow: inset 0 -2px 0 var(--son); }
.cue-tra {
  position: relative; grid-column: 2; margin-top: 6px; z-index: 3; width: min(270px, 100%); background: var(--giay);
  border: 1px solid var(--chi-nhat); border-radius: 16px; padding: 16px 18px; box-shadow: 0 26px 50px -18px rgba(33, 30, 24, .45);
}
.cue-tra .tra-dau { gap: 10px; }
.cue-tra-chu { font-size: 34px; line-height: 1; }
.cue-tra-nghia { font-size: 16px; line-height: 1.45; border-top: 1px solid var(--chi-nhat); margin-top: 10px; padding-top: 10px; }
.cue-tra-x {
  position: absolute; top: 4px; right: 4px; width: 44px; height: 44px; border: 0; background: none; font-size: 22px;
  color: var(--muc-nhat); cursor: pointer; border-radius: 8px;
}
.cue-tra-x:hover { background: #ece4d3; }

/* Số đánh dấu 1–5 trên khung và chú thích bên dưới */
.so {
  position: absolute; z-index: 4; width: 26px; height: 26px; border-radius: 50%; background: var(--son); color: #fff;
  font-size: 14px; font-weight: 500; display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 0 0 3px var(--the); font-style: normal; line-height: 1; pointer-events: none;
}
.so-pd { left: 10px; bottom: 58px; }
.so-bat { right: -12px; top: -14px; }
.so-toc { right: -12px; top: -12px; }
.so-tra { right: -30px; top: -4px; }
.so-lc { left: -13px; top: 64px; }
.so-tinh { position: static; flex: none; margin-top: 2px; }
.chu-thich { list-style: none; padding: 0; margin: 44px 0 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 24px; }
.chu-thich li { display: flex; gap: 12px; align-items: flex-start; }
.chu-thich h3 { font-size: 18px; font-weight: 500; margin: 0 0 6px; }
.chu-thich p { margin: 0; font-size: 15px; line-height: 1.55; color: var(--muc-mo); }

/* ---------- ôn thử ---------- */
.ladder-khung { container: lich-on / inline-size; margin-top: 28px; }
.ladder { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.bac { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.step {
  min-height: 40px; padding: 0 14px; white-space: nowrap; border-radius: 999px; border: 1px solid var(--chi);
  background: var(--the); display: inline-flex; align-items: center; font-size: 15px;
}
.step-thuoc { border-color: #5d7a68; color: var(--ngoc); background: #e9efe9; }
.arrow { color: var(--vang); }
@container lich-on (max-width: 540px) {
  /* Lịch ôn một hàng (chủ dự án 27/10: "Đã thuộc" rớt xuống dòng): năm nấc giãn ra lấp đủ bề ngang, mũi tên thành một vạch
     chạy sau các nấc vì bốn mũi tên chiếm gần một phần tư hàng.
     Đo theo bề ngang của chính hàng (container), không theo màn: iPad ngang hai cột thì cột cũng hẹp. */
  .ladder { flex-wrap: nowrap; gap: 6px; position: relative; }
  .ladder::before { content: ""; position: absolute; left: 12px; right: 12px; top: 50%; border-top: 1px solid var(--vang); }
  .bac { display: contents; }
  .arrow { display: none; }
  .step { position: relative; flex: 1 1 auto; min-width: 0; justify-content: center; padding: 0 6px; font-size: clamp(12px, 4.1cqi, 15px); }
}
.on-khoi { display: flex; flex-direction: column; gap: 14px; }
.on-the { padding: 26px 30px 28px; min-height: 470px; display: flex; flex-direction: column; }
.on-dau { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 13px; color: var(--muc-nhat); letter-spacing: .12em; text-transform: uppercase; }
.on-vach { display: flex; gap: 4px; flex: none; }
.on-vach i { width: 18px; height: 4px; border-radius: 2px; background: var(--chi-nhat); }
.on-vach i.da { background: var(--son); }
.on-vach i.nay { background: #d79a8c; }
.on-giua { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 18px 0; }
.on-chu { font-size: 76px; line-height: 1.1; }
.on-chu-nho { font-size: 56px; }
.on-py { font-size: 18px; color: var(--muc-nhat); margin-top: 8px; }
.on-py span { color: var(--son); letter-spacing: .1em; font-size: 14px; margin-left: 8px; }
.on-nghia { font-size: 19px; margin-top: 10px; }
.on-cau { font-size: 18px; color: var(--muc-mo); margin-top: 18px; line-height: 1.7; }
.on-cau u { text-decoration: none; border-bottom: 2px solid var(--son); color: var(--muc); }
.on-cau-lon { font-size: 26px; color: var(--muc); margin-top: 0; }
.on-cau-vi { font-size: 15px; color: var(--muc-nhat); font-style: italic; margin-top: 6px; max-width: 440px; }
.on-goi { font-size: 15px; color: var(--muc-mo); margin-top: 16px; }
.on-goi b { font-weight: 500; }
.on-trong { display: inline-block; min-width: 2.4em; border-bottom: 2px solid var(--son); margin: 0 4px; color: var(--son); }
.on-trong.dung { color: var(--ngoc); border-color: #5d7a68; }
.on-rong { width: 100%; box-shadow: none; }
.on-cham { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.on-c {
  display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 6px; border-radius: 16px;
  border: 1px solid var(--chi); background: var(--the); color: var(--muc); cursor: pointer;
}
.on-c b { font-size: 17px; font-weight: 500; }
.on-c span { font-size: 13px; color: var(--muc-nhat); }
.on-lai b { color: var(--son); }
.on-kho b { color: #7d6435; }
.on-tot { border-color: #5d7a68; background: #e9efe9; }
.on-tot b { color: var(--ngoc); }
.on-nhan { display: block; font-size: 14px; color: var(--muc-nhat); margin-bottom: 8px; }
.on-hang { display: flex; gap: 10px; }
.on-o {
  flex: 1; min-width: 0; min-height: 48px; border-radius: 999px; border: 1px solid var(--vien); background: var(--giay);
  padding: 0 20px; font-size: 20px; color: var(--muc);
}
.on-o:focus { outline: 2px solid var(--son); outline-offset: 1px; }
.on-hang .btn { box-shadow: none; font-size: 16px; }
.on-kq { border-radius: 14px; padding: 12px 16px; margin-bottom: 12px; font-size: 16px; text-align: center; }
.on-kq.dung { background: #e9efe9; color: var(--ngoc); }
.on-kq.sai { background: var(--son-nhat); color: #8f2a20; }
.on-khay { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 18px 0 14px; min-height: 46px; }
.on-k {
  min-height: 44px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--vien); background: var(--giay);
  font-family: var(--serif-cn); font-size: 20px; color: var(--muc); cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none;
}
.on-k.cam { border-color: var(--son); box-shadow: inset 0 0 0 1px var(--son); color: var(--son); transform: translateY(-2px); }
.on-k.dang-keo { opacity: .35; }
.on-bong {
  position: fixed; left: 0; top: 0; z-index: 9999; pointer-events: none; margin: 0; cursor: grabbing; border-color: var(--son);
  color: var(--son); box-shadow: 0 18px 30px -12px rgba(33, 30, 24, .45); display: inline-flex; align-items: center; justify-content: center;
}
.on-ds { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.on-ds button {
  width: 100%; text-align: left; border: 1px solid transparent; border-radius: 12px; background: transparent; padding: 8px 12px;
  color: var(--muc); cursor: pointer; display: flex; flex-direction: column; gap: 2px;
}
.on-ds button .cn { font-size: 18px; line-height: 1.6; }
.on-ds button.cho:hover { border-color: var(--chi); background: var(--giay); }
.on-ds button.sai { border-color: #e3b3a8; background: var(--son-nhat); }
.on-ds button.xong { cursor: default; }
.on-ds button.tro { border-color: var(--son); border-style: dashed; background: #fbf2ea; }
.on-ds-vi { font-size: 13px; line-height: 1.45; color: var(--muc-nhat); font-style: italic; }
.on-bao { min-height: 22px; margin-top: 8px; font-size: 14px; color: #8f2a20; text-align: center; }
.on-xong-dau { width: 44px; height: auto; }
.on-xong-t { font-size: 24px; font-weight: 500; margin-top: 10px; }
.on-xong p { font-size: 16px; color: var(--muc-mo); max-width: 380px; margin: 8px 0 18px; line-height: 1.55; }
.on-xong .hang-nut { justify-content: center; }
.on-tab { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.on-tab button {
  display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; border-radius: 16px;
  border: 1px solid var(--chi); background: var(--the); color: var(--muc); font-size: 16px; cursor: pointer;
}
.on-tab button.on { border-color: var(--son); background: var(--giay); box-shadow: inset 0 0 0 1px var(--son); }
.on-g { font-size: 20px; color: var(--son); }

/* ---------- thành tích ---------- */
.tt-the { padding: 32px; }
.tt-chuoi span { display: block; font-size: 14px; color: var(--muc-nhat); }
.tt-chuoi b { font-size: 40px; font-weight: 500; }
.tt-chuoi em { font-style: normal; color: var(--son); }
.tt-nhan { font-size: 14px; color: var(--muc-nhat); margin: 22px 0 10px; }
.lich { display: grid; grid-template-columns: repeat(26, minmax(0, 1fr)); gap: 4px; }
.lich-cot { display: grid; grid-template-rows: repeat(7, 1fr); gap: 4px; }
.lich i { display: block; aspect-ratio: 1; border-radius: 3px; }
.lich .m0 { background: #e2d9c6; } .lich .m1 { background: #e9c9bf; } .lich .m2 { background: #d79a8c; }
.lich .m3 { background: #c4685a; } .lich .m4 { background: var(--son); }
.tt-so { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: 26px; }
.stat { border-top: 1px solid var(--chi); padding-top: 14px; }
.stat b { display: block; font-size: 30px; font-weight: 500; }
.stat span { font-size: 14px; color: var(--muc-nhat); }
.tt-ghi { font-size: 12px; color: var(--muc-nhat); margin-top: 16px; }

/* ---------- bảng giá ---------- */
.price { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin-top: 48px; align-items: stretch; }
.price .card { display: flex; flex-direction: column; gap: 14px; }
.price ul { list-style: none; padding: 0; margin: 6px 0 0; display: flex; flex-direction: column; gap: 10px; font-size: 16px; color: var(--muc-mo); }
.price li { display: flex; gap: 10px; align-items: flex-start; line-height: 1.45; }
.tag { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; font-weight: 500; color: var(--son); }
.tag-nhat { color: var(--muc-nhat); }
.gia-lon { font-size: 40px; font-weight: 500; }
.gia-phu { font-size: 15px; color: var(--muc-nhat); }
.gia-nut { margin-top: auto; }
.ok { color: #5d7a68; flex: none; margin-top: 3px; }
.hv {
  position: relative; border: 2px solid var(--son); background: linear-gradient(180deg, #fbf2ea 0%, #f7ece2 100%); margin-top: -14px;
  box-shadow: 0 0 0 6px rgba(178, 53, 41, .07), 0 30px 60px -28px rgba(178, 53, 41, .55);
}
.hv-nhan {
  position: absolute; top: -15px; left: 50%; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 8px;
  white-space: nowrap; padding: 5px 16px 5px 10px; border-radius: 999px; background: var(--son); color: #fff; font-size: 13px;
  font-weight: 500; letter-spacing: .08em; text-transform: uppercase; box-shadow: 0 8px 18px -8px rgba(178, 53, 41, .7);
}
.hv-nhan img { width: 18px; height: auto; background: #fbf2ea; border-radius: 4px; padding: 1px; }
.hv-gia { font-size: 46px; font-weight: 500; line-height: 1.1; }
.hv-gia span { font-size: 17px; color: var(--muc-nhat); }
.hv-cu { font-size: 15px; color: var(--muc-nhat); margin-top: -8px; }
.hv-cu s { text-decoration-thickness: 1.5px; }
.hv-thang { font-size: 15px; color: var(--muc-mo); line-height: 1.45; }

/* ---------- hỏi đáp ---------- */
.faq { border-top: 1px solid var(--chi); }
.faq details { border-bottom: 1px solid var(--chi); padding: 22px 4px; }
.faq summary { cursor: pointer; font-size: 21px; line-height: 1.35; list-style: none; display: flex; justify-content: space-between; gap: 20px; align-items: center; min-height: 44px; }
.faq summary::-webkit-details-marker { display: none; }
.faq details p { margin: 12px 0 0; font-size: 17px; line-height: 1.6; color: var(--muc-mo); max-width: 640px; }
.plus { color: var(--son); font-size: 24px; flex: none; transition: transform .2s; }
.faq details[open] .plus { transform: rotate(45deg); }

/* ---------- khối cuối, chân trang ---------- */
.khoi-cuoi { padding-block: 0 96px; }
.final { background: var(--the); border: 1px solid var(--chi); border-radius: 32px; padding: 80px 48px; text-align: center; position: relative; overflow: hidden; }
.seal-bg { position: absolute; right: -30px; bottom: -60px; font-size: 260px; color: rgba(178, 53, 41, .06); line-height: 1; }
.final-h2 { max-width: 720px; margin-inline: auto; }
.final-lead { max-width: 560px; margin-inline: auto; }
.final-nut { margin-top: 34px; }
.chan { display: flex; justify-content: space-between; align-items: center; gap: 16px 24px; flex-wrap: wrap; padding-block: 0 56px; font-size: 14px; color: var(--muc-nhat); }
/* Kẻ chỉ bằng bề ngang nội dung, không tràn sang phần lề của .wrap. */
.chan::before { content: ""; flex-basis: 100%; border-top: 1px solid var(--chi); margin-bottom: 24px; }
.chan-hieu { display: flex; align-items: center; gap: 10px; line-height: 1.4; }
.chan-hieu img { width: 24px; height: auto; }
.chan-link { display: flex; gap: 4px 20px; flex-wrap: wrap; }
.chan-link a { color: var(--muc-mo); padding-block: 12px; }
.chan-ghi { flex-basis: 100%; margin: 0; line-height: 1.6; }

/* ================= Theo loại màn =================
   Một cột: điện thoại, iPad dọc (kể cả iPad Pro 1024 dọc — chia hai cột trên màn dọc rộng là hai cột hẹp dưới một
   khoảng trống cao). Hai cột chỉ khi màn đủ rộng VÀ nằm ngang. */
@media (max-width: 980px), (orientation: portrait) and (max-width: 1100px) {
  .hero, .two { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .hero { padding-block: 24px 72px; }
  .hero-chu, .sec-dau, .two > div:not(.card):not(.on-khoi) { max-width: 720px; }
  /* Một cột trên màn rộng (iPad dọc): sách và thẻ minh hoạ không kéo hết bề ngang, dòng chữ trong sách thưa ra. */
  .hero-sach, .two > .card { width: 100%; max-width: 720px; }
  .three, .price { grid-template-columns: minmax(0, 1fr); max-width: 560px; margin-inline: auto; }
  .three { margin-top: 32px; }
  .price { gap: 28px; }
  .hv { margin-top: 10px; }
  .h1 { font-size: 52px; }
  .h2 { font-size: 36px; }
  .nav a.nav-an { display: none; }
  .sec { padding-block: 72px; }
  .order-first { order: -1; }
  .vid-dau, .aw-grid { grid-template-columns: minmax(0, 1fr); }
  .vid-dau { gap: 16px; }
  .aw-phai { border-left: 0; padding-left: 0; border-top: 1px solid var(--chi-nhat); padding-top: 16px; }
  .aw-ds { max-height: 420px; }
  .so-lc { left: -10px; top: -13px; }
  .chu-thich { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shelf { gap: 24px; }
  .on-khoi { max-width: 620px; }
}
/* Sách hai trang cần ~500px mới đủ cho dòng 12 chữ: dưới 1100px (cả iPad 1024 nằm ngang) màn đầu xếp một cột. */
@media (max-width: 1100px) {
  .hero { grid-template-columns: minmax(0, 1fr); gap: 40px; padding-block: 24px 72px; }
  .hero-chu { max-width: 720px; }
  .hero-sach { width: 100%; max-width: 720px; }
}
@media (max-width: 760px) {
  .shelf { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shelf > :nth-child(3) { display: none; }
}
@media (max-width: 600px) {
  .wrap { padding-inline: 16px; }
  .h1 { font-size: 38px; }
  .h2 { font-size: 30px; }
  .lead { font-size: 18px; }
  .hero-nut .btn, .hero-nut .btn-ghost { flex: 1 1 100%; }
  .book { grid-template-columns: minmax(0, 1fr); padding: 24px 0 28px; }
  .book::before, .pg-2 { display: none; }
  .pg { padding-inline: 20px; }
  .doan { font-size: 20px; column-gap: .45em; }
  .tra { left: 6%; right: 6%; width: auto; top: 44%; }
  .khoi-promo { padding-bottom: 72px; }
  .promo { border-width: 6px; border-radius: 18px; }
  .sec { padding-block: 64px; }
  .card { padding: 24px; }
  .shelf { gap: 16px; }
  .ke-tt h3 { font-size: 17px; }
  .ke-tt p { font-size: 13px; }
  .aw-bar { padding: 10px 12px; }
  .aw-url { padding: 3px 18px; }
  .aw-body { padding: 18px 14px 22px; }
  .aw-t1 { font-size: 20px; }
  .pd-zh { font-size: 18px; line-height: 1.9; }
  .pd-vi { font-size: 12px; }
  .aw-pd { padding: 2px 12px 6px; bottom: 8px; }
  .pd-zh rt { font-size: 9px; }
  .so-pd { bottom: auto; top: 10px; }
  .aw-gio { display: none; }
  .aw-toc { width: 100%; }
  .aw-toc button { flex: 1; padding: 0 4px; }
  .chu-thich { grid-template-columns: minmax(0, 1fr); }
  .on-the { padding: 22px 18px 24px; min-height: 440px; }
  .on-chu { font-size: 64px; }
  .on-cau-lon { font-size: 22px; }
  .on-tab button { flex-direction: column; gap: 2px; min-height: 60px; font-size: 14px; }
  .tt-the { padding: 24px; }
  .tt-chuoi b { font-size: 32px; }
  .lich { grid-template-columns: repeat(13, minmax(0, 1fr)); }
  .lich-cot.xa { display: none; }
  .stat b { font-size: 24px; }
  .gia-nut { width: 100%; }
  .faq summary { font-size: 19px; }
  .final { padding: 56px 22px; border-radius: 24px; }
  .final-nut .btn { width: 100%; }
  .seal-bg { font-size: 200px; }
}
@media (max-width: 360px) {
  .nav .btn { padding: 0 14px; }
  .h1 { font-size: 34px; }
  .on-hang { flex-direction: column; }
}
