/* ===== CFA Level I-II-III: lộ trình từ dễ đến cực khó — styles ===== */
:root {
  --bg: #0b0f17;
  --bg-elev: #121826;
  --bg-elev-2: #1a2233;
  --border: #262f42;
  --text: #e7ecf5;
  --text-dim: #9aa7bd;
  --text-faint: #6b7690;
  --accent: #2563eb;
  --accent-2: #0891b2;
  --accent-soft: rgba(37, 99, 235, 0.14);
  --green: #4ade80;
  --amber: #fbbf24;
  --red: #f87171;
  --code-bg: #0d1320;
  --radius: 14px;
  --max-w: 1180px;
  --sidebar-w: 280px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Inter", Arial, sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f6f7fb;
    --bg-elev: #ffffff;
    --bg-elev-2: #eef1f8;
    --border: #dfe3ee;
    --text: #1b2130;
    --text-dim: #55617a;
    --text-faint: #8892a6;
    --accent: #1d4ed8;
    --accent-2: #0e7490;
    --accent-soft: rgba(29, 78, 216, 0.1);
    --code-bg: #eef1f8;
  }
}
:root[data-theme="light"] {
  --bg: #f6f7fb;
  --bg-elev: #ffffff;
  --bg-elev-2: #eef1f8;
  --border: #dfe3ee;
  --text: #1b2130;
  --text-dim: #55617a;
  --text-faint: #8892a6;
  --accent: #1d4ed8;
  --accent-2: #0e7490;
  --accent-soft: rgba(29, 78, 216, 0.1);
  --code-bg: #eef1f8;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }

/* Layout shell */
.shell {
  display: flex;
  min-height: 100vh;
}

/* Topbar (mobile) */
.topbar {
  display: none;
  position: sticky;
  top: 0;
  z-index: 40;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg-elev);
  border-bottom: 1px solid var(--border);
}
.topbar .brand { font-weight: 700; font-size: 15px; }
.topbar .spacer { flex: 1; }
.icon-btn {
  background: var(--bg-elev-2);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 10px;
  width: 38px; height: 38px;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
  font-size: 16px;
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--bg-elev);
  border-right: 1px solid var(--border);
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  padding: 22px 16px 40px;
}
.sidebar .brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 8px 18px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 14px;
}
.sidebar .brand .logo {
  width: 34px; height: 34px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; color: #fff; font-size: 15px;
  flex-shrink: 0;
}
.sidebar .brand .name { font-weight: 700; font-size: 14.5px; line-height: 1.25; }
.sidebar .brand .name small { display: block; font-weight: 500; color: var(--text-faint); font-size: 11.5px; }

.progress-box {
  margin: 0 8px 16px;
  padding: 12px 14px;
  background: var(--bg-elev-2);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.progress-box .label { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-dim); margin-bottom: 8px; }
.progress-box .bar { height: 7px; background: var(--border); border-radius: 99px; overflow: hidden; }
.progress-box .bar > span { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); border-radius: 99px; transition: width .3s ease; width: 0%; }

.nav-group { margin-bottom: 6px; }
.nav-title {
  font-size: 11px; text-transform: uppercase; letter-spacing: .06em;
  color: var(--text-faint); padding: 12px 12px 6px;
}
.navlink {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px; border-radius: 10px;
  color: var(--text-dim); font-size: 13.5px; font-weight: 500;
  margin: 1px 0;
}
.navlink:hover { background: var(--bg-elev-2); text-decoration: none; color: var(--text); }
.navlink.active { background: var(--accent-soft); color: var(--accent); font-weight: 700; }
.navlink .num {
  width: 22px; height: 22px; border-radius: 7px;
  background: var(--bg-elev-2); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: var(--text-faint); flex-shrink: 0;
}
.navlink.active .num { background: var(--accent); border-color: var(--accent); color: #fff; }
.navlink.done .num { background: var(--green); border-color: var(--green); color: #06240f; }
.navlink.done .num::after { content: "✓"; }
.navlink.done .num-text { display: none; }

/* Main content */
.main {
  flex: 1;
  min-width: 0;
  padding: 40px 48px 80px;
}
.content { max-width: 860px; margin: 0 auto; }
.wide { max-width: var(--max-w); margin: 0 auto; }

.crumb { font-size: 13px; color: var(--text-faint); margin-bottom: 14px; }
.crumb a { color: var(--text-faint); }
.crumb a:hover { color: var(--accent); }

.badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--accent-soft); color: var(--accent);
  font-size: 12px; font-weight: 700; padding: 5px 12px; border-radius: 99px;
  margin-bottom: 14px; letter-spacing: .02em;
}
.badge.alt { background: rgba(250, 204, 21, .12); color: var(--amber); }

h1 { font-size: 32px; font-weight: 800; margin: 0 0 12px; letter-spacing: -.01em; }
h2 { font-size: 22px; font-weight: 750; margin: 40px 0 14px; letter-spacing: -.005em; padding-top: 6px; }
h3 { font-size: 17px; font-weight: 700; margin: 24px 0 10px; color: var(--text); }
p { color: var(--text-dim); margin: 0 0 14px; }
h1 + p.lead, p.lead { font-size: 17px; color: var(--text-dim); margin-bottom: 22px; }
ul, ol { color: var(--text-dim); padding-left: 22px; margin: 0 0 14px; }
li { margin-bottom: 6px; }
li > strong { color: var(--text); }
strong { color: var(--text); }
hr.sep { border: none; border-top: 1px solid var(--border); margin: 36px 0; }

code {
  font-family: var(--mono);
  background: var(--code-bg);
  border: 1px solid var(--border);
  padding: 2px 6px;
  border-radius: 5px;
  font-size: 13px;
  color: var(--accent);
}
pre {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 18px;
  overflow-x: auto;
  margin: 0 0 18px;
}
pre code { background: none; border: none; padding: 0; color: var(--text); font-size: 13px; line-height: 1.6; }

.callout {
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  background: var(--bg-elev);
  border-radius: 10px;
  padding: 14px 18px;
  margin: 0 0 18px;
}
.callout p:last-child { margin-bottom: 0; }
.callout .ct-title { font-weight: 700; color: var(--accent); font-size: 13px; margin-bottom: 4px; display: flex; align-items: center; gap: 6px; }
.callout.warn { border-left-color: var(--amber); }
.callout.warn .ct-title { color: var(--amber); }
.callout.tip { border-left-color: var(--green); }
.callout.tip .ct-title { color: var(--green); }

.grid { display: grid; gap: 16px; margin: 18px 0 24px; }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
}
.card h4 { margin: 0 0 6px; font-size: 14.5px; font-weight: 700; }
.card p { margin: 0; font-size: 13.5px; }

/* Module cards (homepage grid) */
.module-card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex; flex-direction: column; gap: 8px;
  transition: border-color .15s, transform .15s;
  position: relative;
}
.module-card:hover { border-color: var(--accent); transform: translateY(-2px); text-decoration: none; }
.module-card .mc-top { display: flex; align-items: center; justify-content: space-between; }
.module-card .mc-num {
  font-size: 12px; font-weight: 800; color: var(--accent);
  background: var(--accent-soft); padding: 3px 9px; border-radius: 99px;
}
.module-card .mc-time { font-size: 11.5px; color: var(--text-faint); }
.module-card h4 { margin: 4px 0 0; font-size: 15.5px; font-weight: 750; color: var(--text); }
.module-card p { margin: 0; font-size: 13px; color: var(--text-dim); }
.module-card .mc-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.tag {
  font-size: 10.5px; font-weight: 600; color: var(--text-dim);
  background: var(--bg-elev-2); border: 1px solid var(--border);
  padding: 3px 8px; border-radius: 6px;
}
.module-card.done { border-color: var(--green); }
.module-card .mc-check {
  position: absolute; top: 16px; right: 16px;
  width: 20px; height: 20px; border-radius: 6px;
  background: var(--green); color: #06240f; font-size: 12px;
  display: none; align-items: center; justify-content: center; font-weight: 800;
}
.module-card.done .mc-check { display: flex; }

/* Objectives / checklist */
.checklist { list-style: none; padding: 0; margin: 0 0 18px; }
.checklist li {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 9px 12px; border: 1px solid var(--border); border-radius: 10px;
  margin-bottom: 8px; background: var(--bg-elev); cursor: pointer; font-size: 14px; color: var(--text-dim);
}
.checklist li input { margin-top: 3px; accent-color: var(--accent); width: 15px; height: 15px; flex-shrink: 0; cursor: pointer; }
.checklist li.checked { color: var(--text-faint); text-decoration: line-through; }

/* Timeline (12-month roadmap) */
.timeline { position: relative; margin: 20px 0 30px; padding-left: 28px; border-left: 2px solid var(--border); }
.tl-item { position: relative; padding-bottom: 26px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before {
  content: ""; position: absolute; left: -34px; top: 2px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--accent); border: 3px solid var(--bg);
  box-shadow: 0 0 0 2px var(--accent);
}
.tl-month { font-size: 12px; font-weight: 800; color: var(--accent); text-transform: uppercase; letter-spacing: .04em; }
.tl-item h4 { margin: 3px 0 4px; font-size: 15.5px; }
.tl-item p { margin: 0; font-size: 13.5px; }

/* Resources */
.res-list { list-style: none; padding: 0; margin: 0 0 18px; }
.res-list li {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 11px 14px; border: 1px solid var(--border); border-radius: 10px; margin-bottom: 8px;
  background: var(--bg-elev);
}
.res-list a { font-weight: 650; font-size: 14px; }
.res-list .res-desc { font-size: 12.5px; color: var(--text-faint); display: block; margin-top: 2px; }
.res-list .res-type { font-size: 10.5px; font-weight: 700; color: var(--text-faint); background: var(--bg-elev-2); padding: 3px 8px; border-radius: 6px; white-space: nowrap; }

table { width: 100%; border-collapse: collapse; margin: 0 0 20px; font-size: 13.5px; }
th, td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--border); color: var(--text-dim); }
th { color: var(--text); font-weight: 700; font-size: 12.5px; text-transform: uppercase; letter-spacing: .03em; }
tr:last-child td { border-bottom: none; }

/* Prev/next footer nav */
.pagenav { display: flex; justify-content: space-between; gap: 16px; margin-top: 48px; }
.pagenav a {
  flex: 1; display: block; border: 1px solid var(--border); border-radius: 12px;
  padding: 14px 18px; background: var(--bg-elev); text-decoration: none;
}
.pagenav a:hover { border-color: var(--accent); }
.pagenav .dir { font-size: 11px; color: var(--text-faint); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 4px; }
.pagenav .title { font-weight: 700; color: var(--text); font-size: 14px; }
.pagenav .next { text-align: right; }

.mark-done-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--accent); color: #fff; border: none;
  padding: 11px 20px; border-radius: 10px; font-weight: 700; font-size: 13.5px;
  cursor: pointer; margin: 30px 0 0;
}
.mark-done-btn.is-done { background: var(--green); color: #06240f; }
.mark-done-btn:hover { opacity: .9; }

.hero {
  padding: 8px 0 10px;
}
.hero h1 { font-size: 38px; }
.stat-row { display: flex; gap: 28px; flex-wrap: wrap; margin: 22px 0 32px; }
.stat { min-width: 110px; }
.stat .num { font-size: 26px; font-weight: 800; color: var(--accent); }
.stat .lbl { font-size: 12.5px; color: var(--text-faint); }

.milestone {
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px 20px; background: var(--bg-elev); position: relative; overflow: hidden;
}
.milestone .m-idx { font-size: 11px; font-weight: 800; color: var(--text-faint); letter-spacing: .05em; text-transform: uppercase; }
.milestone h4 { margin: 6px 0 6px; font-size: 16px; }
.milestone p { font-size: 13px; margin-bottom: 0; }

footer.site-footer {
  max-width: var(--max-w); margin: 60px auto 0; padding: 24px 0; border-top: 1px solid var(--border);
  color: var(--text-faint); font-size: 12.5px; text-align: center;
}

/* Responsive */
@media (max-width: 980px) {
  .grid.cols-3, .grid.cols-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .topbar { display: flex; }
  .sidebar {
    position: fixed; left: 0; top: 0; z-index: 50; height: 100vh;
    transform: translateX(-100%); transition: transform .2s ease; box-shadow: 0 0 40px rgba(0,0,0,.4);
  }
  .sidebar.open { transform: translateX(0); }
  .main { padding: 24px 18px 60px; }
  .grid.cols-2, .grid.cols-3, .grid.cols-4 { grid-template-columns: 1fr; }
  .pagenav { flex-direction: column; }

  /* Cỡ chữ lớn hơn một chút để dễ đọc trên mobile */
  body { font-size: 17px; }
  h1 { font-size: 27px; }
  .hero h1 { font-size: 29px; }
  h2 { font-size: 21px; }
  h3 { font-size: 18px; }
  h1 + p.lead, p.lead { font-size: 16.5px; }
  .card p, .module-card p, .milestone p, .tl-item p, .res-list .res-desc { font-size: 14.5px; }
  .module-card h4 { font-size: 16px; }
  .milestone h4 { font-size: 16.5px; }
  .checklist li { font-size: 15.5px; padding: 11px 14px; }
  .checklist li input { width: 19px; height: 19px; }
  .res-list a { font-size: 15px; }
  .tag { font-size: 11px; padding: 4px 9px; }
  .badge { font-size: 12.5px; }
  .crumb { font-size: 13.5px; }
  code { font-size: 14px; }
  pre code { font-size: 13.5px; }
  table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; font-size: 14.5px; }
  .icon-btn { width: 42px; height: 42px; }
  .stat .num { font-size: 24px; }
}
@media (max-width: 480px) {
  body { font-size: 17.5px; }
  h1 { font-size: 24px; }
  .hero h1 { font-size: 25px; }
  .main { padding: 20px 14px 50px; }
}
.overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 45; }
.overlay.show { display: block; }

/* ===== Biểu đồ nến SVG (dữ liệu minh hoạ) ===== */
:root { --blue: #60a5fa; --violet: #c084fc; --gold: #fbbf24; }
:root[data-theme="light"] { --blue: #2563eb; --violet: #7c3aed; --gold: #b45309; --green: #16a34a; --red: #dc2626; --amber: #b45309; }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) { --blue: #2563eb; --violet: #7c3aed; --gold: #b45309; --green: #16a34a; --red: #dc2626; --amber: #b45309; } }

figure.chart { margin: 8px 0 22px; padding: 10px 10px 6px; background: var(--bg-elev); border: 1px solid var(--border); border-radius: 12px; }
figure.chart svg { width: 100%; height: auto; display: block; }
figure.chart figcaption { font-size: 13px; color: var(--text-dim); padding: 8px 4px 4px; line-height: 1.55; }
.ch-title { fill: var(--text); font-size: 13px; font-weight: 700; }
.ch-axis { fill: var(--text-faint); font-size: 10.5px; }
.ch-grid { stroke: var(--border); stroke-width: 1; stroke-dasharray: 2 4; }
.ch-up { fill: var(--green); stroke: var(--green); stroke-width: 1; }
.ch-dn { fill: var(--red); stroke: var(--red); stroke-width: 1; }
.ch-up-s { stroke: var(--green); stroke-width: 1.4; }
.ch-dn-s { stroke: var(--red); stroke-width: 1.4; }
.ch-vup { fill: var(--green); opacity: .55; }
.ch-vdn { fill: var(--red); opacity: .55; }
.ch-l1, .ch-l2, .ch-l3, .ch-bb, .ch-bbmid, .ch-up-l, .ch-dn-l { fill: none; stroke-width: 1.7; stroke-linejoin: round; }
.ch-l1 { stroke: var(--gold); } .ch-l2 { stroke: var(--blue); } .ch-l3 { stroke: var(--violet); }
.ch-bb { stroke: var(--text-faint); stroke-width: 1.2; } .ch-bbmid { stroke: var(--text-faint); stroke-dasharray: 4 3; stroke-width: 1.1; }
.ch-bbfill { fill: var(--accent); opacity: .08; }
.ch-up-l { stroke: var(--green); } .ch-dn-l { stroke: var(--red); }
.ch-panel { fill: none; stroke: var(--border); }
.ch-ref { stroke: var(--border); stroke-dasharray: 3 3; }
.ch-lead { stroke: var(--text-faint); stroke-width: 1; }
.ch-h-res, .ch-h-sup, .ch-h-trend, .ch-h-note, .ch-h-warn, .ch-h-pur { stroke-width: 1.6; stroke-dasharray: 6 4; fill: none; }
.ch-h-res { stroke: var(--red); } .ch-h-sup { stroke: var(--green); } .ch-h-trend { stroke: var(--blue); stroke-dasharray: none; stroke-width: 1.9; }
.ch-h-note { stroke: var(--text-dim); } .ch-h-warn { stroke: var(--gold); } .ch-h-pur { stroke: var(--violet); }
.ch-t-res, .ch-t-sup, .ch-t-trend, .ch-t-note, .ch-t-warn, .ch-t-pur { font-size: 11.5px; font-weight: 600; }
.ch-t-res { fill: var(--red); } .ch-t-sup { fill: var(--green); } .ch-t-trend { fill: var(--blue); }
.ch-t-note { fill: var(--text); } .ch-t-warn { fill: var(--gold); } .ch-t-pur { fill: var(--violet); }
.ch-z-res { fill: var(--red); opacity: .13; } .ch-z-sup { fill: var(--green); opacity: .13; } .ch-z-trend { fill: var(--blue); opacity: .13; }
.ch-z-note { fill: var(--text-dim); opacity: .12; } .ch-z-warn { fill: var(--gold); opacity: .15; } .ch-z-pur { fill: var(--violet); opacity: .14; }
.ch-ar-res { fill: var(--red); } .ch-ar-sup { fill: var(--green); } .ch-ar-trend { fill: var(--blue); } .ch-ar-warn { fill: var(--gold); } .ch-ar-note { fill: var(--text); } .ch-ar-pur { fill: var(--violet); }
.ch-c-res, .ch-c-sup, .ch-c-trend, .ch-c-note, .ch-c-warn, .ch-c-pur { fill: none; stroke-width: 1.8; stroke-dasharray: 4 3; }
.ch-c-res { stroke: var(--red); } .ch-c-sup { stroke: var(--green); } .ch-c-trend { stroke: var(--blue); } .ch-c-note { stroke: var(--text-dim); } .ch-c-warn { stroke: var(--gold); } .ch-c-pur { stroke: var(--violet); }
.ch-box-res, .ch-box-sup, .ch-box-trend, .ch-box-note, .ch-box-warn, .ch-box-pur { fill: var(--bg); stroke-width: 1.2; }
.ch-box-res { stroke: var(--red); } .ch-box-sup { stroke: var(--green); } .ch-box-trend { stroke: var(--blue); } .ch-box-note { stroke: var(--text-faint); } .ch-box-warn { stroke: var(--gold); } .ch-box-pur { stroke: var(--violet); }

/* Thư viện nến */
.gallery { display: grid; gap: 14px; margin: 14px 0 22px; }
.gallery.cols-2 { grid-template-columns: repeat(2, 1fr); } .gallery.cols-3 { grid-template-columns: repeat(3, 1fr); } .gallery.cols-4 { grid-template-columns: repeat(4, 1fr); }
.gcard { background: var(--bg-elev); border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px 12px; }
.gcard svg { width: 100%; height: 108px; display: block; background: var(--bg-elev-2); border-radius: 8px; }
.gcard h4 { margin: 10px 0 4px; font-size: 14px; }
.gcard p { margin: 0 0 6px; font-size: 12.5px; line-height: 1.5; }
@media (max-width: 860px) { .gallery.cols-3, .gallery.cols-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .gallery.cols-2, .gallery.cols-3, .gallery.cols-4 { grid-template-columns: 1fr; } }

/* Widget & máy tính */
.widget { background: var(--bg-elev); border: 1px solid var(--border); border-radius: 14px; padding: 16px 18px; margin: 10px 0 24px; }
.widget h4 { margin: 0 0 4px; font-size: 15px; } .widget .w-sub { font-size: 13px; color: var(--text-faint); margin: 0 0 12px; }
.w-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 12px; }
.w-form label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--text-faint); }
.w-form input, .w-form select { background: var(--bg); color: var(--text); border: 1px solid var(--border); border-radius: 8px; padding: 7px 9px; font-size: 14px; font-family: inherit; }
.w-form input:focus, .w-form select:focus { outline: 2px solid var(--accent); outline-offset: 0; }
.w-out { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; }
.w-out .o { background: var(--bg-elev-2); border: 1px solid var(--border); border-radius: 10px; padding: 9px 12px; }
.w-out .o .k { font-size: 11.5px; color: var(--text-faint); } .w-out .o .v { font-size: 17px; font-weight: 750; color: var(--text); }
.w-out .o.good .v { color: var(--green); } .w-out .o.bad .v { color: var(--red); }
.w-note { font-size: 12.5px; color: var(--text-faint); margin-top: 10px; }
.w-btns { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.w-btns button, .w-btns label.chk { background: var(--bg-elev-2); color: var(--text); border: 1px solid var(--border); border-radius: 99px; padding: 5px 12px; font-size: 12.5px; cursor: pointer; font-family: inherit; }
.w-btns button:hover { border-color: var(--accent); } .w-btns label.chk { display: inline-flex; gap: 5px; align-items: center; }
.w-verdict { margin-top: 10px; padding: 10px 14px; border-left: 3px solid var(--accent); background: var(--bg-elev-2); border-radius: 8px; font-size: 14px; color: var(--text-dim); }
.w-verdict strong { color: var(--text); }
.pb-search, input.filter { width: 100%; max-width: 420px; background: var(--bg-elev); color: var(--text); border: 1px solid var(--border); border-radius: 10px; padding: 9px 12px; font-size: 14px; margin: 6px 0 14px; }

/* Sai lầm / tóm tắt / quiz */
.mistake { border: 1px solid var(--border); border-left: 3px solid var(--red); background: var(--bg-elev); border-radius: 10px; padding: 12px 16px; margin: 0 0 12px; }
.mistake .m-h { font-weight: 700; color: var(--red); font-size: 14px; margin-bottom: 6px; }
.mistake p { margin: 0 0 4px; font-size: 14px; } .mistake p b { color: var(--text); }
.keypoints { border: 1px solid var(--border); border-left: 3px solid var(--green); background: var(--bg-elev); border-radius: 10px; padding: 12px 18px; margin: 18px 0; }
.keypoints .kp-t { font-weight: 700; color: var(--green); font-size: 13px; margin-bottom: 4px; }
details.qz { background: var(--bg-elev); border: 1px solid var(--border); border-radius: 10px; padding: 10px 14px; margin: 0 0 8px; }
details.qz summary { cursor: pointer; font-weight: 600; color: var(--text); font-size: 14.5px; }
details.qz .ans { margin-top: 8px; color: var(--text-dim); font-size: 14px; }
.disclaimer { border: 1px solid var(--border); border-left: 3px solid var(--amber); background: var(--bg-elev); border-radius: 10px; padding: 12px 16px; margin: 0 0 22px; font-size: 13.5px; color: var(--text-dim); }
.pill { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 9px; border-radius: 99px; background: var(--bg-elev-2); border: 1px solid var(--border); color: var(--text-dim); margin-right: 6px; }
.pill.l1 { color: var(--green); } .pill.l2 { color: var(--gold); } .pill.l3 { color: var(--red); }
.formula { background: var(--bg-elev-2); border: 1px dashed var(--border); border-radius: 10px; padding: 10px 16px; margin: 0 0 16px; font-family: var(--mono); font-size: 14px; color: var(--text); overflow-x: auto; }

/* viền chữ cho nhãn trên biểu đồ để dễ đọc khi đè lên nến */
.ch-t-res, .ch-t-sup, .ch-t-trend, .ch-t-note, .ch-t-warn, .ch-t-pur, .ch-axis { paint-order: stroke; stroke: var(--bg-elev); stroke-width: 3.5px; stroke-linejoin: round; }
.ch-box-res + text, .ch-box-sup + text, .ch-box-trend + text, .ch-box-note + text, .ch-box-warn + text, .ch-box-pur + text { stroke: var(--bg); }

.ch-cloud-up { fill: var(--green); opacity: .16; } .ch-cloud-dn { fill: var(--red); opacity: .16; }
.ch-sar-up { fill: var(--green); } .ch-sar-dn { fill: var(--red); }

/* ===== Bổ sung cho khoá Data Engineering & Rủi ro ===== */
a.icon-btn { text-decoration: none; }
.sidebar .home-link { display: flex; align-items: baseline; gap: 6px; margin: 0 4px 14px; padding: 9px 12px; border-radius: 10px;
  background: var(--accent); color: #fff; font-weight: 700; font-size: 14px; text-decoration: none; }
.sidebar .home-link small { font-weight: 500; opacity: .85; font-size: 12px; }
.sidebar .home-link:hover { filter: brightness(1.08); color: #fff; }
pre[data-lang] { position: relative; padding-top: 30px; }
pre[data-lang]::before { content: attr(data-lang); position: absolute; top: 8px; left: 14px; font-size: 10.5px; font-weight: 700;
  letter-spacing: .05em; text-transform: uppercase; color: var(--text-faint); font-family: var(--font); }
pre.output { background: var(--bg-elev-2); border-style: dashed; }
pre.output code { color: var(--text-dim); }
.copy-btn { position: absolute; top: 6px; right: 8px; font-size: 11.5px; padding: 3px 9px; border-radius: 7px; cursor: pointer;
  background: var(--bg-elev-2); color: var(--text-dim); border: 1px solid var(--border); font-family: var(--font); }
.copy-btn:hover { color: var(--text); border-color: var(--accent); }
.callout.story { border-left-color: var(--violet); background: linear-gradient(90deg, rgba(192,132,252,.08), transparent 60%), var(--bg-elev); }
.callout.story .ct-title { color: var(--violet); }
.flow-wrap { margin: 6px 0 22px; }
.flow-wrap .f-cap { font-size: 13px; font-weight: 700; color: var(--text-dim); margin-bottom: 8px; }
.flow { display: flex; align-items: stretch; gap: 6px; flex-wrap: wrap; }
.flow .f-step { flex: 1 1 130px; min-width: 120px; background: var(--bg-elev); border: 1px solid var(--border); border-top: 3px solid var(--text-faint);
  border-radius: 10px; padding: 9px 11px; display: flex; flex-direction: column; gap: 3px; }
.flow .f-step b { font-size: 13.5px; color: var(--text); }
.flow .f-step span { font-size: 12px; color: var(--text-dim); line-height: 1.45; }
.flow .f-step.src { border-top-color: var(--text-faint); } .flow .f-step.brz { border-top-color: #cd7f32; }
.flow .f-step.slv { border-top-color: #a8b3c7; } .flow .f-step.gld { border-top-color: var(--gold); }
.flow .f-step.srv { border-top-color: var(--green); } .flow .f-step.ctl { border-top-color: var(--violet); }
.flow .f-step.bad { border-top-color: var(--red); }
.flow .f-arrow { align-self: center; color: var(--text-faint); font-size: 18px; font-weight: 700; }
.w-form textarea { background: var(--bg); color: var(--text); border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px;
  font-family: var(--mono); font-size: 13px; width: 100%; min-height: 110px; }
.w-bars { display: grid; grid-template-columns: repeat(9, 1fr); gap: 6px; align-items: end; height: 140px; margin: 10px 0 4px; }
.w-bars .col { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 2px; font-size: 11px; color: var(--text-faint); }
.w-bars .col .bo { width: 70%; background: var(--blue); border-radius: 4px 4px 0 0; opacity: .85; }
.w-bars .col .be { width: 70%; border: 2px dashed var(--gold); border-bottom: none; border-radius: 4px 4px 0 0; margin-bottom: -2px; }
.w-bars .col .stack { position: relative; width: 100%; display: flex; justify-content: center; align-items: flex-end; height: 110px; }
.w-bars .col .stack > div { position: absolute; bottom: 0; }
@media (max-width: 860px) {
  .flow { flex-direction: column; }
  .flow .f-arrow { transform: rotate(90deg); align-self: center; line-height: 1; }
  .flow .f-step { flex: 1 1 auto; }
}

/* ===== Bổ sung khoá Cocos ===== */
.callout.jd { border-left-color: var(--gold); background: linear-gradient(90deg, rgba(251,191,36,.07), transparent 60%), var(--bg-elev); }
.callout.jd .ct-title { color: var(--gold); }
.callout.jd ul { margin: 6px 0 0; font-style: italic; color: var(--text-dim); }
details.iq summary { font-weight: 650; }
.say { background: var(--bg-elev); border: 1px solid var(--border); border-left: 3px solid var(--green); border-radius: 10px; padding: 9px 14px; margin: 0 0 10px; }
.say .say-en { display: block; color: var(--text); font-weight: 600; }
.say .say-vi { display: block; color: var(--text-dim); font-size: 13.5px; margin-top: 2px; }
.rc-log { font-family: var(--mono); font-size: 12.5px; background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; max-height: 180px; overflow: auto; margin-top: 10px; white-space: pre-wrap; }
.dc-strip { display: flex; flex-wrap: wrap; gap: 4px; margin: 10px 0; }
.dc-strip span { padding: 4px 8px; border-radius: 6px; font-family: var(--mono); font-size: 12px; color: #111; font-weight: 700; }
.mock-q { font-size: 17px; font-weight: 650; margin: 10px 0; color: var(--text); }
.mock-meta { font-size: 12.5px; color: var(--text-faint); }
.mock-timer { font-family: var(--mono); font-size: 22px; font-weight: 800; color: var(--gold); }

/* ===== Khoá Web phim: nhãn mức rủi ro (đèn giao thông) ===== */
.rk { display: inline-block; font-size: 11.5px; font-weight: 700; padding: 2px 9px; border-radius: 99px; white-space: nowrap; border: 1px solid transparent; }
.rk.ok { color: var(--green); background: rgba(74,222,128,.12); border-color: rgba(74,222,128,.35); }
.rk.mid { color: var(--gold); background: rgba(251,191,36,.12); border-color: rgba(251,191,36,.35); }
.rk.ban { color: var(--red); background: rgba(248,113,113,.12); border-color: rgba(248,113,113,.35); }
.stars { color: var(--gold); letter-spacing: 1px; white-space: nowrap; }
.mock-page { border: 1px dashed var(--border); border-radius: 12px; padding: 10px; background: var(--bg-elev-2); font-size: 12.5px; line-height: 1.5; margin: 0 0 18px; }
.mock-page .slot { border-radius: 6px; padding: 6px 8px; margin: 4px 0; text-align: center; font-weight: 700; }
.mock-page .slot.ad { background: rgba(248,113,113,.15); color: var(--red); border: 1px solid rgba(248,113,113,.4); }
.mock-page .slot.ct { background: rgba(96,165,250,.12); color: var(--blue); border: 1px solid rgba(96,165,250,.35); }
.mock-page .slot.pl { background: rgba(0,0,0,.55); color: #fff; padding: 26px 8px; }
.mock-page .slot.ok { background: rgba(74,222,128,.12); color: var(--green); border: 1px solid rgba(74,222,128,.35); }
.audit-in { width: 100%; min-height: 130px; font-family: var(--mono); font-size: 12.5px; background: var(--bg); color: var(--text); border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; }
.audit-tb td:first-child { font-family: var(--mono); font-size: 12.5px; }
/* ===== Khoá Khởi nghiệp: khối so sánh người tính toán / chưa tính toán ===== */
.vs .callout { margin-bottom: 0; }
.vs-h { font-size: 13px; font-weight: 700; color: var(--text-dim); margin: 6px 0 8px; }
.verdict { border: 1px solid var(--border); border-radius: 12px; padding: 10px 14px; margin: 10px 0 22px; background: var(--bg-elev-2); font-size: 14.5px; }
.verdict b { color: var(--text); }
