:root {
  --bg: #060a12;
  --bg-2: #070d18;
  --panel: #0a1220;
  --panel-2: #0d1728;
  --line: #1a2740;
  --line-2: #27385a;
  --text: #e8eefb;
  --muted: #e6edfa;
  --dim: #b9c8de;
  --accent: #4d8dff;
  --accent-2: #7fb0ff;
  --accent-soft: rgba(77, 141, 255, .13);
  --accent-line: rgba(77, 141, 255, .34);
  --mm: #35c5f4;
  --lidar: #a78bfa;
  --both: #f472b6;
  --warn: #ffb454;
  --radius: 12px;
  --mono: "Cascadia Code", "SFMono-Regular", ui-monospace, Consolas, "Liberation Mono", monospace;
  --sans: "Segoe UI", -apple-system, BlinkMacSystemFont, "Microsoft YaHei", "PingFang SC", "Noto Sans SC", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

body[data-view="datasets"] {
  --accent: #ff9d3d;
  --accent-2: #ffc078;
  --accent-soft: rgba(255, 157, 61, .12);
  --accent-line: rgba(255, 157, 61, .38);
}

button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #22314c; border-radius: 99px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #33476b; }

/* ---------------------------------------------------------------- 门禁 */
.gate {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background:
    radial-gradient(900px 620px at 78% 12%, rgba(77, 141, 255, .16), transparent 62%),
    radial-gradient(700px 500px at 12% 88%, rgba(53, 197, 244, .09), transparent 60%),
    var(--bg);
  z-index: 80;
}
.gate-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(120, 160, 230, .055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120, 160, 230, .055) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at 50% 50%, #000 30%, transparent 78%);
}
.gate-card {
  position: relative;
  width: min(440px, calc(100vw - 40px));
  padding: 34px 34px 26px;
  background: linear-gradient(180deg, rgba(16, 27, 46, .96), rgba(9, 15, 27, .98));
  border: 1px solid var(--line-2);
  border-radius: 18px;
  box-shadow: 0 40px 90px rgba(0, 0, 0, .55), inset 0 1px 0 rgba(255, 255, 255, .05);
  animation: gateIn .5s cubic-bezier(.2, .8, .2, 1);
}
@keyframes gateIn { from { opacity: 0; transform: translateY(14px) scale(.985); } }
.gate-brand { display: flex; align-items: center; gap: 13px; margin-bottom: 34px; }
.logo-mark { display: inline-flex; width: 42px; height: 42px; color: var(--accent); }
.logo-mark svg { width: 100%; height: 100%; }
.brand-name { font-family: var(--mono); font-size: 15px; letter-spacing: .22em; font-weight: 700; }
.brand-sub { margin-top: 4px; font-family: var(--mono); font-size: 11.5px; letter-spacing: .16em; color: var(--dim); }
.gate-title { font-size: 22px; font-weight: 650; letter-spacing: .06em; margin-bottom: 18px; }
.key-field { position: relative; }
.key-field input {
  width: 100%;
  height: 52px;
  padding: 0 48px 0 16px;
  background: #070d18;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  outline: none;
  font-family: var(--mono);
  font-size: 15px;
  letter-spacing: .12em;
  transition: border-color .18s, box-shadow .18s;
}
.key-field input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.key-field input::placeholder { color: var(--dim); letter-spacing: .04em; }
.eye {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  width: 36px; height: 36px; display: grid; place-items: center;
  background: transparent; border: 0; color: var(--dim); border-radius: 8px;
}
.eye:hover { color: var(--text); background: rgba(255, 255, 255, .04); }
.eye svg { width: 18px; height: 18px; }
.enter-btn {
  width: 100%;
  height: 50px;
  margin-top: 14px;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(180deg, #5a97ff, #3a77e8);
  color: #fff;
  font-size: 15px;
  font-weight: 650;
  letter-spacing: .14em;
  box-shadow: 0 10px 30px rgba(58, 119, 232, .32);
  transition: transform .14s, filter .14s;
}
.enter-btn:hover { filter: brightness(1.08); }
.enter-btn:active { transform: translateY(1px); }
.enter-btn:disabled { filter: grayscale(.4) brightness(.8); cursor: default; }
.gate-status { min-height: 20px; margin-top: 12px; font-size: 12.5px; color: var(--muted); }
.gate-status.err { color: #ff7a7a; }
.gate-progress { height: 3px; margin-top: 4px; border-radius: 99px; background: rgba(255, 255, 255, .06); overflow: hidden; opacity: 0; transition: opacity .2s; }
.gate-progress.on { opacity: 1; }
.gate-progress i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), #8fd0ff); transition: width .2s; }
.gate-chips { display: flex; gap: 8px; margin-top: 20px; }
.gate-chips span {
  padding: 5px 9px; border: 1px solid var(--line); border-radius: 6px;
  font-family: var(--mono); font-size: 11.5px; letter-spacing: .08em; color: var(--dim);
}
.shake { animation: shake .4s; }
@keyframes shake {
  20% { transform: translateX(-7px); } 40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); } 80% { transform: translateX(3px); }
}

/* ---------------------------------------------------------------- 主框架 */
.app {
  height: 100vh;
  display: grid;
  grid-template-rows: 62px minmax(0, 1fr);
  background:
    radial-gradient(1200px 600px at 82% -10%, var(--accent-soft), transparent 55%),
    var(--bg);
}
.topbar {
  display: flex;
  align-items: center;
  gap: 26px;
  padding: 0 20px 0 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(7, 12, 21, .94);
  z-index: 20;
}
.brand-mini { display: flex; align-items: center; gap: 10px; flex: none; }
.brand-mini .logo-mark { width: 30px; height: 30px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text b { font-family: var(--mono); font-size: 12.5px; letter-spacing: .16em; }
.brand-text i { font-style: normal; font-family: var(--mono); font-size: 10.5px; letter-spacing: .16em; color: var(--dim); margin-top: 3px; }

.tabs { display: flex; padding: 4px; gap: 4px; background: #0a1322; border: 1px solid var(--line); border-radius: 10px; flex: none; }
.tab {
  display: inline-flex; align-items: center; gap: 8px;
  height: 32px; padding: 0 16px;
  background: transparent; border: 0; border-radius: 7px;
  color: var(--muted); font-size: 14px; font-weight: 600; letter-spacing: .04em;
  transition: background .16s, color .16s;
}
.tab .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .5; }
.tab:hover { color: var(--text); }
.tab.is-active { background: var(--accent-soft); color: var(--accent-2); box-shadow: inset 0 0 0 1px var(--accent-line); }
.tab.is-active .dot { opacity: 1; background: var(--accent); box-shadow: 0 0 10px var(--accent); }

.metrics { display: flex; align-items: center; gap: 22px; min-width: 0; overflow: hidden; }
.metric { display: flex; flex-direction: column; line-height: 1.15; }
.metric b { font-family: var(--mono); font-size: 16px; font-weight: 650; letter-spacing: .02em; }
.metric span { font-size: 11.5px; letter-spacing: .1em; color: var(--dim); margin-top: 3px; }
.metric em { font-style: normal; color: var(--accent); }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; flex: none; }
.source-chip {
  display: inline-flex; align-items: center; gap: 7px;
  height: 30px; padding: 0 10px;
  border: 1px solid var(--line); border-radius: 7px;
  color: var(--dim); text-decoration: none;
  font-family: var(--mono); font-size: 11.5px; letter-spacing: .04em;
  transition: color .16s, border-color .16s;
}
.source-chip:hover { color: var(--accent-2); border-color: var(--accent-line); }
.source-chip svg { width: 13px; height: 13px; }
.ghost-btn {
  height: 30px; padding: 0 13px;
  background: transparent; border: 1px solid var(--line); border-radius: 7px;
  color: var(--muted); font-size: 13px; letter-spacing: .06em;
}
.ghost-btn:hover { color: var(--text); border-color: var(--line-2); background: rgba(255, 255, 255, .03); }

.workspace { position: relative; min-height: 0; }
.view { display: none; height: 100%; min-height: 0; }
.view.is-active { display: flex; }

/* ---------------------------------------------------------------- 图谱 */
.view-papers { min-width: 0; }
.graph-shell { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.graph-tools {
  display: flex; align-items: center; gap: 12px;
  height: 58px; padding: 0 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(8, 14, 24, .55);
}
.search {
  position: relative; display: flex; align-items: center;
  width: 280px; height: 36px; padding: 0 10px;
  background: #070d18; border: 1px solid var(--line); border-radius: 8px;
  transition: border-color .16s, box-shadow .16s;
}
.search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.search svg { width: 15px; height: 15px; color: var(--dim); flex: none; }
.search input {
  flex: 1; min-width: 0; height: 100%; padding: 0 8px;
  background: transparent; border: 0; outline: none;
  font-size: 13.5px; letter-spacing: .02em;
}
.search input::placeholder { color: var(--dim); }
.search input::-webkit-search-cancel-button { filter: invert(.6); }
.search-count { font-family: var(--mono); font-size: 11.5px; color: var(--accent-2); }
.seg { display: flex; gap: 3px; padding: 3px; background: #0a1322; border: 1px solid var(--line); border-radius: 8px; flex: none; }
.seg button {
  height: 28px; padding: 0 10px;
  background: transparent; border: 0; border-radius: 6px;
  color: var(--dim); font-family: var(--mono); font-size: 12px; letter-spacing: .04em;
  white-space: nowrap;
}
.seg button:hover { color: var(--text); }
.seg button.is-active { background: var(--accent-soft); color: var(--accent-2); box-shadow: inset 0 0 0 1px var(--accent-line); }
.tool-spacer { flex: 1; }
.zoom-tools { display: flex; gap: 4px; }
.zoom-tools button {
  width: 32px; height: 32px;
  background: #0a1322; border: 1px solid var(--line); border-radius: 7px;
  color: var(--muted); font-size: 15px; line-height: 1;
}
.zoom-tools button:hover { color: var(--text); border-color: var(--line-2); }
.zoom-tools button.wide { width: auto; padding: 0 12px; font-size: 12.5px; letter-spacing: .06em; }
.freeze-btn {
  height: 32px; padding: 0 13px; flex: none;
  display: inline-flex; align-items: center; gap: 7px;
  background: #0a1322; border: 1px solid var(--line); border-radius: 7px;
  color: var(--muted); font-family: var(--mono); font-size: 12px; letter-spacing: .1em;
  white-space: nowrap; cursor: pointer;
  transition: color .16s, border-color .16s, background .16s, box-shadow .16s;
}
.freeze-btn::before {
  content: ""; width: 7px; height: 7px; border-radius: 2px;
  border: 1px solid currentColor;
}
.freeze-btn:hover { color: var(--text); border-color: var(--line-2); }
.freeze-btn.is-active {
  color: var(--accent-2); border-color: var(--accent-line);
  background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent-line);
}
.freeze-btn.is-active::before { background: var(--accent-2); border-color: var(--accent-2); }

.year-ruler {
  display: flex; align-items: center; gap: 6px;
  height: 40px; padding: 0 18px;
  border-bottom: 1px solid var(--line);
  overflow-x: auto; overflow-y: hidden;
  scrollbar-width: none;
  background: rgba(7, 12, 21, .35);
}
.year-ruler::-webkit-scrollbar { display: none; }
.year-pill {
  flex: none; height: 26px; padding: 0 9px;
  display: inline-flex; align-items: center; gap: 6px;
  background: transparent; border: 1px solid transparent; border-radius: 6px;
  color: var(--dim); font-family: var(--mono); font-size: 12.5px; letter-spacing: .04em;
}
.year-pill b { font-weight: 600; color: var(--muted); }
.year-pill i { font-style: normal; font-size: 10.5px; color: var(--dim); }
.year-pill:hover { color: var(--text); border-color: var(--line); }
.year-pill.is-active { color: var(--accent-2); border-color: var(--accent-line); background: var(--accent-soft); }
.year-pill.is-active b { color: var(--accent-2); }

.graph-viewport {
  position: relative; flex: 1; min-height: 0;
  overflow: hidden;
  isolation: isolate;
  cursor: grab;
  touch-action: none;
  user-select: none;
  background:
    radial-gradient(900px 500px at 50% 20%, rgba(77, 141, 255, .05), transparent 65%),
    #060a12;
}
.graph-viewport.is-panning, .graph-viewport.is-panning .node { cursor: grabbing; }
/* 拖拽期间关掉过渡，减少逐帧合成与重绘 */
.graph-viewport.is-panning .node,
.graph-viewport.is-panning .edge-path { transition: none; }
.col-group { position: absolute; left: 0; top: 0; }
.graph-world {
  position: absolute; left: 0; top: 0;
  transform-origin: 0 0;
}
.year-layer { position: absolute; left: 0; top: 0; pointer-events: none; z-index: 0; }
.edge-layer { position: absolute; left: 0; top: 0; overflow: visible; z-index: 1; }
.node-layer { position: absolute; left: 0; top: 0; z-index: 2; }

.year-band {
  position: absolute; top: 0;
  border-left: 1px dashed rgba(120, 155, 210, .10);
  background: linear-gradient(180deg, rgba(120, 160, 230, .026), transparent 45%);
}
.year-band.alt { background: linear-gradient(180deg, rgba(120, 160, 230, .012), transparent 45%); }
.year-label {
  position: absolute; top: 14px;
  font-family: var(--mono); font-size: 19px; font-weight: 650;
  letter-spacing: .08em; color: rgba(190, 212, 248, .55);
  white-space: nowrap;
}
.year-label small { font-size: 11px; letter-spacing: .12em; color: rgba(170, 192, 225, .62); margin-left: 7px; }
.lane-label {
  position: absolute; font-family: var(--mono); font-size: 10.5px;
  letter-spacing: .16em; color: rgba(150, 172, 205, .68);
  writing-mode: vertical-rl; text-orientation: mixed;
}

.node {
  position: absolute;
  display: flex; flex-direction: column; justify-content: center;
  padding: 6px 11px 6px 14px;
  border-radius: 9px;
  border: 1px solid var(--line-2);
  background: linear-gradient(180deg, rgba(17, 30, 51, .96), rgba(11, 20, 35, .96));
  cursor: pointer;
  /* 不做 opacity 过渡：点击时 260 个节点同时渐变会被逐帧合成，导致整屏闪烁 */
  transition: border-color .16s, box-shadow .16s;
  font: inherit; color: inherit; text-align: left;
}
/* 节点由鼠标点击聚焦，屏蔽浏览器默认焦点环（深色背景下表现为黑框/残影） */
.node:focus { outline: none; }
.node:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }
.node::before {
  content: ""; position: absolute; left: 0; top: 7px; bottom: 7px; width: 3px; border-radius: 0 3px 3px 0;
  background: var(--sensor-color, var(--line-2));
}
.node:hover { border-color: var(--accent-line); box-shadow: 0 0 0 1px var(--accent-soft), 0 6px 20px rgba(0, 0, 0, .35); }
/* 文字亮度层级：选中的论文 > 未选中的论文 > 未被点击的仅被引用前作 */
.node-title {
  font-size: 13.5px; line-height: 1.34; font-weight: 600; color: #d7e3f5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  word-break: break-word;
}
.node-meta {
  margin-top: 3px; display: flex; align-items: center; gap: 7px;
  font-family: var(--mono); font-size: 11px; letter-spacing: .06em; color: #a2b2c9;
  white-space: nowrap;
}
.node-meta .task { color: #c2d0e3; }
.node-meta .cite { color: #8fa2bf; }
.node.type-paper { border-color: rgba(77, 141, 255, .42); background: linear-gradient(180deg, rgba(24, 46, 84, .95), rgba(13, 27, 49, .96)); }
.node.type-paper:hover { border-color: rgba(120, 170, 255, .8); }
.node.type-external {
  padding: 4px 10px 4px 13px;
  border-style: dashed; border-color: rgba(136, 156, 188, .28);
  background: linear-gradient(180deg, rgba(19, 27, 41, .94), rgba(12, 18, 29, .95));
}
.node.type-external .node-title { color: #aebfd6; font-weight: 500; }
.node.type-external .node-meta { color: #8b9bb2; }
.node.is-selected .node-title { color: #ffffff; }
.node.is-selected .node-meta { color: #cfdced; }
.node.is-selected .node-meta .task { color: #e4edfa; }
.node.type-external.is-selected .node-title { color: #e2ebf8; }
.node.type-external.is-selected .node-meta { color: #b6c3d6; }
.node.is-selected {
  border-color: #cfe1ff; border-style: solid;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .55), 0 0 34px rgba(77, 141, 255, .55);
  z-index: 6;
}
.node.is-neighbor { border-color: rgba(120, 175, 255, .7); z-index: 5; }
.node.is-dim { opacity: .13; }
.node.is-frozen {
  border-color: var(--accent-2); border-style: solid;
  box-shadow: 0 0 0 2px var(--accent-2), 0 0 26px var(--accent-line);
  z-index: 7; opacity: 1 !important;
}
.node.type-external.is-frozen { box-shadow: 0 0 0 2px var(--accent-2), 0 0 22px rgba(160, 180, 210, .4); }
.node.is-match { box-shadow: 0 0 0 1px var(--accent), 0 0 22px var(--accent-soft); }
.node.type-external.is-selected { box-shadow: 0 0 0 1px rgba(255, 255, 255, .5), 0 0 28px rgba(160, 180, 210, .35); }

.edge-path { fill: none; stroke: rgba(110, 150, 215, .19); stroke-width: 1.15; transition: stroke .16s, stroke-width .16s; }
.edge-hit { fill: none; stroke: transparent; stroke-width: 14; pointer-events: stroke; cursor: pointer; }
.edge-path.is-hot { stroke: rgba(130, 180, 255, .85); stroke-width: 1.8; marker-end: url(#arrowHot); }
.edge-path.is-selected { stroke: #fff; stroke-width: 2.1; stroke-dasharray: 5 4; animation: dash 14s linear infinite; marker-end: url(#arrowWhite); }
.edge-path.is-dim { opacity: .05; }
.edge-path.is-filtered { opacity: .07; }
.edge-path.is-selected { opacity: 1 !important; }
.node.is-filtered { opacity: .07; }
.node.is-selected, .node.is-neighbor { opacity: 1 !important; }
@keyframes dash { to { stroke-dashoffset: -200; } }
.graph-world.low-zoom .node-title,
.graph-world.low-zoom .node-meta { opacity: 0; }
.graph-world.low-zoom .node { padding: 0; border-radius: 5px; }
.graph-world.low-zoom .year-label { opacity: .65; }

.legend {
  position: absolute; left: 16px; bottom: 14px;
  display: flex; align-items: center; gap: 14px;
  padding: 8px 12px;
  background: rgba(9, 15, 26, .92);
  border: 1px solid var(--line); border-radius: 8px;
  pointer-events: none;
}
.lg { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); letter-spacing: .03em; }
.sw { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.sw.paper { background: rgba(77, 141, 255, .8); }
.sw.ext { border: 1px dashed rgba(160, 180, 210, .8); }
.sw.line { width: 16px; height: 1px; border-radius: 0; background: rgba(130, 170, 235, .8); }
.sw.mm { background: var(--mm); height: 3px; border-radius: 2px; }
.sw.lidar { background: var(--lidar); height: 3px; border-radius: 2px; }

/* ---------------------------------------------------------------- 右侧面板 */
.panel {
  position: absolute; right: 0; top: 0; bottom: 0; z-index: 40;
  width: 468px; pointer-events: none;
  background: linear-gradient(180deg, #0a1220, #080e19);
  border-left: 1px solid var(--line);
  box-shadow: -34px 0 70px rgba(0, 0, 0, .55);
  overflow: hidden;
  visibility: hidden;
  transform: translateX(102%);
  transition: transform .24s cubic-bezier(.2, .8, .2, 1), visibility .24s;
  cursor: auto;
  user-select: text;
}
.panel.is-open { transform: none; pointer-events: auto; visibility: visible; }
.panel-body { width: 468px; height: 100%; overflow-y: auto; overflow-x: hidden; padding: 22px 22px 44px; }
.panel-close {
  position: absolute; right: 12px; top: 12px; z-index: 9;
  width: 30px; height: 30px; display: grid; place-items: center;
  background: rgba(10, 18, 32, .9); border: 1px solid var(--line); border-radius: 7px;
  color: var(--muted); font-size: 18px; line-height: 1;
}
.panel-close:hover { color: var(--text); border-color: var(--line-2); }

/* ---------------------------------------------------------------- 左侧 peek */
.peek {
  position: absolute; left: 0; top: 0; bottom: 0; z-index: 40;
  width: 452px; pointer-events: none;
  background: linear-gradient(180deg, #0a1220, #080e19);
  border-right: 1px solid var(--line);
  box-shadow: 34px 0 70px rgba(0, 0, 0, .55);
  visibility: hidden;
  transform: translateX(-102%);
  transition: transform .24s cubic-bezier(.2, .8, .2, 1), visibility .24s;
  cursor: auto;
  user-select: text;
}
.peek.is-open { transform: none; pointer-events: auto; visibility: visible; }
.peek .panel-body { width: 452px; }
.peek .panel-close { right: auto; left: 12px; }

.p-kicker { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.p-type {
  display: inline-flex; align-items: center; height: 20px; padding: 0 8px;
  border-radius: 4px; font-family: var(--mono); font-size: 11px; letter-spacing: .13em;
  background: var(--accent-soft); color: var(--accent-2); border: 1px solid var(--accent-line);
}
.p-type.ext { background: rgba(136, 156, 188, .09); color: #cfdaea; border-color: rgba(136, 156, 188, .3); }
.p-type.rel { background: rgba(53, 197, 244, .1); color: #7fdcff; border-color: rgba(53, 197, 244, .3); }
.p-row { font-family: var(--mono); font-size: 11.5px; color: var(--dim); letter-spacing: .06em; }
.p-title { font-size: 19px; line-height: 1.42; font-weight: 650; letter-spacing: .01em; padding-right: 28px; word-break: break-word; }
.p-sub { margin-top: 8px; font-size: 13px; line-height: 1.6; color: var(--muted); word-break: break-word; }
.p-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.p-tag {
  display: inline-flex; align-items: center; gap: 5px;
  height: 22px; padding: 0 8px; border-radius: 5px;
  border: 1px solid var(--line); background: rgba(255, 255, 255, .02);
  font-family: var(--mono); font-size: 11.5px; color: var(--muted); letter-spacing: .05em;
}
.p-tag.sensor-mmWave { color: var(--mm); border-color: rgba(53, 197, 244, .3); }
.p-tag.sensor-LiDAR { color: var(--lidar); border-color: rgba(167, 139, 250, .3); }
.p-tag.sensor-Both { color: var(--both); border-color: rgba(244, 114, 182, .3); }
.p-tag.status-完成 { color: #6ee7a8; border-color: rgba(110, 231, 168, .28); }
.p-tag.status-确认 { color: #9fc4ff; border-color: rgba(159, 196, 255, .28); }
.p-tag.status-待定 { color: var(--warn); border-color: rgba(255, 180, 84, .28); }

.p-grid {
  margin-top: 20px;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1px;
  background: var(--line); border: 1px solid var(--line); border-radius: 9px; overflow: hidden;
}
.p-cell { background: #0a1322; padding: 11px 12px; min-width: 0; }
.p-cell span { display: block; font-size: 11px; letter-spacing: .1em; color: var(--dim); margin-bottom: 5px; }
.p-cell b { font-family: var(--mono); font-size: 13px; font-weight: 600; color: #dce7f7; overflow-wrap: anywhere; }
.p-cell b.wrap { font-family: var(--sans); font-size: 13.5px; line-height: 1.5; word-break: break-word; }
.p-link {
  display: inline-block; margin-top: 8px; max-width: 100%;
  color: var(--accent-2); text-decoration: none;
  font-family: var(--mono); font-size: 11.5px; word-break: break-all;
}
.p-link:hover { text-decoration: underline; }

.p-section { margin-top: 24px; }
.p-section h4 {
  margin: 0 0 9px; padding-left: 9px; position: relative;
  font-size: 12px; letter-spacing: .14em; font-weight: 650; color: var(--muted);
}
.p-section h4::before {
  content: ""; position: absolute; left: 0; top: 1px; bottom: 1px; width: 2px;
  background: var(--accent); border-radius: 2px; opacity: .8;
}
.prose {
  font-size: 14px; line-height: 1.78; color: #dde7f6;
  white-space: pre-wrap; word-break: break-word;
}
.prose code { font-family: var(--mono); font-size: 12.5px; color: var(--accent-2); }
.empty { color: var(--dim); font-size: 13.5px; }

.figs { display: flex; flex-direction: column; gap: 10px; }
.fig {
  margin: 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden;
  background: #fff; cursor: zoom-in;
}
.fig img { display: block; width: 100%; height: auto; }
.fig figcaption { padding: 7px 9px; background: #0a1322; color: var(--dim); font-family: var(--mono); font-size: 11px; letter-spacing: .05em; }

.chips { display: flex; flex-direction: column; gap: 6px; }
.chip {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 8px 9px; text-align: left;
  background: rgba(255, 255, 255, .018); border: 1px solid var(--line); border-radius: 7px;
  color: #d9e2f0; font-size: 12.5px; line-height: 1.45;
  transition: border-color .15s, background .15s, color .15s;
}
.chip:hover { border-color: var(--accent-line); background: var(--accent-soft); color: #dce8fa; }
.chip .n {
  flex: none; font-family: var(--mono); font-size: 11px; color: var(--accent-2);
  min-width: 22px; padding-top: 1px;
}
.chip .t { min-width: 0; word-break: break-word; }
.chip.ext { border-style: dashed; }
.chip.ext .t { color: #c3cfe1; }
.chip .yr { flex: none; margin-left: auto; font-family: var(--mono); font-size: 11px; color: var(--dim); padding-left: 6px; }

.rel-flow { display: flex; flex-direction: column; gap: 8px; margin-top: 18px; }
.rel-card {
  display: block; width: 100%; text-align: left;
  padding: 11px 12px; border: 1px solid var(--line); border-radius: 9px;
  background: rgba(255, 255, 255, .018);
}
.rel-card:hover { border-color: var(--accent-line); background: var(--accent-soft); }
.rel-card .rc-k { display: flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 11px; color: var(--dim); letter-spacing: .1em; }
.rel-card .rc-t { margin-top: 6px; font-size: 13.5px; line-height: 1.5; color: #dce7f7; font-weight: 600; word-break: break-word; }
.rel-arrow { display: flex; align-items: center; gap: 8px; color: var(--dim); font-family: var(--mono); font-size: 11.5px; letter-spacing: .1em; padding-left: 4px; }
.rel-arrow i { flex: 1; height: 1px; background: linear-gradient(90deg, var(--accent-line), transparent); }

.p-actions { display: flex; gap: 8px; margin-top: 18px; }
.p-actions button {
  flex: 1; height: 36px;
  border: 1px solid var(--line-2); border-radius: 8px;
  background: rgba(255, 255, 255, .02); color: var(--muted); font-size: 13px; letter-spacing: .04em;
}
.p-actions button:hover { color: var(--text); border-color: var(--accent-line); background: var(--accent-soft); }

.overview-top { display: flex; flex-direction: column; gap: 2px; }
.ov-title { font-size: 21px; font-weight: 650; letter-spacing: .02em; }
.ov-sub { font-family: var(--mono); font-size: 11.5px; letter-spacing: .14em; color: var(--dim); margin-top: 6px; }
.ov-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 20px; }
.ov-stat { padding: 13px; border: 1px solid var(--line); border-radius: 9px; background: rgba(255, 255, 255, .018); }
.ov-stat b { display: block; font-family: var(--mono); font-size: 22px; font-weight: 650; color: var(--accent-2); }
.ov-stat span { display: block; margin-top: 4px; font-size: 11.5px; letter-spacing: .1em; color: var(--dim); }
.rank { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; }
.rank-row {
  display: flex; align-items: center; gap: 9px; width: 100%; text-align: left;
  padding: 8px 9px; border: 1px solid var(--line); border-radius: 7px; background: transparent;
}
.rank-row:hover { border-color: var(--accent-line); background: var(--accent-soft); }
.rank-row .idx { font-family: var(--mono); font-size: 11.5px; color: var(--dim); width: 20px; flex: none; }
.rank-row .tt { flex: 1; min-width: 0; font-size: 12.5px; line-height: 1.4; color: #dde7f6; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-row .ct { font-family: var(--mono); font-size: 11.5px; color: var(--accent-2); flex: none; }
.bar-row { display: flex; align-items: center; gap: 9px; margin-top: 8px; }
.bar-row .bl { width: 62px; flex: none; font-family: var(--mono); font-size: 11.5px; color: var(--muted); }
.bar-row .bt { flex: 1; height: 6px; border-radius: 99px; background: rgba(255, 255, 255, .05); overflow: hidden; }
.bar-row .bt i { display: block; height: 100%; border-radius: 99px; background: var(--accent); }
.bar-row .bv { width: 30px; text-align: right; font-family: var(--mono); font-size: 11.5px; color: var(--dim); }

/* ---------------------------------------------------------------- 数据集 */
.view-datasets { min-width: 0; }
.table-shell { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.table-tools {
  display: flex; align-items: center; gap: 14px;
  height: 58px; padding: 0 20px;
  border-bottom: 1px solid #2a2117;
  background: rgba(20, 14, 8, .4);
}
.table-tools .search { width: 340px; }
.table-count { font-family: var(--mono); font-size: 12px; color: var(--dim); letter-spacing: .05em; }
.table-count b { color: var(--accent-2); font-weight: 650; }
.table-scroll { flex: 1; min-height: 0; overflow: auto; }
.data-table {
  border-collapse: separate; border-spacing: 0;
  min-width: 2860px; width: max-content;
  font-size: 13px;
}
.data-table thead th {
  position: sticky; top: 0; z-index: 4;
  padding: 12px 13px;
  background: #171009;
  border-bottom: 1px solid #35281a;
  color: #f0dfc9;
  font-size: 12px; font-weight: 600; letter-spacing: .04em; text-align: left;
  white-space: normal; line-height: 1.45; vertical-align: bottom;
}
.data-table tbody td {
  padding: 12px 13px;
  border-bottom: 1px solid rgba(70, 54, 34, .42);
  color: #dbcbb4;
  line-height: 1.62;
  vertical-align: top;
  white-space: pre-wrap;
  word-break: break-word;
}
.data-table tbody tr:hover td { background: rgba(255, 157, 61, .045); color: #d8c8b2; }
.data-table tbody tr:first-child td { border-top: 1px solid transparent; }
.data-table td.idx { font-family: var(--mono); font-size: 11px; color: #a08b6e; text-align: right; width: 44px; }
.data-table td.name { color: #ffd9a8; font-weight: 650; font-size: 13.5px; }
.data-table td.manager { font-family: var(--mono); font-size: 12px; color: #cdb695; }
.data-table a.inline-link {
  display: inline-flex; align-items: center; gap: 3px;
  margin-top: 4px; color: #ffb35c; text-decoration: none;
  font-family: var(--mono); font-size: 11.5px; word-break: break-all;
}
.data-table a.inline-link:hover { text-decoration: underline; }
.data-table .muted { color: #a89680; }
.data-table .warn { color: #ffb454; }
.data-table th:nth-child(1), .data-table td:nth-child(1) { width: 44px; }
.data-table th:nth-child(2), .data-table td:nth-child(2) { width: 86px; }
.data-table th:nth-child(3), .data-table td:nth-child(3) { width: 220px; }
.data-table th:nth-child(4), .data-table td:nth-child(4) { width: 200px; }
.data-table th:nth-child(5), .data-table td:nth-child(5) { width: 270px; }
.data-table th:nth-child(6), .data-table td:nth-child(6) { width: 130px; }
.data-table th:nth-child(7), .data-table td:nth-child(7) { width: 280px; }
.data-table th:nth-child(8), .data-table td:nth-child(8) { width: 270px; }
.data-table th:nth-child(9), .data-table td:nth-child(9) { width: 230px; }
.data-table th:nth-child(10), .data-table td:nth-child(10) { width: 120px; }
.data-table th:nth-child(11), .data-table td:nth-child(11) { width: 250px; }
.data-table th:nth-child(12), .data-table td:nth-child(12) { width: 320px; }

.empty-row td { text-align: center; color: var(--dim); padding: 60px 0; font-size: 13px; }

/* ---------------------------------------------------------------- 灯箱 */
.lightbox {
  position: fixed; inset: 0; z-index: 90;
  display: grid; place-items: center;
  background: rgba(3, 6, 12, .93);
  cursor: zoom-out;
  padding: 3vh 3vw;
}
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 6px; background: #fff; box-shadow: 0 30px 80px rgba(0, 0, 0, .7); }

/* ---------------------------------------------------------------- 响应式 */
@media (max-width: 1280px) {
  .metrics { gap: 16px; }
  .metric:nth-child(n+4) { display: none; }
  .search { width: 230px; }
  .panel {
    position: absolute; right: 0; top: 0; bottom: 0; z-index: 30;
    width: 420px; box-shadow: -30px 0 60px rgba(0, 0, 0, .5);
  }
  .panel-body { width: 420px; }
  .peek { width: 420px; }
  .peek .panel-body { width: 420px; }
  .view-papers:has(.panel.is-open) .legend { display: none; }
}
@media (max-width: 900px) {
  .metrics { display: none; }
}
@media (max-width: 1020px) {
  .graph-tools { flex-wrap: wrap; height: auto; padding: 10px 14px; gap: 8px; }
  .tool-spacer { display: none; }
  .search { width: 100%; }
  .panel.is-open { width: min(92vw, 440px); }
  .panel-body { width: min(92vw, 440px); }}
@media (max-width: 720px) {
  .brand-text { display: none; }
  .topbar { gap: 12px; padding: 0 12px; }
  .tab { padding: 0 10px; font-size: 12px; }
  .source-chip span { display: none; }
  .year-ruler { padding: 0 12px; }
  .legend { gap: 8px; left: 10px; bottom: 10px; padding: 6px 9px; }
  .legend .lg:nth-child(n+4) { display: none; }
}
