/* ═══════════════════════════════════════════════
   HELP CENTER — Lifecycle OS
   Inherits CSS variables from marketing.css
   ═══════════════════════════════════════════════ */

/* ── LAYOUT ── */

.help-main {
  padding-top: 60px;
  min-height: 100vh;
}

.help-container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 40px;
}

.help-nav-active {
  color: var(--text) !important;
}

/* ── HERO (index page) ── */

.help-hero {
  position: relative;
  padding: 80px 0 48px;
  text-align: center;
  overflow: hidden;
}

.help-hero-glow {
  position: absolute;
  top: -120px;
  left: 0;
  right: 0;
  height: 400px;
  background:
    radial-gradient(ellipse at 50% 50%, rgba(37,99,235,0.15) 0%, transparent 60%);
  pointer-events: none;
}

.help-hero-title {
  font-family: var(--font-serif);
  font-size: clamp(36px, 4vw, 52px);
  font-weight: 400;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 12px;
  position: relative;
}

.help-hero-sub {
  font-size: 16px;
  color: var(--text-muted);
  font-weight: 300;
  position: relative;
}

/* ── CATEGORIES GRID (index page) ── */

.help-categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
  padding-bottom: 64px;
}

.help-category-card {
  display: flex;
  gap: 16px;
  padding: 24px;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: 12px;
  text-decoration: none;
  transition: all 0.2s;
}

.help-category-card:hover {
  border-color: var(--border-hi);
  background: var(--surface-2);
  transform: translateY(-1px);
}

.help-category-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(37,99,235,0.08);
  border: 1px solid rgba(37,99,235,0.15);
  border-radius: 10px;
  color: var(--accent-2);
}

.help-category-info {
  flex: 1;
  min-width: 0;
}

.help-category-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}

.help-category-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 8px;
}

.help-category-count {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
}

/* ── CTA SECTION ── */

.help-cta-section {
  text-align: center;
  padding: 48px 0 80px;
  border-top: 1px solid var(--border);
}

.help-cta-section h2 {
  font-family: var(--font-serif);
  font-size: 28px;
  font-weight: 400;
  color: var(--text);
  margin-bottom: 8px;
}

.help-cta-section p {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 24px;
}

/* ── TWO-COLUMN LAYOUT (category + article pages) ── */

.help-two-col {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 48px;
  padding: 40px 0 80px;
  align-items: start;
}

/* ── SIDEBAR ── */

.help-sidebar {
  position: sticky;
  top: 80px;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  padding-right: 16px;
}

.help-sidebar::-webkit-scrollbar {
  width: 3px;
}

.help-sidebar::-webkit-scrollbar-track {
  background: transparent;
}

.help-sidebar::-webkit-scrollbar-thumb {
  background: var(--border-hi);
  border-radius: 3px;
}

.help-sidebar-back {
  display: inline-block;
  font-size: 12px;
  color: var(--text-dim);
  text-decoration: none;
  margin-bottom: 20px;
  transition: color 0.2s;
}

.help-sidebar-back:hover {
  color: var(--text-muted);
}

.help-sidebar-category {
  margin-bottom: 4px;
}

.help-sidebar-cat-title {
  display: block;
  padding: 6px 10px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  border-radius: 6px;
  transition: all 0.15s;
}

.help-sidebar-cat-title:hover {
  color: var(--text);
  background: rgba(255,255,255,0.03);
}

.help-sidebar-category.active > .help-sidebar-cat-title {
  color: var(--text);
  background: rgba(37,99,235,0.08);
}

.help-sidebar-articles {
  list-style: none;
  padding: 4px 0 8px 12px;
  border-left: 1px solid var(--border);
  margin-left: 18px;
}

.help-sidebar-articles li {
  margin-bottom: 1px;
}

.help-sidebar-articles a {
  display: block;
  padding: 4px 10px;
  font-size: 12.5px;
  color: var(--text-dim);
  text-decoration: none;
  border-radius: 4px;
  transition: all 0.15s;
  line-height: 1.4;
}

.help-sidebar-articles a:hover {
  color: var(--text-muted);
  background: rgba(255,255,255,0.03);
}

.help-sidebar-articles li.current a {
  color: var(--accent-2);
  background: rgba(37,99,235,0.06);
}

/* ── BREADCRUMB ── */

.help-breadcrumb {
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.help-breadcrumb a {
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.15s;
}

.help-breadcrumb a:hover {
  color: var(--text-muted);
}

.help-breadcrumb-sep {
  color: var(--border-hi);
}

/* ── CATEGORY PAGE ── */

.help-page-title {
  font-family: var(--font-serif);
  font-size: 32px;
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--text);
  margin-bottom: 8px;
}

.help-page-desc {
  font-size: 15px;
  color: var(--text-muted);
  font-weight: 300;
  margin-bottom: 32px;
}

.help-article-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.help-article-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.15s;
}

.help-article-link:hover {
  background: var(--surface-2);
  border-color: var(--border-hi);
}

.help-article-link-title {
  font-size: 14px;
  font-weight: 400;
  color: var(--text);
}

.help-article-link-arrow {
  font-size: 14px;
  color: var(--text-dim);
  transition: transform 0.15s;
}

.help-article-link:hover .help-article-link-arrow {
  transform: translateX(3px);
  color: var(--accent-2);
}

/* ── ARTICLE PROSE ── */

.help-article-content {
  max-width: 760px;
}

/* Suppress the h1 — already shown as page title via breadcrumb context */
.help-article-content > h1:first-child {
  font-family: var(--font-serif);
  font-size: 32px;
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--text);
  margin-bottom: 24px;
  line-height: 1.2;
}

.help-article-content h2 {
  font-size: 20px;
  font-weight: 600;
  color: var(--text);
  margin: 40px 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  line-height: 1.3;
}

.help-article-content h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin: 28px 0 8px;
  line-height: 1.4;
}

.help-article-content h4 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin: 20px 0 6px;
}

.help-article-content p {
  color: var(--text-muted);
  font-size: 14.5px;
  line-height: 1.75;
  margin-bottom: 16px;
}

.help-article-content a {
  color: var(--accent-2);
  text-decoration: none;
  transition: color 0.15s;
}

.help-article-content a:hover {
  text-decoration: underline;
}

.help-article-content strong {
  color: var(--text);
  font-weight: 600;
}

.help-article-content em {
  font-style: italic;
}

.help-article-content code {
  font-family: 'Geist Mono', monospace;
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 13px;
  color: var(--text);
}

.help-article-content pre {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px 20px;
  overflow-x: auto;
  margin-bottom: 16px;
}

.help-article-content pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-muted);
}

.help-article-content blockquote {
  border-left: 3px solid var(--accent);
  padding: 12px 16px;
  margin: 16px 0;
  background: rgba(37,99,235,0.04);
  border-radius: 0 8px 8px 0;
}

.help-article-content blockquote p {
  margin-bottom: 0;
  font-size: 13.5px;
}

.help-article-content blockquote strong {
  color: var(--accent-2);
}

.help-article-content ul,
.help-article-content ol {
  color: var(--text-muted);
  font-size: 14.5px;
  line-height: 1.75;
  padding-left: 24px;
  margin-bottom: 16px;
}

.help-article-content li {
  margin-bottom: 4px;
}

.help-article-content li strong {
  color: var(--text);
}

.help-article-content hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 36px 0;
}

.help-article-content table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
  font-size: 13.5px;
}

.help-article-content thead th {
  background: var(--surface-2);
  color: var(--text);
  font-weight: 600;
  text-align: left;
  padding: 10px 14px;
  border: 1px solid var(--border);
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.help-article-content tbody td {
  padding: 8px 14px;
  border: 1px solid var(--border);
  color: var(--text-muted);
  vertical-align: top;
}

.help-article-content tbody tr:nth-child(even) {
  background: rgba(255,255,255,0.015);
}

/* Heading permalink anchors */
.help-heading-anchor {
  color: var(--text-dim);
  text-decoration: none;
  margin-left: 6px;
  font-weight: 300;
  opacity: 0;
  transition: opacity 0.15s;
}

.help-article-content h2:hover .help-heading-anchor,
.help-article-content h3:hover .help-heading-anchor {
  opacity: 1;
}

.help-heading-anchor:hover {
  color: var(--accent-2);
}

/* ── PREV / NEXT NAVIGATION ── */

.help-prev-next {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.help-prev-next-link {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 18px;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.15s;
  max-width: 50%;
}

.help-prev-next-link:hover {
  background: var(--surface-2);
  border-color: var(--border-hi);
}

.help-prev-next-link.next {
  text-align: right;
  margin-left: auto;
}

.help-prev-next-label {
  font-size: 11px;
  color: var(--text-dim);
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.help-prev-next-title {
  font-size: 13.5px;
  color: var(--text);
  font-weight: 400;
}

/* ── RESPONSIVE ── */

@media (max-width: 768px) {
  .help-container {
    padding: 0 20px;
  }

  .help-categories-grid {
    grid-template-columns: 1fr;
  }

  .help-two-col {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .help-sidebar {
    position: static;
    max-height: none;
    padding-right: 0;
    padding-bottom: 24px;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--border);
  }

  .help-prev-next {
    flex-direction: column;
  }

  .help-prev-next-link {
    max-width: 100%;
  }

  .help-prev-next-link.next {
    text-align: left;
  }

  .help-article-content table {
    display: block;
    overflow-x: auto;
  }
}
