/* Build 13 组件外观：状态徽标、页签（章节锚点）、按钮、巡检卡。按选型分别落到 Terminal / Cyber。 */

/* ===== 状态徽标 ===== */
.status .sc{display:none}
/* Terminal：A 方括号状态码 + ASCII 括号 */
body[data-theme=terminal] .status{display:inline-flex;align-items:baseline;gap:.7em;font-family:Consolas,"Microsoft YaHei",monospace;color:var(--rf-text);white-space:nowrap}
body[data-theme=terminal] .status::before{content:none!important}
body[data-theme=terminal] .status .sc{display:inline-block;min-width:7ch;text-align:center;font-weight:400;white-space:pre;color:var(--good)}
body[data-theme=terminal] .status .sc::before{content:'[ ';opacity:.7}
body[data-theme=terminal] .status .sc::after{content:' ]';opacity:.7}
body[data-theme=terminal] .status.warn .sc{color:var(--warn)}
body[data-theme=terminal] .status.bad .sc{color:var(--danger)}
body[data-theme=terminal] .status.bad .sc::before{content:'[!'}
body[data-theme=terminal] .status.bad .sc::after{content:'!]'}
body[data-theme=terminal] .status.unknown .sc{color:var(--muted)}
/* Cyber：A 切角胶囊（页头、卡片）；列表/表格/节点内用 B 斜线代号 */
body[data-theme=cyber] .status{--s:#3de6b4;display:inline-block;padding:2px 16px 2px 12px;background:var(--s);color:#000!important;font-weight:700;white-space:nowrap;clip-path:polygon(0 0,calc(100% - 9px) 0,100% 9px,100% 100%,0 100%)}
body[data-theme=cyber] .status::before{content:none!important}
body[data-theme=cyber] .status.warn{--s:#f8ef02}
body[data-theme=cyber] .status.bad{--s:#ff6b88}
body[data-theme=cyber] .status.unknown{--s:#b3b19e}
body[data-theme=cyber] :is(.check-row,td,.tree-line,.route-node,.facts,.node-inspector,.watch-header,.attention-queue) .status{display:inline-flex;align-items:baseline;gap:8px;padding:0 0 0 10px;background:none;color:inherit!important;font-weight:400;clip-path:none;border-left:3px solid var(--s)}
body[data-theme=cyber] :is(.check-row,td,.tree-line,.route-node,.facts,.node-inspector,.watch-header,.attention-queue) .status .sc{display:inline;font:700 14px Consolas,monospace;letter-spacing:1.5px;color:var(--s)}
body[data-theme=cyber] :is(.check-row,td,.tree-line,.route-node,.facts,.node-inspector,.watch-header,.attention-queue) .status .sc::after{content:' //';color:var(--rf-text-2)}
body[data-theme=cyber] .route-node.failed .status{--s:#fff}

/* ===== 页签：章节锚点（工作区）===== */
/* Terminal：在 A 方括号基础上——当前章节方括号 + 强调色，其余用空格占位避免跳动；悬停提亮，键盘焦点沿用全局焦点环 */
body[data-theme=terminal] .workspace-anchors{gap:0 4px}
body[data-theme=terminal] .workspace-anchors button{font-family:Consolas,"Microsoft YaHei",monospace;min-height:44px;padding:0 4px;border:0;color:var(--rf-text-2);white-space:pre}
body[data-theme=terminal] .workspace-anchors button::before,body[data-theme=terminal] .workspace-anchors button::after{display:inline!important;content:' ';opacity:.9}
body[data-theme=terminal] .workspace-anchors button[aria-current=location]{color:var(--rf-accent);text-decoration:none;font-weight:700}
body[data-theme=terminal] .workspace-anchors button[aria-current=location]::before{content:'['}
body[data-theme=terminal] .workspace-anchors button[aria-current=location]::after{content:']'}
body[data-theme=terminal] .workspace-anchors button:hover{background:var(--rf-s2);color:var(--rf-text)}
/* Cyber：A 斜切分段；当前章节亮黄 */
body[data-theme=cyber] .workspace-anchors{gap:0;margin:10px 0}
body[data-theme=cyber] .workspace-anchors button{margin-left:-6px;min-height:40px;padding:0 24px;background:var(--rf-s2);color:var(--rf-text-2);clip-path:polygon(12px 0,100% 0,calc(100% - 12px) 100%,0 100%);transition:background .15s,color .15s}
body[data-theme=cyber] .workspace-anchors button:first-child{margin-left:0}
body[data-theme=cyber] .workspace-anchors button:hover{color:var(--rf-text)}
body[data-theme=cyber] .workspace-anchors button[aria-current=location]{background:#f8ef02;color:#000;font-weight:700;text-decoration:none}

/* ===== 按钮 ===== */
/* Terminal：主按钮 = A 方括号实心；次按钮（.sec）= B 提示符 */
body[data-theme=terminal] .cli-button{font-family:Consolas,"Microsoft YaHei",monospace;border:0;padding:0 16px;min-height:44px;background:var(--rf-accent);color:var(--rf-on-accent);font-weight:700;transition:filter .12s,background .12s}
body[data-theme=terminal] .cli-button::before{content:'[ ';opacity:.7}
body[data-theme=terminal] .cli-button::after{content:' ]';opacity:.7}
body[data-theme=terminal] .cli-button:hover{filter:brightness(1.1);text-decoration:none}
body[data-theme=terminal] .cli-button:active{transform:translateY(1px)}
body[data-theme=terminal] .cli-button.sec{background:transparent;color:var(--rf-text-2);font-weight:400}
body[data-theme=terminal] .cli-button.sec::before{content:'$ ';color:var(--rf-accent);opacity:1}
body[data-theme=terminal] .cli-button.sec::after{content:''}
body[data-theme=terminal] .cli-button.sec:hover{background:var(--rf-s2);color:var(--rf-text);filter:none}
body[data-theme=terminal] .cli-button:disabled{opacity:.4;cursor:not-allowed;filter:none;transform:none}
/* Cyber：主按钮 = C 偏移底座（去掉 glitch 与 R25 标签）；次按钮（蓝）= D 扫描条 */
body[data-theme=cyber] .cyber-button-small .glitchtext,body[data-theme=cyber] .cyber-button-small .tag{display:none!important}
body[data-theme=cyber] .cyber-button-small:disabled{opacity:.4;cursor:not-allowed}
body[data-theme=cyber] .cyber-button-small.bg-blue{--bg:var(--rf-s2);background:var(--rf-s2)!important;color:var(--rf-text)!important;box-shadow:inset 3px 0 0 var(--rf-text-2);text-transform:none;letter-spacing:1px;padding-left:20px;transition:box-shadow .15s,background .15s}
body[data-theme=cyber] .cyber-button-small.bg-blue::before,body[data-theme=cyber] .cyber-button-small.bg-blue::after{display:none}
body[data-theme=cyber] .cyber-button-small.bg-blue:hover:not(:disabled){box-shadow:inset 8px 0 0 var(--cyan);background:#1d2a28!important}
html[data-palette=yellow] body[data-theme=cyber] .cyber-button-small.bg-blue{background:#000!important;color:#fff!important}

/* ===== 巡检卡 ===== */
/* Terminal：B 键值块——左侧状态色条，状态符号不依赖颜色（徽标已含代码） */
body[data-theme=terminal] .watch-item{--sc:var(--good);border-left:3px solid var(--sc);border-top:0}
body[data-theme=terminal] .watch-item.warn{--sc:var(--warn)}
body[data-theme=terminal] .watch-item.bad{--sc:var(--danger)}
body[data-theme=terminal] .watch-item.unknown{--sc:var(--muted)}
/* Cyber：A HUD 板——切角、状态色细顶线、读数保持黄色 */
body[data-theme=cyber] .watch-item{--sc:#3de6b4;position:relative;clip-path:polygon(0 0,calc(100% - 14px) 0,100% 14px,100% 100%,0 100%);box-shadow:inset 0 3px 0 var(--sc)}
body[data-theme=cyber] .watch-item.warn{--sc:#f8ef02}
body[data-theme=cyber] .watch-item.bad{--sc:#ff6b88}
body[data-theme=cyber] .watch-item.unknown{--sc:#b3b19e}
html:not([data-palette=yellow]) body[data-theme=cyber] .watch-item{background:var(--rf-s2)}

/* ===== 体验修正：对象列表吸顶 ===== */
body[data-theme=terminal]{--stick:80px}
body[data-theme=cyber]{--stick:16px}
@media(min-width:1000px){.unified-workspace>.asset-menu{position:sticky;top:var(--stick);align-self:start;max-height:calc(100vh - var(--stick) - 16px);overflow:auto}}
.sample-picker[hidden]{display:none}

/* ===== 详情文字层级：标题 > 字段值 > 字段名 > 说明 ===== */
.workspace-section{margin-top:28px}
.workspace-section>h3{font-size:20px;line-height:1.4;font-weight:700;padding-bottom:8px;margin-bottom:14px;border-bottom:1px solid var(--rf-line)}
.workspace-section .facts{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:18px 28px;padding:0 0 6px}
.workspace-section .facts>div{font-size:16px;font-weight:600;line-height:1.5;color:var(--rf-text);overflow-wrap:anywhere}
.workspace-section .facts small{display:block;margin-bottom:3px;font-size:14px;font-weight:400;opacity:1;color:var(--rf-text-2)}
.workspace-section .subsection{margin-top:22px}
.workspace-section .subsection>h3{font-size:16px;font-weight:700;margin-bottom:6px;color:var(--rf-text-2)}
.workspace-section .check-row{padding:12px 0;border-bottom:1px solid var(--rf-line);font-size:16px;color:var(--rf-text)}
.workspace-section .check-row small{font-size:14px;color:var(--rf-text-2)}
.workspace-section .next-action{margin-top:16px;padding:2px 0 2px 14px;border-left:3px solid var(--rf-line);font-size:16px;line-height:1.7;color:var(--rf-text-2)}
.workspace-telemetry>.workspace-sample{font-size:14px;color:var(--rf-text-2);margin:2px 0 12px}
.workspace-alert dl{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:12px 24px}
.workspace-alert dt{font-size:14px;font-weight:400;margin-bottom:2px;opacity:.85}
.workspace-alert dd{margin:0;font-size:16px;font-weight:600;line-height:1.5}
.workspace-timeline h3{font-size:20px;line-height:1.4;font-weight:700;padding-bottom:8px;margin-bottom:12px;border-bottom:1px solid var(--rf-line)}

/* ===== 顶栏的演示场景入口 ===== */
.utility{position:relative;z-index:30}
.utility .demo-panel>summary{min-height:36px;padding:0 12px;font-size:14px;color:var(--rf-text-2)}
.utility .demo-body{right:0}
.controls[hidden],#range-field[hidden],.sample-picker[hidden]{display:none!important}
