/* Học Lái Nhanh — Design System (chàm–tím cao cấp, Plus Jakarta Sans) */
:root {
  --primary: #4f46e5;
  --primary-dark: #4338ca;
  --primary-light: #eef2ff;
  --primary-gradient: linear-gradient(135deg, #6366f1 0%, #4f46e5 46%, #7c3aed 100%);
  --accent: #f59e0b;
  --accent-dark: #d97706;
  --accent-soft: #fef3c7;
  --danger: #ef4444;
  --success: #16a34a;
  --bg: #f6f7fc;
  --bg-card: #ffffff;
  --bg-hero: #4f46e5;
  --bg-topbar: #fbfbfe;
  --text: #1f2033;
  --text-light: #6b7190;
  --text-inv: #ffffff;
  --navy: #1e1b4b;
  --ink: #17153a;
  --border: #e7e7f3;
  --border-accent: rgba(79, 70, 229, 0.34);
  --radius: 22px;
  --shadow: rgba(79, 70, 229, 0.08) 0px 14px 34px -8px;
  --shadow-featured: rgba(79, 70, 229, 0.18) 0px 16px 36px -10px;
  --shadow-nav: rgba(49, 46, 129, 0.18) 0px 14px 38px -6px;
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --max-w: 520px;
  --bottom-h: 68px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e0c1b;
    --bg-card: #1a1734;
    --bg-hero: #4338ca;
    --bg-topbar: #141028;
    --text: #e8e7f5;
    --text-light: #9c98c6;
    --text-inv: #ffffff;
    --navy: #c7d2fe;
    --border: #2a2550;
    --border-accent: rgba(129, 140, 248, 0.42);
    --primary: #818cf8;
    --primary-light: #1e1b42;
    --primary-gradient: linear-gradient(135deg, #6366f1 0%, #4f46e5 50%, #6d28d9 100%);
    --accent-soft: #3a2f10;
    --success: #22c55e;
    --shadow: rgba(0, 0, 0, 0.35) 0px 10px 28px;
    --shadow-featured: rgba(0, 0, 0, 0.45) 0px 14px 32px;
    --shadow-nav: rgba(0, 0, 0, 0.5) 0px 10px 30px;
  }
}
:root[data-theme="dark"] {
  --bg: #0e0c1b;
  --bg-card: #1a1734;
  --bg-hero: #4338ca;
  --bg-topbar: #141028;
  --text: #e8e7f5;
  --text-light: #9c98c6;
  --text-inv: #ffffff;
  --navy: #c7d2fe;
  --border: #2a2550;
  --border-accent: rgba(129, 140, 248, 0.42);
  --primary: #818cf8;
  --primary-light: #1e1b42;
  --primary-gradient: linear-gradient(135deg, #6366f1 0%, #4f46e5 50%, #6d28d9 100%);
  --accent-soft: #3a2f10;
  --success: #22c55e;
  --shadow: rgba(0, 0, 0, 0.35) 0px 10px 28px;
  --shadow-featured: rgba(0, 0, 0, 0.45) 0px 14px 32px;
  --shadow-nav: rgba(0, 0, 0, 0.5) 0px 10px 30px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  /* Chua thanh dieu huong + vung an toan dưới (home indicator iPhone) */
  padding-bottom: calc(var(--bottom-h) + env(safe-area-inset-bottom, 0px));
  overscroll-behavior-y: none;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }

/* Cot ung dung kieu dien thoai — can giua tren moi man hinh */
#main-content { max-width: var(--max-w); margin: 0 auto; width: 100%; }
.footer { max-width: var(--max-w); margin-left: auto; margin-right: auto; }

/* Tren man hinh rong: nen gradient + cot app can giua nhu app dien thoai */
@media (min-width: 560px) {
  body {
    background:
      radial-gradient(1200px 600px at 50% -10%, rgba(0,143,128,.10), transparent 60%),
      var(--bg);
  }
  #main-content, .footer {
    box-shadow: rgba(8, 127, 117, 0.10) 0px 20px 60px -20px;
  }
  .top-bar { box-shadow: rgba(8, 127, 117, 0.06) 0px 8px 24px -16px; }
}

/* Layout */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 16px; }
.grid { display: grid; gap: 14px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(2, 1fr); }
.grid-4 { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }

/* ===== TOP HEADER ===== */
.top-bar {
  background: var(--bg-topbar);
  padding-top: env(safe-area-inset-top, 0px);
  position: sticky; top: 0; z-index: 100;
  border-bottom: 0.8px solid var(--border);
}
.top-bar-inner {
  max-width: var(--max-w); margin: 0 auto; width: 100%;
  display: grid; grid-template-columns: 40px 1fr 40px;
  align-items: center; gap: 8px;
  min-height: 64px; padding: 10px 14px;
}
.top-bar .logo {
  display: inline-flex; align-items: center; gap: 10px;
  text-decoration: none; justify-self: center;
}
.top-bar .logo-icon {
  width: 32px; height: 32px;
  border-radius: 26%;
  background: linear-gradient(145deg, #818cf8, #4338ca);
  box-shadow: inset 0 1px 1.5px rgba(255,255,255,.4), 0 6px 16px -6px rgba (49,46,129,.45);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.top-bar .logo-text {
  font-size: 1.1rem; font-weight: 900; color: var(--navy);
  letter-spacing: -.3px; line-height: 1;
}
.theme-toggle {
  background: rgba(255,255,255,.78); border: 0.8px solid rgba(220,236,235,.8);
  color: #006c65;
  width: 40px; height: 40px; border-radius: 50%; cursor: pointer;
  font-size: 1.1rem; display: flex; align-items: center; justify-content: center;
  transition: all .2s;
  box-shadow: 0 8px 20px rgba(0,82,76,.08);
}
.theme-toggle:hover { border-color: var(--primary); color: var(--primary); }

/* ===== HERO (thithu.app style) ===== */
.hero {
  background: var(--primary-gradient);
  color: #fff;
  padding: 32px 20px 40px;
  position: relative; overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; right: -60px; top: -60px;
  width: 200px; height: 200px; border-radius: 50%;
  background: rgba(255,255,255,.06);
}
.hero::after {
  content: ''; position: absolute; left: -40px; bottom: -40px;
  width: 140px; height: 140px; border-radius: 50%;
  background: rgba(255,255,255,.04);
}
.hero-copy { position: relative; z-index: 2; }
.hero-eyebrow {
  display: inline-block; font-size: .68rem; font-weight: 700;
  letter-spacing: 1.2px; text-transform: uppercase;
  background: rgba(255,255,255,.15); padding: 4px 14px;
  border-radius: 999px; margin-bottom: 16px;
  color: rgba(255,255,255,.9);
}
.hero h1 {
  font-size: clamp(1.5rem, 5vw, 2.2rem); font-weight: 900;
  line-height: 1.2; margin-bottom: 10px;
}
.hero-summary {
  font-size: .88rem; opacity: .8; margin-bottom: 20px;
}
.hero-summary span { margin: 0 4px; opacity: .5; }
.hero-badges {
  display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 22px;
}
.hero-badges span {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,.15); backdrop-filter: blur(4px);
  padding: 6px 14px; border-radius: 999px;
  font-size: .78rem; font-weight: 600;
}
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.hero-primary {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 28px; border-radius: 999px;
  background: #fff; color: var(--ink); font-weight: 800;
  font-size: .95rem; text-decoration: none;
  box-shadow: 0 8px 20px rgba(0,0,0,.12);
  transition: all .2s;
}
.hero-primary:hover { transform: translateY(-2px); text-decoration: none; box-shadow: 0 12px 28px rgba(0,0,0,.18); }
.hero-secondary {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 28px; border-radius: 999px;
  background: rgba(255,255,255,.12); color: #fff;
  border: 1.5px solid rgba(255,255,255,.35);
  font-weight: 700; font-size: .95rem; text-decoration: none;
  backdrop-filter: blur(4px); transition: all .2s;
}
.hero-secondary:hover { background: rgba(255,255,255,.2); border-color: #fff; text-decoration: none; }
.hero-encouragement {
  position: absolute; right: 16px; bottom: 18px;
  font-size: 1rem; font-weight: 900; line-height: 1.15;
  opacity: .15; text-align: right; z-index: 1;
  font-style: italic;
}

/* ===== INSTALL BANNER ===== */
.install-banner {
  display: flex; align-items: center; gap: 14px;
  background: var(--bg-card); border: 0.8px solid var(--border);
  border-radius: 22px; padding: 16px 18px;
  margin: 16px 12px; cursor: pointer;
  box-shadow: var(--shadow); transition: all .2s;
  text-align: left; width: calc(100% - 24px);
  font-family: var(--font);
}
.install-banner:hover { box-shadow: var(--shadow-featured); border-color: var(--border-accent); }
.install-icon { font-size: 2rem; flex-shrink: 0; }
.install-copy { flex: 1; min-width: 0; }
.install-copy h2 { font-size: .88rem; font-weight: 800; color: var(--navy); margin: 0; }
.install-copy p { font-size: .72rem; color: var(--text-light); margin: 2px 0 0; }
.install-action {
  flex-shrink: 0; font-size: .78rem; font-weight: 700;
  color: var(--primary); white-space: nowrap;
}

/* ===== LICENSE SECTION ===== */
.license-section { padding: 20px 12px 8px; }
.section-heading-row {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 16px; padding: 0 4px;
}
.section-heading-row h2 {
  font-size: 1.15rem; font-weight: 900; color: var(--navy);
}
.inline-action {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: .8rem; font-weight: 700; color: var(--primary);
  text-decoration: none;
}
.inline-action:hover { text-decoration: none; opacity: .8; }
.license-grid {
  display: flex; gap: 10px; flex-wrap: wrap;
}
.license-btn {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 14px 16px; min-width: 72px;
  background: var(--bg-card); border: 0.8px solid var(--border);
  border-radius: 18px; text-decoration: none; color: var(--primary);
  box-shadow: var(--shadow); transition: all .2s;
  flex: 1;
}
.license-btn:hover { border-color: var(--primary); box-shadow: var(--shadow-featured); text-decoration: none; transform: translateY(-2px); }
.license-btn strong { font-size: .9rem; font-weight: 800; color: var(--navy); }
/* Chip nhieu mau -> trang thai chon dung VIEN + nen mo, giu chip ro mau */
.license-btn-active {
  border-color: var(--primary); border-width: 2px;
  background: var(--primary-light);
  box-shadow: var(--shadow-featured);
}
.license-btn-active strong { color: var(--primary); }

/* ===== FOCUS SECTION ===== */
.focus-section { padding: 24px 12px; }
.section-heading-stack { margin-bottom: 18px; padding: 0 4px; }
.section-heading-stack h2 {
  font-size: 1.15rem; font-weight: 900; color: var(--navy); margin-bottom: 4px;
}
.section-heading-stack p {
  font-size: .82rem; color: var(--text-light);
}
.focus-grid {
  display: grid; gap: 12px;
  grid-template-columns: 1fr 1fr;
}

/* Featured primary (600 cau) — spans 2 cols */
.focus-card {
  background: var(--bg-card);
  border: 0.8px solid var(--border);
  border-radius: 22px;
  text-decoration: none; color: inherit;
  box-shadow: var(--shadow); transition: all .2s;
  position: relative; overflow: hidden;
}
.focus-card:hover {
  box-shadow: var(--shadow-featured); transform: translateY(-2px);
  text-decoration: none; border-color: var(--border-accent);
}
.featured-primary {
  grid-column: 1 / -1;
  padding: 24px 20px 16px;
  display: flex; flex-direction: column;
  border-color: var(--border-accent);
  box-shadow: var(--shadow-featured);
  background: linear-gradient(135deg, rgba(0,143,128,.06) 0%, rgba(0,143,128,.02) 100%);
  min-height: 160px;
}
.focus-primary-content h3 {
  font-size: 1.2rem; font-weight: 900; color: var(--navy); margin-bottom: 4px;
}
.focus-primary-content p {
  font-size: .82rem; color: var(--text-light);
}
.focus-primary-icon {
  position: absolute; right: 16px; bottom: 44px;
}
.focus-primary-book { width: 84px; height: 84px; border-radius: 20px;
  box-shadow: var(--shadow-featured); }
.focus-featured-action {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .85rem; font-weight: 700; color: var(--primary);
  margin-top: auto; padding-top: 12px;
}

/* Featured secondary (thi thu) */
.featured-secondary {
  grid-column: 1 / -1;
  padding: 20px;
  display: flex; flex-direction: column; gap: 10px;
  border-color: var(--border-accent);
  box-shadow: var(--shadow-featured);
}
.focus-feature-top {
  display: flex; align-items: center; gap: 12px;
}
.focus-icon-tile {
  width: 48px; height: 48px; border-radius: 14px;
  background: var(--primary-light);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; color: var(--primary);
}
/* Khi chua chip duotone: bo nen, chip tu co o vuong gradient rieng */
.focus-icon-tile.chip-tile { background: transparent; box-shadow: none; width: 46px; height: 46px; }
.chip-ic { display: block; border-radius: 13px; }
.focus-sim-icon { width: 36px; height: 36px; }
.focus-meta {
  font-size: .72rem; font-weight: 600; color: var(--text-light);
  display: flex; align-items: center; gap: 8px;
}
.focus-meta-bars { display: flex; gap: 2px; }
.focus-meta-bars i {
  display: block; width: 3px; border-radius: 2px;
  background: var(--primary); opacity: .5;
}
.focus-meta-bars i:nth-child(1) { height: 8px; }
.focus-meta-bars i:nth-child(2) { height: 12px; }
.focus-meta-bars i:nth-child(3) { height: 16px; }
.focus-feature-copy h3 {
  font-size: 1.05rem; font-weight: 900; color: var(--navy);
}

/* Secondary focus cards (horizontal layout) */
.focus-card.secondary, .focus-card.danger {
  display: flex; align-items: center; gap: 12px;
  padding: 16px;
  grid-column: span 1;
}
.focus-card.danger {
  border-color: rgba(239, 68, 68, .25);
}
.focus-card.danger .focus-icon-tile:not(.chip-tile) {
  background: #fef2f2; color: var(--danger);
}
.focus-copy { flex: 1; min-width: 0; }
.focus-copy h3 {
  font-size: .88rem; font-weight: 800; color: var(--navy); line-height: 1.3;
}
.focus-copy p {
  font-size: .72rem; color: var(--text-light); margin-top: 2px;
}
.focus-arrow {
  flex-shrink: 0; color: var(--text-light); opacity: .5;
}

/* ===== QUICK EXAM SECTION ===== */
.quick-exam-section { padding: 24px 12px; }
.quick-exam-heading {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px; padding: 0 4px;
}
.quick-exam-heading .section-title { margin-bottom: 0; }
.quick-exam-mode-switch {
  display: flex; gap: 0;
  background: var(--primary-light); border-radius: 12px;
  padding: 3px; border: 0.8px solid var(--border);
}
.quick-exam-mode-switch button {
  padding: 7px 16px; border: none; border-radius: 10px;
  font-size: .8rem; font-weight: 700; cursor: pointer;
  background: transparent; color: var(--text-light);
  font-family: var(--font); transition: all .2s;
}
.quick-exam-mode-active {
  background: var(--primary) !important; color: #fff !important;
  box-shadow: rgba(0,135,123,.2) 0 4px 12px;
}
.quick-exam-card {
  background: var(--bg-card);
  border: 0.8px solid var(--border);
  border-radius: 22px; padding: 24px 20px;
  box-shadow: var(--shadow);
}
.quick-exam-content { text-align: left; }
.quick-exam-class-picker {
  display: flex; align-items: center; gap: 8px;
  font-size: .68rem; font-weight: 700; color: var(--text-light);
  text-transform: uppercase; letter-spacing: .5px;
  margin-bottom: 10px;
}
.quick-exam-class-picker select {
  font-family: var(--font); font-size: .82rem; font-weight: 800;
  color: var(--primary); background: var(--primary-light);
  border: 0.8px solid var(--border); border-radius: 8px;
  padding: 4px 8px; cursor: pointer;
}
.quick-exam-content h3 {
  font-size: 1.05rem; font-weight: 800; color: var(--navy); margin-bottom: 12px;
}
.exam-stats {
  display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 12px;
}
.exam-stats span {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .82rem; font-weight: 600; color: var(--text-light);
}
.quick-exam-content > p {
  font-size: .8rem; color: var(--text-light); margin-bottom: 0;
}
.quick-exam-action { margin-top: 18px; }
.quick-exam-action a {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 28px; border-radius: 999px;
  background: var(--primary); color: #fff; font-weight: 800;
  font-size: .92rem; text-decoration: none;
  box-shadow: rgba(0, 137, 125, 0.16) 0px 9px 20px;
  transition: all .2s;
}
.quick-exam-action a:hover { background: var(--primary-dark); transform: translateY(-1px); text-decoration: none; }

/* ===== PATH SECTION ===== */
.path-section { padding: 24px 12px; }
.path-section .section-title {
  font-size: 1.15rem; font-weight: 900; color: var(--navy);
  margin-bottom: 14px; padding: 0 4px;
}
.path-card {
  display: block; background: var(--bg-card);
  border: 0.8px solid var(--border); border-radius: 22px;
  box-shadow: var(--shadow); text-decoration: none; color: inherit;
  padding: 20px; transition: all .2s; overflow: hidden;
}
.path-card:hover { box-shadow: var(--shadow-featured); border-color: var(--border-accent); text-decoration: none; }
.path-copy { margin-bottom: 12px; }
.path-copy span {
  font-size: .68rem; font-weight: 700; color: var(--primary);
  text-transform: uppercase; letter-spacing: .5px;
}
.path-copy h3 {
  font-size: 1.05rem; font-weight: 900; color: var(--navy);
  margin: 6px 0 4px;
}
.path-copy p { font-size: .82rem; color: var(--text-light); }
.path-action {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .82rem; font-weight: 700; color: var(--primary);
}

/* ===== UTILITY SECTION ===== */
.utility-section { padding: 24px 12px; }
.utility-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
}
.utility-card {
  background: var(--bg-card); border: 0.8px solid var(--border);
  border-radius: 18px; padding: 18px 14px;
  text-decoration: none; color: inherit;
  box-shadow: var(--shadow); transition: all .2s;
  text-align: center;
}
.utility-card:hover { box-shadow: var(--shadow-featured); border-color: var(--border-accent); text-decoration: none; }
.utility-card h3 { font-size: .82rem; font-weight: 700; color: var(--navy); line-height: 1.35; }

/* ===== FREE 50 PROMO ===== */
.free50-card {
  display: flex; align-items: center; gap: 14px;
  background: linear-gradient(135deg, #1a2e2b 0%, #0f1a18 100%);
  border: 1.2px solid rgba(245, 158, 11, .35);
  border-radius: 22px; padding: 18px 20px; margin: 0 12px 8px;
  text-decoration: none; color: #fff;
  box-shadow: rgba(245, 158, 11, .12) 0px 8px 24px;
  transition: all .2s; position: relative; overflow: hidden;
}
.free50-card:hover { box-shadow: rgba(245, 158, 11, .22) 0px 12px 28px; text-decoration: none; border-color: var(--accent); }
.free50-icon {
  width: 44px; height: 44px; border-radius: 14px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; color: #fff;
  box-shadow: rgba(245, 158, 11, .3) 0px 6px 16px;
}
.free50-badge {
  position: absolute; top: 10px; right: 14px;
  font-size: .58rem; font-weight: 800; font-style: normal;
  letter-spacing: 1px; text-transform: uppercase;
  color: #f59e0b; background: rgba(245, 158, 11, .12);
  padding: 2px 8px; border-radius: 6px;
}
.free50-copy { flex: 1; min-width: 0; }
.free50-copy strong {
  display: block; font-size: .92rem; font-weight: 800; margin-bottom: 2px;
}
.free50-copy small {
  font-size: .72rem; color: rgba(255,255,255,.6); display: block;
}
.free50-licenses {
  display: flex; gap: 4px; margin-top: 6px;
}
.free50-licenses span {
  font-size: .6rem; font-weight: 700; padding: 1px 6px;
  border-radius: 4px; background: rgba(255,255,255,.1);
  color: rgba(255,255,255,.7);
}
.free50-cta {
  flex-shrink: 0; display: flex; align-items: center; gap: 4px;
  font-size: .78rem; font-weight: 700; color: var(--accent);
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .free50-card {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    color: var(--navy);
  }
  :root:not([data-theme="dark"]) .free50-copy small { color: var(--text-light); }
  :root:not([data-theme="dark"]) .free50-licenses span {
    background: rgba(0,0,0,.06); color: var(--text-light);
  }
}
:root[data-theme="light"] .free50-card {
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  color: var(--navy);
}
:root[data-theme="light"] .free50-copy small { color: var(--text-light); }
:root[data-theme="light"] .free50-licenses span {
  background: rgba(0,0,0,.06); color: var(--text-light);
}

/* ===== EXAM TOOLS SECTION ===== */
.exam-tools-section { padding: 24px 12px; }
.exam-tools-section .section-title {
  font-size: 1.15rem; font-weight: 900; color: var(--navy);
  margin-bottom: 14px; padding: 0 4px;
}
.exam-tool-list { display: flex; flex-direction: column; gap: 12px; }
.exam-tool-card {
  display: flex; align-items: flex-start; gap: 14px;
  background: var(--bg-card); border: 0.8px solid var(--border);
  border-radius: 20px; padding: 18px 16px;
  text-decoration: none; color: inherit;
  box-shadow: var(--shadow); transition: all .2s;
}
.exam-tool-card:hover { box-shadow: var(--shadow-featured); border-color: var(--border-accent); text-decoration: none; }
.exam-tool-featured { border-color: var(--border-accent); }
.exam-tool-icon {
  width: 44px; height: 44px; border-radius: 14px;
  background: var(--primary-light);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; font-size: 1.2rem; color: var(--primary);
}
.exam-tool-featured .exam-tool-icon {
  background: var(--primary); color: #fff;
  box-shadow: rgba(0, 135, 123, .2) 0px 6px 16px;
}
.exam-tool-copy { flex: 1; min-width: 0; }
.exam-tool-copy > span {
  font-size: .68rem; font-weight: 700; color: var(--primary);
  text-transform: uppercase; letter-spacing: .5px;
}
.exam-tool-copy h3 {
  font-size: .92rem; font-weight: 800; color: var(--navy);
  margin: 4px 0 2px;
}
.exam-tool-copy p {
  font-size: .78rem; color: var(--text-light); line-height: 1.5;
}
.exam-tool-arrow {
  flex-shrink: 0; color: var(--text-light); opacity: .5;
  margin-top: 14px;
}

/* ===== KNOWLEDGE SECTION ===== */
.knowledge-section { padding: 24px 12px; }
.knowledge-list { display: flex; flex-direction: column; gap: 10px; }
.knowledge-item {
  display: flex; align-items: center; gap: 14px;
  background: var(--bg-card); border: 0.8px solid var(--border);
  border-radius: 18px; padding: 16px 18px;
  text-decoration: none; color: inherit;
  box-shadow: var(--shadow); transition: all .2s;
}
.knowledge-item:hover { box-shadow: var(--shadow-featured); border-color: var(--border-accent); text-decoration: none; }
.knowledge-item > div { flex: 1; min-width: 0; }
.knowledge-category {
  display: inline-block; font-size: .62rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .5px;
  color: var(--primary); background: var(--primary-light);
  padding: 2px 8px; border-radius: 6px; margin-bottom: 4px;
}
.knowledge-item h3 {
  font-size: .88rem; font-weight: 800; color: var(--navy);
  line-height: 1.3; margin-bottom: 2px;
}
.knowledge-item p {
  font-size: .75rem; color: var(--text-light); line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.knowledge-item > span { flex-shrink: 0; color: var(--text-light); opacity: .5; }

/* ===== SEO AREA ===== */
.seo-area { padding: 24px 12px; }
.seo-intro {
  background: var(--bg-card); border: 0.8px solid var(--border);
  border-radius: 22px; padding: 20px; margin-bottom: 20px;
  box-shadow: var(--shadow);
}
.seo-intro > div { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.seo-logo-icon {
  width: 24px; height: 24px; border-radius: 26%;
  background: linear-gradient(145deg, #818cf8, #4338ca);
  box-shadow: inset 0 1px 1.5px rgba(255,255,255,.4), 0 6px 16px -6px rgba (49,46,129,.45);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.seo-intro h2 { font-size: .95rem; font-weight: 800; color: var(--navy); }
.seo-intro p { font-size: .82rem; color: var(--text-light); line-height: 1.7; }

/* FAQ (using <details>) */
.faq-list { margin-top: 8px; }
.faq-list > h2 {
  font-size: 1.1rem; font-weight: 900; color: var(--navy); margin-bottom: 14px;
  padding: 0 4px;
}
.faq-item {
  background: var(--bg-card);
  border: 0.8px solid var(--border);
  border-radius: 16px; margin-bottom: 10px;
  box-shadow: var(--shadow); overflow: hidden;
}
.faq-item summary {
  padding: 16px 20px; font-size: .88rem; font-weight: 700;
  color: var(--navy); cursor: pointer; list-style: none;
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--font);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary span {
  transition: transform .2s; flex-shrink: 0;
}
.faq-item[open] summary span { transform: rotate(90deg); }
.faq-item p {
  padding: 0 20px 16px; font-size: .82rem;
  color: var(--text-light); line-height: 1.7;
}

/* ===== MO PHONG 120 TINH HUONG ===== */
.mp-score { margin-bottom: 16px; }
.mp-score h3 { font-size: .95rem; font-weight: 800; color: var(--navy); margin-bottom: 6px; }
.mp-score p { font-size: .82rem; color: var(--text-light); }
.mp-score-y { margin: 10px 0 0 18px; padding: 0; }
.mp-score-y li { font-size: .78rem; color: var(--text-light); margin-bottom: 2px; }
.mp-search-wrap { margin-bottom: 14px; }
.mp-search {
  width: 100%; padding: 12px 16px; font-family: var(--font); font-size: .9rem;
  border: 1.5px solid var(--border); border-radius: 14px;
  background: var(--bg-card); color: var(--text);
}
.mp-search:focus { outline: none; border-color: var(--primary); }
.mp-list { display: flex; flex-direction: column; gap: 10px; }
.mp-card {
  background: var(--bg-card); border: 0.8px solid var(--border);
  border-radius: 16px; box-shadow: var(--shadow); overflow: hidden;
}
.mp-card summary {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px; cursor: pointer; list-style: none;
  font-family: var(--font);
}
.mp-card summary::-webkit-details-marker { display: none; }
.mp-no {
  flex-shrink: 0; width: 30px; height: 30px; border-radius: 9px;
  background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: .8rem;
  box-shadow: rgba(0,135,123,.2) 0 4px 10px;
}
.mp-name { flex: 1; min-width: 0; font-size: .88rem; font-weight: 700; color: var(--navy); line-height: 1.3; }
.mp-group {
  flex-shrink: 0; font-size: .62rem; font-weight: 700;
  color: var(--primary); background: var(--primary-light);
  padding: 2px 8px; border-radius: 6px;
}
.mp-chevron { flex-shrink: 0; color: var(--text-light); opacity: .5; transition: transform .2s; }
.mp-card[open] .mp-chevron { transform: rotate(90deg); }
.mp-body { padding: 0 16px 16px; }
.mp-row { padding: 10px 0; border-top: 0.8px solid var(--border); }
.mp-label {
  display: inline-block; font-size: .62rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: .4px;
  padding: 2px 8px; border-radius: 6px; margin-bottom: 5px;
}
.mp-indirect { background: #fff7ed; color: #c2410c; }
.mp-direct { background: #fef2f2; color: var(--danger); }
.mp-handle { background: #ecfdf5; color: #047857; }
.mp-row p { font-size: .84rem; color: var(--text); line-height: 1.55; }
.mp-tip, .mp-lesson {
  margin-top: 10px; padding: 12px 14px; border-radius: 12px;
  font-size: .82rem; line-height: 1.55; color: var(--text);
}
.mp-tip { background: var(--primary-light); border-left: 3px solid var(--primary); }
.mp-lesson { background: rgba(245,158,11,.1); border-left: 3px solid var(--accent); }
.mp-tip strong { color: var(--primary); }
.mp-lesson strong { color: var(--accent-dark); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .mp-indirect { background: rgba(194,65,12,.18); color: #fdba74; }
  :root:not([data-theme="light"]) .mp-direct { background: rgba(239,68,68,.18); color: #fca5a5; }
  :root:not([data-theme="light"]) .mp-handle { background: rgba(4,120,87,.2); color: #6ee7b7; }
}
:root[data-theme="dark"] .mp-indirect { background: rgba(194,65,12,.18); color: #fdba74; }
:root[data-theme="dark"] .mp-direct { background: rgba(239,68,68,.18); color: #fca5a5; }
:root[data-theme="dark"] .mp-handle { background: rgba(4,120,87,.2); color: #6ee7b7; }

/* ===== INFO BLOCK (tai lieu) ===== */
.info-block {
  margin-top: 20px; background: var(--bg-card);
  border: 0.8px solid var(--border); border-radius: 18px;
  padding: 20px; box-shadow: var(--shadow);
}
.info-badge {
  display: inline-block; font-size: .62rem; font-weight: 800;
  letter-spacing: .6px; text-transform: uppercase;
  color: var(--accent-dark); background: rgba(245,158,11,.12);
  padding: 3px 10px; border-radius: 999px; margin-bottom: 10px;
}
.info-block h3 { font-size: 1rem; font-weight: 800; color: var(--navy); margin-bottom: 6px; }
.info-block > p { font-size: .84rem; color: var(--text-light); line-height: 1.6; }
.info-list { margin: 12px 0 12px 18px; padding: 0; }
.info-list li { font-size: .84rem; color: var(--text); line-height: 1.5; margin-bottom: 6px; }
.info-list strong { color: var(--navy); }
.info-note {
  margin-top: 10px; font-size: .72rem; color: var(--text-light);
  font-style: italic; border-top: 0.8px solid var(--border); padding-top: 10px;
}

/* ===== SECTION ===== */
.section { padding: 24px 16px; }
.section-title {
  font-size: 1.25rem; font-weight: 900; margin-bottom: 6px;
  color: var(--navy);
}
.section-sub {
  color: var(--text-light); font-size: .85rem; margin-bottom: 20px;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 26px; border-radius: 999px; font-weight: 700;
  font-size: .9rem; cursor: pointer; border: none;
  transition: all .2s; text-decoration: none; font-family: var(--font);
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary {
  background: var(--primary); color: #fff;
  box-shadow: rgba(0, 137, 125, 0.16) 0px 9px 20px;
}
.btn-primary:hover { background: var(--primary-dark); }
.btn-accent {
  background: #fff; color: var(--ink); font-weight: 800;
  border: 0.8px solid var(--border);
  box-shadow: var(--shadow);
}
.btn-accent:hover { border-color: var(--primary); color: var(--primary); }
.btn-outline-white {
  background: rgba(255,255,255,.12); color: #fff;
  border: 1.5px solid rgba(255,255,255,.35);
  backdrop-filter: blur(4px);
}
.btn-outline-white:hover { border-color: #fff; background: rgba(255,255,255,.2); }
.btn-outline {
  background: var(--bg-card); color: var(--text);
  border: 0.8px solid var(--border);
  box-shadow: var(--shadow);
}
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-danger { background: var(--danger); color: #fff; box-shadow: rgba(239, 68, 68, 0.16) 0px 9px 20px; }
.btn-sm { padding: 8px 16px; font-size: .8rem; }
.btn-lg { padding: 15px 32px; font-size: 1rem; }

/* ===== CARDS ===== */
.card {
  background: var(--bg-card);
  border: 0.8px solid var(--border);
  border-radius: var(--radius); padding: 20px;
  box-shadow: var(--shadow); transition: all .2s;
}
.card:hover { box-shadow: var(--shadow-featured); }

/* ===== QUICK EXAM (sub-pages) ===== */
.quick-exam {
  background: var(--bg-card);
  border: 0.8px solid var(--border);
  border-radius: var(--radius); padding: 24px;
  box-shadow: var(--shadow); text-align: center;
}
.quick-exam h3 { font-size: 1.1rem; font-weight: 800; color: var(--navy); margin-bottom: 16px; }
.quick-exam .qe-params {
  display: flex; justify-content: center; gap: 20px; margin-bottom: 20px;
}
.quick-exam .qe-param {
  display: flex; flex-direction: column; align-items: center;
}
.quick-exam .qe-val { font-size: 1.3rem; font-weight: 800; color: var(--primary); }
.quick-exam .qe-label { font-size: .7rem; color: var(--text-light); text-transform: uppercase; }

/* ===== DE THI BUTTONS ===== */
.de-grid {
  display: flex; flex-wrap: wrap; gap: 8px; justify-content: center;
}
.de-btn {
  width: 44px; height: 44px; border-radius: 12px;
  border: 0.8px solid var(--border); background: var(--bg-card);
  font-size: .85rem; font-weight: 700; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all .15s; color: var(--text);
  box-shadow: var(--shadow); font-family: var(--font);
}
.de-btn:hover {
  border-color: var(--primary); background: var(--primary-light);
  color: var(--primary);
  box-shadow: rgba(0, 135, 123, 0.2) 0px 6px 16px;
}

/* ===== MATERIALS LINK CARD ===== */
.mat-card {
  background: var(--bg-card);
  border: 0.8px solid var(--border);
  border-radius: var(--radius); padding: 16px 20px;
  display: flex; align-items: center; gap: 14px;
  text-decoration: none; color: inherit;
  box-shadow: var(--shadow); transition: all .2s;
}
.mat-card:hover {
  box-shadow: var(--shadow-featured); border-color: var(--border-accent);
  text-decoration: none;
}
.mat-card .mat-icon {
  width: 48px; height: 48px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem; flex-shrink: 0;
}
.mat-card h4 { font-size: .95rem; font-weight: 700; color: var(--navy); margin-bottom: 2px; }
.mat-card p { font-size: .8rem; color: var(--text-light); }

/* ===== BOTTOM NAV ===== */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0;
  z-index: 200; height: calc(var(--bottom-h) + env(safe-area-inset-bottom, 0px));
  display: flex; justify-content: center; align-items: flex-start;
  padding: 0 12px calc(8px + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(to top, var(--bg) 40%, transparent);
}
.bottom-nav-inner {
  max-width: var(--max-w); width: 100%;
  display: flex; align-items: stretch;
  background: rgba(255,255,255,.94);
  border: 0.8px solid rgba(220, 236, 235, 0.9);
  border-radius: 20px;
  box-shadow: var(--shadow-nav);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.bottom-nav a {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 3px;
  font-size: .62rem; font-weight: 600; color: var(--text-light);
  text-decoration: none; transition: color .15s;
  padding: 10px 4px;
}
.bottom-nav a:hover, .bottom-nav a.active {
  color: var(--primary); text-decoration: none;
}
.bottom-nav a.active {
  background: var(--primary-light);
  border-radius: 16px;
  margin: 4px 2px;
  padding: 6px 4px;
  font-weight: 700;
}

/* ===== BREADCRUMB ===== */
.breadcrumb {
  padding: 12px 0; font-size: .8rem; color: var(--text-light);
  display: flex; gap: 6px; align-items: center;
}
.breadcrumb a { color: var(--text-light); }
.breadcrumb a:hover { color: var(--primary); text-decoration: none; }

/* ===== EXAM UI ===== */
.exam-header {
  background: var(--bg-card); border-bottom: 0.8px solid var(--border);
  padding: 12px 16px; position: sticky; top: 48px; z-index: 50;
}
.exam-header-inner {
  max-width: var(--max-w); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
}
.exam-timer { font-size: 1.5rem; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--navy); }
.exam-timer.warning { color: var(--danger); }
.exam-progress { font-size: .9rem; color: var(--text-light); }
.exam-nav-dots {
  display: flex; flex-wrap: wrap; gap: 4px; justify-content: center;
  padding: 12px 0;
}
.exam-dot {
  width: 32px; height: 32px; border-radius: 10px;
  border: 0.8px solid var(--border); background: var(--bg-card);
  font-size: .75rem; font-weight: 700; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all .15s; box-shadow: var(--shadow);
}
.exam-dot.current { border-color: var(--primary); background: var(--primary); color: #fff; }
.exam-dot.answered { background: var(--primary-light); border-color: var(--primary); color: var(--primary); }
.exam-dot.correct { background: #dcfce7; border-color: var(--success); color: var(--success); }
.exam-dot.wrong { background: #fef2f2; border-color: var(--danger); color: var(--danger); }
.exam-dot.critical { border-width: 2px; }

/* ===== QUESTION ===== */
.question-card {
  background: var(--bg-card);
  border: 0.8px solid var(--border);
  border-radius: var(--radius); padding: 24px; margin-bottom: 14px;
  box-shadow: var(--shadow);
}
.question-num {
  font-size: .78rem; font-weight: 800; color: var(--primary);
  text-transform: uppercase; letter-spacing: .5px; margin-bottom: 8px;
}
.question-critical {
  display: inline-block; background: #fef2f2; color: var(--danger);
  font-size: .72rem; font-weight: 700; padding: 2px 8px;
  border-radius: 6px; margin-left: 8px;
}
.question-text { font-size: 1rem; margin-bottom: 16px; line-height: 1.7; }
.question-img { border-radius: 14px; margin-bottom: 16px; max-height: 300px; object-fit: contain; }
.option-list { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.option-item {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 13px 16px; border: 1.5px solid var(--border);
  border-radius: 14px; cursor: pointer; transition: all .15s;
  font-size: .9rem;
}
.option-item:hover { border-color: var(--primary); background: var(--primary-light); }
.option-item.selected { border-color: var(--primary); background: var(--primary-light); }
.option-item.correct { border-color: var(--success); background: #dcfce7; }
.option-item.wrong { border-color: var(--danger); background: #fef2f2; }
.option-item.disabled { pointer-events: none; opacity: .7; }
.option-letter {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--border); color: var(--text);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: .8rem; flex-shrink: 0;
}
.option-item.selected .option-letter { background: var(--primary); color: #fff; }
.option-item.correct .option-letter { background: var(--success); color: #fff; }
.option-item.wrong .option-letter { background: var(--danger); color: #fff; }

/* ===== EXPLANATION ===== */
.explanation {
  margin-top: 16px; padding: 16px; border-radius: 14px;
  background: var(--primary-light); border-left: 4px solid var(--primary);
  font-size: .85rem; display: none;
}
.explanation.show { display: block; }
.explanation h4 { color: var(--primary); margin-bottom: 8px; font-size: .85rem; }

/* ===== RESULTS ===== */
.result-card { text-align: center; padding: 40px; }
.result-score { font-size: 3.5rem; font-weight: 800; }
.result-score.pass { color: var(--success); }
.result-score.fail { color: var(--danger); }
.result-detail { color: var(--text-light); margin: 16px 0 24px; }
.result-bar {
  height: 8px; border-radius: 4px; background: var(--border);
  margin: 16px 0; overflow: hidden;
}
.result-bar-fill { height: 100%; border-radius: 4px; transition: width .5s; }

/* ===== CHAPTER LIST ===== */
.chapter-card { display: flex; align-items: center; gap: 14px; cursor: pointer; }
.chapter-card .chapter-num {
  width: 46px; height: 46px; border-radius: 14px;
  background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 1.1rem; flex-shrink: 0;
  box-shadow: rgba(0, 135, 123, 0.2) 0px 6px 16px;
}
.chapter-card h3 { font-size: .95rem; font-weight: 700; color: var(--navy); margin-bottom: 2px; }
.chapter-card .chapter-count { font-size: .8rem; color: var(--text-light); }

/* ===== STUDY ===== */
.study-filters {
  display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px;
}
.filter-btn {
  padding: 8px 16px; border: 0.8px solid var(--border); border-radius: 999px;
  background: var(--bg-card); cursor: pointer; font-size: .85rem;
  transition: all .15s; box-shadow: var(--shadow);
}
.filter-btn.active, .filter-btn:hover {
  background: var(--primary); color: #fff; border-color: var(--primary);
  box-shadow: rgba(0, 135, 123, 0.2) 0px 6px 16px;
}

/* ===== TABLE ===== */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .85rem; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 0.8px solid var(--border); }
th { background: var(--primary-light); font-weight: 700; position: sticky; top: 0; color: var(--navy); }
tr:hover { background: var(--primary-light); }

/* ===== BADGE ===== */
.badge {
  display: inline-block; padding: 2px 8px; border-radius: 10px;
  font-size: .7rem; font-weight: 700;
}
.badge-danger { background: #fef2f2; color: var(--danger); }
.badge-success { background: #dcfce7; color: var(--success); }
.badge-primary { background: var(--primary-light); color: var(--primary); }

/* ===== TOAST ===== */
.toast {
  position: fixed; bottom: calc(var(--bottom-h) + 12px); left: 50%; transform: translateX(-50%);
  background: var(--ink); color: #fff; padding: 12px 24px;
  border-radius: 14px; font-size: .85rem; z-index: 300;
  box-shadow: var(--shadow-featured); opacity: 0; transition: opacity .3s;
}
.toast.show { opacity: 1; }

/* ===== FOOTER ===== */
.footer {
  background: var(--ink); border-top: 3px solid var(--primary);
  color: rgba(255,255,255,.7); padding: 32px 16px;
  text-align: center; font-size: .8rem;
  margin-bottom: var(--bottom-h);
}
.footer .brand { color: #fff; font-size: 1.05rem; font-weight: 800; margin-bottom: 6px; }
.footer a { color: rgba(255,255,255,.85); }
.footer a:hover { color: #fff; }

/* ===== SIGNS ===== */
.sign-card {
  background: var(--bg-card);
  border: 0.8px solid var(--border);
  border-radius: 18px; padding: 16px;
  text-align: center; box-shadow: var(--shadow);
}
.sign-card img { width: 72px; height: 72px; object-fit: contain; margin: 0 auto 8px; }
.sign-card h4 { font-size: .8rem; color: var(--primary); font-weight: 700; margin-bottom: 4px; }
.sign-card .sign-name { font-size: .78rem; font-weight: 700; color: var(--navy); margin-bottom: 4px; }
.sign-card .sign-desc { font-size: .72rem; color: var(--text-light); }

/* ===== CLASS SELECTOR ===== */
.cls-tabs {
  display: flex; gap: 8px; justify-content: center;
  margin-bottom: 24px; flex-wrap: wrap;
}
.cls-tab {
  padding: 10px 18px; border-radius: 14px;
  border: 0.8px solid rgba(220, 236, 235, 0.8);
  background: rgba(255,255,255,.9);
  font-size: .88rem; font-weight: 700; cursor: pointer;
  transition: all .2s; color: var(--primary); font-family: var(--font);
  box-shadow: rgba(0, 92, 84, 0.05) 0px 8px 18px;
}
.cls-tab:hover { border-color: var(--primary); box-shadow: rgba(0, 135, 123, 0.15) 0px 8px 18px; }
.cls-tab.active {
  background: var(--primary); color: #fff; border-color: transparent;
  box-shadow: rgba(0, 135, 123, 0.2) 0px 10px 22px;
}
.cls-panel { display: none; }
.cls-panel.active { display: block; }

/* Roadmap header card */
.rm-header {
  background: var(--primary-gradient); color: #fff;
  border-radius: 22px; padding: 28px 24px;
  text-align: center; margin-bottom: 20px;
  position: relative; overflow: hidden;
}
.rm-header::after {
  content: ''; position: absolute; right: -30px; bottom: -30px;
  width: 120px; height: 120px; border-radius: 50%;
  background: rgba(255,255,255,.07);
}
.rm-header h3 { font-size: 1.3rem; font-weight: 900; margin-bottom: 6px; position: relative; z-index: 1; }
.rm-header p { font-size: .9rem; opacity: .8; position: relative; z-index: 1; }

/* Stats row */
.rm-stats {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 12px; margin-bottom: 28px;
}
.rm-stat {
  background: var(--bg-card); border: 0.8px solid var(--border);
  border-radius: 16px; padding: 18px 12px; text-align: center;
  box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s;
}
.rm-stat:hover { transform: translateY(-2px); box-shadow: var(--shadow-featured); }
.rm-stat-icon { font-size: 1.6rem; margin-bottom: 6px; line-height: 1; }
.rm-stat-val { font-size: 1rem; font-weight: 800; color: var(--primary); margin-bottom: 2px; }
.rm-stat-label { font-size: .7rem; color: var(--text-light); text-transform: uppercase; letter-spacing: .3px; }

/* ===== ROAD STRIPE ===== */
.road {
  height: 6px; border-radius: 3px; margin-bottom: 24px;
  background: repeating-linear-gradient(90deg, var(--primary) 0 46px, transparent 46px 62px);
}

/* ===== PAGE HEADER ===== */
.page-h {
  padding: 28px 24px 24px;
  background: var(--primary-gradient);
  color: #fff; border-radius: 0 0 22px 22px;
  margin: 0 -16px 20px;
  position: relative; overflow: hidden;
}
.page-h::before {
  content: ''; position: absolute; right: -30px; top: -30px;
  width: 120px; height: 120px; border-radius: 50%;
  background: rgba(255,255,255,.06);
}
.page-h h1 {
  font-size: clamp(1.4rem, 4vw, 1.8rem); font-weight: 900;
  letter-spacing: -.5px; margin-bottom: 8px; line-height: 1.15;
  position: relative; z-index: 1;
}
.page-h > p { color: rgba(255,255,255,.8); font-size: .88rem; max-width: 620px; position: relative; z-index: 1; }
.page-h .breadcrumb { color: rgba(255,255,255,.6); }
.page-h .breadcrumb a { color: rgba(255,255,255,.6); }
.page-h .breadcrumb a:hover { color: #fff; }
.kicker {
  display: inline-block; font-size: .68rem; font-weight: 800;
  letter-spacing: 1.2px; text-transform: uppercase;
  color: rgba(255,255,255,.7); margin-bottom: 6px;
  background: rgba(255,255,255,.12); padding: 3px 10px;
  border-radius: 999px;
  position: relative; z-index: 1;
}

/* ===== SECTION HEADING (numbered) ===== */
.sec-h { margin: 28px 0 16px; }
.sec-h h3 {
  font-size: 1.1rem; font-weight: 900; letter-spacing: -.2px;
  display: flex; align-items: center; gap: 10px;
  color: var(--navy);
}
.sec-h p { color: var(--text-light); font-size: .82rem; margin: 4px 0 0 44px; }
.num {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--primary); color: #fff;
  display: inline-grid; place-items: center;
  font-size: .85rem; font-weight: 800; flex: none;
  box-shadow: rgba(0, 135, 123, 0.2) 0px 4px 12px;
}

/* ===== STEPS GRID ===== */
.steps {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 14px; counter-reset: sc;
}
.step {
  background: var(--bg-card); border: 0.8px solid var(--border);
  border-radius: 18px; padding: 18px 18px 16px;
  position: relative; transition: transform .15s, box-shadow .15s;
  box-shadow: var(--shadow);
}
.step:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-featured);
}
.step::before {
  counter-increment: sc; content: counter(sc);
  position: absolute; right: 14px; top: 12px;
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--primary-light); color: var(--primary);
  display: grid; place-items: center;
  font-weight: 800; font-size: .8rem;
}
.step-ic { font-size: 1.6rem; line-height: 1; margin-bottom: 8px; }
.step h4 {
  font-size: .92rem; font-weight: 800; color: var(--navy);
  margin-bottom: 4px; padding-right: 36px; line-height: 1.35;
}
.step > p {
  margin: 0; color: var(--text-light);
  font-size: .8rem; line-height: 1.5;
}

/* ===== CTA BAND ===== */
.cta-band {
  background: var(--primary-gradient); color: #fff;
  border-radius: 22px; padding: 28px 24px;
  margin: 28px 0 24px; text-align: center;
  position: relative; overflow: hidden;
}
.cta-band::before {
  content: ''; position: absolute; right: -30px; top: -30px;
  width: 100px; height: 100px; border-radius: 50%;
  background: rgba(255,255,255,.06);
}
.cta-band::after {
  content: ''; position: absolute; left: -20px; bottom: -20px;
  width: 80px; height: 80px; border-radius: 50%;
  background: rgba(255,255,255,.04);
}
.cta-ic { font-size: 2rem; margin-bottom: 8px; position: relative; z-index: 1; }
.cta-band h3 {
  font-size: 1.15rem; font-weight: 900; margin-bottom: 4px;
  position: relative; z-index: 1;
}
.cta-band p {
  font-size: .88rem; opacity: .85; margin: 0;
  position: relative; z-index: 1;
}

/* Result banner */
.rm-result {
  background: linear-gradient(135deg, #dcfce7, #f0fdf4);
  border: 1.5px solid var(--success); border-radius: var(--radius);
  padding: 24px; text-align: center; margin: 28px 0 20px;
  position: relative; overflow: hidden;
}
.rm-result::before {
  content: ''; position: absolute; left: -20px; top: -20px;
  width: 80px; height: 80px; border-radius: 50%;
  background: rgba(34,197,94,.1);
}
.rm-result-icon { font-size: 2.2rem; margin-bottom: 8px; position: relative; z-index: 1; }
.rm-result-text { font-weight: 800; color: #065f46; font-size: 1.05rem; position: relative; z-index: 1; }

/* Document checklist */
.rm-docs {
  background: var(--bg-card); border: 0.8px solid var(--border);
  border-radius: var(--radius); padding: 24px; margin-top: 8px;
  box-shadow: var(--shadow);
}
.rm-docs ul { list-style: none; padding: 0; margin: 0; }
.rm-docs li {
  padding: 12px 0; border-bottom: 0.8px solid var(--border);
  font-size: .88rem; display: flex; align-items: center; gap: 12px;
  color: var(--text);
}
.rm-docs li:last-child { border-bottom: none; }
.rm-docs li::before {
  content: '\2713'; color: #fff; font-weight: 800; font-size: .7rem;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--success);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

/* ===== DARK MODE OVERRIDES ===== */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .bottom-nav-inner {
    background: rgba(26, 46, 43, .94);
    border-color: rgba(42, 68, 64, .9);
  }
  :root:not([data-theme="light"]) .rm-result {
    background: linear-gradient(135deg, #0a3330, #041f1c);
    border-color: #059669;
  }
  :root:not([data-theme="light"]) .rm-result-text { color: #6ee7b7; }
  :root:not([data-theme="light"]) .rm-docs li::before { background: #059669; }
  :root:not([data-theme="light"]) .step::before { background: var(--primary-dark); color: #fff; }
  :root:not([data-theme="light"]) .road { background: repeating-linear-gradient(90deg, var(--primary-dark) 0 46px, transparent 46px 62px); }
  :root:not([data-theme="light"]) .theme-toggle {
    background: #1e1b42; color: #a5b4fc;
    border-color: rgba(42, 68, 64, .8);
  }
  :root:not([data-theme="light"]) .license-btn {
    background: var(--bg-card); border-color: var(--border);
  }
  :root:not([data-theme="light"]) .license-btn-active {
    background: var(--primary); border-color: transparent;
  }
  :root:not([data-theme="light"]) .quick-exam-mode-switch {
    background: var(--bg-card); border-color: var(--border);
  }
  :root:not([data-theme="light"]) .install-banner {
    background: var(--bg-card); border-color: var(--border);
  }
}
:root[data-theme="dark"] .bottom-nav-inner {
  background: rgba(26, 46, 43, .94);
  border-color: rgba(42, 68, 64, .9);
}
:root[data-theme="dark"] .rm-result {
  background: linear-gradient(135deg, #0a3330, #041f1c);
  border-color: #059669;
}
:root[data-theme="dark"] .rm-result-text { color: #6ee7b7; }
:root[data-theme="dark"] .rm-docs li::before { background: #059669; }
:root[data-theme="dark"] .step::before { background: var(--primary-dark); color: #fff; }
:root[data-theme="dark"] .road { background: repeating-linear-gradient(90deg, var(--primary-dark) 0 46px, transparent 46px 62px); }
:root[data-theme="dark"] .theme-toggle {
  background: #1e1b42; color: #a5b4fc;
  border-color: rgba(42, 68, 64, .8);
}
:root[data-theme="dark"] .license-btn {
  background: var(--bg-card); border-color: var(--border);
}
:root[data-theme="dark"] .license-btn-active {
  background: var(--primary); border-color: transparent;
}
:root[data-theme="dark"] .quick-exam-mode-switch {
  background: var(--bg-card); border-color: var(--border);
}
:root[data-theme="dark"] .install-banner {
  background: var(--bg-card); border-color: var(--border);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 640px) {
  .grid-2 { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .hero { padding: 28px 18px 36px; }
  .hero h1 { font-size: 1.4rem; }
  .section { padding: 20px 16px; }
  .section-title { font-size: 1.15rem; }
  .exam-header-inner { flex-wrap: wrap; gap: 8px; }
  .exam-header { top: 48px; }
  .option-item { padding: 10px 12px; }
  .rm-stats { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .rm-stat { padding: 14px 8px; }
  .rm-stat-val { font-size: .88rem; }
  .rm-header { padding: 22px 16px; }
  .rm-header h3 { font-size: 1.1rem; }
  .steps { grid-template-columns: 1fr; }
  .step h4 { font-size: .88rem; }
  .page-h h1 { font-size: 1.3rem; }
  .sec-h h3 { font-size: 1rem; }
  .cta-band { padding: 22px 18px; }
  .cta-band h3 { font-size: 1rem; }
  .focus-card.secondary, .focus-card.danger { grid-column: span 1; }
  .utility-grid { grid-template-columns: 1fr; }
}
@media (min-width: 641px) and (max-width: 900px) {
  .steps { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 641px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .focus-grid { grid-template-columns: 1fr 1fr; }
}

/* =====================================================================
   CHẮC TAY LÁI — bổ sung cho chactaylai.app
   ===================================================================== */
.mi { display: inline-block; flex-shrink: 0; vertical-align: middle;
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; -webkit-mask-position: center; mask-position: center;
  -webkit-mask-size: contain; mask-size: contain; background-color: currentColor; }
.top-bar .logo-icon, .footer-brand .logo-icon { display: inline-flex; align-items: center; justify-content: center; border-radius: 26%;
  background: linear-gradient(145deg, #818cf8, #4338ca); box-shadow: inset 0 1px 1.5px rgba(255,255,255,.4), 0 6px 16px -6px rgba (49,46,129,.45); }
.logo-icon svg { width: 72%; height: 72%; }
.brand-dot { color: var(--primary); }
.nut-lui { width: 40px; height: 40px; display: grid; place-items: center; color: var(--navy); border-radius: 50%; }
.nut-lui .mi { transform: rotate(180deg); }
.seo-logo-icon svg { width: 17px; height: 17px; }

/* chan trang */
.footer-brand { display: flex; align-items: center; justify-content: center; gap: 8px; color: #fff; font-size: 1.05rem; margin-bottom: 8px; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 14px; margin: 12px 0; }
.footer-note { font-size: .72rem; opacity: .7; }

/* tieu de khoi, nut, the */
.sec-title { font-size: 1.1rem; font-weight: 900; color: var(--navy); margin: 26px 0 12px; }
.cta-row { display: flex; gap: 10px; flex-wrap: wrap; margin: 0 0 8px; }
.focus-card.featured-mini { border-color: var(--border-accent); box-shadow: var(--shadow-featured); }
.focus-card.saved .focus-icon-tile:not(.chip-tile) { background: rgba(245,158,11,.12); color: var(--accent-dark); }
.lien-quan { margin-top: 16px; }
.ghi-chu { font-size: .74rem; color: var(--text-light); margin-top: 8px; font-style: italic; }
.ghi-chu-card { border-left: 4px solid var(--accent); font-size: .86rem; margin-bottom: 16px; }
.empty-state { text-align: center; padding: 28px 20px; }
.empty-state h3 { font-size: 1rem; color: var(--navy); margin-bottom: 14px; }
.dang-tai { text-align: center; color: var(--text-light); padding: 30px 0; }

/* bai viet */
.prose { margin-top: 22px; }
.prose h2 { font-size: 1.05rem; font-weight: 900; color: var(--navy); margin: 18px 0 8px; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: .95rem; font-weight: 800; color: var(--navy); margin: 12px 0 6px; display: flex; align-items: center; gap: 8px; }
.prose p, .prose li { font-size: .88rem; line-height: 1.7; color: var(--text); }
.prose ul, .prose ol { padding-left: 20px; margin: 6px 0 10px; }
.prose li { margin-bottom: 6px; }
.prose a { font-weight: 600; }
.chuong-muc { padding: 10px 0; border-top: .8px solid var(--border); }
.chuong-muc a { font-size: .82rem; font-weight: 700; }
.ds-chuong { list-style: none; padding: 0 !important; }
.ds-chuong li { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: .8px solid var(--border); }
.ds-chuong span { color: var(--text-light); white-space: nowrap; font-size: .8rem; }

/* bang cau truc de */
.bang-cau-truc td:first-child { color: var(--text-light); }
.table-wrap td, .table-wrap th { font-size: .82rem; }

/* luoi 30 de */
.de-grid-30 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 480px) { .de-grid-30 { grid-template-columns: repeat(3, 1fr); } }
.de-card { display: flex; flex-direction: column; gap: 4px; padding: 14px; border-radius: 16px; background: var(--bg-card);
  border: .8px solid var(--border); box-shadow: var(--shadow); color: inherit; text-decoration: none; transition: all .2s; }
.de-card:hover { border-color: var(--border-accent); box-shadow: var(--shadow-featured); text-decoration: none; }
.de-card.ngau-nhien { background: var(--primary-gradient); border-color: transparent; }
.de-card.ngau-nhien .de-so, .de-card.ngau-nhien .de-cta { color: #fff; }
.de-so { font-weight: 900; color: var(--navy); font-size: .95rem; }
.de-cta { font-size: .72rem; color: var(--primary); font-weight: 700; }
.de-kq { font-size: .7rem; color: var(--text-light); }
.de-kq.dat { color: var(--success); font-weight: 700; }
.de-kq.truot { color: var(--danger); font-weight: 700; }
.de-nav { display: flex; justify-content: space-between; margin: 18px 0; font-weight: 700; font-size: .88rem; }

/* lam bai / on tap */
.exam-header { top: calc(64px + env(safe-area-inset-top, 0px)); margin: 0 -16px 14px; border-radius: 0 0 16px 16px; }
.exam-header-inner { gap: 10px; }
.exam-nav-dots { display: flex; flex-wrap: wrap; gap: 5px; padding: 10px 0 2px; max-height: 120px; overflow-y: auto; }
.question-num { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.btn-luu { margin-left: auto; border: .8px solid var(--border); background: var(--bg-card); color: var(--text-light);
  border-radius: 999px; padding: 4px 12px; font: 700 .72rem var(--font); cursor: pointer; }
.btn-luu.on { color: var(--accent-dark); border-color: var(--accent); background: rgba(245,158,11,.1); }
.nav-cau { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 14px 0; }
.on-toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.on-toolbar .mp-search { flex: 1; }
.on-dem { font-size: .82rem; color: var(--text-light); font-weight: 700; white-space: nowrap; }
.luoi-cau { margin: 10px 0 20px; }
.luoi-cau summary { cursor: pointer; font-weight: 700; color: var(--primary); font-size: .85rem; }
.luoi-cau .exam-nav-dots { max-height: 260px; }
.luoi-cau .exam-dot { width: auto; min-width: 36px; padding: 0 6px; }
.result-card h2 { margin: 10px 0; color: var(--navy); }
.result-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 16px; }
.muc-luc { margin-top: 20px; }
.muc-luc summary { cursor: pointer; font-weight: 800; color: var(--navy); }
.ds-cau { padding-left: 0; list-style: none; margin-top: 10px; max-height: 420px; overflow-y: auto; }
.ds-cau li { font-size: .8rem; padding: 6px 0; border-bottom: .8px solid var(--border); color: var(--text-light); }
.ds-cau a { font-weight: 700; margin-right: 4px; }
.tab-bo { display: flex; gap: 8px; margin-bottom: 14px; }
.cls-tabs a.cls-tab { text-decoration: none; }
.chuong-list { display: flex; flex-direction: column; gap: 10px; }
.chuong-card { display: flex; gap: 14px; align-items: flex-start; padding: 16px; border-radius: 18px; background: var(--bg-card);
  border: .8px solid var(--border); box-shadow: var(--shadow); color: inherit; text-decoration: none; }
.chuong-card:hover { border-color: var(--border-accent); text-decoration: none; }
.chuong-card h3 { font-size: .95rem; color: var(--navy); margin-bottom: 2px; }
.chuong-card p { font-size: .78rem; color: var(--text-light); }

/* lich su */
.lich-su { display: flex; flex-direction: column; gap: 8px; }
.ls-dong { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 12px 14px; border-radius: 14px;
  background: var(--bg-card); border: .8px solid var(--border); border-left: 4px solid var(--danger); }
.ls-dong.dat { border-left-color: var(--success); }
.ls-dong small { grid-column: 1 / -1; color: var(--text-light); font-size: .72rem; }

/* lo trinh */
.lt-list { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.lt-buoc { display: flex; gap: 14px; padding: 16px; border-radius: 18px; background: var(--bg-card); border: .8px solid var(--border); box-shadow: var(--shadow); }
.lt-buoc h2 { font-size: .98rem; font-weight: 900; color: var(--navy); margin-bottom: 4px; }
.lt-buoc p { font-size: .84rem; color: var(--text); line-height: 1.6; }

/* mo phong */
.mp-chuong { margin-top: 22px; }
.mp-chuong h2 { font-size: 1rem; font-weight: 900; margin-bottom: 10px; }
.mp-chuong h2 a { color: var(--navy); }
.mp-chuong small { color: var(--text-light); font-weight: 600; font-size: .75rem; }
a.mp-link { display: flex; align-items: center; gap: 10px; padding: 12px 14px; color: inherit; text-decoration: none; }
a.mp-link:hover { border-color: var(--border-accent); text-decoration: none; }
.mp-video { margin-bottom: 16px; text-align: center; }
.mp-video video { width: 100%; max-height: 70vh; border-radius: 18px; background: #000; }
.mp-chi-tiet { padding: 6px 18px 16px; margin-bottom: 8px; }
.mp-chi-tiet .mp-row:first-child { border-top: 0; }
.mp-mo-ta { font-size: .8rem; color: var(--text-light); background: var(--primary-light); padding: 10px 12px; border-radius: 10px; margin-bottom: 10px; }
.vd-khung { background: var(--bg-card); border: .8px solid var(--border); border-radius: 20px; overflow: hidden; box-shadow: var(--shadow); }
.vd-dau { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 12px 14px; font-size: .8rem; color: var(--text-light); }
.vd-dau strong { color: var(--navy); }
.vd-video { position: relative; background: #000; }
.vd-video video { display: block; width: 100%; max-height: 72vh; margin: 0 auto; }
/* Cắt 7% mép trên (clip gốc 1326x798 in sẵn tên tình huống) để không lộ đáp án */
.vd-video.vd-cat { aspect-ratio: 1326 / 742; overflow: hidden; }
.vd-video.vd-cat video { aspect-ratio: 1326 / 798; height: auto; max-height: none; margin-top: -4.21%; }
.vd-bat { position: absolute; inset: 0; margin: auto; width: max-content; height: 52px; padding: 0 26px; border: 0; border-radius: 999px;
  background: var(--primary); color: #fff; font: 800 1rem var(--font); cursor: pointer; box-shadow: 0 10px 30px rgba(0,0,0,.4); }
.vd-co { position: absolute; top: 12px; right: 14px; font-size: 2rem; filter: drop-shadow(0 2px 6px rgba(0,0,0,.6)); }
.vd-thanh { height: 5px; background: var(--border); }
.vd-thanh div { height: 100%; width: 0; background: var(--primary); }
kbd { font: 700 .75rem var(--font); padding: 1px 7px; border-radius: 6px; border: 1px solid var(--border); background: var(--bg); }
.nhom-bien { margin-top: 10px; }
.bien-toc { justify-content: flex-start; }
.hang-khac { margin-top: 10px; }
button.inline-action { background: none; border: 0; padding: 0; font: 700 .8rem var(--font); color: var(--primary); cursor: pointer; }
.focus-card.featured-mini, .focus-card.saved { display: flex; align-items: center; gap: 12px; padding: 16px; grid-column: span 1; }
/* Man hep: the 2 cot chuyen thanh o dung (icon tren, chu duoi) de chu khong bi ngat tung tu */
@media (max-width: 559px) {
  .focus-card.secondary, .focus-card.danger, .focus-card.saved, .focus-card.featured-mini {
    flex-direction: column; align-items: flex-start; gap: 10px; padding: 14px; }
  .focus-card .focus-arrow { display: none; }
  .focus-copy h3 { font-size: .86rem; }
  .focus-copy p { font-size: .72rem; }
  .focus-icon-tile { width: 42px; height: 42px; }
}
button.license-btn { font: inherit; cursor: pointer; }
.install-icon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--primary-light); color: var(--primary); }
.install-icon .mi { transform: rotate(90deg); }

/* bai viet lien quan */
.ds-lien { list-style: none; padding: 0; }
.ds-lien li { padding: 10px 0; border-bottom: .8px solid var(--border); }
.ds-lien a { font-weight: 700; font-size: .88rem; }
.buoc { padding-left: 20px; }
.buoc li { margin-bottom: 8px; }

/* gia lap thiet bi */
.gl-bang { background: var(--bg-card); border: .8px solid var(--border); border-radius: 20px; padding: 18px; box-shadow: var(--shadow); }
.gl-che-do { display: flex; gap: 8px; margin-bottom: 14px; }
.gl-man { background: var(--ink); color: #fff; border-radius: 16px; padding: 22px 18px; text-align: center; margin-bottom: 14px; }
.gl-gio { font-size: 2rem; font-weight: 900; font-variant-numeric: tabular-nums; color: #818cf8; }
.gl-lenh { font-size: 1.25rem; font-weight: 800; margin-top: 10px; min-height: 1.6em; line-height: 1.3; }
.gl-nut { display: flex; gap: 8px; flex-wrap: wrap; }
.gl-nut .btn { flex: 1; min-width: 120px; }

/* xin via */
.xin-via-card { background: var(--primary-gradient); color: #fff; border-radius: 22px; padding: 36px 24px; text-align: center; margin-bottom: 18px; }
.xin-via-card h2 { font-size: 1.2rem; font-weight: 900; margin: 14px 0 20px; line-height: 1.4; min-height: 2.8em; }
.xv-icon { font-size: 3.4rem; line-height: 1; }
.xin-via-card .btn-primary { background: #fff; color: var(--ink); }

/* ===== HỌC 120 TÌNH HUỐNG (giao diện làm từng ý) ===== */
.h120-loc { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 4px 0 16px; }
.h120-loc button { padding: 7px 15px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--bg-card); color: var(--text); font: 700 .82rem var(--font); cursor: pointer; transition: all .15s; }
.h120-loc button:hover { border-color: var(--primary); }
.h120-loc button.nay { background: var(--primary); color: #fff; border-color: transparent; box-shadow: var(--shadow-featured); }
.h120-tien-do { margin-left: auto; color: var(--text-light); font-size: .78rem; font-weight: 600; }
.h120-khung { display: flex; flex-direction: column; gap: 16px; }
.h120-trai { background: var(--bg-card); border: .8px solid var(--border); border-radius: 20px;
  padding: 18px; box-shadow: var(--shadow); }
.h120-dau { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.h120-vitri { font-size: .72rem; font-weight: 700; color: var(--primary); text-transform: uppercase; letter-spacing: .5px; }
.h120-luu { border: 1px solid var(--border); background: var(--bg-card); color: var(--text-light);
  border-radius: 999px; padding: 5px 13px; font: 700 .74rem var(--font); cursor: pointer; }
.h120-luu.da { color: var(--accent-dark); border-color: var(--accent); background: var(--accent-soft); }
.mp-khung-video { border-radius: 16px; overflow: hidden; background: #000; margin-bottom: 8px; }
.mp-khung-video video { display: block; width: 100%; height: auto; max-height: 62vh; }
/* Clip in sẵn tên ở dải trên: cắt 7% mép trên (clip gốc 1326x798) cho tới khi trả lời ý 1 */
.mp-cat-chu { position: relative; width: 100%; aspect-ratio: 1326 / 742; overflow: hidden;
  border-radius: 16px; background: #000; margin-bottom: 8px; }
.mp-cat-chu > video { display: block; width: 100%; height: auto; aspect-ratio: 1326 / 798;
  object-fit: contain; border-radius: 0; margin-top: -4.21%; }
.mp-goi-y { font-size: .78rem; color: var(--text-light); margin: 0 0 10px; }
.mp-mo-ta { font-size: .82rem; color: var(--text); background: var(--primary-light); padding: 11px 13px;
  border-radius: 12px; margin: 0 0 14px; line-height: 1.55; }
.cau .dau { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.cau .stt { font-size: .72rem; font-weight: 800; color: var(--text-light); text-transform: uppercase; letter-spacing: .5px; }
.cau .chip { font-size: .68rem; font-weight: 800; color: var(--primary); background: var(--primary-light);
  padding: 3px 10px; border-radius: 999px; }
.cau .noi-dung { font-weight: 600; font-size: 1rem; line-height: 1.5; margin-bottom: 12px; color: var(--navy); }
.dap-an { display: flex; flex-direction: column; gap: 8px; }
.dap-an button { display: flex; align-items: flex-start; gap: 12px; text-align: left;
  padding: 12px 14px; border: 1.5px solid var(--border); border-radius: 14px; background: var(--bg-card);
  color: var(--text); font: 500 .9rem var(--font); cursor: pointer; transition: all .15s; }
.dap-an button:hover:not(:disabled) { border-color: var(--primary); background: var(--primary-light); }
.dap-an button .ky { flex: 0 0 auto; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  background: var(--border); color: var(--text); font-weight: 800; font-size: .78rem; }
.dap-an button.dung { background: #dcfce7; border-color: var(--success); }
.dap-an button.dung .ky { background: var(--success); color: #fff; }
.dap-an button.sai { background: #fef2f2; border-color: var(--danger); }
.dap-an button.sai .ky { background: var(--danger); color: #fff; }
.dap-an button:disabled { cursor: default; }
.h120-ket { margin-top: 12px; padding: 12px 14px; border-radius: 12px; font-size: .84rem; line-height: 1.6;
  background: var(--primary-light); border-left: 3px solid var(--primary); }
.h120-ket.dung { background: #dcfce7; border-left-color: var(--success); }
.h120-ket.sai { background: #fef2f2; border-left-color: var(--danger); }
.mp-chan { display: flex; gap: 10px; justify-content: space-between; margin-top: 14px; }
.mp-chan .h120-nut { flex: 1; }
.h120-phai { background: var(--bg-card); border: .8px solid var(--border); border-radius: 20px;
  padding: 12px; box-shadow: var(--shadow); }
.h120-ds { max-height: 60vh; overflow-y: auto; }
.h120-dong { padding: 8px 6px; border-bottom: .8px solid var(--border); }
.h120-dong.nay { background: var(--primary-light); border-radius: 10px; border-bottom-color: transparent; }
.h120-ten { display: flex; gap: 6px; align-items: center; font-size: .82rem; margin-bottom: 5px; }
.h120-so { font-weight: 800; color: var(--text-light); min-width: 1.6rem; }
.h120-tenth { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--navy); font-weight: 600; }
.h120-tenth.an { color: var(--text-light); font-weight: 400; }
.h120-sao { color: var(--accent); }
.h120-clip { color: var(--primary); font-size: .72rem; }
.h120-chip { display: flex; gap: 4px; }
.h120-chip button { flex: 1; padding: 4px 0; font: 700 .72rem var(--font); border-radius: 7px; cursor: pointer;
  border: 1px solid var(--border); background: var(--bg); color: var(--text-light); transition: all .12s; }
.h120-chip button.dung { background: #dcfce7; border-color: var(--success); color: var(--success); }
.h120-chip button.sai { background: #fef2f2; border-color: var(--danger); color: var(--danger); }
.h120-chip button.nay { outline: 2px solid var(--primary); outline-offset: 1px; }
.h120-trong { color: var(--text-light); text-align: center; padding: 20px; }
.h120-xoa { width: 100%; margin-top: 10px; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .dap-an button.dung, :root:not([data-theme="light"]) .h120-ket.dung,
  :root:not([data-theme="light"]) .h120-chip button.dung { background: rgba(22,163,74,.18); }
  :root:not([data-theme="light"]) .dap-an button.sai, :root:not([data-theme="light"]) .h120-ket.sai,
  :root:not([data-theme="light"]) .h120-chip button.sai { background: rgba(239,68,68,.16); }
}
:root[data-theme="dark"] .dap-an button.dung, :root[data-theme="dark"] .h120-ket.dung,
:root[data-theme="dark"] .h120-chip button.dung { background: rgba(22,163,74,.18); }
:root[data-theme="dark"] .dap-an button.sai, :root[data-theme="dark"] .h120-ket.sai,
:root[data-theme="dark"] .h120-chip button.sai { background: rgba(239,68,68,.16); }
