:root {
  --std-navy: #0E2233;
  --std-navy-2: #16324b;
  --std-azure: #1C7ED6;
  --std-azure-d: #155fa6;
  --std-copper: #B07A3C;
  --std-bg: #F4F6F9;
  --std-surface: #FFFFFF;
  --std-text: #1A2733;
  --std-muted: #5B6B7B;
  --std-border: #CBD5E1;
  --std-line: #E2E8F0;
  --h2-inset: 16px;
  --radius: 10px;
  --header-h: 64px;
  --maxw: 1200px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  color: var(--std-text);
  background: var(--std-bg);
  line-height: 1.75;
  font-size: 16px;
  padding-top: var(--header-h);
}
a { color: var(--std-azure-d); text-decoration: none; }
a:hover { color: var(--std-azure); }
img { max-width: 100%; }

/* ===== Header ===== */
.std-header {
  position: fixed; top: 0; left: 0; right: 0; height: var(--header-h);
  background: var(--std-navy); color: #fff; z-index: 200;
  box-shadow: 0 2px 10px rgba(0,0,0,.18);
}
.std-header-inner {
  max-width: var(--maxw); margin: 0 auto; height: 100%;
  display: flex; align-items: center; gap: 18px; padding: 0 24px;
}
.std-logo { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 700; }
.std-logo:hover { color: #fff; }
.std-logo-mark {
  background: var(--std-azure); color:#fff; padding: 4px 8px; border-radius: 6px;
  font-size: 13px; letter-spacing: 1px;
}
.std-logo-text { font-size: 16px; }
.std-nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.std-nav > a, .std-nav-parent {
  color: #DCE6F0; padding: 8px 12px; border-radius: 6px; font-size: 14px;
  background: none; border: none; cursor: pointer; font-family: inherit;
}
.std-nav > a:hover, .std-nav-parent:hover { background: var(--std-navy-2); color:#fff; }
.std-nav-group { position: relative; }
.std-nav-sub {
  display: none; position: absolute; top: 100%; left: 0; min-width: 180px;
  background: var(--std-surface); border: 1px solid var(--std-border);
  border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.15); padding: 6px; z-index: 50;
  flex-direction: column;
}
.std-nav-group:hover .std-nav-sub, .std-nav-group.is-open .std-nav-sub { display: flex; }
.std-nav-sub a { color: var(--std-text); padding: 8px 10px; border-radius: 6px; font-size: 13px; }
.std-nav-sub a:hover { background: var(--std-bg); color: var(--std-azure-d); }
.std-nav-toggle { display: none; flex-direction: column; gap: 4px; background: none; border: none; cursor: pointer; margin-left: auto; }
.std-nav-toggle span { width: 22px; height: 2px; background: #fff; display: block; }

/* ===== Layout ===== */
.std-container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.std-layout { display: grid; grid-template-columns: minmax(0,1fr) 260px; gap: 32px; align-items: start; }
.std-list-layout { display: grid; grid-template-columns: 260px minmax(0,1fr); gap: 32px; align-items: start; }
.std-content-main, .std-cat-content, .std-page-main { min-width: 0; padding: 24px var(--h2-inset) 48px; }
.std-page-main { --h2-inset: 48px; padding: 24px 48px 48px; background: var(--std-surface); border-radius: var(--radius); margin-top: 16px; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.std-h1 { font-size: 28px; line-height: 1.3; margin: 0 0 16px; color: var(--std-navy); }

/* ===== Breadcrumb ===== */
.std-breadcrumb { margin: 0 0 16px; font-size: 13px; color: var(--std-muted); }
.std-crumb-list { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; }
.std-crumb-item::after { content: "›"; margin-left: 6px; color: var(--std-border); }
.std-crumb-item:last-child::after { content: ""; }
.std-breadcrumb a { color: var(--std-muted); }
.std-breadcrumb a:hover { color: var(--std-azure-d); }

/* ===== Summary / keywords ===== */
.std-summary {
  background: linear-gradient(180deg,#EAF2FB,#F4F8FC); border-left: 4px solid var(--std-azure);
  padding: 14px 16px; border-radius: 0 8px 8px 0; color: var(--std-text); margin: 0 0 14px; font-size: 15px;
}
.std-keywords { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 10px; }
.std-kw { background: var(--std-navy); color: #fff; font-size: 12px; padding: 3px 10px; border-radius: 999px; }
.std-update-time { font-size: 12px; color: var(--std-muted); margin: 0 0 18px; }

/* ===== Article body ===== */
.std-article-body h2, .std-product-body h2, .std-page-body h2 {
  font-size: 21px; color: var(--std-navy); margin: 30px 0 12px; padding-bottom: 6px; border-bottom: 2px solid var(--std-azure);
}
.std-article-body h3, .std-product-body h3, .std-page-body h3 { font-size: 17px; color: var(--std-navy-2); margin: 22px 0 10px; }
.std-article-body p, .std-product-body p, .std-page-body p { margin: 0 0 14px; }
.std-article-body ul, .std-product-body ul, .std-page-body ul { margin: 0 0 16px; padding-left: 22px; }
.std-article-body li, .std-product-body li, .std-page-body li { margin: 4px 0; }

/* ===== Tables (border coverage incl. bare markdown tables) ===== */
.std-content-main table, .std-product-body table, .std-page-main table, table.std-spec {
  width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 14px; background: var(--std-surface);
}
.std-content-main table th, .std-product-body table th, .std-page-main table th, table.std-spec th {
  background: var(--std-navy); color: #fff; text-align: left; padding: 9px 12px; font-weight: 600; border: 1px solid var(--std-navy);
}
.std-content-main table td, .std-product-body table td, .std-page-main table td, table.std-spec td {
  border: 1px solid var(--std-border); padding: 8px 12px;
}
.std-content-main table tbody tr:nth-child(even), .std-product-body table tbody tr:nth-child(even),
.std-page-main table tbody tr:nth-child(even), table.std-spec tbody tr:nth-child(even) { background: #F7FAFD; }

/* ===== TOC aside ===== */
.std-toc-aside { position: sticky; top: calc(var(--header-h) + 16px); max-height: calc(100vh - 100px); overflow-y: auto; }
.std-toc-panel, .std-cat-panel {
  background: var(--std-surface); border: 1px solid var(--std-border); border-radius: var(--radius); padding: 12px 14px;
}
.std-toc-summary, .std-cat-summary { font-weight: 700; color: var(--std-navy); cursor: pointer; list-style: none; padding: 2px 0; }
.std-toc-summary::-webkit-details-marker, .std-cat-summary::-webkit-details-marker { display: none; }
.std-toc-summary::after { content: "▾"; float: right; color: var(--std-muted); }
.std-toc-panel:not([open]) .std-toc-summary::after, .std-cat-panel:not([open]) .std-cat-summary::after { content: "▸"; }
.std-toc-list, .std-cat-list { list-style: none; margin: 10px 0 0; padding: 0; }
.std-toc-li, .std-cat-li { margin: 0 0 6px; font-size: 13px; }
.std-toc-li a, .std-cat-li a { color: var(--std-muted); display: block; padding: 4px 8px; border-radius: 6px; }
.std-toc-li a:hover, .std-cat-li a:hover { background: var(--std-bg); color: var(--std-azure-d); }
.std-cat-li.is-active > a { background: var(--std-azure); color: #fff; }

/* ===== Category side (list) ===== */
.std-cat-side { position: sticky; top: calc(var(--header-h) + 16px); align-self: start; }

/* ===== List cards ===== */
.std-list-intro { color: var(--std-muted); margin: 0 0 18px; }
.std-card-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.std-card-link {
  display: grid; grid-template-columns: 1fr; gap: 4px; background: var(--std-surface);
  border: 1px solid var(--std-border); border-radius: var(--radius); padding: 16px 18px; color: var(--std-text);
  border-left: 4px solid var(--std-azure);
}
.std-card-link:hover { box-shadow: 0 4px 16px rgba(28,126,214,.15); border-left-color: var(--std-copper); color: var(--std-text); }
.std-card-title { font-weight: 700; color: var(--std-navy); font-size: 16px; }
.std-card-desc { color: var(--std-muted); font-size: 13px; }
.std-card-cat { font-size: 12px; color: var(--std-azure-d); }

/* ===== FAQ ===== */
.std-faq { margin: 28px 0; }
.std-faq-h { font-size: 21px; color: var(--std-navy); border-bottom: 2px solid var(--std-copper); padding-bottom: 6px; margin: 0 0 12px; }
.std-faq details { border: 1px solid var(--std-border); border-radius: 8px; margin: 0 0 10px; background: var(--std-surface); }
.std-faq details > summary { cursor: pointer; padding: 12px 14px; font-weight: 600; color: var(--std-navy); list-style: none; }
.std-faq details > summary::-webkit-details-marker { display: none; }
.std-faq details > summary::before { content: "Q"; color: var(--std-azure); font-weight: 800; margin-right: 8px; }
.std-faq-a { padding: 0 14px 12px; color: var(--std-text); }

/* 裸 <details> FAQ 兼容（faq_dom: bare_details） */
.std-faq > details { border: 1px solid var(--std-border); border-radius: 8px; margin: 0 0 10px; background: var(--std-surface); }
.std-faq > details > summary { cursor: pointer; padding: 12px 14px; font-weight: 600; color: var(--std-navy); list-style: none; }
.std-faq > details > summary::-webkit-details-marker { display: none; }
.std-faq > details > summary::before { content: "Q"; color: var(--std-azure); font-weight: 800; margin-right: 8px; }

/* ===== Related ===== */
.std-related { margin: 28px 0 0; border-top: 1px dashed var(--std-border); padding-top: 18px; }
.std-related-h { font-size: 19px; color: var(--std-navy); margin: 0 0 10px; }
.std-related-list { margin: 0; padding-left: 20px; }
.std-related-list li { margin: 6px 0; }

/* ===== Case study ===== */
.std-case { background: #FFF7EC; border: 1px solid #F0D9B5; border-radius: var(--radius); padding: 14px 16px; margin: 20px 0; }
.std-case-h { font-weight: 700; color: var(--std-copper); margin: 0 0 6px; }
.std-case-body { margin: 0; font-size: 14px; }

/* ===== Pagination ===== */
.std-pagination { display: flex; align-items: center; gap: 12px; margin: 22px 0; }
.std-page-link { padding: 6px 14px; border: 1px solid var(--std-border); border-radius: 6px; background: var(--std-surface); color: var(--std-azure-d); }
.std-page-link.is-disabled { color: var(--std-muted); opacity: .6; }
.std-page-info { color: var(--std-muted); font-size: 13px; }

/* ===== Footer ===== */
.std-footer { background: var(--std-navy); color: #C7D4E0; margin-top: 56px; }
.std-footer-inner { max-width: var(--maxw); margin: 0 auto; padding: 36px 24px 20px; display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 24px; }
.std-footer-h { color: #fff; font-size: 15px; margin: 0 0 12px; }
.std-footer-desc { font-size: 13px; line-height: 1.7; }
.std-footer-list { list-style: none; margin: 0; padding: 0; }
.std-footer-list li { margin: 6px 0; }
.std-footer-list a, .std-footer-contact a { color: #9FB6CC; font-size: 13px; }
.std-footer-contact { font-size: 13px; margin: 4px 0; }
.std-footer-bottom { border-top: 1px solid var(--std-navy-2); padding: 14px 24px; text-align: center; font-size: 12px; color: #8FA6BC; }

/* ===== Floating capsule ===== */
.std-capsule {
  position: fixed; right: 18px; top: 50%; transform: translateY(-50%); z-index: 300;
  display: flex; flex-direction: column; gap: 10px;
}
.std-capsule-btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  width: 56px; height: 56px; border: none; border-radius: 28px; cursor: pointer;
  background: linear-gradient(135deg, var(--std-azure), var(--std-copper)); color: #fff;
  box-shadow: 0 6px 18px rgba(28,126,214,.35); font-size: 11px; font-family: inherit;
}
.std-capsule-btn:hover { filter: brightness(1.06); }
.std-cap-ico { font-size: 18px; line-height: 1; }

/* ===== Wecom card modal ===== */
.std-card-modal { position: fixed; inset: 0; z-index: 400; display: none; }
.std-card-modal.is-open { display: flex; align-items: center; justify-content: center; }
.std-card-mask { position: absolute; inset: 0; background: rgba(14,34,51,.6); }
.std-card-box { position: relative; background: #fff; padding: 10px; border-radius: 12px; box-shadow: 0 12px 40px rgba(0,0,0,.3); }
.std-card-x { position: absolute; top: -12px; right: -12px; width: 30px; height: 30px; border-radius: 50%; border: none; background: var(--std-navy); color: #fff; font-size: 18px; cursor: pointer; }
.std-card-img { display: block; border-radius: 6px; }

/* ===== Home ===== */
.std-hero { background: radial-gradient(1200px 400px at 70% -10%, #1C7ED633, transparent), var(--std-navy); color: #fff; padding: 56px 0 64px; }
.std-hero-inner { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.std-hero-title { font-size: 40px; margin: 0 0 14px; }
.std-hero-sub { font-size: 17px; color: #C7D4E0; max-width: 760px; margin: 0 0 26px; }
.std-hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }
.std-btn { display: inline-block; padding: 11px 22px; border-radius: 999px; font-weight: 600; font-size: 14px; }
.std-btn-primary { background: var(--std-azure); color: #fff; }
.std-btn-primary:hover { background: var(--std-azure-d); color: #fff; }
.std-btn-ghost { background: transparent; color: #fff; border: 1px solid #5C84A8; }
.std-btn-ghost:hover { border-color: #fff; color: #fff; }
.std-section { max-width: var(--maxw); margin: 0 auto; padding: 40px 24px; }
.std-section-h { font-size: 24px; color: var(--std-navy); margin: 0 0 20px; }
.std-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.std-tile { display: flex; flex-direction: column; gap: 6px; background: var(--std-surface); border: 1px solid var(--std-border); border-radius: var(--radius); padding: 18px 20px; color: var(--std-text); border-top: 3px solid var(--std-azure); }
.std-tile:hover { box-shadow: 0 6px 20px rgba(28,126,214,.15); color: var(--std-text); }
.std-tile-2 { border-top-color: var(--std-copper); }
.std-tile-title { font-weight: 700; color: var(--std-navy); font-size: 16px; }
.std-tile-sub { font-size: 13px; color: var(--std-muted); }
.std-home-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.std-line-list { list-style: none; margin: 0; padding: 0; }
.std-line-list li { padding: 9px 0; border-bottom: 1px solid var(--std-line); }
.std-more { display: inline-block; margin-top: 10px; font-weight: 600; }
.std-cta-band { background: var(--std-surface); border-radius: var(--radius); text-align: center; }
.std-cta-text { color: var(--std-muted); max-width: 640px; margin: 0 auto 18px; }

/* ===== Archive ===== */
.std-archive, .std-404 { max-width: var(--maxw); margin: 0 auto; padding: 32px 24px 56px; }
.std-archive-intro { color: var(--std-muted); }
.std-archive-cat { margin: 0 0 22px; }
.std-archive-cat-h { font-size: 17px; color: var(--std-navy); margin: 0 0 8px; }
.std-404 { text-align: center; }
.std-404-text { color: var(--std-muted); }

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .std-nav { display: none; position: absolute; top: var(--header-h); left: 0; right: 0; flex-direction: column; background: var(--std-navy); padding: 12px; gap: 4px; }
  .std-nav.is-open { display: flex; }
  .std-nav-group { position: static; }
  .std-nav-sub { position: static; display: flex; box-shadow: none; border: none; background: var(--std-navy-2); margin: 2px 0; }
  .std-nav-toggle { display: flex; }
  .std-layout, .std-list-layout { grid-template-columns: 1fr; gap: 18px; }
  .std-toc-aside, .std-cat-side { position: static; max-height: none; top: auto; }
  .std-grid-3, .std-home-cols { grid-template-columns: 1fr; }
  .std-footer-inner { grid-template-columns: 1fr 1fr; }
  /* 分类侧栏与目录在手机端不得 display:none：保留为可点击折叠面板 */
  .std-toc-panel, .std-cat-panel { margin-bottom: 14px; }
}
@media (max-width: 640px) {
  .std-footer-inner { grid-template-columns: 1fr; }
  .std-content-main, .std-cat-content { --h2-inset: 12px; padding-left: 12px; padding-right: 12px; }
  .std-page-main { padding: 20px 16px; --h2-inset: 16px; }
  .std-hero-title { font-size: 30px; }
  .std-capsule { right: 10px; }
  .std-capsule-btn { width: 48px; height: 48px; }
}
