/* ==========================================================
   ElevateIQ Help Center styling.
   Loads AFTER ../legal.css (which owns the brand tokens, navbar,
   theme toggle and footer); this file only adds the docs layout:
   article sidebar, content typography, field tables, badge
   swatches that mirror the product's status colors.
   ========================================================== */

/* ── Landing page card grid ─────────────────────────────── */
.help-hero {
  padding: 64px 0 40px;
  border-bottom: 1px solid var(--bs-border-color);
  text-align: center;
}
.help-hero h1 {
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 600;
  margin-bottom: 12px;
}
.help-hero .lead {
  font-size: 19px;
  color: var(--bs-secondary-color);
  max-width: 640px;
  margin: 0 auto;
}

.help-cat {
  margin-top: 40px;
}
.help-cat > h2 {
  font-size: 15px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--bs-secondary-color);
  margin-bottom: 16px;
}
.help-card {
  display: block;
  background: var(--bs-tertiary-bg);
  border: 1px solid var(--bs-border-color);
  border-radius: 14px;
  padding: 22px 24px;
  height: 100%;
  color: var(--bs-body-color);
  text-decoration: none;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.help-card:hover {
  border-color: var(--bs-primary);
  transform: translateY(-2px);
  color: var(--bs-body-color);
}
.help-card i {
  font-size: 22px;
  color: var(--bs-primary);
}
.help-card h3 {
  font-size: 17px;
  font-weight: 600;
  margin: 10px 0 6px;
}
.help-card p {
  font-size: 14px;
  color: var(--bs-secondary-color);
  margin: 0;
  line-height: 1.55;
}

/* ── Article layout: sidebar + content ──────────────────── */
.help-layout {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 48px;
  padding: 40px 0 80px;
}
@media (max-width: 991.98px) {
  .help-layout { grid-template-columns: 1fr; gap: 24px; }
  .help-sidebar { position: static; }
}

.help-sidebar {
  position: sticky;
  top: 92px;
  align-self: start;
  font-size: 14px;
}
.help-sidebar .group {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--bs-secondary-color);
  margin: 18px 0 6px;
}
.help-sidebar .group:first-child { margin-top: 0; }
.help-sidebar a {
  display: block;
  padding: 5px 10px;
  border-radius: 8px;
  color: var(--bs-body-color);
  text-decoration: none;
}
.help-sidebar a:hover { background: var(--bs-tertiary-bg); }
.help-sidebar a.active {
  background: rgba(var(--bs-primary-rgb), 0.12);
  color: var(--bs-primary);
  font-weight: 600;
}

/* ── Article typography ─────────────────────────────────── */
.help-article h1 {
  font-size: clamp(30px, 4vw, 40px);
  font-weight: 600;
  margin-bottom: 8px;
}
.help-article .article-lead {
  font-size: 17px;
  color: var(--bs-secondary-color);
  max-width: 760px;
  margin-bottom: 28px;
}
.help-article h2 {
  font-size: 24px;
  font-weight: 600;
  margin: 44px 0 14px;
  padding-top: 8px;
}
.help-article h3 {
  font-size: 18px;
  font-weight: 600;
  margin: 28px 0 10px;
}
.help-article p, .help-article li {
  font-size: 15.5px;
  line-height: 1.7;
  max-width: 800px;
}
.help-article code {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.875em;
  background: var(--bs-tertiary-bg);
  border: 1px solid var(--bs-border-color);
  border-radius: 6px;
  padding: 1px 6px;
  color: var(--bs-body-color);
}

/* Callouts */
.help-note, .help-warn {
  border-left: 3px solid var(--bs-primary);
  background: rgba(var(--bs-primary-rgb), 0.08);
  border-radius: 0 10px 10px 0;
  padding: 14px 18px;
  margin: 20px 0;
  max-width: 800px;
  font-size: 15px;
}
.help-warn {
  border-left-color: #ffc35a;
  background: rgba(255, 195, 90, 0.10);
}

/* ── Field reference tables ─────────────────────────────── */
.help-table-wrap { overflow-x: auto; margin: 18px 0 8px; }
table.help-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
}
table.help-table th {
  text-align: left;
  font-weight: 600;
  padding: 10px 14px;
  border-bottom: 2px solid var(--bs-border-color);
  white-space: nowrap;
}
table.help-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--bs-border-color);
  vertical-align: top;
  line-height: 1.55;
}
table.help-table td:first-child {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 13px;
  white-space: nowrap;
}
table.help-table.plain-first td:first-child {
  font-family: inherit;
  font-size: inherit;
  white-space: normal;
}

/* ── Badge swatches: mirror the product's solid pill style ─ */
.eq-pill {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
}
/* Status pills mirror the product's badge palette (_elevateiq-overrides.scss):
   deep green / amber / deep red, NOT the old bright lime + light-pink. */
.eq-pill.p-success { background: #1f7a55; }
.eq-pill.p-info    { background: #39afd1; }
.eq-pill.p-danger  { background: #c0392b; }
.eq-pill.p-secondary { background: #6c757d; }
.eq-pill.p-primary { background: #0B7A9E; }
.eq-pill.p-warning { background: #e6a327; color: #313a46; }

/* Confidence band pills: same values as the product's
   _elevateiq-overrides.scss band palette (green -> teal -> amber -> orange ->
   red; endpoints reuse the deep ok/bad badge colors). */
.eq-pill.p-allow      { background: #1f7a55; }
.eq-pill.p-soft-allow { background: #2f9e6f; }
.eq-pill.p-review     { background: #e6a327; color: #313a46; }
.eq-pill.p-high-risk  { background: #d9640f; }
.eq-pill.p-hard-block { background: #c0392b; }

/* Breadcrumb strip above articles */
.help-crumb {
  padding: 18px 0 0;
  font-size: 14px;
}
.help-crumb a { color: var(--bs-secondary-color); text-decoration: none; }
.help-crumb a:hover { color: var(--bs-primary); }
.help-crumb .sep { color: var(--bs-secondary-color); margin: 0 6px; }

/* Prev/next footer links on articles */
.help-pager {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid var(--bs-border-color);
}
.help-pager a {
  text-decoration: none;
  font-weight: 600;
}
