/* ===== 流程页模板（md-flow-page）：SVG 流程图 + 折叠列表 + 浮动知识卡 =====
   用法：页面「附加 CSS 类」无需设置；正文里加 <div class="md-flow-page"> 即生效（body 类由 mdmodule-flow-page 插件注入）
   配色只用站点冷色：#2563eb 系列 + slate */
.md-flow-page .content-area{width:100%!important;max-width:100%!important;}
.md-flow-page .single-article{max-width:1100px!important;}
.md-flow-page .entry-content>.md-res-intro{width:100%!important;max-width:none!important;
  margin-left:0!important;margin-right:0!important;box-sizing:border-box!important;}

.mdflow-card{width:100%!important;box-sizing:border-box!important;background:#fff!important;border:1px solid #e8eef7!important;
  border-radius:16px!important;padding:14px 18px 12px!important;margin:4px 0 0!important;
  box-shadow:0 1px 2px rgba(15,23,42,.04)!important;}
.mdflow-hd{display:flex!important;align-items:center!important;gap:8px!important;font-size:13px!important;color:#64748b!important;margin:2px 0 10px!important;}
.mdflow-dot{width:6px!important;height:6px!important;border-radius:99px!important;background:#2563eb!important;flex:0 0 auto!important;}
.mdflow-hd-t{flex:1 1 auto!important;min-width:0!important;}
.mdflow-tabs{display:inline-flex!important;background:#f1f5f9!important;border-radius:999px!important;padding:2px!important;flex:0 0 auto!important;}
.mdflow-tab{border:0!important;background:transparent!important;font:inherit!important;font-size:12.5px!important;color:#64748b!important;
  padding:4px 12px!important;border-radius:999px!important;cursor:pointer!important;line-height:1.6!important;transition:background .15s,color .15s!important;}
.mdflow-tab.is-on{background:#fff!important;color:#1d4ed8!important;font-weight:600!important;box-shadow:0 1px 2px rgba(15,23,42,.08)!important;}
.mdflow-tab:focus-visible{outline:2px solid #2563eb!important;outline-offset:2px!important;}
.mdflow-view[hidden]{display:none!important;}

.mdflow-scroll{overflow-x:auto!important;overflow-y:hidden!important;-webkit-overflow-scrolling:touch!important;}
.mdflow-svg{display:block!important;width:100%!important;height:auto!important;min-width:600px!important;}
.mdflow-hint{font-size:12px!important;color:#94a3b8!important;margin:8px 0 2px!important;display:none!important;}

/* 阶段头 */
.mdflow-svg .mdflow-head rect{fill:#eff6ff!important;stroke:#dbeafe!important;stroke-width:1px!important;}
.mdflow-svg .ph-no{fill:#2563eb!important;font-size:12.5px!important;font-weight:600!important;}
.mdflow-svg .ph-name{fill:#0f172a!important;font-size:16px!important;font-weight:700!important;}
.mdflow-svg .mdflow-link{stroke:#cbd5e1!important;stroke-width:1.4px!important;}
.mdflow-svg .mdflow-v{stroke:#e2e8f0!important;stroke-width:1.3px!important;}
/* 节点 */
.mdflow-svg .mdflow-n rect{fill:#fff!important;stroke:#cbd5e1!important;stroke-width:1.2px!important;transition:stroke .15s,fill .15s!important;}
.mdflow-svg .mdflow-n .n-t{fill:#334155!important;font-size:15px!important;text-anchor:middle!important;
  font-family:"Microsoft YaHei","PingFang SC",Arial,sans-serif!important;}
.mdflow-svg .mdflow-n .n-no{fill:#cbd5e1!important;font-size:11px!important;font-variant-numeric:tabular-nums!important;}
.mdflow-svg .mdflow-n{cursor:pointer!important;outline:none!important;}
.mdflow-svg .mdflow-n:hover rect{stroke:#2563eb!important;stroke-width:1.8px!important;}
.mdflow-svg .mdflow-n:hover .n-t{fill:#1d4ed8!important;}
.mdflow-svg .mdflow-n.is-on rect{fill:#eff6ff!important;stroke:#2563eb!important;stroke-width:2px!important;}
.mdflow-svg .mdflow-n.is-on .n-t{fill:#1d4ed8!important;font-weight:700!important;}
.mdflow-svg .mdflow-n.is-on .n-no{fill:#60a5fa!important;}
.mdflow-svg .mdflow-n:focus-visible rect{stroke:#1d4ed8!important;stroke-width:2.6px!important;}
/* hover 小箭头 */
.mdflow-svg .mdflow-arw{fill:none!important;stroke:#2563eb!important;stroke-width:1.7!important;
  stroke-linecap:round!important;stroke-linejoin:round!important;opacity:0!important;
  transition:opacity .15s,transform .15s!important;transform-box:fill-box!important;transform-origin:center!important;pointer-events:none!important;}
.mdflow-svg .mdflow-n:hover .mdflow-arw{opacity:1!important;transform:translateX(2px)!important;}
.mdflow-svg .mdflow-n.is-on .mdflow-arw{opacity:.5!important;}

/* 列表视图 */
.mdflow-list{padding:2px 0 4px!important;}
.mdflow-phase{border-top:1px solid #eef2f7!important;padding:4px 0!important;}
.mdflow-phase:first-child{border-top:0!important;}
.mdflow-phase>summary{display:flex!important;align-items:center!important;gap:8px!important;cursor:pointer!important;
  font-size:13.5px!important;font-weight:700!important;color:#0f172a!important;padding:8px 0!important;list-style:none!important;}
.mdflow-phase>summary::-webkit-details-marker{display:none!important;}
.mdflow-phase-no{font-size:12px!important;font-weight:600!important;color:#2563eb!important;background:#eff6ff!important;
  border-radius:999px!important;padding:1px 9px!important;flex:0 0 auto!important;}
.mdflow-phase-c{margin-left:auto!important;font-size:12px!important;color:#94a3b8!important;font-weight:400!important;}
.mdflow-items{display:grid!important;gap:6px!important;padding:2px 0 8px!important;}
.mdflow-item{border:1px solid #eef2f7!important;border-radius:10px!important;background:#fcfdff!important;}
.mdflow-item[open]{border-color:#dbeafe!important;background:#fbfdff!important;}
.mdflow-item>summary{display:flex!important;align-items:center!important;gap:10px!important;padding:9px 12px!important;
  cursor:pointer!important;font-size:14px!important;color:#334155!important;list-style:none!important;border-radius:10px!important;}
.mdflow-item>summary::-webkit-details-marker{display:none!important;}
.mdflow-item>summary:focus-visible{outline:2px solid #2563eb!important;outline-offset:-2px!important;}
.mdflow-item .mdflow-t{flex:1 1 auto!important;}
.mdflow-no{font-size:12px!important;color:#94a3b8!important;font-variant-numeric:tabular-nums!important;min-width:26px!important;flex:0 0 auto!important;}
.mdflow-item .mdflow-rows{padding:0 12px 10px!important;}

.mdflow-rows{display:grid!important;gap:8px!important;}
.mdflow-row p{margin:0!important;font-size:13.5px!important;line-height:1.7!important;color:#475569!important;}
.mdflow-row p b{display:block!important;font-size:12.5px!important;color:#1d4ed8!important;font-weight:700!important;margin-bottom:1px!important;}

/* 浮动知识卡（桌面右下 / 手机底部抽屉）—— 不挤压流程图宽度，保住 15px 字号 */
.mdflow-k{position:fixed!important;right:24px!important;bottom:24px!important;width:min(420px,calc(100vw - 48px))!important;
  max-height:66vh!important;overflow:auto!important;background:#fff!important;border:1px solid #e2e8f0!important;
  border-radius:16px!important;box-shadow:0 12px 32px rgba(15,23,42,.16)!important;z-index:9990!important;
  padding:16px 18px!important;display:none!important;box-sizing:border-box!important;}
.mdflow-k.is-open{display:block!important;}
.mdflow-k h3{margin:0 0 2px!important;font-size:16px!important;line-height:1.5!important;color:#0f172a!important;
  display:flex!important;align-items:center!important;gap:8px!important;flex-wrap:wrap!important;padding-right:28px!important;}
.mdflow-k .mdflow-no-tag{font-size:12px!important;color:#94a3b8!important;font-variant-numeric:tabular-nums!important;}
.mdflow-k .mdflow-tag{font-size:12px!important;font-weight:600!important;color:#2563eb!important;background:#eff6ff!important;
  border-radius:999px!important;padding:2px 10px!important;}
.mdflow-k .mdflow-x{position:absolute!important;top:10px!important;right:10px!important;width:26px!important;height:26px!important;
  border:0!important;background:#f1f5f9!important;color:#64748b!important;border-radius:8px!important;cursor:pointer!important;
  font-size:16px!important;line-height:1!important;display:flex!important;align-items:center!important;justify-content:center!important;}
.mdflow-k .mdflow-x:hover{background:#e2e8f0!important;color:#0f172a!important;}
.mdflow-k .mdflow-rows{margin-top:12px!important;}
.mdflow-k .mdflow-row{background:#fbfcfe!important;border:1px solid #f1f5f9!important;border-radius:12px!important;padding:10px 12px!important;}

/* 暗色 */
html.md-dark .mdflow-card,html.md-dark .mdflow-k{background:#181a20!important;border-color:rgba(148,163,184,.16)!important;box-shadow:none!important;}
html.md-dark .mdflow-svg .mdflow-head rect{fill:rgba(37,99,235,.16)!important;stroke:rgba(37,99,235,.3)!important;}
html.md-dark .mdflow-svg .mdflow-n rect{fill:#1b1e26!important;stroke:rgba(148,163,184,.28)!important;}
html.md-dark .mdflow-svg .mdflow-n .n-t{fill:#cbd5e1!important;}
html.md-dark .mdflow-svg .mdflow-n .n-no{fill:rgba(148,163,184,.6)!important;}
html.md-dark .mdflow-svg .mdflow-n.is-on rect{fill:rgba(37,99,235,.22)!important;stroke:#60a5fa!important;}
html.md-dark .mdflow-svg .mdflow-n.is-on .n-t{fill:#93c5fd!important;}
html.md-dark .mdflow-svg .ph-name{fill:#e2e8f0!important;}
html.md-dark .mdflow-svg .ph-no{fill:#93c5fd!important;}
html.md-dark .mdflow-svg .mdflow-arw{stroke:#60a5fa!important;}
html.md-dark .mdflow-k h3{color:#e2e8f0!important;}
html.md-dark .mdflow-row{background:rgba(148,163,184,.06)!important;border-color:rgba(148,163,184,.14)!important;}
html.md-dark .mdflow-row p{color:#cbd5e1!important;}
html.md-dark .mdflow-item{background:rgba(148,163,184,.05)!important;border-color:rgba(148,163,184,.14)!important;}
html.md-dark .mdflow-item[open]{border-color:rgba(37,99,235,.4)!important;}
html.md-dark .mdflow-item>summary{color:#cbd5e1!important;}
html.md-dark .mdflow-phase>summary{color:#e2e8f0!important;}
html.md-dark .mdflow-tabs{background:rgba(148,163,184,.14)!important;}
html.md-dark .mdflow-tab.is-on{background:#232733!important;color:#93c5fd!important;}
html.md-dark .mdflow-x{background:rgba(148,163,184,.16)!important;color:#cbd5e1!important;}

/* 手机：底部抽屉 + 流程图上横向滑动提示 */
@media (max-width:640px){
  .mdflow-svg{min-width:900px!important;}
  .mdflow-hint{display:block!important;}
  .mdflow-card{padding:12px!important;}
  .mdflow-k{left:0!important;right:0!important;bottom:0!important;width:100%!important;max-height:64vh!important;
    border-radius:16px 16px 0 0!important;padding:16px!important;}
  .mdflow-item>summary{font-size:13.5px!important;}
}

/* 打印：白底、图不裁切、隐藏交互件 */
@media print{
  .mdflow-k,.mdflow-hint,.mdflow-tabs{display:none!important;}
  .mdflow-card{border:0!important;box-shadow:none!important;padding:0!important;}
  .mdflow-svg{min-width:0!important;width:100%!important;}
  .md-flow-page .single-article{max-width:100%!important;}
  .mdflow-scroll{overflow:visible!important;}
}

/* 依据与版次说明（provenance） */
.mdflow-basis{display:block;margin:0 0 14px;padding:11px 14px;background:#f8fafc;border:1px solid #eef2f7;border-radius:12px;
  font-size:12.5px;line-height:1.85;color:#64748b;}
.mdflow-basis b{color:#1d4ed8;font-weight:700;margin-right:10px;}
html.md-dark .mdflow-basis{background:rgba(148,163,184,.06);border-color:rgba(148,163,184,.14);color:#94a3b8;}
html.md-dark .mdflow-basis b{color:#93c5fd;}
