/* =====================================================================
   Xe Ôm Mê AI — khu học online, giao diện v3 (hoc/index.html, hoc/dang-nhap.html, hoc/bai.html)
   Nạp SAU assets/v3/base.css (dùng biến và lớp .eyebrow .btn .link .grad của base). Hành vi: assets/xoma-learn.js.
   Mọi class riêng có tiền tố xl-. Trình chiếu: khung 16:9, cỡ chữ theo bề rộng khung (JS đặt font-size),
   kích thước bên trong tính bằng em. Điện thoại dọc / màn thấp: slide thành thẻ cao theo nội dung.
   ===================================================================== */
:root {
  --xl-bg: var(--bg, #FBFAF8); --xl-alt: var(--alt, #F4F1EC); --xl-card: #FFFFFF;
  --xl-ink: var(--ink, #1D1B19); --xl-ink-2: var(--ink-2, #3A3631); --xl-muted: var(--muted, #6F6A63); --xl-faint: var(--faint, #A39C93);
  --xl-line: var(--line, rgba(29, 27, 25, .10)); --xl-line-2: var(--line-2, rgba(29, 27, 25, .16));
  --xl-accent: var(--accent, #9A5B12); --xl-accent-ink: var(--accent-ink, #7A4609); --xl-soft: var(--accent-soft, #F3E7D3); --xl-gold: #E0A85A;
  --xl-night: var(--night, #141210); --xl-night-2: var(--night-2, #1E1B18); --xl-night-ink: var(--night-ink, #F5F1EA); --xl-night-muted: var(--night-muted, #A8A096);
  --xl-good: #2F6B45; --xl-good-bg: #E8F0E9; --xl-bad: #A1402A; --xl-bad-bg: #F7E7E1;
  --xl-sans: var(--sans, "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif);
  --xl-serif: var(--serif, "Noto Serif Display", Georgia, serif);
  --xl-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --xl-ease: var(--ease, cubic-bezier(.22, 1, .36, 1));
  --xl-shadow: 0 1px 0 rgba(255, 255, 255, .8) inset, 0 40px 80px -40px rgba(29, 27, 25, .30), 0 16px 32px -24px rgba(29, 27, 25, .22);
}
.xl-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }
.xl-page svg, .xl-player svg { display: inline-block; }

/* ---------- chung ---------- */
.xl-btn-ghost { background: var(--xl-card); color: var(--xl-ink); box-shadow: inset 0 0 0 1px var(--xl-line-2); }
.xl-btn-ghost:hover { box-shadow: inset 0 0 0 1px var(--xl-ink); }
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.xl-link { background: none; border: 0; padding: 0; font: inherit; color: var(--xl-accent); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; min-height: 32px; }
.xl-preview { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 24px; padding: 8px 14px 8px 12px; border-radius: 999px; background: var(--xl-alt); color: var(--xl-ink-2); font: 500 13.5px/1.4 var(--xl-sans); }
.xl-preview i { flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--xl-accent); box-shadow: 0 0 0 4px rgba(154, 91, 18, .14); }
.xl-note { padding: 14px 18px; border-radius: 16px; background: var(--xl-card); border: 1px solid var(--xl-line); color: var(--xl-ink-2); font-size: 15px; line-height: 1.55; margin: 0 0 16px; }
.xl-note a { color: var(--xl-accent); text-decoration: underline; text-underline-offset: 3px; }
.xl-line { display: block; height: 4px; border-radius: 999px; background: rgba(29, 27, 25, .08); overflow: hidden; }
.xl-line > i { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--xl-accent); transition: width .9s var(--xl-ease); }
.xl-line--lg { height: 6px; }

/* ---------- trang bảng học / đăng nhập ---------- */
.xl-page { padding: clamp(40px, 7vw, 88px) 0 0; }
.xl-page .xl-book:last-child, .xl-page .xl-how:last-child { margin-bottom: 0; }
.xl-wrap { width: var(--w, min(1120px, calc(100vw - 44px))); margin: 0 auto; }
.xl-h1 { font: 700 clamp(40px, 6vw, 76px)/1.04 var(--xl-sans); letter-spacing: -.045em; margin: 18px 0 0; }
.xl-lead { margin: 22px 0 0; font: 400 clamp(18px, 1.7vw, 21px)/1.5 var(--xl-sans); letter-spacing: -.018em; color: var(--xl-muted); max-width: 34em; }
.xl-hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 48px; align-items: end; margin-bottom: clamp(40px, 5vw, 64px); }
.xl-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 22px; margin-top: 32px; }
.xl-who { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; margin-top: 22px; font-size: 14px; color: var(--xl-muted); }

/* vòng tiến độ */
.xl-ringcard { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 28px; padding: 28px 32px; border-radius: 28px; background: var(--xl-card); box-shadow: var(--xl-shadow); border: 1px solid var(--xl-line); min-width: 400px; }
.xl-ringcard__ring { position: relative; width: 132px; height: 132px; }
.xl-ring { display: block; }
.xl-ring__bg { fill: none; stroke: rgba(29, 27, 25, .07); stroke-width: 10; }
.xl-ring__fg { fill: none; stroke: var(--xl-accent); stroke-width: 10; stroke-linecap: round; transition: stroke-dashoffset 1.2s var(--xl-ease); }
.xl-ringcard__pct { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.xl-ringcard__pct b { font: 700 36px/1 var(--xl-sans); letter-spacing: -.045em; font-variant-numeric: tabular-nums; }
.xl-ringcard__pct b small { font-size: 18px; font-weight: 600; margin-left: 1px; }
.xl-ringcard__pct span { margin-top: 6px; font: 500 12px/1 var(--xl-sans); color: var(--xl-muted); }
.xl-ringcard > p { margin: 0; font-size: 15px; line-height: 1.55; color: var(--xl-muted); max-width: 18em; }
.xl-stats { display: grid; gap: 0; margin: 0; }
.xl-stats div { display: flex; align-items: baseline; justify-content: space-between; gap: 24px; padding: 10px 0; border-bottom: 1px solid var(--xl-line); }
.xl-stats div:last-child { border-bottom: 0; }
.xl-stats dt { font-size: 14px; color: var(--xl-muted); }
.xl-stats dd { margin: 0; font: 650 20px/1 var(--xl-sans); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }

/* thẻ Học tiếp */
.xl-resume { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); align-items: center; gap: clamp(24px, 4vw, 56px); padding: clamp(18px, 2.4vw, 28px); border-radius: 28px; background: var(--xl-card); border: 1px solid var(--xl-line); box-shadow: var(--xl-shadow); margin-bottom: clamp(64px, 8vw, 104px); transition: transform .35s var(--xl-ease), box-shadow .35s var(--xl-ease); }
a.xl-resume:hover { transform: translateY(-3px); box-shadow: 0 1px 0 rgba(255,255,255,.8) inset, 0 50px 90px -40px rgba(29, 27, 25, .38), 0 20px 40px -24px rgba(29, 27, 25, .25); }
.xl-resume--done { grid-template-columns: 1fr; padding: 32px; }
.xl-resume__art { border-radius: 20px; overflow: hidden; background: var(--xl-night); padding: clamp(10px, 1.6vw, 18px); }
.xl-resume__txt h2 { margin: 10px 0 0; font: 700 clamp(26px, 2.8vw, 36px)/1.12 var(--xl-sans); letter-spacing: -.035em; }
.xl-resume__txt p { margin: 12px 0 0; font-size: 15px; color: var(--xl-muted); }
.xl-resume__txt .xl-line { margin-top: 18px; max-width: 360px; }
.xl-resume__btn { margin-top: 26px; }
.xl-mini { aspect-ratio: 16 / 9; border-radius: 12px; background: linear-gradient(180deg, #FFFDF9, #FBF6EE); padding: 7% 8%; display: flex; flex-direction: column; container-type: inline-size; position: relative; }
.xl-mini__k { font: 600 3.4cqi/1 var(--xl-sans); color: var(--xl-accent); }
.xl-mini b { margin-top: 3cqi; font: 700 6.4cqi/1.12 var(--xl-sans); letter-spacing: -.035em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.xl-mini__rows { display: grid; gap: 2.2cqi; margin-top: 5cqi; max-width: 70%; }
.xl-mini__rows i { height: 6.2cqi; border-radius: 2.2cqi; background: #fff; border: 1px solid var(--xl-line); }
.xl-mini__rows i.on { border-color: rgba(154, 91, 18, .45); box-shadow: 0 0 0 1.2cqi rgba(154, 91, 18, .08); }
.xl-mini__seg { position: absolute; left: 8%; right: 8%; bottom: 6%; display: flex; gap: 1cqi; }
.xl-mini__seg i { flex: 1; height: .9cqi; min-height: 2px; border-radius: 2px; background: #EAE4DB; }
.xl-mini__seg i.on { background: var(--xl-ink); }

/* mục lục dạng sách */
.xl-sechead { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; margin: 0 0 28px; }
.xl-h2 { margin: 0; font: 700 clamp(30px, 3.6vw, 44px)/1.08 var(--xl-sans); letter-spacing: -.04em; }
.xl-sechead p { margin: 0; color: var(--xl-muted); font-size: 16px; max-width: 34em; }
.xl-book { border-top: 1px solid var(--xl-line-2); margin-bottom: clamp(56px, 7vw, 96px); }
.xl-chap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.75fr); gap: 32px; padding: 36px 0; border-bottom: 1px solid var(--xl-line); }
.xl-chap__head { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 18px; align-content: start; align-items: start; }
.xl-chap__n { font: 400 44px/1 var(--xl-serif); letter-spacing: -.02em; color: var(--xl-accent); font-variant-numeric: tabular-nums; }
.xl-chap__k { display: block; font: 600 12.5px/1 var(--xl-sans); color: var(--xl-muted); letter-spacing: .01em; margin-top: 4px; }
.xl-chap__head h3 { margin: 8px 0 0; font: 650 23px/1.2 var(--xl-sans); letter-spacing: -.028em; }
.xl-chap__head p { margin: 8px 0 0; font-size: 14px; color: var(--xl-muted); }
.xl-chap__prog { display: flex; align-items: center; gap: 10px; margin-top: 14px; max-width: 220px; }
.xl-chap__prog .xl-line { flex: 1; }
.xl-chap__prog small { font: 600 12.5px/1 var(--xl-sans); color: var(--xl-muted); font-variant-numeric: tabular-nums; }
.xl-lessons { list-style: none; margin: 0; padding: 0; }
.xl-lessons li + li { border-top: 1px solid var(--xl-line); }
.xl-les { display: grid; grid-template-columns: 44px minmax(0, 1fr) 28px; align-items: center; gap: 14px; padding: 16px 12px; margin: 0 -12px; border-radius: 16px; color: var(--xl-ink); transition: background-color .2s; }
a.xl-les:hover { background: var(--xl-alt); }
a.xl-les:hover .xl-st--go { transform: translateX(3px); color: var(--xl-accent); }
.xl-les__n { font: 500 15px/1 var(--xl-sans); color: var(--xl-faint); font-variant-numeric: tabular-nums; }
.xl-les__t b { display: block; font: 600 17px/1.35 var(--xl-sans); letter-spacing: -.02em; }
.xl-les__t small { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 5px; font-size: 13.5px; color: var(--xl-muted); }
.xl-les.is-soon { color: var(--xl-muted); }
.xl-les.is-soon b { color: var(--xl-muted); font-weight: 500; }
.xl-tag { display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 999px; font: 600 11.5px/1.3 var(--xl-sans); background: var(--xl-alt); color: var(--xl-muted); white-space: nowrap; }
.xl-tag--free { background: var(--xl-soft); color: var(--xl-accent-ink); }
.xl-tag--done { background: var(--xl-good-bg); color: var(--xl-good); }
.xl-tag--doing { background: var(--xl-ink); color: #fff; }
.xl-st { justify-self: end; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-style: normal; color: var(--xl-faint); transition: transform .2s var(--xl-ease), color .2s; }
.xl-st svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.xl-st--done { background: var(--xl-accent); color: #fff; }
.xl-st--done svg { width: 14px; height: 14px; stroke-width: 2.6; }
.xl-st--doing { background: conic-gradient(var(--xl-accent) var(--p, 30%), rgba(29, 27, 25, .1) 0); -webkit-mask: radial-gradient(circle, transparent 8px, #000 8.5px); mask: radial-gradient(circle, transparent 8px, #000 8.5px); }
.xl-st--soon { width: 8px; height: 8px; margin-right: 9px; background: var(--xl-line-2); }
.xl-les:focus-visible { outline: 2px solid var(--xl-accent); outline-offset: 2px; }

/* bài học thử */
.xl-free { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin: 0 0 clamp(64px, 8vw, 104px); }
.xl-freecard { display: flex; flex-direction: column; gap: 12px; padding: 32px; border-radius: 28px; background: var(--xl-card); border: 1px solid var(--xl-line); min-height: 300px; transition: transform .35s var(--xl-ease), box-shadow .35s var(--xl-ease); }
.xl-freecard:hover { transform: translateY(-4px); box-shadow: 0 30px 60px -36px rgba(29, 27, 25, .35); }
.xl-freecard__k { font: 600 13px/1 var(--xl-sans); color: var(--xl-accent); }
.xl-freecard h3 { margin: 4px 0 0; font: 650 26px/1.18 var(--xl-sans); letter-spacing: -.033em; }
.xl-freecard ul, .xl-freecard p { margin: 6px 0 0; padding-left: 18px; color: var(--xl-muted); font-size: 15.5px; line-height: 1.6; }
.xl-freecard .link { margin-top: auto; padding-top: 12px; }
.xl-freecard--dark { background: var(--xl-night); color: var(--xl-night-ink); border-color: transparent; }
.xl-freecard--dark .xl-freecard__k, .xl-freecard--dark .link { color: var(--xl-gold); }
.xl-freecard--dark ul { color: var(--xl-night-muted); }
.xl-how { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; list-style: none; padding: 0; margin: 0; counter-reset: xh; border-top: 1px solid var(--xl-line-2); }
.xl-how li { padding: 26px 28px 0 0; counter-increment: xh; font-size: 15.5px; line-height: 1.55; color: var(--xl-muted); }
.xl-how li + li { padding-left: 28px; border-left: 1px solid var(--xl-line); }
.xl-how li::before { content: counter(xh, decimal-leading-zero); display: block; font: 400 28px/1 var(--xl-serif); color: var(--xl-accent); margin-bottom: 14px; }
.xl-how b { display: block; color: var(--xl-ink); font: 600 18px/1.3 var(--xl-sans); letter-spacing: -.02em; margin-bottom: 6px; }

/* CLS: bảng do JS vẽ */
[data-xl-board]:not(.is-ready) { min-height: 2400px; }
@media (min-width: 900px) { [data-xl-board]:not(.is-ready) { min-height: 1800px; } }

@media (max-width: 899px) {
  .xl-hero { grid-template-columns: 1fr; gap: 32px; align-items: start; }
  .xl-ringcard { min-width: 0; padding: 22px; gap: 22px; border-radius: 24px; }
  .xl-resume { grid-template-columns: 1fr; border-radius: 24px; }
  .xl-chap { grid-template-columns: 1fr; gap: 14px; padding: 28px 0; }
  .xl-free { grid-template-columns: 1fr; }
  .xl-freecard { min-height: 0; padding: 26px 24px; }
  .xl-how { grid-template-columns: 1fr; }
  .xl-how li, .xl-how li + li { padding: 22px 0; border-left: 0; border-bottom: 1px solid var(--xl-line); }
}
@media (max-width: 520px) {
  .xl-ringcard { grid-template-columns: 1fr; justify-items: start; }
  .xl-ringcard__ring { width: 112px; height: 112px; }
  .xl-ring { width: 112px; height: 112px; }
  .xl-ringcard__pct b { font-size: 30px; }
  .xl-stats { width: 100%; }
  .xl-les { grid-template-columns: 34px minmax(0, 1fr) 24px; gap: 10px; padding: 14px 8px; margin: 0 -8px; }
  .xl-les__t b { font-size: 16px; }
  .xl-chap__n { font-size: 36px; }
  .xl-cta .btn { flex: 1 1 auto; }
}

/* ---------- đăng nhập ---------- */
.xl-login { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(40px, 7vw, 96px); align-items: center; min-height: min(640px, calc(100vh - 240px)); }
.xl-steps3 { list-style: none; margin: 36px 0 0; padding: 0; display: grid; gap: 0; counter-reset: s3; border-top: 1px solid var(--xl-line); max-width: 30em; }
.xl-steps3 li { display: grid; grid-template-columns: 44px minmax(0, 1fr); padding: 16px 0; border-bottom: 1px solid var(--xl-line); counter-increment: s3; line-height: 1.5; color: var(--xl-muted); font-size: 15px; }
.xl-steps3 li::before { content: counter(s3, decimal-leading-zero); grid-row: span 2; font: 400 22px/1.1 var(--xl-serif); color: var(--xl-accent); }
.xl-steps3 b { display: block; color: var(--xl-ink); font-weight: 600; font-size: 16px; }
.xl-card { position: relative; padding: clamp(26px, 3.4vw, 40px); border-radius: 28px; background: var(--xl-card); border: 1px solid var(--xl-line); box-shadow: var(--xl-shadow); }
.xl-card::before { content: ""; position: absolute; z-index: -1; left: 10%; right: 10%; top: 12%; bottom: -6%; background: radial-gradient(closest-side, rgba(210, 154, 69, .25), rgba(210, 154, 69, 0)); filter: blur(12px); }
.xl-card__mark { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: var(--xl-alt); margin-bottom: 20px; }
.xl-card__mark svg { width: 24px; height: 24px; fill: none; stroke: var(--xl-ink); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.xl-card h2 { margin: 0 0 6px; font: 650 24px/1.2 var(--xl-sans); letter-spacing: -.03em; }
.xl-card > p { margin: 0 0 22px; color: var(--xl-muted); font-size: 15px; }
.xl-form { display: grid; gap: 12px; }
.xl-form label { font: 600 14px/1.4 var(--xl-sans); color: var(--xl-ink-2); }
.xl-input { width: 100%; min-height: 54px; padding: 0 18px; border-radius: 16px; border: 1px solid var(--xl-line-2); background: var(--xl-bg); font: 400 17px/1.2 var(--xl-sans); color: var(--xl-ink); transition: border-color .2s, box-shadow .2s, background-color .2s; }
.xl-input:focus { outline: none; border-color: var(--xl-accent); background: #fff; box-shadow: 0 0 0 4px rgba(154, 91, 18, .12); }
.xl-input[aria-invalid="true"] { border-color: var(--xl-bad); }
.xl-form .btn { width: 100%; min-height: 52px; border: 0; cursor: pointer; margin-top: 4px; }
.xl-form .btn:disabled { opacity: .6; cursor: wait; }
.xl-err { margin: 0; color: var(--xl-bad); font-size: 14px; }
.xl-status { margin: 0; font-size: 15px; line-height: 1.55; min-height: 1px; }
.xl-status.is-ok { padding: 14px 16px; border-radius: 14px; background: var(--xl-good-bg); color: #1F4A2F; }
.xl-status.is-bad { padding: 14px 16px; border-radius: 14px; background: var(--xl-bad-bg); color: #7A2B19; }
.xl-status a { color: inherit; text-decoration: underline; }
.xl-small { font-size: 14px; color: var(--xl-muted); line-height: 1.6; margin: 8px 0 0; }
.xl-small a { color: var(--xl-accent); }
@media (max-width: 899px) { .xl-login { grid-template-columns: 1fr; min-height: 0; } .xl-card { border-radius: 24px; } }

/* =====================================================================
   TRÌNH CHIẾU
   ===================================================================== */
html.xl-lesson, html.xl-lesson body { background: var(--xl-bg); }
/* ẩn thanh tab dưới (điện thoại) và trợ lý nổi trong lúc học */
html.xl-lesson .tab, html.xl-lesson .xn__dock, html.xl-lesson nav[aria-label="Điều hướng nhanh"] { display: none !important; }
html.xl-lesson body { padding-bottom: 0 !important; }
.xl-player {
  /* biến màu bên trong slide (đổi khi toàn màn hình) */
  --s-bg: linear-gradient(180deg, #FFFDF9, #FBF6EE); --s-ink: var(--xl-ink); --s-ink2: var(--xl-ink-2); --s-muted: var(--xl-muted); --s-card: #FFFFFF; --s-paper: #F6F3EE;
  --s-line: rgba(29, 27, 25, .10); --s-line2: rgba(29, 27, 25, .17); --s-soft: var(--xl-soft); --s-accent: var(--xl-accent); --s-accent-ink: var(--xl-accent-ink);
  --s-good: var(--xl-good); --s-good-bg: var(--xl-good-bg); --s-bad: var(--xl-bad); --s-bad-bg: var(--xl-bad-bg); --s-shadow: 0 1px 2px rgba(29, 27, 25, .05), 0 10px 24px -18px rgba(29, 27, 25, .3);
  --v-ink: #1D1B19; --v-muted: #6F6A63; --v-faint: #B5AEA4; --v-card: #FFFFFF; --v-paper: #F6F3EE; --v-sand: #ECE6DD; --v-line: #E4DED5; --v-accent: #9A5B12; --v-gold: #D29A45; --v-soft: #F3E7D3; --v-night: #141210; --v-nink: #F5F1EA; --v-good: #2F6B45; --v-bad: #B0482F;
  --win-bg: #FAF9F6; --win-side: #F3F1EC; --win-bar: #EFEBE5;
  position: relative; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; gap: 14px;
  height: calc(100vh - var(--xl-top, 56px)); height: calc(100dvh - var(--xl-top, 56px));
  padding: calc(var(--xl-pad, 0px) + 14px) 20px 16px; box-sizing: border-box; color: var(--xl-ink);
}
.xl-pbar { display: flex; align-items: center; gap: 14px; min-width: 0; width: 100%; max-width: var(--xl-dw, 1600px); margin: 0 auto; }
.xl-back { flex: none; display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--xl-card); box-shadow: inset 0 0 0 1px var(--xl-line-2); color: var(--xl-ink); transition: box-shadow .2s; }
.xl-back:hover { box-shadow: inset 0 0 0 1px var(--xl-ink); }
.xl-back svg, .xl-tool svg, .xl-nav svg, .xl-x svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.xl-ptitle { min-width: 0; flex: 1 1 auto; }
.xl-ptitle small { display: block; font: 600 12.5px/1.3 var(--xl-sans); color: var(--xl-accent); letter-spacing: .01em; }
.xl-ptitle h1 { margin: 2px 0 0; font: 650 18px/1.25 var(--xl-sans); letter-spacing: -.025em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.xl-tools { flex: none; display: flex; align-items: center; gap: 4px; padding: 4px; border-radius: 999px; background: rgba(29, 27, 25, .045); }
.xl-tool { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 14px; border-radius: 999px; border: 0; background: transparent; color: var(--xl-ink-2); font: 500 14px/1 var(--xl-sans); letter-spacing: -.01em; cursor: pointer; white-space: nowrap; transition: background-color .2s, color .2s; touch-action: manipulation; }
.xl-tool:hover:not(:disabled) { background: rgba(255, 255, 255, .9); color: var(--xl-ink); }
.xl-tool[aria-pressed="true"], .xl-tool[aria-expanded="true"] { background: var(--xl-card); color: var(--xl-ink); box-shadow: 0 1px 2px rgba(29, 27, 25, .08), 0 2px 8px -4px rgba(29, 27, 25, .2); }
.xl-tool:disabled { opacity: .45; cursor: not-allowed; }

.xl-body { min-height: 0; min-width: 0; display: grid; place-items: center; }
.xl-pbar { transform: translateY(var(--xl-gap, 0px)); }
.xl-ctrl { transform: translateY(calc(var(--xl-gap, 0px) * -1)); }
.xl-device { display: flex; align-items: stretch; border-radius: 22px; background: var(--xl-card); border: 1px solid var(--xl-line-2); box-shadow: var(--xl-shadow); overflow: hidden; max-width: 100%; }
.xl-viewport { position: relative; min-width: 0; touch-action: pan-y; }
.xl-stage { position: relative; width: 960px; height: 540px; font-size: 16px; overflow: hidden; color: var(--s-ink); font-family: var(--xl-sans); line-height: 1.45; letter-spacing: -.012em; background: var(--s-bg); }
.xl-notes { flex: none; display: flex; flex-direction: column; min-height: 0; border-left: 1px solid var(--xl-line); background: var(--xl-card); }
.xl-notes__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 22px 24px 0; }
.xl-notes__head h2 { margin: 0; font: 600 12.5px/1 var(--xl-sans); color: var(--xl-muted); letter-spacing: .01em; }
.xl-notes__head span { font: 600 12.5px/1 var(--xl-sans); color: var(--xl-muted); font-variant-numeric: tabular-nums; }
.xl-notes__text { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 14px 24px 16px; font-size: 15px; line-height: 1.7; color: var(--xl-ink-2); scrollbar-width: thin; }
.xl-notes__text p { margin: 0 0 .9em; }
.xl-play { flex: none; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 4px 12px; margin: 0 16px 16px; padding: 12px; border-radius: 16px; background: var(--xl-alt); }
.xl-play__btn { width: 40px; height: 40px; border-radius: 50%; border: 0; display: grid; place-items: center; background: var(--xl-ink); color: #fff; cursor: pointer; transition: transform .15s var(--xl-ease), background-color .2s; }
.xl-play__btn:active { transform: scale(.94); }
.xl-play__btn:disabled { opacity: .4; cursor: not-allowed; }
.xl-play__btn svg, .xl-listen svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.xl-play__btn .xl-fill, .xl-listen .xl-fill { fill: currentColor; stroke: none; }
.xl-play__t { min-width: 0; font: 500 13.5px/1.3 var(--xl-sans); }
.xl-play__t small { display: block; color: var(--xl-muted); font-size: 12px; }
.xl-wave { display: flex; align-items: center; gap: 3px; height: 22px; }
.xl-wave i { width: 3px; height: 30%; border-radius: 2px; background: var(--xl-faint); transition: height .3s; }
.xl-player.is-speaking .xl-wave i { background: var(--xl-accent); animation: xl-wv 1.2s ease-in-out infinite; }
.xl-player.is-speaking .xl-wave i:nth-child(1) { height: 40%; } .xl-player.is-speaking .xl-wave i:nth-child(2) { height: 80%; animation-delay: .1s; } .xl-player.is-speaking .xl-wave i:nth-child(3) { height: 55%; animation-delay: .2s; } .xl-player.is-speaking .xl-wave i:nth-child(4) { height: 95%; animation-delay: .3s; } .xl-player.is-speaking .xl-wave i:nth-child(5) { height: 45%; animation-delay: .4s; }
@keyframes xl-wv { 50% { transform: scaleY(.45); } }
.xl-auto { grid-column: 1 / -1; display: inline-flex; align-items: center; gap: 8px; padding: 6px 2px 0; font: 500 13px/1 var(--xl-sans); color: var(--xl-muted); cursor: pointer; }
.xl-auto input { width: 16px; height: 16px; accent-color: var(--xl-accent); margin: 0; }
.xl-notes__text.is-speaking p:first-child { color: var(--xl-ink); }

/* thanh điều khiển kính mờ */
.xl-ctrl { position: relative; z-index: 5; display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto auto; align-items: center; gap: 12px; width: 100%; max-width: var(--xl-dw, 1600px); margin: 0 auto; padding: 8px; border-radius: 999px; background: rgba(255, 255, 255, .72); -webkit-backdrop-filter: saturate(180%) blur(22px); backdrop-filter: saturate(180%) blur(22px); border: 1px solid var(--xl-line); box-shadow: 0 12px 30px -18px rgba(29, 27, 25, .3); }
.xl-nav { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 18px; border-radius: 999px; border: 0; font: 500 15px/1 var(--xl-sans); letter-spacing: -.01em; cursor: pointer; touch-action: manipulation; transition: background-color .2s, transform .15s var(--xl-ease), opacity .2s; }
.xl-nav:active { transform: scale(.96); }
.xl-nav--prev { background: transparent; color: var(--xl-ink); }
.xl-nav--prev:hover:not(:disabled) { background: rgba(29, 27, 25, .06); }
.xl-nav--next { background: var(--xl-ink); color: #fff; padding: 0 16px 0 20px; }
.xl-nav--next:hover:not(:disabled) { background: #000; }
.xl-nav:disabled { opacity: .35; cursor: default; transform: none; }
.xl-nav:focus-visible, .xl-tool:focus-visible, .xl-seg:focus-visible, .xl-listen:focus-visible, .xl-play__btn:focus-visible, .xl-back:focus-visible { outline: 2px solid var(--xl-accent); outline-offset: 2px; }
.xl-listen { width: 44px; height: 44px; border-radius: 50%; border: 0; display: grid; place-items: center; background: rgba(29, 27, 25, .06); color: var(--xl-ink); cursor: pointer; transition: background-color .2s; }
.xl-listen:hover:not(:disabled) { background: rgba(29, 27, 25, .1); }
.xl-listen[aria-pressed="true"] { background: var(--xl-accent); color: #fff; }
.xl-listen:disabled { opacity: .4; cursor: not-allowed; }
.xl-track { display: flex; gap: 3px; height: 28px; align-items: center; min-width: 0; padding: 0 4px; }
.xl-seg { flex: 1 1 0; min-width: 3px; height: 28px; padding: 0; border: 0; background: none; cursor: pointer; position: relative; }
.xl-seg::before { content: ""; position: absolute; left: 0; right: 0; top: 12.5px; height: 3px; border-radius: 2px; background: rgba(29, 27, 25, .12); transition: background-color .25s, transform .25s var(--xl-ease); }
.xl-seg.is-seen::before { background: rgba(29, 27, 25, .42); }
.xl-seg.is-current::before { background: var(--xl-accent); transform: scaleY(1.9); }
.xl-seg.is-quiz::after { content: ""; position: absolute; left: 50%; top: 4px; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--xl-faint); }
.xl-seg:hover::before { background: var(--xl-ink); }
.xl-count { font: 500 14px/1 var(--xl-sans); color: var(--xl-muted); white-space: nowrap; font-variant-numeric: tabular-nums; min-width: 4.2em; text-align: center; }

/* mục lục slide */
.xl-toc { position: fixed; z-index: 120; inset: 0; display: grid; justify-items: start; background: rgba(20, 18, 16, .32); opacity: 0; visibility: hidden; transition: opacity .2s ease, visibility 0s linear .2s; }
.xl-toc.is-open { opacity: 1; visibility: visible; transition: opacity .2s ease; }
.xl-toc__panel { width: min(400px, 100% - 32px); height: calc(100% - 24px); margin: 12px; border-radius: 24px; background: rgba(251, 250, 248, .92); -webkit-backdrop-filter: saturate(180%) blur(24px); backdrop-filter: saturate(180%) blur(24px); box-shadow: 0 30px 80px -30px rgba(20, 18, 16, .5); display: flex; flex-direction: column; overflow: hidden; transform: translateX(-24px); transition: transform .28s var(--xl-ease); }
.xl-toc.is-open .xl-toc__panel { transform: none; }
.xl-toc__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 20px 16px 14px 24px; border-bottom: 1px solid var(--xl-line); }
.xl-toc__head h2 { margin: 0; font: 650 18px/1.2 var(--xl-sans); letter-spacing: -.025em; }
.xl-toc ol { list-style: none; margin: 0; padding: 8px; overflow-y: auto; flex: 1 1 auto; }
.xl-toc li button { width: 100%; display: grid; grid-template-columns: 2.2em minmax(0, 1fr) auto; gap: 10px; align-items: center; text-align: left; padding: 10px 14px; border: 0; border-radius: 12px; background: none; font: 500 15px/1.35 var(--xl-sans); letter-spacing: -.01em; color: var(--xl-ink); cursor: pointer; min-height: 44px; }
.xl-toc li button span:first-child { font: 500 13px/1 var(--xl-sans); color: var(--xl-faint); font-variant-numeric: tabular-nums; }
.xl-toc li button small { font-size: 12px; color: var(--xl-muted); }
.xl-toc li button[aria-current="true"] { background: var(--xl-ink); color: #fff; }
.xl-toc li button[aria-current="true"] span:first-child, .xl-toc li button[aria-current="true"] small { color: rgba(255, 255, 255, .7); }
.xl-toc li button.is-seen span:first-child { color: var(--xl-accent); }
.xl-toc li button:not([aria-current="true"]):hover { background: rgba(29, 27, 25, .05); }
.xl-x { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; border: 0; background: rgba(29, 27, 25, .06); cursor: pointer; color: var(--xl-ink); }

.xl-toast { position: fixed; z-index: 130; left: 50%; bottom: 104px; transform: translate(-50%, 8px); padding: 11px 18px; border-radius: 999px; background: rgba(20, 18, 16, .88); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); color: var(--xl-night-ink); font: 500 14px/1.35 var(--xl-sans); box-shadow: 0 14px 30px -14px rgba(0, 0, 0, .5); opacity: 0; pointer-events: none; transition: opacity .2s ease, transform .25s var(--xl-ease); max-width: calc(100% - 32px); text-align: center; }
.xl-toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* toàn màn hình: tối dịu */
.xl-player.is-full {
  position: fixed; inset: 0; z-index: 110; height: 100vh; height: 100dvh; padding: 14px 20px 16px; background: #0F0E0D; color: var(--xl-night-ink);
  --s-bg: #1A1816; --s-ink: #ECE6DC; --s-ink2: #D6CFC4; --s-muted: #A39B90; --s-card: #24211E; --s-paper: #201D1B; --s-line: rgba(255, 255, 255, .08); --s-line2: rgba(255, 255, 255, .14);
  --s-soft: #3A2D1C; --s-accent: #E0A85A; --s-accent-ink: #E9BC7C; --s-good: #8FC49C; --s-good-bg: #1F2E24; --s-bad: #E29A85; --s-bad-bg: #3A221C; --s-shadow: none;
  --v-ink: #ECE6DC; --v-muted: #A39B90; --v-faint: #6F685F; --v-card: #24211E; --v-paper: #2B2724; --v-sand: #3A3530; --v-line: #3A3530; --v-accent: #E0A85A; --v-gold: #C08A43; --v-soft: #3A2D1C; --v-night: #0E0D0C; --v-nink: #ECE6DC; --v-good: #6FAF80; --v-bad: #D9806A;
  --win-bg: #1F1D1B; --win-side: #191715; --win-bar: #2A2724;
}
.xl-player.is-full .xl-back, .xl-player.is-full .xl-ptitle small { display: none; }
.xl-player.is-full .xl-ptitle h1 { color: var(--xl-night-ink); }
.xl-player.is-full .xl-tools { background: rgba(255, 255, 255, .06); }
.xl-player.is-full .xl-tool { color: var(--xl-night-muted); }
.xl-player.is-full .xl-tool:hover:not(:disabled), .xl-player.is-full .xl-tool[aria-pressed="true"], .xl-player.is-full .xl-tool[aria-expanded="true"] { background: rgba(255, 255, 255, .12); color: var(--xl-night-ink); box-shadow: none; }
.xl-player.is-full .xl-device { background: #1A1816; border-color: rgba(255, 255, 255, .08); box-shadow: 0 40px 100px -30px rgba(0, 0, 0, .8); }
.xl-player.is-full .xl-notes { background: #161412; border-left-color: rgba(255, 255, 255, .07); }
.xl-player.is-full .xl-notes__text { color: #CFC8BD; }
.xl-player.is-full .xl-notes__text.is-speaking p:first-child { color: #F5F1EA; }
.xl-player.is-full .xl-play { background: rgba(255, 255, 255, .05); }
.xl-player.is-full .xl-play__btn { background: var(--xl-night-ink); color: var(--xl-night); }
.xl-player.is-full .xl-play__t small, .xl-player.is-full .xl-auto { color: var(--xl-night-muted); }
.xl-player.is-full .xl-ctrl { background: rgba(38, 35, 32, .66); border-color: rgba(255, 255, 255, .08); box-shadow: 0 16px 40px -18px rgba(0, 0, 0, .7); }
.xl-player.is-full .xl-nav--prev { color: var(--xl-night-ink); }
.xl-player.is-full .xl-nav--prev:hover:not(:disabled) { background: rgba(255, 255, 255, .08); }
.xl-player.is-full .xl-nav--next { background: var(--xl-night-ink); color: var(--xl-night); }
.xl-player.is-full .xl-listen { background: rgba(255, 255, 255, .08); color: var(--xl-night-ink); }
.xl-player.is-full .xl-listen[aria-pressed="true"] { background: var(--xl-gold); color: var(--xl-night); }
.xl-player.is-full .xl-count { color: var(--xl-night-muted); }
.xl-player.is-full .xl-seg::before { background: rgba(255, 255, 255, .14); }
.xl-player.is-full .xl-seg.is-seen::before { background: rgba(255, 255, 255, .45); }
.xl-player.is-full .xl-seg.is-current::before { background: var(--xl-gold); }
html.xl-full-lock, html.xl-full-lock body { overflow: hidden; }

/* ---------- slide: khung chung ---------- */
.xl-slide { position: absolute; inset: 0; display: flex; flex-direction: column; padding: 2.5em 3.2em 3.1em; overflow-y: auto; overflow-x: hidden; scrollbar-width: thin; background: var(--s-bg); }
.xl-slide > * { position: relative; }
.xl-slide { transition: opacity .3s ease, transform .35s var(--xl-ease); }
.xl-slide.is-enter { opacity: 0; transform: translateX(var(--xl-dir, 24px)); }
.xl-slide.is-leave { opacity: 0; transform: translateX(calc(var(--xl-dir, 24px) * -1)); pointer-events: none; }
.xl-sfoot { position: absolute; left: 3.2em; right: 3.2em; bottom: 1.1em; display: flex; align-items: center; justify-content: space-between; gap: 1em; font: 500 .64em/1 var(--xl-sans); color: var(--s-muted); letter-spacing: 0; pointer-events: none; }
.xl-sfoot b { display: inline-flex; align-items: center; gap: .55em; font-weight: 600; color: var(--s-ink2); }
.xl-sfoot b i { width: 1.15em; height: 1.15em; border-radius: 50%; background: #E39B2D; display: inline-block; }
.xl-kick { display: block; align-self: flex-start; margin: 0 0 .75em; font: 600 .76em/1.2 var(--xl-sans); color: var(--s-accent); letter-spacing: .01em; }
.xl-title { margin: 0 0 .75em; font: 700 2.2em/1.1 var(--xl-sans); letter-spacing: -.038em; color: var(--s-ink); max-width: 24em; text-wrap: balance; }
.xl-lead2 { margin: -.3em 0 1.1em; font-size: 1.1em; line-height: 1.5; color: var(--s-muted); max-width: 42em; letter-spacing: -.015em; }
.xl-ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .7em; }
.xl-ul li { position: relative; padding-left: 1.3em; font-size: 1.1em; line-height: 1.45; color: var(--s-ink2); }
.xl-ul li::before { content: ""; position: absolute; left: 0; top: .55em; width: .42em; height: .42em; border-radius: 50%; background: var(--s-accent); }
.xl-slide b, .xl-slide strong { font-weight: 650; color: var(--s-ink); }

/* nền tối: cover, quote */
.xl-slide--dark { background: radial-gradient(60em 34em at 85% -10%, rgba(210, 154, 69, .22), transparent 60%), #141210; color: var(--xl-night-ink); }
.xl-slide--dark .xl-sfoot, .xl-slide--dark .xl-sfoot b { color: var(--xl-night-muted); }
.xl-cover { flex: 1 1 auto; display: flex; flex-direction: column; justify-content: center; max-width: 36em; z-index: 1; }
.xl-cover .xl-kick { color: var(--xl-gold); }
.xl-cover h2 { margin: 0 0 .4em; font: 700 3.3em/1.04 var(--xl-sans); letter-spacing: -.045em; color: #FBF7F0; text-wrap: balance; }
.xl-cover p { margin: 0; font-size: 1.22em; line-height: 1.5; color: var(--xl-night-muted); max-width: 30em; letter-spacing: -.015em; }
.xl-cover__meta { display: flex; flex-wrap: wrap; gap: .5em; margin-top: 1.8em; }
.xl-cover__meta span { display: inline-flex; align-items: center; gap: .45em; padding: .45em .9em; border-radius: 999px; background: rgba(255, 255, 255, .07); font: 500 .78em/1.2 var(--xl-sans); color: #E9E2D7; }
.xl-cover__meta svg { width: 1.1em; height: 1.1em; fill: none; stroke: currentColor; stroke-width: 1.8; }
.xl-cover__clip { position: absolute !important; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; border-radius: inherit; }
.xl-cover__num { position: absolute; right: .3em; bottom: -.1em; font: 400 13em/1 var(--xl-serif); letter-spacing: -.04em; color: rgba(224, 168, 90, .13); pointer-events: none; z-index: 0; }

/* objectives */
.xl-obj { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75em; }
.xl-obj.is-1col { grid-template-columns: 1fr; max-width: 36em; }
.xl-obj li { display: grid; grid-template-columns: 2em minmax(0, 1fr); gap: .9em; align-items: center; padding: .9em 1.1em; border-radius: .95em; background: var(--s-card); border: 1px solid var(--s-line); box-shadow: var(--s-shadow); font-size: 1.04em; line-height: 1.42; color: var(--s-ink2); }
.xl-obj li b { width: 1.95em; height: 1.95em; border-radius: 50%; display: grid; place-items: center; background: var(--s-ink); color: var(--s-card); font: 600 .85em/1 var(--xl-sans); }
.xl-obj li:first-child { border-color: rgba(154, 91, 18, .45); box-shadow: 0 0 0 .3em rgba(154, 91, 18, .07); }
.xl-obj li:first-child b { background: var(--s-accent); }

/* concept */
.xl-concept { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 2.4em; align-items: center; flex: 1 1 auto; min-height: 0; }
.xl-concept.is-plain { grid-template-columns: 1fr; align-items: start; }
.xl-concept.is-plain .xl-ul { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1em 2.4em; }
.xl-concept.is-plain.is-few .xl-ul { grid-template-columns: 1fr; max-width: 38em; }
.xl-vis { border-radius: 1.2em; background: var(--s-card); border: 1px solid var(--s-line); box-shadow: var(--s-shadow); padding: 1em; display: grid; place-items: center; }
.xl-vis svg { width: 100%; height: auto; max-height: 18em; display: block; }
.xl-svg text { font-family: var(--xl-sans); letter-spacing: -.01em; }
.xl-svg .f-ink { fill: var(--v-ink); } .xl-svg .f-muted { fill: var(--v-muted); } .xl-svg .f-faint { fill: var(--v-faint); } .xl-svg .f-card { fill: var(--v-card); } .xl-svg .f-paper { fill: var(--v-paper); } .xl-svg .f-sand { fill: var(--v-sand); } .xl-svg .f-line { fill: var(--v-line); }
.xl-svg .f-accent { fill: var(--v-accent); } .xl-svg .f-gold { fill: var(--v-gold); } .xl-svg .f-soft { fill: var(--v-soft); } .xl-svg .f-night { fill: var(--v-night); } .xl-svg .f-nink { fill: var(--v-nink); } .xl-svg .f-good { fill: var(--v-good); } .xl-svg .f-bad { fill: var(--v-bad); } .xl-svg .f-none { fill: none; }
.xl-svg .s-ink { stroke: var(--v-ink); } .xl-svg .s-muted { stroke: var(--v-muted); } .xl-svg .s-faint { stroke: var(--v-faint); } .xl-svg .s-card { stroke: var(--v-card); } .xl-svg .s-paper { stroke: var(--v-paper); } .xl-svg .s-sand { stroke: var(--v-sand); } .xl-svg .s-line { stroke: var(--v-line); }
.xl-svg .s-accent { stroke: var(--v-accent); } .xl-svg .s-gold { stroke: var(--v-gold); } .xl-svg .s-soft { stroke: var(--v-soft); } .xl-svg .s-night { stroke: var(--v-night); } .xl-svg .s-nink { stroke: var(--v-nink); } .xl-svg .s-good { stroke: var(--v-good); } .xl-svg .s-bad { stroke: var(--v-bad); }

/* analogy */
.xl-ana { flex: 0 0 auto; min-height: 11em; display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 1.2em; align-items: stretch; }
.xl-ana__card { padding: 1.5em 1.6em; border-radius: 1.2em; display: flex; flex-direction: column; gap: .7em; background: var(--s-card); border: 1px solid var(--s-line); box-shadow: var(--s-shadow); }
.xl-ana__card--dark { background: #141210; color: var(--xl-night-ink); border-color: transparent; }
.xl-ana__card small { font: 600 .78em/1.2 var(--xl-sans); color: var(--s-accent); letter-spacing: .01em; }
.xl-ana__card--dark small { color: var(--xl-gold); }
.xl-ana__card p { margin: 0; font-size: 1.16em; line-height: 1.5; letter-spacing: -.015em; }
.xl-ana__card--dark b { color: #fff; }
.xl-ana__eq { align-self: center; width: 2.4em; height: 2.4em; border-radius: 50%; display: grid; place-items: center; background: var(--s-card); border: 1px solid var(--s-line2); color: var(--s-accent); font: 500 1.2em/1 var(--xl-serif); }

/* steps */
.xl-steps { list-style: none; margin: auto 0; padding: 0; display: grid; grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); gap: .9em; }
.xl-steps li { position: relative; display: grid; grid-template-columns: 1fr; align-content: start; gap: .2em; padding: 1.1em 1.15em 1.2em; border-radius: 1.1em; background: var(--s-card); border: 1px solid var(--s-line); box-shadow: var(--s-shadow); }
.xl-steps li i { width: 1.9em; height: 1.9em; border-radius: 50%; display: grid; place-items: center; background: var(--s-ink); color: var(--s-card); font: 600 .9em/1 var(--xl-sans); font-style: normal; margin-bottom: .6em; }
.xl-steps li:first-child i { background: var(--s-accent); }
.xl-steps b { display: block; font: 650 1.05em/1.28 var(--xl-sans); letter-spacing: -.02em; }
.xl-steps span { display: block; font-size: .92em; line-height: 1.5; color: var(--s-muted); }

/* screen: mô phỏng claude.ai */
.xl-scr { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; gap: .7em; }
.xl-win { flex: 1 1 auto; min-height: 15em; display: flex; flex-direction: column; border-radius: .9em; overflow: hidden; background: var(--win-bg); border: 1px solid var(--s-line2); box-shadow: var(--s-shadow); font-size: .82em; color: var(--s-ink); }
.xl-win__bar { flex: none; display: flex; align-items: center; gap: .9em; padding: .6em .9em; background: var(--win-bar); border-bottom: 1px solid var(--s-line); }
.xl-win__dots { display: flex; gap: .38em; }
.xl-win__dots i { width: .72em; height: .72em; border-radius: 50%; background: var(--s-line2); }
.xl-win__url { flex: 1 1 auto; max-width: 26em; margin: 0 auto; display: flex; align-items: center; justify-content: center; gap: .5em; padding: .35em .9em; border-radius: .6em; background: var(--s-card); color: var(--s-muted); font: 500 .92em/1.2 var(--xl-sans); }
.xl-win__url svg { width: .95em; height: .95em; fill: none; stroke: currentColor; stroke-width: 2.2; }
.xl-win__body { flex: 1 1 auto; min-height: 0; display: grid; grid-template-columns: 11em minmax(0, 1fr); }
.xl-win__body.is-wide-side { grid-template-columns: 15em minmax(0, 1fr); }
.xl-win__body.is-split { grid-template-columns: 11em minmax(0, .9fr) minmax(0, 1.1fr); }
.xl-win__body.is-project { grid-template-columns: 11em minmax(0, 1.2fr) minmax(0, .9fr); }
.xl-side { background: var(--win-side); border-right: 1px solid var(--s-line); padding: .8em .6em; display: flex; flex-direction: column; gap: .25em; min-width: 0; }
.xl-side__brand { display: flex; align-items: center; gap: .45em; font: 650 1.02em/1 var(--xl-sans); letter-spacing: -.02em; padding: .2em .4em .7em; }
.xl-side__brand i { width: 1em; height: 1em; border-radius: .25em; background: #C9793A; display: inline-block; transform: rotate(45deg) scale(.8); }
.xl-side__it { display: flex; align-items: center; gap: .5em; padding: .45em .55em; border-radius: .5em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: .95em; }
.xl-side__it svg { width: 1.05em; height: 1.05em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.xl-side__lbl { margin: .8em .55em .2em; font: 600 .78em/1 var(--xl-sans); color: var(--s-muted); }
.xl-side__ln { height: .5em; margin: .45em .55em; border-radius: .3em; background: var(--s-line2); }
.xl-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; padding: .9em 1.1em; gap: .6em; overflow: hidden; }
.xl-proj__t { font: 650 1.25em/1.2 var(--xl-sans); letter-spacing: -.02em; }
.xl-proj__s { color: var(--s-muted); }
.xl-msgs { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; gap: .6em; overflow: hidden; }
.xl-msg { max-width: 92%; font-size: .98em; line-height: 1.45; white-space: pre-line; }
.xl-msg--ban { align-self: flex-end; padding: .55em .85em; border-radius: 1em 1em .3em 1em; background: var(--s-paper); border: 1px solid var(--s-line); }
.xl-msg--claude { align-self: flex-start; display: grid; grid-template-columns: 1.4em minmax(0, 1fr); gap: .55em; }
.xl-msg--claude::before { content: ""; width: 1.2em; height: 1.2em; margin-top: .1em; border-radius: .25em; background: #C9793A; transform: rotate(45deg) scale(.72); }
.xl-greet { margin: auto 0 .4em; text-align: center; font: 400 1.6em/1.2 var(--xl-serif); color: var(--s-ink); letter-spacing: -.01em; }
.xl-input2 { flex: none; display: flex; flex-direction: column; gap: .55em; padding: .65em .7em .55em; border-radius: 1em; background: var(--s-card); border: 1px solid var(--s-line2); box-shadow: var(--s-shadow); }
.xl-input2 > span { color: var(--s-muted); padding: 0 .2em; }
.xl-input2 > div { display: flex; align-items: center; gap: .45em; }
.xl-ib { display: inline-flex; align-items: center; gap: .4em; height: 2em; padding: 0 .65em; border-radius: .55em; border: 1px solid var(--s-line2); background: var(--s-card); font: 500 .9em/1 var(--xl-sans); color: var(--s-ink); white-space: nowrap; }
.xl-ib svg { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.xl-ib--send { margin-left: auto; width: 2em; padding: 0; justify-content: center; background: #C9793A; border-color: #C9793A; color: #fff; }
.xl-hot { position: relative; z-index: 1; background: var(--s-soft) !important; border-color: var(--s-accent) !important; color: var(--s-accent-ink) !important; font-weight: 650 !important; box-shadow: 0 0 0 .3em rgba(154, 91, 18, .18); animation: xl-pulse 1.8s ease-in-out infinite; }
.xl-hot::after { content: ""; position: absolute; right: -1.1em; bottom: -1.3em; width: 1.6em; height: 1.6em; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 3l14 8-6 1.6L10 19z' fill='%231D1B19' stroke='%23FFFFFF' stroke-width='1.6' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center / contain; }
@keyframes xl-pulse { 0%, 100% { box-shadow: 0 0 0 .2em rgba(154, 91, 18, .28); } 50% { box-shadow: 0 0 0 .5em rgba(154, 91, 18, .08); } }
.xl-panel { border-left: 1px solid var(--s-line); background: var(--s-card); display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.xl-panel__head { display: flex; align-items: center; justify-content: space-between; gap: .6em; padding: .7em .9em; border-bottom: 1px solid var(--s-line); font: 600 .95em/1.2 var(--xl-sans); }
.xl-panel__body { padding: .8em .9em; display: grid; gap: .55em; align-content: start; min-height: 0; overflow: hidden; }
.xl-file { display: flex; align-items: center; gap: .6em; padding: .5em .6em; border-radius: .6em; border: 1px solid var(--s-line); background: var(--win-bg); font-size: .92em; min-width: 0; }
.xl-file i { flex: none; width: 2.1em; height: 2.4em; border-radius: .3em; display: grid; place-items: center; font: 700 .62em/1 var(--xl-sans); color: #fff; font-style: normal; background: #8A8278; }
.xl-file i.xl-ft--pdf { background: #B0482F; } .xl-file i.xl-ft--xls { background: #2F6B45; } .xl-file i.xl-ft--doc { background: #9A5B12; }
.xl-file span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.xl-file--note { flex-direction: column; align-items: flex-start; gap: .3em; }
.xl-file--note span { white-space: normal; color: var(--s-muted); }
.xl-drop { flex: 1 1 auto; display: grid; place-items: center; align-content: center; gap: .6em; text-align: center; border: 2px dashed var(--s-line2); border-radius: .9em; background: var(--s-paper); color: var(--s-muted); padding: 1em; }
.xl-drop svg { width: 2.4em; height: 2.4em; fill: none; stroke: var(--s-accent); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.xl-files { display: flex; flex-wrap: wrap; gap: .5em; justify-content: center; }
.xl-set { display: grid; gap: .2em; align-content: start; padding: 1em 1.2em; }
.xl-set h4 { margin: 0 0 .5em; font: 650 1.2em/1.2 var(--xl-sans); letter-spacing: -.02em; }
.xl-set__row { display: flex; align-items: center; justify-content: space-between; gap: 1em; padding: .7em 0; border-bottom: 1px solid var(--s-line); }
.xl-set__row b { display: block; font-weight: 600; font-size: .98em; }
.xl-set__row small { display: block; color: var(--s-muted); font-size: .85em; margin-top: .15em; }
.xl-tog { flex: none; width: 2.4em; height: 1.4em; border-radius: 999px; background: var(--s-line2); position: relative; }
.xl-tog::after { content: ""; position: absolute; top: .18em; left: .18em; width: 1.04em; height: 1.04em; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .2); }
.xl-tog.is-on { background: var(--xl-good); }
.xl-tog.is-on::after { left: auto; right: .18em; }
.xl-art { display: grid; gap: .4em; }
.xl-art table { width: 100%; border-collapse: collapse; font-size: .85em; }
.xl-art th, .xl-art td { padding: .35em .45em; border-bottom: 1px solid var(--s-line); text-align: left; }
.xl-art th { color: var(--s-muted); font-weight: 600; }
.xl-art__bars { display: flex; align-items: flex-end; gap: .45em; height: 4.5em; padding: .3em 0; }
.xl-art__bars i { flex: 1; border-radius: .3em .3em 0 0; background: var(--v-sand); }
.xl-art__bars i:last-child { background: var(--s-accent); }
.xl-cap { margin: 0; font-size: .92em; color: var(--s-muted); line-height: 1.45; display: flex; gap: .6em; align-items: flex-start; }
.xl-cap::before { content: ""; flex: none; width: .5em; height: .5em; margin-top: .45em; border-radius: 50%; background: var(--s-accent); }

/* prompt */
.xl-pr { flex: 1 1 auto; display: flex; flex-direction: column; gap: .9em; min-height: 0; }
.xl-pr__box { position: relative; border-radius: 1.1em; background: #141210; color: #EDE7DD; padding: 1.1em 1.3em 1.25em; box-shadow: 0 20px 40px -26px rgba(20, 18, 16, .6); }
.xl-player.is-full .xl-pr__box { background: #0E0D0C; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .07); }
.xl-pr__top { display: flex; align-items: center; justify-content: space-between; gap: 1em; margin-bottom: .75em; }
.xl-pr__top small { font: 600 .76em/1.2 var(--xl-sans); color: var(--xl-gold); letter-spacing: .01em; }
.xl-copy { display: inline-flex; align-items: center; gap: .45em; height: 2.3em; padding: 0 1em; border-radius: 999px; border: 0; background: rgba(255, 255, 255, .1); color: #F5F1EA; font: 600 .78em/1 var(--xl-sans); cursor: pointer; touch-action: manipulation; transition: background-color .2s; }
.xl-copy:hover { background: rgba(255, 255, 255, .18); }
.xl-copy svg { width: 1.1em; height: 1.1em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.xl-copy.is-done { background: var(--xl-gold); color: #141210; }
.xl-copy:focus-visible { outline: 2px solid var(--xl-gold); outline-offset: 2px; }
.xl-pr pre { margin: 0; white-space: pre-wrap; word-break: break-word; font: 400 .88em/1.65 var(--xl-mono); max-height: 15em; overflow: auto; }
.xl-fill { background: rgba(224, 168, 90, .16); color: var(--xl-gold); border-radius: .3em; padding: 0 .15em; }
.xl-tip { display: grid; grid-template-columns: 1.5em minmax(0, 1fr); gap: .7em; align-items: start; padding: .9em 1.1em; border-radius: 1em; background: var(--s-card); border: 1px solid var(--s-line); font-size: .96em; line-height: 1.5; color: var(--s-ink2); }
.xl-tip svg { width: 1.4em; height: 1.4em; fill: none; stroke: var(--s-accent); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.xl-tip b { color: var(--s-accent); }

/* compare */
.xl-cmp { flex: 0 0 auto; min-height: 9em; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.1em; align-items: stretch; }
.xl-cmp__c { border-radius: 1.2em; padding: 1.3em 1.4em; display: flex; flex-direction: column; gap: .7em; background: var(--s-card); border: 1px solid var(--s-line); box-shadow: var(--s-shadow); }
.xl-cmp__c--bad p { color: var(--s-muted); }
.xl-cmp__c--good { border-color: rgba(47, 107, 69, .35); box-shadow: 0 0 0 .3em rgba(47, 107, 69, .06); }
.xl-cmp__c small { display: inline-flex; align-items: center; gap: .55em; font: 600 .8em/1.2 var(--xl-sans); }
.xl-cmp__c--bad small { color: var(--s-bad); }
.xl-cmp__c--good small { color: var(--s-good); }
.xl-cmp__c small i { width: 1.6em; height: 1.6em; border-radius: 50%; display: grid; place-items: center; font-style: normal; }
.xl-cmp__c--bad small i { background: var(--s-bad-bg); }
.xl-cmp__c--good small i { background: var(--s-good-bg); }
.xl-cmp__c small svg { width: .95em; height: .95em; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.xl-cmp__c p { margin: 0; font-size: 1.02em; line-height: 1.55; white-space: pre-line; }

/* table */
.xl-tbl { overflow-x: auto; border-radius: 1em; border: 1px solid var(--s-line); background: var(--s-card); box-shadow: var(--s-shadow); }
.xl-tbl table { width: 100%; border-collapse: collapse; font-size: .94em; }
.xl-tbl th { color: var(--s-muted); font: 600 .86em/1.3 var(--xl-sans); text-align: left; padding: .85em 1em .7em; border-bottom: 1px solid var(--s-line2); }
.xl-tbl td { padding: .7em 1em; border-top: 1px solid var(--s-line); line-height: 1.45; vertical-align: top; color: var(--s-ink2); }
.xl-tbl tr:first-child td { border-top: 0; }
.xl-tbl td:first-child { font-weight: 600; color: var(--s-ink); }

/* quote */
.xl-quote { flex: 1 1 auto; display: flex; flex-direction: column; justify-content: center; max-width: 34em; }
.xl-quote svg { width: 2.6em; height: 2.6em; fill: var(--xl-gold); margin-bottom: .8em; opacity: .85; }
.xl-quote blockquote { margin: 0; font: 400 2.25em/1.24 var(--xl-serif); letter-spacing: -.015em; color: #FBF7F0; text-wrap: balance; }
.xl-quote blockquote b { color: var(--xl-gold); font-weight: 400; font-style: italic; }
.xl-quote p { margin: 1.4em 0 0; font: 500 .9em/1.3 var(--xl-sans); color: var(--xl-night-muted); }
.xl-quote p::before { content: ""; display: inline-block; width: 2em; height: 1px; background: currentColor; vertical-align: middle; margin-right: .8em; }

/* quiz */
.xl-quiz .xl-title { font-size: 1.85em; }
.xl-opts { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75em; }
.xl-opt { width: 100%; height: 100%; display: grid; grid-template-columns: 2em minmax(0, 1fr) 1.5em; gap: .8em; align-items: center; text-align: left; padding: .85em 1em; border-radius: 1em; border: 1px solid var(--s-line2); background: var(--s-card); font: 500 1em/1.4 var(--xl-sans); letter-spacing: -.012em; color: var(--s-ink); cursor: pointer; box-shadow: var(--s-shadow); transition: border-color .2s, background-color .2s, transform .15s var(--xl-ease), box-shadow .2s; touch-action: manipulation; }
.xl-opt > i { width: 1.95em; height: 1.95em; border-radius: 50%; display: grid; place-items: center; background: var(--s-paper); font: 600 .85em/1 var(--xl-sans); font-style: normal; color: var(--s-ink2); }
.xl-opt > em { width: 1.4em; height: 1.4em; font-style: normal; }
.xl-opt > em svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.xl-opt:active { transform: scale(.99); }
.xl-opt:focus-visible { outline: 2px solid var(--s-accent); outline-offset: 2px; }
.xl-opts:not(.is-answered) .xl-opt:hover { border-color: var(--s-ink); }
.xl-opt.is-right { border-color: var(--s-good); background: var(--s-good-bg); box-shadow: none; }
.xl-opt.is-right > i { background: var(--s-good); color: #fff; }
.xl-opt.is-right > em { color: var(--s-good); }
.xl-opt.is-wrong { border-color: var(--s-bad); background: var(--s-bad-bg); box-shadow: none; }
.xl-opt.is-wrong > i { background: var(--s-bad); color: #fff; }
.xl-opt.is-wrong > em { color: var(--s-bad); }
.xl-opts.is-answered .xl-opt:not(.is-right):not(.is-wrong) { opacity: .5; }
.xl-opts.is-answered .xl-opt { cursor: default; }
.xl-explain { margin-top: .9em; padding: .9em 1.2em; border-radius: 1em; display: grid; gap: .25em; font-size: .98em; line-height: 1.5; color: var(--s-ink2); animation: xl-rise .3s var(--xl-ease); }
.xl-explain.is-right { background: var(--s-good-bg); }
.xl-explain.is-wrong { background: var(--s-bad-bg); }
.xl-explain b { font: 650 1.02em/1.3 var(--xl-sans); }
.xl-explain.is-right b { color: var(--s-good); }
.xl-explain.is-wrong b { color: var(--s-bad); }
.xl-explain .xl-link { justify-self: start; font-size: .9em; color: var(--s-accent); min-height: 0; }
@keyframes xl-rise { from { transform: translateY(8px); } }

/* practice */
.xl-prac { flex: 1 1 auto; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.2em; align-items: start; }
.xl-task { padding: 1.4em 1.5em; border-radius: 1.2em; background: #141210; color: #EDE7DD; display: grid; gap: .7em; }
.xl-player.is-full .xl-task { background: #0E0D0C; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .07); }
.xl-task small { display: inline-flex; align-items: center; gap: .5em; font: 600 .78em/1.2 var(--xl-sans); color: var(--xl-gold); }
.xl-task small svg { width: 1.15em; height: 1.15em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.xl-task p { margin: 0; font-size: 1.08em; line-height: 1.55; white-space: pre-line; }
.xl-task b { color: #fff; }
.xl-check { display: grid; gap: .5em; }
.xl-check__top { display: flex; justify-content: space-between; align-items: center; gap: 1em; font: 600 .82em/1.2 var(--xl-sans); color: var(--s-muted); }
.xl-check__bar { height: .3em; border-radius: 999px; background: var(--s-line); overflow: hidden; margin-bottom: .2em; }
.xl-check__bar i { display: block; height: 100%; background: var(--s-good); border-radius: inherit; transition: width .4s var(--xl-ease); }
.xl-ck { position: relative; display: grid; grid-template-columns: 1.5em minmax(0, 1fr); gap: .7em; align-items: start; padding: .6em .85em; border-radius: .85em; border: 1px solid var(--s-line); background: var(--s-card); cursor: pointer; font-size: .98em; line-height: 1.45; color: var(--s-ink2); transition: background-color .2s, border-color .2s; }
.xl-ck input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.xl-ck i { width: 1.45em; height: 1.45em; border-radius: 50%; border: 1.5px solid var(--s-line2); display: grid; place-items: center; transition: background-color .2s, border-color .2s; }
.xl-ck i svg { width: .9em; height: .9em; fill: none; stroke: #fff; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; opacity: 0; }
.xl-ck input:checked + i { background: var(--s-good); border-color: var(--s-good); }
.xl-ck input:checked + i svg { opacity: 1; }
.xl-ck input:checked ~ span { color: var(--s-muted); text-decoration: line-through; text-decoration-color: rgba(47, 107, 69, .5); }
.xl-ck input:focus-visible + i { outline: 2px solid var(--s-accent); outline-offset: 2px; }

/* warning */
.xl-warn { flex: 0 0 auto; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 1.3em; align-items: start; padding: 1.4em 1.6em; border-radius: 1.2em; background: var(--s-card); border: 1px solid var(--s-line); box-shadow: var(--s-shadow); position: relative; overflow: hidden; }
.xl-warn::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: .28em; background: var(--s-bad); }
.xl-warn__ic { width: 2.6em; height: 2.6em; border-radius: 50%; display: grid; place-items: center; background: var(--s-bad-bg); color: var(--s-bad); }
.xl-warn__ic svg { width: 1.4em; height: 1.4em; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.xl-warn .xl-ul li::before { background: var(--s-bad); }

/* summary */
.xl-sum { flex: 1 1 auto; display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 1.6em; align-items: start; }
.xl-sum__list { list-style: none; margin: 0; padding: 0; display: grid; gap: .65em; }
.xl-sum__list li { display: grid; grid-template-columns: 1.5em minmax(0, 1fr); gap: .75em; font-size: 1.04em; line-height: 1.45; color: var(--s-ink2); }
.xl-sum__list li::before { content: ""; width: 1.4em; height: 1.4em; margin-top: .02em; border-radius: 50%; background: var(--s-accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6.5 12.5l3.5 3.5 7.5-8' fill='none' stroke='%23FFFFFF' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center / 72%; }
.xl-end { padding: 1.4em; border-radius: 1.2em; background: #141210; color: var(--xl-night-ink); display: grid; gap: .7em; }
.xl-player.is-full .xl-end { background: #0E0D0C; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .07); }
.xl-end__done { display: inline-flex; align-items: center; gap: .5em; justify-self: start; font: 600 .78em/1.2 var(--xl-sans); color: var(--xl-gold); }
.xl-end__done svg { width: 1.15em; height: 1.15em; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.xl-end small { color: var(--xl-night-muted); font-size: .8em; margin-top: .3em; }
.xl-end b { font: 650 1.18em/1.28 var(--xl-sans); letter-spacing: -.02em; color: #fff; }
.xl-end__btns { display: grid; gap: .45em; margin-top: .3em; }
.xl-pill { display: inline-flex; align-items: center; justify-content: space-between; gap: .6em; min-height: 2.5em; padding: .55em 1.1em; border-radius: 999px; background: rgba(255, 255, 255, .08); color: var(--xl-night-ink); font: 500 .86em/1.25 var(--xl-sans); transition: background-color .2s; }
.xl-pill:hover { background: rgba(255, 255, 255, .14); }
.xl-pill--light { background: var(--xl-night-ink); color: #141210; font-weight: 600; }
.xl-pill--light:hover { background: #fff; }
.xl-pill svg { width: 1.1em; height: 1.1em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* bài khoá / lỗi */
.xl-gate { position: absolute; inset: 0; display: grid; place-items: center; padding: 2em; text-align: center; overflow-y: auto; color: var(--s-muted); font-size: 1em; }
.xl-gate__in { max-width: 32em; display: grid; gap: .9em; justify-items: center; }
.xl-gate__ic { width: 3.6em; height: 3.6em; border-radius: 1.1em; background: var(--s-card); border: 1px solid var(--s-line); box-shadow: var(--s-shadow); display: grid; place-items: center; }
.xl-gate__ic svg { width: 1.7em; height: 1.7em; fill: none; stroke: var(--s-accent); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.xl-gate h2 { margin: .2em 0 0; font: 700 2em/1.12 var(--xl-sans); letter-spacing: -.035em; color: var(--s-ink); }
.xl-gate p { margin: 0; font-size: 1.05em; line-height: 1.55; }
.xl-gate__btns { display: flex; flex-wrap: wrap; justify-content: center; gap: .6em; margin-top: .5em; }
.xl-gate__btns .btn { font-size: 15px; min-height: 44px; }
.xl-gate__free { display: flex; flex-wrap: wrap; justify-content: center; gap: .5em; font-size: 14px; }
.xl-gate__free a { color: var(--s-accent); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- điện thoại dọc / màn thấp: slide thành thẻ cuộn ---------- */
@media (max-width: 759px), (max-height: 560px) {
  .xl-player { height: auto; min-height: calc(100dvh - var(--xl-top, 52px)); display: block; padding: calc(var(--xl-pad, 0px) + 10px) 0 0; }
  .xl-pbar { padding: 0 12px; gap: 10px; }
  .xl-ptitle h1 { white-space: normal; font-size: 16.5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .xl-tool { width: 36px; padding: 0; justify-content: center; }
  .xl-tool span { display: none; }
  .xl-body { display: block; padding: 12px 10px 0; }
  .xl-device { display: block; border-radius: 20px; }
  .xl-stage { width: auto !important; height: auto !important; font-size: 15px !important; overflow: hidden; }
  .xl-slide { position: relative; inset: auto; min-height: min(66vh, 540px); padding: 24px 20px 46px; overflow: visible; }
  .xl-slide.is-leave { display: none; }
  .xl-sfoot { left: 20px; right: 20px; bottom: 16px; font-size: 11px; }
  .xl-title { font-size: 1.68em; }
  .xl-quiz .xl-title { font-size: 1.42em; }
  .xl-cover { min-height: 20em; }
  .xl-cover h2 { font-size: 2.3em; }
  .xl-cover p { font-size: 1.08em; }
  .xl-cover__num { font-size: 8em; }
  .xl-concept, .xl-concept.is-plain .xl-ul, .xl-obj, .xl-cmp, .xl-prac, .xl-sum, .xl-opts { grid-template-columns: 1fr; }
  .xl-concept { gap: 1.2em; }
  .xl-ul li, .xl-obj li { font-size: 1.02em; }
  .xl-ana { grid-template-columns: 1fr; }
  .xl-ana__eq { justify-self: center; transform: rotate(90deg); }
  .xl-steps { grid-template-columns: 1fr !important; margin: 0; gap: .7em; }
  .xl-steps li { grid-template-columns: 2.2em minmax(0, 1fr); column-gap: .8em; padding: .95em 1em; }
  .xl-steps li i { grid-row: span 2; margin: 0; }
  .xl-win { font-size: .76em; min-height: 0; }
  .xl-win__body, .xl-win__body.is-wide-side, .xl-win__body.is-split, .xl-win__body.is-project { grid-template-columns: minmax(0, 1fr); }
  .xl-win__body .xl-side:not(.is-keep) { display: none; }
  .xl-win__body.is-wide-side .xl-side { display: flex; border-right: 0; }
  .xl-win__body.is-wide-side .xl-main { display: none; }
  .xl-panel { border-left: 0; border-top: 1px solid var(--s-line); }
  .xl-main { min-height: 16em; }
  .xl-warn { grid-template-columns: 1fr; gap: .8em; padding: 1.2em 1.2em 1.2em 1.4em; }
  .xl-pr pre { max-height: none; }
  .xl-notes { border-left: 0; border-top: 1px solid var(--xl-line); }
  .xl-notes__text { max-height: none; overflow: visible; }
  .xl-pbar, .xl-ctrl { transform: none; }
  .xl-player { padding-bottom: calc(118px + env(safe-area-inset-bottom, 0px)); }
  .xl-ctrl { position: fixed; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom, 0px)); width: auto; margin: 0; grid-template-columns: auto minmax(0, 1fr) auto auto; grid-template-rows: auto auto; gap: 4px 8px; padding: 8px 8px 6px; border-radius: 26px; }
  .xl-ctrl > .xl-nav--prev { grid-column: 1; grid-row: 1; }
  .xl-ctrl .xl-count { grid-column: 2; grid-row: 1; }
  .xl-ctrl .xl-listen { grid-column: 3; grid-row: 1; }
  .xl-ctrl > .xl-nav--next { grid-column: 4; grid-row: 1; }
  .xl-ctrl .xl-track { grid-column: 1 / -1; grid-row: 2; height: 14px; padding: 0 10px; }
  .xl-seg { height: 14px; }
  .xl-seg::before { top: 5px; }
  .xl-seg.is-quiz::after { display: none; }
  .xl-nav--prev span { display: none; }
  .xl-nav--prev { width: 44px; padding: 0; justify-content: center; }
  .xl-toast { bottom: 128px; }
  .xl-gate { position: relative; inset: auto; padding: 40px 20px; min-height: 22em; }
  .xl-player.is-full { padding: 8px 0 0; overflow-y: auto; }
}

/* ---------- giảm chuyển động ---------- */
@media (prefers-reduced-motion: reduce) {
  .xl-slide { transition: opacity .12s linear; }
  .xl-slide.is-enter, .xl-slide.is-leave { transform: none; }
  .xl-hot, .xl-explain, .xl-player.is-speaking .xl-wave i { animation: none; }
  .xl-line > i, .xl-ring__fg, .xl-check__bar i, .xl-seg::before, .xl-toc__panel { transition: none; }
  .xl-nav:active, .xl-opt:active, a.xl-resume:hover, .xl-freecard:hover { transform: none; }
}
@media print { .xl-pbar, .xl-ctrl, .xl-toc { display: none; } }

/* trợ lý nổi (assets/v3/assistant.*) trên trang trình chiếu: không che thanh điều khiển */
@media (min-width: 760px) and (min-height: 561px) {
  html.xl-lesson .xas-launch { top: calc(var(--xl-top, 56px) + var(--xl-pad, 0px) + 16px + var(--xl-gap, 0px)); bottom: auto; right: 20px; }
  html.xl-lesson .xl-player:not(.is-full) .xl-pbar { padding-right: 168px; max-width: none; }
}
@media (max-width: 759px), (max-height: 560px) { html.xl-lesson .xas-launch { bottom: calc(122px + env(safe-area-inset-bottom, 0px)) !important; } }
.xl-ic { display: grid; place-items: center; width: 18px; height: 18px; line-height: 0; }
.xl-ic svg { display: block; width: 18px; height: 18px; }
.xl-listen .xl-ic svg .xl-fill, .xl-play__btn .xl-ic svg .xl-fill { fill: currentColor; stroke: none; }
