/* ==========================================================================
   静态内容页（/guide/、/about/）
   --------------------------------------------------------------------------
   这两个页面不经过 React，直接由后端静态托管：给搜索引擎与 AI 抓取器
   一份真实存在的 HTML。视觉上沿用用户端的浅色工具语言：白底、1px 描边、
   单一蓝色强调，不引入阴影堆叠。
   ========================================================================== */

:root {
  --ink: #1d1d1f;
  --ink-2: #424245;
  --muted: #6e6e73;
  --faint: #86868b;
  --accent: #0071e3;
  --accent-deep: #0066cc;
  --line: #e5e5ea;
  --line-strong: #d2d2d7;
  --canvas: #f5f5f7;
  --surface: #ffffff;
  --radius: 12px;
  --font-sans: "Inter", "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

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

html {
  color-scheme: light;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--surface);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.78;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent-deep);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  top: -48px;
  left: 16px;
  padding: 8px 14px;
  color: #fff;
  background: var(--ink);
  border-radius: 8px;
  font-size: 13px;
  transition: top 0.15s ease;
}

.skip-link:focus {
  top: 12px;
}

/* ---------- 站点头 ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.82);
  border-bottom: 1px solid var(--line);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
}

.site-header-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  width: min(1120px, calc(100% - 48px));
  height: 64px;
  margin: 0 auto;
}

.site-brand {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 9px;
  color: var(--ink);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.site-brand:hover {
  text-decoration: none;
}

.site-brand img {
  width: 30px;
  height: 30px;
  border-radius: 8px;
}

.site-brand em {
  color: var(--faint);
  font-size: 10px;
  font-style: normal;
  font-weight: 500;
  letter-spacing: 0.1em;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-left: 8px;
  font-size: 13.5px;
}

.site-nav a {
  color: var(--ink-2);
}

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

.site-header-cta {
  margin-left: auto;
  padding: 8px 16px;
  color: #fff;
  background: var(--accent);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}

.site-header-cta:hover {
  background: var(--accent-deep);
  text-decoration: none;
}

/* ---------- 正文骨架 ---------- */

.page-shell {
  width: min(780px, calc(100% - 48px));
  margin: 0 auto;
  padding: 42px 0 84px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 26px;
  color: var(--faint);
  font-size: 12px;
}

.breadcrumb a {
  color: var(--muted);
}

.article-kicker {
  margin: 0 0 12px;
  color: var(--faint);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1 {
  margin: 0 0 18px;
  font-size: clamp(30px, 5vw, 43px);
  font-weight: 650;
  letter-spacing: -0.04em;
  line-height: 1.22;
  text-wrap: balance;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  margin: 0 0 30px;
  color: var(--muted);
  font-size: 12.5px;
}

.article-meta span::before {
  margin-right: 12px;
  color: var(--line-strong);
  content: "·";
}

.article-meta span:first-child::before {
  content: none;
}

.article-lede {
  margin: 0 0 34px;
  padding: 18px 22px;
  color: var(--ink-2);
  background: #f6f9ff;
  border-left: 3px solid var(--accent);
  border-radius: 0 12px 12px 0;
  font-size: 16px;
  line-height: 1.85;
}

.article-lede strong {
  color: var(--ink);
}

.toc {
  margin: 0 0 46px;
  padding: 20px 24px;
  background: #fbfbfd;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.toc h2 {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.toc ol {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px 24px;
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

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

.article-body h2 {
  margin: 52px 0 16px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
  font-size: 25px;
  font-weight: 650;
  letter-spacing: -0.025em;
  line-height: 1.35;
}

.article-body h2:first-of-type {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.article-body h3 {
  margin: 30px 0 10px;
  font-size: 18px;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.article-body p {
  margin: 0 0 17px;
  color: var(--ink-2);
}

.article-body strong {
  color: var(--ink);
  font-weight: 600;
}

.article-body ul,
.article-body ol {
  margin: 0 0 20px;
  padding-left: 22px;
  color: var(--ink-2);
}

.article-body li {
  margin: 7px 0;
}

.article-body li::marker {
  color: var(--faint);
}

.checklist {
  padding-left: 0;
  list-style: none;
}

.checklist li {
  position: relative;
  padding-left: 24px;
}

.checklist li::before {
  position: absolute;
  top: 0;
  left: 0;
  color: var(--accent);
  font-weight: 600;
  content: "✓";
}

.callout {
  margin: 22px 0;
  padding: 16px 20px;
  background: #fffaf3;
  border: 1px solid #f3e2c8;
  border-radius: var(--radius);
  color: #6b4a17;
  font-size: 14px;
  line-height: 1.8;
}

.callout strong {
  color: #4a320d;
}

.table-wrap {
  margin: 22px 0 26px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

th,
td {
  padding: 11px 16px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}

th {
  color: var(--muted);
  background: #fbfbfd;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

tbody tr:last-child td {
  border-bottom: 0;
}

td:first-child {
  color: var(--ink);
  font-weight: 500;
  white-space: nowrap;
}

code {
  padding: 1px 5px;
  color: var(--ink);
  background: var(--canvas);
  border-radius: 5px;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.88em;
}

.article-cta {
  margin: 54px 0 0;
  padding: 34px 30px;
  text-align: center;
  background:
    radial-gradient(ellipse 60% 90% at 50% 0%, rgba(173, 207, 255, 0.55), transparent 68%),
    linear-gradient(135deg, #f4f9ff 0%, #f9fbff 52%, #f7f2ff 100%);
  border: 1px solid #e8f0ff;
  border-radius: 20px;
}

.article-cta h2 {
  margin: 0 0 10px;
  padding: 0;
  border: 0;
  font-size: 24px;
  letter-spacing: -0.03em;
}

.article-cta p {
  margin: 0 auto 20px;
  max-width: 480px;
  color: var(--muted);
  font-size: 14px;
}

.button-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  color: #fff;
  background: var(--accent);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
}

.button-primary:hover {
  background: var(--accent-deep);
  text-decoration: none;
}

.button-ghost {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 14px;
  color: var(--accent-deep);
  font-size: 14px;
}

.related {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 40px 0 0;
  padding: 0;
  list-style: none;
}

.related a {
  display: block;
  height: 100%;
  padding: 16px 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  font-size: 13.5px;
  line-height: 1.6;
  transition: border-color 0.16s ease, background-color 0.16s ease;
}

.related a:hover {
  background: #fbfbfd;
  border-color: var(--line-strong);
  text-decoration: none;
}

.related strong {
  display: block;
  margin-bottom: 4px;
  font-size: 14px;
}

.related span {
  color: var(--muted);
  font-size: 12.5px;
}

/* ---------- 404 ---------- */

.error-page {
  padding-top: 74px;
  padding-bottom: 110px;
  text-align: center;
}

.error-code {
  margin: 0 0 4px;
  color: #e8eef9;
  font-size: clamp(92px, 18vw, 150px);
  font-weight: 700;
  letter-spacing: -0.06em;
  line-height: 1;
}

.error-page h1 {
  margin-bottom: 14px;
}

.error-lead {
  max-width: 520px;
  margin: 0 auto 28px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.85;
}

.error-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.error-actions .button-ghost {
  margin-left: 0;
}

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

.content-footer {
  padding: 30px 0 34px;
  color: var(--muted);
  background: #fbfbfd;
  border-top: 1px solid var(--line);
  font-size: 12px;
  line-height: 1.7;
}

.content-footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  width: min(1120px, calc(100% - 48px));
  margin: 0 auto;
}

.content-footer p {
  margin: 0;
}

.content-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
}

.content-footer a {
  color: var(--ink-2);
}

@media (max-width: 720px) {
  .site-header-inner {
    width: calc(100% - 32px);
    gap: 16px;
  }

  .site-nav {
    gap: 14px;
    font-size: 12.5px;
  }

  .site-brand em {
    display: none;
  }

  .page-shell {
    width: calc(100% - 32px);
    padding: 26px 0 64px;
  }

  .toc ol {
    grid-template-columns: 1fr;
  }

  .related {
    grid-template-columns: 1fr;
  }

  .article-body h2 {
    margin-top: 42px;
    font-size: 22px;
  }

  .article-lede {
    padding: 15px 17px;
    font-size: 15px;
  }

  .article-cta {
    padding: 26px 20px;
  }

  .button-ghost {
    margin: 12px 0 0;
  }

  .content-footer-inner {
    width: calc(100% - 32px);
  }
}

@media (max-width: 520px) {
  .site-nav {
    display: none;
  }

  .article-meta {
    font-size: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
