/* Web tĩnh Chính sách & Điều khoản — mẫu "C · App 3D" (chốt 25/11/2026).
   Màu bám src/theme/tokens.ts: primary #006A68, primaryBright #1DA6A3,
   inkBrand #0A4D4B. Nút/tab đặc dùng #0B7F7A (chữ trắng đạt 4.5:1 — #1DA6A3
   của app chỉ ~3:1, không đủ cho chữ nhỏ). */
:root {
  /* Nền gần như trắng (chủ dự án 25/11/2026: "nền trắng tí") — chỉ còn một
     vệt mint rất nhạt ở đầu trang. */
  --bg-top: #f0faf8;
  --bg-bottom: #ffffff;
  --surface: #ffffff;
  --surface-glass: rgba(255, 255, 255, 0.72);
  --ink: #23302f;
  --ink-soft: #586968;
  --brand: #0a4d4b;
  --accent: #0b7f7a;
  --accent-ink: #ffffff;
  --line: rgba(10, 77, 75, 0.1);
  --shadow: 0 1px 2px rgba(10, 77, 75, 0.06), 0 12px 32px -12px rgba(10, 77, 75, 0.18);
  --tone-0: #d9f4ef;
  --tone-1: #fde9d4;
  --tone-2: #e8e3fb;
  --tone-3: #dbecfb;
  --tone-4: #fbe1e8;
  --tone-5: #def3df;
  --radius: 24px;
  color-scheme: light;
}

/* Chỉ một bản NỀN TRẮNG, kể cả khi máy bật chế độ tối (chủ dự án 25/11/2026
   xem trên máy chế độ tối thấy nền đen: "có trắng đâu"). */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100dvh;
  color: var(--ink);
  /* Một lớp chuyển màu duy nhất cho cả trang — nền mint nhạt dần xuống. */
  background: linear-gradient(180deg, var(--bg-top) 0, var(--bg-bottom) 420px);
  background-color: var(--bg-bottom);
  font: 400 16px/1.65 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

a { color: var(--accent); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 10px; }

.skip {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 10;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
  text-decoration: none;
}
.skip:focus { top: 16px; }

.wrap {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 max(16px, env(safe-area-inset-left)) 0 max(16px, env(safe-area-inset-right));
}

/* Khối 3D trang trí — chỉ để trang có không khí của app, không mang nghĩa. */
.deco { position: absolute; inset: 0 0 auto; height: 760px; overflow: hidden; pointer-events: none; z-index: -1; }
.deco img { position: absolute; filter: saturate(0.95); }
.deco-sphere { width: 220px; left: -70px; top: 210px; opacity: 0.55; }
.deco-torus { width: 300px; right: -90px; top: -60px; opacity: 0.6; transform: rotate(-18deg); }
.deco-sphere-sm { width: 90px; right: 9%; top: 470px; opacity: 0.45; }

/* Thanh điều hướng: một viên kính nổi ở giữa. */
.nav-wrap {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  justify-content: center;
  padding: max(14px, env(safe-area-inset-top)) 16px 8px;
}
.nav-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-glass);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  backdrop-filter: blur(16px) saturate(1.4);
  box-shadow: var(--shadow);
}
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 2px 10px 2px 4px;
  color: var(--brand);
  text-decoration: none;
  font: 800 17px/1 'Plus Jakarta Sans', 'Inter', sans-serif;
  white-space: nowrap;
}
.brand img { width: 34px; height: 34px; }
.sep { width: 1px; height: 24px; background: var(--line); }
.tabs { display: flex; gap: 2px; }
.tabs a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  color: var(--ink-soft);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
  transition: background-color 0.15s, color 0.15s;
}
.tabs a:hover { color: var(--brand); background: var(--tone-0); }
.tabs a[aria-current='page'] { background: var(--accent); color: var(--accent-ink); }

/* Đầu trang: logo thật của app + tiêu đề. */
.hero {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 8px 36px;
  padding: 40px 0 36px;
}
.hero-logo {
  width: 200px;
  height: auto;
  filter: drop-shadow(0 18px 28px rgba(10, 77, 75, 0.22));
  animation: float 6s ease-in-out infinite;
}
.chip {
  display: inline-block;
  margin: 0 0 12px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--accent);
  font-weight: 600;
  font-size: 14px;
}
h1 {
  margin: 0;
  color: var(--brand);
  font: 800 clamp(34px, 6vw, 60px)/1.08 'Plus Jakarta Sans', 'Inter', sans-serif;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.lead {
  max-width: 46ch;
  margin: 14px 0 0;
  color: var(--ink-soft);
  font-size: clamp(17px, 2.1vw, 20px);
  line-height: 1.55;
  text-wrap: balance;
}

/* Lưới thẻ mục: hai cột, mỗi thẻ một ô icon 3D có nền tông riêng. */
.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  padding-bottom: 48px;
}
.card {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 22px;
  align-items: start;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  scroll-margin-top: 96px;
}
.tile {
  display: grid;
  place-items: center;
  width: 96px;
  height: 96px;
  border-radius: 22px;
}
.tile img { width: 70px; height: 70px; object-fit: contain; }
.tone-0 { background: var(--tone-0); }
.tone-1 { background: var(--tone-1); }
.tone-2 { background: var(--tone-2); }
.tone-3 { background: var(--tone-3); }
.tone-4 { background: var(--tone-4); }
.tone-5 { background: var(--tone-5); }

.card-body { min-width: 0; padding-top: 4px; }
h2 {
  margin: 0 0 10px;
  color: var(--brand);
  font: 700 20px/1.3 'Plus Jakarta Sans', 'Inter', sans-serif;
  text-wrap: balance;
}
.card p { margin: 0 0 8px; text-wrap: pretty; }
.card ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.card li { position: relative; padding-left: 18px; text-wrap: pretty; }
.card li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 0.62em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

/* Trang chủ: thẻ là liên kết. */
.card-link { color: inherit; text-decoration: none; transition: transform 0.18s, box-shadow 0.18s, border-color 0.18s; }
.card-link:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--accent) 40%, transparent); }
.card-link p { color: var(--ink-soft); }
.card-cta { display: inline-block; margin-top: 6px; color: var(--accent); font-weight: 600; }
.card-meta { display: block; margin-top: 4px; color: var(--ink-soft); font-size: 13px; }

/* Trang Xoá tài khoản */
.card-wide { grid-column: 1 / -1; }
.steps { margin: 0; padding-left: 22px; display: grid; gap: 6px; list-style: decimal; }
.steps li { padding-left: 2px; }
.steps li::before { content: none; }
.steps li::marker { color: var(--accent); font-weight: 700; }
/* `display: grid` của .field đè mất `hidden` mặc định — ô PIN chỉ hiện khi cần. */
[hidden] { display: none !important; }
.card .note {
  margin-top: 12px;
  padding: 10px 14px;
  border-radius: 14px;
  background: #fff4e5;
  color: #6b4400;
}
.delete-form { display: grid; gap: 14px; max-width: 520px; margin-top: 16px; }
.field { display: grid; gap: 6px; font-weight: 600; font-size: 14px; color: var(--brand); }
.field input {
  min-height: 48px;
  padding: 0 16px;
  border: 1.5px solid #c9dedb;
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
  font: 400 16px/1.2 'Inter', system-ui, sans-serif;
}
.field input:focus-visible { outline: 3px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.confirm { display: flex; align-items: flex-start; gap: 10px; font-size: 15px; cursor: pointer; }
.confirm input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: #c2362b; flex: none; }
.danger {
  justify-self: start;
  min-height: 48px;
  padding: 0 26px;
  border: 0;
  border-radius: 999px;
  background: #c2362b;
  color: #fff;
  font: 600 16px/1 'Inter', system-ui, sans-serif;
  cursor: pointer;
  transition: background-color 0.15s, opacity 0.15s;
}
.danger:hover:not(:disabled) { background: #a52a21; }
.danger:disabled { opacity: 0.45; cursor: not-allowed; }
.form-status { margin: 0; min-height: 1.4em; font-weight: 500; }
.form-status[data-kind='error'] { color: #b3261e; }
.form-status[data-kind='success'] { color: var(--accent); }

.foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 20px;
  padding-top: 8px;
  padding-bottom: max(28px, env(safe-area-inset-bottom));
  color: var(--ink-soft);
  font-size: 14px;
}
.foot nav { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.foot a { color: var(--ink-soft); }
.foot a:hover { color: var(--accent); }

/* Chuyển động: logo lơ lửng + thẻ hiện dần khi tải. */
@keyframes float { 50% { transform: translateY(-8px); } }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
.reveal { animation: rise 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) both; animation-delay: calc(var(--i, 0) * 60ms); }

@media (prefers-reduced-motion: reduce) {
  .hero-logo, .reveal { animation: none; }
  .card-link:hover { transform: none; }
  html { scroll-behavior: auto; }
}

/* Máy tính bảng dọc */
@media (max-width: 860px) {
  .grid { grid-template-columns: minmax(0, 1fr); }
  .hero-logo { width: 150px; }
}

/* Điện thoại */
@media (max-width: 600px) {
  .nav-wrap { padding-left: 12px; padding-right: 12px; }
  .nav-pill { flex-wrap: wrap; justify-content: center; border-radius: 24px; }
  .sep { display: none; }
  .brand { width: 100%; justify-content: center; padding: 6px 0 2px; }
  .tabs { width: 100%; }
  .tabs a { flex: 1; justify-content: center; padding: 0 10px; font-size: 13.5px; }
  .hero { grid-template-columns: minmax(0, 1fr); justify-items: center; text-align: center; padding: 20px 0 24px; }
  .hero-logo { width: 120px; }
  .lead { margin-left: auto; margin-right: auto; }
  .card { grid-template-columns: minmax(0, 1fr); gap: 14px; padding: 20px; }
  .tile { width: 64px; height: 64px; border-radius: 18px; }
  .tile img { width: 46px; height: 46px; }
  /* Màn hẹp: cầu trái rơi đúng chỗ dòng mô tả, đè làm chữ khó đọc — bỏ. */
  .deco-sphere, .deco-sphere-sm { display: none; }
  .deco-torus { width: 170px; right: -80px; top: 120px; opacity: 0.45; }
  .foot { justify-content: center; text-align: center; }
}

@media print {
  .deco, .nav-wrap, .foot, .hero-logo { display: none; }
  body { background: #fff; color: #000; }
  .card { box-shadow: none; break-inside: avoid; }
  .grid { grid-template-columns: 1fr; }
}
