/* ============================================
   Squadd Help Centre — help.css
   ============================================ */

.help-page {
  padding-top: 64px;
  min-height: 100vh;
}

/* Two-column grid: article + optional TOC sidebar */
.help-layout {
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 24px 80px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
  align-items: start;
}

.help-layout--toc {
  grid-template-columns: minmax(0, 1fr) 220px;
}

/* Category index: keep content narrower */
.help-layout--full .help-main {
  max-width: 720px;
}

/* ---- Breadcrumb ---- */
.help-breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 28px;
  flex-wrap: wrap;
}
.help-breadcrumb a { color: var(--text-muted); text-decoration: none; }
.help-breadcrumb a:hover { color: var(--green); text-decoration: none; }
.help-breadcrumb-sep { color: var(--text-faint); }

/* ---- Article typography ---- */
.help-article {
  color: var(--text);
  font-size: 16px;
  line-height: 1.7;
}

.help-article h1 {
  font-size: 30px;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 24px;
  color: var(--text);
}

.help-article h2 {
  font-size: 20px;
  font-weight: 700;
  margin-top: 40px;
  margin-bottom: 14px;
  color: var(--text);
  padding-top: 8px;
  border-top: 1px solid var(--border);
  scroll-margin-top: 84px;
}

.help-article h3 {
  font-size: 17px;
  font-weight: 700;
  margin-top: 28px;
  margin-bottom: 10px;
  color: var(--text);
  scroll-margin-top: 84px;
}

.help-article h4 {
  font-size: 15px;
  font-weight: 700;
  margin-top: 20px;
  margin-bottom: 8px;
  color: var(--text);
}

.help-article p { color: var(--text-muted); margin-bottom: 16px; }
.help-article strong { color: var(--text); font-weight: 700; }
.help-article em { font-style: italic; }

.help-article ul,
.help-article ol {
  color: var(--text-muted);
  padding-left: 24px;
  margin-bottom: 16px;
}
.help-article li { margin-bottom: 6px; }

.help-article a { color: var(--green); }
.help-article a:hover { text-decoration: underline; }

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

/* Code */
.help-article code {
  background: var(--surface);
  color: var(--green);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.875em;
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
}

.help-article pre {
  background: var(--surface);
  border-radius: 10px;
  padding: 18px 20px;
  overflow-x: auto;
  margin-bottom: 20px;
  border: 1px solid var(--surface-alt);
}
.help-article pre code {
  background: none;
  padding: 0;
  color: var(--text);
  font-size: 14px;
}

/* Blockquote — used for tips / notes */
.help-article blockquote {
  background: rgba(34, 197, 94, 0.06);
  border-left: 3px solid var(--green);
  border-radius: 0 8px 8px 0;
  padding: 14px 18px;
  margin: 20px 0;
  color: var(--text-muted);
  font-size: 15px;
}
.help-article blockquote p { margin: 0; color: inherit; }

/* Tables */
.help-article table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
  font-size: 14px;
  overflow-x: auto;
  display: block;
}
.help-article th,
.help-article td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
  white-space: nowrap;
}
.help-article th {
  font-weight: 700;
  color: var(--text);
  background: var(--surface);
}
.help-article tr:hover td { background: rgba(255, 255, 255, 0.02); }

/* ---- TOC sidebar ---- */
.help-toc {
  position: sticky;
  top: 84px;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
}

.help-toc-inner {
  background: var(--surface);
  border-radius: 12px;
  padding: 20px;
  border: 1px solid var(--border);
}

.help-toc-title {
  font-size: 11px;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  margin-bottom: 12px;
}

.help-toc-list { list-style: none; padding: 0; margin: 0; }
.help-toc-list li { margin-bottom: 2px; }
.help-toc-list a {
  display: block;
  font-size: 13px;
  color: var(--text-faint);
  text-decoration: none;
  padding: 5px 8px;
  border-radius: 6px;
  line-height: 1.4;
  transition: color 0.15s, background 0.15s;
}
.help-toc-list a:hover,
.help-toc-list a.active {
  color: var(--green);
  background: rgba(34, 197, 94, 0.08);
  text-decoration: none;
}

/* ---- Back link ---- */
.help-back {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.help-back a { color: var(--text-muted); font-size: 14px; font-weight: 600; text-decoration: none; }
.help-back a:hover { color: var(--green); }

/* ================================================================
   Help Centre index — hero + search
   ================================================================ */
.help-hero {
  text-align: center;
  padding: 56px 0 48px;
}
.help-hero-title {
  font-size: 42px;
  font-weight: 900;
  margin-bottom: 12px;
  letter-spacing: -0.5px;
}
.help-hero-sub {
  font-size: 17px;
  color: var(--text-muted);
  margin-bottom: 32px;
}

.help-search-wrap {
  position: relative;
  max-width: 520px;
  margin: 0 auto;
}
.help-search-input {
  width: 100%;
  padding: 14px 18px;
  border-radius: 12px;
  border: 1px solid var(--surface-alt);
  background: var(--surface);
  color: var(--text);
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s;
  font-family: inherit;
}
.help-search-input:focus { border-color: var(--green); }
.help-search-input::placeholder { color: var(--text-faint); }

.help-search-results {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--surface);
  border: 1px solid var(--surface-alt);
  border-radius: 12px;
  overflow: hidden;
  z-index: 200;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
}
.help-search-result {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 16px;
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  transition: background 0.1s;
}
.help-search-result:last-child { border-bottom: none; }
.help-search-result:hover { background: rgba(255, 255, 255, 0.04); }
.help-search-result-cat {
  font-size: 11px;
  font-weight: 700;
  color: var(--green);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.help-search-result-title { font-size: 14px; font-weight: 600; color: var(--text); }
.help-search-result-excerpt {
  font-size: 12px;
  color: var(--text-faint);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.help-search-empty { padding: 16px; font-size: 14px; color: var(--text-faint); text-align: center; }

/* ---- Category cards grid ---- */
.help-categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  padding-bottom: 80px;
}
.help-cat-card {
  display: block;
  background: var(--surface);
  border-radius: 14px;
  padding: 24px;
  border: 1px solid transparent;
  text-decoration: none;
  transition: border-color 0.2s, transform 0.15s;
}
.help-cat-card:hover { border-color: var(--green); transform: translateY(-2px); text-decoration: none; }
.help-cat-card-icon { font-size: 28px; display: block; margin-bottom: 12px; }
.help-cat-card-name { font-size: 16px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.help-cat-card-count { font-size: 12px; color: var(--green); font-weight: 600; margin-bottom: 8px; }
.help-cat-card-desc { font-size: 13px; color: var(--text-muted); line-height: 1.5; }

/* ---- Category index page ---- */
.help-cat-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 36px;
}
.help-cat-icon { font-size: 36px; margin-top: 4px; flex-shrink: 0; }
.help-cat-title { font-size: 28px; font-weight: 800; margin-bottom: 6px; }
.help-cat-desc { font-size: 15px; color: var(--text-muted); }

.help-articles-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-bottom: 80px;
}
.help-article-card {
  display: block;
  background: var(--surface);
  border-radius: 12px;
  padding: 18px 22px;
  border: 1px solid transparent;
  text-decoration: none;
  transition: border-color 0.2s;
}
.help-article-card:hover { border-color: var(--green); text-decoration: none; }
.help-article-card-title { font-size: 15px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.help-article-card-excerpt { font-size: 13px; color: var(--text-muted); line-height: 1.5; }

/* ================================================================
   Responsive
   ================================================================ */
@media (max-width: 900px) {
  .help-layout--toc { grid-template-columns: 1fr; }
  .help-toc { display: none; }
  .help-hero-title { font-size: 30px; }
}

@media (max-width: 600px) {
  .help-hero { padding: 40px 0 32px; }
  .help-article h1 { font-size: 24px; }
  .help-article h2 { font-size: 18px; }
  .help-categories-grid { grid-template-columns: 1fr; }
  .help-layout { padding: 28px 16px 60px; }
}
