/* Trang chính sách, điều khoản, trợ giúp — tự chứa, không phụ thuộc build của Vite.
   Nằm trong public/ nên Firebase phục vụ thẳng, không qua bundler. */
:root {
  --bg: #f4f7f5;
  --surface: #ffffff;
  --text: #12211a;
  --muted: #5a6b62;
  --line: #e4eae6;
  --accent: #3aad5c;
  --radius: 16px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101512;
    --surface: #182019;
    --text: #eef3f0;
    --muted: #9fb0a6;
    --line: #26312b;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-text-size-adjust: 100%;
}

.wrap { max-width: 720px; margin: 0 auto; padding: 32px 20px 80px; }

header.top { display: flex; align-items: baseline; gap: 12px; margin-bottom: 8px; }
header.top a { color: var(--muted); text-decoration: none; font-size: 14px; }
header.top a:hover { color: var(--accent); }

h1 { font-size: 30px; line-height: 1.25; margin: 16px 0 4px; letter-spacing: -0.02em; }
h2 { font-size: 21px; margin: 40px 0 10px; letter-spacing: -0.01em; }
h3 { font-size: 17px; margin: 26px 0 6px; }
p, li { color: var(--text); }
p { margin: 10px 0; }
ul, ol { margin: 10px 0; padding-left: 22px; }
li { margin: 6px 0; }

.updated { color: var(--muted); font-size: 14px; margin: 0 0 8px; }
.lede { color: var(--muted); font-size: 17px; }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin: 18px 0;
}

table { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: 15px; }
th, td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 600; }
tbody tr:last-child td { border-bottom: 0; }

.langbar { display: flex; gap: 8px; margin: 20px 0 0; }
.langbar a {
  font-size: 14px; text-decoration: none; color: var(--muted);
  border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px;
  background: var(--surface);
}
.langbar a:hover { color: var(--accent); border-color: var(--accent); }

a { color: var(--accent); }

footer.foot {
  margin-top: 56px; padding-top: 20px; border-top: 1px solid var(--line);
  color: var(--muted); font-size: 14px;
}

hr.sep { border: 0; border-top: 1px solid var(--line); margin: 56px 0 0; }

code { font-size: 0.92em; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; }

/* Accordion cho trang Trợ giúp — dùng <details> của trình duyệt, không cần JS. */
details {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin: 10px 0;
  overflow: hidden;
}

details + details { margin-top: 8px; }

summary {
  cursor: pointer;
  list-style: none;
  padding: 15px 46px 15px 18px;
  font-weight: 600;
  position: relative;
  user-select: none;
}

summary::-webkit-details-marker { display: none; }

/* Mũi tên xoay khi mở */
summary::after {
  content: "";
  position: absolute;
  right: 20px;
  top: 50%;
  width: 8px;
  height: 8px;
  margin-top: -6px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  transition: transform 0.18s ease;
}

details[open] > summary::after { transform: rotate(-135deg); margin-top: -2px; }
details[open] > summary { border-bottom: 1px solid var(--line); }

summary:hover { color: var(--accent); }
summary:hover::after { border-color: var(--accent); }
summary:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }

details > *:not(summary) { padding-left: 18px; padding-right: 18px; }
details > p:first-of-type { margin-top: 14px; }
details > *:last-child { margin-bottom: 14px; }
details ol, details ul { padding-left: 38px; }
