/* 用户协议页 — 独立页面，对齐官网主题 */

.site-legal-terms.site-standalone .site-page {
  overflow: visible;
}

.site-legal-terms .site-standalone-main {
  width: min(960px, calc(100% - 32px));
  padding: clamp(32px, 6vh, 56px) 0 64px;
}

.terms-page {
  animation: siteRise 0.75s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.terms-header {
  margin-bottom: 32px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--site-line);
}

.terms-brand {
  margin-bottom: 20px;
  text-decoration: none;
  color: inherit;
}

.terms-title {
  margin: 0 0 10px;
  font-family: var(--site-font-display);
  font-size: clamp(28px, 5vw, 36px);
  font-weight: 800;
  letter-spacing: var(--site-tracking-normal);
  line-height: 1.2;
}

.terms-intro {
  margin: 0;
  max-width: 36em;
  color: var(--site-muted);
  font-size: 15px;
  line-height: 1.65;
}

.terms-meta {
  margin: 12px 0 0;
  color: var(--site-muted);
  font-size: 13px;
}

.terms-layout {
  display: grid;
  gap: 28px;
  align-items: start;
}

.terms-toc {
  padding: 20px;
  border: 1px solid var(--site-line);
  border-radius: var(--site-radius-lg);
  background: var(--site-surface);
}

.terms-toc-title {
  margin: 0 0 14px;
  color: var(--site-ink);
  font-family: var(--site-font-display);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.terms-toc-list {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: toc;
}

.terms-toc-list li {
  counter-increment: toc;
}

.terms-toc-list a {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: var(--site-muted);
  font-size: 13px;
  line-height: 1.45;
  text-decoration: none;
  transition: color 0.15s ease;
}

.terms-toc-list li:last-child a {
  border-bottom: 0;
  padding-bottom: 0;
}

.terms-toc-list a::before {
  content: counter(toc, decimal-leading-zero);
  flex: 0 0 auto;
  color: var(--site-accent);
  font-family: var(--site-font-display);
  font-size: 11px;
  font-weight: 800;
}

.terms-toc-list a:hover {
  color: var(--site-ink);
}

.terms-doc {
  padding: 28px 32px 32px;
  border: 1px solid var(--site-line);
  border-radius: var(--site-radius-lg);
  background: var(--site-surface);
  box-shadow: var(--site-shadow);
}

.terms-doc-lead {
  margin-bottom: 8px;
  padding: 18px 20px;
  border-radius: var(--site-radius);
  border: 1px solid rgba(200, 243, 29, 0.14);
  background: rgba(200, 243, 29, 0.05);
}

.terms-doc-lead p {
  margin: 0;
  color: var(--site-muted);
  font-size: 14px;
  line-height: 1.75;
}

.terms-doc-lead p + p {
  margin-top: 10px;
}

.terms-section {
  padding: 24px 0;
  border-bottom: 1px solid var(--site-line);
}

.terms-section:last-of-type {
  border-bottom: 0;
  padding-bottom: 0;
}

.terms-section h2 {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 16px;
  font-family: var(--site-font-display);
  font-size: 17px;
  font-weight: 800;
  letter-spacing: var(--site-tracking-normal);
  color: var(--site-ink);
  line-height: 1.4;
}

.terms-section-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border-radius: var(--site-radius);
  background: var(--site-accent-soft);
  color: var(--site-accent);
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
}

.terms-section-label {
  display: block;
  flex: 1;
  min-width: 0;
  line-height: inherit;
}

.terms-section p,
.terms-section li {
  margin: 0 0 10px;
  color: var(--site-muted);
  font-size: 14px;
  line-height: 1.75;
}

.terms-section ol,
.terms-section ul {
  margin: 0;
  padding-left: 1.4em;
}

.terms-section li + li {
  margin-top: 6px;
}

.terms-section strong {
  color: var(--site-ink);
  font-weight: 700;
}

.terms-section a {
  color: var(--site-accent);
  text-decoration: none;
  font-weight: 600;
}

.terms-section a:hover {
  text-decoration: underline;
}

.terms-doc-footer {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--site-line);
  color: var(--site-muted);
  font-size: 14px;
  line-height: 1.65;
}

@media (min-width: 860px) {
  .terms-layout {
    grid-template-columns: 240px 1fr;
    gap: 32px;
    align-items: start;
  }

  .terms-toc {
    position: sticky;
    top: clamp(20px, 3vh, 32px);
    align-self: start;
    z-index: 2;
    max-height: calc(100dvh - clamp(40px, 6vh, 64px));
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: rgba(200, 243, 29, 0.35) transparent;
  }

  .terms-toc::-webkit-scrollbar {
    width: 6px;
  }

  .terms-toc::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(200, 243, 29, 0.35);
  }
}

@media (max-width: 859px) {
  .terms-toc {
    display: none;
  }

  .terms-doc {
    padding: 22px 20px 24px;
  }

  .terms-section h2 {
    align-items: flex-start;
    font-size: 16px;
    line-height: 1.45;
  }

  .terms-section-label {
    padding-top: max(0px, calc((32px - 1.45em) / 2));
    line-height: 1.45;
  }
}

@media (max-width: 480px) {
  .site-legal-terms .site-standalone-main {
    width: calc(100% - 24px);
    padding: 20px 0 40px;
  }

  .terms-header {
    margin-bottom: 20px;
    padding-bottom: 20px;
  }
}
