/* Tocc Help Center — Brand Stylesheet (forked from signal.css) */

:root {
  --tocc-navy: #1B2A4A;
  --tocc-red: #F84C3D;
  --tocc-red-dark: #e0392e;
  --tocc-teal: #0E8A7E;
  --tocc-white: #FFFFFF;
  --tocc-light-gray: #F5F5F5;
  --tocc-dark-text: #111827;
  --tocc-body-text: #374151;
  --tocc-muted: #6B7280;
  --tocc-lighter-muted: #9CA3AF;
  --tocc-border: #E5E7EB;

  --font-body: 'DM Sans', ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-mono: 'Space Mono', ui-monospace, SFMono-Regular, monospace;
  --font-logo: 'Helvetica Neue', Helvetica, Arial, sans-serif;

  --max-width: 800px;
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  color: var(--tocc-body-text);
  background: var(--tocc-white);
  line-height: 1.7;
}

/* Header */
.help-header {
  background: var(--tocc-navy);
  padding: 16px 24px;
}

.help-header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.help-logo {
  font-family: var(--font-logo);
  font-size: 1.2rem;
  font-weight: 400;
  letter-spacing: -0.01em;
  text-decoration: none;
  line-height: 1;
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.help-logo .at { color: var(--tocc-red); }
.help-logo .text { color: #f0f0eb; }
.help-logo .dot { color: var(--tocc-red); }

.help-label {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--tocc-lighter-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.help-nav-link {
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: #9CA3AF;
  text-decoration: none;
  transition: color 0.15s;
}

.help-nav-link:hover {
  color: #f0f0eb;
}

/* Main content */
.help-main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 48px 24px 80px;
}

/* Page title */
.help-page-title {
  font-family: var(--font-body);
  font-size: 2rem;
  font-weight: 700;
  color: var(--tocc-dark-text);
  margin-bottom: 4px;
}

.help-tagline {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--tocc-muted);
  margin-bottom: 48px;
}

/* Category grid (homepage) */
.help-category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.help-category-card {
  display: block;
  text-decoration: none;
  padding: 24px;
  border: 1px solid var(--tocc-border);
  border-radius: 10px;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.help-category-card:hover {
  border-color: var(--tocc-red);
  box-shadow: 0 2px 8px rgba(248, 76, 61, 0.08);
}

.help-category-title {
  font-family: var(--font-body);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--tocc-dark-text);
  margin-bottom: 4px;
}

.help-category-count {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--tocc-lighter-muted);
  margin-bottom: 12px;
}

.help-category-preview {
  list-style: none;
  font-size: 0.9rem;
  color: var(--tocc-muted);
  line-height: 1.6;
}

.help-category-preview li::before {
  content: "\2192\00a0";
  color: var(--tocc-lighter-muted);
}

.help-category-preview .help-more {
  color: var(--tocc-lighter-muted);
  font-style: italic;
}

.help-category-preview .help-more::before {
  content: "";
}

/* Topic list (category page) */
.help-topic-list {
  list-style: none;
}

.help-topic-item {
  padding: 20px 0;
  border-bottom: 1px solid var(--tocc-border);
}

.help-topic-item:first-child {
  padding-top: 0;
}

.help-topic-item:last-child {
  border-bottom: none;
}

.help-topic-link {
  text-decoration: none;
  display: block;
}

.help-topic-link:hover .help-topic-title {
  color: var(--tocc-red);
}

.help-topic-title {
  font-family: var(--font-body);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--tocc-dark-text);
  line-height: 1.3;
  margin-bottom: 4px;
  transition: color 0.15s;
}

.help-topic-description {
  font-size: 0.9rem;
  color: var(--tocc-muted);
  line-height: 1.5;
}

/* Article (single topic) */
.help-article-title {
  font-family: var(--font-body);
  font-size: 2rem;
  font-weight: 700;
  color: var(--tocc-dark-text);
  line-height: 1.2;
  margin-bottom: 32px;
}

/* Article content */
.help-content h2 {
  font-family: var(--font-body);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--tocc-dark-text);
  margin-top: 48px;
  margin-bottom: 16px;
  line-height: 1.3;
}

.help-content h3 {
  font-family: var(--font-body);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--tocc-dark-text);
  margin-top: 36px;
  margin-bottom: 12px;
}

.help-content p {
  margin-bottom: 20px;
}

.help-content a {
  color: var(--tocc-red);
  text-decoration: underline;
  text-decoration-color: rgba(248, 76, 61, 0.3);
  text-underline-offset: 2px;
  transition: text-decoration-color 0.15s;
}

.help-content a:hover {
  text-decoration-color: var(--tocc-red);
}

.help-content strong {
  font-weight: 700;
  color: var(--tocc-dark-text);
}

.help-content blockquote {
  border-left: 3px solid var(--tocc-red);
  margin: 28px 0;
  padding: 4px 0 4px 20px;
  color: var(--tocc-muted);
  font-style: italic;
}

.help-content blockquote p {
  margin-bottom: 0;
}

.help-content ul, .help-content ol {
  margin-bottom: 20px;
  padding-left: 24px;
}

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

.help-content code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: var(--tocc-light-gray);
  padding: 2px 6px;
  border-radius: 3px;
}

.help-content pre {
  background: var(--tocc-navy);
  color: #e5e7eb;
  padding: 20px 24px;
  border-radius: 8px;
  overflow-x: auto;
  margin-bottom: 24px;
  line-height: 1.5;
}

.help-content pre code {
  background: none;
  padding: 0;
  font-size: 0.85rem;
  color: inherit;
}

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

.help-content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 24px 0;
}

/* Breadcrumb */
.help-breadcrumb {
  margin-bottom: 24px;
}

.help-breadcrumb ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0;
  font-size: 0.85rem;
  color: var(--tocc-lighter-muted);
}

.help-breadcrumb li::after {
  content: "/";
  margin: 0 8px;
  color: var(--tocc-border);
}

.help-breadcrumb li:last-child::after {
  content: "";
  margin: 0;
}

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

.help-breadcrumb a:hover {
  color: var(--tocc-red);
}

.help-breadcrumb li[aria-current="page"] {
  color: var(--tocc-dark-text);
}

/* Topic nav (prev/next) */
.help-topic-nav {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid var(--tocc-border);
}

.help-topic-nav-prev,
.help-topic-nav-next {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  max-width: 48%;
}

.help-topic-nav-next {
  text-align: right;
  margin-left: auto;
}

.help-topic-nav-label {
  font-size: 0.78rem;
  color: var(--tocc-lighter-muted);
  margin-bottom: 4px;
}

.help-topic-nav-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--tocc-dark-text);
  transition: color 0.15s;
}

.help-topic-nav-prev:hover .help-topic-nav-title,
.help-topic-nav-next:hover .help-topic-nav-title {
  color: var(--tocc-red);
}

/* Footer */
.help-footer {
  border-top: 1px solid var(--tocc-border);
  padding: 24px;
  text-align: center;
}

.help-footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  font-size: 0.8rem;
  color: var(--tocc-lighter-muted);
}

.help-footer a {
  color: var(--tocc-lighter-muted);
  text-decoration: none;
}

.help-footer a:hover {
  color: var(--tocc-muted);
}

.help-footer-sep {
  margin: 0 8px;
}

/* Responsive */
@media (max-width: 640px) {
  .help-main {
    padding: 32px 20px 64px;
  }

  .help-page-title {
    font-size: 1.6rem;
  }

  .help-article-title {
    font-size: 1.7rem;
  }

  .help-topic-title {
    font-size: 1.05rem;
  }

  .help-content h2 {
    font-size: 1.3rem;
  }

  .help-tagline {
    margin-bottom: 32px;
  }

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

  .help-topic-nav {
    flex-direction: column;
    gap: 16px;
  }

  .help-topic-nav-next {
    text-align: left;
    margin-left: 0;
  }
}
