:root {
  --primary: #3b82f6;
  --primary-dark: #2563eb;
  --bg: #ffffff;
  --text: #1e293b;
  --muted: #64748b;
  --border: #e2e8f0;
  --code-bg: #1e293b;
  --surface: #f8fafc;
  --mark-bg: #fef08a;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--text);
  line-height: 1.6;
  background: var(--bg);
}
a { color: var(--primary); }

/* ---- Header ---- */
.help-header {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 16px 32px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 10;
}
.help-brand {
  font-size: 18px;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
  white-space: nowrap;
}
.help-header-search {
  flex: 1;
  max-width: 480px;
}
.help-header-search input {
  width: 100%;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 14px;
  outline: none;
}
.help-header-search input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}
.help-demo-btn {
  margin-left: auto;
  padding: 8px 16px;
  background: var(--primary);
  color: #fff;
  text-decoration: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}
.help-demo-btn:hover { background: var(--primary-dark); }

/* ---- Layout ---- */
.help-main {
  max-width: 1080px;
  margin: 0 auto;
  padding: 40px 32px 80px;
}
.help-breadcrumb {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 24px;
}
.help-breadcrumb a { color: var(--muted); text-decoration: none; }
.help-breadcrumb a:hover { color: var(--primary); }

/* ---- Home ---- */
.help-hero { text-align: center; padding: 24px 0 40px; }
.help-hero h1 { font-size: 32px; margin-bottom: 12px; }
.help-hero p { color: var(--muted); font-size: 16px; margin-bottom: 24px; }
.help-hero-search { max-width: 520px; margin: 0 auto; }
.help-hero-search input {
  width: 100%;
  padding: 14px 18px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 16px;
  outline: none;
}
.help-hero-search input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.help-section-title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin: 40px 0 16px;
}

.help-category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}
.help-category-card {
  display: block;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px;
  text-decoration: none;
  color: var(--text);
  border-top: 3px solid var(--card-color, var(--primary));
  transition: box-shadow 0.15s, transform 0.15s;
}
.help-category-card:hover {
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
  transform: translateY(-2px);
}
.help-category-card .icon { font-size: 26px; margin-bottom: 10px; display: block; }
.help-category-card h3 { font-size: 16px; margin-bottom: 4px; }
.help-category-card p { font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.help-category-card .count { font-size: 12px; color: var(--muted); }

.help-popular-list { list-style: none; }
.help-popular-list li { margin-bottom: 8px; }
.help-popular-list a {
  display: block;
  padding: 10px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  text-decoration: none;
  color: var(--text);
  font-size: 14px;
}
.help-popular-list a:hover { border-color: var(--primary); background: var(--surface); }

/* ---- Category page ---- */
.help-article-list { list-style: none; }
.help-article-list li {
  border-bottom: 1px solid var(--border);
}
.help-article-list a {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 16px 4px;
  text-decoration: none;
  color: var(--text);
}
.help-article-list a:hover { color: var(--primary); }
.help-article-list .title { font-size: 15px; font-weight: 600; }
.help-article-list .updated { font-size: 12px; color: var(--muted); white-space: nowrap; }

/* ---- Article page ---- */
.help-article-layout {
  display: flex;
  gap: 48px;
  align-items: flex-start;
}
.help-article-body { flex: 1; min-width: 0; max-width: 760px; }
.help-article-body h1 { font-size: 30px; margin-bottom: 8px; }
.help-article-body h2 { font-size: 22px; margin-top: 36px; margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px solid var(--border); scroll-margin-top: 80px; }
.help-article-body h3 { font-size: 17px; margin-top: 26px; margin-bottom: 8px; scroll-margin-top: 80px; }
.help-article-body p { margin-bottom: 16px; }
.help-article-body pre { background: var(--code-bg); color: #e2e8f0; padding: 16px 20px; border-radius: 8px; overflow-x: auto; margin-bottom: 20px; font-size: 13px; line-height: 1.5; }
.help-article-body code { font-family: 'SF Mono', 'Fira Code', monospace; }
.help-article-body :not(pre) > code { background: #f1f5f9; padding: 2px 6px; border-radius: 4px; font-size: 13px; color: #e11d48; }
.help-article-body table { width: 100%; border-collapse: collapse; margin-bottom: 20px; display: block; overflow-x: auto; }
.help-article-body th, .help-article-body td { text-align: left; padding: 10px 14px; border: 1px solid var(--border); font-size: 14px; }
.help-article-body th { background: var(--surface); font-weight: 600; }
.help-article-body ul, .help-article-body ol { margin-bottom: 16px; padding-left: 24px; }
.help-article-body li { margin-bottom: 6px; }
.help-article-body img { max-width: 100%; }

.callout { padding: 16px 20px; border-radius: 8px; margin-bottom: 20px; font-size: 14px; }
.callout-info { background: #eff6ff; border-left: 4px solid var(--primary); }
.callout-warning { background: #fffbeb; border-left: 4px solid #f59e0b; }

.help-toc {
  width: 220px;
  flex-shrink: 0;
  position: sticky;
  top: 88px;
  font-size: 13px;
}
.help-toc-title { font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); font-size: 11px; margin-bottom: 10px; }
.help-toc ul { list-style: none; }
.help-toc li { margin-bottom: 6px; }
.help-toc a { color: var(--muted); text-decoration: none; display: block; }
.help-toc a:hover { color: var(--primary); }
.help-toc .toc-h3 { padding-left: 14px; }

.help-related {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.help-related h3 { font-size: 14px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); margin-bottom: 12px; }
.help-related ul { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; }
.help-related a {
  display: inline-block;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  text-decoration: none;
  color: var(--text);
  font-size: 13px;
}
.help-related a:hover { border-color: var(--primary); color: var(--primary); }

/* ---- Search results ---- */
.help-search-results { list-style: none; }
.help-search-result {
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
}
.help-search-result a { text-decoration: none; }
.help-search-result .result-category { font-size: 12px; color: var(--primary); font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em; }
.help-search-result h3 { font-size: 16px; margin: 4px 0 6px; color: var(--text); }
.help-search-result .excerpt { font-size: 14px; color: var(--muted); }
.help-search-result mark { background: var(--mark-bg); color: inherit; border-radius: 2px; }
.help-search-empty { color: var(--muted); padding: 40px 0; text-align: center; }

.help-loading, .help-error { color: var(--muted); padding: 40px 0; text-align: center; }

@media (max-width: 768px) {
  .help-header { padding: 12px 16px; gap: 12px; }
  .help-header-search { max-width: none; }
  .help-demo-btn { display: none; }
  .help-main { padding: 24px 16px 60px; }
  .help-article-layout { flex-direction: column; }
  .help-toc { display: none; }
  .help-category-grid { grid-template-columns: 1fr 1fr; }
}
