/* HTMS landing ? Ho?n ti?n mua s?m
   Teal brand (MailCenter-aligned) + warm gold accent. No purple gradients. */

:root {
  --ink: #0b1c1a;
  --ink-soft: #243532;
  --muted: #5a6b68;
  --teal: #0f766e;
  --teal-bright: #14b8a6;
  --teal-deep: #115e59;
  --gold: #e8a317;
  --gold-deep: #c2410c;
  --mist: #e8f5f2;
  --fog: #f4faf8;
  --surface: #ffffff;
  --line: rgba(15, 118, 110, 0.14);
  --shadow: 0 18px 50px rgba(11, 28, 26, 0.12);
  --radius: 14px;
  --font-display: "Bricolage Grotesque", system-ui, sans-serif;
  --font-body: "Figtree", system-ui, sans-serif;
  --header-h: 68px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
}

/* Dark mode: dùng đúng bảng màu #0f172a/#1e293b đã dùng ở dashboard/admin
   (xem darkmode.css) để nền đồng nhất khi điều hướng giữa trang chủ và các trang khác. */
html.dark {
  --ink: #e2e8f0;
  --ink-soft: #cbd5e1;
  --muted: #94a3b8;
  --mist: #1e293b;
  --fog: #0f172a;
  --surface: #1e293b;
  --line: rgba(148, 163, 184, 0.16);
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
}

/* --teal/--teal-deep giữ nguyên (vẫn dùng làm nền nút CTA ở cả 2 theme), nhưng khi
   dùng làm MÀU CHỮ trên nền tối thì cần sáng hơn để đủ tương phản, nên đổi riêng
   cho các nhãn/label luôn hiển thị (không đổi các trạng thái :hover phụ để gọn phạm vi). */
html.dark .logo-mark-text,
html.dark .eyebrow,
html.dark .tl-step,
html.dark .news-tag,
html.dark .stats-grid strong,
html.dark .auth-eyebrow,
html.dark .avatar-fallback,
html.dark .mnav-item.is-active,
html.dark .bottom-nav-item.is-active {
  color: var(--teal-bright);
}

html.dark .auth-member-note {
  background: rgba(20, 184, 166, 0.14);
  color: var(--teal-bright);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--fog);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  padding-left: var(--safe-left);
  padding-right: var(--safe-right);
}

body.nav-open {
  overflow: hidden;
  touch-action: none;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

.shell {
  width: min(1120px, calc(100% - 2rem));
  margin-inline: auto;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  background: var(--teal);
  color: #fff;
  padding: 0.6rem 1rem;
  border-radius: 8px;
}

.skip-link:focus {
  top: 1rem;
}

/* Header ??? white icon nav (desktop) + compact HTMS brand on mobile */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  padding: calc(0.55rem + var(--safe-top)) 0 0.45rem;
  background: transparent;
  border-bottom: 0;
}

.site-header.is-scrolled {
  background: transparent;
  box-shadow: none;
}

.header-shell {
  width: min(1180px, calc(100% - 1.5rem));
  margin-inline: auto;
  padding-left: max(0px, var(--safe-left));
  padding-right: max(0px, var(--safe-right));
}

.header-bar {
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  max-width: 100%;
  padding: 0 0.55rem 0 0.5rem;
  border-radius: 16px;
  background: var(--fog); /* same as body ? no floating white mismatch */
  border: 1px solid rgba(15, 118, 110, 0.08);
  box-shadow: none;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
  flex: 0 0 auto;
}

.logo-icon {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  line-height: 0;
}

.logo-icon svg,
.logo-icon img {
  width: 34px;
  height: 34px;
  display: block;
  border-radius: 999px;
}

.logo-icon[hidden],
.logo-img[hidden] {
  display: none !important;
}

.logo-img {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  flex-shrink: 0;
}

.logo-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  line-height: 1.12;
  min-width: 0;
}

/* Full name only on desktop ??? no ellipsis on phone */
.logo-name {
  display: none;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 800;
  color: var(--ink);
  white-space: nowrap;
}

.logo-mark-text {
  display: block;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--teal);
  line-height: 1;
}

.nav-desktop {
  display: none;
  align-items: center;
  gap: 0.15rem;
  margin-left: auto;
  flex-shrink: 1;
  min-width: 0;
}

.nav-link {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.18rem;
  min-width: 4.4rem;
  padding: 0.3rem 0.45rem;
  border-radius: 10px;
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 650;
  line-height: 1.1;
  white-space: nowrap;
}

.nav-ico {
  color: #94a3b8;
  flex-shrink: 0;
}

.nav-link:hover,
.nav-link:focus-visible {
  background: rgba(15, 118, 110, 0.06);
  color: var(--teal-deep);
  outline: none;
}

.nav-link:hover .nav-ico,
.nav-link:focus-visible .nav-ico,
.nav-link[data-open-guide] .nav-ico {
  color: var(--teal);
}

.header-sep {
  display: none;
  width: 1px;
  height: 28px;
  margin: 0 0.35rem 0 0.55rem;
  background: rgba(148, 163, 184, 0.45);
  flex-shrink: 0;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-left: auto;
  flex-shrink: 0;
}

.nav-desktop + .header-sep + .header-actions,
.nav-desktop + .header-actions {
  margin-left: 0;
}

.header-login {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0.25rem 0.45rem;
  font-weight: 750;
  font-size: 0.84rem;
  color: var(--ink);
  white-space: nowrap;
  border-radius: 8px;
}

.header-login:hover,
.header-login:focus-visible {
  color: var(--teal-deep);
  background: rgba(15, 118, 110, 0.07);
  outline: none;
}

.header-cta {
  white-space: nowrap;
  color: #fff !important;
  background: var(--teal);
  box-shadow: 0 6px 16px rgba(15, 118, 110, 0.25);
  border: 0;
  gap: 0.3rem;
  min-height: 36px;
  padding: 0.4rem 0.7rem;
  font-size: 0.8rem;
  border-radius: 11px;
  font-weight: 750;
}

.header-cta:hover {
  background: var(--teal-deep);
  color: #fff !important;
}

.header-cta .cta-long {
  display: none;
}

.header-cta .cta-short {
  display: inline;
}

.header-cta .cta-arrow {
  display: none;
  font-weight: 800;
  line-height: 1;
}

.nav-toggle {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  border: 1px solid rgba(15, 118, 110, 0.16);
  border-radius: 10px;
  background: var(--fog);
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.nav-toggle:focus-visible {
  outline: 2px solid var(--teal-bright);
  outline-offset: 2px;
}

.nav-toggle span {
  display: block;
  width: 16px;
  height: 2px;
  background: var(--ink);
  transition: transform 0.2s, opacity 0.2s;
}

.nav-toggle[aria-expanded="true"] span:first-child {
  transform: translateY(3.5px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:last-child {
  transform: translateY(-3.5px) rotate(-45deg);
}

.nav-drawer {
  display: none;
  flex-direction: column;
  gap: 0.15rem;
  width: min(1180px, calc(100% - 1.5rem));
  margin: 0.45rem auto 0;
  padding: 0.55rem 0.65rem calc(0.75rem + var(--safe-bottom));
  border-radius: 14px;
  background: var(--fog);
  border: 1px solid rgba(15, 118, 110, 0.1);
  box-shadow: 0 10px 24px rgba(11, 28, 26, 0.08);
  color: var(--ink);
}

.nav-drawer:not([hidden]) {
  display: flex;
}

.nav-drawer[hidden] {
  display: none !important;
}

.nav-drawer a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0.65rem 0.75rem;
  font-weight: 600;
  border-radius: 10px;
}

.nav-drawer a:hover,
.nav-drawer a:focus-visible {
  background: var(--mist);
  outline: none;
}

.nav-drawer .btn {
  margin-top: 0.35rem;
  width: 100%;
  justify-content: center;
}

@media (max-width: 420px) {
  .header-shell {
    width: calc(100% - 1rem);
  }

  .header-bar {
    padding-inline: 0.4rem;
    gap: 0.25rem;
  }

  .header-login {
    font-size: 0.78rem;
    padding-inline: 0.3rem;
  }

  .header-cta {
    padding-inline: 0.55rem;
  }
}

/* Desktop white icon header */
@media (min-width: 880px) {
  .site-header {
    padding: calc(0.75rem + var(--safe-top)) 0 0.45rem;
  }

  .header-shell {
    width: min(1180px, calc(100% - 2.5rem));
  }

  .header-bar {
    height: 72px;
    padding: 0 1rem 0 0.9rem;
    border-radius: 20px;
    gap: 0.75rem;
    background: var(--surface);
    border: 1px solid rgba(15, 118, 110, 0.1);
    box-shadow: 0 10px 28px rgba(11, 28, 26, 0.06);
  }

  .logo {
    gap: 0.65rem;
  }

  .logo-icon svg,
  .logo-icon img,
  .logo-img {
    width: 40px;
    height: 40px;
  }

  .logo-name {
    display: block;
  }

  .logo-mark-text {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    font-family: var(--font-body);
  }

  .nav-desktop {
    display: flex;
  }

  .header-sep {
    display: block;
  }

  .header-login {
    min-height: 42px;
    padding: 0.35rem 0.7rem;
    font-size: 0.95rem;
  }

  .header-cta {
    min-height: 44px;
    padding: 0.55rem 1.15rem;
    font-size: 0.92rem;
    border-radius: 12px;
  }

  .header-cta .cta-long {
    display: inline;
  }

  .header-cta .cta-short {
    display: none;
  }

  .header-cta .cta-arrow {
    display: inline;
  }

  .nav-toggle,
  .nav-drawer {
    display: none !important;
  }
}

@media (min-width: 1100px) {
  .nav-link {
    min-width: 4.8rem;
    font-size: 0.82rem;
    padding-inline: 0.55rem;
  }
}
/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 44px;
  padding: 0.65rem 1.15rem;
  border-radius: 12px;
  border: 1px solid transparent;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s, box-shadow 0.18s, border-color 0.18s;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:focus-visible {
  outline: 2px solid var(--teal-bright);
  outline-offset: 2px;
}

.btn:active {
  transform: translateY(0);
}

.btn-solid {
  background: var(--teal);
  color: #fff;
}

.btn-solid:hover {
  background: var(--teal-deep);
}

.btn-accent {
  background: linear-gradient(135deg, var(--gold) 0%, #f59e0b 55%, #ea580c 100%);
  color: #3b1d05;
  box-shadow: 0 10px 28px rgba(232, 163, 23, 0.35);
}

.btn-accent:hover {
  box-shadow: 0 14px 32px rgba(232, 163, 23, 0.45);
}

.btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--ink-soft);
}

.btn-ghost:hover {
  background: var(--mist);
  border-color: rgba(15, 118, 110, 0.28);
}

.text-link {
  background: none;
  border: none;
  color: var(--teal-deep);
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  padding: 0;
}

/* Hero */
.hero {
  position: relative;
  min-height: calc(100svh - var(--header-h) - var(--safe-top));
  display: grid;
  align-items: center;
  overflow: hidden;
  isolation: isolate;
  color: #ecfdf8;
}

.hero-atmosphere {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(1200px 600px at 15% 20%, rgba(20, 184, 166, 0.35), transparent 55%),
    radial-gradient(900px 500px at 85% 30%, rgba(232, 163, 23, 0.22), transparent 50%),
    linear-gradient(160deg, #06241f 0%, #0b3d38 42%, #0f766e 78%, #115e59 100%);
}

.hero-mesh {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at 40% 40%, #000 20%, transparent 75%);
  opacity: 0.55;
}

.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0.55;
  animation: drift 12s ease-in-out infinite;
}

.hero-orb-a {
  width: 280px;
  height: 280px;
  left: -40px;
  bottom: 10%;
  background: rgba(45, 212, 191, 0.45);
}

.hero-orb-b {
  width: 220px;
  height: 220px;
  right: 8%;
  top: 12%;
  background: rgba(245, 158, 11, 0.35);
  animation-delay: -4s;
}

.hero-grid {
  position: absolute;
  inset: auto 0 0;
  height: 40%;
  background: linear-gradient(to top, rgba(6, 36, 31, 0.65), transparent);
}

.hero-scene {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.9;
  pointer-events: none;
}

.float-bag {
  animation: floatY 6.5s ease-in-out infinite;
  transform-origin: center;
}

.float-coin {
  animation: floatY 5s ease-in-out infinite;
}

.coin-2 {
  animation-delay: -1.5s;
}

.coin-3 {
  animation-delay: -3s;
}

@keyframes drift {
  0%,
  100% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(24px, -18px);
  }
}

@keyframes floatY {
  0%,
  100% {
    translate: 0 0;
  }
  50% {
    translate: 0 -14px;
  }
}

.hero-content {
  padding: clamp(1.5rem, 5vw, 4.5rem) 0 clamp(2rem, 6vw, 5rem);
  max-width: 720px;
  width: min(720px, calc(100% - 2rem));
  margin-inline: auto;
  margin-left: max(1rem, calc((100% - 1120px) / 2 + 1rem));
  box-sizing: border-box;
}

@media (max-width: 1120px) {
  .hero-content {
    margin-left: 1rem;
    margin-right: 1rem;
    width: calc(100% - 2rem);
  }
}

.hero-brand {
  margin: 0 0 0.85rem;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.85rem, 4.8vw, 3rem);
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: #5eead4;
  opacity: 0;
  animation: riseIn 0.8s ease forwards 0.1s;
}

.hero-title {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.45rem, 3.4vw, 2.15rem);
  letter-spacing: -0.02em;
  line-height: 1.2;
  max-width: 18ch;
  opacity: 0;
  animation: riseIn 0.8s ease forwards 0.25s;
}

.hero-lead {
  margin: 0 0 1.5rem;
  font-size: 1.05rem;
  color: rgba(236, 253, 248, 0.86);
  max-width: 42ch;
  opacity: 0;
  animation: riseIn 0.8s ease forwards 0.4s;
}

/* iPhone 15 Pro (~393px): fit brand + title + input + CTA in first screen */
@media (max-width: 480px) {
  .hero {
    min-height: calc(100svh - var(--header-h) - var(--safe-top));
    align-items: start;
  }

  .hero-content {
    padding: 1.15rem 0 calc(1.5rem + var(--safe-bottom));
    margin-left: max(0.85rem, var(--safe-left));
    margin-right: max(0.85rem, var(--safe-right));
    width: auto;
    max-width: none;
  }

  .hero-brand {
    margin-bottom: 0.45rem;
    font-size: clamp(1.55rem, 7.2vw, 1.85rem);
  }

  .hero-title {
    margin-bottom: 0.55rem;
    font-size: clamp(1.2rem, 5.4vw, 1.45rem);
    max-width: none;
  }

  .hero-lead {
    margin-bottom: 0.9rem;
    font-size: 0.92rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .hero-cta-row {
    margin-top: 0.75rem;
    gap: 0.55rem 0.85rem;
  }

  .hero-form-hint {
    margin-top: 0.55rem;
    font-size: 0.85rem;
  }
}

@keyframes riseIn {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-form {
  opacity: 0;
  animation: riseIn 0.8s ease forwards 0.55s;
}

.hero-form-row {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 16px;
  padding: 0.55rem;
  backdrop-filter: blur(10px);
  max-width: 100%;
}

@media (min-width: 640px) {
  .hero-form-row {
    flex-direction: row;
    align-items: stretch;
  }
}

.link-field {
  position: relative;
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: stretch;
}

.hero-form-row input,
.link-field input {
  flex: 1;
  min-width: 0;
  width: 100%;
  border: 0;
  border-radius: 12px;
  padding: 0.9rem 5.5rem 0.9rem 1rem;
  min-height: 48px;
  /* Luôn nền trắng bất kể theme vì nằm trên nền hero luôn tối theo thiết kế */
  background: #fff;
  color: #0b1c1a;
  outline: none;
}

.hero-form-row input:focus,
.link-field input:focus {
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.35);
}

.link-field-actions {
  position: absolute;
  top: 50%;
  right: 0.3rem;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  gap: 0.15rem;
}

.link-icon-btn {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--teal-deep);
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  -webkit-tap-highlight-color: transparent;
}

.link-icon-btn:hover {
  background: var(--mist);
  color: var(--teal);
}

.link-icon-btn:active {
  background: rgba(15, 118, 110, 0.14);
}

.link-icon-btn:focus-visible {
  outline: 2px solid var(--teal-bright);
  outline-offset: 1px;
}

.link-clear-btn {
  color: #6b7280;
}

.link-clear-btn:hover {
  color: #b91c1c;
  background: #fef2f2;
}

.link-clear-btn[hidden] {
  display: none !important;
}

.hero-form-row .btn {
  white-space: nowrap;
  min-height: 48px;
  width: 100%;
}

@media (min-width: 640px) {
  .hero-form-row .btn {
    width: auto;
  }
}

@media (max-width: 639px) {
  .link-field input {
    padding-right: 6.25rem;
    font-size: 16px; /* avoid iOS zoom on focus */
  }

  .hero-form-row {
    padding: 0.45rem;
    gap: 0.5rem;
  }

  .hero-form-row .btn {
    min-height: 48px;
    width: 100%;
  }

  .link-field-actions {
    right: 0.2rem;
  }

  .text-link {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0;
  }
}

.hero-form-hint {
  margin: 0.75rem 0 0;
  color: rgba(236, 253, 248, 0.78);
  font-size: 0.92rem;
}

.pill {
  display: inline-block;
  margin-left: 0.25rem;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  font-size: 0.8rem;
  font-weight: 600;
}

.hero-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.25rem;
  margin-top: 1rem;
  opacity: 0;
  animation: riseIn 0.8s ease forwards 0.7s;
}

.hero-cta-row .text-link {
  color: #99f6e4;
}

.hero-form-hint .hint-ok {
  color: #86efac;
  font-weight: 650;
}

/* Cashback result popup */
.cb-modal {
  border: 0;
  padding: 0;
  max-width: min(520px, calc(100vw - 1.5rem));
  width: 100%;
  background: transparent;
  color: #111827;
  margin: auto;
}

/* Keep closed dialog fully out of layout; [hidden] must not stick after showModal */
.cb-modal:not([open]) {
  display: none;
}

/* Author CSS can override UA dialog display ? force visible when open / top-layer */
.cb-modal[open] {
  display: flex !important;
  align-items: center;
  justify-content: center;
  position: fixed;
  inset: 0;
  z-index: 10000;
  max-width: none;
  width: 100%;
  height: 100%;
  max-height: none;
  padding: max(0.75rem, env(safe-area-inset-top, 0px))
    max(0.75rem, env(safe-area-inset-right, 0px))
    max(0.75rem, env(safe-area-inset-bottom, 0px))
    max(0.75rem, env(safe-area-inset-left, 0px));
  margin: 0;
  background: rgba(15, 23, 42, 0.48);
  box-sizing: border-box;
  overflow-x: hidden;
}

.cb-modal::backdrop {
  background: rgba(15, 23, 42, 0.48);
  backdrop-filter: blur(3px);
}

.cb-card {
  position: relative;
  margin: 0;
  padding: 1.35rem 1.25rem 1.2rem;
  width: min(520px, 100%);
  max-width: 100%;
  max-height: min(90vh, 720px);
  overflow: auto;
  overflow-x: hidden;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 22px 60px rgba(15, 23, 42, 0.22);
  box-sizing: border-box;
}

@media (max-width: 480px) {
  .cb-card {
    width: 100%;
    max-height: min(92dvh, 720px);
    padding: 1.2rem 1rem 1rem;
    border-radius: 16px;
  }
}

.cb-close {
  position: absolute;
  top: 0.7rem;
  right: 0.7rem;
  z-index: 2;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  background: #f3f4f6;
  color: #4b5563;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.cb-close:hover {
  background: #e5e7eb;
  color: #111827;
}

.cb-bookmark {
  position: absolute;
  top: 0.75rem;
  right: 3.5rem;
  z-index: 2;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #9ca3af;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.cb-top {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 0.95rem;
  align-items: start;
  padding-right: 2rem;
}

@media (max-width: 420px) {
  .cb-top {
    grid-template-columns: 72px 1fr;
    gap: 0.7rem;
  }
}

.cb-media {
  position: relative;
  width: 88px;
  height: 88px;
  border-radius: 12px;
  overflow: hidden;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  flex-shrink: 0;
}

@media (max-width: 420px) {
  .cb-media {
    width: 72px;
    height: 72px;
  }
}

.cb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cb-img-fallback {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, #e0f2fe, #ffedd5),
    repeating-linear-gradient(
      -45deg,
      transparent,
      transparent 6px,
      rgba(37, 99, 235, 0.05) 6px,
      rgba(37, 99, 235, 0.05) 12px
    );
}

.cb-img-fallback[hidden] {
  display: none;
}

.cb-badge {
  margin: 0 0 0.45rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.32rem 0.65rem;
  border-radius: 8px;
  background: #fff7ed;
  color: #ea580c;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.2;
}

.cb-badge::before {
  content: "";
  width: 0.85rem;
  height: 0.85rem;
  flex: 0 0 auto;
  border-radius: 3px;
  background: #ea580c;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.35);
}

.cb-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.35;
  color: #111827;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.cb-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  margin-top: 1rem;
}

@media (max-width: 420px) {
  .cb-metrics {
    grid-template-columns: 1fr;
  }
}

.cb-metric {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
  padding: 0.7rem 0.75rem;
  border-radius: 10px;
}

.cb-metric-price {
  background: #f3f4f6;
}

.cb-metric-cashback {
  background: #fff7ed;
}

.cb-metric-icon {
  flex: 0 0 auto;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(17, 24, 39, 0.06);
  color: #4b5563;
}

.cb-metric-cashback .cb-metric-icon {
  background: rgba(234, 88, 12, 0.12);
  color: #ea580c;
}

.cb-metric-label {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #6b7280;
  line-height: 1.2;
}

.cb-metric-value {
  display: block;
  margin-top: 0.2rem;
  font-size: 1.12rem;
  font-weight: 800;
  color: #111827;
  line-height: 1.2;
}

.cb-metric-cashback .cb-metric-value {
  color: #2563eb;
}

.cb-note {
  margin-top: 0.9rem;
  display: flex;
  gap: 0.55rem;
  align-items: flex-start;
  padding: 0.8rem 0.85rem;
  border-radius: 10px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e3a5f;
  font-size: 0.84rem;
  line-height: 1.5;
}

.cb-note-icon {
  flex: 0 0 auto;
  width: 1.25rem;
  height: 1.25rem;
  margin-top: 0.1rem;
  border-radius: 999px;
  background: #2563eb;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  display: grid;
  place-items: center;
  font-style: italic;
  font-family: Georgia, serif;
}

.cb-note strong {
  color: #1d4ed8;
  margin-right: 0.25rem;
}

.cb-actions {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin-top: 1rem;
}

.cb-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.95rem 1rem;
  border-radius: 12px;
  background: #2563eb;
  color: #fff !important;
  font-weight: 800;
  font-size: 0.98rem;
  letter-spacing: 0.01em;
  text-align: center;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.28);
  transition: background 0.15s, transform 0.15s;
}

.cb-cta:hover {
  background: #1d4ed8;
}

.cb-cta:active {
  transform: translateY(1px);
}

.cb-copy {
  appearance: none;
  border: 0;
  background: transparent;
  color: #2563eb;
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  padding: 0.35rem;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.cb-copy:hover {
  color: #1d4ed8;
}

.toast {
  position: fixed;
  left: 50%;
  top: max(5.5rem, calc(env(safe-area-inset-top, 0px) + 4.5rem));
  bottom: auto;
  z-index: 10050;
  transform: translateX(-50%);
  width: min(440px, calc(100vw - 2rem));
  max-width: calc(100vw - 2rem);
  padding: 0.95rem 1.15rem;
  border-radius: 12px;
  background: #fef2f2;
  color: #7f1d1d;
  border: 1px solid #fecaca;
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.45;
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.35);
  text-align: center;
  box-sizing: border-box;
}

.toast[hidden] {
  display: none !important;
}

.toast.is-ok {
  background: #ecfdf5;
  color: #065f46;
  border-color: #a7f3d0;
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.28);
}

.hero-form-alert {
  margin: 0.65rem 0 0;
  padding: 0.7rem 0.85rem;
  border-radius: 10px;
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
  font-weight: 650;
  font-size: 0.9rem;
  line-height: 1.4;
}

.hero-form-alert[hidden] {
  display: none !important;
}

.hero-form-alert.is-ok {
  background: #ecfdf5;
  color: #065f46;
  border-color: #a7f3d0;
}

.hero-form-alert.is-tip {
  background: #fffbeb;
  color: #92400e;
  border-color: #fde68a;
}

/* legacy hooks kept for older markup references */
.result-link-row .btn {
  white-space: nowrap;
}

.result-open {
  margin: 0.75rem 0 0;
}

.result-open .text-link {
  color: #99f6e4;
}

.result-body {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 0.85rem;
}

.result-cash {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.05rem;
  color: #fde68a;
  word-break: break-all;
}

.result-badge {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: rgba(194, 65, 12, 0.1);
  color: #c2410c;
  font-size: 0.78rem;
  font-weight: 700;
}

.result-name {
  margin: 0.4rem 0;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
}

.result-error {
  margin: 0.65rem 0 0;
  color: #b91c1c;
  font-size: 0.92rem;
  line-height: 1.45;
  word-break: break-word;
}

/* Sections *//* Sections */
.section {
  padding: clamp(3.5rem, 8vw, 5.5rem) 0;
}

.section h2 {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 3vw, 2.1rem);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.eyebrow {
  margin: 0 0 0.45rem;
  color: var(--teal);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.section-lead {
  margin: 0 0 2rem;
  color: var(--muted);
  max-width: 52ch;
  font-size: 1.05rem;
}

html.js-reveal [data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

html.js-reveal [data-reveal].is-in {
  opacity: 1;
  transform: none;
}

/* Timeline */
.timeline-section {
  background: var(--surface);
}

.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 840px) {
  .timeline {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
  }
}

.timeline li {
  position: relative;
  padding: 1.35rem 1.25rem 1.4rem;
  border-top: 3px solid var(--teal);
  background: linear-gradient(180deg, var(--mist), var(--surface) 40%);
}

.tl-step {
  display: inline-block;
  margin-bottom: 0.55rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--teal-deep);
}

.timeline h3 {
  margin: 0 0 0.25rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
}

.tl-when {
  margin: 0 0 0.75rem;
  font-weight: 700;
  color: var(--gold-deep);
}

.timeline p:last-child {
  margin: 0;
  color: var(--muted);
}

/* Benefits ? no card chrome */
.benefits-section {
  background:
    radial-gradient(700px 320px at 100% 0%, rgba(20, 184, 166, 0.12), transparent 60%),
    var(--fog);
}

.benefit-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
}

.benefit-list li {
  display: grid;
  gap: 0.35rem;
  padding: 1.35rem 0;
  border-bottom: 1px solid var(--line);
}

@media (min-width: 800px) {
  .benefit-list {
    grid-template-columns: 1fr 1fr;
    column-gap: 2.5rem;
  }
  .benefit-list li:nth-child(odd) {
    padding-right: 1rem;
  }
}

.benefit-list h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.2rem;
}

.benefit-list p {
  margin: 0;
  color: var(--muted);
}

/* How */
.how-section {
  background: var(--surface);
}

.how-steps {
  list-style: none;
  margin: 0 0 1.75rem;
  padding: 0;
  display: grid;
  gap: 1.25rem;
}

.how-steps li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  align-items: start;
}

.how-num {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--teal);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 800;
}

.how-steps h3 {
  margin: 0 0 0.3rem;
  font-family: var(--font-display);
  font-size: 1.15rem;
}

.how-steps p {
  margin: 0;
  color: var(--muted);
}

.how-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* Guide */
.guide-section {
  background: linear-gradient(180deg, #102825, #0b1c1a);
  color: #ecfdf8;
}

.guide-section .eyebrow {
  color: #5eead4;
}

.guide-section .section-lead {
  color: rgba(236, 253, 248, 0.72);
}

.guide-panel {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
}

.guide-tabs {
  display: flex;
  gap: 0.25rem;
  padding: 0.5rem;
  background: rgba(0, 0, 0, 0.25);
}

.guide-tabs button {
  flex: 1;
  border: 0;
  background: transparent;
  color: rgba(236, 253, 248, 0.7);
  padding: 0.75rem 0.5rem;
  border-radius: 10px;
  font-weight: 700;
  cursor: pointer;
}

.guide-tabs button[aria-selected="true"] {
  background: rgba(20, 184, 166, 0.25);
  color: #fff;
}

.guide-pane {
  padding: 1.25rem;
}

.guide-tip {
  margin: 0 0 1rem;
  color: rgba(236, 253, 248, 0.8);
}

.fake-product {
  /* Mockup ảnh chụp màn hình luôn nền trắng bất kể theme; tự khoá lại biến màu
     cho các phần tử con (--muted...) để không bị kéo theo bảng màu tối toàn cục. */
  --ink: #0b1c1a;
  --ink-soft: #243532;
  --muted: #5a6b68;
  background: #fff;
  color: var(--ink);
  border-radius: 14px;
  overflow: hidden;
}

.fake-product-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #eee;
}

.fake-mall {
  font-size: 0.75rem;
  font-weight: 800;
  color: #ea580c;
  letter-spacing: 0.04em;
}

.fake-share {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 0;
  background: #fff7ed;
  color: #c2410c;
  font-size: 1.1rem;
  cursor: pointer;
}

.fake-share.pulse {
  animation: pulseShare 1.4s ease-in-out infinite;
}

@keyframes pulseShare {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(234, 88, 12, 0.45);
  }
  50% {
    box-shadow: 0 0 0 10px rgba(234, 88, 12, 0);
  }
}

.fake-product-body {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 0.9rem;
  padding: 1rem;
}

.fake-thumb {
  width: 88px;
  height: 88px;
  border-radius: 12px;
  overflow: hidden;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  flex-shrink: 0;
}

.fake-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.fake-title {
  margin: 0 0 0.35rem;
  font-weight: 700;
  font-size: 0.95rem;
}

.fake-price {
  margin: 0 0 0.25rem;
}

.fake-price s {
  color: var(--muted);
  margin-left: 0.35rem;
}

.fake-shop {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.fake-share-sheet {
  padding: 0.85rem 1rem 1rem;
  border-top: 1px solid #eee;
  background: #fafafa;
}

.fake-share-sheet p {
  margin: 0 0 0.55rem;
  font-weight: 600;
}

.fake-share-sheet button {
  border: 0;
  background: var(--teal);
  color: #fff;
  font-weight: 700;
  padding: 0.65rem 1rem;
  border-radius: 10px;
  cursor: pointer;
}

.copy-ok {
  color: #15803d !important;
  margin-top: 0.55rem !important;
}

.guide-analyze {
  display: grid;
  gap: 0.65rem;
}

.guide-analyze input {
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  padding: 0.85rem 1rem;
}

.guide-result {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.guide-result .result-name {
  margin: 0.35rem 0 0;
}

.guide-result .result-error {
  margin-top: 0.55rem;
}

.guide-result .result-link-row {
  margin-top: 0.75rem;
}

.guide-result .result-link-row input {
  background: rgba(255, 255, 255, 0.95);
}

/* News */
.news-section {
  background: var(--surface);
}

.news-grid {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 800px) {
  .news-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.75rem;
  }
}

.news-grid article {
  padding-top: 1rem;
  border-top: 2px solid var(--teal);
}

.news-tag {
  margin: 0 0 0.35rem;
  color: var(--teal-deep);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.news-grid time {
  color: var(--muted);
  font-size: 0.85rem;
}

.news-grid h3 {
  margin: 0.45rem 0 0.5rem;
  font-family: var(--font-display);
  font-size: 1.1rem;
  line-height: 1.3;
}

.news-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

/* Promo */
.promo-section {
  background: var(--fog);
}

.promo-band {
  display: grid;
  gap: 1.25rem;
  align-items: center;
  padding: clamp(1.5rem, 4vw, 2.25rem);
  border-radius: 20px;
  background:
    linear-gradient(120deg, rgba(15, 118, 110, 0.12), rgba(232, 163, 23, 0.16)),
    var(--surface);
  border: 1px solid var(--line);
}

@media (min-width: 760px) {
  .promo-band {
    grid-template-columns: 1fr auto;
  }
}

.promo-band ul {
  margin: 0.75rem 0;
  padding-left: 1.15rem;
  color: var(--ink-soft);
}

.promo-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

/* Footer */
.site-footer {
  background: #06241f;
  color: rgba(236, 253, 248, 0.82);
  padding: 2.5rem 0 1.5rem;
}

.footer-inner {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 720px) {
  .footer-inner {
    grid-template-columns: 1.4fr 1fr 1fr;
  }
}

.footer-brand strong {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: #fff;
}

.footer-brand p {
  margin: 0.35rem 0 0;
  color: rgba(236, 253, 248, 0.65);
}

.footer-links,
.footer-contact {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.footer-links a:hover,
.footer-contact a:hover {
  color: #5eead4;
}

.footer-copy {
  margin: 1.75rem auto 0;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.82rem;
  color: rgba(236, 253, 248, 0.5);
}

/* Modal */
.modal {
  border: 0;
  padding: 0;
  max-width: min(560px, calc(100vw - 1.5rem));
  width: calc(100% - 1.5rem);
  border-radius: 18px;
  background: transparent;
  margin: auto;
  box-sizing: border-box;
}

@media (max-width: 480px) {
  .modal {
    width: calc(100% - 1rem);
    max-width: none;
  }
}

.modal::backdrop {
  background: rgba(6, 36, 31, 0.62);
  backdrop-filter: blur(4px);
}

.modal-card {
  margin: 0;
  padding: 1.5rem;
  background: var(--surface);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.modal-card h2 {
  margin: 0 0 0.55rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
}

.modal-lead {
  margin: 0 0 1.1rem;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

.notes-list {
  margin: 0 0 1.25rem;
  padding: 0;
  list-style: none;
  counter-reset: note;
  display: grid;
  gap: 0.9rem;
}

.notes-list li {
  counter-increment: note;
  padding-left: 2.4rem;
  position: relative;
}

.notes-list li::before {
  content: counter(note);
  position: absolute;
  left: 0;
  top: 0;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 8px;
  background: var(--mist);
  color: var(--teal-deep);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 0.85rem;
}

.notes-list strong {
  display: block;
  margin-bottom: 0.2rem;
}

.notes-list p {
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
}

.modal-card .btn {
  width: 100%;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
  [data-reveal],
  html.js-reveal [data-reveal] {
    opacity: 1;
    transform: none;
  }
  .hero-brand,
  .hero-title,
  .hero-lead,
  .hero-form,
  .hero-cta-row {
    opacity: 1;
  }
}

/* ??? CMS-driven sections ??? */
.cms-banner {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #0f766e;
  color: #fff;
  text-align: center;
  font-size: 0.85rem;
  padding: 0.4rem 1rem;
}

.hero-media {
  margin-top: 1.5rem;
  border-radius: var(--radius);
  overflow: hidden;
  max-width: 640px;
}
.hero-media iframe,
.hero-media video,
.hero-media img {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  object-fit: cover;
  background: #0b1c1a;
}

.hero.hero-no-anim .hero-orb,
.hero.hero-no-anim .float-bag,
.hero.hero-no-anim .float-coin {
  animation: none !important;
}
.hero.hero-no-gradient .hero-mesh {
  opacity: 0.35;
  filter: none;
}

.stats-section {
  padding-block: 2rem;
}
.stats-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 1rem;
}
.stats-grid li {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 0.75rem;
  text-align: center;
}
.stats-grid strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: var(--teal-deep);
}
.stats-grid span {
  font-size: 0.8rem;
  color: var(--muted);
}

.faq-list {
  display: grid;
  gap: 0.75rem;
}
.faq-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
}
.faq-item summary {
  cursor: pointer;
  font-weight: 600;
}
.faq-answer {
  margin-top: 0.6rem;
  color: var(--muted);
}

.testimonials-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.testimonial-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem;
}
.testimonial-head {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 0.5rem;
}
.testimonial-head img,
.avatar-fallback {
  width: 48px;
  height: 48px;
  border-radius: 999px;
  object-fit: cover;
  background: var(--mist);
  display: grid;
  place-items: center;
  font-weight: 700;
  color: var(--teal);
}
.testimonial-head span {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
}
.stars {
  color: var(--gold);
  letter-spacing: 0.08em;
  margin: 0.25rem 0 0.5rem;
}

.partners-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}
.partner-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  min-width: 120px;
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
  font-weight: 600;
}
.partner-chip img {
  max-height: 36px;
  width: auto;
}

.footer-commitments {
  padding-block: 1rem 0;
}
.commitments-grid {
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}
.commitments-grid li {
  background: rgba(255,255,255,0.04);
  border-radius: 12px;
  padding: 0.85rem;
}
.commitments-grid p {
  margin: 0.35rem 0;
  font-size: 0.9rem;
  opacity: 0.85;
}

.feature-img {
  width: 100%;
  max-height: 140px;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 0.75rem;
}


/* ========== HTMS mobile shell (parity with MediaHub landing) ========== */
.nav-icon-btn {
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 12px;
  background: transparent;
  color: var(--ink-soft);
  display: grid;
  place-items: center;
  cursor: pointer;
  position: relative;
  -webkit-tap-highlight-color: transparent;
}
.nav-icon-btn:hover,
.nav-icon-btn:active {
  background: rgba(15, 118, 110, 0.08);
  color: var(--teal);
}
.nav-notify-dot {
  position: absolute;
  top: 9px;
  right: 9px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ef4444;
  border: 2px solid #fff;
}
.header-mobile-tools {
  display: none;
  align-items: center;
  gap: 2px;
}
.bottom-nav,
.mobile-nav,
.more-sheet {
  display: none;
}

body.nav-open,
body.more-sheet-open {
  overflow: hidden;
}

body:not(.is-admin) #mnavAdminLink,
body:not(.is-admin) #moreSheetAdminLink {
  display: none !important;
}

@media (max-width: 879px) {
  .site-header {
    top: 0;
  }
  .header-shell {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
  }
  .header-bar {
    padding: 10px max(12px, var(--safe-right)) 10px max(12px, var(--safe-left));
    gap: 8px;
  }
  .header-login,
  .header-cta,
  .header-sep,
  .nav-desktop {
    display: none !important;
  }
  .header-mobile-tools {
    display: inline-flex;
    margin-left: auto;
  }
  .nav-toggle {
    margin: 0;
    flex-shrink: 0;
  }

  body {
    padding-bottom: calc(72px + var(--safe-bottom));
  }
  .hero {
    padding-bottom: calc(2rem + 72px + var(--safe-bottom));
  }

  /* Full-screen drawer */
  .mobile-nav {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 1400;
    background: rgba(11, 28, 26, 0.45);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.22s ease, visibility 0.22s ease;
  }
  .mobile-nav.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }
  .mobile-nav-panel {
    position: absolute;
    inset: 0;
    width: 100% !important;
    max-width: none !important;
    height: 100% !important;
    overflow: auto;
    background: var(--surface);
    border-radius: 0 !important;
    padding: max(12px, var(--safe-top)) 16px calc(20px + var(--safe-bottom));
    transform: translateX(100%);
    transition: transform 0.28s ease;
    display: flex;
    flex-direction: column;
  }
  .mobile-nav.open .mobile-nav-panel {
    transform: translateX(0);
  }
  .mnav-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: 0 0 10px;
    flex-shrink: 0;
  }
  .mnav-logo .logo-text small {
    display: block;
    font-size: 0.7rem;
    color: var(--muted);
  }
  .mnav-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin: 4px 0 14px;
  }
  .mnav-list[hidden],
  .mnav-auth[hidden] {
    display: none !important;
  }
  .mnav-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 14px 12px;
    border: 0;
    border-radius: 14px;
    background: transparent;
    color: var(--ink);
    font: inherit;
    font-weight: 600;
    font-size: 1rem;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
  }
  .mnav-item:hover,
  .mnav-item:active {
    background: var(--fog);
  }
  .mnav-item.is-active {
    color: var(--teal);
  }
  .mnav-item-admin {
    color: #dc2626 !important;
  }
  .mnav-item-logout {
    color: #475569;
  }
  .mnav-auth {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: auto;
    padding-top: 12px;
  }
  .btn-outline-mnav,
  .btn-primary-mnav {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    border-radius: 14px;
    font-weight: 700;
    text-decoration: none;
  }
  .btn-outline-mnav {
    background: var(--surface);
    border: 1.5px solid var(--line);
    color: var(--ink);
  }
  .btn-primary-mnav {
    background: linear-gradient(135deg, var(--teal), var(--teal-bright));
    color: #fff;
    border: none;
  }

  /* Bottom nav */
  .bottom-nav {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1200;
    background: var(--surface);
    border-top: 1px solid rgba(15, 23, 42, 0.08);
    padding: 6px 4px calc(6px + var(--safe-bottom));
    box-shadow: 0 -8px 24px rgba(15, 23, 42, 0.06);
  }
  body.is-logged-in .bottom-nav {
    grid-template-columns: repeat(5, 1fr);
  }
  .bottom-nav-guest:not([hidden]),
  .bottom-nav-member:not([hidden]) {
    display: contents;
  }
  .bottom-nav-guest[hidden],
  .bottom-nav-member[hidden] {
    display: none !important;
  }
  .bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    min-height: 52px;
    padding: 4px 2px;
    border: 0;
    border-radius: 12px;
    background: none;
    color: #94a3b8;
    font: inherit;
    font-size: 0.7rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    appearance: none;
    width: 100%;
  }
  .bottom-nav-item.is-active {
    color: var(--teal);
  }
  .bottom-nav-item.is-active::before {
    content: "";
    position: absolute;
    /* visual accent via color only for simplicity */
  }

  /* More sheet */
  .more-sheet {
    position: fixed;
    inset: 0;
    z-index: 1500;
    pointer-events: none;
    visibility: hidden;
  }
  .more-sheet.open {
    display: block;
    pointer-events: auto;
    visibility: visible;
  }
  .more-sheet[hidden] {
    display: none !important;
  }
  .more-sheet-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(11, 28, 26, 0.45);
  }
  .more-sheet-panel {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    max-height: min(88vh, 720px);
    overflow: auto;
    background: var(--surface);
    border-radius: 20px 20px 0 0;
    padding: 16px 8px calc(16px + var(--safe-bottom));
    transform: translateY(110%);
    transition: transform 0.28s ease;
  }
  .more-sheet.open .more-sheet-panel {
    transform: translateY(0);
  }
  .more-sheet-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 4px 12px 14px;
  }
  .more-sheet-user {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
  }
  .more-sheet-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #ccfbf1;
    color: var(--teal-deep);
    font-weight: 700;
    flex-shrink: 0;
  }
  .more-sheet-user-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
  }
  .more-sheet-user-meta strong {
    font-size: 1rem;
    color: var(--ink);
  }
  .more-sheet-user-meta span {
    font-size: 0.8125rem;
    color: var(--muted);
  }
  .more-sheet-list,
  .more-sheet-footer {
    display: flex;
    flex-direction: column;
  }
  .more-sheet-footer {
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px solid #e2e8f0;
  }
  .more-sheet-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 13px 16px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: var(--ink);
    font: inherit;
    font-size: 0.975rem;
    font-weight: 500;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    appearance: none;
  }
  .more-sheet-item:hover,
  .more-sheet-item:active {
    background: var(--fog);
  }
  .more-sheet-badge {
    margin-left: auto;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 999px;
    background: #ef4444;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    display: inline-grid;
    place-items: center;
  }
  .more-sheet-item-admin,
  .more-sheet-item-logout {
    color: #dc2626;
  }
}

/* Legacy drip-down drawer — retired */
.nav-drawer {
  display: none !important;
}


/* Desktop profile menu */
.profile-menu { display: none; position: relative; }
.profile-trigger {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px 6px 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  cursor: pointer;
  font: inherit;
  color: var(--ink);
}
.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--teal), var(--teal-bright));
  color: #fff;
  font-weight: 800;
  font-size: 0.95rem;
}
.profile-trigger-meta {
  display: grid;
  text-align: left;
  line-height: 1.2;
}
.profile-trigger-meta strong { font-size: 0.875rem; }
.profile-trigger-meta span { font-size: 0.75rem; color: var(--muted); }
.profile-chevron { color: var(--muted); }
.profile-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 260px;
  padding: 8px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 18px 40px rgba(11, 28, 26, 0.14);
  display: none;
  flex-direction: column;
  gap: 2px;
  z-index: 80;
}
.profile-menu.open .profile-dropdown,
.profile-dropdown:not([hidden]) {
  display: flex;
}
.profile-dropdown[hidden] { display: none !important; }
.profile-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 11px 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  font-size: 0.9375rem;
  text-decoration: none;
  text-align: left;
  cursor: pointer;
}
.profile-item:hover { background: var(--fog); }
.profile-item svg { color: #64748b; flex-shrink: 0; }
.profile-item-admin { color: #dc2626 !important; }
.profile-item-admin svg { color: #dc2626 !important; }
.profile-item-danger { color: #dc2626 !important; }
.profile-item-danger svg { color: #dc2626 !important; }
.profile-dropdown-sep {
  height: 1px;
  margin: 6px 4px;
  background: var(--line);
}
body:not(.is-admin) #desktopAdminLink { display: none !important; }

/* Logged-in: ẩn Đăng nhập / Đăng ký (CSS .header-login/.btn ghi đè [hidden]) */
.header-login[hidden],
.header-cta[hidden],
body.is-logged-in .header-login,
body.is-logged-in .header-cta,
body.is-logged-in .header-sep {
  display: none !important;
}

@media (min-width: 880px) {
  .profile-menu:not([hidden]) { display: block; }
}
@media (max-width: 879px) {
  .profile-menu { display: none !important; }
}

/* ─── Auth login / register modal ─── */
.auth-modal {
  max-width: min(420px, calc(100vw - 1.5rem));
}

.auth-modal:not([open]) {
  display: none;
}

.auth-modal[open] {
  display: block;
}

.auth-card {
  position: relative;
  padding: 1.55rem 1.45rem 1.35rem;
}

.auth-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 10px;
  background: var(--mist);
  color: var(--ink-soft);
  cursor: pointer;
}

.auth-close:hover,
.auth-close:focus-visible {
  background: rgba(15, 118, 110, 0.16);
  color: var(--teal-deep);
  outline: none;
}

.auth-eyebrow {
  margin: 0 0 0.35rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal);
}

.auth-card h2 {
  padding-right: 2rem;
}

.auth-member-note {
  margin: -0.35rem 0 0.9rem;
  padding: 0.55rem 0.75rem;
  border-radius: 10px;
  background: var(--mist);
  color: var(--teal-deep);
  font-size: 0.86rem;
  font-weight: 600;
}

.auth-form {
  display: grid;
  gap: 0.75rem;
}

.auth-form label[hidden],
.auth-member-note[hidden],
.auth-login-options[hidden],
.auth-terms[hidden],
.register-only[hidden],
.login-only[hidden],
#authPrimaryPanel[hidden],
#authChallengePanel[hidden] {
  display: none !important;
}

.auth-form label {
  display: grid;
  gap: 0.35rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--ink-soft);
}

.auth-form label small {
  font-weight: 500;
  color: var(--muted);
}

.auth-form input[type="text"],
.auth-form input[type="email"],
.auth-form input[type="tel"],
.auth-form input[type="password"] {
  width: 100%;
  min-height: 44px;
  padding: 0.55rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--fog);
  color: var(--ink);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

.auth-form input:focus {
  border-color: var(--teal);
  background: var(--surface);
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.22);
}

.auth-pass-wrap {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 44px;
  padding-right: 0.35rem;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--fog);
}

.auth-pass-wrap:focus-within {
  border-color: var(--teal);
  background: var(--surface);
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.22);
}

.auth-pass-wrap input {
  border: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  min-height: 42px;
}

.auth-pass-toggle {
  flex: 0 0 auto;
  border: 0;
  background: transparent;
  color: var(--teal);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.4rem 0.55rem;
  cursor: pointer;
  border-radius: 8px;
}

.auth-pass-toggle:hover {
  background: var(--mist);
}

.auth-login-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.15rem;
  font-size: 0.84rem;
}

.auth-check {
  display: inline-flex !important;
  align-items: center;
  gap: 0.4rem;
  font-weight: 500 !important;
  color: var(--muted);
  cursor: pointer;
}

.auth-check input {
  width: 15px;
  height: 15px;
  accent-color: var(--teal);
}

.auth-text-btn {
  border: 0;
  background: none;
  padding: 0;
  color: var(--teal);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.auth-text-btn:hover {
  color: var(--teal-deep);
  text-decoration: underline;
}

.auth-terms {
  display: flex !important;
  flex-direction: row;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.8rem !important;
  font-weight: 500 !important;
  color: var(--muted);
  line-height: 1.4;
}

.auth-terms input {
  margin-top: 0.15rem;
  flex: 0 0 auto;
  width: 15px;
  height: 15px;
  accent-color: var(--teal);
}

.auth-terms a {
  color: var(--teal-deep);
  text-decoration: underline;
}

.auth-message {
  margin: 0;
  padding: 0.65rem 0.8rem;
  border-radius: 10px;
  background: #fef2f2;
  color: #b91c1c;
  font-size: 0.88rem;
  font-weight: 600;
}

.auth-submit {
  width: 100%;
  margin-top: 0.25rem;
  min-height: 46px;
}

.auth-challenge-back {
  width: 100%;
  margin-top: 0.35rem;
}

.auth-switch {
  margin: 1rem 0 0;
  text-align: center;
  font-size: 0.9rem;
  color: var(--muted);
}

.auth-switch .auth-text-btn {
  margin-left: 0.25rem;
}

@media (max-width: 480px) {
  .auth-modal {
    width: calc(100% - 1rem);
    max-width: none;
  }

  .auth-card {
    padding: 1.35rem 1.1rem 1.15rem;
  }
}

/* ===== Bổ sung cho tích hợp refund365 ===== */
[x-cloak] {
  display: none !important;
}

.text-teal {
  color: #5eead4;
}

/* Mobile display: long site name, 100svh hero, clipped lead, iOS drawer overflow */
@media (max-width: 879px) {
  .logo {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
  }

  .logo-text {
    overflow: hidden;
  }

  .logo-mark-text {
    font-size: 0.78rem;
    letter-spacing: 0.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .mobile-nav {
    overflow: hidden;
  }

  .hero {
    min-height: 0;
    padding-bottom: calc(1.25rem + 72px + var(--safe-bottom));
  }

  .hero-lead {
    display: block;
    -webkit-line-clamp: unset;
    overflow: visible;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .stats-grid strong {
    font-size: 1.12rem;
    overflow-wrap: anywhere;
  }
}

@media (max-width: 480px) {
  .hero {
    min-height: 0;
    align-items: stretch;
  }
}

