:root {
  --bg: #ffffff;
  --bg-2: #f5f8ff;
  --bg-3: #eef3fb;
  --text: #1a2233;
  --text-dark: #0b1b33;
  --muted: #5c6a85;
  --primary: #0b5fff;
  --primary-dark: #0842b8;
  --accent: #00c2d7;
  --accent-2: #7b61ff;
  --border: #e2e8f7;
  --shadow: 0 8px 32px rgba(11, 31, 51, 0.08);
  --shadow-lg: 0 16px 48px rgba(11, 31, 51, 0.12);
  --radius: 12px;
  --radius-sm: 8px;
  --h2-inset: 0px;
  --wrap: 1200px;
  --header-h: 68px;
  --toc-w: 240px;
  --gap: 32px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--header-h);
  background: rgba(255,255,255,0.94);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
}
.header-inner {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  font-size: 18px;
  color: var(--text-dark);
}
.brand svg { width: 34px; height: 34px; }
.main-nav { display: flex; align-items: center; gap: 6px; }
.main-nav a {
  padding: 8px 14px;
  border-radius: 8px;
  color: var(--text);
  font-size: 15px;
  font-weight: 500;
  transition: background .2s, color .2s;
}
.main-nav a:hover, .main-nav a.active {
  background: var(--bg-2);
  color: var(--primary);
  text-decoration: none;
}
.nav-toggle {
  display: none;
  width: 40px; height: 40px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}

/* Breadcrumb */
.breadcrumb {
  padding: 16px 0 6px;
  font-size: 13px;
  color: var(--muted);
}
.breadcrumb ol {
  list-style: none;
  margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 8px;
}
.breadcrumb li::after { content: "›"; margin-left: 8px; color: #b8c2d8; }
.breadcrumb li:last-child::after { content: none; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--primary); }

/* Main spacing for fixed header */
main { padding-top: var(--header-h); }

/* Hero */
.hero {
  background: linear-gradient(135deg, #f0f6ff 0%, #e8f8ff 100%);
  border-bottom: 1px solid var(--border);
  padding: 64px 0 56px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  right: -10%; top: -30%;
  width: 520px; height: 520px;
  background: radial-gradient(circle, rgba(0,194,215,0.18) 0%, transparent 70%);
  pointer-events: none;
}
.hero h1 {
  font-size: 42px;
  line-height: 1.2;
  margin: 0 0 16px;
  color: var(--text-dark);
}
.hero .lead {
  font-size: 18px;
  color: var(--muted);
  max-width: 680px;
  margin: 0 0 28px;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 15px;
  border: none;
  cursor: pointer;
  transition: transform .15s, box-shadow .2s;
}
.btn:hover { transform: translateY(-1px); text-decoration: none; }
.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, #2b7dff 100%);
  color: #fff;
  box-shadow: 0 8px 22px rgba(11,95,255,0.25);
}
.btn-accent {
  background: linear-gradient(135deg, var(--accent) 0%, #00a7b8 100%);
  color: #fff;
  box-shadow: 0 8px 22px rgba(0,194,215,0.25);
}

/* Section titles */
.section-title {
  font-size: 28px;
  margin: 0 0 8px;
  color: var(--text-dark);
}
.section-sub {
  color: var(--muted);
  margin: 0 0 28px;
}

/* Cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}
.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  transition: transform .2s, box-shadow .2s;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.card h3 { margin: 0 0 10px; font-size: 18px; }
.card p { margin: 0; color: var(--muted); font-size: 14px; }
.card .meta { margin-top: 14px; font-size: 12px; color: var(--accent); font-weight: 600; }

/* Article / Product detail layout */
.doc-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--toc-w);
  gap: var(--gap);
  align-items: start;
  padding: 24px 0 64px;
}
.doc-main {
  max-width: 760px;
}
.doc-main h1 {
  font-size: 34px;
  line-height: 1.25;
  margin: 0 0 16px;
  color: var(--text-dark);
}
.doc-main .summary {
  background: var(--bg-2);
  border-left: 4px solid var(--primary);
  padding: 18px 22px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 0 0 24px;
  color: var(--text);
}
.doc-main .keywords {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 18px;
}
.doc-main .update-time {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 24px;
}
.doc-main h2 {
  font-size: 23px;
  color: var(--text-dark);
  margin: 42px 0 16px;
  padding-left: var(--h2-inset);
  scroll-margin-top: calc(var(--header-h) + 16px);
}
.doc-main h3 {
  font-size: 18px;
  color: var(--text-dark);
  margin: 28px 0 12px;
  scroll-margin-top: calc(var(--header-h) + 16px);
}
.doc-main p {
  margin: 0 0 16px;
}
.doc-main ul, .doc-main ol {
  margin: 0 0 16px;
  padding-left: 24px;
}
.doc-main li { margin-bottom: 6px; }
.doc-main blockquote {
  margin: 0 0 18px;
  padding: 14px 18px;
  background: #f6f9ff;
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--text);
}

/* Tables */
table.data {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 22px;
  font-size: 14px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
table.data th, table.data td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  text-align: left;
}
table.data thead { background: var(--bg-3); }
table.data th { font-weight: 600; color: var(--text-dark); }
table.data tbody tr:last-child td { border-bottom: none; }
table.data tbody tr:hover { background: #fafcff; }

/* TOC */
.toc-aside {
  position: sticky;
  top: calc(var(--header-h) + 24px);
  max-height: calc(100vh - var(--header-h) - 48px);
  overflow-y: auto;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
}
.toc-aside p { font-weight: 700; color: var(--text-dark); margin: 0 0 12px; }
.toc-aside ul {
  list-style: none;
  margin: 0; padding: 0;
  font-size: 14px;
}
.toc-aside li { margin-bottom: 8px; }
.toc-aside a { color: var(--muted); }
.toc-aside a:hover { color: var(--primary); }

/* FAQ bare details */
details {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  margin-bottom: 12px;
}
summary {
  font-weight: 600;
  color: var(--text-dark);
  cursor: pointer;
  list-style: none;
}
summary::-webkit-details-marker { display: none; }
summary::before {
  content: "＋";
  display: inline-block;
  width: 20px; height: 20px;
  line-height: 20px;
  text-align: center;
  border-radius: 50%;
  background: var(--bg-2);
  color: var(--primary);
  margin-right: 10px;
  font-size: 13px;
}
details[open] summary::before { content: "－"; }
details p { margin: 10px 0 0; color: var(--muted); font-size: 14px; }

/* Tag */
.tag-text {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 20px;
  background: var(--bg-2);
  color: var(--primary);
  font-size: 12px;
  font-weight: 500;
}

/* Category list layout */
.list-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 40px;
  padding: 24px 0 64px;
}
.cat-side { position: sticky; top: calc(var(--header-h) + 24px); align-self: start; }
.category-list {
  list-style: none;
  margin: 0; padding: 0;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.category-list li { border-bottom: 1px solid var(--border); }
.category-list li:last-child { border-bottom: none; }
.category-list a {
  display: block;
  padding: 14px 18px;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
}
.category-list a:hover, .category-list a.active {
  background: var(--bg-2);
  color: var(--primary);
  text-decoration: none;
}
.cat-content h1 { font-size: 30px; margin: 0 0 12px; }
.cat-desc { color: var(--muted); margin-bottom: 24px; }

/* List item */
.list-item {
  display: block;
  padding: 22px 0;
  border-bottom: 1px solid var(--border);
}
.list-item h3 { margin: 0 0 8px; font-size: 19px; }
.list-item p { margin: 0; color: var(--muted); font-size: 14px; }
.list-item .meta { margin-top: 10px; font-size: 12px; color: var(--accent); }

/* Floating capsule */
.fab-capsule {
  position: fixed;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 900;
}
.fab-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: 50px;
  border: none;
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  transition: transform .15s;
}
.fab-btn:hover { transform: translateX(-3px); }
.fab-top { background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%); }
.fab-wechat { background: linear-gradient(135deg, #07c160 0%, #05a350 100%); }

/* WeChat modal */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(11,27,51,0.6);
  backdrop-filter: blur(4px);
  z-index: 1100;
  align-items: center;
  justify-content: center;
}
.modal-overlay.show { display: flex; }
.modal-card {
  position: relative;
  background: #fff;
  padding: 12px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}
.modal-card img { display: block; width: 300px; height: 500px; object-fit: contain; }
.modal-close {
  position: absolute;
  top: -14px; right: -14px;
  width: 32px; height: 32px;
  border-radius: 50%;
  border: none;
  background: #fff;
  color: var(--text);
  font-size: 20px;
  line-height: 32px;
  cursor: pointer;
  box-shadow: var(--shadow);
}

/* Footer */
.site-footer {
  background: var(--text-dark);
  color: #aab4c7;
  padding: 48px 0 32px;
  font-size: 14px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 40px;
}
.footer-brand { color: #fff; font-weight: 700; font-size: 18px; margin-bottom: 10px; }
.footer-desc { color: #8a96ad; line-height: 1.7; }
.footer-links h4 { color: #fff; font-size: 14px; margin: 0 0 14px; }
.footer-links ul { list-style: none; margin: 0; padding: 0; }
.footer-links li { margin-bottom: 8px; }
.footer-links a { color: #aab4c7; }
.footer-links a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid #27334d;
  margin-top: 32px;
  padding-top: 20px;
  color: #6e7a94;
  font-size: 13px;
}

/* 404 */
.notfound {
  text-align: center;
  padding: 120px 0;
}
.notfound h1 { font-size: 96px; margin: 0; color: var(--primary); }
.notfound p { color: var(--muted); font-size: 18px; }

/* Page content (leaf pages) */
.page-wrap {
  max-width: 900px;
  margin: 0 auto;
  padding: 24px 24px 64px;
}
.page-wrap h1 { font-size: 34px; margin: 0 0 20px; }
.page-wrap h2 { scroll-margin-top: calc(var(--header-h) + 16px); }

/* Mobile */
@media (max-width: 1024px) {
  .doc-layout { grid-template-columns: 1fr; }
  .toc-aside { display: none; }
  .list-layout { grid-template-columns: 1fr; }
  .cat-side { position: static; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
}
@media (max-width: 768px) {
  :root { --header-h: 60px; }
  .main-nav {
    display: none;
    position: absolute;
    top: var(--header-h);
    left: 0; right: 0;
    background: #fff;
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 12px 24px;
    gap: 4px;
  }
  .main-nav.open { display: flex; }
  .nav-toggle { display: block; }
  .hero h1 { font-size: 28px; }
  .hero { padding: 44px 0 40px; }
  .section-title { font-size: 22px; }
  .doc-main h1 { font-size: 26px; }
  .fab-capsule { right: 12px; }
  .fab-btn { padding: 10px 14px; font-size: 12px; }
}
