/* =========================================================
   ĐƯỜNG VĂN — Design system
   Màu lấy từ logo: hồng phấn, oải hương, đào, bạc hà, xanh dừa cạn (chữ logo)
   ========================================================= */
:root {
  /* Nền & chữ */
  --cream: #FFF8F4;
  --paper: #FFFFFF;
  --ink: #1E1B2E;
  --ink-2: #4A4560;
  --ink-3: #6E6984;
  --line: #EDE3E6;

  /* Bảng màu thương hiệu */
  --rose-50: #FFF2F6;
  --rose-100: #FCE3EB;
  --rose-200: #F8CFDC;
  --rose-300: #F2B9CA;   /* hồng logo */
  --rose-500: #E07A9E;
  --rose-600: #C8457A;   /* chữ nhấn, đạt AA trên nền trắng */
  --peri-100: #E6EDFD;
  --peri-200: #D3DFFA;
  --peri-400: #7B9DE7;   /* xanh chữ logo */
  --peri-600: #4565C8;   /* đạt AA */
  --lav-100: #EFE7FC;
  --lav-200: #E2D6FA;
  --orchid-100: #FAEBF5;
  --orchid-200: #F4D6EC;  /* tím hồng góc trên logo */
  --blush-200: #FBD9E1;   /* hồng nhạt giữa logo */
  --peach-100: #FFE9D8;
  --peach-200: #FDD9BF;
  --mint-100: #E0F6F2;
  --mint-200: #C9EFE7;
  --mint-600: #1F8A70;
  --butter: #FFE9A8;

  --ok: #1F8A70;
  --ok-bg: #DDF5EE;
  --bad: #C8334F;
  --bad-bg: #FDE3E8;

  /* Chữ */
  --f-head: "Lexend", "Be Vietnam Pro", system-ui, sans-serif;
  --f-body: "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-serif: "Playfair Display", Georgia, serif;

  /* Bo góc, bóng, khoảng cách */
  --r-sm: 14px;
  --r-md: 22px;
  --r-lg: 32px;
  --r-xl: 44px;
  --shadow-sm: 0 1px 2px rgba(30, 27, 46, .05), 0 4px 14px rgba(30, 27, 46, .05);
  --shadow-md: 0 2px 6px rgba(30, 27, 46, .05), 0 18px 40px -12px rgba(30, 27, 46, .16);
  --shadow-lg: 0 30px 80px -20px rgba(200, 69, 122, .28);
  --container: 1200px;
  --pad: clamp(18px, 4.5vw, 40px);
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
  --header-h: 76px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  font-family: var(--f-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
input { font: inherit; }
h1, h2, h3, h4 { font-family: var(--f-head); line-height: 1.12; margin: 0; letter-spacing: -.02em; font-weight: 600; }
p { margin: 0; }
::selection { background: var(--rose-200); color: var(--ink); }
:focus-visible { outline: 3px solid var(--peri-600); outline-offset: 3px; border-radius: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; left: 12px; top: -60px; z-index: 200; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 12px; transition: top .2s; }
.skip-link:focus { top: 12px; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--pad); }
.section { padding-block: clamp(72px, 11vw, 140px); position: relative; }

/* Nền mềm như logo */
.bg-aura { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.bg-aura span { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .55; }
.bg-aura span:nth-child(1) { width: 46vw; height: 46vw; background: var(--rose-200); top: -14vw; left: -12vw; }
.bg-aura span:nth-child(2) { width: 38vw; height: 38vw; background: var(--orchid-200); top: 30vh; right: -14vw; }
.bg-aura span:nth-child(3) { width: 36vw; height: 36vw; background: var(--peach-200); bottom: -16vw; left: 30vw; opacity: .45; }
.grain::after {
  content: ""; position: fixed; inset: 0; z-index: 100; pointer-events: none; opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Icon ---------- */
.i { width: 1.25em; height: 1.25em; flex: none; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Typography helpers ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--f-head); font-size: .82rem; font-weight: 500; letter-spacing: .14em; text-transform: uppercase;
  color: var(--rose-600);
}
.eyebrow::before { content: ""; width: 26px; height: 2px; border-radius: 2px; background: currentColor; }
.h-display { font-size: clamp(2.5rem, 6.4vw, 4.9rem); font-weight: 600; letter-spacing: -.035em; line-height: 1.02; }
.h-1 { font-size: clamp(2.1rem, 5vw, 3.6rem); letter-spacing: -.03em; }
.h-2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.22rem); color: var(--ink-2); max-width: 56ch; }
.muted { color: var(--ink-3); }
.serif-i { font-family: var(--f-serif); font-style: italic; font-weight: 500; letter-spacing: -.01em; }
.hl { position: relative; white-space: nowrap; background: linear-gradient(var(--rose-300), var(--rose-300)) no-repeat 0 74% / 100% .3em; animation: hlIn 1.1s var(--ease-out) 1.1s both; padding-inline: .04em; }
.hl--peach { background-image: linear-gradient(var(--peach-200), var(--peach-200)); }
@keyframes hlIn { from { background-size: 0% .3em; } }
.section-head { display: grid; gap: 18px; margin-bottom: clamp(36px, 6vw, 64px); }
.section-head--center { text-align: center; justify-items: center; }
.section-head--center .lead { margin-inline: auto; }

/* ---------- Buttons ---------- */
.btn {
  --bg: var(--ink); --fg: #fff;
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 26px; border-radius: 999px;
  background: var(--bg); color: var(--fg);
  font-family: var(--f-head); font-weight: 500; font-size: 1rem; letter-spacing: -.005em;
  transition: transform .35s var(--ease-out), box-shadow .35s var(--ease-out), background-color .25s;
  will-change: transform; -webkit-tap-highlight-color: transparent; isolation: isolate; overflow: hidden;
}
.btn .i { transition: transform .35s var(--ease-out); }
.btn:hover .i--arrow { transform: translateX(4px); }
.btn:active { transform: scale(.96); }
.btn--primary { box-shadow: 0 10px 24px -10px rgba(30, 27, 46, .55); }
.btn--primary::after {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit;
  background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.22) 50%, transparent 70%);
  transform: translateX(-120%); transition: transform .8s var(--ease-out);
}
.btn--primary:hover::after { transform: translateX(120%); }
.btn--ghost { --bg: rgba(255,255,255,.7); --fg: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); backdrop-filter: blur(8px); }
.btn--ghost:hover { --bg: #fff; }
.btn--rose { --bg: var(--rose-600); --fg: #fff; }
.btn--light { --bg: #fff; --fg: var(--ink); }
.btn--sm { min-height: 44px; padding: 0 18px; font-size: .92rem; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.icon-btn {
  width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center;
  background: #fff; box-shadow: var(--shadow-sm); transition: transform .3s var(--ease-out), background .2s;
}
.icon-btn:hover { transform: translateY(-2px); }
.icon-btn:active { transform: scale(.92); }

/* ---------- Chips & tags ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 10px; min-height: 50px; padding: 5px 20px 5px 5px; border-radius: 999px;
  background: var(--paper); box-shadow: var(--shadow-sm); font-family: var(--f-head); font-weight: 500; font-size: .95rem; white-space: nowrap;
  transition: transform .3s var(--ease-out), background .3s, color .3s;
}
.chip__ic { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--rose-50); }
.chip:hover { transform: translateY(-2px); }
.chip--dark { background: var(--ink); color: #fff; }
.chip--dark .chip__ic { background: #fff; color: var(--ink); }
.chip-row { display: flex; gap: 10px; overflow-x: auto; padding: 6px 2px 10px; scrollbar-width: none; mask-image: linear-gradient(90deg, #000 85%, transparent); }
.chip-row::-webkit-scrollbar { display: none; }

.tag {
  display: inline-flex; align-items: center; gap: 6px; padding: 9px 16px; border-radius: 999px;
  font-family: var(--f-head); font-weight: 500; font-size: .9rem; white-space: nowrap;
  background: var(--rose-100); color: var(--ink);
}
.tag--rose { background: var(--rose-300); }
.tag--orchid { background: var(--orchid-200); }
.tag--peach { background: var(--peach-200); }
.tag--ink { background: var(--ink); color: #fff; }
.tag--white { background: #fff; }
.pill-meta { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: rgba(255,255,255,.75); font-size: .85rem; font-weight: 500; }
.badge-todo { justify-self: start; display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; border: 1.5px dashed var(--rose-500); color: var(--rose-600); font-size: .78rem; font-weight: 600; }

/* ---------- Header ---------- */
.site-header { position: fixed; top: 14px; left: 0; right: 0; z-index: 60; pointer-events: none; }
.nav {
  pointer-events: auto; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  height: 64px; padding: 8px 8px 8px 10px; border-radius: 999px;
  background: rgba(255, 255, 255, .72); backdrop-filter: saturate(1.6) blur(18px); -webkit-backdrop-filter: saturate(1.6) blur(18px);
  box-shadow: 0 1px 0 rgba(255,255,255,.8) inset, var(--shadow-sm);
  transition: transform .45s var(--ease-out), box-shadow .3s;
}
.site-header.is-hidden .nav { transform: translateY(-140%); }
.site-header.is-scrolled .nav { box-shadow: 0 1px 0 rgba(255,255,255,.8) inset, var(--shadow-md); }
.brand { display: flex; align-items: center; gap: 12px; }
.brand__logo { width: 46px; height: 46px; border-radius: 50%; overflow: hidden; box-shadow: 0 0 0 2px #fff, 0 4px 12px rgba(200,69,122,.25); }
.brand__logo { display: block; flex: none; background: #fff; }
.brand__logo img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.12); }
.brand__name { font-family: var(--f-head); font-weight: 600; font-size: 1.08rem; letter-spacing: .16em; color: var(--peri-600); }
.nav__links { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav__links a {
  position: relative; display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 999px;
  font-family: var(--f-head); font-weight: 500; font-size: .95rem; color: var(--ink-2); transition: color .2s, background .25s;
}
.nav__links a:hover { color: var(--ink); background: var(--rose-50); }
.nav__links a[aria-current="page"] { color: var(--ink); background: var(--rose-100); }
.nav__cta { display: flex; align-items: center; gap: 8px; }
.menu-btn { display: none; width: 48px; height: 48px; border-radius: 50%; background: var(--ink); color: #fff; place-items: center; }
.menu-btn span { display: block; width: 18px; height: 2px; background: currentColor; border-radius: 2px; transition: transform .35s var(--ease-out), opacity .2s; }
.menu-btn span + span { margin-top: 5px; }
.menu-open .menu-btn span:nth-child(1) { transform: translateY(3.5px) rotate(45deg); }
.menu-open .menu-btn span:nth-child(2) { transform: translateY(-3.5px) rotate(-45deg); }

.mobile-menu {
  position: fixed; inset: 0; z-index: 55; display: flex; flex-direction: column; justify-content: center;
  padding: 110px var(--pad) 40px; background: var(--rose-50);
  clip-path: circle(0% at calc(100% - 44px) 46px); visibility: hidden;
  transition: clip-path .7s var(--ease-out), visibility 0s .7s;
}
.menu-open .mobile-menu { clip-path: circle(150% at calc(100% - 44px) 46px); visibility: visible; transition: clip-path .7s var(--ease-out); }
.mobile-menu ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.mobile-menu a.big { display: flex; align-items: baseline; gap: 14px; padding: 10px 0; font-family: var(--f-head); font-size: clamp(2rem, 9vw, 3rem); font-weight: 600; letter-spacing: -.03em; }
.mobile-menu a.big small { font-size: .9rem; color: var(--rose-600); font-weight: 500; letter-spacing: 0; }
.mobile-menu li { opacity: 0; transform: translateY(30px); transition: opacity .5s, transform .6s var(--ease-out); }
.menu-open .mobile-menu li { opacity: 1; transform: none; }
.menu-open .mobile-menu li:nth-child(2) { transition-delay: .07s; }
.menu-open .mobile-menu li:nth-child(3) { transition-delay: .14s; }
.menu-open .mobile-menu li:nth-child(4) { transition-delay: .21s; }
.mobile-menu__foot { margin-top: 40px; }
body.menu-open { overflow: hidden; }

@media (max-width: 900px) {
  .nav__links, .nav__cta .btn { display: none; }
  .menu-btn { display: grid; }
  .nav { height: 60px; }
  .brand__logo { width: 42px; height: 42px; }
}

/* ---------- Page transition & preloader ---------- */
.curtain { position: fixed; inset: 0; z-index: 150; pointer-events: none; background: var(--rose-300); transform: translateY(100%); }
.curtain.is-on { transform: translateY(0); }
.preloader {
  position: fixed; inset: 0; z-index: 160; display: grid; place-items: center;
  background: linear-gradient(135deg, #F7C9D7 0%, #EADCF9 45%, #FFE3CF 75%, #D9F6F2 100%);
}
.preloader__card {
  display: grid; place-items: center; padding: 34px 46px; background: #fff; border: 2px solid var(--rose-300);
  box-shadow: 0 20px 60px -20px rgba(200, 69, 122, .45);
}
.preloader__word { display: flex; gap: .14em; font-family: var(--f-head); font-weight: 600; font-size: clamp(1.6rem, 6vw, 2.6rem); letter-spacing: .12em; color: var(--peri-400); }
.preloader__word span { display: inline-block; }
.preloader__word .sp { width: .5em; }
html.no-preload .preloader { display: none; }

/* ---------- Hero (trang chủ) ---------- */
.hero { padding-top: calc(var(--header-h) + clamp(40px, 7vw, 90px)); padding-bottom: clamp(40px, 6vw, 70px); position: relative; }
.hero__grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(32px, 5vw, 70px); align-items: center; }
.hero__copy { display: grid; gap: 26px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero__note { display: flex; align-items: center; gap: 12px; font-size: .92rem; color: var(--ink-2); }
.hero__note .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--mint-600); box-shadow: 0 0 0 0 rgba(31,138,112,.5); animation: ping 2s infinite; }
@keyframes ping { 70% { box-shadow: 0 0 0 10px rgba(31,138,112,0); } 100% { box-shadow: 0 0 0 0 rgba(31,138,112,0); } }

.stage { position: relative; aspect-ratio: 1 / 1.08; }
.stage__panel {
  position: absolute; inset: 0 0 8% 6%; border-radius: var(--r-xl);
  background: linear-gradient(160deg, var(--rose-300) 0%, #EFA9C0 55%, #E99AB6 100%);
  overflow: hidden; box-shadow: var(--shadow-lg);
}
.stage__panel::before { content: ""; position: absolute; width: 70%; aspect-ratio: 1; border-radius: 50%; right: -18%; top: -20%; background: rgba(255,255,255,.18); }
.stage__panel::after { content: ""; position: absolute; width: 50%; aspect-ratio: 1; border-radius: 50%; left: -14%; bottom: -14%; background: rgba(255,255,255,.12); }
.stage__photo { position: absolute; right: 4%; bottom: 8%; width: 58%; z-index: 2; }
.stage__photo-frame { border-radius: 999px 999px 28px 28px; overflow: hidden; background: #FCE8EF; aspect-ratio: 3 / 4; box-shadow: 0 0 0 6px rgba(255,255,255,.6); }
.stage__photo-frame img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 15%; }
.stage__card {
  position: absolute; z-index: 3; background: #fff; border-radius: var(--r-md); padding: 16px 18px; box-shadow: var(--shadow-md);
}
.stage__card--score { left: 0; top: 14%; display: flex; align-items: center; gap: 14px; }
.stage__card--teacher { left: 2%; bottom: 0; display: flex; align-items: center; gap: 12px; background: var(--ink); color: #fff; padding: 12px 20px 12px 12px; border-radius: 999px; }
.stage__card--teacher .av { width: 44px; height: 44px; border-radius: 50%; overflow: hidden; background: var(--rose-200); }
.stage__card--teacher .av img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 12%; transform: scale(1.4) translateY(8%); }
.stage__card--teacher small { display: block; font-size: .78rem; opacity: .7; }
.stage__card--teacher b { font-family: var(--f-head); font-weight: 500; }
.ring { position: relative; width: 64px; height: 64px; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 7; }
.ring .ring__bg { stroke: var(--rose-100); }
.ring .ring__fg { stroke: var(--rose-600); stroke-linecap: round; }
.ring__label { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--f-head); font-weight: 600; font-size: .95rem; }
.stage__card--score strong { display: block; font-family: var(--f-head); font-size: 1.05rem; font-weight: 600; }
.stage__card--score span { font-size: .85rem; color: var(--ink-3); }

.float-tags { position: absolute; inset: 0; z-index: 4; pointer-events: none; }
.ft { position: absolute; }
.ft .tag { box-shadow: 0 10px 24px -12px rgba(30,27,46,.35); animation: bob 5s ease-in-out infinite; }
.ft:nth-child(2n) .tag { animation-duration: 6.2s; animation-delay: -1.5s; }
.ft:nth-child(3n) .tag { animation-duration: 4.6s; animation-delay: -2.5s; }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(var(--rot, -6deg)); } 50% { transform: translateY(-10px) rotate(calc(var(--rot, -6deg) * -.4)); } }

.sprig { position: absolute; pointer-events: none; z-index: 1; color: #fff; opacity: .9; }
.sprig path { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sprig--a { width: 26%; left: 10%; top: 6%; }
.sprig--b { width: 22%; right: -2%; top: 40%; transform: rotate(160deg); }

@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; }
  .stage { max-width: 520px; width: 100%; margin-inline: auto; }
}

/* ---------- Marquee ---------- */
.marquee { overflow: hidden; padding-block: 22px; background: var(--ink); color: #fff; transform: rotate(-1.5deg); margin-block: 20px; }
.marquee__track { display: flex; width: max-content; animation: marquee 28s linear infinite; }
.marquee__item { display: flex; align-items: center; gap: 28px; padding-right: 28px; font-family: var(--f-head); font-weight: 500; font-size: clamp(1.1rem, 2.4vw, 1.6rem); white-space: nowrap; }
.marquee__item .star { color: var(--rose-300); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Teacher ---------- */
.teacher { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(36px, 6vw, 90px); align-items: start; }
.teacher__visual { position: sticky; top: calc(var(--header-h) + 30px); }
.portrait { position: relative; aspect-ratio: 4 / 5; }
.portrait__blob { position: absolute; inset: 8% -4% -2% 6%; border-radius: 46% 54% 42% 58% / 52% 44% 56% 48%; background: linear-gradient(160deg, var(--rose-200), var(--orchid-200)); animation: blob 14s ease-in-out infinite; }
@keyframes blob { 50% { border-radius: 58% 42% 55% 45% / 44% 58% 42% 56%; } }
.portrait__frame { position: absolute; inset: 0 8% 0 0; border-radius: 999px 999px 36px 36px; overflow: hidden; background: #FDEAF0; box-shadow: var(--shadow-lg); }
.portrait__frame img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 10%; }
.portrait__badge { position: absolute; right: -2%; bottom: 10%; width: 132px; height: 132px; z-index: 2; }
.portrait__badge svg.rot { width: 100%; height: 100%; animation: spin 18s linear infinite; }
.portrait__badge text { font-family: var(--f-head); font-size: 10.4px; font-weight: 500; letter-spacing: 2.1px; fill: var(--ink); text-transform: uppercase; }
.portrait__badge .core { position: absolute; inset: 30%; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; }
@keyframes spin { to { transform: rotate(360deg); } }
.portrait__name { position: absolute; left: -4%; top: 10%; z-index: 2; background: #fff; border-radius: var(--r-md); padding: 14px 20px; box-shadow: var(--shadow-md); }
.portrait__name b { display: block; font-family: var(--f-head); font-size: 1.5rem; font-weight: 600; color: var(--rose-600); letter-spacing: -.02em; }
.portrait__name span { font-size: .86rem; color: var(--ink-3); }

.teacher__body { display: grid; gap: 30px; }
.quote-card { position: relative; padding: 30px 32px; border-radius: var(--r-lg); background: var(--paper); box-shadow: var(--shadow-sm); }
.quote-card .qmark { position: absolute; top: -18px; left: 24px; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--rose-600); color: #fff; }
.quote-card p { font-family: var(--f-serif); font-style: italic; font-size: clamp(1.2rem, 2vw, 1.45rem); line-height: 1.45; }

.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; }
.b-card { position: relative; border-radius: var(--r-lg); padding: 24px; overflow: hidden; display: grid; align-content: space-between; gap: 18px; min-height: 170px; transition: transform .45s var(--ease-out); }
.b-card:hover { transform: translateY(-4px); }
.b-card__ic { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.75); }
.b-card__num { font-family: var(--f-head); font-size: clamp(2.2rem, 4.4vw, 3.2rem); font-weight: 600; letter-spacing: -.04em; line-height: 1; }
.b-card__t { font-family: var(--f-head); font-weight: 500; font-size: 1.05rem; line-height: 1.3; }
.b-card small { color: var(--ink-2); font-size: .9rem; }
.span-2 { grid-column: span 2; } .span-3 { grid-column: span 3; } .span-4 { grid-column: span 4; } .span-6 { grid-column: span 6; }
.bg-rose { background: var(--rose-200); }
.bg-peach { background: var(--peach-200); } .bg-orchid { background: var(--orchid-200); }
.bg-logo { background: linear-gradient(120deg, var(--orchid-200) 0%, var(--blush-200) 48%, var(--peach-200) 100%); }
.bg-logo-rev { background: linear-gradient(120deg, var(--peach-200) 0%, var(--blush-200) 55%, var(--orchid-200) 100%); }
 .bg-white { background: var(--paper); box-shadow: var(--shadow-sm); }
.bg-ink { background: var(--ink); color: #fff; } .bg-ink small { color: rgba(255,255,255,.7); }

.timeline { position: relative; list-style: none; margin: 0; padding: 0 0 0 34px; display: grid; gap: 22px; }
.timeline::before { content: ""; position: absolute; left: 9px; top: 8px; bottom: 8px; width: 2px; background: var(--line); border-radius: 2px; }
.timeline__line { position: absolute; left: 9px; top: 8px; bottom: 8px; width: 2px; background: linear-gradient(var(--rose-500), var(--orchid-200)); border-radius: 2px; transform-origin: top; }
.timeline li { position: relative; }
.timeline li::before { content: ""; position: absolute; left: -31px; top: 6px; width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 3px solid var(--rose-500); }
.timeline .yr { font-family: var(--f-head); font-weight: 600; font-size: .85rem; color: var(--rose-600); letter-spacing: .04em; }
.timeline .tt { font-weight: 500; }

@media (max-width: 900px) {
  .teacher { grid-template-columns: 1fr; }
  .teacher__visual { position: relative; top: 0; max-width: 440px; margin-inline: auto; width: 100%; }
  .bento { grid-template-columns: repeat(2, 1fr); }
  .span-2, .span-3 { grid-column: span 1; } .span-4, .span-6 { grid-column: span 2; }
}
@media (max-width: 420px) { .b-card { padding: 20px; min-height: 150px; } }

/* ---------- Course cards ---------- */
.courses { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.c-card {
  position: relative; display: grid; gap: 22px; align-content: space-between; min-height: 380px; padding: 26px;
  border-radius: var(--r-xl); overflow: hidden; transform-style: preserve-3d;
  transition: transform .5s var(--ease-out), box-shadow .5s var(--ease-out);
}
.c-card:hover { box-shadow: var(--shadow-md); }
.c-card__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.c-card__cat { display: flex; align-items: center; gap: 12px; white-space: nowrap; font-family: var(--f-head); font-weight: 500; font-size: .95rem; }
.c-card__cat .ic { width: 48px; height: 48px; border-radius: 50%; background: #fff; display: grid; place-items: center; }
.c-card h3 { font-size: clamp(1.6rem, 3.2vw, 2.3rem); font-weight: 600; letter-spacing: -.03em; max-width: 14ch; }
.c-card p { color: var(--ink-2); max-width: 42ch; }
.c-card__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.c-card__metas { display: flex; flex-wrap: wrap; gap: 8px; }
.c-card__go { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: #fff; transition: transform .45s var(--ease-spring); }
.c-card:hover .c-card__go { transform: rotate(-45deg) scale(1.06); }
.c-card__deco { position: absolute; right: -40px; top: -40px; width: 220px; height: 220px; border-radius: 50%; background: rgba(255,255,255,.28); pointer-events: none; }
.c-card--wide { grid-column: span 2; min-height: 0; grid-template-columns: 1.2fr 1fr; align-items: center; }
.c-card--wide h3 { max-width: 20ch; }
.c-card--wide .c-card__right { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }
@media (max-width: 800px) {
  .courses { grid-template-columns: 1fr; }
  .c-card--wide { grid-column: span 1; grid-template-columns: 1fr; }
  .c-card--wide .c-card__right { justify-content: flex-start; }
  .c-card { min-height: 330px; }
}

/* ---------- Testimonials ---------- */
.tm { position: relative; }
.tm__track { display: flex; gap: 18px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 8px var(--pad) 26px; scroll-padding-inline: var(--pad); scrollbar-width: none; }
.tm__track::-webkit-scrollbar { display: none; }
.tm-card {
  flex: 0 0 clamp(280px, 34vw, 400px); scroll-snap-align: start; display: grid; gap: 22px; align-content: space-between;
  padding: 28px; border-radius: var(--r-lg); min-height: 300px; transition: transform .45s var(--ease-out);
}
.tm-card:nth-child(4n+1) { background: var(--rose-200); }
.tm-card:nth-child(4n+2) { background: var(--peach-200); }
.tm-card:nth-child(4n+3) { background: var(--orchid-200); }
.tm-card:nth-child(4n+4) { background: var(--blush-200); }
.tm-card blockquote { margin: 0; font-size: 1.06rem; line-height: 1.6; }
.tm-card .who { display: flex; align-items: center; gap: 12px; }
.tm-card .av { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: #fff; font-family: var(--f-head); font-weight: 600; }
.tm-card .who b { display: block; font-family: var(--f-head); font-weight: 500; }
.tm-card .who span { font-size: .86rem; color: var(--ink-2); }
.tm-card .score { margin-left: auto; padding: 6px 12px; border-radius: 999px; background: #fff; font-family: var(--f-head); font-weight: 600; font-size: .9rem; }
.tm__controls { display: flex; align-items: center; gap: 10px; }
.tm__progress { flex: 1; height: 4px; border-radius: 4px; background: var(--line); overflow: hidden; max-width: 220px; }
.tm__progress span { display: block; height: 100%; width: 0; background: var(--ink); border-radius: inherit; transition: width .3s; }
.tm__head { display: flex; align-items: end; justify-content: space-between; gap: 20px; flex-wrap: wrap; }

/* ---------- CTA band ---------- */
.cta-band { position: relative; overflow: hidden; border-radius: var(--r-xl); padding: clamp(40px, 7vw, 80px); background: var(--ink); color: #fff; display: grid; gap: 26px; justify-items: start; }
.cta-band h2 { font-size: clamp(2rem, 5vw, 3.4rem); letter-spacing: -.03em; max-width: 16ch; }
.cta-band p { color: rgba(255,255,255,.75); max-width: 48ch; }
.cta-band .float-tags { left: 50%; }
.cta-band__glow { position: absolute; width: 60%; aspect-ratio: 1; right: -20%; top: -40%; border-radius: 50%; background: radial-gradient(closest-side, rgba(242,185,202,.5), transparent); pointer-events: none; }
@media (max-width: 700px) { .cta-band .float-tags { display: none; } }

/* ---------- Footer ---------- */
.site-footer { padding: 60px 0 40px; margin-top: 40px; }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 30px; padding: 36px; border-radius: var(--r-xl); background: linear-gradient(135deg, #FBE0E8 0%, #EEE5FC 50%, #E3F6F2 100%); }
.footer__grid h4 { font-size: .85rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 12px; font-weight: 500; }
.footer__grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.footer__grid a { display: inline-flex; min-height: 36px; align-items: center; }
.footer__grid a:hover { color: var(--rose-600); }
.footer__bottom { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 20px 6px 0; font-size: .86rem; color: var(--ink-3); }
@media (max-width: 760px) { .footer__grid { grid-template-columns: 1fr; padding: 28px; } }

/* ---------- Page hero (trang con) ---------- */
.page-hero { padding-top: calc(var(--header-h) + clamp(40px, 6vw, 80px)); padding-bottom: clamp(24px, 4vw, 40px); }
.page-hero__inner { display: grid; gap: 22px; }

/* ---------- Khoá học ---------- */
.seg {
  position: sticky; top: calc(var(--header-h) + 8px); z-index: 30; display: inline-flex; gap: 4px; padding: 6px; border-radius: 999px;
  background: rgba(255,255,255,.85); backdrop-filter: blur(14px); box-shadow: var(--shadow-md);
}
.seg__wrap { display: flex; justify-content: center; position: sticky; top: calc(var(--header-h) + 8px); z-index: 30; pointer-events: none; margin-bottom: 30px; }
.seg__wrap .seg { pointer-events: auto; position: relative; top: 0; }
.seg__ind { position: absolute; top: 6px; bottom: 6px; left: 6px; border-radius: 999px; background: var(--ink); transition: transform .5s var(--ease-out), width .5s var(--ease-out); z-index: 0; }
.seg a { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 8px; min-height: 46px; padding: 0 20px; border-radius: 999px; font-family: var(--f-head); font-weight: 500; font-size: .95rem; transition: color .35s; white-space: nowrap; }
.seg a.is-active { color: #fff; }
@media (max-width: 420px) { .seg a { padding: 0 14px; font-size: .88rem; } }

.course { padding-block: clamp(30px, 5vw, 60px) clamp(60px, 9vw, 110px); }
.course__hero { position: relative; overflow: hidden; border-radius: var(--r-xl); padding: clamp(28px, 5vw, 56px); display: grid; grid-template-columns: 1.15fr .85fr; gap: 30px; align-items: center; min-height: 440px; }
.course__hero h2 { font-size: clamp(2.2rem, 5.6vw, 4rem); letter-spacing: -.035em; }
.course__num { font-family: var(--f-head); font-weight: 500; opacity: .75; }
.course__hero .float-tags { position: relative; inset: auto; height: 300px; }
.course__hero .ft { position: absolute; }
.stats-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 16px; }
.stat { border-radius: var(--r-lg); padding: 22px; display: grid; gap: 10px; background: var(--paper); box-shadow: var(--shadow-sm); }
.stat .b-card__ic { background: var(--rose-50); }
.stat b { font-family: var(--f-head); font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 600; letter-spacing: -.03em; line-height: 1; }
.stat span { color: var(--ink-3); font-size: .92rem; }
.sub-h { margin: clamp(46px, 7vw, 80px) 0 22px; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.for-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.for-card { padding: 24px; border-radius: var(--r-lg); background: var(--paper); box-shadow: var(--shadow-sm); display: grid; gap: 12px; align-content: start; }
.for-card .b-card__ic { background: var(--rose-50); color: var(--rose-600); }
.for-card h4 { font-size: 1.12rem; font-weight: 500; }
.for-card p { color: var(--ink-2); font-size: .96rem; }

.road { position: relative; display: grid; gap: 18px; }
.road__svg { position: absolute; left: 31px; top: 0; height: 100%; width: 4px; }
.road__svg line { stroke: var(--rose-300); stroke-width: 4; stroke-linecap: round; }
.road__step { position: relative; display: grid; grid-template-columns: 64px 1fr; gap: 18px; align-items: start; }
.road__dot { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: #fff; box-shadow: var(--shadow-sm); font-family: var(--f-head); font-weight: 600; font-size: 1.2rem; color: var(--rose-600); z-index: 1; }
.road__body { padding: 20px 24px; border-radius: var(--r-lg); background: var(--paper); box-shadow: var(--shadow-sm); display: grid; gap: 8px; }
.road__body h4 { font-size: 1.15rem; font-weight: 500; }
.road__body p { color: var(--ink-2); }

.price-card { display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; padding: clamp(24px, 4vw, 40px); border-radius: var(--r-xl); background: var(--ink); color: #fff; }
.price-card p { color: rgba(255,255,255,.72); }
.price-card .h-2 { margin: 8px 0; }

.faq { display: grid; gap: 10px; }
.faq details { border-radius: var(--r-md); background: var(--paper); box-shadow: var(--shadow-sm); overflow: hidden; }
.faq summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; padding: 16px 22px; font-family: var(--f-head); font-weight: 500; cursor: pointer; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .pm { width: 34px; height: 34px; border-radius: 50%; flex: none; display: grid; place-items: center; background: var(--rose-50); transition: transform .4s var(--ease-out), background .3s; }
.faq details[open] summary .pm { transform: rotate(45deg); background: var(--rose-200); }
.faq .ans { padding: 0 22px 20px; color: var(--ink-2); }
@media (max-width: 860px) {
  .course__hero { grid-template-columns: 1fr; min-height: 0; }
  .course__hero .float-tags { height: 190px; }
  .for-grid { grid-template-columns: 1fr; }
  .price-card { grid-template-columns: 1fr; }
}
@media (max-width: 560px) { .stats-row { grid-template-columns: 1fr 1fr; } .stats-row .stat:last-child { grid-column: span 2; } }

/* ---------- Luyện tập: chọn chế độ ---------- */
.modes { display: grid; grid-template-columns: 1.2fr 1fr; gap: 16px; }
.mode-card { position: relative; overflow: hidden; border-radius: var(--r-xl); padding: clamp(24px, 4vw, 36px); display: grid; gap: 18px; align-content: space-between; min-height: 300px; }
.mode-card h3 { font-size: clamp(1.6rem, 3vw, 2.2rem); letter-spacing: -.03em; }
.mode-card p { color: var(--ink-2); }
.mode-card .row { display: flex; flex-wrap: wrap; gap: 8px; }
.mode-card .lock { position: absolute; right: 24px; top: 24px; width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; background: #fff; }
@media (max-width: 800px) { .modes { grid-template-columns: 1fr; } .mode-card { min-height: 0; } }

/* ---------- Quiz app ---------- */
.quiz { position: relative; }
/* Chống sao chép đề (gắn bởi quiz.js) */
.quiz.is-protected { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.quiz.is-protected input, .quiz.is-protected textarea { -webkit-user-select: text; user-select: text; }
.quiz.is-protected img { -webkit-user-drag: none; pointer-events: none; }
.quiz.has-wm::after { content: ""; position: absolute; inset: 0; z-index: 45; pointer-events: none; background-image: var(--wm); background-repeat: repeat; border-radius: var(--r-xl); }
@media print {
  .quiz.is-protected > * { display: none !important; }
  .quiz.is-protected::before { content: "Nội dung đề thuộc Đường Văn, không hỗ trợ in."; display: block; padding: 40px 0; font-size: 18px; text-align: center; }
  .quiz.has-wm::after { display: none; }
}
.q-intro { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; padding: clamp(24px, 4vw, 44px); border-radius: var(--r-xl); background: var(--paper); box-shadow: var(--shadow-md); align-items: center; }
.q-intro__stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.q-intro__stats .stat { box-shadow: none; background: var(--rose-50); padding: 18px; }
.q-intro__stats .stat:nth-child(2) { background: var(--peach-100); }
.q-intro__stats .stat:nth-child(3) { background: var(--orchid-100); }
.q-mode { display: grid; gap: 10px; }
.q-mode label {
  position: relative; display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: start; padding: 16px 18px; border-radius: var(--r-md);
  border: 2px solid var(--line); cursor: pointer; transition: border-color .25s, background .25s;
}
.q-mode input { position: absolute; opacity: 0; pointer-events: none; }
.q-mode .radio { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--ink-3); margin-top: 2px; display: grid; place-items: center; transition: border-color .2s; }
.q-mode .radio::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--rose-600); transform: scale(0); transition: transform .3s var(--ease-spring); }
.q-mode input:checked + label, .q-mode label:has(input:checked) { border-color: var(--rose-500); background: var(--rose-50); }
.q-mode label:has(input:checked) .radio { border-color: var(--rose-600); }
.q-mode label:has(input:checked) .radio::after { transform: scale(1); }
.q-mode label:has(input:focus-visible) { outline: 3px solid var(--peri-600); outline-offset: 2px; }
.q-mode b { font-family: var(--f-head); font-weight: 500; display: block; }
.q-mode small { color: var(--ink-3); }
@media (max-width: 860px) { .q-intro { grid-template-columns: 1fr; } }
@media (max-width: 420px) { .q-intro__stats .stat { padding: 14px; } .q-intro__stats .stat b { font-size: 1.4rem; } }

.q-bar {
  position: sticky; top: 10px; z-index: 40; display: flex; align-items: center; gap: 14px; padding: 10px 12px 10px 18px; margin-bottom: 18px;
  border-radius: 999px; background: rgba(255,255,255,.86); backdrop-filter: blur(16px); box-shadow: var(--shadow-md);
}
.q-bar__count { font-family: var(--f-head); font-weight: 600; white-space: nowrap; }
.q-bar__count span { color: var(--ink-3); font-weight: 400; }
.q-progress { flex: 1; height: 10px; border-radius: 10px; background: var(--rose-50); overflow: hidden; }
.q-progress span { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--rose-600), var(--rose-300)); transition: width .6s var(--ease-out); }
.timer { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px 0 6px; border-radius: 999px; background: var(--ink); color: #fff; font-family: var(--f-head); font-weight: 500; font-variant-numeric: tabular-nums; }
.timer__ring { width: 32px; height: 32px; transform: rotate(-90deg); }
.timer__ring circle { fill: none; stroke-width: 4; }
.timer__ring .bg { stroke: rgba(255,255,255,.2); }
.timer__ring .fg { stroke: var(--rose-300); stroke-linecap: round; transition: stroke-dashoffset 1s linear; }
.timer.is-low { background: var(--bad); animation: pulse 1s ease-in-out infinite; }
.timer.is-low .fg { stroke: #fff; }
@keyframes pulse { 50% { transform: scale(1.05); } }
.q-bar .icon-btn { width: 44px; height: 44px; box-shadow: none; background: var(--rose-50); }
.q-quit { color: var(--ink-3); }

.q-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.passage {
  position: sticky; top: 92px; max-height: calc(100vh - 110px); overflow: auto; overscroll-behavior: contain;
  padding: 28px 30px; border-radius: var(--r-lg); background: var(--paper); box-shadow: var(--shadow-sm);
}
.passage__title { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.passage p { margin-bottom: 14px; font-size: 1.02rem; line-height: 1.75; text-align: justify; hyphens: auto; }
.passage strong { background: linear-gradient(transparent 55%, var(--butter) 55%); font-weight: 600; }
.passage__src { font-size: .9rem; font-style: italic; color: var(--ink-3); text-align: right; }
.passage-toggle { display: none; }
.q-main { display: grid; gap: 14px; }
.q-card { padding: clamp(22px, 3.5vw, 32px); border-radius: var(--r-lg); background: var(--paper); box-shadow: var(--shadow-sm); }
.q-card__no { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.q-card__q { font-family: var(--f-head); font-weight: 500; font-size: clamp(1.12rem, 2vw, 1.3rem); line-height: 1.4; letter-spacing: -.01em; margin-bottom: 20px; }
.q-card.is-enter { animation: qIn .55s var(--ease-out) both; }
.q-card.is-enter-back { animation: qInBack .55s var(--ease-out) both; }
@keyframes qIn { from { opacity: 0; transform: translateX(40px); } }
@keyframes qInBack { from { opacity: 0; transform: translateX(-40px); } }
.opts { display: grid; gap: 10px; }
.opt {
  position: relative; display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 14px; width: 100%; min-height: 60px;
  padding: 10px 14px 10px 10px; text-align: left; border-radius: var(--r-md); background: var(--cream); border: 2px solid transparent;
  transition: transform .25s var(--ease-out), border-color .25s, background .25s;
}
.opt:hover:not([disabled]) { border-color: var(--rose-300); background: var(--rose-50); }
.opt:active:not([disabled]) { transform: scale(.985); }
.opt__k { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: #fff; font-family: var(--f-head); font-weight: 600; transition: background .25s, color .25s, transform .4s var(--ease-spring); }
.opt__t { line-height: 1.45; }
.opt__mark { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; opacity: 0; transform: scale(.3); transition: opacity .3s, transform .5s var(--ease-spring); }
.opt.is-picked { border-color: var(--ink); background: #fff; }
.opt.is-picked .opt__k { background: var(--ink); color: #fff; transform: scale(1.06); }
.opt.is-right { border-color: var(--ok); background: var(--ok-bg); }
.opt.is-right .opt__k { background: var(--ok); color: #fff; }
.opt.is-right .opt__mark { opacity: 1; transform: none; background: var(--ok); color: #fff; }
.opt.is-wrong { border-color: var(--bad); background: var(--bad-bg); animation: shake .5s; }
.opt.is-wrong .opt__k { background: var(--bad); color: #fff; }
.opt.is-wrong .opt__mark { opacity: 1; transform: none; background: var(--bad); color: #fff; }
.opt.is-right.pop { animation: pop .6s var(--ease-spring); }
.opt[disabled] { cursor: default; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
@keyframes pop { 40% { transform: scale(1.03); } }
.explain { margin-top: 16px; border-radius: var(--r-md); padding: 18px 20px; background: var(--orchid-100); display: grid; gap: 8px; animation: expl .6s var(--ease-out) both; }
.explain h4 { display: flex; align-items: center; gap: 8px; font-size: 1rem; font-weight: 600; }
.explain p { color: var(--ink-2); }
.verdict { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; font-family: var(--f-head); font-weight: 500; font-size: .9rem; }
.verdict--ok { background: var(--ok-bg); color: var(--ok); }
.verdict--bad { background: var(--bad-bg); color: var(--bad); }
@keyframes expl { from { opacity: 0; transform: translateY(-8px); } }

.q-nav { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.q-dots { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 8px; }
.q-dot { height: 44px; border-radius: 12px; background: #fff; font-family: var(--f-head); font-weight: 500; font-size: .92rem; box-shadow: inset 0 0 0 1.5px var(--line); transition: transform .2s, background .2s; }
.q-dot:hover { transform: translateY(-2px); }
.q-dot.is-done { background: var(--orchid-200); box-shadow: none; }
.q-dot.is-right { background: var(--ok-bg); color: var(--ok); box-shadow: none; }
.q-dot.is-wrong { background: var(--bad-bg); color: var(--bad); box-shadow: none; }
.q-dot.is-current { box-shadow: inset 0 0 0 2.5px var(--ink); }
.q-panel { padding: 20px; border-radius: var(--r-lg); background: var(--paper); box-shadow: var(--shadow-sm); display: grid; gap: 14px; }
.q-panel__h { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-family: var(--f-head); font-weight: 500; }
.q-legend { display: flex; flex-wrap: wrap; gap: 12px; font-size: .82rem; color: var(--ink-3); }
.q-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 4px; vertical-align: -1px; margin-right: 4px; }

@media (max-width: 960px) {
  .q-layout { grid-template-columns: 1fr; }
  .passage { display: none; }
  .passage-toggle { display: flex; width: 100%; justify-content: space-between; align-items: center; gap: 10px; min-height: 56px; padding: 0 18px; border-radius: var(--r-md); background: var(--orchid-200); font-family: var(--f-head); font-weight: 500; }
  .q-bar { top: 8px; padding: 8px 8px 8px 14px; gap: 10px; }
  .q-bar__count span { display: none; }
}

/* Bottom sheet (văn bản trên điện thoại, danh sách câu) */
.sheet { position: fixed; inset: 0; z-index: 120; display: flex; align-items: flex-end; visibility: hidden; }
.sheet__scrim { position: absolute; inset: 0; background: rgba(30,27,46,.42); opacity: 0; transition: opacity .35s; }
.sheet__body {
  position: relative; width: 100%; max-height: 86vh; overflow: auto; overscroll-behavior: contain; padding: 14px 22px calc(28px + env(safe-area-inset-bottom));
  border-radius: 28px 28px 0 0; background: var(--paper); transform: translateY(100%); transition: transform .5s var(--ease-out);
}
.sheet__grab { width: 44px; height: 5px; border-radius: 5px; background: var(--line); margin: 0 auto 16px; }
.sheet.is-open { visibility: visible; }
.sheet.is-open .sheet__scrim { opacity: 1; }
.sheet.is-open .sheet__body { transform: none; }
.sheet .passage { display: block; position: static; max-height: none; box-shadow: none; padding: 0; }
@media (min-width: 961px) { .sheet__body { max-width: 640px; margin: 0 auto; border-radius: 28px; margin-bottom: 4vh; } .sheet { justify-content: center; align-items: flex-end; } }

/* Modal xác nhận */
.modal { position: fixed; inset: 0; z-index: 130; display: grid; place-items: center; padding: 20px; visibility: hidden; }
.modal__scrim { position: absolute; inset: 0; background: rgba(30,27,46,.45); opacity: 0; transition: opacity .3s; }
.modal__box { position: relative; width: min(440px, 100%); padding: 30px; border-radius: var(--r-lg); background: #fff; box-shadow: var(--shadow-md); display: grid; gap: 14px; transform: translateY(20px) scale(.96); opacity: 0; transition: transform .45s var(--ease-spring), opacity .3s; }
.modal.is-open { visibility: visible; }
.modal.is-open .modal__scrim { opacity: 1; }
.modal.is-open .modal__box { transform: none; opacity: 1; }
.modal__actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.modal__actions .btn { flex: 1; }

/* Kết quả */
.result { display: grid; gap: 18px; }
.result__hero { display: grid; grid-template-columns: auto 1fr; gap: clamp(20px, 5vw, 50px); align-items: center; padding: clamp(24px, 5vw, 48px); border-radius: var(--r-xl); background: linear-gradient(120deg, var(--orchid-200) 0%, var(--blush-200) 48%, var(--peach-200) 100%); }
.score-ring { position: relative; width: clamp(160px, 26vw, 220px); aspect-ratio: 1; }
.score-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.score-ring circle { fill: none; stroke-width: 12; }
.score-ring .bg { stroke: rgba(255,255,255,.7); }
.score-ring .fg { stroke: var(--ink); stroke-linecap: round; transition: stroke-dashoffset 1.6s var(--ease-out); }
.score-ring__in { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.score-ring__in b { font-family: var(--f-head); font-size: clamp(2.6rem, 6vw, 3.6rem); font-weight: 600; letter-spacing: -.04em; line-height: 1; }
.score-ring__in span { color: var(--ink-2); font-size: .92rem; }
.result__copy { display: grid; gap: 14px; }
.result__stats { display: flex; flex-wrap: wrap; gap: 8px; }
.result__stats .pill-meta { background: #fff; }
.breakdown { display: grid; gap: 12px; }
.bk { display: grid; grid-template-columns: 110px 1fr 54px; align-items: center; gap: 12px; font-size: .94rem; }
.bk__bar { height: 12px; border-radius: 12px; background: var(--rose-50); overflow: hidden; }
.bk__bar span { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--rose-600), var(--rose-300)); transition: width 1.2s var(--ease-out); }
.bk b { font-family: var(--f-head); text-align: right; }
.review { display: grid; gap: 12px; }
.review-filters { display: flex; gap: 8px; flex-wrap: wrap; }
.review-filters button { min-height: 44px; padding: 0 16px; border-radius: 999px; background: #fff; box-shadow: inset 0 0 0 1.5px var(--line); font-family: var(--f-head); font-weight: 500; font-size: .92rem; }
.review-filters button[aria-pressed="true"] { background: var(--ink); color: #fff; box-shadow: none; }
.rv { border-radius: var(--r-lg); background: var(--paper); box-shadow: var(--shadow-sm); padding: 22px 24px; display: grid; gap: 12px; }
.rv__h { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.rv__q { font-family: var(--f-head); font-weight: 500; font-size: 1.06rem; line-height: 1.4; }
.rv__ans { display: grid; gap: 6px; }
.rv__ans div { display: flex; gap: 10px; align-items: flex-start; padding: 10px 14px; border-radius: 14px; font-size: .96rem; }
.rv__ans .u-bad { background: var(--bad-bg); }
.rv__ans .u-ok { background: var(--ok-bg); }
.rv__ans .u-none { background: var(--cream); color: var(--ink-3); }
.rv__exp { color: var(--ink-2); font-size: .96rem; display: grid; gap: 6px; padding-top: 4px; border-top: 1px dashed var(--line); }
@media (max-width: 640px) {
  .result__hero { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .result__stats { justify-content: center; }
  .bk { grid-template-columns: 84px 1fr 44px; }
}

/* Pháo giấy */
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 140; overflow: hidden; }
.confetti i { position: absolute; top: -20px; width: 10px; height: 14px; border-radius: 3px; animation: fall linear forwards; }
@keyframes fall { to { transform: translateY(110vh) rotate(720deg); } }

/* ---------- Khu học viên ---------- */
.auth { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: stretch; }
.auth__art { position: relative; overflow: hidden; border-radius: var(--r-xl); padding: clamp(28px, 4vw, 44px); background: linear-gradient(160deg, var(--rose-300), #EAA3BD); display: grid; align-content: space-between; gap: 30px; min-height: 520px; }
.auth__art h2 { font-size: clamp(2rem, 4vw, 3rem); letter-spacing: -.03em; max-width: 12ch; }
.auth__art .float-tags { position: relative; height: 200px; }
.auth__form { border-radius: var(--r-xl); padding: clamp(26px, 4vw, 48px); background: var(--paper); box-shadow: var(--shadow-md); display: grid; gap: 18px; align-content: center; }
.field { display: grid; gap: 8px; }
.field label { font-family: var(--f-head); font-weight: 500; font-size: .95rem; }
.field__wrap { position: relative; }
.field input {
  width: 100%; min-height: 54px; padding: 0 18px; border-radius: 16px; border: 2px solid var(--line); background: var(--cream); font-size: 1rem;
  transition: border-color .2s, background .2s, box-shadow .2s;
}
.field input:focus { outline: none; border-color: var(--peri-600); background: #fff; box-shadow: 0 0 0 4px var(--rose-100); }
.field input[aria-invalid="true"] { border-color: var(--bad); }
.field__err { color: var(--bad); font-size: .88rem; min-height: 1.2em; }
.field__eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; color: var(--ink-3); }
.form-alert { display: none; gap: 10px; align-items: flex-start; padding: 14px 16px; border-radius: 14px; background: var(--bad-bg); color: var(--bad); font-size: .94rem; }
.form-alert.is-on { display: flex; animation: shake .45s; }
.demo-note { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 16px; background: var(--butter); font-size: .9rem; }
.btn.is-loading { pointer-events: none; }
.btn .spinner { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid rgba(255,255,255,.35); border-top-color: #fff; animation: spin .7s linear infinite; display: none; }
.btn.is-loading .spinner { display: block; }
.btn.is-loading .lbl { opacity: .7; }
@media (max-width: 860px) { .auth { grid-template-columns: 1fr; } .auth__art { min-height: 0; } .auth__art .float-tags { height: 150px; } }

.dash { display: grid; grid-template-columns: 340px 1fr; gap: 18px; align-items: start; }
.profile { position: sticky; top: calc(var(--header-h) + 20px); padding: 28px; border-radius: var(--r-xl); background: var(--rose-50); display: grid; gap: 18px; justify-items: center; text-align: center; }
.profile__av { width: 96px; height: 96px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, var(--rose-300), var(--peach-200)); font-family: var(--f-head); font-weight: 600; font-size: 2rem; box-shadow: 0 0 0 6px #fff; }
.profile h3 { font-size: 1.4rem; }
.profile__stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; }
.profile__stats .stat { padding: 16px; text-align: left; }
.profile__stats .stat b { font-size: 1.7rem; }
.sets { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.set { position: relative; overflow: hidden; border-radius: var(--r-lg); padding: 24px; display: grid; gap: 16px; align-content: space-between; min-height: 230px; transition: transform .4s var(--ease-out); }
.set:hover { transform: translateY(-4px); }
.set h4 { font-size: 1.3rem; font-weight: 600; letter-spacing: -.02em; }
.set__top { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.set__ic { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: #fff; }
.set.is-locked { background: repeating-linear-gradient(135deg, #F4EFF1 0 12px, #EFE8EB 12px 24px); color: var(--ink-2); }
.set.is-locked h4 { color: var(--ink-2); }
.set__bar { height: 8px; border-radius: 8px; background: rgba(255,255,255,.7); overflow: hidden; }
.set__bar span { display: block; height: 100%; background: var(--ink); border-radius: inherit; }
.history { display: grid; gap: 8px; }
.history li { display: flex; justify-content: space-between; gap: 10px; padding: 14px 18px; border-radius: 16px; background: var(--paper); box-shadow: var(--shadow-sm); }
@media (max-width: 960px) { .dash { grid-template-columns: 1fr; } .profile { position: relative; top: 0; } }
@media (max-width: 640px) { .sets { grid-template-columns: 1fr; } }

.dev-banner { display: flex; align-items: center; gap: 10px; justify-content: center; padding: 8px 16px; font-size: .84rem; background: var(--butter); text-align: center; }

/* Toast */
.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); z-index: 170; display: flex; align-items: center; gap: 10px; padding: 14px 20px; border-radius: 999px; background: var(--ink); color: #fff; box-shadow: var(--shadow-md); transform: translate(-50%, 160%); transition: transform .5s var(--ease-spring); font-size: .95rem; max-width: calc(100vw - 32px); }
.toast.is-on { transform: translate(-50%, 0); }

/* ---------- Motion helpers ---------- */
/* Chỉ ẩn trước khi GSAP chạy, để nội dung luôn hiện nếu JS lỗi */
.js-motion [data-reveal], .js-motion [data-reveal-group] > * { opacity: 0; }
.js-motion [data-split] { opacity: 0; }
.split-line { display: block; overflow: hidden; padding-bottom: .08em; margin-bottom: -.08em; }

@media (hover: hover) and (pointer: fine) {
  .tilt { transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(var(--ty, 0)); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .marquee__track { animation: none; }
  .js-motion [data-reveal], .js-motion [data-reveal-group] > *, .js-motion [data-split] { opacity: 1; }
}

/* Lộ trình: đường dọc */
.road__track, .road__line { position: absolute; left: 30px; top: 32px; bottom: 32px; width: 4px; border-radius: 4px; }
.road__track { background: var(--rose-100); }
.road__line { background: linear-gradient(var(--rose-500), var(--orchid-200)); transform-origin: top; }
body:has(.dev-banner) .site-header { top: 52px; }
body:has(.dev-banner) .site-header.is-scrolled { top: 14px; }
@media (max-width: 560px) {
  .opt { grid-template-columns: 38px 1fr; gap: 12px; padding: 10px 12px 10px 10px; }
  .opt__k { width: 38px; height: 38px; border-radius: 12px; }
  .opt__mark { position: absolute; right: -6px; top: -6px; width: 26px; height: 26px; box-shadow: 0 0 0 3px #fff; }
  .q-card { padding: 20px 16px; }
}
html:has(.seg) { scroll-padding-top: calc(var(--header-h) + 90px); }
@media (max-width: 860px) {
  .auth__form { order: -1; }
  .auth__art { gap: 18px; }
  .auth__art .float-tags { height: 120px; }
}
@media (max-width: 420px) { .dev-banner { font-size: .78rem; padding: 8px 10px; } }
.q-bar { transition: top .45s var(--ease-out); }
body:has(.site-header:not(.is-hidden)) .q-bar { top: 88px; }

/* ---------- Cảm nhận của học sinh ---------- */
.fb-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 18px; align-items: stretch; }
.fb { position: relative; margin: 0; border-radius: var(--r-lg); padding: clamp(22px, 3vw, 32px); display: grid; gap: 22px; align-content: space-between; grid-column: span 5; overflow: hidden; }
.fb--wide { grid-column: span 7; }
.fb__q { position: absolute; right: 22px; top: 18px; width: 54px; height: 54px; color: #fff; opacity: .7; fill: none; stroke: currentColor; stroke-width: 1.6; }
.fb blockquote { margin: 0; display: grid; gap: 12px; font-size: 1.02rem; line-height: 1.7; position: relative; }
.fb blockquote strong { background: linear-gradient(transparent 58%, rgba(255,255,255,.75) 58%); font-weight: 600; }
.fb__shot { display: block; width: 100%; padding: 0; border-radius: var(--r-md); overflow: hidden; background: #fff; box-shadow: var(--shadow-sm); cursor: zoom-in; transition: transform .45s var(--ease-out), box-shadow .45s var(--ease-out); align-self: center; }
.fb__shot:hover { transform: translateY(-4px) rotate(-.6deg); box-shadow: var(--shadow-md); }
.fb__shot img { width: 100%; height: auto; }
.fb__who { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.fb__who .av { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: #fff; font-family: var(--f-head); font-weight: 600; flex: none; }
.fb__who b { display: block; font-family: var(--f-head); font-weight: 500; }
.fb__who span:not(.av):not(.score):not(.fb__scores) { font-size: .88rem; color: var(--ink-2); }
.fb__scores { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; }
.fb__scores .score { padding: 6px 12px; border-radius: 999px; background: #fff; font-family: var(--f-head); font-weight: 600; font-size: .86rem; white-space: nowrap; }
@media (max-width: 900px) { .fb, .fb--wide { grid-column: span 12; } .fb__scores { margin-left: 0; } }

.zoom { border: 0; padding: 0; background: transparent; max-width: min(1100px, 94vw); max-height: 90vh; overflow: visible; }
.zoom::backdrop { background: rgba(30, 27, 46, .7); backdrop-filter: blur(6px); }
.zoom img { display: block; max-width: 100%; max-height: 86vh; border-radius: var(--r-md); box-shadow: var(--shadow-md); }
.zoom__close { position: absolute; right: -10px; top: -14px; z-index: 1; }
.zoom[open] img { animation: zoomIn .45s var(--ease-spring) both; }
@keyframes zoomIn { from { opacity: 0; transform: scale(.9); } }

.stage__card--teacher .av--icon { display: grid; place-items: center; background: var(--rose-300); color: var(--ink); }
.cta-band h2 { max-width: 20ch; }
.nav-free { margin-left: 4px; font-size: .72em; font-weight: 600; letter-spacing: .04em; color: var(--rose-600); }
.mobile-menu a.big small { white-space: nowrap; }
@media (max-width: 1120px) {
  .nav__links, .nav__cta .btn { display: none; }
  .menu-btn { display: grid; }
}
@media (max-width: 560px) { .mobile-menu a.big { font-size: clamp(1.7rem, 8vw, 2.4rem); flex-wrap: wrap; } }
.fb__q { position: static; width: 40px; height: 40px; color: var(--ink); opacity: .85; }
.fb { align-content: start; }
.fb .fb__who { margin-top: auto; }
.fb--img { align-content: stretch; grid-template-rows: 1fr auto; }

/* Khoá học: 2 thẻ lịch lớp + 2 gói học phí */
.stats-row--2 { grid-template-columns: repeat(2, 1fr); }
.stat--class b { font-size: clamp(1.4rem, 2.6vw, 1.9rem); }
.stat--class span { font-size: 1rem; color: var(--ink-2); }
@media (max-width: 560px) { .stats-row--2 { grid-template-columns: 1fr; } .stats-row--2 .stat:last-child { grid-column: auto; } }
.road--caps .road__body h4 { text-transform: uppercase; letter-spacing: .04em; font-weight: 600; }
.plans { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.plan { position: relative; overflow: hidden; display: grid; gap: 16px; align-content: start; padding: clamp(24px, 4vw, 40px); border-radius: var(--r-xl); background: var(--paper); box-shadow: var(--shadow-sm); }
.plan.bg-logo { background: linear-gradient(120deg, var(--orchid-200) 0%, var(--blush-200) 48%, var(--peach-200) 100%); }
.plan--top { background: var(--ink); color: #fff; box-shadow: var(--shadow-lg); }
.plan__ic { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.7); color: var(--rose-600); }
.plan--top .plan__ic { background: rgba(242,185,202,.18); color: var(--rose-300); }
.plan__name { font-family: var(--f-head); font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 600; letter-spacing: -.02em; }
.plan__list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.plan__list li { display: grid; grid-template-columns: 26px 1fr; gap: 10px; align-items: start; color: var(--ink-2); }
.plan--top .plan__list li { color: rgba(255,255,255,.82); }
.plan__list .i { width: 26px; height: 26px; padding: 5px; border-radius: 50%; background: #fff; color: var(--rose-600); }
.plan--top .plan__list .i { background: var(--rose-300); color: var(--ink); }
.plan__price { font-family: var(--f-head); font-size: clamp(1.6rem, 3.2vw, 2.2rem); font-weight: 600; letter-spacing: -.03em; line-height: 1.1; margin-top: 4px; }
.plan__price small { font-size: .5em; font-weight: 500; opacity: .7; letter-spacing: 0; }
.plan .btn { margin-top: auto; }
@media (max-width: 760px) { .plans { grid-template-columns: 1fr; } }
.plan__price small { margin-left: 6px; }
/* Mục "Quyền lợi riêng" nổi bật */
.road__step--perk .road__dot { background: var(--rose-600); color: #fff; box-shadow: 0 0 0 6px var(--rose-100), var(--shadow-md); }
.road__step--perk .road__body { background: linear-gradient(120deg, var(--orchid-200) 0%, var(--blush-200) 48%, var(--peach-200) 100%); box-shadow: var(--shadow-lg); border: 2px solid var(--rose-300); }
.road__step--perk .road__body h4 { display: flex; align-items: center; gap: 8px; color: var(--rose-600); font-weight: 700; }
.road__step--perk .road__body p { color: var(--ink); font-weight: 600; }
.road__step--perk .road__body a { color: var(--rose-600); text-decoration: underline; text-underline-offset: 3px; }
.stat__mode { justify-self: start; display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; background: var(--rose-50); color: var(--rose-600); font-style: normal; font-size: .85rem; font-weight: 600; }
.stat__mode .i { width: 14px; height: 14px; }
/* Vòng xoay chờ máy chủ (ngoài nút) */
.spin-dark { display: inline-block; flex: none; width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid var(--rose-100); border-top-color: var(--rose-600); animation: spin .7s linear infinite; }
