/* Help Center (LAB-1938).
   Layout only. Every colour is a token already defined in base.css, so this
   stylesheet introduces no new brand values. */

/* ---------- Hub ---------- */

.help-hub {
  padding: 2rem 0 4rem;
}

.help-hub-header {
  max-width: 46rem;
  margin: 0 auto 2.5rem;
  text-align: center;
}

.help-hub-header h1 {
  font-size: 2.5rem;
  line-height: 1.2;
  margin-bottom: 0.75rem;
}

.help-hub-header p {
  color: var(--muted-foreground);
  font-size: 1.0625rem;
}

.help-category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr));
  gap: 1.25rem;
  align-items: start;
}

.help-category {
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.help-category h2 {
  font-size: 1.125rem;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.help-article-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.help-article-list li {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.help-article-list a {
  color: var(--foreground);
  font-weight: 500;
  font-size: 0.9375rem;
  text-decoration: none;
}

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

.help-article-list span {
  color: var(--muted-foreground);
  font-size: 0.8125rem;
  line-height: 1.5;
}

/* ---------- Article ---------- */

.help-article {
  padding: 1.5rem 0 4rem;
}

.help-article .container {
  max-width: 48rem;
}

.help-article-header {
  margin-bottom: 2rem;
}

.help-category-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 0.75rem;
}

.help-article-header h1 {
  font-size: 2.25rem;
  line-height: 1.25;
  margin-bottom: 0.75rem;
}

.help-article-summary {
  color: var(--muted-foreground);
  font-size: 1.0625rem;
}

.help-article-body {
  font-size: 1rem;
  line-height: 1.7;
}

.help-article-body h2 {
  font-size: 1.5rem;
  line-height: 1.3;
  margin: 2.5rem 0 0.875rem;
}

.help-article-body h3 {
  font-size: 1.125rem;
  line-height: 1.4;
  margin: 1.75rem 0 0.625rem;
}

.help-article-body p {
  margin-bottom: 1rem;
}

.help-article-body ul,
.help-article-body ol {
  margin: 0 0 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.help-article-body li ul,
.help-article-body li ol {
  margin: 0.5rem 0 0 1.25rem;
}

.help-article-body a {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.help-article-body code {
  background-color: var(--muted);
  border-radius: 0.25rem;
  padding: 0.1em 0.35em;
  font-size: 0.875em;
}

/* A wide table scrolls inside its own box. Without this the widest column sets
   the width of the whole document and every page scrolls sideways on a phone. */
.help-table-wrap {
  overflow-x: auto;
  margin: 0 0 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.help-table-wrap table {
  border-collapse: collapse;
  width: 100%;
  min-width: 28rem;
  font-size: 0.9375rem;
  background-color: var(--card);
}

.help-table-wrap th,
.help-table-wrap td {
  text-align: left;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.help-table-wrap th {
  font-weight: 600;
  font-size: 0.8125rem;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: var(--muted-foreground);
}

.help-table-wrap tr:last-child td {
  border-bottom: none;
}

/* ---------- Related and back ---------- */

.help-related {
  margin-top: 3rem;
  padding: 1.5rem;
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.help-related h2 {
  font-size: 1rem;
  margin-bottom: 0.75rem;
}

.help-related ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.help-related a {
  color: var(--primary);
  font-size: 0.9375rem;
  text-decoration: none;
}

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

.help-article-back {
  margin-top: 2rem;
  font-size: 0.9375rem;
}

.help-article-back a {
  color: var(--muted-foreground);
  text-decoration: none;
}

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

@media (max-width: 640px) {
  .help-hub-header h1 {
    font-size: 2rem;
  }

  .help-article-header h1 {
    font-size: 1.75rem;
  }

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