/* ============================================================
   网联模块 · 统一基础样式 (module-style.css)
   所有 connectivity 模块 HTML 通过 <link> 引用本文件。
   修改本文件即可全局统一生效。
   基准：NETWORK 架构文档全量样式 + CC 评审风险标签变体。
   ============================================================ */

:root {
  --accent:#0f766e;
  --accent-dark:#1e40af;
  --ink:#17211f;
  --muted:#64748b;
  --line:#dbe4df;
  --surface:#ffffff;
  --surface2:#f6fbf8;
  --surface-2:#f8fafc;
  --card:#ffffff;
  --blue:#2563eb;
  --purple:#7c3aed;
  --orange:#f97316;
  --warn:#f97316;
  --danger:#dc2626;
  --risk:#dc2626;
  --ok:#16a34a;
  --bg:#eef6f1;
  --shadow:0 14px 34px rgba(15,118,110,.08),0 2px 8px rgba(15,23,42,.05);
  --mermaid-font-size:10px;
  /* ---- extra custom properties merged from bespoke dashboards/module docs ---- */
  --accent-2:#0f766e;      /* teal accent used by 00-summary phase tags */
  --brand:#0f766e;         /* brand color (device-cloud, ota component docs) */
  --brand-2:#2563eb;       /* secondary brand blue */
  --surface-soft:#f6fbf8;  /* soft surface tint (ota review docs) */
}
* { box-sizing:border-box; }
html,body { width:100%; }
html { background:var(--bg); color:var(--ink); }
body {
  margin:0;
  color:var(--ink);
  background:var(--bg);
  font-family:"Avenir Next","PingFang SC","Microsoft YaHei","Segoe UI",Roboto,sans-serif;
  font-size:15px;
  line-height:1.68;
  overflow-wrap:break-word;
  text-rendering:optimizeLegibility;
  -webkit-font-smoothing:antialiased;
}
a { color:var(--accent); text-decoration:none; }
a:hover { text-decoration:underline; }

/* 自适应铺满宽屏 / 曲面屏：不再固定 1240px */
.wrap { width:100%; max-width:min(3000px,96vw); margin:0 auto; padding:22px clamp(16px,3vw,56px) 60px; }
main { background:transparent; }

.nav,.hero,.section { border:1px solid var(--line); border-radius:18px; background:var(--surface); box-shadow:var(--shadow); }
.nav { display:flex; justify-content:space-between; align-items:center; gap:12px; margin-bottom:16px; padding:12px 16px; background:rgba(255,255,255,.86); }
.nav strong { display:block; }
.nav span { color:var(--muted); font-size:13px; }
.nav a { display:inline-flex; min-height:34px; align-items:center; padding:6px 11px; border:1px solid var(--line); border-radius:999px; background:#fff; color:var(--accent); font-size:13px; font-weight:700; }

.hero { margin-bottom:18px; padding:34px 34px 30px; border-color:#bde5d7; background:linear-gradient(135deg,#ffffff 0%,#f4fbf7 62%,#e6f4ed 100%); }
.hero .eyebrow,.eyebrow { display:inline-flex; margin-bottom:8px; color:var(--accent); font-size:12px; font-weight:900; letter-spacing:.13em; text-transform:uppercase; }

h1 { margin:0 0 10px; font-size:32px; line-height:1.2; letter-spacing:0; }
h2 { margin:28px 0 14px; padding:10px 14px; border-left:5px solid var(--accent); border-radius:0 10px 10px 0; background:linear-gradient(90deg,#effaf5,#fff); color:var(--ink); font-size:22px; line-height:1.34; letter-spacing:0; }
h3 { margin:20px 0 8px; color:#115e59; font-size:17px; line-height:1.35; letter-spacing:0; }
h4 { margin:18px 0 6px; color:var(--ink); font-size:15px; line-height:1.35; letter-spacing:0; }
h5,h6 { margin:16px 0 6px; color:var(--ink); font-size:14px; line-height:1.35; letter-spacing:0; }
p,ul,ol { margin:8px 0 12px; }
ul,ol { padding-left:22px; }
li { margin:4px 0; }
li::marker { color:var(--accent); }
strong { color:var(--ink); font-weight:700; }
.hero p,.sub { margin:0; color:var(--muted); max-width:96ch; font-size:14px; }

.toc,#TOC { margin:0 0 18px; padding:14px 18px; background:var(--surface); border:1px solid var(--line); border-radius:12px; box-shadow:var(--shadow); }
.toc h3 { margin:0 0 12px; font-size:15px; color:var(--muted); letter-spacing:.05em; }
.toc ul,.toc ol,#TOC ul { columns:2; padding-left:18px; margin-bottom:0; }
.toc li,#TOC li { break-inside:avoid; margin:5px 0; }
.toc a,#TOC a { color:var(--accent-dark); text-decoration:none; }
.toc a:hover { text-decoration:underline; }
.toc > a { display:inline-flex; margin:4px 8px 4px 0; padding:5px 10px; border:1px solid var(--line); border-radius:999px; background:var(--surface-2); color:var(--ink); font-size:13px; }
.toc-l2 { margin-left:8px; font-size:13px; }
.toc-l3 { margin-left:14px; font-size:13px; }

.section { margin-top:18px; padding:22px 24px; }

.callout { margin:14px 0; padding:14px 16px; border:1px solid #bde5d7; border-left:5px solid var(--accent); border-radius:12px; background:#f3fbf7; box-shadow:var(--shadow); }
.callout p { margin:6px 0; }
.callout.ok { border-color:#bbf7d0; border-left-color:var(--ok); background:#f0fdf4; }
.callout.warn { border-color:#fed7aa; border-left-color:#f97316; background:#fff8ed; }
.callout.risk,.callout.danger { border-color:#fecaca; border-left-color:var(--danger); background:#fff5f5; }

.grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:13px; }
.grid.two { grid-template-columns:repeat(2,minmax(0,1fr)); }
.card,.box,.panel { padding:14px 15px; border:1px solid var(--line); border-radius:14px; background:var(--surface2); box-shadow:none; }
.card strong,.box strong,.panel strong { display:block; margin-bottom:4px; color:#115e59; }

.pill-row,.pills { display:flex; flex-wrap:wrap; gap:8px; margin:14px 0 0; }
.pill,.flag { display:inline-flex; min-height:26px; align-items:center; padding:3px 10px; border:1px solid #bde5d7; border-radius:999px; background:#f0fbf7; color:#0f5f59; font-size:12px; font-weight:800; letter-spacing:0; }
.pill.blue,.flag.blue { border-color:#bfdbfe; background:#eff6ff; color:#1d4ed8; }
.pill.orange,.flag.orange,.pill.warn { border-color:#fed7aa; background:#fff7ed; color:#c2410c; }
.pill.ok { color:#166534; }
.pill.danger { color:#991b1b; }

/* 评审风险等级标签（CC 评审文档） */
.tag { display:inline-block; padding:2px 10px; border-radius:999px; font-size:12.5px; font-weight:700; white-space:nowrap; }
.tag.hi { background:#fdecec; color:var(--risk); }
.tag.mid { background:#fff3e6; color:var(--warn); }
.tag.lo { background:#eafaf0; color:var(--ok); }
.tag.blue { border:1px solid #bfdbfe; background:#eff6ff; color:#1d4ed8; }

.figure { margin:16px 0; padding:14px; border:1px solid var(--line); border-radius:16px; background:linear-gradient(180deg,#fff,#f6fbf8); box-shadow:var(--shadow); }
.caption,.mini { margin-top:8px; color:var(--muted); font-size:12px; }
.diagram-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; margin-top:14px; }
.diagram-card { min-width:0; padding:14px; border:1px solid var(--line); border-radius:16px; background:#fff; box-shadow:var(--shadow); }
.diagram-card.wide { grid-column:1 / -1; }
.diagram-card h3 { margin:0 0 8px; font-size:16px; }
.diagram-card .caption { margin:8px 0 0; }

.table-wrap { overflow-x:auto; margin:14px 0; border:1px solid var(--line); border-radius:12px; background:#fff; box-shadow:var(--shadow); }
table { width:100%; border-collapse:collapse; margin:14px 0; overflow:hidden; border:1px solid var(--line); border-radius:12px; background:#fff; box-shadow:var(--shadow); font-size:13.5px; }
.table-wrap table { min-width:760px; margin:0; border:0; border-radius:0; box-shadow:none; }
th,td { padding:10px 12px; border-top:1px solid var(--line); text-align:left; vertical-align:top; }
th { border-top:0; background:#e7f5ef; color:#123d38; font-weight:700; white-space:nowrap; }
tbody tr:nth-child(even) { background:#f8fcfa; }
tr:last-child td { border-bottom:none; }

code { padding:2px 6px; border-radius:6px; background:#e8f1ed; color:#0f312d; font-family:"SF Mono","JetBrains Mono",Consolas,monospace; font-size:.92em; }
pre { margin:14px 0; padding:16px 18px; overflow-x:auto; border-radius:14px; background:#10201d; color:#dff7ef; box-shadow:var(--shadow); font-size:13px; line-height:1.55; }
pre code { padding:0; background:transparent; color:inherit; font-size:inherit; }
blockquote { margin:14px 0; padding:12px 16px; background:#fff8ed; border-left:5px solid var(--orange); color:#7c2d12; border-radius:0 10px 10px 0; }
blockquote p { margin:0; }
img,svg { max-width:100%; height:auto; }
img { display:block; border-radius:12px; box-shadow:var(--shadow); }
hr { border:0; height:1px; background:linear-gradient(to right,transparent,var(--line),transparent); margin:32px 0; }
.source-list li { word-break:break-word; }
.module-doc main > h1:first-of-type,main > h1:first-child,body > h1:first-child,#title-block-header { display:none; }

.foot,.footer { margin-top:28px; padding:16px; text-align:center; color:var(--muted); font-size:12px; border-top:1px solid var(--line); }
.totop { position:fixed; right:20px; bottom:20px; width:38px; height:38px; display:flex; align-items:center; justify-content:center; border-radius:50%; background:var(--accent); color:#fff !important; text-decoration:none !important; box-shadow:0 4px 12px rgba(15,118,110,.34); opacity:.88; z-index:20; }
.totop:hover { opacity:1; }

div.sourceCode { overflow:auto; }
.sourceCode { background:transparent; }
.summary .box,.decision,.boundary,.glossary,.metric,.timeline,.stage,.flow,.risk,.budget,.matrix { border-color:var(--line) !important; border-radius:14px !important; box-shadow:var(--shadow) !important; }

/* 超宽屏 / 曲面屏增强 */
@media (min-width:1500px) {
  body { font-size:16px; }
  .toc ul,.toc ol,#TOC ul { columns:3; }
}
@media (max-width:980px) {
  .grid,.grid.two,.diagram-grid { grid-template-columns:1fr; }
  .diagram-card.wide { grid-column:auto; }
  .nav { align-items:flex-start; flex-direction:column; }
  .hero { padding:26px 22px; }
  h1 { font-size:26px; }
  table { display:block; overflow-x:auto; white-space:nowrap; }
  .table-wrap table { display:table; }
  td { white-space:normal; min-width:180px; }
  .toc ul,.toc ol,#TOC ul { columns:1; }
}
@media (max-width:760px) {
  .wrap { padding:14px 12px 44px; }
  h1 { font-size:24px; }
  h2 { font-size:19px; }
  .section { padding:18px 16px; }
  .totop { right:12px; bottom:12px; }
}

/* 代码折叠块（NETWORK 架构文档） */
.markdown-code {
  margin:14px 0;
  border:1px solid var(--line, #dbe4df);
  border-radius:12px;
  background:#ffffff;
  box-shadow:var(--shadow, 0 1px 2px rgba(15,23,42,.04));
  overflow:hidden;
}
.markdown-code summary {
  display:flex;
  align-items:center;
  gap:8px;
  min-height:40px;
  padding:9px 12px;
  cursor:pointer;
  user-select:none;
  list-style:none;
  background:#f6fbf8;
  color:#0f312d;
  font-family:"SF Mono","JetBrains Mono",Consolas,monospace;
  font-size:12px;
  font-weight:700;
}
.markdown-code summary::-webkit-details-marker { display:none; }
.markdown-code summary::before {
  content:"›";
  display:inline-flex;
  width:16px;
  height:16px;
  align-items:center;
  justify-content:center;
  color:var(--accent, #0f766e);
  font-size:16px;
  line-height:1;
  transform:rotate(0deg);
  transition:transform .16s ease;
}
.markdown-code[open] summary::before { transform:rotate(90deg); }
.markdown-code pre,
.markdown-code div.sourceCode {
  margin:0 !important;
  border:0 !important;
  border-radius:0 !important;
  box-shadow:none !important;
}
.markdown-code pre {
  background:#10201d !important;
  color:#dff7ef !important;
  padding:16px 18px !important;
  overflow:auto !important;
}
.markdown-code pre code {
  background:transparent !important;
  color:inherit !important;
  padding:0 !important;
}
.markdown-code[open]::after {
  content:"```";
  display:block;
  padding:6px 12px 9px;
  background:#f6fbf8;
  color:#64748b;
  font-family:"SF Mono","JetBrains Mono",Consolas,monospace;
  font-size:12px;
}


/* ===================================================================
   BESPOKE PAGE CLASSES — merged from per-page inline styles
   (dashboards & infographics: brand/feishu/gantt/fish-bone/mind/etc.)
   These classes are NOT part of the canonical base + design system above.
   Canonical base/design-system rules (body, .wrap, .hero, .section, .nav,
   .toc, .card, .callout, .pill, .grid, .tag, table, h1-h6, .markdown-code,
   media queries, etc.) are preserved as-is and intentionally win; only
   selectors targeting bespoke classes are appended here.
   =================================================================== */


/* ---- from 00-summary.html.css ---- */
.brand { display: grid; gap: 2px; }
.brand small { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; }
.brand strong { font-size: 18px; }
.links { display: flex; flex-wrap: wrap; gap: 10px; }
.links a { text-decoration: none; color: var(--ink); padding: 8px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface-2); font-size: 14px; }
.links a.active { color: #fff; border-color: var(--accent); background: var(--accent); }
.summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 18px; }
.summary .box { padding: 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); }
.summary strong { display: block; margin-bottom: 6px; font-size: 15px; }
.summary p { margin: 0; font-size: 13px; color: var(--muted); }
.section .idx { display: inline-block; font-size: 12px; font-weight: 700; color: var(--accent); letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 4px; }
td.sys { background: #f0f7ff; font-weight: 600; color: #1e3a8a; white-space: nowrap; }
.pill.kingdee { background: #dbeafe; color: #1e40af; }
.pill.feishu { background: #dcfce7; color: #166534; }
.pill.new { background: #fee2e2; color: #991b1b; }
.pill.must { background: #fef3c7; color: #92400e; }
.qa { display: inline-block; width: 14px; height: 14px; line-height: 14px; text-align: center; border-radius: 50%; background: #0b5cab; color: #fff; font-size: 10px; font-weight: 700; cursor: help; margin: 0 1px; vertical-align: super; position: relative; top: -1px; }
.qa:hover { background: #1e40af; }
.qa::after { content: attr(data-tip); position: absolute; bottom: 140%; left: 50%; transform: translateX(-50%); background: #1d2a33; color: #fff; padding: 6px 10px; border-radius: 6px; font-size: 12px; font-weight: 400; width: max-content; max-width: 280px; opacity: 0; pointer-events: none; transition: opacity 0.08s; z-index: 100; white-space: normal; text-align: left; line-height: 1.4; box-shadow: 0 4px 12px rgba(0,0,0,0.18); }
.qa:hover::after { opacity: 1; }
.glossary { background: #f8fafb; border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin: 12px 0; font-size: 13px; }
.glossary strong.h { color: var(--accent); display: block; margin-bottom: 6px; }
.glossary dl { display: grid; grid-template-columns: 80px 1fr; gap: 4px 12px; margin: 6px 0 0; }
.glossary dt { font-weight: 700; color: var(--ink); }
.glossary dd { margin: 0; color: var(--muted); }
.decision { margin-top: 14px; padding: 12px 14px; border-radius: 10px; background: #f0fdf4; border: 1px solid #86efac; color: #14532d; font-size: 13px; }
.decision strong { color: #166534; }
.boundary { margin-top: 14px; padding: 12px 14px; border-radius: 10px; background: #fff7ed; border: 1px dashed #f59e0b; color: #7c2d12; font-size: 13px; }
.boundary strong { color: #92400e; }
.phase-tag { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; color: #fff; background: var(--accent); margin-bottom: 6px; }
.phase-tag.p2 { background: var(--warn); }
.phase-tag.p3 { background: var(--accent-2); }
.phase-tag.p4 { background: #475569; }
@media (max-width: 960px) {
  .summary { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  .summary { grid-template-columns: 1fr; }
}
details.glossary > summary { cursor: pointer; font-weight: 700; color: #2563eb; padding: 6px 0; list-style: none; }
details.glossary > summary::-webkit-details-marker { display: none; }
details.glossary > summary::before { content: "▶ "; font-size: 11px; color: #2563eb; transition: transform 0.15s; display: inline-block; }
details.glossary[open] > summary::before { transform: rotate(90deg); }
details.glossary > summary:hover { color: #1e40af; }
.brand { display: block !important; }
.brand small { display: block !important; color: var(--muted) !important; font-size: 12px !important; letter-spacing: 0.08em !important; text-transform: uppercase !important; }
.brand strong { display: block !important; color: var(--ink) !important; font-size: 15px !important; line-height: 1.35 !important; }
.links { display: flex !important; flex-wrap: wrap !important; gap: 8px !important; }
.links a { text-decoration: none !important; color: var(--ink) !important; padding: 7px 11px !important; border: 1px solid var(--line) !important; border-radius: 999px !important; background: var(--surface-2) !important; font-size: 13px !important; line-height: 1.35 !important; }
.links a.active { color: #fff !important; border-color: var(--accent) !important; background: var(--accent) !important; }
.links a:hover { border-color: var(--accent) !important; color: var(--accent) !important; text-decoration: none !important; }
.links a.active:hover { color: #fff !important; }
.decision, .boundary, .glossary, .metric, .timeline, .stage, .flow, .budget, .matrix { border-color: var(--line) !important; border-radius: 10px !important; box-shadow: var(--shadow) !important; }
.summary .box { background: var(--surface) !important; }
.module-doc main > h1:first-of-type { display: none; }
.doc-picker { display: grid; grid-template-columns: minmax(280px, 1fr) auto; gap: 12px; align-items: end; padding: 16px; margin-bottom: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); }
.doc-picker label { display: grid; gap: 6px; color: var(--muted); font-size: 13px; font-weight: 700; }
.doc-picker select { width: 100%; min-height: 42px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); color: var(--ink); font: inherit; }
.doc-action { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; padding: 8px 14px; border-radius: 8px; border: 1px solid var(--accent); background: var(--accent); color: #fff !important; text-decoration: none !important; font-weight: 700; font-size: 14px; white-space: nowrap; }
.doc-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.doc-meta .pill { display: inline-flex; min-height: 24px; align-items: center; padding: 2px 9px; border: 1px solid var(--line); background: var(--surface-2); color: var(--muted); font-size: 12px; font-weight: 700; }
.doc-meta .ok { background: #dcfce7; color: #166534; border-color: #86efac; }
.doc-meta .warn { background: #fef3c7; color: #92400e; border-color: #fcd34d; }
.viewer-shell { overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); }
.viewer-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.viewer-title { margin: 0 !important; font-size: 16px !important; line-height: 1.35 !important; color: var(--ink) !important; }
.viewer-path { color: var(--muted); font-size: 12px; word-break: break-all; text-align: right; }
iframe.doc-frame { display: block; width: 100%; height: min(78vh, 920px); min-height: 680px; border: 0; background: #fff; }
@media (max-width: 900px) {
  .doc-picker { grid-template-columns: 1fr; }
  .doc-action { width: 100%; }
  .viewer-head { align-items: flex-start; flex-direction: column; }
  .viewer-path { text-align: left; }
}
@media (max-width: 720px) {
  iframe.doc-frame { height: 72vh; min-height: 560px; }
}

/* ---- from 01-infra.html.css ---- */
.summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 18px; }
.summary p { margin: 0; font-size: 14px; color: var(--muted); }
.grid-2, .grid-3, .grid-4 { display: grid; gap: 12px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.phase { padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.phase h3 { margin: 0 0 8px; font-size: 16px; }
.phase ul { margin: 0; color: var(--muted); font-size: 14px; }
.pill.have { background: #dcfce7; color: #166534; }
.pill.buy { background: #dbeafe; color: #1e40af; }
.pill.build { background: #fef3c7; color: #92400e; }
@media (max-width: 960px) {
  .summary, .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}
.glossary dl { display: grid; grid-template-columns: 110px 1fr; gap: 4px 12px; margin: 6px 0 0; }
.phase-split { display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: 11px; font-weight: 700; margin-left: 6px; vertical-align: middle; white-space: nowrap; }
.phase-split.p1 { background: #dcfce7; color: #166534; }
.phase-split.p2 { background: #fef3c7; color: #92400e; }

/* ---- from 02-rd-it.html.css ---- */
.grid-2, .grid-3, .grid-4, .grid-5 { display: grid; gap: 12px; }
.grid-5 { grid-template-columns: repeat(5, 1fr); }
.phase { padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); position: relative; }
.phase .ph-tag { position: absolute; top: -10px; left: 14px; background: var(--accent); color: #fff; font-size: 12px; font-weight: 700; padding: 2px 10px; border-radius: 999px; }
.phase.p3 .ph-tag { background: var(--accent-2); }
.phase.p2 .ph-tag { background: var(--warn); }
.phase h3 { margin: 6px 0 8px; font-size: 16px; }
.flag.neutral { background: #475569; }
.pill.mes { background: #fef3c7; color: #92400e; }
.flow { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; padding: 10px 12px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; font-size: 13px; margin-top: 8px; }
.flow span.node { padding: 4px 10px; border-radius: 6px; background: #fff; border: 1px solid var(--line); }
.flow span.node.accent { background: #dbeafe; border-color: #93c5fd; color: #1e3a8a; }
.flow span.arr { color: var(--muted); }
.flow span.note { color: var(--muted); font-size: 12px; width: 100%; margin-top: 4px; }
.quality-card { padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); display: grid; gap: 8px; }
.quality-card .qhead { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.quality-card h4 { margin: 0; font-size: 15px; }
.quality-card .qmeta { font-size: 12px; color: var(--muted); }
.quality-card ol, .quality-card ul { margin: 0; color: var(--muted); font-size: 13px; }
.glossary strong { color: var(--accent); }
.glossary dl { display: grid; grid-template-columns: 100px 1fr; gap: 4px 12px; margin: 6px 0 0; }
.phase-split { display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: 11px; font-weight: 700; margin-left: 8px; vertical-align: middle; }
.legend { display: flex; flex-wrap: wrap; gap: 12px; font-size: 12px; color: var(--muted); padding: 8px 0; }
.legend span { display: inline-flex; align-items: center; gap: 4px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; }
@media (max-width: 960px) {
  .summary, .grid-2, .grid-3, .grid-4, .grid-5 { grid-template-columns: 1fr; }
}

/* ---- from 06-after-sales-quality.html.css ---- */
.glossary dl { display: grid; grid-template-columns: 90px 1fr; gap: 4px 12px; margin: 6px 0 0; }

/* ---- from 07-phase1-plan.html.css ---- */
.brand small { display: block; color: var(--muted); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; }
.brand strong { display: block; font-size: 15px; }
.links { display: flex; flex-wrap: wrap; gap: 8px; }
.links a { text-decoration: none; color: var(--ink); padding: 7px 11px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface-2); font-size: 13px; }
.links a:hover { border-color: var(--accent); color: var(--accent); }
.links a.active:hover { color: #fff; }
.summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 16px; }
.summary .box { padding: 12px 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); }
.summary strong { display: block; margin-bottom: 4px; font-size: 14px; color: var(--accent); }
.pill.infra { background: #dbeafe; color: #1e40af; }
.pill.ai { background: #fef3c7; color: #92400e; }
.pill.c { background: #dcfce7; color: #166534; }
.pill.aft { background: #fee2e2; color: #991b1b; }
.pill.mfg { background: #f3e8ff; color: #6b21a8; }
.mind { display: grid; grid-template-columns: 1fr; gap: 12px; }
.mind-root { background: linear-gradient(135deg, var(--accent), var(--accent-dark)); color: #fff; padding: 14px 18px; border-radius: 12px; font-weight: 700; font-size: 17px; text-align: center; box-shadow: 0 4px 12px rgba(37,99,235,0.3); }
.mind-branches { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.mind-branch { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 12px; box-shadow: var(--shadow); }
.mind-branch h4 { margin: 0 0 8px; font-size: 14px; padding: 6px 10px; border-radius: 6px; color: #fff; }
.mind-branch.infra h4 { background: #2563eb; }
.mind-branch.ai h4 { background: #f59e0b; }
.mind-branch.c h4 { background: #16a34a; }
.mind-branch.aft h4 { background: #dc2626; }
.mind-branch.mfg h4 { background: #9333ea; }
.mind-branch ul { margin: 0; padding-left: 18px; font-size: 12.5px; line-height: 1.5; }
.mind-branch li { margin: 3px 0; }
.mind-branch li strong { color: var(--ink); }
.swim { margin-top: 8px; border: 1px dashed var(--line); border-radius: 8px; padding: 6px 8px 8px; background: #fafbff; }
.swim-head { display: inline-block; font-size: 11.5px; font-weight: 700; padding: 2px 8px; border-radius: 4px; margin-bottom: 4px; color: #fff; }
.swim-head.self { background: #2563eb; }
.swim-head.saas { background: #0ea5e9; }
.mind-branch.infra .swim + .swim { margin-top: 10px; }
.gantt-wrap { overflow-x: auto; }
.gantt { min-width: 1100px; width: 100%; border-collapse: collapse; font-size: 12.5px; table-layout: fixed; }
.gantt th, .gantt td { border: 1px solid var(--line); padding: 5px 4px; text-align: center; font-size: 12px; }
.gantt thead th:first-child, .gantt tbody td:first-child { text-align: left; padding-left: 8px; position: sticky; left: 0; background: var(--surface); z-index: 1; min-width: 230px; }
.gantt thead th { background: #1d2a33; color: #fff; font-weight: 600; }
.gantt tbody tr:nth-child(even) td:first-child { background: var(--surface-2); }
.gantt .bar { display: inline-block; height: 18px; border-radius: 4px; line-height: 18px; color: #fff; font-size: 10px; font-weight: 600; padding: 0 6px; }
.gantt .bar.infra { background: linear-gradient(90deg, #2563eb, #1e40af); }
.gantt .bar.ai { background: linear-gradient(90deg, #f59e0b, #d97706); }
.gantt .bar.c { background: linear-gradient(90deg, #16a34a, #15803d); }
.gantt .bar.aft { background: linear-gradient(90deg, #dc2626, #991b1b); }
.gantt .bar.mfg { background: linear-gradient(90deg, #9333ea, #6b21a8); }
.gantt .milestone { color: var(--danger); font-weight: 700; }
.gantt tr.group td { background: #f1f5f9; font-weight: 700; color: var(--ink); }
.fish-wrap { overflow-x: auto; padding: 8px 0; }
.fish { display: grid; grid-template-columns: 1fr; min-width: 980px; }
.fish-spine { position: relative; height: 360px; margin: 20px 0; }
.fish-spine::before { content: ""; position: absolute; left: 80px; right: 80px; top: 50%; height: 4px; background: var(--accent); transform: translateY(-50%); }
.fish-head { position: absolute; right: 0; top: 50%; transform: translateY(-50%); background: var(--danger); color: #fff; padding: 10px 14px; border-radius: 8px; font-weight: 700; font-size: 13px; max-width: 160px; line-height: 1.3; box-shadow: 0 4px 12px rgba(220,38,38,0.3); }
.fish-bone { position: absolute; width: 200px; padding: 8px 10px; border-radius: 8px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); font-size: 12px; }
.fish-bone strong { display: block; color: var(--accent-dark); font-size: 13px; margin-bottom: 4px; }
.fish-bone ul { margin: 0; padding-left: 16px; line-height: 1.5; color: var(--muted); }
.fish-bone li { margin: 2px 0; }
.fish-bone.top { top: 0; }
.fish-bone.bot { bottom: 0; }
.fish-bone::after { content: ""; position: absolute; width: 2px; background: var(--accent); }
.fish-bone.top::after { bottom: -40px; left: 50%; height: 40px; }
.fish-bone.bot::after { top: -40px; left: 50%; height: 40px; }
.fish-tail { position: absolute; left: 0; top: 50%; transform: translateY(-50%); background: #1d2a33; color: #fff; padding: 6px 10px; border-radius: 6px; font-size: 11px; font-weight: 600; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; margin: 8px 0 14px; font-size: 12px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend .swatch { width: 18px; height: 12px; border-radius: 3px; display: inline-block; }
@media (max-width: 960px) {
  .mind-branches { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .mind-branches { grid-template-columns: 1fr; }
}

/* ---- from 08-iot-architecture.html.css ---- */
pre.flow { background: #f6f9fc; color: #19354a; border-left-color: var(--accent); }
.pill.self { background: #dbeafe; color: #1e40af; }
.pill.saas { background: #e0f2fe; color: #0369a1; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.lifecycle { display: grid; grid-template-columns: repeat(11, 1fr); gap: 6px; margin: 16px 0 8px; }
.lc-step { padding: 10px 8px; border-radius: 8px; background: var(--surface); border: 1px solid var(--line); text-align: center; font-size: 11.5px; font-weight: 600; color: var(--accent-dark); position: relative; box-shadow: var(--shadow); }
.lc-step::after { content: "→"; position: absolute; right: -8px; top: 50%; transform: translateY(-50%); color: var(--accent); font-weight: 700; }
.lc-step:last-child::after { content: ""; }
.lc-step .n { display: block; font-size: 10px; color: var(--muted); font-weight: 500; }
.swim { margin-top: 8px; border: 1px dashed var(--line); border-radius: 8px; padding: 6px 10px 8px; background: #fafbff; }
@media (max-width: 960px) {
  .grid-2 { grid-template-columns: 1fr; }
  .lifecycle { grid-template-columns: repeat(2, 1fr); }
  .lc-step::after { content: ""; }
}
.deploy { display: grid; grid-template-columns: 1fr; gap: 0; margin: 14px 0 10px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.layer { display: grid; grid-template-columns: 160px 1fr; align-items: stretch; }
.layer + .layer { border-top: 1px solid var(--line); }
.layer-label { padding: 14px 14px; font-weight: 700; color: #fff; display: flex; flex-direction: column; justify-content: center; gap: 4px; }
.layer-label small { font-weight: 500; opacity: 0.85; font-size: 11px; }
.layer-label.mobile { background: linear-gradient(135deg, #16a34a, #15803d); }
.layer-label.lan { background: linear-gradient(135deg, #9333ea, #6b21a8); }
.layer-label.saas { background: linear-gradient(135deg, #0ea5e9, #0369a1); }
.layer-label.cloud { background: linear-gradient(135deg, #2563eb, #1e40af); }
.layer-body { padding: 12px 14px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; background: var(--surface-2); }
.node { padding: 8px 12px; border-radius: 8px; background: #fff; border: 1px solid var(--line); font-size: 12.5px; font-weight: 600; color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,0.04); display: flex; align-items: center; gap: 6px; }
.node .dot { width: 8px; height: 8px; border-radius: 50%; }
.node.self .dot { background: #2563eb; }
.node.saas .dot { background: #0ea5e9; }
.node.device .dot { background: #9333ea; }
.node.client .dot { background: #16a34a; }
.node small { font-weight: 500; color: var(--muted); font-size: 11px; }
.arrow-band { padding: 6px 14px; background: #fff; border-top: 1px dashed var(--line); border-bottom: 1px dashed var(--line); text-align: center; font-size: 11px; color: var(--muted); }
.arrow-band.top-to-cloud::before { content: "▲ 互联网出口：HTTPS / WSS / MQTT over TLS"; }
.arrow-band.cloud-to-top::before { content: "▼ 下行控制：MQTT 异步 / WHIP-WHEP 信令 / 短效预签名 URL"; }
.arrow-band.lan-to-cloud::before { content: "▲ 设备出向：mTLS MQTT / WebRTC WHIP / HTTPS 对象存储"; }
.arrow-band.mobile-to-lan::before { content: "▲ 局域配网：BLE / Wi-Fi AP / 扫码"; }
.seq { display: grid; grid-template-columns: 1fr; gap: 0; margin: 14px 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.seq-head { display: grid; grid-template-columns: repeat(8, 1fr); background: #1d2a33; color: #fff; }
.seq-head div { padding: 10px 8px; text-align: center; font-size: 12px; font-weight: 700; border-right: 1px solid rgba(255,255,255,0.1); }
.seq-head div:last-child { border-right: 0; }
.seq-head small { display: block; font-size: 10px; font-weight: 500; opacity: 0.7; margin-top: 2px; }
.seq-row { display: grid; grid-template-columns: 60px 1fr; border-top: 1px solid var(--line); }
.seq-num { padding: 10px; text-align: center; font-weight: 700; color: var(--accent); background: var(--surface-2); border-right: 1px solid var(--line); font-family: "SFMono-Regular", Consolas, Menlo, monospace; }
.seq-step { padding: 10px 14px; display: grid; grid-template-columns: 1fr 28px 1fr; align-items: center; gap: 6px; font-size: 13px; }
.seq-step .from, .seq-step .to { font-weight: 700; color: var(--accent-dark); }
.seq-step .from { text-align: right; }
.seq-step .via { text-align: center; color: var(--muted); font-size: 16px; }
.seq-step .note { grid-column: 1 / -1; font-size: 12px; color: var(--muted); margin-top: 2px; }
.fig-scroll { overflow: visible; margin: 14px 0; border: 1px solid #d8e0ea; border-radius: 12px; background: #fafbff; }
.fig-scroll svg { display: block; min-width: 0; width: 100%; max-width: 100%; height: auto; }
.diagram-legend { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 4px; }
.legend-item { display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px; border-radius: 999px; border: 1px solid var(--line); background: #fff; font-size: 12px; color: var(--muted); }
.legend-line { width: 22px; height: 3px; border-radius: 999px; background: #1e40af; }
@media (max-width: 960px) {
  .layer { grid-template-columns: 1fr; }
  .layer-label { padding: 10px 14px; }
  .seq-head { grid-template-columns: repeat(4, 1fr); }
  .seq-head div:nth-child(n+5) { display: none; }
}

/* ---- from 09-module-docs.html.css ---- */
.topbar { position: sticky; top: 0; z-index: 5; background: rgba(238, 246, 241, .94); border-bottom: 1px solid var(--line); backdrop-filter: blur(10px); }
.topbar-inner { max-width: 1440px; margin: 0 auto; padding: 12px 20px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.brand strong { font-size: 18px; letter-spacing: 0; white-space: nowrap; }
.brand span { color: var(--muted); font-size: 13px; white-space: nowrap; }
.nav a.active { border-color: var(--line); background: var(--surface); color: #0f172a; }
.layout { max-width: 1440px; margin: 0 auto; padding: 20px; display: grid; grid-template-columns: minmax(280px, 340px) minmax(0, 1fr); gap: 18px; min-height: calc(100vh - 58px); }
.sidebar { position: sticky; top: 78px; height: calc(100vh - 98px); overflow: auto; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); box-shadow: var(--shadow); }
.sidebar-head { padding: 14px; border-bottom: 1px solid var(--line); }
.sidebar-head input { width: 100%; height: 36px; border: 1px solid var(--line); border-radius: 6px; padding: 0 10px; font: inherit; }
.module-group { border-bottom: 1px solid #edf2f7; }
.module-group:last-child { border-bottom: 0; }
.module-group > summary { cursor: pointer; padding: 12px 14px; font-weight: 700; color: #0f172a; list-style: none; display: flex; align-items: center; gap: 8px; }
.module-group > summary span:first-child { flex: 1; }
.module-group > summary::after { content: "展开 ▸"; color: var(--muted); font-size: 12px; font-weight: 700; min-width: 58px; text-align: right; }
.module-group[open] > summary::after { content: "收起 ▾"; }
.module-group > summary::-webkit-details-marker { display: none; }
.module-group > summary .count { color: var(--muted); font-weight: 500; font-size: 12px; margin-left: 6px; }
.module-items { padding: 0 8px 10px; }
.module-subgroup { margin: 8px 0 4px; border-top: 1px solid #edf2f7; }
.module-subgroup:first-child { border-top: 0; margin-top: 0; }
.module-subgroup > summary { cursor: pointer; padding: 8px 6px; color: var(--brand); font-size: 12px; font-weight: 800; list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.module-subgroup > summary::-webkit-details-marker { display: none; }
.module-subgroup > summary::after { content: "展开 ▸"; color: var(--muted); font-weight: 700; font-size: 12px; min-width: 58px; text-align: right; }
.module-subgroup[open] > summary::after { content: "收起 ▾"; }
.module-subitems { padding: 0 0 6px; }
.module-item { display: block; width: 100%; border: 1px solid transparent; border-radius: 6px; background: transparent; text-align: left; padding: 9px 10px; color: #334155; font: inherit; cursor: pointer; }
.module-item:hover:not(:disabled) { background: #f8fafc; border-color: #e2e8f0; }
.module-item.active { background: #ecfdf5; border-color: #99f6e4; color: #0f172a; }
.module-item:disabled { cursor: not-allowed; opacity: .58; }
.item-title { display: block; font-weight: 700; line-height: 1.35; }
.item-sub { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; line-height: 1.35; }
.viewer { min-width: 0; display: grid; grid-template-rows: auto minmax(0, 1fr); border: 1px solid var(--line); border-radius: 8px; background: var(--surface); box-shadow: var(--shadow); overflow: hidden; }
.viewer-head { padding: 14px 16px; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: start; }
.meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.actions { display: flex; gap: 8px; align-items: center; }
.doc-action { display: inline-flex; align-items: center; min-height: 34px; padding: 5px 10px; border-radius: 6px; border: 1px solid var(--line); background: #f8fafc; color: #0f172a; font-size: 13px; }
.path { margin-top: 8px; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.frame-wrap { min-height: 0; background: #fff; }
iframe { display: block; width: 100%; height: 100%; min-height: calc(100vh - 190px); border: 0; background: #fff; }
.doc-error { margin: 18px; padding: 16px; border: 1px solid #fed7aa; border-radius: 8px; background: #fff7ed; color: #9a3412; }
@media (max-width: 960px) {
  .topbar-inner { align-items: flex-start; flex-direction: column; }
  .layout { grid-template-columns: 1fr; padding: 12px; }
  .sidebar { position: static; height: auto; max-height: 48vh; }
  .viewer-head { grid-template-columns: 1fr; }
  iframe { min-height: 70vh; }
}

/* ---- from modules_business-roadmap_YEAR1_APP_CLOUD_SOFTWARE_ROADMAP.html.css ---- */
.module-doc main > h1:first-of-type, #title-block-header { display:none; }
.summary .box, .decision, .boundary, .glossary, .metric, .timeline, .stage, .flow, .budget, .matrix { border-color:var(--line) !important; border-radius:14px !important; box-shadow:var(--shadow) !important; }

/* ---- from modules_community_CREATOR_ECOSYSTEM_PRODUCT_PLAN.html.css ---- */
.top { display:flex; justify-content:space-between; align-items:center; gap:16px; margin-bottom:16px; padding:12px 16px; border:1px solid var(--line); border-radius:12px; background:var(--surface); box-shadow:var(--shadow); }
.top strong { display:block; font-size:15px; }
.top span { display:block; color:var(--muted); font-size:12px; }
@media (max-width:900px) {
  .top { align-items:flex-start; flex-direction:column; }
}

/* ---- from modules_device-cloud_DEVICE_ACTIVATION_FLOW_PROPOSAL.html.css ---- */
:host { --ink: #17211f; --muted: #64748b; --line: #dbe4df; --surface: #ffffff; --surface-2: #f8fafc; --brand: #0f766e; --brand-2: #2563eb; --ok: #16a34a; --warn: #f97316; --danger: #dc2626; color: var(--ink); background: #eef6f1; font-family: "Avenir Next", "PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, sans-serif; font-size: 15px; line-height: 1.68; }
:host * { box-sizing: border-box; }
.activation-doc { max-width: 1200px; margin: 0 auto; padding: 36px 24px 56px; }
.lead { max-width: 940px; margin: 16px 0 0; color: #334155; font-size: 17px; }
.meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
section { margin: 28px 0; }
.note { margin: 18px 0; padding: 14px 16px; border-left: 4px solid var(--brand); background: #ecfdf5; color: #164e3f; border-radius: 0 8px 8px 0; }
.flow-strip { display: grid; grid-template-columns: repeat(6, minmax(120px, 1fr)); gap: 10px; margin: 16px 0 18px; }
.flow-step { min-height: 82px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.flow-step b { display: block; color: #0f766e; font-size: 13px; margin-bottom: 4px; }
.mermaid { display: block; position: static; isolation: isolate; margin: 14px 0 22px; padding: 16px; max-width: 100%; min-height: 160px; overflow: visible; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 1px 2px rgba(15, 23, 42, .04); text-align: center; }
.mermaid code { padding: 0; border: 0; background: transparent; color: inherit; font-size: inherit; }
.mermaid svg { display: block; width: auto !important; max-width: 100% !important; height: auto !important; max-height: none; margin: 0 auto; }
.mermaid.mermaid-render-pending { text-align: left; white-space: pre; font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; font-size: 12px; color: #334155; }
.mermaid-load-error { margin: 8px 0 14px; color: #991b1b; font-size: 13px; }
.status-table td:first-child { white-space: nowrap; font-weight: 700; color: #0f766e; }
.review-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 0; list-style: none; }
.review-list li { margin: 0; padding: 13px 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.review-list strong { color: #0f172a; }
@media (max-width: 900px) {
  .flow-strip, .review-list { grid-template-columns: 1fr; }
  .mermaid svg { margin: 0; }
  .activation-doc { padding: 24px 16px 44px; }
}

/* ---- from modules_ota_GPT_OTA_REVIEW.html.css ---- */
:host { --accent:#0f766e; --accent-dark:#1e40af; --ink:#17211f; --muted:#64748b; --line:#dbe4df; --surface:#ffffff; --surface-2:#f8fafc; --surface-soft:#f4fbf7; --ok:#16a34a; --warn:#f97316; --danger:#dc2626; --shadow:0 14px 34px rgba(15,118,110,.08),0 2px 8px rgba(15,23,42,.05); }
:host { display:block; color:var(--ink); background:#eef6f1; font-family:"Avenir Next","PingFang SC","Microsoft YaHei","Segoe UI",Roboto,sans-serif; font-size:15px; line-height:1.68; }

/* ---- from modules/ai/AI_OMP_INTEGRATION.html.css ---- */
.diagram { border:1px solid var(--line); border-radius:16px; background:var(--surface); box-shadow:var(--shadow); }
.diagram { margin:14px 0; padding:18px; background:#fff; overflow:visible; }
.diagram pre { margin:0; background:#f8fafc; color:#17211f; box-shadow:none; border:1px solid var(--line); }
@media print {
  .diagram { box-shadow:none; }
}

/* ===================================================================
   Unified Mermaid / Flowchart Rendering
   Requirement: flowcharts must not create internal scrollbars. They
   scale to the available content width and keep height auto.
   =================================================================== */
.figure,
.diagram-grid,
.diagram-card,
.diagram,
.fig-scroll,
.mermaid,
pre.mermaid {
  max-width: 100% !important;
  overflow: visible !important;
}

pre.mermaid {
  white-space: normal !important;
  background: var(--surface) !important;
  color: var(--ink) !important;
}

.mermaid {
  display: block !important;
  position: relative !important;
  isolation: isolate !important;
  width: 100% !important;
  max-width: 100% !important;
  min-height: 0 !important;
  height: auto !important;
  overflow: visible !important;
  -webkit-overflow-scrolling: auto !important;
  background: var(--surface) !important;
  border: 1px solid var(--line) !important;
  border-radius: 12px !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04) !important;
  text-align: center !important;
}

html body .mermaid svg,
html body pre.mermaid svg,
html body .figure .mermaid svg,
html body .diagram-card .mermaid svg {
  display: block !important;
  width: auto !important;
  max-width: 100% !important;
  height: auto !important;
  max-height: none !important;
  margin: 0 auto !important;
  overflow: visible !important;
  font-size: var(--mermaid-font-size) !important;
  text-rendering: geometricPrecision !important;
}

html body .mermaid svg text,
html body .mermaid svg tspan,
html body .mermaid svg .label,
html body .mermaid svg .nodeLabel,
html body .mermaid svg .edgeLabel,
html body .mermaid svg .messageText,
html body .mermaid svg .loopText,
html body .mermaid svg .noteText,
html body .mermaid svg .actor,
html body .mermaid svg .legend,
html body .mermaid svg foreignObject,
html body .mermaid svg foreignObject *,
html body pre.mermaid svg text,
html body pre.mermaid svg tspan,
html body pre.mermaid svg .label,
html body pre.mermaid svg .nodeLabel,
html body pre.mermaid svg .edgeLabel,
html body pre.mermaid svg .messageText,
html body pre.mermaid svg .loopText,
html body pre.mermaid svg .noteText,
html body pre.mermaid svg .actor,
html body pre.mermaid svg .legend,
html body pre.mermaid svg foreignObject,
html body pre.mermaid svg foreignObject * {
  font-size: var(--mermaid-font-size) !important;
  line-height: 1.35 !important;
}

html body .mermaid svg foreignObject,
html body pre.mermaid svg foreignObject {
  overflow: visible !important;
}

.mermaid.mermaid-render-pending {
  overflow: visible !important;
  white-space: pre-wrap !important;
}

body > main:not(.layout) {
  width: 100%;
  max-width: min(3000px, 96vw);
  margin: 0 auto;
  padding: 28px clamp(16px, 3vw, 56px) 56px;
}

body > main:not(.layout) > article {
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

@media (max-width: 760px) {
  body > main:not(.layout) { padding: 14px 12px 44px; }
  body > main:not(.layout) > article { padding: 18px; }
}



html body .fig-scroll svg,
html body .diagram svg {
  min-width: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  max-height: none !important;
}


/* ===================================================================
   Extracted Inline Style Utilities
   Generated from legacy inline style attributes so HTML documents
   can share one stylesheet. Keep semantic component classes above;
   these utilities preserve existing generated document layout.
   =================================================================== */
.xstyle-001 { width:18%; }
.xstyle-002 { width:34%; }
.xstyle-003 { background:#fef3c7;color:#92400e; }
.xstyle-004 { margin: 4px 0 10px; font-size: 16px; }
.xstyle-005 { margin: 18px 0 10px; font-size: 16px; }
.xstyle-006 { margin-top: 12px; }
.xstyle-007 { width:32%; }
.xstyle-008 { width:30%; }
.xstyle-009 { background:var(--accent); }
.xstyle-010 { background:var(--warn); }
.xstyle-011 { background:#15803d; }
.xstyle-012 { margin:0 0 6px;font-size:13px;color:var(--muted); }
.xstyle-013 { font-size:14px;color:var(--muted);margin:4px 0 8px; }
.xstyle-014 { width:14%; }
.xstyle-015 { font-size:14px;color:var(--muted); }
.xstyle-016 { margin:0; }
.xstyle-017 { margin-top:6px; }
.xstyle-018 { width:20%; }
.xstyle-019 { width:22%; }
.xstyle-020 { width:16%; }
.xstyle-021 { font-size:14px;color:var(--muted);margin-top:8px; }
.xstyle-022 { grid-column: span 2; }
.xstyle-023 { width:24%; }
.xstyle-024 { font-size:12px;color:var(--muted);margin-top:6px; }
.xstyle-025 { color:var(--muted); }
.xstyle-026 { width:12%; }
.xstyle-027 { background:#2563eb; }
.xstyle-028 { background:#f59e0b; }
.xstyle-029 { background:#16a34a; }
.xstyle-030 { background:#dc2626; }
.xstyle-031 { background:#9333ea; }
.xstyle-032 { font-weight:400;font-size:.6em;opacity:.85; }
.xstyle-033 { width: 250px; }
.xstyle-034 { width:80%; }
.xstyle-035 { width:60%; }
.xstyle-036 { width:90%; }
.xstyle-037 { width:40%; }
.xstyle-038 { width:70%; }
.xstyle-039 { width:50%; }
.xstyle-040 { width:30%; }
.xstyle-041 { font-weight:400; }
.xstyle-042 { left: 180px; }
.xstyle-043 { left: 420px; }
.xstyle-044 { left: 660px; }
.xstyle-045 { width: 110px; }
.xstyle-046 { width: 180px; }
.xstyle-047 { width: 80px; }
.xstyle-048 { background:#2563eb; }
.xstyle-049 { background:#7c3aed; }
.xstyle-050 { background:#0f766e; }
.xstyle-051 { background:#64748b; }
.xstyle-052 { background:#db2777; }
.xstyle-053 { background:#fafbff;font-family:-apple-system,'PingFang SC','Microsoft YaHei',sans-serif; }
.xstyle-054 { background:#f97316; }
.xstyle-055 { background:#dc2626; }
.xstyle-056 { background:#16a34a; }
.xstyle-057 { position:fixed;right:20px;bottom:20px;background:var(--accent);color:#fff;padding:10px 14px;border-radius:999px;text-decoration:none;font-size:13px;box-shadow:0 4px 12px rgba(37,99,235,0.4); }
.xstyle-058 { text-align: right; }
.xstyle-059 { min-width:1100px;background:#fafbff;font-family:-apple-system,'PingFang SC','Microsoft YaHei',sans-serif; }
.xstyle-060 { color:var(--muted);font-size:13.5px;margin-top:8px; }
.xstyle-061 { width: 50%; }
.xstyle-062 { width: 33%; }
.xstyle-063 { width: 7%; }
.xstyle-064 { width: 10%; }
.xstyle-065 { width: 17%; }
.xstyle-066 { width: 23%; }
.xstyle-067 { width:100%; }
.xstyle-068 { width: 30%; }
.xstyle-069 { width: 40%; }
.xstyle-070 { width: 11%; }
.xstyle-071 { width: 15%; }
.xstyle-072 { width: 16%; }
.xstyle-073 { width: 22%; }
.xstyle-074 { width: 21%; }

/* ===================================================================
   Module Docs Index — standard NETWORK-style shell
   =================================================================== */
.module-doc-page .module-doc-nav {
  position: sticky;
  top: 12px;
  z-index: 10;
  margin-bottom: 16px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
}

.module-doc-page .module-doc-nav > div > strong {
  display: block;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.35;
}

.module-doc-page .module-doc-nav > div > span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.module-doc-page .module-doc-hero {
  margin-bottom: 18px;
}

.module-doc-layout {
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  min-height: calc(100vh - 250px);
}

.module-doc-sidebar,
.module-doc-viewer {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.module-doc-sidebar {
  position: sticky;
  top: 96px;
  max-height: calc(100vh - 118px);
  overflow: auto;
}

.module-doc-sidebar .sidebar-head {
  padding: 14px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #fff, #f6fbf8);
  border-radius: 18px 18px 0 0;
}

.module-doc-sidebar .sidebar-head input {
  width: 100%;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.module-doc-viewer {
  min-width: 0;
  overflow: hidden;
}

.module-doc-viewer .viewer-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(135deg, #ffffff 0%, #f4fbf7 70%, #e6f4ed 100%);
}

.module-doc-viewer #viewerTitle {
  margin: 0;
  color: var(--ink);
  font-size: 24px;
  line-height: 1.25;
}

.module-doc-viewer .path {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.module-doc-viewer .actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.module-doc-viewer .doc-action {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--accent) !important;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none !important;
  white-space: nowrap;
}

.module-doc-viewer .doc-action:hover {
  border-color: #bde5d7;
  background: #f0fbf7;
}

.module-doc-viewer .frame-wrap {
  min-height: 0;
  background: #fff;
}

.module-doc-viewer iframe {
  display: block;
  width: 100%;
  height: calc(100vh - 350px);
  min-height: 720px;
  border: 0;
  background: #fff;
}

.module-doc-page .module-group { border-bottom: 1px solid #edf2f7; }
.module-doc-page .module-group:last-child { border-bottom: 0; }
.module-doc-page .module-group > summary {
  cursor: pointer;
  padding: 13px 14px;
  font-weight: 800;
  color: var(--ink);
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
}
.module-doc-page .module-group > summary span:first-child { flex: 1; }
.module-doc-page .module-group > summary::after {
  content: "展开 ▸";
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  min-width: 58px;
  text-align: right;
}
.module-doc-page .module-group[open] > summary::after { content: "收起 ▾"; }
.module-doc-page .module-group > summary::-webkit-details-marker { display: none; }
.module-doc-page .module-group > summary .count { color: var(--muted); font-weight: 600; font-size: 12px; margin-left: 6px; }
.module-doc-page .module-items { padding: 0 8px 12px; }
.module-doc-page .module-subgroup { margin: 8px 0 4px; border-top: 1px solid #edf2f7; }
.module-doc-page .module-subgroup:first-child { border-top: 0; margin-top: 0; }
.module-doc-page .module-subgroup > summary {
  cursor: pointer;
  padding: 8px 7px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.module-doc-page .module-subgroup > summary::-webkit-details-marker { display: none; }
.module-doc-page .module-subgroup > summary::after {
  content: "展开 ▸";
  color: var(--muted);
  font-weight: 800;
  font-size: 12px;
  min-width: 58px;
  text-align: right;
}
.module-doc-page .module-subgroup[open] > summary::after { content: "收起 ▾"; }
.module-doc-page .module-subitems { padding: 0 0 6px; }
.module-doc-page .module-item {
  display: block;
  width: 100%;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  text-align: left;
  padding: 10px 11px;
  color: #334155;
  font: inherit;
  cursor: pointer;
}
.module-doc-page .module-item:hover:not(:disabled) { background: #f6fbf8; border-color: #bde5d7; }
.module-doc-page .module-item.active { background: #ecfdf5; border-color: #99f6e4; color: var(--ink); }
.module-doc-page .module-item:disabled { cursor: not-allowed; opacity: .58; }
.module-doc-page .item-title { display: block; font-weight: 800; line-height: 1.35; }
.module-doc-page .item-sub { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; line-height: 1.35; }
.module-doc-page .meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.module-doc-page .doc-error { margin: 18px; padding: 16px; border: 1px solid #fed7aa; border-radius: 12px; background: #fff7ed; color: #9a3412; }

@media (max-width: 980px) {
  .module-doc-layout { grid-template-columns: 1fr; }
  .module-doc-sidebar { position: static; max-height: 52vh; }
  .module-doc-viewer .viewer-head { grid-template-columns: 1fr; }
  .module-doc-viewer iframe { height: 72vh; min-height: 620px; }
}

/* ===================================================================
   Standardized Device Activation document shell
   =================================================================== */
.standard-doc.activation-doc {
  width: 100% !important;
  max-width: min(3000px, 96vw) !important;
  margin: 0 auto !important;
  padding: 22px clamp(16px, 3vw, 56px) 60px !important;
}

.standard-doc.activation-doc .nav,
.standard-doc.activation-doc .hero,
.standard-doc.activation-doc .section,
.standard-doc.activation-doc .toc {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.standard-doc.activation-doc .hero {
  margin-bottom: 18px;
  padding: 34px 34px 30px;
  border-color: #bde5d7;
  background: linear-gradient(135deg, #ffffff 0%, #f4fbf7 62%, #e6f4ed 100%);
}

.standard-doc.activation-doc .lead {
  max-width: 96ch;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.standard-doc.activation-doc .section {
  margin: 18px 0 0 !important;
  padding: 22px 24px;
}

.standard-doc.activation-doc .toc {
  margin: 0 0 18px;
  padding: 14px 18px;
}

.standard-doc.activation-doc .note {
  margin: 14px 0;
  padding: 14px 16px;
  border: 1px solid #bde5d7;
  border-left: 5px solid var(--accent);
  border-radius: 12px;
  background: #f3fbf7;
  color: var(--ink);
  box-shadow: var(--shadow);
}

.standard-doc.activation-doc #components > .grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
}

.standard-doc.activation-doc #components .panel {
  display: flex;
  min-width: 0;
  height: 100%;
  flex-direction: column;
}

.standard-doc.activation-doc #components .panel table {
  flex: 1;
  width: 100%;
}

@media (max-width: 760px) {
  .standard-doc.activation-doc { padding: 14px 12px 44px !important; }
  .standard-doc.activation-doc .hero { padding: 26px 22px; }
  .standard-doc.activation-doc .section { padding: 18px 16px; }
  .standard-doc.activation-doc #components > .grid { grid-template-columns: 1fr; }
}


/* ===================================================================
   Restored Legacy Root Pages
   Scoped styles for recovered top-level planning documents.
   =================================================================== */
body.legacy-dashboard {
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(15, 118, 110, 0.12), transparent 24%),
    linear-gradient(135deg, #f7fbfc 0%, #edf2f5 48%, #e8eef1 100%);
}
body.legacy-dashboard.legacy-rd-it {
  --accent:#9e4523;
  --accent-2:#114e55;
  --accent-3:#d5a25f;
  --line:rgba(66, 54, 47, 0.12);
  --ink:#251f1b;
  --muted:#6d625b;
  --bg:#f5f0eb;
  background:
    radial-gradient(circle at top right, rgba(213, 162, 95, 0.18), transparent 26%),
    radial-gradient(circle at bottom left, rgba(17, 78, 85, 0.10), transparent 22%),
    linear-gradient(145deg, #fffaf4 0%, #f7f0e8 46%, #efe7df 100%);
}
body.legacy-dashboard .shell {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: min(3000px, 96vw);
  margin: 0 auto;
  padding: 28px clamp(16px, 3vw, 56px) 56px;
}
body.legacy-dashboard .nav-links,
body.legacy-dashboard .meta-bar,
body.legacy-dashboard .chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
body.legacy-dashboard .nav-links a,
body.legacy-dashboard .chip,
body.legacy-dashboard .meta {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 13px;
  border: 1px solid rgba(15, 118, 110, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.76);
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}
body.legacy-dashboard .nav-links a.active {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
}
body.legacy-dashboard .hero {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, .95fr);
  gap: 24px;
  padding: 32px;
  border-radius: 22px;
  overflow: hidden;
}
body.legacy-dashboard .hero h1 {
  max-width: 12ch;
  margin: 10px 0 16px;
  font-size: clamp(34px, 4.4vw, 58px);
  line-height: 1.02;
}
body.legacy-dashboard .hero p,
body.legacy-dashboard .sub {
  max-width: 72ch;
  color: var(--muted);
  font-size: 15px;
}
body.legacy-dashboard .hero-side,
body.legacy-dashboard .panel-list,
body.legacy-dashboard .journey,
body.legacy-dashboard .flow-board,
body.legacy-dashboard .decision-list,
body.legacy-dashboard .timeline,
body.legacy-dashboard .arch {
  display: grid;
  gap: 12px;
}
body.legacy-dashboard .stat,
body.legacy-dashboard .note {
  padding: 18px 20px;
  border-radius: 16px;
  background: rgba(16, 47, 70, .94);
  color: #fff;
  box-shadow: var(--shadow);
}
body.legacy-dashboard .stat small,
body.legacy-dashboard .note small {
  display: block;
  margin-bottom: 8px;
  color: rgba(255, 255, 255, .68);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
body.legacy-dashboard .stat strong,
body.legacy-dashboard .note strong {
  display: block;
  margin-bottom: 8px;
  color: #fff;
  font-size: 26px;
}
body.legacy-dashboard .stat p,
body.legacy-dashboard .note p {
  margin: 0;
  color: rgba(255, 255, 255, .82);
  font-size: 14px;
}
body.legacy-dashboard .grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 18px;
  margin-top: 20px;
}
body.legacy-dashboard .span-4 { grid-column: span 4; }
body.legacy-dashboard .span-5 { grid-column: span 5; }
body.legacy-dashboard .span-6 { grid-column: span 6; }
body.legacy-dashboard .span-7 { grid-column: span 7; }
body.legacy-dashboard .span-8 { grid-column: span 8; }
body.legacy-dashboard .span-12 { grid-column: 1 / -1; }
body.legacy-dashboard .card {
  min-width: 0;
  padding: 24px;
  border-radius: 16px;
  background: rgba(255, 255, 255, .9);
}
body.legacy-dashboard .item,
body.legacy-dashboard .phase-body,
body.legacy-dashboard .step-body,
body.legacy-dashboard .lane-body,
body.legacy-dashboard .decision,
body.legacy-dashboard .metric {
  padding: 14px 16px;
  border: 1px solid rgba(19, 35, 45, .08);
  border-radius: 14px;
  background: rgba(255, 255, 255, .78);
}
body.legacy-dashboard .item p,
body.legacy-dashboard .phase-body p,
body.legacy-dashboard .step-body p,
body.legacy-dashboard .decision p,
body.legacy-dashboard .metric p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}
body.legacy-dashboard .arch-row,
body.legacy-dashboard .lane {
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr);
  gap: 12px;
}
body.legacy-dashboard .phase,
body.legacy-dashboard .step {
  display: grid;
  grid-template-columns: 126px minmax(0, 1fr);
  gap: 12px;
}
body.legacy-dashboard .arch-label,
body.legacy-dashboard .lane-label,
body.legacy-dashboard .phase-tag,
body.legacy-dashboard .step-id {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #fff;
  font-weight: 800;
}
body.legacy-dashboard .arch-body,
body.legacy-dashboard .lane-body {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
body.legacy-dashboard .node {
  min-width: 110px;
  padding: 9px 12px;
  border-radius: 10px;
  background: rgba(15, 118, 110, .09);
  font-size: 13px;
}
body.legacy-dashboard .decision-strip,
body.legacy-dashboard .metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
body.legacy-dashboard .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
body.global-architecture-doc {
  max-width: min(1180px, 94vw);
  margin: 0 auto;
  padding: 42px clamp(16px, 3vw, 48px) 64px;
  background: #fff;
  color: #17202a;
  font-size: 15px;
  line-height: 1.72;
}
body.global-architecture-doc .cover {
  margin-bottom: 18px;
  padding: 34px 0 24px;
  border-bottom: 1px solid #d8dee8;
}
body.global-architecture-doc .subtitle { max-width: 780px; color: #596579; font-size: 16px; }
body.global-architecture-doc .principles,
body.global-architecture-doc .callout {
  margin: 14px 0 18px;
  padding: 14px 18px;
  border: 1px solid #d8dee8;
  border-left: 5px solid #1769aa;
  border-radius: 10px;
  background: #f6f8fb;
}
body.global-architecture-doc table { font-size: 13px; box-shadow: none; }
body.global-architecture-doc pre { white-space: pre-wrap; background: #f7faf9; color: #17372f; }
body.pandoc-doc {
  max-width: min(1180px, 94vw);
  margin: 0 auto;
  padding: 38px clamp(16px, 3vw, 48px) 64px;
  background: #fff;
}
body.pandoc-doc header { margin-bottom: 28px; text-align: center; }
body.pandoc-doc #TOC {
  margin: 16px 0 24px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8fafc;
}
body.pandoc-doc #TOC ul { columns: 2; padding-left: 18px; }
body.pandoc-doc table { display: block; overflow-x: auto; box-shadow: none; }
body.pandoc-doc th[style*="right"],
body.pandoc-doc td[style*="right"] { text-align: right !important; }
@media (max-width: 980px) {
  body.legacy-dashboard .hero,
  body.legacy-dashboard .arch-row,
  body.legacy-dashboard .lane,
  body.legacy-dashboard .phase,
  body.legacy-dashboard .step,
  body.legacy-dashboard .decision-strip,
  body.legacy-dashboard .metric-grid { grid-template-columns: 1fr; }
  body.legacy-dashboard .span-4,
  body.legacy-dashboard .span-5,
  body.legacy-dashboard .span-6,
  body.legacy-dashboard .span-7,
  body.legacy-dashboard .span-8 { grid-column: 1 / -1; }
  body.pandoc-doc #TOC ul { columns: 1; }
}


/* ===================================================================
   Module Detail TOC — vertical, compact reading order
   =================================================================== */
.module-doc .toc,
body.pandoc-doc #TOC {
  padding: 14px 16px;
}

.module-doc .toc > strong,
body.pandoc-doc #TOC > h2,
body.pandoc-doc #TOC > h3 {
  display: block;
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .08em;
}

.module-doc .toc ul,
.module-doc .toc ol,
body.pandoc-doc #TOC ul,
body.pandoc-doc #TOC ol {
  display: flex !important;
  flex-direction: column !important;
  gap: 4px !important;
  columns: auto !important;
  margin: 0 !important;
  padding-left: 0 !important;
  list-style: none !important;
}

.module-doc .toc li,
body.pandoc-doc #TOC li {
  margin: 0 !important;
  break-inside: auto !important;
}

.module-doc .toc li > ul,
.module-doc .toc li > ol,
body.pandoc-doc #TOC li > ul,
body.pandoc-doc #TOC li > ol {
  margin: 4px 0 2px 0 !important;
  padding-left: 14px !important;
  border-left: 2px solid #e2e8f0;
}

.module-doc .toc a,
body.pandoc-doc #TOC a {
  display: block;
  padding: 5px 8px;
  border-radius: 8px;
  color: var(--accent-dark);
  line-height: 1.36;
  text-decoration: none;
  white-space: normal;
}

.module-doc .toc a:hover,
body.pandoc-doc #TOC a:hover {
  background: #f0fbf7;
  color: var(--accent);
  text-decoration: none;
}

.module-doc .toc > ul > li > a,
.module-doc .toc > ol > li > a,
body.pandoc-doc #TOC > ul > li > a,
body.pandoc-doc #TOC > ol > li > a {
  color: var(--ink);
  font-weight: 800;
}

.module-doc .toc > ul > li > ul > li > a,
.module-doc .toc > ol > li > ol > li > a,
body.pandoc-doc #TOC > ul > li > ul > li > a,
body.pandoc-doc #TOC > ol > li > ol > li > a {
  font-weight: 700;
}

.module-doc .toc ul ul a,
.module-doc .toc ol ol a,
body.pandoc-doc #TOC ul ul a,
body.pandoc-doc #TOC ol ol a {
  color: #475569;
  font-size: 12.5px;
}

.module-doc .toc > ul > li:only-child > a:first-child,
.module-doc .toc > ol > li:only-child > a:first-child,
body.pandoc-doc #TOC > ul > li:only-child > a:first-child,
body.pandoc-doc #TOC > ol > li:only-child > a:first-child {
  display: none;
}

.module-doc .toc > ul > li:only-child > ul,
.module-doc .toc > ol > li:only-child > ol,
body.pandoc-doc #TOC > ul > li:only-child > ul,
body.pandoc-doc #TOC > ol > li:only-child > ol {
  margin: 0 !important;
  padding-left: 0 !important;
  border-left: 0 !important;
}

/* CNC 生死线标注：加粗斜体蓝色 +2字号 */
.cnc-lifeline {
  color: var(--blue);
  font-weight: 900;
  font-style: italic;
  font-size: calc(1em + 2px);
}
.cnc-lifeline strong,
strong.cnc-lifeline {
  color: var(--blue);
  font-weight: 900;
  font-style: italic;
}

/* =========================================================================
   UI 设计稿原型组件 (modules/design/* mockups) — scoped .mock- namespace
   仅用于设计稿可视化; 生产前端不引用。
   ========================================================================= */
.mock-stage{display:grid;grid-template-columns:repeat(12,1fr);gap:12px;margin:14px 0}
.mock-c7{grid-column:span 7}.mock-c6{grid-column:span 6}.mock-c5{grid-column:span 5}.mock-c4{grid-column:span 4}
.mock-panel{background:#fff;border:1px solid var(--line);border-radius:14px;box-shadow:var(--shadow);padding:16px}
.mock-panel h3{margin:0 0 10px;font-size:15px;font-weight:600;display:flex;align-items:center;gap:8px}
.mock-topbar{display:flex;align-items:center;justify-content:space-between;gap:12px;background:#fff;border:1px solid var(--line);border-radius:14px;box-shadow:var(--shadow);padding:12px 16px;margin:0}
.mock-sel{height:40px;border-radius:8px;border:1px solid var(--line);padding:0 12px;font:inherit;font-size:14px;background:#fff;color:var(--ink);min-width:220px}
.mock-btn{display:inline-flex;align-items:center;gap:6px;height:40px;padding:0 16px;border-radius:8px;border:1px solid var(--line);background:#fff;color:var(--ink);font-weight:600;font-size:14px;cursor:pointer;font-family:inherit}
.mock-btn.primary{background:var(--brand);border-color:var(--brand);color:#fff}
.mock-btn.danger{background:var(--danger);border-color:var(--danger);color:#fff}
.mock-btn[disabled]{background:var(--surface-2)!important;border-color:var(--line)!important;color:var(--muted)!important;cursor:not-allowed}
.mock-btn.sm{height:32px;padding:0 12px;font-size:13px}
.mock-fpv{aspect-ratio:16/9;min-height:300px;background:repeating-linear-gradient(45deg,#1f1f1f,#1f1f1f 12px,#262626 12px,#262626 24px);border-radius:12px;display:flex;flex-direction:column;align-items:center;justify-content:center;color:#9a9a9a;position:relative;border:1px solid #111}
.mock-fpv .ic{font-size:42px;opacity:.5}
.mock-fpv .lbl{margin-top:8px;font-size:13px;letter-spacing:.5px}
.mock-fpv .badge{position:absolute;top:12px;left:12px;background:rgba(0,0,0,.5);color:#fff;font-size:11px;padding:3px 8px;border-radius:4px}
.mock-tiles{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}
.mock-tile{background:var(--surface-2);border-radius:10px;padding:12px}
.mock-tile .k{font-size:12px;color:var(--muted);font-weight:500}
.mock-tile .v{font-size:22px;font-weight:700;margin-top:4px}
.mock-tile .v small{font-size:12px;color:var(--muted);font-weight:500}
.mock-pbar{height:8px;background:var(--line);border-radius:4px;overflow:hidden;margin-top:10px}
.mock-pbar > i{display:block;height:100%;width:62%;background:var(--brand)}
.mock-ax{width:100%;border-collapse:collapse;font-size:13px;margin:0}
.mock-ax th,.mock-ax td{padding:6px 8px;text-align:right;border-bottom:1px solid var(--line)}
.mock-ax th:first-child,.mock-ax td:first-child{text-align:left;color:var(--muted);font-weight:600}
.mock-ax th{color:var(--muted);font-weight:600;font-size:12px}
.mock-kv{display:flex;justify-content:space-between;font-size:13px;padding:3px 0}
.mock-kv .k{color:var(--muted)}
.mock-alarm{display:flex;align-items:center;gap:12px;background:#7f1d1d;color:#fff;border-radius:10px;padding:12px 16px;margin:14px 0}
.mock-alarm .codes{display:flex;gap:8px;flex:1;flex-wrap:wrap}
.mock-alarm .codes span{background:rgba(255,255,255,.16);padding:2px 8px;border-radius:4px;font-size:12px;font-weight:600}
.mock-lamp{display:inline-flex;align-items:center;gap:8px;font-weight:700;font-size:15px}
.mock-lamp .dot{width:12px;height:12px;border-radius:50%;display:inline-block;background:var(--ok);box-shadow:0 0 0 4px rgba(16,185,129,.15)}
.mock-ctrl{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-top:12px}
.mock-divider{width:1px;height:28px;background:var(--line);margin:0 4px}
.mock-wire{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:12px;line-height:1.5;background:var(--surface-2);border:1px solid var(--line);border-radius:10px;padding:14px;white-space:pre;overflow-x:auto;color:var(--ink)}

/* mock utility classes (companion to .mock-* above) — zero inline styles */
.mock-row{display:flex;gap:12px;align-items:center}
.mock-row.tight{gap:8px}
.mock-row.wide{gap:16px}
.mock-sub{font-weight:400;font-size:12px;color:var(--muted)}
.mock-mute{color:var(--muted)}
.mock-dot{display:inline-block;width:8px;height:8px;border-radius:50%;background:var(--ok);margin-right:4px}
.mock-mt{margin-top:12px}
.mock-mt-sm{margin-top:10px}
.mock-mt-lg{margin-top:14px}
.mock-ghost{border-color:transparent;background:transparent}
.mock-alarm-btn{background:rgba(255,255,255,.16);border-color:transparent;color:#fff}
.mock-alarm-ic{font-size:20px}

/* design-docs index card grid (11-design-docs.html) */
.card-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:16px;margin:16px 0}
.card-head{display:flex;gap:8px;align-items:center;margin-bottom:10px}
.card-links{list-style:none;margin:12px 0 0;padding:0;display:flex;gap:8px;flex-wrap:wrap}
.viewer-meta{color:var(--muted);font-size:14px;margin:0 0 8px}

/* 下载按钮：[文字](url){.btn} —— 显著可点的 CTA（模块文档通用） */
.btn-download { display:inline-flex; align-items:center; gap:8px; margin:6px 0 10px;
  padding:11px 18px; border-radius:10px; background:var(--accent); color:#fff !important;
  font-size:15px; font-weight:800; text-decoration:none !important;
  box-shadow:0 2px 8px rgba(15,118,110,.28); transition:background .15s, transform .15s, box-shadow .15s; }
.btn-download:hover { background:var(--accent-dark); transform:translateY(-1px); box-shadow:0 4px 14px rgba(30,64,175,.3); }
.btn-download-icon { font-size:16px; line-height:1; }
.btn-download::after { content:"下载"; margin-left:2px; padding:2px 7px; border-radius:999px;
  background:rgba(255,255,255,.22); font-size:11px; font-weight:800; letter-spacing:.04em; }

/* 代码块复制按钮（shared/copy-code.js 注入） */
pre { position:relative; }
.code-copy { position:absolute; top:8px; right:8px; padding:4px 10px; border:1px solid var(--line);
  border-radius:8px; background:#fff; color:var(--accent); font-size:12px; font-weight:700; cursor:pointer; opacity:.85; }
.code-copy:hover { opacity:1; background:#effaf5; }
