/* ═══ 知识建设中心 — Knowledge Construction Center ═══ */
:root {
  --bg: #F5F7FA; --panel: #ffffff; --panel-alt: #f9fafb; --panel-hover: #f1f5f9;
  --line: #e2e8f0; --line-strong: #cbd5e1;
  --text: #1a1a2e; --text-secondary: #475569; --muted: #64748b;
  --accent: #0ea5e9; --accent-strong: #0284c7; --accent-soft: rgba(14,165,233,0.08);
  --purple: #8b5cf6; --purple-soft: rgba(139,92,246,0.1);
  --success: #10b981; --success-soft: rgba(16,185,129,0.1);
  --warning: #f59e0b; --warning-soft: rgba(245,158,11,0.1);
  --danger: #ef4444; --danger-soft: rgba(239,68,68,0.1);
  --cyan: #06b6d4; --cyan-soft: rgba(6,182,212,0.1);
  --orange: #f97316; --orange-soft: rgba(249,115,22,0.1);
  --header-bg: #1B2A4A; --header-border: #2d3f63;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.04); --shadow-md: 0 2px 8px rgba(0,0,0,0.06);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.1);
  --radius-lg: 16px; --radius: 12px; --radius-md: 10px; --radius-sm: 8px; --radius-xs: 6px;
  --font: ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,'Microsoft YaHei',sans-serif;
  --mono: ui-monospace,'JetBrains Mono','Fira Code',Consolas,monospace;
}
[data-theme="dark"] {
  --bg: #0f172a; --panel: #1e293b; --panel-alt: #1a2332; --panel-hover: #1e2a3c;
  --line: #334155; --line-strong: #475569;
  --text: #e2e8f0; --text-secondary: #94a3b8; --muted: #64748b;
  --accent-soft: rgba(14,165,233,0.15);
  --header-bg: #0c1222; --header-border: #1e293b;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.2); --shadow-md: 0 2px 8px rgba(0,0,0,0.3);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.4);
}
*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; }
body { min-height: 100vh; background: var(--bg); color: var(--text); font: 14px/1.6 var(--font); transition: background 0.2s, color 0.2s; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
button, input, select, textarea { font: inherit; color: inherit; }

/* ── Skeleton Loading ── */
.skeleton { animation: pulse 2s cubic-bezier(0.4,0,0.6,1) infinite; background-color: var(--line); border-radius: 6px; min-height: 24px; }
.skeleton-text { height: 1em; width: 60%; border-radius: 4px; }
.skeleton-card { height: 80px; border-radius: var(--radius); }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.5; } }

/* ── Header ── */
.app-header { background: var(--header-bg); border-bottom: 1px solid var(--header-border); position: sticky; top: 0; z-index: 100; box-shadow: 0 2px 12px rgba(0,0,0,0.15); }
.header-inner { max-width: 1440px; margin: 0 auto; padding: 0 1.5rem; display: flex; align-items: center; justify-content: space-between; height: 56px; }
.header-brand { display: flex; align-items: center; gap: 0.625rem; color: #fff; flex-shrink: 0; }
.brand-icon { width: 28px; height: 28px; border-radius: 7px; background: linear-gradient(135deg,var(--accent),var(--purple)); display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 800; font-size: 11px; }
.brand-title { font-size: 1.0625rem; font-weight: 700; letter-spacing: 0; }
.brand-subtitle { font-size: 0.75rem; color: rgba(255,255,255,0.5); font-weight: 500; letter-spacing: 0; margin-left: 0.25rem; padding-left: 0.625rem; border-left: 1px solid rgba(255,255,255,0.15); }
.online-status { display: inline-flex; align-items: center; gap: 4px; font-size: 0.7rem; margin-left: 0.75rem; padding: 2px 8px; border-radius: 10px; background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.7); }
.online-dot { width: 7px; height: 7px; border-radius: 50%; transition: background 0.3s; }
.online-dot.online { background: #22c55e; box-shadow: 0 0 4px rgba(34,197,94,0.5); }
.online-dot.offline { background: #ef4444; box-shadow: 0 0 4px rgba(239,68,68,0.5); }
.hamburger { display: none; background: none; border: none; color: rgba(255,255,255,0.8); cursor: pointer; padding: 0.25rem; }
.header-nav { display: flex; gap: 0.25rem; }
.nav-tab { display: inline-flex; align-items: center; gap: 0.375rem; padding: 0.5rem 0.875rem; font-size: 0.8125rem; font-weight: 500; color: rgba(255,255,255,0.6); background: transparent; border: none; border-radius: var(--radius-sm); cursor: pointer; transition: all 0.2s; box-shadow: none; }
.nav-tab:hover { color: rgba(255,255,255,0.9); background: rgba(255,255,255,0.08); box-shadow: none; }
.nav-tab.active { color: #fff; background: rgba(255,255,255,0.12); }
.nav-tab svg { flex-shrink: 0; }
.theme-toggle { display: inline-flex; align-items: center; justify-content: center; background: none; border: 1px solid rgba(255,255,255,0.2); border-radius: 50%; width: 30px; height: 30px; padding: 0; cursor: pointer; margin-left: 0.5rem; color: rgba(255,255,255,0.8); transition: all 0.2s; box-shadow: none; }
.theme-toggle:hover { background: rgba(255,255,255,0.1); box-shadow: none; }
.theme-toggle .icon-moon { display: none; }
[data-theme="dark"] .theme-toggle .icon-moon { display: block; }
[data-theme="dark"] .theme-toggle .icon-sun { display: none; }

/* ── Edit Staging Panel ── */
.staging-panel { position: fixed; bottom: 1rem; right: 1rem; width: 320px; max-height: 400px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg); z-index: 200; display: none; flex-direction: column; }
.staging-panel.open { display: flex; }
.staging-header { display: flex; align-items: center; justify-content: space-between; padding: 0.75rem 1rem; border-bottom: 1px solid var(--line); font-size: 0.85rem; font-weight: 600; }
.staging-body { overflow-y: auto; flex: 1; padding: 0.5rem; }
.staging-item { display: flex; align-items: flex-start; gap: 0.5rem; padding: 0.4rem 0.5rem; border-radius: var(--radius-xs); font-size: 0.78rem; transition: background 0.15s; }
.staging-item:hover { background: var(--panel-alt); }
.staging-item-time { color: var(--muted); font-family: var(--mono); font-size: 0.68rem; white-space: nowrap; }
.staging-item-detail { flex: 1; word-break: break-word; }
.staging-footer { display: flex; gap: 0.5rem; padding: 0.5rem 1rem; border-top: 1px solid var(--line); background: var(--panel-alt); border-radius: 0 0 var(--radius) var(--radius); }
.staging-toggle { position: fixed; bottom: 1rem; right: 1rem; z-index: 199; width: 44px; height: 44px; border-radius: 50%; background: var(--accent); color: #fff; border: none; cursor: pointer; font-size: 1.2rem; box-shadow: var(--shadow-md); display: flex; align-items: center; justify-content: center; transition: transform 0.2s; }
.staging-toggle:hover { transform: scale(1.1); }
.staging-badge { position: absolute; top: -4px; right: -4px; background: var(--danger); color: #fff; font-size: 0.65rem; font-weight: 700; width: 18px; height: 18px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }

/* ── Insight Box ── */
.insight-box { background: var(--accent-soft); border-left: 3px solid var(--accent); border-radius: var(--radius-xs); padding: 0.65rem 0.85rem; font-size: 0.82rem; color: var(--text-secondary); margin-bottom: 0.75rem; }
.insight-box strong { color: var(--accent-strong); }

/* ── Main Layout ── */
.app-main { max-width: 1440px; margin: 0 auto; padding: 1.5rem; }
.tab-content { display: none; animation: fadeIn 0.2s ease; }
.tab-content.active { display: block; }
#tab-dashboard.active { display: flex; flex-direction: column; gap: 1.25rem; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* ── Card ── */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1.75rem; box-shadow: var(--shadow-md); }
.card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; }
.card-header-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: 1rem; }
.card-kicker { display: flex; align-items: center; gap: 0.375rem; color: var(--accent); font-weight: 600; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 0.375rem; }
.card-title { margin: 0; font-size: 1.375rem; font-weight: 700; color: var(--text); }

/* ── Info Card (治理中心子分区) ── */
.info-card { padding: 0.75rem 1rem; border-bottom: 1px solid var(--line); }
.info-card:last-child { border-bottom: none; }
.info-card:first-child { padding-top: 1.25rem; }
.info-card:last-child { padding-bottom: 1.25rem; }
.info-card-header { margin-bottom: 0.3rem; }

/* ── Section Header ── */
.section-header { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; padding: 0.75rem 1rem; background: var(--accent-soft); border: 1px solid var(--line); border-radius: var(--radius-sm); margin-bottom: 1rem; }
.section-header-left { display: flex; align-items: center; gap: 0.5rem; }
.section-header-left svg { color: var(--accent); flex-shrink: 0; }
.section-header h3 { margin: 0; font-size: 0.95rem; font-weight: 700; color: var(--text); }
.section-group { padding-top: 0.5rem; }

/* ── Workflow Block ── */
.wf-block { margin-top: 1rem; padding-top: 0.75rem; border-top: 1px dashed var(--line); }
.wf-block:first-of-type { margin-top: 0.5rem; padding-top: 0; border-top: none; }
.wf-block-title { font-size: 0.8rem; font-weight: 700; color: var(--accent-strong); letter-spacing: 0; text-transform: uppercase; margin-bottom: 0.4rem; }

/* ── Grid ── */
.grid-2 { display: grid; grid-template-columns: 380px 1fr; gap: 1.25rem; align-items: start; }
.grid-equal { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; align-items: start; }
.stack { display: grid; gap: 1.25rem; }

/* ── Stats ── */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 1rem; margin-bottom: 1.25rem; }
.stat-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow-md); display: flex; flex-direction: column; transition: box-shadow 0.25s, transform 0.2s; position: relative; overflow: hidden; cursor: default; }
.stat-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: linear-gradient(90deg,var(--accent),var(--purple)); opacity: 0; transition: opacity 0.25s; }
.stat-card:hover::before { opacity: 1; }
.stat-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.stat-label { font-size: 0.72rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 0.75rem; }
.stat-value { font-size: 2rem; font-weight: 700; line-height: 1.1; }

/* ── Buttons ── */
.btn { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.5rem 1rem; border-radius: var(--radius-sm); border: 1px solid var(--line-strong); background: var(--panel); cursor: pointer; font-weight: 500; font-size: 0.85rem; transition: all 0.2s; white-space: nowrap; }
.btn:hover { border-color: var(--accent); color: var(--accent); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-strong); border-color: var(--accent-strong); color: #fff; box-shadow: 0 4px 12px var(--accent-soft); }
.btn-success { background: var(--success); border-color: var(--success); color: #fff; }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-sm { padding: 0.3rem 0.65rem; font-size: 0.78rem; }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--line-strong); box-shadow: none; }
.btn-ghost:hover { background: var(--panel-alt); border-color: var(--muted); }
.btn-ghost.small { padding: 0.25rem 0.6rem; font-size: 0.78rem; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ── Form ── */
.form { display: grid; gap: 0.75rem; }
.form-group { display: grid; gap: 0.3rem; }
.form-label { font-size: 0.78rem; font-weight: 600; color: var(--muted); }
input, select, textarea { width: 100%; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); padding: 0.5rem 0.75rem; background: #fff; transition: border-color 0.2s, box-shadow 0.2s; }
[data-theme="dark"] input, [data-theme="dark"] select, [data-theme="dark"] textarea { background: var(--panel-alt); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
textarea { min-height: 5rem; resize: vertical; font-family: var(--mono); font-size: 0.82rem; }
select { cursor: pointer; }

/* ── Pill & Tag ── */
.pill { display: inline-flex; align-items: center; gap: 0.25rem; background: var(--accent-soft); color: var(--accent-strong); border-radius: 999px; padding: 0.15rem 0.6rem; font-size: 0.7rem; font-weight: 600; }
.tag { display: inline-flex; align-items: center; gap: 0.2rem; background: var(--panel-alt); border: 1px solid var(--line); border-radius: 999px; padding: 0.15rem 0.5rem; font-size: 0.7rem; color: var(--text-secondary); }
.tag-accent { background: var(--accent-soft); border-color: transparent; color: var(--accent-strong); }
.tag-success { background: var(--success-soft); border-color: transparent; color: var(--success); }
.tag-danger { background: var(--danger-soft); border-color: transparent; color: var(--danger); }
.tag-warning { background: var(--warning-soft); border-color: transparent; color: var(--warning); }
.tag-purple { background: var(--purple-soft); border-color: transparent; color: var(--purple); }
.tag-cyan { background: var(--cyan-soft); border-color: transparent; color: var(--cyan); }
.tag-orange { background: var(--orange-soft); border-color: transparent; color: var(--orange); }

/* ── Item List ── */
.list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.5rem; overflow-y: auto; overflow-x: hidden; }
.item { min-width: 0; max-width: 100%; box-sizing: border-box; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--panel-alt); padding: 0.7rem 0.85rem; cursor: pointer; transition: all 0.2s; }
.item > div { min-width: 0; max-width: 100%; }
.item:hover { border-color: var(--accent); background: var(--accent-soft); }
.item.active { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); background: var(--accent-soft); }
.item strong { display: block; margin-bottom: 0.15rem; font-size: 0.88rem; word-break: break-word; }
.meta { color: var(--muted); font-size: 0.75rem; word-break: break-word; }

/* ── Canvas / Graph Layout ── */
.canvas-card { min-height: 40rem; display: grid; grid-template-rows: auto 1fr auto; position: relative; }
.canvas-head, .canvas-foot { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.canvas-head { margin-bottom: 0.75rem; }
.canvas-foot { margin-top: 0.75rem; color: var(--muted); font-size: 0.78rem; border-top: 1px solid var(--line); padding-top: 0.75rem; }
.graph-layout { display: grid; grid-template-columns: 1fr 340px; gap: 1.25rem; height: 580px; }
.network-card { position: relative; background: var(--panel-alt); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.network-canvas { width: 100%; height: 100%; }

/* ── Enhanced Node Legend (in-canvas) ── */
.canvas-legend-float { position: absolute; top: 0.6rem; left: 0.6rem; z-index: 10; background: color-mix(in srgb, var(--panel) 94%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border: 1px solid var(--line); border-radius: var(--radius); padding: 0.6rem 0.8rem; font-size: 0.7rem; color: var(--text-secondary); box-shadow: var(--shadow-md); display: flex; flex-direction: column; align-items: flex-start; gap: 0.25rem 0; max-width: 240px; }
.canvas-legend-float .legend-title { font-size: 0.62rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin-top: 0.4rem; padding-bottom: 0.1rem; width: 100%; border-bottom: 1px dashed var(--line); }
.canvas-legend-float .legend-title:first-child { margin-top: 0; }
.canvas-legend-float .legend-sep { display: none; }
.canvas-legend-float .legend-item { display: inline-flex; align-items: center; gap: 0.4rem; white-space: nowrap; font-weight: 500; margin-right: 0.85rem; line-height: 1.7; }
.canvas-legend-float .ldot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; box-shadow: 0 0 0 2px color-mix(in srgb, var(--panel) 60%, transparent); }
.canvas-legend-float .ldiamond { width: 9px; height: 9px; transform: rotate(45deg); flex-shrink: 0; }
.canvas-legend-float .lsquare { width: 9px; height: 9px; border-radius: 2px; flex-shrink: 0; }
.canvas-legend-float .lhex { width: 11px; height: 9px; clip-path: polygon(25% 0%,75% 0%,100% 50%,75% 100%,25% 100%,0% 50%); flex-shrink: 0; }
.canvas-legend-float .lcapsule { width: 12px; height: 6px; border-radius: 3px; flex-shrink: 0; }
.canvas-legend-float .ltri { width: 0; height: 0; border-left: 5px solid transparent; border-right: 5px solid transparent; border-top: 8px solid; flex-shrink: 0; }
.canvas-legend-float .lline { width: 14px; height: 3px; border-radius: 2px; flex-shrink: 0; }
.canvas-legend-float .lline-dash { width: 18px; height: 0; border-top: 2.5px dashed; flex-shrink: 0; display: inline-block; vertical-align: middle; }
/* 交互式图例（兼作过滤器） */
.canvas-legend-float .legend-head { width: 100%; margin-bottom: 0.15rem; }
.canvas-legend-float .legend-head-title { font-size: 0.6rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--accent); }
.canvas-legend-float .legend-foot { width: 100%; }
/* OWL legend: wider max-width to fit longer labels */
#ontoCanvasLegend.canvas-legend-float { max-width: 300px; }
.canvas-legend-float .legend-group { width: 100%; }
.canvas-legend-float .legend-items { display: flex; flex-wrap: wrap; gap: 0.1rem 0; }
.canvas-legend-float .legend-filter { display: inline-flex; align-items: center; gap: 0.4rem; white-space: nowrap; font-weight: 500; font-size: 0.7rem; line-height: 1.6; margin-right: 0.7rem; padding: 0.1rem 0.25rem; border: none; background: transparent; color: var(--text-secondary); cursor: pointer; border-radius: var(--radius-xs); transition: background 0.12s, opacity 0.12s; }
.canvas-legend-float .legend-filter:hover { background: var(--accent-soft); }
.canvas-legend-float .legend-filter.off { opacity: 0.35; text-decoration: line-through; }

/* 本体查看模式标识 */
.mode-badge { display: inline-flex; align-items: center; font-size: 0.66rem; font-weight: 700; padding: 0.12rem 0.5rem; border-radius: 999px; flex-shrink: 0; white-space: nowrap; }
.mode-badge-scene { background: rgba(139,92,246,0.14); color: #7c3aed; border: 1px solid rgba(139,92,246,0.3); }
.mode-badge-file { background: rgba(14,165,233,0.12); color: var(--accent-strong); border: 1px solid rgba(14,165,233,0.3); }
.onto-mode-label { font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; color: var(--muted); margin-bottom: 0.4rem; }

/* ── Graph Sidebar Card Styles ── */
.graph-card-meta { margin-left: 1.5rem; display: flex; flex-direction: column; gap: 0.15rem; margin-top: 0.25rem; font-size: 0.72rem; color: var(--text-secondary); }
.graph-meta-row { display: inline-flex; align-items: center; gap: 0.3rem; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.graph-meta-row svg { flex-shrink: 0; opacity: 0.55; }
.graph-card-badges { margin-top: 0.3rem; margin-left: 1.5rem; display: flex; gap: 0.25rem; flex-wrap: wrap; align-items: center; }
.graph-badge { display: inline-flex; align-items: center; gap: 0.2rem; font-size: 0.65rem; font-weight: 600; padding: 0.1rem 0.4rem; border-radius: var(--radius-xs); white-space: nowrap; line-height: 1.5; }
.graph-badge-scene { background: rgba(139,92,246,0.1); color: #7c3aed; border: 1px solid rgba(139,92,246,0.2); }
.graph-badge-stat { background: rgba(14,165,233,0.08); color: var(--accent-strong); border: 1px solid rgba(14,165,233,0.18); }
.graph-badge-stat abbr { text-decoration: none; font-size: 0.58rem; opacity: 0.65; margin-left: 0.1rem; }
.graph-badge-skip { background: rgba(245,158,11,0.1); color: #b45309; border: 1px solid rgba(245,158,11,0.2); }
.graph-badge-skip abbr { text-decoration: none; font-size: 0.58rem; opacity: 0.65; margin-left: 0.1rem; }
.graph-badge-llm { background: rgba(16,185,129,0.1); color: #059669; border: 1px solid rgba(16,185,129,0.2); }
.graph-badge-heuristic { background: rgba(245,158,11,0.1); color: #b45309; border: 1px solid rgba(245,158,11,0.2); }
.graph-badge-catalog { background: rgba(6,182,212,0.1); color: #0891b2; border: 1px solid rgba(6,182,212,0.2); }
.graph-badge-err { background: rgba(239,68,68,0.1); color: #dc2626; border: 1px solid rgba(239,68,68,0.2); }
.graph-card-time { margin-left: 1.5rem; margin-top: 0.15rem; font-size: 0.66rem; color: var(--muted); }
/* 空子图（无有效实体数据）标识 */
.graph-empty { opacity: 0.55; border-left: 3px solid var(--muted); }
.graph-empty.active { opacity: 0.7; }

/* 搜索范围切换（当前画布 / 全部本体） */
.search-scope { display: inline-flex; border: 1px solid var(--line-strong); border-radius: var(--radius-xs); overflow: hidden; flex-shrink: 0; }
.search-scope .scope-btn { font-size: 0.68rem; padding: 0.22rem 0.5rem; border: none; background: var(--panel); color: var(--muted); cursor: pointer; white-space: nowrap; transition: all 0.12s; }
.search-scope .scope-btn:first-child { border-right: 1px solid var(--line); }
.search-scope .scope-btn.active { background: var(--accent); color: #fff; font-weight: 600; }
.search-scope .scope-btn:not(.active):hover { background: var(--accent-soft); color: var(--accent); }

/* 全局搜索结果下拉 */
.global-search-results { position: absolute; top: 100%; left: 0; right: 0; margin-top: 0.25rem; z-index: 30; background: var(--panel); border: 1px solid var(--line-strong); border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); max-height: 320px; overflow-y: auto; }
.global-search-results .gsr-empty { padding: 0.6rem 0.75rem; font-size: 0.78rem; color: var(--muted); text-align: center; }
.global-search-results .gsr-item { display: flex; align-items: center; gap: 0.5rem; padding: 0.45rem 0.7rem; cursor: pointer; border-bottom: 1px solid var(--line); transition: background 0.12s; }
.global-search-results .gsr-item:last-child { border-bottom: none; }
.global-search-results .gsr-item:hover { background: var(--accent-soft); }
.global-search-results .gsr-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.global-search-results .gsr-name { font-size: 0.8rem; font-weight: 600; color: var(--text); }
.global-search-results .gsr-kind { font-size: 0.66rem; color: var(--muted); background: var(--panel-alt); border-radius: 999px; padding: 0.05rem 0.4rem; flex-shrink: 0; }
.global-search-results .gsr-file { margin-left: auto; font-size: 0.68rem; color: var(--muted); font-family: var(--mono); flex-shrink: 0; }
.canvas-controls { position: absolute; bottom: 0.75rem; right: 0.75rem; display: flex; flex-direction: column; gap: 0.35rem; z-index: 5; }
.canvas-controls .icon-btn { width: 32px; height: 32px; font-size: 0.9rem; }
.canvas-hint { position: absolute; top: 0.75rem; left: 0.75rem; font-size: 0.72rem; color: var(--muted); pointer-events: none; z-index: 5; }

/* ── Canvas Toolbar (业界风格悬浮工具条) ── */
.canvas-toolbar { z-index: 8; background: color-mix(in srgb, var(--panel) 92%, transparent); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border: 1px solid var(--line); border-radius: var(--radius); padding: 0.25rem; box-shadow: var(--shadow-md); align-items: center; }
.canvas-toolbar .icon-btn { width: 30px; height: 30px; border: none; background: transparent; color: var(--text-secondary); border-radius: var(--radius-xs); }
.canvas-toolbar .icon-btn:hover { background: var(--accent-soft); color: var(--accent); }
.canvas-toolbar .icon-btn svg { display: block; }
.canvas-toolbar-sep { width: 1px; height: 18px; background: var(--line); margin: 0 0.15rem; }
.detail-close-btn { display: inline-flex; align-items: center; justify-content: center; }

/* ── Detail Column ── */
.detail-column { display: flex; flex-direction: column; gap: 1rem; overflow-y: auto; height: 100%; }
.detail-column .info-card { background: var(--panel-alt); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; display: flex; flex-direction: column; gap: 0.75rem; flex: 1; min-height: 0; overflow-y: auto; transition: box-shadow 0.2s; }
.detail-column .info-card:hover { box-shadow: var(--shadow-md); }
.detail-column .info-card-header { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--line); padding-bottom: 0.6rem; }
.detail-column .info-card-header h3 { margin: 0; font-size: 0.9rem; font-weight: 600; }
.selection-detail { font-size: 0.82rem; line-height: 1.6; }
.detail-props { display: flex; flex-direction: column; gap: 0.35rem; }
.detail-prop { display: flex; align-items: flex-start; gap: 0.5rem; padding: 0.35rem 0.5rem; background: var(--panel); border: 1px solid var(--line); border-radius: 6px; font-size: 0.82rem; }
.detail-prop-label { flex-shrink: 0; min-width: 70px; padding: 1px 6px; background: var(--accent-soft); color: var(--accent-strong); border-radius: 4px; font-weight: 600; font-size: 0.72rem; text-align: center; }
.detail-prop-value { flex: 1; word-break: break-word; }
.detail-prop-value code { font-family: var(--mono); font-size: 0.78rem; background: var(--panel-alt); padding: 1px 4px; border-radius: 3px; }
.empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.75rem; padding: 2.5rem 1.5rem; text-align: center; color: var(--muted); font-size: 0.85rem; background: var(--panel-alt); border: 1px dashed var(--line-strong); border-radius: var(--radius); }
.empty-icon { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 50%; background: var(--panel); color: var(--muted); font-size: 1.4rem; font-weight: 700; border: 1px solid var(--line); }
.empty-title { font-size: 1rem; font-weight: 600; color: var(--text); }
.empty-hint { font-size: 0.82rem; margin-top: 0.2rem; }

/* ── View Mode Switcher ── */
.view-switcher { display: flex; gap: 0.25rem; padding: 0.4rem 0.6rem; background: var(--panel-alt); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.view-btn { padding: 0.2rem 0.55rem; font-size: 0.72rem; font-weight: 600; border: 1px solid transparent; border-radius: var(--radius-xs); background: transparent; cursor: pointer; transition: all 0.15s; white-space: nowrap; color: var(--muted); }
.view-btn:hover { color: var(--text); background: var(--panel); }
.view-btn.active { color: #fff; background: var(--accent); border-color: var(--accent); }
.view-btn .vicon { margin-right: 0.2rem; font-size: 0.68rem; }

/* ── Type Filter Chips ── */
.type-filter-block { border: 1px solid var(--line); border-radius: var(--radius); padding: 0.85rem; margin-top: 0.75rem; }
.filter-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.5rem; }
.filter-header h3 { margin: 0; font-size: 0.88rem; font-weight: 600; }
.type-filters { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.type-chip { display: inline-flex; align-items: center; gap: 0.3rem; padding: 0.2rem 0.6rem; background: var(--panel-alt); border: 1px solid var(--line); border-radius: 999px; font-size: 0.75rem; cursor: pointer; user-select: none; transition: all 0.15s; }
.type-chip:hover { background: var(--line); }
.type-chip.active { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-strong); font-weight: 500; }
.type-chip .chip-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.type-chip input[type="checkbox"] { display: none; }

/* ── Graph Controls ── */
.graph-controls { background: var(--panel-alt); padding: 0.85rem; border-radius: var(--radius); border: 1px solid var(--line); margin-bottom: 0.75rem; display: flex; flex-wrap: wrap; align-items: flex-end; gap: 1rem; }
.ctrl { display: flex; flex-direction: column; gap: 0.3rem; }
.ctrl > span { font-size: 0.7rem; font-weight: 600; color: var(--muted); text-transform: uppercase; }
.ctrl-wide { flex: 1; min-width: 200px; position: relative; }
.input-icon-wrap { position: relative; display: flex; align-items: center; }
.input-icon-wrap svg { position: absolute; left: 0.75rem; color: var(--muted); }
.input-icon-wrap input { padding-left: 2.25rem !important; }
.toggles-group { display: flex; gap: 1.25rem; padding-top: 0.5rem; }
.check-ctrl { display: flex; align-items: center; gap: 0.5rem; font-size: 0.82rem; cursor: pointer; }
.check-ctrl input[type="checkbox"] { width: 1rem; height: 1rem; accent-color: var(--accent); cursor: pointer; }
.btn-row { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.btn-row.compact { gap: 0.35rem; }

/* ── Upload Zone ── */
.upload-zone { border: 2px dashed var(--line-strong); border-radius: var(--radius); padding: 2rem 1.5rem; text-align: center; cursor: pointer; transition: all 0.25s; background: var(--panel-alt); }
.upload-zone:hover, .upload-zone.dragover { border-color: var(--accent); background: var(--accent-soft); transform: translateY(-1px); }
.upload-zone .icon { font-size: 2.5rem; margin-bottom: 0.75rem; opacity: 0.7; }
.upload-zone .hint { color: var(--muted); font-size: 0.8rem; margin-top: 0.3rem; }
.upload-zone input { display: none; }

/* ── Batch Files ── */
.batch-file-list { display: grid; gap: 0.4rem; max-height: 20rem; overflow-y: auto; }
.batch-file-item { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 0.75rem; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 0.5rem 0.75rem; background: var(--panel-alt); transition: all 0.2s; }
.batch-file-item.building { border-color: var(--accent); background: var(--accent-soft); }
.batch-file-item.done { border-color: var(--success); background: var(--success-soft); }
.batch-file-item.error { border-color: var(--danger); background: var(--danger-soft); }
.batch-file-name { font-size: 0.85rem; font-weight: 500; word-break: break-all; }
.batch-file-meta { font-size: 0.72rem; color: var(--muted); }
.batch-file-status { font-size: 0.75rem; font-weight: 600; white-space: nowrap; }
.build-log { min-height: 6rem; max-height: 18rem; overflow-y: auto; background: var(--panel-alt); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 0.5rem; font-size: 0.78rem; }
[data-theme="dark"] .build-log { background: #0c1222; }
.build-log .log-success { color: var(--success); }
.build-log .log-error { color: var(--danger); }
.build-log .log-warn { color: var(--warning); }
.build-log .log-stage { color: var(--accent); font-weight: 600; }
.build-log .log-info { color: var(--text); }
.progress { height: 6px; background: var(--line); border-radius: 3px; overflow: hidden; }
.progress-bar { height: 100%; border-radius: 3px; background: linear-gradient(90deg,var(--accent),var(--purple)); transition: width 0.5s ease; }

/* ── Scene Dot ── */
.scene-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; margin-right: 0.4rem; flex-shrink: 0; }

/* ── Ontology File Tree ── */
.tree { display: grid; gap: 0.15rem; max-height: 28rem; overflow-y: auto; }
.tree-dir { font-size: 0.82rem; font-weight: 600; padding: 0.3rem 0.5rem; cursor: pointer; border-radius: var(--radius-xs); display: flex; align-items: center; gap: 0.4rem; transition: background 0.15s; }
.tree-dir:hover { background: var(--accent-soft); }
.tree-dir .arrow { transition: transform 0.2s; font-size: 0.7rem; }
.tree-dir.collapsed .arrow { transform: rotate(-90deg); }
.tree-children { padding-left: 1.2rem; }
.tree-children.collapsed { display: none; }
.tree-file { font-size: 0.8rem; padding: 0.25rem 0.5rem; cursor: pointer; border-radius: var(--radius-xs); transition: background 0.15s; display: flex; align-items: center; gap: 0.4rem; }
.tree-file:hover { background: var(--accent-soft); }
.tree-file.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.tree-file .preview-btn { margin-left: auto; color: var(--muted); cursor: pointer; opacity: 0; transition: opacity 0.15s; background: none; border: none; font-size: 0.75rem; }
.tree-file:hover .preview-btn { opacity: 1; }
.tree-file .preview-btn:hover { color: var(--accent); }
.tree-file .delete-btn { opacity: 0; transition: opacity 0.15s; }
.tree-file:hover .delete-btn { opacity: 0.5; }
.tree-file .delete-btn:hover { opacity: 1 !important; }

/* ── CRUD Toolbar Labels ── */
.crud-section-label { display: flex; align-items: center; gap: 0.4rem; padding: 0.5rem 0.75rem; font-size: 0.78rem; font-weight: 600; color: var(--text-secondary); border-bottom: 1px solid var(--line); }
.crud-section-label svg { flex-shrink: 0; }
.crud-hint { font-size: 0.72rem; color: var(--muted); font-weight: 400; margin-left: auto; }

/* ── Role Badge (知识建设中心标识) ── */
.role-badge { display: inline-flex; align-items: center; gap: 0.3rem; padding: 0.2rem 0.65rem; border-radius: 999px; font-size: 0.7rem; font-weight: 700; background: linear-gradient(135deg, rgba(14,165,233,0.12), rgba(139,92,246,0.12)); border: 1px solid rgba(14,165,233,0.25); color: var(--accent-strong); white-space: nowrap; }
.role-badge svg { flex-shrink: 0; }
[data-theme="dark"] .role-badge { background: linear-gradient(135deg, rgba(14,165,233,0.2), rgba(139,92,246,0.2)); border-color: rgba(14,165,233,0.4); color: #7dd3fc; }

/* ── Enhanced Button Transitions ── */
.btn { transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1); }
.btn-primary:active { transform: scale(0.97); }
.btn-danger:active { transform: scale(0.97); }
.icon-btn { transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1); }
.icon-btn:active { transform: scale(0.92); }

/* ── Smooth Card Interactions ── */
.stat-card { transition: box-shadow 0.25s cubic-bezier(0.4, 0, 0.2, 1), transform 0.2s cubic-bezier(0.4, 0, 0.2, 1); }
.item { transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1); }

/* ── Tab Transition Enhancement ── */
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.tab-content.active { animation: fadeIn 0.25s cubic-bezier(0.4, 0, 0.2, 1); }

/* ── Canvas Toolbar Hover Feedback ── */
.canvas-toolbar .icon-btn { position: relative; overflow: hidden; }
.canvas-toolbar .icon-btn::after { content: ''; position: absolute; inset: 0; background: var(--accent); opacity: 0; border-radius: var(--radius-xs); transition: opacity 0.15s; }
.canvas-toolbar .icon-btn:hover::after { opacity: 0.08; }

/* ── Focus Ring for Accessibility ── */
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ── Modal Backdrop Animation ── */
.modal-overlay.open { animation: overlayIn 0.2s ease; }
@keyframes overlayIn { from { opacity: 0; } to { opacity: 1; } }
.modal-card { animation: modalSlideIn 0.25s cubic-bezier(0.4, 0, 0.2, 1); }
@keyframes modalSlideIn { from { transform: translateY(12px) scale(0.97); opacity: 0; } to { transform: none; opacity: 1; } }

/* ── Ontology Source Preview Modal ── */
.source-preview { background: var(--panel-alt); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 1rem; font: 12px/1.6 var(--mono); white-space: pre-wrap; word-break: break-all; max-height: 60vh; overflow-y: auto; }
[data-theme="dark"] .source-preview { background: #0c1222; color: #93c5fd; }

/* ── Alignment Cards ── */
.align-cards { display: grid; gap: 0.75rem; }
.align-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; background: var(--panel); transition: box-shadow 0.2s; }
.align-card:hover { box-shadow: var(--shadow-md); }
.align-card-raw { font-size: 1.05rem; font-weight: 700; margin-bottom: 0.5rem; }
.align-card-iri { font-family: var(--mono); font-size: 0.72rem; color: var(--muted); word-break: break-all; margin-bottom: 0.4rem; display: flex; align-items: center; gap: 0.3rem; }
.copy-btn { cursor: pointer; color: var(--accent); border: none; background: none; padding: 0; font-size: 0.72rem; }
.align-card-tags { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-bottom: 0.5rem; }
.confidence-bar { height: 4px; border-radius: 2px; background: var(--line); margin-top: 0.5rem; overflow: hidden; }
.confidence-fill { height: 100%; border-radius: 2px; transition: width 0.3s ease; }
.align-card-alts { margin-top: 0.5rem; }
.align-card-alts summary { cursor: pointer; font-size: 0.78rem; color: var(--muted); }
.align-card-alts ul { padding-left: 1.2rem; font-size: 0.78rem; color: var(--text-secondary); margin-top: 0.3rem; }

/* ── SPARQL / 结果表 ── */
.alloc-table { width: 100%; border-collapse: collapse; font-size: 0.8rem; }
.alloc-table th { text-align: left; padding: 0.5rem 0.65rem; background: var(--panel-alt); border-bottom: 2px solid var(--line); font-weight: 600; }
.alloc-table td { padding: 0.5rem 0.65rem; border-bottom: 1px solid var(--line); }
.alloc-table tr:hover td { background: var(--accent-soft); }

/* ── Mode Banner（产品推荐无匹配提示） ── */
.mode-banner { display: flex; align-items: center; gap: 0.75rem; border-radius: var(--radius); padding: 0.85rem 1.1rem; margin-bottom: 0.75rem; font-size: 0.88rem; }
.mode-banner.mode-empty { background: var(--danger-soft); border: 1px solid var(--danger); color: var(--danger); }
.mode-icon { font-size: 1.5rem; flex-shrink: 0; }

.output { min-height: 6rem; max-height: 20rem; overflow: auto; white-space: pre-wrap; word-break: break-all; font: 12px/1.6 var(--mono); background: var(--panel-alt); color: var(--accent-strong); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; }
[data-theme="dark"] .output { background: #0c1222; color: #93c5fd; }
.status-row { display: flex; justify-content: space-between; align-items: center; gap: 1rem; border: 1px solid var(--line); background: var(--panel-alt); border-radius: var(--radius-sm); padding: 0.5rem 0.75rem; font-size: 0.82rem; }
.status-row .label { color: var(--muted); font-weight: 500; }
.status-row .value { text-align: right; word-break: break-word; font-weight: 600; }

/* ── Rejected Entity/Relation Analysis ── */
.rejected-block { margin-top: 1rem; }
.rejected-tabs { display: flex; gap: 0.5rem; margin-bottom: 0.75rem; }
.rejected-tab { padding: 0.35rem 0.75rem; border-radius: 999px; font-size: 0.78rem; font-weight: 500; background: var(--panel-alt); border: 1px solid var(--line); cursor: pointer; transition: all 0.15s; }
.rejected-tab.active { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-strong); }
.rejected-item { display: flex; align-items: flex-start; gap: 0.75rem; padding: 0.5rem 0.75rem; border: 1px solid var(--line); border-radius: var(--radius-sm); margin-bottom: 0.4rem; background: var(--panel-alt); font-size: 0.82rem; }
.rejected-reason { font-size: 0.72rem; color: var(--danger); margin-top: 0.2rem; }
.rejected-actions { margin-left: auto; display: flex; gap: 0.35rem; flex-shrink: 0; }

/* ── Icon Button ── */
.icon-btn { width: 36px; height: 36px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--panel); display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all 0.2s; font-size: 1rem; }
.icon-btn:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }

/* ── Modal ── */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.45); z-index: 300; display: none; align-items: center; justify-content: center; backdrop-filter: blur(3px); }
.modal-overlay.open { display: flex; }
.modal-card { background: var(--panel); border-radius: var(--radius); box-shadow: var(--shadow-lg); width: min(640px,92vw); max-height: 85vh; overflow: hidden; display: flex; flex-direction: column; animation: modalIn 0.25s ease; }
@keyframes modalIn { from { transform: scale(0.95); opacity: 0; } }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.25rem; border-bottom: 1px solid var(--line); }
.modal-header h3 { margin: 0; font-size: 1rem; font-weight: 600; }
.modal-close { background: none; border: none; font-size: 1.5rem; color: var(--muted); cursor: pointer; padding: 0; line-height: 1; box-shadow: none; }
.modal-close:hover { color: var(--text); }
.modal-body { padding: 1.25rem; overflow-y: auto; flex: 1; }
.modal-footer { display: flex; justify-content: flex-end; gap: 0.5rem; padding: 0.75rem 1.25rem; border-top: 1px solid var(--line); background: var(--panel-alt); }

/* ── Context Menu ── */
.ctx-menu { position: fixed; z-index: 250; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); min-width: 180px; padding: 0.35rem 0; display: none; }
.ctx-menu.open { display: block; }
.ctx-menu-item { padding: 0.45rem 0.85rem; cursor: pointer; font-size: 0.82rem; display: flex; align-items: center; gap: 0.5rem; transition: background 0.15s; }
.ctx-menu-item:hover { background: var(--accent-soft); color: var(--accent); }
.ctx-menu-sep { height: 1px; background: var(--line); margin: 0.3rem 0; }

/* ── Toast ── */
.toast-container { position: fixed; top: 1rem; right: 1rem; z-index: 1000; display: flex; flex-direction: column; gap: 0.5rem; }
.toast { padding: 0.7rem 1rem; border-radius: var(--radius-sm); background: var(--panel); border: 1px solid var(--line); box-shadow: var(--shadow-lg); font-size: 0.82rem; display: flex; align-items: center; gap: 0.5rem; animation: slideIn 0.3s ease; max-width: 360px; }
.toast.success { border-left: 3px solid var(--success); }
.toast.error { border-left: 3px solid var(--danger); }
.toast.info { border-left: 3px solid var(--accent); }
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } }

/* ── Spinner ── */
.spinner { display: inline-block; width: 18px; height: 18px; border: 2px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--muted); }

/* ── Responsive ── */
@media (max-width: 1100px) {
  .grid-2, .grid-equal { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2,1fr); }
  .graph-layout { grid-template-columns: 1fr; height: auto; }
  .network-card { height: 450px; }
}
@media (max-width: 768px) {
  .hamburger { display: block; }
  .header-nav { display: none; position: absolute; top: 56px; left: 0; right: 0; background: var(--header-bg); flex-direction: column; padding: 0.5rem; border-bottom: 1px solid var(--header-border); box-shadow: var(--shadow-md); }
  .header-nav.open { display: flex; }
  .header-inner { padding: 0 1rem; }
  .brand-subtitle { display: none; }
  .nav-tab { padding: 0.375rem 0.5rem; font-size: 0.75rem; }
  .nav-tab svg { display: none; }
  .app-main { padding: 1rem; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .card { padding: 1.25rem; }
  .staging-panel { width: 280px; }
  .e2e-flow { flex-wrap: wrap; }
  .e2e-stage { min-width: 140px; }
}

/* ── E2E Pipeline Flow ── */
.e2e-card { overflow: visible; }
.e2e-flow { display: flex; align-items: stretch; gap: 0.5rem; overflow-x: auto; padding-bottom: 0.5rem; }
.e2e-stage { flex: 1; min-width: 170px; background: var(--panel-alt); border: 1px solid var(--line); border-radius: var(--radius); padding: 0.85rem; transition: border-color 0.2s, box-shadow 0.2s; }
.e2e-stage:hover { border-color: var(--accent); box-shadow: var(--shadow-md); }
.e2e-stage-head { display: flex; align-items: center; gap: 0.5rem; font-weight: 700; font-size: 0.88rem; margin-bottom: 0.4rem; }
.e2e-idx { width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 0.72rem; font-weight: 700; flex-shrink: 0; }
.e2e-stage-body { font-size: 0.78rem; color: var(--text-secondary); line-height: 1.5; }
.e2e-stage-body code { background: var(--accent-soft); color: var(--accent-strong); padding: 1px 5px; border-radius: 3px; font-size: 0.72rem; font-family: var(--mono); }
.e2e-muted { color: var(--muted); font-size: 0.72rem; display: block; margin-top: 0.25rem; }
.e2e-arrow { color: var(--accent); font-size: 1.4rem; font-weight: 700; display: flex; align-items: center; flex-shrink: 0; }
.e2e-hint { margin-top: 1rem; font-size: 0.78rem; color: var(--muted); padding: 0.65rem 0.85rem; background: var(--accent-soft); border-radius: var(--radius-sm); border-left: 3px solid var(--accent); }

/* ── SPARQL Result Table Enhancement ── */
.output table.alloc-table { margin-top: 0.5rem; }
.output table.alloc-table td { max-width: 300px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── Collapsible Card ── */
.card-body.collapsible { overflow: hidden; transition: max-height 0.35s ease, opacity 0.25s ease, padding 0.3s ease; max-height: 3000px; opacity: 1; }
.card-body.collapsible.collapsed { max-height: 0; opacity: 0; padding-top: 0; padding-bottom: 0; margin: 0; overflow: hidden; }
.collapse-toggle { transition: transform 0.2s ease; font-size: 0.72rem !important; min-width: 28px; text-align: center; }
.collapse-toggle.rotated { transform: rotate(-90deg); }

/* ── Code Output (Black Box) ── */
.output.code-output { background: #1a1a2e; color: #a5d6ff; border: 1px solid #2d3748; font: 12px/1.7 var(--mono); border-radius: var(--radius); padding: 1rem; overflow: auto; white-space: pre-wrap; word-break: break-all; position: relative; }
.output.code-output.collapsed { max-height: 0; min-height: 0; padding: 0; border: none; overflow: hidden; }
.output.code-output table { color: #a5d6ff; }
.output.code-output table th { background: #24243e; border-bottom-color: #3d4466; color: #7dd3fc; }
.output.code-output table td { border-bottom-color: #2d3748; }
.output.code-output table tr:hover td { background: rgba(14,165,233,0.08); }
[data-theme="dark"] .output.code-output { background: #0a0f1a; border-color: #1e293b; color: #93c5fd; }

/* ── Dark mode ontology canvas node fixes ── */
[data-theme="dark"] .network-canvas { background: var(--panel-alt); }

/* ── Code Output Wrapper & Toolbar ── */
.code-output-wrapper { position: relative; border-radius: var(--radius); overflow: hidden; }
.code-output-wrapper > .code-output { border-radius: 0 0 var(--radius) var(--radius); border-top: none; }
.code-output-toolbar { display: flex; align-items: center; gap: 0.35rem; padding: 0.35rem 0.6rem; background: #24243e; border: 1px solid #2d3748; border-bottom: none; border-radius: var(--radius) var(--radius) 0 0; }
[data-theme="dark"] .code-output-toolbar { background: #0f172a; border-color: #1e293b; }
.code-toolbar-btn { display: inline-flex; align-items: center; gap: 0.25rem; padding: 0.2rem 0.5rem; border: 1px solid #3d4466; border-radius: var(--radius-xs); background: transparent; color: #94a3b8; font-size: 0.72rem; cursor: pointer; transition: all 0.15s; white-space: nowrap; }
.code-toolbar-btn:hover { background: rgba(14,165,233,0.15); color: #7dd3fc; border-color: var(--accent); }

/* ── Enhanced Canvas Styles ── */
.network-canvas { background: linear-gradient(135deg, var(--panel-alt) 0%, var(--panel) 100%); transition: background 0.3s; }
[data-theme="dark"] .network-canvas { background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%); }
.canvas-hint { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.75rem; padding: 3rem 1.5rem; text-align: center; color: var(--muted); font-size: 0.88rem; pointer-events: none; z-index: 5; position: absolute; inset: 0; }
.canvas-hint::before { content: '\2194'; font-size: 2.5rem; opacity: 0.4; }
.graph-controls { background: var(--panel-alt); padding: 0.65rem 0.85rem; border-radius: var(--radius-sm); border: 1px solid var(--line); margin-bottom: 0.5rem; display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0.75rem; box-shadow: var(--shadow-sm); }

/* ── Enhanced Detail Panel ── */
.detail-column { box-shadow: -4px 0 16px rgba(0,0,0,0.06); transition: box-shadow 0.2s; }
[data-theme="dark"] .detail-column { box-shadow: -4px 0 16px rgba(0,0,0,0.3); }
.detail-column .info-card { border: none; border-radius: 0; background: transparent; }

/* ── Graph Scene Filter ── */
select#graphSceneFilter, select#ontologySceneSelect { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 0.6rem center; padding-right: 2rem; appearance: none; }

/* ── Node Tooltip ── */
.vis-tooltip { background: var(--panel) !important; border: 1px solid var(--line) !important; border-radius: var(--radius-xs) !important; padding: 0.4rem 0.65rem !important; font-family: var(--font) !important; font-size: 0.78rem !important; color: var(--text) !important; box-shadow: var(--shadow-md) !important; max-width: 320px !important; word-break: break-word !important; }

/* ── PLC IO 需求表单 ── */
.io-req-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.85rem; }
.io-req-col { background: var(--panel-alt); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 0.85rem; }
.io-req-col-title { font-size: 0.82rem; font-weight: 700; color: var(--text-secondary); margin-bottom: 0.65rem; padding-bottom: 0.4rem; border-bottom: 1px solid var(--line); }
.io-req-field { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; margin-bottom: 0.5rem; font-size: 0.82rem; color: var(--text-secondary); }
.io-req-field:last-child { margin-bottom: 0; }
.io-req-field input { width: 90px; padding: 0.35rem 0.5rem; border: 1px solid var(--line-strong); border-radius: var(--radius-xs); background: var(--panel); color: var(--text); font-size: 0.85rem; text-align: center; }
.io-req-field input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

/* ── PLC 产品结果卡片（优化版 v2） ── */
.product-card { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; box-shadow: 0 2px 12px rgba(0,0,0,0.08); background: var(--panel); }
.product-card-head { display: flex; align-items: center; justify-content: space-between; padding: 1.1rem 1.4rem; background: linear-gradient(135deg, var(--accent-soft), var(--purple-soft)); border-bottom: 1px solid var(--line); gap: 0.75rem; }
.product-title-group { display: flex; flex-direction: column; gap: 0.25rem; min-width: 0; }
.product-name { font-size: 1.15rem; font-weight: 800; color: var(--text); letter-spacing: 0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.product-model { font-size: 0.8rem; color: var(--muted); font-family: var(--mono); }
.product-badges { display: flex; align-items: center; gap: 0.4rem; flex-shrink: 0; }
.product-card-body { padding: 1.2rem 1.4rem; display: flex; flex-direction: column; gap: 1rem; }
.product-attr-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.6rem 1.2rem; padding: 0.65rem 0.9rem; background: var(--panel-alt); border-radius: 8px; border: 1px solid var(--line); }
.attr-item { display: flex; flex-direction: column; gap: 0.2rem; }
.attr-label { font-size: 0.72rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.03em; }
.attr-value { font-size: 0.9rem; font-weight: 600; color: var(--text); }
.product-section { padding-top: 0.75rem; border-top: 1px solid var(--line); }
.product-section:first-child { border-top: none; padding-top: 0; }
.section-label { font-size: 0.75rem; font-weight: 700; color: var(--accent-strong); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 0.5rem; display: flex; align-items: center; gap: 0.35rem; }
.section-label::before { content: ''; display: inline-block; width: 3px; height: 14px; background: var(--accent); border-radius: 2px; }
.section-text { font-size: 0.85rem; color: var(--text-secondary); line-height: 1.7; }
.io-spec-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }
.io-spec-item { display: flex; flex-direction: column; gap: 0.35rem; padding: 0.7rem 0.9rem; background: var(--panel-alt); border: 1px solid var(--line); border-radius: 8px; transition: border-color 0.15s; }
.io-spec-item:hover { border-color: var(--accent); }
.io-spec-name { font-size: 0.78rem; font-weight: 700; color: var(--text); display: flex; align-items: center; gap: 0.35rem; }
.io-spec-name .io-icon { font-size: 0.7rem; opacity: 0.6; }
.io-spec-detail { display: flex; flex-direction: column; gap: 0.2rem; }
.io-spec-ch { font-size: 0.8rem; font-family: var(--mono); color: var(--accent); font-weight: 600; letter-spacing: 0.02em; }
.io-spec-count { font-size: 1rem; font-weight: 800; color: var(--text); }
.io-spec-encoder { background: linear-gradient(135deg, #fef3c7, #fde68a); border-color: #f59e0b; }
.io-spec-encoder .io-spec-name { color: #92400e; }
.io-spec-encoder .io-spec-count { color: #92400e; }
.io-spec-encoder .io-spec-ch { color: #92400e; }
@media (max-width: 640px) { .io-spec-grid, .product-attr-grid { grid-template-columns: 1fr; } }

/* ── 对齐结果卡片（重设计） ── */
.align-card { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 0.85rem; background: var(--panel); box-shadow: var(--shadow-sm); transition: box-shadow 0.2s, transform 0.15s; }
.align-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.align-card-head { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; margin-bottom: 0.5rem; }
.align-card-input { font-size: 0.9rem; font-weight: 600; color: var(--text); }
.align-card-input-label { font-size: 0.72rem; font-weight: 500; color: var(--muted); margin-right: 0.25rem; }
.align-status { font-size: 0.72rem; font-weight: 700; padding: 0.15rem 0.5rem; border-radius: 999px; white-space: nowrap; }
.align-card-matched { font-size: 0.8rem; color: var(--text-secondary); margin-bottom: 0.5rem; }
.align-card-matched strong { color: var(--accent-strong); }
.align-src { font-size: 0.68rem; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 0.05rem 0.4rem; margin-left: 0.3rem; }
.align-card-tags { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-bottom: 0.5rem; }
.align-card-iri-row { display: flex; align-items: center; gap: 0.5rem; padding: 0.45rem 0.55rem; background: var(--panel-alt); border: 1px solid var(--line); border-radius: var(--radius-xs); margin-bottom: 0.5rem; }
.align-iri-label { font-size: 0.68rem; font-weight: 700; color: var(--muted); flex-shrink: 0; }
.align-iri-value { font-family: var(--mono); font-size: 0.74rem; color: var(--accent); flex: 1; overflow-x: auto; white-space: nowrap; word-break: break-all; }
.align-copy-btn { flex-shrink: 0; font-size: 0.72rem; }
.align-conf-row { display: flex; align-items: center; gap: 0.6rem; }
.align-conf-row .confidence-bar { flex: 1; }
.align-conf-pct { font-size: 0.8rem; font-weight: 700; white-space: nowrap; }
.align-card-actions { margin-top: 0.6rem; }
.align-card-alts { margin-top: 0.5rem; font-size: 0.78rem; }
.align-card-alts summary { cursor: pointer; color: var(--muted); }
.align-card-alts ul { margin: 0.4rem 0 0; padding-left: 1.1rem; }
.align-card-alts li { margin-bottom: 0.2rem; }

/* 返回对齐结果浮动按钮（定位图谱后出现在图谱页） */
.back-to-align { position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 60; box-shadow: var(--shadow-lg); border-radius: 999px; padding: 0.5rem 1rem; }

/* ── 治理中心 ── */
.doc-format-guide { margin-bottom: 0.75rem; padding: 0.75rem; background: var(--panel-alt); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.doc-format-title { display: flex; align-items: center; gap: 0.4rem; font-weight: 700; font-size: 0.85rem; margin-bottom: 0.5rem; color: var(--text-secondary); }
.doc-format-title svg { color: var(--accent); flex-shrink: 0; }
.doc-format-list { display: grid; gap: 0.35rem; font-size: 0.78rem; }
.doc-format-row { display: flex; align-items: center; gap: 0.5rem; padding: 0.35rem 0.5rem; border: 1px solid var(--line); border-radius: var(--radius-xs); background: var(--panel); transition: border-color 0.15s; }
.doc-format-row:hover { border-color: var(--accent); }
.gov-section { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 0.75rem; margin-bottom: 0.85rem; background: var(--panel-alt); }
.gov-section:last-child { margin-bottom: 0; }
.gov-section-head { display: flex; align-items: center; justify-content: space-between; font-size: 0.85rem; font-weight: 700; color: var(--text-secondary); margin-bottom: 0.6rem; }
.gov-summary { font-size: 0.8rem; color: var(--muted); margin-bottom: 0.5rem; line-height: 1.5; }
.gov-group { margin-top: 0.6rem; }
.gov-group-title { font-size: 0.75rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 0.4rem; }
.gov-item { border: 1px solid var(--line); border-radius: var(--radius-xs); padding: 0.55rem 0.65rem; margin-bottom: 0.45rem; background: var(--panel); }
.gov-item:last-child { margin-bottom: 0; }
.gov-item-title { font-size: 0.84rem; font-weight: 600; color: var(--text); display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; }
.gov-count { font-size: 0.72rem; font-weight: 700; color: var(--accent); background: var(--accent-soft); border-radius: 999px; padding: 0.05rem 0.45rem; }
.gov-item-detail { font-size: 0.76rem; color: var(--muted); margin-top: 0.3rem; line-height: 1.5; }
.gov-item-detail code { font-family: var(--mono); color: var(--accent); }
.gov-item-actions { margin-top: 0.5rem; display: flex; gap: 0.4rem; flex-wrap: wrap; }

/* ── 治理总览卡片 ── */
.gov-overview-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-bottom: 0.5rem; }
.gov-overview-card { border: 2px solid var(--line); border-radius: var(--radius-md); padding: 1.25rem 1rem; text-align: center; cursor: pointer; transition: all 0.2s ease; background: var(--panel); }
.gov-overview-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.gov-overview-skip { border-color: rgba(139, 92, 246, 0.3); }
.gov-overview-skip:hover { border-color: rgba(139, 92, 246, 0.6); background: rgba(139, 92, 246, 0.04); }
.gov-overview-miss { border-color: rgba(245, 158, 11, 0.3); }
.gov-overview-miss:hover { border-color: rgba(245, 158, 11, 0.6); background: rgba(245, 158, 11, 0.04); }
.gov-overview-gap { border-color: rgba(239, 68, 68, 0.3); }
.gov-overview-gap:hover { border-color: rgba(239, 68, 68, 0.6); background: rgba(239, 68, 68, 0.04); }
.gov-overview-recommend { border-color: rgba(6, 182, 212, 0.3); }
.gov-overview-recommend:hover { border-color: rgba(6, 182, 212, 0.6); background: rgba(6, 182, 212, 0.04); }
.gov-overview-icon { font-size: 1.6rem; margin-bottom: 0.4rem; display: flex; align-items: center; justify-content: center; }
.gov-overview-icon svg { opacity: 0.7; }
.gov-overview-count { font-size: 2rem; font-weight: 800; line-height: 1; margin-bottom: 0.3rem; }
.gov-overview-skip .gov-overview-count { color: var(--purple); }
.gov-overview-miss .gov-overview-count { color: var(--warning); }
.gov-overview-gap .gov-overview-count { color: var(--danger); }
.gov-overview-recommend .gov-overview-count { color: var(--cyan); }
.gov-overview-label { font-size: 0.88rem; font-weight: 700; color: var(--text); margin-bottom: 0.2rem; }
.gov-overview-hint { font-size: 0.72rem; color: var(--muted); }
.gov-section-desc { font-size: 0.82rem; color: var(--muted); line-height: 1.6; margin-bottom: 1rem; padding: 0.6rem 0.75rem; background: var(--panel-alt); border-radius: var(--radius-xs); border-left: 3px solid var(--accent); }

/* ── 小标识标签(inline hint) ── */
.hint-tag { display: inline-block; font-size: 0.72rem; font-weight: 600; padding: 1px 6px; border-radius: 4px; vertical-align: middle; line-height: 1.4; white-space: nowrap; }
.hint-tag-info { background: var(--accent-soft); color: var(--accent); }
.hint-tag-warn { background: var(--warning-soft); color: var(--warning); }
.hint-tag-ok { background: var(--success-soft); color: var(--success); }
.hint-tag-err { background: var(--danger-soft); color: var(--danger); }

/* ── 信号类型选择按钮 ── */
.sig-type-btn { background: var(--panel-alt); color: var(--text-secondary); border: 1px solid var(--line); border-radius: var(--radius-xs); cursor: pointer; transition: all 0.15s ease; }
.sig-type-btn:hover { border-color: var(--accent); color: var(--accent); }
.sig-type-btn.active { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); font-weight: 600; }

/* ── 预览切换高亮 ── */
.btn-active { box-shadow: 0 0 0 2px var(--accent); border-color: var(--accent) !important; font-weight: 600; }

@media (max-width: 640px) {
  .gov-overview-grid { grid-template-columns: 1fr; }
}

/* ── 详情面板·相邻节点导航（Bloom Inspector 范式） ── */
.neighbor-section { margin-top: 0.75rem; padding-top: 0.65rem; border-top: 1px solid var(--line); }
.neighbor-title { font-size: 0.72rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 0.5rem; display: flex; align-items: center; gap: 0.4rem; }
.neighbor-count { font-size: 0.68rem; font-weight: 700; color: var(--accent); background: var(--accent-soft); border-radius: 999px; padding: 0.05rem 0.45rem; }
.neighbor-chips { display: flex; flex-direction: column; gap: 0.35rem; }
.neighbor-chip { display: flex; align-items: center; gap: 0.4rem; width: 100%; text-align: left; padding: 0.4rem 0.55rem; border: 1px solid var(--line); border-radius: var(--radius-xs); background: var(--panel); color: var(--text); font-size: 0.78rem; cursor: pointer; transition: all 0.15s; }
.neighbor-chip:hover { border-color: var(--accent); background: var(--accent-soft); transform: translateX(2px); }
.neighbor-chip .nb-dir { color: var(--accent); font-weight: 700; flex-shrink: 0; }
.neighbor-chip .nb-rel { margin-left: auto; font-size: 0.68rem; color: var(--muted); background: var(--panel-alt); border-radius: 999px; padding: 0.05rem 0.4rem; flex-shrink: 0; }

/* ══ MCP 能力服务卡片（服务 Tab）══ */
.mcp-intro { font-size: 0.82rem; line-height: 1.65; color: var(--text-secondary); margin: 0 0 0.9rem; padding: 0.65rem 0.8rem; background: var(--panel-alt); border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: var(--radius-sm); }
.mcp-intro code { font-family: var(--mono); font-size: 0.78rem; background: var(--accent-soft); color: var(--accent-strong); padding: 0.05rem 0.3rem; border-radius: 4px; }

/* 连接信息条 */
.mcp-conn { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0.5rem; margin-bottom: 0.4rem; }
.mcp-conn-item { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; border: 1px solid var(--line); background: var(--panel-alt); border-radius: var(--radius-sm); padding: 0.45rem 0.7rem; font-size: 0.8rem; }
.mcp-conn-k { color: var(--muted); font-weight: 500; flex-shrink: 0; }
.mcp-conn-v { text-align: right; font-weight: 600; word-break: break-all; display: inline-flex; align-items: center; gap: 0.35rem; }
.mcp-conn-v code { font-family: var(--mono); font-size: 0.76rem; color: var(--accent-strong); font-weight: 600; }
.mcp-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; display: inline-block; }
.mcp-dot.on { background: var(--success); box-shadow: 0 0 0 3px var(--success-soft); }
.mcp-dot.off { background: var(--warning); box-shadow: 0 0 0 3px var(--warning-soft); }

/* 区块小标题 */
.mcp-subhead { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; margin: 1.1rem 0 0.5rem; font-size: 0.82rem; font-weight: 700; color: var(--text); }
.mcp-subhead > span { display: inline-flex; align-items: center; gap: 0.35rem; }
.mcp-reg-hint { font-size: 0.76rem; color: var(--muted); margin-bottom: 0.4rem; }
.mcp-reg-hint code { font-family: var(--mono); font-size: 0.72rem; background: var(--panel-alt); padding: 0.05rem 0.3rem; border-radius: 4px; color: var(--text-secondary); }

/* 能力大类网格 */
.mcp-cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(158px, 1fr)); gap: 0.6rem; }
.mcp-cat-card { --cc: var(--accent); --ccs: var(--accent-soft); text-align: left; cursor: pointer; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--panel); padding: 0.6rem 0.7rem; transition: all 0.16s ease; border-top: 3px solid var(--cc); }
.mcp-cat-card:hover { background: var(--ccs); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.mcp-cat-card.active { background: var(--ccs); border-color: var(--cc); box-shadow: 0 0 0 1px var(--cc); }
.mcp-cat-top { display: flex; align-items: center; justify-content: space-between; gap: 0.4rem; }
.mcp-cat-name { font-size: 0.86rem; font-weight: 700; color: var(--text); }
.mcp-cat-count { font-size: 0.72rem; font-weight: 700; color: var(--cc); background: var(--ccs); border-radius: 999px; padding: 0.05rem 0.45rem; flex-shrink: 0; }
.mcp-cat-en { font-size: 0.66rem; color: var(--muted); font-family: var(--mono); margin-top: 0.1rem; letter-spacing: 0.02em; }
.mcp-cat-sum { font-size: 0.72rem; color: var(--text-secondary); line-height: 1.45; margin-top: 0.35rem; }

/* 工具清单 */
.mcp-tool-wrap { max-height: 30rem; overflow: auto; display: flex; flex-direction: column; gap: 0.9rem; padding-right: 0.2rem; }
.mcp-tool-group { display: flex; flex-direction: column; gap: 0.4rem; }
.mcp-tool-grouphead { display: flex; align-items: center; gap: 0.4rem; font-size: 0.78rem; font-weight: 700; padding-bottom: 0.25rem; border-bottom: 1px dashed var(--line); }
.mcp-tool-groupcount { font-size: 0.68rem; font-weight: 700; color: var(--muted); background: var(--panel-alt); border-radius: 999px; padding: 0.02rem 0.4rem; }
.mcp-tool-row { border: 1px solid var(--line); background: var(--panel-alt); border-radius: var(--radius-sm); padding: 0.5rem 0.65rem; transition: border-color 0.15s; }
.mcp-tool-row:hover { border-color: var(--line-strong); }
.mcp-tool-head { display: flex; align-items: center; gap: 0.5rem; }
.mcp-tool-name { --cc: var(--accent); font-family: var(--mono); font-size: 0.8rem; font-weight: 700; color: var(--cc); }
.mcp-tool-sum { font-size: 0.76rem; color: var(--text-secondary); line-height: 1.5; margin-top: 0.25rem; }
.mcp-tool-params { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-top: 0.35rem; }
.mcp-param { font-family: var(--mono); font-size: 0.68rem; color: var(--muted); background: var(--panel); border: 1px solid var(--line); border-radius: 4px; padding: 0.02rem 0.35rem; }
.mcp-rw { font-size: 0.66rem; font-weight: 700; padding: 0.05rem 0.4rem; border-radius: 4px; flex-shrink: 0; margin-left: auto; }
.mcp-rw-read { color: var(--success); background: var(--success-soft); }
.mcp-rw-write { color: var(--warning); background: var(--warning-soft); }
.mcp-rw-danger { color: var(--danger); background: var(--danger-soft); }
.mcp-empty { font-size: 0.82rem; color: var(--muted); text-align: center; padding: 1.5rem 0; }

/* ── MCP 接口自检（实时流式日志）── */
.mcp-selftest-hint { font-size: 0.74rem; color: var(--muted); line-height: 1.6; margin: 0.1rem 0 0.5rem; }
.mcp-selftest-hint code { font-family: var(--mono); font-size: 0.7rem; background: var(--panel); border: 1px solid var(--line); border-radius: 4px; padding: 0.02rem 0.3rem; }
.mcp-st-head { display: flex; align-items: center; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 0.5rem; }
.mcp-st-verdict { font-size: 0.78rem; font-weight: 700; padding: 0.12rem 0.6rem; border-radius: 999px; background: var(--panel-alt); color: var(--text-secondary); }
.mcp-st-verdict.ok { color: var(--success); background: var(--success-soft); }
.mcp-st-verdict.fail { color: var(--danger); background: var(--danger-soft); }
.mcp-st-pill { font-size: 0.72rem; font-weight: 600; padding: 0.12rem 0.55rem; border-radius: 999px; border: 1px solid var(--line); color: var(--text-secondary); }
.mcp-st-pill.ok { color: var(--success); background: var(--success-soft); border-color: transparent; }
.mcp-st-pill.fail { color: var(--danger); background: var(--danger-soft); border-color: transparent; }
.mcp-st-counts { margin-left: auto; font-size: 0.74rem; color: var(--muted); }
.mcp-st-counts .ok { color: var(--success); }
.mcp-st-counts .skip { color: var(--muted); }
.mcp-st-counts .fail { color: var(--danger); }
/* 进度条 */
.mcp-st-progress { height: 4px; background: var(--line); border-radius: 999px; overflow: hidden; margin-bottom: 0.5rem; }
.mcp-st-bar { height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), var(--cyan)); border-radius: 999px; transition: width 0.3s ease; }
/* 终端式日志 */
.mcp-st-log { max-height: 24rem; overflow: auto; background: #0c1222; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 0.5rem 0.65rem; font-family: var(--mono); font-size: 0.74rem; line-height: 1.7; }
.mcp-log-line { display: flex; align-items: baseline; gap: 0.5rem; color: #cbd5e1; white-space: nowrap; }
.mcp-log-line.ok { color: #86efac; }
.mcp-log-line.fail { color: #fca5a5; background: rgba(239,68,68,0.12); border-radius: 4px; }
.mcp-log-line.skip { color: #94a3b8; }
.mcp-log-line.dim { color: #64748b; }
.mcp-log-line.pending { color: #93c5fd; }
.mcp-log-t { color: #475569; flex-shrink: 0; }
.mcp-log-body { flex: 1; overflow: hidden; text-overflow: ellipsis; }
.mcp-log-body code { font-family: var(--mono); color: inherit; background: transparent; padding: 0; }
.mcp-log-body b { color: #e2e8f0; }
.mcp-log-ic { font-weight: 700; }
.mcp-log-ic.ok { color: #22c55e; }
.mcp-log-ic.fail { color: #ef4444; }
.mcp-log-ic.skip { color: #64748b; }
.mcp-log-ms { color: #64748b; }
.mcp-log-dim { color: #64748b; }
.mcp-log-detail { color: #94a3b8; }
.mcp-log-spin { display: inline-block; animation: mcpSpin 0.9s steps(8) infinite; }
@keyframes mcpSpin { from { opacity: 0.35; } 50% { opacity: 1; } to { opacity: 0.35; } }

/* ── LLM 提供商切换条（总览 Runtime 卡片）── */
.llm-prov-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 0.5rem; padding: 0.5rem 0.65rem; margin-bottom: 0.6rem; background: var(--panel-alt); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.llm-prov-label { font-size: 0.78rem; font-weight: 600; color: var(--text-secondary); display: inline-flex; align-items: center; gap: 0.25rem; }
.llm-prov-bar select { font-size: 0.8rem; padding: 0.3rem 0.55rem; min-width: 9rem; }
.llm-prov-hint { font-size: 0.74rem; color: var(--muted); margin-left: auto; }
.llm-prov-hint code { font-family: var(--mono); font-size: 0.72rem; color: var(--accent-strong); background: var(--accent-soft); border-radius: 4px; padding: 0.02rem 0.35rem; }



/* ── 产品推荐 · 技术资料（PDF说明书 / 接线图）── */
.product-docs .docs-row { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.3rem; }
.doc-chip { display: inline-flex; align-items: center; gap: 0.35rem; max-width: 100%; padding: 0.32rem 0.6rem; font-size: 0.78rem; color: var(--accent-strong); background: var(--accent-soft); border: 1px solid transparent; border-radius: var(--radius-sm); text-decoration: none; transition: all 0.15s; }
.doc-chip:hover { background: var(--accent); color: #fff; }
.doc-chip svg { flex-shrink: 0; }
.doc-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.docs-subhead { font-size: 0.74rem; color: var(--muted); margin: 0.6rem 0 0.35rem; }
.doc-thumbs { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.doc-thumb { width: 84px; height: 64px; object-fit: cover; border: 1px solid var(--line); border-radius: var(--radius-sm); cursor: zoom-in; background: var(--panel-alt); transition: transform 0.15s, box-shadow 0.15s; }
.doc-thumb:hover { transform: scale(1.04); box-shadow: var(--shadow-md); border-color: var(--accent); }
/* 接线图放大灯箱 */
.doc-overlay { position: fixed; inset: 0; z-index: 1000; display: none; align-items: center; justify-content: center; background: rgba(0,0,0,0.8); cursor: zoom-out; padding: 2rem; }
.doc-overlay.open { display: flex; }
.doc-overlay-inner { max-width: 92vw; max-height: 92vh; display: flex; flex-direction: column; align-items: center; gap: 0.5rem; }
.doc-overlay-inner img { max-width: 92vw; max-height: 84vh; object-fit: contain; border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); background: #fff; }
.doc-overlay-cap { color: #e2e8f0; font-size: 0.8rem; }

/* ── 售前意图执行管道 + 总览目录卡片 ── */
.card-foot-hint { font-size: 0.68rem; color: var(--muted); padding: 0.45rem 0.1rem 0.1rem; border-top: 1px dashed var(--border); margin-top: 0.4rem; }
.pipeline-flow { display: flex; align-items: stretch; gap: 0.35rem; flex-wrap: wrap; }
.pipeline-step { display: flex; align-items: flex-start; gap: 0.45rem; background: var(--surface-2, rgba(255,255,255,0.03)); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 0.5rem 0.6rem; flex: 1 1 160px; min-width: 150px; }
.pipeline-step-idx { flex-shrink: 0; width: 1.35rem; height: 1.35rem; border-radius: 50%; background: var(--accent); color: #fff; font-size: 0.72rem; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.pipeline-step-title { font-weight: 600; font-size: 0.82rem; }
.pipeline-step-detail { font-size: 0.72rem; color: var(--text-secondary, var(--muted)); margin-top: 0.15rem; line-height: 1.45; }
.pipeline-arrow { display: flex; align-items: center; color: var(--accent); font-weight: 700; align-self: center; }
@media (max-width: 720px) { .pipeline-arrow { display: none; } }

/* ── 售前意图对话测试：回答 + 执行过程时间线 ── */
.intent-answer { padding: 0.7rem 0.85rem; border-radius: var(--radius-sm); font-size: 0.9rem; line-height: 1.5; border: 1px solid var(--border); background: var(--surface-2, rgba(255,255,255,0.03)); }
.intent-answer-ok { border-left: 3px solid var(--success); }
.intent-answer-warn { border-left: 3px solid var(--warning, #e0a000); }
.intent-thinking { color: var(--muted); }
.intent-trace { display: flex; flex-direction: column; gap: 0; }
.trace-step { display: flex; gap: 0.6rem; }
.trace-rail { display: flex; flex-direction: column; align-items: center; width: 1.5rem; flex-shrink: 0; }
.trace-icon { width: 1.5rem; height: 1.5rem; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.8rem; font-weight: 700; color: #fff; background: var(--muted); z-index: 1; }
.trace-line { flex: 1; width: 2px; background: var(--border); margin: 2px 0; min-height: 0.8rem; }
.trace-done .trace-icon { background: var(--success); }
.trace-skipped .trace-icon { background: var(--muted); }
.trace-failed .trace-icon { background: var(--danger, #d23); }
.trace-body { flex: 1; padding-bottom: 0.7rem; }
.trace-head { display: flex; align-items: center; gap: 0.4rem; font-size: 0.85rem; }
.trace-idx { width: 1.1rem; height: 1.1rem; border-radius: 50%; background: var(--accent); color: #fff; font-size: 0.66rem; display: flex; align-items: center; justify-content: center; }
.trace-badge { font-size: 0.62rem; color: var(--muted); border: 1px solid var(--border); border-radius: 3px; padding: 0 0.3rem; }
.trace-summary { font-size: 0.78rem; color: var(--text-secondary, var(--muted)); margin-top: 0.2rem; line-height: 1.45; word-break: break-word; }

/* ── 对话式意图测试 UI ── */
.chatbox { display: flex; flex-direction: column; height: 520px; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--surface, rgba(255,255,255,0.02)); }
.chat-transcript { flex: 1; overflow-y: auto; padding: 1rem; display: flex; flex-direction: column; gap: 0.9rem; }
.chat-empty { margin: auto; text-align: center; color: var(--muted); font-size: 0.85rem; display: flex; flex-direction: column; align-items: center; gap: 0.7rem; max-width: 360px; }
.chat-suggest { display: flex; flex-wrap: wrap; gap: 0.45rem; justify-content: center; margin-top: 0.3rem; }
.chat-chip { font-size: 0.76rem; padding: 0.35rem 0.7rem; border-radius: 999px; border: 1px solid var(--border); background: var(--surface-2, rgba(255,255,255,0.04)); color: var(--text, inherit); cursor: pointer; transition: all .15s; }
.chat-chip:hover { border-color: var(--accent); color: var(--accent); }
.chat-msg { display: flex; gap: 0.55rem; align-items: flex-start; max-width: 100%; }
.chat-msg-user { flex-direction: row; justify-content: flex-end; }
.chat-avatar { flex-shrink: 0; width: 1.9rem; height: 1.9rem; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.62rem; font-weight: 700; color: #fff; }
.chat-avatar-user { background: var(--accent); }
.chat-avatar-bot { background: linear-gradient(135deg, var(--purple, #7c5cff), var(--cyan, #22b8cf)); }
.chat-bubble { padding: 0.65rem 0.85rem; border-radius: 12px; font-size: 0.86rem; line-height: 1.55; max-width: 80%; word-break: break-word; }
.chat-bubble-user { background: var(--accent); color: #fff; border-bottom-right-radius: 3px; }
.chat-bubble-bot { background: var(--surface-2, rgba(255,255,255,0.05)); border: 1px solid var(--border); border-bottom-left-radius: 3px; max-width: 88%; }
.chat-intent-line { font-size: 0.8rem; color: var(--text-secondary, var(--muted)); padding-bottom: 0.45rem; margin-bottom: 0.5rem; border-bottom: 1px dashed var(--border); }
.chat-intent-fail { color: var(--warning, #e0a000); }
.chat-badge-manual { font-size: 0.62rem; background: var(--purple, #7c5cff); color: #fff; padding: 0.05rem 0.35rem; border-radius: 3px; }
.chat-answer { font-size: 0.9rem; font-weight: 500; line-height: 1.55; }
.chat-typing { display: inline-flex; gap: 4px; padding: 0.2rem 0; }
.chat-typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: chatBlink 1.2s infinite both; }
.chat-typing i:nth-child(2) { animation-delay: .2s; }
.chat-typing i:nth-child(3) { animation-delay: .4s; }
@keyframes chatBlink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
.res-card { margin-top: 0.6rem; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 0.6rem 0.7rem; background: var(--surface, rgba(255,255,255,0.02)); }
.res-card-warn { border-left: 3px solid var(--warning, #e0a000); }
.res-card-title { font-size: 0.82rem; font-weight: 600; margin-bottom: 0.45rem; }
.res-kv { display: flex; justify-content: space-between; font-size: 0.8rem; padding: 0.15rem 0; border-bottom: 1px dotted var(--border); }
.res-kv span { color: var(--muted); }
.res-warn-text { font-size: 0.78rem; color: var(--text-secondary, var(--muted)); line-height: 1.5; }
.res-empty { margin-top: 0.5rem; font-size: 0.8rem; color: var(--muted); font-style: italic; }
.res-card .alloc-table { margin-top: 0.3rem; font-size: 0.76rem; }
.chat-reasoning { margin-top: 0.6rem; }
.chat-reasoning-toggle { display: inline-flex; align-items: center; gap: 0.3rem; font-size: 0.74rem; color: var(--muted); background: none; border: none; cursor: pointer; padding: 0.2rem 0; }
.chat-reasoning-toggle:hover { color: var(--accent); }
.chat-reasoning-toggle svg { transition: transform .2s; }
.chat-reasoning.open .chat-reasoning-toggle svg { transform: rotate(90deg); }
.chat-reasoning-body { display: none; margin-top: 0.55rem; padding: 0.6rem 0.5rem 0.2rem; border-top: 1px dashed var(--border); }
.chat-reasoning.open .chat-reasoning-body { display: block; }
.chat-raw { margin-top: 0.5rem; }
.chat-raw summary { font-size: 0.72rem; color: var(--muted); cursor: pointer; }
.chat-raw pre { font-size: 0.68rem; max-height: 220px; overflow: auto; margin: 0.4rem 0 0; background: var(--surface-2, rgba(0,0,0,0.15)); padding: 0.5rem; border-radius: var(--radius-sm); }
.chat-inputbar { border-top: 1px solid var(--border); padding: 0.6rem 0.7rem; background: var(--surface-2, rgba(255,255,255,0.02)); display: flex; flex-direction: column; gap: 0.5rem; }
.chat-mode-row { display: flex; align-items: center; gap: 0.5rem; }
.chat-mode-toggle { display: inline-flex; border: 1px solid var(--border); border-radius: 999px; overflow: hidden; }
.chat-mode-btn { font-size: 0.74rem; padding: 0.3rem 0.7rem; background: none; border: none; cursor: pointer; color: var(--muted); }
.chat-mode-btn.active { background: var(--accent); color: #fff; }
.chat-intent-select { font-size: 0.76rem; padding: 0.25rem 0.4rem; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--surface); color: var(--text, inherit); max-width: 160px; }
.chat-input-row { display: flex; align-items: flex-end; gap: 0.5rem; }
.chat-input-row textarea { flex: 1; resize: none; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 0.55rem 0.7rem; font-size: 0.86rem; line-height: 1.45; background: var(--surface); color: var(--text, inherit); font-family: inherit; max-height: 120px; overflow-y: auto; }
.chat-input-row textarea:focus { outline: none; border-color: var(--accent); }
.chat-send-btn { flex-shrink: 0; width: 2.4rem; height: 2.4rem; border-radius: 50%; border: none; background: var(--accent); color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: opacity .15s; }
.chat-send-btn:hover { opacity: 0.88; }
.chat-send-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ── 图谱画布加载遮罩（叠加全部时的进度与锁定） ── */
.graph-loading-overlay { position: absolute; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; background: rgba(255, 255, 255, 0.35); backdrop-filter: blur(2px); border-radius: inherit; }
.graph-loading-box { display: flex; flex-direction: column; align-items: center; gap: 0.7rem; padding: 1.1rem 1.6rem; background: #ffffff; border: 1px solid #e2e8f0; border-radius: var(--radius); box-shadow: 0 10px 40px rgba(0,0,0,.18); min-width: 250px; }
.graph-spinner { width: 2rem; height: 2rem; border: 3px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: graphspin 0.8s linear infinite; }
@keyframes graphspin { to { transform: rotate(360deg); } }
.graph-loading-msg { font-size: 0.84rem; color: #0f172a; font-weight: 600; }
.graph-loading-bar { width: 100%; height: 5px; background: var(--border); border-radius: 3px; overflow: hidden; }
.graph-loading-bar > i { display: block; height: 100%; width: 0%; background: linear-gradient(90deg, var(--accent), var(--cyan, #22b8cf)); transition: width .2s ease; }

/* ── 子图唯一名称 + 重命名 ── */
.graph-name { font-size: 0.9rem; color: var(--accent); font-weight: 700; letter-spacing: .2px; }
.graph-rename-btn { flex-shrink: 0; background: none; border: none; color: var(--muted); cursor: pointer; font-size: 0.82rem; padding: 0.1rem 0.25rem; border-radius: 4px; opacity: 0; transition: opacity .15s, color .15s; }
.item:hover .graph-rename-btn { opacity: 1; }
.graph-rename-btn:hover { color: var(--accent); background: var(--surface-2, rgba(255,255,255,0.06)); }

/* ── 连线长度滑条 ── */
.edge-len-ctrl { display: inline-flex; align-items: center; gap: 0.3rem; padding: 0.15rem 0.45rem; border: 1px solid var(--border); border-radius: 999px; color: var(--muted); background: var(--surface-2, rgba(255,255,255,0.03)); }
.edge-len-ctrl svg { flex-shrink: 0; opacity: 0.7; }
.edge-len-ctrl input[type="range"] { width: 86px; height: 4px; cursor: pointer; accent-color: var(--accent); }

/* ── 售前对话测试 UI 增强：清晰边界 + 专业卡片感 ── */
.chatbox { box-shadow: var(--shadow-sm, 0 1px 3px rgba(0,0,0,.12)); }
.chat-transcript { background:
  linear-gradient(var(--surface, #0f172a), var(--surface, #0f172a)) padding-box; }
.chat-bubble-bot { box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.chat-bubble-user { box-shadow: 0 1px 2px rgba(0,0,0,.12); }
/* 输入区做成悬浮输入卡，明显边界 */
.chat-inputbar { background: var(--surface, #0f172a); border-top: 1px solid var(--border); }
.chat-input-row { border: 1.5px solid var(--border); border-radius: 12px; padding: 0.35rem 0.4rem 0.35rem 0.7rem; background: var(--surface-2, rgba(255,255,255,0.03)); transition: border-color .15s, box-shadow .15s; }
.chat-input-row:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft, rgba(59,130,246,.18)); }
.chat-input-row textarea { border: none !important; background: transparent !important; padding: 0.35rem 0 !important; }
.chat-input-row textarea:focus { box-shadow: none !important; }
.chat-mode-toggle { box-shadow: inset 0 0 0 1px var(--border); }
/* 结果卡片更立体 */
.res-card { box-shadow: 0 1px 3px rgba(0,0,0,.1); }
.res-card-title { display: flex; align-items: center; gap: 0.35rem; }

/* ── 售前对话测试：去黑底，改为透明+彩色边框，文字清晰 ── */
.chatbox { background: transparent; border: 1.5px solid var(--border); }
.chat-transcript { background: transparent; }
.chat-inputbar { background: transparent; border-top: 1px solid var(--border); }
.chat-bubble-bot { background: var(--surface-2, rgba(127,127,127,0.08)); border: 1px solid var(--border); color: var(--text, inherit); }
.chat-answer, .chat-intent-line, .trace-summary, .res-card-title, .res-kv b { color: var(--text, inherit); }
.chat-empty { color: var(--muted); }
.res-card { background: transparent; border: 1px solid var(--border); }
.chat-input-row textarea { color: var(--text, inherit); }
.chat-reasoning-body { background: transparent; }
.chat-raw pre { background: var(--surface-2, rgba(127,127,127,0.06)); color: var(--text, inherit); }

/* ── 使用教程入口 + 分页弹窗 ── */
.tutorial-entry { display: flex; align-items: center; gap: 0.85rem; padding: 0.7rem 1rem; margin-bottom: 1rem; border: 1px solid var(--accent-soft, rgba(59,130,246,.3)); border-left: 3px solid var(--accent); border-radius: var(--radius); background: var(--accent-soft, rgba(59,130,246,.06)); }
.tutorial-entry-icon { flex-shrink: 0; color: var(--accent); }
.tutorial-entry-body { flex: 1; display: flex; flex-direction: column; gap: 0.15rem; }
.tutorial-entry-body strong { font-size: 0.92rem; }
.tutorial-entry-body span { font-size: 0.76rem; color: var(--muted); }
.tutorial-wrap { display: flex; gap: 0; max-height: 72vh; }
.tutorial-nav { flex-shrink: 0; width: 168px; border-right: 1px solid var(--border); padding: 0.6rem; display: flex; flex-direction: column; gap: 0.25rem; overflow-y: auto; }
.tutorial-nav-item { text-align: left; font-size: 0.78rem; padding: 0.45rem 0.6rem; border: none; background: none; color: var(--text-secondary, var(--muted)); border-radius: var(--radius-sm); cursor: pointer; }
.tutorial-nav-item:hover { background: var(--surface-2, rgba(127,127,127,0.08)); }
.tutorial-nav-item.active { background: var(--accent); color: #fff; font-weight: 600; }
.tutorial-content { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.tutorial-page { flex: 1; overflow-y: auto; padding: 1.1rem 1.3rem; font-size: 0.88rem; line-height: 1.7; }
.tutorial-title { font-size: 1.05rem; margin: 0 0 0.7rem; color: var(--accent); }
.tutorial-page ul { padding-left: 1.1rem; margin: 0.5rem 0; }
.tutorial-page li { margin: 0.35rem 0; }
.tutorial-page code { background: var(--surface-2, rgba(127,127,127,0.1)); padding: 0.05rem 0.35rem; border-radius: 4px; font-size: 0.82rem; }
.tutorial-footer { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; padding: 0.6rem 1rem; border-top: 1px solid var(--border); }
.tutorial-progress { font-size: 0.78rem; color: var(--muted); }
@media (max-width: 640px) { .tutorial-nav { display: none; } }

/* ── 本体场景概览条 + 短卡片 ── */
.onto-scene-summary { position: absolute; top: 0.5rem; left: 0.5rem; right: 0.5rem; z-index: 20; padding: 0.45rem 0.7rem; font-size: 0.74rem; background: var(--accent-soft, rgba(59,130,246,.12)); border: 1px solid var(--accent); border-radius: var(--radius-sm); color: var(--text, inherit); box-shadow: 0 2px 8px rgba(0,0,0,.1); }
#graphRunList .item { padding: 0.5rem 0.6rem; }
#graphRunList .graph-card-meta,
#graphRunList .graph-card-badges,
#graphRunList .graph-card-time { margin-left: 0; }
#graphRunList .graph-card-meta { margin-top: 0.3rem; }
#graphRunList .graph-name { font-size: 0.86rem; }
#graphRunList .graph-meta-row { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
#graphRunList .graph-badge-scene { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* 重命名按钮常显淡色，hover 才高亮（不再 hover 才出现，避免用户不知道有这个按钮） */
#graphRunList .graph-rename-btn { opacity: 0.55; }
#graphRunList .item:hover .graph-rename-btn { opacity: 1; }

/* ── 细节优化（克制，不冗余）── */
/* 1) 选中卡片左侧强调条，选择态更清晰 */
#graphRunList .item.active { position: relative; }
#graphRunList .item.active::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--accent); border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
/* 2) 键盘可达性：统一焦点环（仅键盘聚焦显示，不干扰鼠标） */
.btn:focus-visible, select:focus-visible, input:focus-visible, textarea:focus-visible, .view-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
/* 3) 子图卡内型号名与文档来源更分明 */
#graphRunList .graph-meta-row { color: var(--muted); }
#graphRunList .graph-meta-row svg { opacity: 0.6; flex-shrink: 0; }
