/* CyberMaki · 站点样式
   零依赖、零构建、零外部请求。字体走系统栈 —— 在 Apple 设备上拿到的就是 SF Pro 本体，
   不下载任何 webfont，页面即时可读，也不向第三方发出请求（这一点对一个讲隐私的站点很重要）。 */

:root {
  --bg:        #ffffff;
  --bg-alt:    #f5f5f7;
  --text:      #1d1d1f;
  --text-2:    #6e6e73;
  --link:      #0066cc;
  --hairline:  #d2d2d7;
  --nav-bg:    rgba(255, 255, 255, 0.72);
  --shadow:    0 4px 24px rgba(0, 0, 0, 0.08);

  --container: 980px;
  --prose:     692px;
  --nav-h:     48px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:       #000000;
    --bg-alt:   #1d1d1f;
    --text:     #f5f5f7;
    --text-2:   #86868b;
    --link:     #2997ff;
    --hairline: #424245;
    --nav-bg:   rgba(0, 0, 0, 0.72);
    --shadow:   0 4px 24px rgba(0, 0, 0, 0.5);
  }
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue",
               "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 17px;
  line-height: 1.47;
  letter-spacing: -0.012em;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 22px;
}

/* ---------- 导航（半透明磨砂 + 一根 hairline） ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  background: var(--nav-bg);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--hairline);
}

.nav .container {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.nav-brand:hover { text-decoration: none; opacity: 0.7; }
.nav-brand img { width: 20px; height: 20px; border-radius: 5px; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 14px;
}
.nav-links a { color: var(--text-2); white-space: nowrap; }
.nav-links a:hover { color: var(--text); text-decoration: none; }
.nav-links a[aria-current="page"] { color: var(--text); }

/* ---------- 首页 hero ---------- */

.hero {
  text-align: center;
  padding: 88px 0 72px;
}

.hero-icon {
  width: 128px;
  height: 128px;
  border-radius: 28px;
  box-shadow: var(--shadow);
  margin-bottom: 32px;
}

h1 {
  margin: 0;
  font-size: clamp(40px, 7vw, 72px);
  line-height: 1.06;
  font-weight: 600;
  letter-spacing: -0.018em;
  text-wrap: balance;
}

.hero-sub {
  margin: 20px auto 0;
  max-width: 640px;
  font-size: clamp(19px, 2.2vw, 24px);
  line-height: 1.4;
  font-weight: 400;
  color: var(--text-2);
  letter-spacing: -0.01em;
  /* 中文没有词间空格，浏览器可在任意字符处断行，balance 会把「扫描」这类词拆开。
     短句改由 <br> 控制断点，长句（英文）仍靠自然换行。 */
  text-wrap: pretty;
}

.hero-note {
  margin-top: 28px;
  font-size: 15px;
  color: var(--text-2);
}

/* ---------- 通用分节 ---------- */

.section { padding: 88px 0; }
.section-alt { background: var(--bg-alt); }

.section-title {
  margin: 0 0 12px;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.1;
  font-weight: 600;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.section-lede {
  margin: 0 auto;
  max-width: var(--prose);
  color: var(--text-2);
  font-size: 19px;
  line-height: 1.42;
}

.center { text-align: center; }

.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px 40px;
  margin-top: 56px;
}
.feature h3 {
  margin: 0 0 8px;
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.012em;
}
.feature p {
  margin: 0;
  color: var(--text-2);
  font-size: 16px;
  line-height: 1.5;
}

/* ---------- 文档页（政策 / 支持） ---------- */

.doc-header {
  padding: 72px 0 40px;
  border-bottom: 1px solid var(--hairline);
}
.doc-header h1 { font-size: clamp(34px, 5.5vw, 56px); }
.doc-meta {
  margin: 16px 0 0;
  color: var(--text-2);
  font-size: 15px;
}

/* 默认单列。两列布局只给带目录的文档页（见下方 .has-toc）——
   支持页只有 <main> 一个子元素，若无条件套用两列，它会落进 200px 的目录列被压扁。 */
.doc-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
  padding: 48px 0 96px;
}

.toc { display: none; }

.toc-inner {
  position: sticky;
  top: calc(var(--nav-h) + 32px);
  font-size: 14px;
  line-height: 1.5;
}
.toc-inner h2 {
  margin: 0 0 12px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-2);
}
.toc-inner ol {
  margin: 0;
  padding: 0;
  list-style: none;
  border-left: 1px solid var(--hairline);
}
.toc-inner li { margin: 0; }
.toc-inner a {
  display: block;
  padding: 6px 0 6px 14px;
  margin-left: -1px;
  border-left: 1px solid transparent;
  color: var(--text-2);
}
.toc-inner a:hover { color: var(--text); text-decoration: none; }
.toc-inner a.is-current {
  color: var(--text);
  border-left-color: var(--link);
}

.prose { max-width: var(--prose); }
.prose > * { margin-inline: 0; }
.prose h2 {
  margin: 56px 0 16px;
  font-size: 27px;
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: -0.014em;
  scroll-margin-top: calc(var(--nav-h) + 24px);
}
.prose h2:first-child { margin-top: 0; }
.prose h3 {
  margin: 32px 0 10px;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.prose p { margin: 0 0 16px; }
.prose ul { margin: 0 0 16px; padding-left: 22px; }
.prose li { margin: 0 0 8px; }
.prose strong { font-weight: 600; }
.prose .lede { font-size: 19px; color: var(--text-2); line-height: 1.45; }

/* 强调块：用于「唯一一次网络请求」这类必须看见的说明 */
.callout {
  margin: 24px 0;
  padding: 20px 22px;
  background: var(--bg-alt);
  border-radius: 14px;
  font-size: 16px;
  line-height: 1.5;
}
.callout p:last-child { margin-bottom: 0; }

/* FAQ */
.faq { max-width: var(--prose); }
.faq details {
  border-bottom: 1px solid var(--hairline);
  padding: 20px 0;
}
.faq details:first-of-type { border-top: 1px solid var(--hairline); }
.faq summary {
  cursor: pointer;
  list-style: none;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.012em;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  color: var(--text-2);
  font-weight: 400;
  font-size: 24px;
  line-height: 1;
  transition: transform 0.2s ease;
}
.faq details[open] summary::after { content: "–"; }
.faq details > *:not(summary) { margin-top: 12px; }
.faq p { margin: 0 0 12px; color: var(--text-2); font-size: 16px; line-height: 1.55; }
.faq p:last-child { margin-bottom: 0; }

/* ---------- 页脚 ---------- */

.footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--hairline);
  padding: 40px 0;
  font-size: 13px;
  color: var(--text-2);
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  padding-bottom: 20px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--hairline);
}
.footer a { color: var(--text-2); }
.footer a:hover { color: var(--text); text-decoration: none; }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  justify-content: space-between;
}

/* ---------- 响应式 ---------- */

@media (max-width: 833px) {
  .section { padding: 60px 0; }
  .features { grid-template-columns: 1fr; gap: 36px; }
  .doc-layout { padding: 36px 0 72px; }
  .doc-header { padding: 48px 0 32px; }
}

@media (min-width: 1024px) {
  .doc-layout.has-toc { grid-template-columns: 200px 1fr; gap: 64px; }
  .has-toc .toc { display: block; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
