:root {
  --help-text: var(--sayplus-text, #111111);
  --help-muted: var(--sayplus-text-muted, #6b6b6b);
  --help-border: var(--sayplus-border, rgba(17, 17, 17, 0.08));
  --help-bg: var(--sayplus-bg-alt, #f7f6f3);
  --help-toc-width: 220px;
}

.sayplus-help-section {
  padding-top: 2.5rem;
  padding-bottom: 4rem;
}

.help-page {
  display: grid;
  grid-template-columns: var(--help-toc-width) minmax(0, 1fr);
  gap: 48px;
  align-items: start;
}

.help-toc {
  position: sticky;
  top: 5.5rem;
}

.help-toc-title {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--help-muted);
  margin: 0 0 12px;
}

.help-toc-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.help-toc-list li {
  margin: 0 0 4px;
}

.help-toc-list a {
  display: block;
  padding: 6px 0 6px 10px;
  margin-left: -10px;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--help-muted);
  text-decoration: none;
  line-height: 1.4;
  border-left: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.help-toc-list a:hover {
  color: var(--help-text);
}

.help-toc-list a.is-active {
  color: var(--help-text);
  font-weight: 600;
  border-left-color: rgb(220, 130, 155);
}

.help-content {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--sayplus-text-body, #334155);
}

.help-header {
  margin-bottom: 8px;
}

.help-header .sayplus-eyebrow {
  margin-bottom: 0.75rem;
}

.help-header h1 {
  font-size: clamp(1.75rem, 3vw, 2.125rem);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 12px;
  color: var(--help-text);
}

.help-lead {
  color: var(--help-muted);
  margin: 0 0 32px;
  max-width: 40rem;
}

.help-section {
  border-top: 1px solid var(--help-border);
  padding-top: 28px;
  margin-top: 28px;
  scroll-margin-top: 5.5rem;
}

.help-section:first-of-type {
  border-top: none;
  padding-top: 0;
  margin-top: 0;
}

.help-section h2 {
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.35;
  margin: 0 0 12px;
  color: var(--help-text);
}

.help-subheading {
  font-size: inherit;
  font-weight: 600;
  line-height: inherit;
  margin: 24px 0 8px;
  color: var(--help-text);
}

.help-section p {
  margin: 0 0 12px;
}

.help-section ul,
.help-section ol {
  margin: 8px 0 12px 20px;
}

.help-section li {
  margin-bottom: 6px;
}

.help-mode-list {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
}

.help-mode-list-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 12px;
}

.help-mode-list-item:last-child {
  margin-bottom: 0;
}

.help-mode-list-item .help-mock-mode-icon {
  flex: 0 0 22px;
  width: 22px;
  margin-top: 3px;
}

.help-mode-list-item .help-mock-mode-icon-lightning {
  width: 13px;
  height: 15px;
}

.help-mode-list-item .help-mock-mode-icon-text {
  font-size: 13px;
}

.help-section a {
  color: var(--help-text);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.help-section a:hover {
  color: #333333;
}

.help-onboarding-block {
  margin: 20px 0 28px;
}

.help-onboarding-block:last-child {
  margin-bottom: 0;
}

.help-onboarding-block > p {
  margin-bottom: 12px;
}

.help-onboarding-block .help-mock {
  margin: 0;
}

.help-faq {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
  margin-bottom: 0;
}

.help-section p.help-faq-followup {
  margin-top: 2.5rem;
}

.help-faq-item {
  border: 1px solid var(--help-border);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.help-faq-item summary {
  padding: 14px 16px;
  font-size: inherit;
  font-weight: 600;
  line-height: inherit;
  color: var(--help-text);
  cursor: pointer;
  list-style: none;
}

.help-faq-item summary::-webkit-details-marker {
  display: none;
}

.help-faq-item summary::after {
  content: "+";
  float: right;
  color: var(--help-muted);
  font-weight: 400;
}

.help-faq-item[open] summary::after {
  content: "−";
}

.help-faq-item ul {
  margin: 0;
  padding: 0 16px 14px 36px;
}

@media (max-width: 768px) {
  .help-page {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .help-toc {
    position: static;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
    border-bottom: 1px solid var(--help-border);
    margin-bottom: 8px;
  }

  .help-toc-list {
    display: flex;
    gap: 8px;
    flex-wrap: nowrap;
    min-width: max-content;
  }

  .help-toc-list li {
    margin: 0;
  }

  .help-toc-list a {
    white-space: nowrap;
    padding: 6px 12px;
    margin-left: 0;
    background: var(--help-bg);
    border-radius: 999px;
    border-left: none;
    font-size: 13px;
  }

  .help-toc-list a.is-active {
    background: #fff;
    box-shadow: inset 0 0 0 1px rgb(220, 130, 155);
  }

  .help-toc-title {
    margin-bottom: 10px;
  }

  .help-section {
    scroll-margin-top: 1.5rem;
  }
}
