:root {
  --bg: #ffffff;
  --text-1: #2f3340;
  --text-2: rgba(47, 51, 64, 0.72);
  --brand-1: #4f46e5;
  --brand-2: #6366f1;
  --brand-3: #a5b4fc;
  --divider: #e5e7eb;
  --gutter: #eef0f4;
  --nav-h: 64px;
  --aside-w: 240px;
  --content-w: 760px;
  --layout-max: 1200px;
  --font: "Inter", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", -apple-system, BlinkMacSystemFont, sans-serif;
  --bulletin-w: 320px;
  --tag-a: #eef2ff;
  --tag-b: #fff1f2;
  --tag-c: #fef3c7;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-1);
  background: var(--bg);
}
a { color: var(--brand-1); text-decoration: none; }
a:hover { color: var(--brand-2); }
img { max-width: 100%; height: auto; display: block; }
ul, ol { padding-left: 1.25rem; }
p, li { color: var(--text-2); }
strong { color: var(--text-1); }

.vp-nav {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--nav-h);
  border-bottom: 1px solid var(--divider);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
}

.vp-navbar {
  max-width: var(--layout-max);
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-1);
  font-weight: 700;
  font-size: 15px;
}

.brand img {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  object-fit: cover;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.icon-btn {
  border: 0;
  background: transparent;
  color: var(--text-1);
  min-width: 40px;
  min-height: 40px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
}

.icon-btn:hover { background: var(--gutter); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 16px;
  border-radius: 980px;
  background: var(--brand-1);
  color: #fff !important;
  font-size: 13px;
  font-weight: 600;
  border: none;
}

.btn:hover { background: var(--brand-2); color: #fff !important; }

.local-nav {
  position: sticky;
  top: var(--nav-h);
  z-index: 30;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  min-height: 48px;
  padding: 0 24px;
  border-bottom: 1px solid var(--divider);
  background: #fff;
}

.local-nav button {
  border: 0;
  background: transparent;
  color: var(--text-2);
  font-size: 14px;
  cursor: pointer;
}

.layout {
  max-width: var(--layout-max);
  margin: 0 auto;
  padding: 28px 24px 64px;
  display: grid;
  grid-template-columns: 1fr var(--aside-w);
  gap: 40px;
  align-items: start;
}

.article { max-width: var(--content-w); }

.breadcrumb {
  border-left: solid 2px var(--brand-1);
  margin-bottom: 1.5rem;
  padding-left: 8px;
  font-size: 14px;
  color: var(--text-2);
}

.breadcrumb a { color: var(--text-2); }
.breadcrumb span { margin: 0 4px; color: #c0c4ce; }

.page-title {
  margin: 0 0 14px;
  font-size: clamp(28px, 4vw, 36px);
  line-height: 1.25;
  letter-spacing: -0.02em;
  font-weight: 700;
  color: var(--text-1);
}

.page-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  align-items: center;
  margin-bottom: 22px;
  font-size: 13px;
  color: var(--text-2);
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.tag.a { background: var(--tag-a); color: #4338ca; }
.tag.b { background: var(--tag-b); color: #be123c; }
.tag.c { background: var(--tag-c); color: #b45309; }

.lead {
  font-size: 16px;
  margin: 0 0 16px;
}

.summary-table {
  width: 100%;
  border-collapse: collapse;
  margin: 18px 0 28px;
  font-size: 14px;
  border: 1px solid var(--divider);
  border-radius: 10px;
  overflow: hidden;
}

.summary-table th,
.summary-table td {
  border-bottom: 1px solid var(--divider);
  padding: 12px 14px;
  text-align: left;
}

.summary-table th {
  width: 28%;
  background: #f8f9fb;
  color: var(--text-1);
  font-weight: 600;
}

.summary-table tr:last-child th,
.summary-table tr:last-child td { border-bottom: none; }

.article h2 {
  margin: 40px 0 14px;
  font-size: 24px;
  font-weight: 700;
  color: var(--text-1);
  scroll-margin-top: 130px;
}

.article h3 {
  margin: 28px 0 10px;
  font-size: 18px;
  font-weight: 700;
  color: var(--text-1);
  scroll-margin-top: 130px;
}

.article h2 a,
.article h3 a { color: inherit; }

.shot {
  margin: 16px 0 24px;
  border: 1px solid var(--divider);
  border-radius: 12px;
  overflow: hidden;
  background: #f8f9fb;
}

.shot img { width: 100%; }

.tip {
  margin: 16px 0;
  padding: 12px 14px;
  border-radius: 10px;
  background: #eef2ff;
  border: 1px solid #c7d2fe;
  color: var(--text-1);
  font-size: 14px;
}

.related {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--divider);
}

.related h2 { margin-top: 0; }

.related-list {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 12px;
}

.related-list a {
  display: block;
  padding: 14px 16px;
  border: 1px solid var(--divider);
  border-radius: 12px;
  color: var(--text-1);
}

.related-list a:hover {
  border-color: var(--brand-3);
  background: #f8f9ff;
}

.related-list .meta {
  margin-top: 6px;
  font-size: 12px;
  color: var(--text-2);
}

.doc-pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 28px;
}

.doc-pager a {
  display: block;
  padding: 16px;
  border: 1px solid var(--divider);
  border-radius: 12px;
  color: var(--text-1);
}

.doc-pager .label {
  display: block;
  font-size: 12px;
  color: var(--text-2);
  margin-bottom: 4px;
}

.page-updated {
  margin-top: 24px;
  font-size: 13px;
  color: var(--text-2);
}

.aside {
  position: sticky;
  top: calc(var(--nav-h) + 64px);
}

.aside-box {
  border-left: 1px solid var(--divider);
  padding-left: 16px;
}

.aside h2 {
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--text-2);
  font-weight: 600;
}

.outline {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.outline a {
  display: block;
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.4;
}

.outline a:hover,
.outline a.active { color: var(--brand-1); }

.outline .sub { padding-left: 12px; }

.site-footer {
  border-top: 1px solid var(--divider);
  padding: 28px 24px 40px;
  color: var(--text-2);
  font-size: 13px;
}

.site-footer .inner {
  max-width: var(--layout-max);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.site-footer a { color: var(--text-2); margin-right: 12px; }

.back-top {
  position: fixed;
  right: 20px;
  bottom: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--divider);
  background: #fff;
  color: var(--brand-1);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
  z-index: 45;
}

.bulletin {
  position: fixed;
  right: 24px;
  bottom: 84px;
  width: var(--bulletin-w);
  max-width: calc(100% - 48px);
  background: #fff;
  border-radius: 14px;
  padding: 16px 16px 18px;
  z-index: 50;
  box-shadow: 0 12px 36px rgba(15, 23, 42, 0.14);
  border: 2px solid transparent;
  background-image:
    linear-gradient(#fff, #fff),
    linear-gradient(135deg, #6366f1, #34d399, #f43f5e);
  background-origin: border-box;
  background-clip: padding-box, border-box;
}

.bulletin h2 {
  margin: 0 28px 10px 0;
  font-size: 16px;
  color: var(--text-1);
}

.bulletin p {
  margin: 0 0 8px;
  font-size: 13px;
  color: var(--text-2);
}

.bulletin .close {
  position: absolute;
  top: 10px;
  right: 10px;
  border: 0;
  background: transparent;
  font-size: 18px;
  cursor: pointer;
  color: var(--text-2);
}

.toc-drawer {
  display: none;
  border-bottom: 1px solid var(--divider);
  background: #fff;
  padding: 12px 24px 18px;
}

.toc-drawer.open { display: block; }

.download-hero {
  max-width: var(--content-w);
  margin: 0 auto;
  padding: 48px 24px 24px;
}

.download-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(28px, 4vw, 36px);
}

.download-hero p {
  margin: 0 0 20px;
  max-width: 640px;
}

.download-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.btn-ghost {
  background: #fff;
  color: var(--text-1) !important;
  border: 1px solid var(--divider);
}

.dl-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  max-width: var(--layout-max);
  margin: 0 auto;
  padding: 0 24px 64px;
}

.dl-card {
  border: 1px solid var(--divider);
  border-radius: 14px;
  padding: 20px;
  background: #fff;
}

.dl-card h3 {
  margin: 0 0 8px;
  font-size: 17px;
  color: var(--text-1);
}

.dl-card p {
  margin: 0 0 16px;
  font-size: 14px;
}

@media (max-width: 960px) {
  .layout { grid-template-columns: 1fr; }
  .aside { display: none; }
  .doc-pager { grid-template-columns: 1fr; }
  .dl-grid { grid-template-columns: 1fr; }
}
