/* FASTPORT — thiết kế hiện đại, tông chủ đạo xanh nước biển (ocean / sky) */
:root {
  /* Nền & bề mặt */
  --page: #eef6fc;
  --page-deep: #e2eef8;
  --surface: #ffffff;
  --surface-glass: rgba(255, 255, 255, 0.78);
  --surface-muted: #f0f7fd;
  --surface-elevated: #f8fbff;

  /* Xanh nước biển — thang chủ đạo */
  --sea-950: #021a2e;
  --sea-900: #052a4a;
  --sea-850: #0a3054;
  --sea-800: #0c4a6e;
  --sea-700: #075985;
  --sea-600: #0369a1;
  --sea-500: #0284c7;
  --sea-400: #0ea5e9;
  --sea-300: #38bdf8;
  --sea-200: #7dd3fc;
  --sea-100: #bae6fd;
  --sea-50: #e0f2fe;

  /* Chữ */
  --text: #0c2744;
  --text-secondary: #1e4970;
  --muted: #4a6f8f;
  --muted-light: #7a9ab8;

  /* Viền & đổ bóng (ánh xanh) */
  --border: #c9dff0;
  --border-strong: #9ec5e8;
  --ring: rgba(14, 165, 233, 0.35);
  --shadow-xs: 0 1px 2px rgba(7, 89, 133, 0.05);
  --shadow-sm: 0 2px 12px rgba(7, 89, 133, 0.07);
  --shadow-md: 0 10px 40px rgba(7, 89, 133, 0.1);
  --shadow-lg: 0 24px 60px rgba(5, 42, 74, 0.14);
  --shadow-ocean: 0 8px 32px rgba(2, 132, 199, 0.22);

  /* Accent hệ thống = xanh biển */
  --accent: var(--sea-500);
  --accent-strong: var(--sea-600);
  --accent-deep: var(--sea-800);
  --accent-soft: var(--sea-50);
  --accent-faint: #eff8ff;
  --on-accent: #ffffff;

  --font: "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 22px;
  --radius-full: 999px;
  --header-h: 76px;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --max: 1180px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  font-weight: 400;
  color: var(--text-secondary);
  background-color: var(--page);
  background-image:
    radial-gradient(ellipse 100% 80% at 50% -30%, rgba(56, 189, 248, 0.14), transparent 55%),
    radial-gradient(ellipse 60% 50% at 100% 0%, rgba(14, 165, 233, 0.08), transparent 45%),
    linear-gradient(180deg, var(--page) 0%, var(--page-deep) 100%);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

#main {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

a {
  color: var(--sea-700);
  text-decoration: none;
  transition: color 0.15s var(--ease);
}

a:hover {
  color: var(--sea-500);
  text-decoration: underline;
}

:focus-visible {
  outline: 2px solid var(--sea-400);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 9999;
  padding: 12px 20px;
  background: var(--sea-600);
  color: #fff;
  font-weight: 600;
  border-radius: var(--radius-sm);
}

.skip-link:focus {
  left: 12px;
  top: 12px;
}

/* —— Thanh trên —— */
.top-strip {
  background: linear-gradient(90deg, var(--sea-950) 0%, var(--sea-900) 50%, var(--sea-850) 100%);
  color: var(--sea-200);
  font-size: 13px;
  font-weight: 500;
  padding: 9px clamp(16px, 4vw, 28px);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 20px;
  border-bottom: 1px solid rgba(56, 189, 248, 0.12);
}

.top-strip strong {
  color: #f0f9ff;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.top-strip a {
  color: var(--sea-100);
  text-decoration: none;
}

.top-strip a:hover {
  color: #fff;
  text-decoration: underline;
}

/* —— Header —— */
.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: var(--surface-glass);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-xs);
}

.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 14px clamp(16px, 4vw, 28px);
  display: flex;
  align-items: center;
  gap: 20px 28px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: var(--text);
}

.brand:hover {
  text-decoration: none;
  color: var(--text);
}

.brand-mark {
  width: 50px;
  height: 50px;
  border-radius: 14px;
  background: linear-gradient(145deg, var(--sea-800) 0%, var(--sea-600) 45%, var(--sea-400) 100%);
  color: #fff;
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 0.06em;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    var(--shadow-ocean),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
  flex-shrink: 0;
}

.brand-text strong {
  display: block;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1.25;
}

.brand-text span {
  display: block;
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
  line-height: 1.45;
  max-width: 300px;
}

.header-search-wrap {
  flex: 1;
  min-width: min(100%, 240px);
  max-width: 440px;
  margin-left: auto;
}

.search-bar {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  overflow: hidden;
  background: var(--surface-muted);
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease), background 0.2s var(--ease);
}

.search-bar:focus-within {
  border-color: var(--sea-400);
  box-shadow: 0 0 0 3px var(--ring);
  background: var(--surface);
}

.search-bar input {
  flex: 1;
  border: 0;
  padding: 12px 18px;
  font: inherit;
  font-size: 14px;
  background: transparent;
  min-width: 0;
  color: var(--text);
}

.search-bar input::placeholder {
  color: var(--muted-light);
}

.search-bar input:focus {
  outline: none;
}

.search-bar button {
  border: 0;
  background: linear-gradient(180deg, var(--sea-500) 0%, var(--sea-700) 100%);
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.05em;
  padding: 0 22px;
  cursor: pointer;
  transition: filter 0.15s var(--ease), transform 0.1s;
}

.search-bar button:hover {
  filter: brightness(1.08);
}

.search-bar button:active {
  transform: scale(0.98);
}

/* —— Nav —— */
.nav-primary {
  background: linear-gradient(180deg, var(--surface) 0%, var(--surface-elevated) 100%);
  border-bottom: 1px solid var(--border);
  box-shadow: inset 0 -1px 0 rgba(14, 165, 233, 0.06);
}

.nav-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 28px);
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0;
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  margin: 10px 0;
  padding: 10px 16px;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  color: var(--sea-800);
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background 0.15s var(--ease), border-color 0.15s var(--ease);
}

.nav-toggle:hover {
  background: var(--accent-faint);
  border-color: var(--border-strong);
}

.nav-toggle-bars {
  width: 20px;
  height: 14px;
  flex-shrink: 0;
  border-top: 2px solid var(--sea-700);
  border-bottom: 2px solid var(--sea-700);
  position: relative;
  box-sizing: border-box;
}

.nav-toggle-bars::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 2px;
  margin-top: -1px;
  background: var(--sea-700);
  border-radius: 1px;
}

.nav-menu-panel {
  flex: 1;
  min-width: 0;
}

.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.nav-list > .nav-item {
  position: relative;
}

.nav-list > .nav-item > a {
  display: block;
  padding: 15px 14px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: var(--radius-sm);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: background 0.18s var(--ease), color 0.18s var(--ease), border-color 0.18s var(--ease);
}

.nav-list > .nav-item > a:hover,
.nav-list > .nav-item:hover > a {
  color: var(--sea-700);
  background: var(--accent-faint);
  text-decoration: none;
  border-bottom-color: var(--sea-400);
}

.nav-item.nav-item-highlight > a {
  color: var(--sea-800);
  background: linear-gradient(180deg, var(--sea-50) 0%, var(--accent-faint) 100%);
  border-bottom-color: var(--sea-400);
}

.nav-item.has-children > a::after {
  content: "";
  display: inline-block;
  width: 0;
  height: 0;
  margin-left: 6px;
  vertical-align: middle;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  opacity: 0.45;
}

.dropdown {
  display: none;
  position: absolute;
  left: 0;
  top: calc(100% + 6px);
  min-width: min(320px, calc(100vw - 32px));
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 8px;
  z-index: 50;
  animation: dropIn 0.22s var(--ease-out);
}

.dropdown.dropdown-mega {
  min-width: min(720px, calc(100vw - 32px));
  padding: 16px 18px;
}

@keyframes dropIn {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.nav-list .nav-item:hover .dropdown {
  display: block;
}

.dropdown-link {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 11px 14px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: background 0.12s var(--ease), color 0.12s var(--ease);
}

.dropdown-link:hover {
  background: linear-gradient(90deg, var(--accent-faint), var(--surface-muted));
  color: var(--sea-700);
  text-decoration: none;
}

.dropdown-link-title {
  font-weight: 600;
  color: var(--text);
}

.dropdown-link-desc {
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
  line-height: 1.45;
}

.mega-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px 24px;
}

.mega-col {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.mega-col-title {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.mega-link {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 10px 12px;
  margin: 0 -4px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--text-secondary);
  transition: background 0.12s var(--ease), color 0.12s var(--ease);
}

.mega-link:hover {
  background: var(--accent-faint);
  color: var(--sea-700);
  text-decoration: none;
}

.mega-link-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.mega-link:hover .mega-link-title {
  color: var(--sea-800);
}

.mega-link-desc {
  font-size: 12px;
  line-height: 1.45;
  color: var(--muted);
}

@media (max-width: 900px) {
  .mega-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .dropdown.dropdown-mega {
    min-width: min(100%, calc(100vw - 32px));
  }
}

@media (max-width: 768px) {
  .nav-toggle {
    display: inline-flex;
  }

  .nav-menu-panel {
    display: none;
    width: 100%;
    flex-basis: 100%;
    padding-bottom: 12px;
    border-top: 1px solid var(--border);
    margin-top: 0;
  }

  .nav-primary.nav-is-open .nav-menu-panel {
    display: block;
  }

  .nav-list {
    flex-direction: column;
    gap: 0;
    padding-top: 8px;
  }

  .nav-list > .nav-item > a {
    padding: 14px 12px;
    border-radius: var(--radius-sm);
    border-bottom: 0;
    margin-bottom: 0;
  }

  .nav-item.has-children > a::after {
    float: right;
    margin-top: 6px;
  }

  .nav-list .nav-item:hover .dropdown {
    display: none;
  }

  .nav-primary.nav-is-open .nav-list .nav-item.has-children .dropdown {
    display: block;
    position: static;
    margin: 4px 0 14px 4px;
    box-shadow: none;
    border: 0;
    padding: 0 0 4px 12px;
    border-left: 3px solid var(--sea-200);
    animation: none;
  }

  .dropdown.dropdown-mega {
    padding: 12px 0 8px 0;
  }
}

/* —— Lưới nội dung —— */
.layout-main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 36px clamp(16px, 4vw, 28px) 64px;
  display: grid;
  grid-template-columns: 1fr min(308px, 32%);
  gap: 40px;
  align-items: start;
  flex: 1;
}

@media (max-width: 920px) {
  .layout-main {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .sidebar {
    position: static !important;
  }
}

.content-col .section-heading {
  margin: 0 0 10px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--text);
}

.breadcrumbs {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.breadcrumbs a {
  color: var(--muted);
}

.breadcrumbs a:hover {
  color: var(--sea-600);
}

.page-title {
  margin: 0 0 12px;
  font-size: clamp(24px, 3.5vw, 34px);
  font-weight: 800;
  letter-spacing: -0.035em;
  color: var(--text);
  line-height: 1.18;
}

.page-desc {
  margin: 0 0 28px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.65;
  max-width: 62ch;
}

.article-list {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

/* —— Thẻ bài —— */
.card {
  position: relative;
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 0;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition:
    box-shadow 0.28s var(--ease),
    border-color 0.28s var(--ease),
    transform 0.22s var(--ease-out);
}

.card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--sea-800) 0%, var(--sea-500) 55%, var(--sea-300) 100%);
  opacity: 0;
  transition: opacity 0.22s var(--ease);
}

.card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
  transform: translateY(-3px);
}

.card:hover::before {
  opacity: 1;
}

.card.hidden {
  display: none;
}

.card-inner {
  padding: 24px 26px 26px;
}

.card-meta {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 12px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
}

.card-meta time {
  font-weight: 600;
  color: var(--muted);
}

.card-meta-sep {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--sea-300);
  opacity: 0.7;
  flex-shrink: 0;
}

.card-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pill {
  display: inline-block;
  padding: 4px 11px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--sea-800);
  background: linear-gradient(180deg, var(--sea-50) 0%, #dbeafe 100%);
  border-radius: var(--radius-full);
  border: 1px solid rgba(14, 165, 233, 0.25);
}

.pill-luong {
  color: #0f3d2e;
  background: linear-gradient(180deg, #ecfdf5 0%, #d1fae5 100%);
  border-color: rgba(16, 185, 129, 0.35);
}

.pill-cq {
  color: #3b1f6b;
  background: linear-gradient(180deg, #f5f3ff 0%, #ede9fe 100%);
  border-color: rgba(124, 58, 237, 0.35);
}

.card-cats-luong {
  gap: 6px;
}

.card-cats-cq {
  gap: 6px;
}

.section-co-che-intro {
  margin-bottom: 28px;
}

.card h2 {
  margin: 0 0 12px;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.38;
  letter-spacing: -0.02em;
}

.card h2 a {
  color: var(--text);
  text-decoration: none;
  transition: color 0.15s var(--ease);
}

.card h2 a:hover {
  color: var(--sea-600);
}

.card-excerpt {
  margin: 0;
  font-size: 15px;
  color: var(--muted);
  line-height: 1.65;
}

.read-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  font-size: 12.5px;
  font-weight: 800;
  color: var(--sea-600);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.read-more::after {
  content: "→";
  font-size: 13px;
  transition: transform 0.22s var(--ease-out);
}

.read-more:hover {
  color: var(--sea-500);
  text-decoration: none;
}

.read-more:hover::after {
  transform: translateX(5px);
}

/* —— Phân trang —— */
.pagination {
  margin-top: 36px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 44px;
  padding: 0 14px;
  border-radius: var(--radius-full);
  font-size: 14px;
  font-weight: 600;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-secondary);
  text-decoration: none;
  transition: border-color 0.15s, background 0.15s, color 0.15s, box-shadow 0.15s;
}

.pagination a:hover {
  border-color: var(--sea-400);
  color: var(--sea-700);
  background: var(--accent-faint);
  box-shadow: 0 0 0 1px rgba(14, 165, 233, 0.12);
  text-decoration: none;
}

.pagination .active {
  background: linear-gradient(180deg, var(--sea-700) 0%, var(--sea-800) 100%);
  border-color: var(--sea-800);
  color: #fff;
  box-shadow: var(--shadow-ocean);
}

/* —— Sidebar —— */
.sidebar {
  position: sticky;
  top: calc(var(--header-h) + 20px);
}

.sidebar-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px 22px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}

.sidebar-block h3 {
  margin: 0 0 16px;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--sea-800);
  padding-bottom: 12px;
  border-bottom: 2px solid var(--sea-400);
}

.sidebar-tree details {
  margin-bottom: 4px;
  border-radius: var(--radius-sm);
}

.sidebar-tree details:hover {
  background: var(--surface-muted);
}

.sidebar-tree summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
  padding: 10px 10px 10px 8px;
  list-style: none;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
}

.sidebar-tree summary::-webkit-details-marker {
  display: none;
}

.sidebar-tree summary::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 10px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--sea-500), var(--sea-700));
  vertical-align: middle;
}

.sidebar-tree details[open] summary {
  color: var(--sea-700);
}

.sidebar-tree ul {
  margin: 0 0 10px 12px;
  padding: 4px 0 4px 14px;
  list-style: none;
  border-left: 1px solid var(--border);
}

.sidebar-tree li a {
  display: block;
  padding: 6px 0 6px 8px;
  font-size: 13px;
  color: var(--muted);
  border-radius: var(--radius-sm);
  transition: color 0.12s, background 0.12s;
}

.sidebar-tree li a:hover {
  color: var(--sea-700);
  background: var(--accent-faint);
  text-decoration: none;
}

.sidebar-note {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.65;
}

.sidebar-cta {
  margin-top: 14px;
  padding: 14px 16px;
  font-size: 12px;
  font-weight: 600;
  color: var(--sea-800);
  line-height: 1.5;
  background: linear-gradient(135deg, var(--sea-50) 0%, #dbeafe 100%);
  border-radius: var(--radius-md);
  border: 1px solid rgba(56, 189, 248, 0.35);
}

/* —— Footer —— */
.site-footer {
  background:
    linear-gradient(180deg, rgba(56, 189, 248, 0.06) 0%, transparent 100%),
    linear-gradient(165deg, var(--sea-950) 0%, var(--sea-900) 40%, var(--sea-800) 100%);
  color: var(--sea-200);
  padding: 52px clamp(16px, 4vw, 28px) 28px;
  font-size: 14px;
  margin-top: auto;
  border-top: 1px solid rgba(56, 189, 248, 0.15);
}

.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.2fr repeat(3, 1fr);
  gap: 36px 28px;
}

@media (max-width: 800px) {
  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 520px) {
  .footer-inner {
    grid-template-columns: 1fr;
  }
}

.footer-brand {
  padding-right: 16px;
}

.footer-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(145deg, var(--sea-600) 0%, var(--sea-400) 100%);
  color: #fff;
  font-weight: 800;
  font-size: 13px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-ocean);
}

.footer-brand p {
  margin: 0;
  font-size: 13px;
  line-height: 1.65;
  color: var(--sea-200);
  max-width: 34ch;
}

.site-footer h4 {
  margin: 0 0 14px;
  color: #f0f9ff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.site-footer ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer li {
  margin-bottom: 10px;
}

.site-footer a {
  color: #bae6fd;
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
}

.site-footer a:hover {
  color: #fff;
}

.footer-bottom {
  max-width: var(--max);
  margin: 40px auto 0;
  padding-top: 22px;
  border-top: 1px solid rgba(125, 211, 252, 0.18);
  font-size: 12px;
  text-align: center;
  color: var(--sea-300);
}

/* —— Bài chi tiết —— */
.prose {
  background: var(--surface);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  padding: clamp(26px, 5vw, 42px);
  box-shadow: var(--shadow-sm);
  max-width: 760px;
}

.prose .article-meta {
  margin-top: 0;
  margin-bottom: 16px;
}

.prose h1 {
  margin-top: 0;
  margin-bottom: 12px;
  font-size: clamp(26px, 4vw, 36px);
  font-weight: 800;
  letter-spacing: -0.035em;
  color: var(--text);
  line-height: 1.18;
}

.prose .lead {
  font-size: 18px;
  color: var(--muted);
  line-height: 1.65;
  margin-top: 0;
}

.prose h2 {
  font-size: 20px;
  margin-top: 32px;
  margin-bottom: 12px;
  color: var(--sea-800);
  font-weight: 700;
}

.prose p,
.prose li {
  font-size: 16px;
  color: var(--text-secondary);
}

.prose a {
  font-weight: 600;
  color: var(--sea-600);
}

.prose a:hover {
  color: var(--sea-500);
}

.cta-strip {
  margin-top: 28px;
  padding: 18px 20px;
  background: linear-gradient(135deg, var(--accent-faint) 0%, var(--sea-50) 100%);
  border: 1px solid rgba(14, 165, 233, 0.28);
  border-radius: var(--radius-md);
  font-size: 14px;
  line-height: 1.65;
  color: var(--text-secondary);
}

.cta-strip strong {
  color: var(--sea-800);
}

/* —— Hero —— */
.hero {
  position: relative;
  color: #fff;
  padding: clamp(44px, 9vw, 88px) clamp(16px, 4vw, 28px) clamp(56px, 11vw, 96px);
  overflow: hidden;
  background:
    linear-gradient(160deg, #021a2e 0%, var(--sea-900) 28%, var(--sea-800) 55%, var(--sea-600) 82%, var(--sea-500) 100%);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(ellipse 80% 50% at 15% 20%, rgba(56, 189, 248, 0.35), transparent 50%),
    radial-gradient(circle at 88% 15%, rgba(125, 211, 252, 0.2), transparent 42%),
    radial-gradient(circle at 70% 85%, rgba(14, 165, 233, 0.18), transparent 45%);
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.35;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='88' viewBox='0 0 88 88'%3E%3Cpath fill='%23ffffff' fill-opacity='0.05' d='M44 0L88 44L44 88L0 44z'/%3E%3C/svg%3E");
  background-size: 88px 88px;
  pointer-events: none;
}

.hero-edge {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 72px;
  background: linear-gradient(to bottom, transparent, var(--page));
  pointer-events: none;
  z-index: 1;
}

.hero-inner {
  position: relative;
  z-index: 2;
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 36px 52px;
  align-items: center;
}

@media (max-width: 900px) {
  .hero-inner {
    grid-template-columns: 1fr;
  }
}

.hero-copy h1 {
  margin: 0 0 18px;
  font-size: clamp(28px, 4.8vw, 42px);
  font-weight: 800;
  letter-spacing: -0.038em;
  line-height: 1.14;
  text-shadow: 0 4px 32px rgba(0, 20, 40, 0.35);
}

.hero-copy p {
  margin: 0 0 30px;
  max-width: 52ch;
  font-size: 17px;
  line-height: 1.65;
  opacity: 0.94;
  font-weight: 400;
  color: #e0f2fe;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-stats {
  display: grid;
  gap: 14px;
  min-width: 210px;
}

.stat-card {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(186, 230, 253, 0.22);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.stat-card strong {
  display: block;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #fff;
}

.stat-card span {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(224, 242, 254, 0.75);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  transition: transform 0.15s var(--ease), box-shadow 0.22s var(--ease), filter 0.15s;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: #fff;
  color: var(--sea-900);
  box-shadow: 0 6px 28px rgba(0, 30, 60, 0.2);
}

.btn-primary:hover {
  filter: brightness(1.03);
  text-decoration: none;
  color: var(--sea-900);
  box-shadow: 0 10px 36px rgba(0, 40, 80, 0.28);
}

.btn-ghost {
  border: 1px solid rgba(186, 230, 253, 0.45);
  color: #f0f9ff;
  background: rgba(255, 255, 255, 0.06);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.12);
  text-decoration: none;
  color: #fff;
  border-color: rgba(224, 242, 254, 0.65);
}

/* Tương thích class cũ */
.btn-gold {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  background: linear-gradient(180deg, #38bdf8 0%, var(--sea-600) 100%);
  color: #fff;
  box-shadow: var(--shadow-ocean);
  transition: transform 0.15s var(--ease), filter 0.15s, box-shadow 0.2s;
}

.btn-gold:hover {
  color: #fff;
  filter: brightness(1.06);
  text-decoration: none;
  box-shadow: 0 12px 40px rgba(2, 132, 199, 0.35);
}

.btn-gold:active {
  transform: scale(0.98);
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  border: 1px solid rgba(224, 242, 254, 0.45);
  color: #f0f9ff;
  background: rgba(255, 255, 255, 0.06);
  transition: transform 0.15s var(--ease), background 0.2s, border-color 0.2s;
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.12);
  text-decoration: none;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.55);
}

.btn-outline:active {
  transform: scale(0.98);
}

/* —— View Transitions (trình duyệt hỗ trợ) —— */
@supports (view-transition-name: none) {
  ::view-transition-old(root),
  ::view-transition-new(root) {
    animation-duration: 0.22s;
    animation-timing-function: var(--ease-out);
  }
}

/* —— Bài chi tiết: mục lục + anchor —— */
.article-layout {
  display: block;
}

.article-layout--toc {
  display: grid;
  grid-template-columns: minmax(0, 1fr) min(280px, 34%);
  gap: 28px 32px;
  align-items: start;
}

@media (max-width: 960px) {
  .article-layout--toc {
    grid-template-columns: 1fr;
  }

  .article-layout--toc .toc-sidebar {
    position: static;
    order: -1;
  }
}

.toc-sidebar {
  position: sticky;
  top: calc(var(--header-h) + 24px);
}

.toc-box {
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  box-shadow: var(--shadow-xs);
}

.toc-title {
  margin: 0 0 12px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sea-800);
}

.toc-nav {
  font-size: 13.5px;
  line-height: 1.45;
}

.toc-nav > nav {
  margin: 0;
}

.toc-nav ul {
  margin: 0;
  padding-left: 1.1rem;
  list-style: none;
}

.toc-nav ul ul {
  margin-top: 6px;
  padding-left: 1rem;
  border-left: 1px solid var(--border);
}

.toc-nav li {
  margin: 6px 0;
}

.toc-nav a {
  color: var(--muted);
  font-weight: 500;
  text-decoration: none;
  display: inline-block;
  padding: 2px 0;
  border-radius: 4px;
}

.toc-nav a:hover {
  color: var(--sea-700);
}

.prose h2,
.prose h3 {
  scroll-margin-top: calc(var(--header-h) + 16px);
}

.prose h2 {
  position: relative;
}

.prose h2 a,
.prose h3 a {
  color: inherit;
  text-decoration: none;
}

.prose h2 a:hover,
.prose h3 a:hover {
  color: var(--sea-600);
}

/* —— Trang Pagefind —— */
.search-page {
  max-width: var(--max);
  margin: 0 auto;
  padding: 28px clamp(16px, 4vw, 28px) 48px;
  flex: 1;
}

.search-page-inner {
  max-width: 720px;
}

.search-page-header .page-title {
  margin-bottom: 10px;
}

.search-tips {
  margin: 16px 0 0;
  padding-left: 1.25rem;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.55;
}

.search-tips li {
  margin-bottom: 8px;
}

.search-tips code {
  font-size: 12px;
  background: var(--surface-muted);
  padding: 2px 6px;
  border-radius: 4px;
}

.pagefind-alias-bundle {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.search-page-ui {
  margin-top: 8px;
}

.pagefind-placeholder {
  margin-top: 20px;
  padding: 20px 22px;
  background: var(--surface-muted);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-md);
  font-size: 14px;
  color: var(--text-secondary);
}

.pagefind-cmd {
  margin: 12px 0;
  padding: 14px 16px;
  background: var(--sea-950);
  color: var(--sea-100);
  border-radius: var(--radius-sm);
  font-size: 13px;
  overflow-x: auto;
}

.search-page-ui .pagefind-ui {
  --pagefind-ui-scale: 1;
}

.search-page-ui .pagefind-ui__search-input {
  border-radius: var(--radius-full) !important;
  border-color: var(--border) !important;
}

.search-page-ui .pagefind-ui__drawer {
  border-radius: var(--radius-md) !important;
}

/* Giảm xung đột với theme xanh */
.search-page-ui .pagefind-ui__result-link {
  color: var(--sea-800) !important;
}
