/*! © 2026 王欣迪 (Cindy_wxd) · SPDX-License-Identifier: Apache-2.0 · 使用、修改或再分发须保留本署名与 NOTICE */
/* shard-device-map · 黑白极简数据界面
   一块居中的主可视区（.zp-box，裁在自己的矩形里）+ 边缘的标题/导航/图例。
   规则（本页视觉提示词）：
   · 代码字体（等宽）贯穿全页；文字只留名称、数值与短键，解释进 hover。
   · 只用中性灰，所有颜色 R＝G＝B——例外只有告警：超容格、告警角标、故障链严重度用红/琥珀。背景 #111111，表面 #131313–#282828，主文字
     #E8E8E8，次文字 #A0A0A0；纯白 #FFFFFF 只给当前选中对象的边框与关键高亮。
   · 数据灰度 = 占用率（合计 / HBM），全页同一把尺：c0 #4A4A4A < 70% ≤ c1 #808080
     < 88% ≤ c2 #BDBDBD ≤ 100% < c3 告警红。越满越亮。
   · 几何对象直边，主轮廓 1.5px；小按钮/切换 4–5px 圆角。不用渐变、玻璃、发光、
     厚阴影。层次靠轮廓、留白、遮挡与灰度。
   · Inter / 同类无衬线，字重 400–500，标题 24px，正文与控件 12–13px，数字等宽。
   · 嵌进来的 iframe（矩阵 / 整网图 / 泳道 / 魔方）是别的页面，本页不改它们的
     源码，只在宿主这一侧给 iframe 套 grayscale(1)，保证画面里没有色相。 */

* { box-sizing: border-box; }

/* JetBrains Mono（可变字重 100–800，SIL OFL 1.1，见 fonts/OFL-JetBrainsMono.txt）：只带拉丁与拉丁扩展两个子集，
   中文按字体栈落到系统黑体 */
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 100 800; font-display: swap;
  src: url("./fonts/jetbrains-mono-latin-wght-normal.woff2") format("woff2-variations"), url("./fonts/jetbrains-mono-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 100 800; font-display: swap;
  src: url("./fonts/jetbrains-mono-latin-ext-wght-normal.woff2") format("woff2-variations"), url("./fonts/jetbrains-mono-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
:root { --mono: "JetBrains Mono", "SF Mono", "IBM Plex Mono", ui-monospace, Menlo, Consolas, "PingFang SC", "Source Han Sans SC", monospace; --alert: #F85149; --warn: #FAB219; --assoc: #A8A8A8; }
html, body {
  margin: 0; padding: 0; width: 100%; height: 100%;
  background: #111111; overflow: hidden;
  font-family: var(--mono);
  font-size: 12px; font-weight: 400; color: #E8E8E8; letter-spacing: -.01em;
  font-variant-numeric: tabular-nums;
}
b, strong { font-weight: 500; }

/* ── 舞台：铺满视口，谁在上层只用 opacity 切（轻量，不做模糊/缩放飞镜头）。 */
.stage-frame {
  position: fixed; inset: 0; width: 100%; height: 100%;
  border: 0; display: block; background: #111111;
  opacity: 1; transition: opacity .25s ease; z-index: 2;
  /* 淡入淡出放到合成器上做：不提层的话，四万个图元的集群图在淡出的每一帧都要重新光栅化（逐帧看过，进板视图那一下 2.7 秒几乎全是它） */
  will-change: opacity; contain: strict;
}
/* 藏起来的舞台只是沉到底下（z-index 不继承），不再用 pointer-events:none——那是继承属性，
   每切一次层，舞台里上万个 SVG 元素都得重算一遍样式，下钻/返回一次卡 100ms+。 */
.stage-frame.is-hidden { opacity: 0; z-index: 1; transition: opacity .15s ease; }
/* 换台时新的一层抬到 3 淡入，旧的一层在 2 保持不透明，淡入完再收成 1（见 pattern.js showStage）。都在页面底色之上——
   原来藏起来的放 -1，会被 body 的底色盖住，旧的一层一被标成藏起来就立刻看不见，中间闪一帧黑。 */
.stage-frame.is-top { z-index: 3; }
/* 单卡页预载好之后不沉到底下，而是以 1% 不透明度压在最上层、不接指针：被不透明的一层完全盖住的图层，
   合成器会跳过它的光栅化——逐帧看过，下钻时单卡页要到淡入开始才整页光栅化，中间空白 0.6–0.9 秒。
   浮在上面就会在后台先光栅化好（它藏着时是暂停的静态画面，只光栅一次）。只对 iframe 这么做：
   iframe 的 pointer-events 不会继承进它自己的文档，不会触发整页重算样式。 */
#detailFrame.is-hidden { opacity: 0; z-index: 4; pointer-events: none; transition: none; }
body.detail-warm #detailFrame.is-hidden { opacity: .01; }
/* 交叉淡入不经过黑：新的一层在上面 .25s 淡入，旧的一层先沉到下面、保持不透明，等新的一层满了（.24s 延迟）再淡出——
   逐帧看过，原来两层同时一出一进，中间有一两帧整块画布是黑的 */
iframe.stage-frame, .drawer iframe { filter: grayscale(1); }
/* 10.27 集群 2.5D / 3D 用的是 硬件图元库 的立体图元，颜色照搬图元库原色（与 2D 图元同一套）——这一个 iframe 不去色 */
iframe#hwFrame { filter: none; background: #111111; }
/* 泳道例外：阶段/通信种类靠它自己的颜色区分，灰掉就读不出来——保留原色 */
.drawer[data-panel="swimlane"] iframe { filter: none; }

/* ── 边缘文字列：左 = 标题 + 规模 + PP 段柱状选择器 + 图例；右 = 选中 rank 的
   读数。不套卡片（无底、无框），主可视区裁在自己的矩形里，所以不会压到它们。 */
.side-card {
  position: fixed; top: 64px; z-index: 6; width: 264px;
  max-height: calc(100vh - 140px); overflow-y: auto;
  font-size: 12px; line-height: 1.6; color: #A0A0A0;
  transition: opacity .15s ease;
}
.side-card.is-hidden { opacity: 0; pointer-events: none; animation: none !important; }   /* 10.29 调整：入场动画（opacity 0→1，backwards）播放期间会压过隐藏——10.20 起永远隐藏的旧右上 rank 卡每次换选中都闪出来叠在右列上 */
.side-left { left: 24px; top: 20px; width: 288px; }
.side-right { right: 24px; }
.lc-title { margin: 0 0 8px; white-space: nowrap; font-size: 18px; line-height: 1.25; font-weight: 500; color: #E8E8E8; letter-spacing: -.03em; }
.lc-sub { color: #A0A0A0; font-size: 11px; line-height: 1.7; }
.lc-k, .brief-k { margin-top: 14px; margin-bottom: 4px; font-size: 10px; color: #8A8A8A; letter-spacing: .04em; }
.tag { display: none; font-style: normal; font-size: 11px; color: #A0A0A0; border: 1.5px solid #282828; border-radius: 4px; padding: 0 5px; margin-left: 6px; }
:root { --c-tp: #22d3ee; --c-cp: #86c70f; --c-ep: #9b3cf6; --c-dp: #4369ef; --c-pp: #f472b6; }   /* 10.16：PP 原是 #ffaa3b，与告警琥珀撞色 → 粉 */
.gc { display: inline-block; width: 6px; height: 6px; border-radius: 1px; margin-right: 6px; vertical-align: 1px; }

/* 柱状选择器：共用基线，柱高 = 段内峰值占用，灰度同画布；虚线 = 100% */
.pbars { display: block; overflow: visible; margin-top: 14px; }
.pb { cursor: pointer; }
.pb-hit { fill: transparent; }
.pb-bar { stroke: none; }
.pb.is-on .pb-bar { stroke: #FFFFFF; stroke-width: 1.5; }
.pb:hover .pb-bar { stroke: #A0A0A0; stroke-width: 1.5; }
.pb.is-on:hover .pb-bar { stroke: #FFFFFF; }
.pb-num { font-size: 9px; fill: #8A8A8A; }
.pb.is-on .pb-num { fill: #FFFFFF; }
.pb-val { font-size: 10px; fill: #FFFFFF; }
.pb-base { stroke: #3A3A3A; stroke-width: 1; }
.pb-cap { stroke: #5C5C5C; stroke-width: 1; stroke-dasharray: 3 3; }
.c-none { fill: #282828; }

/* 灰度图例（占用率） */
.lc-legend { position: relative; display: grid; grid-template-columns: repeat(4, 22px); gap: 2px; margin-top: 12px; padding-bottom: 14px; font-size: 9px; color: #8A8A8A; }
.lc-legend span { position: absolute; top: 9px; transform: translateX(-50%); }
.lc-legend span:nth-of-type(1) { left: 23px; } .lc-legend span:nth-of-type(2) { left: 47px; } .lc-legend span:nth-of-type(3) { left: 71px; }
.lg { display: block; width: 22px; height: 6px; }

/* 统一的四档灰度：画布格子、宇宙叶子、板上 NPU、柱、图例共用 */
.c0 { fill: #4A4A4A; background: #4A4A4A; }
.c1 { fill: #808080; background: #808080; }
.c2 { fill: #BDBDBD; background: #BDBDBD; }
.c3 { fill: var(--alert); background: var(--alert); }   /* 超容 = 告警，唯一用色 */

/* 右列：rank 读数 */
.brief-h { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; color: #E8E8E8; margin-bottom: 2px; }
.brief-badge { font-size: 10px; font-weight: 500; color: #A0A0A0; border: 1px solid #282828; border-radius: 3px; padding: 0 5px; }
.brief-badge.is-alert { color: #FFFFFF; background: var(--alert); border-color: var(--alert); }
.brief-sub { color: #8A8A8A; font-size: 11px; margin-bottom: 6px; }
.brief-row { display: flex; justify-content: space-between; gap: 12px; font-size: 11px; line-height: 1.75; }
.brief-row span { color: #A0A0A0; }
.brief-row b { color: #E8E8E8; font-weight: 400; }
/* group 表三列：维 ×n · 闭合级 · 一次搬多少 */
.brief-row3 { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; }
.brief-row3 em { font-style: normal; color: #6A6A6A; text-align: right; }
.brief-row3 b.is-na { color: #4A4A4A; }
.brief-total { margin-top: 4px; padding-top: 4px; border-top: 1px solid #282828; }
.brief-total b { font-weight: 500; }
.brief-card.is-cta { padding-bottom: 0; }
.brief-cta {
  display: inline-block; width: auto; margin: 10px 6px 0 0;
  background: transparent; color: #A0A0A0; border: 1px solid #282828; border-radius: 3px;
  font: inherit; font-size: 11px; padding: 3px 8px; text-align: left; cursor: pointer;
}
.brief-cta:hover { color: #FFFFFF; border-color: #8A8A8A; }

/* ── 标题即面包屑：左上角，模型名 / 板 N / rank N / 单卡，除当前一级外都能点回去 */
.topbar {
  position: fixed; top: 16px; left: 16px; z-index: 8;
  display: flex; align-items: center; font-size: 11px;
  transition: opacity .15s ease;
}
.topbar.is-hidden { opacity: 0; pointer-events: none; }
.crumb { display: flex; align-items: baseline; gap: 6px; color: #A0A0A0; white-space: nowrap; font-size: 14px; line-height: 24px; }
.crumb i { font-style: normal; color: #5A5A5A; }
.crumb .cr { font: inherit; color: #8A8A8A; background: transparent; border: 0; padding: 0; cursor: pointer; letter-spacing: -.01em; }
.crumb .cr-root { font-size: 18px; font-weight: 500; letter-spacing: -.03em; }
.crumb .cr:hover { color: #FFFFFF; }
.crumb .cr.is-cur { color: #E8E8E8; cursor: default; }
.crumb .cr-root.is-cur { cursor: pointer; }

/* ── 底部工具条：缩放 + 三个参考面板 */
.dock {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(18px + var(--pb, 0px)); z-index: 6;
  display: flex; align-items: center; gap: 2px; padding: 3px;
  background: #131313; border: 1.5px solid #282828; border-radius: 5px;
  transition: opacity .15s ease;
}
.dock.is-hidden { opacity: 0; pointer-events: none; }
.dock button {
  display: flex; align-items: center; justify-content: center; color: #A0A0A0;
  background: transparent; border: 0; border-radius: 4px; width: 30px; height: 26px; padding: 0; cursor: pointer;
}
.dock svg { width: 16px; height: 16px; display: block; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: square; stroke-linejoin: miter; }
.dock button:hover { color: #E8E8E8; background: #1E1E1E; }
.dock button.is-on { color: #111111; background: #E8E8E8; }
.dock-sep { width: 1.5px; height: 16px; background: #282828; margin: 0 4px; }

/* ── 右上角告警角标：点它才弹容量 / rank 读数 */
.alert-badge {
  position: fixed; right: 24px; top: 20px; z-index: 6;
  font: inherit; font-size: 11px; font-weight: 500; color: #FFFFFF;
  background: var(--alert); border: 1px solid var(--alert); border-radius: 3px; padding: 3px 9px; cursor: pointer;
  transition: opacity .15s ease;
}
.alert-badge.is-hidden { opacity: 0; pointer-events: none; }
.alert-badge.is-quiet { color: #A0A0A0; background: transparent; border-color: #282828; }
.alert-badge.is-on { outline: 1px solid #FFFFFF; outline-offset: 2px; }
.side-right.is-tip { top: 16px; }
/* 单卡层：矩阵自己的标题在左上、齿轮在右上——左列收掉标题、右上角标与右列让开一行 */
body.t3 .side-left { top: 56px; }
body.t3 .lc-title { display: none; }
body.t3 .alert-badge { top: 64px; }
body.t3 .side-right { top: 104px; }
body.t3 .ip-col-left { top: calc(64px + var(--lc-h, 300px) + 20px); }
body.t3 .ip-col-right { top: calc(104px + var(--rc-h, 160px) + 20px); }

/* ── 参考面板：占住一边，把主可视区挤过去（泳道下方 / 整网图右侧 / 魔方左侧） */
.drawer {
  position: fixed; z-index: 7;
  display: flex; flex-direction: column; overflow: hidden;
  /* 和四周小卡同一套毛玻璃，只是更实一点：面板里是整页内容，透太多读不清 */
  background: rgba(20, 20, 20, .78); border: 1px solid rgba(255, 255, 255, .08); border-radius: 6px;
  -webkit-backdrop-filter: blur(16px) saturate(1.1); backdrop-filter: blur(16px) saturate(1.1);
  transition: opacity .15s ease;
}
.drawer.at-left { left: 16px; top: 64px; bottom: 16px; width: var(--ps-w, 40vw); }
.drawer.at-right { right: 16px; top: 64px; bottom: 16px; width: var(--ps-w, 40vw); }
.drawer.at-bottom { left: 16px; right: 16px; bottom: 16px; height: var(--pb-h, 36vh); }
.drawer.is-hidden { opacity: 0; pointer-events: none; }
/* 拖动条：泳道的上沿调高度，左右面板的内沿调宽度；拖动时 iframe 不吃指针，免得半路被它截走 */
.drawer-grip { position: absolute; z-index: 2; background: transparent; }
.drawer-grip::after { content: ''; position: absolute; background: #3A3A3A; border-radius: 1px; transition: background .15s ease; }
.drawer-grip:hover::after, body.is-resizing .drawer-grip::after { background: #E8E8E8; }
.drawer.at-bottom .drawer-grip { left: 0; right: 0; top: 0; height: 8px; cursor: ns-resize; }
.drawer.at-bottom .drawer-grip::after { left: 50%; top: 3px; width: 32px; height: 2px; transform: translateX(-50%); }
.drawer.at-left .drawer-grip { top: 0; bottom: 0; right: 0; width: 8px; cursor: ew-resize; }
.drawer.at-right .drawer-grip { top: 0; bottom: 0; left: 0; width: 8px; cursor: ew-resize; }
.drawer.at-left .drawer-grip::after, .drawer.at-right .drawer-grip::after { top: 50%; left: 3px; width: 2px; height: 32px; transform: translateY(-50%); }
body.is-resizing, body.is-resizing * { user-select: none; }
body.is-resizing iframe { pointer-events: none; }
body.is-resizing .zp-box, body.is-resizing .dock, body.is-resizing .ip-col { transition: none; }
.drawer-hd { display: flex; align-items: center; justify-content: space-between; padding: 6px 10px; font-size: 12px; color: #E8E8E8; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.drawer-hd button { font: inherit; font-size: 14px; color: #A0A0A0; background: transparent; border: 0; border-radius: 4px; cursor: pointer; padding: 0 6px; }
.drawer-hd button:hover { color: #E8E8E8; background: #1E1E1E; }
.drawer iframe { flex: 1; width: 100%; border: 0; background: #111111; }
body.panel-bottom { --pb: calc(var(--pb-h, 36vh) + 10px); }
body.panel-left .side-left, body.panel-left .ip-col-left { display: none; }
body.panel-right .side-right, body.panel-right .alert-badge, body.panel-right .ip-col-right { display: none; }
/* 10.18：右侧抽屉打开时工具条与配置浮层居中到剩下的画布里，不再被抽屉压住右半截 */
body.panel-right .dock, body.panel-right .cfg-pop { left: calc((100vw - var(--ps-w, 40vw) - 16px) / 2); transition: opacity .15s ease, left .2s ease; }
body.is-resizing.panel-right .dock { transition: none; }
body.panel-bottom .side-card { max-height: calc(100vh - 140px - var(--pb)); }

/* ── 主可视区：裁在自己的矩形里，四周留白给边缘的文字与导航 */
.phys-stage { background: #111111; cursor: grab; }
.phys-stage:active { cursor: grabbing; }
.zp-box { position: absolute; inset: 0; overflow: hidden; }   /* 画布铺满视口，卡片悬浮在上面 */
.zp-box svg { display: block; width: 100%; height: 100%; overflow: visible; }
.zp-box svg text { font-family: var(--mono); pointer-events: none; }

/* 缩放时线宽不变：所有描边按屏幕像素算（non-scaling-stroke 抵掉 viewBox），再除以
   画布缩放倍数 --zk（JS 在 apply() 里写），抵掉 <svg> 上的 CSS transform。 */
.zp-box svg * { vector-effect: non-scaling-stroke; }

/* 选中标注：左上侧，短细引线 */
.sel-label {
  position: fixed; z-index: 5; pointer-events: none; white-space: nowrap;
  font-size: 11px; font-weight: 500; color: #FFFFFF;
  background: #111111; padding: 1px 5px;
}
.sel-label span { font-weight: 400; color: #A0A0A0; }
/* 10.29 调整：平面图 / 板视图的悬停提示，同 2.5D / 3D 引擎里那枚（engine/hw3d.html .tip） */
/* pre-line 而不是 nowrap：提示是「一条一行」的多行结构——连线悬停的三行（级别 / 连线 / 承载）、
   NPU 格子那几行（格子 / 落位 / 注记 + 各组），nowrap 会把换行吞成空格、几句连成一行读不断。
   行距放到 1.55：三行挤在 1.4 里读起来还是一团。提示都短，不担心折行 */
.cv-tip { position: fixed; z-index: 30; pointer-events: none; padding: 6px 10px; border-radius: 8px; background: rgba(28, 28, 28, .92); color: #E6E6E6;
  font: 11px/1.55 var(--mono); white-space: pre-line; transform: translate(12px, 12px); display: none; }
.cv-tip .ct-k { color: #7A7A7A; }   /* 每行开头的标签（级别 / 连线 / 承载…）压暗，值提亮：一条一条读得出来 */
.cv-tip.is-flip { transform: translate(calc(-100% - 12px), 12px); }
.sel-frame { fill: none; stroke: #FFFFFF; stroke-width: calc(2px / var(--zk, 1)); pointer-events: none; }
.sel-frame.al-warn { stroke: var(--warn); stroke-width: calc(3px / var(--zk, 1)); }   /* 10.29 选中的这张就是点中的告警对象：框用那条告警的状态色 */
.sel-frame.al-crit { stroke: var(--alert); stroke-width: calc(3px / var(--zk, 1)); }
.sel-frame.al-thick { stroke-width: calc(3px / var(--zk, 1)); }   /* 超容红的卡被定位：白框加粗（红框混在一片超容红里认不出） */
.p-npu.is-sel { cursor: zoom-in; }   /* 选中的那颗再点 = 放大到它的 POD；已放大 / 板视图里再点 = 进 NPU 页（10.29） */
.sel-lead { position: fixed; z-index: 5; pointer-events: none; overflow: visible; }
.sel-lead line { stroke: #FFFFFF; stroke-width: 1; }
.sel-label.is-hidden, .sel-lead.is-hidden { display: none; }

/* ── 集群层：灵衢物理拓扑。结构件只用表面灰 + 1.5px 轮廓，数据（NPU 格）用四档
   占用率灰度；链路只分线型：实线 UB、虚线 RoCE、粗虚 UBoE。 */
.p-sp { fill: #151515; stroke: #444444; stroke-width: calc(1.5px / var(--zk, 1)); vector-effect: non-scaling-stroke; }
.p-sp.is-on { stroke: #5C5C5C; }
.p-splabel { font-size: 11px; fill: #E8E8E8; }
.p-plane { fill: #1C1C1C; stroke: #3A3A3A; stroke-width: calc(1px / var(--zk, 1)); }
.p-planelabel { font-size: 8px; fill: #A0A0A0; }

.p-sw1 { fill: #222222; stroke: #808080; stroke-width: calc(.8px / var(--zk, 1)); }
.p-sw1label { font-size: 8px; fill: #A0A0A0; }
.p-pod { fill: #181818; stroke: #3E3E3E; stroke-width: calc(1.5px / var(--zk, 1)); vector-effect: non-scaling-stroke; cursor: zoom-in; }
.p-pod:hover { stroke: #5C5C5C; }
.p-pod.is-on { stroke: #A0A0A0; }
.p-pod.is-fit { stroke: #5C5C5C; }
/* 10.29 调整：段告警时这一段的 Rack 外缘描一圈状态色——ZeRO 0 下整片都是超容红，格子本身的琥珀看不出是哪一段被点亮（琥珀不把超容卡降成琥珀） */
.p-pod.al-warn { stroke: var(--warn); }
.p-pod.al-crit { stroke: var(--alert); }
.pb.al-warn .pb-bar { stroke: var(--warn); stroke-width: 1.5; }
.pb.al-crit .pb-bar { stroke: var(--alert); stroke-width: 1.5; }
.p-board { fill: transparent; cursor: pointer; }
.p-pod.is-fit ~ .p-board:hover, .p-board:hover { fill: #202020; }
.p-l2 { stroke: #808080; stroke-opacity: .45; stroke-width: calc(.6px / var(--zk, 1)); fill: none; }
.p-l1 { stroke: #808080; stroke-width: calc(1px / var(--zk, 1)); }
.p-uboe { stroke: #A0A0A0; stroke-width: calc(1.5px / var(--zk, 1)); stroke-dasharray: 6 4; fill: none; }
.p-uboelabel { font-size: 10px; fill: #A0A0A0; }
/* CPU / DPU / NIC / 交换机 / NPU 封装都是 硬件图元库 的 2D 图元（<use href="#hw-*">），
   图元自带灰阶，这里只清掉会被继承进去的描边 */
.p-cpu, .p-dpu, .p-nic, .p-sw2, .p-swicon, .p-npupkg, .b-npuicon, [class^="b-"] use { stroke: none; vector-effect: none; }
.p-npupkg { pointer-events: none; }
.b-npuicon { pointer-events: none; }


.p-bdiv { stroke: #262626; stroke-width: calc(1px / var(--zk, 1)); }
/* 细节随缩放出现：lod1（≥3×）出列头与板分隔，lod2（≥6×）出每格的 rank 号 */
.lod1, .lod2 { display: none; }
svg.lod1 .lod1, svg.lod2 .lod2 { display: inline; }
.p-colhd text { font-size: 2.6px; fill: #8A8A8A; letter-spacing: .02em; }
.p-npunum { font-size: 1.5px; fill: #E8E8E8; pointer-events: none; }
.p-npu.c2 + .p-npunum { fill: #111111; }
.p-npu.is-dim + .p-npunum { opacity: calc(var(--recede) + .1); }   /* rank 号字细，比图形多留一档 */
.p-npu.is-sel + .p-npunum { fill: #FFFFFF; font-weight: 500; }
.p-roce { stroke: #8A8A8A; stroke-width: calc(1px / var(--zk, 1)); stroke-dasharray: 3 3; }
.p-rocelabel { font-size: 8px; fill: #A0A0A0; }

/* rank 格：正方形宫格，灰度 = 占用率；选中 = 纯白边框（不改它自己的灰度）；
   通信组成员保持原灰度、其余压暗，组别靠描边线型分 */
/* 10.29 压暗统一一档 --recede = .3（反馈「这种隐去的部分太隐秘了」→ 看过之后「点击之后其他隐去的透明度再降一些，包括其他板子上的内容」：
   要的是画面干净——选中那一块清楚，其余一律同一档退下去，而不是有的看不见、有的又满亮）。原来格子 .22、封装图标 / 占用条 .25、rank 号 .3，
   展开关系时同 POD 其余板行再盖一层 97% 的底（叠起来 1–3%），而别的板上的 CPU / DPU / NIC 根本不跟着退——乱的是这个落差。
   现在格子、封装图标、占用条、rank 号（+.1）、板视图图标、别的板上的 CPU / DPU / NIC（syncDimCtx 的动态样式）、Hierarchy 面板都读这一个值；
   有压暗时展开关系的底撤掉（同一档已经由各自的 class 退下去，再盖一层就是两档）；2.5D / 3D 同档（engine/hw3d.js RECEDE，往托盘色褪） */
:root { --recede: .3; }
.p-npu { cursor: pointer; transition: opacity .15s ease; }
.p-npu.is-dim { opacity: var(--recede); }
.p-npu.is-sel { stroke: none; }
/* 选中 rank 的五个通信组：集群这一屏最关键的要素——组员落在物理图的哪里——按维度色描边（与矩阵本体同一套色） */
.p-npu.g-tp { stroke: var(--c-tp); stroke-width: calc(1.2px / var(--zk, 1)); }
.p-npu.g-cp { stroke: var(--c-cp); stroke-width: calc(1.2px / var(--zk, 1)); }
.p-npu.g-ep { stroke: var(--c-ep); stroke-width: calc(1.2px / var(--zk, 1)); }
.p-npu.g-dp { stroke: var(--c-dp); stroke-width: calc(1.2px / var(--zk, 1)); }
.p-npu.g-pp { stroke: var(--c-pp); stroke-width: calc(1.2px / var(--zk, 1)); }

/* ── 板层：一块板的 Server 形态 */
.b-cpu rect, .b-dpu rect, .b-nic rect, .b-l1 rect, .b-nsw rect, .b-swb rect { fill: #222222; stroke: #8A8A8A; stroke-width: calc(1.5px / var(--zk, 1)); }
.b-cpu text, .b-dpu text, .b-nic text, .b-l1 text, .b-nsw text, .b-swb text { font-size: 10px; fill: #E8E8E8; }
.b-nic text, .b-l1 text { font-size: 10px; }
.b-plane { fill: #161616; stroke: #282828; stroke-width: calc(1.5px / var(--zk, 1)); }
.b-sw2 { fill: #8A8A8A; }
.p-bnpu { stroke: #111111; stroke-width: calc(1.5px / var(--zk, 1)); }
.p-bnpu.is-sel { stroke: #111111; }
.b-npul { font-size: 11px; fill: #E8E8E8; }
.b-npur { font-size: 9px; fill: #A0A0A0; }
.p-bnpu.c2 ~ .b-npul { fill: #111111; }
.p-bnpu.c2 ~ .b-npur { fill: #2E2E2E; }
.p-bnpu.c3 ~ .b-npul, .p-bnpu.c3 ~ .b-npur { fill: #FFFFFF; }
.b-lbl { font-size: 9px; fill: #A0A0A0; paint-order: stroke; stroke: #111111; stroke-width: calc(3px / var(--zk, 1)); stroke-linejoin: round; }
/* 器件名在图标正下方：往下走的线从名字下沿出，近旁仍有斜线擦过，名字同样垫一圈底色 */
.b-cpu text, .b-dpu text, .b-nic text, .b-l1 text, .b-nsw text, .b-swb text, .b-npul { paint-order: stroke; stroke: #111111; stroke-width: calc(3px / var(--zk, 1)); stroke-linejoin: round; }
.b-lbl-plane { fill: #A0A0A0; }
.b-mesh { fill: none; stroke: #C8C8C8; stroke-opacity: .35; stroke-width: calc(.8px / var(--zk, 1)); }
.b-fan { stroke: #8A8A8A; stroke-opacity: .5; stroke-width: calc(1px / var(--zk, 1)); transition: stroke-opacity .15s ease; }
.b-h2d, .b-nicl { stroke: #A0A0A0; stroke-opacity: .6; stroke-width: calc(1px / var(--zk, 1)); transition: stroke-opacity .15s ease; }
.b-roce { stroke: #8A8A8A; stroke-width: calc(1px / var(--zk, 1)); stroke-dasharray: 3 3; }
.b-pcie { fill: none; stroke: #A0A0A0; stroke-width: calc(1px / var(--zk, 1)); stroke-dasharray: 1 3; }
.b-ub { fill: none; stroke: #8A8A8A; stroke-width: calc(1.5px / var(--zk, 1)); stroke-dasharray: 6 3; }
.b-cpul { fill: none; stroke: #A0A0A0; stroke-width: calc(1.5px / var(--zk, 1)); }
.b-l12 { stroke: #8A8A8A; stroke-width: calc(1px / var(--zk, 1)); }
.b-uboe { stroke: #A0A0A0; stroke-width: calc(1.5px / var(--zk, 1)); stroke-dasharray: 8 4; }
.b-bus { stroke-width: calc(1.5px / var(--zk, 1)); }
.b-fan.is-hot, .b-h2d.is-hot, .b-nicl.is-hot, .b-mesh.is-hot { stroke: #FFFFFF; stroke-opacity: 1; stroke-width: calc(1.8px / var(--zk, 1)); }
.b-fan.is-cold, .b-mesh.is-cold { stroke-opacity: .1; }
.b-h2d.is-cold, .b-nicl.is-cold { stroke-opacity: .15; }

/* ── 连线样式（硬件图元库 · 连线样式 Round 6 的结构，去色）：衬边 + 芯线 ──
   衬边 .lkc 是底色、比芯线宽，把交叉处切开；芯线的实/虚节奏区分介质：
     铜缆（板内：CPU↔CPU、H2D、NIC、NIC 交换、交换板出线）实线 · 光 UB（出板 → L1、L1 → L2、
     CPU/DPU → L1）虚线 7 5 · 长距 UBoE 稀虚线 4 7、半透明 · RoCE 3 3 + 端头空心环 · PCIe 点线。
   只在「近看」出现：板视图（svg.near）始终是；集群层放大 6× 以上（lod2）展开的那块板才加衬边。 */
.lkc { fill: none; stroke: #111111; stroke-linecap: round; stroke-linejoin: round; stroke-width: calc(4.5px / var(--zk, 1)); pointer-events: none; }
.rel .lkc { display: none; stroke: #181818; stroke-width: calc(3.5px / var(--zk, 1)); }
svg.lod2 .rel .lkc { display: inline; }
svg.near .b-links line, svg.near .b-links path { stroke-linecap: round; stroke-linejoin: round; }
svg.near .b-ub { stroke-dasharray: 7 5; }
svg.near .b-uboe { stroke-dasharray: 4 7; stroke-opacity: .75; }
.b-nsw-l, .b-swbx { fill: none; stroke: #A0A0A0; stroke-width: calc(1.2px / var(--zk, 1)); }
.b-swbl { stroke: #8A8A8A; stroke-opacity: .35; stroke-width: calc(.8px / var(--zk, 1)); }
.b-rdma { fill: #111111; stroke: #A0A0A0; stroke-width: calc(1.2px / var(--zk, 1)); }
/* 端点：稀疏干线两头是端口环（marker，见 pattern.js lkDefs）；从总线落下来的那一头是汇接点；
   成束的密线平时不加（64 根的端点只会糊成一排点），选中那颗 NPU 的线加白端口 */
svg.near .b-cpul, svg.near .b-pcie, svg.near .b-ub:not(.b-bus), svg.near .b-nsw-l, svg.near .b-swbx,
svg.near .b-h2d, svg.near .b-nicl { marker-start: url(#b-lkp); marker-end: url(#b-lkp); }
svg.near .b-roce:not(.b-bus) { marker-start: url(#b-lkj); }
svg.near .b-out { marker-end: url(#b-lkj); }
svg.near .b-links .is-hot { marker-start: url(#b-lkh); marker-end: url(#b-lkh); }
svg.near .b-links .is-cold { marker-start: none; marker-end: none; }
/* 端点只落在器件上：并进另一根线的那头（b-join）、出到画框边的交换板外连（b-swbx 右 / 左端）不打点，不然就是飘在半空的点 */
svg.near .b-ub.b-join, svg.near .b-swbx { marker-end: none; }
svg.lod2 .rel-cpu, svg.lod2 .rel-pcie, svg.lod2 .rel-ub, svg.lod2 .rel-nic, svg.lod2 .rel-nsw, svg.lod2 .rel-h2d { marker-start: url(#p-lkp); marker-end: url(#p-lkp); }
svg.lod2 .rel-roce { marker-start: url(#p-lkj); }
svg.lod2 .rel .is-hot { marker-start: url(#p-lkh); marker-end: url(#p-lkh); }
svg.lod2 .rel .is-cold { marker-start: none; marker-end: none; }
/* 激活链路上跑的点：跟端点同一套——白色实心小点，不再是深色珠子 + 白描边（一圈圈环在线上比线还重） */
.lk-dot { fill: #FFFFFF; fill-opacity: .8; stroke: none; pointer-events: none; }
/* 集群层：选中那颗 NPU 在原地展开的板内关系里，它自己的线换白、其余退后（点不跑：线不到 1px） */
.rel .is-hot { stroke: #FFFFFF !important; stroke-opacity: 1 !important; }
.rel .is-cold { stroke-opacity: .12 !important; }
.rel-nsw { stroke: #808080; stroke-opacity: .8; }
.rel-inf { stroke: #A0A0A0; stroke-opacity: .7; }
/* 太细时换显示方式：集群总览（< 3×）线宽不到 1px，虚线只剩噪点——RoCE 收成实线、压淡，只看走向 */
#physStage svg:not(.lod1) .p-roce { stroke-dasharray: none; stroke-opacity: .5; }
#physStage svg:not(.lod1) .p-l2 { stroke-opacity: .3; }

/* ── 故障复盘：两条链挂在左右两列下面。问题是一行文字 + 细分隔线，点开才出现
   链；严重度只分明暗（--ip-sevc：越严重越亮）。 */
.incident-panel { position: fixed; inset: 0; z-index: 5; pointer-events: none; font-size: 12px; color: #A0A0A0; transition: opacity .15s ease; }
.incident-panel.is-hidden { opacity: 0; }
.ip-col { position: absolute; width: 264px; bottom: calc(18px + var(--pb, 0px)); overflow-y: auto; pointer-events: auto; }
.ip-col-left { left: 24px; top: calc(20px + var(--lc-h, 330px) + 20px); }
.ip-col-right { right: 24px; top: calc(64px + var(--rc-h, 160px) + 20px); }
.ip-prob {
  display: block; width: 100%; text-align: left; font: inherit; color: #E8E8E8;
  background: transparent; border: 0; border-top: 1.5px solid #282828; border-radius: 0;
  padding: 8px 0; cursor: pointer;
}
.ip-prob { display: flex !important; align-items: baseline; justify-content: space-between; gap: 8px; }
.ip-prob b { font-size: 11px; font-weight: 400; }
.ip-prob span { font-size: 10px; color: var(--alert); }
.ip-prob:hover b { color: #FFFFFF; }
.ip-prob.is-on { border-top-color: #FFFFFF; }
.ip-chain { position: relative; padding-left: 14px; display: none; }
.ip-grp.is-open .ip-chain { display: block; }
.ip-grp + .ip-grp { margin-top: 4px; }
.ip-chain::before { content: ''; position: absolute; left: 3px; top: 8px; bottom: 8px; width: 1px; background: #5A5A5A; }
.ip-ev { position: relative; padding: 5px 0 7px; }
.ip-ev::before { content: ''; position: absolute; left: -14px; top: 9px; width: 7px; height: 7px; background: var(--ip-sevc); }
.ip-ev.is-root::before { outline: 1px solid var(--ip-sevc); outline-offset: 1.5px; }
.ip-evhd { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; font-size: 11px; color: #E8E8E8; line-height: 1.35; }
.ip-time { color: #A0A0A0; }
.ip-root { font-size: 9px; font-weight: 500; color: #FFFFFF; background: var(--alert); border-radius: 4px; padding: 0 5px; }
.ip-drill {
  font: inherit; font-size: 11px; color: #E8E8E8;
  background: #131313; border: 1.5px solid #282828; border-radius: 4px; padding: 0 6px; cursor: pointer;
}
.ip-drill:hover { border-color: #8A8A8A; }
.ip-ms { display: flex; flex-wrap: wrap; gap: 2px 10px; margin-top: 3px; }
.ip-m { font-size: 10px; font-weight: 400; color: #E8E8E8; white-space: nowrap; }
.ip-m em { font-style: normal; font-weight: 400; color: #A0A0A0; margin-right: 4px; }
.ip-m::before { content: ''; display: inline-block; width: 5px; height: 5px; background: var(--ip-sevc); margin-right: 5px; vertical-align: 1px; }

/* ── 段层：宇宙视图。中心 = 模型，一圈 = PP 段，叶子 = 该段全部 rank（灰度 = 占用率）。 */

/* ZeRO 档位切换：左列图例下面一行小分段按钮 */
.lc-zero { display: flex; align-items: center; gap: 2px; margin-top: 10px; font-size: 10px; color: #8A8A8A; }
.lc-zero button { font: inherit; font-size: 10px; color: #A0A0A0; background: transparent; border: 1px solid #282828; border-radius: 3px; width: 20px; height: 18px; padding: 0; cursor: pointer; }
.lc-zero button:first-of-type { margin-left: 6px; }
.lc-zero button:hover { color: #FFFFFF; border-color: #8A8A8A; }
.lc-zero button.is-on { color: #111111; background: #E8E8E8; border-color: #E8E8E8; }

/* 图元后面不垫卡片（反馈「不要每个图元后面的卡片」）：放大到 6× 以后 NPU 格子本身透明，只剩
   硬件图元库 的封装图标；占用率这份数据挪进图标下沿的状态条（该库 NPU 的状态条就在
   die 窗口底部），超容仍是告警红。板视图同理，部件框只留名字，不留底和框。 */
svg.lod2 .p-npu:not(.is-sel) { fill-opacity: 0; }
svg.lod2 .p-npu.is-sel { fill-opacity: 0; }
.p-npustrip, .b-npustrip { fill: #3A3A3A; pointer-events: none; }
.p-npu.c0 + .p-npunum + .p-npupkg + .p-npustrip, .p-bnpu.c0 + .b-npuicon + .b-npustrip { fill: #4A4A4A; }
.p-npu.c1 + .p-npunum + .p-npupkg + .p-npustrip, .p-bnpu.c1 + .b-npuicon + .b-npustrip { fill: #808080; }
.p-npu.c2 + .p-npunum + .p-npupkg + .p-npustrip, .p-bnpu.c2 + .b-npuicon + .b-npustrip { fill: #BDBDBD; }
.p-npu.c3 + .p-npunum + .p-npupkg + .p-npustrip, .p-bnpu.c3 + .b-npuicon + .b-npustrip { fill: var(--alert); }
svg.lod2 .p-npunum { fill: #A0A0A0; }
svg.lod2 .p-npu.c2 + .p-npunum { fill: #A0A0A0; }
svg.lod2 .p-npu.is-sel + .p-npunum { fill: #FFFFFF; }
.p-npu.is-dim + .p-npunum + .p-npupkg, .p-npu.is-dim + .p-npunum + .p-npupkg + .p-npustrip { opacity: var(--recede); }
.p-bnpu { fill-opacity: 0; stroke: none; }
.p-bnpu.is-dim + .b-npuicon, .p-bnpu.is-dim + .b-npuicon + .b-npustrip { opacity: var(--recede); }
.b-npul { fill: #E8E8E8 !important; }
.b-npur { fill: #A0A0A0 !important; }
.b-cpu rect, .b-dpu rect, .b-nic rect, .b-l1 rect, .b-nsw rect, .b-swb rect { fill: transparent; stroke: none; }
.p-sw1 { fill: transparent; stroke: none; }
/* 放大后与板视图里不再给通信组描框（框一描就又成了卡片）：组员靠「不压暗」读出，选中靠外圈白框 */
svg.lod2 .p-npu, .board-stage .p-npu { stroke: none !important; }
/* 单卡页还在后台就绪中：原画面不动，面包屑末尾挂一个静态「…」，不做转圈动画 */
body.is-loading .crumb .cr.is-cur:last-child::after { content: ' …'; color: #8A8A8A; }
/* 左列的容量告警：一两行「超容 N / 红线 N」，数字用告警色 */
.lc-cap { margin-top: 14px; }
.lc-caprow { display: flex; justify-content: space-between; font-size: 11px; line-height: 1.8; color: #A0A0A0; }
.lc-caprow b { font-weight: 500; }
.lc-caprow.is-bad b { color: var(--alert); }
.lc-caprow.is-warn b { color: var(--warn); }
.lc-cap .brief-cta { margin-top: 6px; }
/* 放大后原地展开的一块板的全部关系（线型与板视图一致：实线 UB，长虚 UB 上联，短虚 RoCE，点线 PCIe） */
.rel { display: none; }
svg.lod1 .rel { display: inline; }
.rel line, .rel path { fill: none; stroke-width: calc(1px / var(--zk, 1)); }
.rel-mesh { stroke: #E8E8E8; stroke-opacity: .55; }
.rel-clos { stroke: #BDBDBD; stroke-opacity: .35; }
.rel-l12 { stroke: #808080; stroke-opacity: .6; }
.rel-ub { stroke: #A0A0A0; stroke-opacity: .6; stroke-dasharray: 3 2; }
.rel-h2d { stroke: #A0A0A0; stroke-opacity: .8; }
.rel-nic { stroke: #808080; stroke-opacity: .9; }
.rel-cpu { stroke: #E8E8E8; stroke-width: calc(1.5px / var(--zk, 1)) !important; }
.rel-pcie { stroke: #A0A0A0; stroke-dasharray: 1 1.5; }
.rel-roce { stroke: #808080; stroke-dasharray: 1.2 1.2; }
.rel-row { fill: #FFFFFF; fill-opacity: .04; stroke: #A0A0A0; stroke-width: calc(1px / var(--zk, 1)); stroke-dasharray: 2 2; }

/* ── 数据标注开关（配置浮层）：关掉哪类就在 body 上挂 ann-no* ── */
body.ann-noocc .p-npu:not(.is-sel), body.ann-noocc .pb-bar { fill: #6A6A6A !important; }
body.ann-noocc .p-npustrip, body.ann-noocc .b-npustrip { fill: #3A3A3A !important; }
body.ann-nonum .p-npunum { display: none !important; }
body.ann-norel .rel { display: none !important; }

/* ── 配置浮层：工具条正上方，一张窄卡，四段：并行配置 / 并行对象 / 数据标注 / 单卡 ── */
.cfg-pop {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(62px + var(--pb, 0px)); z-index: 9;
  width: 300px; max-height: 64vh; overflow-y: auto; padding: 4px 14px 10px;
  background: #131313; border: 1.5px solid #282828; border-radius: 5px;
  font-size: 11px; color: #A0A0A0;
}
.cfg-pop.is-hidden { display: none; }
.cf-sec { padding: 10px 0 8px; border-bottom: 1px solid #222222; }
.cf-sec:last-child { border-bottom: 0; }
.cf-k { font-size: 10px; color: #8A8A8A; letter-spacing: .04em; margin-bottom: 6px; }
.cf-sub { margin-top: 6px; color: #8A8A8A; }
.cf-line { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.cf-line > span:first-child { width: 28px; color: #8A8A8A; }
.cf-sel { width: 100%; font: inherit; font-size: 11px; color: #E8E8E8; background: #111111; border: 1px solid #282828; border-radius: 3px; padding: 4px 6px; }
.cf-seg { display: inline-flex; gap: 2px; flex-wrap: wrap; }
.cf-seg button { font: inherit; font-size: 10.5px; color: #A0A0A0; background: transparent; border: 1px solid #282828; border-radius: 3px; min-width: 24px; height: 20px; padding: 0 6px; cursor: pointer; }
.cf-seg button:hover { color: #FFFFFF; border-color: #5C5C5C; }
.cf-seg button.is-on { color: #111111; background: #E8E8E8; border-color: #E8E8E8; }
.cf-step b { color: #E8E8E8; font-weight: 500; min-width: 44px; text-align: center; }
.cf-step button { font: inherit; color: #A0A0A0; background: transparent; border: 1px solid #282828; border-radius: 3px; width: 22px; height: 20px; cursor: pointer; }
.cf-step button:hover { color: #FFFFFF; border-color: #5C5C5C; }
.cf-chk { display: inline-flex; align-items: center; gap: 6px; margin: 2px 12px 2px 0; cursor: pointer; color: #C8C8C8; }
.cf-chk input { appearance: none; width: 11px; height: 11px; margin: 0; border: 1px solid #5C5C5C; border-radius: 2px; background: transparent; cursor: pointer; }
.cf-chk input:checked { background: #E8E8E8; border-color: #E8E8E8; box-shadow: inset 0 0 0 2px #131313; }

/* ── 层级剖面（右侧面板，原生绘制） ── */
.drawer-body { flex: 1; overflow-y: auto; padding: 4px 16px 16px; }
.hv-row { padding: 10px 0; border-bottom: 1px solid #222222; }
.hv-row.is-ghost { opacity: .5; }
.hv-hd { display: flex; align-items: baseline; gap: 8px; margin-bottom: 6px; font-size: 11px; }
.hv-lv { font-size: 10px; color: #8A8A8A; width: 18px; }
.hv-nm { color: #E8E8E8; font-weight: 500; }
.hv-ct { color: #8A8A8A; }
.hv-dims { margin-left: auto; color: #E8E8E8; font-size: 10px; border: 1px solid #3A3A3A; border-radius: 3px; padding: 0 5px; }
.hv-bar { display: block; width: 100%; text-align: left; font: inherit; font-size: 11px; color: #C8C8C8; background: transparent; border: 1px solid #282828; border-radius: 3px; padding: 4px 8px; cursor: pointer; }
.hv-bar:hover { border-color: #5C5C5C; color: #FFFFFF; }
.hv-chips { display: flex; gap: 3px; flex-wrap: wrap; }
.hv-chip { flex: 1; font: inherit; font-size: 10.5px; color: #A0A0A0; background: transparent; border: 1px solid #282828; border-radius: 3px; padding: 2px 10px; cursor: pointer; }
.hv-chip:hover { color: #FFFFFF; border-color: #5C5C5C; }
.hv-chip.is-on { color: #111111; background: #E8E8E8; border-color: #E8E8E8; }
.hv-grid { display: block; max-width: 100%; cursor: pointer; }
.hv-dies { display: flex; gap: 4px; }
.hv-die { flex: 1; text-align: center; font-size: 10px; color: #C8C8C8; border: 1px solid #5C5C5C; border-radius: 3px; padding: 3px 0; }
.hv-die.is-io { color: #8A8A8A; border-color: #3A3A3A; border-style: dashed; }
.hv-cg { display: grid; grid-template-columns: repeat(16, 1fr); gap: 2px; }
.hv-cg i { display: block; aspect-ratio: 1; background: #3A3A3A; }
.hv-cg i:nth-child(2n) { background: #5C5C5C; }
/* 10.29 层间联动（反馈「上下之间的高亮联动保留，现在没有了也不能选」）：同画布——当前对象白框、它的上级浅灰框（同「连带选中」#A8A8A8）、
   悬停提亮一档（不是框）、与当前无关的退后一档。胶囊的底色仍归 10.16 那条全局规则（深底），框用内阴影画，不去抢 border 的 !important；
   「SuperPoD 0」在四颗一行时不再折成两行 */
.hv .hv-chip { white-space: nowrap; padding: 2px 4px; transition: opacity .15s; }
.hv .hv-chip.is-on { box-shadow: inset 0 0 0 1.5px #FFFFFF; }
.hv .hv-chip.is-up { box-shadow: inset 0 0 0 1px #A8A8A8; color: #E8E8E8; }
.hv .hv-chip.is-hov { background: rgba(255, 255, 255, .1); color: #FFFFFF; }
.hv .hv-chip.is-dim:not(.is-hov) { opacity: var(--recede); }
.hv .hv-bar.is-up { border-color: #A8A8A8; color: #E8E8E8; }
.hv-row[data-hin] .hv-dies, .hv-row[data-hin] .hv-cg { opacity: var(--recede); transition: opacity .15s; }
.hv-row[data-hin].is-rel .hv-dies, .hv-row[data-hin].is-rel .hv-cg { opacity: 1; }
.hv-row[data-hin].is-rel .hv-die:not(.is-io) { border-color: #A8A8A8; color: #E8E8E8; }
/* 单卡层工具条只留「配置」（机位 / 通信连线作用在这一屏），缩放与参考面板不适用 */
body.t3 .dock [data-drawer], body.t3 .dock .dock-sep { display: none; }
body.t3 .dock .dock-sep:first-of-type { display: block; }   /* 10.19：NPU 页也用这组缩放 / 复位（转给引擎），与 Network Graph 抽屉一样不再显示引擎自带的那条 HUD */

/* ── 悬浮毛玻璃小卡（反馈「悬浮在画布上，做成一个一个小的卡片，毛玻璃，不遮挡画布后面的内容」）──
   画布铺满整个视口；左列拆成三张小卡（标题 / PP 段柱 / 容量告警），故障问题每条一张，右侧 rank 读数、
   面包屑、工具条都是同一种半透明玻璃：底只有 50% 左右不透明度 + 模糊，画布透得过来。 */
.gcard, .side-right, .ip-grp, .topbar, .dock, .cfg-pop, .dcard {
  /* 只要填充不要描边（反馈「卡片不要描边，只要填充，填充用毛玻璃」）：去掉 1px 边，底色略提、模糊加重，
     靠毛玻璃自己的明度差把卡片从画布上托出来 */
  background: rgba(30, 30, 30, .58);
  -webkit-backdrop-filter: blur(18px) saturate(1.2); backdrop-filter: blur(18px) saturate(1.2);
  border: 0; border-radius: 6px;
}
.side-left { width: 272px; top: 56px; left: 16px; overflow: visible; max-height: none; }
.gcard { padding: 10px 12px; }
.gcard + .gcard { margin-top: 8px; }
.gcard .lc-title { margin-bottom: 6px; }
.gcard .pbars { margin-top: 0; }
.gcard .lc-cap { margin-top: 0; }
/* 右列一列一个宽度：rank 卡与下面每一张数据卡都是 224px */
.side-right { right: 16px; top: 16px; width: 224px; box-sizing: border-box; padding: 10px 12px; }
/* 10.29 调整：单卡页右上角那枚引擎自带的设置圆钮不再画（宿主注入样式收掉，见 monoDetail），右列不用再为它让位 */
.ip-col { width: 272px; overflow-y: auto; }
.ip-col-left { left: 16px; top: calc(56px + var(--lc-h, 300px) + 8px); }
body.t3 .ip-col-left { top: calc(56px + var(--lc-h, 300px) + 8px); }
.ip-grp { padding: 0 12px; }
.ip-grp + .ip-grp { margin-top: 8px; }
.ip-prob { border-top: 0; padding: 9px 0; }
.ip-grp.is-open .ip-chain { padding-bottom: 6px; }
/* 标题面包屑是画布上的字，不是卡：不套毛玻璃 */
.topbar { padding: 0; top: 16px; background: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; }
.dock { border-radius: 6px; }
.cfg-pop { background: rgba(20, 20, 20, .78); }
.alert-badge { top: 16px; right: 16px; }

/* ── 数据卡：同一套毛玻璃小卡。右列接在右卡下面（集群 / POD / 板 / rank 各出各的），
   单卡层拆成 3D 卡两侧的两列（左：模型态 + 权重逐块切分；右：执行态 + 各维通信 + 流水） */
.data-col, .shard-col { position: fixed; z-index: 5; display: flex; flex-direction: column; gap: 8px; overflow-y: auto; scrollbar-width: none; pointer-events: auto; }
.data-col::-webkit-scrollbar, .shard-col::-webkit-scrollbar { display: none; }
.data-col { right: 16px; width: 272px; top: 60px; bottom: 76px; }
.shard-col { left: 16px; top: 64px; bottom: 72px; width: 272px; }   /* 底下留给矩阵自己的选组工具条 */
.data-col.is-hidden, .shard-col.is-hidden { display: none; }
/* 10.29 调整：右列 / NPU 页左列是一整条到底的固定列，卡片下面的空白也吃事件——放大后落在那一条里的格子点不中，指针在空白上滚轮滚的是卡片列、不是画布。
   列本身不接指针，只有卡片（与自绘滚动条）接；滚轮在卡片上照旧滚这一列（.vs-host） */
.data-col, .shard-col { pointer-events: none; }
.data-col > *, .shard-col > * { pointer-events: auto; }
body.panel-right .data-col { display: none; }
body.panel-right.panel-narrow .data-col:not(.is-hidden) { display: flex; right: calc(var(--ps-w, 372px) + 24px); }   /* 10.29 调整：窄面板（Hierarchy）旁边仍摆右列，见 syncPanelNarrow */
body:not(.t3) .shard-col { display: none; }
.dcard { flex: none; padding: 8px 10px; font-size: 10.5px; color: #A0A0A0; }
/* 权重里的逐块：跟上级同宽（同一列宽度一致），层级靠卡内缩进表达 */
.dcard.is-sub { padding: 6px 10px 6px 22px; }
.dc-h { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-bottom: 4px; }
.dc-t { color: #E8E8E8; font-size: 11px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dc-tag { flex: none; font-size: 9px; line-height: 14px; padding: 0 4px; border-radius: 3px; color: #A0A0A0; border: 1px solid #3A3A3A; }
.dc-tag.is-asm, .dc-tag.is-demo { border-style: dashed; color: #8A8A8A; }
.dc-tag.is-pub { color: #C8C8C8; border-color: #5C5C5C; }
.dc-cut { margin-left: 6px; font-size: 9px; color: #111111; background: #BDBDBD; border-radius: 2px; padding: 0 3px; font-weight: 500; }
.dc-big { font-size: 17px; color: #FFFFFF; line-height: 1.2; margin: 2px 0 4px; font-variant-numeric: tabular-nums; }
.dc-big small { font-size: 10px; color: #8A8A8A; }
.dc-r { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; line-height: 17px; }
.dc-r span { color: #8A8A8A; white-space: nowrap; }
.dc-r b { font-weight: 400; color: #E8E8E8; text-align: right; font-variant-numeric: tabular-nums; }
.dc-r.is-bad b, .dc-r.is-bad span { color: var(--alert); }
.dc-r.is-warn b { color: #FFFFFF; }
.dc-r.is-na b { color: #8A8A8A; }
.dc-rbar { display: grid; grid-template-columns: 58px 1fr 38px; align-items: center; }
.dc-bar { display: block; height: 4px; background: #262626; border-radius: 2px; overflow: hidden; }
.dc-bar > i { display: block; height: 100%; background: #BDBDBD; }
.dc-bar.is-bad > i { background: var(--alert); }
.dc-bar.is-warn > i { background: #FFFFFF; }
.dc-sub { color: #8A8A8A; font-size: 10px; line-height: 14px; margin-top: 2px; }
.dc-note { color: #6A6A6A; font-size: 9.5px; margin-top: 4px; }
.dc-link { font: inherit; color: #E8E8E8; background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; text-decoration-color: #5C5C5C; text-underline-offset: 2px; }
.dc-link:hover { color: #FFFFFF; }
body.dc-noinc .incident-panel { display: none; }
.cf-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 8px; }
.cf-all { gap: 6px; }
.cf-all button { font: inherit; font-size: 10.5px; color: #A0A0A0; background: transparent; border: 1px solid #3A3A3A; border-radius: 3px; padding: 1px 8px; cursor: pointer; }
.cf-all button:hover { color: #FFFFFF; border-color: #8A8A8A; }

/* 每一屏只留对这一屏有意义的东西：板视图与单卡层不看整个集群的段峰值柱、超容名单与故障复盘链 */
body.t3 .lc-pp, body.lv-board .lc-pp { display: none; }
/* 左列里的容量卡跟配置卡、PP 段卡同一列同一间距 */
#leftCard > .dcard { margin-top: 8px; }
/* 单卡层左列第一张：合计 / HBM（先答装不装得下） */
.dc-total .dc-h { margin-bottom: 0; }
.dc-total .dc-v { font-size: 13px; color: #FFFFFF; }
.dc-total .dc-v small { color: #8A8A8A; }
.dc-total.is-alert .dc-v { color: var(--alert); }
/* 10.29 调整：推理 NPU 页左列的训练口径那一组（3D 卡同口径）——一个小标 + 整组退后一档，与上面推理口径那张分开读 */
.dc-cal { font-size: 10px; letter-spacing: .04em; color: #8A8A8A; padding: 4px 4px 0; }
.shard-col .dc-cal ~ .dcard { opacity: .72; }
body.t3 .incident-panel, body.lv-board .incident-panel { display: none !important; }
/* 单卡层的切分小卡：可点开 */
.dcard.is-split { cursor: pointer; }
.dcard.is-split:hover { background: rgba(44, 44, 44, .64); }
.dcard.is-open { background: rgba(50, 50, 50, .68); }
.dc-v { font-weight: 400; color: #FFFFFF; font-size: 13px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.dc-v small { font-size: 9.5px; color: #8A8A8A; }
.dcard.is-split .dc-h { margin-bottom: 0; }
.dc-open { margin-top: 6px; padding-top: 6px; border-top: 1px solid rgba(255, 255, 255, .08); cursor: default; }
.dc-note2 { color: #A0A0A0; font-size: 10px; line-height: 14px; margin-bottom: 4px; }
.dc-k { color: #E8E8E8; margin-top: 6px; }
.dc-comm { display: flex; flex-direction: column; margin-top: 3px; font-size: 10px; line-height: 14px; }
.dc-comm b { font-weight: 400; color: #C8C8C8; }
.dc-comm span { color: #8A8A8A; }
/* 腔图（矩阵读出卡里那几张 SVG，原样搬过来）：套本页灰阶 + 它用到的几个 token */
/* 切分简图（并行拓扑工作台读出卡里那张）：保留维度色——哪一把刀切的、本卡是哪一格，靠的就是这层颜色 */
.dc-fig { margin: 8px 0 2px;
  --pt-fg: #E8E8E8; --pt-fg2: #A0A0A0; --pt-fg3: #6A6A6A; --pt-bg: #111111; --pt-bd: #3A3A3A; --pt-bds: #282828;
  --pt-s1: #181818; --pt-s2: #1E1E1E; --pt-danger: #F85149; --pt-mono: var(--mono); --pt-sans: var(--mono); }
.dc-fig svg { display: block; width: 100%; height: auto; max-height: 180px; }
.dc-ckv { color: #A0A0A0; }
.dc-ckv i { font-style: normal; color: #6A6A6A; }
/* ── 原生泳道（本预置的 1F1B）：保留泳道原来那几种必要的颜色——前向蓝、反向粉、通信绿 */
.sw { display: block; font-family: var(--mono); }
.sw-wait { color: #6A6A6A; padding: 12px 0; }
.sw-tick { stroke: #222222; stroke-width: 1; }
.sw-tt { font-size: 9px; fill: #6A6A6A; }
.sw-row { cursor: pointer; transition: opacity .15s ease; }
.sw-row.is-dim { opacity: .3; }
.sw-row.is-rank { cursor: default; }
.sw-bg { fill: #161616; }
.sw-row.is-on .sw-bg { fill: #1E1E1E; stroke: #E8E8E8; stroke-width: 1; }
.sw-lbl { font-size: 10.5px; fill: #C8C8C8; }
.sw-row.is-on .sw-lbl, .sw-row.is-rank .sw-lbl { fill: #FFFFFF; }
.sw-l2 { fill: #6A6A6A; font-size: 9.5px; }
.sw-f { fill: #F2F2F2; }
.sw-b { fill: #B8B8B8; }
.sw-f.is-own, .sw-b.is-own { fill-opacity: .55; }
.sw-p2p { stroke: var(--c-pp); stroke-width: 1.5; }
.sw-dp { fill: var(--c-dp); fill-opacity: .7; }
.sw.is-hm [data-m]:not(.is-m) { opacity: .25; }
.sw-foot text { font-size: 10px; fill: #A0A0A0; }
.sw-foot .sw-demo { fill: #6A6A6A; }

/* 单卡层的两颗开关：兄弟 rank（隐约 ⇄ 展开）、通信连线；只在单卡层出现 */
.dock [data-solo], .dock [data-rv], .dock .dock-sep-rv { display: none; }
body.t3 .dock [data-solo], body.t3 .dock [data-rv] { display: flex; }
body.t3 .dock .dock-sep-rv { display: block; }
.cf-ck { flex-wrap: wrap; gap: 0 2px; }

/* 设置浮层：切分五维可改（×2 / ÷2），改过的数字高亮；不合法时给矩阵报回来的原因 */
.cf-split { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; margin: 6px 0 2px; }
.cf-sp { display: flex; flex-direction: column; align-items: center; gap: 1px; font-size: 10px; color: #8A8A8A; }
.cf-sp b { font-weight: 400; color: #E8E8E8; font-size: 12px; }
.cf-sp b.is-mod { color: #111111; background: #E8E8E8; border-radius: 2px; padding: 0 4px; }
.cf-sp button { font: inherit; width: 22px; line-height: 14px; color: #A0A0A0; background: transparent; border: 1px solid #3A3A3A; border-radius: 3px; cursor: pointer; padding: 0; }
.cf-sp button:hover { color: #FFFFFF; border-color: #8A8A8A; }
.cf-all button:disabled { opacity: .35; cursor: default; }
.cf-all span { color: #A0A0A0; margin-right: auto; }
.cf-err { margin-top: 6px; color: var(--alert); font-size: 10px; line-height: 14px; }
.cf-fix { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }   /* 10.29 调整：草稿不合法时的可行改法，点了就改草稿 */
.cf-fix button { font: inherit; font-size: 10px; color: #E8E8E8; background: transparent; border: 1px solid #5C5C5C; border-radius: 999px; padding: 0 8px; cursor: pointer; }
.cf-fix button:hover { border-color: #A0A0A0; }
.cf-chk.is-na span { opacity: .45; }   /* 10.29 调整：当前场景不摆的数据卡 */
.jn-car { font-style: normal; font-size: 9px; line-height: 1; opacity: .7; margin-left: -1px; }   /* 10.29 调整：故障定位是个下拉 */

/* 右侧数值卡：与 rank 卡同宽（同一列宽度一致，反馈「同一列的卡片宽度保持一致」） */
.data-col { width: 224px; align-items: stretch; }
.data-col .dcard { width: 100%; box-sizing: border-box; }
.data-col .dc-r { gap: 14px; }
/* 单卡层：这张卡的显存构成就是这一屏的主角——矩阵本体不再套灰阶，显存各档与通信线用它自己的颜色 */
#detailFrame { filter: none; }
/* 板视图：选中 NPU 连到它 TP 组员的那几根板内 fullmesh 就是 TP 流量真正走的线——染 TP 色 */
svg.near .b-mesh.is-hot.is-tp { stroke: var(--c-tp); }
/* 名字（rank 号）一律不上色（反馈「名称字体不要颜色」）：组员只比非组员亮一档（非组员整格压暗），维度看连线 */
svg.lod2 .p-npu[class*="g-"] + .p-npunum { fill: #E8E8E8 !important; }

/* ── 层级串联动画 ─────────────────────────────────────────────────────────
   镜头飞行在 pattern.js（attachZoomPan.fly）；这里是卡片、面包屑、板视图落地的入场。
   只动 opacity / transform（合成器路径），不动布局。 */
@keyframes cardIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes cardInB { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.dc-enter > * { animation: cardIn .34s cubic-bezier(.2, .7, .2, 1) backwards; animation-delay: calc(var(--i, 0) * 30ms); }
.side-right.card-in-a { animation: cardIn .34s cubic-bezier(.2, .7, .2, 1) backwards; }
.side-right.card-in-b { animation: cardInB .34s cubic-bezier(.2, .7, .2, 1) backwards; }
@keyframes crIn { from { opacity: 0; transform: translateX(-8px); } to { opacity: 1; transform: none; } }
.crumb .cr-new { display: inline-block; animation: crIn .3s cubic-bezier(.2, .7, .2, 1) backwards; }
/* 板视图搭起来：离 NPU 那一排越远越晚出现（--bd 由 boardBuildIn 按竖直距离写） */
@keyframes bIn { from { opacity: 0; } to { opacity: 1; } }
.board-stage.is-building .b-bg > *, .board-stage.is-building .b-links > *, .board-stage.is-building .b-nodes > *, .board-stage.is-building .b-txt > * {
  animation: bIn .36s ease-out backwards; animation-delay: var(--bd, 0ms); }
@media (prefers-reduced-motion: reduce) {
  .board-stage.is-building * { animation: none !important; }
  .dc-enter > *, .side-right.card-in-a, .side-right.card-in-b, .crumb .cr-new { animation: none !important; }
}

/* ── 小屏收紧（body.is-compact，见 pattern.js syncCompact）──────────────────────────
   两列宽度不动（画布中间仍留 700px 以上），只压纵向：内边距、行高、卡间距一档；rank 卡五档显存换成一根分段条、
   四行链路换成一行。大屏下分段条与一行链路不出现。 */
.brief-segbar, .brief-link1 { display: none; }
.brief-segbar { height: 6px; margin: 4px 0 6px; border-radius: 2px; overflow: hidden; background: #262626; gap: 1px; }
.brief-segbar i { display: block; height: 100%; flex: none; }
body.is-compact .brief-segbar { display: flex; }
body.is-compact .brief-link1 { display: flex; }
body.is-compact .brief-segrows, body.is-compact .brief-links { display: none; }
body.is-compact .crumb .cr-root { font-size: 16px; }
body.is-compact .crumb { font-size: 13px; }
body.is-compact .side-left { top: 50px; }
body.is-compact .ip-col-left { top: calc(50px + var(--lc-h, 300px) + 6px); }
body.is-compact .gcard { padding: 8px 10px; }
body.is-compact .gcard + .gcard, body.is-compact #leftCard > .dcard { margin-top: 6px; }
body.is-compact .side-right { padding: 8px 10px; }
body.is-compact .brief-row { line-height: 1.55; }
body.is-compact .brief-k { margin-top: 6px; }
body.is-compact .dcard { padding: 6px 9px; }
body.is-compact .dcard.is-sub { padding: 5px 9px 5px 20px; }
body.is-compact .dc-r { line-height: 15px; }
body.is-compact .data-col, body.is-compact .shard-col { gap: 6px; }
body.is-compact .lc-sub { line-height: 1.55; }
body.is-compact .ip-grp + .ip-grp { margin-top: 6px; }
body.is-compact .ip-prob { padding: 7px 0; }

/* ── 卡内小图（vz-*）：单系列灰阶，超阈值琥珀（状态色 warning，旁边总有文字写明），字用文字色 ── */
.vz { display: block; margin: 4px 0 3px; overflow: visible; font-family: var(--mono); }
.vz-inline { display: inline-block; margin: 0 6px 0 auto; vertical-align: middle; flex: none; }
.vz-track { fill: none; stroke: #2E2E2E; }
rect.vz-track { fill: #2A2A2A; stroke: none; }
path.vz-track { stroke-width: 7; }
.vz-arc { fill: none; stroke: #E8E8E8; stroke-width: 7; }
.vz-fill { fill: #D0D0D0; }
.vz-mute { fill: #5C5C5C; }
.vz-warn { fill: #FAB219; }
.vz-tick { fill: #8A8A8A; }
.vz-grid { stroke: #333333; stroke-width: 1; }
.vz-thr { stroke: #FAB219; stroke-width: 1; opacity: .75; }
.vz-line { fill: none; stroke: #D0D0D0; stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; }
.vz-spark { fill: none; stroke: #8A8A8A; stroke-width: 1.2; stroke-linejoin: round; }
.vz-ring { fill: #1E1E1E; }
.vz-hit { fill: transparent; cursor: help; }
.vz-hit:hover { fill: rgba(255, 255, 255, .06); }
.vz text { font-size: 8.5px; }
.vz-ax { fill: #707070; }
.vz-lb { fill: #A0A0A0; font-size: 10px !important; }
.vz-v { fill: #E8E8E8; font-size: 10px !important; }
.vz-gv { fill: #FFFFFF; font-size: 15px !important; font-weight: 500; }
.vz-cap { font-size: 9.5px; color: #8A8A8A; margin-top: 2px; }
.vz-kpi { display: flex; align-items: center; gap: 10px; margin: 2px 0 4px; }
.vz-stat { display: flex; flex-direction: column; line-height: 1.25; }
.vz-stat b { font-size: 20px; font-weight: 500; color: #FFFFFF; }
.vz-stat span { font-size: 9.5px; color: #8A8A8A; }
.vz-stat em { font-style: normal; font-size: 10.5px; color: #C8C8C8; margin-top: 3px; }
.vz-legend { display: flex; justify-content: space-between; gap: 6px; margin: 5px 0 1px; font-size: 9.5px; color: #8A8A8A; }
.vz-legend i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; background: #5C5C5C; margin-right: 4px; vertical-align: -1px; }
.vz-legend i.is-on { background: #D0D0D0; }
.vz-legend b { font-weight: 400; color: #E8E8E8; }
body.is-compact .vz-cap { display: none; }
.vz-cut { stroke: #1E1E1E; stroke-width: 2; }
.data-col.is-over:not(.at-end), .shard-col.is-over:not(.at-end) { -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 36px), transparent); mask-image: linear-gradient(to bottom, #000 calc(100% - 36px), transparent); }

/* ══ 视觉精修（反馈「整体再精致一些：对比度、必要处加光泽感、间距」）════════════════════════════
   只动表皮，不动结构与信息：
   ① 光泽：所有悬浮面同一套「玻璃」——顶端 1px 高光（像玻璃边缘反的一道光，不是描边）+ 自上而下渐隐的一层亮面
      + 一圈柔和投影把卡从画布上托起来；底更实一档（.58 → .74），画布上的线不再从字底下穿过去。
   ② 对比度：标签灰 #A0A0A0 → #A8A8A8 层级不变，次要字（轴、单位、注记）#6A–#70 → #80 左右，标题 / 数值提到近白。
   ③ 间距：卡内边距 8/10 → 10/12，卡间距 8 → 10，行高 17 → 18；小屏（is-compact）维持原来的紧凑值。 */
:root { --glass: rgba(24, 24, 24, .74); --glass-hi: linear-gradient(180deg, rgba(255, 255, 255, .06) 0, rgba(255, 255, 255, .016) 40px, rgba(255, 255, 255, 0) 100%);
  --glass-edge: inset 0 1px 0 rgba(255, 255, 255, .075); --glass-drop: 0 14px 32px -16px rgba(0, 0, 0, .75), 0 2px 6px -2px rgba(0, 0, 0, .4); }
.gcard, .side-right, .ip-grp, .dock, .cfg-pop, .dcard {
  background: var(--glass-hi), var(--glass);
  -webkit-backdrop-filter: blur(22px) saturate(1.3); backdrop-filter: blur(22px) saturate(1.3);
  box-shadow: var(--glass-edge), var(--glass-drop);
  border-radius: 8px;
}
.cfg-pop { background: var(--glass-hi), rgba(20, 20, 20, .9); }
.dcard.is-split:hover { background: var(--glass-hi), rgba(42, 42, 42, .82); }
.dcard.is-open { background: var(--glass-hi), rgba(46, 46, 46, .86); }
.drawer { background: var(--glass-hi), rgba(18, 18, 18, .94); border: 0; border-radius: 10px; box-shadow: var(--glass-edge), 0 18px 48px -18px rgba(0, 0, 0, .85); }
.drawer-hd { padding: 9px 14px; font-size: 12.5px; color: #F2F2F2; border-bottom-color: rgba(255, 255, 255, .06); }
/* 工具条：同一块玻璃，按下的那一格是一枚带微弱纵向渐变的亮片 */
.dock { border-radius: 10px; padding: 4px; }
.dock button { border-radius: 6px; transition: background .15s ease, color .15s ease; }
.dock button:hover { background: rgba(255, 255, 255, .07); color: #F2F2F2; }
.dock button.is-on { color: #111111; background: linear-gradient(180deg, #FFFFFF, #D9D9D9); box-shadow: 0 1px 2px rgba(0, 0, 0, .5); }
.dock-sep { background: rgba(255, 255, 255, .1); width: 1px; }

/* 文字层级：标题近白、数值亮、标签中灰、注记可读 */
.dc-t { color: #F5F5F5; font-size: 11.5px; letter-spacing: .01em; }
.dcard { color: #A8A8A8; }
.dc-r b { color: #EDEDED; }
.dc-big small, .dc-v small { color: #8C8C8C; }
.dc-tag { color: #A8A8A8; border-color: #444444; }
.brief-row span { color: #A8A8A8; }
.brief-row b { color: #F0F0F0; }
.brief-row3 em { color: #7E7E7E; }
.vz-ax { fill: #808080; }
.vz-cap { color: #969696; }
.vz-legend { color: #969696; }
.pb-num { fill: #969696; }
.sw-tt { fill: #7E7E7E; }
.sw-foot text { fill: #ADADAD; }
.lc-title { color: #F5F5F5; }
.lc-sub { font-size: 11px; color: #D8D8D8; margin: 0 0 2px; letter-spacing: .01em; }

/* 间距（大屏）：卡内更透气，列内卡与卡之间多一点缝 */
body:not(.is-compact) .dcard { padding: 10px 12px; }
body:not(.is-compact) .dcard.is-sub { padding: 7px 12px 7px 24px; }
body:not(.is-compact) .dc-h { margin-bottom: 6px; }
body:not(.is-compact) .dc-r { line-height: 18px; }
body:not(.is-compact) .data-col, body:not(.is-compact) .shard-col { gap: 10px; }
body:not(.is-compact) .gcard { padding: 12px 14px; }
body:not(.is-compact) .gcard + .gcard, body:not(.is-compact) #leftCard > .dcard { margin-top: 10px; }
body:not(.is-compact) .side-right { padding: 12px 14px; }
body:not(.is-compact) .ip-grp + .ip-grp { margin-top: 10px; }

/* 切分标签（TP / EP / 复制…）：小圆角胶囊，字重收一档，不再像一块贴上去的色块 */
.dc-cut { border-radius: 3px; padding: 0 4px; line-height: 13px; font-weight: 600; letter-spacing: .02em; }

/* 泳道：原来的亮粉在深底上过亮（校验器 lightness band 不过），换成同色相收一档的一对（F 蓝 / B 玫红，
   深色模式校验全过：CVD ΔE 15.3、正常视觉 ΔE 24.8、对比 ≥ 3:1）；块之间靠底色缝分开 */
.sw-f { fill: #F2F2F2; }
.sw-b { fill: #B8B8B8; }
.sw-bg { fill: #151515; }

/* 小屏：训练健康卡只留图 + 告警层 + 梯度两行，细项收起（悬停图上的柱仍能读到逐层值）；告警列表到底就滚动，不再伸出视口 */
body.is-compact .dc-more { display: none; }
.ip-col-left { bottom: 16px; max-height: none; }

/* 泳道去色（反馈「太花了，去色处理，只有关键点才高亮」）：默认全部灰——前向浅灰、反向深灰（明度区分 + 图例），
   P2P / DP 也收成灰；只有关键点着色：选中 / 聚焦的那一段、选中 rank 自己那一行、指针所在的那个 μb */
.sw-f { fill: #6E6E6E; }
.sw-b { fill: #444444; }
.sw-p2p { stroke: #8A8A8A; stroke-width: 1; }
.sw-dp { fill: #9A9A9A; fill-opacity: .35; }
.sw-row.is-on .sw-f, .sw-row.is-rank .sw-f, .sw.is-hm .sw-f.is-m { fill: #F2F2F2; }
.sw-row.is-on .sw-b, .sw-row.is-rank .sw-b, .sw.is-hm .sw-b.is-m { fill: #B8B8B8; }
.sw-row.is-on .sw-p2p, .sw-row.is-rank .sw-p2p { stroke: #E8E8E8; }
.sw-row.is-on .sw-dp, .sw-row.is-rank .sw-dp { fill: #E8E8E8; fill-opacity: .55; }
.sw-row.is-on .sw-bg { stroke: none; fill: #202020; }
.sw-lbl { font-size: 10px; }
.sw-l2 { font-size: 9px; }

/* 大标题：主名大一号、字重高、不压字距（等宽字压负字距会挤）、任何一级都保持亮；规格小标浅一档；
   面包屑其余几级小一号，分隔符更淡、两侧留白 */
.crumb { gap: 10px; align-items: baseline; }
.crumb i { color: #3E3E3E; font-size: 13px; }
.crumb .cr { letter-spacing: 0; font-size: 13px; color: #8C8C8C; }
.crumb .cr.is-cur { color: #F0F0F0; }
.crumb .cr-root { display: inline-flex; align-items: baseline; gap: 10px; font-size: 21px; font-weight: 600; letter-spacing: 0; color: #F5F5F5; }
.crumb .cr-root .cr-main { letter-spacing: -.005em; }
.crumb .cr-root .cr-meta { font-size: 12px; font-weight: 400; color: #8C8C8C; letter-spacing: .02em; }
.crumb .cr-root:hover .cr-main { color: #FFFFFF; }
/* 10.29 调整：面包屑会压到顶上居中的场景胶囊时先收规格小标，还压就把模型主名截成省略号（见 fitCrumb） */
.crumb.cr-tight .cr-root .cr-meta { display: none; }
.crumb.cr-tight2 .cr-root .cr-main { display: inline-block; max-width: 7.5em; overflow: hidden; text-overflow: ellipsis; vertical-align: bottom; }
body.is-compact .crumb .cr-root { font-size: 18px; }
body.is-compact .crumb .cr-root .cr-meta { font-size: 11px; }
body.is-compact .crumb .cr { font-size: 12px; }

/* 下方面板（泳道 / 整网图）打开时与两侧是挤压关系，不重叠：左卡、右侧数据列、故障列的底边都让到面板上沿之上，
   装不下就在列内滚动（左卡的高度上限由 JS 按可用高度算）。
   滚动是虚拟的（见 pattern.js vsSet）：列容器 overflow:hidden、卡片按 --sy 整体上移——真在滚的容器会让里面卡片的
   磨砂模糊失效。滚动条是自绘的 4px 细条，挂在卡片外侧 10px 的留白里，不挤卡宽；装不下才出现。 */
.side-left, .data-col, .shard-col, .ip-col { overflow: hidden !important; scrollbar-width: none; }
.side-left { width: 282px; padding-right: 10px; box-sizing: border-box; }
.data-col { right: 6px; width: 234px; padding-right: 10px; box-sizing: border-box; }
.shard-col { width: 282px; padding-right: 10px; box-sizing: border-box; }
.ip-col-left { width: 282px; padding-right: 10px; box-sizing: border-box; }
body.panel-bottom .data-col { bottom: calc(16px + var(--pb, 0px)); }
.ip-col-left { bottom: calc(16px + var(--pb, 0px)); }
body.panel-bottom .side-card.side-left { max-height: none; }
.vs-host > :not(.vs-bar) { translate: 0 calc(var(--sy, 0px) * -1); }
.vs-bar { position: absolute; right: 2px; top: 0; width: 4px; height: 0; border-radius: 2px; background: rgba(255, 255, 255, .18); cursor: grab; opacity: 0; transition: opacity .2s ease, background .15s ease; }
.vs-host.is-over > .vs-bar { opacity: 1; }
.vs-bar:hover, .vs-host.is-drag > .vs-bar { background: rgba(255, 255, 255, .4); }
.vs-host.is-drag > .vs-bar { cursor: grabbing; }
/* 滚动条已经露出来了，就不再用底部淡出暗示「下面还有」 */
.data-col.is-over:not(.at-end), .shard-col.is-over:not(.at-end), .side-left.is-over:not(.at-end) { -webkit-mask-image: none; mask-image: none; }

/* 泳道重画（10.3.0）：稳态折叠 + 三段相位 + 选中 rank 叠在自己那一段上 */
.sw-hit { fill: transparent; }
.sw-ph { stroke: #333333; stroke-width: 1; }
.sw-tt { font-size: 9.5px; fill: #8C8C8C; letter-spacing: .02em; }
.sw-fold-n { fill: #B4B4B4; }
.sw-dots { font-size: 10px; fill: #4A4A4A; }
.sw-row.is-on .sw-dots { fill: #9A9A9A; }
.sw-bg { fill: #171717; }
.sw-row:hover:not(.is-on) .sw-bg { fill: #1C1C1C; }
.sw-row:hover:not(.is-on) .sw-lbl { fill: #FFFFFF; }
.sw-lbl { fill: #BDBDBD; }
.sw-l2 { fill: #6E6E6E; }
.sw-row.is-rank .sw-l2 { fill: #E8E8E8; }
.sw-kv { fill: #8C8C8C; }
.sw-kv tspan { fill: #F0F0F0; }
.sw-foot text { font-size: 9.5px; }

/* 磨砂玻璃加透明度（反馈「只有渐变没有透明度，要同时增加磨砂玻璃的透明度」）：底色不透明度 .74 → .46，模糊 22 → 28px、
   饱和 1.3 → 1.6，画布透得过来但糊成一片、不干扰上面的字；再叠一层极淡的颗粒（SVG 噪点，4%）做出「磨砂」的手感。
   顶端高光 + 渐隐亮面 + 投影保持不变。参考面板 / 配置浮层同步降到 .66 / .62。 */
:root {
  --glass: rgba(26, 26, 26, .46);
  --glass-grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .5 0'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='.08'/%3E%3C/svg%3E");
}
.gcard, .side-right, .ip-grp, .dock, .cfg-pop, .dcard {
  background: var(--glass-hi), var(--glass-grain), var(--glass);
  -webkit-backdrop-filter: blur(28px) saturate(1.6); backdrop-filter: blur(28px) saturate(1.6);
}
.cfg-pop { background: var(--glass-hi), var(--glass-grain), rgba(22, 22, 22, .62); }
.dcard.is-split:hover { background: var(--glass-hi), var(--glass-grain), rgba(44, 44, 44, .56); }
.dcard.is-open { background: var(--glass-hi), var(--glass-grain), rgba(48, 48, 48, .6); }
.drawer { background: var(--glass-hi), var(--glass-grain), rgba(18, 18, 18, .66); -webkit-backdrop-filter: blur(30px) saturate(1.5); backdrop-filter: blur(30px) saturate(1.5); }

/* ── 旅程步进条：标题正上方居中，一枚玻璃胶囊——左段工况（训练 / 推理），右段这条工况的几步。
   当前步近白 + 实心序号，走过的步中灰，未到的步暗灰；步与步之间一截细线。下面一行灰字是这一步要回答的问题。 */
.journey { position: fixed; top: 14px; left: 50%; transform: translateX(-50%); z-index: 8; display: flex; flex-direction: column; align-items: center; gap: 6px; pointer-events: none; }
.journey.is-hidden { display: none; }
.jn-bar { pointer-events: auto; display: flex; align-items: center; gap: 6px; padding: 4px; border-radius: 10px;
  background: var(--glass-hi), var(--glass-grain), var(--glass); -webkit-backdrop-filter: blur(28px) saturate(1.6); backdrop-filter: blur(28px) saturate(1.6);
  box-shadow: var(--glass-edge), var(--glass-drop); }
.jn-mode { display: flex; gap: 2px; padding-right: 6px; margin-right: 2px; border-right: 1px solid rgba(255, 255, 255, .08); }
.jn-mode button, .jn-steps button { font: inherit; font-size: 12px; line-height: 20px; border: 0; background: transparent; cursor: pointer; border-radius: 6px; padding: 2px 9px; color: #8C8C8C; transition: color .15s ease, background .15s ease; }
.jn-mode button:hover, .jn-steps button:hover { color: #E8E8E8; background: rgba(255, 255, 255, .05); }
.jn-mode button.is-on { color: #111; background: linear-gradient(180deg, #FFFFFF, #D9D9D9); }
.jn-steps { display: flex; align-items: center; margin: 0; padding: 0; list-style: none; }
.jn-steps li { display: flex; align-items: center; }
.jn-steps li + li::before { content: ''; width: 10px; height: 1px; background: #3A3A3A; margin: 0 1px; }
.jn-steps button { display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px 2px 4px; color: #7A7A7A; }
.jn-steps b { display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; font-family: var(--mono); font-size: 10px; font-weight: 500; color: #8C8C8C; box-shadow: inset 0 0 0 1px #444; }
.jn-steps li.is-done button { color: #A8A8A8; }
.jn-steps li.is-done b { color: #A8A8A8; box-shadow: inset 0 0 0 1px #6A6A6A; }
.jn-steps li.is-cur button { color: #F5F5F5; }
.jn-steps li.is-cur b { color: #111; background: #F0F0F0; box-shadow: none; }
.jn-steps li.is-done + li::before, .jn-steps li.is-done + li.is-cur::before { background: #6A6A6A; }
.jn-q { font-size: 12px; color: #A8A8A8; letter-spacing: .01em; text-shadow: 0 1px 8px rgba(0, 0, 0, .9); transition: opacity .2s ease; }
.jn-q.is-empty { opacity: 0; }
body.is-compact .journey { top: 10px; }
body.is-compact .jn-mode button, body.is-compact .jn-steps button { font-size: 11.5px; padding-top: 1px; padding-bottom: 1px; }
body.is-compact .jn-steps li + li::before { width: 6px; }
.sw-mark { stroke: #8A8A8A; stroke-width: 1; stroke-dasharray: 2 2; }

/* 调优对比：改前灰色删除线、改后近白；差值记号 ▲▼——变差琥珀、变好 / 不变灰（颜色不单独承担意义，记号 + 位置也说清楚） */
.dc-cmp b { display: inline-flex; align-items: baseline; gap: 6px; }
.dc-cmp s, .dc-cmp-cfg s { color: #6E6E6E; text-decoration-color: rgba(255, 255, 255, .25); font-weight: 400; }
.dc-cmp i { font-style: normal; font-size: 9px; width: 9px; text-align: center; color: #8C8C8C; }
.dc-cmp.is-worse i, .dc-cmp.is-worse b { color: #FAB219; }
.dc-cmp.is-worse s { color: var(--warn); opacity: .6; }
.dc-cmp.is-same b { color: #A8A8A8; }
.dc-cmp-cfg { display: flex; flex-direction: column; gap: 1px; margin: 2px 0 6px; font-family: var(--mono); font-size: 10.5px; color: #EDEDED; }
.dc-cmp-cfg s { font-size: 10px; }
.dc-x { margin-left: auto; font: inherit; font-size: 13px; line-height: 1; color: #8C8C8C; background: transparent; border: 0; border-radius: 4px; padding: 0 4px; cursor: pointer; }
.dc-x:hover { color: #F0F0F0; background: rgba(255, 255, 255, .06); }

/* ── 液态玻璃（反馈「不喜欢渐变，不要加渐变」「尝试苹果的液态玻璃质感」）──────────────────────────────
   去掉所有渐变亮面与颗粒。液态玻璃的质感靠三样：① 很透——底色只剩 .30，后面的画布被强模糊 + 提饱和、提亮一点透上来；
   ② 边缘高光——左上一道 1px 亮沿、右下一道弱一些的反光、整圈一根极细的边光，像光打在一块有厚度的玻璃边上；
   ③ 内侧一圈很淡的内辉，给玻璃「厚度」。圆角放大一档。
   （真正的边缘折射要 SVG 位移滤镜做 backdrop-filter，Chromium 里位移图读不进来，这里不做，只做光感。） */
:root {
  --glass: rgba(30, 30, 30, .30);
  --glass-hi: none;
  --glass-grain: none;
  --glass-edge: inset 1px 1px 0 rgba(255, 255, 255, .24), inset -1px -1px 0 rgba(255, 255, 255, .08), inset 0 0 0 1px rgba(255, 255, 255, .06), inset 0 0 20px rgba(255, 255, 255, .03);
  --glass-drop: 0 12px 32px -12px rgba(0, 0, 0, .7), 0 2px 6px -2px rgba(0, 0, 0, .35);
  --glass-fx: blur(14px) saturate(1.9) brightness(1.08);
}
.gcard, .side-right, .ip-grp, .dock, .cfg-pop, .dcard, .jn-bar {
  background: var(--glass);
  -webkit-backdrop-filter: var(--glass-fx); backdrop-filter: var(--glass-fx);
  box-shadow: var(--glass-edge), var(--glass-drop);
  border-radius: 12px;
}
.dock, .jn-bar { border-radius: 16px; }
.cfg-pop { background: rgba(26, 26, 26, .52); border-radius: 14px; }
.dcard.is-split:hover { background: rgba(60, 60, 60, .34); }
.dcard.is-open { background: rgba(64, 64, 64, .38); }
.drawer { background: rgba(20, 20, 20, .5); border-radius: 16px; -webkit-backdrop-filter: blur(18px) saturate(1.8) brightness(1.05); backdrop-filter: blur(18px) saturate(1.8) brightness(1.05); box-shadow: var(--glass-edge), 0 18px 48px -18px rgba(0, 0, 0, .85); }
/* 按下的那一格：实心的亮片，不再是渐变 */
.dock button.is-on, .jn-mode button.is-on { color: #111111; background: #EDEDED; box-shadow: 0 1px 2px rgba(0, 0, 0, .5); }
.dock button { border-radius: 10px; }

/* ── 目的导向的引导：胶囊里是并列的几个目的（没有序号、没有连线）；「定位告警」带告警数角标，
   点开在胶囊下面出一张告警清单——每条一行：严重度记号 · 指标 · 在哪 · 「定位」。
   记号：超容 = 红实心、告警 = 琥珀实心、参考读数 = 灰空心、历史复盘 = 灰虚线圈——形状 + 颜色两路都说清楚。 */
.jn-goals { display: flex; align-items: center; gap: 2px; }
.jn-goals button { position: relative; display: inline-flex; align-items: center; gap: 5px; font: inherit; font-size: 12px; line-height: 20px; border: 0; background: transparent; cursor: pointer; border-radius: 10px; padding: 3px 10px; color: #9A9A9A; transition: color .15s ease, background .15s ease; }
.jn-goals button:hover { color: #F0F0F0; background: rgba(255, 255, 255, .06); }
.jn-goals button.is-cur { color: #111111; background: #EDEDED; }
.jn-goals svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linejoin: round; stroke-linecap: round; }
.jn-badge { font-style: normal; font-family: var(--mono); font-size: 10px; line-height: 15px; min-width: 15px; padding: 0 4px; box-sizing: border-box; text-align: center; border-radius: 8px; color: #111111; background: #FAB219; }
.jn-badge.is-crit { color: #FFFFFF; background: var(--alert); }
.jn-mode button, .jn-goals button { border-radius: 10px; }
.jn-alerts { pointer-events: auto; display: flex; flex-direction: column; min-width: 360px; max-width: 460px; padding: 6px; border-radius: 14px;
  background: var(--glass); -webkit-backdrop-filter: var(--glass-fx); backdrop-filter: var(--glass-fx); box-shadow: var(--glass-edge), var(--glass-drop); }
.jn-al { display: grid; grid-template-columns: 12px 1fr auto auto; align-items: center; gap: 8px; width: 100%; text-align: left; font: inherit; font-size: 11.5px; line-height: 18px;
  border: 0; background: transparent; color: #CFCFCF; border-radius: 8px; padding: 4px 8px; cursor: pointer; transition: background .15s ease; }
.jn-al:hover, .jn-al.is-on { background: rgba(255, 255, 255, .07); }
.jn-al b { font-family: var(--mono); font-weight: 500; color: #F0F0F0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.jn-al span { font-family: var(--mono); font-size: 10.5px; color: #9A9A9A; white-space: nowrap; }
.jn-al em { font-style: normal; font-size: 10.5px; color: #6E6E6E; }
.jn-al:hover em, .jn-al.is-on em { color: #F0F0F0; }
.jn-al i { width: 8px; height: 8px; border-radius: 50%; justify-self: center; }
.jn-al.is-crit i { background: var(--alert); }
.jn-al.is-warn i { background: #FAB219; }
.jn-al.is-info i { box-shadow: inset 0 0 0 1.5px #8A8A8A; }
.jn-al.is-past i { box-shadow: inset 0 0 0 1px #6A6A6A; outline: 1px dashed #5A5A5A; outline-offset: 1px; width: 6px; height: 6px; }
.jn-al.is-past b { color: #BDBDBD; }
.jn-al + .jn-al.is-info, .jn-al:not(.is-past) + .jn-al.is-past { margin-top: 4px; box-shadow: 0 -1px 0 rgba(255, 255, 255, .06); border-radius: 0 0 8px 8px; }
.jn-none { font-size: 12px; color: #9A9A9A; padding: 6px 10px; }

/* 泳道（10.5.0）：复用并行拓扑工作台 swimlane.html 的画法——画布本体见 pattern.js renderSwim；这里是图例与悬停卡，
   图例照工作台 .legend：9px 色块，前向 / 反向色块带 chevron 纹理 */
.sw-wrap { position: relative; }
.sw-cv { display: block; }
.sw-legend { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 8px 10px 0; font-size: 11px; color: rgba(255, 255, 255, .55); }
.sw-legend span { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.sw-legend i { width: 9px; height: 9px; border-radius: 2px; background: var(--legend-color); font-style: normal; }
.sw-legend i.is-flow { background-repeat: repeat-x; background-size: 5px 100%; width: 16px; }
.sw-legend i.is-flow.is-forward { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 5 9'%3E%3Cpath d='M.5 0 L4.5 4.5 L.5 9' fill='none' stroke='white' stroke-width='.55' opacity='.34'/%3E%3C/svg%3E"); }
.sw-legend i.is-flow.is-backward { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 5 9'%3E%3Cpath d='M4.5 0 L.5 4.5 L4.5 9' fill='none' stroke='white' stroke-width='.55' opacity='.34'/%3E%3C/svg%3E"); }
.sw-legend i.is-idle { width: auto; height: auto; background: none; font-family: var(--mono); font-weight: 800; font-size: 13px; line-height: 9px; color: rgba(146, 146, 146, .7); }
.sw-legend i.is-dash { width: 0; height: 11px; border-left: 1px dashed rgba(255, 255, 255, .6); border-radius: 0; background: none; }
.sw-legend .sw-kv { font-family: var(--mono); color: rgba(255, 255, 255, .55); }
.sw-legend .sw-kv b { font-weight: 500; color: #F0F0F0; }
.sw-legend em { margin-left: auto; font-style: normal; font-family: var(--mono); font-size: 10.5px; color: rgba(255, 255, 255, .4); }
.sw-tip { position: absolute; z-index: 3; pointer-events: none; display: flex; flex-direction: column; gap: 2px; padding: 6px 9px; border-radius: 8px; font-family: var(--mono); font-size: 11px; color: #EDEDED;
  background: rgba(24, 24, 24, .82); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); box-shadow: var(--glass-edge), 0 8px 20px -8px rgba(0, 0, 0, .8); }
.sw-tip b { font-weight: 600; color: #FFFFFF; }
.sw-tip span { color: rgba(255, 255, 255, .5); font-size: 10px; }
.sw-tip[hidden] { display: none; }

/* 无限画布点阵底：1px 圆点、白 7%，间距与位置由 zoom-pan 写进 --dot-s / --dot-x / --dot-y（见 pattern.js attachZoomPan） */
.phys-stage {
  background-color: #111111;
  background-image: radial-gradient(circle, rgba(255, 255, 255, .075) 0 .8px, transparent 1.1px);
  background-size: var(--dot-s, 24px) var(--dot-s, 24px);
  background-position: var(--dot-x, 0) var(--dot-y, 0);
}

/* 告警清单里并进来的故障复盘：分两节（Live · 当前配置 / Post-mortem · 另一次 2048 卡训练），复盘行点开就地展开事件链 */
.jn-alerts { max-height: calc(100vh - 150px); overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .16) transparent; }
.jn-sec { padding: 6px 8px 3px; font-size: 10.5px; color: rgba(255, 255, 255, .42); letter-spacing: .02em; }
.jn-sec:not(:first-child) { margin-top: 4px; border-top: 1px solid rgba(255, 255, 255, .06); padding-top: 8px; }
.jn-alerts .jn-pm { padding: 0; background: none; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; border-radius: 0; }
.jn-alerts .jn-pm + .jn-pm { margin-top: 0; }
.jn-rel { display: none; padding: 0 8px 2px 28px; font-family: var(--mono); font-size: 10px; color: rgba(255, 255, 255, .42); }
.jn-pm.is-open .jn-rel { display: block; }
.jn-alerts .ip-chain { margin: 2px 8px 6px 26px; }
.jn-alerts .jn-al + .jn-al.is-info, .jn-alerts .jn-al:not(.is-past) + .jn-al.is-past { margin-top: 0; box-shadow: none; border-radius: 8px; }
.jn-al.is-past i { outline: none; width: 7px; height: 7px; box-shadow: inset 0 0 0 1px #6A6A6A; }

/* 带中文释义的英文术语：悬停时是「帮助」光标，文字下一道极淡的点线提示「可以悬停看释义」 */
.has-gloss { cursor: help; text-decoration: underline dotted rgba(255, 255, 255, .22); text-underline-offset: 3px; text-decoration-thickness: 1px; }
.jn-al b.has-gloss, .jn-mode button.has-gloss, .cf-seg button.has-gloss, #drawerTitle.has-gloss { text-decoration: none; }
.jn-mode button.has-gloss, .cf-seg button.has-gloss, .jn-al b.has-gloss { cursor: pointer; }
.dc-fig + .dc-fig { margin-top: 10px; }
.dc-fig-cap { font-size: 10px; color: rgba(255, 255, 255, .5); margin: 0 0 4px; line-height: 1.35; }
.dc-fig svg { max-height: 220px; }

/* ═══ 相机式界面（反馈「试试类似这样的 UI 风格」——FinalCut Camera）═════════════════════════════════════
   · 面板：实色深灰（#1C1C1C，略透、仍带模糊），大圆角 22、无描边无高光沿，只留柔和投影；
   · 卡片：小号灰标签在上（像「色溫」），下面一个大数（像「2300」）+ 小号单位 / 口径；
   · 胶囊：配置、工况、目的、状态都是全圆角胶囊，深一档的底（#2C2C2C）；
   · 按钮：工具条是一串圆形按钮，按下的那一个图标变黄（像「24 MM」）；
   · 页签：目的是纯文字页签，当前那一个下面一个黄色小三角（像「白平衡 ▲」）；
   · 刻度尺：读数用细刻度 + 亮针（像色温滑尺）；
   · 参考面板：底部抽屉（bottom sheet），顶上一根抓手条，右上一个圆形 ×。
   黄色 #FFD60A 只用于「当前选中 / 激活」这类界面状态；数据阈值仍是琥珀。 */
:root {
  --cam-bg: rgba(28, 28, 28, .88);
  --cam-bg2: #2C2C2C;
  --cam-bg3: #3A3A3A;
  --cam-label: rgba(236, 236, 236, .6);
  --cam-label2: rgba(236, 236, 236, .3);
  --cam-accent: #FFFFFF;   /* 10.16：界面选中也用白——全页「选中」只有一种颜色，黄色撤掉（与阈值琥珀两种黄并存） */
  --cam-shadow: 0 16px 36px -14px rgba(0, 0, 0, .75), 0 2px 8px -2px rgba(0, 0, 0, .4);
  --cam-fx: blur(24px) saturate(1.4);
}
.gcard, .side-right, .ip-grp, .dock, .cfg-pop, .dcard, .jn-bar, .jn-alerts {
  background: var(--cam-bg);
  -webkit-backdrop-filter: var(--cam-fx); backdrop-filter: var(--cam-fx);
  box-shadow: var(--cam-shadow);
  border-radius: 22px;
}
body:not(.is-compact) .dcard, body:not(.is-compact) .gcard, body:not(.is-compact) .side-right { padding: 14px 16px; }
body.is-compact .dcard, body.is-compact .gcard, body.is-compact .side-right { padding: 10px 12px; border-radius: 18px; }
.dcard.is-split { border-radius: 16px; padding: 9px 14px; }
.dcard.is-split:hover { background: rgba(44, 44, 44, .92); }
.dcard.is-open { background: rgba(44, 44, 44, .94); }
.dc-t { color: var(--cam-label); font-size: 12px; font-weight: 500; letter-spacing: .01em; }
.dcard.is-split .dc-t { color: #F2F2F2; }
.dc-big { font-size: 30px; font-weight: 600; line-height: 1.05; color: #FFFFFF; margin: 4px 0 10px; letter-spacing: -.01em; display: flex; align-items: baseline; gap: 8px; }
.dc-big small { font-size: 11px; font-weight: 400; color: var(--cam-label); letter-spacing: .01em; }
body.is-compact .dc-big { font-size: 22px; margin: 2px 0 6px; }
.dc-r span { color: var(--cam-label); }
.dc-r b { color: #F2F2F2; }
.vz-cap { color: var(--cam-label2); }
.vz-stat b { font-size: 30px; font-weight: 600; }
/* 刻度尺 */
.vz-ron { fill: rgba(236, 236, 236, .6); }
.vz-roff { fill: rgba(236, 236, 236, .22); }
.vz-rthr { fill: #FAB219; }
.vz-needle { fill: #FFFFFF; }
/* 配置卡：大数 + 胶囊 + 灰字 */
.lc-big { font-size: 30px; font-weight: 600; line-height: 1.05; color: #FFFFFF; display: flex; align-items: baseline; gap: 8px; margin-bottom: 10px; }
.lc-big small { font-size: 11px; font-weight: 400; color: var(--cam-label); }
.lc-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.lc-chip { display: inline-flex; align-items: baseline; gap: 5px; padding: 3px 10px; border-radius: 999px; background: var(--cam-bg2); font-family: var(--mono); font-size: 11.5px; color: #F2F2F2; }
.lc-chip em { font-style: normal; font-size: 10px; color: var(--cam-label); }
.lc-sub { color: var(--cam-label); }
body.is-compact .lc-big { font-size: 22px; margin-bottom: 6px; }
/* 顶上：工况胶囊 + 目的页签（当前那一个下面一个黄色小三角） */
.jn-bar { border-radius: 999px; padding: 5px; gap: 4px; }
.jn-mode { background: var(--cam-bg2); border-radius: 999px; padding: 3px; border-right: 0; margin-right: 6px; }
.jn-mode button { border-radius: 999px; padding: 3px 12px; color: var(--cam-label); }
.jn-mode button.is-on { background: var(--cam-bg3); color: #FFFFFF; box-shadow: none; }
.jn-goals button { position: relative; background: transparent !important; color: var(--cam-label); font-size: 13px; padding: 4px 11px 7px; border-radius: 12px; }
.jn-goals button:hover { color: #FFFFFF; }
.jn-goals button.is-cur { color: #FFFFFF; font-weight: 600; }
.jn-goals button.is-cur::after { content: ''; position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); width: 0; height: 0;
  border-left: 4px solid transparent; border-right: 4px solid transparent; border-bottom: 4px solid var(--cam-accent); }
.jn-badge { background: var(--cam-bg3); color: #FFFFFF; }
.jn-badge.is-crit { background: var(--alert); }
.jn-alerts { border-radius: 20px; }
/* 工具条共用一层底板，普通按钮透明，悬停和选中时才显示底色。 */
.dock { border-radius: 999px; padding: 6px; gap: 4px; }
.dock button { width: 36px; height: 36px; border-radius: 50%; background: transparent; }
.dock button:hover { background: var(--cam-bg3); }
.dock button.is-on { background: var(--cam-bg3) !important; color: var(--cam-accent) !important; box-shadow: none; }
.dock button.is-on svg { stroke: var(--cam-accent); }
.dock-sep { background: transparent !important; width: 4px; }
/* 配置浮层 */
.cfg-pop { border-radius: 22px; }
.cf-seg { background: var(--cam-bg2); border-radius: 999px; padding: 2px; }
.cf-seg button { border-radius: 999px; }
.cf-seg button.is-on { background: var(--cam-bg3); color: #FFFFFF; }
/* 参考面板：底部抽屉 */
.drawer { background: rgba(28, 28, 28, .94); border-radius: 28px; box-shadow: var(--cam-shadow); }
.drawer.at-bottom .drawer-grip::after { width: 40px; height: 5px; border-radius: 3px; background: #5A5A5A; top: 6px; }
.drawer-hd { border-bottom: 0; padding: 14px 16px 6px; font-size: 13px; font-weight: 600; color: #FFFFFF; }
.drawer-hd button { width: 28px; height: 28px; border-radius: 50%; background: var(--cam-bg3); color: #FFFFFF; font-size: 16px; line-height: 28px; padding: 0; text-align: center; }
.drawer-hd button:hover { background: #484848; }
/* rank 卡 */
.side-right .brief-h { font-size: 16px; font-weight: 600; color: #FFFFFF; }
.brief-row span { color: var(--cam-label); }
.brief-badge { border-radius: 999px; background: var(--cam-bg2); padding: 1px 8px; }
.dc-total .dc-big { margin-bottom: 6px; }

/* 场景页签：选中只靠文字（反馈「选中不要用小三角，直接文字就可以，不要占用高度」）——去掉三角与为它留的底部内边距 */
.jn-goals button { padding: 4px 11px; }
.jn-goals button.is-cur::after { content: none; }

/* 工况切换与场景切换分开（反馈「训练推理的切换和后面的切换分开」）：两枚独立的胶囊，中间留一段空 */
.jn-bar { background: none !important; box-shadow: none !important; -webkit-backdrop-filter: none !important; backdrop-filter: none !important; padding: 0; gap: 10px; }
.jn-mode, .jn-goals {
  background: var(--cam-bg); -webkit-backdrop-filter: var(--cam-fx); backdrop-filter: var(--cam-fx);
  box-shadow: var(--cam-shadow); border-radius: 999px; padding: 5px; margin: 0;
}
.jn-mode button { padding: 4px 14px; }
.jn-mode button.is-on { background: var(--cam-bg3); }

/* 小标签统一一套尺寸（反馈「注意小标签的高度和圆角」）：原来配置胶囊 24px 全圆、切法小标 12px 直角 3、计数角标 15px、rank 档位 20px，各不相同。
   现在一律：高 18px、圆角 6px、左右 7px、字 10.5px 等宽、行高 = 高度（文字垂直居中）；小标上不再带「可悬停」点线。 */
.lc-chip, .dc-cut, .jn-badge, .brief-badge, .ip-root, .ip-drill {
  box-sizing: border-box; height: 18px; line-height: 18px; padding: 0 7px; border-radius: 6px;
  font-family: var(--mono); font-size: 10.5px; font-weight: 500; display: inline-flex; align-items: center; gap: 4px; vertical-align: middle;
}
.lc-chip { background: var(--cam-bg2); color: #F2F2F2; }
.lc-chip em { font-size: 10px; line-height: 18px; }
.lc-chips { gap: 5px; }
.dc-cut { margin-left: 6px; color: #111111; font-weight: 600; letter-spacing: .02em; }
.jn-badge { min-width: 18px; justify-content: center; padding: 0 5px; margin-left: 2px; }
.brief-badge { background: var(--cam-bg2); color: var(--cam-label); margin-left: 8px; }
.brief-badge.is-alert { color: #FFFFFF; }
.ip-drill { border: 0; background: var(--cam-bg3); color: #F2F2F2; cursor: pointer; }
.ip-drill:hover { background: #484848; }
.lc-chip.has-gloss, .dc-cut.has-gloss, .jn-badge.has-gloss, .brief-badge.has-gloss, .dc-cut .has-gloss { text-decoration: none; }
.dcard.is-split .dc-h { align-items: center; }

/* 小标签再紧凑一档（反馈「参考相机界面的小标签，是不是还可以紧凑」——0.0EV / AF / 2500K 那种）：
   全圆角胶囊，高 16px（上下几乎不留空），左右 6px，前缀与数值只隔 3px，字 10px。 */
.lc-chip, .dc-cut, .jn-badge, .brief-badge, .ip-root, .ip-drill {
  height: 16px; line-height: 16px; padding: 0 6px; border-radius: 8px; font-size: 10px; gap: 3px;
}
.lc-chip em { font-size: 9.5px; line-height: 16px; }
.lc-chips { gap: 4px; margin-bottom: 8px; }
.jn-badge { min-width: 16px; padding: 0 4px; }
.dc-cut { margin-left: 5px; }

/* 卡片整体再紧凑一档（反馈「包括其他卡片的尺寸」）：按相机界面那张「iPhone · 2時」卡的比例——
   内边距 12/14、圆角 16、大数 24px、行高 16px、卡间距 8；切分小卡 7/12、圆角 12；顶上胶囊与工具条按钮各矮一档。 */
.gcard, .side-right, .ip-grp, .cfg-pop, .dcard, .jn-alerts { border-radius: 16px; }
body:not(.is-compact) .dcard, body:not(.is-compact) .gcard, body:not(.is-compact) .side-right { padding: 11px 14px; }
body.is-compact .dcard, body.is-compact .gcard, body.is-compact .side-right { padding: 8px 11px; border-radius: 14px; }
body:not(.is-compact) .data-col, body:not(.is-compact) .shard-col { gap: 8px; }
body:not(.is-compact) .gcard + .gcard, body:not(.is-compact) #leftCard > .dcard { margin-top: 8px; }
.dcard.is-split { border-radius: 12px; padding: 7px 12px; }
.dc-h { margin-bottom: 3px; }
.dc-big, .lc-big { font-size: 24px; margin: 2px 0 7px; }
.lc-big { margin-bottom: 8px; }
body.is-compact .dc-big, body.is-compact .lc-big { font-size: 20px; margin: 1px 0 5px; }
body:not(.is-compact) .dc-r { line-height: 16px; }
.dc-r + .dc-r { margin-top: 2px; }
.vz-stat b { font-size: 24px; }
.side-right .brief-h { font-size: 14px; }
/* 顶上两枚胶囊、工具条、抽屉 */
.jn-mode, .jn-goals { padding: 3px; }
.jn-mode button { padding: 2px 12px; }
.jn-goals button { padding: 2px 10px; font-size: 12.5px; }
.dock { padding: 4px; gap: 3px; }
.dock button { width: 32px; height: 32px; }
.drawer { border-radius: 20px; }
.drawer-hd { padding: 10px 14px 4px; }
.drawer-hd button { width: 24px; height: 24px; line-height: 24px; font-size: 14px; }

/* 集群画布与四周卡片做一定程度的统一（反馈「内部集群主要是线的形式、无圆角，和周边视觉做一定程度的统一，以独立显示效果为准」）：
   容器从「只描一根线」改成「深灰实底 + 圆角 + 很淡的边」——超节点像一张大卡、POD 像卡里的小卡、NPU 格子带一点圆角；
   链路、交换、占用灰度这些读数的画法不动，边线只是压淡（不去掉：放大缩小时靠它分清层级）。 */
.p-sp { rx: 14px; ry: 14px; fill: rgba(28, 28, 28, .72); stroke: rgba(255, 255, 255, .09); }
.p-sp.is-on { stroke: rgba(255, 255, 255, .22); }
.p-plane { rx: 6px; ry: 6px; fill: #232323; stroke: rgba(255, 255, 255, .07); }
.p-pod { rx: 7px; ry: 7px; fill: #1F1F1F; stroke: rgba(255, 255, 255, .10); }
.p-pod:hover { stroke: rgba(255, 255, 255, .28); }
.p-pod.is-on { stroke: rgba(255, 255, 255, .6); }
.p-pod.is-fit { stroke: rgba(255, 255, 255, .28); }
.p-board { rx: 3px; ry: 3px; }
.p-pod.is-fit ~ .p-board:hover, .p-board:hover { fill: #2A2A2A; }
.p-bdiv { stroke: rgba(255, 255, 255, .05); }
.p-npu { rx: 1.4px; ry: 1.4px; }
.p-splabel { fill: rgba(236, 236, 236, .6); }
/* 板视图：机框 / 平面同样实底 + 圆角 */
.b-plane { rx: 8px; ry: 8px; }
.p-bnpu { rx: 6px; ry: 6px; }

/* rank 卡上的跳转按钮（板 N / 单卡 / rank N）：不用线框、不带箭头图标，按现在的规范做成实底文字按钮——
   高 24px、圆角 12（全圆胶囊）、左右 12px、12px 字；主操作「单卡」亮一档（浅底深字），次操作深灰底 */
.brief-cta {
  display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box;
  height: 24px; line-height: 24px; padding: 0 12px; border: 0 !important; border-radius: 12px;
  background: var(--cam-bg2); color: #F2F2F2; font: inherit; font-size: 12px; font-weight: 500; cursor: pointer;
  margin: 8px 6px 0 0; transition: background .15s ease;
}
.brief-cta:hover { background: var(--cam-bg3); color: #FFFFFF; }
.brief-cta.is-primary { background: #EDEDED; color: #111111; }
.brief-cta.is-primary:hover { background: #FFFFFF; color: #000000; }
/* NPU 图标 3× 起出现：从这一档起方块本身透明（占用灰度改由图标下的占用条表达），与 CPU / DPU / NIC 同一档 */
svg.lod1 .p-npu:not(.is-sel), svg.lod1 .p-npu.is-sel { fill-opacity: 0; }
svg.lod1 .p-npu.is-dim + .p-npunum + .p-npupkg { opacity: var(--recede); }

/* ── 10.10：板视图连线统一成直角走线 + 圆角（见 pattern.js rp）──
   共线的几根线叠在一条轨道上，半透明会越叠越亮、轨道一段亮一段暗；改用实色分档：
   平时一档暗灰，选中那颗的线白色（TP 那几根青色），其余退到更暗一档 */
.b-mesh, .b-fan, .b-h2d, .b-nicl, .b-l12, .b-swbl { fill: none; stroke-opacity: 1; stroke-linejoin: round; transition: stroke .15s ease; }
.b-mesh { stroke: #4E4E4E; stroke-width: calc(.8px / var(--zk, 1)); }
.b-fan { stroke: #454545; stroke-width: calc(.9px / var(--zk, 1)); }
.b-h2d, .b-nicl { stroke: #5C5C5C; stroke-width: calc(.9px / var(--zk, 1)); }
.b-l12 { stroke: #5C5C5C; stroke-width: calc(.9px / var(--zk, 1)); }
.b-swbl { stroke: #454545; stroke-width: calc(.8px / var(--zk, 1)); }
.b-fan.is-hot, .b-h2d.is-hot, .b-nicl.is-hot, .b-mesh.is-hot { stroke: #FFFFFF; stroke-opacity: 1; stroke-width: calc(1.6px / var(--zk, 1)); }
.b-fan.is-cold, .b-mesh.is-cold, .b-h2d.is-cold, .b-nicl.is-cold { stroke: #2C2C2C; stroke-opacity: 1; }
.b-lbl-mesh { fill: #A0A0A0; }

/* ── 10.10.1：连线收细、拉开层级（反馈「太粗了，看不到重点」）──
   器件是主角、线是背景：平时所有线都退成细线（密线 .6、干线 .8–1），衬边收窄；
   选中一颗 NPU 时它自己的线是唯一亮的（白 1.1、TP 青 1.3），其余密线几乎看不见、干线退到暗灰、端点小点也收掉 */
.b-mesh { stroke: #3C3C3C; stroke-width: calc(.6px / var(--zk, 1)); }
.b-fan { stroke: #383838; stroke-width: calc(.6px / var(--zk, 1)); }
.b-swbl { stroke: #383838; stroke-width: calc(.6px / var(--zk, 1)); }
.b-h2d, .b-nicl, .b-l12 { stroke: #4A4A4A; stroke-width: calc(.7px / var(--zk, 1)); }
.b-roce { stroke: #6A6A6A; stroke-width: calc(.8px / var(--zk, 1)); }
.b-pcie { stroke: #7A7A7A; stroke-width: calc(.8px / var(--zk, 1)); }
.b-ub { stroke: #6A6A6A; stroke-width: calc(1px / var(--zk, 1)); }
.b-uboe { stroke: #7A7A7A; stroke-width: calc(1px / var(--zk, 1)); }
.b-bus { stroke-width: calc(1px / var(--zk, 1)); }
.b-cpul, .b-nsw-l, .b-swbx { stroke: #7A7A7A; stroke-width: calc(.8px / var(--zk, 1)); }
.b-rdma { stroke: #7A7A7A; stroke-width: calc(.8px / var(--zk, 1)); }
svg.near .lkc { stroke-width: calc(3px / var(--zk, 1)); }
.b-fan.is-hot, .b-h2d.is-hot, .b-nicl.is-hot, .b-mesh.is-hot { stroke: #F2F2F2; stroke-width: calc(1.1px / var(--zk, 1)); }
svg.near .b-mesh.is-hot.is-tp { stroke: var(--c-tp); stroke-width: calc(1.3px / var(--zk, 1)); }
.b-fan.is-cold, .b-mesh.is-cold, .b-h2d.is-cold, .b-nicl.is-cold { stroke: #252525; }
svg.has-sel .b-l12, svg.has-sel .b-swbl { stroke: #252525; }
svg.has-sel .b-roce, svg.has-sel .b-pcie, svg.has-sel .b-ub, svg.has-sel .b-uboe,
svg.has-sel .b-cpul, svg.has-sel .b-nsw-l, svg.has-sel .b-swbx, svg.has-sel .b-rdma { stroke: #3A3A3A; }
svg.has-sel .b-links > :not(.is-hot) { marker-start: none; marker-end: none; }
svg.has-sel .b-lbl { fill: #6A6A6A; }

/* ── 10.10.2：再收细、层距收紧（反馈「缩小层叠线之间的间距」「粗细再收一下」）──
   轨道层距 6/8 → 4；所有线再细一档，选中那颗的线也从 1.1 收到 .8，重点靠亮度而不是粗细 */
.b-mesh, .b-fan, .b-swbl { stroke-width: calc(.45px / var(--zk, 1)); }
.b-h2d, .b-nicl, .b-l12 { stroke-width: calc(.5px / var(--zk, 1)); }
.b-roce, .b-pcie, .b-cpul, .b-nsw-l, .b-swbx, .b-rdma { stroke-width: calc(.6px / var(--zk, 1)); }
.b-ub, .b-uboe, .b-bus { stroke-width: calc(.7px / var(--zk, 1)); }
svg.near .lkc { stroke-width: calc(2.2px / var(--zk, 1)); }
.b-fan.is-hot, .b-h2d.is-hot, .b-nicl.is-hot, .b-mesh.is-hot { stroke: #FFFFFF; stroke-width: calc(.8px / var(--zk, 1)); }
svg.near .b-mesh.is-hot.is-tp { stroke-width: calc(.9px / var(--zk, 1)); }

/* ── 10.11：线束（参考 BMC bus-wiring）──
   束内每根线一条车道、间距 2.2；每根密线也垫一圈底色描边（.lkd），交叉处切开、看得出谁压谁 */
svg.near .lkd { stroke: #111111; stroke-width: calc(1.5px / var(--zk, 1)); stroke-linecap: butt; }
svg.has-sel .lkd { stroke-width: calc(1.3px / var(--zk, 1)); }

/* ── 10.12：集群放大后原地展开的那块板，同板视图的线束画法 ── 底色描边跟 POD 底色走 */
.rel .lkc { stroke: #1F1F1F; stroke-width: calc(2.6px / var(--zk, 1)); stroke-linecap: butt; }
.rel line, .rel path { stroke-width: calc(.7px / var(--zk, 1)); }
.rel-cpu { stroke-width: calc(1px / var(--zk, 1)) !important; }
/* 10.29：其余板行的底从 97% 改成同 --recede 那一档：别的行和画面上其余退下去的东西一样淡，不再是几乎看不见。
   有选中 / 聚焦时这层底撤掉——那时别的板上的 NPU、CPU / DPU / NIC 已经各自按 class / 动态样式退到这一档，再盖一层就成了两档 */
.rel .rel-scrim { fill: #1F1F1F; fill-opacity: calc(1 - var(--recede)); stroke: none; }   /* 只是指针划过展开（没有选中）时：其余板行由这层底退到同一档；有选中 / 聚焦时由 syncDimCtx 撤掉 */

/* ── 10.12：虚线全部改实线（反馈「虚线效果非常差，全部调整」）──
   虚线节奏在细线上只剩一串噪点，缩放时段长还跟着变。介质改用**灰度**区分，线型一律实线：
     UBoE 最亮 #A8A8A8 · PCIe #8E8E8E · UB #767676 · RoCE（参数面，出框）最暗 #5A5A5A；
   选中后的亮 / 退暗规则不变。泳道、流水线图上的辅助标记同样改实线、压淡 */
.b-ub, .b-uboe, .b-roce, .b-pcie, svg.near .b-ub, svg.near .b-uboe,
.p-uboe, .p-roce, #physStage svg:not(.lod1) .p-roce,
.rel-ub, .rel-pcie, .rel-roce, .rel-row, .pb-cap, .sw-mark { stroke-dasharray: none; }
.b-uboe, .p-uboe { stroke: #A8A8A8; stroke-opacity: 1; }
.b-pcie, .rel-pcie { stroke: #8E8E8E; }
.b-ub, .rel-ub { stroke: #767676; }
.b-roce, .p-roce, .rel-roce { stroke: #5A5A5A; stroke-opacity: 1; }
.rel-ub { stroke-opacity: 1; }
.rel-row { stroke: #5A5A5A; }
.pb-cap { stroke: #3E3E3E; }
.sw-mark { stroke: #5A5A5A; }
svg.has-sel .b-roce, svg.has-sel .b-pcie, svg.has-sel .b-ub, svg.has-sel .b-uboe { stroke: #3A3A3A; }

/* ── 10.13：连线上的小数据标签（板视图）── 不用标签框：一行小号等宽字、垫一圈底色；平时藏着，放大到 1.5× 起淡入；
   需要注意的读数琥珀色（阈值色），带琥珀读数的那一条不放大也显示 */
.b-dlbl { font-family: var(--mono, ui-monospace, monospace); font-size: 6px; fill: #8E8E8E; letter-spacing: .02em;
  paint-order: stroke; stroke: #111111; stroke-width: calc(2.4px / var(--zk, 1)); stroke-linejoin: round;
  opacity: 0; transition: opacity .2s ease; pointer-events: none; }
.b-dlbl .dl-k { fill: #C8C8C8; }
.b-dlbl .dl-sep { fill: #5A5A5A; }
.b-dlbl .is-warn { fill: #FAB219; }
/* 10.18：告警读数也只在放大后出现（反馈：铺满时那一条琥珀标签字太大、和整体比例不协调）——不放大时琥珀线 / L1 端口点已经报了状态 */
svg.lodz .b-dlbl { opacity: 1; }
svg.has-sel .b-dlbl { fill: #6A6A6A; }

/* ── 10.14：必要的状态点缀（照 硬件图元库：状态色嵌在图元体内、只在出事时出现，平时全灰）──
   器件：NPU 状态条（die 窗口底下那一条）——显存 ≥ 红线（Critical）琥珀、OOM 告警红；其余仍是占用灰阶。
   交换机：首个端口点——EP 路由失衡超线时琥珀。
   链路：平时灰、选中白；选中卡承载告警流量的那几根（EP 失衡时它的出板 Clos）由白改琥珀。只做这三种，不加常亮的「正常」绿 */
.p-npu.c2 + .p-npunum + .p-npupkg + .p-npustrip, .p-bnpu.c2 + .b-npuicon + .b-npustrip { fill: #FAB219; }
.b-led { display: none; fill: #FAB219; pointer-events: none; }
svg.st-ep .b-led { display: inline; }
svg.st-ep .b-fan.is-hot, svg.st-ep .rel-clos.is-hot { stroke: #FAB219 !important; }
/* 10.29 点告警定位到的对象 = 这条告警的状态色（反馈「这里点击告警的高亮不明显，这种可以用状体色」）：physApplySelection 给那一段 / 那张卡
   挂 al-warn（告警琥珀 --warn）/ al-crit（超容红 --alert）。远看格子整格填状态色；出了封装图标（格子透明）后状态条换状态色、格子垫一层 22% 同色
   （同图元库状态态的整件 22% 混色，数字照样读得清）；板视图状态条 + 图标外一圈同色细框。不受「占用」标注开关影响；聚焦撤了就回去 */
.p-npu.al-warn, body.ann-noocc .p-npu.al-warn { fill: var(--warn) !important; }
.p-npu.al-crit, body.ann-noocc .p-npu.al-crit { fill: var(--alert) !important; }
svg.lod1 .p-npu:not(.p-bnpu).al-warn, svg.lod1 .p-npu:not(.p-bnpu).al-crit { fill-opacity: .22; }
.p-npu.al-warn + .p-npunum + .p-npupkg + .p-npustrip, .p-bnpu.al-warn + .b-npuicon + .b-npustrip { fill: var(--warn) !important; }
.p-npu.al-crit + .p-npunum + .p-npupkg + .p-npustrip, .p-bnpu.al-crit + .b-npuicon + .b-npustrip { fill: var(--alert) !important; }
.p-bnpu.al-warn ~ .b-relf { display: inline; stroke: var(--warn); }
.p-bnpu.al-crit ~ .b-relf { display: inline; stroke: var(--alert); }

/* ── 10.15：颜色只表示状态，线型区分介质；选中 / 连带选中分开（反馈「为什么还有蓝色的线」「用颜色表示状态，线型就用线的样式区分」
   「注意选中状态和连带选中的状态」）──
   状态（颜色）：灰 = 默认 · 白 = 选中 · 浅灰 = 连带选中 · 琥珀 = 告警 · 红 = 故障。维度签名色不再上线、不再描卡。
   介质（线型，同一灰）：UB 实线 · UBoE 长虚线 · RoCE / NIC 交换 短虚线 · PCIe 点线；虚线段长按屏幕像素定（--zdash），缩放不变 */
.b-uboe, .p-uboe { stroke: #8A8A8A; --zdash: 7 3; stroke-linecap: butt; }
.b-roce, .p-roce, .rel-roce, .b-nsw-l { stroke: #767676; --zdash: 2.6 2.2; stroke-linecap: butt; }
.b-pcie, .rel-pcie { stroke: #8A8A8A; --zdash: 0.01 2.4; stroke-linecap: round; }
.b-ub, .rel-ub, .b-cpul, .b-swbx { stroke: #767676; }
svg.has-sel .b-roce, svg.has-sel .b-pcie, svg.has-sel .b-ub, svg.has-sel .b-uboe, svg.has-sel .b-nsw-l { stroke: #3A3A3A; }
/* 选中卡自己的线：承载本组流量的（TP 组员之间的 fullmesh、出板 Clos、H2D、NIC）白 = 选中；
   连向组外那几张卡的 fullmesh 是它的线、但不走本组流量 → 浅灰 = 连带选中 */
svg.near .b-mesh.is-hot.is-tp { stroke: #FFFFFF; }
svg.near .b-mesh.is-hot:not(.is-tp) { stroke: #8E8E8E; }
/* 连带选中的器件：同组成员一圈浅灰细框（板视图贴封装图标、集群贴格子），选中那一张仍是白框 */
.b-relf { display: none; fill: none; stroke: #A8A8A8; stroke-width: calc(1px / var(--zk, 1)); pointer-events: none; }
/* 板视图的连带选中 = 与选中卡在本板上直接走白线的那几张（TP 组员）；EP / CP 组员的流量出板走 Clos，不在板内连带 */
.p-bnpu.g-tp ~ .b-relf { display: inline; }
.p-bnpu[class*=" g-"] { stroke: none !important; }
.p-npu.g-tp, .p-npu.g-cp, .p-npu.g-ep, .p-npu.g-dp, .p-npu.g-pp { stroke: #A8A8A8; stroke-width: calc(.8px / var(--zk, 1)); }
.rel .rel-mesh.is-hot:not(.is-tp) { stroke: #8E8E8E !important; }
.rel .rel-relf { fill: none; stroke: #A8A8A8; stroke-width: calc(.8px / var(--zk, 1)); }
.brief-loc { white-space: normal; }
.brief-loc sup { font-size: 8px; margin-left: 1px; vertical-align: super; }

/* ── 10.16 全局一致性（审计）──
   选中态全页一种：深底 #3A3A3A + 白字、无描边（胶囊、dock、设置分段、层级剖面格）；画布上是白框。
   设置里的按钮不再用细线框，同 rank 卡按钮一样实底全圆角。标签字号按屏幕像素定。面包屑垫一圈底色，放大后不被画布内容吃掉 */
.cf-seg button, .hv-chip { border-color: transparent !important; }
.cf-seg button.is-on, .hv-chip.is-on { background: var(--cam-bg3) !important; color: #FFFFFF !important; border-color: transparent !important; }
.cf-step button, .cf-sp button, .cf-all button { border: 0 !important; background: var(--cam-bg2); border-radius: 999px !important; color: #E8E8E8; }
.cf-step button:hover, .cf-sp button:hover, .cf-all button:hover { background: var(--cam-bg3); color: #FFFFFF; }
.cf-sp b.is-mod { background: var(--cam-bg3); color: #FFFFFF; border-radius: 999px; }
.crumb .cr, .crumb i { text-shadow: 0 0 3px #111111, 0 0 8px #111111, 0 0 14px #111111; }
.p-splabel { --zfs: 11; }
.p-uboelabel { --zfs: 10; }
.p-rocelabel { --zfs: 8; }
/* 10.18：数据标签不再按屏幕定字号——跟板上其它标签一起随画布缩放，比例与图元一致；字号取板上最小一档 */
.ip-m em { margin-right: 6px !important; color: #8A8A8A; }

/* ── 10.20 全局排布：rank 卡在左列（配置卡下面），抬头字号同原来右上那张；跳转按钮一行 ── */
.lc-rank .brief-h { font-size: 14px; font-weight: 600; color: #FFFFFF; }
.lc-rank .brief-loc { margin-top: 8px; }
.lc-rank .brief-loc span { display: block; white-space: nowrap; }   /* 两行：SuperPoD · POD / Board · Slot，不在行首挂「·」 */
.lc-rank-cta { display: flex; flex-wrap: wrap; }
/* 左列每张卡之间同一个间距（10.20 起 PP 段柱接在容量卡后面，原来只给 .gcard + .gcard 与 > .dcard 留了缝） */
#leftCard > .gcard + .gcard, #leftCard > * + .gcard { margin-top: 8px; }
body.is-compact #leftCard > * + .gcard { margin-top: 6px; }
/* ── 10.21 简略卡：收起时只摆卡名 + 读数 + 越线的那几行，点卡展开，点卡头收起；卡头右侧一枚小折角说明能点 ── */
.dcard.is-fold { cursor: pointer; }
.dcard.is-fold.is-open { cursor: default; }
.dcard.is-fold.is-open .dc-h { cursor: pointer; }
.dcard.is-fold .dc-h::after { content: ''; flex: none; width: 5px; height: 5px; margin-right: 2px; border-right: 1.5px solid #6A6A6A; border-bottom: 1.5px solid #6A6A6A; transform: translateY(-2px) rotate(45deg); transition: transform .15s ease, border-color .15s ease; }
.dcard.is-fold.is-open .dc-h::after { transform: translateY(1px) rotate(-135deg); }
.dcard.is-fold:hover .dc-h::after { border-color: #C8C8C8; }
.dcard.is-fold:not(.is-open) .dc-big { margin-bottom: 0; }
.dcard.is-fold:not(.is-open) .dc-big + .dc-r { margin-top: 6px; }
.dcard.is-fold:not(.is-open) .dc-h { margin-bottom: 2px; }
/* 越线的读数：收起也看得见——琥珀 = Warn / Critical、红 = OOM / 超容（同画布那两种状态色） */
.dcard.dc-warn .dc-big { color: var(--warn); }
.dcard.dc-alert .dc-big { color: var(--alert); }
.dcard.dc-warn .dc-big small, .dcard.dc-alert .dc-big small { color: var(--cam-label, #8C8C8C); }
/* 简略卡展开后底色不变（.is-open 的浅底是 NPU 页切分小卡「点开了哪一块」的选中提示，这里只是展开，不是选中） */
.dcard.is-fold.is-open, .dcard.is-fold:hover { background: var(--cam-bg); }
/* 10.22 状态标：只在 Warn / Critical（琥珀）与 OOM（红）时出现，OK 不画 */
.brief-badge.is-warn { color: #111111; background: var(--warn); border-color: var(--warn); }
.brief-badge.is-alert { color: #FFFFFF; background: var(--alert); border-color: var(--alert); }
/* 下钻按钮的图标：同 dock 图标的线宽与端点，跟着按钮文字色 */
.brief-cta .cta-ico { width: 14px; height: 14px; margin: 0 6px 0 -2px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

/* ── 10.23 集群 2.5D：dock 里的切换只在集群 / POD 这一层出现（Board 与 NPU 页各有自己的画法）；板厚两档暗、顶面一层很淡的斜向光泽 ── */
.p-thk { pointer-events: none; }
.p-thk-sp { rx: 14px; ry: 14px; fill: #0B0B0B; stroke: rgba(255, 255, 255, .05); stroke-width: calc(1px / var(--zk, 1)); }
.p-thk-pod { rx: 7px; ry: 7px; fill: #121212; }
.phys-stage:not(.is-iso) .p-thick, .phys-stage:not(.is-iso) .p-thick-pod { display: none; }
.phys-stage.is-iso .p-sp { fill: url(#iso-sheen); stroke: url(#iso-rim); }
/* 底部工具条的视角段：胶囊分段（同设置里的分段按钮），选中 = 深底白字；Logical Cube 那段前面一枚小字标签说明管的是谁 */
.dock-views { display: flex; align-items: center; gap: 4px; }
.dock-views.is-empty { display: none; }
.dv-seg { display: flex; gap: 2px; padding: 0; }
.dock .dv-b { width: auto; min-width: 36px; height: 36px; padding: 0 12px; border-radius: 999px; font: inherit; font-size: 12px; font-weight: 500; color: #A8A8A8; white-space: nowrap; }
.dock .dv-b:disabled { opacity: .35; cursor: default; }
.dv-sep { width: 1px; height: 18px; background: rgba(255, 255, 255, .1); margin: 0 4px; }
.dv-lbl { font-size: 10px; color: #6A6A6A; margin: 0 2px 0 4px; white-space: nowrap; letter-spacing: .02em; }
.dv-menu-w { position: relative; display: flex; }
.dock .dv-mode { gap: 6px; }
.dv-car { width: 5px; height: 5px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(1px) rotate(-135deg); opacity: .7; }
.dv-mode.is-open .dv-car { transform: translateY(-2px) rotate(45deg); }
.dv-menu { position: absolute; bottom: calc(100% + 12px); left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 2px; padding: 6px;
  background: var(--cam-bg); -webkit-backdrop-filter: var(--cam-fx); backdrop-filter: var(--cam-fx); box-shadow: var(--cam-shadow); border-radius: 18px; z-index: 12; }
.dock .dv-menu .dv-b { justify-content: flex-start; height: 30px; }

/* ── 连线悬停热区 ──
   每根线再叠一条粗描边，专门用来接悬停：芯线只有 0.45–0.7px，直接悬停根本碰不到，
   读者认不出哪条线是哪条（见 pattern.js 的 LK_TIP）。宽度按屏幕像素定：两个画布、任何
   缩放下都是同一条 11px 走廊，写法与其它描边一样是 calc(px / var(--zk))——先靠
   .zp-box svg * 的 non-scaling-stroke 抵掉 viewBox，再由 setZoomStroke 除掉 CSS transform 的倍数。
   （量过：屏幕上只剩 CSS transform 这一个倍数。曾经让 setZoomStroke 连 viewBox 比一起除掉，
   那是重复除了一次——non-scaling-stroke 抵掉的正是 viewBox 那层——结果同一个 11px 在板视图
   落到 10.4px、集群落到 14.9px，两个画布不一样宽，还会随窗口大小变。）
   描边必须画得出来：Chromium 里 pointer-events: stroke 仍要求描边有涂色，stroke: none 的
   热区一个点都命不中（实测同一根线 stroke:none 时走廊 0px，给上 stroke-opacity: 0 的黑色
   立刻回来 10.5px）。所以留着一条有色、透明度 0 的描边——看不见，但命中。
   选择器写成 .lk-hits .lk-hit 而不是单个 .lk-hit：setZoomStroke 会把这条规则重写成
   「#舞台 .lk-hits .lk-hit」，这个特异性要压得住同样被重写的「#舞台 .rel path」（基准 .7px），
   否则放大一次热区就跟着缩回发丝线、又碰不到了。光标不给，读者看不出它存在。 */
.lk-hits .lk-hit {
  fill: none; stroke: #000000; stroke-opacity: 0; pointer-events: stroke;
  stroke-width: calc(11px / var(--zk, 1));
  stroke-linecap: round; stroke-linejoin: round;
}
/* 悬停的那一根点亮（反馈「hover 线要有 hover 状态」）：每个舞台一个共用元素，几何抄自热区、由
   pattern.js 的 lkHlPaint 写进 d（空 d = 不画），永远排在 .lk-hits 最后一个——密线束里后画的线
   压不住它。宽度按屏幕像素定，比最粗的真线（.9px）再厚一档，任何缩放下都是同一道 1.1px 白线。
   选择器同样写成 .lk-hits .lk-hl：压得住被重写的「#舞台 .rel path」（基准 .7px），不然集群里
   高亮会瘦回发丝线。pointer-events: none 不能少——它压在其它热区之上，挡了命中就再也停不到
   下面那几根线上了（.rel 那一层是整组 pointer-events="none"，热区各自写 stroke 才拿回命中）。 */
.lk-hits .lk-hl {
  fill: none; stroke: #FFFFFF; pointer-events: none;
  stroke-width: calc(1.1px / var(--zk, 1));
  stroke-linecap: round; stroke-linejoin: round;
}

/* 屏幕适配：导航保持完整词组；标题与导航保持一行，小屏面板按需展开。 */
.jn-mode, .jn-goals { min-width: 0; }
.jn-mode { flex: none; }
.jn-mode button, .jn-goals button { flex: none; white-space: nowrap; }
.journey { max-width: calc(100% - 32px); }
.jn-bar { min-width: 0; max-width: 100%; }
.jn-goals { overflow-x: auto; scrollbar-width: thin; }
.jn-alerts { min-width: 0; width: min(460px, calc(100vw - 32px)); }
.topbar { max-width: calc(100% - 32px); }
.crumb { min-width: 0; overflow-x: auto; scrollbar-width: none; }
.crumb > * { flex: none; }
.cfg-pop { max-width: calc(100vw - 32px); max-height: calc(100dvh - 100px); overflow-y: auto; }
.screen-panels { display: none; }
.dcard svg.vz:not(.vz-inline) { max-width: 100%; height: auto; }
@media (max-width: 1500px) {
  .jn-mode { margin-right: 0; }
  body.is-compact .side-left, body .side-left, .side-right, .data-col, .shard-col { top: 60px; }
  .drawer.at-left, .drawer.at-right { top: 60px; }
  body.is-compact .ip-col-left, .ip-col-left, body.t3 .ip-col-left { top: calc(60px + var(--lc-h, 300px) + 8px); }
  .data-col, .shard-col { bottom: calc(76px + var(--pb, 0px)); }
}
@media (min-width: 761px) and (max-width: 1100px) {
  .side-left, .shard-col, .ip-col { width: 230px; }
  .data-col { width: 214px; }
  .side-right { width: 204px; }
  body.panel-right.panel-narrow .data-col:not(.is-hidden) { display: none; }
}
@media (max-width: 760px) {
  .jn-bar { justify-content: flex-start; gap: 6px; }
  .jn-mode button { padding: 2px 8px; }
  .jn-goals button { padding: 2px 9px; }
  .jn-goals { border-radius: 16px; }
  .topbar { left: 12px; max-width: calc(100% - 24px); }
  .crumb { font-size: 12px; gap: 4px; }
  .crumb .cr-root { font-size: 15px; }
  .screen-panels { position: fixed; z-index: 8; left: 50%; transform: translateX(-50%); bottom: calc(66px + var(--pb, 0px)); display: flex; gap: 6px; white-space: nowrap; }
  .screen-panels button { font: inherit; font-size: 12px; padding: 7px 12px; border: 0; border-radius: 999px; background: var(--cam-bg, #222); color: #bdbdbd; cursor: pointer; }
  .screen-panels button[aria-expanded="true"] { background: #e8e8e8; color: #111; }
  .side-left, .data-col, .shard-col, .ip-col { display: none !important; }
  body.screen-left .side-left:not(.is-hidden) { display: block !important; left: 12px; width: min(292px, calc(100% - 24px)); max-height: calc(100dvh - 220px) !important; }
  body.screen-left.t3 .side-left:not(.is-hidden) { max-height: min(26vh, 170px) !important; }
  body.screen-left.t3 .shard-col:not(.is-hidden) { display: flex !important; left: 12px; width: min(292px, calc(100% - 24px)); bottom: calc(112px + var(--pb, 0px)); }
  body.screen-right .data-col:not(.is-hidden) { display: flex !important; right: 2px; width: min(302px, calc(100% - 14px)); bottom: calc(112px + var(--pb, 0px)); }
  .dock { max-width: calc(100% - 20px); bottom: calc(12px + var(--pb, 0px)); }
  .dock > *, .dock button { flex-shrink: 0; }
  .dock .dv-b { padding: 0 8px; min-width: 30px; }
  .drawer.at-left, .drawer.at-right { max-width: calc(100% - 24px); }
  .drawer.at-bottom { left: 12px; right: 12px; max-height: calc(100dvh - 180px); }
  .cfg-pop { left: 12px; right: 12px; width: auto; bottom: calc(112px + var(--pb, 0px)); }
}
@media (max-width: 520px) {
  .dock { width: calc(100% - 20px); flex-wrap: wrap; justify-content: center; }
  .screen-panels { bottom: calc(106px + var(--pb, 0px)); }
  body.screen-right .data-col:not(.is-hidden), body.screen-left.t3 .shard-col:not(.is-hidden) { bottom: calc(152px + var(--pb, 0px)); }
  .cfg-pop { bottom: calc(152px + var(--pb, 0px)); }
}

/* 标题 / 工况 / 场景同一行；只有场景列表在空间不足时横向滚动。 */
.screen-header { position: fixed; z-index: 8; top: 14px; left: 16px; right: 16px; display: flex; align-items: center; gap: 16px; pointer-events: none; }
.screen-header .topbar { position: static; flex: 1 1 0; min-width: 110px; max-width: none; pointer-events: auto; }
.screen-header .topbar.is-hidden { pointer-events: none; }
.screen-header .crumb { width: 100%; }
.screen-header .cr-root { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.screen-header .journey { position: static; transform: none; flex: 0 1 auto; min-width: 0; max-width: calc(100% - 126px); }
.screen-header .jn-bar { width: 100%; justify-content: flex-end; }
.screen-header .jn-alerts { position: absolute; top: calc(100% + 6px); right: 0; }
@media (max-width: 1100px) {
  .screen-header .cr-meta { display: none; }
}
@media (max-width: 760px) {
  .screen-header { left: 12px; right: 12px; gap: 8px; }
  .screen-header .topbar { min-width: 80px; }
  .screen-header .journey { max-width: calc(100% - 88px); }
}
