/* ==========================================================================
   Theavy_MMO — Premium Learning Platform · Design system
   ========================================================================== */
:root {
  --ink: #0B1024;
  --ink-2: #151A3E;
  --ink-3: #20265A;
  --brand: #5B5CEB;
  --brand-2: #7B4DFF;
  --brand-soft: #EEEEFE;
  --gold: #F5B83D;
  --gold-2: #F29D38;
  --gold-soft: #FFF5DF;
  --bg: #F5F6FB;
  --card: #FFFFFF;
  --line: #E7E9F3;
  --line-2: #F0F1F8;
  --text: #141833;
  --muted: #666D8E;
  --ok: #129B52;
  --ok-soft: #E6F7EE;
  --warn: #C27803;
  --warn-soft: #FFF4DC;
  --bad: #D92D3F;
  --bad-soft: #FDECEE;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow-sm: 0 1px 2px rgba(16, 20, 55, .06), 0 1px 3px rgba(16, 20, 55, .04);
  --shadow: 0 10px 30px -12px rgba(16, 20, 55, .18), 0 2px 6px rgba(16, 20, 55, .05);
  --shadow-lg: 0 30px 60px -20px rgba(16, 20, 55, .35);
  --font: 'Plus Jakarta Sans', 'Kantumruy Pro', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --container: 1320px;
}
html.lang-km { --font: 'Kantumruy Pro', 'Plus Jakarta Sans', system-ui, sans-serif; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { overflow-x: clip; margin: 0; font-family: var(--font); font-size: 15px; line-height: 1.6; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; }
html.lang-km body { line-height: 1.75; }
img, video, iframe { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .5em; letter-spacing: -.02em; }
html.lang-km h1, html.lang-km h2, html.lang-km h3 { letter-spacing: 0; line-height: 1.45; }
h1 { font-size: clamp(26px, 3vw, 36px); font-weight: 800; }
h2 { font-size: 22px; font-weight: 800; }
h3 { font-size: 17px; font-weight: 700; }
p { margin: 0 0 1em; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .88em; background: var(--line-2); padding: 2px 7px; border-radius: 6px; }
code.big { font-size: 1em; padding: 4px 10px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.block { display: block; }
.nowrap { white-space: nowrap; }
.mt { margin-top: 18px !important; }
[hidden] { display: none !important; }
.skip-link { position: absolute; left: -999px; top: 8px; background: #fff; padding: 8px 14px; border-radius: 8px; z-index: 999; }
.skip-link:focus { left: 8px; }
:focus-visible { outline: 3px solid rgba(91, 92, 235, .45); outline-offset: 2px; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.section { padding-top: 48px; padding-bottom: 48px; }
.section-tight { padding-top: 28px; }
.narrow { max-width: 860px; }

/* ---------- Icons & avatar ---------- */
.ic { width: 20px; height: 20px; flex: none; }
.ic.sm { width: 16px; height: 16px; }
.ic.xs { width: 13px; height: 13px; vertical-align: -2px; }
.ic.flip { transform: rotate(180deg); }
.avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; flex: none; }
.avatar.lg { width: 48px; height: 48px; }
.avatar.xl { width: 84px; height: 84px; font-size: 28px; }
.avatar-initials { display: inline-grid; place-items: center; font-weight: 800; font-size: 14px; color: #fff; background: linear-gradient(135deg, hsl(var(--h) 70% 58%), hsl(calc(var(--h) + 40) 70% 45%)); }
.avatar-initials.lg { font-size: 17px; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 18px; border-radius: 12px; border: 1.5px solid transparent; font-weight: 700; font-size: 14px; line-height: 1.2; white-space: nowrap; transition: transform .15s ease, box-shadow .2s ease, background .2s ease, border-color .2s; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn-lg { padding: 15px 24px; font-size: 15px; border-radius: 14px; }
.btn-sm { padding: 8px 12px; font-size: 13px; border-radius: 10px; }
.btn-block { width: 100%; }
.btn-primary { background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; box-shadow: 0 8px 20px -8px rgba(91, 92, 235, .7); }
.btn-primary:hover { box-shadow: 0 12px 26px -8px rgba(91, 92, 235, .8); }
.btn-gold { background: linear-gradient(135deg, #FFD27A, var(--gold-2)); color: #1B1403; box-shadow: 0 8px 22px -8px rgba(242, 157, 56, .8); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: var(--ink-3); }
.btn-ghost { background: var(--line-2); color: var(--text); }
.btn-ghost:hover { background: var(--line); }
.btn-ghost-light { background: rgba(255, 255, 255, .08); color: #fff; border-color: rgba(255, 255, 255, .22); backdrop-filter: blur(6px); }
.btn-ghost-light:hover { background: rgba(255, 255, 255, .16); }
.btn-outline { background: #fff; border-color: var(--line); color: var(--text); }
.btn-outline:hover { border-color: var(--brand); color: var(--brand); }
.btn-soft-warn { background: var(--warn-soft); color: var(--warn); }
.btn-success { background: linear-gradient(135deg, #1DB866, #0F9150); color: #fff; box-shadow: 0 8px 20px -8px rgba(18, 155, 82, .7); }
.btn-done { background: var(--ok-soft); color: var(--ok); border-color: rgba(18, 155, 82, .25); }
.btn-danger-soft { background: var(--bad-soft); color: var(--bad); }
.btn-danger-soft:hover { background: #FAD9DD; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.btn-col { display: grid; gap: 10px; }
.link-btn { background: none; border: 0; padding: 0; color: var(--brand); font-weight: 700; font-size: 13px; }
.link-btn.danger { color: var(--bad); }
.link-arrow { display: inline-flex; align-items: center; gap: 6px; color: var(--brand); font-weight: 700; font-size: 14px; }
.link-arrow:hover { gap: 9px; }
.link-muted { display: inline-flex; gap: 6px; align-items: center; color: var(--muted); font-weight: 600; font-size: 14px; }
.icon-btn { position: relative; display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; border: 0; background: transparent; color: inherit; transition: background .2s; }
.icon-btn:hover { background: rgba(125, 130, 180, .14); }
.icon-btn.sm { width: 32px; height: 32px; border-radius: 9px; }
.icon-btn.danger { color: var(--bad); }
.icon-btn:disabled { opacity: .3; }
.icon-btn .dot { position: absolute; top: 5px; right: 4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: #FF4D5E; color: #fff; font-size: 10.5px; font-weight: 800; display: grid; place-items: center; border: 2px solid var(--ink); }
.copy-btn { border: 0; background: var(--line-2); border-radius: 8px; padding: 5px; display: inline-grid; place-items: center; color: var(--muted); vertical-align: middle; }
.copy-btn:hover, .copy-btn.copied { background: var(--brand-soft); color: var(--brand); }

/* ---------- Badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 99px; font-size: 12px; font-weight: 700; white-space: nowrap; border: 0; }
.badge-ok { background: var(--ok-soft); color: var(--ok); }
.badge-warn { background: var(--warn-soft); color: var(--warn); }
.badge-bad { background: var(--bad-soft); color: var(--bad); }
.badge-muted { background: var(--line-2); color: var(--muted); }
.badge-preview { background: var(--brand-soft); color: var(--brand); }
.count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--line); color: var(--muted); font-size: 11px; font-weight: 800; font-style: normal; }
.count.warn { background: var(--gold); color: #1B1403; }

/* ==========================================================================
   Header — full-width 1920×110 cover banner
   ========================================================================== */
.topbar { position: sticky; top: 0; z-index: 50; min-height: 110px; color: #fff; background: var(--banner, none) center / cover no-repeat, linear-gradient(100deg, #0B1024 0%, #191E52 55%, #2A1446 100%); box-shadow: 0 1px 0 rgba(255, 255, 255, .06), 0 10px 30px -15px rgba(11, 16, 36, .6); }
.topbar::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(11, 16, 36, .55), rgba(11, 16, 36, .15) 50%, rgba(11, 16, 36, .5)); pointer-events: none; }
.topbar-inner { position: relative; z-index: 1; max-width: 1920px; margin: 0 auto; min-height: 110px; padding: 0 40px; display: grid; grid-template-columns: minmax(220px, 1fr) minmax(320px, 680px) minmax(220px, 1fr); align-items: center; gap: 28px; }
.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand-mark svg { width: 46px; height: 46px; display: block; filter: drop-shadow(0 6px 14px rgba(242, 157, 56, .35)); }
.brand-logo { height: 52px; width: auto; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.brand-text small { font-size: 12px; opacity: .7; font-weight: 500; }
.search { position: relative; display: flex; align-items: center; background: rgba(255, 255, 255, .96); border-radius: 16px; padding: 6px 6px 6px 50px; box-shadow: 0 12px 30px -10px rgba(0, 0, 0, .45), inset 0 0 0 1px rgba(255, 255, 255, .6); transition: box-shadow .2s; }
.search:focus-within { box-shadow: 0 12px 30px -10px rgba(0, 0, 0, .45), 0 0 0 4px rgba(245, 184, 61, .45); }
.search .search-ic { position: absolute; left: 18px; color: #8A90B0; width: 20px; height: 20px; }
.search input { flex: 1; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 16px; font-weight: 500; padding: 12px 8px; min-width: 0; }
.search input::placeholder { color: #9197B5; }
.search-btn { border: 0; border-radius: 12px; padding: 12px 22px; font-weight: 800; color: #fff; background: linear-gradient(135deg, var(--brand), var(--brand-2)); }
.top-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.mobile-search-toggle { display: none; }
.lang-switch { display: inline-flex; padding: 3px; border-radius: 10px; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .16); }
.lang-switch a { padding: 5px 10px; border-radius: 8px; font-size: 12.5px; font-weight: 700; opacity: .75; }
.lang-switch a.on { background: #fff; color: var(--ink); opacity: 1; }
.lang-switch.dark { background: var(--line-2); border-color: var(--line); }
.lang-switch.dark a { color: var(--muted); }
.lang-switch.dark a.on { background: #fff; color: var(--text); box-shadow: var(--shadow-sm); }
.profile-btn { display: inline-flex; align-items: center; gap: 10px; padding: 5px 12px 5px 5px; border-radius: 99px; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .18); color: #fff; font-weight: 700; font-size: 14px; }
.profile-btn:hover { background: rgba(255, 255, 255, .18); }

/* Dropdowns */
.dropdown { position: relative; }
.dropdown-menu { position: absolute; right: 0; top: calc(100% + 10px); min-width: 250px; background: #fff; color: var(--text); border-radius: 16px; box-shadow: var(--shadow-lg); border: 1px solid var(--line); padding: 8px; opacity: 0; visibility: hidden; transform: translateY(-6px) scale(.98); transform-origin: top right; transition: .18s ease; z-index: 60; }
.dropdown.open .dropdown-menu { opacity: 1; visibility: visible; transform: none; }
.dropdown-menu a, .dropdown-menu button { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border-radius: 10px; border: 0; background: none; font-size: 14px; font-weight: 600; text-align: left; color: var(--text); }
.dropdown-menu a:hover, .dropdown-menu button:hover { background: var(--line-2); }
.dropdown-menu .ic { color: var(--muted); }
.dropdown-menu .danger, .dropdown-menu .danger .ic { color: var(--bad); }
.dropdown-menu form { margin: 0; }
.pm-head { display: flex; gap: 12px; align-items: center; padding: 10px 12px 14px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.pm-head div { display: flex; flex-direction: column; min-width: 0; }
.pm-head small { color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; }
.pm-admin { background: var(--gold-soft) !important; color: #8A5A00 !important; margin-bottom: 4px; }
.pm-admin .ic { color: #B97800 !important; }
.pm-logout { border-top: 1px solid var(--line) !important; border-radius: 0 0 10px 10px !important; margin-top: 6px; color: var(--bad) !important; }
.pm-logout .ic { color: var(--bad) !important; }
.notif-menu { width: 360px; padding: 0; overflow: hidden; }
.dm-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.dm-head .link-btn { padding: 0; width: auto; }
.dm-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 28px; color: var(--muted); margin: 0; }
.notif-menu .notif { align-items: flex-start; padding: 12px 16px; border-radius: 0; border-bottom: 1px solid var(--line-2); }
.notif span:last-child { display: flex; flex-direction: column; min-width: 0; }
.notif strong { font-size: 13.5px; font-weight: 600; line-height: 1.4; }
.notif small { color: var(--muted); font-size: 12px; }
.notif.unread { background: #F7F7FF; }
.notif.unread strong { font-weight: 800; }
.dm-foot { justify-content: center; color: var(--brand) !important; font-weight: 700 !important; border-radius: 0 !important; }
.notif-ic { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--brand-soft); }
.notif-ic .ic { color: var(--brand) !important; width: 17px; height: 17px; }
.notif-ic.t-success { background: var(--ok-soft); } .notif-ic.t-success .ic { color: var(--ok) !important; }
.notif-ic.t-error { background: var(--bad-soft); } .notif-ic.t-error .ic { color: var(--bad) !important; }
.notif-ic.t-payment { background: var(--gold-soft); } .notif-ic.t-payment .ic { color: #B97800 !important; }

/* Toasts */
.toasts { position: fixed; top: 124px; right: 20px; z-index: 80; display: grid; gap: 10px; max-width: min(420px, calc(100vw - 40px)); }
.toast { display: flex; align-items: center; gap: 12px; padding: 14px 14px 14px 16px; border-radius: 14px; background: #fff; box-shadow: var(--shadow-lg); border: 1px solid var(--line); border-left: 4px solid var(--brand); font-weight: 600; font-size: 14px; animation: toastIn .35s ease; }
.toast span { flex: 1; }
.toast button { border: 0; background: none; color: var(--muted); padding: 2px; display: grid; }
.toast-success { border-left-color: var(--ok); } .toast-success > .ic { color: var(--ok); }
.toast-error { border-left-color: var(--bad); } .toast-error > .ic { color: var(--bad); }
.toast-info > .ic { color: var(--brand); }
.toast.hide { opacity: 0; transform: translateX(20px); transition: .3s; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-10px); } }
.alert { display: flex; gap: 10px; align-items: center; padding: 12px 14px; border-radius: 12px; font-weight: 600; font-size: 14px; margin-bottom: 14px; }
.alert-error { background: var(--bad-soft); color: #A31B2B; }
.alert-success { background: var(--ok-soft); color: #0B7A3F; }
.alert-info { background: var(--brand-soft); color: #3B3CB8; }

/* ==========================================================================
   Homepage
   ========================================================================== */
.hero { position: relative; overflow: hidden; color: #fff; background: radial-gradient(900px 400px at 85% 0%, rgba(245, 184, 61, .22), transparent 60%), radial-gradient(900px 500px at 0% 100%, rgba(123, 77, 255, .35), transparent 60%), linear-gradient(180deg, #121743, #0B1024); }
.hero::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(255, 255, 255, .08) 1px, transparent 1px); background-size: 26px 26px; mask-image: linear-gradient(180deg, #000, transparent 90%); }
.hero-inner { position: relative; display: grid; grid-template-columns: 1.3fr 1fr; gap: 48px; align-items: center; padding-top: 64px; padding-bottom: 72px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 99px; background: rgba(245, 184, 61, .14); color: var(--gold); border: 1px solid rgba(245, 184, 61, .35); font-weight: 700; font-size: 13px; margin-bottom: 18px; }
.eyebrow.dark { background: var(--brand-soft); color: var(--brand); border-color: transparent; margin-bottom: 10px; }
.hero h1 { font-size: clamp(32px, 4.4vw, 56px); line-height: 1.08; letter-spacing: -.035em; margin-bottom: 18px; }
html.lang-km .hero h1 { line-height: 1.35; letter-spacing: 0; }
.hero p { font-size: 18px; color: rgba(255, 255, 255, .74); max-width: 600px; margin-bottom: 30px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.hero-stats > div { padding: 22px 18px; border-radius: 20px; background: linear-gradient(180deg, rgba(255, 255, 255, .1), rgba(255, 255, 255, .04)); border: 1px solid rgba(255, 255, 255, .12); backdrop-filter: blur(8px); }
.hero-stats strong { display: block; font-size: 36px; font-weight: 800; letter-spacing: -.03em; background: linear-gradient(135deg, #fff, #FFD27A); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-stats span { font-size: 13px; color: rgba(255, 255, 255, .7); font-weight: 600; }
.hero-stats .hs-wide { grid-column: 1 / -1; display: flex; align-items: center; gap: 12px; padding: 16px 18px; }
.hero-stats .hs-wide .ic { color: var(--gold); width: 26px; height: 26px; }
.hero-stats .hs-wide span { font-size: 14px; color: rgba(255, 255, 255, .85); }

.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.section-head h1, .section-head h2 { margin: 0; }
.section-head p { margin: 4px 0 0; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; }
.select { position: relative; }
.select select { appearance: none; padding: 10px 38px 10px 14px; border-radius: 12px; border: 1.5px solid var(--line); background: #fff; font-weight: 600; font-size: 14px; cursor: pointer; }
.select::after { content: ""; position: absolute; right: 15px; top: 50%; width: 7px; height: 7px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: translateY(-70%) rotate(45deg); pointer-events: none; }
.chips { display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px 14px; margin-bottom: 18px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 99px; background: #fff; border: 1.5px solid var(--line); font-weight: 700; font-size: 14px; white-space: nowrap; transition: .2s; }
.chip:hover { border-color: var(--brand); color: var(--brand); }
.chip.active { background: var(--ink); border-color: var(--ink); color: #fff; box-shadow: 0 8px 18px -8px rgba(11, 16, 36, .6); }
.chip-n { font-size: 11px; padding: 1px 7px; border-radius: 99px; background: var(--line-2); color: var(--muted); }
.chip.active .chip-n { background: rgba(255, 255, 255, .16); color: #fff; }

/* Course grid — 4 desktop / 2 tablet / 1-2 mobile */
.course-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.course-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.course-card { position: relative; display: flex; flex-direction: column; background: var(--card); border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow-sm); overflow: hidden; transition: transform .25s ease, box-shadow .25s ease; }
.course-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.cc-thumb { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--ink-2); }
.cc-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.course-card:hover .cc-thumb img { transform: scale(1.05); }
.price-badge { position: absolute; left: 12px; top: 12px; padding: 5px 12px; border-radius: 99px; font-weight: 800; font-size: 13px; box-shadow: 0 6px 14px -4px rgba(0, 0, 0, .35); }
.price-badge.free { background: #1DB866; color: #fff; }
.price-badge.paid { background: linear-gradient(135deg, #FFD27A, var(--gold-2)); color: #1B1403; }
.enrolled-badge { position: absolute; left: 12px; bottom: 12px; display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 99px; background: rgba(11, 16, 36, .75); color: #fff; font-size: 12px; font-weight: 700; backdrop-filter: blur(6px); }
.cc-save { position: absolute; right: 12px; top: 12px; margin: 0; z-index: 2; }
.save-btn { width: 36px; height: 36px; border-radius: 11px; border: 0; display: grid; place-items: center; background: rgba(255, 255, 255, .92); color: var(--ink); box-shadow: 0 6px 14px -6px rgba(0, 0, 0, .4); transition: .2s; }
.save-btn .ic { width: 17px; height: 17px; }
.save-btn:hover { transform: scale(1.08); }
.save-btn.on { background: var(--gold); }
.save-btn.on .ic, .save-wide.on .ic { fill: currentColor; }
.cc-body { display: flex; flex-direction: column; gap: 10px; padding: 16px 18px 18px; flex: 1; }
.cc-meta-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.cat-tag { font-size: 12px; font-weight: 700; color: var(--brand); background: var(--brand-soft); padding: 3px 10px; border-radius: 99px; }
.rating { display: inline-flex; align-items: center; gap: 4px; font-weight: 800; font-size: 13px; }
.rating small { color: var(--muted); font-weight: 600; }
.star-ic { width: 15px; height: 15px; color: var(--gold); fill: var(--gold); }
.cc-title { font-size: 16.5px; font-weight: 800; line-height: 1.35; margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.7em; }
html.lang-km .cc-title { line-height: 1.55; min-height: 3.1em; }
.cc-title a:hover { color: var(--brand); }
.cc-facts { display: flex; flex-wrap: wrap; gap: 6px 14px; list-style: none; padding: 0; margin: 0 0 4px; color: var(--muted); font-size: 13px; font-weight: 600; }
.cc-facts li { display: inline-flex; align-items: center; gap: 5px; }
.course-card .btn { margin-top: auto; }

.continue-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.continue-card { display: flex; align-items: center; gap: 14px; padding: 12px; border-radius: var(--radius); background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-sm); transition: .2s; }
.continue-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.continue-card img { width: 96px; height: 64px; border-radius: 10px; object-fit: cover; flex: none; }
.continue-card > div { flex: 1; min-width: 0; }
.continue-card strong { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.continue-card small { color: var(--muted); font-size: 12px; }
.play-dot { flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; box-shadow: 0 8px 18px -6px rgba(91, 92, 235, .7); }
.play-dot .ic { width: 16px; height: 16px; fill: #fff; }
.progress { height: 8px; border-radius: 99px; background: var(--line-2); overflow: hidden; margin: 8px 0 4px; }
.progress span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--brand), var(--brand-2)); transition: width .6s ease; }
.progress.sm { height: 6px; margin: 6px 0 2px; }
.progress.light { background: rgba(255, 255, 255, .18); }
.progress.light span { background: linear-gradient(90deg, #FFD27A, var(--gold-2)); }
.w-120 { width: 120px; }

.empty-state { text-align: center; padding: 56px 24px; background: #fff; border: 1.5px dashed var(--line); border-radius: var(--radius); }
.empty-state > .ic { width: 44px; height: 44px; color: var(--brand); padding: 10px; box-sizing: content-box; background: var(--brand-soft); border-radius: 18px; margin-bottom: 14px; }
.empty-state p { color: var(--muted); }
.empty-state.sm { padding: 30px 20px; border: 0; background: transparent; }
.pagination { display: flex; justify-content: center; gap: 6px; margin-top: 32px; flex-wrap: wrap; }
.pagination a { min-width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; background: #fff; border: 1px solid var(--line); font-weight: 700; }
.pagination a.active { background: var(--ink); color: #fff; border-color: var(--ink); }

.how { position: relative; padding: 44px; border-radius: 28px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-sm); overflow: hidden; }
.how::before { content: ""; position: absolute; right: -120px; top: -120px; width: 320px; height: 320px; border-radius: 50%; background: radial-gradient(circle, rgba(245, 184, 61, .18), transparent 70%); }
.how-head { text-align: center; margin-bottom: 32px; position: relative; }
.journey { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; counter-reset: j; position: relative; }
.journey::before { content: ""; position: absolute; top: 30px; left: 8%; right: 8%; height: 2px; background: repeating-linear-gradient(90deg, var(--line) 0 8px, transparent 8px 14px); }
.journey li { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; }
.j-ic { width: 60px; height: 60px; border-radius: 18px; display: grid; place-items: center; background: linear-gradient(135deg, var(--ink-2), var(--ink-3)); color: var(--gold); box-shadow: 0 12px 24px -12px rgba(11, 16, 36, .7); position: relative; }
.j-ic .ic { width: 26px; height: 26px; }
.j-n { position: absolute; top: -6px; left: calc(50% + 18px); width: 22px; height: 22px; border-radius: 50%; background: var(--gold); color: #1B1403; font-size: 11px; font-weight: 800; display: grid; place-items: center; }
.journey strong { font-size: 15px; margin-top: 6px; }
.journey small { color: var(--muted); font-size: 13px; line-height: 1.45; }

/* ==========================================================================
   Course detail
   ========================================================================== */
.course-hero { color: #fff; background: radial-gradient(700px 300px at 90% 0%, rgba(245, 184, 61, .18), transparent 60%), linear-gradient(135deg, #10143A, #1D2260 60%, #2A1446); }
.ch-inner { padding-top: 40px; padding-bottom: 44px; }
.ch-copy { max-width: calc(100% - 420px); }
.crumbs { display: flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 600; opacity: .8; margin-bottom: 14px; flex-wrap: wrap; }
.crumbs a:hover { text-decoration: underline; }
.checkout .crumbs, .section .crumbs { color: var(--muted); opacity: 1; }
.course-hero h1 { font-size: clamp(28px, 3.4vw, 42px); letter-spacing: -.03em; }
.ch-sub { font-size: 17px; color: rgba(255, 255, 255, .78); }
.ch-meta { display: flex; flex-wrap: wrap; gap: 10px 22px; align-items: center; font-size: 14px; margin: 16px 0 24px; }
.ch-meta > span { display: inline-flex; align-items: center; gap: 6px; }
.rating-lg strong { color: var(--gold); font-size: 17px; }
.rating-lg small { opacity: .7; }
.stars { display: inline-flex; gap: 1px; }
.stars i { display: inline-grid; color: rgba(255, 255, 255, .25); }
.stars i .ic { width: 15px; height: 15px; fill: currentColor; stroke: none; }
.stars i.on, .stars i.half { color: var(--gold); }
.stars i.half { opacity: .6; }
.ch-facts { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 170px)); gap: 12px; }
.ch-facts li { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .12); }
.ch-facts .ic { color: var(--gold); }
.ch-facts span { display: flex; flex-direction: column; line-height: 1.25; }
.ch-facts small { font-size: 11.5px; opacity: .65; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.ch-facts strong { font-size: 14.5px; }
.course-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 36px; align-items: start; padding-top: 32px; padding-bottom: 20px; }
.course-aside { margin-top: -250px; position: sticky; top: 130px; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 28px; box-shadow: var(--shadow-sm); margin-bottom: 22px; }
.panel h2 { font-size: 20px; display: flex; align-items: center; gap: 10px; }
.panel-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.panel-head h2, .panel-head h3 { margin: 0; display: flex; align-items: center; gap: 8px; }
.outcomes { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px 24px; }
.outcomes li { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; }
.outcomes .ic { color: var(--ok); margin-top: 2px; width: 18px; height: 18px; flex: none; }
.bullets { margin: 0; padding-left: 20px; }
.bullets li { margin-bottom: 6px; }
.curriculum { display: grid; gap: 10px; }
.cur-section { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.cur-section summary { list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 15px 18px; background: #FAFBFE; cursor: pointer; font-weight: 700; flex-wrap: wrap; }
.cur-section summary::-webkit-details-marker { display: none; }
.cs-title { display: flex; align-items: center; gap: 10px; }
.cs-chev { transition: transform .2s; color: var(--muted); transform: rotate(-90deg); }
.cur-section[open] .cs-chev { transform: none; }
.cur-section summary .muted { font-size: 13px; font-weight: 600; }
.cur-section ul { list-style: none; margin: 0; padding: 6px 0; }
.cur-lesson > a, .cur-lesson > span { display: flex; align-items: center; gap: 12px; padding: 11px 18px; font-size: 14.5px; }
.cur-lesson > a:hover { background: #F7F7FF; }
.cur-lesson .ic { color: var(--muted); }
.cur-lesson.open > a > .ic:first-child { color: var(--brand); }
.cl-title { flex: 1; }
.cl-dur { color: var(--muted); font-size: 13px; }
.cur-lesson.locked { color: #8A90AE; }
.lock-ic { width: 15px; height: 15px; }
.buy-card { background: #fff; border-radius: 22px; overflow: hidden; box-shadow: var(--shadow-lg); border: 1px solid var(--line); }
.bc-thumb { position: relative; aspect-ratio: 16 / 9; background: var(--ink); }
.bc-thumb img { width: 100%; height: 100%; object-fit: cover; }
.bc-preview { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; color: #fff; font-weight: 700; background: linear-gradient(180deg, rgba(11, 16, 36, .1), rgba(11, 16, 36, .65)); }
.bc-preview span { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .95); color: var(--ink); box-shadow: 0 10px 30px rgba(0, 0, 0, .35); transition: transform .2s; }
.bc-preview span .ic { fill: var(--ink); width: 22px; height: 22px; margin-left: 3px; }
.bc-preview:hover span { transform: scale(1.08); }
.bc-body { padding: 22px 24px 24px; display: grid; gap: 14px; }
.bc-price { display: flex; align-items: baseline; gap: 10px; }
.bc-price strong { font-size: 36px; font-weight: 800; letter-spacing: -.03em; }
.bc-price strong.free { color: var(--ok); }
.bc-price small { color: var(--muted); font-weight: 600; }
.bc-progress small { color: var(--muted); font-size: 13px; font-weight: 600; }
.bc-pay-note { display: flex; align-items: center; justify-content: center; gap: 6px; color: var(--muted); font-size: 13px; margin: -4px 0 0; }
.bc-body form { margin: 0; }
.bc-includes { list-style: none; margin: 4px 0 0; padding: 16px 0 0; border-top: 1px solid var(--line); display: grid; gap: 10px; font-size: 14px; }
.bc-includes li { display: flex; gap: 10px; align-items: center; }
.bc-includes .ic { color: var(--brand); }

.notice { display: flex; gap: 12px; align-items: center; padding: 14px 16px; border-radius: 14px; margin-bottom: 16px; }
.notice > .ic { flex: none; width: 22px; height: 22px; }
.notice > div { flex: 1; display: flex; flex-direction: column; }
.notice small { color: inherit; opacity: .85; font-size: 13px; }
.notice-warn { background: var(--warn-soft); color: #7A4B00; }
.notice-bad { background: var(--bad-soft); color: #8E1622; }
.notice-info { background: var(--brand-soft); color: #33349B; }
.buy-card .notice { margin: 0; }

.prose { font-size: 15.5px; line-height: 1.75; }
.prose h2 { font-size: 21px; margin-top: 1.4em; }
.prose h3 { font-size: 17px; margin-top: 1.3em; }
.prose ul, .prose ol { padding-left: 22px; }
.prose li { margin-bottom: 6px; }
.prose img { border-radius: 14px; margin: 16px 0; box-shadow: var(--shadow-sm); height: auto; }
.prose a { color: var(--brand); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.prose blockquote { margin: 18px 0; padding: 14px 18px; border-left: 4px solid var(--gold); background: var(--gold-soft); border-radius: 0 12px 12px 0; color: #5E4200; }
.prose pre { background: var(--ink); color: #E9EBFF; padding: 16px; border-radius: 12px; overflow: auto; }
.prose pre code { background: none; color: inherit; padding: 0; }
.prose table { width: 100%; border-collapse: collapse; }
.prose th, .prose td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; }
.prose > :first-child { margin-top: 0; }

/* ==========================================================================
   Forms
   ========================================================================== */
.form { display: grid; gap: 16px; }
.field { display: grid; gap: 7px; font-weight: 600; font-size: 13.5px; margin: 0; }
.field > span em, .field span em { font-style: normal; color: var(--muted); font-weight: 500; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=url], input[type=search], input:not([type]), select, textarea {
  width: 100%; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; font-size: 15px; font-weight: 500; transition: border-color .2s, box-shadow .2s; }
.search input { border: 0; padding: 12px 8px; box-shadow: none; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px rgba(91, 92, 235, .14); }
textarea { resize: vertical; min-height: 80px; line-height: 1.6; }
.code-area { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13.5px; }
.input-ic { position: relative; }
.input-ic > .ic { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: #9CA1BE; pointer-events: none; }
.input-ic input { padding-left: 44px; }
.pw-toggle { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); border: 0; background: none; color: #9CA1BE; padding: 6px; display: grid; }
.hint { color: var(--muted); font-size: 12.5px; font-weight: 500; }
.fine { color: var(--muted); font-size: 12.5px; text-align: center; margin: 0; display: flex; gap: 6px; align-items: center; justify-content: center; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; font-weight: 500; cursor: pointer; }
.check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--brand); flex: none; }
.check.sm { font-size: 13px; }
.strength { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; margin-top: 2px; }
.strength i { height: 4px; border-radius: 4px; background: var(--line); transition: .25s; }
.strength[data-level="1"] i:nth-child(-n+1) { background: var(--bad); }
.strength[data-level="2"] i:nth-child(-n+2) { background: var(--gold-2); }
.strength[data-level="3"] i:nth-child(-n+3) { background: #7DBB3C; }
.strength[data-level="4"] i { background: var(--ok); }
.file-btn { position: relative; overflow: hidden; cursor: pointer; }
.file-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.dropzone { position: relative; display: block; border: 2px dashed #CDD1E6; border-radius: 16px; background: #FAFBFE; padding: 26px; text-align: center; cursor: pointer; transition: .2s; }
.dropzone:hover, .dropzone.drag { border-color: var(--brand); background: #F5F5FF; }
.dropzone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.dz-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; pointer-events: none; }
.dz-empty .ic { width: 32px; height: 32px; color: var(--brand); }
.dz-empty small { color: var(--muted); font-weight: 500; }
.dz-preview { display: none; align-items: center; gap: 14px; justify-content: center; pointer-events: none; }
.dz-preview img { max-height: 120px; border-radius: 10px; box-shadow: var(--shadow-sm); }
.dz-preview img:not([src]) { display: none; }
.dz-name { font-weight: 700; word-break: break-all; }
.dropzone.has-file { border-style: solid; border-color: var(--ok); background: var(--ok-soft); }
.dropzone.has-file .dz-empty { display: none; }
.dropzone.has-file .dz-preview { display: flex; }
.dropzone.small { padding: 18px; }

/* ==========================================================================
   Auth
   ========================================================================== */
.auth-body { background: #fff; }
.auth-wrap { display: grid; grid-template-columns: minmax(380px, 46%) 1fr; min-height: 100vh; }
.auth-art { position: relative; display: flex; flex-direction: column; justify-content: space-between; padding: 44px; color: #fff; overflow: hidden; background: radial-gradient(600px 400px at 100% 0%, rgba(245, 184, 61, .28), transparent 60%), radial-gradient(700px 500px at 0% 100%, rgba(123, 77, 255, .45), transparent 60%), linear-gradient(160deg, #10143A, #0B1024); }
.auth-art::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(255, 255, 255, .08) 1px, transparent 1px); background-size: 24px 24px; }
.auth-art > * { position: relative; }
.auth-quote h2 { font-size: clamp(28px, 3vw, 40px); line-height: 1.15; letter-spacing: -.03em; margin-bottom: 26px; }
html.lang-km .auth-quote h2 { line-height: 1.45; letter-spacing: 0; }
.auth-quote ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.auth-quote li { display: flex; gap: 14px; align-items: center; padding: 14px 16px; border-radius: 14px; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .12); font-weight: 600; }
.auth-quote li .ic { color: var(--gold); }
.auth-foot { opacity: .5; }
.auth-main { display: flex; flex-direction: column; padding: 28px 40px; }
.auth-top { display: flex; justify-content: space-between; align-items: center; }
.auth-card { width: 100%; max-width: 460px; margin: auto; padding: 40px 0; }
.auth-card h1 { font-size: 30px; }
.auth-alt { text-align: center; margin-top: 22px; color: var(--muted); }
.auth-alt a { color: var(--brand); font-weight: 700; }
.auth-help { display: flex; gap: 8px; align-items: center; justify-content: center; color: var(--muted); font-size: 13px; }

/* ==========================================================================
   Learning player (distraction-free)
   ========================================================================== */
.learn-body { background: #F3F4FA; }
.learn-bar { position: sticky; top: 0; z-index: 40; height: 66px; display: flex; align-items: center; gap: 12px; padding: 0 18px; background: var(--ink); color: #fff; box-shadow: 0 4px 20px -8px rgba(0, 0, 0, .5); }
.lb-back, .lb-toggle { color: #fff; }
.lb-back { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: rgba(255, 255, 255, .08); }
.lb-back:hover { background: rgba(255, 255, 255, .16); }
.lb-toggle { display: none; }
.lb-title { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.2; }
.lb-title small { font-size: 11.5px; opacity: .55; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.lb-title strong { font-size: 15.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-progress { display: flex; align-items: center; gap: 10px; padding: 6px 14px 6px 6px; border-radius: 99px; background: rgba(255, 255, 255, .07); }
.ring { width: 38px; height: 38px; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 3.5; }
.ring-bg { stroke: rgba(255, 255, 255, .15); }
.ring-fg { stroke: var(--gold); stroke-linecap: round; stroke-dasharray: 0 97.4; transition: stroke-dasharray .6s; }
.lb-progress span { display: flex; flex-direction: column; line-height: 1.15; }
.lb-progress strong { font-size: 14px; }
.lb-progress small { font-size: 11px; opacity: .6; }
.learn-layout { display: grid; grid-template-columns: 360px minmax(0, 1fr); min-height: calc(100vh - 66px); }
.learn-side { position: sticky; top: 66px; height: calc(100vh - 66px); overflow-y: auto; background: #fff; border-right: 1px solid var(--line); }
.ls-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 20px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: #fff; z-index: 1; }
.ls-close { display: none; }
.ls-section { border-bottom: 1px solid var(--line-2); }
.ls-sec-title { padding: 14px 20px 8px; display: flex; flex-direction: column; }
.ls-sec-title span { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.ls-sec-title strong { font-size: 14.5px; }
.ls-section ul { list-style: none; margin: 0; padding: 0 0 8px; }
.ls-section li > a, .ls-section li > span { display: flex; gap: 12px; align-items: flex-start; padding: 10px 20px; font-size: 14px; border-left: 3px solid transparent; }
.ls-section li > a:hover { background: #F7F7FF; }
.ls-state { flex: none; width: 22px; height: 22px; border-radius: 50%; border: 2px solid #CDD1E6; display: grid; place-items: center; margin-top: 1px; }
.ls-state .ic { width: 12px; height: 12px; stroke-width: 3; }
.ls-l { display: flex; flex-direction: column; min-width: 0; }
.ls-l small { color: var(--muted); font-size: 12px; display: flex; align-items: center; gap: 4px; }
.ls-l em { color: var(--brand); font-style: normal; font-weight: 700; }
.ls-section li.done .ls-state { background: var(--ok); border-color: var(--ok); color: #fff; }
.ls-section li.current > a { background: var(--brand-soft); border-left-color: var(--brand); font-weight: 700; }
.ls-section li.current .ls-state { border-color: var(--brand); color: var(--brand); }
.ls-section li.current .ls-state .ic { fill: var(--brand); stroke: none; width: 10px; }
.ls-section li.current.done .ls-state { color: #fff; }
.ls-section li.current.done .ls-state .ic { fill: none; stroke: currentColor; width: 12px; }
.ls-section li.locked { color: #9DA2BE; }
.ls-section li.locked .ls-state { border-style: dashed; }
.side-scrim { display: none; }
.learn-main { padding: 28px 36px 60px; max-width: 1180px; width: 100%; margin: 0 auto; }
.preview-banner { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-radius: 16px; background: linear-gradient(135deg, var(--ink-2), var(--ink-3)); color: #fff; margin-bottom: 18px; }
.preview-banner > .ic { color: var(--gold); width: 26px; height: 26px; }
.preview-banner > div { flex: 1; display: flex; flex-direction: column; }
.preview-banner small { opacity: .7; }
.player { position: relative; aspect-ratio: 16 / 9; background: #05070F; border-radius: 20px; overflow: hidden; box-shadow: var(--shadow-lg); }
.player iframe, .player video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #000; }
.player-empty { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; color: #fff; background: radial-gradient(500px 300px at 50% 40%, rgba(91, 92, 235, .35), transparent 70%), linear-gradient(135deg, #10143A, #1B1446); }
.player-empty > div { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 20px; }
.player-empty .ic { width: 48px; height: 48px; color: var(--gold); }
.player-empty small { opacity: .65; max-width: 380px; }
.lesson-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin: 26px 0 20px; flex-wrap: wrap; }
.lesson-head h1 { margin: 0; font-size: clamp(22px, 2.4vw, 30px); }
.lh-complete { margin: 0; }
.lesson-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; align-items: start; }
.lesson-grid:not(:has(.resources)) { grid-template-columns: 1fr; }
.lesson-content { background: #fff; border-radius: var(--radius); padding: 28px 32px; border: 1px solid var(--line); }
.resources { background: #fff; border-radius: var(--radius); padding: 20px; border: 1px solid var(--line); display: grid; gap: 10px; position: sticky; top: 90px; }
.resources h3 { display: flex; gap: 8px; align-items: center; margin: 0 0 4px; font-size: 15px; }
.res { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 12px; border: 1px solid var(--line); transition: .2s; }
.res:hover { border-color: var(--brand); background: #FAFAFF; }
.res > span:nth-child(2) { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.res strong { font-size: 13.5px; line-height: 1.35; }
.res small { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.res-ic { flex: none; width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--ok-soft); color: var(--ok); }
.res-ic.link { background: var(--brand-soft); color: var(--brand); }
.lesson-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 28px; }
.ln-btn { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: 16px; background: #fff; border: 1px solid var(--line); transition: .2s; }
.ln-btn:hover { border-color: var(--brand); box-shadow: var(--shadow); }
.ln-btn span { display: flex; flex-direction: column; min-width: 0; }
.ln-btn small { font-size: 12px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.ln-btn strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ln-btn.next { justify-content: flex-end; text-align: right; grid-column: 2; }
.ln-btn.locked { opacity: .7; }
.ln-finish { grid-column: 2; display: flex; gap: 14px; align-items: center; padding: 16px 18px; border-radius: 16px; background: linear-gradient(135deg, var(--gold-soft), #FFE9BF); color: #6A4600; }
.ln-finish .ic { width: 32px; height: 32px; color: var(--gold-2); }
.ln-finish span { display: flex; flex-direction: column; }

/* ==========================================================================
   Checkout
   ========================================================================== */
.checkout-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 22px; }
.checkout-head h1 { margin: 0; }
.order-no { padding: 8px 14px; border-radius: 12px; background: #fff; border: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.order-no strong { color: var(--text); }
.steps { list-style: none; padding: 0; margin: 0 0 28px; display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; counter-reset: s; }
.steps li { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 14px; background: #fff; border: 1px solid var(--line); font-weight: 700; font-size: 13.5px; color: var(--muted); }
.steps li > span { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--line-2); font-size: 13px; }
.steps li.done { color: var(--ok); }
.steps li.done > span { background: var(--ok); color: #fff; }
.steps li.done > span .ic { width: 14px; height: 14px; stroke-width: 3; }
.steps li.now { color: var(--text); border-color: var(--brand); box-shadow: 0 0 0 4px rgba(91, 92, 235, .1); }
.steps li.now > span { background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; }
.checkout-grid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 28px; align-items: start; }
.pay-panel { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 30px; align-items: start; }
.pay-qr { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.qr-frame { width: 100%; border-radius: 22px; padding: 18px; background: linear-gradient(160deg, #E1232F, #B5121E); box-shadow: 0 20px 40px -20px rgba(181, 18, 30, .7); display: grid; gap: 14px; }
.qr-brand { display: flex; justify-content: space-between; align-items: center; color: #fff; font-weight: 800; font-size: 18px; }
.khqr { background: #fff; color: #E1232F; padding: 3px 10px; border-radius: 8px; font-size: 13px; letter-spacing: .05em; }
.qr-frame img { width: 100%; border-radius: 14px; background: #fff; }
.qr-missing { aspect-ratio: 1; background: #fff; border-radius: 14px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 20px; text-align: center; color: var(--muted); }
.qr-missing .ic { width: 48px; height: 48px; }
.qr-amount { text-align: center; color: #fff; font-size: 28px; font-weight: 800; letter-spacing: -.02em; }
.pay-info h2 { margin-bottom: 14px; }
.kv { margin: 0 0 16px; display: grid; gap: 0; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.kv > div { display: grid; grid-template-columns: 150px 1fr; gap: 12px; padding: 11px 14px; border-bottom: 1px solid var(--line-2); align-items: center; }
.kv > div:last-child { border-bottom: 0; }
.kv dt { color: var(--muted); font-size: 13px; font-weight: 600; }
.kv dd { margin: 0; font-size: 14.5px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; word-break: break-word; }
.amt { font-size: 18px; color: var(--brand); }
.instructions { font-size: 14px; color: #3D4366; background: #FAFBFE; border-radius: 14px; padding: 14px 16px; border: 1px solid var(--line-2); }
.instructions p:last-child { margin: 0; }
.review-panel { text-align: center; padding: 40px 36px; }
.review-panel .kv { text-align: left; max-width: 560px; margin: 22px auto; }
.review-panel .btn-row { justify-content: center; }
.review-panel .notice { max-width: 560px; margin: 0 auto 20px; text-align: left; }
.review-ic { width: 76px; height: 76px; margin: 0 auto 16px; border-radius: 24px; display: grid; place-items: center; background: var(--warn-soft); color: var(--warn); animation: pulse 2.4s infinite; }
.review-ic .ic { width: 36px; height: 36px; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(245, 184, 61, .45); } 50% { box-shadow: 0 0 0 14px rgba(245, 184, 61, 0); } }
.summary-card { background: #fff; border-radius: 22px; overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); position: sticky; top: 130px; }
.summary-card > img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.sc-body { padding: 20px 22px 22px; display: grid; gap: 10px; }
.sc-body h3 { margin: 0; }
.sc-line, .sc-total { display: flex; justify-content: space-between; font-size: 14px; }
.sc-line { color: var(--muted); padding-top: 12px; border-top: 1px solid var(--line); }
.sc-total { font-weight: 800; font-size: 16px; }
.sc-total strong { font-size: 26px; letter-spacing: -.02em; }
.sc-trust { list-style: none; padding: 14px 0 0; margin: 4px 0 0; border-top: 1px solid var(--line); display: grid; gap: 8px; font-size: 13px; color: var(--muted); }
.sc-trust li { display: flex; gap: 8px; align-items: center; }
.sc-trust .ic { color: var(--ok); }
.summary-card form { text-align: center; margin-top: 6px; }
.help-card { display: flex; gap: 12px; align-items: center; padding: 16px; border-radius: 16px; background: #fff; border: 1px solid var(--line); margin-top: 16px; }
.help-card > .ic { color: var(--brand); }
.help-card div { display: flex; flex-direction: column; }
.help-card small { color: var(--muted); }

/* ==========================================================================
   Student area
   ========================================================================== */
.student-layout { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 30px; padding-top: 32px; padding-bottom: 60px; align-items: start; }
.student-nav { position: sticky; top: 130px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; box-shadow: var(--shadow-sm); }
.sn-user { display: flex; gap: 12px; align-items: center; padding: 10px 10px 16px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.sn-user div { display: flex; flex-direction: column; min-width: 0; }
.sn-user strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sn-user small { color: var(--muted); font-size: 12px; }
.student-nav nav { display: grid; gap: 2px; }
.student-nav nav a { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 12px; font-weight: 600; font-size: 14.5px; color: #3D4366; }
.student-nav nav a span { flex: 1; }
.student-nav nav a .ic { color: #9197B5; }
.student-nav nav a:hover { background: var(--line-2); }
.student-nav nav a.active { background: var(--ink); color: #fff; }
.student-nav nav a.active .ic { color: var(--gold); }
.student-main { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; align-content: start; }
.student-main > .section-head { margin-bottom: 0; }
.welcome-card { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 30px 32px; border-radius: 24px; color: #fff; background: radial-gradient(500px 250px at 100% 0%, rgba(245, 184, 61, .25), transparent 60%), linear-gradient(135deg, #151A4A, #2A1C5E); flex-wrap: wrap; }
.welcome-card h1 { margin: 0 0 4px; }
.welcome-card p { margin: 0; opacity: .75; }
.resume-card { display: flex; align-items: center; gap: 14px; padding: 12px 14px 12px 12px; border-radius: 18px; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .16); min-width: 340px; max-width: 420px; transition: .2s; }
.resume-card:hover { background: rgba(255, 255, 255, .16); }
.resume-card img { width: 86px; height: 56px; object-fit: cover; border-radius: 10px; }
.resume-card > div { flex: 1; min-width: 0; }
.resume-card small { opacity: .65; font-size: 12px; }
.resume-card strong { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 14px; }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stat { display: flex; gap: 14px; align-items: center; padding: 18px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.stat strong { display: block; font-size: 24px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.stat small { color: var(--muted); font-weight: 600; font-size: 12.5px; }
.stat-ic { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; flex: none; }
.stat-ic.c1 { background: var(--brand-soft); color: var(--brand); }
.stat-ic.c2 { background: var(--ok-soft); color: var(--ok); }
.stat-ic.c3 { background: var(--gold-soft); color: #B97800; }
.stat-ic.c4 { background: #FDEBF6; color: #C02A86; }
.progress-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.progress-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; transition: .2s; }
.progress-card:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.pc-thumb { position: relative; aspect-ratio: 16 / 9; }
.pc-thumb img { width: 100%; height: 100%; object-fit: cover; }
.done-badge { position: absolute; left: 12px; top: 12px; display: inline-flex; gap: 5px; align-items: center; padding: 4px 10px; border-radius: 99px; background: var(--gold); color: #1B1403; font-size: 12px; font-weight: 800; }
.pc-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.pc-body h3 { font-size: 15.5px; margin: 0 0 4px; }
.pc-meta { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); margin-bottom: 12px; }
.pc-meta strong { color: var(--brand); }
.pc-body .btn { margin-top: auto; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.two-col .panel { margin: 0; }
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.timeline li { display: flex; gap: 12px; align-items: flex-start; padding: 8px 0; position: relative; }
.timeline li:not(:last-child)::before { content: ""; position: absolute; left: 13px; top: 36px; bottom: -6px; width: 2px; background: var(--line-2); }
.tl-dot { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); }
.timeline li.done .tl-dot { background: var(--ok-soft); color: var(--ok); }
.timeline a, .timeline li > div { display: flex; flex-direction: column; min-width: 0; }
.timeline strong { font-size: 14px; }
.timeline small { color: var(--muted); font-size: 12.5px; }
.mini-notif { display: flex; gap: 12px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line-2); }
.mini-notif span:last-child { display: flex; flex-direction: column; min-width: 0; }
.mini-notif strong { font-size: 13.5px; font-weight: 600; }
.mini-notif.unread strong { font-weight: 800; }
.mini-notif small { color: var(--muted); font-size: 12px; }
.mini-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line-2); font-size: 14px; }
.mini-row > span:last-child { display: flex; gap: 8px; align-items: center; white-space: nowrap; }
.total-chip { display: inline-flex; gap: 8px; align-items: center; padding: 10px 16px; border-radius: 14px; background: #fff; border: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.total-chip strong { color: var(--text); font-size: 17px; }
.note-bad { display: block; color: var(--bad); font-size: 12.5px; }

.tabs { display: flex; gap: 4px; padding: 4px; border-radius: 14px; background: #fff; border: 1px solid var(--line); width: max-content; max-width: 100%; overflow-x: auto; margin-bottom: 18px; }
.tabs a { display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 10px; font-weight: 700; font-size: 14px; color: var(--muted); white-space: nowrap; }
.tabs a:hover { color: var(--text); }
.tabs a.active { background: var(--ink); color: #fff; }
.tabs a.active .count { background: rgba(255, 255, 255, .2); color: #fff; }
.tabs a.active .count.warn { background: var(--gold); color: #1B1403; }
.student-main .tabs, .a-toolbar .tabs { margin-bottom: 0; }

.table-panel { padding: 6px; }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; padding: 12px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 14px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: #FAFBFE; }
.table tr.selected { background: var(--brand-soft); }
.t-actions { text-align: right; white-space: nowrap; }
.t-actions > *, .t-actions form { display: inline-flex; vertical-align: middle; margin: 0; }

.list-panel { padding: 6px 0; }
.notif-row { display: flex; align-items: flex-start; gap: 14px; padding: 16px 20px; border-bottom: 1px solid var(--line-2); }
.notif-row:last-child { border-bottom: 0; }
.notif-row.unread { background: #F8F8FF; }
.notif-row.unread strong::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--brand); margin-right: 8px; vertical-align: middle; }
.nr-body { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.nr-body p { margin: 2px 0; color: #4A5074; font-size: 14px; }
.nr-body small { color: var(--muted); font-size: 12.5px; }
.notif-row form { margin: 0; }

.profile-cover { display: flex; gap: 22px; align-items: center; padding: 28px 30px; border-radius: 24px; color: #fff; background: radial-gradient(500px 250px at 100% 0%, rgba(245, 184, 61, .22), transparent 60%), linear-gradient(135deg, #151A4A, #2A1C5E); }
.profile-cover h1 { margin: 0; }
.profile-cover p { margin: 2px 0 10px; opacity: .75; }
.profile-cover .avatar { box-shadow: 0 0 0 4px rgba(255, 255, 255, .2); }
.pc-stats { display: flex; gap: 18px; flex-wrap: wrap; font-size: 14px; opacity: .9; }
.avatar-field { display: flex; gap: 18px; align-items: center; }
.avatar-field > div { display: grid; gap: 8px; justify-items: start; }
.lang-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 220px)); gap: 14px; }
.lang-card { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 16px 18px; border-radius: 16px; border: 2px solid var(--line); background: #fff; text-align: left; }
.lang-card strong { font-size: 18px; }
.lang-card small { color: var(--muted); }
.lang-card.on { border-color: var(--brand); background: var(--brand-soft); }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer { margin-top: 40px; background: var(--ink); color: rgba(255, 255, 255, .72); }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 40px; padding-top: 56px; padding-bottom: 40px; }
.footer-grid h4 { color: #fff; font-size: 14px; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 16px; }
.footer-grid > div > a { display: flex; align-items: center; gap: 8px; padding: 5px 0; font-size: 14.5px; }
.footer-grid > div > a:hover { color: #fff; }
.fg-brand p { margin: 16px 0; font-size: 14.5px; max-width: 360px; }
.brand-dark { color: #fff; }
.socials { display: flex; gap: 10px; }
.socials a { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: rgba(255, 255, 255, .08); color: #fff; }
.socials a:hover { background: var(--gold); color: #1B1403; }
.pay-chip { display: inline-flex; gap: 8px; align-items: center; padding: 8px 12px; border-radius: 10px; background: rgba(255, 255, 255, .07); margin-top: 10px; font-size: 13px; font-weight: 700; color: #fff; }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 20px; padding-bottom: 24px; border-top: 1px solid rgba(255, 255, 255, .08); font-size: 13px; }
.footer-bottom span { display: inline-flex; align-items: center; gap: 6px; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1280px) {
  .topbar-inner { padding: 0 24px; grid-template-columns: auto minmax(260px, 1fr) auto; }
  .course-layout { grid-template-columns: minmax(0, 1fr) 340px; }
  .ch-copy { max-width: calc(100% - 380px); }
  .journey { grid-template-columns: repeat(3, 1fr); row-gap: 30px; }
  .journey::before { display: none; }
}
@media (max-width: 1100px) {
  .course-grid, .course-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hero-inner { grid-template-columns: 1fr; }
  .checkout-grid { grid-template-columns: 1fr; }
  .summary-card { position: static; }
  .pay-panel { grid-template-columns: 260px 1fr; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .progress-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .continue-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .learn-layout { grid-template-columns: 300px minmax(0, 1fr); }
  .lesson-grid { grid-template-columns: 1fr; }
  .resources { position: static; }
}
@media (max-width: 960px) {
  .topbar-inner { grid-template-columns: auto minmax(0, 1fr) auto; gap: 16px; }
  .pb-name, .profile-btn > .ic { display: none; }
  .profile-btn { padding: 3px; }
  .top-actions .btn-ghost-light { display: none; }
  .course-grid, .course-grid.cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .course-layout { grid-template-columns: 1fr; }
  .course-aside { margin-top: 0; position: static; order: -1; }
  .ch-copy { max-width: none; }
  .ch-facts { grid-template-columns: repeat(2, 1fr); }
  .student-layout { grid-template-columns: minmax(0, 1fr); }
  .student-nav { position: static; min-width: 0; }
  .student-nav nav { display: flex; overflow-x: auto; gap: 4px; }
  .student-nav nav a { white-space: nowrap; }
  .sn-user { display: none; }
  .two-col { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-art { display: none; }
  .steps { grid-template-columns: repeat(5, auto); overflow-x: auto; }
  .steps li { white-space: nowrap; }
  /* Learning sidebar becomes a drawer */
  .learn-layout { grid-template-columns: 1fr; }
  .lb-toggle { display: grid; }
  .learn-side { position: fixed; left: 0; top: 0; bottom: 0; height: 100vh; width: min(360px, 88vw); z-index: 70; transform: translateX(-100%); transition: transform .3s ease; box-shadow: var(--shadow-lg); }
  .ls-close { display: grid; }
  .side-open .learn-side { transform: none; }
  .side-open .side-scrim { display: block; position: fixed; inset: 0; background: rgba(11, 16, 36, .5); z-index: 60; }
  .learn-main { padding: 18px 16px 48px; }
  .lb-progress small { display: none; }
}
@media (max-width: 760px) {
  .topbar { min-height: 76px; }
  .topbar-inner { min-height: 76px; grid-template-columns: 1fr auto; gap: 10px; padding: 0 14px; }
  .brand-text small { display: none; }
  .brand { min-width: 0; }
  .brand-text { min-width: 0; }
  .brand-text strong { font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .top-actions .icon-btn { width: 36px; height: 36px; }
  .brand-mark svg { width: 38px; height: 38px; }
  .search { display: none; grid-column: 1 / -1; order: 3; margin-bottom: 12px; }
  .search-open .search { display: flex; }
  .mobile-search-toggle { display: grid; color: #fff; }
  .pb-name, .profile-btn .ic { display: none; }
  .profile-btn { padding: 3px; }
  .top-actions { gap: 4px; }
  .top-actions .btn { padding: 9px 12px; font-size: 13px; }
  .top-actions .btn-ghost-light { display: none; }
  .lang-switch a { padding: 4px 8px; }
  .topbar .lang-switch a.on { display: none; }
  .top-actions .btn-gold { padding: 9px 12px; font-size: 12.5px; }
  .toasts { top: 86px; }
  .notif-menu { position: fixed; top: 70px; left: 12px; right: 12px; width: auto; }
  .container { padding: 0 16px; }
  .section { padding-top: 32px; padding-bottom: 32px; }
  .hero-inner { padding-top: 40px; padding-bottom: 44px; gap: 28px; }
  .hero-stats strong { font-size: 26px; }
  .hero-stats > div { padding: 14px 12px; }
  .course-grid { gap: 14px; }
  .cc-body { padding: 12px 12px 14px; gap: 8px; }
  .cc-title { font-size: 14.5px; }
  .cc-facts { font-size: 12px; gap: 4px 10px; }
  .cc-facts li:nth-child(3) { display: none; }
  .course-card .btn { padding: 9px 10px; font-size: 13px; }
  .course-card .btn .ic { display: none; }
  .filters { width: 100%; }
  .filters .select { flex: 1; }
  .filters select { width: 100%; }
  .how { padding: 28px 18px; }
  .journey { grid-template-columns: repeat(2, 1fr); }
  .outcomes { grid-template-columns: 1fr; }
  .panel { padding: 20px; }
  .pay-panel { grid-template-columns: 1fr; }
  .pay-qr { max-width: 300px; margin: 0 auto; width: 100%; }
  .kv > div { grid-template-columns: 1fr; gap: 2px; }
  .grid-2 { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat { padding: 14px; gap: 10px; }
  .stat-ic { width: 40px; height: 40px; }
  .stat strong { font-size: 19px; }
  .progress-grid { grid-template-columns: 1fr; }
  .continue-row { grid-template-columns: minmax(0, 1fr); }
  .resume-card { min-width: 0; width: 100%; }
  .welcome-card, .profile-cover { padding: 22px; }
  .profile-cover { flex-direction: column; text-align: center; }
  .pc-stats { justify-content: center; }
  .lesson-nav { grid-template-columns: 1fr; }
  .ln-btn.next, .ln-finish { grid-column: 1; }
  .lesson-content { padding: 20px; }
  .lb-title small { display: none; }
  .lb-progress { padding: 4px; }
  .lb-progress span { display: none; }
  .lb-user { display: none; }
  .footer-grid { grid-template-columns: 1fr; gap: 26px; }
  .auth-main { padding: 20px; }
  .lang-cards { grid-template-columns: 1fr 1fr; }
  /* Tables become cards */
  .table thead { display: none; }
  .table, .table tbody, .table tr, .table td { display: block; width: 100%; }
  .table tr { border: 1px solid var(--line); border-radius: 14px; margin-bottom: 10px; padding: 6px 4px; background: #fff; }
  .table td { border: 0; padding: 7px 12px; display: flex; justify-content: space-between; gap: 12px; text-align: right; }
  .table td::before { content: attr(data-label); font-size: 12px; font-weight: 700; color: var(--muted); text-align: left; }
  .table td.t-actions { justify-content: flex-end; }
  .table td.t-actions::before { display: none; }
}
@media (max-width: 420px) {
  .course-grid, .course-grid.cols-3 { grid-template-columns: 1fr; }
  .cc-facts li:nth-child(3) { display: inline-flex; }
  .course-card .btn .ic { display: inline; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ==========================================================================
   Secure lesson player
   ========================================================================== */
.protected .player, .secure-player { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.secure-player { position: absolute; inset: 0; background: #05070F; overflow: hidden; outline: none; }
.secure-player:fullscreen { width: 100vw; height: 100vh; }
.secure-player.fake-fs { position: fixed; z-index: 999; }
.sp-stage, .sp-stage > div, .sp-stage iframe, .sp-stage video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.sp-stage iframe { pointer-events: none; }
/* YouTube title bar / logo / "Watch on YouTube" are hidden behind the shield and trimmed off */
.sp-stage iframe { top: -60px; height: calc(100% + 120px); }
.sp-shield { position: absolute; inset: 0; z-index: 2; cursor: pointer; background: transparent; }
.sp-watermark { position: absolute; z-index: 3; pointer-events: none; display: flex; flex-direction: column; align-items: flex-start; gap: 1px; color: rgba(255, 255, 255, .38); text-shadow: 0 1px 3px rgba(0, 0, 0, .5); white-space: nowrap; transition: left 1.4s ease, top 1.4s ease; transform: rotate(-8deg); }
.sp-watermark strong { font-size: clamp(12px, 1.6vw, 18px); font-weight: 800; letter-spacing: .02em; }
.sp-watermark small { font-size: clamp(9px, 1.1vw, 12px); font-weight: 600; opacity: .9; }
.sp-brandmark { position: absolute; z-index: 3; top: 12px; right: 14px; pointer-events: none; color: rgba(255, 255, 255, .5); font-size: clamp(10px, 1.2vw, 13px); font-weight: 800; letter-spacing: .03em; text-shadow: 0 1px 3px rgba(0, 0, 0, .55); }
.sp-cover, .sp-end, .sp-msg { position: absolute; inset: 0; z-index: 4; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; color: #fff; text-align: center; padding: 20px; }
.sp-cover { background: radial-gradient(500px 300px at 50% 45%, rgba(91, 92, 235, .35), transparent 70%), linear-gradient(135deg, rgba(16, 20, 58, .96), rgba(27, 20, 70, .96)); }
.secure-player.started .sp-cover { background: rgba(8, 10, 24, .55); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }
.sp-cover[hidden], .sp-end[hidden], .sp-msg[hidden] { display: none; }
.sp-big { width: 84px; height: 84px; border-radius: 50%; border: 0; display: grid; place-items: center; background: linear-gradient(135deg, #FFD27A, var(--gold-2)); color: #1B1403; box-shadow: 0 16px 40px -10px rgba(242, 157, 56, .8); transition: transform .2s; }
.sp-big:hover { transform: scale(1.07); }
.sp-big .ic { width: 32px; height: 32px; fill: currentColor; margin-left: 4px; }
.secure-player:not(.is-ready) .sp-big { animation: spPulse 1.6s infinite; }
@keyframes spPulse { 50% { box-shadow: 0 0 0 14px rgba(245, 184, 61, .15); } }
.sp-cover-title { font-size: clamp(16px, 2vw, 22px); max-width: 80%; }
.secure-player.started .sp-cover-title, .secure-player.started .sp-cover-note { display: none; }
.sp-cover-note { opacity: .65; font-size: 12.5px; display: flex; align-items: center; gap: 6px; }
.sp-end { background: rgba(8, 10, 24, .88); }
.sp-end > .ic { width: 48px; height: 48px; color: var(--gold); }
.sp-end strong { font-size: 20px; }
.sp-msg { background: #0B1024; z-index: 6; font-weight: 600; }
.sp-controls { position: absolute; left: 0; right: 0; bottom: 0; z-index: 5; padding: 26px 16px 10px; background: linear-gradient(180deg, transparent, rgba(0, 0, 0, .78)); color: #fff; opacity: 0; transform: translateY(8px); transition: opacity .25s, transform .25s; pointer-events: none; }
.secure-player.started.ui-on .sp-controls, .secure-player.started:not(.is-playing) .sp-controls, .secure-player:focus-within.started .sp-controls { opacity: 1; transform: none; pointer-events: auto; }
.secure-player.is-playing:not(.ui-on) { cursor: none; }
.sp-bar { display: flex; align-items: center; gap: 6px; }
.sp-bar button { width: 38px; height: 38px; border: 0; border-radius: 10px; background: transparent; color: #fff; display: grid; place-items: center; }
.sp-bar button:hover { background: rgba(255, 255, 255, .14); }
.sp-bar .ic { width: 22px; height: 22px; }
.i-pause { display: none; } .is-playing .i-play { display: none; } .is-playing .i-pause { display: inline-grid; }
.i-play .ic { fill: currentColor; }
.sp-time { font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; opacity: .9; margin-left: 4px; white-space: nowrap; }
.sp-spacer { flex: 1; }
.sp-vol { display: flex; align-items: center; }
.sp-vol input { width: 0; opacity: 0; transition: width .2s, opacity .2s; accent-color: var(--gold); }
.sp-vol:hover input, .sp-vol:focus-within input { width: 80px; opacity: 1; }
.sp-vol .mx { display: none; } .is-muted .sp-vol .mx { display: inline; } .is-muted .sp-vol .w1, .is-muted .sp-vol .w2 { display: none; }
.sp-seek { -webkit-appearance: none; appearance: none; width: 100%; height: 5px; border-radius: 99px; margin: 0 0 8px; cursor: pointer; background: linear-gradient(90deg, var(--gold) var(--p, 0%), rgba(255, 255, 255, .25) var(--p, 0%)); }
.sp-seek::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 4px rgba(245, 184, 61, .35); }
.sp-seek::-moz-range-thumb { width: 14px; height: 14px; border: 0; border-radius: 50%; background: #fff; }
.sp-seek:hover { height: 7px; }
.sp-speed { position: relative; }
.sp-speed > button { width: auto !important; padding: 0 10px; font-weight: 800; font-size: 13px; }
.sp-speed-menu { position: absolute; bottom: 44px; right: 0; background: rgba(12, 15, 36, .96); border-radius: 12px; padding: 6px; display: grid; min-width: 86px; box-shadow: var(--shadow-lg); }
.sp-speed-menu[hidden] { display: none; }
.sp-speed-menu button { width: 100% !important; height: 32px !important; font-weight: 700; font-size: 13px; }
@media (max-width: 600px) {
  .sp-bar { gap: 2px; } .sp-bar button { width: 34px; height: 34px; }
  .sp-vol input { display: none; } .sp-time { font-size: 12px; }
  .sp-big { width: 64px; height: 64px; } .sp-big .ic { width: 24px; height: 24px; }
}

/* ==========================================================================
   Course page (v2)
   ========================================================================== */
:root { --hdr: 110px; }
@media (max-width: 760px) { :root { --hdr: 76px; } }
.cx-hero { position: relative; overflow: hidden; color: #fff; background: #0B1024; isolation: isolate; }
.cx-hero-bg { position: absolute; inset: -40px; z-index: -2; background-size: cover; background-position: center; filter: blur(46px) saturate(1.3); opacity: .55; transform: scale(1.1); }
.cx-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(800px 380px at 88% 10%, rgba(245, 184, 61, .16), transparent 60%), linear-gradient(90deg, rgba(11, 16, 36, .97) 0%, rgba(11, 16, 36, .9) 45%, rgba(11, 16, 36, .7) 100%); }
.cx-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background-image: radial-gradient(rgba(255, 255, 255, .06) 1px, transparent 1px); background-size: 24px 24px; mask-image: linear-gradient(180deg, #000, transparent); }
.cx-hero-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 56px; align-items: center; padding-top: 44px; padding-bottom: 56px; }
.cx-crumbs { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: rgba(255, 255, 255, .6); margin-bottom: 18px; flex-wrap: wrap; }
.cx-crumbs a { display: inline-flex; align-items: center; gap: 6px; }
.cx-crumbs a:hover { color: #fff; }
.cx-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.cx-badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 99px; font-size: 12.5px; font-weight: 700; background: rgba(255, 255, 255, .09); border: 1px solid rgba(255, 255, 255, .14); color: rgba(255, 255, 255, .9); }
.cx-badge.gold { background: linear-gradient(135deg, #FFD27A, var(--gold-2)); color: #1B1403; border-color: transparent; }
.cx-badge.ok { background: rgba(29, 184, 102, .18); border-color: rgba(29, 184, 102, .4); color: #7BF0B0; }
.cx-badge.ok.solid { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.cx-badge.warn { background: rgba(245, 184, 61, .15); color: var(--gold); border-color: rgba(245, 184, 61, .35); }
.cx-hero h1 { font-size: clamp(30px, 3.6vw, 48px); line-height: 1.1; letter-spacing: -.035em; margin-bottom: 14px; }
html.lang-km .cx-hero h1 { line-height: 1.4; letter-spacing: 0; }
.cx-sub { font-size: 18px; line-height: 1.6; color: rgba(255, 255, 255, .78); margin-bottom: 20px; max-width: 640px; }
.cx-proof, .cx-byline { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; font-size: 14px; color: rgba(255, 255, 255, .8); }
.cx-proof { margin-bottom: 14px; }
.cx-rating { display: inline-flex; align-items: center; gap: 8px; }
.cx-rating strong { color: var(--gold); font-size: 18px; }
.cx-rating a { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(255, 255, 255, .3); }
.cx-dot { display: inline-flex; align-items: center; gap: 6px; }
.cx-byline { margin-bottom: 26px; }
.cx-byline a strong { color: #fff; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(245, 184, 61, .6); }
.cx-ins-mini { display: inline-grid; }
.cx-ins-mini img, .cx-ins-mini .avatar { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; font-size: 11px; box-shadow: 0 0 0 2px rgba(255, 255, 255, .25); }
.cx-quick { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.cx-quick li { display: inline-flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 14px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .1); font-size: 13.5px; color: rgba(255, 255, 255, .75); }
.cx-quick .ic { color: var(--gold); }
.cx-quick strong { color: #fff; }
.cx-media { position: relative; display: block; width: 100%; padding: 0; border: 0; border-radius: 22px; overflow: hidden; aspect-ratio: 16 / 9; background: #000; box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .8), 0 0 0 1px rgba(255, 255, 255, .12); cursor: default; }
button.cx-media { cursor: pointer; }
.cx-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
button.cx-media:hover img { transform: scale(1.04); }
.cx-media-overlay { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: #fff; background: radial-gradient(circle at 50% 50%, rgba(11, 16, 36, .45), rgba(11, 16, 36, .78)); text-shadow: 0 2px 10px rgba(0, 0, 0, .4); }
a.cx-media:hover img { transform: scale(1.04); }
a.cx-media:hover .cx-play { transform: scale(1.08); }
.cx-media-progress { position: absolute; left: 0; right: 0; bottom: 0; height: 6px; background: rgba(255, 255, 255, .2); }
.cx-media-progress span { display: block; height: 100%; background: linear-gradient(90deg, #FFD27A, var(--gold-2)); }
.cx-play { width: 78px; height: 78px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .96); color: var(--ink); margin-bottom: 10px; box-shadow: 0 0 0 10px rgba(255, 255, 255, .15), 0 18px 40px rgba(0, 0, 0, .45); transition: transform .25s, box-shadow .25s; }
.cx-play .ic { width: 28px; height: 28px; fill: currentColor; margin-left: 4px; }
button.cx-media:hover .cx-play { transform: scale(1.08); box-shadow: 0 0 0 16px rgba(255, 255, 255, .12), 0 18px 40px rgba(0, 0, 0, .45); }
.cx-media-overlay strong { font-size: 17px; }
.cx-media-overlay small { font-size: 13px; opacity: .75; }

/* Sticky section nav */
.cx-tabs { position: sticky; top: var(--hdr); z-index: 30; background: rgba(255, 255, 255, .92); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.admin-bar .cx-tabs { top: calc(var(--hdr) + 32px); }
.cx-tabs-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; height: 60px; }
.cx-tab-links { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.cx-tab-links::-webkit-scrollbar { display: none; }
.cx-tab-links a { position: relative; padding: 18px 14px; font-weight: 700; font-size: 14.5px; color: var(--muted); white-space: nowrap; }
.cx-tab-links a:hover { color: var(--text); }
.cx-tab-links a.active { color: var(--text); }
.cx-tab-links a.active::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: -1px; height: 3px; border-radius: 3px 3px 0 0; background: linear-gradient(90deg, var(--brand), var(--brand-2)); }
.cx-tab-cta { display: flex; align-items: center; gap: 14px; opacity: 0; transform: translateY(6px); pointer-events: none; transition: .25s; }
.cx-tabs.stuck .cx-tab-cta { opacity: 1; transform: none; pointer-events: auto; }
.cx-tabs.stuck { box-shadow: 0 10px 30px -18px rgba(16, 20, 55, .35); }
.cx-tab-title { font-weight: 700; font-size: 14px; max-width: 280px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cx-tab-cta .cx-price { font-size: 20px; }
.cx-tab-cta .btn, .cx-tab-cta .cx-cta-form .btn { width: auto; padding: 9px 16px; font-size: 13.5px; }
.cx-cta-form { margin: 0; }

/* Layout */
.cx-layout { display: grid; grid-template-columns: minmax(0, 1fr) 390px; gap: 44px; align-items: start; padding-top: 36px; padding-bottom: 30px; }
.cx-main { min-width: 0; display: grid; gap: 44px; }
.cx-section { display: grid; gap: 20px; scroll-margin-top: calc(var(--hdr) + 80px); }
.cx-h2, .cx-section h2 { font-size: 24px; letter-spacing: -.02em; margin: 0; }
.cx-card { background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 28px 30px; box-shadow: var(--shadow-sm); }
.cx-card > h2 { margin-bottom: 16px; font-size: 20px; }
.cx-card-head { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 20px; }
.cx-card-head h2 { font-size: 21px; margin: 0 0 2px; }
.cx-card-head p { margin: 0; color: var(--muted); font-size: 14px; }
.cx-ic { flex: none; width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); }
.cx-ic.gold { background: var(--gold-soft); color: #B97800; }
.cx-learn { background: linear-gradient(180deg, #FFFDF7, #fff 60%); border-color: #F3E4C0; }
.cx-outcomes { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 14px 28px; }
.cx-outcomes li { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; line-height: 1.55; }
.cx-tick { flex: none; width: 24px; height: 24px; border-radius: 8px; display: grid; place-items: center; background: var(--ok-soft); color: var(--ok); margin-top: 1px; }
.cx-tick .ic { width: 14px; height: 14px; stroke-width: 3; }
.cx-includes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.cx-includes > div { display: flex; flex-direction: column; gap: 2px; padding: 18px; border-radius: 18px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.cx-includes .cx-ic { width: 40px; height: 40px; border-radius: 12px; margin-bottom: 10px; }
.cx-includes strong { font-size: 16px; }
.cx-includes small { color: var(--muted); font-size: 12.5px; font-weight: 600; }
.cx-readmore { position: relative; }
.cx-readmore .cx-desc { max-height: 300px; overflow: hidden; transition: max-height .4s ease; }
.cx-readmore:not(.short):not(.open) .cx-desc { mask-image: linear-gradient(180deg, #000 60%, transparent); -webkit-mask-image: linear-gradient(180deg, #000 60%, transparent); }
.cx-readmore.open .cx-desc { max-height: 5000px; }
.cx-readmore.short .cx-more-btn { display: none; }
.cx-more-btn { display: inline-flex; align-items: center; gap: 6px; margin-top: 12px; border: 0; background: none; color: var(--brand); font-weight: 800; font-size: 14px; padding: 0; }
.cx-readmore.open .cx-more-btn .ic { transform: rotate(180deg); }
.cx-req { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.cx-req li { display: flex; gap: 10px; align-items: flex-start; }
.cx-req .ic { color: var(--brand); margin-top: 6px; }

/* Curriculum */
.cx-sec-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.cx-sec-head p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.cx-myprogress { padding: 14px 18px; border-radius: 14px; background: var(--brand-soft); }
.cx-myprogress .progress { background: #fff; margin: 0 0 6px; }
.cx-myprogress small { font-weight: 700; color: #3B3CB8; }
.cx-curriculum { display: grid; gap: 12px; }
.cx-sec { background: #fff; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; box-shadow: var(--shadow-sm); transition: box-shadow .2s; }
.cx-sec[open] { box-shadow: var(--shadow); }
.cx-sec summary { list-style: none; display: flex; align-items: center; gap: 16px; padding: 18px 20px; cursor: pointer; }
.cx-sec summary::-webkit-details-marker { display: none; }
.cx-sec summary:hover { background: #FAFBFE; }
.cx-sec-no { flex: none; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--ink); color: var(--gold); font-weight: 800; font-size: 14px; letter-spacing: .02em; }
.cx-sec-title { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.cx-sec-title strong { font-size: 16px; }
.cx-sec-title small { color: var(--muted); font-size: 13px; font-weight: 600; }
.cx-chev { flex: none; width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--line-2); color: var(--muted); transition: transform .25s; }
.cx-sec[open] > summary .cx-chev { transform: rotate(180deg); }
.cx-lessons { list-style: none; margin: 0; padding: 4px 0 10px; border-top: 1px solid var(--line-2); }
.cx-lesson { display: flex; align-items: center; gap: 14px; padding: 10px 20px 10px 22px; }
.cx-lesson.open:hover { background: #F8F8FF; }
.cx-l-ic { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--line-2); color: var(--muted); }
.cx-l-ic .ic { width: 14px; height: 14px; }
.cx-l-ic.vid .ic { fill: currentColor; margin-left: 2px; }
.cx-lesson.open .cx-l-ic { background: var(--brand-soft); color: var(--brand); }
.cx-lesson.done .cx-l-ic { background: var(--ok); color: #fff; }
.cx-lesson.done .cx-l-ic .ic { fill: none; margin: 0; stroke-width: 3; }
.cx-l-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.cx-l-title { text-align: left; border: 0; background: none; padding: 0; font: inherit; font-weight: 600; font-size: 15px; color: var(--text); cursor: default; }
a.cx-l-title, button.cx-l-title { cursor: pointer; }
a.cx-l-title:hover, button.cx-l-title:hover { color: var(--brand); }
.cx-lesson.locked .cx-l-title { color: #6E7494; }
.cx-l-main small { color: var(--muted); font-size: 12.5px; }
.cx-pill { flex: none; display: inline-flex; align-items: center; gap: 5px; padding: 6px 12px; border-radius: 99px; border: 1.5px solid var(--brand); background: #fff; color: var(--brand); font-weight: 800; font-size: 12px; cursor: pointer; transition: .2s; }
.cx-pill:hover { background: var(--brand); color: #fff; }
.cx-pill .ic { fill: currentColor; }
.cx-l-end { flex: none; width: 20px; color: #A3A8C3; display: grid; place-items: center; }

/* Instructor */
.cx-instructor { display: flex; gap: 26px; align-items: flex-start; }
.cx-ins-photo img, .cx-ins-photo .avatar { width: 112px; height: 112px; border-radius: 28px; object-fit: cover; font-size: 36px; box-shadow: var(--shadow); }
.cx-ins-body { flex: 1; min-width: 0; }
.cx-ins-body h3 { font-size: 22px; margin: 0; }
.cx-ins-head { color: var(--brand); font-weight: 700; margin: 2px 0 14px; }
.cx-ins-stats { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.cx-ins-stats li { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 99px; background: var(--line-2); font-size: 13px; color: var(--muted); }
.cx-ins-stats li strong { color: var(--text); }
.cx-ins-stats .ic { color: var(--gold-2); }
.cx-ins-bio { font-size: 15px; color: #3D4366; }

/* FAQ */
.cx-faq { display: grid; gap: 10px; }
.cx-faq details { background: #fff; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.cx-faq summary { list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 18px 20px; font-weight: 700; font-size: 15.5px; cursor: pointer; }
.cx-faq summary::-webkit-details-marker { display: none; }
.cx-faq details[open] summary { color: var(--brand); }
.cx-faq details[open] .cx-chev { transform: rotate(45deg); background: var(--brand-soft); color: var(--brand); }
.cx-faq-a { padding: 0 20px 18px; color: #4A5074; font-size: 15px; line-height: 1.7; }
.cx-faq-a p:last-child { margin: 0; }

/* Purchase card */
.cx-aside { position: sticky; top: calc(var(--hdr) + 80px); }
.admin-bar .cx-aside { top: calc(var(--hdr) + 112px); }
.cx-buy { background: #fff; border-radius: 24px; border: 1px solid var(--line); box-shadow: var(--shadow-lg); padding: 26px; display: grid; gap: 14px; }
.cx-price-row { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; }
.cx-price { font-size: 40px; font-weight: 800; letter-spacing: -.04em; line-height: 1; }
.cx-price.free { color: var(--ok); }
.cx-price-row small { color: var(--muted); font-weight: 600; font-size: 13px; }
.cx-note { display: flex; align-items: center; gap: 6px; margin: 0; color: var(--muted); font-size: 12.5px; }
.cx-note.center { justify-content: center; }
.cx-buy .notice { margin: 0; }
.cx-buy-enrolled { display: flex; gap: 16px; align-items: center; }
.cx-buy-enrolled p { margin: 8px 0 0; font-size: 14px; color: var(--muted); }
.cx-buy-enrolled p strong { color: var(--text); }
.cx-ring { --p: 0; flex: none; width: 86px; height: 86px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--brand) calc(var(--p) * 1%), var(--line-2) 0); }
.cx-ring span { width: 70px; height: 70px; border-radius: 50%; background: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.1; }
.cx-ring strong { font-size: 19px; }
.cx-ring small { font-size: 10.5px; color: var(--muted); font-weight: 700; text-transform: uppercase; }
.cx-track { list-style: none; margin: 0; padding: 14px; border-radius: 14px; background: var(--warn-soft); display: grid; gap: 8px; }
.cx-track li { display: flex; align-items: center; gap: 10px; font-size: 13.5px; font-weight: 700; color: #9A7A3A; }
.cx-track li span { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; border: 2px solid #E4C98E; background: #fff; }
.cx-track li.done { color: var(--ok); } .cx-track li.done span { background: var(--ok); border-color: var(--ok); color: #fff; }
.cx-track li.now { color: #7A4B00; } .cx-track li.now span { border-color: var(--gold-2); box-shadow: 0 0 0 4px rgba(245, 184, 61, .25); animation: spPulse 1.6s infinite; }
.cx-buy-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 6px; padding-top: 4px; }
.cx-buy-actions form { margin: 0; display: grid; }
.cx-act { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 4px; border-radius: 12px; border: 1px solid var(--line); background: #fff; font-size: 12px; font-weight: 700; color: var(--muted); cursor: pointer; transition: .2s; }
.cx-act:hover, .cx-act.copied { border-color: var(--brand); color: var(--brand); }
.cx-act.on { color: #B97800; border-color: #F3D48A; background: var(--gold-soft); }
.cx-act.on .ic { fill: currentColor; }
.cx-buy-inc { border-top: 1px solid var(--line); padding-top: 16px; }
.cx-buy-inc > strong { font-size: 14.5px; }
.cx-buy-inc ul { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 9px; font-size: 14px; color: #3D4366; }
.cx-buy-inc li { display: flex; gap: 10px; align-items: center; }
.cx-buy-inc .ic { color: var(--brand); }
.cx-paybox { border-radius: 16px; padding: 14px 16px; background: #FAFBFE; border: 1px dashed #D7DAEB; }
.cx-paybox-head { display: flex; align-items: center; gap: 6px; font-weight: 800; font-size: 13px; color: var(--ok); margin-bottom: 10px; }
.cx-paylogos { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.cx-paylogos .pl { padding: 4px 10px; border-radius: 8px; background: #fff; border: 1px solid var(--line); font-size: 12px; font-weight: 800; color: #3D4366; }
.cx-paylogos .pl.wing { background: #E1232F; color: #fff; border-color: #E1232F; }
.cx-paylogos .pl.khqr { color: #E1232F; border-color: #F4B7BB; }
.cx-paysteps { margin: 0; padding-left: 18px; font-size: 12.5px; color: var(--muted); display: grid; gap: 3px; }

.cx-related { padding-top: 20px; }

/* Mobile purchase bar */
.cx-mbar { display: none; }
@media (max-width: 960px) {
  .cx-hero-grid { grid-template-columns: 1fr; gap: 28px; padding-top: 24px; padding-bottom: 36px; }
  .cx-hero-media { order: -1; }
  .cx-layout { grid-template-columns: minmax(0, 1fr); gap: 30px; }
  .cx-aside { position: static; order: -1; }
  .cx-tab-cta { display: none; }
  .cx-includes { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .cx-includes > div { padding: 14px; }
  .cx-includes .cx-ic { width: 34px; height: 34px; margin-bottom: 6px; }
  .cx-mbar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; align-items: center; gap: 14px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: rgba(255, 255, 255, .96); backdrop-filter: blur(12px); border-top: 1px solid var(--line); box-shadow: 0 -10px 30px -12px rgba(16, 20, 55, .25); transform: translateY(110%); transition: transform .3s ease; }
  .cx-mbar.show { transform: none; }
  .cx-mbar-price { display: flex; flex-direction: column; line-height: 1.1; }
  .cx-mbar-price small { color: var(--muted); font-size: 11.5px; font-weight: 700; }
  .cx-mbar-price .cx-price, .cx-mbar-price strong { font-size: 24px; }
  .cx-mbar > .btn, .cx-mbar > .cx-cta-form { flex: 1; }
  .cx-mbar .btn { padding: 12px 14px; font-size: 14px; }
  body:has(.cx-mbar) .site-footer { padding-bottom: 76px; }
}
@media (max-width: 640px) {
  .cx-hero h1 { font-size: 28px; }
  .cx-sub { font-size: 16px; }
  .cx-quick li { padding: 8px 11px; font-size: 12.5px; }
  .cx-card { padding: 20px 18px; border-radius: 18px; }
  .cx-outcomes { grid-template-columns: 1fr; }
  .cx-instructor { flex-direction: column; gap: 16px; }
  .cx-ins-photo img, .cx-ins-photo .avatar { width: 84px; height: 84px; border-radius: 22px; }
  .cx-sec summary { padding: 14px; gap: 12px; }
  .cx-sec-no { width: 36px; height: 36px; }
  .cx-lesson { padding: 10px 14px; gap: 10px; }
  .cx-pill { padding: 5px 9px; }
  .cx-tabs-inner { height: 52px; }
  .cx-tab-links a { padding: 15px 10px; font-size: 13.5px; }
  .cx-buy { padding: 20px; border-radius: 20px; }
}

/* Preview modal */
.cx-modal { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 24px; }
.cx-modal[hidden] { display: none; }
.cx-modal-scrim { position: absolute; inset: 0; background: rgba(5, 7, 18, .78); backdrop-filter: blur(6px); animation: fadeIn .2s; }
.cx-modal-box { position: relative; width: min(1080px, 100%); max-height: calc(100vh - 48px); overflow: auto; background: #0E1330; color: #fff; border-radius: 22px; box-shadow: 0 40px 100px rgba(0, 0, 0, .6); display: grid; grid-template-columns: minmax(0, 1fr) 300px; grid-template-rows: auto 1fr; animation: popIn .25s ease; }
.cx-modal-head { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 18px 12px 22px; }
.cx-modal-head div { display: flex; flex-direction: column; min-width: 0; }
.cx-modal-head small { color: var(--gold); font-weight: 800; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
.cx-modal-head strong { font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cx-modal-head .icon-btn { color: #fff; }
.cx-modal-player { position: relative; aspect-ratio: 16 / 9; margin: 0 0 18px 18px; border-radius: 14px; overflow: hidden; box-shadow: none; }
.cx-modal-list { padding: 0 18px 18px; display: flex; flex-direction: column; gap: 6px; }
.cx-modal-list > strong { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: rgba(255, 255, 255, .6); margin-bottom: 4px; }
.cx-pv { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, .08); background: rgba(255, 255, 255, .04); color: #fff; text-align: left; font-weight: 600; font-size: 14px; cursor: pointer; }
.cx-pv:hover { background: rgba(255, 255, 255, .08); }
.cx-pv.active { border-color: var(--gold); background: rgba(245, 184, 61, .12); }
.cx-pv span:nth-child(2) { flex: 1; }
.cx-pv small { color: rgba(255, 255, 255, .55); font-size: 12px; }
.cx-pv-ic { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .1); flex: none; }
.cx-pv-ic .ic { fill: currentColor; margin-left: 2px; }
.cx-pv.active .cx-pv-ic { background: var(--gold); color: #1B1403; }
.cx-modal-cta { margin-top: auto; padding-top: 12px; }
html.cx-modal-open { overflow: hidden; }
@keyframes popIn { from { opacity: 0; transform: translateY(14px) scale(.98); } }
@keyframes fadeIn { from { opacity: 0; } }
@media (max-width: 860px) {
  .cx-modal { padding: 0; align-items: end; }
  .cx-modal-box { grid-template-columns: 1fr; border-radius: 22px 22px 0 0; max-height: 92vh; }
  .cx-modal-player { margin: 0 12px 14px; }
  .cx-modal-list { padding: 0 12px 16px; }
}
@media (max-width: 420px) {
  .topbar .brand { gap: 8px; }
  .topbar .brand-mark svg { width: 34px; height: 34px; }
  .topbar .brand-text strong { font-size: 15.5px; }
  .topbar-inner { gap: 6px; padding: 0 12px; }
  .top-actions .btn-gold { display: none; }
  .top-actions .m-login { display: grid; color: #fff; }
}
.m-login { display: none; }

/* ==========================================================================
   Mobile experience (phones)
   ========================================================================== */
.auth-mbrand { display: none; }
@media (max-width: 960px) {
  .auth-mbrand { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 26px; font-size: 20px; font-weight: 800; }
  .auth-mbrand svg { width: 42px; height: 42px; display: block; }
  .auth-card { padding-top: 24px; }
  /* Course page: purchase card after the content, bottom bar always available */
  .cx-aside { order: 0; }
  .cx-mbar { transform: none; }
}
@media (max-width: 760px) {
  html { -webkit-tap-highlight-color: transparent; }
  body { font-size: 15px; }
  .section-head { align-items: flex-start; }
  /* Filters: one scrollable row of compact pills */
  .filters { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px; padding: 2px 16px 4px; scrollbar-width: none; gap: 8px; }
  .filters::-webkit-scrollbar { display: none; }
  .filters .select { flex: none; }
  .filters select { width: auto; padding: 9px 34px 9px 12px; font-size: 13.5px; border-radius: 99px; }
  .chips { margin-left: -16px; margin-right: -16px; padding-left: 16px; padding-right: 16px; }
  .chip { padding: 8px 13px; font-size: 13.5px; }
  .home-courses { padding-top: 22px; }
  .home-courses h2 { font-size: 21px; }
}
@media (max-width: 560px) {
  /* Course cards become compact horizontal rows */
  .course-grid, .course-grid.cols-3 { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .course-card { display: grid; grid-template-columns: 128px minmax(0, 1fr); border-radius: 16px; }
  .course-card:hover { transform: none; }
  .cc-thumb { aspect-ratio: auto; height: 100%; min-height: 128px; }
  .cc-thumb img { position: absolute; inset: 0; object-position: 12% center; }
  .price-badge { left: 8px; top: 8px; padding: 3px 9px; font-size: 11.5px; }
  .enrolled-badge { left: 8px; bottom: 8px; padding: 3px 8px; font-size: 10.5px; }
  .cc-save { right: auto; left: 92px; top: 8px; }
  .save-btn { width: 28px; height: 28px; border-radius: 8px; }
  .save-btn .ic { width: 14px; height: 14px; }
  .cc-body { padding: 11px 12px 12px; gap: 5px; }
  .cc-meta-top .cat-tag { font-size: 11px; padding: 2px 8px; }
  .rating { font-size: 12px; }
  .cc-title { font-size: 14.5px; min-height: 0; }
  html.lang-km .cc-title { min-height: 0; }
  .cc-facts { font-size: 11.5px; gap: 2px 10px; margin: 0; }
  .cc-facts li:nth-child(3) { display: inline-flex; }
  .course-card .btn { padding: 8px 10px; font-size: 12.5px; border-radius: 10px; margin-top: 4px; }
  .course-card .btn .ic { display: none; }
  /* Journey steps: 2 x 3 compact */
  .journey { gap: 18px 10px; }
  .j-ic { width: 50px; height: 50px; border-radius: 15px; }
  .journey small { font-size: 12px; }
  /* Student dashboard */
  .stat { flex-direction: column; align-items: flex-start; gap: 8px; }
  .stat small { line-height: 1.3; }
  .progress-card { display: grid; grid-template-columns: 116px minmax(0, 1fr); }
  .progress-card:hover { transform: none; }
  .pc-thumb { aspect-ratio: auto; height: 100%; min-height: 120px; }
  .pc-thumb img { position: absolute; inset: 0; object-position: 12% center; }
  .pc-body { padding: 12px; }
  .pc-body h3 { font-size: 14.5px; }
  .pc-meta { margin-bottom: 8px; font-size: 12px; }
  .pc-body .btn { padding: 8px 10px; font-size: 12.5px; }
  .done-badge { left: 6px; top: 6px; font-size: 10.5px; padding: 3px 7px; }
  .welcome-card h1 { font-size: 24px; }
  .resume-card { padding: 10px; }
  .student-layout { padding-top: 16px; gap: 16px; }
  .student-nav { padding: 6px; border-radius: 14px; }
  .student-nav nav a { padding: 9px 12px; font-size: 13.5px; }
  /* Checkout */
  .checkout-head h1 { font-size: 24px; }
  .steps { display: flex; gap: 6px; margin-bottom: 18px; overflow: visible; }
  .steps li { flex: none; padding: 8px; font-size: 12.5px; }
  .steps li:not(.now) { font-size: 0; gap: 0; }
  .steps li.now { flex: 1; }
  .checkout-aside { order: -1; }
  .checkout-grid { gap: 16px; }
  .summary-card { display: grid; grid-template-columns: 96px minmax(0, 1fr); border-radius: 16px; box-shadow: var(--shadow-sm); }
  .summary-card > img { height: 100%; aspect-ratio: auto; }
  .sc-body { padding: 12px 14px; gap: 6px; }
  .sc-body h3 { font-size: 14.5px; }
  .sc-body .cc-facts, .sc-line, .sc-trust, .summary-card form { display: none; }
  .sc-total strong { font-size: 20px; }
  .help-card { display: none; }
  .pay-panel { gap: 18px; }
  .qr-frame { padding: 14px; }
  .review-panel { padding: 28px 18px; }
  /* Notifications */
  .notif-row { padding: 14px; gap: 10px; }
}
/* Footer social channels */
.footer-grid > div > a.f-social { align-items: center; gap: 12px; padding: 7px 0; }
.f-social > span:last-child { display: flex; flex-direction: column; line-height: 1.25; }
.f-social small { font-size: 11.5px; color: rgba(255, 255, 255, .5); font-weight: 600; }
.f-social strong { color: #fff; font-size: 14.5px; }
.f-social-ic { flex: none; width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; color: #fff; }
.f-social-ic.s-telegram, .socials a.s-telegram:hover { background: #229ED9; }
.f-social-ic.s-facebook, .socials a.s-facebook:hover { background: #1877F2; }
.f-social-ic.s-youtube, .socials a.s-youtube:hover { background: #FF0000; }
.socials a:hover { color: #fff; }
