/* Zee Mail — website. Phẳng: không bóng, không gradient; thẻ = nền đổ hoặc viền tóc; màu thương hiệu #1a6fe8.
   Sáng/tối theo hệ điều hành (prefers-color-scheme). Không font ngoài: dùng font hệ thống (nhanh, không gửi IP cho bên thứ ba). */

:root {
  --bg: #ffffff;
  --surface: #f5f7fa;
  --surface-2: #eef2f7;
  --line: #e4e8ee;
  --text: #0f172a;
  --muted: #586174;
  --accent: #1a6fe8;
  --accent-strong: #155bc0;
  --accent-soft: #e8f1ff;
  --on-accent: #ffffff;
  --ok: #157f3b;
  --ok-soft: #e6f4ea;
  --warn: #8a5300;
  --warn-soft: #fff4e0;
  --radius: 16px;
  --radius-sm: 10px;
  --container: 1120px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1115;
    --surface: #171a21;
    --surface-2: #1d212a;
    --line: #272c36;
    --text: #e8ebf1;
    --muted: #a0a8b6;
    --accent: #8ab4f8;
    --accent-strong: #a8c7fa;
    --accent-soft: #16283f;
    --on-accent: #0b1b33;
    --ok: #81c995;
    --ok-soft: #12261a;
    --warn: #f6c26b;
    --warn-soft: #2b2110;
    color-scheme: dark;
  }
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 80px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-strong); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

h1, h2, h3 { margin: 0; line-height: 1.2; letter-spacing: -0.02em; }
p { margin: 0; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.skip-link { position: absolute; left: -9999px; top: 8px; padding: 8px 12px; background: var(--accent); color: var(--on-accent); border-radius: 8px; z-index: 100; }
.skip-link:focus { left: 8px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ── Đầu trang ── */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--bg); border-bottom: 1px solid transparent; }
.site-header.scrolled { border-bottom-color: var(--line); }
.header-inner { display: flex; align-items: center; gap: 24px; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 19px; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand img { width: 32px; height: 32px; border-radius: 8px; }
.brand .z { color: var(--accent); }
.nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav a { padding: 8px 12px; border-radius: 8px; color: var(--muted); font-size: 15px; font-weight: 500; }
.nav a:hover { color: var(--text); background: var(--surface); text-decoration: none; }
.header-actions { display: flex; align-items: center; gap: 8px; }
.lang { padding: 6px 10px; border-radius: 999px; background: var(--surface); color: var(--text); font-size: 13px; font-weight: 600; }
.lang:hover { background: var(--surface-2); text-decoration: none; }
.menu-toggle { display: none; width: 40px; height: 40px; border: 0; border-radius: 10px; background: var(--surface); color: var(--text); cursor: pointer; }
.menu-toggle svg { margin: auto; }

@media (max-width: 860px) {
  .nav { display: none; position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; padding: 8px 16px 16px; background: var(--bg); border-bottom: 1px solid var(--line); }
  .nav.open { display: flex; }
  .nav a { padding: 12px; font-size: 16px; }
  .menu-toggle { display: inline-flex; }
  .header-actions .btn-sm { display: none; }
}

/* ── Nút ── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px; border: 0; border-radius: 12px; font: inherit; font-weight: 600; font-size: 16px; cursor: pointer; text-decoration: none; }
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-strong); }
.btn-secondary { background: var(--surface); color: var(--text); }
.btn-secondary:hover { background: var(--surface-2); }
.btn-sm { min-height: 38px; padding: 0 16px; font-size: 14px; border-radius: 10px; }
.btn small { font-weight: 500; opacity: 0.8; }

/* ── Hero ── */
.hero { padding: 72px 0 48px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 48px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; background: var(--ok-soft); color: var(--ok); font-size: 13px; font-weight: 600; }
.eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.hero h1 { margin-top: 20px; font-size: clamp(2.3rem, 5.4vw, 4rem); font-weight: 800; max-width: 16ch; }
.hero h1 .accent { color: var(--accent); }
.hero .lead { margin-top: 20px; max-width: 60ch; font-size: clamp(1.05rem, 1.6vw, 1.2rem); color: var(--muted); }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero-note { margin-top: 14px; font-size: 14px; color: var(--muted); }
.showcase { position: relative; margin-top: 8px; }
.shot { border-radius: var(--radius); border: 1px solid var(--line); overflow: hidden; background: var(--surface); }
.showcase .phone { position: absolute; right: 3%; bottom: -8%; width: 22%; min-width: 120px; border-radius: 22px; border: 6px solid var(--text); overflow: hidden; background: var(--bg); }
/* Màn hẹp: ảnh máy tính quá nhỏ để đọc ⇒ hiện ảnh app điện thoại thay thế. */
@media (max-width: 640px) {
  .showcase .shot { display: none; }
  .showcase .phone { position: static; width: 72%; max-width: 300px; margin: 0 auto; border-width: 8px; border-radius: 32px; }
}

/* ── Khối chung ── */
.section { padding: 88px 0; }
.section.alt { background: var(--surface); }
.section-head { max-width: 720px; margin-bottom: 48px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.kicker { font-size: 14px; font-weight: 700; color: var(--accent-strong); letter-spacing: 0.02em; }
.section h2 { margin-top: 10px; font-size: clamp(1.8rem, 3.4vw, 2.6rem); font-weight: 800; }
.section-head p,
.section-lead { margin-top: 14px; color: var(--muted); font-size: 1.08rem; }

/* Lưới thẻ tính năng (phẳng: nền đổ, không viền, không bóng). */
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid.three { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.card { padding: 28px; border-radius: var(--radius); background: var(--surface); }
.section.alt .card { background: var(--bg); }
.card h3 { font-size: 1.15rem; font-weight: 700; margin-top: 16px; }
.card p { margin-top: 8px; color: var(--muted); font-size: 15px; }
.card ul { margin: 12px 0 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.card li { position: relative; padding-left: 22px; color: var(--muted); font-size: 15px; }
.card li::before { content: ""; position: absolute; left: 4px; top: 0.62em; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.icon { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-strong); }
.icon svg { width: 22px; height: 22px; }

/* Hàng chia đôi: chữ + ảnh. */
.split { display: grid; gap: 48px; align-items: center; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) {
  .split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .split.reverse > :first-child { order: 2; }
}
.points { margin-top: 28px; display: grid; gap: 22px; }
.point { display: grid; grid-template-columns: 44px 1fr; gap: 16px; }
.point h3 { font-size: 1.05rem; font-weight: 700; }
.point p { margin-top: 4px; color: var(--muted); font-size: 15px; }
.phone-frame { max-width: 300px; margin: 0 auto; border-radius: 32px; border: 8px solid var(--text); overflow: hidden; background: var(--bg); }
.phone-frame img { display: block; width: 100%; height: auto; }

/* ── Tour tính năng (thẻ). Không JS: thanh thẻ ẩn, mọi phần xếp dọc. ── */
.tour-tabs { display: none; }
.tour.js .tour-tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: 28px; }
.tour-tabs button { display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border: 0; border-radius: 999px; background: var(--surface); color: var(--muted); font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; }
.tour-tabs button:hover { color: var(--text); background: var(--surface-2); }
.tour-tabs button[aria-selected="true"] { background: var(--accent-soft); color: var(--accent-strong); }
.tour-panel { display: grid; gap: 32px; align-items: center; grid-template-columns: minmax(0, 1fr); }
.tour-panel + .tour-panel { margin-top: 56px; }
.tour.js .tour-panel + .tour-panel { margin-top: 0; }
.tour-panel[hidden] { display: none; }
@media (min-width: 900px) { .tour-panel { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); } }
.tour-copy h3 { font-size: 1.35rem; font-weight: 700; margin-top: 16px; }
.tour-copy ul { margin: 14px 0 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.tour-copy li { position: relative; padding-left: 22px; color: var(--muted); font-size: 15.5px; }
.tour-copy li::before { content: ""; position: absolute; left: 4px; top: 0.62em; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }

/* ── Dải điện thoại ── */
.section-head .badge { display: inline-block; margin-top: 14px; }
.phones { display: grid; gap: 28px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 900px) { .phones { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.phones figure { margin: 0; }
.phones .phone-frame { max-width: 260px; border-width: 7px; border-radius: 30px; }
.phones figcaption { margin-top: 12px; text-align: center; font-size: 14px; font-weight: 600; color: var(--muted); }
.points-row { margin-top: 48px; }
@media (min-width: 900px) { .points-row { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; } }

/* Ghi chú trung thực (giới hạn tính năng). */
.note { margin-top: 20px; padding: 14px 16px; border-radius: var(--radius-sm); background: var(--warn-soft); color: var(--text); font-size: 14px; }
.note strong { color: var(--warn); }

/* ── Nền tảng / tải về ── */
.platforms { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .platforms { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); } }
.platform { padding: 24px; border-radius: var(--radius); background: var(--surface); display: flex; flex-direction: column; gap: 10px; }
.platform.featured { padding: 32px; }
@media (min-width: 900px) { .platform.featured { grid-row: span 3; } }
.platform:not(.featured) { display: grid; grid-template-columns: 44px 1fr; column-gap: 16px; row-gap: 6px; align-items: start; }
.platform:not(.featured) .icon { grid-row: span 3; }
.platform .badge { justify-self: start; }
.platform h3 { font-size: 1.15rem; font-weight: 700; }
.platform p { color: var(--muted); font-size: 15px; }
.badge { align-self: flex-start; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--surface-2); color: var(--muted); }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.meta-list { display: grid; gap: 6px; margin: 4px 0 0; padding: 0; list-style: none; color: var(--muted); font-size: 14px; }
.hash { display: flex; align-items: center; gap: 8px; margin-top: 6px; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--bg); font-family: var(--mono); font-size: 12.5px; color: var(--muted); }
.hash code { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.copy { flex: none; border: 0; border-radius: 8px; padding: 6px 10px; background: var(--accent-soft); color: var(--accent-strong); font: inherit; font-family: var(--font); font-weight: 600; font-size: 13px; cursor: pointer; }
pre.cmd { margin: 6px 0 0; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--surface); font-family: var(--mono); font-size: 13px; overflow-x: auto; }

/* ── Bảng tương thích ── */
.facts { display: grid; gap: 1px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); border-radius: var(--radius); overflow: hidden; background: var(--line); }
.fact { padding: 24px; background: var(--bg); }
.fact dt { font-size: 14px; font-weight: 600; color: var(--muted); }
.fact dd { margin: 6px 0 0; font-size: 16px; font-weight: 600; }
.fact dd span { display: block; font-weight: 400; font-size: 14px; color: var(--muted); margin-top: 4px; }

/* ── Hỏi đáp (details gốc, không cần JS) ── */
.faq { max-width: 820px; margin: 0 auto; display: grid; gap: 10px; }
.faq details { border-radius: var(--radius-sm); background: var(--surface); }
.section.alt .faq details { background: var(--bg); }
.faq summary { list-style: none; cursor: pointer; padding: 18px 52px 18px 20px; position: relative; font-weight: 600; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 20px; top: 50%; transform: translateY(-50%); font-size: 22px; font-weight: 400; color: var(--muted); }
.faq details[open] summary::after { content: "–"; }
.faq .answer { padding: 0 20px 20px; color: var(--muted); }
.faq .answer p + p { margin-top: 10px; }

/* ── Kêu gọi cuối ── */
.cta { padding: 56px 0 96px; }
.cta-box { padding: 48px 32px; border-radius: 24px; background: var(--accent); color: var(--on-accent); text-align: center; }
.cta-box h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 800; }
.cta-box p { margin-top: 12px; opacity: 0.9; }
.cta-box .hero-cta { justify-content: center; }
.cta-box .btn-primary { background: var(--on-accent); color: var(--accent); }
.cta-box .btn-secondary { background: transparent; color: var(--on-accent); box-shadow: inset 0 0 0 1.5px currentColor; }

/* ── Chân trang ── */
.site-footer { padding: 48px 0 40px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.footer-grid { display: grid; gap: 32px; grid-template-columns: minmax(0, 2fr) repeat(auto-fit, minmax(140px, 1fr)); }
@media (max-width: 720px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-grid > :first-child { grid-column: 1 / -1; } }
.site-footer h2 { font-size: 13px; font-weight: 700; color: var(--text); letter-spacing: 0.02em; }
.site-footer ul { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--text); }
.footer-bottom { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line); display: grid; gap: 8px; font-size: 13px; }

/* ── Trang văn bản (quyền riêng tư, điều khoản) ── */
.doc { max-width: 760px; margin: 0 auto; padding: 56px 24px 88px; }
.doc h1 { font-size: clamp(2rem, 4vw, 2.8rem); font-weight: 800; }
.doc .updated { margin-top: 10px; color: var(--muted); font-size: 14px; }
.doc .summary { margin-top: 28px; padding: 20px 22px; border-radius: var(--radius); background: var(--accent-soft); }
.doc h2 { margin-top: 44px; font-size: 1.4rem; font-weight: 700; }
.doc h3 { margin-top: 24px; font-size: 1.08rem; font-weight: 700; }
.doc p, .doc li { color: var(--text); }
.doc p { margin-top: 12px; }
.doc ul { margin: 12px 0 0; padding-left: 22px; display: grid; gap: 6px; }
.doc table { width: 100%; margin-top: 16px; border-collapse: collapse; font-size: 15px; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 12px; border-bottom: 1px solid var(--line); }
.doc th { font-size: 13px; color: var(--muted); font-weight: 600; }
.toc { margin-top: 28px; padding: 18px 22px; border-radius: var(--radius); background: var(--surface); }
.toc ol { margin: 8px 0 0; padding-left: 20px; display: grid; gap: 4px; }

@media (max-width: 640px) {
  .doc table { display: block; overflow-x: auto; }
  .hero { padding-top: 40px; }
  .section { padding: 64px 0; }
}
