:root {
  color-scheme: light;
  --bg: #f7f8f5;
  --surface: #ffffff;
  --surface-muted: #eef6ff;
  --text: #1f2723;
  --muted: #637068;
  --border: #dbe7f3;
  --accent: #0984E3;
  --accent-strong: #0b66c3;
  --code-bg: #17201c;
  --code-text: #eef7f2;
  --shadow: 0 18px 45px rgba(9, 132, 227, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", Arial, sans-serif;
  line-height: 1.7;
}

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

a:hover {
  text-decoration: underline;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  min-height: 72px;
  padding: 0 32px;
  background: rgba(247, 248, 245, 0.92);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(14px);
}

.brand,
.site-header nav {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

.brand {
  color: var(--text);
  font-weight: 700;
}

.brand-logo {
  display: inline-grid;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  object-fit: contain;
}

.site-header nav a {
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

.site-header nav .nav-benefit {
  color: var(--accent);
}

.docs-shell {
  display: grid;
  grid-template-columns: minmax(240px, 310px) minmax(0, 1fr);
  align-items: start;
  max-width: 1440px;
  margin: 0 auto;
}

.sidebar {
  position: sticky;
  top: 72px;
  height: calc(100vh - 72px);
  overflow: auto;
  border-right: 1px solid var(--border);
}

.sidebar-inner {
  padding: 28px 22px 40px;
}

.sidebar-title {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.sidebar section + section {
  margin-top: 24px;
}

.category-link {
  display: inline-block;
  margin-bottom: 8px;
  color: var(--text);
  font-weight: 700;
}

.sidebar ol {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.sidebar li a {
  display: block;
  padding: 6px 8px;
  border-radius: 6px;
  color: var(--muted);
  font-size: 14px;
}

.sidebar li a:hover,
.sidebar li a[aria-current="page"] {
  background: var(--surface-muted);
  color: var(--accent);
  text-decoration: none;
}

main {
  min-width: 0;
  padding: 48px min(6vw, 72px) 80px;
}

.docs-hero,
.category-page,
.article-page,
.not-found {
  max-width: 980px;
}

.docs-hero {
  padding-bottom: 36px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  color: var(--text);
  line-height: 1.25;
  letter-spacing: 0;
}

h1 {
  max-width: 760px;
  font-size: 42px;
}

.docs-hero > p:not(.eyebrow),
.category-page > p,
.article-header p,
.not-found > p {
  max-width: 760px;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 17px;
}

.search-panel {
  position: relative;
  max-width: 760px;
  margin: 28px 0 0;
}

.search-panel label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.search-panel input {
  width: 100%;
  min-height: 52px;
  padding: 0 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  outline: none;
  box-shadow: var(--shadow);
}

.search-panel input:focus {
  border-color: var(--accent);
}

.search-results {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 8px);
  z-index: 10;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.search-results a,
.empty-result {
  display: block;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}

.search-results a:last-child {
  border-bottom: 0;
}

.search-results span,
.doc-card span,
.article-switcher span {
  display: block;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
}

.search-results strong,
.doc-card strong {
  display: block;
  margin-top: 3px;
  color: var(--text);
  font-size: 17px;
}

.search-results p,
.doc-card p,
.empty-result {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.category-panel {
  margin-top: 34px;
  padding-top: 34px;
  border-top: 1px solid var(--border);
}

.category-heading {
  display: grid;
  gap: 6px;
  margin-bottom: 18px;
}

.category-heading p,
.category-heading span {
  margin: 0;
  color: var(--muted);
}

.category-heading p {
  font-size: 13px;
  font-weight: 700;
}

.category-heading h2,
.category-page h1 {
  font-size: 30px;
}

.doc-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.doc-list.roomy {
  margin-top: 28px;
}

.doc-card {
  min-height: 150px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: inherit;
}

.doc-card:hover {
  border-color: rgba(9, 132, 227, 0.45);
  text-decoration: none;
  box-shadow: var(--shadow);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
  color: var(--muted);
  font-size: 14px;
  overflow-wrap: anywhere;
}

.breadcrumb a::after {
  content: "/";
  margin-left: 8px;
  color: var(--muted);
}

.article-header {
  padding-bottom: 26px;
  border-bottom: 1px solid var(--border);
}

.article-header time {
  display: block;
  margin-top: 14px;
  color: var(--muted);
  font-size: 14px;
}

.source-link {
  display: inline-block;
  margin-top: 4px;
}

.member-benefit {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  max-width: 820px;
  margin: 24px 0 0;
  padding: 18px;
  border: 1px solid rgba(9, 132, 227, 0.28);
  border-radius: 8px;
  background: #f0f7ff;
}

.member-benefit strong {
  display: block;
  color: var(--text);
  font-size: 16px;
}

.member-benefit p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.member-benefit a {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
}

.member-benefit a:hover {
  text-decoration: none;
  background: #0876cc;
}

.article-content {
  max-width: 820px;
  padding-top: 24px;
  font-size: 16px;
  overflow-wrap: anywhere;
}

.article-content h2,
.article-content h3,
.article-content h4 {
  margin-top: 30px;
  margin-bottom: 10px;
}

.article-content h2 {
  font-size: 26px;
}

.article-content h3 {
  font-size: 21px;
}

.article-content p,
.article-content ul,
.article-content ol,
.article-content blockquote,
.article-content pre {
  margin: 16px 0;
}

.article-content ul,
.article-content ol {
  padding-left: 24px;
}

.article-content li + li {
  margin-top: 6px;
}

.article-content img {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 620px;
  margin: 22px 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}

.media-frame {
  display: block;
  max-width: 100%;
}

.media-fallback {
  display: block;
  max-width: 100%;
  margin: 18px 0;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-muted);
  color: var(--muted);
  font-size: 14px;
  overflow-wrap: anywhere;
}

.article-content blockquote {
  padding: 2px 0 2px 18px;
  border-left: 4px solid var(--accent);
  color: var(--muted);
}

.article-content code {
  padding: 2px 5px;
  border-radius: 5px;
  background: var(--surface-muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.92em;
  word-break: break-word;
}

.article-content pre {
  max-width: 100%;
  overflow: auto;
  padding: 18px;
  border-radius: 8px;
  background: var(--code-bg);
  color: var(--code-text);
}

.article-content pre code {
  padding: 0;
  background: transparent;
  color: inherit;
}

.article-switcher {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  max-width: 820px;
  margin-top: 42px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.article-switcher a {
  min-height: 96px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font-weight: 700;
  overflow-wrap: anywhere;
}

.article-switcher a:hover,
.primary-link:hover {
  border-color: rgba(9, 132, 227, 0.45);
  text-decoration: none;
}

.primary-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: 24px;
  padding: 0 18px;
  border: 1px solid var(--accent);
  border-radius: 8px;
  color: var(--accent);
  font-weight: 700;
}

@media (max-width: 920px) {
  .site-header {
    padding: 0 18px;
  }

  .site-header nav {
    gap: 12px;
    flex-wrap: wrap;
  }

  .docs-shell {
    display: block;
  }

  .sidebar {
    display: none;
  }

  main {
    padding: 34px 18px 56px;
  }

  h1 {
    font-size: 32px;
  }

  .doc-list,
  .article-switcher {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
    padding: 14px 18px;
  }

  .brand-logo {
    width: 30px;
    height: 30px;
  }

  .member-benefit {
    align-items: flex-start;
    flex-direction: column;
  }

  .docs-hero > p:not(.eyebrow),
  .category-page > p,
  .article-header p {
    font-size: 16px;
  }

  h1 {
    font-size: 28px;
  }

  .search-results {
    position: static;
    margin-top: 8px;
  }
}
