/* PixelCraft — help page styles (help.html only).
   Builds on assets/pc.css: same CSS variables, buttons (.btn), FAQ (.faq),
   warning boxes (.warn) and footer (.foot). This file only adds the help
   layout: top bar, language visibility, sections, tables and numbered steps. */

/* ---------- Language visibility ----------
   The boot script in help.html sets <html lang> from localStorage 'pc-lang'
   before paint; these two rules show exactly one language, like the legal
   pages do with their data-l blocks. */
html[lang="en"] [data-l="vi"] { display: none !important; }
html[lang="vi"] [data-l="en"] { display: none !important; }

/* ---------- Top bar ---------- */
.hnav {
  position: sticky; top: 0; z-index: 50; height: 64px;
  display: flex; align-items: center; gap: 12px;
  padding: 0 max(16px, calc((100vw - 1240px) / 2));
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.hnav-r { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.hnav .theme-cur { font-size: 16px; line-height: 1; }

/* ---------- Layout ---------- */
.help-wrap { max-width: 860px; margin: 0 auto; padding: 56px 16px 8px; }
.help-hero h1 { font-size: clamp(32px, 5vw, 48px); line-height: 1.08; letter-spacing: -.03em; text-wrap: balance; }
.help-lead { margin-top: 14px; font-size: clamp(16px, 1.6vw, 18px); color: var(--text-2); max-width: 62ch; }

.help-toc {
  margin-top: 26px; display: flex; flex-wrap: wrap; gap: 8px;
}
.help-toc a {
  height: 34px; padding: 0 13px; display: inline-flex; align-items: center;
  border: 1px solid var(--line); border-radius: 999px;
  font-size: 13.5px; font-weight: 600; color: var(--text-2);
  transition: border-color .15s, color .15s, background .15s;
}
.help-toc a:hover { color: var(--text); border-color: var(--line-2); background: var(--surface-2); }

/* ---------- Sections ---------- */
.help-sec {
  margin-top: 22px; padding: 28px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl);
  scroll-margin-top: 80px;
}
.help-sec h2 { font-size: clamp(22px, 2.6vw, 28px); letter-spacing: -.025em; line-height: 1.2; margin-bottom: 12px; text-wrap: balance; }
.help-sec h3 { font-size: 18px; letter-spacing: -.015em; margin: 26px 0 8px; scroll-margin-top: 80px; }
.help-sec h3:first-of-type { margin-top: 20px; }
.help-sec p { color: var(--text-2); max-width: 68ch; }
.help-sec p + p { margin-top: 10px; }
.help-sec b, .help-sec strong { color: var(--text); }
.help-sec a { color: var(--accent-text); font-weight: 600; }
.help-sec a:hover { text-decoration: underline; }
.help-sec .btn { color: var(--accent-ink); text-decoration: none; }
.help-sec code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .92em; font-weight: 600; color: var(--text);
  background: var(--surface-2); padding: 1px 6px; border-radius: 5px;
  word-break: break-all;
}
.help-note { margin-top: 14px; font-size: 14px; color: var(--muted) !important; }
.help-warn { margin-top: 16px; }
.help-warn p { color: var(--text-2); max-width: none; }

/* ---------- Lists and steps ---------- */
.help-list { list-style: none; margin-top: 12px; display: grid; gap: 10px; color: var(--text-2); max-width: 68ch; }
.help-list li { position: relative; padding-left: 22px; }
.help-list li::before {
  content: ""; position: absolute; left: 2px; top: .62em;
  width: 7px; height: 7px; border-radius: 2px; background: var(--accent);
}
.help-steps { list-style: none; counter-reset: hstep; margin-top: 12px; display: grid; gap: 14px; max-width: 68ch; }
.help-steps li { position: relative; padding-left: 44px; color: var(--text-2); counter-increment: hstep; }
.help-steps li::before {
  content: counter(hstep); position: absolute; left: 0; top: -2px;
  width: 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent-soft); color: var(--accent-text);
  border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
  font-size: 14px; font-weight: 700;
}

/* ---------- Pricing table ---------- */
.help-table { width: 100%; border-collapse: collapse; margin-top: 16px; font-size: 14.5px; font-variant-numeric: tabular-nums; }
.help-table th {
  text-align: left; font-size: 12.5px; font-weight: 600; color: var(--muted);
  padding: 0 8px 8px; border-bottom: 1px solid var(--line);
}
.help-table td { padding: 9px 8px; border-bottom: 1px solid var(--line); color: var(--text-2); vertical-align: top; }
.help-table tr:last-child td { border-bottom: 0; }
.help-table td:first-child { color: var(--text); font-weight: 600; white-space: nowrap; }

/* ---------- FAQ (extends .faq from pc.css) ---------- */
.help-faq { max-width: none; margin-top: 6px; border-top: 0; }
.help-faq summary { font-size: 16px; padding: 16px 0; }
.help-faq details p { padding-bottom: 18px; }

/* ---------- Mobile ---------- */
@media (max-width: 720px) {
  .help-wrap { padding-top: 36px; }
  .help-sec { padding: 20px 16px; border-radius: var(--r-lg); }
  .help-table td:first-child { white-space: normal; }
  .help-steps li { padding-left: 40px; }
  .hnav .btn { padding: 0 10px; }
}
