/* CFA Note Review — dense black-on-white study sheet */
*{box-sizing:border-box;margin:0;padding:0}
body{font-family:-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
  font-size:13.5px;line-height:1.55;color:#111;background:#fff;
  max-width:1180px;margin:0 auto;padding:18px 20px 80px}
a{color:#0f766e}
.topbar{position:sticky;top:0;z-index:50;background:#fff;border-bottom:2px solid #0f766e;
  padding:8px 0;margin:-18px -20px 14px;padding-left:20px;padding-right:20px;
  display:flex;gap:14px;align-items:center;flex-wrap:wrap;font-size:12.5px}
.topbar a{text-decoration:none;font-weight:600}
.topbar .sep{color:#cbd5e1}
h1{font-size:24px;color:#0f766e;border-bottom:3px solid #0f766e;padding-bottom:8px;margin-bottom:6px}
.lede{font-size:13px;color:#475569;margin-bottom:16px}
h2{font-size:17px;color:#fff;background:#0f766e;padding:8px 14px;border-radius:6px;margin:26px 0 4px}
.gsub{font-size:13px;color:#475569;font-style:italic;margin:0 0 10px 2px}
h3{font-size:15px;color:#7c3aed;border-left:4px solid #7c3aed;padding-left:9px;margin:16px 0 6px}
h4{font-size:13.8px;color:#0f172a;margin:12px 0 4px}
p,li{margin-bottom:3px}
ul,ol{margin-left:20px;margin-bottom:8px}
b,strong{color:#000}
code{background:#f1f5f9;padding:1px 5px;border-radius:3px;font-size:12.5px;
  font-family:"SF Mono",Menlo,Consolas,monospace}
mark{background:#fef08a;padding:0 2px}
hr{border:0;border-top:1px dashed #cbd5e1;margin:18px 0}

/* ---------- tables ---------- */
.tscroll{overflow-x:auto;margin:10px 0;-webkit-overflow-scrolling:touch}
table{border-collapse:collapse;width:100%;font-size:12.6px;background:#fff}
th,td{border:1px solid #cbd5e1;padding:6px 9px;vertical-align:top;text-align:left}
th{background:#0f766e;color:#fff;font-weight:600;white-space:nowrap}
tbody tr:nth-child(even){background:#f8fafc}
td.c,th.c{text-align:center}
.up{color:#15803d;font-weight:700}
.dn{color:#b91c1c;font-weight:700}
.na{color:#64748b}

/* ---------- callout boxes ---------- */
.box{border:1px solid #cbd5e1;border-left:5px solid #0f766e;background:#f8fafc;
  padding:9px 13px;border-radius:5px;margin:10px 0}
.box .t{font-weight:700;display:block;margin-bottom:3px}
.trap{border-left-color:#dc2626;background:#fef2f2}
.trap .t{color:#b91c1c}
.ex{border-left-color:#2563eb;background:#eff6ff}
.ex .t{color:#1d4ed8}
.key{border-left-color:#ca8a04;background:#fefce8}
.key .t{color:#a16207}
.vs{border-left-color:#7c3aed;background:#faf5ff}
.vs .t{color:#6d28d9}
.fml{border-left-color:#0891b2;background:#ecfeff;font-family:"SF Mono",Menlo,Consolas,monospace;
  font-size:12.6px}
.fml .t{color:#0e7490;font-family:inherit}

/* ---------- CHỐT TĂNG/GIẢM (direction recap) ---------- */
.updn{border:2px solid #0f172a;border-left-width:6px;background:#fff;border-radius:6px;
  padding:9px 13px;margin:12px 0}
.updn .t{display:block;font-weight:700;color:#0f172a;font-size:13.5px;margin-bottom:5px;
  border-bottom:1px solid #e2e8f0;padding-bottom:3px}
.updn .plus,.updn .minus,.updn .same{margin:4px 0;font-size:13px;line-height:1.6}
.updn .plus{color:#14532d}
.updn .plus b{background:#dcfce7;color:#15803d;padding:1px 7px;border-radius:3px;margin-right:5px}
.updn .minus{color:#7f1d1d}
.updn .minus b{background:#fee2e2;color:#b91c1c;padding:1px 7px;border-radius:3px;margin-right:5px}
.updn .same{color:#334155}
.updn .same b{background:#e2e8f0;color:#475569;padding:1px 7px;border-radius:3px;margin-right:5px}
.updn .why{font-size:12.4px;color:#64748b;font-style:italic;margin-top:5px;
  border-top:1px dashed #cbd5e1;padding-top:4px}

/* ---------- KEYWORD NHẬN DIỆN (recognition chips) ---------- */
.kwbox{border:1px solid #cbd5e1;border-left:5px solid #ea580c;background:#fff7ed;
  border-radius:5px;padding:9px 13px;margin:11px 0}
.kwbox .t{display:block;font-weight:700;color:#c2410c;margin-bottom:5px}
.kw{display:inline-block;background:#fff;border:1px solid #fdba74;color:#9a3412;
  font-weight:600;font-size:12.3px;padding:2px 9px;border-radius:12px;margin:2px 4px 2px 0}
.kwbox .no{display:inline-block;background:#fff;border:1px solid #cbd5e1;color:#64748b;
  font-weight:500;font-size:12.3px;padding:2px 9px;border-radius:12px;margin:2px 4px 2px 0;
  text-decoration:line-through}
.kwbox .note{font-size:12.4px;color:#7c2d12;margin-top:5px}

/* ---------- mind map ---------- */
.mm{background:#fff;border:2px solid #0f766e;border-radius:8px;padding:14px 16px;margin:12px 0;
  overflow-x:auto}
.mm-title{font-weight:700;color:#0f766e;font-size:14px;margin-bottom:8px}
.mm ul{list-style:none;margin:0 0 0 8px;padding-left:16px;border-left:2px solid #99f6e4}
.mm>ul{border-left:none;padding-left:0;margin-left:0}
.mm li{position:relative;padding:2px 0 2px 14px;margin:0;font-size:12.8px}
.mm li:before{content:"";position:absolute;left:0;top:14px;width:11px;height:2px;background:#99f6e4}
.mm>ul>li:before{display:none}
.mm>ul>li{padding-left:0}
.mm .n0{display:inline-block;background:#0f766e;color:#fff;font-weight:700;padding:3px 11px;
  border-radius:5px;margin-bottom:4px;font-size:13px}
.mm .n1{display:inline-block;background:#ccfbf1;color:#0f766e;font-weight:700;padding:2px 9px;
  border-radius:4px;font-size:12.6px}
.mm .n2{font-weight:600;color:#7c3aed}
.mm .leaf{color:#334155}

/* ---------- quiz ---------- */
.q{border:1px solid #cbd5e1;border-left:5px solid #0ea5e9;background:#fff;
  padding:10px 14px;border-radius:5px;margin:10px 0}
.q .qn{font-weight:700;color:#0369a1}
.q ol{margin:5px 0 5px 22px}
.q details{margin-top:6px;background:#f0fdf4;border:1px solid #86efac;border-radius:4px;
  padding:6px 10px}
.q summary{cursor:pointer;font-weight:600;color:#15803d;user-select:none}
.q details[open] summary{margin-bottom:5px}
.q .ans{font-size:12.8px}

/* ---------- hub cards (index) ---------- */
.cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:12px;margin:14px 0}
.card{display:block;text-decoration:none;color:inherit;border:1px solid #cbd5e1;
  border-top:4px solid #0f766e;border-radius:7px;padding:11px 14px;background:#fff;
  transition:box-shadow .12s,transform .12s}
.card:hover{box-shadow:0 4px 14px rgba(15,118,110,.18);transform:translateY(-2px)}
.card .num{font-size:11.5px;color:#94a3b8;font-weight:700;letter-spacing:.5px}
.card .nm{display:block;font-size:15px;font-weight:700;color:#0f766e;margin:1px 0 3px}
.card .vn{display:block;font-size:12.4px;color:#475569;margin-bottom:5px}
.card .w{display:inline-block;font-size:11.5px;background:#ccfbf1;color:#0f766e;
  padding:1px 7px;border-radius:10px;font-weight:600}
.card .tp{font-size:11.8px;color:#64748b;margin-top:5px;line-height:1.4}

/* ---------- misc ---------- */
.grid2{display:grid;grid-template-columns:1fr 1fr;gap:12px}
@media(max-width:760px){
  body{font-size:13.8px;padding:14px 12px 60px}
  .grid2{grid-template-columns:1fr}
  h2{font-size:16px}
  table{font-size:12px}
}
@media print{
  body{max-width:none;font-size:10.5px}
  .topbar{display:none}
  h2{background:#e2e8f0!important;color:#000!important;-webkit-print-color-adjust:exact}
  .q details{display:block}
}
