/* TabTin 帮助中心
 * 设计取向：纯白底、单栏阅读、大留白，靠字号与间距分层，不靠边框与卡片。
 * 与 index.html / careers 共用 site.css 的排版语言（mono eyebrow、超大标题、pill）。
 */

body.help {
  --hair: rgba(10, 10, 10, 0.07);
  --hair-strong: rgba(10, 10, 10, 0.13);
  --ink-78: rgba(10, 10, 10, 0.78);
  --ink-56: rgba(10, 10, 10, 0.56);
  --ink-40: rgba(10, 10, 10, 0.4);
  --read: 720px;
  --side-w: 264px;
  background: #fff;
  color: var(--ink);
}

/* 全站导航与页脚在白底页面上换成同色系，去掉重描边 */
body.help .nav--sub,
body.help .nav--solid {
  background: rgba(255, 255, 255, 0.86);
  border-bottom: 1px solid var(--hair);
}

body.help .footer {
  background: #fff;
  border-top: 1px solid var(--hair);
}

/* 侧栏常驻在左，页脚要让开它的宽度 */
@media (min-width: 1024px) {
  body.help .footer {
    padding-left: calc(var(--side-w) + var(--pad-x));
  }
}

body.help .footer__legal {
  border-top-color: var(--hair);
}

@media (max-width: 820px) {
  body.help .nav__menu {
    background: rgba(255, 255, 255, 0.97);
    border-bottom-color: var(--hair);
  }

  body.help .nav__links {
    border-bottom-color: var(--hair);
  }
}

/* ── 页面骨架 ── */
.help-page {
  padding: clamp(52px, 9vh, 104px) 0 clamp(80px, 12vh, 140px);
}

@media (min-width: 1024px) {
  .help-page {
    padding-left: var(--side-w);
  }
}

.help-wrap {
  width: min(100% - var(--pad-x) * 2, var(--read));
  margin: 0 auto;
}

/* 英文小标：等宽 + 字距，沿用首页 eyebrow 语言 */
.help-kicker {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-40);
}

/* 中文小标：等宽字距会散，用正文字体压小 */
.help-label {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--ink-40);
}

.help-link {
  color: var(--ink);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-decoration-color: var(--hair-strong);
  text-underline-offset: 4px;
  transition: text-decoration-color 0.15s;
}

.help-link:hover {
  text-decoration-color: var(--ink);
}

.help-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  color: var(--ink-40);
  transition: color 0.15s;
}

.help-back:hover {
  color: var(--ink);
}

/* ── 首页 ── */
.help-hero {
  margin-bottom: clamp(56px, 9vh, 100px);
}

.help-hero__title {
  margin-top: 24px;
  font-size: clamp(38px, 6vw, 62px);
  font-weight: 800;
  letter-spacing: -0.042em;
  line-height: 1.06;
}

.help-hero__lead {
  margin-top: 22px;
  max-width: 30em;
  font-size: 18px;
  line-height: 1.75;
  color: var(--ink-56);
}

.help-search-trigger {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin-top: clamp(32px, 5vh, 48px);
  padding: 14px 2px;
  border: 0;
  border-bottom: 1px solid var(--hair-strong);
  background: transparent;
  font-family: var(--font);
  font-size: 16px;
  color: var(--ink-40);
  text-align: left;
  cursor: text;
  transition: border-color 0.2s, color 0.2s;
}

.help-search-trigger:hover {
  border-bottom-color: var(--ink);
  color: var(--ink-56);
}

.help-search-trigger svg {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
}

.help-search-trigger__kbd {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-40);
}

.help-group + .help-group {
  margin-top: clamp(52px, 8vh, 88px);
}

.help-group__label {
  margin-bottom: 14px;
}

.help-group__list {
  border-top: 1px solid var(--hair);
}

.help-entry {
  display: block;
  padding: 24px 0;
}

.help-entry + .help-entry {
  border-top: 1px solid var(--hair);
}

.help-entry__step {
  display: block;
  margin-bottom: 10px;
  font-size: 10.5px;
  color: var(--ink-24);
}

.help-entry__title {
  display: block;
  font-size: 19.5px;
  font-weight: 650;
  letter-spacing: -0.022em;
  line-height: 1.45;
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: transparent;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  transition: text-decoration-color 0.15s;
}

.help-entry:hover .help-entry__title {
  text-decoration-color: var(--ink);
}

.help-entry__desc {
  display: block;
  margin-top: 7px;
  max-width: 40em;
  font-size: 15px;
  line-height: 1.7;
  color: var(--ink-56);
}

.help-ask {
  margin-top: clamp(64px, 10vh, 112px);
  padding-top: clamp(32px, 5vh, 44px);
  border-top: 1px solid var(--hair);
}

.help-ask h2 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.025em;
}

.help-ask p {
  margin-top: 14px;
  max-width: 34em;
  font-size: 15.5px;
  line-height: 1.8;
  color: var(--ink-56);
}

.help-ask__actions {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: center;
  font-size: 14px;
}

/* ── 文章页布局：正文 · 本页目录（侧栏已脱离文档流常驻在左） ── */
.help-layout {
  width: min(100% - var(--pad-x) * 2, 1000px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}

.help-article {
  min-width: 0;
  max-width: 700px;
  margin: 0 auto;
}

@media (min-width: 1440px) {
  .help-layout {
    grid-template-columns: minmax(0, 1fr) 196px;
    gap: clamp(48px, 5vw, 72px);
    align-items: start;
  }

  .help-layout--no-toc {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ── 侧栏：贴左常驻的全站文档列表 ── */
.help-side {
  position: sticky;
  top: calc(var(--nav-h) + 40px);
  max-height: calc(100vh - var(--nav-h) - 80px);
  overflow-y: auto;
  scrollbar-width: none;
}

@media (min-width: 1024px) {
  .help-side {
    position: fixed;
    top: var(--nav-h);
    left: 0;
    bottom: 0;
    width: var(--side-w);
    max-height: none;
    padding: clamp(44px, 8vh, 88px) 28px clamp(40px, 6vh, 56px) clamp(28px, 4vw, 56px);
    overscroll-behavior: contain;
  }
}

/* 首页正文本身就是完整清单，侧栏不再重复放搜索 */
body[data-help-slug=''] .help-side__search {
  display: none;
}

.help-side::-webkit-scrollbar { display: none; }

.help-side__search {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 0 0 20px;
  border: 0;
  background: transparent;
  font-family: var(--font);
  font-size: 13.5px;
  color: var(--ink-40);
  text-align: left;
  cursor: text;
  transition: color 0.15s;
}

.help-side__search:hover {
  color: var(--ink);
}

.help-side__search svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.help-side__search span {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 10.5px;
}

.help-side__group + .help-side__group {
  margin-top: 22px;
}

.help-side__group-title {
  position: relative;
  display: block;
  padding: 4px 18px 4px 0;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--ink-40);
  cursor: pointer;
  list-style: none;
}

.help-side__group-title::-webkit-details-marker { display: none; }
.help-side__group-title::marker { content: ''; }

.help-side__group-title::after {
  content: '';
  position: absolute;
  right: 4px;
  top: 10px;
  width: 5px;
  height: 5px;
  border-right: 1.4px solid var(--ink-24);
  border-bottom: 1.4px solid var(--ink-24);
  transform: rotate(45deg);
  transition: transform 0.2s var(--ease);
}

.help-side__group[open] .help-side__group-title::after {
  transform: rotate(-135deg);
}

.help-side__links {
  padding: 4px 0 2px;
}

.help-side__link {
  display: block;
  padding: 7px 0;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--ink-56);
  transition: color 0.15s;
}

.help-side__link:hover {
  color: var(--ink);
}

.help-side__link.is-active {
  color: var(--ink);
  font-weight: 650;
}

.help-side__toggle {
  display: none;
}

@media (max-width: 1023px) {
  .help-side {
    position: static;
    max-height: none;
    width: min(100% - var(--pad-x) * 2, var(--read));
    margin: 0 auto clamp(32px, 5vh, 44px);
    padding-bottom: 20px;
    border-bottom: 1px solid var(--hair);
  }


  .help-side__search {
    padding-bottom: 16px;
  }

  .help-side__toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    font-family: var(--font);
    font-size: 13.5px;
    font-weight: 600;
    color: var(--ink);
    text-align: left;
    cursor: pointer;
  }

  .help-side__toggle::after {
    content: '';
    width: 6px;
    height: 6px;
    border-right: 1.4px solid var(--ink-40);
    border-bottom: 1.4px solid var(--ink-40);
    transform: rotate(45deg) translateY(-2px);
    transition: transform 0.2s var(--ease);
  }

  .help-side.is-open .help-side__toggle::after {
    transform: rotate(-135deg) translateY(-2px);
  }

  .help-side__body {
    display: none;
    padding-top: 18px;
  }

  .help-side.is-open .help-side__body {
    display: block;
  }
}

/* ── 文章 ── */
.help-article__head {
  margin-bottom: clamp(40px, 6vh, 64px);
}

.help-article__meta {
  margin-top: 26px;
}

.help-article__title {
  margin-top: 18px;
  font-size: clamp(30px, 3.4vw, 42px);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.13;
}

.help-article__lead {
  margin-top: 22px;
  max-width: 34em;
  font-size: 18px;
  line-height: 1.75;
  color: var(--ink-56);
}

/* ── 正文 ── */
.help-prose {
  font-size: 17px;
  line-height: 1.9;
  color: var(--ink-78);
}

.help-prose > * + * {
  margin-top: 20px;
}

.help-prose h2 {
  margin-top: clamp(48px, 7vh, 68px);
  font-size: clamp(22px, 2.4vw, 26px);
  font-weight: 700;
  letter-spacing: -0.028em;
  line-height: 1.4;
  color: var(--ink);
  scroll-margin-top: calc(var(--nav-h) + 32px);
}

.help-prose h3 {
  margin-top: 40px;
  font-size: 18.5px;
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.5;
  color: var(--ink);
  scroll-margin-top: calc(var(--nav-h) + 32px);
}

.help-prose h2 + *,
.help-prose h3 + * {
  margin-top: 14px;
}

.help-prose strong {
  font-weight: 650;
  color: var(--ink);
}

.help-prose ul,
.help-prose ol {
  padding-left: 1.35em;
}

.help-prose ul { list-style: disc; }
.help-prose ol { list-style: decimal; }

.help-prose li::marker {
  color: var(--ink-40);
}

.help-prose li + li {
  margin-top: 10px;
}

.help-prose li > ul,
.help-prose li > ol {
  margin-top: 8px;
}

.help-prose hr {
  margin: clamp(44px, 6vh, 64px) 0;
  border: 0;
  border-top: 1px solid var(--hair);
}

.help-prose a {
  color: var(--ink);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-decoration-color: var(--hair-strong);
  text-underline-offset: 4px;
  transition: text-decoration-color 0.15s;
}

.help-prose a:hover {
  text-decoration-color: var(--ink);
}

.help-prose code {
  font-family: var(--mono);
  font-size: 0.88em;
  padding: 2px 6px;
  border-radius: 5px;
  background: rgba(10, 10, 10, 0.045);
  word-break: break-word;
}

.help-pre {
  font-family: var(--mono);
  font-size: 13.5px;
  line-height: 1.75;
  padding: 20px 22px;
  border-radius: 12px;
  background: #faf9f7;
  color: var(--ink-78);
  white-space: pre-wrap;
  overflow-x: auto;
}

.help-prose img {
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(10, 10, 10, 0.04), 0 14px 36px rgba(10, 10, 10, 0.07);
}

/* 表格：只留横线，不做外框卡片 */
.help-prose table {
  width: 100%;
  margin-top: 28px;
  border-collapse: collapse;
  font-size: 15px;
}

.help-prose th,
.help-prose td {
  text-align: left;
  vertical-align: top;
  line-height: 1.7;
}

.help-prose th {
  padding: 0 0 12px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--ink-40);
  border-bottom: 1px solid var(--hair-strong);
}

.help-prose td {
  padding: 16px 0;
  border-bottom: 1px solid var(--hair);
}

.help-prose th + th,
.help-prose td + td {
  padding-left: 28px;
}

/* 引用：一条细线，不做色块卡片 */
.help-callout {
  padding-left: 22px;
  border-left: 2px solid var(--brand);
  font-size: 16.5px;
  line-height: 1.85;
  color: var(--ink-56);
}

/* 常见问题：折叠靠分隔线，不靠边框 */
.help-faq {
  margin-top: 8px;
}

.help-faq details {
  border-bottom: 1px solid var(--hair);
}

.help-faq details:first-child {
  border-top: 1px solid var(--hair);
}

.help-faq summary {
  position: relative;
  padding: 20px 32px 20px 0;
  font-size: 16.5px;
  font-weight: 600;
  line-height: 1.6;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
}

.help-faq summary::-webkit-details-marker { display: none; }
.help-faq summary::marker { content: ''; }

.help-faq summary::after {
  content: '';
  position: absolute;
  right: 6px;
  top: 27px;
  width: 7px;
  height: 7px;
  border-right: 1.5px solid var(--ink-40);
  border-bottom: 1.5px solid var(--ink-40);
  transform: rotate(45deg);
  transition: transform 0.2s var(--ease);
}

.help-faq details[open] summary::after {
  transform: rotate(-135deg);
}

.help-faq details > *:not(summary) {
  margin: 0 0 20px;
  font-size: 16px;
  line-height: 1.85;
  color: var(--ink-78);
}

.help-faq details > ul,
.help-faq details > ol {
  padding-left: 1.35em;
}

/* ── 安装步骤 ── */
.help-steps {
  margin-top: clamp(32px, 5vh, 48px);
}

.help-step + .help-step {
  margin-top: clamp(56px, 8vh, 88px);
}

.help-step h2 {
  margin-top: 12px;
  font-size: clamp(21px, 2.3vw, 25px);
  font-weight: 700;
  letter-spacing: -0.028em;
  line-height: 1.4;
  scroll-margin-top: calc(var(--nav-h) + 32px);
}

.help-step p {
  margin-top: 14px;
  max-width: 34em;
  font-size: 16.5px;
  line-height: 1.85;
  color: var(--ink-78);
}

.help-step strong {
  font-weight: 650;
  color: var(--ink);
}

.help-step img,
.substep img {
  width: 100%;
  margin-top: 24px;
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(10, 10, 10, 0.04), 0 14px 36px rgba(10, 10, 10, 0.07);
}

.substeps {
  margin-top: 36px;
}

.substep + .substep {
  margin-top: 44px;
}

.substep h3 {
  font-size: 17.5px;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.substep p {
  margin-top: 12px;
  max-width: 34em;
  font-size: 16px;
  line-height: 1.85;
  color: var(--ink-78);
}

/* ── 本页目录：只在够宽时出现，窄屏让位给正文 ── */
.help-toc {
  display: none;
}

@media (min-width: 1440px) {
  .help-toc {
    display: block;
    position: sticky;
    top: calc(var(--nav-h) + 40px);
    max-height: calc(100vh - var(--nav-h) - 80px);
    overflow-y: auto;
    scrollbar-width: none;
  }

  .help-toc::-webkit-scrollbar { display: none; }
}

.help-toc__label {
  margin-bottom: 10px;
  font-size: 12px;
}

.help-toc a {
  display: block;
  padding: 7px 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-40);
  transition: color 0.15s;
}

.help-toc a:hover {
  color: var(--ink);
}

.help-toc a.is-active {
  color: var(--ink);
  font-weight: 600;
}

.help-toc a.help-toc__sub {
  padding-left: 14px;
  font-size: 12.5px;
}

/* ── 文末：继续读什么 ── */
.help-next {
  margin-top: clamp(72px, 11vh, 120px);
  padding-top: clamp(32px, 5vh, 44px);
  border-top: 1px solid var(--hair);
}

.help-next__label {
  margin-bottom: 14px;
}

.help-next__list {
  border-top: 1px solid var(--hair);
}

.help-next__item {
  display: block;
  padding: 20px 0;
}

.help-next__item + .help-next__item {
  border-top: 1px solid var(--hair);
}

.help-next__item span {
  display: block;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.018em;
  line-height: 1.45;
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: transparent;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  transition: text-decoration-color 0.15s;
}

.help-next__item:hover span {
  text-decoration-color: var(--ink);
}

.help-next__item em {
  display: block;
  margin-top: 6px;
  font-size: 14.5px;
  font-style: normal;
  line-height: 1.65;
  color: var(--ink-56);
}

.help-next__actions {
  margin-top: 32px;
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  align-items: center;
  font-size: 14px;
}

/* ── 搜索浮层 ── */
.help-overlay {
  position: fixed;
  inset: 0;
  z-index: 400;
  display: none;
}

.help-overlay.is-open {
  display: block;
}

.help-overlay__scrim {
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 10, 0.24);
  backdrop-filter: blur(2px);
}

.help-overlay__panel {
  position: relative;
  width: min(100% - 32px, 560px);
  margin: clamp(56px, 13vh, 132px) auto 0;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 2px 8px rgba(10, 10, 10, 0.06), 0 28px 80px rgba(10, 10, 10, 0.2);
  overflow: hidden;
}

.help-overlay__field {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--hair);
}

.help-overlay__field svg {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  color: var(--ink-40);
}

.help-overlay__input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font-family: var(--font);
  font-size: 17px;
  color: var(--ink);
}

.help-overlay__input::placeholder {
  color: var(--ink-40);
}

.help-overlay__hits {
  max-height: min(50vh, 400px);
  overflow-y: auto;
  padding: 8px;
}

.help-hit {
  display: block;
  padding: 12px 14px;
  border-radius: 12px;
}

.help-hit:hover,
.help-hit.is-focused {
  background: rgba(10, 10, 10, 0.04);
}

.help-hit__title {
  display: block;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.45;
  color: var(--ink);
}

.help-hit__meta {
  display: block;
  margin-top: 4px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  color: var(--ink-40);
}

.help-hit__snippet {
  display: block;
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--ink-56);
}

.help-overlay__empty {
  padding: 32px 22px;
  text-align: center;
  font-size: 14px;
  color: var(--ink-40);
}

.help-overlay__foot {
  display: flex;
  gap: 18px;
  padding: 11px 20px;
  border-top: 1px solid var(--hair);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  color: var(--ink-40);
}

@media (max-width: 720px) {
  .help-prose table {
    display: block;
    overflow-x: auto;
  }

  .help-overlay__foot,
  .help-search-trigger__kbd,
  .help-side__search span {
    display: none;
  }
}
