/* ==========================================================
   Patch Console 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 soft-tint pill style ─
   The console's .pc-badge is a light, theme-adaptive tint of each
   status hue with an AA-safe ink (patch-console.css); these pills
   reuse that look with fixed rgba tints so the docs render the
   same vocabulary: ok (green), warn (amber), bad (red),
   info (brand blue), muted (grey). */
.pc-pill {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
}
.pc-pill.p-ok    { background: rgba(29, 158, 117, 0.16); color: #006740; }
.pc-pill.p-warn  { background: rgba(239, 159, 39, 0.18); color: #a15100; }
.pc-pill.p-bad   { background: rgba(216, 90, 48, 0.16);  color: #a02200; }
.pc-pill.p-info  { background: rgba(var(--bs-primary-rgb), 0.15); color: var(--bs-primary); }
.pc-pill.p-muted { background: var(--bs-tertiary-bg); color: var(--bs-secondary-color); }
/* Dark mode: brighten the ink so it reads on the deep tints,
   same flip the product does for its badge text. */
[data-bs-theme="dark"] .pc-pill.p-ok   { color: #5fd3a8; }
[data-bs-theme="dark"] .pc-pill.p-warn { color: #f2b95e; }
[data-bs-theme="dark"] .pc-pill.p-bad  { color: #f2977a; }

/* 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;
}
