:root {
  --bg: #fff8ef;
  --bg2: #ffeeda;
  --card: #ffffff;
  --text: #2b1f38;
  --muted: #6f6480;
  --line: #f0e2d0;
  --orange: #ff7a1a;
  --pink: #ff4f8b;
  --purple: #7b3fe4;
  --green: #22c55e;
  --shadow: 0 10px 30px rgba(89, 45, 12, 0.08);
  --radius: 22px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #15101c;
    --bg2: #1f1729;
    --card: #211a2c;
    --text: #f5effb;
    --muted: #b6a9c6;
    --line: #342a42;
    --orange: #ff9447;
    --pink: #ff6b9f;
    --purple: #a988ff;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.65 "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--orange); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
img { max-width: 100%; display: block; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
h1, h2, h3, .brand span { font-family: "Baloo 2", "Nunito", sans-serif; letter-spacing: -0.01em; }

/* Thanh trên */
.top {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.bar { display: flex; align-items: center; gap: 16px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; }
.brand img { border-radius: 10px; box-shadow: 0 4px 12px rgba(255, 122, 26, 0.3); }
.brand span { font-weight: 800; font-size: 22px; }
.top nav { margin-left: auto; display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.top nav::-webkit-scrollbar { display: none; }
.top nav a {
  color: var(--muted); text-decoration: none; font-weight: 700; font-size: 14px;
  padding: 7px 12px; border-radius: 999px; white-space: nowrap;
}
.top nav a:hover { color: var(--text); background: var(--bg2); }
.top nav a.on { color: #fff; background: var(--orange); }
@media (max-width: 720px) {
  .bar { height: auto; flex-wrap: wrap; padding: 10px 0; gap: 8px; }
  .top nav { margin-left: 0; width: 100%; }
}

/* Trang chủ */
.hero {
  position: relative; overflow: hidden;
  background: radial-gradient(1200px 500px at 80% -10%, rgba(123, 63, 228, 0.25), transparent 60%),
              radial-gradient(900px 500px at 0% 100%, rgba(255, 122, 26, 0.25), transparent 60%);
}
.hero-in { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 40px; align-items: center; padding: 56px 20px 64px; }
.hero h1 { font-size: clamp(36px, 5.2vw, 60px); line-height: 1.02; margin: 12px 0 14px; font-weight: 800; }
.hero h1 em { font-style: normal; background: linear-gradient(90deg, var(--orange), var(--pink), var(--purple)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.lead { color: var(--muted); font-size: 18px; max-width: 520px; margin: 0 0 26px; }
.pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px;
  background: var(--card); border: 1px solid var(--line); font-weight: 700; font-size: 13px; color: var(--muted);
}
.pill b { width: 8px; height: 8px; border-radius: 50%; background: var(--green); display: inline-block; }
.cta { display: flex; gap: 12px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 10px; padding: 13px 22px; border-radius: 16px;
  font-weight: 800; text-decoration: none; font-size: 16px; transition: transform .15s ease, box-shadow .15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn.main { color: #fff; background: linear-gradient(135deg, var(--orange), var(--pink)); box-shadow: 0 10px 24px rgba(255, 90, 60, 0.35); }
.btn.ghost { color: var(--text); background: var(--card); border: 1px solid var(--line); }
.btn svg { width: 20px; height: 20px; }
.hero-art { position: relative; }
.hero-art img.cover { width: 100%; border-radius: 28px; box-shadow: var(--shadow); aspect-ratio: 1024 / 500; object-fit: cover; }
.hero-art img.badge {
  position: absolute; width: 96px; height: 96px; border-radius: 24px; left: -18px; bottom: -22px;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.25); border: 4px solid var(--card);
}
@media (max-width: 860px) {
  .hero-in { grid-template-columns: minmax(0, 1fr); padding: 36px 20px 48px; }
  .hero-art img.badge { width: 72px; height: 72px; left: 12px; bottom: -18px; }
}
.features { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin: 8px auto 56px; }
.feat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.feat .ico { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; font-size: 22px; margin-bottom: 10px; }
.feat h3 { margin: 0 0 4px; font-size: 19px; }
.feat p { margin: 0; color: var(--muted); font-size: 15px; }
@media (max-width: 900px) { .features { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .features { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 520px) { .btn { padding: 12px 16px; font-size: 15px; } .shots img { width: 160px; } }
.section-title { text-align: center; font-size: 32px; margin: 0 0 6px; }
.section-sub { text-align: center; color: var(--muted); margin: 0 0 24px; }
.shots { display: flex; gap: 16px; overflow-x: auto; padding: 8px 20px 24px; scroll-snap-type: x mandatory; scrollbar-width: thin; }
.shots img { width: 200px; flex: none; border-radius: 22px; box-shadow: var(--shadow); scroll-snap-align: center; aspect-ratio: 9 / 16; object-fit: cover; }
@media (min-width: 1100px) { .shots { justify-content: center; } }
.info-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 40px auto 64px; }
.info { display: block; text-decoration: none; color: var(--text); background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; transition: transform .15s ease, border-color .15s ease; }
.info:hover { transform: translateY(-3px); border-color: var(--orange); }
.info h3 { margin: 0 0 4px; font-size: 18px; }
.info p { margin: 0; color: var(--muted); font-size: 14px; }
.info span { color: var(--orange); font-weight: 800; font-size: 14px; }
@media (max-width: 820px) { .info-grid { grid-template-columns: 1fr; } }

/* Trang văn bản */
.doc { padding-top: 36px; padding-bottom: 64px; }
.doc-head { margin-bottom: 20px; }
.doc-head h1 { font-size: clamp(30px, 4.4vw, 44px); line-height: 1.1; margin: 0 0 6px; font-weight: 800; }
.updated { color: var(--muted); font-size: 14px; margin: 0; }
.doc-grid { display: grid; gap: 24px; align-items: start; grid-template-columns: minmax(0, 1fr); }
.doc-grid.with-toc { grid-template-columns: 260px minmax(0, 1fr); }
@media (max-width: 900px) { .doc-grid.with-toc { grid-template-columns: minmax(0, 1fr); } .toc { position: static !important; } }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.toc { position: sticky; top: 84px; padding: 18px 16px; font-size: 14px; }
.toc-title { font-weight: 800; text-transform: uppercase; letter-spacing: .06em; font-size: 12px; color: var(--muted); margin: 0 0 8px 4px; }
.toc ol { list-style: none; margin: 0; padding: 0; counter-reset: t; }
.toc li a { display: block; padding: 6px 8px; border-radius: 10px; color: var(--text); text-decoration: none; }
.toc li a:hover { background: var(--bg2); }
.prose { padding: 28px 32px; min-width: 0; }
@media (max-width: 600px) { .prose { padding: 20px 18px; } }
.prose > :first-child { margin-top: 0; }
.prose h2 { font-size: 24px; margin: 34px 0 8px; padding-top: 18px; border-top: 1px dashed var(--line); }
.prose h2:first-of-type { border-top: 0; padding-top: 0; }
.prose h3 { font-size: 18px; margin: 20px 0 4px; }
.prose ul { padding-left: 20px; }
.prose li { margin: 6px 0; }
.prose li::marker { color: var(--orange); }
.lead-box { background: linear-gradient(135deg, rgba(255, 122, 26, 0.1), rgba(123, 63, 228, 0.1)); border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; margin: 0 0 18px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); }
tr:last-child td { border-bottom: 0; }
th { background: var(--bg2); font-weight: 800; }
.steps { counter-reset: s; list-style: none; padding: 0; }
.steps li { position: relative; padding: 14px 16px 14px 56px; background: var(--bg2); border-radius: 16px; margin: 10px 0; }
.steps li::before {
  counter-increment: s; content: counter(s); position: absolute; left: 14px; top: 14px;
  width: 28px; height: 28px; border-radius: 50%; background: var(--orange); color: #fff; font-weight: 800;
  display: grid; place-items: center; font-size: 14px;
}
details { border: 1px solid var(--line); border-radius: 14px; padding: 12px 16px; margin: 10px 0; background: var(--card); }
details[open] { background: var(--bg2); }
summary { cursor: pointer; font-weight: 800; }
summary::marker { color: var(--orange); }
details p, details ul { margin: 8px 0 2px; }

/* Chân trang */
.foot { border-top: 1px solid var(--line); background: var(--bg2); padding: 28px 0 36px; font-size: 14px; color: var(--muted); }
.foot .wrap { display: grid; gap: 8px; justify-items: center; text-align: center; }
.foot-brand { display: flex; align-items: center; gap: 8px; font-weight: 800; color: var(--text); }
.foot-brand img { border-radius: 8px; }
.foot a { color: var(--muted); }
.foot a:hover { color: var(--orange); }
