/* ═══════════════════════════════════════════════════════════════════════
   Truvald — Help section styles. Layered on site.css; uses its CSS vars.
   ═══════════════════════════════════════════════════════════════════════ */

.help-shell {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 32px;
  max-width: 1240px;
  margin: 0 auto;
  padding: 32px 24px 80px;
  align-items: start;
}

/* ── Sidebar ─────────────────────────────────────────────────────────── */
.help-sidebar {
  position: sticky;
  top: 16px;
  max-height: calc(100vh - 32px);
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.help-search-wrap { position: relative; margin-bottom: 14px; }
.help-search {
  width: 100%;
  font-family: 'Barlow', sans-serif;
  font-size: 15px;
  padding: 11px 36px 11px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.help-search:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-glow);
}
.help-search-clear {
  position: absolute;
  right: 8px; top: 50%;
  transform: translateY(-50%);
  background: none; border: none;
  font-size: 20px; line-height: 1;
  color: var(--text-dim);
  cursor: pointer;
  padding: 2px 6px;
  display: none;
}
.help-search-clear.show { display: block; }

.help-toc {
  overflow-y: auto;
  padding-right: 6px;
  flex: 1;
  min-height: 0;
}
.help-toc-part {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--gold-dim);
  margin: 18px 0 6px;
}
.help-toc-part:first-child { margin-top: 0; }
.help-toc a {
  display: block;
  font-family: 'Barlow', sans-serif;
  font-size: 14px;
  color: var(--text-dim);
  text-decoration: none;
  padding: 5px 10px;
  border-radius: var(--radius);
  border-left: 2px solid transparent;
  transition: background var(--transition), color var(--transition);
}
.help-toc a:hover { background: var(--bg2); color: var(--text); }
.help-toc a.active {
  background: var(--gold-glow);
  color: var(--text);
  border-left-color: var(--gold);
  font-weight: 500;
}
.help-toc a .toc-num { color: var(--gold-dim); font-variant-numeric: tabular-nums; margin-right: 6px; }
.help-toc-empty { color: var(--text-dim); font-size: 14px; padding: 10px; }

/* ── Content ─────────────────────────────────────────────────────────── */
.help-content { min-width: 0; }

.help-hero { border-bottom: 1px solid var(--border); padding-bottom: 22px; margin-bottom: 26px; }
.help-hero .eyebrow {
  font-family: 'Barlow Condensed', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  font-size: 13px;
  color: var(--gold);
}
.help-hero h1 {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 800;
  font-size: 46px;
  line-height: 1.04;
  margin: 4px 0 10px;
  color: var(--text);
}
.help-hero p { font-size: 17px; color: var(--text-dim); max-width: 70ch; margin: 0; }

/* Welcome: part cards listing their sections */
.help-parts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 18px;
}
.help-part-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  padding: 18px 20px 14px;
}
.help-part-card h2 {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 20px;
  margin: 0 0 10px;
  color: var(--text);
}
.help-part-card ol { list-style: none; margin: 0; padding: 0; }
.help-part-card li { margin: 0; }
.help-part-card a {
  display: block;
  font-size: 14.5px;
  color: var(--text-dim);
  text-decoration: none;
  padding: 4px 0;
  border-bottom: 1px solid transparent;
}
.help-part-card a:hover { color: var(--gold-dim); }
.help-part-card a .toc-num { color: var(--gold-dim); font-variant-numeric: tabular-nums; margin-right: 7px; }

/* Rendered section article */
.help-article h2.help-sec-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 800;
  font-size: 34px;
  margin: 0 0 6px;
  color: var(--text);
}
.help-article .help-sec-part {
  font-family: 'Barlow Condensed', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
  font-size: 12px;
  color: var(--gold);
  margin-bottom: 18px;
}
.help-article h3 {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 22px;
  margin: 28px 0 8px;
  color: var(--text);
}
.help-article h4 {
  font-family: 'Barlow', sans-serif;
  font-weight: 600;
  font-size: 16px;
  margin: 20px 0 6px;
  color: var(--text);
}
.help-article p { font-size: 15.5px; line-height: 1.6; color: #1f1f1f; margin: 10px 0; }
.help-article ul, .help-article ol { margin: 10px 0 10px 4px; padding-left: 22px; }
.help-article li { font-size: 15.5px; line-height: 1.55; color: #1f1f1f; margin: 4px 0; }
.help-article a { color: var(--sev-low); text-decoration: none; border-bottom: 1px solid rgba(46,122,180,0.3); }
.help-article a:hover { border-bottom-color: var(--sev-low); }
.help-article code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 1px 5px;
}
.help-article blockquote {
  border-left: 3px solid var(--gold);
  background: var(--bg2);
  margin: 14px 0;
  padding: 8px 16px;
  border-radius: 0 var(--radius) var(--radius) 0;
}
.help-article blockquote p { margin: 6px 0; }
.help-article hr { border: none; border-top: 1px solid var(--border); margin: 24px 0; }

.help-table-wrap { overflow-x: auto; margin: 14px 0; }
.help-article table { border-collapse: collapse; width: 100%; font-size: 14.5px; }
.help-article th, .help-article td {
  border: 1px solid var(--border);
  padding: 8px 12px;
  text-align: left;
  vertical-align: top;
}
.help-article th { background: var(--bg2); font-family: 'Barlow', sans-serif; font-weight: 600; color: var(--text); }

.help-article mark { background: rgba(245,168,0,0.35); color: inherit; padding: 0 1px; border-radius: 2px; }

.help-sec-nav {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}
.help-sec-nav a {
  font-family: 'Barlow', sans-serif;
  font-size: 14px;
  color: var(--text-dim);
  text-decoration: none;
  max-width: 46%;
}
.help-sec-nav a:hover { color: var(--gold-dim); }
.help-sec-nav .sec-nav-dir { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--gold-dim); }

/* Search results */
.help-results { display: flex; flex-direction: column; gap: 4px; }
.help-result {
  display: block;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
  text-decoration: none;
  background: var(--bg);
  transition: border-color var(--transition), background var(--transition);
}
.help-result:hover { border-color: var(--gold); background: var(--bg2); }
.help-result .r-part { font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--gold-dim); }
.help-result .r-title { font-family: 'Barlow Condensed', sans-serif; font-weight: 700; font-size: 19px; color: var(--text); margin: 1px 0 4px; }
.help-result .r-snippet { font-size: 14px; color: var(--text-dim); line-height: 1.5; }
.help-results-count { font-size: 14px; color: var(--text-dim); margin-bottom: 14px; }

/* ── Responsive ──────────────────────────────────────────────────────── */
@media (max-width: 880px) {
  .help-shell { grid-template-columns: 1fr; gap: 10px; padding: 18px 16px 60px; }
  .help-sidebar { position: static; max-height: none; margin-bottom: 16px; }
  .help-toc { max-height: 320px; border: 1px solid var(--border); border-radius: var(--radius); padding: 10px; }
  .help-hero h1 { font-size: 36px; }
}
