/* Help center — long-form docs layered on top of the landing's styles.css.
   Everything here is static: no build step, same deployment as the landing. */

/* The page ships both languages in the markup; only the active one renders.
   Keeping both in one file avoids a JS dictionary full of prose, while the
   language toggle still reuses the landing's st_lang preference. */
html[data-lang='zh'] [data-lang='en'],
html[data-lang='en'] [data-lang='zh'] {
  display: none;
}

.nav a[aria-current='page'] {
  color: var(--fg);
  font-weight: 600;
}

.help-main {
  padding: 48px 0 80px;
}

.help-shell {
  display: grid;
  grid-template-columns: 208px minmax(0, 1fr);
  gap: 56px;
  align-items: start;
}

.help-side {
  position: sticky;
  top: 88px;
}

.help-side-title {
  margin: 0 0 10px;
  padding-left: 14px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.help-side nav {
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--border);
}

.help-side a {
  display: block;
  margin-left: -1px;
  padding: 7px 14px;
  border-left: 2px solid transparent;
  color: var(--muted);
  font-size: 14px;
  text-decoration: none;
  transition: color 0.15s, border-color 0.15s;
}

.help-side a:hover,
.help-side a:focus-visible {
  color: var(--fg);
  border-left-color: var(--primary);
}

.help-doc {
  min-width: 0;
  max-width: 760px;
}

.help-doc h1 {
  margin: 6px 0 14px;
  font-size: clamp(28px, 4vw, 36px);
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.help-lead {
  margin: 0;
  font-size: 16px;
  color: var(--muted);
}

.help-doc section {
  margin-top: 36px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
  scroll-margin-top: 88px;
}

.help-doc h2 {
  margin: 0 0 14px;
  font-size: 22px;
  letter-spacing: -0.01em;
}

.help-doc h3 {
  margin: 22px 0 6px;
  font-size: 15.5px;
}

.help-doc p {
  margin: 0 0 10px;
  font-size: 14.5px;
  line-height: 1.75;
}

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

.help-flow {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--primary-soft);
  font-size: 13.5px !important;
  font-weight: 600;
}

.help-actions {
  margin-top: 14px;
}

.help-note {
  margin-top: 20px !important;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--card);
  color: var(--muted);
  font-size: 13.5px;
}

.help-updated {
  margin-top: 30px;
  color: var(--muted);
  font-size: 12.5px;
}

@media (max-width: 900px) {
  .help-main {
    padding: 32px 0 56px;
  }

  .help-shell {
    /* minmax(0, 1fr), not 1fr: the horizontal TOC is a nowrap flex row, and a
       plain 1fr track takes its min-content width, pushing the document past
       the viewport instead of scrolling the chips. */
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
  }

  .help-side {
    position: static;
    min-width: 0;
  }

  .help-side-title {
    padding-left: 0;
    margin-bottom: 8px;
  }

  .help-side nav {
    flex-direction: row;
    gap: 6px;
    padding-bottom: 10px;
    overflow-x: auto;
    border-left: 0;
    border-bottom: 1px solid var(--border);
    -webkit-overflow-scrolling: touch;
  }

  .help-side a {
    margin-left: 0;
    padding: 5px 11px;
    border-left: 0;
    border-radius: 999px;
    background: var(--accent);
    white-space: nowrap;
  }

  .help-side a:hover,
  .help-side a:focus-visible {
    border-left-color: transparent;
  }
}
