/* Help docs layout — shares brand tokens from ../styles.css */

.help-page {
  background: var(--paper);
}

.help-hero {
  padding: 2.5rem 0 1.75rem;
  background:
    linear-gradient(180deg, #e8f0fb 0%, var(--paper) 100%);
  border-bottom: 1px solid var(--line);
}

.help-kicker {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand-dark);
}

.help-hero h1 {
  margin: 0 0 0.65rem;
  font-size: clamp(1.75rem, 3.5vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.help-lead {
  margin: 0;
  max-width: 36rem;
  color: var(--ink-soft);
  font-size: 1.05rem;
}

.help-layout {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 2.5rem;
  align-items: start;
  padding: 2rem 0 4rem;
}

.help-toc {
  position: sticky;
  top: calc(var(--header-h) + 1rem);
  padding: 0.25rem 0;
}

.toc-title {
  margin: 0 0 0.75rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.help-toc nav {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  border-left: 2px solid var(--line);
}

.help-toc nav a {
  padding: 0.4rem 0 0.4rem 0.9rem;
  margin-left: -2px;
  border-left: 2px solid transparent;
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
}

.help-toc nav a:hover {
  color: var(--brand-dark);
}

.help-toc nav a.is-active {
  color: var(--brand-dark);
  border-left-color: var(--brand);
  font-weight: 600;
}

.toc-mobile-btn {
  display: none;
}

.help-doc {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 3vw, 2.25rem);
  box-shadow: var(--shadow-soft);
}

.help-doc section + section {
  margin-top: 2.75rem;
  padding-top: 2.25rem;
  border-top: 1px solid var(--line);
}

.help-doc h2 {
  margin: 0 0 1rem;
  font-size: 1.45rem;
  scroll-margin-top: calc(var(--header-h) + 1rem);
}

.help-doc h3 {
  margin: 1.5rem 0 0.65rem;
  font-size: 1.08rem;
}

.help-doc p,
.help-doc li {
  color: var(--ink-soft);
}

.help-doc p {
  margin: 0 0 0.85rem;
}

.help-doc ul,
.help-doc ol {
  margin: 0 0 1rem;
  padding-left: 1.25rem;
}

.help-doc li {
  margin-bottom: 0.35rem;
}

.help-doc strong {
  color: var(--ink);
  font-weight: 600;
}

.help-doc code {
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 0.88em;
  background: var(--paper);
  padding: 0.1em 0.35em;
  border-radius: 3px;
  border: 1px solid var(--line);
}

.callout {
  margin: 1rem 0 1.25rem;
  padding: 0.9rem 1rem;
  background: #eef5ff;
  border-left: 3px solid var(--brand);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.callout-warn {
  background: #fffbeb;
  border-left-color: #d4a017;
}

.callout strong {
  display: block;
  margin-bottom: 0.25rem;
  color: var(--ink);
}

.callout p {
  margin: 0;
}

.error-dl {
  margin: 0 0 1rem;
}

.error-dl dt {
  margin-top: 0.85rem;
  font-weight: 600;
  color: var(--ink);
}

.error-dl dt a {
  color: var(--brand-dark);
  text-decoration: none;
}

.error-dl dt a:hover {
  text-decoration: underline;
}

.error-dl dd {
  margin: 0.25rem 0 0;
  color: var(--ink-soft);
}

.feature-table {
  display: grid;
  margin: 1rem 0 1.25rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  font-size: 0.95rem;
}

.feature-row {
  display: grid;
  grid-template-columns: 6.5rem 3.5rem 1fr;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
}

.feature-row:first-child {
  border-top: none;
}

.feature-row.head {
  background: var(--paper);
  font-weight: 600;
  color: var(--ink);
}

.feature-row span:first-child {
  color: var(--ink);
  font-weight: 600;
}

.help-doc details {
  margin-bottom: 0.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 1rem;
  background: var(--paper);
}

.help-doc details summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--ink);
  padding: 0.85rem 0;
  list-style: none;
}

.help-doc details summary::-webkit-details-marker {
  display: none;
}

.help-doc details summary::after {
  content: "+";
  float: right;
  color: var(--brand);
  font-family: var(--font-display);
}

.help-doc details[open] summary::after {
  content: "–";
}

.help-doc details p {
  margin: 0 0 0.95rem;
  padding-right: 1.25rem;
}

@media (max-width: 900px) {
  .help-layout {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding-top: 1.25rem;
  }

  .help-toc {
    position: static;
    top: auto;
  }

  .toc-title {
    display: none;
  }

  .help-toc nav {
    display: none;
    border-left: none;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 0.5rem;
    margin-bottom: 0.5rem;
  }

  .help-toc nav.is-open {
    display: flex;
  }

  .help-toc nav a {
    border-left: none;
    margin-left: 0;
    padding: 0.55rem 0.75rem;
  }

  .help-toc nav a.is-active {
    background: #eef5ff;
    border-radius: 4px;
  }

  .toc-mobile-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 42px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--white);
    font-family: var(--font-body);
    font-weight: 600;
    color: var(--ink);
    cursor: pointer;
  }

  .feature-row {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }

  .feature-row.head {
    display: none;
  }
}

/* Standalone error / article pages */
.article-wrap {
  padding: 1.5rem 0 4rem;
  max-width: 720px;
}

.article-doc {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 1.75rem 1.5rem 2rem;
  box-shadow: var(--shadow-soft);
}

.article-crumb {
  margin: 0 0 1.25rem;
  font-size: 0.88rem;
  color: var(--ink-soft);
}

.article-crumb a {
  color: var(--brand-dark);
  text-decoration: none;
}

.article-crumb a:hover {
  text-decoration: underline;
}

.article-doc h2 {
  margin: 1.5rem 0 0.65rem;
  font-size: 1.15rem;
}

.article-doc h2:first-of-type {
  margin-top: 0.5rem;
}

.article-doc p,
.article-doc li {
  color: var(--ink-soft);
  line-height: 1.75;
}

.article-doc ul,
.article-doc ol {
  margin: 0.5rem 0 0;
  padding-left: 1.2rem;
}
