/* =====================================================
   MathTest – Toán THPT  |  main.css
   Mobile + tablet first app shell, blue 2026 theme
   ===================================================== */

/* ---------- Design tokens ---------- */
:root{
  --bg:#eef2f9;
  --surface:#ffffff;
  --surface-2:#f1f5fc;
  --border:#e6ecf5;
  --text:#16223a;
  --muted:#697690;

  --primary:#2563eb;
  --primary-2:#3b82f6;
  --primary-dark:#1d4ed8;
  --primary-soft:#e8f0fe;

  --blue:#2563eb;   --blue-soft:#e8f0fe;
  --green:#16a34a;  --green-soft:#e6f7ee;
  --orange:#f59e0b; --orange-soft:#fef3e0;
  --violet:#7c5cfc; --violet-soft:#efeafe;
  --teal:#0ea5a5;   --teal-soft:#e1f6f5;
  --red:#ef4444;    --red-soft:#fdecec;
  --amber-soft:#fef4e0; --amber-ink:#d98a00;

  --radius:18px;
  --radius-sm:12px;
  --shadow:0 1px 2px rgba(22,26,44,.04),0 10px 26px rgba(22,26,44,.06);
  --font:'Be Vietnam Pro',system-ui,-apple-system,'Segoe UI',Roboto,Arial,sans-serif;
}
[data-theme="dark"]{
  --bg:#0c1020;
  --surface:#151a2c;
  --surface-2:#1c2238;
  --border:#283050;
  --text:#e8ecf8;
  --muted:#9aa6c6;
  --primary-soft:rgba(59,130,246,.18);
  --blue-soft:rgba(59,130,246,.16);
  --green-soft:rgba(34,197,94,.15);
  --orange-soft:rgba(245,158,11,.16);
  --violet-soft:rgba(124,92,252,.18);
  --teal-soft:rgba(14,165,165,.16);
  --red-soft:rgba(239,68,68,.16);
  --amber-soft:rgba(245,158,11,.16); --amber-ink:#fbbf24;
  --shadow:0 12px 30px rgba(0,0,0,.45);
}

/* ---------- Base ---------- */
*,*::before,*::after{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0;background:var(--bg);color:var(--text);
  font-family:var(--font);font-size:15px;line-height:1.6;-webkit-font-smoothing:antialiased;
  padding-bottom:calc(70px + env(safe-area-inset-bottom));
  transition:background .25s,color .25s;
}
img{max-width:100%;height:auto;border-radius:10px}
a{color:var(--primary);text-decoration:none}
:focus-visible{outline:2px solid var(--primary);outline-offset:2px;border-radius:6px}
::selection{background:var(--primary);color:#fff}
.muted{color:var(--muted)}
.ic{display:inline-block;vertical-align:middle;flex:none}
.screen-reader-text{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
.skip-link:focus{position:fixed;top:10px;left:10px;z-index:999;background:var(--primary);color:#fff;padding:8px 14px;border-radius:8px;width:auto;height:auto;clip:auto}

.container{width:100%;max-width:880px;margin:0 auto;padding:0 16px}
.container.is-wide{max-width:1180px}
.container.is-exam{max-width:860px}
.card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);box-shadow:var(--shadow)}

.app-main{display:flex;flex-direction:column;gap:18px;padding-top:18px;padding-bottom:8px}
.section{margin:0}

/* ---------- App header ---------- */
.app-header{position:sticky;top:0;z-index:60;background:var(--surface);border-bottom:1px solid var(--border)}
.admin-bar .app-header{top:32px}
.app-header-inner{position:relative;display:grid;grid-template-columns:44px 1fr 44px;align-items:center;gap:8px;height:62px}
.brand{justify-self:center;display:flex;align-items:center;gap:10px;color:var(--text);min-width:0;max-width:100%}
.brand-logo{width:38px;height:38px;border-radius:11px;background:linear-gradient(135deg,var(--primary-2),var(--primary));color:#fff;display:grid;place-items:center;font-weight:800;font-size:21px;line-height:1;flex:none;box-shadow:0 4px 12px rgba(37,99,235,.35)}
.brand-text{display:flex;flex-direction:column;line-height:1.2;min-width:0}
.brand-text strong{font-size:17px;font-weight:800;color:var(--primary);letter-spacing:-.01em;white-space:nowrap}
.brand-text small{font-size:11px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

.icon-btn{width:42px;height:42px;border:0;border-radius:12px;background:transparent;color:var(--text);display:grid;place-items:center;cursor:pointer;transition:background .15s,color .15s;position:relative}
.icon-btn:hover{background:var(--surface-2)}
#drawerToggle{justify-self:start}
.bell-btn{justify-self:end}
.bell-dot{position:absolute;top:9px;right:10px;width:8px;height:8px;border-radius:50%;background:var(--red);border:2px solid var(--surface)}
.icon-sun{display:none}
[data-theme="dark"] .icon-sun{display:inline-block}
[data-theme="dark"] .icon-moon{display:none}

.bell-panel{position:absolute;top:calc(100% + 8px);right:0;width:min(300px,86vw);background:var(--surface);border:1px solid var(--border);border-radius:14px;box-shadow:var(--shadow);padding:8px;z-index:70}
.bell-panel[hidden]{display:none}
.bell-panel-head{font-weight:800;font-size:11.5px;text-transform:uppercase;letter-spacing:.06em;color:var(--muted);padding:8px 10px}
.bell-list{list-style:none;margin:0;padding:0}
.bell-list a{display:block;padding:10px;border-radius:10px}
.bell-list a:hover{background:var(--surface-2)}
.bell-list strong{display:block;font-size:13.5px;color:var(--text);font-weight:600;line-height:1.4}
.bell-list span{display:block;margin-top:2px;font-size:11.5px;color:var(--muted)}

/* ---------- Drawer ---------- */
.drawer-overlay{position:fixed;inset:0;background:rgba(8,12,26,.5);z-index:90;opacity:0;transition:opacity .2s}
.drawer-overlay.open{opacity:1}
.drawer-overlay[hidden]{display:none}
.app-drawer{position:fixed;top:0;left:0;bottom:0;width:min(320px,84vw);background:var(--surface);z-index:100;transform:translateX(-100%);transition:transform .25s ease;display:flex;flex-direction:column;gap:16px;padding:16px;box-shadow:0 0 50px rgba(0,0,0,.25);overflow-y:auto}
.app-drawer.open{transform:none}
.drawer-head{display:flex;align-items:center;justify-content:space-between}
.drawer-head .brand{justify-self:auto}
.drawer-head .brand strong{font-size:18px;color:var(--primary)}
.drawer-search{display:flex;align-items:center;gap:8px;padding:11px 12px;background:var(--surface-2);border:1px solid var(--border);border-radius:12px;color:var(--muted)}
.drawer-search input{flex:1;min-width:0;border:0;background:transparent;font:inherit;font-size:14px;color:var(--text)}
.drawer-search input:focus{outline:none}
.drawer-nav .nav-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:2px}
.drawer-nav a{display:block;padding:12px;border-radius:11px;color:var(--text);font-weight:600;font-size:15px}
.drawer-nav a:hover,.drawer-nav .current-menu-item>a,.drawer-nav .current_page_item>a{background:var(--primary-soft);color:var(--primary)}
.drawer-foot{margin-top:auto;display:flex;flex-direction:column;gap:10px;padding-top:14px;border-top:1px solid var(--border)}
.drawer-theme{display:flex;align-items:center;gap:10px;padding:11px 12px;border:1px solid var(--border);border-radius:12px;background:var(--surface);color:var(--text);font:inherit;font-weight:600;font-size:14px;cursor:pointer}
.drawer-theme:hover{background:var(--surface-2)}

/* ---------- Bottom tab bar ---------- */
.tabbar{position:fixed;left:0;right:0;bottom:0;z-index:80;background:var(--surface);border-top:1px solid var(--border);padding-bottom:env(safe-area-inset-bottom)}
.tabbar-inner{display:grid;grid-template-columns:repeat(5,1fr);align-items:center;height:64px;overflow:visible}
.tab{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;color:var(--muted);font-size:11px;font-weight:600;padding:6px 2px;min-width:0}
.tab span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}
.tab.is-active{color:var(--primary)}
.tab-fab{position:relative}
.tab-fab .fab{width:54px;height:54px;border-radius:50%;background:linear-gradient(135deg,var(--primary-2),var(--primary));color:#fff;display:grid;place-items:center;margin-top:-30px;margin-bottom:2px;box-shadow:0 8px 20px rgba(37,99,235,.45);border:4px solid var(--surface)}
.tab-fab span:last-child{color:var(--primary)}
/* Nút chat của plugin AI Chat Web (#hcai-chat, mặc định bottom:1.25rem) bị thanh tab dưới
   (.tabbar cao 64px + safe-area) che → nâng cả widget lên trên thanh tab. */
#hcai-chat{bottom:calc(76px + env(safe-area-inset-bottom))!important}

/* Popup "Làm đề": chọn loại đề */
.ep-overlay{position:fixed;inset:0;z-index:300;display:flex;align-items:flex-end;justify-content:center;background:rgba(15,23,42,.5);opacity:0;transition:opacity .2s}
.ep-overlay[hidden]{display:none}
.ep-overlay.open{opacity:1}
.ep-sheet{width:100%;max-width:460px;background:var(--surface);border-radius:20px 20px 0 0;padding:16px 16px calc(16px + env(safe-area-inset-bottom));transform:translateY(28px);transition:transform .22s;box-shadow:0 -10px 40px rgba(15,23,42,.2)}
.ep-overlay.open .ep-sheet{transform:none}
.ep-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px}
.ep-head b{font-size:16px;font-weight:800}
.ep-close{border:0;background:var(--surface-2);width:32px;height:32px;border-radius:50%;font-size:20px;line-height:1;cursor:pointer;color:var(--muted)}
.ep-list{display:flex;flex-direction:column;gap:8px}
.ep-item{display:flex;align-items:center;gap:12px;padding:11px 12px;border:1px solid var(--border);border-radius:13px;color:var(--text);text-decoration:none}
.ep-item:hover{border-color:var(--primary);background:var(--primary-soft)}
.ep-ico{flex:none;width:42px;height:42px;border-radius:11px;display:grid;place-items:center}
.ep-tx{flex:1;min-width:0}
.ep-tx b{display:block;font-size:14.5px;font-weight:700;line-height:1.2}
.ep-tx small{font-size:12px;color:var(--muted)}
.ep-item>svg:last-child{color:var(--muted);flex:none}
@media(min-width:560px){.ep-overlay{align-items:center}.ep-sheet{border-radius:18px}}

/* ---------- Buttons & badges ---------- */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:7px;padding:11px 18px;border-radius:12px;border:1.5px solid transparent;font:inherit;font-weight:700;font-size:14.5px;cursor:pointer;transition:transform .15s,box-shadow .15s,background .15s,border-color .15s;white-space:nowrap}
.btn-primary{background:linear-gradient(135deg,var(--primary-2),var(--primary));color:#fff!important;box-shadow:0 8px 18px rgba(37,99,235,.30)}
.btn-primary:hover{transform:translateY(-1px);box-shadow:0 10px 22px rgba(37,99,235,.42)}
.btn-outline{background:var(--surface);border-color:var(--border);color:var(--text)!important}
.btn-outline:hover{border-color:var(--primary);color:var(--primary)!important}
.btn-ghost{background:var(--surface);border-color:var(--primary);color:var(--primary)!important}
.btn-ghost:hover{background:var(--primary-soft)}
.btn-card{width:100%;background:var(--surface);border-color:var(--border);color:var(--primary)!important;margin-top:auto}
.btn-card:hover{background:var(--primary-soft);border-color:var(--primary)}
.btn-block{width:100%}

.level-badge{display:inline-block;padding:5px 12px;border-radius:99px;font-size:11.5px;font-weight:700;color:#fff!important;line-height:1.5}
.level-1{background:var(--green)}
.level-2{background:#f59e0b}
.level-3{background:var(--red)}
.level-7{background:var(--green)}
.level-8{background:var(--blue)}
.level-9{background:var(--violet)}
.level-10{background:var(--red)}
.level-0{background:var(--muted)}

/* ===== Ôn tập: kiến thức – công thức ===== */
.kn-tabs{display:flex;gap:8px;margin:14px 0}
.kn-tab{flex:1;text-align:center;padding:11px 8px;border-radius:13px;background:var(--surface);border:1.5px solid var(--border);font-weight:700;color:var(--text);font-size:14.5px}
.kn-tab.is-active{background:var(--primary);border-color:var(--primary);color:#fff}
.kn-search{display:flex;align-items:center;gap:9px;background:var(--surface);border:1.5px solid var(--border);border-radius:13px;padding:10px 14px;margin-bottom:14px}
.kn-search input{flex:1;border:0;background:transparent;font:inherit;font-size:14.5px;color:var(--text);outline:none}
.kn-list{display:flex;flex-direction:column;gap:10px}
.kn-topic{padding:0;overflow:hidden}
.kn-topic-head{display:flex;align-items:center;gap:11px;padding:15px 16px;cursor:pointer;font-weight:700;list-style:none}
.kn-topic-head::-webkit-details-marker{display:none}
.kn-topic-ico{flex:none;width:34px;height:34px;border-radius:9px;display:grid;place-items:center;background:var(--primary-soft);color:var(--primary)}
.kn-topic-title{flex:1;font-size:15px}
.kn-topic-head > .ic{transition:transform .2s;color:var(--muted);flex:none}
.kn-topic[open] .kn-topic-head > .ic{transform:rotate(90deg)}
.kn-topic-body{padding:0 16px 14px}
.kn-sec{padding-top:8px}
.kn-sec-h{font-size:13.5px;font-weight:700;color:var(--primary);margin:8px 0 4px}
.kn-formulas{margin:0;padding-left:18px;display:flex;flex-direction:column;gap:6px}
.kn-formulas li{font-size:14px;line-height:1.6;color:var(--text)}
.kn-lessons{margin-top:14px;padding-top:12px;border-top:1px dashed var(--border)}
.kn-lessons-h{display:inline-flex;align-items:center;gap:7px}
.kn-lessons-list{list-style:none;margin:6px 0 0;padding:0;display:flex;flex-direction:column;gap:8px}
.kn-lessons-list a{display:flex;align-items:center;gap:10px;padding:10px 12px;border:1px solid var(--border);border-radius:11px;background:var(--surface-2);color:var(--text);font-size:14px;font-weight:600;transition:border-color .15s,background .15s}
.kn-lessons-list a:hover{border-color:var(--primary);background:var(--primary-soft)}
.kn-l-ico{flex:none;width:28px;height:28px;border-radius:8px;display:grid;place-items:center;background:var(--surface);color:var(--primary);border:1px solid var(--border)}
.kn-foot{margin-top:16px;font-size:13.5px}
.kn-empty{padding:16px;text-align:center;color:var(--muted)}

/* ===== Bộ đề ===== */
.bundle-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(290px,1fr));gap:14px;margin-top:14px}
.bundle-card{display:flex;flex-direction:column;gap:10px;padding:16px;text-decoration:none;color:var(--text);transition:box-shadow .15s,transform .15s}
.bundle-card:hover{box-shadow:0 10px 26px rgba(0,0,0,.09);transform:translateY(-2px)}
.bc-top{display:flex;gap:12px;align-items:flex-start}
.bc-badge{flex:none;width:54px;height:54px;border-radius:14px;display:flex;flex-direction:column;align-items:center;justify-content:center;font-weight:800;line-height:1.05}
.bc-badge small{font-size:9px;opacity:.85;font-weight:700;letter-spacing:.5px}
.bc-badge b{font-size:20px}
.bc-badge-10{background:#dcfce7;color:#16a34a}
.bc-badge-11{background:#ffedd5;color:#ea580c}
.bc-badge-12{background:#ede9fe;color:#7c3aed}
.bc-badge-thpt{background:#fee2e2;color:#dc2626;font-size:13px}
.bc-badge-thpt b{font-size:14px;letter-spacing:-.3px}
.bc-title{font-size:15px;font-weight:700;margin:2px 0 0;line-height:1.35}
.bc-chips{display:flex;flex-wrap:wrap;gap:6px}
.bc-chip{font-size:11.5px;font-weight:600;padding:3px 9px;border-radius:8px;background:var(--surface-2);color:var(--muted);border:1px solid var(--border)}
.bc-chip-dark{background:#111827;color:#fff;border-color:#111827}
.bc-chip-free{background:#dcfce7;color:#166534;border-color:#bbf7d0;font-weight:800}
.bc-chip-pro{background:#fef3c7;color:#b45309;border-color:#fde68a;font-weight:800}
.bc-price.is-free{color:#16a34a}
.tier-head{display:flex;align-items:flex-start;gap:12px;margin:22px 0 4px}
.tier-head .tier-ico{flex:none;line-height:0;margin-top:1px}
.tier-head .tier-ico svg{display:block}
.tier-head-free .tier-ico{color:#16a34a}
.tier-head-paid .tier-ico{color:#b45309}
.tier-head h2{margin:0;font-size:17px}
.tier-head p{margin:2px 0 0;font-size:12.5px;color:var(--muted)}
.tier-head-free h2{color:#16a34a}
.tier-head-paid h2{color:#b45309}
.free-cta{display:flex;align-items:center;gap:14px;margin-top:14px;padding:14px 16px;border:1px solid #fde68a;background:linear-gradient(100deg,#fffbeb,#fff7ed);border-radius:14px;text-decoration:none}
.free-cta .fc-ico{flex:none;line-height:0;color:#d97706}
.free-cta .fc-ico svg{display:block}
.free-cta .fc-body{flex:1;min-width:0;display:flex;flex-direction:column}
.free-cta .fc-body b{color:#92400e;font-size:14.5px}
.free-cta .fc-body small{color:#b45309;font-size:12.5px;margin-top:2px}
.free-cta .fc-go{flex:none;font-weight:700;color:#b45309;display:inline-flex;align-items:center;gap:4px}
.free-cta:hover{border-color:#f59e0b}
.bc-bar{display:flex;height:9px;border-radius:99px;overflow:hidden;background:var(--surface-2)}
.bc-bar span{height:100%}
.bc-legend{display:flex;flex-wrap:wrap;gap:6px 14px;font-size:11.5px;color:var(--muted)}
.bc-legend i{display:inline-block;width:9px;height:9px;border-radius:3px;margin-right:4px;vertical-align:middle}
.bc-legend b{color:var(--text)}
.bc-foot{display:flex;align-items:center;justify-content:space-between;margin-top:2px}
.bc-price{font-size:20px;font-weight:800;color:#16a34a}
.bc-view{font-size:13px;font-weight:600;color:var(--primary);display:inline-flex;align-items:center;gap:2px}
.bc-meta{display:flex;flex-direction:column;gap:2px;font-size:12px;color:var(--muted);border-top:1px solid var(--border);padding-top:8px}
.bc-prog b{color:#16a34a}
.bundle-buybar{position:relative;overflow:hidden;display:flex;flex-wrap:wrap;gap:16px;align-items:center;justify-content:space-between;border:1.5px solid #bbf7d0;border-radius:18px;background:linear-gradient(135deg,#f0fdf4 0%,#ecfdf5 55%,#eff6ff 100%);box-shadow:0 8px 26px rgba(22,163,74,.12);padding:20px 22px}
.bundle-buybar::before{content:"🔓";position:absolute;right:-6px;top:-18px;font-size:104px;line-height:1;opacity:.06;transform:rotate(-12deg);pointer-events:none}
.bundle-buybar.is-owned{border-color:var(--border);background:var(--surface-2);box-shadow:none}
.bundle-buybar.is-owned::before{content:"✓";color:#16a34a}
.bb-info{position:relative;z-index:1;flex:1;min-width:240px}
.bb-label{display:inline-block;font-size:11px;font-weight:800;letter-spacing:.8px;color:#fff;background:#16a34a;padding:3px 11px;border-radius:99px}
.bb-price{font-size:30px;font-weight:900;color:#15803d;margin:9px 0 0;line-height:1.05}
.bb-price small{font-size:12.5px;font-weight:600;color:var(--muted)}
.bb-note{margin:8px 0 0;font-size:14px;color:var(--text);line-height:1.5;max-width:560px}
.bb-hint{display:inline-block;margin:8px 0 0;font-size:12.5px;font-weight:600;color:#15803d;background:#dcfce7;padding:4px 11px;border-radius:8px}
.bb-action{position:relative;z-index:1;display:flex;flex-direction:column;align-items:flex-end;gap:8px}
.bb-action .buy-bundle{background:linear-gradient(135deg,#16a34a,#15803d);border:0;box-shadow:0 8px 18px rgba(22,163,74,.32);padding:13px 28px;font-size:15px;font-weight:700;border-radius:13px}
.bb-action .buy-bundle:hover{filter:brightness(1.06)}
.bb-balance{font-size:12.5px;color:var(--muted)}
@media (max-width:560px){.bundle-buybar{padding:16px}.bb-action{align-items:stretch;width:100%}.bb-action .btn{width:100%}.bb-balance{text-align:center}.bb-price{font-size:26px}}
.bundle-exams{display:flex;flex-direction:column;gap:10px}
.be-row{padding:14px}
.be-main{display:flex;align-items:center;gap:12px}
.be-ico{flex:none;width:44px;height:44px;border-radius:11px;background:#fee2e2;color:#dc2626;display:flex;flex-direction:column;align-items:center;justify-content:center;font-weight:800;font-size:13px;line-height:1.05}
.be-ico small{font-size:8.5px;font-weight:700;letter-spacing:.3px;opacity:.85}
.be-body{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
.be-title{font-weight:700;color:var(--text);text-decoration:none}
.be-meta{font-size:12px;color:var(--muted)}
.be-view{font-size:13px;font-weight:600;color:var(--primary);white-space:nowrap}
.be-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}
.btn-sm{padding:7px 12px;font-size:13px}
.btn-buy-answer{background:#f59e0b;color:#fff;border:0}
.btn-unlocked{background:#dcfce7;color:#16a34a;border:0;cursor:default}
.result-lock{margin-top:12px;padding:11px 14px;border-radius:11px;background:#fff7ed;color:#9a3412;font-size:13.5px}

/* ===== Chi tiết đề trong bộ ===== */
.crumbs{font-size:13px;color:var(--muted);margin:2px 0 12px;line-height:1.8}
.crumbs a{color:var(--primary);text-decoration:none}
.crumbs span{color:var(--text);font-weight:600}
.matrix-card{margin-top:14px;padding:18px}
.mx-head{display:flex;gap:12px;align-items:flex-start;margin-bottom:10px}
.mx-ico{flex:none;width:40px;height:40px;border-radius:11px;background:#dcfce7;color:#16a34a;display:flex;align-items:center;justify-content:center;font-size:20px}
.mx-head h2{margin:0;font-size:17px}
.mx-head .muted{margin:2px 0 0;font-size:12.5px}
.mx-bar{display:flex;height:10px;border-radius:99px;overflow:hidden;background:var(--surface-2);margin:4px 0 10px}
.mx-bar span{height:100%}
.mx-legend{display:flex;flex-wrap:wrap;gap:8px 16px;font-size:12.5px;color:var(--muted);margin-bottom:12px}
.mx-legend i{display:inline-block;width:10px;height:10px;border-radius:3px;margin-right:5px;vertical-align:middle}
.mx-legend b{color:var(--text)}
.mx-tablewrap{overflow-x:auto}
.mx-table{width:100%;border-collapse:collapse;font-size:13.5px}
.mx-table th,.mx-table td{padding:9px 10px;text-align:center;border-bottom:1px solid var(--border);white-space:nowrap}
.mx-table th:first-child,.mx-table td:first-child{text-align:left;white-space:normal}
.mx-table thead th{font-size:12px;color:var(--muted);font-weight:700}
.mx-table .mx-topic{font-weight:600}
.mx-table .mx-dot{color:var(--muted)}
.mx-table tfoot td{background:var(--surface-2);font-weight:700}

/* ===== Xem trước nội dung đề ===== */
.exam-preview{margin-top:16px;padding:24px 24px 20px;font-family:"Times New Roman",Times,Georgia,serif;color:#111;line-height:1.45;font-size:18px}
[data-theme="dark"] .exam-preview{color:#e8edf6}
.ep-head{display:flex;gap:14px;margin-bottom:6px}
.ep-l,.ep-r{flex:1 1 0;min-width:0;text-align:center}
.ep-brand{font-weight:800;font-size:20px;letter-spacing:.3px}
.ep-box{display:inline-block;border:1.5px solid currentColor;border-radius:4px;padding:1px 14px;font-weight:800;margin-top:4px;font-size:18px}
.ep-r1,.ep-r2{font-weight:800;font-size:18px}
.ep-muted{font-style:italic;font-size:15px;color:var(--muted);margin-top:3px}
.ep-cand{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;font-size:18px;margin:8px 0 4px}
.ep-made{border:1.5px solid currentColor;border-radius:4px;padding:2px 12px;font-weight:700;white-space:nowrap}
.ep-sbd{font-size:18px;margin-bottom:6px}
.ep-hr{border:none;border-top:1px solid var(--border);margin:6px 0 4px}
.ep-part{font-weight:800;margin:18px 0 8px;font-size:18px}
.ep-pi{font-style:italic;font-weight:400;font-size:16px;color:var(--muted)}
.ep-q{margin:12px 0;padding-left:2px}
.ep-qt{font-size:18px}
.ep-fig{margin:8px 0;text-align:center;overflow-x:auto}
.ep-fig svg{max-width:300px;width:100%;height:auto;display:inline-block}
.ep-opts{display:grid;grid-template-columns:1fr 1fr;gap:3px 22px;margin-top:5px;padding-left:24px;font-size:18px}
.ep-opt{padding:1px 0}
.ep-tfi{margin:4px 0 4px 20px;font-size:18px}
.ep-blank{color:var(--muted)}
.ep-blank-pr{display:block;margin-top:6px}
.ep-end{text-align:center;font-weight:800;letter-spacing:3px;margin:18px 0 6px;font-size:18px}
.ep-lock{display:flex;gap:12px;align-items:center;margin-top:14px;padding:16px;border:1.5px dashed #fbbf24;background:#fffbeb;border-radius:14px;font-family:var(--font,inherit)}
[data-theme="dark"] .ep-lock{background:#2a2410;border-color:#a16207}
.ep-lock-ico{font-size:26px;flex:none}
.ep-lock b{font-size:14.5px}
.ep-lock p{margin:3px 0 0;font-size:13px;color:var(--muted);line-height:1.5}
.ep-ans{margin-top:16px;padding-top:14px;border-top:2px solid var(--border)}
.ep-ans h3{text-align:center;font-size:19px;margin:0 0 12px}
.ep-akrow{margin:5px 0;font-size:18px}
.ep-sec{font-weight:800;margin:14px 0 5px;font-size:18px}
.ep-sol{margin:7px 0;font-size:18px}
.ep-soli{margin:3px 0;font-size:17px}
.ep-aktab{width:100%;border-collapse:collapse;margin:6px 0 14px;font-size:16px}
.ep-aktab th,.ep-aktab td{border:1px solid var(--border);padding:6px 18px;text-align:center}
.ep-aktab th{background:var(--surface-2,#eef2f7);font-weight:700}
.ep-akv{color:#c0392b;font-weight:800}
.ep-solq{margin:12px 0 3px;font-size:18px}
.ep-solans{margin:3px 0 5px;font-style:italic;font-size:17px}
.ep-solfig{text-align:center;margin:6px 0;overflow-x:auto}
.ep-solfig svg{max-width:300px;width:100%;height:auto;display:inline-block}
.ep-solbox{background:#f3f7fb;border-left:4px solid #2f6fb0;border-radius:0 8px 8px 0;padding:9px 14px;margin:3px 0 12px;font-size:16.5px;line-height:1.5}
.ep-solbox .ep-lg{font-style:italic;font-weight:700;display:block;margin-bottom:4px}
.ep-related{margin:20px 0 4px;padding:14px 16px;border:1px solid var(--green,#16a34a);border-radius:12px;background:rgba(22,163,74,.06)}
.ep-related-h{display:flex;align-items:center;gap:7px;font-weight:800;font-size:13px;letter-spacing:.04em;text-transform:uppercase;color:var(--green,#16a34a);margin-bottom:9px}
.ep-related-h svg{flex:none}
.ep-related-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:8px}
.ep-related-list li{display:flex;align-items:baseline;gap:7px;line-height:1.45}
.ep-related-list li::before{content:"›";color:var(--green,#16a34a);font-weight:800;flex:none}
.ep-related-list a{font-weight:700;color:var(--text);text-decoration:none}
.ep-related-list a:hover{color:var(--primary);text-decoration:underline}
.ep-related-c{color:var(--muted);font-weight:500;font-size:13.5px}
@media (max-width:560px){
	.ep-aktab{font-size:13px}.ep-aktab th,.ep-aktab td{padding:3px 6px}
	.ep-solq,.ep-solans,.ep-solbox{font-size:14px}
	.exam-preview{font-size:14.5px;padding:16px 13px}
	.ep-head{gap:8px}
	.ep-brand{font-size:14.5px;letter-spacing:0}
	.ep-box{font-size:13px;padding:1px 8px}
	.ep-r1,.ep-r2{font-size:12.5px}
	.ep-muted{font-size:11px}
	.ep-cand,.ep-sbd{font-size:12.5px}
	.ep-made{padding:1px 7px}
	.ep-part{font-size:14.5px}
	.ep-pi{font-size:12px}
	.ep-qt{font-size:14.5px}
	.ep-opts{gap:2px 10px;font-size:14px}
	.ep-tfi{font-size:14px;margin-left:14px}
	.ep-ans h3{font-size:15.5px}
	.ep-akrow,.ep-sec,.ep-sol{font-size:14px}
	.ep-soli{font-size:13px}
}

/* ===== Mở đáp án & lời giải ===== */
.answers-card{margin-top:16px;border:1.5px solid var(--border);border-radius:18px;overflow:hidden;background:var(--surface);box-shadow:0 6px 20px rgba(0,0,0,.06)}
.ans-banner{background:linear-gradient(135deg,#f97316,#ea580c);color:#fff;padding:20px 22px}
.answers-card.is-open .ans-banner{background:linear-gradient(135deg,#16a34a,#15803d)}
.ans-tag{font-size:11px;font-weight:800;letter-spacing:.6px;opacity:.95}
.ans-banner h2{margin:6px 0 4px;font-size:20px;color:#fff}
.ans-banner p{margin:0;font-size:13.5px;opacity:.96}
.ans-body{padding:16px}
.ans-opt{border:1.5px solid var(--border);border-radius:14px;padding:14px;margin-bottom:12px}
.ans-opt-bundle{background:#f0fdf4;border-color:#bbf7d0}
.ans-opt-head{display:flex;justify-content:space-between;gap:12px;align-items:flex-start;margin-bottom:10px}
.ans-opt-head b{font-size:15px}
.ans-opt-head small{display:block;color:var(--muted);font-size:12.5px;margin-top:3px;font-weight:400;line-height:1.5}
.ans-price{font-size:20px;font-weight:800;color:#ea580c;white-space:nowrap;text-align:right}
.ans-price.green{color:#16a34a}
.ans-price small{display:block;font-size:11px;color:var(--muted);font-weight:500}
.ans-btn-single{width:100%;background:linear-gradient(135deg,#f59e0b,#ea580c);color:#fff;border:0;font-weight:700;padding:13px}
.ans-btn-bundle{width:100%;background:linear-gradient(135deg,#16a34a,#15803d);color:#fff;border:0;font-weight:700;padding:13px}
.ans-balance{text-align:center;font-size:12.5px;color:var(--muted);margin:6px 0 0}
.ans-or{text-align:center;color:var(--muted);font-size:12.5px;margin:10px 0;position:relative}
.ans-or span{background:var(--surface);padding:0 12px;position:relative;z-index:1}
.ans-or::before{content:"";position:absolute;left:0;right:0;top:50%;height:1px;background:var(--border)}
.task-box{border:1.5px solid #bbf7d0;background:#f0fdf4;border-radius:14px;padding:14px;margin-bottom:12px}
.task-box h4{margin:0 0 4px;font-size:15px;color:#15803d}
.task-box>p{margin:0 0 10px;font-size:13px;color:var(--text);line-height:1.5}
.task-get{display:block;text-align:center;border-color:#16a34a;color:#15803d;background:#fff;margin-bottom:10px;font-weight:700}
.task-code-row{display:flex;gap:8px}
.task-code-input{flex:1;min-width:0;border:1.5px solid var(--border);border-radius:11px;padding:11px 14px;font:inherit;font-size:14px;text-transform:uppercase;background:#fff}
.task-unlock-btn{flex:none;background:#16a34a;color:#fff;border:0;font-weight:700}
.task-none{color:#dc2626;font-size:13px;margin:8px 0 0}
.task-hint{color:var(--muted);font-size:12px;margin:8px 0 0;line-height:1.5}
.count-badge{padding:5px 12px;border-radius:99px;background:var(--surface-2);color:var(--muted);font-size:11.5px;font-weight:700;white-space:nowrap}
.meta-chip{display:inline-flex;align-items:center;gap:5px;padding:5px 10px;border:1px solid var(--border);border-radius:9px;background:var(--surface-2);color:var(--muted);font-size:12px;font-weight:600}

/* ---------- Hero carousel ---------- */
.hero-carousel{position:relative;overflow:hidden;border-radius:var(--radius);box-shadow:var(--shadow)}
.hero-track{display:flex;transition:transform .45s ease;will-change:transform}
.hero-slide{flex:0 0 100%;min-width:100%;display:grid;grid-template-columns:minmax(0,1.25fr) minmax(0,.75fr);align-items:center;gap:8px;padding:24px 18px 36px;background:linear-gradient(160deg,#e9f1ff,#eef5ff 55%,#e7eeff)}
[data-theme="dark"] .hero-slide{background:linear-gradient(160deg,#1a2240,#161c30)}
.hero-badge{display:inline-block;background:rgba(255,255,255,.72);color:var(--primary);font-size:11px;font-weight:800;letter-spacing:.03em;padding:6px 12px;border-radius:99px;margin-bottom:12px}
[data-theme="dark"] .hero-badge{background:rgba(255,255,255,.1)}
.hero-text .hero-title{margin:0 0 10px;font-size:clamp(21px,5.6vw,30px);font-weight:800;line-height:1.18;letter-spacing:-.02em;color:var(--text)}
.hero-text .hero-title .accent{color:var(--primary)}
.hero-text p{margin:0 0 16px;font-size:13.5px;color:var(--muted);line-height:1.5}
.hero-cta{display:flex;flex-wrap:nowrap;gap:7px}
.hero-cta .btn{flex:1 1 0;min-width:0;justify-content:center;padding:10px 8px;font-size:13px;gap:5px}
@media (max-width:560px){.hero-cta .btn .ic{display:none}}
.hero-art{position:relative}
.hero-svg{display:block;width:100%;height:auto;max-width:200px;margin-left:auto}
.hero-dots{position:absolute;left:0;right:0;bottom:14px;display:flex;justify-content:center;gap:7px}
.hero-dot{width:8px;height:8px;border-radius:99px;border:0;padding:0;background:rgba(37,99,235,.32);cursor:pointer;transition:width .2s,background .2s}
.hero-dot.is-active{width:22px;background:var(--primary)}

/* hero illustration (themable) */
.hs-blob{fill:var(--primary-soft)}
.hs-blob2{fill:var(--primary-soft);opacity:.6}
.hs-phone{fill:var(--surface);stroke:var(--primary);stroke-width:2.5}
.hs-axis{stroke:var(--muted);stroke-width:1.4;stroke-linecap:round}
.hs-curve{stroke:var(--primary);stroke-width:2.6;fill:none;stroke-linecap:round}
.hs-txt{fill:var(--muted);font-size:9px;font-family:var(--font)}
.hs-opt{fill:none;stroke:var(--border);stroke-width:1.6}
.hs-opt-on{fill:var(--primary);stroke:var(--primary)}
.hs-letter{fill:var(--muted);font-size:8px;font-weight:700;text-anchor:middle;font-family:var(--font)}
.hs-letter.on{fill:#fff}
.hs-bar{fill:var(--border)}
.hs-bar.on{fill:var(--primary);opacity:.35}
.hs-badge{fill:var(--primary)}
.hs-badge-txt{fill:#fff;font-size:19px;font-weight:800;text-anchor:middle;font-family:var(--font)}
.hs-book1{fill:var(--primary)}
.hs-book2{fill:var(--primary-2)}
.hs-ruler{fill:var(--primary-2);opacity:.85}

/* ---------- Quick actions ---------- */
.quick{display:grid;grid-template-columns:repeat(5,1fr);gap:6px;padding:16px 10px}
.qa{display:flex;flex-direction:column;align-items:center;text-align:center;gap:7px;padding:6px 2px;color:var(--text);min-width:0}
.qa:hover{color:var(--primary)}
.qa-ico{width:46px;height:46px;border-radius:14px;display:grid;place-items:center}
.qa b{font-size:12px;font-weight:700;line-height:1.2}
.qa small{font-size:10px;color:var(--muted);line-height:1.2;display:block}
.qa-blue{background:var(--blue-soft);color:var(--blue)}
.qa-green{background:var(--green-soft);color:var(--green)}
.qa-violet{background:var(--violet-soft);color:var(--violet)}
.qa-orange{background:var(--orange-soft);color:var(--orange)}
.qa-teal{background:var(--teal-soft);color:var(--teal)}

/* ---------- Luyện theo lớp ---------- */
.grade-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}
.grade-card{display:flex;flex-direction:row;align-items:center;gap:12px;padding:14px 16px;color:var(--text);transition:transform .15s,box-shadow .15s,border-color .15s}
.grade-card:hover{transform:translateY(-2px);border-color:var(--primary);box-shadow:0 10px 24px rgba(37,99,235,.12)}
.gc-num{flex:none;width:52px;height:52px;border-radius:14px;display:grid;place-items:center;font-size:26px;font-weight:800;line-height:1}
.gc-body{flex:1;min-width:0}
.gc-body b{display:block;font-size:15px;font-weight:800;line-height:1.2}
.gc-body small{font-size:12px;color:var(--muted)}
.gc-blue .gc-num{background:var(--blue-soft);color:var(--blue)}
.gc-violet .gc-num{background:var(--violet-soft);color:var(--violet)}
.gc-orange .gc-num{background:var(--orange-soft);color:var(--orange)}
@media(max-width:640px){.grade-card{gap:9px;padding:12px}.gc-num{width:40px;height:40px;font-size:19px;border-radius:11px}.gc-body b{font-size:13.5px}.gc-body small{display:none}}

/* ---------- Theo kỳ thi ---------- */
.cat-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:10px}
.cat-card{display:flex;align-items:center;gap:11px;padding:12px 13px;color:var(--text);transition:transform .15s,box-shadow .15s,border-color .15s}
.cat-card:hover{transform:translateY(-2px);border-color:var(--primary);box-shadow:0 10px 24px rgba(37,99,235,.12)}
.cat-ico{width:42px;height:42px;border-radius:12px;display:grid;place-items:center;flex:none}
.cat-tx{min-width:0}
.cat-tx b{display:block;font-size:13px;font-weight:700;line-height:1.25}
.cat-tx small{font-size:11px;color:var(--muted)}
@media(min-width:560px){.cat-grid{grid-template-columns:repeat(3,1fr)}}

/* Promo: đề mới mỗi ngày */
.daily-promo{display:flex;align-items:center;gap:14px;padding:14px 16px;color:var(--text);background:linear-gradient(135deg,var(--primary-soft),var(--violet-soft));border:0}
.daily-promo:hover{box-shadow:0 10px 24px rgba(37,99,235,.15);transform:translateY(-1px)}
.daily-ico{font-size:30px;flex:none}
.daily-body{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
.daily-body b{font-size:15px;color:var(--text)}
.daily-body small{font-size:12.5px;color:var(--muted);line-height:1.45}
.daily-go{flex:none;color:var(--primary)}

/* ---------- Section heads ---------- */
.section-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:12px}
.section-head h2{margin:0;font-size:18px;font-weight:800;letter-spacing:-.01em;color:var(--text)}
.view-all{display:inline-flex;align-items:center;gap:2px;font-size:13.5px;font-weight:700;color:var(--primary);white-space:nowrap}

/* ---------- Exam rows ---------- */
.exam-list{display:flex;flex-direction:column;gap:12px}
.exam-row{display:flex;align-items:center;gap:14px;padding:14px;color:var(--text);transition:transform .15s,box-shadow .15s,border-color .15s}
.exam-row:hover{transform:translateY(-2px);border-color:var(--primary);box-shadow:0 10px 24px rgba(37,99,235,.12)}
.exam-no{flex:none;width:84px;height:84px;border-radius:14px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;text-align:center}
.exam-no small{font-size:10px;font-weight:700;letter-spacing:.03em;opacity:.85}
.exam-no b{font-size:30px;font-weight:800;line-height:1}
.exam-no.n-blue{background:var(--blue-soft);color:var(--blue)}
.exam-no.n-green{background:var(--green-soft);color:var(--green)}
.exam-no.n-amber{background:var(--amber-soft);color:var(--amber-ink)}
.exam-no.n-violet{background:var(--violet-soft);color:var(--violet)}
.exam-thumb{position:relative;flex:none;width:84px;height:84px;border-radius:16px;display:flex;flex-direction:column;align-items:center;justify-content:center;overflow:hidden;text-align:center;padding:10px 8px}
.exam-thumb.n-blue{background:var(--blue-soft);color:var(--blue)}
.exam-thumb.n-green{background:var(--green-soft);color:var(--green)}
.exam-thumb.n-amber{background:var(--amber-soft);color:var(--amber-ink)}
.exam-thumb.n-violet{background:var(--violet-soft);color:var(--violet)}
.et-glyph{position:absolute;right:-8px;bottom:-16px;font-size:64px;font-weight:700;line-height:1;opacity:.12;font-family:"Times New Roman",Times,serif;pointer-events:none}
.et-main{position:relative;z-index:1;display:flex;flex-direction:column;align-items:center;line-height:1}
.et-main small{font-size:10px;font-weight:800;letter-spacing:.09em;opacity:.82}
.et-main b{font-size:32px;font-weight:800;letter-spacing:-.01em;margin-top:1px}
.et-main-g b{font-size:40px;font-family:"Times New Roman",Times,serif;font-weight:700;margin-top:0}
.et-tag{position:relative;z-index:1;margin-top:4px;font-size:9px;font-weight:800;letter-spacing:.02em;text-transform:uppercase;opacity:.8;max-width:100%;line-height:1.15}
.exam-row-body{flex:1;min-width:0;display:flex;flex-direction:column;gap:6px}
.exam-row-title{font-size:15px;font-weight:700;line-height:1.4;color:var(--text);display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.exam-row-meta{display:flex;align-items:center;gap:8px;font-size:12.5px;color:var(--muted);font-weight:500}
.exam-row-meta .erm{display:inline-flex;align-items:center;gap:4px}
.exam-row-meta .ic{opacity:.85}
.exam-row-price{font-size:13.5px;font-weight:700;color:var(--text)}
.exam-row-price.free{color:var(--green)}
.exam-row-go{flex:none;color:var(--muted)}
.exam-row:hover .exam-row-go{color:var(--primary)}

/* ---------- User stats ---------- */
.user-stats{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;padding:18px 12px}
.ustat{display:flex;flex-direction:column;align-items:center;text-align:center;gap:6px;min-width:0}
.ustat-ico{width:44px;height:44px;border-radius:50%;display:grid;place-items:center}
.ustat-num{font-size:19px;font-weight:800;letter-spacing:-.01em;color:var(--text)}
.ustat-label{font-size:11px;color:var(--muted);line-height:1.25}
.streak-card{display:flex;align-items:center;gap:14px;padding:16px 18px;margin-bottom:16px}
.streak-card.on{border-color:#f6c453;background:rgba(246,196,83,.12)}
.streak-fire{font-size:30px;line-height:1;flex:none;filter:grayscale(1);opacity:.45}
.streak-card.on .streak-fire{filter:none;opacity:1}
.streak-tx{flex:1;min-width:0}
.streak-tx b{display:block;font-size:16px;font-weight:800;line-height:1.25}
.streak-tx small{color:var(--muted);font-size:12.5px}
.streak-btn{flex:none;background:var(--primary);color:#fff;font-weight:700;font-size:13px;padding:9px 16px;border-radius:10px;text-decoration:none}
.streak-btn:hover{filter:brightness(.96)}
.st-blue{background:var(--blue-soft);color:var(--blue)}
.st-green{background:var(--green-soft);color:var(--green)}
.st-violet{background:var(--violet-soft);color:var(--violet)}
.st-orange{background:var(--orange-soft);color:var(--orange)}

/* ---------- Widgets (leaderboard / notices) ---------- */
.extra-grid{display:grid;grid-template-columns:1fr;gap:14px}
.widget{padding:18px}
.widget-title{margin:0;font-size:12.5px;font-weight:800;letter-spacing:.06em;text-transform:uppercase;color:var(--text)}
.widget-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px}
.empty-note{padding:18px;font-size:14px;color:var(--muted)}

.lb-tabs{display:inline-flex;gap:2px;padding:4px;border-radius:10px;background:var(--surface-2);margin:0 0 10px}
.lb-tabs button{border:0;background:transparent;padding:6px 11px;border-radius:8px;font:inherit;font-size:12px;font-weight:600;color:var(--muted);cursor:pointer}
.lb-tabs button.active{background:var(--surface);color:var(--text);box-shadow:0 1px 4px rgba(22,26,44,.1)}
.lb-tabs .lb-tab{padding:6px 12px;border-radius:8px;font-size:12px;font-weight:600;color:var(--muted)}
.lb-tabs .lb-tab.active{background:var(--surface);color:var(--text);box-shadow:0 1px 4px rgba(22,26,44,.1)}
.lb-list{margin:0;padding:0;list-style:none;display:flex;flex-direction:column}
.lb-item{display:flex;align-items:center;gap:10px;padding:8px 6px;border-radius:10px}
.lb-item:hover{background:var(--surface-2)}
.lb-rank{width:24px;height:24px;border-radius:50%;display:grid;place-items:center;font-size:11px;font-weight:800;background:var(--surface-2);color:var(--muted);flex:none}
.lb-rank.r1{background:linear-gradient(135deg,#fde68a,#f59e0b);color:#7a4d00}
.lb-rank.r2{background:linear-gradient(135deg,#e5e7eb,#9ca3af);color:#374151}
.lb-rank.r3{background:linear-gradient(135deg,#fdba74,#ea850c);color:#7c2d12}
.lb-ava{width:30px;height:30px;border-radius:50%;overflow:hidden;background:var(--primary-soft);display:grid;place-items:center;font-size:12px;color:var(--primary);flex:none}
.lb-ava img{width:100%;height:100%;object-fit:cover;border-radius:50%}
.lb-name{flex:1;min-width:0;font-size:13.3px;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.lb-score{font-size:12.3px;font-weight:700;color:var(--muted);flex:none}

.notice-list{margin:0;padding:0;list-style:none}
.notice-item{display:flex;gap:12px;padding:11px 0;border-top:1px solid var(--border)}
.notice-item:first-child{border-top:0;padding-top:2px}
.notice-ico{width:40px;height:40px;border-radius:12px;display:grid;place-items:center;font-size:16px;flex:none}
.notice-ico.n-blue{background:var(--blue-soft)}
.notice-ico.n-red{background:var(--red-soft)}
.notice-ico.n-orange{background:var(--orange-soft)}
.notice-ico.n-green{background:var(--green-soft,#dcfce7)}
.notice-ico.n-violet{background:var(--violet-soft,#ede9fe)}
.notice-ico.n-teal{background:var(--teal-soft,#ccfbf1)}
.notice-ava{border-radius:50%;overflow:hidden;background:var(--primary-soft);color:var(--primary);font-weight:700}
.notice-ava img{width:100%;height:100%;object-fit:cover;border-radius:50%}
.act-line{display:block;font-size:13px;font-weight:600;color:var(--text);line-height:1.45}
.act-line .act-verb{font-weight:500;color:var(--muted)}
.act-line .act-tgt{color:var(--primary);font-weight:700}
.act-line a.act-tgt{text-decoration:none}
.act-line a.act-tgt:hover{text-decoration:underline}
.notice-item.act-enter{animation:ttpActIn .45s ease}
.notice-item.act-leave{animation:ttpActOut .4s ease forwards;overflow:hidden}
@keyframes ttpActIn{from{opacity:0;transform:translateY(-10px)}to{opacity:1;transform:none}}
@keyframes ttpActOut{from{opacity:1}to{opacity:0;transform:translateY(8px)}}
.notice-title{display:block;font-size:13.3px;font-weight:600;color:var(--text);line-height:1.45}
a.notice-title:hover{color:var(--primary)}
.notice-time{display:block;margin-top:2px;font-size:11.8px;color:var(--muted)}

/* ---------- Guide card ---------- */
.guide-card .guide-steps{margin:10px 0 16px;padding-left:20px;display:flex;flex-direction:column;gap:9px;font-size:13.8px;line-height:1.55;color:var(--muted)}
.guide-card .guide-steps b{color:var(--text)}
.guide-card .btn{width:100%}
@media (min-width:700px){.guide-card .btn{width:auto}}

/* ---------- Account / dashboard / ranking ---------- */
.auth-card{padding:24px 20px;max-width:480px;margin:0 auto;width:100%}
.auth-title{margin:0 0 6px;font-size:24px;font-weight:800}
.auth-card form{margin-top:14px;display:flex;flex-direction:column;gap:12px}
.auth-card label{font-size:13px;font-weight:600;color:var(--text);display:flex;flex-direction:column;gap:6px}
.auth-card input[type="text"],.auth-card input[type="password"]{padding:11px 14px;border:1px solid var(--border);border-radius:12px;background:var(--surface-2);font:inherit;font-size:14px;color:var(--text)}
.auth-card .login-remember{flex-direction:row;align-items:center;gap:7px;font-weight:500;color:var(--muted)}
.auth-card #wp-submit{width:100%;background:linear-gradient(135deg,var(--primary-2),var(--primary));color:#fff;border:0;border-radius:12px;padding:12px;font:inherit;font-weight:700;font-size:14.5px;cursor:pointer}
.auth-social{margin-top:16px;text-align:center}
.auth-or{display:block;font-size:12.5px;color:var(--muted);margin-bottom:10px}
.social-btns{display:flex;gap:10px}
.social-btns .btn{flex:1}
.auth-note{font-size:11.5px;margin:10px 0 0}
.login-note{margin:14px 0 0;text-align:center;font-size:13px;color:var(--muted)}
.login-note a{font-weight:700}

.auth-tabs{display:flex;gap:6px;background:var(--surface-2);border-radius:12px;padding:4px;margin-bottom:16px}
.auth-tab{flex:1;border:0;background:transparent;padding:10px;border-radius:9px;font:inherit;font-weight:700;font-size:14px;color:var(--muted);cursor:pointer}
.auth-tab.is-active{background:var(--surface);color:var(--primary);box-shadow:0 1px 4px rgba(22,26,44,.1)}
.auth-panel[hidden]{display:none}
.ttp-register,.ttp-login{display:flex;flex-direction:column;gap:12px}
.ttp-register label,.ttp-login label{font-size:13px;font-weight:600;color:var(--text);display:flex;flex-direction:column;gap:6px}
.ttp-register input[type="text"],.ttp-register input[type="email"],.ttp-register input[type="password"],.ttp-login input[type="text"],.ttp-login input[type="password"]{padding:11px 14px;border:1px solid var(--border);border-radius:12px;background:var(--surface-2);font:inherit;font-size:14px;color:var(--text)}
.ttp-register input:focus,.ttp-login input:focus{outline:none;border-color:var(--primary)}
.ttp-register .auth-check,.ttp-login .auth-check{flex-direction:row;align-items:flex-start;gap:8px;font-weight:500;color:var(--muted)}
.ttp-register .auth-check input,.ttp-login .auth-check input{flex:none;margin-top:2px}
.auth-check span{font-size:13px;line-height:1.4}
.login-row{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}
.login-row .auth-check{margin:0;align-items:center}
.login-row .auth-check input{margin-top:0}
.auth-link-sm{font-size:13px;font-weight:600;color:var(--primary);white-space:nowrap}
.field-err{color:var(--red);font-size:12px;font-weight:600}
.auth-error{background:var(--red-soft);color:var(--red);padding:10px 14px;border-radius:10px;font-size:13px;font-weight:600}
.auth-link{border:0;background:transparent;color:var(--primary);font:inherit;font-weight:700;cursor:pointer;padding:0}
.auth-welcome{background:var(--green-soft);color:var(--green);padding:12px 16px;border-radius:12px;font-weight:600;font-size:14px}

.profile-head{display:flex;align-items:center;gap:14px;padding:18px}
.profile-ava img{width:60px;height:60px;border-radius:50%;display:block}
.profile-info{flex:1;min-width:0}
.profile-info h1{margin:0 0 4px;font-size:20px;font-weight:800}
.plan-badge{display:inline-block;font-size:11.5px;font-weight:800;padding:3px 10px;border-radius:99px;background:var(--surface-2);color:var(--muted)}
.plan-badge.plan-pro{background:var(--blue-soft);color:var(--blue)}
.plan-badge.plan-premium{background:linear-gradient(135deg,#fcd34d,#f59e0b);color:#7a4d00}
.profile-upgrade{display:inline-block;margin-top:6px;font-size:12.5px;font-weight:700;color:var(--primary)}

.cert-card{display:flex;align-items:center;gap:14px;padding:18px;background:linear-gradient(135deg,var(--primary-soft),var(--violet-soft));border:0}
.cert-ico{font-size:38px;flex:none}
.cert-card b{font-size:15.5px;color:var(--text)}
.cert-card p{margin:2px 0 0;font-size:13px}

.history-list,.rank-list{display:flex;flex-direction:column;padding:6px}
.history-row,.rank-row{display:flex;align-items:center;flex-wrap:wrap;gap:10px 12px;padding:12px 10px;border-top:1px solid var(--border)}
.history-row:first-child,.rank-row:first-child{border-top:0}
.hr-main{flex:1;min-width:0;display:flex;flex-direction:column;gap:3px}
.hr-title{font-size:14px;font-weight:700;color:var(--text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.hr-meta{font-size:12px;color:var(--muted)}
.hr-score{flex:none;font-size:18px;font-weight:800;color:var(--red);min-width:34px;text-align:center}
.hr-score.good{color:var(--green)}
.hr-actions{display:flex;gap:8px;flex:none}
.hr-btn{padding:7px 12px;font-size:12.5px}
/* So sánh kết quả (trend) */
.trend-chart{display:flex;align-items:flex-end;gap:6px;height:160px;padding-top:6px}
.trend-col{flex:1;min-width:0;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;height:100%;gap:4px}
.trend-val{font-size:11px;font-weight:700;color:var(--primary)}
.trend-bar{width:72%;max-width:30px;min-height:6px;border-radius:6px 6px 0 0;background:linear-gradient(180deg,var(--primary-2),var(--primary))}
.trend-bar.low{background:linear-gradient(180deg,#fca5a5,var(--red))}
.trend-x{font-size:10px;color:var(--muted)}
.rank-info{flex:1;min-width:0;display:flex;flex-direction:column}
.rank-sub{font-size:12px;color:var(--muted)}
.rank-score{flex:none;font-weight:800;color:var(--primary)}
.rank-score small{font-weight:600;color:var(--muted);font-size:11px}

.lb-privacy-note{margin:10px 0 0;font-size:12.5px;color:var(--muted);background:var(--surface-2);border-radius:10px;padding:9px 12px;line-height:1.45}
.live-online{display:inline-flex;align-items:center;gap:8px;margin:0 0 4px;padding:8px 14px;border-radius:999px;background:var(--green-soft,#e3f6e8);color:#0a7d2c;font-size:13px;font-weight:600}
.live-online b{font-weight:800}
.footer-right{display:flex;flex-direction:column;gap:6px;align-items:flex-end;margin-left:auto}
.total-visits{font-size:12.5px;color:var(--muted)}
.total-visits b{font-weight:800;color:var(--text)}
@media(max-width:560px){.footer-right{align-items:center}}
.live-online .lo-dot{width:9px;height:9px;border-radius:50%;background:#16a34a;box-shadow:0 0 0 0 rgba(22,163,74,.5);animation:ttpOnlinePulse 1.8s infinite}
@keyframes ttpOnlinePulse{0%{box-shadow:0 0 0 0 rgba(22,163,74,.5)}70%{box-shadow:0 0 0 7px rgba(22,163,74,0)}100%{box-shadow:0 0 0 0 rgba(22,163,74,0)}}
/* bảng xếp hạng dạng bảng + phân trang */
.rank-tbl-wrap{padding:6px 6px 2px;overflow-x:auto}
.rank-tbl{width:100%;border-collapse:collapse;font-size:13.3px}
.rank-tbl th{text-align:left;font-size:11px;font-weight:700;letter-spacing:.03em;text-transform:uppercase;color:var(--muted);padding:10px 12px;border-bottom:1px solid var(--border);white-space:nowrap}
.rank-tbl td{padding:11px 12px;border-top:1px solid var(--border);vertical-align:middle}
.rank-tbl tbody tr:first-child td{border-top:0}
.rank-tbl .rt-rank{width:56px}
.rank-tbl .rt-num,.rank-tbl th.rt-num{text-align:center;white-space:nowrap;color:var(--muted)}
.rank-tbl .rt-score,.rank-tbl th.rt-score{text-align:right;white-space:nowrap}
.rank-tbl td.rt-score{font-weight:800;color:var(--primary)}
.rank-tbl .rt-name{display:flex;align-items:center;gap:10px;min-width:160px}
.rank-pager{display:flex;align-items:center;justify-content:center;gap:12px;flex-wrap:wrap;margin:14px 0 4px}
.rp-btn{padding:7px 14px;border-radius:9px;background:var(--surface);border:1px solid var(--border);font-size:13px;font-weight:600;color:var(--text);text-decoration:none}
.rp-btn:hover{background:var(--surface-2)}
.rp-btn.is-off{opacity:.4;pointer-events:none}
.rp-info{font-size:12.5px;color:var(--muted)}
@media(max-width:560px){.rank-tbl .rt-num:nth-child(4),.rank-tbl th.rt-num:nth-child(4){display:none}}

/* topic bars (dùng chung với kết quả thi) */
.topic-bars{display:flex;flex-direction:column;gap:12px}
.topic-row .topic-head{display:flex;justify-content:space-between;font-size:13px;font-weight:600;color:var(--text);margin-bottom:5px}
.topic-bar{height:9px;border-radius:99px;background:var(--surface-2);overflow:hidden}
.topic-bar span{display:block;height:100%;border-radius:99px;background:linear-gradient(90deg,var(--primary-2),var(--primary))}

/* ---------- Ôn tập (lessons) ---------- */
.lesson-grid{display:grid;grid-template-columns:1fr;gap:12px}
.lesson-card{display:flex;gap:14px;padding:14px;color:var(--text);transition:transform .15s,box-shadow .15s,border-color .15s}
.lesson-card:hover{transform:translateY(-2px);border-color:var(--primary);box-shadow:0 10px 24px rgba(37,99,235,.12)}
.lesson-ico{flex:none;width:52px;height:52px;border-radius:12px;display:grid;place-items:center;background:var(--surface-2);color:var(--primary)}
.lesson-ico.l-ly-thuyet{background:var(--blue-soft);color:var(--blue)}
.lesson-ico.l-bai-tap{background:var(--green-soft);color:var(--green)}
.lesson-ico.l-video{background:var(--red-soft);color:var(--red)}
.lesson-body{flex:1;min-width:0;display:flex;flex-direction:column;gap:4px}
.lesson-type{font-size:11.5px;font-weight:700;color:var(--primary);text-transform:uppercase;letter-spacing:.03em}
.lesson-title{font-size:15px;font-weight:700;line-height:1.4;color:var(--text)}
.lesson-ex{font-size:12.8px;color:var(--muted);line-height:1.5;display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.video-wrap{position:relative;padding-top:56.25%;margin:14px 0;border-radius:14px;overflow:hidden;background:#000}
.video-wrap iframe{position:absolute;inset:0;width:100%;height:100%;border:0}
.video-placeholder{margin:14px 0;padding:40px 16px;border-radius:14px;background:var(--surface-2);text-align:center;color:var(--muted);font-weight:600}
.lesson-cta{display:flex;gap:10px;flex-wrap:wrap;margin-top:18px}
@media (min-width:700px){.lesson-grid{grid-template-columns:1fr 1fr}}

/* ---------- AI ---------- */
.ai-card{padding:18px}
.ai-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:4px}
.ai-head .widget-title{margin:0}
.ai-desc{margin:0 0 12px;font-size:13.5px}
.ai-out{margin-top:14px}
.ai-out:empty{margin:0}
.ai-loading{color:var(--muted);font-size:14px}
.ai-box{padding:14px 16px;border-radius:12px;background:var(--primary-soft);font-size:14px;line-height:1.65;color:var(--text)}
.ai-box.ai-err{background:var(--red-soft);color:var(--red)}

/* ---------- Pricing ---------- */
.pricing-grid{display:grid;grid-template-columns:1fr;gap:14px}
.price-card{position:relative;padding:24px 20px;display:flex;flex-direction:column}
.price-card.popular{border-color:var(--primary);box-shadow:0 12px 30px rgba(37,99,235,.16)}
.price-card.current{outline:2px solid var(--green)}
.price-tag{position:absolute;top:-11px;left:20px;background:linear-gradient(135deg,var(--primary-2),var(--primary));color:#fff;font-size:11px;font-weight:800;padding:4px 12px;border-radius:99px}
.price-name{margin:0 0 6px;font-size:18px;font-weight:800;color:var(--text)}
.price-amount{display:flex;align-items:baseline;gap:6px;margin-bottom:16px}
.price-amount b{font-size:30px;font-weight:800;color:var(--primary)}
.price-amount span{font-size:13px;color:var(--muted)}
.price-features{list-style:none;margin:0 0 18px;padding:0;display:flex;flex-direction:column;gap:10px;font-size:14px;color:var(--text)}
.price-features li{display:flex;gap:9px;align-items:flex-start;line-height:1.45}
.chk{color:var(--green);font-weight:800;flex:none}
.price-card .btn{margin-top:auto}
.price-current{opacity:.7;cursor:default}
.pricing-note{text-align:center;font-size:12.5px;margin:4px 0 0}
@media (min-width:700px){.pricing-grid{grid-template-columns:repeat(3,1fr);align-items:start}}

/* Upgrade modal */
.upgrade-modal{position:fixed;inset:0;z-index:120;display:flex;align-items:center;justify-content:center;padding:18px}
.upgrade-modal[hidden]{display:none}
.upgrade-overlay{position:absolute;inset:0;background:rgba(8,12,26,.5)}
.upgrade-box{position:relative;z-index:1;max-width:380px;width:100%;padding:26px 22px;text-align:center}
.upgrade-x{position:absolute;top:12px;right:14px;border:0;background:transparent;font-size:18px;color:var(--muted);cursor:pointer}
.upgrade-ico{font-size:40px;line-height:1}
.upgrade-box h3{margin:8px 0 10px;font-size:20px;font-weight:800;color:var(--text)}
.upgrade-box p{margin:0 0 10px;font-size:14px;color:var(--muted);line-height:1.55}
.upgrade-box .upgrade-contact{font-size:16px;color:var(--primary);margin-bottom:14px}
.upgrade-box .btn{margin-top:8px}

/* ---------- Ví số dư ---------- */
.wallet-card{padding:18px}
.wallet-head{display:flex;align-items:center;justify-content:space-between;gap:12px}
.wallet-bal{display:flex;flex-direction:column;gap:2px}
.wallet-label{font-size:12.5px;color:var(--muted)}
.wallet-amount{font-size:24px;font-weight:800;color:var(--primary);letter-spacing:-.01em}
.wallet-log{list-style:none;margin:14px 0 0;padding:14px 0 0;border-top:1px solid var(--border);display:flex;flex-direction:column;gap:10px}
.wallet-log li{display:flex;align-items:center;justify-content:space-between;gap:10px}
.wl-note{font-size:13px;color:var(--text);display:flex;flex-direction:column;gap:2px;min-width:0}
.wl-date{font-size:11px;color:var(--muted)}
.wl-amt{font-size:14px;font-weight:800;white-space:nowrap}
.wl-amt.plus{color:var(--green)}
.wl-amt.minus{color:var(--red)}
.wallet-mini{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:12px 16px;font-size:14px}
.wallet-mini b{color:var(--primary)}
.wallet-mini-link{font-weight:700;font-size:13px;white-space:nowrap}
.wallet-msg{padding:11px 14px;border-radius:11px;font-size:13.5px;font-weight:600}
.wallet-msg.ok{background:var(--green-soft);color:var(--green)}
.wallet-msg.err{background:var(--red-soft);color:var(--red)}
.wallet-msg.err a{color:var(--red);text-decoration:underline;font-weight:700}
.ttp-toast{position:fixed;left:50%;top:50%;transform:translate(-50%,-50%) scale(.94);z-index:9999;width:calc(100% - 40px);max-width:380px;padding:18px 22px;border-radius:16px;font-size:15px;line-height:1.55;font-weight:600;color:#fff;background:#1f2937;box-shadow:0 18px 50px rgba(0,0,0,.34);opacity:0;transition:opacity .22s,transform .22s;text-align:center}
.ttp-toast.show{opacity:1;transform:translate(-50%,-50%) scale(1)}
.ttp-toast.err{background:linear-gradient(135deg,#ef4444,#dc2626)}
.ttp-toast.ok{background:linear-gradient(135deg,#16a34a,#15803d)}
.ttp-toast a{color:#fff;text-decoration:underline;font-weight:800;white-space:nowrap}
.ttp-modal-ov{position:fixed;inset:0;z-index:10000;display:flex;align-items:center;justify-content:center;padding:20px;background:rgba(15,23,42,.55);opacity:0;transition:opacity .2s}
.ttp-modal-ov.show{opacity:1}
.ttp-modal{width:100%;max-width:380px;background:var(--surface);color:var(--text);border-radius:18px;padding:22px 22px 18px;box-shadow:0 24px 60px rgba(0,0,0,.35);transform:scale(.93);transition:transform .2s}
.ttp-modal-ov.show .ttp-modal{transform:scale(1)}
.ttp-modal-body{font-size:15.5px;line-height:1.55;font-weight:600;color:var(--text)}
.ttp-modal-actions{display:flex;gap:10px;justify-content:flex-end;margin-top:20px}
.ttp-modal-btn{font:inherit;font-weight:700;font-size:14px;padding:10px 20px;border-radius:11px;cursor:pointer;border:0;transition:filter .15s,background .15s}
.ttp-modal-cancel{background:var(--surface-2);color:var(--text)}
.ttp-modal-cancel:hover{filter:brightness(.96)}
.ttp-modal-ok{background:linear-gradient(135deg,var(--primary),#1d4ed8);color:#fff}
.ttp-modal-ok:hover{filter:brightness(1.05)}
.ul-modal{width:100%;max-width:440px;background:var(--surface);color:var(--text);border-radius:20px;overflow:hidden;box-shadow:0 24px 60px rgba(0,0,0,.4);transform:scale(.94);transition:transform .2s,max-width .2s;display:flex;flex-direction:column;max-height:calc(100vh - 40px)}
.ul-modal--wide{max-width:720px}
.ttp-modal-ov.show .ul-modal{transform:scale(1)}
.ul-head{position:relative;background:linear-gradient(135deg,#f59e0b,#ea580c);color:#fff;padding:18px 48px 18px 20px}
.ul-tag{font-size:11px;font-weight:800;letter-spacing:.5px;display:inline-flex;align-items:center;gap:5px;opacity:.96}
.ul-head h3{margin:6px 0 0;font-size:17px;color:#fff;line-height:1.35;display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.ul-close{position:absolute;top:14px;right:14px;background:rgba(255,255,255,.22);border:0;color:#fff;width:32px;height:32px;border-radius:9px;cursor:pointer;display:grid;place-items:center}
.ul-tabs{display:flex;gap:8px;padding:14px 16px 0}
.ul-tab{flex:1;padding:11px;border:0;background:var(--surface-2);color:var(--muted);font:inherit;font-weight:700;border-radius:11px 11px 0 0;cursor:pointer}
.ul-tab.is-active{background:var(--surface);color:var(--primary);box-shadow:inset 0 -3px 0 var(--primary)}
.ul-body{padding:16px;overflow-y:auto;flex:1 1 auto;min-height:0}
.ul-pane{display:none}
.ul-pane.is-active{display:block}
.ul-opt{border:1.5px solid var(--border);border-radius:14px;padding:14px;margin-bottom:12px}
.ul-opt-bundle{background:var(--green-soft);border-color:#bbf7d0}
.ul-opt-h{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-bottom:10px;font-size:15px}
.ul-price{font-size:18px;font-weight:800;color:#ea580c;white-space:nowrap}
.ul-price.green{color:#16a34a}
.ul-act{width:100%;font-weight:700;padding:12px;display:inline-flex;align-items:center;justify-content:center;gap:7px}
.ul-buy-answer{background:linear-gradient(135deg,#f59e0b,#ea580c);color:#fff;border:0}
.ul-buy-bundle{background:linear-gradient(135deg,#16a34a,#15803d);color:#fff;border:0}
.ul-balance{text-align:center;font-size:12.5px;color:var(--muted);margin:6px 0 0}
.ul-login{text-align:center;color:var(--muted);font-size:13.5px;margin:0 0 10px}
.ul-task{border:1.5px solid #bbf7d0;background:var(--green-soft);border-radius:14px;padding:14px}
.ul-task h4{margin:0 0 4px;color:#15803d;font-size:15px;display:flex;align-items:center;gap:6px}
.ul-task>p{margin:0 0 10px;font-size:13px;line-height:1.5}
.ul-task-get{border-color:#16a34a;color:#15803d;background:var(--surface);margin-bottom:10px}
.ul-code-row{display:flex;gap:8px;align-items:stretch}
.ul-code{flex:1 1 auto;min-width:0;width:auto;border:1.5px solid var(--border);border-radius:11px;padding:11px 14px;font:inherit;font-size:14px;text-transform:uppercase;background:var(--surface);color:var(--text)}
.ul-unlock{flex:0 0 auto;width:auto;white-space:nowrap;background:#16a34a;color:#fff;border:0;padding:11px 18px;font-weight:700;display:inline-flex;align-items:center;gap:6px;border-radius:11px}
/* Mobile: ô nhập mã full hàng, các nút (Mở khoá / Đổi từ khoá) xuống hàng dưới chia đều. */
@media(max-width:560px){
.task-code-row,.ul-code-row{flex-wrap:wrap}
.task-code-input,.ul-code{flex:1 1 100%}
.task-unlock-btn,.ul-unlock,.ttp-change{flex:1 1 0;justify-content:center;white-space:nowrap}
}
.ul-none{color:#dc2626;font-size:13px;margin:8px 0 0}
.ul-hint{color:var(--muted);font-size:12px;margin:8px 0 0;line-height:1.5}
.ul-foot{padding:12px 16px;border-top:1px solid var(--border);font-size:12.5px;color:var(--muted);line-height:1.5}
.buy-balance{display:block;margin-top:10px;font-size:12.5px;color:var(--muted)}
.plan-until{display:inline-block;margin-top:6px;font-size:11.5px;color:var(--muted)}
.bank-box{text-align:left;background:var(--surface-2);border-radius:12px;padding:12px 14px;margin:6px 0 10px;display:flex;flex-direction:column;gap:8px}
.bank-box>div{display:flex;justify-content:space-between;gap:12px;font-size:13.5px}
.bank-box span{color:var(--muted)}
.bank-box b{color:var(--text);text-align:right}
.amt-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:8px;margin-bottom:12px}
.amt-chip{padding:12px;border:1.5px solid var(--border);border-radius:12px;background:var(--surface);font:inherit;font-weight:700;font-size:14px;color:var(--text);cursor:pointer;transition:border-color .15s,background .15s,color .15s}
.amt-chip:hover{border-color:var(--primary)}
.amt-chip.active{border-color:var(--primary);background:var(--primary-soft);color:var(--primary)}
.amt-custom{display:flex;flex-direction:column;gap:6px;font-size:13px;font-weight:600;color:var(--text)}
.amt-custom input{padding:11px 14px;border:1px solid var(--border);border-radius:12px;background:var(--surface-2);font:inherit;font-size:14px;color:var(--text)}
.amt-custom input:focus{outline:none;border-color:var(--primary)}
.pend-badge{display:inline-block;font-size:10.5px;font-weight:700;padding:2px 8px;border-radius:99px;background:var(--amber-soft);color:var(--amber-ink);margin-right:4px}
@media (min-width:560px){.amt-grid{grid-template-columns:repeat(3,1fr)}}

/* ---------- Archive / index / single ---------- */
.page-head{padding:18px;margin-bottom:0}
.page-head h1{margin:0 0 4px;font-size:22px;font-weight:800;letter-spacing:-.01em;color:var(--text)}
.page-head .muted{margin:0;font-size:13.5px}
.filter-chips{display:flex;gap:8px;overflow-x:auto;padding:2px 0 4px;-webkit-overflow-scrolling:touch;scrollbar-width:none}
.filter-chips::-webkit-scrollbar{display:none}

/* multi-filter panel */
.exam-filters{padding:0;overflow:hidden}
.filters-summary{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:14px 16px;cursor:pointer;font-weight:700;font-size:14.5px;color:var(--text);list-style:none}
.filters-summary::-webkit-details-marker{display:none}
.filters-summary>span{display:inline-flex;align-items:center;gap:8px}
.filters-clear{font-size:12.5px;font-weight:700;color:var(--red)}
.filters-body{display:flex;flex-direction:column;gap:13px;padding:14px 16px 16px;border-top:1px solid var(--border)}
.filter-group{display:flex;flex-direction:column;gap:7px}
.filter-label{font-size:11.5px;font-weight:800;text-transform:uppercase;letter-spacing:.04em;color:var(--muted)}
.chip{flex:none;display:inline-flex;align-items:center;gap:6px;padding:8px 14px;border-radius:99px;border:1px solid var(--border);background:var(--surface);color:var(--muted);font-size:13px;font-weight:600;white-space:nowrap}
.chip:hover,.chip.active{background:var(--primary);border-color:var(--primary);color:#fff}

.exam-price{font-size:18px;font-weight:800;letter-spacing:-.01em}
.exam-price.free{color:var(--green)}
.exam-card-thumb{display:block;border-radius:14px;overflow:hidden;margin-bottom:14px;aspect-ratio:1200/500;background:var(--surface-2);border:1px solid var(--border)}
.exam-card-thumb img{width:100%;height:100%;object-fit:cover;display:block;transition:transform .3s ease}
.exam-card:hover .exam-card-thumb img{transform:scale(1.03)}
.exam-card-top{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:10px}
.exam-meta{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:12px}

.single-exam{padding:20px}
.single-title{margin:10px 0 12px;font-size:clamp(20px,4.6vw,27px);font-weight:800;line-height:1.3;letter-spacing:-.01em;color:var(--text)}
.single-buybar{display:flex;flex-direction:column;gap:12px;margin:16px 0;padding:16px;border:1px solid var(--border);border-radius:14px;background:var(--surface-2)}
.single-buybar .exam-price{margin:0;font-size:22px}
.buy-actions{display:flex;gap:10px;flex-wrap:wrap}
.buy-actions .btn{flex:1;min-width:150px}

.entry-content{font-size:15px}
.entry-content p{margin:0 0 1em}
.entry-content h2{font-size:20px;margin:1.5em 0 .6em}
.entry-content h3{font-size:17px;margin:1.3em 0 .5em}
.entry-content ul,.entry-content ol{margin:0 0 1.2em;padding-left:1.3em}
.entry-content blockquote{margin:1.2em 0;padding:12px 16px;border-left:3px solid var(--primary);background:var(--surface-2);border-radius:0 10px 10px 0}

.post-list{display:flex;flex-direction:column;gap:12px}
.post-row{display:flex;gap:12px;padding:16px;align-items:flex-start}
.type-chip{flex:none;margin-top:2px;padding:4px 10px;border-radius:99px;background:var(--primary-soft);color:var(--primary);font-size:11px;font-weight:700;white-space:nowrap}
.post-row-title{margin:0 0 4px;font-size:16px;font-weight:700}
.post-row-title a{color:var(--text)}
.post-row-title a:hover{color:var(--primary)}
.post-row p{margin:0 0 4px;font-size:13.5px}

.search-form{display:flex;gap:8px}
.search-form input[type="search"]{flex:1;min-width:0;padding:11px 14px;border:1px solid var(--border);border-radius:12px;background:var(--surface-2);font:inherit;font-size:14px;color:var(--text)}
.search-form input[type="search"]:focus{outline:none;border-color:var(--primary)}

.pagination{margin-top:22px}
.pagination .nav-links{display:flex;gap:8px;justify-content:center;flex-wrap:wrap}
.page-numbers{min-width:40px;height:40px;display:inline-grid;place-items:center;padding:0 12px;border-radius:11px;background:var(--surface);border:1px solid var(--border);color:var(--muted);font-weight:700;font-size:14px}
.page-numbers:hover{border-color:var(--primary);color:var(--primary)}
.page-numbers.current{background:var(--primary);border-color:var(--primary);color:#fff}

/* legacy layout fallback (page.php / single.php) -> single column */
.layout{display:block;padding:18px 0}
.sidebar{display:none}
.main-col{min-width:0}
.cat-list .cat-ico{flex:none;display:inline-grid;place-items:center;width:26px;height:26px;border-radius:7px;background:var(--surface-2);color:var(--primary);vertical-align:middle}

/* ---------- Footer ---------- */
.site-footer{border-top:1px solid var(--border);background:var(--surface);margin-top:18px}
.footer-inner{display:flex;flex-wrap:wrap;gap:12px 16px;align-items:center;justify-content:space-between;text-align:left;padding:18px 12px;font-size:12.5px;color:var(--muted)}
.footer-left{display:flex;flex-direction:column;gap:6px}
.footer-inner p{margin:0}
.footer-inner a{color:var(--text);font-weight:600}
.footer-inner a:hover{color:var(--primary)}
@media(max-width:560px){.footer-inner{flex-direction:column-reverse;align-items:center;text-align:center}.footer-right{margin-left:0}}

/* ---------- Responsive: tablet ---------- */
@media (min-width:700px){
  .app-main{gap:22px;padding-top:22px}
  .hero-slide{padding:34px 32px 42px}
  .hero-text .hero-title{font-size:clamp(28px,3.6vw,38px)}
  .hero-text p{font-size:15px;margin-bottom:18px}
  .hero-cta{flex-wrap:wrap;gap:10px}
  .hero-cta .btn{flex:0 1 auto;padding:11px 18px;font-size:14px;gap:7px}
  .hero-svg{max-width:280px}
  .quick{padding:20px;gap:10px}
  .qa-ico{width:54px;height:54px}
  .qa b{font-size:13px}
  .qa small{font-size:11px}
  .section-head h2{font-size:20px}
  .exam-list{display:grid;grid-template-columns:repeat(2,1fr);gap:14px}
  .extra-grid{grid-template-columns:repeat(2,1fr);align-items:stretch}
  .user-stats{padding:22px 18px;gap:14px}
  .ustat-ico{width:50px;height:50px}
  .ustat-num{font-size:22px}
  .ustat-label{font-size:12px}
}

/* ---------- Responsive: desktop (app shell stays centered) ---------- */
@media (min-width:1024px){
  .hero-svg{max-width:320px}
}

/* ---------- Responsive: small phones ---------- */
@media (max-width:380px){
  .user-stats{grid-template-columns:repeat(2,1fr);gap:14px}
  .exam-no,.exam-thumb{width:72px;height:72px}
  .exam-no b,.et-main b{font-size:26px}
  .et-main-g b{font-size:34px}
}

@media (prefers-reduced-motion:reduce){
  *{animation:none!important;transition:none!important;scroll-behavior:auto!important}
}

/* ============ Kiến thức (Cẩm nang) & Ôn tập ============ */
.kt-hero{display:flex;gap:18px;align-items:center;padding:24px 26px;margin-bottom:16px;border:0;color:#fff;background:linear-gradient(120deg,#3056d3,#7c3aed)}
.kt-hero-ico{flex:none;width:54px;height:54px;border-radius:16px;display:grid;place-items:center;background:rgba(255,255,255,.18)}
.kt-hero-tx{flex:1;min-width:0}
.kt-hero-tx h1{margin:0 0 4px;font-size:24px;font-weight:800;color:#fff}
.kt-hero-tx p{margin:0;font-size:13.5px;color:rgba(255,255,255,.9);line-height:1.5}
.kt-hero-note{margin-top:6px!important;font-size:12.5px!important;color:rgba(255,255,255,.78)!important}
.kt-hero-chips{display:flex;gap:8px;margin-top:12px;flex-wrap:wrap}
.kt-chip{display:inline-flex;align-items:center;gap:6px;padding:5px 12px;border-radius:99px;background:rgba(255,255,255,.16);font-size:12.5px;font-weight:600}
.kt-chip b{font-weight:800}

/* Hộp "Mở khoá cả lớp" trên hero Ôn tập */
.ot-unlock-all{flex:none;width:300px;max-width:42%;background:rgba(255,255,255,.12);border:1px solid rgba(255,255,255,.25);border-radius:14px;padding:14px}
.ot-ua-tag{font-size:11px;font-weight:800;letter-spacing:.04em;display:flex;align-items:center;gap:6px;margin-bottom:9px;color:rgba(255,255,255,.92)}
.ot-ua-btn{display:flex;align-items:center;justify-content:center;gap:8px;width:100%;border:0;cursor:pointer;background:#fff;color:#3056d3;font-weight:800;font-size:14px;padding:12px;border-radius:11px;text-align:center}
.ot-ua-btn.owned{background:rgba(255,255,255,.2);color:#fff;cursor:default}
.ot-ua-meta{margin:8px 0 0;font-size:11.5px;color:rgba(255,255,255,.82);line-height:1.5}
.ot-ua-meta s{opacity:.7}
.ot-ua-meta a{color:#fff;text-decoration:underline}

/* Lưới chương */
.ch-head{display:flex;align-items:center;gap:10px;margin:6px 0 12px}
.ch-head h2{margin:0;font-size:18px;font-weight:800}
.ch-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:14px}
.ch-card{display:flex;flex-direction:column;padding:16px;color:var(--text);transition:transform .15s,box-shadow .15s,border-color .15s}
a.ch-card:hover{transform:translateY(-2px);border-color:var(--primary);box-shadow:0 10px 24px rgba(37,99,235,.12)}
.ch-card-top{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px}
.ch-no{font-size:12px;font-weight:800;color:var(--primary);background:var(--primary-soft);padding:3px 10px;border-radius:8px}
.ch-lop{font-size:11px;font-weight:700;color:var(--muted);background:var(--surface-2);padding:3px 8px;border-radius:7px}
.ch-title{margin:0 0 10px;font-size:16px;font-weight:800;line-height:1.3}
.ch-chude{list-style:none;margin:0 0 12px;padding:0;display:flex;flex-direction:column;gap:6px}
.ch-chude li{display:flex;align-items:center;gap:6px;font-size:13px;color:var(--muted)}
.ch-chude li svg{color:var(--primary);flex:none}
.ch-chude .ch-more{color:var(--primary);font-weight:700;font-style:italic}
.ch-price{display:flex;align-items:center;gap:8px;justify-content:space-between;width:100%;border:1px solid #cdebd6;background:#f1f9f4;color:#1d6f33;font-weight:700;font-size:13px;padding:10px 12px;border-radius:10px;cursor:pointer;margin-bottom:10px}
.ch-price span{font-weight:800}
.ch-price.owned{cursor:default;border-color:#cdebd6}
button.ch-price:hover{background:#e6f5ec}
.ch-foot{display:flex;align-items:center;justify-content:space-between;margin-top:auto;padding-top:10px;border-top:1px solid var(--border);font-size:12.5px;color:var(--muted)}
.ch-foot span{display:inline-flex;align-items:center;gap:5px}
.ch-go{color:var(--primary);font-weight:800;display:inline-flex;align-items:center;gap:3px}

/* Luyện 1 chương: danh sách câu */
.ot-qlist{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:12px;counter-reset:none}
.ot-q{padding:16px}
.ot-q-text{margin:0 0 10px;font-size:15px;line-height:1.5}
.ot-opts{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.ot-opt{display:flex;align-items:center;gap:8px;padding:9px 12px;border:1px solid var(--border);border-radius:10px;background:var(--surface-2);font-size:14px}
.ot-opt.is-correct{border-color:#3fb463;background:#eafaf0;color:#1d6f33;font-weight:600}
.ot-letter{flex:none;width:24px;height:24px;border-radius:7px;display:grid;place-items:center;background:var(--surface);border:1px solid var(--border);font-weight:800;font-size:12px}
.ot-sol{margin-top:10px;padding:10px 12px;border-radius:10px;background:#eef4ff;color:#27408b;font-size:13.5px;line-height:1.55}
.ot-lock{margin-top:10px;display:inline-flex;align-items:center;gap:6px;color:var(--muted);font-size:12.5px;font-style:italic}
.ch-go.is-own{color:#1d6f33}
.ot-qlist-head{display:flex;align-items:center;gap:8px;margin:18px 0 10px;font-size:16px;font-weight:800}

/* ===== Chi tiết chương: hero + danh sách chủ đề ===== */
.cd-hero{display:flex;gap:22px;align-items:stretch;padding:26px 28px;margin-bottom:18px;border:0;color:#fff;background:linear-gradient(120deg,#3056d3,#7c3aed)}
.cd-hero-main{flex:1;min-width:0;display:flex;flex-direction:column;justify-content:center}
.cd-hero-tag{display:inline-flex;align-items:center;gap:6px;align-self:flex-start;font-size:11.5px;font-weight:800;letter-spacing:.05em;padding:4px 11px;border-radius:99px;background:rgba(255,255,255,.18);margin-bottom:10px}
.cd-hero-main h1{margin:0 0 14px;font-size:28px;line-height:1.2;font-weight:800;color:#fff}
.cd-hero-stats{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:14px}
.cd-hero-stat{display:inline-flex;align-items:center;gap:7px;padding:7px 15px;border-radius:99px;background:rgba(255,255,255,.16);font-size:13.5px;font-weight:600}
.cd-hero-stat b{font-weight:800;font-size:15px}
.cd-hero-desc{margin:0;font-size:13.5px;line-height:1.55;color:rgba(255,255,255,.88);max-width:60ch}
.cd-unlock{flex:none;width:320px;max-width:42%;background:#fff;border-radius:16px;padding:16px;color:var(--text);box-shadow:0 12px 30px rgba(20,30,80,.22);align-self:center}
.cd-unlock-tag{display:flex;align-items:center;gap:7px;font-size:11.5px;font-weight:800;letter-spacing:.04em;color:#16a34a;margin-bottom:10px}
.cd-unlock-btn{display:flex;align-items:center;justify-content:center;gap:9px;width:100%;border:0;cursor:pointer;background:linear-gradient(135deg,#22c55e,#16a34a);color:#fff;font-weight:800;font-size:15px;line-height:1.3;padding:14px 12px;border-radius:12px;text-align:center}
button.cd-unlock-btn:hover{filter:brightness(.96)}
.cd-unlock-btn.owned{background:#eafaf0;color:#1d6f33;cursor:default}
.cd-unlock-meta{margin:9px 0 0;font-size:12px;color:var(--muted);line-height:1.5}
.cd-unlock-meta s{opacity:.75}
.cd-unlock-grade{display:block;margin:8px 0 0;padding:0;border:0;background:none;cursor:pointer;font:inherit;font-size:13px;font-weight:700;color:var(--primary);text-align:left}
.cd-unlock-grade.owned,.cd-unlock-grade:not(button){color:var(--primary)}
p.cd-unlock-grade{color:#1d6f33}

.cd-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:14px}
.cd-card{display:flex;flex-direction:column;padding:18px;color:var(--text)}
.cd-card-h{margin:0;font:inherit}
.ot-related{padding:18px;margin-top:18px}
.ot-related-h{font-size:16px;font-weight:800;margin:0 0 12px;display:flex;align-items:center;gap:8px;color:var(--text);line-height:1.35}
.ot-related-list{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:1fr 1fr;gap:8px}
.ot-related-list a{display:flex;align-items:center;gap:7px;color:var(--primary);text-decoration:none;font-weight:600;font-size:14px;padding:9px 11px;border:1px solid var(--border);border-radius:10px;background:var(--surface-2);transition:border-color .15s,background .15s}
.ot-related-list a:hover{border-color:var(--primary);background:var(--primary-soft)}
.ot-related-more{margin:12px 0 0}
.ot-related-more a{color:var(--primary);font-weight:600;text-decoration:none;font-size:13.5px}
@media(max-width:560px){.ot-related-list{grid-template-columns:1fr}}
.cd-card-title{font-size:16px;font-weight:800;line-height:1.3;color:var(--text);text-decoration:none;display:block;margin-bottom:12px}
.cd-card-title:hover{color:var(--primary)}
.cd-badges{display:flex;gap:6px;flex-wrap:wrap;margin-bottom:12px}
.cd-b{font-size:11.5px;font-weight:700;padding:3px 9px;border-radius:7px}
.cd-b-tn{color:#15803d;background:#dcfce7}
.cd-b-ds{color:#7c3aed;background:#ede9fe}
.cd-b-dien{color:#c2410c;background:#ffedd5}
.cd-dang-label{font-size:10.5px;font-weight:800;letter-spacing:.06em;color:var(--muted);margin-bottom:7px}
.cd-dang{list-style:none;margin:0 0 4px;padding:0;display:flex;flex-direction:column;gap:7px}
.cd-dang li{position:relative;padding-left:14px;font-size:12.5px;line-height:1.45;color:var(--text);overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical}
.cd-dang li::before{content:"";position:absolute;left:2px;top:7px;width:5px;height:5px;border-radius:50%;background:var(--primary);opacity:.55}
.cd-dang-more{display:inline-block;margin:2px 0 12px;font-size:12.5px;font-weight:700;color:var(--primary);text-decoration:none}
.cd-dang-more:hover{text-decoration:underline}
.cd-buy{display:flex;align-items:center;justify-content:space-between;gap:8px;width:100%;margin-top:auto;border:1px solid #f0e2bf;background:#fdf7e8;color:#b45309;font-weight:600;font-size:12.5px;padding:11px 12px;border-radius:10px;cursor:pointer;text-decoration:none;white-space:nowrap}
.cd-buy span{display:inline-flex;align-items:center;gap:6px;min-width:0;overflow:hidden;text-overflow:ellipsis}
.cd-buy b{font-weight:800;white-space:nowrap;flex:0 0 auto}
button.cd-buy:hover{background:#fbefd2}
.cd-buy.owned{cursor:default;border-color:#cdebd6;background:#f1f9f4;color:#1d6f33;justify-content:flex-start;gap:7px}
.cd-free{display:flex;align-items:center;justify-content:flex-start;gap:7px;width:100%;margin-top:8px;border:1px solid #bbf7d0;background:#f0fdf4;color:#15803d;font-weight:700;font-size:12.5px;padding:10px 12px;border-radius:10px;cursor:pointer;text-align:left;white-space:nowrap}
.cd-free:hover{background:#e3f8ea}
.cd-foot{display:flex;align-items:center;justify-content:space-between;margin-top:12px;padding-top:11px;border-top:1px solid var(--border);font-size:12.5px;color:var(--muted)}
.cd-foot b{color:var(--text);font-weight:800}
.cd-foot-cau{display:inline-flex;align-items:center;gap:5px}
.cd-foot a{color:var(--primary);font-weight:800;display:inline-flex;align-items:center;gap:3px;text-decoration:none}

/* Luyện 1 chủ đề: thẻ các dạng câu hỏi */
.cd-dang-card{padding:16px 18px;margin-bottom:14px}
.cd-dang-title{display:flex;align-items:center;gap:8px;margin:0 0 10px;font-size:15px;font-weight:800}
.cd-dang-list{margin:0;padding-left:20px;display:flex;flex-direction:column;gap:6px}
.cd-dang-list li{font-size:13.5px;line-height:1.5}
.cd-dang-list .cd-more{list-style:none;margin-left:-20px;color:var(--primary);font-weight:700}
.lnk-btn{border:0;background:none;padding:0;cursor:pointer;font:inherit;color:var(--primary);font-weight:700;text-decoration:underline}
.ot-more{margin-top:12px}
.ot-more>summary{cursor:pointer;list-style:none;display:inline-flex;align-items:center;gap:7px;padding:10px 16px;border-radius:10px;background:var(--primary-soft);color:var(--primary);font-weight:700;font-size:13.5px}
.ot-more>summary::-webkit-details-marker{display:none}
.ot-more[open]>summary{margin-bottom:12px}
.ot-more .ot-qlist{margin-top:0}
.ot-tf{display:flex;gap:10px;margin-top:4px}
.ot-tf-opt{display:inline-flex;align-items:center;gap:6px;padding:8px 20px;border:1px solid var(--border);border-radius:10px;background:var(--surface-2);font-weight:600;font-size:14px}
.ot-tf-opt.is-correct{border-color:#3fb463;background:#eafaf0;color:#1d6f33}
.ot-fill-wrap{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-top:4px}
.ot-fill{max-width:220px;padding:9px 12px;border:1px solid var(--border);border-radius:10px;background:var(--surface-2);font-size:14px;color:var(--muted)}
.ot-free{display:inline-flex;align-items:center;gap:4px;margin-left:6px;padding:2px 8px;border-radius:99px;font-size:11px;font-weight:700;color:#15803d;background:#dcfce7;vertical-align:middle}

@media(max-width:880px){.cd-grid{grid-template-columns:repeat(2,1fr)}}
@media(max-width:640px){.ch-grid{grid-template-columns:1fr}.kt-hero{flex-direction:column;align-items:flex-start}.ot-unlock-all{width:100%;max-width:none}.ot-opts{grid-template-columns:1fr}.cd-hero{flex-direction:column}.cd-unlock{width:100%;max-width:none}.cd-hero-main h1{font-size:23px}.cd-grid{grid-template-columns:1fr}}

/* On-page SEO: đề liên quan + FAQ (single đề thi) */
.related-exams{margin-top:22px}
.related-h,.faq-h{font-size:18px;font-weight:800;margin:0 0 14px;color:var(--text)}
.exam-faq{margin-top:20px;padding:18px 16px}
.exam-faq .faq-h{margin:0 0 14px;font-size:19px;font-weight:800;color:var(--text);line-height:1.3}
.exam-faq .faq-item{border:1px solid var(--border);border-radius:14px;margin-bottom:10px;background:var(--surface-2);transition:border-color .2s ease,background .2s ease,box-shadow .2s ease}
.exam-faq .faq-item:last-child{margin-bottom:0}
.exam-faq .faq-item:hover{box-shadow:0 6px 18px -12px rgba(37,99,235,.4)}
.exam-faq .faq-item[open]{background:var(--surface);border-color:var(--primary);box-shadow:0 10px 26px -16px rgba(37,99,235,.55)}
.exam-faq .faq-item summary{cursor:pointer;list-style:none;padding:15px 16px 15px 18px;gap:14px;display:flex;align-items:center;justify-content:space-between;font-weight:700;font-size:15px;line-height:1.45;color:var(--text);transition:color .2s ease}
.exam-faq .faq-item summary::-webkit-details-marker{display:none}
.exam-faq .faq-item summary:hover{color:var(--primary)}
.exam-faq .faq-item[open] summary{color:var(--primary)}
.exam-faq .faq-item summary::after{content:"";flex:0 0 auto;width:28px;height:28px;border-radius:50%;background:var(--primary-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%232563eb' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") center/14px no-repeat;transition:transform .25s ease}
.exam-faq .faq-item[open] summary::after{transform:rotate(180deg)}
.exam-faq .faq-item .faq-a{padding:2px 18px 16px;color:var(--muted);line-height:1.7;font-size:14.5px}

/* Section giới thiệu SEO trang chủ */
.seo-intro h2{font-size:19px;font-weight:800;margin:0 0 14px;color:var(--text);line-height:1.3;display:flex;align-items:flex-start;gap:11px}
.seo-intro h2::before{content:"";flex:0 0 auto;width:5px;align-self:stretch;min-height:22px;border-radius:3px;background:linear-gradient(180deg,var(--primary),var(--primary-2))}
.seo-intro p{margin:0 0 12px;color:var(--muted);line-height:1.78;font-size:14.5px}
.seo-intro p:last-child{margin-bottom:0}
.seo-intro strong{color:var(--text);font-weight:700}
.seo-intro{margin-top:18px;padding:18px 16px}

/* =====================================================
   v2.79 – Portal homepage redesign (hocgioitoan.com)
   Top nav · hero · grade cards · exam feed · features · footer
   ===================================================== */
body{padding-bottom:0}
.shell{width:100%;max-width:1180px;margin:0 auto;padding:0 20px}

/* ---------- Top navigation bar ---------- */
.site-topbar{position:sticky;top:0;z-index:60;background:var(--surface);border-bottom:1px solid var(--border);box-shadow:0 2px 14px rgba(22,26,44,.05)}
.admin-bar .site-topbar{top:32px}
.topbar-inner{display:flex;align-items:center;gap:14px;height:72px}
.topbar-burger{display:none}
.tb-brand{display:flex;align-items:center;gap:11px;color:var(--text);flex:0 0 auto;min-width:0}
.tb-logo{width:42px;height:42px;border-radius:12px;background:linear-gradient(135deg,var(--primary-2),var(--primary));color:#fff;display:grid;place-items:center;flex:none;box-shadow:0 6px 14px rgba(37,99,235,.32)}
.tb-logo-img{height:44px;width:auto;max-width:240px;object-fit:contain;display:block;flex:none}
@media(max-width:520px){.tb-logo-img{height:40px;max-width:62vw}}
.tb-brand-text{display:flex;flex-direction:column;line-height:1.18;min-width:0}
.tb-brand-text strong{font-size:18px;font-weight:800;color:var(--primary);letter-spacing:-.01em;white-space:nowrap}
.tb-brand-text small{font-size:11.5px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.topbar-nav{flex:0 0 auto;min-width:0;margin:0 auto}
.topbar-nav .nav-list{list-style:none;margin:0;padding:0;display:flex;align-items:center;justify-content:center;gap:2px;flex-wrap:wrap}
.topbar-nav .nav-list a{display:block;padding:8px 11px;border-radius:10px;color:var(--text);font-weight:600;font-size:14px;white-space:nowrap;transition:background .15s,color .15s}
.topbar-nav .nav-list a:hover,.topbar-nav .current-menu-item>a,.topbar-nav .current_page_item>a,.topbar-nav .current-menu-ancestor>a{background:var(--primary-soft);color:var(--primary)}
.topbar-actions{display:flex;align-items:center;gap:10px;flex:none}
.topbar-search{display:flex;align-items:center;gap:8px;padding:9px 13px;background:var(--surface-2);border:1px solid var(--border);border-radius:11px;color:var(--muted);width:190px}
.topbar-search input{flex:1;min-width:0;border:0;background:transparent;font:inherit;font-size:13.5px;color:var(--text)}
.topbar-search input:focus{outline:none}
.btn-login,.btn-register{display:inline-flex;align-items:center;justify-content:center;border-radius:11px;padding:9px 15px;font-weight:700;font-size:13.5px;white-space:nowrap;transition:background .15s,color .15s,border-color .15s;cursor:pointer}
.btn-login{border:1px solid var(--border);color:var(--text);background:var(--surface)}
.btn-login:hover{border-color:var(--primary);color:var(--primary)}
.btn-register{background:var(--primary);color:#fff;border:1px solid var(--primary)}
.btn-register:hover{background:var(--primary-dark);border-color:var(--primary-dark)}
.topbar-acct{display:none;place-items:center;width:42px;height:42px;border-radius:12px;background:var(--surface-2);color:var(--primary);flex:none;transition:background .15s,color .15s}
.topbar-acct:hover{background:var(--primary-soft)}

/* ---------- Top nav dropdowns ---------- */
.topbar-nav .nav-list{flex-wrap:nowrap}
.topbar-nav .menu-item{position:relative}
.topbar-nav .menu-item-has-children>a{display:inline-flex;align-items:center;gap:5px}
.topbar-nav .menu-item-has-children>a::after{content:"";width:0;height:0;border-left:4px solid transparent;border-right:4px solid transparent;border-top:5px solid currentColor;opacity:.55;transition:transform .2s ease}
.topbar-nav .menu-item-has-children:hover>a::after,.topbar-nav .menu-item-has-children:focus-within>a::after{transform:rotate(180deg)}
.topbar-nav .menu-item-has-children::after{content:"";position:absolute;left:0;right:0;top:100%;height:10px}
.topbar-nav .sub-menu{list-style:none;margin:0;padding:8px;position:absolute;top:calc(100% + 8px);left:50%;transform:translateX(-50%) translateY(6px);min-width:218px;background:var(--surface);border:1px solid var(--border);border-radius:14px;box-shadow:var(--shadow);opacity:0;visibility:hidden;transition:opacity .18s ease,transform .18s ease,visibility .18s;z-index:80}
.topbar-nav .menu-item-has-children:hover>.sub-menu,.topbar-nav .menu-item-has-children:focus-within>.sub-menu{opacity:1;visibility:visible;transform:translateX(-50%)}
.topbar-nav .sub-menu .menu-item{position:static}
.topbar-nav .sub-menu a{display:block;padding:10px 12px;border-radius:9px;font-size:14px;font-weight:600;color:var(--text);white-space:nowrap}
.topbar-nav .sub-menu a:hover{background:var(--primary-soft);color:var(--primary)}
.drawer-nav .sub-menu{list-style:none;margin:2px 0 8px;padding:0 0 0 12px;display:none;flex-direction:column;gap:2px;border-left:2px solid var(--border)}
.drawer-nav .menu-item.is-open>.sub-menu{display:flex}
.drawer-nav .sub-menu a{font-weight:500;font-size:14px;color:var(--muted);padding:9px 12px}
.drawer-nav .menu-item-has-children>a{display:flex;align-items:center;justify-content:space-between;gap:8px}
.drawer-nav .menu-item-has-children>a::after{content:"";flex:none;width:0;height:0;border-left:4px solid transparent;border-right:4px solid transparent;border-top:5px solid currentColor;opacity:.5;transition:transform .2s}
.drawer-nav .menu-item.is-open>a::after{transform:rotate(180deg)}
@media(max-width:1320px){.topbar-search{display:none}}
@media(max-width:1280px){.tb-brand-text small{display:none}}

/* ---------- Hero ---------- */
.home-hero{padding:26px 0 4px}
.hero-inner{display:flex;align-items:center;gap:36px;background:linear-gradient(135deg,#e9f1ff,#f4f8ff);border:1px solid #e3edfb;border-radius:24px;padding:46px 52px;overflow:hidden}
[data-theme="dark"] .hero-inner{background:linear-gradient(135deg,rgba(37,99,235,.14),rgba(37,99,235,.05));border-color:var(--border)}
.hero-content{flex:1;min-width:0}
.hero-h1{font-size:clamp(27px,3.6vw,40px);font-weight:800;line-height:1.16;color:var(--text);margin:0 0 14px;letter-spacing:-.01em}
.hero-h1 span{color:var(--primary)}
.hero-sub{color:var(--muted);font-size:16px;line-height:1.7;margin:0 0 24px;max-width:540px}
.hero-search{display:flex;gap:6px;background:var(--surface);border:1px solid var(--border);border-radius:14px;padding:6px;max-width:580px;box-shadow:0 10px 30px -16px rgba(22,26,44,.3)}
.hero-search-input{flex:1;min-width:0;border:0;background:transparent;padding:12px 14px;font:inherit;font-size:15px;color:var(--text)}
.hero-search-input:focus{outline:none}
.hero-search-btn{display:inline-flex;align-items:center;gap:7px;background:var(--primary);color:#fff;border:0;border-radius:10px;padding:0 20px;font:inherit;font-weight:700;font-size:14.5px;cursor:pointer;white-space:nowrap;transition:background .15s}
.hero-search-btn:hover{background:var(--primary-dark)}
.hero-tags{margin-top:18px;display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.hero-tags-label{color:var(--muted);font-size:13px;font-weight:600}
.hero-tag{background:var(--surface);border:1px solid var(--border);border-radius:999px;padding:6px 13px;font-size:13px;font-weight:500;color:var(--text);transition:border-color .15s,color .15s}
.hero-tag:hover{border-color:var(--primary);color:var(--primary)}
.hero-illus{flex:none;width:300px;display:grid;place-items:center}
.hero-illus svg{width:100%;height:auto}

/* ---------- Section heading ---------- */
.home-section{margin-top:46px}
.home-section-head{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:20px}
.home-section-head h2{font-size:clamp(20px,2.3vw,26px);font-weight:800;color:var(--text);margin:0;letter-spacing:-.01em}
.section-viewall{display:inline-flex;align-items:center;gap:5px;color:var(--primary);font-weight:600;font-size:14px;white-space:nowrap}
.section-viewall:hover{text-decoration:underline}

/* ---------- Grade cards ---------- */
.gcards{display:grid;grid-template-columns:repeat(5,1fr);gap:18px}
.gcard{--gc:var(--primary);--gcs:var(--primary-soft);display:flex;flex-direction:column;gap:9px;padding:22px 18px;background:var(--surface);border:1px solid var(--border);border-radius:16px;box-shadow:var(--shadow);color:var(--text);transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease}
.gcard:hover{transform:translateY(-4px);box-shadow:0 16px 34px -18px rgba(22,26,44,.4);border-color:var(--gc)}
.gcard-ico{width:54px;height:54px;border-radius:14px;display:grid;place-items:center;background:var(--gcs);color:var(--gc)}
.gcard-grade{font-size:19px;font-weight:800;color:var(--gc)}
.gcard-desc{flex:1;font-size:13px;color:var(--muted);line-height:1.55}
.gcard-go{display:inline-flex;align-items:center;gap:5px;font-size:13.5px;font-weight:700;color:var(--gc);margin-top:4px}
.gc-green{--gc:var(--green);--gcs:var(--green-soft)}
.gc-blue{--gc:var(--blue);--gcs:var(--blue-soft)}
.gc-amber{--gc:var(--amber-ink);--gcs:var(--amber-soft)}
.gc-violet{--gc:var(--violet);--gcs:var(--violet-soft)}
.gc-red{--gc:var(--red);--gcs:var(--red-soft)}

/* ---------- Exam feed (đề mới cập nhật) ---------- */
.exam-tabs{display:flex;gap:6px;flex-wrap:nowrap;overflow-x:auto;border-bottom:1px solid var(--border);margin-bottom:14px;scrollbar-width:none}
.exam-tabs::-webkit-scrollbar{display:none}
.exam-tab{flex:none;background:transparent;border:0;border-bottom:2px solid transparent;padding:11px 8px;margin-bottom:-1px;font:inherit;font-weight:600;font-size:14.5px;color:var(--muted);white-space:nowrap;cursor:pointer;transition:color .15s,border-color .15s}
.exam-tab:hover{color:var(--primary)}
.exam-tab.is-active{color:var(--primary);border-bottom-color:var(--primary)}
.exam-panel[hidden]{display:none}
.exam-feed{display:flex;flex-direction:column;gap:10px}
.efeed-row{display:flex;align-items:center;gap:14px;padding:14px 16px;background:var(--surface);border:1px solid var(--border);border-radius:14px;transition:border-color .15s,box-shadow .15s}
.efeed-row:hover{border-color:var(--primary);box-shadow:0 10px 24px -16px rgba(37,99,235,.45)}
.efeed-badge{flex:none;min-width:62px;text-align:center;padding:7px 12px;border-radius:10px;font-weight:700;font-size:13px;background:var(--blue-soft);color:var(--blue)}
.efeed-badge.gb-green{background:var(--green-soft);color:var(--green)}
.efeed-badge.gb-blue{background:var(--blue-soft);color:var(--blue)}
.efeed-badge.gb-amber{background:var(--amber-soft);color:var(--amber-ink)}
.efeed-badge.gb-violet{background:var(--violet-soft);color:var(--violet)}
.efeed-badge.gb-red{background:var(--red-soft);color:var(--red)}
.efeed-main{flex:1;min-width:0}
.efeed-title{display:block;font-weight:700;font-size:15.5px;color:var(--text);line-height:1.4;transition:color .15s}
.efeed-title:hover{color:var(--primary)}
.efeed-meta{margin-top:5px;display:flex;flex-wrap:wrap;align-items:center;gap:7px;color:var(--muted);font-size:13px}
.efeed-meta i{color:var(--border);font-style:normal}
.efeed-actions{flex:none;display:flex;align-items:center;gap:8px}
.efeed-btn{border:1px solid var(--border);background:var(--surface);color:var(--primary);border-radius:9px;padding:9px 15px;font-weight:600;font-size:13.5px;transition:background .15s,border-color .15s}
.efeed-btn:hover{background:var(--primary-soft);border-color:var(--primary)}
.efeed-pdf{display:inline-flex;align-items:center;gap:5px;border:1px solid var(--border);background:var(--surface);color:var(--red);border-radius:9px;padding:9px 13px;font-weight:600;font-size:13.5px;transition:border-color .15s,background .15s}
.efeed-pdf:hover{border-color:var(--red);background:var(--red-soft)}

/* ---------- Feature cards ---------- */
.feature-cards{display:grid;grid-template-columns:repeat(4,1fr);gap:18px}
.fcard{display:flex;flex-direction:column;gap:12px;padding:24px 20px;background:var(--surface);border:1px solid var(--border);border-radius:16px;box-shadow:var(--shadow)}
.fcard-ico{width:52px;height:52px;border-radius:14px;display:grid;place-items:center}
.fcard-ico.f-blue{background:var(--blue-soft);color:var(--blue)}
.fcard-ico.f-green{background:var(--green-soft);color:var(--green)}
.fcard-ico.f-amber{background:var(--amber-soft);color:var(--amber-ink)}
.fcard-ico.f-violet{background:var(--violet-soft);color:var(--violet)}
.fcard-title{font-size:16px;font-weight:800;color:var(--text)}
.fcard-desc{margin:0;color:var(--muted);font-size:13.5px;line-height:1.65}

/* ---------- Footer ---------- */
.site-footer2{margin-top:54px;background:var(--surface-2);border-top:1px solid var(--border)}
.footer2-top{display:grid;grid-template-columns:1.7fr 1fr 1fr 1fr 1.4fr;gap:28px;padding-top:44px;padding-bottom:30px}
.footer2-brand .tb-brand strong{font-size:18px;color:var(--primary)}
.footer2-desc{color:var(--muted);font-size:13.5px;line-height:1.65;margin:13px 0;max-width:290px}
.footer2-copy{color:var(--muted);font-size:12.5px;line-height:1.6;margin:0}
.footer2-col h3{font-size:14.5px;font-weight:800;color:var(--text);margin:0 0 14px}
.footer2-col ul{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:9px}
.footer2-col a{color:var(--muted);font-size:13.5px;transition:color .15s}
.footer2-col a:hover{color:var(--primary)}
.footer2-news-note{color:var(--muted);font-size:13px;line-height:1.5;margin:0 0 12px}
.footer2-news{display:flex;flex-direction:column;gap:10px}
.footer2-news input{border:1px solid var(--border);border-radius:10px;padding:11px 13px;font:inherit;font-size:14px;background:var(--surface);color:var(--text)}
.footer2-news input:focus{outline:none;border-color:var(--primary)}
.footer2-news button{background:var(--primary);color:#fff;border:0;border-radius:10px;padding:11px 14px;font:inherit;font-weight:700;cursor:pointer;transition:background .15s}
.footer2-news button:hover{background:var(--primary-dark)}
.footer2-bottom{display:flex;align-items:center;justify-content:center;text-align:center;gap:16px;padding-top:20px;padding-bottom:26px;border-top:1px solid var(--border)}
.footer2-bottom .footer2-copy{font-size:13px}
.footer2-social{display:flex;gap:10px}
.footer2-brand .footer2-social{margin-top:16px}
.footer2-contact ul{gap:11px}
.footer2-contact li{color:var(--muted);font-size:13.5px;line-height:1.5}
.footer2-contact li span{font-weight:600;color:var(--text)}
.footer2-contact a{color:var(--muted)}
.footer2-contact a:hover{color:var(--primary)}
.fsoc{width:40px;height:40px;border-radius:11px;background:var(--surface);border:1px solid var(--border);display:grid;place-items:center;color:var(--muted);transition:background .15s,color .15s,border-color .15s}
.fsoc:hover{background:var(--primary);color:#fff;border-color:var(--primary)}
.backtotop{width:44px;height:44px;border-radius:50%;background:var(--primary);color:#fff;border:0;display:grid;place-items:center;cursor:pointer;box-shadow:0 8px 20px rgba(37,99,235,.4);transition:background .15s}
.backtotop:hover{background:var(--primary-dark)}

/* ---------- Responsive ---------- */
@media(max-width:1140px){
  .topbar-burger{display:grid}
  .topbar-nav,.topbar-search,.topbar-actions .btn-login,.topbar-actions .btn-register{display:none}
  .topbar-inner{gap:10px}
  .tb-brand{margin:0 auto}
  .topbar-acct{display:grid}
}
@media(max-width:1024px){
  .gcards{grid-template-columns:repeat(3,1fr)}
}
@media(max-width:860px){
  .hero-inner{flex-direction:column;align-items:flex-start;padding:30px 20px;gap:20px}
  .hero-illus{width:200px;align-self:center}
  .feature-cards{grid-template-columns:repeat(2,1fr)}
  .footer2-top{grid-template-columns:1fr 1fr;gap:26px 22px}
  .footer2-brand{grid-column:1 / -1}
}
@media(max-width:680px){
  .gcards{grid-template-columns:repeat(2,1fr)}
  .efeed-row{flex-wrap:wrap;gap:10px 14px}
  .efeed-actions{width:100%;justify-content:flex-start}
  .efeed-btn{flex:1}
  .hero-illus{display:none}
  .hero-search{flex-wrap:wrap}
  .hero-search-btn{width:100%;padding:12px}
}
@media(max-width:520px){
  .feature-cards{grid-template-columns:1fr}
  .shell{padding:0 14px}
  .home-hero{padding:18px 0 4px}
  .hero-inner{padding:24px 16px}
  .footer2-top{padding-top:32px;padding-bottom:24px;gap:24px 16px}
  .footer2-news input,.footer2-news button{font-size:13.5px}
  .footer2-news button{padding:11px 10px}
  .home-section{margin-top:36px}
}
@media(max-width:430px){
  .gcards{grid-template-columns:1fr}
}

/* Phân số xếp tầng (tử trên / mẫu dưới, có gạch ngang) — dùng cho công thức hiển thị. */
.frac{display:inline-flex;flex-direction:column;vertical-align:middle;text-align:center;line-height:1.05;margin:0 .15em;}
.frac-n{padding:0 .3em;border-bottom:1px solid currentColor;}
.frac-d{padding:0 .3em;}
.frac-n.frac-rad{padding-bottom:.08em;}
.frac-d.frac-rad{padding-top:.2em;}

/* Dấu căn có vạch trên trùm biểu thức. */
.sqrt{white-space:nowrap;}
.sqrt-r{border-top:1px solid currentColor;padding:.02em .2em 0 .04em;}
.sqrt-sym{display:inline-block;}
.sqrt.tall{display:inline-flex;align-items:center;vertical-align:middle;}
.sqrt.tall .sqrt-sym{transform:scaleY(2);transform-origin:center;margin-right:-.02em;}
.sqrt.tall .sqrt-r{align-self:stretch;padding-top:.08em;display:flex;flex-direction:column;justify-content:center;}

/* Ký hiệu vectơ: mũi tên vẽ bằng CSS (không phụ thuộc font có glyph U+20D7 hay không). */
.ttp-vec{position:relative;display:inline-block;}
.ttp-vec::after{content:"\2192";position:absolute;left:-.06em;right:-.06em;top:-.6em;font-size:.6em;font-style:normal;font-weight:normal;line-height:1;text-align:center;}

/* ============================================================
   TRANG CHỦ 2026 (redesign) — hero · lưới 2 cột · dải đặc điểm
   ============================================================ */
.home2{padding-bottom:10px}

/* ---- Hero ---- */
.hero2{background:linear-gradient(180deg,#eaf1fe 0%,var(--bg) 100%);padding:14px 0 6px}
[data-theme="dark"] .hero2{background:linear-gradient(180deg,rgba(37,99,235,.10),var(--bg))}
.hero2-inner{display:grid;grid-template-columns:1.1fr .9fr;align-items:center;gap:24px;padding-top:26px;padding-bottom:22px}
.hero2-content{min-width:0}
.hero2-title{font-size:clamp(26px,3.4vw,38px);font-weight:800;line-height:1.15;letter-spacing:-.02em;margin:0 0 8px;color:var(--text)}
.hero2-sub{font-size:16px;color:var(--muted);margin:0 0 22px}
.hero2-feats{display:flex;flex-direction:column;gap:14px}
.hero2-feat{display:flex;align-items:center;gap:13px}
.hf-ico{width:46px;height:46px;border-radius:13px;display:grid;place-items:center;flex:none}
.hf-txt{display:flex;flex-direction:column;line-height:1.35;min-width:0}
.hf-txt b{font-size:15px;font-weight:700;color:var(--text)}
.hf-txt small{font-size:13px;color:var(--muted)}
.hf-blue{background:var(--blue-soft);color:var(--blue)}
.hf-green{background:var(--green-soft);color:var(--green)}
.hf-violet{background:var(--violet-soft);color:var(--violet)}
.hero2-illus{justify-self:center;width:100%;max-width:420px}
.hero2-illus svg,.hero2-illus img{width:100%;height:auto;display:block}
/* Hero dùng ảnh thật (banner) làm background full-width, chữ đè bên trái */
.hero2--bg{background-image:var(--hero-img),linear-gradient(115deg,#f5f8fd 35%,#e6eefb);background-repeat:no-repeat;background-position:right max(20px,50vw - 612px) center,center;background-size:contain,cover;background-color:#eef3fc;min-height:clamp(280px,26vw,360px);display:flex;align-items:center}
.hero2--bg .hero2-inner{width:100%;grid-template-columns:1fr}
.hero2--bg .hero2-content{max-width:58%}
.hero2--bg .hero2-feats{display:grid;grid-template-columns:repeat(3,1fr);gap:18px 16px;align-items:start}
@media(max-width:900px){.hero2--bg .hero2-content{max-width:66%}.hero2--bg .hero2-feats{grid-template-columns:1fr}}
@media(max-width:680px){.hero2--bg{background-image:linear-gradient(to right,#eef3fc 0%,rgba(238,243,252,.9) 42%,rgba(238,243,252,0) 82%),var(--hero-img);background-size:100% 100%,auto 200px;background-position:center,right bottom;min-height:230px}.hero2--bg .hero2-content{max-width:100%}.hero2--bg .hero2-title,.hero2--bg .hero2-sub{max-width:100%}.hero2--bg .hero2-feats{grid-template-columns:1fr;max-width:62%}}

/* ---- Lưới 2 cột ---- */
.home2-grid{display:grid;grid-template-columns:minmax(0,1fr) 340px;gap:22px;align-items:start;margin-top:8px}
.home2-main{display:flex;flex-direction:column;gap:22px;min-width:0}
.home2-side{display:flex;flex-direction:column;gap:22px;min-width:0}
.panel{padding:22px}
.panel-title{display:flex;align-items:center;gap:9px;margin:0 0 16px;font-size:19px;font-weight:800;letter-spacing:-.01em;color:var(--text)}
.panel-title .ic{color:var(--primary)}
.panel-title.sm{font-size:16px;margin-bottom:14px}
.panel-head{display:flex;align-items:center;justify-content:space-between;gap:12px}
.panel-head .panel-title{margin-bottom:0}

/* ---- 4 nút danh mục ---- */
.cat-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin-bottom:18px}
.cat-btn{display:flex;align-items:center;gap:10px;padding:13px 14px;border-radius:14px;font-weight:700;font-size:14px;border:1.5px solid transparent;transition:transform .15s,box-shadow .15s}
.cat-btn:hover{transform:translateY(-2px);box-shadow:var(--shadow)}
.cat-btn-ico{width:34px;height:34px;border-radius:10px;display:grid;place-items:center;background:rgba(255,255,255,.65);flex:none}
[data-theme="dark"] .cat-btn-ico{background:rgba(255,255,255,.10)}
.cb-blue{background:var(--blue-soft);color:var(--blue);border-color:rgba(37,99,235,.18)}
.cb-green{background:var(--green-soft);color:var(--green);border-color:rgba(22,163,74,.18)}
.cb-orange{background:var(--orange-soft);color:#d97706;border-color:rgba(217,119,6,.2)}
.cb-violet{background:var(--violet-soft);color:var(--violet);border-color:rgba(124,92,252,.2)}
.cat-btn-name{min-width:0;line-height:1.25}

/* ---- Bộ lọc ---- */
.filter2{background:var(--surface-2);border:1px solid var(--border);border-radius:14px;padding:14px}
.filter2-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px}
.filter2-label{display:inline-flex;align-items:center;gap:7px;font-weight:700;font-size:14px;color:var(--text)}
.filter2-label .ic{color:var(--primary)}
.filter2-clear{display:inline-flex;align-items:center;gap:5px;font-size:13px;color:var(--muted)}
.filter2-clear:hover{color:var(--primary)}
.filter2-row{display:grid;grid-template-columns:repeat(4,1fr) auto;gap:10px}
.filter2-sel{position:relative;display:block;min-width:0}
.filter2-sel select{width:100%;appearance:none;-webkit-appearance:none;padding:11px 32px 11px 12px;border:1px solid var(--border);border-radius:11px;background:var(--surface);color:var(--text);font:inherit;font-size:13.5px;font-weight:600;cursor:pointer}
.filter2-sel select:focus{outline:none;border-color:var(--primary)}
.filter2-sel .ic{position:absolute;right:9px;top:50%;transform:translateY(-50%);color:var(--muted);pointer-events:none}
.filter2-btn{padding:11px 18px;white-space:nowrap}

/* ---- Hàng đề thi ---- */
.hx-list{display:flex;flex-direction:column}
.hx-row{display:flex;align-items:center;gap:14px;padding:14px 0;border-top:1px solid var(--border)}
.hx-row:first-child{border-top:0;padding-top:2px}
.hx-thumb{flex:none;display:block}
.hx-thumb .exam-thumb{width:60px;height:60px;border-radius:14px;padding:5px 5px}
.hx-thumb .et-glyph{font-size:20px}
.hx-thumb .et-main small{font-size:8px}
.hx-thumb .et-main b{font-size:22px}
.hx-thumb .et-main-g b{font-size:26px}
.hx-thumb .et-tag{font-size:8px;padding:1px 0}
.hx-body{flex:1;min-width:0}
.hx-title{display:block;font-weight:700;font-size:15px;line-height:1.4;color:var(--text)}
.hx-title:hover{color:var(--primary)}
.hx-meta{display:flex;flex-wrap:wrap;align-items:center;gap:4px 7px;margin-top:4px;font-size:12.5px;color:var(--muted)}
.hx-meta i{opacity:.5}
.hx-level{display:inline-block;margin-top:7px;padding:2px 10px;border-radius:999px;font-size:11.5px;font-weight:700}
.hx-level.lv1{background:var(--green-soft);color:var(--green)}
.hx-level.lv2{background:var(--amber-soft);color:var(--amber-ink)}
.hx-level.lv3{background:var(--red-soft);color:var(--red)}
.hx-level.lv0{display:none}
.hx-actions{display:flex;gap:6px;flex:none}
.hx-act{display:inline-flex;flex-direction:column;align-items:center;gap:3px;width:54px;padding:8px 4px;border-radius:11px;background:var(--surface-2);color:var(--muted);font-size:11px;font-weight:600}
.hx-act:hover{background:var(--primary-soft);color:var(--primary)}
.btn-viewall2{width:100%;margin-top:18px;border:1.5px solid var(--border);background:var(--surface);color:var(--primary);gap:6px}
.btn-viewall2:hover{border-color:var(--primary);background:var(--primary-soft)}

/* ---- Danh mục nhanh ---- */
.qlist{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:2px}
.qlist a{display:flex;align-items:center;gap:11px;padding:10px;border-radius:11px;color:var(--text);font-weight:600;font-size:14px}
.qlist a:hover{background:var(--surface-2)}
.qlist a:hover .ic:last-child{color:var(--primary);transform:translateX(2px)}
.q-ico{width:32px;height:32px;border-radius:9px;display:grid;place-items:center;flex:none}
.q-name{flex:1;min-width:0}
.qlist .ic:last-child{color:var(--muted);transition:transform .15s,color .15s;flex:none}
.q-blue{background:var(--blue-soft);color:var(--blue)}
.q-green{background:var(--green-soft);color:var(--green)}
.q-orange{background:var(--orange-soft);color:#d97706}
.q-violet{background:var(--violet-soft);color:var(--violet)}
.q-soft{background:var(--surface-2);color:var(--muted)}
.qdiv{height:1px;background:var(--border);margin:12px 0}

/* ---- Đề xem nhiều ---- */
.poplist{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:4px}
.pop-item{display:flex;align-items:center;gap:11px;padding:8px 0}
.pop-rank{flex:none;width:26px;height:26px;border-radius:8px;display:grid;place-items:center;font-size:13px;font-weight:800;background:var(--surface-2);color:var(--muted)}
.pop-rank.r1,.pop-rank.r2,.pop-rank.r3{background:linear-gradient(135deg,var(--primary-2),var(--primary));color:#fff}
.pop-title{flex:1;min-width:0;font-size:13.5px;font-weight:600;line-height:1.4;color:var(--text);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.pop-title:hover{color:var(--primary)}
.pop-views{flex:none;display:inline-flex;align-items:center;gap:4px;font-size:12px;color:var(--muted);white-space:nowrap}

/* ---- CTA đăng ký ---- */
.cta2{position:relative;overflow:hidden;padding:22px;background:linear-gradient(135deg,var(--primary),var(--primary-dark));color:#fff;border:0}
.cta2-body{position:relative;z-index:1}
.cta2 h3{margin:0 0 8px;font-size:18px;font-weight:800}
.cta2 p{margin:0 0 16px;font-size:14px;color:rgba(255,255,255,.9);line-height:1.55}
.cta2-btn{background:#fff;color:var(--primary)!important;font-weight:700;gap:7px}
.cta2-btn:hover{transform:translateY(-1px);box-shadow:0 8px 18px rgba(0,0,0,.2)}
.cta2-bell{position:absolute;right:-12px;bottom:-16px;color:rgba(255,255,255,.16);z-index:0}

/* ---- Dải đặc điểm ---- */
.feats2{margin-top:26px;padding:8px 0 4px}
.feats2-inner{display:grid;grid-template-columns:repeat(5,1fr);gap:16px}
.feat2{background:var(--surface);border:1px solid var(--border);border-radius:16px;box-shadow:var(--shadow);padding:20px 16px;text-align:center}
.feat2-ico{width:50px;height:50px;border-radius:14px;display:grid;place-items:center;margin:0 auto 12px}
.feat2 b{display:block;font-size:14.5px;font-weight:700;color:var(--text);margin-bottom:5px}
.feat2 p{margin:0;font-size:12.5px;color:var(--muted);line-height:1.5}
.fs-blue{background:var(--blue-soft);color:var(--blue)}
.fs-green{background:var(--green-soft);color:var(--green)}
.fs-violet{background:var(--violet-soft);color:var(--violet)}
.fs-orange{background:var(--orange-soft);color:#d97706}
.fs-teal{background:var(--teal-soft);color:var(--teal)}

/* ---- Responsive trang chủ ---- */
@media(max-width:980px){
  .home2-grid{grid-template-columns:1fr}
  .feats2-inner{grid-template-columns:repeat(3,1fr)}
}
@media(max-width:760px){
  .hero2-inner{grid-template-columns:1fr;padding-top:22px;padding-bottom:16px}
  .hero2-illus{display:none}
  .filter2-row{grid-template-columns:1fr 1fr}
  .filter2-btn{grid-column:1 / -1;justify-content:center}
}
@media(max-width:560px){
  .cat-grid{grid-template-columns:1fr 1fr}
  .feats2-inner{grid-template-columns:1fr 1fr}
  .panel{padding:18px}
  .hx-row{flex-wrap:wrap}
  .hx-actions{width:100%;justify-content:flex-start;padding-left:0;gap:8px}
  .hx-act{flex-direction:row;width:auto;flex:1;justify-content:center;gap:6px;padding:9px 6px}
  .hx-thumb .exam-thumb{width:52px;height:52px}
}
@media(max-width:400px){
  .cat-grid{grid-template-columns:1fr}
  .feats2-inner{grid-template-columns:1fr}
  .hx-actions{padding-left:0}
}

/* Cloudflare Turnstile trong popup/khung mở khoá (đồng bộ dethito) */
.ttp-turnstile{display:flex;justify-content:center;margin:10px 0}
.ttp-turnstile .cf-turnstile{transform:scale(.82);transform-origin:center;border-radius:3px;overflow:hidden;margin:-6px 0}
