/* ============================================================
   AnZ Mail — landing page styles
   ============================================================ */

/* ---------- Tokens ---------- */
:root {
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Poppins", var(--font);

  --brand: #1a6fe8;
  --brand-600: #155cc4;
  --brand-300: #7fb0f7;
  --brand-ink: #1b2230;

  --accent: var(--brand-300);

  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;

  --container: 1180px;
  --header-h: 72px;

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

[data-theme="dark"] {
  --bg: #070b14;
  --bg-soft: #0b1220;
  --surface: rgba(255, 255, 255, .045);
  --surface-2: rgba(255, 255, 255, .075);
  --border: rgba(255, 255, 255, .1);
  --border-strong: rgba(255, 255, 255, .18);
  --text: #eef2f9;
  --text-dim: #9fb0cc;
  --text-faint: #6f82a1;
  --shadow: 0 24px 60px -20px rgba(0, 0, 0, .8);
  --shadow-sm: 0 8px 24px -12px rgba(0, 0, 0, .7);
  --skeleton: rgba(255, 255, 255, .1);
  --skeleton-2: rgba(255, 255, 255, .16);
  --header-bg: rgba(7, 11, 20, .72);
  --glow: rgba(26, 111, 232, .4);
  --accent: #7fb0f7;
  --grad-1: #7fb0f7;
  --grad-2: #4f9bf5;
  --grad-3: #4fb0f0;
  --hero-glow-1: rgba(26, 111, 232, .3);
  --hero-glow-2: rgba(56, 160, 240, .18);
}

[data-theme="light"] {
  --bg: #ffffff;
  --bg-soft: #f4f7fc;
  --surface: #ffffff;
  --surface-2: #f6f9ff;
  --border: rgba(12, 24, 48, .1);
  --border-strong: rgba(12, 24, 48, .18);
  --text: #0d1729;
  --text-dim: #4c5c76;
  --text-faint: #7787a0;
  --shadow: 0 24px 60px -24px rgba(16, 34, 68, .28);
  --shadow-sm: 0 8px 24px -14px rgba(16, 34, 68, .25);
  --glow: rgba(26, 111, 232, .2);
  --accent: #1a6fe8;
  --grad-1: #1a6fe8;
  --grad-2: #1f86e0;
  --grad-3: #1b8ad4;
  --hero-glow-1: rgba(26, 111, 232, .22);
  --hero-glow-2: rgba(27, 138, 212, .12);
  --skeleton: rgba(12, 24, 48, .08);
  --skeleton-2: rgba(12, 24, 48, .14);
  --header-bg: rgba(255, 255, 255, .78);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, h5 {
  margin: 0;
  font-family: var(--font-display);
  line-height: 1.2;
  letter-spacing: -.02em;
  font-weight: 800;
}
p { margin: 0; }

::selection { background: var(--blue-500); color: #fff; }

:where(a, button, summary):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

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

.container {
  width: min(100% - 40px, var(--container));
  margin-inline: auto;
}
.container.narrow { width: min(100% - 40px, 820px); }

/* ---------- Buttons ---------- */
.btn {
  --btn-bg: var(--blue-500);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 24px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 600;
  font-size: .95rem;
  cursor: pointer;
  white-space: nowrap;
  transition: transform .18s var(--ease), background .18s, border-color .18s, box-shadow .18s;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: linear-gradient(135deg, var(--brand), var(--grad-2));
  color: #fff;
  box-shadow: 0 12px 30px -12px var(--glow);
}
.btn-primary:hover { box-shadow: 0 18px 40px -12px var(--glow); }

.btn-ghost {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border-strong);
}
.btn-ghost:hover { background: var(--surface-2); }

.btn-sm { padding: 9px 18px; font-size: .88rem; }

.icon-btn {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-dim);
  cursor: pointer;
  transition: color .18s, background .18s, border-color .18s;
}
.icon-btn:hover { color: var(--text); background: var(--surface-2); }

/* ---------- Language switch ---------- */
.lang-switch {
  min-width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  padding-inline: 10px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-dim);
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .04em;
  transition: color .18s, background .18s, border-color .18s;
}
.lang-switch:hover { color: var(--text); background: var(--surface-2); border-color: var(--border-strong); }

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

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: var(--header-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s, background .25s;
}
.site-header.scrolled {
  border-bottom-color: var(--border);
  box-shadow: var(--shadow-sm);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -.03em;
}
.brand-mark {
  width: 38px; height: 38px;
  display: block;
  border-radius: 10px;
  box-shadow: 0 8px 20px -8px var(--glow);
}
.brand-mark img { width: 100%; height: 100%; display: block; border-radius: inherit; }
.brand-text { font-size: 1.12rem; line-height: 1; white-space: nowrap; }
.brand-text .b { color: var(--brand); }
.brand-text .m { color: var(--text); }

.nav { display: flex; align-items: center; gap: 32px; }
.nav > ul { display: flex; align-items: center; gap: 28px; }
.nav > ul a {
  font-size: .93rem;
  font-weight: 500;
  color: var(--text-dim);
  position: relative;
  transition: color .18s;
}
.nav > ul a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -6px;
  height: 2px; width: 0;
  background: var(--blue-500);
  border-radius: 2px;
  transition: width .2s var(--ease);
}
.nav > ul a:hover { color: var(--text); }
.nav > ul a:hover::after,
.nav > ul a.active::after { width: 100%; }
.nav > ul a.active { color: var(--text); }

.nav-actions { display: flex; align-items: center; gap: 12px; }

.nav-toggle {
  display: none;
  width: 42px; height: 42px;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 12px;
  cursor: pointer;
  padding: 0;
  place-items: center;
  gap: 5px;
  flex-direction: column;
}
.nav-toggle span {
  display: block;
  width: 18px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform .25s var(--ease), opacity .2s;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .6s var(--ease), transform .6s var(--ease);
  transition-delay: var(--reveal-delay, 0ms);
}
.reveal.in { opacity: 1; transform: none; }

/* ---------- Hero ---------- */
.hero { position: relative; padding: clamp(48px, 7vw, 96px) 0 clamp(40px, 5vw, 72px); overflow: hidden; }
.hero-bg {
  position: absolute;
  inset: -30% -10% auto;
  height: 700px;
  background:
    radial-gradient(620px 340px at 18% 32%, var(--hero-glow-1), transparent 70%),
    radial-gradient(520px 320px at 78% 20%, var(--hero-glow-2), transparent 70%),
    radial-gradient(420px 260px at 55% 65%, var(--grad-3), transparent 70%);
  filter: blur(20px);
  pointer-events: none;
}
[data-theme="light"] .hero-bg { opacity: .75; }

.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: clamp(30px, 5vw, 64px);
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 7px 15px;
  border-radius: 999px;
  margin-bottom: 22px;
}
.eyebrow .dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--grad-3);
  box-shadow: 0 0 0 4px rgba(26, 111, 232, .18);
}

h1 { font-size: clamp(2rem, 4.3vw, 3.25rem); letter-spacing: -.035em; }
.grad {
  background: linear-gradient(100deg, var(--grad-1) 0%, var(--grad-2) 50%, var(--grad-3) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lead {
  margin-top: 22px;
  font-size: clamp(1rem, 1.3vw, 1.13rem);
  color: var(--text-dim);
  max-width: 56ch;
}
.lead strong { color: var(--text); font-weight: 600; }

.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  margin-top: 30px;
  font-size: .86rem;
  color: var(--text-faint);
}
.hero-meta li { display: flex; align-items: center; gap: 8px; }
.hero-meta li::before {
  content: "";
  width: 15px; height: 15px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2338e0c8' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
  background-size: 11px;
  background-repeat: no-repeat;
  background-position: center;
  flex: none;
}

/* ---------- Device mockups ---------- */
.device-stack {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 0;
}

.lines { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.l { display: block; height: 7px; border-radius: 4px; background: var(--skeleton); }
.l.strong { background: var(--skeleton-2); height: 9px; }
.w20 { width: 20%; } .w30 { width: 30%; } .w35 { width: 35%; } .w40 { width: 40%; }
.w45 { width: 45%; } .w50 { width: 50%; } .w55 { width: 55%; } .w60 { width: 60%; }
.w65 { width: 65%; } .w70 { width: 70%; } .w80 { width: 80%; } .w85 { width: 85%; } .w90 { width: 90%; }
.l:only-child { width: 100%; }

/* phone */
.phone {
  position: relative;
  z-index: 2;
  width: 232px;
  aspect-ratio: 232 / 470;
  border-radius: 38px;
  padding: 9px;
  background: linear-gradient(160deg, #2a3550, #10182a);
  box-shadow: var(--shadow), 0 0 0 1px rgba(255, 255, 255, .07) inset;
  flex: none;
  transform: rotate(-3deg);
  transition: transform .5s var(--ease);
}
.phone:hover { transform: rotate(0deg) translateY(-6px); }
.notch {
  position: absolute;
  top: 16px; left: 50%;
  transform: translateX(-50%);
  width: 84px; height: 20px;
  background: #05080f;
  border-radius: 12px;
  z-index: 3;
}
.phone .screen {
  height: 100%;
  border-radius: 30px;
  background: var(--bg-soft);
  padding: 34px 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: hidden;
  position: relative;
}
.app-bar { display: flex; align-items: center; gap: 9px; }
.avatar { width: 26px; height: 26px; border-radius: 50%; background: var(--skeleton-2); flex: none; }
.pill { margin-left: auto; width: 22px; height: 22px; border-radius: 8px; background: var(--skeleton); flex: none; }
.searchbar { height: 24px; border-radius: 8px; background: var(--skeleton); }
.chip-row { display: flex; gap: 6px; }
.chip {
  font-size: .58rem;
  font-weight: 600;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--skeleton);
  color: var(--text-faint);
  white-space: nowrap;
}
.chip.active { background: var(--blue-500); color: #fff; }
.mail-list { display: flex; flex-direction: column; gap: 10px; }
.mail {
  position: relative;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 10px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
}
.mail .lines { flex: 1; }
.mail .time { font-size: .52rem; color: var(--text-faint); align-self: flex-start; flex: none; }
.mail .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); flex: none; }
.mail.unread { border-color: var(--border-strong); }
.fab {
  position: absolute;
  right: 16px; bottom: 16px;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--grad-2));
  box-shadow: 0 10px 22px -8px var(--glow);
}

/* desktop (laptop) */
.desktop { position: relative; z-index: 1; width: 100%; max-width: 330px; margin-left: -50px; margin-right: auto; }
.lid {
  border-radius: 14px 14px 0 0;
  padding: 9px 9px 0;
  background: linear-gradient(160deg, #2a3550, #10182a);
  box-shadow: var(--shadow);
}
.bar-top {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 4px 8px;
}
.traffic { width: 8px; height: 8px; border-radius: 50%; background: #3d4761; }
.url {
  margin-left: 8px;
  flex: 1;
  text-align: center;
  font-size: .5rem;
  color: #7d8aa8;
  background: #0b111d;
  padding: 3px 8px;
  border-radius: 6px;
}
.desk {
  display: grid;
  grid-template-columns: 34px 1fr 1.35fr;
  gap: 8px;
  background: var(--bg-soft);
  border-radius: 0 0 8px 8px;
  padding: 12px;
  height: 210px;
}
.base {
  height: 11px;
  border-radius: 0 0 12px 12px;
  background: linear-gradient(#1a2338, #0d1424);
  box-shadow: var(--shadow-sm);
}
.sidebar { display: flex; flex-direction: column; gap: 9px; }
.side-item { height: 16px; border-radius: 6px; background: var(--skeleton); }
.side-item.active { background: var(--blue-500); }
.thread, .reader { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.thread-row {
  padding: 8px;
  border-radius: 9px;
  background: var(--surface);
  border: 1px solid var(--border);
}
.thread-row.active { border-color: var(--blue-500); background: var(--surface-2); }
.reader-head { display: flex; flex-direction: column; gap: 8px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.para { display: flex; flex-direction: column; gap: 6px; padding-top: 6px; }
.attachments { display: flex; gap: 6px; margin-top: auto; }
.attachments span { height: 34px; flex: 1; border-radius: 8px; background: var(--skeleton); }
.wide-table {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 3px;
  padding: 5px;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
}
.wide-table span { height: 9px; background: var(--skeleton-2); }
.wide-table span:first-child { background: var(--blue-500); }

/* ---------- Stats ---------- */
.stats { padding: clamp(28px, 4vw, 48px) 0; }
.stats-inner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  padding: 30px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  backdrop-filter: blur(10px);
}
.stat { text-align: center; }
.stat b {
  display: block;
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -.03em;
  background: linear-gradient(120deg, var(--grad-1), var(--grad-3));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stat span { font-size: .88rem; color: var(--text-dim); }

/* ---------- Sections ---------- */
.section { padding: clamp(56px, 8vw, 104px) 0; }
.section.alt { background: var(--bg-soft); border-block: 1px solid var(--border); }

.section-head { max-width: 660px; margin: 0 auto clamp(34px, 5vw, 56px); text-align: center; }
.section-head h2 { font-size: clamp(1.7rem, 3.4vw, 2.6rem); }
.section-lead { margin-top: 16px; color: var(--text-dim); font-size: 1.02rem; }

/* ---------- Inline code ---------- */
.steps code, .note code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .88em;
  padding: 1px 6px;
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--text);
}

/* ---------- Bảng tương thích ---------- */
.table-wrap {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  overflow-x: auto;
}
.spec-table { width: 100%; border-collapse: collapse; font-size: .93rem; }
.spec-table th, .spec-table td {
  padding: 16px 22px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--border);
}
.spec-table tr:last-child th, .spec-table tr:last-child td { border-bottom: 0; }
.spec-table th {
  width: 210px;
  font-family: var(--font-display);
  font-size: .95rem;
  font-weight: 700;
  color: var(--text);
}
.spec-table td { color: var(--text-dim); }

/* ---------- Ghi chú ---------- */
.note {
  margin-top: 28px;
  padding: 26px 28px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  background: var(--surface);
}
.note-title { font-size: 1.02rem; }
.note ul { margin-top: 14px; display: flex; flex-direction: column; gap: 11px; }
.note li { position: relative; padding-left: 22px; font-size: .92rem; color: var(--text-dim); }
.note li::before {
  content: "";
  position: absolute;
  left: 2px; top: .62em;
  width: 7px; height: 7px;
  border-radius: 2px;
  transform: rotate(45deg);
  background: var(--accent);
}
.note strong { color: var(--text); font-weight: 600; }

.steps-inline { margin-top: 34px; }
.steps-horizontal {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

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


/* ---------- Feature grid ---------- */
.feature-grid, .security-grid, .admin-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.feature, .sec-card, .admin-card {
  padding: 26px 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  transition: transform .25s var(--ease), border-color .25s;
}
.feature:hover, .sec-card:hover, .admin-card:hover { transform: translateY(-4px); border-color: var(--border-strong); }
.feature-icon {
  width: 46px; height: 46px;
  display: grid;
  place-items: center;
  color: var(--accent);
  border-radius: 13px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  margin-bottom: 18px;
}
.feature-icon svg { width: 22px; height: 22px; }
.feature h3, .sec-card h3, .admin-card h3 { font-size: 1.05rem; }
.feature p, .sec-card p, .admin-card p { margin-top: 10px; font-size: .92rem; color: var(--text-dim); }

/* ---------- Sync section ---------- */
.sync-layout {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}
.sync-copy h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); }

.steps { margin-top: 34px; display: flex; flex-direction: column; gap: 22px; }
.steps li { display: flex; gap: 16px; }
.step-num {
  width: 36px; height: 36px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 12px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--grad-2));
  box-shadow: 0 8px 18px -8px var(--glow);
}
.steps h4 { font-size: 1rem; font-weight: 700; }
.steps p { margin-top: 6px; font-size: .92rem; color: var(--text-dim); }

.sync-stack { display: flex; flex-direction: column; gap: 12px; }
.sync-node, .sync-server {
  display: grid;
  grid-template-columns: 40px 1fr;
  grid-template-rows: auto auto;
  align-items: center;
  gap: 2px 14px;
  padding: 16px 20px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: transform .25s var(--ease);
}
.sync-node:hover { transform: translateX(6px); }
.node-ic {
  grid-row: 1 / 3;
  display: grid;
  place-items: center;
  color: var(--accent);
}
.node-ic svg { width: 24px; height: 24px; }
.sync-node b, .sync-server b { font-size: .98rem; }
.sync-node small, .sync-server small { font-size: .78rem; color: var(--text-faint); }
.sync-server {
  border-color: rgba(26, 111, 232, .4);
  background: linear-gradient(135deg, rgba(26, 111, 232, .12), rgba(26, 111, 232, .06));
}

/* ---------- Download ---------- */
.download-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.dl-card {
  position: relative;
  display: grid;
  gap: 6px;
  padding: 30px 26px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  transition: transform .25s var(--ease), border-color .25s, background .25s, box-shadow .25s;
}
.dl-card:hover {
  transform: translateY(-6px);
  border-color: var(--blue-500);
  background: var(--surface-2);
  box-shadow: var(--shadow);
}
.dl-ic {
  width: 52px; height: 52px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--grad-2));
  margin-bottom: 12px;
}
.dl-card b { font-size: 1.1rem; }
.dl-card small { font-size: .85rem; color: var(--text-faint); }
.dl-arrow {
  position: absolute;
  top: 26px; right: 26px;
  font-size: 1.3rem;
  color: var(--text-faint);
  transition: transform .25s var(--ease), color .25s;
}
.dl-card:hover .dl-arrow { transform: translateY(4px); color: var(--accent); }
.dl-pending {
  border-style: dashed;
  border-color: var(--border-strong);
  cursor: default;
}
.dl-pending:hover { transform: none; border-color: var(--border-strong); background: var(--surface); box-shadow: none; }
.dl-pending .dl-ic { opacity: .55; }

/* ---------- Trang nội dung (pháp lý) ---------- */
.page { padding: clamp(38px, 6vw, 64px) 0 clamp(48px, 7vw, 88px); }
.page-head { max-width: 720px; margin-bottom: clamp(28px, 4vw, 44px); }
.page-head h1 { font-size: clamp(1.9rem, 4vw, 2.7rem); }
.page-head .lede { margin-top: 14px; color: var(--text-dim); }
.page-meta { margin-top: 16px; font-size: .85rem; color: var(--text-faint); }

.prose { max-width: 760px; }
.prose h2 { margin-top: 40px; font-size: 1.32rem; scroll-margin-top: calc(var(--header-h) + 20px); }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 26px; font-size: 1.05rem; }
.prose p, .prose li { margin-top: 12px; color: var(--text-dim); font-size: .96rem; }
.prose ul { margin-top: 12px; display: flex; flex-direction: column; gap: 10px; }
.prose ul > li { position: relative; padding-left: 22px; margin-top: 0; }
.prose ul > li::before {
  content: "";
  position: absolute;
  left: 2px; top: .68em;
  width: 6px; height: 6px;
  border-radius: 2px;
  transform: rotate(45deg);
  background: var(--accent);
}
.prose ol { margin-top: 12px; display: flex; flex-direction: column; gap: 12px; counter-reset: item; }
.prose ol > li { position: relative; padding-left: 34px; counter-increment: item; }
.prose ol > li::before {
  content: counter(item);
  position: absolute;
  left: 0; top: 0;
  width: 24px; height: 24px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  font-size: .8rem;
  font-weight: 700;
  color: var(--accent);
  background: var(--surface-2);
}
.prose strong { color: var(--text); font-weight: 600; }
.prose a { color: var(--accent); font-weight: 600; border-bottom: 1px solid rgba(26, 111, 232, .35); }
.prose a:hover { border-bottom-color: var(--accent); }
.prose code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .88em;
  padding: 1px 6px;
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--text);
}

.legal-nav {
  margin-top: 48px;
  padding-top: 26px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  font-size: .92rem;
}
.legal-nav a { color: var(--text-dim); font-weight: 600; }
.legal-nav a:hover { color: var(--accent); }

.toc {
  margin-bottom: 34px;
  padding: 22px 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}
.toc h2 { margin: 0 0 12px; font-size: .82rem; text-transform: uppercase; letter-spacing: .08em; color: var(--text-faint); }
.toc ul { display: flex; flex-direction: column; gap: 8px; }
.toc a { font-size: .92rem; color: var(--text-dim); }
.toc a:hover { color: var(--accent); }


/* ---------- FAQ ---------- */
.faq-list { display: flex; flex-direction: column; gap: 12px; }
.faq {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
  transition: border-color .2s, background .2s;
}
.faq[open] { border-color: var(--border-strong); background: var(--surface-2); }
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  cursor: pointer;
  font-weight: 600;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq-ic {
  position: relative;
  width: 22px; height: 22px;
  flex: none;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  transition: transform .25s var(--ease), background .2s;
}
.faq-ic::before, .faq-ic::after {
  content: "";
  position: absolute;
  top: 50%; left: 50%;
  width: 9px; height: 1.8px;
  background: var(--text-dim);
  border-radius: 2px;
  transform: translate(-50%, -50%);
  transition: transform .25s var(--ease);
}
.faq-ic::after { transform: translate(-50%, -50%) rotate(90deg); }
.faq[open] .faq-ic { background: var(--blue-500); border-color: var(--blue-500); }
.faq[open] .faq-ic::before, .faq[open] .faq-ic::after { background: #fff; }
.faq[open] .faq-ic::after { transform: translate(-50%, -50%) rotate(0deg); }
.faq p { padding: 0 24px 22px; color: var(--text-dim); font-size: .95rem; }

/* ---------- CTA ---------- */
.cta { padding: clamp(40px, 6vw, 80px) 0; }
.cta-inner {
  text-align: center;
  padding: clamp(38px, 6vw, 66px) 30px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background:
    radial-gradient(600px 260px at 50% 0%, var(--hero-glow-1), transparent 70%),
    var(--surface);
  box-shadow: var(--shadow);
}
.cta-inner h2 { font-size: clamp(1.5rem, 3.2vw, 2.3rem); }
.cta-inner p { margin-top: 14px; color: var(--text-dim); }
.cta-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin-top: 30px; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); background: var(--bg-soft); padding-top: clamp(40px, 5vw, 64px); }
.footer-inner {
  display: grid;
  grid-template-columns: 1.4fr 2fr;
  gap: 40px;
  padding-bottom: 40px;
}
.footer-brand p { margin-top: 14px; font-size: .9rem; color: var(--text-dim); max-width: 34ch; }
.footer-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.footer-cols h5 { font-size: .82rem; text-transform: uppercase; letter-spacing: .08em; color: var(--text-faint); }
.footer-cols ul { margin-top: 14px; display: flex; flex-direction: column; gap: 10px; }
.footer-cols a { font-size: .9rem; color: var(--text-dim); transition: color .18s; }
.footer-cols a:hover { color: var(--accent); }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  padding-block: 20px;
  border-top: 1px solid var(--border);
  font-size: .82rem;
  color: var(--text-faint);
}

/* ---------- Responsive ---------- */
@media (max-width: 1040px) {
  .feature-grid, .security-grid { grid-template-columns: repeat(2, 1fr); }
  .admin-grid { grid-template-columns: repeat(2, 1fr); }
  .desktop { margin-left: -40px; }
}

@media (max-width: 900px) {
  :root { --header-h: 64px; }

  .nav-toggle { display: flex; }
  .nav {
    position: fixed;
    inset: var(--header-h) 0 auto;
    z-index: 2;
    flex-direction: column;
    align-items: stretch;
    gap: 20px;
    padding: 22px 20px 28px;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
    transform: translateY(-130%);
    transition: transform .35s var(--ease);
    visibility: hidden;
    max-height: calc(100dvh - var(--header-h));
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  .nav-scrim {
    position: fixed;
    inset: var(--header-h) 0 0;
    z-index: 99;
    background: rgba(4, 8, 16, .5);
    opacity: 0;
    transition: opacity .3s var(--ease);
  }
  .nav-scrim.show { opacity: 1; }
  .nav-scrim[hidden] { display: none; }
  body.nav-locked { overflow: hidden; }
  .nav.open { transform: translateY(0); visibility: visible; }
  .nav > ul { flex-direction: column; align-items: stretch; gap: 4px; }
  .nav > ul a { display: block; padding: 12px 14px; border-radius: 12px; font-size: 1rem; }
  .nav > ul a::after { display: none; }
  .nav > ul a:hover, .nav > ul a.active { background: var(--surface); }
  .nav-actions { justify-content: space-between; padding-top: 16px; border-top: 1px solid var(--border); }

  .hero-inner { grid-template-columns: 1fr; text-align: center; }
  .lead, .section-lead { margin-inline: auto; }
  .hero-cta, .cta-actions { justify-content: center; }
  .hero-meta { justify-content: center; }
  .eyebrow { margin-inline: auto; }
  .hero-visual { max-width: 480px; margin-inline: auto; width: 100%; }

  .download-grid, .steps-horizontal { grid-template-columns: 1fr; }
  .sync-layout { grid-template-columns: 1fr; }
  .sync-visual { max-width: 460px; width: 100%; }
  .footer-inner { grid-template-columns: 1fr; gap: 32px; }
  .stats-inner { grid-template-columns: repeat(2, 1fr); padding: 24px; gap: 24px; }
}

@media (max-width: 620px) {
  .container { width: min(100% - 32px, var(--container)); }
  .feature-grid, .security-grid, .admin-grid { grid-template-columns: 1fr; }
  .spec-table th { width: 140px; }
  .desktop { margin-left: 0; transform: scale(1.02); }
  .phone { width: 190px; }
  .desk { height: 175px; }
  .footer-cols { grid-template-columns: 1fr 1fr; }
  .footer-bottom { flex-direction: column; }
  .stats-inner { grid-template-columns: 1fr 1fr; }
}

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

@media print {
  .site-header, .cta, .device-stack, .site-footer { display: none; }
  body { background: #fff; color: #000; }
}
