/* ==========================================================================
   KOLBOT – Design System
   Học AI, khám phá Prompt và công cụ AI
   File dùng chung cho toàn bộ trang. Không lặp lại CSS trong file HTML.
   --------------------------------------------------------------------------
   MỤC LỤC
   01. Token & biến màu
   02. Reset & nền tảng
   03. Tiện ích layout
   04. Nút & badge
   05. Header / Navigation / Mobile menu
   06. Hero
   07. Card & lưới nội dung
   08. Tìm kiếm & bộ lọc
   09. Prompt (card, code, copy)
   10. Khóa học
   11. Công cụ AI
   12. Video & modal
   13. Bài viết & prose
   14. Bảng so sánh
   15. FAQ accordion
   16. Form đăng ký / liên hệ
   17. Hội viên, Cộng đồng, Ủng hộ
   18. Footer
   19. Tiện ích nổi (back to top, reading bar)
   20. Animation & responsive
   ========================================================================== */

/* ============ 01. TOKEN & BIẾN MÀU ====================================== */
:root {
  /* Bảng màu thương hiệu Kolbot */
  --navy-900: #021750;
  --navy-800: #092259;
  --blue: #1366fc;
  --blue-700: #075efc;
  --cyan: #04cdfd;
  --lime: #a4de4a;

  --brand-gradient: linear-gradient(135deg, #04cdfd 0%, #1366fc 70%, #075efc 100%);
  --brand-gradient-soft: linear-gradient(135deg, rgba(4, 205, 253, .14) 0%, rgba(19, 102, 252, .14) 100%);

  /* Vai trò màu – chế độ sáng */
  --bg: #ffffff;
  --bg-soft: #f7faff;
  --bg-elevated: #ffffff;
  --bg-inset: #f2f6fd;
  --text: #071738;
  --text-muted: #5a6a8e;
  --border: #d3dee9;
  --border-soft: #e6eef7;
  --accent: var(--blue);
  --accent-ink: #0b3fa8;
  --focus: #075efc;

  --shadow-xs: 0 1px 2px rgba(2, 23, 80, .06);
  --shadow-sm: 0 2px 10px rgba(2, 23, 80, .06);
  --shadow-md: 0 10px 30px rgba(2, 23, 80, .08);
  --shadow-lg: 0 24px 60px rgba(2, 23, 80, .14);

  /* Bán kính */
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 24px;
  --r-pill: 999px;

  /* Layout */
  --container: 1216px;
  --gutter: 24px;
  --section-y: 104px;
  --header-h: 76px;

  /* Chữ */
  --font: "Be Vietnam Pro", Inter, Arial, sans-serif;
  --fs-h1: clamp(2rem, 1.25rem + 3vw, 3.35rem);
  --fs-h2: clamp(1.6rem, 1.2rem + 1.6vw, 2.4rem);
  --fs-h3: clamp(1.18rem, 1.05rem + .5vw, 1.45rem);
  --fs-body: 1.0625rem;
  --fs-sm: .9375rem;
  --fs-xs: .8125rem;

  --ease: cubic-bezier(.22, .61, .36, 1);
}

[data-theme="dark"] {
  --bg: #05102e;
  --bg-soft: #071837;
  --bg-elevated: #0a2050;
  --bg-inset: #0b2456;
  --text: #eaf1ff;
  --text-muted: #9db0d6;
  --border: #17346e;
  --border-soft: #122a5c;
  --accent: #4d92ff;
  --accent-ink: #a8ccff;
  --focus: #6fb6ff;

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, .3);
  --shadow-sm: 0 2px 10px rgba(0, 0, 0, .3);
  --shadow-md: 0 12px 32px rgba(0, 0, 0, .38);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, .5);
}

/* ============ 02. RESET & NỀN TẢNG ====================================== */
*, *::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(--font);
  font-size: var(--fs-body);
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  transition: background-color .3s var(--ease), color .3s var(--ease);
}

body.is-locked { overflow: hidden; }

img, svg, video { max-width: 100%; display: block; }
img { height: auto; }

h1, h2, h3, h4, h5 {
  margin: 0 0 .5em;
  line-height: 1.22;
  font-weight: 700;
  letter-spacing: -.015em;
  color: var(--text);
}

h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
h4 { font-size: 1.0625rem; }

p { margin: 0 0 1.1em; }
ul, ol { margin: 0 0 1.1em; padding-left: 1.25em; }
li + li { margin-top: .35em; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

strong { font-weight: 600; }
hr { border: 0; border-top: 1px solid var(--border-soft); margin: 32px 0; }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 6px;
}

::selection { background: rgba(19, 102, 252, .18); }

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 200;
  background: var(--bg-elevated);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  padding: 10px 20px;
  font-weight: 600;
  transition: top .2s var(--ease);
}
.skip-link:focus { top: 14px; text-decoration: none; }

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

/* ============ 03. TIỆN ÍCH LAYOUT ====================================== */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: var(--section-y); }
.section--soft { background: var(--bg-soft); }
.section--tight { padding-block: calc(var(--section-y) * .62); }

.section-head { max-width: 720px; margin-bottom: 44px; }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head p { color: var(--text-muted); margin-bottom: 0; }

.section-head__row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 44px;
}
.section-head__row .section-head { margin-bottom: 0; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--accent-ink);
  background: var(--brand-gradient-soft);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-pill);
  padding: 6px 14px;
  margin-bottom: 18px;
}
[data-theme="dark"] .eyebrow { color: var(--accent-ink); }

.lead { font-size: 1.15rem; color: var(--text-muted); }
.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }
.mb-0 { margin-bottom: 0; }
.mt-32 { margin-top: 32px; }
.narrow { max-width: 720px; }
.narrow--center { max-width: 720px; margin-inline: auto; }

.gradient-text {
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.divider-line {
  height: 3px;
  width: 64px;
  border-radius: var(--r-pill);
  background: var(--brand-gradient);
}

/* Ghi chú placeholder – hiển thị rõ đây KHÔNG phải dữ liệu thật */
.ph {
  display: inline-block;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .82em;
  color: var(--text-muted);
  background: var(--bg-inset);
  border: 1px dashed var(--border);
  border-radius: 6px;
  padding: 1px 7px;
  word-break: break-word;
}
.ph-note {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: var(--fs-sm);
  color: var(--text-muted);
  background: var(--bg-inset);
  border: 1px dashed var(--border);
  border-radius: var(--r-md);
  padding: 12px 16px;
  margin: 0 0 20px;
}
.ph-note svg { flex: none; margin-top: 3px; }

/* ============ 04. NÚT & BADGE ========================================== */
.btn {
  --btn-bg: var(--bg-elevated);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 46px;
  padding: 11px 24px;
  border-radius: var(--r-pill);
  border: 1px solid transparent;
  background: var(--btn-bg);
  font: inherit;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  text-align: center;
  transition: transform .18s var(--ease), box-shadow .2s var(--ease), background-color .2s var(--ease), border-color .2s var(--ease);
}
.btn:hover { text-decoration: none; }
.btn svg { flex: none; }

.btn--primary {
  background: var(--brand-gradient);
  color: #fff;
  box-shadow: 0 8px 22px rgba(19, 102, 252, .26);
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(19, 102, 252, .34); }

.btn--outline {
  background: var(--bg-elevated);
  border-color: var(--border);
  color: var(--text);
}
.btn--outline:hover { border-color: var(--accent); color: var(--accent); }

.btn--ghost { background: transparent; color: var(--accent); padding-inline: 14px; }
.btn--ghost:hover { background: var(--bg-inset); }

.btn--navy { background: var(--navy-900); color: #fff; }
[data-theme="dark"] .btn--navy { background: var(--bg-inset); border-color: var(--border); }
.btn--navy:hover { transform: translateY(-2px); }

.btn--sm { min-height: 40px; padding: 8px 18px; font-size: var(--fs-xs); }
.btn--lg { min-height: 54px; padding: 15px 32px; font-size: 1rem; }
.btn--block { width: 100%; }

/* CTA chưa có URL thật: vô hiệu hóa, không dùng href="#" */
.btn[aria-disabled="true"],
.btn:disabled {
  background: var(--bg-inset);
  color: var(--text-muted);
  border: 1px dashed var(--border);
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}
.btn-row--center { justify-content: center; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--fs-xs);
  font-weight: 600;
  line-height: 1;
  padding: 6px 11px;
  border-radius: var(--r-pill);
  border: 1px solid var(--border-soft);
  background: var(--bg-inset);
  color: var(--text-muted);
  white-space: nowrap;
}
.badge--free { background: rgba(164, 222, 74, .16); border-color: rgba(164, 222, 74, .5); color: #3f6b12; }
[data-theme="dark"] .badge--free { color: #cdea9a; }
.badge--new { background: rgba(164, 222, 74, .16); border-color: rgba(164, 222, 74, .5); color: #3f6b12; }
[data-theme="dark"] .badge--new { color: #cdea9a; }
.badge--member { background: rgba(19, 102, 252, .1); border-color: rgba(19, 102, 252, .32); color: var(--accent-ink); }
.badge--soon { background: var(--bg-inset); border-color: var(--border); color: var(--text-muted); }
.badge--level { background: rgba(4, 205, 253, .12); border-color: rgba(4, 205, 253, .38); color: #0a5a80; }
[data-theme="dark"] .badge--level { color: #8fe4ff; }

.dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--lime);
  display: inline-block;
  flex: none;
}

.chip-list { display: flex; flex-wrap: wrap; gap: 8px; }

/* Breadcrumb */
.breadcrumb {
  padding-top: calc(var(--header-h) + 26px);
  font-size: var(--fs-sm);
  color: var(--text-muted);
}
.breadcrumb ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0; padding: 0;
}
.breadcrumb li { margin: 0; display: flex; align-items: center; gap: 8px; }
.breadcrumb li + li::before { content: "/"; color: var(--border); }
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb [aria-current="page"] { color: var(--text); font-weight: 600; }

/* ============ 05. HEADER / NAV ========================================= */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background-color .28s var(--ease), border-color .28s var(--ease), box-shadow .28s var(--ease), backdrop-filter .28s var(--ease);
}
.site-header.is-scrolled {
  background: rgba(255, 255, 255, .82);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom-color: var(--border-soft);
  box-shadow: var(--shadow-xs);
}
[data-theme="dark"] .site-header.is-scrolled {
  background: rgba(5, 16, 46, .78);
  border-bottom-color: var(--border);
}

.header-inner {
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  flex: none;
  border-radius: var(--r-md);
  padding: 6px 10px;
  background: #fff;                 /* logo PNG còn nền trắng -> đặt trên vùng nền trắng */
  box-shadow: inset 0 0 0 1px rgba(2, 23, 80, .06);
}
.brand:hover { text-decoration: none; }
.brand img { width: 132px; height: 26px; object-fit: contain; }

.nav { margin-left: auto; }
.nav__list {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 2px;
  margin: 0; padding: 0;
}
.nav__list li { margin: 0; }
.nav__link {
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 11px;
  border-radius: var(--r-pill);
  font-size: .9375rem;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  transition: background-color .18s var(--ease), color .18s var(--ease);
}
.nav__link:hover { background: var(--bg-inset); text-decoration: none; }
.nav__link[aria-current="page"] { color: var(--accent); font-weight: 600; background: var(--bg-inset); }

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
}

.icon-btn {
  width: 44px; height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-pill);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
  cursor: pointer;
  transition: border-color .18s var(--ease), color .18s var(--ease), background-color .18s var(--ease);
}
.icon-btn:hover { border-color: var(--accent); color: var(--accent); }

.theme-toggle .icon-moon { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-moon { display: block; }

.nav-toggle { display: none; }

/* Mobile drawer */
.mobile-nav {
  position: fixed;
  inset: 0;
  z-index: 150;
  display: none;
}
.mobile-nav.is-open { display: block; }
.mobile-nav__overlay {
  position: absolute;
  inset: 0;
  background: rgba(2, 23, 80, .5);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  animation: fade-in .2s var(--ease);
}
.mobile-nav__panel {
  position: absolute;
  inset: 0 0 0 auto;
  width: min(360px, 88vw);
  max-width: 100%;
  background: var(--bg);
  border-left: 1px solid var(--border-soft);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  animation: slide-in .26s var(--ease);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.mobile-nav__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid var(--border-soft);
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 2;
}
.mobile-nav__list {
  list-style: none;
  margin: 0;
  padding: 12px 16px 4px;
}
.mobile-nav__list li { margin: 0; }
.mobile-nav__list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  padding: 10px 12px;
  border-radius: var(--r-md);
  color: var(--text);
  font-weight: 500;
}
.mobile-nav__list a:hover { background: var(--bg-inset); text-decoration: none; }
.mobile-nav__list a[aria-current="page"] { color: var(--accent); background: var(--bg-inset); font-weight: 600; }
.mobile-nav__foot { padding: 12px 16px 28px; display: grid; gap: 10px; }

/* ============ 06. HERO ================================================= */
.hero {
  position: relative;
  overflow: hidden;
  padding-top: calc(var(--header-h) + 76px);
  padding-bottom: 92px;
  background: var(--bg-soft);
  isolation: isolate;
}
.hero__bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}
.hero__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(19, 102, 252, .08) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(19, 102, 252, .08) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 78% 62% at 50% 34%, #000 20%, transparent 78%);
  mask-image: radial-gradient(ellipse 78% 62% at 50% 34%, #000 20%, transparent 78%);
}
[data-theme="dark"] .hero__grid {
  background-image:
    linear-gradient(to right, rgba(109, 176, 255, .12) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(109, 176, 255, .12) 1px, transparent 1px);
}
.hero__glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: .5;
}
.hero__glow--cyan { width: 460px; height: 460px; top: -140px; left: -60px; background: rgba(4, 205, 253, .38); }
.hero__glow--blue { width: 520px; height: 520px; top: -60px; right: -120px; background: rgba(19, 102, 252, .3); }
[data-theme="dark"] .hero__glow { opacity: .3; }

.hero__inner { max-width: 860px; margin-inline: auto; text-align: center; }
.hero h1 { margin-bottom: 20px; }
.hero__desc {
  font-size: clamp(1.02rem, .98rem + .3vw, 1.2rem);
  color: var(--text-muted);
  max-width: 660px;
  margin-inline: auto;
  margin-bottom: 32px;
}
.hero .btn-row { justify-content: center; }

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--accent-ink);
  background: var(--bg-elevated);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-pill);
  padding: 8px 16px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-xs);
}

.hero__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 26px;
  margin-top: 30px;
  font-size: var(--fs-sm);
}
.hero__links a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--text-muted);
  font-weight: 500;
}
.hero__links a:hover { color: var(--accent); }

/* Hero trang con */
.page-hero {
  position: relative;
  overflow: hidden;
  padding-top: calc(var(--header-h) + 56px);
  padding-bottom: 60px;
  background: var(--bg-soft);
  isolation: isolate;
}
.page-hero--with-crumb { padding-top: 26px; }
.page-hero__inner { max-width: 800px; }
.page-hero__inner--center { margin-inline: auto; text-align: center; }
.page-hero p { color: var(--text-muted); margin-bottom: 0; }
.page-hero .btn-row { margin-top: 28px; }

/* ============ 07. CARD & LƯỚI ========================================== */
.grid { display: grid; gap: 24px; }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.card {
  display: flex;
  flex-direction: column;
  background: var(--bg-elevated);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  min-width: 0;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.card:hover { border-color: rgba(19, 102, 252, .38); box-shadow: var(--shadow-md); }
.card--flat { box-shadow: none; }
.card--flat:hover { box-shadow: none; }
.card--pad-lg { padding: 32px; }
.card h3 { margin-bottom: 10px; overflow-wrap: break-word; }
.card p { color: var(--text-muted); font-size: var(--fs-sm); }
.card__top {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  font-size: var(--fs-xs);
  color: var(--text-muted);
  margin-bottom: 16px;
}
.card__meta span { display: inline-flex; align-items: center; gap: 6px; }
.card__foot { margin-top: auto; padding-top: 8px; display: flex; flex-wrap: wrap; gap: 10px; }

.card__icon {
  width: 46px; height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-md);
  background: var(--brand-gradient-soft);
  color: var(--accent);
  margin-bottom: 16px;
  flex: none;
}

.card-media {
  position: relative;
  margin: -24px -24px 18px;
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  overflow: hidden;
  background: var(--bg-inset);
  aspect-ratio: 16 / 9;
}
.card-media img { width: 100%; height: 100%; object-fit: cover; }

.feature-list { list-style: none; padding: 0; margin: 0 0 20px; }
.feature-list li {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  font-size: var(--fs-sm);
  color: var(--text-muted);
  margin-top: 11px;
}
.feature-list li:first-child { margin-top: 0; }
.feature-list svg { flex: none; margin-top: 4px; color: var(--accent); }

/* Giới thiệu 2 cột */
.split {
  display: grid;
  grid-template-columns: minmax(0, .85fr) minmax(0, 1fr);
  gap: 56px;
  align-items: center;
}
.split__media { position: relative; }
.split__media img {
  width: 100%;
  border-radius: var(--r-xl);
  border: 1px solid var(--border-soft);
  position: relative;
  z-index: 1;
  aspect-ratio: 9 / 11;
  object-fit: cover;
  background: var(--bg-inset);
}
.split__media::after {
  content: "";
  position: absolute;
  inset: 12% -8% -10% 10%;
  border-radius: var(--r-xl);
  background: radial-gradient(circle at 70% 70%, rgba(4, 205, 253, .5), transparent 65%);
  filter: blur(44px);
  z-index: 0;
}
.split__role {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 14px;
}

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; }
.stat {
  background: var(--bg-elevated);
  border: 1px dashed var(--border);
  border-radius: var(--r-md);
  padding: 16px 18px;
}
.stat__value { font-weight: 700; font-size: 1.05rem; }
.stat__label { font-size: var(--fs-xs); color: var(--text-muted); }

/* ============ 08. TÌM KIẾM & BỘ LỌC ==================================== */
.toolbar { margin-bottom: 32px; }
.search {
  position: relative;
  max-width: 560px;
  margin-bottom: 18px;
}
.search svg {
  position: absolute;
  left: 18px; top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}
.search input {
  width: 100%;
  min-height: 52px;
  padding: 12px 18px 12px 50px;
  font: inherit;
  font-size: var(--fs-sm);
  color: var(--text);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease);
}
.search input::placeholder { color: var(--text-muted); }
.search input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(19, 102, 252, .14);
  outline: none;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.filter {
  min-height: 40px;
  padding: 8px 16px;
  border-radius: var(--r-pill);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-muted);
  font: inherit;
  font-size: var(--fs-xs);
  font-weight: 600;
  cursor: pointer;
  transition: all .18s var(--ease);
}
.filter:hover { border-color: var(--accent); color: var(--accent); }
.filter[aria-pressed="true"] {
  background: var(--brand-gradient);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 6px 16px rgba(19, 102, 252, .22);
}

.result-count { font-size: var(--fs-sm); color: var(--text-muted); margin: 0 0 22px; }

.empty-state {
  display: none;
  text-align: center;
  padding: 56px 24px;
  border: 1px dashed var(--border);
  border-radius: var(--r-lg);
  color: var(--text-muted);
  background: var(--bg-soft);
}
.empty-state.is-visible { display: block; }
.empty-state h3 { color: var(--text); }

/* ============ 09. PROMPT =============================================== */
.prompt-card__tool {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--text-muted);
}
.tool-mark {
  width: 30px; height: 30px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  flex: none;
}
.tool-mark--chatgpt { background: #0b8f6f; }
.tool-mark--claude { background: #b8552d; }
.tool-mark--gemini { background: var(--blue); }
.tool-mark--generic { background: var(--navy-800); }

.code-block {
  position: relative;
  background: var(--navy-900);
  color: #dfe9ff;
  border-radius: var(--r-md);
  border: 1px solid rgba(255, 255, 255, .08);
  overflow: hidden;
  margin: 0 0 20px;
}
.code-block__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px 10px 18px;
  background: rgba(255, 255, 255, .05);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  font-size: var(--fs-xs);
  font-weight: 600;
  color: #b9cdf7;
}
.code-block pre {
  margin: 0;
  padding: 18px;
  overflow-x: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .875rem;
  line-height: 1.75;
  white-space: pre-wrap;
  word-break: break-word;
  color: #e6eeff;
}
.code-block .var { color: #7ce0ff; font-weight: 600; }

.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 7px 14px;
  border-radius: var(--r-pill);
  border: 1px solid rgba(255, 255, 255, .22);
  background: rgba(255, 255, 255, .08);
  color: #fff;
  font: inherit;
  font-size: var(--fs-xs);
  font-weight: 600;
  cursor: pointer;
  transition: background-color .18s var(--ease);
}
.copy-btn:hover { background: rgba(255, 255, 255, .18); }
.copy-btn.is-done { background: rgba(164, 222, 74, .24); border-color: rgba(164, 222, 74, .6); }

.locked-preview {
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--bg-inset);
  padding: 18px;
  margin-bottom: 18px;
  font-size: var(--fs-sm);
  color: var(--text-muted);
}
.locked-preview::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 56px;
  background: linear-gradient(to bottom, transparent, var(--bg-inset));
  border-radius: 0 0 var(--r-md) var(--r-md);
}
.locked-preview__label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 600;
  color: var(--text);
  font-size: var(--fs-xs);
  margin-bottom: 10px;
}

.var-list { display: grid; gap: 10px; margin: 0 0 24px; padding: 0; list-style: none; }
.var-list li {
  display: flex;
  gap: 12px;
  align-items: baseline;
  flex-wrap: wrap;
  font-size: var(--fs-sm);
  color: var(--text-muted);
  margin: 0;
}
.var-list code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .82rem;
  font-weight: 600;
  color: var(--accent-ink);
  background: rgba(19, 102, 252, .1);
  border: 1px solid rgba(19, 102, 252, .24);
  border-radius: 6px;
  padding: 2px 8px;
  flex: none;
}

/* ============ 10. KHÓA HỌC ============================================= */
.level-block { margin-bottom: 56px; }
.level-block:last-child { margin-bottom: 0; }
.level-block__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
}
.level-block__num {
  width: 44px; height: 44px;
  border-radius: var(--r-md);
  background: var(--brand-gradient);
  color: #fff;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
.level-block__head h3 { margin: 0; }
.level-block__head p { margin: 0; font-size: var(--fs-sm); color: var(--text-muted); width: 100%; }

.lesson-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 44px 0;
}
.lesson-nav a {
  border: 1px solid var(--border-soft);
  border-radius: var(--r-lg);
  padding: 18px 22px;
  background: var(--bg-elevated);
  color: var(--text);
}
.lesson-nav a:hover { border-color: var(--accent); text-decoration: none; }
.lesson-nav__label { font-size: var(--fs-xs); color: var(--text-muted); display: block; margin-bottom: 4px; }
.lesson-nav__title { font-weight: 600; }
.lesson-nav a:last-child { text-align: right; }

/* ============ 11. CÔNG CỤ AI =========================================== */
.tool-card__head { display: flex; gap: 14px; align-items: center; margin-bottom: 16px; }
.tool-card__logo {
  width: 52px; height: 52px;
  border-radius: var(--r-md);
  background: var(--bg-inset);
  border: 1px solid var(--border-soft);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--accent-ink);
  flex: none;
}
.tool-card__head h3 { margin: 0 0 4px; font-size: 1.08rem; }
.tool-card__head span { font-size: var(--fs-xs); color: var(--text-muted); }
.spec-list { list-style: none; margin: 0 0 18px; padding: 0; }
.spec-list li {
  display: flex;
  gap: 10px;
  justify-content: space-between;
  font-size: var(--fs-xs);
  padding: 8px 0;
  border-top: 1px dashed var(--border-soft);
  margin: 0;
  color: var(--text-muted);
}
.spec-list li strong { color: var(--text); font-weight: 600; text-align: right; }

.affiliate-note {
  font-size: var(--fs-xs);
  color: var(--text-muted);
  border-left: 3px solid var(--lime);
  padding: 6px 0 6px 14px;
  margin-top: 28px;
}

/* ============ 12. VIDEO & MODAL ======================================== */
.video-card { padding: 0; overflow: hidden; }
.video-card__thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--bg-inset);
  border: 0;
  padding: 0;
  width: 100%;
  cursor: pointer;
  display: block;
}
.video-card__thumb img { width: 100%; height: 100%; object-fit: cover; }
.video-card__thumb[aria-disabled="true"] { cursor: not-allowed; }
.video-card__play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(2, 23, 80, .28);
  transition: background-color .2s var(--ease);
}
.video-card__thumb:hover .video-card__play { background: rgba(2, 23, 80, .44); }
.video-card__play span {
  width: 62px; height: 62px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .94);
  color: var(--navy-900);
  display: grid;
  place-items: center;
  box-shadow: var(--shadow-md);
}
.video-card__duration {
  position: absolute;
  right: 10px; bottom: 10px;
  background: rgba(2, 23, 80, .84);
  color: #fff;
  font-size: var(--fs-xs);
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 7px;
}
.video-card__body { padding: 20px 22px 24px; display: flex; flex-direction: column; flex: 1; }
.video-card__body h3 { font-size: 1.02rem; }

.modal {
  position: fixed;
  inset: 0;
  z-index: 180;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal.is-open { display: flex; }
.modal__overlay { position: absolute; inset: 0; background: rgba(2, 23, 80, .72); }
.modal__panel {
  position: relative;
  width: min(920px, 100%);
  background: var(--navy-900);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  animation: pop-in .22s var(--ease);
}
.modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 12px 12px 20px;
  color: #fff;
  font-size: var(--fs-sm);
  font-weight: 600;
}
.modal__frame { aspect-ratio: 16 / 9; background: #000; }
.modal__frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.modal__close {
  width: 40px; height: 40px;
  border-radius: var(--r-pill);
  border: 1px solid rgba(255, 255, 255, .24);
  background: rgba(255, 255, 255, .1);
  color: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
  flex: none;
}
.modal__close:hover { background: rgba(255, 255, 255, .2); }

/* ============ 13. BÀI VIẾT & PROSE ===================================== */
.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 56px;
  align-items: start;
}
.article-side { position: sticky; top: calc(var(--header-h) + 24px); display: grid; gap: 20px; }

.toc {
  border: 1px solid var(--border-soft);
  border-radius: var(--r-lg);
  background: var(--bg-soft);
  padding: 20px 22px;
}
.toc h2 { font-size: .9rem; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); margin-bottom: 12px; }
.toc ol { list-style: none; margin: 0; padding: 0; counter-reset: toc; }
.toc li { margin: 0; }
.toc a {
  display: block;
  padding: 6px 0 6px 12px;
  border-left: 2px solid var(--border);
  font-size: var(--fs-sm);
  color: var(--text-muted);
}
.toc a:hover { color: var(--accent); text-decoration: none; }
.toc a.is-active { color: var(--accent); border-left-color: var(--accent); font-weight: 600; }
.toc li.is-sub a { padding-left: 24px; font-size: var(--fs-xs); }

.prose { max-width: 72ch; }
.prose > *:first-child { margin-top: 0; }
.prose h2 { margin-top: 2em; }
.prose h3 { margin-top: 1.6em; }
.prose img { border-radius: var(--r-lg); border: 1px solid var(--border-soft); margin: 28px 0; }
.prose figure { margin: 28px 0; }
.prose figcaption { font-size: var(--fs-xs); color: var(--text-muted); text-align: center; margin-top: 10px; }
.prose li { color: inherit; }

.note {
  border-radius: var(--r-md);
  border: 1px solid var(--border-soft);
  border-left: 4px solid var(--cyan);
  background: var(--bg-soft);
  padding: 18px 22px;
  margin: 28px 0;
}
.note--example { border-left-color: var(--lime); }
.note--warning { border-left-color: #f0a615; }
.note__title { font-weight: 600; margin-bottom: 6px; display: flex; align-items: center; gap: 8px; }
.note p:last-child { margin-bottom: 0; }

.quote {
  margin: 32px 0;
  padding: 4px 0 4px 24px;
  border-left: 3px solid var(--accent);
  font-size: 1.12rem;
  color: var(--text);
}
.quote footer { font-size: var(--fs-sm); color: var(--text-muted); margin-top: 8px; }

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  font-size: var(--fs-sm);
  color: var(--text-muted);
  margin-bottom: 24px;
}
.author {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border: 1px solid var(--border-soft);
  border-radius: var(--r-lg);
  background: var(--bg-soft);
  margin: 36px 0;
}
.author__avatar {
  width: 46px; height: 46px;
  border-radius: 50%;
  background: var(--brand-gradient);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
  flex: none;
}
.author strong { display: block; }
.author span { font-size: var(--fs-xs); color: var(--text-muted); }

.share-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 20px 0;
  border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
  margin: 36px 0;
  font-size: var(--fs-sm);
}

.table-wrap { overflow-x: auto; margin: 28px 0; -webkit-overflow-scrolling: touch; }
table.data {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  font-size: var(--fs-sm);
}
table.data th, table.data td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border-soft);
  vertical-align: top;
}
table.data thead th {
  background: var(--bg-soft);
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}
table.data tbody tr:last-child td { border-bottom: 0; }
table.data td.center, table.data th.center { text-align: center; }

/* ============ 14. BẢNG SO SÁNH ========================================= */
.compare {
  border: 1px solid var(--border-soft);
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--bg-elevated);
  box-shadow: var(--shadow-sm);
}
.compare table { min-width: 640px; }
.compare .yes { color: #2f7a12; font-weight: 700; }
[data-theme="dark"] .compare .yes { color: #a4de4a; }
.compare .unknown { color: var(--text-muted); }

/* ============ 15. FAQ ================================================== */
.faq { display: grid; gap: 12px; max-width: 820px; }
.faq__item {
  border: 1px solid var(--border-soft);
  border-radius: var(--r-md);
  background: var(--bg-elevated);
  overflow: hidden;
}
.faq__q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  text-align: left;
  padding: 18px 20px;
  min-height: 56px;
  background: none;
  border: 0;
  font: inherit;
  font-size: var(--fs-body);
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
}
.faq__q:hover { color: var(--accent); }
.faq__icon { flex: none; transition: transform .22s var(--ease); color: var(--text-muted); }
.faq__q[aria-expanded="true"] .faq__icon { transform: rotate(45deg); color: var(--accent); }
.faq__a {
  display: none;
  padding: 0 20px 20px;
  color: var(--text-muted);
  font-size: var(--fs-sm);
}
.faq__a.is-open { display: block; }
.faq__a p:last-child { margin-bottom: 0; }

/* ============ 16. FORM ================================================= */
.form-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-xl);
  padding: 36px;
  box-shadow: var(--shadow-sm);
}
.field { margin-bottom: 18px; }
.field label { display: block; font-size: var(--fs-sm); font-weight: 600; margin-bottom: 7px; }
.field input, .field textarea, .field select {
  width: 100%;
  min-height: 48px;
  padding: 12px 16px;
  font: inherit;
  font-size: var(--fs-sm);
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
}
.field textarea { min-height: 132px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(19, 102, 252, .14);
  outline: none;
}
.field-check {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  font-size: var(--fs-sm);
  color: var(--text-muted);
  margin-bottom: 20px;
}
.field-check input { width: 20px; height: 20px; margin-top: 3px; flex: none; accent-color: var(--blue); }
.form-hint { font-size: var(--fs-xs); color: var(--text-muted); margin-top: 14px; }

.contact-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.contact-list li {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 16px 18px;
  border: 1px solid var(--border-soft);
  border-radius: var(--r-md);
  background: var(--bg-elevated);
  margin: 0;
  font-size: var(--fs-sm);
}
.contact-list svg { flex: none; color: var(--accent); margin-top: 3px; }
.contact-list strong { display: block; color: var(--text); }

/* ============ 17. HỘI VIÊN / CỘNG ĐỒNG / ỦNG HỘ ======================== */
.platform-card {
  position: relative;
  padding: 32px;
  border-radius: var(--r-xl);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
}
.platform-card__mark {
  width: 52px; height: 52px;
  border-radius: var(--r-md);
  display: grid;
  place-items: center;
  color: #fff;
  margin-bottom: 20px;
}
.platform-card__mark--yt { background: #d5232a; }
.platform-card__mark--fb { background: #1877f2; }
.platform-card__mark--skool { background: var(--navy-800); }
.platform-card__mark--paypal { background: #0f4a94; }
.platform-card__mark--bank { background: var(--brand-gradient); }

.cta-band {
  position: relative;
  overflow: hidden;
  border-radius: var(--r-xl);
  padding: 56px 44px;
  background: var(--navy-900);
  color: #fff;
  text-align: center;
  isolation: isolate;
}
.cta-band::before {
  content: "";
  position: absolute;
  inset: -40% 40% 40% -20%;
  background: radial-gradient(circle, rgba(4, 205, 253, .34), transparent 62%);
  z-index: -1;
}
.cta-band::after {
  content: "";
  position: absolute;
  inset: 30% -25% -50% 45%;
  background: radial-gradient(circle, rgba(19, 102, 252, .4), transparent 62%);
  z-index: -1;
}
.cta-band h2 { color: #fff; }
.cta-band p { color: #c4d5f5; max-width: 620px; margin-inline: auto; }
.cta-band .btn--outline { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .3); color: #fff; }
.cta-band .btn--outline:hover { background: rgba(255, 255, 255, .2); color: #fff; }

.rules-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.rules-list li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 18px;
  border-radius: var(--r-md);
  background: var(--bg-soft);
  border: 1px solid var(--border-soft);
  margin: 0;
  font-size: var(--fs-sm);
}
.rules-list .dot { margin-top: 8px; }

.steps { list-style: none; counter-reset: step; padding: 0; margin: 0; display: grid; gap: 18px; }
.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 16px;
  margin: 0;
  align-items: start;
}
.steps li::before {
  content: counter(step);
  width: 40px; height: 40px;
  border-radius: var(--r-pill);
  background: var(--bg-inset);
  border: 1px solid var(--border);
  color: var(--accent-ink);
  font-weight: 700;
  display: grid;
  place-items: center;
  font-size: var(--fs-sm);
}
.steps strong { display: block; margin-bottom: 3px; }
.steps span { font-size: var(--fs-sm); color: var(--text-muted); }

.support-note {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  border: 1px solid rgba(164, 222, 74, .5);
  background: rgba(164, 222, 74, .1);
  border-radius: var(--r-md);
  padding: 16px 20px;
  font-size: var(--fs-sm);
  margin-top: 28px;
}
.support-note .dot { margin-top: 8px; }

.qr-box {
  display: grid;
  place-items: center;
  gap: 12px;
  padding: 20px;
  border: 1px dashed var(--border);
  border-radius: var(--r-md);
  background: var(--bg-soft);
  text-align: center;
}
.qr-box img { width: 180px; height: 180px; border-radius: var(--r-sm); }

/* ============ 18. FOOTER =============================================== */
.site-footer {
  background: var(--navy-900);
  color: #c4d5f5;
  padding: 72px 0 32px;
  margin-top: 0;
}
.site-footer a { color: #c4d5f5; }
.site-footer a:hover { color: #fff; }
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(4, minmax(0, 1fr));
  gap: 40px 32px;
}
.footer-brand__logo {
  display: inline-flex;
  background: #fff;
  border-radius: var(--r-md);
  padding: 8px 12px;
  margin-bottom: 18px;
}
.footer-brand__logo img { width: 140px; height: 28px; object-fit: contain; }
.footer-brand p { font-size: var(--fs-sm); max-width: 320px; }
.footer-col h3 {
  color: #fff;
  font-size: var(--fs-sm);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 16px;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin: 0 0 10px; }
.footer-col a { font-size: var(--fs-sm); }
.social-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.social-btn {
  width: 44px; height: 44px;
  border-radius: var(--r-pill);
  border: 1px solid rgba(255, 255, 255, .2);
  display: grid;
  place-items: center;
  color: #fff;
  background: rgba(255, 255, 255, .06);
}
.social-btn:hover { background: rgba(255, 255, 255, .18); }
.social-btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; border-style: dashed; }
.footer-bottom {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, .14);
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  align-items: center;
  justify-content: space-between;
  font-size: var(--fs-xs);
}
.footer-bottom nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }

/* ============ 19. TIỆN ÍCH NỔI ========================================= */
.reading-bar {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0;
  background: var(--brand-gradient);
  z-index: 120;
  transition: width .1s linear;
}

.to-top {
  position: fixed;
  right: 20px; bottom: 20px;
  width: 46px; height: 46px;
  border-radius: var(--r-pill);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
  box-shadow: var(--shadow-md);
  display: grid;
  place-items: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity .22s var(--ease), transform .22s var(--ease), visibility .22s;
  z-index: 90;
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }

.copy-live {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%) translateY(16px);
  background: var(--navy-900);
  color: #fff;
  padding: 11px 22px;
  border-radius: var(--r-pill);
  font-size: var(--fs-sm);
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transition: opacity .2s var(--ease), transform .2s var(--ease), visibility .2s;
  z-index: 190;
}
.copy-live.is-visible { opacity: 1; visibility: visible; transform: translateX(-50%); }

/* ============ 20. ANIMATION & RESPONSIVE =============================== */
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes slide-in { from { transform: translateX(26px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes pop-in { from { transform: scale(.97); opacity: 0; } to { transform: none; opacity: 1; } }

.reveal { opacity: 0; transform: translateY(14px); }
.reveal.is-in { opacity: 1; transform: none; transition: opacity .5s var(--ease), transform .5s var(--ease); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}

@media (max-width: 1180px) {
  .nav { display: none; }
  .header-cta { display: none; }
  .nav-toggle { display: inline-flex; }
  .article-layout { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .article-side { position: static; }
  .toc { order: -1; }
}

@media (max-width: 1024px) {
  :root { --section-y: 76px; }
  .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .split { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .split__media { max-width: 460px; }
}

@media (max-width: 860px) {
  .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero { padding-top: calc(var(--header-h) + 52px); padding-bottom: 68px; }
  .cta-band { padding: 44px 24px; }
  .form-card { padding: 26px; }
}

@media (max-width: 640px) {
  :root { --section-y: 56px; --gutter: 18px; }
  .grid { gap: 18px; }
  .grid--2, .grid--3, .grid--4 { grid-template-columns: minmax(0, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 20px; }
  .brand img { width: 116px; height: 23px; }
  .hero .btn-row { flex-direction: column; align-items: stretch; }
  .hero .btn-row .btn { width: 100%; }
  .hero__links { gap: 10px 18px; }
  .card { padding: 20px; }
  .card-media { margin: -20px -20px 16px; }
  .card--pad-lg, .platform-card { padding: 24px; }
  .lesson-nav { grid-template-columns: minmax(0, 1fr); }
  .lesson-nav a:last-child { text-align: left; }
  .section-head { margin-bottom: 30px; }
  .section-head__row { margin-bottom: 30px; }
  .prose { max-width: 100%; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 400px) {
  .footer-grid { grid-template-columns: minmax(0, 1fr); }
}

@media print {
  .site-header, .site-footer, .to-top, .reading-bar, .mobile-nav, .modal { display: none !important; }
}
