/* Eltaman Help Center — dark marketing theme, shares the landing palette.
   Principles inherited from the landing: 4px spacing, radius tokens (6/8/12),
   150ms transitions, 3px focus ring, active:scale(0.98), reduced-motion. */

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

:root {
  --bg: #0b1220;
  --panel: #111a2e;
  --panel-2: #0f1830;
  --text: #e5e7eb;
  --heading: #ffffff;
  --muted: #9ca3af;
  --accent: #3b82f6;
  --accent-2: #60a5fa;
  --border: #1f2a44;
  --border-strong: #28365a;
  --radius-md: 6px;
  --radius-lg: 8px;
  --radius-xl: 12px;
  --maxw: 1080px;
}

html, body { margin: 0; padding: 0; background: var(--bg); color: var(--text); }
body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--accent-2); text-decoration: none; transition: color 150ms ease; }
a:hover { color: #93c5fd; }

img { max-width: 100%; height: auto; display: block; }

:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.5);
  border-radius: var(--radius-md);
}

/* ---------- Header ---------- */
.help-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(11, 18, 32, 0.85);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.help-header-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.help-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--heading);
  font-weight: 600;
  font-size: 16px;
  white-space: nowrap;
}
.help-brand:hover { color: var(--heading); }
.help-header-spacer { flex: 1; }
.help-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 14px;
  white-space: nowrap;
}
.help-back:hover { color: var(--text); }

/* ---------- Search ---------- */
.help-search {
  position: relative;
  flex: 1;
  max-width: 520px;
  margin: 0 auto;
}
.help-search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}
#help-search-input {
  width: 100%;
  height: 40px;
  padding: 0 14px 0 42px;
  background: var(--panel);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  color: var(--text);
  font: inherit;
  font-size: 14px;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}
#help-search-input::placeholder { color: var(--muted); }
#help-search-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
  outline: none;
}
.help-search-results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: var(--panel);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
  max-height: 60vh;
  overflow-y: auto;
  z-index: 40;
}
.help-search-results a {
  display: block;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}
.help-search-results a:last-child { border-bottom: none; }
.help-search-results a:hover,
.help-search-results a.is-active { background: var(--panel-2); }
.help-result-title { display: block; font-weight: 500; color: var(--heading); font-size: 14px; }
.help-result-cat { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.help-search-empty { padding: 16px; color: var(--muted); font-size: 14px; }

/* ---------- Main ---------- */
.help-main {
  flex: 1;
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 40px 24px 80px;
}

/* ---------- Home hero ---------- */
.help-hero { text-align: center; padding: 32px 0 40px; }
.help-hero h1 {
  font-size: 40px;
  font-weight: 700;
  letter-spacing: -0.8px;
  color: var(--heading);
  margin: 0 0 12px;
}
.help-hero-sub {
  color: var(--muted);
  font-size: 18px;
  max-width: 620px;
  margin: 0 auto 28px;
}
.help-hero .help-search { margin: 0 auto; max-width: 580px; }
.help-hero #help-search-input { height: 52px; font-size: 16px; }

/* ---------- Category cards ---------- */
.help-cats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
  margin-top: 8px;
}
.help-cat-card {
  display: flex;
  gap: 16px;
  padding: 20px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  color: var(--text);
  transition: border-color 150ms ease, transform 150ms ease, box-shadow 150ms ease;
}
.help-cat-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
  color: var(--text);
}
.help-cat-card:active { transform: scale(0.99); }
.help-cat-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-lg);
  background: rgba(59, 130, 246, 0.12);
  color: var(--accent-2);
}
.help-cat-icon svg { width: 22px; height: 22px; }
.help-cat-icon.big { width: 56px; height: 56px; }
.help-cat-icon.big svg { width: 28px; height: 28px; }
.help-cat-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.help-cat-title { font-size: 16px; font-weight: 600; color: var(--heading); }
.help-cat-desc { font-size: 14px; color: var(--muted); line-height: 1.5; }
.help-cat-count { font-size: 12px; color: var(--accent-2); margin-top: 4px; }

/* ---------- Breadcrumbs ---------- */
.help-crumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.help-crumb-sep { color: var(--border-strong); }

/* ---------- Category page ---------- */
.help-cat-head {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 28px;
}
.help-cat-head h1 {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--heading);
  margin: 0 0 6px;
}
.help-cat-head p { color: var(--muted); margin: 0; font-size: 16px; }

.help-article-list { list-style: none; margin: 0; padding: 0; }
.help-article-list li { margin-bottom: 12px; }
.help-article-list a {
  display: block;
  padding: 18px 20px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  color: var(--text);
  transition: border-color 150ms ease, background 150ms ease;
}
.help-article-list a:hover { border-color: var(--accent); background: var(--panel-2); color: var(--text); }
.help-art-title { display: block; font-size: 16px; font-weight: 600; color: var(--heading); }
.help-art-desc { display: block; font-size: 14px; color: var(--muted); margin-top: 4px; }

/* ---------- Article page ---------- */
.help-article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 48px;
  align-items: start;
}
.help-article { min-width: 0; }
.help-article h1 {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.6px;
  color: var(--heading);
  margin: 0 0 8px;
  line-height: 1.25;
}
.help-art-meta { color: var(--muted); font-size: 13px; margin: 0 0 28px; }
.help-article h2 {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.3px;
  color: var(--heading);
  margin: 40px 0 12px;
  scroll-margin-top: 80px;
}
.help-article h3 {
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
  margin: 28px 0 8px;
}
.help-article p { margin: 0 0 16px; }
.help-article ul, .help-article ol { margin: 0 0 16px; padding-left: 24px; }
.help-article li { margin-bottom: 8px; }
.help-article code {
  background: var(--panel);
  border: 1px solid var(--border);
  padding: 1px 6px;
  border-radius: var(--radius-md);
  font-size: 13.5px;
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  color: #cbd5e1;
}
.help-article hr { border: none; border-top: 1px solid var(--border); margin: 32px 0; }

.help-note {
  margin: 20px 0;
  padding: 14px 18px;
  background: rgba(59, 130, 246, 0.08);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-md);
  color: var(--text);
  font-size: 15px;
}
.help-note code { background: rgba(15, 24, 48, 0.6); }

/* Screenshots — full resolution, responsive fit, framed. */
.help-figure {
  margin: 24px 0;
  padding: 0;
}
.help-figure img {
  width: 100%;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xl);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
  background: var(--panel);
}
.help-figure figcaption {
  margin-top: 10px;
  font-size: 13px;
  color: var(--muted);
  text-align: center;
}
/* Placeholder shown when a screenshot file is not yet present. */
.help-figure.is-missing img { display: none; }
.help-figure.is-missing {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-xl);
  background: var(--panel);
  color: var(--muted);
  font-size: 14px;
  gap: 8px;
}
.help-figure.is-missing::before {
  content: "";
  width: 40px; height: 40px;
  border-radius: 50%;
  background: rgba(96, 165, 250, 0.15);
}

/* Feedback + contact */
.help-feedback {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin: 40px 0 0;
  padding: 20px 0 0;
  border-top: 1px solid var(--border);
}
.help-feedback-q { font-size: 15px; color: var(--text); }
.help-feedback-btns { display: inline-flex; gap: 10px; }
.help-vote {
  height: 34px;
  padding: 0 18px;
  background: var(--panel);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  color: var(--text);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
  transition: border-color 150ms ease, background 150ms ease, transform 150ms ease;
}
.help-vote:hover { border-color: var(--accent); background: var(--panel-2); }
.help-vote:active { transform: scale(0.98); }
.help-feedback-thanks { font-size: 14px; color: var(--accent-2); }

.help-contact {
  margin-top: 32px;
  padding: 24px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
}
.help-contact h3 { margin: 0 0 6px; font-size: 17px; font-weight: 600; color: var(--heading); }
.help-contact p { margin: 0 0 16px; color: var(--muted); font-size: 14px; }
.help-contact-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.help-btn {
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 20px;
  border-radius: var(--radius-md);
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  border: 1px solid var(--accent);
  cursor: pointer;
  transition: background 150ms ease, transform 150ms ease;
}
.help-btn:hover { background: #2f6fe0; color: #fff; }
.help-btn:active { transform: scale(0.98); }
.help-btn-ghost { background: transparent; color: var(--text); border-color: var(--border-strong); }
.help-btn-ghost:hover { background: var(--panel-2); color: var(--text); border-color: var(--accent); }

/* Aside: TOC + related */
.help-aside { position: sticky; top: 84px; display: flex; flex-direction: column; gap: 28px; }
.help-toc-title {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--muted);
  margin-bottom: 12px;
}
.help-toc-block ul, .help-related ul { list-style: none; margin: 0; padding: 0; }
.help-toc-block li, .help-related li { margin-bottom: 8px; line-height: 1.4; }
.help-toc-block a { color: var(--muted); font-size: 14px; }
.help-toc-block a:hover { color: var(--accent-2); }
.help-related a { color: var(--text); font-size: 14px; }
.help-related a:hover { color: var(--accent-2); }

/* ---------- Footer ---------- */
.help-footer {
  border-top: 1px solid var(--border);
  margin-top: auto;
}
.help-footer-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 14px;
}
.help-footer-sep { color: var(--border-strong); }

/* ---------- Responsive ---------- */
@media (max-width: 880px) {
  .help-article-layout { grid-template-columns: 1fr; gap: 32px; }
  .help-aside { position: static; order: -1; }
  .help-toc-block { display: none; }
}
@media (max-width: 640px) {
  .help-header-inner { flex-wrap: wrap; gap: 12px; }
  .help-search { order: 3; max-width: none; flex-basis: 100%; }
  .help-main { padding: 28px 18px 60px; }
  .help-hero h1 { font-size: 30px; }
  .help-hero-sub { font-size: 16px; }
  .help-cats { grid-template-columns: 1fr; }
  .help-cat-head { flex-direction: column; align-items: flex-start; gap: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
  .help-cat-card:hover { transform: none; }
}
