/* NexTami landing.
   Bố cục: Magic UI Startup Template (hero căn giữa, khung sản phẩm lớn, CTA cuối căn giữa, footer cột).
   Cách trình bày: Granola (nền trắng, tiêu đề có chân, dải tối, khối trước/trong/sau có mục lục dính, danh sách dòng kẻ).
   Khung hỏi: evon chat.md (tin người dùng là bong bóng phải, câu trả lời không bong bóng, ô soạn bo 24 + nút 16).
   ĐỔI THƯƠNG HIỆU: màu nhấn ở --primary / --accent, font ở --font-display / --font-body. */
:root {
  color-scheme: light;
  --font-display: "Be Vietnam Pro", ui-sans-serif, system-ui, sans-serif;
  --font-body: "Be Vietnam Pro", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-doc: "Times New Roman", Times, serif;
  --primary: #12302d;
  --primary-hover: #1c4541;
  --primary-foreground: #ffffff;
  --accent: #0f766e;
  --accent-soft: #e3f1ee;
  --background: #ffffff;
  --soft: #f6f6f3;
  --foreground: #1d2321;
  --muted: #5f6764;
  --border: #ececea;
  --border-strong: #dcdcd8;
  --band: #1f2624;
  --band-fg: #e7ecea;
  --band-muted: #a6b0ad;
  --ok: #166534;  --ok-bg: #e5f4ea;
  --soon: #8a4b00; --soon-bg: #fbefd9;
  --ins: #1d4ed8; --del: #b42318;
  --r: 12px; --r-lg: 20px; --r-xl: 24px;
  --shadow-card: 0 1px 2px rgb(16 24 22 / 0.04), 0 12px 32px -12px rgb(16 24 22 / 0.18);
  --shadow-frame: 0 30px 80px -30px rgb(15 118 110 / 0.35), 0 0 0 1px rgb(16 24 22 / 0.06);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }
body { margin: 0; background: var(--background); color: var(--foreground); font: 16px/1.6 var(--font-body); -webkit-font-smoothing: antialiased; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
h1, h2 { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.025em; line-height: 1.12; text-wrap: balance; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
section { scroll-margin-top: 72px; }
* { scrollbar-width: thin; scrollbar-color: #cfcfca transparent; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #cfcfca; border-radius: 8px; }
::-webkit-scrollbar-track { background: transparent; }
.ic { width: 16px; height: 16px; flex: none; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 20px; border-radius: 999px; border: 1px solid transparent; font: 600 15px/1 var(--font-body); text-decoration: none; cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s; }
.btn-sm { height: 36px; padding: 0 16px; font-size: 14px; }
.btn-dark { background: var(--primary); color: var(--primary-foreground); }
.btn-dark:hover { background: var(--primary-hover); }
.btn-line { background: var(--background); color: var(--foreground); border-color: var(--border-strong); }
.btn-line:hover { background: var(--soft); }

.nav { position: sticky; top: 0; z-index: 30; background: rgb(255 255 255 / 0.88); backdrop-filter: saturate(180%) blur(12px); -webkit-backdrop-filter: saturate(180%) blur(12px); border-bottom: 1px solid var(--border); padding-top: env(safe-area-inset-top, 0px); }
.nav-in { display: flex; align-items: center; gap: 24px; height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; letter-spacing: -0.01em; text-decoration: none; color: var(--foreground); }
.mark { width: 30px; height: 30px; border-radius: 8px; background: linear-gradient(#138a7f, #0b635c); color: #fff; display: grid; place-items: center; flex: none; }
.mark svg { width: 20px; height: 20px; }
.mark-xs { width: 20px; height: 20px; border-radius: 6px; }
.mark-xs svg { width: 14px; height: 14px; }
.nav-links { display: flex; gap: 4px; margin-left: auto; }
.nav-links a { font-size: 14px; color: var(--muted); text-decoration: none; padding: 8px 12px; border-radius: 8px; }
.nav-links a:hover { color: var(--foreground); background: var(--soft); }

.hero { padding-block: 72px 40px; background: radial-gradient(900px 420px at 50% -120px, var(--accent-soft), transparent 70%); }
.hero-in { display: flex; flex-direction: column; align-items: center; text-align: center; }
.badge { display: inline-flex; align-items: center; gap: 10px; min-height: 34px; padding: 3px 12px 3px 4px; border: 1px solid var(--border-strong); border-radius: 999px; background: var(--background); font-size: 14px; color: var(--foreground); text-decoration: none; }
.badge:hover { border-color: var(--accent); }
.badge-tag { height: 26px; display: inline-flex; align-items: center; padding: 0 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-weight: 600; font-size: 13px; white-space: nowrap; }
.badge .ic { width: 14px; height: 14px; color: var(--muted); }
.hero h1 { margin-top: 24px; font-size: clamp(36px, 5.6vw, 68px); }
.lede { margin-top: 18px; max-width: 34rem; font-size: 18px; color: var(--muted); }

.ask { margin-top: 36px; width: 100%; max-width: 760px; text-align: left; background: var(--background); border: 1px solid var(--border-strong); border-radius: var(--r-xl); box-shadow: var(--shadow-card); display: flex; flex-direction: column; padding-top: 12px; }
.ask-log { list-style: none; margin: 0; padding: 12px 24px 16px; display: flex; flex-direction: column; gap: 22px; max-height: min(560px, 62vh); overflow-y: auto; overscroll-behavior: contain; }
.ask-log > li { flex-shrink: 0; display: flex; flex-direction: column; gap: 12px; }
.msg-me { align-self: flex-end; max-width: 80%; background: var(--soft); border-radius: var(--r-xl); padding: 10px 16px; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg-ai { max-width: 60ch; white-space: pre-wrap; text-wrap: pretty; }
.msg-wait { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); }
.spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--border-strong); border-top-color: var(--muted); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.feat-card { border: 1px solid var(--border); border-radius: var(--r); overflow: hidden; background: var(--background); max-width: 560px; }
.feat-card-h { padding: 12px 14px; display: grid; gap: 4px; }
.feat-card-h b { font-weight: 600; font-size: 15px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.feat-card-h span { font-size: 14px; color: var(--muted); }
.feat-card .demo { border: 0; border-top: 1px solid var(--border); border-radius: 0; }
.pill { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; font-family: var(--font-body); }
.pill.ok { background: var(--ok-bg); color: var(--ok); }
.pill.soon { background: var(--soon-bg); color: var(--soon); }

.ask-suggest { padding: 0 16px 12px; display: flex; flex-direction: column; gap: 8px; }
.ask-suggest:empty { display: none; }
.ask-suggest .lbl { font-size: 13px; color: var(--muted); padding-left: 4px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 36px; display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border: 1px solid var(--border-strong); border-radius: 999px; background: var(--background); color: var(--foreground); font: 500 14px/1.3 var(--font-body); cursor: pointer; text-align: left; }
.chip:hover { background: var(--soft); }
.chip[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.chip-go { background: var(--primary); border-color: var(--primary); color: var(--primary-foreground); }
.chip-go:hover { background: var(--primary-hover); }
.chip-go:disabled { opacity: .3; cursor: not-allowed; }

.composer { margin: 0 12px 12px; display: flex; align-items: flex-end; gap: 8px; padding: 8px; border: 1px solid var(--border-strong); border-radius: var(--r-xl); background: var(--background); }
.composer:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgb(15 118 110 / 0.15); }
.composer textarea { flex: 1; min-width: 0; min-height: 40px; max-height: 200px; resize: none; border: 0; outline: 0; background: transparent; padding: 9px 10px; font: 16px/1.4 var(--font-body); color: var(--foreground); }
.composer textarea::placeholder { color: var(--muted); }
.send { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border: 0; border-radius: 16px; background: var(--primary); color: var(--primary-foreground); cursor: pointer; }
.send:hover { background: var(--primary-hover); }
.send:disabled { opacity: .3; cursor: not-allowed; }
.email-box { display: grid; gap: 10px; max-width: 520px; padding: 14px; border: 1px solid var(--border); border-radius: var(--r); background: var(--soft); }
.email-row { display: flex; gap: 8px; }
.email-row input { flex: 1; min-width: 0; height: 40px; border: 1px solid var(--border-strong); border-radius: 999px; padding: 0 14px; font: 15px var(--font-body); background: var(--background); color: var(--foreground); }
.email-row input:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px rgb(15 118 110 / 0.15); }
.ask-note { margin-top: 14px; font-size: 13px; color: var(--muted); max-width: 40rem; }

.showcase { padding-block: 40px 96px; }
.frame { max-width: 1040px; margin: 0 auto; border-radius: var(--r-lg); padding: 10px; background: linear-gradient(180deg, #f3f6f5, #ffffff); box-shadow: var(--shadow-frame); }
.win { border-radius: 14px; overflow: hidden; background: #f1f3f2; border: 1px solid var(--border); }
.win-bar { display: flex; align-items: center; gap: 12px; height: 40px; padding: 0 14px; background: #e9eceb; border-bottom: 1px solid var(--border); }
.lights { display: flex; gap: 6px; flex: none; }
.lights i { width: 11px; height: 11px; border-radius: 50%; background: #f2615a; }
.lights i:nth-child(2) { background: #f6be4f; }
.lights i:nth-child(3) { background: #3fc651; }
.win-tab { font-size: 12.5px; padding: 4px 10px; border-radius: 7px; color: var(--muted); white-space: nowrap; }
.win-tab.is-on { background: #fff; color: var(--foreground); box-shadow: 0 1px 2px rgb(0 0 0 / 0.08); }
.win-body { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); min-height: 360px; }
.doc { margin: 18px 0 18px 18px; padding: 28px 32px; background: #fff; border-radius: 6px; box-shadow: 0 1px 3px rgb(0 0 0 / 0.08); font: 15px/1.6 var(--font-doc); color: #1a1a1a; display: grid; gap: 8px; align-content: start; }
.doc-h, .doc-sub { text-align: center; font-weight: 700; font-size: 13px; }
.doc-sub { margin-top: -6px; text-decoration: underline; text-underline-offset: 3px; }
.doc-title { text-align: center; margin: 10px 0 4px; }
.doc-title .t { font-weight: 700; color: var(--ins); border-bottom: 2px solid var(--ins); }
.doc del { color: var(--del); }
.doc ins { color: var(--ins); text-decoration: underline; text-underline-offset: 2px; }
.doc-review { margin-top: 10px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; font: 13px var(--font-body); background: #fff8e8; border: 1px solid #efd8a4; color: #5a4300; border-radius: 8px; padding: 8px 10px; }
.doc-accept { font-weight: 600; background: var(--accent); color: #fff; border-radius: 6px; padding: 5px 10px; white-space: nowrap; }
.side { display: flex; flex-direction: column; gap: 14px; padding: 18px; font-size: 14px; }
.side-h { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.side-me { align-self: flex-end; background: #fff; border-radius: 18px; padding: 10px 14px; max-width: 92%; }
.side-ai ul { margin: 6px 0; padding-left: 18px; }
.frame-cap { margin-top: 16px; text-align: center; font-size: 13px; color: var(--muted); }

.band { background: var(--band); color: var(--band-fg); padding-block: 56px; }
.band-in { display: grid; gap: 28px; justify-items: center; text-align: center; }
.band-h { font-size: 17px; color: var(--band-muted); }
.band-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 40px; font-size: 20px; font-weight: 600; letter-spacing: -0.01em; }

.moments { padding-block: 112px 80px; }
.moments-h { font-size: clamp(32px, 4vw, 48px); max-width: 30rem; margin-left: calc(240px + 64px); }
.moments-grid { margin-top: 64px; display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 64px; align-items: start; }
.moments-nav { position: sticky; top: 96px; display: grid; }
.moments-nav a { font-size: 14px; color: var(--muted); text-decoration: none; padding: 10px 0; border-bottom: 1px solid var(--border); }
.moments-nav a[aria-current="true"] { color: var(--foreground); font-weight: 600; }
.moments-list { display: grid; gap: 96px; }
.moment-group { display: grid; gap: 64px; scroll-margin-top: 96px; }
.moment { display: grid; gap: 10px; max-width: 640px; }
.moment-kicker { font-size: 13px; font-weight: 600; color: var(--accent); }
.moment h3 { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.01em; font-size: 26px; line-height: 1.2; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.moment > p { color: var(--muted); max-width: 52ch; }
.moment-art { margin-top: 10px; border-radius: var(--r-lg); padding: 28px; }
.art-teal { background: #dfeeea; } .art-sand { background: #f1ebde; } .art-lime { background: #e6ecd2; } .art-sky { background: #e2ebf3; }
.moment-art .demo { box-shadow: 0 12px 32px -16px rgb(16 24 22 / 0.35); }

.demo { border-radius: var(--r); overflow: hidden; background: #fff; border: 1px solid var(--border); font-size: 13px; color: var(--foreground); }
.demo img { width: 100%; height: auto; }
.demo-pad { padding: 16px; }
.demo .paper { font-family: var(--font-doc); }
.demo table { border-collapse: collapse; width: 100%; font-size: 12.5px; font-family: var(--font-body); }
.demo th, .demo td { border: 1px solid #e3e6e5; padding: 6px 8px; text-align: left; vertical-align: top; }
.demo th { background: #f4f6f5; font-weight: 600; }
.demo .num { font-variant-numeric: tabular-nums; text-align: right; }
.demo .chip-s { display: inline-block; font: 600 12px var(--font-body); padding: 4px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); margin: 4px 4px 0 0; white-space: nowrap; }
.demo .scanbox { position: relative; width: 220px; aspect-ratio: 3 / 4; margin: 0 auto; background: #2e3533; border-radius: 22px; }
.demo .scanbox .sheet { position: absolute; inset: 14% 16% 12% 14%; background: #fafaf8; transform: rotate(-4deg); border-radius: 2px; }
.demo .scanbox .quad { position: absolute; inset: 13% 15% 11% 13%; border: 3px solid #3bb3a6; transform: rotate(-4deg); border-radius: 4px; }
.demo .scanbox .cnt { position: absolute; top: 14px; right: 14px; background: #16332f; color: #9fe3d9; font: 700 12px var(--font-body); padding: 4px 10px; border-radius: 999px; }
.demo .bub { display: grid; grid-template-columns: repeat(4, 12px); gap: 6px; }
.demo .bub i { width: 12px; height: 12px; border-radius: 50%; border: 1.5px solid #9aa8a5; }
.demo .bub i.f { background: #111; border-color: #111; }

.why { padding-block: 96px; }
.eyebrow { font-size: 14px; font-weight: 600; color: var(--accent); }
.why-h { margin-top: 10px; font-size: clamp(34px, 5vw, 60px); max-width: 18ch; }
.why .btn { margin-top: 28px; }
.rows { list-style: none; margin: 56px 0 0; padding: 0; border-top: 1px solid var(--border); }
.rows li { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 32px; padding-block: 28px; border-bottom: 1px solid var(--border); }
.rows h3 { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.01em; font-size: 24px; line-height: 1.25; display: flex; gap: 14px; align-items: flex-start; }
.ic-row { width: 26px; height: 26px; flex: none; color: var(--accent); margin-top: 2px; }
.rows p { color: var(--muted); }

.cta { padding-block: 96px; background: var(--soft); border-top: 1px solid var(--border); }
.cta-in { display: flex; flex-direction: column; align-items: center; text-align: center; }
.cta-mark { width: 64px; height: 64px; border-radius: 18px; }
.cta-mark svg { width: 40px; height: 40px; }
.cta h2 { margin-top: 24px; font-size: clamp(32px, 4.6vw, 52px); }
.cta-sub { margin-top: 12px; color: var(--muted); font-size: 17px; max-width: 36rem; }
.signup { margin-top: 28px; width: 100%; max-width: 480px; display: grid; gap: 12px; text-align: left; }
.signup-row { display: flex; gap: 8px; }
.signup input[type="email"], .signup-zalo { height: 44px; min-width: 0; border: 1px solid var(--border-strong); border-radius: 999px; padding: 0 18px; font: 15.5px var(--font-body); background: var(--background); color: var(--foreground); width: 100%; }
.signup input:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px rgb(15 118 110 / 0.15); }
.signup-row input { flex: 1; }
.consent { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 10px; font-size: 13px; color: var(--muted); line-height: 1.5; cursor: pointer; position: relative; padding-top: 2px; }
.consent input { position: absolute; opacity: 0; width: 18px; height: 18px; margin: 0; }
.consent .box { width: 18px; height: 18px; border: 1.5px solid var(--border-strong); border-radius: 5px; background: var(--background); display: grid; place-items: center; color: transparent; margin-top: 1px; }
.consent .box svg { width: 12px; height: 12px; }
.consent input:checked + .box { background: var(--primary); border-color: var(--primary); color: #fff; }
.consent input:focus-visible + .box { outline: 2px solid var(--accent); outline-offset: 2px; }
.form-msg { font-size: 14px; font-weight: 600; min-height: 1.2em; }
.form-msg.ok { color: var(--ok); }
.form-msg.err { color: var(--del); }
.after { display: grid; gap: 10px; padding: 16px; border: 1px solid var(--border); border-radius: var(--r); background: var(--background); }
.after b { font-size: 20px; color: var(--accent); }
.share { display: flex; gap: 8px; }
.share input { flex: 1; min-width: 0; height: 36px; border: 1px solid var(--border-strong); border-radius: 8px; padding: 0 10px; font: 13px ui-monospace, Menlo, monospace; background: var(--soft); color: var(--foreground); }

.faq { padding-block: 96px; }
.faq-in { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: 48px; align-items: start; }
.faq h2 { font-size: clamp(30px, 4vw, 44px); }
.faq-list { border-top: 1px solid var(--border); }
.acc { border-bottom: 1px solid var(--border); }
.acc-q { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 0; background: none; border: 0; text-align: left; font: 500 17px/1.4 var(--font-body); color: var(--foreground); cursor: pointer; }
.acc-ic { position: relative; width: 14px; height: 14px; flex: none; }
.acc-ic::before, .acc-ic::after { content: ""; position: absolute; left: 0; top: 6px; width: 14px; height: 2px; background: var(--muted); border-radius: 2px; transition: transform .2s; }
.acc-ic::after { transform: rotate(90deg); }
.acc-q[aria-expanded="true"] .acc-ic::after { transform: rotate(0deg); }
.acc-a { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .22s ease; }
.acc-a > div { overflow: hidden; }
.acc-a p { padding-bottom: 20px; color: var(--muted); max-width: 62ch; }
.acc-q[aria-expanded="true"] + .acc-a { grid-template-rows: 1fr; }

.foot { border-top: 1px solid var(--border); padding-block: 48px calc(24px + env(safe-area-inset-bottom, 0px)); font-size: 14px; }
.foot-in { display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap; }
.foot-brand { display: grid; gap: 10px; }
.foot-cols { display: flex; gap: 64px; }
.foot-cols div { display: grid; gap: 8px; align-content: start; }
.foot-cols a { color: var(--muted); text-decoration: none; }
.foot-cols a:hover { color: var(--foreground); }
.foot-h { font-weight: 600; }
.foot-bottom { margin-top: 40px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; }
.foot-legal { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.foot-legal a { color: var(--muted); text-decoration: none; display: inline-flex; align-items: center; min-height: 32px; }
.foot-legal a:hover { color: var(--foreground); text-decoration: underline; }
.acc-a p + p { margin-top: -12px; }
.acc-a a { color: var(--foreground); }
/* Nhãn «Ví dụ mẫu: Toán 7» trên minh hoạ trong khung chat. */
.demo-sample { padding: 6px 14px; font-size: 12.5px; color: var(--muted); border-top: 1px solid var(--border); }
/* Trang chính sách, điều khoản: một cột chữ ngắn. */
.legal { padding-block: 56px 72px; }
.legal-in { max-width: 680px; }
.legal h1 { font-size: clamp(28px, 4vw, 40px); letter-spacing: -0.02em; line-height: 1.15; }
.legal .legal-date { margin-top: 8px; color: var(--muted); font-size: 14px; }
.legal h2 { margin-top: 36px; font-size: 19px; font-weight: 600; letter-spacing: -0.01em; }
.legal p, .legal li { margin-top: 10px; color: var(--muted); font-size: 16px; line-height: 1.6; }
.legal ul { padding-left: 20px; }
.legal b { color: var(--foreground); font-weight: 600; }
.legal a { color: var(--foreground); }
.todo { background: var(--soon-bg); color: var(--soon); border-radius: 4px; padding: 0 4px; font-style: normal; }

@media (max-width: 960px) {
  .nav-links { display: none; }
  .nav .btn { margin-left: auto; }
  .moments-h { margin-left: 0; }
  .moments-grid { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .moments-nav { display: none; }
  .faq-in { grid-template-columns: minmax(0, 1fr); gap: 24px; }
}
@media (max-width: 720px) {
  .hero { padding-block: 48px 24px; }
  .lede { font-size: 17px; }
  .ask-log { padding: 12px 16px 12px; }
  .msg-me { max-width: 85%; }
  .win-body { grid-template-columns: minmax(0, 1fr); }
  .side { border-top: 1px solid var(--border); }
  .doc { margin: 12px; padding: 18px; font-size: 14px; }
  .showcase { padding-block: 24px 64px; }
  .band { padding-block: 40px; }
  .band-list { gap: 10px 24px; font-size: 17px; }
  .moments, .why, .cta, .faq { padding-block: 64px; }
  .moment-art { padding: 14px; }
  .rows li { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .rows h3 { font-size: 21px; }
  .signup-row { flex-direction: column; }
  .signup-row .btn { width: 100%; }
  .foot-cols { gap: 40px; }
}

/* sửa sau đo: cột tên trong bảng minh hoạ không gãy dòng; chỗ bấm ≥ 24px */
.demo td:nth-child(2), .demo th:nth-child(2) { white-space: nowrap; }
.demo td:first-child, .demo th:first-child { width: 1%; white-space: nowrap; }
.consent input { width: 24px; height: 24px; left: -3px; top: -1px; }
.foot-cols a { display: inline-flex; align-items: center; min-height: 32px; }
.lbl-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 32px; }
.lbl-row .chip-go { min-height: 32px; padding: 4px 14px; font-size: 13px; }
@media (max-width: 720px) {
  .hide-sm { display: none; }
  .hero h1 { font-size: 40px; }
  .ask-suggest .chips { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px; padding: 0 16px 4px; scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 16px, #000 calc(100% - 24px), transparent); mask-image: linear-gradient(90deg, transparent 0, #000 16px, #000 calc(100% - 24px), transparent); }
  .ask-suggest .chips::-webkit-scrollbar { display: none; }
  .ask-suggest .chip { flex: none; white-space: nowrap; }
}
.moment-group, .moment, .moment-art { min-width: 0; }
.demo { overflow-x: auto; }
@media (max-width: 720px) {
  /* hàng email xếp dọc thì flex:1 bóp chiều cao ô còn 21px: trả về kích thước tự nhiên */
  .signup-row input { flex: none; }
  .demo td:last-child { min-width: 180px; }
}

/* khung một lượt trợ lý tự làm */
.run { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 0; background: #fff; }
.run-left { padding: 24px; display: grid; gap: 12px; align-content: start; border-right: 1px solid var(--border); }
.run-label { font-size: 13px; font-weight: 600; color: var(--muted); }
.run-ask { background: var(--soft); border-radius: 18px; padding: 12px 16px; font-size: 15px; margin-bottom: 8px; }
.run-files { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.run-files li { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; font-size: 14px; }
.ft { width: 24px; height: 24px; border-radius: 6px; display: grid; place-items: center; font: 700 11px var(--font-body); color: #fff; flex: none; }
.ft-w { background: #2b579a; } .ft-p { background: #c43e1c; } .ft-v { background: var(--accent); }
.run-right { padding: 24px; display: grid; gap: 14px; align-content: start; }
.run-head { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); }
.run-steps { list-style: none; margin: 0 0 0 7px; padding: 0 0 0 20px; border-left: 1px solid var(--border-strong); display: grid; gap: 14px; counter-reset: s; }
.run-steps li { position: relative; display: grid; gap: 2px; }
.run-steps li::before { content: ""; position: absolute; left: -27px; top: 5px; width: 13px; height: 13px; border-radius: 50%; background: #fff; border: 2px solid var(--accent); }
.run-steps li::after { content: ""; position: absolute; left: -23px; top: 9px; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.run-steps b { font-weight: 600; font-size: 15px; }
.run-steps span { font-size: 13.5px; color: var(--muted); }
@media (max-width: 720px) {
  .run { grid-template-columns: minmax(0, 1fr); }
  .run-left { border-right: 0; border-bottom: 1px solid var(--border); padding: 18px; }
  .run-right { padding: 18px; }
}
@media (max-width: 720px) { .win-tab:not(.is-on) { display: none; } }
@media (max-width: 720px) { .hero h1 { font-size: 34px; } }

/* ================= chuyển động ================= */
/* Hero vào trang: lần lượt nhãn, hai dòng tiêu đề, mô tả, khung hỏi. Chỉ chạy khi JS gắn .js-motion. */
.h-line { display: block; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.js-motion .hero .badge, .js-motion .hero .lede, .js-motion .hero .ask, .js-motion .hero .ask-note { animation: rise .7s cubic-bezier(.2,.7,.2,1) both; }
/* Tiêu đề hero (text-rise): chữ của từng dòng trượt lên trong khung cắt của chính dòng đó, tổng ≤ 600 ms.
   Khung cắt dùng clip-path (nới -.5em trên cho dấu tiếng Việt, -.14em dưới cho chân chữ và dấu nặng) thay vì overflow/padding:
   không đổi kích thước hộp nên không xô bố cục, và chữ đang chạy không bao giờ đè lên nhãn phía trên hay dòng khác. */
.h-in { display: block; }
.js-motion .hero .h-line { -webkit-clip-path: inset(-.5em -1em -.14em); clip-path: inset(-.5em -1em -.14em); }
/* Điểm xuất phát thấp hơn đáy khung cắt (100% + .5em) để cả dấu mũ cao nhất cũng nằm ngoài khung: không mảnh chữ nào lộ xuống dòng dưới. */
@keyframes textRise { from { opacity: 0; transform: translateY(calc(100% + .5em)); } to { opacity: 1; transform: none; } }
.js-motion .hero .h-in { animation: textRise .48s cubic-bezier(.2,.7,.2,1) both; }
.js-motion .hero .h-line:nth-child(2) .h-in { animation-delay: .1s; }
.js-motion .hero .lede { animation-delay: .3s; }
.js-motion .hero .ask { animation-delay: .42s; }
.js-motion .hero .ask-note { animation-delay: .52s; }
.badge-tag { position: relative; overflow: hidden; }
.badge-tag::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgb(255 255 255 / .7) 50%, transparent 70%); transform: translateX(-120%); animation: shine 3.2s ease-in-out 1.2s infinite; }
@keyframes shine { 0%, 60% { transform: translateX(-120%); } 100% { transform: translateX(120%); } }

/* Mọc dần khi cuộn tới */
/* Chỉ trượt lên, không ẩn: nội dung luôn đọc được khi chưa cuộn tới (ảnh chụp cả trang, bộ dò của máy tìm kiếm). */
/* 修复原因：未出现状态原为 translateY(28px)，大于眉标→标题(10px)、标题→副标题(12px)等间距，动画前/动画中文字压到下一块
   （手机上更明显，-8% 底部边距内的元素一直停在未出现状态）。改为以中心缩小：缩小后的盒子始终在自身布局盒内，永不与邻居重叠。 */
.js-motion [data-reveal] { transform: scale(.96); transform-origin: 50% 50%; transition: transform .7s cubic-bezier(.2,.7,.2,1); transition-delay: var(--d, 0ms); }
.js-motion [data-reveal].in { transform: none; }

/* Khung sản phẩm phát sáng nhẹ */
.frame { position: relative; }
.frame::before { content: ""; position: absolute; inset: -40px -20px auto; height: 70%; z-index: -1; background: radial-gradient(closest-side, rgb(15 118 110 / .18), transparent); opacity: .9; animation: glow 6s ease-in-out infinite alternate; }
@keyframes glow { from { opacity: .55; transform: scale(.96); } to { opacity: 1; transform: scale(1.04); } }

/* Các bước tự làm: chờ → đang chạy → xong */
.run-steps li { transition: opacity .3s; }
.run-steps li[data-st="wait"] { opacity: .45; }
.run-steps li[data-st="wait"]::before { border-color: var(--border-strong); }
.run-steps li[data-st="wait"]::after { opacity: 0; }
.run-steps li[data-st="run"]::before { border-color: var(--accent); border-right-color: transparent; animation: spin .8s linear infinite; }
.run-steps li[data-st="run"]::after { opacity: 0; }
.run-files li { transition: opacity .4s, transform .4s; }
.run-files li.off { opacity: 0; transform: translateY(6px); }

/* Dải công cụ chạy ngang (Marquee của Magic UI) */
.marquee { display: flex; gap: 40px; overflow: hidden; width: 100%; -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.mq-track { flex: none; flex-wrap: nowrap; gap: 40px; min-width: max-content; animation: mq 32s linear infinite; }
.marquee:hover .mq-track { animation-play-state: paused; }
@keyframes mq { to { transform: translateX(calc(-100% - 40px)); } }

/* Giáo dục số */
.digital { padding-block: 104px 24px; }
.digital-h { margin-top: 10px; font-size: clamp(30px, 4.4vw, 52px); max-width: 20ch; }
.digital-sub { margin-top: 14px; color: var(--muted); font-size: 17px; max-width: 58ch; }
.dg-grid { margin-top: 40px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.dg { border: 1px solid var(--border); border-radius: var(--r-lg); padding: 22px; display: grid; gap: 10px; align-content: start; background: linear-gradient(180deg, #fbfcfb, #fff); }
.dg h3 { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }
.dg p { color: var(--muted); font-size: 14.5px; }
.dg .pill { justify-self: start; }
.dg-ic { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: 14px; }

@media (max-width: 960px) { .dg-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .dg-grid { grid-template-columns: minmax(0, 1fr); } .digital { padding-block: 64px 8px; } }
@media (prefers-reduced-motion: reduce) { .mq-track { animation: none; } .marquee { flex-wrap: wrap; justify-content: center; -webkit-mask-image: none; mask-image: none; } .marquee .mq-track[aria-hidden] { display: none; } .mq-track { flex-wrap: wrap; justify-content: center; min-width: 0; } }
#runHead[data-st="run"] .ic { visibility: hidden; }

/* nhấn từ khoá: chữ xanh ngọc + vệt tô dưới chân chữ */
em.hl { font-style: normal; color: var(--accent); background: linear-gradient(transparent 68%, rgb(15 118 110 / .14) 68%); padding: 0 .06em; border-radius: 2px; }
.lede b { color: var(--foreground); font-weight: 600; }
.run-steps { gap: 18px; }
.run-steps b { font-size: 16px; }
.frame-cap { font-size: 15px; font-weight: 600; color: var(--foreground); }
.digital-h, .why-h, .moments-h { line-height: 1.08; }
.dg p { font-size: 15px; color: var(--foreground); }
.moment > p { font-size: 17px; color: var(--foreground); }
.moments-h { max-width: 44rem; }
em.hl { -webkit-box-decoration-break: clone; box-decoration-break: clone; }
/* câu hỏi mở đầu khảo sát: là câu chính của khung, không phải nhãn phụ */
.ask-suggest .lbl.lbl-q { font-size: 18px; font-weight: 600; color: var(--foreground); letter-spacing: -0.01em; padding-left: 4px; }
@media (max-width: 720px) { .ask-suggest .lbl.lbl-q { font-size: 16px; } }

/* Điện thoại: chữ thoáng hơn, khảo sát không cắt chữ */
:root { --font-body: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif; }
@media (max-width: 720px) {
  body { font-size: 15px; line-height: 1.65; }
  .hero h1 { font-size: 32px; letter-spacing: -0.02em; }
  .lede { font-size: 16px; }
  .ask-suggest .lbl-row { display: contents; }
  .ask-suggest { gap: 10px; }
  .ask-suggest .lbl.lbl-q { order: 1; font-size: 16px; line-height: 1.35; }
  .ask-suggest .chips { order: 2; flex-wrap: wrap; overflow: visible; margin: 0; padding: 0; -webkit-mask-image: none; mask-image: none; gap: 6px; }
  .ask-suggest .chip { flex: none; white-space: normal; font-size: 14px; font-weight: 400; min-height: 34px; padding: 5px 12px; }
  .ask-suggest .chip-go { order: 3; width: 100%; justify-content: center; min-height: 40px; font-weight: 600; }
  .msg-me, .msg-ai { font-size: 15px; }
  .moment h3 { font-size: 21px; }
  .moment > p, .dg p { font-size: 15px; }
  .rows h3 { font-size: 19px; }
  .faq .acc-q { font-size: 15.5px; }
}

/* ===== chat toàn màn hình trên điện thoại ===== */
.ask-top { display: none; }
html.no-scroll, html.no-scroll body { overflow: hidden; }
@media (max-width: 720px) {
  .ask.is-full {
    position: fixed; inset: 0; z-index: 60; margin: 0; max-width: none; width: 100%; height: 100dvh;
    border: 0; border-radius: 0; box-shadow: none; padding-top: 0;
    animation: sheetIn .22s cubic-bezier(.2,.7,.2,1);
  }
  @keyframes sheetIn { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
  .ask.is-full .ask-top {
    display: flex; align-items: center; gap: 10px; flex: none;
    height: calc(56px + env(safe-area-inset-top, 0px)); padding: env(safe-area-inset-top, 0px) max(8px, env(safe-area-inset-right, 0px)) 0 max(16px, env(safe-area-inset-left, 0px));
    border-bottom: 1px solid var(--border); background: var(--background);
  }
  .ask.is-full .ask-top b { font-size: 16px; font-weight: 600; flex: 1; }
  .ask-close { width: 44px; height: 44px; display: grid; place-items: center; border: 0; border-radius: 12px; background: transparent; color: var(--foreground); cursor: pointer; }
  .ask-close:hover, .ask-close:focus-visible { background: var(--soft); }
  .ask-close .ic { width: 22px; height: 22px; }
  .ask.is-full .ask-log { flex: 1; max-height: none; padding: 16px; }
  .ask.is-full .ask-log[hidden] { display: flex !important; }
  .ask.is-full .ask-suggest { flex: none; max-height: 42dvh; overflow-y: auto; padding-top: 8px; border-top: 1px solid var(--border); }
  .ask.is-full .ask-log[hidden] + .ask-suggest { border-top: 0; }
  .ask.is-full .composer { flex: none; margin: 0 12px calc(12px + env(safe-area-inset-bottom, 0px)); }
}

/* Khung hỏi đóng trên điện thoại: không hiện tin nhắn, chỉ một dòng mở lại cuộc trò chuyện */
.ask-resume { display: none; }
@media (max-width: 720px) {
  .ask[data-started]:not(.is-full) .ask-log,
  .ask[data-started]:not(.is-full) .ask-suggest { display: none !important; }
  .ask[data-started]:not(.is-full) .ask-resume {
    display: flex; align-items: center; gap: 12px; width: calc(100% - 24px); margin: 0 12px 10px; padding: 12px 14px;
    border: 1px solid var(--border); border-radius: 16px; background: var(--soft); color: var(--foreground);
    text-align: left; font: inherit; cursor: pointer;
  }
  .ask-resume .r-text { flex: 1; min-width: 0; display: grid; gap: 2px; }
  .ask-resume b { font-size: 14.5px; font-weight: 600; color: var(--accent); }
  .ask-resume #askSnip { font-size: 14px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .ask-resume .ic { color: var(--muted); }
}

/* Khung chat không bao giờ cuộn ngang: mọi khối con bó trong bề ngang của khung */
.ask-log { overflow-x: hidden; }
.ask-log > li > * { max-width: 100%; min-width: 0; }
.email-box { width: 100%; }
.email-box .consent { font-size: 13px; }
@media (max-width: 720px) {
  .email-row { flex-direction: column; }
  .email-row input { flex: none; height: 44px; }
  .email-row .btn { width: 100%; height: 44px; }
}
.email-box .form-msg:empty { display: none; }

/* Popup chào: chính khung «Hỏi NexTami» nổi giữa màn hình (máy tính); điện thoại dùng .is-full sẵn có. */
.ask-backdrop { position: fixed; inset: 0; z-index: 70; background: rgb(17 24 22 / .45); animation: nx-fade .2s ease-out; }
/* 修复原因：首屏 .js-motion .hero .ask 的入场动画以 fill-mode 覆盖 transform，translate 居中失效、弹窗偏到右下；改用 inset + margin:auto 居中，不依赖 transform。 */
.js-motion .hero .ask.is-pop, .ask.is-pop { position: fixed; z-index: 71; inset: 0; margin: auto; transform: none; height: fit-content; width: min(600px, calc(100vw - 32px)); max-height: min(720px, calc(100dvh - 48px)); display: flex; flex-direction: column; box-shadow: 0 24px 64px rgb(0 0 0 / .25); animation: nx-pop .22s ease-out both; }
.ask.is-pop .ask-top { display: flex; align-items: center; gap: 10px; padding: 4px 12px 8px 20px; }
.ask.is-pop .ask-top b { flex: 1; font-size: 15px; font-weight: 600; }
.ask.is-pop .ask-close { width: 40px; height: 40px; display: grid; place-items: center; border: 0; border-radius: 12px; background: transparent; color: var(--foreground); cursor: pointer; }
.ask.is-pop .ask-close:hover, .ask.is-pop .ask-close:focus-visible { background: var(--soft); }
.ask.is-pop .ask-close .ic { width: 20px; height: 20px; }
.ask.is-pop .ask-log { flex: 1; max-height: none; min-height: 0; overflow-y: auto; }
.ask.is-pop .ask-log[hidden] { display: none !important; }
.ask.is-pop .ask-suggest { flex: none; }
.ask.is-pop .ask-resume { display: none !important; }
.ask.is-pop .ask-log:not([hidden]), .ask.is-pop .ask-suggest { display: block !important; }
@keyframes nx-fade { from { opacity: 0; } }
@keyframes nx-pop { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .ask-backdrop, .ask.is-pop { animation: none; } }

/* Minh hoạ bản 05/12 (demos.js giữ bản 05/12 khi trang trở về giao diện 02–03/12; thiếu các lớp này thì danh sách tệp, ảnh chụp hiện vỡ). */
.ft-x { background: #217346; } .ft-pdf { background: #b42318; font-size: 9px; width: auto; min-width: 24px; padding: 0 4px; }
.d-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.d-two { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 12px; align-items: start; }
.d-span { grid-column: 1 / -1; }
.d-cap { font-size: 12.5px; color: var(--muted); }
.d-warn { color: var(--soon); }
.d-files { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.d-file { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 7px 10px; border: 1px solid var(--border); border-radius: 8px; font-size: 13px; }
.d-name { min-width: 0; overflow-wrap: anywhere; }
.d-note { font-size: 12px; color: var(--muted); }
.d-photo { max-width: 170px; width: 100%; aspect-ratio: 3 / 4; background: #e9e4d8; border-radius: 6px; padding: 14% 12%; display: grid; align-content: start; gap: 8%; transform: rotate(-3deg); }
.d-photo i { display: block; height: 5px; background: #9a9486; border-radius: 3px; }
.d-photo i.s { width: 60%; }
.d-ocr { display: grid; gap: 6px; font-size: 12.5px; padding: 10px; border: 1px solid var(--border); border-radius: 6px; }
.d-ocr b { text-align: center; }
.d-collage { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.d-collage i { aspect-ratio: 4 / 3; border-radius: 6px; background: linear-gradient(160deg, #cfe3dc, #a9c9bd); }
.d-collage i:nth-child(2) { background: linear-gradient(160deg, #eadfc8, #d5c39e); }
.d-collage i:nth-child(3) { background: linear-gradient(160deg, #dde3ea, #b7c4d3); }
.d-collage i:nth-child(4) { background: linear-gradient(160deg, #e6ecd2, #c7d3a3); }
.d-award { display: grid; gap: 6px; text-align: center; padding: 18px 12px; border: 3px double #b9a36a; border-radius: 4px; font-size: 13px; }
.d-award > b { font-size: 20px; letter-spacing: 0.02em; color: #8a1f1f; }
.demo .d-award + .d-cap { margin-top: 8px; }
@media (max-width: 720px) { .d-two { grid-template-columns: minmax(0, 1fr); } .d-photo { max-width: 140px; } }
/* 修复原因：.frame::before 光晕左右外扩 20px 且有 scale(1.04) 动画，手机宽度下把页面撑出 2–4px 横向滚动。
   在展示区裁掉横向溢出，光晕纵向仍可外扩。 */
.showcase { overflow-x: clip; }

/* Video mô phỏng điền vnEdu (khoảnh khắc «wow» ngay dưới hero). */
.wow { padding-block: 24px 72px; text-align: center; }
.wow-h { font-size: clamp(28px, 4vw, 44px); }
.wow-sub { margin-top: 10px; color: var(--muted); font-size: 17px; }
.wow-frame { margin: 28px auto 0; max-width: 1080px; border-radius: var(--r-xl); overflow: hidden; border: 1px solid var(--border); box-shadow: var(--shadow-card); background: var(--soft); }
.wow-v { display: block; width: 100%; height: auto; }
.wow-tall { display: none; }
.wow-note { margin-top: 10px; font-size: 13px; color: var(--muted); }
@media (max-width: 720px) {
  .wow-wide { display: none; }
  .wow-tall { display: block; aspect-ratio: 9 / 16; max-height: 80dvh; width: auto; margin-inline: auto; }
  .wow-frame { max-width: 420px; }
}
@media (prefers-reduced-motion: reduce) { .wow-v { animation: none; } }

/* Bộ đếm giữ chỗ (chỉ số thật; spec «Bộ đếm và giới thiệu») */
.counter { margin-top: 12px; display: inline-flex; align-items: center; gap: 8px; font-size: 15px; color: var(--muted); }
.counter b { color: var(--foreground); font-weight: 600; font-variant-numeric: tabular-nums; }
.counter-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); flex: none; }
.share-box { display: grid; gap: 10px; }
.share-reward { font-size: 15px; color: var(--foreground); }
.share-link { width: 100%; min-width: 0; height: 44px; border: 1px solid var(--border-strong); border-radius: 10px; padding: 0 12px; font: 14px ui-monospace, Menlo, monospace; background: var(--soft); color: var(--foreground); }
.share-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.share-btns .btn { flex: 1 1 160px; }
.share-msg { font-size: 14px; color: var(--ok); min-height: 1.2em; }
.share-msg:empty { display: none; }
/* Minh hoạ trình duyệt vnEdu: bảng + khung trò chuyện cạnh nhau; điện thoại xếp dọc (demos.js D.browser). */
.d-split { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); }
.wow-v { cursor: pointer; }
/* Nhóm Zalo dùng thử trước */
.group-btn { justify-self: start; white-space: normal; text-align: center; line-height: 1.3; min-height: 44px; height: auto; padding-block: 10px; }
.msg-ai + .group-btn, .feat-card + .group-btn { align-self: flex-start; }
.group-cta { margin-top: 16px; white-space: normal; text-align: center; height: auto; min-height: 44px; padding-block: 10px; line-height: 1.3; }

/* ===== Điện thoại (spec «Giao diện điện thoại», 05/12/2026): chỗ bấm ≥ 44px, chữ thân ≥ 15px, video ≤ 70dvh ===== */
@media (max-width: 720px) {
  .btn-sm { height: 44px; font-size: 15px; }
  .brand { min-height: 44px; }
  .badge { min-height: 44px; }
  .ask-suggest .chips { gap: 8px; }
  .ask-suggest .chip { min-height: 44px; font-size: 15px; padding: 8px 14px; }
  .ask-suggest .chip-go { min-height: 44px; font-size: 15px; }
  .composer textarea { min-height: 44px; padding: 11px 10px; }
  .send { width: 44px; height: 44px; }
  .ask-note, .wow-note { font-size: 14px; }
  .consent { font-size: 14px; min-height: 44px; align-items: start; }
  .email-row .btn { height: 44px; }
  .foot, .foot .muted { font-size: 15px; }
  .foot-cols a, .foot-legal a { min-height: 44px; }
  .foot-cols div { gap: 0; }
  .foot-legal { gap: 0 20px; }
  .foot-bottom { margin-top: 24px; }
  /* Video 9:16: khung theo bề rộng nhưng không cao quá 70dvh; video lấp khung, không tràn sang phải. */
  .wow-frame { width: min(100%, calc(70dvh * 9 / 16)); max-width: none; }
  .wow-tall { width: 100%; height: auto; max-height: none; aspect-ratio: 9 / 16; object-fit: cover; }
  .wow-sub { font-size: 16px; }
  .d-split { grid-template-columns: minmax(0, 1fr); }
  .counter { font-size: 15px; }
  .share-btns .btn { flex-basis: 100%; }
  .after .group-btn, .group-cta { width: 100%; max-width: 480px; justify-self: stretch; }
}

/* ===== hiệu ứng nhỏ (05/12/2026; spec «Hiệu ứng nhỏ»): chỉ transform/opacity, tắt khi giảm chuyển động ===== */
/* Bộ đếm: mỗi chữ số là một cột 0–9 trượt dọc (kiểu Sliding Number). Chữ số ẩn (.rd-ghost) giữ bề rộng và đường chân chữ;
   clip-path thay overflow để inline-block không đổi baseline. */
.roll { white-space: nowrap; }
.rd { position: relative; display: inline-block; -webkit-clip-path: inset(0); clip-path: inset(0); }
.rd-ghost { visibility: hidden; }
.rd-strip { position: absolute; left: 0; right: 0; top: 0; display: block; transition: transform .9s cubic-bezier(.2,.7,.2,1); }
.rd-strip > span { display: block; text-align: center; }

/* Pháo giấy sau khi giữ chỗ thành công: lớp vẽ cố định, không chặn chạm, không chiếm chỗ. */
.confetti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 80; }

/* Thẻ «Giáo dục số» trên điện thoại: một hàng vuốt ngang, bám thẻ (scroll-snap gốc), chấm chỉ vị trí. Máy tính giữ lưới. */
.dg-dots { display: none; }
@media (max-width: 720px) {
  .dg-grid {
    display: flex; gap: 12px; overflow-x: auto; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory; scrollbar-width: none;
    margin-left: calc(-1 * max(20px, env(safe-area-inset-left, 0px))); margin-right: calc(-1 * max(20px, env(safe-area-inset-right, 0px)));
    padding: 4px max(20px, env(safe-area-inset-right, 0px)) 4px max(20px, env(safe-area-inset-left, 0px));
    scroll-padding-inline: max(20px, env(safe-area-inset-left, 0px));
  }
  .dg-grid::-webkit-scrollbar { display: none; }
  .dg-grid > .dg { flex: 0 0 82%; scroll-snap-align: start; }
  .dg-dots { display: flex; justify-content: center; gap: 8px; margin-top: 14px; }
  .dg-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--border-strong); transition: transform .25s ease, background-color .25s ease; }
  .dg-dots i.on { background: var(--accent); transform: scale(1.4); }
}
