/* =========================================================
   VHV LMS – Hệ thống học tập trực tuyến TS. Vương Hữu Vĩnh
   Phong cách: thanh điều hướng biểu tượng tròn + hero ảnh,
   chữ serif thanh lịch, tông xanh navy.
   ========================================================= */
:root {
  --ink: #1f3354;
  --navy: #1d3a66;
  --navy-2: #284b80;
  --muted: #5d6b80;
  --line: #e4e9f0;
  --bg: #f5f7fa;
  --paper: #ffffff;
  --soft: #eef3f8;

  --c-intro: #1565c0;
  --c-music: #8e24aa;
  --c-research: #13a08b;
  --c-ielts: #e53935;
  --c-toeic: #f4511e;
  --c-cefr: #1fa99a;
  --c-docs: #7b1fa2;
  --c-contact: #1565c0;

  --book-music: #1f7a6c;
  --book-research: #1c6a57;
  --book-edu: #1e4f9e;
  --book-lang: #a1262f;

  --ok: #1e9e5a;
  --bad: #d93a3a;
  --warn: #e8a317;

  --accent: var(--navy);
  --radius: 14px;
  --shadow: 0 1px 2px rgba(20, 40, 80, .06), 0 6px 22px rgba(20, 40, 80, .07);
  --serif: "Noto Serif", "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: "Be Vietnam Pro", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  font-size: 15.5px;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--c-intro); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { color: var(--navy); line-height: 1.3; margin: 0 0 .5em; }
h1, h2 { font-family: var(--serif); font-weight: 600; }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }
.serif { font-family: var(--serif); }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
.center { text-align: center; }
.hidden { display: none !important; }

.container { width: min(1240px, 100% - 32px); margin-inline: auto; }
.section { padding: 56px 0; }
.section-sm { padding: 32px 0; }
.section-title { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.section-title h2 { margin: 0; font-size: 1.75rem; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .75rem; font-weight: 700; color: var(--accent); margin-bottom: 6px; }

/* ---------------- Top bar ---------------- */
.topbar { background: var(--navy); color: #dfe8f5; font-size: .82rem; }
.topbar .container { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 36px; }
.topbar a { color: #fff; }
.topbar .brand { font-family: var(--serif); letter-spacing: .02em; color: #fff; font-weight: 600; }
.topbar .actions { display: flex; gap: 14px; align-items: center; }
.topbar .actions button { background: rgba(255,255,255,.12); color: #fff; border: 1px solid rgba(255,255,255,.25); border-radius: 999px; padding: 3px 12px; font: inherit; cursor: pointer; }
.topbar .actions button:hover { background: rgba(255,255,255,.22); }

/* ---------------- Icon navigation ---------------- */
.site-nav { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; box-shadow: 0 2px 10px rgba(20,40,80,.04); }
.site-nav ul { list-style: none; margin: 0 auto; padding: 0; display: grid; grid-template-columns: repeat(9, 1fr); width: min(1440px, 100%); }
.site-nav li { position: relative; }
.site-nav li + li::before { content: ""; position: absolute; left: 0; top: 18%; bottom: 18%; width: 1px; background: var(--line); }
.site-nav a { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 6px 12px; color: var(--ink); text-align: center; font-size: .9rem; line-height: 1.25; text-decoration: none; transition: background .2s; min-height: 128px; }
.site-nav a:hover { background: #f7f9fc; }
.site-nav a.active { background: linear-gradient(#fff, #f2f6fb); }
.site-nav a.active::after { content: ""; position: absolute; left: 22%; right: 22%; bottom: 0; height: 3px; border-radius: 3px 3px 0 0; background: var(--ic); }
.nav-ic { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: var(--ic); color: #fff; box-shadow: inset 0 -4px 0 rgba(0,0,0,.08), 0 3px 8px rgba(0,0,0,.12); transition: transform .2s; flex-shrink: 0; }
.site-nav a:hover .nav-ic { transform: translateY(-2px) scale(1.04); }
.nav-ic svg { width: 32px; height: 32px; }
.nav-ic .txt { font-weight: 600; font-size: .95rem; letter-spacing: .01em; }
.nav-ic .txt.sm { font-size: .82rem; }

@media (max-width: 960px) {
  .site-nav ul { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
  .site-nav ul::-webkit-scrollbar { display: none; }
  .site-nav li { flex: 0 0 104px; scroll-snap-align: start; }
  .site-nav a { min-height: 102px; font-size: .78rem; padding: 10px 4px; }
  .nav-ic { width: 48px; height: 48px; }
  .nav-ic svg { width: 24px; height: 24px; }
  .nav-ic .txt { font-size: .74rem; }
  .nav-ic .txt.sm { font-size: .68rem; }
  .topbar .hide-sm { display: none; }
}

/* ---------------- Hero (trang chủ) ---------------- */
.hero { position: relative; overflow: hidden; background: #dfe9df url(../img/hero-bg.jpg) center/cover; min-height: 660px; }
.hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(255,255,255,.82) 0%, rgba(255,255,255,.55) 45%, rgba(255,255,255,0) 70%); }
.hero .container { position: relative; display: grid; grid-template-columns: 1.2fr .8fr; align-items: end; min-height: 660px; }
.hero-text { align-self: start; padding: 64px 0 250px; position: relative; z-index: 3; }
.hero-quote { font-family: var(--serif); color: var(--navy); font-size: clamp(1.35rem, 2.05vw, 2.05rem); line-height: 1.6; margin: 0 0 18px; font-weight: 400; }
.hero-quote.en { font-style: italic; color: var(--navy-2); }
.hero-photo { position: relative; align-self: end; justify-self: end; height: 100%; display: flex; align-items: end; }
.hero-photo img { height: 660px; width: auto; object-fit: cover; object-position: left bottom; -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 18%); mask-image: linear-gradient(90deg, transparent 0, #000 18%); }
.hero-name { z-index: 3; position: absolute; right: 18px; bottom: 18px; font-size: 1.15rem; color: var(--navy); font-weight: 500; background: rgba(255,255,255,.7); padding: 2px 10px; border-radius: 8px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 26px; }

.books { position: absolute; left: 0; bottom: 34px; display: flex; flex-direction: column-reverse; gap: 2px; z-index: 2; }
.book { height: 44px; display: flex; align-items: center; padding-left: 44px; color: #f4f1e6; font-family: var(--serif); font-size: 1.12rem; letter-spacing: .03em; border-radius: 0 4px 4px 0; box-shadow: inset 0 3px 0 rgba(255,255,255,.12), inset 0 -4px 0 rgba(0,0,0,.18), 0 2px 4px rgba(0,0,0,.2); position: relative; text-decoration: none; }
.book::before { content: ""; position: absolute; left: 0; top: 4px; bottom: 4px; width: 28px; background: repeating-linear-gradient(#f4efe2 0 2px, #e2dccb 2px 3px); border-radius: 0 0 0 2px; }
.book::after { content: ""; position: absolute; right: 0; top: 0; bottom: 0; width: 40px; background: rgba(255,255,255,.2); border-radius: 0 4px 4px 0; }
.book:hover { text-decoration: none; filter: brightness(1.08); }
.book.lang { background: var(--book-lang); width: 372px; }
.book.edu { background: var(--book-edu); width: 362px; }
.book.research { background: var(--book-research); width: 340px; }
.book.music { background: var(--book-music); width: 326px; }
.hero-base { position: absolute; left: 0; right: 0; bottom: 0; height: 36px; background: linear-gradient(#e7e4dc, #d8d4ca); z-index: 1; }

@media (max-width: 860px) {
  .hero, .hero .container { min-height: auto; }
  .hero .container { grid-template-columns: 1fr; }
  .hero-text { padding: 36px 0 12px; }
  .hero-photo { justify-self: center; }
  .hero-photo img { height: 380px; -webkit-mask-image: none; mask-image: none; }
  .books { position: relative; bottom: auto; margin-top: 8px; }
  .book { height: 34px; font-size: .95rem; }
  .book.lang { width: 260px; } .book.edu { width: 252px; } .book.research { width: 240px; } .book.music { width: 230px; }
  .hero::before { background: rgba(255,255,255,.7); }
  .hero-base { display: none; }
}

/* ---------------- Page banner ---------------- */
.page-banner { position: relative; background: #dfe9df url(../img/hero-bg.jpg) center/cover; overflow: hidden; }
.page-banner::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(255,255,255,.9), rgba(255,255,255,.65) 60%, rgba(255,255,255,.35)); }
.page-banner .container { position: relative; padding: 44px 0 40px; display: flex; gap: 22px; align-items: center; }
.page-banner .nav-ic { width: 76px; height: 76px; background: var(--accent); }
.page-banner .nav-ic svg { width: 38px; height: 38px; }
.page-banner h1 { font-size: clamp(1.6rem, 3vw, 2.4rem); margin: 0 0 4px; }
.page-banner p { margin: 0; color: var(--muted); max-width: 760px; }
.crumbs { font-size: .82rem; color: var(--muted); margin-bottom: 6px; }
.crumbs a { color: var(--muted); }
.crumbs span { margin: 0 6px; opacity: .6; }

/* ---------------- Buttons, badges ---------------- */
.btn { --b: var(--accent); display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--b); color: #fff; border: 1px solid var(--b); padding: 10px 20px; border-radius: 999px; font: 600 .92rem var(--sans); cursor: pointer; text-decoration: none; transition: filter .2s, transform .1s; }
.btn:hover { filter: brightness(1.08); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn.ghost { background: transparent; color: var(--b); }
.btn.white { background: #fff; color: var(--navy); border-color: #fff; }
.btn.sm { padding: 6px 14px; font-size: .84rem; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.badge { display: inline-flex; align-items: center; gap: 4px; font-size: .74rem; font-weight: 600; padding: 2px 10px; border-radius: 999px; background: var(--soft); color: var(--navy-2); white-space: nowrap; }
.badge.red { background: #fdecec; color: #c62828; }
.badge.green { background: #e6f6ee; color: #18794a; }
.badge.orange { background: #fff1e8; color: #c2410c; }
.badge.purple { background: #f4e9f8; color: #7b1fa2; }
.badge.gold { background: #fff6dc; color: #8a6200; }

/* ---------------- Cards & grids ---------------- */
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; }
.card.flat { box-shadow: none; }
.card h3 { margin-top: 0; }
.grid { display: grid; gap: 20px; }
.g2 { grid-template-columns: repeat(2, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 980px) { .g4 { grid-template-columns: repeat(2, 1fr); } .g3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .g2, .g3, .g4 { grid-template-columns: 1fr; } }

.feature { display: flex; flex-direction: column; gap: 10px; text-decoration: none; color: inherit; transition: transform .2s, box-shadow .2s; border-top: 4px solid var(--fc, var(--accent)); }
a.feature:hover { transform: translateY(-3px); text-decoration: none; box-shadow: 0 10px 30px rgba(20,40,80,.12); }
.feature .nav-ic { width: 52px; height: 52px; background: var(--fc, var(--accent)); }
.feature .nav-ic svg { width: 26px; height: 26px; }
.feature ul { margin: 0; padding-left: 18px; color: var(--muted); font-size: .9rem; }
.feature .more { margin-top: auto; font-weight: 600; color: var(--fc, var(--accent)); font-size: .9rem; }

.stat { text-align: center; }
.stat b { display: block; font-family: var(--serif); font-size: 2rem; color: var(--navy); }

/* ---------------- Media slots ---------------- */
.media-slot { position: relative; border-radius: 12px; overflow: hidden; background: linear-gradient(135deg, #2a4570, #1b2f4e); color: #cfe0f5; aspect-ratio: 16/9; display: grid; place-items: center; text-align: center; }
.media-slot .play { width: 68px; height: 68px; border-radius: 50%; background: rgba(255,255,255,.95); display: grid; place-items: center; margin: 0 auto 10px; box-shadow: 0 6px 20px rgba(0,0,0,.25); cursor: pointer; }
.media-slot .play::after { content: ""; border-left: 20px solid var(--navy); border-top: 12px solid transparent; border-bottom: 12px solid transparent; margin-left: 5px; }
.media-slot .cap { font-size: .85rem; }
.media-slot .tag { position: absolute; top: 10px; left: 10px; background: rgba(0,0,0,.35); color: #fff; font-size: .72rem; padding: 2px 8px; border-radius: 6px; }
.img-slot { border-radius: 12px; aspect-ratio: 4/3; background: repeating-linear-gradient(45deg, #eef2f7 0 12px, #e6ebf2 12px 24px); border: 2px dashed #c7d2e0; display: grid; place-items: center; color: var(--muted); font-size: .85rem; text-align: center; padding: 10px; }
.img-slot svg { width: 34px; height: 34px; margin: 0 auto 6px; opacity: .6; }

.audio { display: flex; align-items: center; gap: 12px; background: var(--soft); border-radius: 999px; padding: 6px 16px 6px 6px; }
.audio button { width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--accent); color: #fff; cursor: pointer; display: grid; place-items: center; flex-shrink: 0; }
.audio .bar { flex: 1; height: 4px; background: #cdd8e6; border-radius: 4px; position: relative; overflow: hidden; }
.audio .bar i { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--accent); transition: width .3s linear; }
.audio .t { font-size: .78rem; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ---------------- Split panels (2 ô) ---------------- */
.split { display: grid; grid-template-columns: 340px 1fr; gap: 20px; align-items: start; }
.split.half { grid-template-columns: 1fr 1fr; }
@media (max-width: 900px) { .split, .split.half { grid-template-columns: 1fr; } }
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.panel-head { padding: 14px 18px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 10px; background: #fbfcfe; }
.panel-head h3 { margin: 0; font-size: 1rem; }
.panel-body { padding: 18px; }

.catalog { list-style: none; margin: 0; padding: 6px; max-height: 640px; overflow: auto; }
.catalog li { padding: 12px 14px; border-radius: 10px; cursor: pointer; display: flex; gap: 12px; align-items: flex-start; border: 1px solid transparent; }
.catalog li:hover { background: #f5f8fc; }
.catalog li.active { background: color-mix(in srgb, var(--accent) 8%, #fff); border-color: color-mix(in srgb, var(--accent) 30%, #fff); }
.catalog .num { width: 30px; height: 30px; border-radius: 8px; background: var(--soft); color: var(--navy); font-weight: 700; font-size: .82rem; display: grid; place-items: center; flex-shrink: 0; }
.catalog li.active .num { background: var(--accent); color: #fff; }
.catalog b { display: block; font-size: .93rem; line-height: 1.35; color: var(--ink); }
.catalog small { color: var(--muted); }
.search { width: 100%; padding: 9px 14px; border: 1px solid var(--line); border-radius: 999px; font: inherit; background: #fff; }

/* sheet music */
.sheet { background: #fffdf7; border: 1px solid #ece4cf; border-radius: 6px; padding: 26px 24px; box-shadow: inset 0 0 40px rgba(180,150,80,.06); }
.sheet h4 { font-family: var(--serif); text-align: center; font-size: 1.3rem; margin: 0; color: #2b2b2b; }
.sheet .composer { text-align: right; font-family: var(--serif); font-style: italic; color: #444; font-size: .9rem; margin-bottom: 8px; }
.sheet svg { width: 100%; height: auto; }

/* pdf viewer */
.pdf { background: #525659; border-radius: 0 0 var(--radius) var(--radius); padding: 22px; max-height: 760px; overflow: auto; }
.pdf-bar { display: flex; align-items: center; gap: 10px; background: #323639; color: #f1f1f1; padding: 8px 14px; font-size: .85rem; flex-wrap: wrap; }
.pdf-bar .sp { flex: 1; }
.pdf-bar button { background: transparent; border: 1px solid #5a5f63; color: #fff; border-radius: 6px; padding: 3px 10px; cursor: pointer; font: inherit; }
.pdf-page { background: #fff; width: min(720px, 100%); margin: 0 auto 18px; padding: 56px 60px; box-shadow: 0 4px 18px rgba(0,0,0,.35); font-family: var(--serif); color: #222; font-size: .95rem; line-height: 1.7; transform-origin: top center; }
.pdf-page h2 { color: #111; text-align: center; font-size: 1.35rem; }
.pdf-page .authors { text-align: center; font-style: italic; margin-bottom: 18px; }
.pdf-page .abs { background: #f7f7f7; padding: 12px 16px; border-left: 3px solid #888; font-size: .9rem; margin-bottom: 18px; }
@media (max-width: 640px) { .pdf { padding: 10px; } .pdf-page { padding: 28px 22px; } }

/* ---------------- Tabs ---------------- */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin-bottom: 22px; }
.tab-btn { background: none; border: 0; padding: 12px 16px; font: 600 .93rem var(--sans); color: var(--muted); cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.tab-btn:hover { color: var(--ink); }
.tab-btn.active { color: var(--accent); border-bottom-color: var(--accent); }
.tab-panel { display: none; }
.tab-panel.active { display: block; animation: fade .25s; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.pills { display: flex; gap: 8px; flex-wrap: wrap; }
.pill { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 14px; font: 500 .87rem var(--sans); cursor: pointer; color: var(--ink); }
.pill.active, .pill:hover { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ---------------- Side menu (học liệu) ---------------- */
.layout-side { display: grid; grid-template-columns: 270px 1fr; gap: 24px; align-items: start; }
@media (max-width: 900px) { .layout-side { grid-template-columns: 1fr; } }
.side { position: sticky; top: 150px; }
.side h4 { font-size: .75rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin: 16px 12px 6px; }
.side a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px; color: var(--ink); font-size: .92rem; }
.side a:hover { background: #f1f5fa; text-decoration: none; }
.side a.active { background: var(--accent); color: #fff; }
.side .dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; opacity: .5; }

/* ---------------- Quiz ---------------- */
.quiz { display: flex; flex-direction: column; gap: 14px; }
.q { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; }
.q .qt { font-weight: 600; margin-bottom: 10px; }
.q .qt .qn { display: inline-grid; place-items: center; min-width: 26px; height: 26px; border-radius: 7px; background: var(--soft); color: var(--navy); font-size: .8rem; margin-right: 8px; }
.q label.opt { display: flex; gap: 10px; align-items: center; padding: 8px 12px; border: 1px solid var(--line); border-radius: 9px; margin: 6px 0; cursor: pointer; }
.q label.opt:hover { background: #f8fafd; }
.q label.opt input { accent-color: var(--accent); }
.q input.blank, .q select.blank { border: 0; border-bottom: 2px solid #9fb2cc; background: #f6f9fd; padding: 3px 8px; font: inherit; min-width: 110px; border-radius: 4px 4px 0 0; color: var(--navy); }
.q textarea { width: 100%; min-height: 110px; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font: inherit; resize: vertical; }
.q .explain { display: none; margin-top: 10px; font-size: .9rem; padding: 10px 14px; border-radius: 10px; background: #f3f7fc; border-left: 4px solid var(--navy-2); }
.q.graded .explain { display: block; }
.q.correct { border-color: #9bd8b6; background: #fbfffc; }
.q.correct .explain { background: #eaf8f0; border-left-color: var(--ok); }
.q.wrong { border-color: #f1b3b3; background: #fffbfb; }
.q.wrong .explain { background: #fdeeee; border-left-color: var(--bad); }
.q label.opt.is-right { border-color: var(--ok); background: #eaf8f0; }
.q label.opt.is-wrong { border-color: var(--bad); background: #fdeeee; }
.q input.blank.ok { border-bottom-color: var(--ok); background: #eaf8f0; }
.q input.blank.no { border-bottom-color: var(--bad); background: #fdeeee; }
.quiz-foot { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; position: sticky; bottom: 0; background: rgba(245,247,250,.95); backdrop-filter: blur(6px); padding: 12px 0; }
.score { display: none; align-items: center; gap: 12px; font-weight: 600; }
.score.show { display: flex; }
.score .ring { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--ok) calc(var(--p) * 1%), #e3e8ef 0); }
.score .ring span { width: 42px; height: 42px; background: #fff; border-radius: 50%; display: grid; place-items: center; font-size: .8rem; }

/* theory block */
.theory { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 22px 24px; }
.theory h3 { font-family: var(--serif); font-size: 1.25rem; }
.formula { background: #f3f7fc; border-radius: 10px; padding: 12px 16px; font-family: ui-monospace, Menlo, monospace; font-size: .9rem; margin: 10px 0; color: var(--navy); }
.note { background: #fff8e6; border: 1px solid #f3dfa6; border-radius: 10px; padding: 10px 14px; font-size: .9rem; }

/* vocabulary */
.vocab { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.word { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.word .w { font-family: var(--serif); font-size: 1.2rem; color: var(--navy); font-weight: 600; display: flex; justify-content: space-between; align-items: center; }
.word .ipa { color: var(--c-ielts); font-size: .9rem; }
.word .pos { font-size: .75rem; color: var(--muted); font-style: italic; }
.word .vi { font-size: .9rem; margin-top: 4px; }
.word .ex { font-size: .84rem; color: var(--muted); font-style: italic; margin-top: 4px; }
.speak { width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line); background: #fff; cursor: pointer; display: grid; place-items: center; color: var(--accent); flex-shrink: 0; }
.speak:hover { background: var(--accent); color: #fff; }
.speak svg { width: 16px; height: 16px; }

/* course cards */
.course { display: flex; flex-direction: column; gap: 10px; position: relative; }
.course .cover { aspect-ratio: 16/8; border-radius: 10px; background: linear-gradient(135deg, var(--cc, var(--accent)), color-mix(in srgb, var(--cc, var(--accent)) 55%, #000)); color: #fff; padding: 14px 16px; display: flex; flex-direction: column; justify-content: space-between; font-family: var(--serif); }
.course .cover b { font-size: 1.15rem; }
.course .meta { display: flex; gap: 12px; font-size: .82rem; color: var(--muted); flex-wrap: wrap; }
.course .lock { position: absolute; top: 30px; right: 30px; background: rgba(255,255,255,.95); color: var(--navy); border-radius: 999px; padding: 3px 10px; font-size: .75rem; font-weight: 700; }
.course .actions { display: flex; gap: 8px; margin-top: auto; }

/* type list (dạng bài) */
.types { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.type { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 16px; display: flex; gap: 14px; align-items: flex-start; transition: border-color .2s, transform .2s; }
.type:hover { border-color: var(--accent); transform: translateY(-2px); }
.type .n { width: 36px; height: 36px; border-radius: 10px; background: color-mix(in srgb, var(--accent) 12%, #fff); color: var(--accent); font-weight: 700; display: grid; place-items: center; flex-shrink: 0; }
.type .thumb { width: 64px; height: 48px; flex-shrink: 0; border-radius: 8px; background: #f3f7fc; display: grid; place-items: center; }
.type .thumb svg { width: 52px; height: 38px; }
.type b { display: block; color: var(--navy); }
.type p { margin: 2px 0 8px; font-size: .86rem; color: var(--muted); }
.type .lk { font-size: .82rem; display: flex; gap: 10px; flex-wrap: wrap; }
.group-title { display: flex; align-items: center; gap: 10px; margin: 26px 0 12px; }
.group-title h3 { margin: 0; }
.group-title::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* ---------------- Forms ---------------- */
.form { display: grid; gap: 14px; }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 640px) { .form .row { grid-template-columns: 1fr; } }
.field label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: 5px; color: var(--navy); }
.field input, .field select, .field textarea { width: 100%; padding: 11px 14px; border: 1px solid #d5dde8; border-radius: 10px; font: inherit; background: #fff; color: var(--ink); }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid color-mix(in srgb, var(--accent) 35%, transparent); border-color: var(--accent); }
.checks { display: flex; flex-wrap: wrap; gap: 8px; }
.checks label { display: flex; gap: 6px; align-items: center; border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; font-size: .88rem; cursor: pointer; background: #fff; }

/* ---------------- Table ---------------- */
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; background: #fff; font-size: .9rem; }
.tbl th, .tbl td { padding: 11px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.tbl th { background: #f6f8fb; font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.tbl tr:hover td { background: #fafcfe; }

/* ---------------- Modal & toast ---------------- */
.modal { position: fixed; inset: 0; background: rgba(15,30,55,.55); display: none; place-items: center; z-index: 100; padding: 16px; }
.modal.open { display: grid; animation: fade .2s; }
.modal-box { background: #fff; border-radius: 18px; width: min(460px, 100%); padding: 28px; box-shadow: 0 30px 80px rgba(0,0,0,.3); position: relative; }
.modal-box.wide { width: min(760px, 100%); max-height: 90vh; overflow: auto; }
.modal-x { position: absolute; top: 12px; right: 12px; width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--soft); cursor: pointer; font-size: 1.2rem; color: var(--navy); }
.code-input { width: 100%; text-align: center; font: 700 1.3rem ui-monospace, Menlo, monospace; letter-spacing: .14em; padding: 12px; border: 2px dashed #b9c7da; border-radius: 12px; text-transform: uppercase; margin: 14px 0; }
.toast { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%) translateY(30px); background: var(--navy); color: #fff; padding: 12px 22px; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.25); opacity: 0; transition: .3s; z-index: 200; font-size: .92rem; max-width: calc(100% - 32px); }
.toast.show { opacity: 1; transform: translateX(-50%); }

/* ---------------- Documents (tài liệu) ---------------- */
.doc .cover { aspect-ratio: 3/4; border-radius: 6px 10px 10px 6px; padding: 18px 16px; color: #fff; font-family: var(--serif); display: flex; flex-direction: column; justify-content: space-between; background: linear-gradient(160deg, var(--dc), color-mix(in srgb, var(--dc) 50%, #000)); box-shadow: inset 8px 0 0 rgba(0,0,0,.15), 0 6px 14px rgba(0,0,0,.18); }
.doc .cover b { font-size: 1.2rem; line-height: 1.3; }
.doc .cover small { opacity: .85; font-family: var(--sans); }
.doc .note-txt { font-size: .86rem; color: var(--muted); margin: 10px 0; border-top: 1px dashed var(--line); padding-top: 10px; }
.doc .price { font-family: var(--serif); font-size: 1.25rem; color: var(--c-ielts); font-weight: 700; }
.preview-pages { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 640px) { .preview-pages { grid-template-columns: 1fr 1fr; } }
.ppage { aspect-ratio: 3/4; background: #fff; border: 1px solid var(--line); box-shadow: 0 3px 10px rgba(0,0,0,.08); padding: 14px; font-size: .62rem; line-height: 1.5; overflow: hidden; position: relative; font-family: var(--serif); }
.ppage h5 { font-size: .8rem; margin: 0 0 6px; color: var(--navy); }
.ppage .ln { height: 5px; background: #e8edf3; border-radius: 3px; margin: 5px 0; }
.ppage .lbl { position: absolute; bottom: 6px; right: 8px; font-family: var(--sans); color: var(--muted); }
.ppage.locked::after { content: "🔒 Mua để xem toàn bộ"; position: absolute; inset: 0; display: grid; place-items: center; background: rgba(255,255,255,.75); backdrop-filter: blur(3px); font-family: var(--sans); font-size: .8rem; color: var(--navy); font-weight: 600; }
.qr { width: 180px; height: 180px; background: #fff; padding: 10px; border: 1px solid var(--line); border-radius: 12px; }
.bank { background: linear-gradient(135deg, #1d3a66, #2c5aa0); color: #fff; border-radius: 14px; padding: 18px 20px; }
.bank .acc { font: 700 1.35rem ui-monospace, Menlo, monospace; letter-spacing: .08em; }

/* ---------------- CBT exam ---------------- */
.exam-top { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 60; }
.exam-top .container { display: flex; align-items: center; gap: 16px; min-height: 60px; flex-wrap: wrap; }
.timer { font: 700 1.3rem ui-monospace, Menlo, monospace; color: var(--navy); background: var(--soft); padding: 4px 14px; border-radius: 10px; }
.timer.low { color: #fff; background: var(--bad); }
.exam-body { display: grid; grid-template-columns: 1fr 1fr; height: calc(100vh - 60px - 64px); }
.exam-body > div { overflow: auto; padding: 24px 28px; }
.exam-body .passage { background: #fff; border-right: 1px solid var(--line); font-family: var(--serif); line-height: 1.8; }
.exam-body .passage p b.pl { font-family: var(--sans); color: var(--c-ielts); margin-right: 6px; }
@media (max-width: 860px) { .exam-body { grid-template-columns: 1fr; height: auto; } }
.qnav { background: #fff; border-top: 1px solid var(--line); position: sticky; bottom: 0; z-index: 60; }
.qnav .container { display: flex; align-items: center; gap: 6px; min-height: 64px; overflow-x: auto; }
.qnav button.qb { width: 34px; height: 34px; flex-shrink: 0; border-radius: 8px; border: 1px solid #cfd8e4; background: #fff; font: 600 .82rem var(--sans); cursor: pointer; color: var(--ink); }
.qnav button.qb.done { background: var(--navy); color: #fff; border-color: var(--navy); }
.qnav button.qb.flag { box-shadow: inset 0 -3px 0 var(--warn); }

/* ---------------- Footer ---------------- */
.site-footer { background: #15294a; color: #b8c7dd; padding: 48px 0 20px; margin-top: 40px; font-size: .9rem; }
.site-footer h4 { color: #fff; font-family: var(--serif); font-weight: 600; }
.site-footer a { color: #d7e3f4; }
.site-footer .cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 28px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.site-footer .copy { border-top: 1px solid rgba(255,255,255,.12); margin-top: 32px; padding-top: 16px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; font-size: .82rem; }
@media (max-width: 800px) { .site-footer .cols { grid-template-columns: 1fr 1fr; } }

/* utility */
.mt0 { margin-top: 0; } .mt1 { margin-top: 10px; } .mt2 { margin-top: 20px; } .mt3 { margin-top: 32px; }
.mb0 { margin-bottom: 0; } .mb2 { margin-bottom: 20px; }
.flex { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.between { justify-content: space-between; }
.stack > * + * { margin-top: 14px; }
.divider { height: 1px; background: var(--line); margin: 22px 0; }
.quote-band { background: var(--navy); color: #fff; text-align: center; padding: 50px 0; font-family: var(--serif); }
.quote-band p { font-size: clamp(1.15rem, 2vw, 1.5rem); font-style: italic; max-width: 820px; margin: 0 auto 8px; }
.timeline { border-left: 2px solid var(--line); padding-left: 22px; display: grid; gap: 18px; }
.timeline > div { position: relative; }
.timeline > div::before { content: ""; position: absolute; left: -29px; top: 6px; width: 12px; height: 12px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px #fff; }
.timeline b { color: var(--navy); }
:root { --c-home: var(--navy); }
.cta-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 28px; align-items: center; }
@media (max-width: 800px) { .cta-grid { grid-template-columns: 1fr; } }
.topbar .actions > * { white-space: nowrap; }
.show-sm { display: none; }
@media (max-width: 960px) { .topbar .show-sm { display: inline; } }
